xiaoyeli / superlu_dist

Distributed memory, MPI based SuperLU
https://portal.nersc.gov/project/sparse/superlu/
Other
185 stars 65 forks source link

Installation error #125

Open yanxon opened 1 year ago

yanxon commented 1 year ago

Dear developers,

I am trying to install SUPERLU. Then I get the following error.

( cd SRC; make )
make[1]: Entering directory '/home/yanxonh/software/superlu_dist-7.2.0/SRC'
rm -f superlu_dist_config.h
printf "/* #define XSDK_INDEX_SIZE 64 */\n" >> superlu_dist_config.h
printf "#define SLU_HAVE_LAPACK TRUE\n" >> superlu_dist_config.h
printf "#define HAVE_PARMETIS TRUE\n" >> superlu_dist_config.h
printf "/* #define HAVE_COMBBLAS TRUE */\n" >> superlu_dist_config.h
printf "#if (XSDK_INDEX_SIZE == 64)\n#define _LONGINT 1\n#endif\n" >> superlu_dist_config.h
/opt/nvidia/hpc_sdk/Linux_x86_64/21.9/compilers/bin/nvc++   -DAdd__  -DUSE_VENDOR_BLAS -I/home/yanxonh/software/SUPERLU_DIST-7.2.0/SRC -c TreeInterface.cpp 
"superlu_defs.h", line 48: catastrophic error: cannot open source file "mpi.h"
  #include <mpi.h>
                  ^

1 catastrophic error detected in the compilation of "TreeInterface.cpp".
Compilation terminated.

I will really appreciate the help.

yanxon commented 1 year ago

I actually have mpi.h here:

yanxonh@login-02:~/software/openmpi/include> ls
mpi-ext.h  mpif-c-constants-decl.h  mpif-config.h  mpif-constants.h  mpif-externals.h  mpif-ext.h  mpif.h  mpif-handles.h  mpif-io-constants.h  mpif-io-handles.h  mpif-sentinels.h  mpif-sizeof.h  mpi.h  mpi_portable_platform.h  openmpi
yanxon commented 1 year ago

If it helps here is my make.inc:

############################################################################
#
#  Program:         SuperLU_DIST
#
#  Module:          make.inc
#
#  Purpose:         Top-level Definitions
#
#  Creation date:   February 4, 1999   version alpha
#
#  Modified:        September 1, 1999  version 1.0
#                   March 15, 2003     version 2.0
#
#           January 18, 2006   Sam Adams
#                                      General Dynamics - Network Systems
#                       works for i386 Linux, with LAM-MPI 7.1.1 and GCC 4.
#
############################################################################
#
#  The machine (platform) identifier to append to the library names
#
PLAT        = _i386

#
#  The name of the libraries to be created/linked to
#
SuperLUroot     = /home/yanxonh/software/SUPERLU_DIST-7.2.0
DSUPERLULIB     = $(SuperLUroot)/lib/libsuperlu_dist.a
INCLUDEDIR      = $(SuperLUroot)/SRC

#
BLASDEF         = -DUSE_VENDOR_BLAS
BLASLIB         = /home/yanxonh/software/BLAS-3.10.0/libblas.a
LAPACKLIB   = /home/yanxonh/software/lapack-3.10.1/liblapack.a
SLU_HAVE_LAPACK = TRUE

############################################################################
## parmetis 4.x.x, 32-bit integer
HAVE_PARMETIS = TRUE
#PARMETIS_DIR   := /home/yanxonh/software/parmetis-4.0.3/
## parmetis 4.x.x, 64-bit integer
PARMETIS_DIR    := /home/yanxonh/software/parmetis-4.0.3/

METISLIB := -L${PARMETIS_DIR}/build/Linux-x86_64/libmetis -lmetis
PARMETISLIB := -L${PARMETIS_DIR}/build/Linux-x86_64/libparmetis -lparmetis
I_PARMETIS := -I${PARMETIS_DIR}/include -I${PARMETIS_DIR}/metis/include
############################################################################

# Define the required Fortran libraries, if you use C compiler to link
FLIBS       = 

# Define all the libraries
LIBS            = $(DSUPERLULIB) $(BLASLIB) $(PARMETISLIB) $(METISLIB) \
          $(LAPACKLIB)
#
#  The archiver and the flag(s) to use when building archive (library)
#  If your system has no ranlib, set RANLIB = echo.
#
ARCH            = ar
ARCHFLAGS       = cr
RANLIB          = ranlib

############################################################################
# C compiler setup
CC              = mpicc
# CFLAGS should be set to be the C flags that include optimization
CFLAGS          = -pipe -O2 ${I_PARMETIS}
#
# NOOPTS should be set to be the C flags that turn off any optimization
NOOPTS      = 
############################################################################
# FORTRAN compiler setup
FORTRAN         = mpif77
F90FLAGS    = mpif90
############################################################################
LOADER          = mpif77
LOADOPTS    = 
############################################################################
#  C preprocessor defs for compilation (-DNoChange, -DAdd_, or -DUpCase)
#
#  Need follow the convention of how C calls a Fortran routine.
#
CDEFS        = -DAdd__ 
edwardnjust commented 4 months ago

In the top CMakeLists.txt, I add a statement 'set(MPI_C_INCLUDE_PATH "/usr/mpi/gcc/openmpi/include/")' before the statement 'include_directories(${MPI_C_INCLUDE_PATH})'. And it works. Hope to help you.