# Choose the first hit to get the value from (again we assume # that the value does not contain a _) value_start = hits[0] + len(scan_parameter) + 1 # Here we assume that the value is not separated by an # underscore values[scan_parameter] = dmp_folder[value_start:].split("_")[0] # Insert the values restart_from = restart_template.format(values) return restart_from #}}} # Initial runs # =========================================================================== init_run = PBS_runner(additional = scan) dmp_folder, PBS_ids =\ init_run.execute_runs() one_of_the_restart_paths_in_scan = dmp_folder[0] # =========================================================================== # Restart the scan # =========================================================================== restart_run = PBS_runner(nout = 5 ,\ restart = "overwrite" ,\ restart_from = restart_from_func,\ additional = scan ,\ )
"""Driver which runs 3D_diffusion by submitting a job to a PBS using additional options.""" from bout_runners.bout_runners import PBS_runner my_runs = PBS_runner(\ # Although nproc is a member of basic_runner, it is used # together with BOUT_nodes and BOUT_ppn nproc = 4,\ # Number of nodes to be used on the cluster BOUT_nodes = 1,\ # Specifying processor per node BOUT_ppn = 4,\ # The maximum walltime of the run BOUT_walltime = '0:15:00',\ # Specify the queue to submit to (if any) BOUT_queue = None,\ # Specify a mail to be noticed when the run has finished BOUT_mail = None\ ) # Put this in the post-processing function my_runs.execute_runs(remove_old=True)
my_runs = PBS_runner(\ # Specify the numbers used for the BOUT runs nproc = 4,\ BOUT_nodes = 1,\ BOUT_ppn = 4,\ BOUT_walltime = '0:15:00',\ BOUT_queue = None,\ BOUT_mail = None,\ # Specify the numbers used for the post processing post_process_nproc = 1,\ post_process_nodes = 1,\ post_process_ppn = 1,\ post_process_walltime = '0:05:00',\ post_process_queue = None,\ post_process_mail = None,\ # Set the directory directory = 'MMS',\ # Set the time domain nout = 1,\ timestep = 1,\ # Set mms to true mms = True,\ # Set the spatial domain grid_file = grid_files,\ # Set the flag in 3D_diffusion that a grid file will be # used additional = ('flags','use_grid','true'),\ # Add some additional option series_add = [('cst','D_par',[1,2]),\ ('cst','D_perp',[0.5,1])],\ # Copy the grid file cpy_grid = True,\ # Sort the runs by the spatial domain sort_by = 'grid_file' )
value_start = hits[0] + len(scan_parameter) + 1 # Here we assume that the value is not separated by an # underscore values[scan_parameter] = dmp_folder[value_start:].split("_")[0] # Insert the values restart_from = restart_template.format(values) return restart_from #}}} # Initial runs # =========================================================================== init_run = PBS_runner(additional=scan) dmp_folder, PBS_ids =\ init_run.execute_runs() one_of_the_restart_paths_in_scan = dmp_folder[0] # =========================================================================== # Restart the scan # =========================================================================== restart_run = PBS_runner(nout = 5 ,\ restart = "overwrite" ,\ restart_from = restart_from_func,\ additional = scan ,\ )
#!/usr/bin/env python """Driver which runs 3D_diffusion by submitting a job to a PBS using additional options.""" from bout_runners.bout_runners import PBS_runner my_runs = PBS_runner(\ # Although nproc is a member of basic_runner, it is used # together with BOUT_nodes and BOUT_ppn nproc = 4,\ # Number of nodes to be used on the cluster BOUT_nodes = 1,\ # Specifying processor per node BOUT_ppn = 4,\ # The maximum walltime of the run BOUT_walltime = '0:15:00',\ # Specify the queue to submit to (if any) BOUT_queue = None,\ # Specify a mail to be noticed when the run has finished BOUT_mail = None\ ) # Put this in the post-processing function my_runs.execute_runs(remove_old = True)
#!/usr/bin/env python """Driver which runs 3D_diffusion by submitting a job to a Portable Batch System (PBS)""" from bout_runners.bout_runners import PBS_runner my_runs = PBS_runner() my_runs.execute_runs()