CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (http://www.cfd-online.com/Forums/openfoam-installation/)
-   -   Using native MPI libraries (http://www.cfd-online.com/Forums/openfoam-installation/57474-using-native-mpi-libraries.html)

arkangel October 26, 2007 05:35

I was trying to build for Al
 
I was trying to build for Altix 4000, i found a patch for compiling with intel icc10 , i dont want to build the WM.../lib/openmpi/libPstrem.so nor link with the WM../src/openmpi/lib/*,

Instead we have our own mpi implementation (sgi mpi libraries) , any idea which files/lines I have to change or create (in rules or bashrc and .bashrc ) ...

Any help will be greatly appreciated http://www.cfd-online.com/OpenFOAM_D...part/happy.gif

olesen October 26, 2007 06:14

In the bashrc you'll have to s
 
In the bashrc you'll have to see another default mpi implementation.

In the .bashrc you'll have to set the path/libs accordingly and set variables such as SGIMPI_ARCH_PATH=...

In the wmake/rule/linuxXXXX/
you'll need to add a rule for mplibSGIMPI

In src/Pstream/Allwmake you'll need to ajust the if [ ... ] to include your implementation.


Good luck with rebuilding.

arkangel October 26, 2007 07:36

thanks I never will guess the
 
thanks I never will guess the src/Pstream/Allwmake part i will try during the weekend i hope it works !

arkangel October 28, 2007 13:42

Hi foamers i am follow your s
 
Hi foamers i am follow your steps , lets see

I think i am close, to test I link with the mpi implented by altix and the gcc 4.2.0


the Pstream is built using our libmpi from sgi altix
ldd libPstream.so returns
...
libmpi.so => /lrz/sys/mpi_altix/lib/libmpi.so (0x2000000800080000)
...

It compiles the whole buch of libraries in lib/linuxIA64Gcc with no error -- all of them --
and these are linked in turn with the new libPstream.so. However, when it tries to compile the applications (cd solver; ./wmake all ...)it dies with the 1st one (i tried to compile some others at ramdon )

i get the following from the linker
/lrz/sys/mpi_altix/lib/libPstream.so: undefined reference to `MPI::Is_initialized()'
/lrz/sys/mpi_altix/lib/libPstream.so: undefined reference to `op_intercept(void*, void*, int*, unsigned int*)'
/lrz/sys/mpi_altix/lib/libPstream.so: undefined reference to `PMPI::Comm::mpi_comm_map'
/lrz/sys/mpi_altix/lib/libPstream.so: undefined reference to `MPI:http://www.cfd-online.com/OpenFOAM_D...part/proud.gifp::Init(void (*)(void const*, void*, int, MPI::Datatype const&), bool)'
/lrz/sys/mpi_altix/lib/libPstream.so: undefined reference to `MPI:http://www.cfd-online.com/OpenFOAM_D...part/proud.gifp::Free()'
/lrz/sys/mpi_altix/lib/libPstream.so: undefined reference to `PMPI::Comm::ignored_status'
/lrz/sys/mpi_altix/lib/libPstream.so: undefined reference to `PMPI::Intracomm::current_op'
/lrz/sys/mpi_altix/lib/libPstream.so: undefined reference to `PMPI::Request::ignored_status'
collect2: ld returned 1 exit status

It is clear that libPstream is missing some functions, any idea how come this happened and if there is a solution

arkangel October 28, 2007 13:42

Hi foamers i am following you
 
Hi foamers i am following your steps , lets see

I think i am close, to test I link with the mpi implented by altix and the gcc 4.2.0


the Pstream is built using our libmpi from sgi altix
ldd libPstream.so returns
...
libmpi.so => /lrz/sys/mpi_altix/lib/libmpi.so (0x2000000800080000)
...

It compiles the whole buch of libraries in lib/linuxIA64Gcc with no error -- all of them --
and these are linked in turn with the new libPstream.so. However, when it tries to compile the applications (cd solver; ./wmake all ...)it dies with the 1st one (i tried to compile some others at ramdon )

i get the following from the linker
/lrz/sys/mpi_altix/lib/libPstream.so: undefined reference to `MPI::Is_initialized()'
/lrz/sys/mpi_altix/lib/libPstream.so: undefined reference to `op_intercept(void*, void*, int*, unsigned int*)'
/lrz/sys/mpi_altix/lib/libPstream.so: undefined reference to `PMPI::Comm::mpi_comm_map'
/lrz/sys/mpi_altix/lib/libPstream.so: undefined reference to `MPI:http://www.cfd-online.com/OpenFOAM_D...part/proud.gifp::Init(void (*)(void const*, void*, int, MPI::Datatype const&), bool)'
/lrz/sys/mpi_altix/lib/libPstream.so: undefined reference to `MPI:http://www.cfd-online.com/OpenFOAM_D...part/proud.gifp::Free()'
/lrz/sys/mpi_altix/lib/libPstream.so: undefined reference to `PMPI::Comm::ignored_status'
/lrz/sys/mpi_altix/lib/libPstream.so: undefined reference to `PMPI::Intracomm::current_op'
/lrz/sys/mpi_altix/lib/libPstream.so: undefined reference to `PMPI::Request::ignored_status'
collect2: ld returned 1 exit status

It is clear that libPstream is missing some functions, any idea how come this happened and if there is a solution

gschaider October 28, 2007 15:55

This (linking the libraries, n
 
This (linking the libraries, not linking the applications) happens because when linking a library the linker says "can't find this symbol, propably someone else will take care of it", but when linking an application it must find a definition for _every_ symbol.

Maybe there are some additionaly libs that have to be linked to PStream (mip_cxx.so or such stuff). Check the examples that come with your MPI-implementation

Another brute force-way to find the offenders is
grep PMPI::Comm::ignored_status /usr/lib
(or wherever you expect them to be found)

arkangel October 29, 2007 08:43

thanks i found which librari
 
[SOlVED] thanks i found which libraries were missing for c++ http://www.cfd-online.com/OpenFOAM_D...part/happy.gif

lakeat June 2, 2009 06:35

How did you solve that?

misakagan March 2, 2011 08:39

Similar error here whilie trying the compile applications with intel mpi:

Code:

/data/leuven/300/vsc30098/OpenFOAM/OpenFOAM-1.7.x/lib/linux64IccDPOpt/intel_mpi/libPstream.so: undefined reference to `MPI_Waitall'
/data/leuven/300/vsc30098/OpenFOAM/OpenFOAM-1.7.x/lib/linux64IccDPOpt/intel_mpi/libPstream.so: undefined reference to `MPI_Abort'
/data/leuven/300/vsc30098/OpenFOAM/OpenFOAM-1.7.x/lib/linux64IccDPOpt/intel_mpi/libPstream.so: undefined reference to `MPI_Get_count'
/data/leuven/300/vsc30098/OpenFOAM/OpenFOAM-1.7.x/lib/linux64IccDPOpt/intel_mpi/libPstream.so: undefined reference to `MPI_Init'
/data/leuven/300/vsc30098/OpenFOAM/OpenFOAM-1.7.x/lib/linux64IccDPOpt/intel_mpi/libPstream.so: undefined reference to `MPI_Probe'
/data/leuven/300/vsc30098/OpenFOAM/OpenFOAM-1.7.x/lib/linux64IccDPOpt/intel_mpi/libPstream.so: undefined reference to `MPI_Send'
/data/leuven/300/vsc30098/OpenFOAM/OpenFOAM-1.7.x/lib/linux64IccDPOpt/intel_mpi/libPstream.so: undefined reference to `MPI_Allreduce'
/data/leuven/300/vsc30098/OpenFOAM/OpenFOAM-1.7.x/lib/linux64IccDPOpt/intel_mpi/libPstream.so: undefined reference to `MPI_Buffer_detach'
/data/leuven/300/vsc30098/OpenFOAM/OpenFOAM-1.7.x/lib/linux64IccDPOpt/intel_mpi/libPstream.so: undefined reference to `MPI_Bsend'
/data/leuven/300/vsc30098/OpenFOAM/OpenFOAM-1.7.x/lib/linux64IccDPOpt/intel_mpi/libPstream.so: undefined reference to `MPI_Irecv'
/data/leuven/300/vsc30098/OpenFOAM/OpenFOAM-1.7.x/lib/linux64IccDPOpt/intel_mpi/libPstream.so: undefined reference to `MPI_Recv'
/data/leuven/300/vsc30098/OpenFOAM/OpenFOAM-1.7.x/lib/linux64IccDPOpt/intel_mpi/libPstream.so: undefined reference to `MPI_Get_processor_name'
/data/leuven/300/vsc30098/OpenFOAM/OpenFOAM-1.7.x/lib/linux64IccDPOpt/intel_mpi/libPstream.so: undefined reference to `MPI_Test'
/data/leuven/300/vsc30098/OpenFOAM/OpenFOAM-1.7.x/lib/linux64IccDPOpt/intel_mpi/libPstream.so: undefined reference to `MPI_Isend'
/data/leuven/300/vsc30098/OpenFOAM/OpenFOAM-1.7.x/lib/linux64IccDPOpt/intel_mpi/libPstream.so: undefined reference to `MPI_Finalize'
/data/leuven/300/vsc30098/OpenFOAM/OpenFOAM-1.7.x/lib/linux64IccDPOpt/intel_mpi/libPstream.so: undefined reference to `MPI_Buffer_attach'
/data/leuven/300/vsc30098/OpenFOAM/OpenFOAM-1.7.x/lib/linux64IccDPOpt/intel_mpi/libPstream.so: undefined reference to `MPI_Comm_size'
/data/leuven/300/vsc30098/OpenFOAM/OpenFOAM-1.7.x/lib/linux64IccDPOpt/intel_mpi/libPstream.so: undefined reference to `MPI_Comm_rank'

Any suggestions?

Thanks.


All times are GMT -4. The time now is 20:50.