[Trilinos-Users] make problem: teuchos link to mpi

Wilbert Weijer wilbert at lanl.gov
Fri Oct 23 14:54:02 MDT 2009


Dear Andy, Mike,

thanks for your responses, it's greatly appreciated.

Andy, your first guess appears to be correct: I hadn't specified the
compiler wrapper option:

-D MPI_USE_COMPILER_WRAPPERS:BOOL=TRUE   \
-D MPI_C_COMPILER:FILEPATH=/opt/OpenMPI/openmpi-1.2.8-intel/ib/bin/mpicc
\
-D MPI_CXX_COMPILER:FILEPATH=/opt/OpenMPI/openmpi-1.2.8-
intel/ib/bin/mpic++   \
-D MPI_Fortran_COMPILER:FILEPATH=/opt/OpenMPI/openmpi-1.2.8-
intel/ib/bin/mpif77   \

and for added security, I also specified:

-D CMAKE_C_COMPILER:FILEPATH=/opt/OpenMPI/openmpi-1.2.8-
intel/ib/bin/mpicc   \
-D CMAKE_CXX_COMPILER:FILEPATH=/opt/OpenMPI/openmpi-1.2.8-
intel/ib/bin/mpic++   \
-D CMAKE_Fortran_COMPILER:FILEPATH=/opt/OpenMPI/openmpi-1.2.8-
intel/ib/bin/mpif77   \

and now it compiles!

Thanks again!

-Wilbert.




On Fri, 2009-10-23 at 14:14 -0600, Salinger, Andrew wrote:
>  Hi Wilbert,
> 
> I have 2 guesses:
> (1) Even though you enable MPI, you might be
> overriding the compiler choice with explicitly
> picking the compilers to be $F77, $CC, $CXX.
> You can echo these variables to make sure they
> are  mpicc and not gcc.
> 
> (2) You may need to add the MPI library directory
> to your "LD_LIBRARY_PATH" environment variable.
> This is typically done in  .bashrc or .cshrc files.
> 
> If this doesn't help, send us all the screen
> output from the cmake and make commands.
> Andy
> 
> -----Original Message-----
> From: trilinos-users-bounces at software.sandia.gov [mailto:trilinos-users-bounces at software.sandia.gov] On Behalf Of Wilbert Weijer
> Sent: Friday, October 23, 2009 9:37 AM
> To: trilinos-users at software.sandia.gov
> Subject: [Trilinos-Users] make problem: teuchos link to mpi
> 
> Hi,
> 
> Hopefully this is a trivial problem: I'm trying to build Trilinos 10.0.1 on a x86_64 linux platform, but it seems that Teuchos has trouble linking to MPI. I get errors like:
> 
> /usr/projects/climate/wilbert/Libraries/TRILINOS/trilinos-10.0.1-Source/packages/teuchos/src/Teuchos_GlobalMPISession.cpp:173:
> undefined reference to `MPI_Comm_size'
> 
> Below is my cmake line, where I explicitly specify the MPI directory (and I verified that it includes an include directory containing mpi.h), and I explicitly set Teuchos_ENABLE_MPI and TPL_ENABLE_MPI.
> 
> Am I overlooking something?
> 
> Thanks!
> 
> -Wilbert.
> 
> /usr/projects/climate/wilbert/bin/cmake \
>           -D CMAKE_BUILD_TYPE:STRING=DEBUG \
>           -D CMAKE_Fortran_COMPILER:FILEPATH=$F77 \
>           -D CMAKE_CXX_COMPILER:FILEPATH=$CXX \
>           -D CMAKE_C_COMPILER:FILEPATH=$CC \
>           -D MPI_BASE_DIR:PATH=/opt/OpenMPI/openmpi-1.2.8-intel/ib/ \
>           -D Trilinos_ENABLE_DEFAULT_PACKAGES:BOOL=OFF \
>           -D Trilinos_ENABLE_Epetra:BOOL=ON \
>           -D Trilinos_ENABLE_EpetraExt:BOOL=ON \
>           -D Trilinos_ENABLE_NOX:BOOL=ON \
>           -D Trilinos_ENABLE_Belos:BOOL=ON \
>           -D Trilinos_ENABLE_LOCA:BOOL=ON \
>           -D Trilinos_ENABLE_Zoltan:BOOL=ON \
>           -D Trilinos_ENABLE_Isorropia:BOOL=ON \
>           -D Trilinos_ENABLE_Ifpack:BOOL=ON \
>           -D Trilinos_ENABLE_Teuchos:BOOL=ON \
>           -D Trilinos_ENABLE_ML:BOOL=ON \
>           -D Trilinos_ENABLE_Anasazi:BOOL=ON \
>           -D Trilinos_ENABLE_ForTrilinos:BOOL=ON \
>           -D Trilinos_ENABLE_TESTS:BOOL=ON \
>           -D NOX_ENABLE_LAPACK:BOOL=ON \
>           -D NOX_ENABLE_Epetra:BOOL=ON \
>           -D NOX_ENABLE_EpetraExt:BOOL=ON \
>           -D NOX_ENABLE_LOCA:BOOL=ON \
>           -D NOX_ENABLE_Anasazi:BOOL=ON \
>           -D NOX_ENABLE_BLAS:BOOL=ON \
>           -D NOX_ENABLE_BELOS:BOOL=ON \
>           -D Teuchos_ENABLE_MPI:BOOL=ON \
>           -D Teuchos_ENABLE_ABC:BOOL=ON \
>           -D Teuchos_ENABLE_Boost:BOOL=ON \
>           -D Teuchos_ENABLE_COMPLEX:BOOL=ON \
>           -D Teuchos_ENABLE_EXTENDED:BOOL=ON \
>           -D DART_TESTING_TIMEOUT:STRING=600 \
>           -D TPL_ENABLE_MPI:BOOL=ON \
>           -D Trilinos_EXTRA_LINK_FLAGS:STRING="$FORTRAN_LIBRARIES" \
>           -D CMAKE_VERBOSE_MAKEFILE:BOOL=TRUE       \
>           -D Trilinos_VERBOSE_CONFIGURE:BOOL=TRUE   \
>           ${EXTRA_ARGS} \
>           ${TRILINOS_PATH}
> 
> 
> _______________________________________________
> Trilinos-Users mailing list
> Trilinos-Users at software.sandia.gov
> http://software.sandia.gov/mailman/listinfo/trilinos-users
> 
-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Wilbert Weijer                        Phone:   (505) 667 7469
CCS-2, MS B296                        Fax:     (505) 667 5921
Los Alamos National Laboratory        E-mail:  wilbert at lanl.gov
Los Alamos, NM 87545                  URL: http://public.lanl.gov/wilbert
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~




More information about the Trilinos-Users mailing list