Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unknown mpi wapper #108

Open
shanvach opened this issue Jan 13, 2024 · 10 comments
Open

Unknown mpi wapper #108

shanvach opened this issue Jan 13, 2024 · 10 comments

Comments

@shanvach
Copy link

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

@WeiqunZhang
Copy link
Member

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

@etpalmer63
Copy link
Collaborator

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 ).

@shanvach
Copy link
Author

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

@WeiqunZhang
Copy link
Member

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
Copy link
Member

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.

@shanvach
Copy link
Author

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

@WeiqunZhang
Copy link
Member

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’?

@shanvach
Copy link
Author

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

@WeiqunZhang
Copy link
Member

WeiqunZhang commented Jan 16, 2024 via email

@shanvach
Copy link
Author

shanvach commented Feb 27, 2024

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants