@@ -913,7 +913,7 @@ def __init__(self, subtype, **kwargs):
913913 self .psij = psij
914914
915915 # Check if the provided subtype is valid
916- valid_subtypes = ["local" , "slurm" ]
916+ valid_subtypes = ["local" , "slurm" , "flux" ]
917917 if subtype not in valid_subtypes :
918918 raise ValueError (
919919 f"Invalid 'subtype' provided. Available options: { ', ' .join (valid_subtypes )} "
@@ -992,7 +992,7 @@ async def exec_psij(self, runnable, rerun=False):
992992 with open (file_path , "wb" ) as file :
993993 pickle .dump (runnable ._run , file )
994994 func_path = absolute_path / "run_pickled.py"
995- spec = self .make_spec ("python" , [func_path , file_path ])
995+ spec = self .make_spec ("python" , [str ( func_path ), str ( file_path ) ])
996996 else : # it could be tuple that includes pickle files with tasks and inputs
997997 cache_dir = runnable [- 1 ].cache_dir
998998 file_path_1 = cache_dir / "taskmain.pkl"
@@ -1006,28 +1006,28 @@ async def exec_psij(self, runnable, rerun=False):
10061006 spec = self .make_spec (
10071007 "python" ,
10081008 [
1009- func_path ,
1010- file_path_1 ,
1011- file_path_2 ,
1009+ str ( func_path ) ,
1010+ str ( file_path_1 ) ,
1011+ str ( file_path_2 ) ,
10121012 ],
10131013 )
10141014
10151015 if rerun :
10161016 spec .arguments .append ("--rerun" )
10171017
10181018 spec .stdout_path = cache_dir / "demo.stdout"
1019- spec .stderr_path = cache_dir / "demo.stderr"
1019+ # spec.stderr_path = cache_dir / "demo.stderr"
10201020
10211021 job = self .make_job (spec , None )
10221022 jex .submit (job )
10231023 job .wait ()
10241024
1025- if spec .stderr_path .stat ().st_size > 0 :
1026- with open (spec .stderr_path , "r" ) as stderr_file :
1027- stderr_contents = stderr_file .read ()
1028- raise Exception (
1029- f"stderr_path '{ spec .stderr_path } ' is not empty. Contents:\n { stderr_contents } "
1030- )
1025+ # if spec.stderr_path.stat().st_size > 0:
1026+ # with open(spec.stderr_path, "r") as stderr_file:
1027+ # stderr_contents = stderr_file.read()
1028+ # raise Exception(
1029+ # f"stderr_path '{spec.stderr_path}' is not empty. Contents:\n{stderr_contents}"
1030+ # )
10311031
10321032 return
10331033
@@ -1044,6 +1044,6 @@ def close(self):
10441044 "sge" : SGEWorker ,
10451045 ** {
10461046 "psij-" + subtype : lambda subtype = subtype : PsijWorker (subtype = subtype )
1047- for subtype in ["local" , "slurm" ]
1047+ for subtype in ["local" , "slurm" , "flux" ]
10481048 },
10491049}
0 commit comments