[gmx-users] install Gromacs with MPI?

Wu Xun wxun2000 at yahoo.com
Wed Feb 11 00:44:01 CET 2004


I was trying to install Gromacs on the IA-32
("platinum") cluster in NCSA with MPI, but could not
get through. I contacted their consultant but it was
not of much help. I would really appreciate it if
someone here can help me out.

First I found the information about MPI on platinum

*********** Here is the description about MPI
The VMI Application Interface consists of the VMI
library, to which applications are required to link.
The VMI device interface mediates between the VMI
library and the underlying VMI drivers. ......
The layering of MPI on top of VMI is accomplished by
means of a ch_vmi MPI device running on the Argonne
National Laboratory MPICH distribution.
3.1 Platinum
The following libraries are required for MPI codes:
-lmpich -lvmi -ldl -lpthread

For Fortran MPI codes, use: -lmpich -lfmpich -lvmi
-ldl -lpthread

Note that OpenMP/MPI hybrid programming models are
currently not supported.
Compiling MPI code using the Intel compilers:

The Intel compiler suite includes Fortran 77/90 (ifc),
C (icc), and C++ (icpc).. The mpich, vmi, dl, and
pthread libraries built using the Intel compilers are
located in /usr/local/vmi/mpich/lib/icc.


icc -I/usr/local/vmi/mpich/include mpicode.c -o
mpicode \
    -L/usr/local/vmi/mpich/lib/icc -lmpich -lvmi -ldl

ifc -I/usr/local/vmi/mpich/include mpicode.f -o
mpicode \
    -L/usr/local/vmi/mpich/lib/icc -lmpich -lfmpich
-lvmi -ldl -lpthread

Compiling MPI code using the PGI compilers:

The PGI compiler suite includes Fortran 90 (pgf90),
Fortran 77 (pgf77), C (pgcc), and C++ (pgCC). The
mpich, vmi, dl, and pthread libraries built using the
PGI compilers are located in


pgf77 -I/usr/local/vmi/mpich/include mpicode.f -o
mpicode \
      -L/usr/local/vmi/mpich/lib/pgi -lmpich -lfmpich
-lvmi -ldl -lpthread

Compiling MPI code using the GNU compilers:

The GNU compilers are Fortran 77 (g77), C (gcc), and
C++ (g++). The libraries are located under


gcc -I/usr/local/vmi/mpich/include mpicode.c -o
mpicode \
    -L/usr/local/vmi/mpich/lib/gcc -lmpich -lvmi -ldl

The gcc (and g77) compilers are particular about the
order of arguments--the order shown above works well,
other arrangements may not.

****************** end about MPI ******************

Here is what I tried:

setenv LDFLAGS
set CC icc
set MPICC 'icc -I/usr/local/vmi/mpich/include
-L/usr/local/vmi/mpich/lib/icc -lmpich -lfmpich -lvmi
-ldl -lpthread'
./configure --enable-mpi


Here is the last line of the configure output:

checking whether the MPI cc command works...
configure: error: Cannot compile and link MPI code
with icc -I/usr/local/vmi/mpich/include
-L/usr/local/vmi/mpich/lib/icc -lmpich -lvmi -ldl

And in config.log it gives:
undefined reference to `MPI_Init'
configure:3360: $? = 1
configure: failed program was:
#line 3345 "configure"
#include "confdefs.h"
#include <mpi.h>
main ()
int argc; char **argv; MPI_Init(&argc,&argv);
  return 0;
configure:3373: error: Cannot compile and link MPI
code with icc -I/usr/local/vmi/mpich/include
-L/usr/local/vmi/mpich/lib/icc -lmpich -lv
mi -ldl -lpthread


So it looks that it did not find the mpi compiler at
all. Could someone tell me the commands that I should
run step by step? Or is this a system-specific problem
for VMI?

Thanks a lot. sorry this email is long, I just hope
you can find all the info needed.

Weihua Guo

Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online.

More information about the gromacs.org_gmx-users mailing list