204
204
Mask to name jobs from replace_dict
205
205
206
206
207
- - **python ** *(PathOrStr)*:
207
+ - **python3 ** *(PathOrStr)*:
208
208
209
209
Path to python to use with sixdb (python3 with requirements
210
210
installed).
211
211
212
212
default: ``python3``
213
213
214
214
215
+ - **python2** *(PathOrStr)*:
216
+
217
+ Path to python to use with run_six.sh (python2 with requirements installed).
218
+ ONLY THE PATH TO THE DIRECTORY OF THE python BINARY IS NEEDED!
219
+ And it can't be an Anaconda Distribution.
220
+
221
+ default: None (uses the first `python` in path)
222
+
223
+
215
224
- **resubmit**:
216
225
217
226
Resubmits if needed.
@@ -321,8 +330,16 @@ def get_params():
321
330
help = "Path to executable." ,
322
331
)
323
332
params .add_parameter (
324
- name = "python" ,
325
- default = DEFAULTS ["python" ],
333
+ name = "python2" ,
334
+ default = DEFAULTS ["python2" ],
335
+ type = PathOrStr ,
336
+ help = ("Path to python to use with run_six.sh (python2 with requirements installed)."
337
+ " ONLY THE PATH TO THE DIRECTORY OF THE python BINARY IS NEEDED!"
338
+ " And it can't be an Anaconda Distribution." ),
339
+ )
340
+ params .add_parameter (
341
+ name = "python3" ,
342
+ default = DEFAULTS ["python3" ],
326
343
type = PathOrStr ,
327
344
help = "Path to python to use with sixdb (python3 with requirements installed)." ,
328
345
)
@@ -388,7 +405,8 @@ def main(opt):
388
405
basedir = opt .working_directory ,
389
406
# kwargs:
390
407
ssh = opt .ssh ,
391
- python = opt .python ,
408
+ python2 = opt .python2 ,
409
+ python3 = opt .python3 ,
392
410
unlock = opt .unlock ,
393
411
resubmit = opt .resubmit ,
394
412
da_turnstep = opt .da_turnstep ,
@@ -426,7 +444,8 @@ def setup_and_run(jobname: str, basedir: Path, **kwargs):
426
444
LOG .info (f"vv---------------- Job { jobname } -------------------vv" )
427
445
unlock : bool = kwargs .pop ("unlock" , False )
428
446
ssh : str = kwargs .pop ("ssh" , None )
429
- python : Union [Path , str ] = kwargs .pop ("python" , DEFAULTS ["python" ])
447
+ python2 : Union [Path , str ] = kwargs .pop ("python2" , DEFAULTS ["python2" ])
448
+ python3 : Union [Path , str ] = kwargs .pop ("python3" , DEFAULTS ["python3" ])
430
449
resubmit : bool = kwargs .pop ("resubmit" , False )
431
450
da_turnstep : int = kwargs .pop ("da_turnstep" , DEFAULTS ["da_turnstep" ])
432
451
ignore_twissfail_check : bool = kwargs .pop ("ignore_twissfail_check" , False )
@@ -499,7 +518,7 @@ def setup_and_run(jobname: str, basedir: Path, **kwargs):
499
518
> /afs/cern.ch/project/sixtrack/SixDesk_utilities/pro/utilities/bash/run_six.sh -a
500
519
"""
501
520
if check_ok :
502
- submit_sixtrack (jobname , basedir , ssh = ssh )
521
+ submit_sixtrack (jobname , basedir , python = python2 , ssh = ssh )
503
522
return # takes even longer
504
523
505
524
with check_stage (STAGES .check_sixtrack_output , jobname , basedir ) as check_ok :
@@ -515,7 +534,7 @@ def setup_and_run(jobname: str, basedir: Path, **kwargs):
515
534
> /afs/cern.ch/project/sixtrack/SixDesk_utilities/pro/utilities/bash/run_six.sh -i
516
535
"""
517
536
if check_ok :
518
- check_sixtrack_output (jobname , basedir , ssh = ssh , resubmit = resubmit )
537
+ check_sixtrack_output (jobname , basedir , python = python2 , ssh = ssh , resubmit = resubmit )
519
538
520
539
with check_stage (STAGES .sixdb_load , jobname , basedir ) as check_ok :
521
540
"""
@@ -524,7 +543,7 @@ def setup_and_run(jobname: str, basedir: Path, **kwargs):
524
543
> python3 /afs/cern.ch/project/sixtrack/SixDesk_utilities/pro/utilities/externals/SixDeskDB/sixdb . load_dir
525
544
"""
526
545
if check_ok :
527
- sixdb_load (jobname , basedir , python = python , ssh = ssh )
546
+ sixdb_load (jobname , basedir , python = python3 , ssh = ssh )
528
547
529
548
with check_stage (STAGES .sixdb_cmd , jobname , basedir ) as check_ok :
530
549
"""
@@ -537,7 +556,7 @@ def setup_and_run(jobname: str, basedir: Path, **kwargs):
537
556
> python3 /afs/cern.ch/project/sixtrack/SixDesk_utilities/pro/utilities/externals/SixDeskDB/sixdb $jobname plot_da_vs_turns
538
557
"""
539
558
if check_ok :
540
- sixdb_cmd (jobname , basedir , cmd = ["da" ], python = python , ssh = ssh )
559
+ sixdb_cmd (jobname , basedir , cmd = ["da" ], python = python3 , ssh = ssh )
541
560
542
561
# da_vs_turns is broken at the moment (jdilly, 19.10.2020)
543
562
# sixdb_cmd(jobname, basedir, cmd=['da_vs_turns', '-turnstep', str(da_turnstep), '-outfile'],
0 commit comments