[gmx-users] problem with ./configure with mpi (on sgi)
Ben Simons
ben at vislab.usyd.edu.au
Fri Aug 17 06:10:18 CEST 2001
Hi,
I'm wondering if there's something wrong with the configure
script for mpi compilation. I'm doing this on an sgi IRIX 6.5.10.
Here's my config exec line:
% setenv CPPFLAGS '-I/usr/local/include -I/usr/include'
% setenv LDFLAGS '-L/usr/local/lib -lmpi'
% setenv LDADD -lmpi
% ./configure --prefix=/apps/gromacs3.0 --enable-mpi --enable-shared=yes --disable-float
I added the "-lmpi" to the LDFLAGS in an attempt to link in the
mpi lib for the test which is in the configure script.
Here's what I see in the config.log
----8<----------------------------------------------------
configure:3330: checking whether the MPI cc command works
configure:3346: cc -o conftest -g -I/usr/local/include -I/usr/include -L/usr/local/lib -lmpi conftest.c >&5
ld32: WARNING 84 : /usr/lib32/mips4/libmpi.so is not used for resolving any symbol.
ld32: ERROR 33 : Unresolved text symbol "MPI_Init" -- 1st referenced by conftest.o.
Use linker option -v to see when and which objects, archives and dsos are loaded.
ld32: INFO 152: Output file removed because of error.
configure:3349: $? = 2
configure: failed program was:
#line 3334 "configure"
#include "confdefs.h"
#include <mpi.h>
int
main ()
{
int argc; char **argv; MPI_Init(&argc,&argv);
;
return 0;
}
configure:3362: error: Cannot compile and link MPI code with cc
## ----------------- ##
## Cache variables. ##
## ----------------- ##
----8<----------------------------------------------------
Note the line above with the "ld32: ERROR".
It says it can't find MPI_Init.
Ok, so I copied this little test program (see above) to /tmp
and managed to compile it ok myself - it just needed a -lmpi
on the compile command line. viz:
/tmp % cc -o conftest -g -I/usr/local/include -I/usr/include conftest.c -lmpi -v
and this *worked* (??)
The error is a link error, saying it can't find MPI_Init,
and yet it *is* there:
% nm /usr/lib32/mips4/libmpi.so | grep MPI_Init
[107] | 156604168| 268|FUNC |WEAK |DEFAULT |MIPS_TEXT|MPI_Init
[108] | 156604436| 52|FUNC |WEAK |DEFAULT |MIPS_TEXT|MPI_Initialized
[852] | 156604168| 268|FUNC |GLOB |DEFAULT |MIPS_TEXT|PMPI_Init
[853] | 156604436| 52|FUNC |GLOB |DEFAULT |MIPS_TEXT|PMPI_Initialized
and i've got the LD_LIBRARY paths set so it will find the N32 mpi lib.
% env|grep LD
LD_LIBRARY_PATH=/usr/lib:/lib:/usr/local/lib:/usr/freeware/lib:/hfs/dsolib:/apps/houdini1.2/dsolib:/apps/CFX/lib/4.2/IRIS_R4K:/apps/CFX/lib/4.2dp/IRIS_R4K:/usr/interbase/lib:/apps/IMOD/lib
LD_LIBRARYN32_PATH=/usr/lib32:/lib32:/usr/local/lib:/usr/freeware/lib32:/hfs/dsolib:/apps/houdini1.2/dsolib:/apps/CFX/lib/4.2/IRIS_R4K:/apps/CFX/lib/4.2dp/IRIS_R4K:/usr/interbase/lib:/apps/IMOD/lib32
LD_LIBRARY64_PATH=/usr/lib64:/lib64:/usr/local/lib:/usr/freeware/lib64:/hfs/dsolib:/apps/houdini1.2/dsolib:/apps/CFX/lib/4.2/IRIS_R4K:/apps/CFX/lib/4.2dp/IRIS_R4K:/usr/interbase/lib
any suggestions? Is the configure script wrong? Do I need to
set something else as well?
thanks in advance,
ben.
______________________________________________________________
Ben Simons Physics Building, A28,
VisLab Systems Manager The University of Sydney.
Phone +61-2-9351-5900 NSW. AUSTRALIA. 2006.
Fax +61-2-9351-1880 http://www.vislab.usyd.edu.au/
``They [pig-footed bandicoot Chaeropus ecaudatus, now extinct]
are very good eating, and I am sorry to confess that my
appetite more than once over-ruled my love for science.''
- Gerard Krefft. Director of The Australian Museum 1857.
pp.252 The Explorers, edited by Tim Flannery.
More information about the gromacs.org_gmx-users
mailing list