Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

Re^4: OpenMPI and Perl

by Vlad, the IM-perler (Novice)
on Apr 16, 2010 at 06:40 UTC ( #835022=note: print w/replies, xml ) Need Help??

in reply to Re^3: OpenMPI and Perl
in thread OpenMPI and Perl

I am having the same problem as tux300181 (it seems to be reported a bit recently) However none of the published fixes appear to be working.

The symptom is:
[vlad@bd01 Parallel-MPI-Simple-0.03]$ make test PERL_DL_NONLAZY=1 /usr/bin/perl "-Iblib/lib" "-Iblib/arch" Can't load 'blib/arch/auto/Parallel/MPI/Simple/' for module P +arallel::MPI::Simple: blib/arch/auto/Parallel/MPI/Simple/ u +ndefined symbol: ompi_mpi_char at /usr/lib64/perl5/5.10.0/x86_64-linu +x-thread-multi/ line 203. at line 3
This appears to be a loader problem, although I am not sure, any assistance is greatly appreciated.
What I did:
perl Makefile.PL CC=mpicc CCFLAGS="-lopenmpi -m64 -L/usr/local/lib/ope +nmpi -L/usr/local/lib/" LIB=/usr/local/lib [vlad@bd01 Parallel-MPI-Simple-0.03]$ make mpicc -c -lopenmpi -m64 -L/usr/local/lib/openmpi -L/usr/local/lib/ - +O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protec +tor --param=ssp-buffer-size=4 -m64 -mtune=generic -DVERSION=\"0.03\ +" -DXS_VERSION=\"0.03\" -fPIC "-I/usr/lib64/perl5/5.10.0/x86_64-linux +-thread-multi/CORE" Simple.c Simple.xs: In function ‘_Gather’: Simple.xs:131: warning: null argument where non-null required (argumen +t 3) Simple.xs:124: warning: unused variable ‘rank’ Simple.xs: In function ‘_Comm_split’: Simple.xs:204: warning: unused variable ‘realcolour’ Simple.c: In function ‘Finalize’: Simple.xs:111: warning: control reaches end of non-void function Simple.c: In function ‘Barrier’: Simple.xs:106: warning: control reaches end of non-void function Simple.c: In function ‘Init’: Simple.xs:82: warning: control reaches end of non-void function Simple.c: In function ‘_Gather’: Simple.xs:160: warning: ‘buf_lens’ may be used uninitialized in this f +unction Running Mkbootstrap for Parallel::MPI::Simple () chmod 644 rm -f blib/arch/auto/Parallel/MPI/Simple/ gcc -shared -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions - +fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic Simple +.o -o blib/arch/auto/Parallel/MPI/Simple/ \ \ chmod 755 blib/arch/auto/Parallel/MPI/Simple/ cp blib/arch/auto/Parallel/MPI/Simple/ chmod 644 blib/arch/auto/Parallel/MPI/Simple/ Manifying blib/man3/Parallel::MPI::Simple.3pm
These warnings appear harmless enough... However make test fails as described above.
- using openmpi 1.4.1 which seems to run the examples ok. - ldconfig output is: vlad@bd01 Parallel-MPI-Simple-0.03]$ ldconfig -p | grep mpi (libc6,x86-64) => /usr/local/lib/libopenmpi (libc6,x86-64) => /usr/local/lib/libopenmpi_m (libc6,x86-64) => /usr/local/lib/ (libc6,x86-64) => /usr/local/lib/ (libc6,x86-64) => /usr/local/lib/ (libc6,x86-64) => /usr/local/lib/ (libc6,x86-64) => /usr/local/lib/ (libc6,x86-64) => /usr/local/lib/ (libc6,x86-64) => /usr/local/lib/ (libc6,x86-64) => /usr/local/lib/ (libc6,x86-64) => /usr/lib64/ - defines the symbol openmpi_mpi_char: [[vlad@bd01 Parallel-MPI-Simple-0.03]$ objdump -tT /usr/local/lib/libm | grep mpi_char 0000000000296920 g O .data 0000000000000200 ompi_m +pi_char 0000000000296b20 g O .data 0000000000000200 ompi_m +pi_character 0000000000296b20 g DO .data 0000000000000200 Base ompi_m +pi_character 0000000000296920 g DO .data 0000000000000200 Base ompi_m +pi_char - However the file does not appear to look for this lib: [vlad@bd01 Parallel-MPI-Simple-0.03]$ ldd blib/arch/auto/Parallel +/MPI/Simple/ => (0x00007fffaa1fe000) => /lib64/ (0x00007fcaa1ae4000) /lib64/ (0x0000003da7a00000) System is FC10 x86_64
What am I missing?

Replies are listed 'Best First'.
Re^5: OpenMPI and Perl
by Anonymous Monk on Apr 20, 2010 at 04:19 UTC
    Use absolute paths, as in -l/full/path/to/some/ and make sure the file appears when you do make (in what you've posted, the file doesn't appear).
      Thanks Guys but this didn't work. (sorry for the late reply I have been overseas) I have decided to give up on perl and re-write the MPI stuff in c. Thanks for your assistance..
Re^5: OpenMPI and Perl
by Khen1950fx (Canon) on Apr 20, 2010 at 06:42 UTC
    I tried it on FC6, and it installed with no problems. It seems to me that since the problem is with a shared file, you want to try a static install. The author even encourages a static install, at least for Storable.

    For OpenMPI, I used

    ./configure --disable-shared --enable-static --with-gnu-ld
    to configure it. I manually downloaded and installed Parallel::MPI::Simple and had no problems.

      In Rocks (CentOS) 5.4 the 'cpan -i Parallel::MPI::Simple' command fails to correctly compile the module, but I was able to eventually make it work by following the instructions of Eric Martel in

      which consist of changing gcc for mpicc in the generated makefile in .cpan/build/ , hope it helps

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://835022]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (7)
As of 2018-07-19 15:48 GMT
Find Nodes?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?

    Results (411 votes). Check out past polls.