I have troubles in compilation LAM/MPI programs with ROMIO support. I am using mpicc compiler, the command is:
mpicc -o program program.c -lm. The compiler is giving me the following error:
[orensha_at_iecluster try]$ mpicc -o program program.c -lm
/tmp/ccYavknR.o(.text+0x8c): In function `main':
: undefined reference to `MPI_File_open'
/tmp/ccYavknR.o(.text+0xe6): In function `main':
: undefined reference to `MPI_File_set_view'
/tmp/ccYavknR.o(.text+0x107): In function `main':
: undefined reference to `MPI_File_write'
/tmp/ccYavknR.o(.text+0x119): In function `main':
: undefined reference to `MPI_File_close'
collect2: ld returned 1 exit status
I understand from here that some library lacks in the code, I wrote "include <mpio.h>" in the code. Should I must decare it in the path also? How I am doing it? May be (it seems like) I should add some argument to compiler (like I added -lm)? Just which one? I tried "mpicc -o program program.c -show" and I have got only:
[orensha_at_iecluster try]$ mpicc -o par_io par_io.c -showme
i386-redhat-linux-gcc -o par_io par_io.c -llamf77mpi -lmpi -llam -lutil
Which parameter should I add?
Sincerely,
-----------------------------------------------------------------
Oren Shapira,
Research Assistant
Multimedia and Intelligent Systems Research Team
Industrial and Management Engineering Department
Ben Gurion University of the Negev,
Beer-Sheva, 84105, Israel.
Office: 972-8-6472240
Fax: 972-8-6472958
------------------------------------------------------------------
|