Compiling a program using Boost.MPI (v.1.43) with Scali MPI 3.5.0

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Compiling a program using Boost.MPI (v.1.43) with Scali MPI 3.5.0

Willi Huber
Hello everyone,

I need some support to get a simple hello-world programm compiled with Boost.MPI using Scali MPI. I am working on a Linux-Cluster with SLES and since the installed software can't be altered I have to maintain boost myself. On the cluster gcc 3.3.3 is installed.
I am using boost 1.43 because with any newer release had problem compiling filesystem.

OK here I go:
I compiled Boost using
./bootstrap.sh --prefix=myhomedir/boost --with-libraries=serialization,mpi,program_options,filesystem
and
./bjam install link=shared

In my homedir I have a file called user-config.jam with the following content:
using mpi : :
<find-shared-library>mpi
<library-path>/opt/scali/lib64
<include>/opt/scali/include
;

It compiled and linked the *.so without complaining and copied the libraries and includestuff in myhomedir/boost

Then I tried to compile the simple "Hello World" example from http://www.boost.org/doc/libs/1_43_0/doc/html/mpi/tutorial.html

with the following command:  
/opt/scali/bin/mpic++ main.cpp -Imyhomedir/boost/include/ -Lmyhomedir/boost/lib -lboost_serialization -lboost_mpi

which means:
g++ main.cpp -Imyhomedir/boost/include/ -Lmyhomedir/boost/lib -lboost_serialization -lboost_mpi -I/opt/scali/include -L/opt/scali/lib64 -lmpi

that came up with the following error message:
myhomedir/boost/lib/libboost_mpi.so: undefined reference to `MPI_Finalized'
collect2: ld returned 1 exit status

Any help is appreciated

Reply | Threaded
Open this post in threaded view
|

Re: Compiling a program using Boost.MPI (v.1.43) with Scali MPI 3.5.0

Willi Huber
I removed every reference to MPI_Finalized in the \boost\lib\mpi\*.cpp and the include-*.hpp and set the return value to true. Then I built boost again and the "hello world" is now compiling.
But I am wondering how this could be.
Since the Sources that were used to build the shared library contain a reference to MPI_Finalized. And I always thought that shared libraries are linked and so the Linker has to check every reference and so I assumed some MPI_Finalized routine is available in libmpi.so
Although it is compiling I am a little bit afraid of how this changes might affect the stability of the mpi-c++-wrapper of boost. Can I write anything that could be a replacement for BOOST_MPI_CHECK_RESULT(MPI_Finalized, (&flag)) instead of simple removing?

BTW I didn't try to start the program yet.

Willi
Reply | Threaded
Open this post in threaded view
|

Re: Compiling a program using Boost.MPI (v.1.43) with Scali MPI 3.5.0

Willi Huber
In reply to this post by Willi Huber
Someone in my company told me that MPIv1.1 is not supporting MPI_Finalized. I checked the symbols in libmpi.so with nm and found no occurrence of MPI_Finalized.
I am still confused why the Linker didn't complain it but OK.
How can I get around this Problem since on the Boost.MPI I read that the "majority of functionality in MPI 1.1" is supported by Boost.MPI?

Willi
Reply | Threaded
Open this post in threaded view
|

Re: Compiling a program using Boost.MPI (v.1.43) with Scali MPI 3.5.0

Willi Huber
Any suggestions? Is this the wrong Mailing List?

Please help me.

Willi
Reply | Threaded
Open this post in threaded view
|

Re: Compiling a program using Boost.MPI (v.1.43) with Scali MPI 3.5.0

Matthias Troyer-2
In reply to this post by Willi Huber

On 13 Apr 2011, at 14:02, buclit wrote:

> Someone in my company told me that MPIv1.1 is not supporting MPI_Finalized. I
> checked the symbols in libmpi.so with nm and found no occurrence of
> MPI_Finalized.
> I am still confused why the Linker didn't complain it but OK.
> How can I get around this Problem since on the Boost.MPI I read that the
> "majority of functionality in MPI 1.1" is supported by Boost.MPI?


MPI_Finalized is indeed only required since the MPI 2.0 standard.

Matthias

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
Reply | Threaded
Open this post in threaded view
|

Re: Compiling a program using Boost.MPI (v.1.43) with Scali MPI 3.5.0

Willi Huber
Thanks Matthias for your reply

I know that MPI_Finalized is not available before MPI v2.0 but exactly that is my problem
My goal is to use Boost.MPI for a MPI Implementation which at maximum supports MPI v1.1. And I thought this is the case because I read sth. about MPI 1.1 on the Boost.MPI Documentation but unfortunately Boost.MPI needs MPI_Finalized which is available not before MPI v2.0.
Now I wanted to know if this is a "mistake" in the Boost.MPI implementation to speak about MPI v1.1 but implement it for at least MPI v2.0 and if not how to circumvent this problem to get a working implementation for MPI v1.1
I commented out all occurences of MPI_Finalized in the source of Boost.MPI as described in one of my earlier posts and since then gcc allowed me to compile it. But because I just can see a tiny part of the whole I wanted to know if someone else tried this before or someone can tell me what sideffects this changes could introduce. Maybe there is a better option than commenting it out ( using MPI v2.0 is not an option :D )

Willi