amrex-tutorials icon indicating copy to clipboard operation
amrex-tutorials copied to clipboard

Unknown mpi wapper

Open shanvach opened this issue 1 year ago • 10 comments

Hi,

I am struggling with the building of AMRex. I am getting "Unknown mpi wrapper" while doing make.

The following is my make.unknown file . image

Am I missing a flag somwhere?

I have loaded my mpi module as follows: image

Your help is greatly appreciated.

Best wishes, Shantanu

shanvach avatar Jan 13 '24 04:01 shanvach

What do you see when you run the following commands?

mpicxx -showme:link
mpif90 -showme:link
mpicxx -link_info
mpif90 -link_info

Are you on a cray system? If so, what do you see if you run

CC --cray-print-opts=cflags
CC --cray-print-opts=libs
ftn --cray-print-opts=libs

WeiqunZhang avatar Jan 13 '24 05:01 WeiqunZhang

What system are you building your code on? Based off the module load command it looks like it might be NASA's Pleiades. If that guess is right, then this page that lists the method for compiling with MPI could be useful, https://www.nas.nasa.gov/hecc/support/kb/hpe-mpt_89.html (All the way at the bottom ).

etpalmer63 avatar Jan 13 '24 05:01 etpalmer63

Hi,

mpicxx -showme:link g++: error: unrecognized command line option ‘-showme:link’; did you mean ‘--force-link’?

mpif90 -showme:link g++: error: unrecognized command line option ‘-showme:link’; did you mean ‘--force-link’?

mpicxx -link_info

/usr/bin/ld: cannot find -link_info
collect2: error: ld returned 1 exit status

mpif90 -link_info

/usr/bin/ld: cannot find -link_info
collect2: error: ld returned 1 exit status

shanvach avatar Jan 14 '24 17:01 shanvach

If you don't need Fortran, you can try make NO_MPI_CHECKING=TRUE BL_NO_FORT=TRUE CXX=mpicxx. If you need Fortran, you can try make NO_MPI_CHECKING=TRUE CXX=mpicxx F90=mpif90.

WeiqunZhang avatar Jan 14 '24 21:01 WeiqunZhang

Could you also do us a favor? Could you try to change the make file error to warning in amrex/Tools/GNUMake/sites/Make.unknown to see if it works for you without using NO_MPI_CHECKING=TRUE?

--- a/Tools/GNUMake/sites/Make.unknown
+++ b/Tools/GNUMake/sites/Make.unknown
@@ -49,7 +49,7 @@ ifeq ($(USE_MPI),TRUE)
      mpicxx_link_libs := $(filter -l%,$(shell mpicxx -link_info))
      mpicxx_include_dirs := $(subst -I,-isystem ,$(filter -I%,$(shell mpicxx -compile_info)))
   else
-     $(error Unknown mpi wrapper.  You can try setting MPI stuff in amrex/Tools/GNUMake/Make.local and then compile with NO_MPI_CHECKING=TRUE.)
+     $(warning Unknown mpi wrapper.  You can try setting MPI stuff in amrex/Tools/GNUMake/Make.local and then compile with NO_MPI_CHECKING=TRUE.)
   endif
 
   # some compilers return the compiler command as part of the link line info.

WeiqunZhang avatar Jan 14 '24 21:01 WeiqunZhang

So I have attached my Make.unknown file (with NO_MPI_CHECKING=TRUE) and the output while doing make Make.unknown.txt job.output.txt

shanvach avatar Jan 15 '24 15:01 shanvach

Looks like you are using Intel compilers. So you probably want to use configure --comp intel and make NO_MPI_CHECKING=TRUE CXX=mpicxx F90=mpif90.

Also I think if you change from error to warning in Make.unknown, make without NO_MPI_CHECKING=TRUE CXX=mpicxx F90=mpif90 should work.

But I don't understand why you got this about g++ earlier. Maybe you were using different modules?

mpicxx -showme:link
g++: error: unrecognized command line option ‘-showme:link’; did you mean ‘--force-link’?

WeiqunZhang avatar Jan 15 '24 19:01 WeiqunZhang

According to this (https://www.nas.nasa.gov/hecc/support/kb/porting-with-hpes-mpi-and-intel-openmp_104.html),

image

Should I change some commands while configuring and executing the make command

shanvach avatar Jan 15 '24 20:01 shanvach

From what you showed previously, mpicxx is a wrapper for icpc and mpif90 is a wrapper for ifort. So I don't think you need to change.

On Mon, Jan 15, 2024, 12:42 PM shanvach @.***> wrote:

According to this ( https://www.nas.nasa.gov/hecc/support/kb/porting-with-hpes-mpi-and-intel-openmp_104.html ),

image.png (view on web) https://github.com/AMReX-Codes/amrex-tutorials/assets/78977340/1b12c793-82ed-4b8c-8f98-29e1b4cf665c

Should I change some commands while configuring and executing the make command

— Reply to this email directly, view it on GitHub https://github.com/AMReX-Codes/amrex-tutorials/issues/108#issuecomment-1892744053, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB37TYJ3H2SYSR75OMX3GP3YOWICZAVCNFSM6AAAAABBZBBQFCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOJSG42DIMBVGM . You are receiving this because you commented.Message ID: @.***>

WeiqunZhang avatar Jan 16 '24 00:01 WeiqunZhang

Hi, I was able to build it using the following step.

module load comp-intel
module load mpi-hpe/mpt

export MPICC_CC=icc
export MPICXX_CXX=icpc
export MPIF90_F90=ifort
export NO_MPI_CHECKING=TRUE
# configure and install amrex in 2D
make clean || true
./configure --dim=2 --prefix=$AMREX2D_HOME
make
make install

# configure and install amrex in 3D
make clean || true
./configure --dim=3 --prefix=$AMREX3D_HOME
make
make install

Now, for example when I'm building my code, I use something like use amrex_amr_module

I get , error #7002: Error in opening the compiled module file.

So I checked and found that my .mod files are not in the $AMREX2D_HOME and $AMREX3D_HOME directories

image

Is this because of my compilation using the Intel environment?

shanvach avatar Feb 27 '24 22:02 shanvach