Sandia is a multiprogram laboratory operated by Sandia Corporation, a Lockheed Martin Company, for the United States Department of Energy’s National Nuclear.

Slides:



Advertisements
Similar presentations
BASIS Quick Start Guide by Andreas Schuh.  Introduction  Installing BASIS  Creating a New Project  Installing Your Project  Adding Executables 
Advertisements

Copyright © 2008 Pearson Addison-Wesley. All rights reserved. Chapter 12 Separate Compilation Namespaces Simple Make Files (Ignore all class references.
SETUP AND CONFIGURATIONS WEBLOGIC SERVER. 1.Weblogic Installation 2.Creating domain through configuration wizard 3.Creating domain using existing template.
Julie McEnery1 Installing the ScienceTools The release manager automatically compiles each release of the Science Tools, it creates a set of wrapper scripts.
Solaris Software Packaging and Installation Paul Foster 14/11/2000.
Introduction to The Linaro Toolchain Embedded Processors Training Multicore Software Applications Literature Number: SPRPXXX 1.
1 Introduction to Tool chains. 2 Tool chain for the Sitara Family (but it is true for other ARM based devices as well) A tool chain is a collection of.
Automated Computer Account Management in Active Directory June 2 nd, 2009 Bill Claycomb Systems Analyst Sandia National Laboratories Sandia is a multiprogram.
Partner Logo German Cancio – WP4-install LCFG HOW-TO - n° 1 WP4 hands-on workshop: EDG LCFGng exercises
Lesson 7-Creating and Changing Directories. Overview Using directories to create order. Managing files in directories. Using pathnames to manage files.
Donald Stark National Center for Atmospheric Research (NCAR) The Developmental Testbed Center (DTC) Wednesday 29 June, 2011 GSI Fundamentals (1): Setup.
Page 1 Trilinos Software Engineering Technologies and Integration Capability Area Overview Roscoe A. Bartlett Department.
CCA Port, Component & Application Build Skeleton Templates “A new script toolkit for generating CCA build skeletons” Torsten Wilde and James Kohl Oak Ridge.
Donald Stark National Center for Atmospheric Research (NCAR) The Developmental Testbed Center (DTC) Thursday 13 August, 2015 Downloading and Building EnKF.
Software Tools and Processes Training and Discussion October 16, :00-4:30 p.m. Jim Willenbring.
Trilinos User Group Meeting Thursday, November 8 th, 2007 Timothy M. Shead (1424) Danny Dunlavy (1415) SAND P Sandia is a multiprogram laboratory.
Sandia is a multiprogram laboratory operated by Sandia Corporation, a Lockheed Martin Company, for the United States Department of Energy’s National Nuclear.
Trilinos 101: Getting Started with Trilinos November 7, :30-9:30 a.m. Mike Heroux Jim Willenbring.
Lab 11 Department of Computer Science and Information Engineering National Taiwan University Lab11 - Porting 2014/12/9/ 26 1.
Page 1 Trilinos Usage of CMake/CTest/CDash Roscoe A. Bartlett Department of Optimization & Uncertainty Estimation Sandia.
Page 1 Trilinos Software Engineering Status and Future Issues Roscoe A. Bartlett Department of Optimization & Uncertainty.
Taking Ownership of Your Package’s Python Interface 2005 Trilinos Users Group Meeting 31 Oct :15-2:15 Bill Spotz.
Page 1 Trilinos Software Engineering Technologies and Integration Capability Area Overview Roscoe A. Bartlett Department.
Software Engineering in Robotics Packaging and Deployment of Systems Henrik I. Christensen –
Makefiles CISC/QCSE 810. BeamApp and Tests in C++ 5 source code files After any modification, changed source needs to be recompiled all object files need.
ICS – Software Engineering Group 1 Cross Compiling vxWorks on Linux EPICS Collaboration Meeting l May 2002 at BESSY, Germany May 2002 at BESSY,
Introduction Use of makefiles to manage the build process Declarative, imperative and relational rules Environment variables, phony targets, automatic.
Parallel Interactive Computing with PyTrilinos and IPython Bill Spotz, SNL (Brian Granger, Tech-X Corporation) November 8, 2007 Trilinos Users Group Meeting.
The introduction of CMT Version v1r14. General index 1.presentation 2.how to install CMT 3.how to write a requirements file 4.how to use CMT.
Page 1 Embedded Sensitivities and Optimization From Research to Applications Roscoe A. Bartlett Department of Optimization & Uncertainty Estimation Sandia.
Page 1 Trilinos Release Improvement Issues Roscoe A. Bartlett Department of Optimization & Uncertainty Estimation Trilinos.
CERN Manual Installation of a UI – Oxford July - 1 LCG2 Administrator’s Course Oxford University, 19 th – 21 st July Developed.
Old Chapter 10: Programming Tools A Developer’s Candy Store.
Scons Writing Solid Code Overview What is scons? scons Basics Other cools scons stuff Resources.
CMake For Trilinos Developers
The report on the current situation of the BESIII framework zhangxiaomei maqiumei 10/3/2004.
NA-MIC National Alliance for Medical Image Computing Slicer Building and Deployment Steve Pieper, PhD.
How to configure, build and install Trilinos November 2, :30-9:30 a.m. Jim Willenbring Mike Phenow.
1 / 22 AliRoot and AliEn Build Integration and Testing System.
SciDAC SSS Quarterly Report Sandia Labs August 27, 2004 William McLendon Sandia is a multiprogram laboratory operated by Sandia Corporation, a Lockheed.
Test Harness & Website Mike Phenow Trilinos User Group Meeting November 4 th, :30 am.
LAMMPS Users’ Workshop
What is a port The Ports Collection is essentially a set of Makefiles, patches, and description files placed in /usr/ports. The port includes instructions.
October 10-11, 2002 Houston, Texas Erik DeBenedictis William McLendon Mike Carifio Sandia is a multiprogram laboratory operated by Sandia Corporation,
New Features in ML 2004 Trilinos Users Group Meeting November 2-4, 2004 Jonathan Hu, Ray Tuminaro, Marzio Sala, Michael Gee, Haim Waisman Sandia is a multiprogram.
1 Stratimikos Unified Wrapper to Trilinos Linear Solvers and Preconditioners Roscoe A. Bartlett Department of Optimization & Uncertainty Estimation Sandia.
Dissecting the Windows CE Build Process James Y. Wilson Principal Engineer, Windows Embedded MVP CalAmp, Inc. James Y. Wilson Principal Engineer, Windows.
Trilinos Framework Update Roscoe A. Bartlett James M. Willenbring Michael N. Phenow Trilinos User Group Monday, October 31st, : :30 am Building.
Sandia is a multi-program laboratory operated by Sandia Corporation, a Lockheed Martin Company, for the United States Department of Energy’s National Nuclear.
Trilinos Strategic (and Tactical) Planning Sandia is a multiprogram laboratory operated by Sandia Corporation, a Lockheed Martin Company, for the United.
10/15/05 1 Making a build of WDSS-II from the source Jeff Brogden National Severe Storms Laboratory & University of Oklahoma.
Getting Started with Trilinos October 14, :30-10:30 a.m. Jim Willenbring.
Page 1 CMake Trilinos? Roscoe A. Bartlett Department of Optimization & Uncertainty Estimation Esteban J. Guillen Department.
Yannick Patois - Datagrid Software Repository Presentation - March, n° 1 Datagrid Software Repository Presentation CVS, packages and automatic.
Photos placed in horizontal position with even amount of white space between photos and header Sandia National Laboratories is a multi-program laboratory.
Trilinos Framework: Next Steps Thursday November 9, :45-9:30 a.m. Jim Willenbring Mike Phenow.
INTRODUCTION TO AUTOCONF AND AUTOMAKE. GNU BUILD SYSTEM 1)GNU AUTOCONF 2)GNU AUTOMAKE 3)GNU LIBTOOL 4)GNU GETTEXT.
Build Tools 1. Building a program for a large project is usually managed by a build tool that controls the various steps involved. These steps may include:
How to configure, build and install Trilinos November 2, :30-9:30 a.m. Jim Willenbring.
CLHEP Infrastructure Improvements CHEP 2004 Lynn Garren, FNAL and Andreas Pfeiffer, CERN.
Virtual Directory Services and Directory Synchronization May 13 th, 2008 Bill Claycomb Computer Systems Analyst Infrastructure Computing Systems Department.
SciDAC SSS Quarterly Report Sandia Labs January 25, 2005 William McLendon Sandia is a multiprogram laboratory operated by Sandia Corporation, a Lockheed.
Sandia is a multiprogram laboratory operated by Sandia Corporation, a Lockheed Martin Company, for the United States Department of Energy’s National Nuclear.
Developing Portable Applications ● Introduction GNU autotools – GNU toolchain ● Goals - cross-platform ● Supported platforms (POSIX compliant) ● GNU autotools.
BASIS Quick Start Guide
Software Package development and management
Makefile Tutorial CIS5027 Prof: Dr. Shu-Ching Chen
Prof: Dr. Shu-Ching Chen TA: Samira Pouyanfar Hector Cen Fall 2017
Building and Linking against Trilinos
Preparation for Assignment 2
Presentation transcript:

Sandia is a multiprogram laboratory operated by Sandia Corporation, a Lockheed Martin Company, for the United States Department of Energy’s National Nuclear Security Administration under contract DE-AC04-94AL The Trilinos Export Makefile System for Portable and Scalable Dependency Tracking Roger Pawlowski, Roscoe Bartlett, and Jim Willenbring Sandia National Laboratories Albuquerque, NM Trilinos User Group Meeting October 31 st, 2005

Why Export Makefiles are Important The number of packages in Trilinos has exploded. As package dependencies (especially optional ones) are introduced, more maintenance is required by the top-level packages: NOXAmesos EpetraExt Epetra Ifpack ML SuperLU Direct DependenciesIndirect Dependencies NOX either must: Account for the new libraries in it’s configure script (unscalable), or Depend on direct dependent packages to supply them through export makefiles. New Library

Motivation continued Additionally, while Trilinos has had an internal export makefile system, nothing has existed to allow applications to access the export makefiles. This work: –Adapts the original Makefile.export files so that they can be installed in the prefix directory and used directly by applications! –Optionally allows users to clean up the build and link lines by removing redundant includes and libraries (gnumake dependent).

Requirements Portability – must run on all supported platforms with minimal additional requirements. Packages only need account for direct dependencies. They should know nothing about indirect dependencies. Circular dependencies must be supported.

Circular Dependencies ADCBEF Trilinos Build Progression Trilinos builds lower level libraries first. If there is a circular dependency  E depends on B, then the tests/examples in E that directly use code in B will fail to be built: E requires libraries B, C, and D be built and linked in. The “all-libs” target allows a code to jump out of it’s build process and build ONLY the libraries of higher level packages. In the example above, after E’s library is built, and before it links its examples, B, C, and D’s libraries will be built. See exago or aztecoo/thyra for a working example of this process (We will implement library circular depenancies for NOX and ML soon). High Level Package (LOCA/NOX/MOOCHO) Low Level Package (Teuchos)

Exago (“Export”) On software.sandia.gov: –setenv exago –cvs checkout exago A light-weight copy of the Trilinos build system. Provides a fast-configuring/compiling test-bed for the export makefile system. Demonstrated portability. Examples on how to link user applications to Trilinos using the Export makefiles. Example using circular dependencies. Contains a draft SAND report of how to implement the export makefile system (not finished yet).

Overview Each package creates an export makefile named: Makefile.export. {.in}  Makefile.export.nox{.in} This file provides the following variables to make: _INCLUDES  NOX_INCLUDES _LIBS  NOX_LIBS Each variable above should include all package dependencies it needs to link with an application. Any indirect dependencies should be brought in through the export files of other packages. Scripts create a file that contains compilers and build flags: –Makefile.export..macros For circular dependencies, an extra make target must be defined called “all-libs”.

Flags to Support --enable-export-makefiles –Creates export makefiles in the install (prefix) directory. –This option requires perl to be set in your path or defined with --with-perl=. –Note that the export makefiles are always created and used in the build directory, but will not be installable without this option to change the paths. –Found in the file “tac_arg_enable_export_makefiles.m4”. --with-gnumake –Gnu's make has special functions we can use to eliminate redundant paths in the build and link lines. –Enable this if you use gnu’s version of make to build Trilinos. –This requires that perl is in your path or that you have specified the perl executable with --with-perl=. –Configure will check for the existence of the perl executable and quit with an error if it is not found. –Most machines MUST build with gnumake enabled because the operating system can’t support such long link lines! –Found in the file “tac_arg_enable_export_makefiles.m4”. --with-perl –Allows user to specify a perl executable. For example: --with-perl=/usr/bin/perl. –Found in the file “tac_arg_with_perl.m4”.

Example: EpetraExt Required dependency on Teuchos and Epetra Optional dependency on Triutils EpetraExt Epetra Teuchos Triutils

Step 1: File Support Copy over the seven files into the “Trilinos/packages/ /config” directory. 1.string-replace.pl – string replacement utility 2.strip_dup_inc_paths.pl – removes duplicate include paths from makefile variable 3.strip_dup_libs.pl – removes duplicate libraries from makefile variable 4.replace-install-prefix.pl – Calls the above perl scripts on the eport makefile if installing into a directory 5.tac_arg_enable-export-makefiles.m4 6.tac_arg_enable_can_use_package.m4 7.tar_arg_with_perl.m4

Step 2: Add calls to configure.ac file # # Checks for Makefile.export related flags # TAC_ARG_ENABLE_EXPORT_MAKEFILES(yes) # # Checks for optional packages # TAC_ARG_ENABLE_CAN_USE_PACKAGE(epetraext, triutils, EPETRAEXT_TRIUTILS, BUILD_TRIUTILS, yes, [Build triutils support in epetraext.], [Build triutils support in epetraext. Can be overridden with --disable-epetraext-triutils.]) AC_CONFIG_FILES([ Makefile Makefile.export.epetraext src/Makefile test/Makefile enable-makfile-export --enable-gnumake --with-perl Help strings for the two flags: --enable-epetraext-triutils --enable-triutils --enable-epetra-triutils Use implicit dependency: if “yes” then will look for: –enable-triutils still can be overridden with: –disable-epetra-triutils AC_DEFINE(HAVE_EPETRAEXT_TRIUTILS) AM_CONDITIONAL(BUILD_TRIUTILS)

## Required Dependency on teuchos include ## Required Dependency on Epetra include ## Optional dependency on triutils _EPETRAEXT_INCLUDES = \ \ \ \ \ \ \ \ \ \ $(EPETRA_INCLUDES) \ $(TRIUTILS_INCLUDES) \ $(TEUCHOS_INCLUDES) _EPETRAEXT_LIBS = \ -lepetraext \ $(EPETRA_LIBS) $(TRIUTILS_LIBS) $(TEUCHOS_LIBS) = $(shell \ $(_EPETRAEXT_INCLUDES)) = $(shell $(_EPETRAEXT_LIBS)) \ = $(_EPETRAEXT_INCLUDES) = $(_EPETRAEXT_LIBS) Step 3: Create Makefile.export.epetraext.in Critical to remember flags that Trilinos sets! Configure creates the actual file! Direct macro substitution only for autoconf variables! Regular macros for xxx_INCLUDE and xxx_LIBS If using GNUMake then perl scripts remove duplicates

Step 4: Edit Top-Level Makefile.am ## ####################################################################### ## Target for circular dependencies ## ####################################################################### all-libs: cd $(top_builddir)/src ; $(MAKE) all-libs Add the “all-libs” target for circular dependencies: This target must also be added to any Makefile.am in a directory that creates a library such as: /src

Step 4 continued: Edit Top-Level Makefile.am ## ####################################################################### ## Export Makefile Installation ## ####################################################################### if USING_EXPORT_MAKEFILES install-exec-hook: cp $(top_builddir)/Makefile.export.epetraext $(exec_prefix)/include/. $(PERL_EXE) $(top_srcdir)/config/replace-install-prefix.pl \ --exec-prefix=$(exec_prefix) \ --my-export-makefile=Makefile.export.epetraext \ \ --my-abs-incl- \ \ --dep-package-abs- $(PERL_EXE) $(top_srcdir)/config/generate-makeoptions.pl $(top_builddir)/src/Makefile epetraext > $(exec_prefix)/include/Makefile.export.epetraext.macros uninstall-hook: rm -f $(exec_prefix)/include/Makefile.export.epetraext rm -f $(exec_prefix)/include/Makefile.export.epetraext.macros else install-exec-hook: uninstall-hook: endif Add the install-hook to call the perl scripts to change the directory paths of the installed Makefile.export files: Generates the file Makefile.export.epetraext.macros Tells the perl scripts about include and lib paths

Step 5: Edit the EpetraExt/src/Makefile.am # include $(top_builddir)/Makefile.export.epetraext AM_CPPFLAGS = $(EPETRAEXT_INCLUDES) # # Library Target for Circular Dependencies # if BUILD_TRIUTILS BUILD_TRIUTILS_LIBS = cd $(top_builddir)/../triutils ; $(MAKE) all-libs else BUILD_TRIUTILS_LIBS = endif all-libs: $(MAKE) libepetraext.a $(BUILD_TRIUTILS_LIBS) Include the export makefile to access the EPETRAEXT_INCLUDES variable: Add the circular dependency target “all-libs”:

Step 6: Edit Test/Example Makefile.am to use the Export Makefiles EXEEXT =.exe noinst_PROGRAMS = MapColoring_test MapColoring_test_SOURCES = \ $(srcdir)/cxx_main.cpp \ $(top_srcdir)/test/epetra_test_err.h MapColoring_test_DEPENDENCIES = \ $(top_builddir)/src/libepetraext.a \ $(top_builddir)/../epetra/src/libepetra.a include $(top_builddir)/Makefile.export.epetraext if USING_GNUMAKE EXPORT_LIBS = $(shell $(PERL_EXE) $(top_srcdir)/config/strip_dup_libs.pl $(EPETRAEXT_LIBS)) EXPORT_INC_PATH = $(shell $(PERL_EXE) $(top_srcdir)/config/strip_dup_incl_paths.pl $(EPETRAEXT_INCLUDES)) else EXPORT_LIBS = $(EPETRAEXT_LIBS) EXPORT_INC_PATH = $(EPETRAEXT_INCLUDES) endif AM_CPPFLAGS = $(EXPORT_INC_PATH) MapColoring_test_LDADD = $(EXPORT_LIBS) Include the export makefile Strips Duplicates Allows Duplicates

Application Usage (Trilinos Installed) ## ## Application 1 is a non-autoconfed application ## TRILINOS_INSTALL_DIR =../LIB include $(TRILINOS_INSTALL_DIR)/include/Makefile.export.epetraext.macros include $(TRILINOS_INSTALL_DIR)/include/Makefile.export.epetraext COMPILE_FLAGS = $(EPETRAEXT_CXXFLAGS) $(EPETRAEXT_DEFS) $(EPETRAEXT_CPPFLAGS) \ $(EPETRAEXT_INCLUDES) LINK_FLAGS = $(EPETRAEXT_LIBS) app1.exe: app1.o $(EPETRAEXT_CXXLD) $(EPETRAEXT_CXXFLAGS) -o app1.exe app1.o $(LINK_FLAGS) app1.o: $(EPETRAEXT_CXX) $(COMPILE_FLAGS) -c app1.cpp clean: rm -f *.o app1.exe *~ CXXLD, CXX, CXXFLAGS, DEFS, CPPFLAGS comes from macros file. Guarantees Compatible Objects code when linking! Include only the packages that you have DIRECT dependencies on

Application Usage (From Trilinos Build Dir) ## ## Application 1 is a non-autoconfed application ## TRILINOS_HOME = /rabartl/PROJECTS/Trilinos.base/Trilinos TRILINOS_BUILD = /rabartl/PROJECTS/Trilinos.base/BUILDS/GCC-3.4.3/SERIAL_OPTIMIZED include Makefile.export.epetraext.macros include $(TRILINOS_BUILD)/packages/epetraext/Makefile.export.epetraext COMPILE_FLAGS = $(EPETRAEXT_CXXFLAGS) $(EPETRAEXT_DEFS) $(EPETRAEXT_CPPFLAGS) \ $(EPETRAEXT_INCLUDES) LINK_FLAGS = $(EPETRAEXT_LIBS) app1.exe: app1.o $(EPETRAEXT_CXXLD) $(EPETRAEXT_CXXFLAGS) -o app1.exe app1.o $(LINK_FLAGS) app1.o: $(EPETRAEXT_CXX) $(COMPILE_FLAGS) -c app1.cpp clean: rm -f *.o app1.exe *~ top_srcdir = $(TRILINOS_HOME)/packages/epetraext top_buildcdir = $(TRILINOS_BUILD)/packages/epetraext Makefile.export.epetraext.macros : $(top_buildcdir)/src/Makefile perl $(top_srcdir)/config/generate-makeoptions.pl \ $(top_builddir)/src/Makefile epetraext \ > Makefile.export.epetraext.macros Build macros file automatically!

Current Status Trilinos Release 6.0 contains 13 packages that have been adapted to use the new export system: Amesos, Anasazi, AztecOO, Belos, Epetra, Epetraext, Ifpack, ML, NOX, LOCA, Teuchos, Thyra, and Triutils. Ported to all required Trilinos platforms, but many have required the use of the –with-gnumake option. Contact Roger Pawlowski or Roscoe Bartlett for help in setting up your package.

Caveats Export makefiles are only for Trilinos libraries. Third party libraries still need to be added using –with-libs and –with-includes flags.

Extra Slides

ABlasB A always depends on B and Blas. B optionally depends on C. C optionally depends on Blas. This fact forces A to: 1.Know all about indirect dependencies 2.Put in configure options for Blas that depend on how indirect packages are configured. C Why we chose export makefiles and require gnumake.