Skip to content

Commit

Permalink
disable shm, no direct mode with restore
Browse files Browse the repository at this point in the history
BLUECONFIGS_BRANCH=weji/coreneuron_direct
SPACK_BRANCH=weji/neuron_nmodl_develop
  • Loading branch information
Weina Ji committed Mar 25, 2024
1 parent 13ed866 commit 9b64d7f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion neurodamus/core/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -1023,7 +1023,7 @@ def _coreneuron_direct_mode(config: _SimConfig, run_conf):
logging.warning("--coreneuron-direct-mode not valid for multi-cyle model building, "
"continue with file mode")
direct_mode = False
if config.save:
if config.save or config.restore:
logging.warning("--coreneuron-direct-mode not valid for save/restore, "
"continue with file mode")
direct_mode = False
Expand Down
7 changes: 5 additions & 2 deletions neurodamus/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -1210,9 +1210,11 @@ def _coreneuron_ensure_all_ranks_have_gids(self, corenrn_data):
dummyfile.write("%s\n0\n" % coredata_version)

# -
def _sim_corenrn_configure_datadir(self, corenrn_restore):
def _sim_corenrn_configure_datadir(self, corenrn_restore, coreneuron_direct_mode):
corenrn_datadir = SimConfig.coreneuron_datadir
os.makedirs(corenrn_datadir, exist_ok=True)
if coreneuron_direct_mode:
return corenrn_datadir
corenrn_datadir_shm = SHMUtil.get_datadir_shm(corenrn_datadir)

# Clean-up any previous simulations in the same output directory
Expand Down Expand Up @@ -1271,7 +1273,8 @@ def _sim_corenrn_configure_datadir(self, corenrn_restore):
@timeit(name="corewrite")
def _sim_corenrn_write_config(self, corenrn_restore=False):
log_stage("Dataset generation for CoreNEURON")
CoreConfig.datadir = self._sim_corenrn_configure_datadir(corenrn_restore)
CoreConfig.datadir = self._sim_corenrn_configure_datadir(corenrn_restore,
SimConfig.coreneuron_direct_mode)
fwd_skip = self._run_conf.get("ForwardSkip", 0) if not corenrn_restore else 0

if not corenrn_restore:
Expand Down

0 comments on commit 9b64d7f

Please sign in to comment.