[mvapich-discuss] Help Building MVAPICH2 with NAG 6.1: pthread fun

Thompson, Matt (GSFC-610.1)[SCIENCE SYSTEMS AND APPLICATIONS INC] matthew.thompson at nasa.gov
Wed Jan 11 12:53:49 EST 2017


MVAPICH2 Gurus,

I'm trying to build MVAPICH2 2.2 with nagfor 6.1 and gcc 5.3 (for the 
C/C++). I was able to configure with:

> ./configure --prefix=$SWDEV/MPI/mvapich2/2.2/nagfor_6.1-gcc_5.3\
   --disable-wrapper-rpath --with-device=ch3:mrail --with-rdma=gen2 \
   --with-pmi=pmi2 --with-pm=slurm --with-slurm=/usr/slurm \
   CC=gcc CXX=g++ FC=nagfor F77=nagfor CFLAGS='-fpic -m64' \
   CXXFLAGS='-fpic -m64' FCFLAGS='-pic -mismatch' FFLAGS='-pic -mismatch' \
   --enable-fortran=all --enable-cxx --enable-romio --with-hwloc \
   --disable-multi-aliases --enable-xrc=yes --enable-hybrid | & tee 
configure.nagfor_6.1-gcc_5.3.log

and all seemed well. (Note: Many of these flags might not be necessary. 
I started with an old configure line I had and worked on it until it 
configured.)

I then ran 'make -j8' and got the usual slew of warnings that NAG 
produces but then:

> [NAG Fortran Compiler normal termination, 4 warnings]
>   MOD      src/binding/fortran/use_mpi/mpi.mod-stamp
> NAG Fortran Compiler Release 6.1(Tozai) Build 6113
> [NAG Fortran Compiler normal termination]
>   CCLD     libch3affinity.la
>   GEN      lib/libmpi.la
> NAG Fortran Compiler Release 6.1(Tozai) Build 6113
> Option error: Unrecognised option -pthread
> make[2]: *** [lib/libmpi.la] Error 2
> make[2]: Leaving directory `/gpfsm/dswdev/mathomp4/MPI/src/mvapich2-2.2'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/gpfsm/dswdev/mathomp4/MPI/src/mvapich2-2.2'
> make: *** [all] Error 2

In the immortal words of Dr Sam Beckett: "Oh boy".

This looks much like the problem that leads to me not being able to 
build Open MPI with NAG:

> https://github.com/open-mpi/ompi/issues/1284

It's due to the fact that NAG uses -lpthread but gcc uses -pthread and 
somehow the C threading flag gets pushed to NAG.

Does anyone know if there is something I can pass to MVAPICH2 to fix 
this? Or perhaps do I need a patch?

Thanks,
Matt

-- 
Matt Thompson, SSAI, Sr Scientific Programmer/Analyst
NASA GSFC,    Global Modeling and Assimilation Office
Code 610.1,  8800 Greenbelt Rd,  Greenbelt,  MD 20771
Phone: 301-614-6712                 Fax: 301-614-6246
http://science.gsfc.nasa.gov/sed/bio/matthew.thompson


More information about the mvapich-discuss mailing list