From bf6691e138e347aaa53d0131c706c43bbe5aedbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Sierro?= Date: Mon, 31 May 2021 16:34:23 +0200 Subject: [PATCH] fixed pbars actors --- src/scgenerator/data/submit_job_template.txt | 1 - src/scgenerator/physics/simulate.py | 6 ++++-- src/scgenerator/scripts/slurm_submit.py | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/scgenerator/data/submit_job_template.txt b/src/scgenerator/data/submit_job_template.txt index fba5c55..609b86f 100644 --- a/src/scgenerator/data/submit_job_template.txt +++ b/src/scgenerator/data/submit_job_template.txt @@ -50,6 +50,5 @@ done ############################################################################################## #### call your code below -export SCGENERATOR_HUSH_PROGRESS="" scgenerator {command} {configs_list} exit \ No newline at end of file diff --git a/src/scgenerator/physics/simulate.py b/src/scgenerator/physics/simulate.py index b3f2bb9..f7277dc 100644 --- a/src/scgenerator/physics/simulate.py +++ b/src/scgenerator/physics/simulate.py @@ -629,8 +629,10 @@ class RaySimulations(Simulations, priority=2): self.jobs = [] self.actors = {} self.rolling_id = 0 - self.p_actor = ray.remote(utils.ProgressBarActor).remote( - self.sim_jobs_total, self.param_seq.num_steps + self.p_actor = ( + ray.remote(utils.ProgressBarActor) + .options(override_environment_variables=io.get_all_environ()) + .remote(self.sim_jobs_total, self.param_seq.num_steps) ) def new_sim(self, variable_list: List[tuple], params: dict): diff --git a/src/scgenerator/scripts/slurm_submit.py b/src/scgenerator/scripts/slurm_submit.py index e1e774b..3dbcbb5 100644 --- a/src/scgenerator/scripts/slurm_submit.py +++ b/src/scgenerator/scripts/slurm_submit.py @@ -31,7 +31,7 @@ def create_parser(): parser.add_argument( "--environment-setup", required=False, - default=f"source {os.path.expanduser('~/anaconda3/etc/profile.d/conda.sh')} && conda activate sc", + default=f"source {os.path.expanduser('~/anaconda3/etc/profile.d/conda.sh')} && conda activate sc && export SCGENERATOR_HUSH_PROGRESS=\"\"", help="commands to run to setup the environement (default : activate the sc environment with conda)", ) parser.add_argument(