Skip to content

Commit

Permalink
added ability to disable job control files through macros during comp…
Browse files Browse the repository at this point in the history
…ilation
  • Loading branch information
edoerner committed Jan 11, 2019
1 parent d2fed91 commit e8b2904
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
16 changes: 8 additions & 8 deletions HEN_HOUSE/omega/beamnrc/beamnrc.mortran
Original file line number Diff line number Diff line change
Expand Up @@ -4774,11 +4774,11 @@ write(i_log,*) '*********** jcase = ',jcase;

:start_parallel_loop:;
"*******************************************************************************
" #PARALLEL_EGS - If MPI is enabled disable job control file logic and divide
" particle histories evenly among MPI processes.
" #PARALLEL_EGS - If NOPJOB is defined disable job control file logic and
" divide particle histories evenly among MPI processes.
"*******************************************************************************
IF( n_parallel > 0 ) [ "Job is part of a parallel run "
$IF(#,_MPI);
$IF(#,_NOPJOB);
n_run = ncase/n_parallel;
jcase = n_run/$NBATCH;
IF( jcase < 1 ) [ jcase = 1; n_run = jcase*$NBATCH; ]
Expand Down Expand Up @@ -4944,10 +4944,10 @@ ELSE[
#ifdef HAVE_C_COMPILER;
;
"*******************************************************************************
" #PARALLEL_EGS - If MPI is enabled disable original parallelization logic.
" #PARALLEL_EGS - If NOPJOB is defined disable original parallelization logic.
"*******************************************************************************
IF( n_parallel > 0 ) [
$IFNDEF(#,_MPI);
$IFNDEF(#,_NOPJOB);
goto :start_parallel_loop:;
$ENDIF(#);
]
Expand Down Expand Up @@ -5525,11 +5525,11 @@ call egs_finish; " Finish the simulation "
#ifdef HAVE_C_COMPILER;
;
"*******************************************************************************
" #PARALLEL_EGS - If MPI is enabled disable job control file logic and combine
" runs of MPI processes.
" #PARALLEL_EGS - If NOPJOB is enabled disable job control file logic and
" combine runs of MPI processes.
"*******************************************************************************
IF( n_parallel > 0 & ~is_finished ) [
$IF(#,_MPI);
$IF(#,_NOPJOB);
"Get sure that all MPI processes have reached this point "
$MPI{#, call MPI_BARRIER(MPI_COMM_WORLD, ierr)};
IOUTLIST=egs_open_file(IOUTLIST,0,1,'.egslst');
Expand Down
16 changes: 8 additions & 8 deletions HEN_HOUSE/user_codes/dosxyznrc/dosxyznrc.mortran
Original file line number Diff line number Diff line change
Expand Up @@ -2556,11 +2556,11 @@ IF(isource = 20 | isource = 21)["reset more_in_cont and MU index for every"
frMU_indx=-1.0;
]
"*******************************************************************************
" #PARALLEL_EGS - If MPI is enabled disable job control file logic and divide
" particle histories evenly among MPI processes.
" #PARALLEL_EGS - If PJOB is undefined disable job control file logic and
" divide particle histories evenly among processes.
"*******************************************************************************
IF( n_parallel > 0 ) [ "Job is part of a parallel run "
$IF(#,_MPI);
$IF(#,_NOPJOB);
n_run = ncase/n_parallel;
jcase = n_run/$NBATCH;
IF( jcase < 1 ) [ jcase = 1; n_run = jcase*$NBATCH; ]
Expand Down Expand Up @@ -2820,10 +2820,10 @@ DO ibatch = 1,$NBATCH["Break into $NBATCH batches"
#ifdef HAVE_C_COMPILER;
;
"*******************************************************************************
" #PARALLEL_EGS - If MPI is enabled disable original parallelization logic.
" #PARALLEL_EGS - If PJOB is undefined disable original parallelization logic.
"*******************************************************************************
IF( n_parallel > 0 ) [
$IFNDEF(#,_MPI);
$IFNDEF(#,_NOPJOB);
goto :start_parallel_loop:;
$ENDIF(#);
]
Expand Down Expand Up @@ -3431,11 +3431,11 @@ call egs_finish; " Finish the simulation "
#ifdef HAVE_C_COMPILER;
;
"*******************************************************************************
" #PARALLEL_EGS - If MPI is enabled disable job control file logic and combine
" runs of MPI processes.
" #PARALLEL_EGS - If PJOB is undefined disable job control file logic and
" combine runs of MPI processes.
"*******************************************************************************
IF( n_parallel > 0 & ~is_finished ) [
$IF(#,_MPI);
$IF(#,_NOPJOB);
"Get sure that all MPI processes have reached this point "
$MPI{#, call MPI_BARRIER(MPI_COMM_WORLD, ierr)};
IF( i_parallel = 1 ) [
Expand Down

0 comments on commit e8b2904

Please sign in to comment.