How to configure, build and install Trilinos November 2, 2004 8:30-9:30 a.m. Jim Willenbring Mike...

Post on 03-Jan-2016

235 views 3 download

Tags:

Transcript of How to configure, build and install Trilinos November 2, 2004 8:30-9:30 a.m. Jim Willenbring Mike...

How to configure, buildand install Trilinos

November 2, 2004

8:30-9:30 a.m.

Jim WillenbringMike Phenow

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

http://software.sandia.gov/trilinos/

•Highlights of the web page– Download page– User documentation

• Installation guide• User guide• FAQ• Individual package documentation

• Instructions for obtaining Trilinos are available in the Trilinos User Guide.

http://software.sandia.gov/trilinos/publications.html• Two options– Download from Trilinos website.

http://software.sandia.gov/trilinos/downloads.html– Check out a copy from the Trilinos CVS repository.

• Not available for all users.

• Send a note to trilinos-help@software.sandia.gov if you have questions about obtaining Trilinos.

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.• Example uses

–Notify user base about new feature or configure option.–Announce new release.

–See http://software.sandia.gov/mailman/listinfo for the complete list of mail lists.–Use trilinos-help@software.sandia.gov for

general help questions.

Tools for Users (cont.)

•Bugzilla

http://software.sandia.gov/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:

http://software.sandia.gov/trilinos/trilinosUserGuide.pdf• Trilinos Installation manual:

http://software.sandia.gov/trilinos/installation_manual.html

• 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. But…

Don’t Blame the Person whoPicked the Defaults

•Don’t want to build everything.–Takes a long time to configure and build.

–Too often people 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:

http://software.sandia.gov/trilinos/configuration_manual.html

–Example configure invocation scripts.• Are meant to be examples only – customizations will

almost always 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="-O2 -64 -LANG:std -LANG:ansi-for-init-scope=ON \

-ptused -DMPI_NO_CPPBIND" \

LDFLAGS=" -64 -L/usr/lib64/mips4/r10000 -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="-O2 -64 -LANG:std -LANG:ansi-for-init-scope=ON \

-ptused -DMPI_NO_CPPBIND" \

LDFLAGS=" -64 -L/usr/lib64/mips4/r10000 -L/usr/lib64/mips4 \

-L/usr/lib64 "

Configuring Trilinos (cont.)

• Troubleshooting

–Look for errors in the invoke configure file.– Autoconf is not able to detect spelling errors.– Line continuation problems (ex --enable-mpi \ ))

–Look at the correct config.log file. (Created by Autoconf.)• 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.

Working Through a config.log File

• Takes a little bit of practice.• Isn’t very hard.• Let’s try it.– Here is a common configure error:

• error: Cannot find lapack library, specify a path using --with-ldflags=-I<DIR> (ex. --with-dlflags=-I/usr/path/lib) or a specific library using --with-lapack=DIR/LIB (ex. --with-lapack=/usr/path/lib/libcxml.a)• We will now look at how this error can occur.

Building and Installing Trilinos

• To build Trilinos type

make• To install Trilinos type

make install

Testing

•We are in the process of improving the tests that are available to users. For the time being, testing can be carried out in two different ways:– Run the tests manually

• cd Trilinos/SERIAL/packages/epetra/test/CrsMatrix

• ./CrsMatrix_test.exe –v

• echo $status

– Run the tests through the Trilinos Test Harness.• http://software.sandia.gov/trilinos/developer/test_harness.html

• For the next release, we are looking at supporting a “make check” make target.

Improving Efficiency

• There are a number of ways to speed up the configure and build process (all of which are discussed in the Trilinos User Guide).– Build only the packages that are needed.– After Trilinos has been ported to a machine

• try disabling tests and/or examples. (You can always build them later.)– If tests and examples are disabled use --disable-

libcheck.

– On multiprocessor machines, use “make –j n” where n is the number of jobs to create. (This option is not universally supported.)

Linking to Trilinos Libraries

# Include Trilinos header that defines pertinent compilation information#include /path_to_trilinos_install1/include/trilinos_make_macros.makinclude /path_to_trilinos_install2/include/trilinos_make_macros.makOLIBS = $(LAPACK_LIBS) $(BLAS_LIBS)## Compilation rules….cpp.o:

$(CXX) $(CPPFLAGS) -c $(DEFS) -I$(prefix)/include $<

all : RBGen.x

RBGen.x : RBGen.o RBGenParams.o BurkardtFileIOHandler.o netCDFFileIOHandler.o$(CXX) $(CXXFLAGS) -o $@ $^ -L$(prefix)/lib -lnetcdf -lepetra -lteuchos $(OLIBS) $(FLIBS)

Where to Find Help

• Help link from Trilinos home page.http://software.sandia.gov/Trilinos/help.html• Online FAQ section.

http://software.sandia.gov/trilinos/faq.html• Trilinos User Guide.

http://software.sandia.gov/trilinos/publications.html• Submitting a bug report.– Please provide as much detail as possible.– Attach the appropriate config.log.

http://software.sandia.gov/trilinos/bug_reports.html• Send an email.– trilinos-help@software.sandia.gov for general questions.– trilinos-bugs@software.sandia.gov alternative to Bugzilla.

Where to Find Help (cont.)

• Trilinos Home Page:

http://software.sandia.gov/trilinos

Discussion

•Questions, comments?