LAM/MPI logo

LAM/MPI General User's Mailing List Archives

  |   Home   |   Download   |   Documentation   |   FAQ   |   all just in this list

From: Neville Lee (neville.lee_at_[hidden])
Date: 2004-10-17 14:26:52


I'm having the exact sam problem.

mpicc -showme:
gcc -I/usr/local/include -pthread -ldl -lpthread -L/lib -L/usr/local/lib
-llammpio -llamf77mpi -lmpi -llam -lutil -lcr -ldl

ldd a.out
        libm.so.6 => /lib/libm.so.6 (0x4002c000)
        libdl.so.2 => /lib/libdl.so.2 (0x4004e000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x40051000)
        libutil.so.1 => /lib/libutil.so.1 (0x400a2000)
        libcr.so.0 => /usr/local/lib/libcr.so.0 (0x400a6000)
        libc.so.6 => /lib/libc.so.6 (0x400ad000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)

With mpicc -v source.c 2 > out, I can see that -lcr appears after
-lpthread in the argument list of collect2.
So I remove the message lines in file 'out', leaving only commands, and
run the file as a script. This produces an executable that run without
complaints.

And ldd output of the new executable:
        libm.so.6 => /lib/libm.so.6 (0x4002c000)
        libdl.so.2 => /lib/libdl.so.2 (0x4004e000)
        libcr.so.0 => /usr/local/lib/libcr.so.0 (0x40051000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x40058000)
        libutil.so.1 => /lib/libutil.so.1 (0x400aa000)
        libc.so.6 => /lib/libc.so.6 (0x400ad000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
Apparently libcr appears before libpthread now.

Is this a bug of mpicc?

However, after that I can mpirun the program, and do cr_chechpoint, but
when I call cr_restart, it says:
mpirun (rpwait): Bad file descriptor
Any ideas?

BTW I'm using LAM-MPI 7.1.1 and blcr 0.2.3.

>Can you send the output of "mpicc -showme" and "ldd a.out"?
>
>What version of LAM are you using?
>
>
>On Oct 12, 2004, at 1:51 PM, <ducong_at_xxxxxxxxx> wrote:
>
>
>
>
>Hi,
>When I am trying to run a MPI program, I got the following error:
>$ mpirun -ssi rpi crtcp -np 1 a.out
>cr_pthread.c:82 cri_pthread_init: When linking libpthread, it must be
>linked AFTER libcr
>
>My configuration is as follows:
>$ ./configure --with-cr-blcr=/usr/local/blcr --with-rpi=crtcp
>--prefix=/home/ducong/lam --with-rsh=ssh -x
>
>How to solve this problem?
>Thanks
>_______________________________________________
>This list is archived at http://www.lam-mpi.org/MailArchives/lam/
>
>
>
> -- {+} Jeff Squyres {+} jsquyres_at_xxxxxxxxxxx {+} http://www.lam-mpi.org/
>
>
>
>