How to configure, build and install Trilinos November 2, :30-9:30 a.m. Jim Willenbring
Overview Trilinos Web Page Obtaining Trilinos Tools for Users –Mailman –Bugzilla Configuring Trilinos –General configure options –Platform and machine specific configure options –Troubleshooting Building and Installing Trilinos Testing Improving Efficiency Linking to Trilinos Libraries
The Trilinos Home Page Highlights of the web page –Download page –User documentation Getting started page Installation guide User guide FAQ Individual package documentation Runtests documentation
Instructions for obtaining Trilinos are available –in the Trilinos User Guide. –or the Installation Guide. Download from the website. Obtain a copy from the CVS repository. Not available for all users. Send a note to if you have questions about obtaining Obtaining Trilinos
Tools for Users Mailman –Users are encouraged to sign up for: Users lists for Trilinos and individual packages of interest. Announce lists for Trilinos and individual packages of interest. –See for the complete list of mail lists. –Use for general help
Tools for Users (cont.) Bugzilla –Issue tracking tool. –An account is required to file a “bug”. –Can be used to report bugs or request new features. –Please provide as much detail as possible (For example: Platform, OS, compiler versions, etc.)
Configuring Trilinos Find an in depth discussion in the Trilinos User Guide: Trilinos Installation manual:
Configuring Trilinos Trilinos uses Autoconf and Automake. Don’t just try “configure, make, make install”. –Many platforms need more options. –Even if the build is successful, the default set of packages and options probably will not suit your needs. If you don’t want to build everything, then don’t. –Takes a long time to configure and build. –Run into problems while building a package that is not needed. Trilinos has many uses.
Configuring Trilinos (cont.) To see all Trilinos options type –./configure --help=recursive General Configure options –Determine which Trilinos packages should be built. –Consider using --disable-default-packages. –Serial or MPI?
Configuring Trilinos (cont.) Platform and machine specific options –Common options online at: –Example configure invocation scripts. Examples only – customizations will be necessary. Can be found in the Trilinos directory structure in the Trilinos/sampleScripts/ directory. For example sgi64_mpi_atlantis. Users are encouraged to submit their scripts.
Configuring Trilinos (cont.) Example invoke configure file for SGI64:../configure --enable-mpi --disable-default-packages \ --enable-ifpack --enable-aztecoo \ --with-mpi-libs=-lmpi \ --prefix=/where/I/want/to/install/Trilinos \ CFLAGS="-O2 -64" FFLAGS="-O2 -64" \ CXXFLAGS="-O LANG:std -LANG:ansi-for-init-scope=ON \ -ptused -DMPI_NO_CPPBIND" \ LDFLAGS=" -64 -L/usr/lib64/mips4/r L/usr/lib64/mips4 \ -L/usr/lib64 "
Configuring Trilinos (cont.) Platform and machine specific options:../configure --enable-mpi --disable-default-packages \ --enable-ifpack --enable-aztecoo \ --with-mpi-libs=-lmpi \ --prefix=/where/I/want/to/install/Trilinos \ CFLAGS="-O2 -64" FFLAGS="-O2 -64" \ CXXFLAGS="-O LANG:std -LANG:ansi-for-init-scope=ON \ -ptused -DMPI_NO_CPPBIND" \ LDFLAGS=" -64 -L/usr/lib64/mips4/r L/usr/lib64/mips4 \ -L/usr/lib64 "
Configuring Trilinos (cont.) Troubleshooting –Most errors are due to system setup. –Look for errors in the invoke-configure. –Autoconf is not able to detect spelling errors. ) –Line continuation problems (ex --enable-mpi \ ) –Look at the correct config.log file (created at configure time). Not an ideal solution. The config.log at the Trilinos level is not the correct config.log file. Go to the package level config.log file. For example: configure: error: /bin/sh '../../../packages/epetra/configure' failed for packages/epetra indicates that one should look at packages/epetra/config.log.
Troubleshooting using config.log The config.log file is very long. Follow these steps to find what you need: –Search for the string “Cache”. That should bring you a point in the file that looks like this: ## ## ## Cache variables. ## ## ## The error that caused the configure failure can be found above this point… But typically not directly above.
Working Through a config.log File Takes a little bit of practice. Isn’t very hard. Look for last successful configure check. Let’s try it. –Here is a common configure error: error: Cannot find lapack library, specify a path using --with-ldflags=-I (ex. --with-dlflags=- I/usr/path/lib) or a specific library using --with- lapack=DIR/LIB (ex. --with- lapack=/usr/path/lib/libcxml.a)
Building and Installing Trilinos To build Trilinos type make To install Trilinos type make install
Testing Tests can be run individually after compilation. New make target – –To run the test suite (the tool will only attempt to run tests that were built), after "make“, type: make runtests-serial –Can run tests for individual packages –For MPI "make runtests-mpi" Must specify TRILINOS_MPI_GO in the environment or as an argument to make –Trilinos/commonTools/test/utilities/runtests --help
Improving Efficiency All of these techniques are discussed in the Trilinos User Guide. –Build only the packages that are needed. –After Trilinos has been ported to a machine --disable-tests --disable-examples --disable-libcheck –“make –j n” n is the number of jobs to create. Not supported by all versions of “make”. –--cache-file=config.cache Be sure to blow away if errors occur Can put removal command in invoke-configure
Linking to Trilinos Libraries Makefile.export system makes this easy. Makefile.export. files –Created in the include directory during install. –Define useful macros: _INCLUDES _LIBS –Use the macros in application makefiles. include /path_to_install/include/Makefile.export. YP_INCLUDES = $( _INCLUDES) OTHER_INCLUDES
Where to Find Help Getting started link. Help link from Trilinos home page. Online FAQ section. Trilinos User Guide. Submitting a bug report. –Please provide as much detail as possible. –Attach the appropriate config.log. Send an . for general
Where to Find Help (cont.) Trilinos Home Page:
Discussion Questions, comments?