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

The executable hangs with no MPI #12

Closed
certik opened this issue Mar 31, 2021 · 5 comments
Closed

The executable hangs with no MPI #12

certik opened this issue Mar 31, 2021 · 5 comments

Comments

@certik
Copy link
Member

certik commented Mar 31, 2021

I use the following input file:

! Input from namelist
&invar
  npey=1
  npez=1
  ichunk=2
  nthreads=2
  nnested=1
  ndimen=3
  nx=6
  lx=0.6
  ny=6
  ly=0.6
  nz=6
  lz=0.6
  nmom=1
  nang=10
  ng=4
  epsi=1.0E-4
  iitm=5
  oitm=30
  timedep=0
  tf=1.0
  nsteps=1
  mat_opt=0
  src_opt=0
  scatp=0
  it_det=0
  fluxp=0
  fixup=1
  soloutp=1
  kplane=0
  popout=0
  swp_typ=0
/

and I compile with:

--- a/src/Makefile
+++ b/src/Makefile
@@ -7,13 +7,14 @@ FFLAG2 =
 DEFS =
 PP =
 
-MPI = yes
-OPENMP = yes
+MPI = no
+OPENMP = no
 
-FORTRAN = mpif90
+#FORTRAN = mpif90
 #FORTRAN = mpifort
 #FORTRAN = ftn
 #FORTRAN = mpiifort
+FORTRAN = gfortran
 
 TARGET = gsnap
 #TARGET = isnap

I run it with:

$ ./gsnap in1 out1        
          keyword Iteration Monitor
********************************************************************************
  Outer

it will just hang there, no other output produced, the file out1 is also empty. When I compile with MPI it seems to work, even just using one MPI rank (it finishes under 1s).

Is it supposed to run without MPI?

@zerr
Copy link
Collaborator

zerr commented Mar 31, 2021

Change nthread to 1 in your input. Add the line multiswp=0. The former won't do anything, but it's consistent with what you're attempting to do. The latter... it's not immediately clear to me what I've done in the multiswp=1 scheduler that is not protected for serial case. Can either fix it there or force it to 0 at setup. Until I do that, this input mod will get you running.

@certik
Copy link
Member Author

certik commented Mar 31, 2021

I applied the change:

--- a/src/in1
+++ b/src/in1
@@ -3,7 +3,8 @@
   npey=1
   npez=1
   ichunk=2
-  nthreads=2
+  nthreads=1
+  multiswp=0
   nnested=1
   ndimen=3
   nx=6

and ran as:

$ ./gsnap in1 out1
          keyword Iteration Monitor
********************************************************************************
  Outer
    1    Dfmxo= 3.5528E-01    No. Inners=   17
    2    Dfmxo= 1.7376E-01    No. Inners=   14
    3    Dfmxo= 8.6338E-03    No. Inners=    9
    4    Dfmxo= 3.4839E-04    No. Inners=    4

  No. Outers=   4    No. Inners=   44

********************************************************************************

 Success! Done in a SNAP!

and it works! Thanks. You can close this issue if you want.

@zerr
Copy link
Collaborator

zerr commented Mar 31, 2021

I'll leave it open until it has a proper fix. It's probably broken in the production app, too.

Thanks for spotting this.

@zerr
Copy link
Collaborator

zerr commented Jun 20, 2021

I don't see what exactly it is that is unhappy. But the simple fix is to force the change to multiswp=0 in the code. Done in latest commits to master and called version 1.11.

@zerr zerr closed this as completed Jun 20, 2021
@certik
Copy link
Member Author

certik commented Jun 20, 2021

Fixed in 39c24cc.

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