wdmapp / effis

4 stars 6 forks source link

is machine->job_setup required in composition files? #8

Open cwsmith opened 4 years ago

cwsmith commented 4 years ago

Installing effis (spack install effis following the instructions here https://wdmapp.readthedocs.io/en/latest/build/build.html#build-wdmapp-label) on Rhea and running effis-compose.py appears to require job_setup: /path/to/script for the last line of .cheetah/<user>/campaign-env.sh to be generated correctly. Specifically, I created three yaml composition files, one with job_setup:, one without, and one with an empty job_setup field:

$ diff run_externalCpl_cws.yaml run_externalCpl_cws_noSetup.yaml                                    
10c10
< rundir: /gpfs/alpine/phy122/scratch/cwsmith/testWdmCpl
---
> rundir: /gpfs/alpine/phy122/scratch/cwsmith/testWdmCpl_noSetup
16d15
<   job_setup: run_externalCpl_setup.sh

$ diff run_externalCpl_cws.yaml run_externalCpl_cws_emptySetup.yaml 
10c10
< rundir: /gpfs/alpine/phy122/scratch/cwsmith/testWdmCpl
---
> rundir: /gpfs/alpine/phy122/scratch/cwsmith/testWdmCpl_emptySetup
16c16
<   job_setup: run_externalCpl_setup.sh
---
>   job_setup: 

Then ran effis-compose.py on the three yaml files (note, they output to different run directories):

$ effis-compose.py run_externalCpl_cws_noSetup.yaml 
$ effis-compose.py run_externalCpl_cws.yaml)
$ effis-compose.py run_externalCpl_cws_emptySetup.yaml

And then looking at the two campaign-env.sh files we see an empty 'source' for the cp command is in the 'noSetup' output

cwsmith@rhea-login6g: /gpfs/alpine/phy122/scratch/cwsmith $ grep -n cp testWdmCpl*/.cheetah/cwsmith/campaign-env.sh                                                                     
testWdmCpl/.cheetah/cwsmith/campaign-env.sh:12:cp "/gpfs/alpine/phy122/scratch/cwsmith/testcases/run_1/rhea/run_externalCpl_setup.sh" "/gpfs/alpine/phy122/scratch/cwsmith/testWdmCpl/.cheetah/cwsmith/."
testWdmCpl_emptySetup/.cheetah/cwsmith/campaign-env.sh:12:cp "" "/gpfs/alpine/phy122/scratch/cwsmith/testWdmCpl_emptySetup/.cheetah/cwsmith/."
testWdmCpl_noSetup/.cheetah/cwsmith/campaign-env.sh:12:cp "" "/gpfs/alpine/phy122/scratch/cwsmith/testWdmCpl_noSetup/.cheetah/cwsmith/."

Running effis-submit on a yaml with the empty 'source' arg for the cp command produces the following error. Note, I appended -x to the #!/bin/bash at the top of effis-submit to see where it was failing:

$ effis-submit /gpfs/alpine/phy122/scratch/cwsmith/testWdmCpl_noSetup/
+ '[' -z '' ']'
+ case "$-" in
+ __lmod_vx=x
+ '[' -n x ']'
+ set +x
Shell debugging temporarily silenced: export LMOD_SH_DBG_ON=1 for this output (/sw/rhea/lmod/8.2.10/init/bash)
Shell debugging restarted
+ unset __lmod_vx
+ mydir=/gpfs/alpine/phy122/scratch/cwsmith/testcases/run_1/rhea
+ '[' -f /gpfs/alpine/phy122/scratch/cwsmith/testWdmCpl_noSetup//run/.kittie-script.sh ']'
+ cd /gpfs/alpine/phy122/scratch/cwsmith/testWdmCpl_noSetup//.cheetah/cwsmith
+ ./run-all.sh
cp: cannot stat ââ: No such file or directory
Failed to load compaign-env.sh, aborting
+ cd /gpfs/alpine/phy122/scratch/cwsmith/testcases/run_1/rhea
suchyta1 commented 4 years ago

job_setup hasn't ben required, insofar as I've done many runs without it. Though, it's possible a cheetah change has occurred.

I'd expect giving the key without a value not to work, as it's like setting a blank file name. I could fix that, but the way it is now will interpret as an empty string.

suchyta1 commented 4 years ago

I've reproduced it in the examples, I'll ask the Cheetah developer what to do without one.

suchyta1 commented 4 years ago

The Cheetah bug appears to have been fixed now.