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

Make compiles MiniApps/AMR_Adv_Diff_F90 in serial #65

Closed
certik opened this issue Jul 24, 2017 · 2 comments
Closed

Make compiles MiniApps/AMR_Adv_Diff_F90 in serial #65

certik opened this issue Jul 24, 2017 · 2 comments

Comments

@certik
Copy link
Contributor

certik commented Jul 24, 2017

Here is how I installed & tested the latest master (3724a07) of AMReX using Make directly:

module load cmake/3.6.2 gcc/5.3.0 openmpi/1.10.5 python/2.7-anaconda-4.1.1
cd $HOME/repos/amrex
cd MiniApps/AMR_Adv_Diff_F90
make -j16
mpirun -n 16 main.Linux.gfortran.exe

This compiles and runs, but in serial... Here are the first few lines:

$ mpirun -n 16 main.Linux.gfortran.exe
App launch reported: 1 (out of 1) daemons - 16 (out of 16) procs
 MPI initialized with            1  MPI processes
 MPI initialized with            1  threads
 MPI initialized with            1  MPI processes
 MPI initialized with            1  threads
 MPI initialized with            1  MPI processes
 MPI initialized with            1  threads
 MPI initialized with            1  MPI processes
 MPI initialized with            1  threads
...

How can the Make be used to compile this in parallel?

I tried the following patch:

--- a/MiniApps/AMR_Adv_Diff_F90/GNUmakefile
+++ b/MiniApps/AMR_Adv_Diff_F90/GNUmakefile
@@ -6,7 +6,7 @@ NDEBUG    := t
 MPI       :=
 OMP       :=
 PROF      :=
-COMP      := gfortran
+COMP      := mpif90
 MKVERBOSE := t
 
 include $(AMREX_HOME)/Tools/F_mk/GMakedefs.mak

But it fails with:

$ make
../../Tools/F_mk/GMakedefs.mak:184: *** "COMP=mpif90 is not supported".  Stop.

It seems there must be another way to compile this in parallel using the Makefile build system, but I haven't figured it out. Note that this works properly in parallel using the CMake build system (#63).

@certik
Copy link
Contributor Author

certik commented Jul 24, 2017

Note: I also tried the Tutorials/Basic/HeatEquation_EX1_F example by:

cd Tutorials/Basic/HeatEquation_EX1_F
make -j16
mpirun -n 16 main3d.gnu.DEBUG.MPI.ex inputs 

and that worked:

App launch reported: 1 (out of 1) daemons - 16 (out of 16) procs
MPI initialized with 16 MPI processes
 Advancing time step           1 with dt=   3.6621093749999999E-005
 Advancing time step           2 with dt=   3.6621093749999999E-005
 Advancing time step           3 with dt=   3.6621093749999999E-005
...

So perhaps just the MiniApps/AMR_Adv_Diff_F90 program doesn't work anymore?

@WeiqunZhang
Copy link
Member

Yes, you are correct MiniApps/AMR_Adv_Diff_F90 no longer works. For compiling with MPI, we need to have USE_MPI=TRUE in the makefile and COMP=gnu (not COMP=mpif90).

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

2 participants