Skip to content

Commit

Permalink
Better values for MPI variables when ignore_MPI=true in mk_input()
Browse files Browse the repository at this point in the history
Set irank/nrank as if running in serial, to avoid errors from
set_element_scale_and_shift()).
  • Loading branch information
johnomotani committed Oct 30, 2023
1 parent 92a4e29 commit afe3709
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/moment_kinetics_input.jl
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,8 @@ function mk_input(scan_input=Dict(); save_inputs_to_txt=false, ignore_MPI=true)
# need grid and MPI information to determine these values
# MRH just put dummy values now
if ignore_MPI
irank_z = nrank_z = irank_r = nrank_r = -1
irank_z = irank_r = 0
nrank_z = nrank_r = 1
comm_sub_z = comm_sub_r = MPI.COMM_NULL
else
irank_z, nrank_z, comm_sub_z, irank_r, nrank_r, comm_sub_r = setup_distributed_memory_MPI(z.nelement_global,z.nelement_local,r.nelement_global,r.nelement_local)
Expand Down

0 comments on commit afe3709

Please sign in to comment.