14 October 2008

Trilinos on the mac

My configuration script for Trilinos on Mac OS X 10.5.5, for building without MPI:

./configure \
--cache-file=config.cache \
--prefix=/usr/local/trilinos-8.0.8-serial \
CC=/usr/bin/gcc CXX=/usr/bin/g++ F77=/usr/local/bin/gfortran \
--with-libs="-framework vecLib" \
--with-ldflags="-Wl,-multiply_defined -Wl,suppress" \
--enable-amesos \
--enable-epetra \
--enable-anasazi \
--enable-aztecoo \
--enable-examples \
--enable-didasko \
--enable-teuchos \
--enable-triutils \

I believe that the only software needed to get this to work is the gfortran compiler available at the mac High Performance Computing site.

I found that the with-ldflags line was necessary because otherwise the "pow" check would die from "Undefined symbols: "___gxx_personality_v0", referenced from: __gxx_personality_v0$non_lazy_ptr in ccJ9fzb2.o".

To get a trilinos-base program to compile, run g++ with the Apple compiler with options "-framework vecLib -I/usr/local/trilinos-8.0.8-serial/include -L/usr/local/trilinos-8.0.8-serial/" with the libraries (e.g. "-lepetra").


Seth said...

Note that this is now obsolete. The glorious CMake script has made compiling stuff cross-platform infinitely easier. Having installed gfortran via MacPorts, I just have:
cmake \
-D CMAKE_Fortran_COMPILER:FILEPATH=/opt/local/bin/gfortran-mp-4.4 \
-D Trilinos_ENABLE_Amesos:STRING=ON \
-D Trilinos_ENABLE_Belos:STRING=ON \
-D Trilinos_ENABLE_Epetra:STRING=ON \
-D Trilinos_ENABLE_EpetraExt:STRING=ON \
-D Trilinos_ENABLE_AztecOO:STRING=ON \
-D Trilinos_ENABLE_Ifpack:STRING=ON \
-D Trilinos_ENABLE_Tpetra:STRING=ON \
-D CMAKE_INSTALL_PREFIX:PATH=/usr/local/trilinos-106-serial \

Post a Comment