Skip to content

Commit

Permalink
Cluster submission fixes (#213)
Browse files Browse the repository at this point in the history
* deprecation warning for legacy file
* let cluster use user's python environment
  • Loading branch information
mlincett committed Oct 14, 2022
1 parent 0032605 commit 3859bdd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions flarestack/cluster/make_desy_cluster_script.py
Expand Up @@ -4,6 +4,10 @@

logger = logging.getLogger(__name__)

logger.warning(
"WARNING: this module is deprecated. Check `flarestack.cluster.submitter` instead."
)

username = os.path.basename(os.environ["HOME"])

root_dir = os.path.dirname(fs_dir[:-1])
Expand Down
4 changes: 2 additions & 2 deletions flarestack/cluster/submitter.py
@@ -1,4 +1,4 @@
import os, subprocess, time, logging, shutil, copy
import os, subprocess, time, logging, shutil, copy, sys
import numpy as np
from flarestack.shared import (
fs_dir,
Expand Down Expand Up @@ -437,7 +437,7 @@ def make_cluster_submission_script(self):
"eval $(/cvmfs/icecube.opensciencegrid.org/py3-v4.1.0/setup.sh) \n"
"export PYTHONPATH=" + DESYSubmitter.root_dir + "/ \n"
"export FLARESTACK_SCRATCH_DIR=" + flarestack_scratch_dir + " \n"
"python " + fs_dir + "core/multiprocess_wrapper.py -f $1 -n $2 \n"
f"{sys.executable} {fs_dir} core/multiprocess_wrapper.py -f $1 -n $2 \n"
"cp $TMPDIR/${JOB_ID}_stdout.txt " + log_dir + "\n"
"cp $TMPDIR/${JOB_ID}_stderr.txt " + log_dir + "\n "
)
Expand Down

0 comments on commit 3859bdd

Please sign in to comment.