[Trilinos-Users] Building Trilinos using Xcode with MPI

Heroux, Michael A maherou at sandia.gov
Mon Sep 13 10:04:38 MDT 2010


I am trying to make an MPI build of Trilinos on a Mac using Xcode and its default compilers.  I can complete a serial build in Xcode without difficult (after turning off Fortran kernels) and I can do both serial and MPI builds using the command line approach.

I can compile source files using Xcode, but have not been able to link.  The problem seems to be that I cannot override the native g++ 4.2 compiler as the linker (with mpicxx).  I have tried putting the MPI libraries in the extra libs link variable but that does work (yet) either.  I am wondering if anyone has made it past these issues already before going further myself.

Is this a Cmake issue with Xcode? I can get Cmake to generate the Unix Makefiles fine and get a proper MPI build that way.

I am using Cmake 2.8.2 and Xcode 3.2.3 on Snow Leopard with the native GCC 4.2.1 compilers.

Below is output from the first failed link in my build.

Thanks.

Mike

Ld TRAMONTO_CMAKE_GUI/packages/teuchos/test/Comm/Debug/Teuchos_DefaultMpiComm_UnitTests.exe normal x86_64
cd /Users/maherou/Software/trilinos-10.0.4-Source
setenv MACOSX_DEPLOYMENT_TARGET 10.6
/Developer/usr/bin/g++-4.2 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.6.sdk -L/Users/maherou/Software/trilinos-10.0.4-Source/TRAMONTO_CMAKE_GUI/packages/teuchos/test/Comm/Debug -L/Users/maherou/Software/trilinos-10.0.4-Source/TRAMONTO_CMAKE_GUI/packages/teuchos/src/Debug -L/Users/maherou/Software/trilinos-10.0.4-Source/TRAMONTO_CMAKE_GUI/packages/teuchos/src -F/Users/maherou/Software/trilinos-10.0.4-Source/TRAMONTO_CMAKE_GUI/packages/teuchos/test/Comm/Debug -filelist /Users/maherou/Software/trilinos-10.0.4-Source/TRAMONTO_CMAKE_GUI/packages/teuchos/test/Comm/Trilinos.build/Debug/Teuchos_DefaultMpiComm_UnitTests.build/Objects-normal/x86_64/Teuchos_DefaultMpiComm_UnitTests.LinkFileList -mmacosx-version-min=10.6 -Wl,-search_paths_first -headerpad_max_install_names /Users/maherou/Software/trilinos-10.0.4-Source/TRAMONTO_CMAKE_GUI/packages/teuchos/src/Debug/libteuchos.a /Users/maherou/Software/trilinos-10.0.4-Source/TRAMONTO_CMAKE_GUI/Debug/liblast_lib.a /usr/lib/liblapack.dylib /usr/lib/libblas.dylib -lmpi -lopen-rte -lopen-pal -o /Users/maherou/Software/trilinos-10.0.4-Source/TRAMONTO_CMAKE_GUI/packages/teuchos/test/Comm/Debug/Teuchos_DefaultMpiComm_UnitTests.exe

Undefined symbols:
  "MPI::Win::Set_errhandler(MPI::Errhandler const&)", referenced from:
      vtable for MPI::Winin DefaultMpiComm_UnitTests.o
      vtable for MPI::Winin Teuchos_StandardUnitTestMain.o
      vtable for MPI::Winin libteuchos.a(Teuchos_UnitTestRepository.o)
      vtable for MPI::Winin libteuchos.a(Teuchos_Describable.o)
      vtable for MPI::Winin libteuchos.a(Teuchos_GlobalMPISession.o)
      vtable for MPI::Winin libteuchos.a(Teuchos_CommandLineProcessor.o)
      vtable for MPI::Winin libteuchos.a(Teuchos_MpiReductionOpSetter.o)
      vtable for MPI::Winin libteuchos.a(Teuchos_UnitTestBase.o)
      vtable for MPI::Winin libteuchos.a(Teuchos_VerboseObject.o)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://software.sandia.gov/pipermail/trilinos-users/attachments/20100913/f1212ce7/attachment.html 


More information about the Trilinos-Users mailing list