Send lam mailing list submissions toTo subscribe or unsubscribe via the World Wide Web, visitor, via email, send a message with subject or body 'help' toYou can reach the person managing the list atWhen replying, please edit your Subject line so it is more specificthan "Re: Contents of lam digest..."Today's Topics:1. Re: Undefined MPI symbols linker error with XLF (Brian Barrett)2. Re: Running MPI program in a cluster (Brian Barrett)3. Re: Undefined MPI symbols linker error with XLF (Joe Griffin)4. Undefined reference to MPI_INIT (Viding Markus)BrianOn Jul 9, 2007, at 3:50 PM, Aaron Thompson wrote:Joe,I'm not too familiar with Fortran, I'm only compiling a programfrom source (DLPOLY). Could you tell me what compiler flags Icould try or where I could look? I didn't see anything too likelyin the xlf manual.Thank you,Aaron ThompsonVanderbilt UniversityOn Jul 9, 2007, at 3:07 PM, lam-request@lam-mpi.org wrote:Aaron,Instead of trying to correct it with LDFLAGS at load time, Can youuse compileroptions for your code to match the MPI entry points?JoeFrom: lam-bounces@lam-mpi.org [mailto:lam-bounces@lam-mpi.org] OnBehalf Of Aaron ThompsonSent: Monday, July 09, 2007 11:43 AMTo: General LAM/MPI mailing listSubject: Re: LAM: Undefined MPI symbols linker error with XLFUnderscores could be the issue. My program is calling MPIfunctions in all caps with no underscoring, e.g. MPI_SEND . Itried adding -fno_underscoring to my LDFLAGS, but that didn'thelp. Are there any other flags can I try using?Thank you,Aaron ThompsonVanderbilt UniversityCould your problem be Case or leading or trailing underscores?Some code has:MPI_Sendmpi_sendmpi_send__mpi_send_The code and MPI libs need to have the same Case and underscorepolicy.Regards,joe Griffin_______________________________________________This list is archived at http://www.lam-mpi.org/MailArchives/lam/--Brian BarrettLAM/MPI DeveloperMake today a LAM/MPI day!I use the lamboot comand to set up the LAM enviroment in a singlecomputer,i.e., "lamboot -v". I am running a simple master slave program andit runsalright when I use the "mpirun -np 2 main" command. I then try toset up asimple cluster with only 2 computers making the hostfile as youguys told inthe user guide pdf. It seems to boot fine. The strange thing isthat when Irun my program in a single computer with 2 processes it runs wayfaster thenwhen I run it with process 0 in machine 0 and process 1 in machine1. Anyidea why this happens? Any help would be appreciated.This isn't totally unexpected, especially if one of the processesdoesn't require much CPU time or you are on an SMP machine. Whenprocesses are on the same node, LAM/MPI will use shared memory forcommunication. If your cluster only has ethernet, bandwidth ishalved and latency can easily be two or three orders of magnitudehigher when compared to shared memory. If your application uses lotsof short messages, the disparity between shared memory and TCPperformance can be really easy to see.Hope this helps,Brian--Brian BarrettLAM/MPI DeveloperMake today a LAM/MPI day!From: "Joe Griffin" <joe.griffin@mscsoftware.com>Date: July 10, 2007 1:21:26 AM EDTTo: "General LAM/MPI mailing list" <lam@lam-mpi.org>Subject: Re: LAM: Undefined MPI symbols linker error with XLFReply-To: General LAM/MPI mailing list <lam@lam-mpi.org>Aaron,Brian's advice about using XLF is right on.Joe________________________________From: lam-bounces@lam-mpi.org on behalf of Aaron ThompsonSent: Mon 7/9/2007 2:50 PMTo: General LAM/MPI mailing listSubject: Re: LAM: Undefined MPI symbols linker error with XLFJoe,I'm not too familiar with Fortran, I'm only compiling a program from source (DLPOLY). Could you tell me what compiler flags I could try or where I could look? I didn't see anything too likely in the xlf manual.Thank you,Aaron ThompsonVanderbilt UniversityOn Jul 9, 2007, at 3:07 PM, lam-request@lam-mpi.org wrote:
Aaron,
Instead of trying to correct it with LDFLAGS at load time, Can you use compileroptions for your code to match the MPI entry points?
Joe
________________________________From: lam-bounces@lam-mpi.org [mailto:lam-bounces@lam-mpi.org] On Behalf Of Aaron ThompsonSent: Monday, July 09, 2007 11:43 AMTo: General LAM/MPI mailing listSubject: Re: LAM: Undefined MPI symbols linker error with XLF
Underscores could be the issue. My program is calling MPI functions in all caps with no underscoring, e.g. MPI_SEND . I tried adding -fno_underscoring to my LDFLAGS, but that didn't help. Are there any other flags can I try using?
Thank you,
Aaron ThompsonVanderbilt University
Could your problem be Case or leading or trailing underscores?
Some code has:
MPI_Sendmpi_sendmpi_send__mpi_send_
The code and MPI libs need to have the same Case and underscore policy.
Regards,joe Griffin
<winmail.dat>From: Viding Markus <markus.viding@kockums.se>Date: July 10, 2007 11:37:21 AM EDTTo: "'lam@lam-mpi.org'" <lam@lam-mpi.org>Cc: "'support@absoft.com'" <support@absoft.com>Subject: LAM: Undefined reference to MPI_INITReply-To: General LAM/MPI mailing list <lam@lam-mpi.org>Hi,
I am running LAM/MPI 7.1.3 with a Linux 2.4.21-27 kernel. The compiler I am using is an Absoft Fortran 95 10.0. Trying to run a simple Hello world:
PROGRAM HELLO
INCLUDE 'mpif.h'
INTEGER :: RANK, SIZE, IERR
CALL MPI_INIT(IERR)
CALL MPI_COMM_RANK(MPI_COMM_WORLD,RANK,IERR)
CALL MPI_COMM_SIZE(MPI_COMM_WORLD,SIZE,IERR)
PRINT *, 'Hello! I am ', RANK, 'of', SIZE
CALL MPI_FINALIZE(IERR)
STOP
END PROGRAM
------------------------------------
When running mpif77 -showme, I get:
F95 -I/opt/lam/lam-7_1_3/include -L/opt/lam/lam-7_1_3/lib -llammpio -llamf77mpi -lmpi -llam -laio -laio -lutil -lpthread -pthread -ldl
When trying to compile the application this is what happens.
[mavi4915@tor10 Multi]$ mpif77 Hello.f90
/tmp/a9IZW7/Hello.o(.text+0x2f): In function `MAIN__':
: undefined reference to `MPI_INIT'
/tmp/a9IZW7/Hello.o(.text+0x4d): In function `MAIN__':
: undefined reference to `MPI_COMM_RANK'
/tmp/a9IZW7/Hello.o(.text+0x6b): In function `MAIN__':
: undefined reference to `MPI_COMM_SIZE'
/tmp/a9IZW7/Hello.o(.text+0x1bf): In function `MAIN__':
: undefined reference to `MPI_FINALIZE'
collect2: ld returned 1 exit status
link failed.
mpif77: No such file or directory
I read that it could have to do with the compiler used when installing LAM and the compiler used when compiling the application. So, I installed LAM forcing it to use f95 when configuring:
./configure FC=f95 -with-fc=f95 -prefix=/opt/lam/lam-7_1_3/
Any suggestions what to try next??