mvapich, nonblocking build issue
Rob Latham
robl at mcs.anl.gov
Mon Sep 12 13:20:30 CDT 2011
On Mon, Sep 12, 2011 at 12:36:22PM -0500, Wei-keng Liao wrote:
> Hi, Brent,
>
> MPI_Get_address is an API defined in MPI2 (not in MPI version 1).
> Could you check if your MPICC compiler supports MPI2?
> Let us know what mvapich2 and openmpi versions you have?
Wei-keng, you're on the right track. mvapich-1.2.0 is based on the
ancient MPICH 1.2.7 (an mpi-1 implementation)
Brent, for the sake of your I/O, please consider MVAPICH2, as it
contains 7 years worth of MPI-IO improvements.
I guess we do not ever build against MPI-1 libraries. Our configure
script needs to be modified to detect this (fortunately rare)
environment and not try to build the nonblocking routines.
==rob
> A test program can be like this:
>
> #include <mpi.h>
> int main(int argc, char **argv) {
> int buf[16];
> MPI_Aint address;
>
> MPI_Init(&argc, &argv);
> MPI_Get_address(buf, &address);
> MPI_Finalize();
> return 0;
> }
>
> Please use $MPI_BIN/mpicc to compile and let us know if it passes.
>
> Wei-keng
>
>
> On Sep 12, 2011, at 12:02 PM, Brent Woodruff wrote:
>
> > Hello all,
> >
> > I am attempting to build parallel-netcdf 1.2.0 on RHEL 6.1 with mvapich 1.2.0 and am running into a problem. I have successful builds with mvapich2 and openmpi.
> >
> > I should also note that I am replacing pnetcdf.h.in with this one from SVN because I intend to use this pnetcdf with netcdf 4.1.3:
> > http://trac.mcs.anl.gov/projects/parallel-netcdf/export/925/trunk/src/lib/pnetcdf.h.in
> >
> > Here's my procedure:
> > Unpack, replace pnetcdf.h.in
> >
> > export CC=gcc
> > export CXX=g++
> > export FC=gfortran
> > export F90=gfortran
> > export CFLAGS="-O2 -g -fPIC"
> > export CXXFLAGS="-O2 -g -fPIC"
> > export FFLAGS="-O2 -g -fPIC"
> >
> > module load gnu-mvapich # sets MPI paths
> > export MPICC=$MPI_BIN/mpicc
> > export MPICXX=$MPI_BIN/mpicxx
> > export MPIF77=$MPI_BIN/mpif77
> > export MPIF90=$MPI_BIN/mpif90
> >
> > ./configure \
> > --prefix=$MPI_HOME \
> > --includedir=$MPI_INCLUDE \
> > --libdir=$MPI_LIB \
> > --sysconfdir=$MPI_SYSCONFIG \
> > --enable-fortran \
> > --with-mpi=$MPI_HOME
> >
> > The result of configure before make is:
> > parallel-netCDF version 1.2.0 features:
> > . parallel-netcdf configured WITH support for large files
> > . parallel-netcdf configured WITH fortran bindings
> > . parallel-netcdf configured WITHOUT nonblocking routines
> > . parallel-netcdf configured WITH giant variable support
> >
> > However, I noticed that nonblocking does get built before creating libraries. Here's the tail of make up to the error:
> >
> > [ ... snip successful compiled of other objects ... ]
> > /opt/hpc/gnu/mvapich/bin/mpicc -c -O2 -g -fPIC -I. ../../../src/lib/nonblocking.c
> > /opt/hpc/gnu/mvapich/bin/mpicc -c -O2 -g -fPIC -I. ../../../src/lib/malloc.c
> > ar cru libpnetcdf.a mpinetcdf.o header.o mpincio.o attr.o dim.o error.o nc.o ncx.o string.o var.o ncmpidtype.o convert_swap.o filetype.o getput_var.o getput_var1.o getput_vara.o getput_vars.o getput_varm.o i_getput_var.o i_getput_var1.o i_getput_vara.o i_getput_vars.o i_getput_varm.o m_getput_varx.o nonblocking.o malloc.o
> > ranlib libpnetcdf.a
> > m4 -B10000 -DAPI=C ../../../src/lib/../../man/netcdf.m4 >pnetcdf.3 || rm pnetcdf.3
> > m4: Warning: `m4 -B' may be removed in a future release
> > /opt/hpc/gnu/mvapich/bin/mpicc -c -O2 -g -fPIC -I. ../../../src/lib/validator.c
> > /opt/hpc/gnu/mvapich/bin/mpicc -o ncvalid -O2 -g -fPIC validator.o libpnetcdf.a
> > libpnetcdf.a(nonblocking.o): In function `ncmpii_mgetput':
> > /mnt/devel/BUILD/parallel-netcdf-1.2.0/gnu-mvapich/src/lib/../../../src/lib/nonblocking.c:727: undefined reference to `MPI_Get_address'
> > /mnt/devel/BUILD/parallel-netcdf-1.2.0/gnu-mvapich/src/lib/../../../src/lib/nonblocking.c:733: undefined reference to `MPI_Get_address'
> > collect2: ld returned 1 exit status
> > make[3]: *** [ncvalid] Error 1
> > make[3]: Leaving directory `/mnt/devel/BUILD/parallel-netcdf-1.2.0/gnu-mvapich/src/lib'
> > make[2]: *** [all] Error 2
> > make[2]: Leaving directory `/mnt/devel/BUILD/parallel-netcdf-1.2.0/gnu-mvapich/src'
> > make[1]: *** [subdir_target] Error 1
> > make[1]: Leaving directory `/mnt/devel/BUILD/parallel-netcdf-1.2.0/gnu-mvapich'
> > make: *** [src/lib/all] Error 2
> >
> > Any suggestions would be appreciated!
> >
> > Brent W.
>
--
Rob Latham
Mathematics and Computer Science Division
Argonne National Lab, IL USA
More information about the parallel-netcdf
mailing list