@ -150,36 +150,30 @@ let main makefile => {
( List . length clusters_to_analyze )
( List . length clusters_to_analyze )
( List . length all_clusters )
( List . length all_clusters )
Config . results_dir ;
Config . results_dir ;
if ( makefile != " " | | Config . per_procedure_parallelism ) {
let is_java () = >
let is_java () = >
List . exists
List . exists
f :: ( fun cl = > SourceFile . string_crc_has_extension ext :: " java " ( DB . source_dir_to_string cl ) )
f :: (
all_clusters ;
fun cl = > SourceFile . string_crc_has_extension ext :: " java " ( DB . source_dir_to_string cl )
if ( Config . per_procedure_parallelism && not ( is_java () ) ) {
)
/* Java uses ZipLib which is incompatible with forking */
all_clusters ;
/* per-procedure parallelism */
if ( not Config . per_procedure_parallelism ) {
L . stdout " per-procedure parallelism jobs:%d@. " Config . jobs ;
ClusterMakefile . create_cluster_makefile clusters_to_analyze makefile
if ( makefile != " " ) {
} else {
ClusterMakefile . create_cluster_makefile [] makefile
/* per-procedure parallelism */
} ;
if ( is_java () ) {
/* Prepare tasks one cluster at a time while executing in parallel */
/* Java uses ZipLib which is incompatible with forking */
let runner = Tasks . Runner . create jobs :: Config . jobs ;
L . stderr " Error: option --per-procedure-parallelism not supported with Java@. " ;
let cluster_start_tasks i cluster = > {
exit 1
let tasks = analyze_cluster_tasks i cluster ;
} ;
let aggregate_tasks = Tasks . aggregate size :: Config . procedures_per_process tasks ;
L . stdout " per-procedure parallelism jobs:%d@. " Config . jobs ;
Tasks . Runner . start runner tasks :: aggregate_tasks
if ( makefile != " " ) {
} ;
ClusterMakefile . create_cluster_makefile [] makefile
List . iteri f :: cluster_start_tasks clusters_to_analyze ;
} ;
Tasks . Runner . complete runner
/* Prepare tasks one cluster at a time while executing in parallel */
} else if (
let runner = Tasks . Runner . create jobs :: Config . jobs ;
makefile != " "
let cluster_start_tasks i cluster = > {
) {
let tasks = analyze_cluster_tasks i cluster ;
ClusterMakefile . create_cluster_makefile clusters_to_analyze makefile
let aggregate_tasks = Tasks . aggregate size :: 1 tasks ;
Tasks . Runner . start runner tasks :: aggregate_tasks
} ;
List . iteri f :: cluster_start_tasks clusters_to_analyze ;
Tasks . Runner . complete runner
}
} else {
} else {
/* This branch is reached when -j 1 is used */
/* This branch is reached when -j 1 is used */
List . iteri f :: analyze_cluster clusters_to_analyze ;
List . iteri f :: analyze_cluster clusters_to_analyze ;