\(\newcommand{\B}[1]{ {\bf #1} }\) \(\newcommand{\R}[1]{ {\rm #1} }\)
fit_parallel¶
View page sourceFit With Specified Maximum Number of Processes¶
Prototype¶
# at_cascade.fit_parallel
def fit_parallel(
job_table ,
start_job_id ,
all_node_database ,
node_table ,
fit_integrand ,
skip_start_job ,
max_number_cpu ,
fit_type_list ,
shared_unique ,
) :
#
assert type(job_table) == list
assert type(start_job_id) == int
assert type(all_node_database) == str
assert type(node_table) == list
assert type(fit_integrand) == set
assert type(skip_start_job) == bool
assert type(max_number_cpu) == int
assert type(fit_type_list) == list
assert type(shared_unique) == str
job_table¶
This is a job_table containing all the jobs necessary to fit the fit_goal_set .
start_job_id¶
This is the job_id for the starting job. The fit_parallel routine will not return until this job, and all it descendants in the job table, have been run, or an error occurs that prevents a job from completing..
all_node_database¶
node_table¶
fit_integrand¶
skip_start_job¶
If this is true (false) the job corresponding to start_job_id will be skipped (will not be skipped). If this argument is true, the start job must have already been run. This is useful when using continue_cascade .
max_number_cpu¶
This is the maximum number of cpus (processes) to use. This must be greater than zero. If it is one, the jobs are run sequentially; i.e., not in parallel.
fit_type_list¶
This is a list with one or two elements
and its possible elements are both and fixed.
For each job, the first type of fit is attempted.
If it fails, and there is a second type of fit, it is attempted.
If it also fails, the corresponding job fails.
trace.out¶
If the max_number_cpu is one, standard output is not redirected.
Otherwise, standard output for each job is written to a file called
trace.out in the same directory as the database for the job.