On Sun, Sep 19, 2021 at 08:33:21PM +0200, Patrick Dupre wrote:
Hello,
I installed mpich
and set the path to
/usr/lib64/mpich/bin
however, it seems that I need
MPI_init
Checking if MPI is available
checking for mpif90... mpif90
checking for MPI_Init... no
checking for MPI_Init in -lmpi... no
checking for MPI_Init in -lmpich... no
configure: error: MPI not found: openmpi
Rather than setting the PATH, you should have run:
module load mpi/mpich-x86_64
... before compiling. That loads the mpich environment module, which
defines a bunch of environment modules. Environment Modules are very
popular on HPC systems, lets you have multiple versions and varieties
of packages without them stepping on each other. You load the
appropriate module before compiling or running software and it gets
the specific libraries/executables/includes/etc.
For example, here is the module file for mpich:
$ cat /usr/share/modulefiles/mpi/mpich-x86_64
#%Module 1.0
#
# MPICH module for use with 'environment-modules' package:
#
# Only allow one mpi module to be loaded at a time
conflict mpi
# Define prefix so PATH and MANPATH can be updated.
setenv MPI_BIN /usr/lib64/mpich/bin
setenv MPI_SYSCONFIG /etc/mpich-x86_64
setenv MPI_FORTRAN_MOD_DIR /usr/lib64/gfortran/modules/mpich
setenv MPI_INCLUDE /usr/include/mpich-x86_64
setenv MPI_LIB /usr/lib64/mpich/lib
setenv MPI_MAN /usr/share/man/mpich-x86_64
setenv MPI_PYTHON_SITEARCH %{python2_sitearch}/mpich
setenv MPI_PYTHON2_SITEARCH %{python2_sitearch}/mpich
setenv MPI_PYTHON3_SITEARCH /usr/lib64/python3.9/site-packages/mpich
setenv MPI_COMPILER mpich-x86_64
setenv MPI_SUFFIX _mpich
setenv MPI_HOME /usr/lib64/mpich
prepend-path PATH /usr/lib64/mpich/bin
prepend-path LD_LIBRARY_PATH /usr/lib64/mpich/lib
prepend-path MANPATH :/usr/share/man/mpich-x86_64
prepend-path PKG_CONFIG_PATH /usr/lib64/mpich/lib/pkgconfig
--
Jonathan Billings <billings(a)negate.org>