@@ -175,11 +175,13 @@ def run_full(
175175 extraOptions = {},
176176 multipliers = {},
177177 scan_param = None , # {'variable': 'KY', 'values': [0.2,0.3,0.4]}
178+ enforce_equality = None , # e.g. {'DLNTDR_SCALE_2': 'DLNTDR_SCALE_1', 'DLNTDR_SCALE_3': 'DLNTDR_SCALE_1'}
178179 minutes = 5 ,
179180 n = 16 ,
180181 nomp = 1 ,
181182 submit_via_qsub = True , #TODO fix this, works only at NERSC? no scans?
182183 clean_folder_going_in = True , # Make sure the scratch folder is removed before running (unless I want a restart!)
184+ submit_run = True , # False if I just want to check and fetch the job that was already submitted (e.g. via qsub or slurm)
183185 ):
184186
185187 input_cgyro_file , inputgacode_file_this = self ._prerun (
@@ -280,6 +282,13 @@ def run_full(
280282 extraOptions_this = extraOptions .copy ()
281283 if scan_param ['variable' ] is not None :
282284 extraOptions_this [scan_param ['variable' ]] = value
285+
286+
287+ # If there is an enforce_equality, apply it
288+ if enforce_equality is not None :
289+ for key in enforce_equality :
290+ extraOptions_this [key ] = extraOptions_this [enforce_equality [key ]]
291+
283292 inputCGYRO = CGYROinput (file = input_cgyro_file_this )
284293 input_cgyro_file_this = GACODErun .modifyInputs (
285294 inputCGYRO ,
@@ -310,12 +319,13 @@ def run_full(
310319 output_folders = output_folders ,
311320 )
312321
313- self .cgyro_job .run (
314- waitYN = False ,
315- check_if_files_received = False ,
316- removeScratchFolders = False ,
317- removeScratchFolders_goingIn = clean_folder_going_in ,
318- )
322+ if submit_run :
323+ self .cgyro_job .run (
324+ waitYN = False ,
325+ check_if_files_received = False ,
326+ removeScratchFolders = False ,
327+ removeScratchFolders_goingIn = clean_folder_going_in ,
328+ )
319329
320330 # Prepare how to search for the job without waiting for it
321331 name_default_submission_qsub = Path (self .cgyro_job .folderExecution ).name
@@ -342,7 +352,7 @@ def check(self, every_n_minutes=5):
342352 else :
343353 print ("- Not checking status because this was run command line (not slurm)" )
344354
345- print ("\t - Job considered finished" )
355+ print ("\n \t * Job considered finished" , typeMsg = "i " )
346356
347357 def fetch (self ):
348358 """
0 commit comments