Skip to content

Commit

Permalink
Merge pull request #408 from GEOS-ESM/develop
Browse files Browse the repository at this point in the history
Sync develop into main
  • Loading branch information
sdrabenh authored Feb 13, 2023
2 parents 26098aa + 3323d12 commit b6111a5
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion HISTORY.rc.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -1526,7 +1526,7 @@ COLLECTIONS: 'inst3_3d_asm_Np-'
'NIPNO3AQ' , 'NI' ,
'NIPNH4AQ' , 'NI' ,
'NIPNH3AQ' , 'NI' ,
'NIHT' , 'NI' ,
'NIHT' , 'NI' , 'NIHT001;NIHT002;NIHT003',
'NISD' , 'NI' , 'NISD001;NISD002;NISD003',
'NIDP' , 'NI' , 'NIDP001;NIDP002;NIDP003',
'NIWT' , 'NI' , 'NIWT001;NIWT002;NIWT003',
Expand Down
2 changes: 1 addition & 1 deletion gcm_forecast.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ endif
@ MODEL_NPES = $NX * $NY

set NCPUS_PER_NODE = @NCPUS_PER_NODE
set NUM_MODEL_NODES=`echo "scale=1;($MODEL_NPES / $NCPUS_PER_NODE)" | bc | awk 'function ceil(x, y){y=int(x); return(x>y?y+1:y)} {print ceil($1)}'`
set NUM_MODEL_NODES=`echo "scale=6;($MODEL_NPES / $NCPUS_PER_NODE)" | bc | awk 'function ceil(x, y){y=int(x); return(x>y?y+1:y)} {print ceil($1)}'`

if ( $NCPUS != NULL ) then

Expand Down
2 changes: 1 addition & 1 deletion gcm_run.j
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ endif
@ MODEL_NPES = $NX * $NY

set NCPUS_PER_NODE = @NCPUS_PER_NODE
set NUM_MODEL_NODES=`echo "scale=1;($MODEL_NPES / $NCPUS_PER_NODE)" | bc | awk 'function ceil(x, y){y=int(x); return(x>y?y+1:y)} {print ceil($1)}'`
set NUM_MODEL_NODES=`echo "scale=6;($MODEL_NPES / $NCPUS_PER_NODE)" | bc | awk 'function ceil(x, y){y=int(x); return(x>y?y+1:y)} {print ceil($1)}'`

if ( $NCPUS != NULL ) then

Expand Down
10 changes: 5 additions & 5 deletions gcm_setup
Original file line number Diff line number Diff line change
Expand Up @@ -1357,10 +1357,10 @@ if ( $DO_IOS == TRUE ) then
# In the calculations below, the weird bc-awk command is to round up the floating point calcs

# First we calculate the number of model nodes
set NUM_MODEL_NODES=`echo "scale=1;($MODEL_NPES / $NCPUS_PER_NODE)" | bc | awk 'function ceil(x, y){y=int(x); return(x>y?y+1:y)} {print ceil($1)}'`
set NUM_MODEL_NODES=`echo "scale=6;($MODEL_NPES / $NCPUS_PER_NODE)" | bc | awk 'function ceil(x, y){y=int(x); return(x>y?y+1:y)} {print ceil($1)}'`

# Next the number of frontend PEs is 10% of the model PEs
set NUM_FRONTEND_PES=`echo "scale=1;($MODEL_NPES * 0.1)" | bc | awk 'function ceil(x, y){y=int(x); return(x>y?y+1:y)} {print ceil($1)}'`
set NUM_FRONTEND_PES=`echo "scale=6;($MODEL_NPES * 0.1)" | bc | awk 'function ceil(x, y){y=int(x); return(x>y?y+1:y)} {print ceil($1)}'`

# Now we roughly figure out the number of collections in the HISTORY.rc (this is not perfect, but is close to right)
set NUM_HIST_COLLECTIONS=`cat $TMPHIST | sed -n '/^COLLECTIONS:/,/^ *::$/{p;/^ *::$/q}' | grep -v '^ *#' | wc -l`
Expand All @@ -1369,10 +1369,10 @@ if ( $DO_IOS == TRUE ) then
@ NUM_OSERVER_PES=$NUM_FRONTEND_PES + $NUM_HIST_COLLECTIONS

# Now calculate the number of oserver nodes
set NUM_OSERVER_NODES=`echo "scale=1;($NUM_OSERVER_PES / $NCPUS_PER_NODE)" | bc | awk 'function ceil(x, y){y=int(x); return(x>y?y+1:y)} {print ceil($1)}'`
set NUM_OSERVER_NODES=`echo "scale=6;($NUM_OSERVER_PES / $NCPUS_PER_NODE)" | bc | awk 'function ceil(x, y){y=int(x); return(x>y?y+1:y)} {print ceil($1)}'`

# And then the number of backend PEs is the number of history collections divided by the number of oserver nodes
set NUM_BACKEND_PES=`echo "scale=1;($NUM_HIST_COLLECTIONS / $NUM_OSERVER_NODES)" | bc | awk 'function ceil(x, y){y=int(x); return(x>y?y+1:y)} {print ceil($1)}'`
set NUM_BACKEND_PES=`echo "scale=6;($NUM_HIST_COLLECTIONS / $NUM_OSERVER_NODES)" | bc | awk 'function ceil(x, y){y=int(x); return(x>y?y+1:y)} {print ceil($1)}'`

# multigroup requires at least two backend pes
if ($NUM_BACKEND_PES < 2) set NUM_BACKEND_PES = 2
Expand All @@ -1382,7 +1382,7 @@ if ( $DO_IOS == TRUE ) then

else
# Calculate the number of model nodes
set NODES=`echo "scale=1;($MODEL_NPES / $NCPUS_PER_NODE)" | bc | awk 'function ceil(x, y){y=int(x); return(x>y?y+1:y)} {print ceil($1)}'`
set NODES=`echo "scale=6;($MODEL_NPES / $NCPUS_PER_NODE)" | bc | awk 'function ceil(x, y){y=int(x); return(x>y?y+1:y)} {print ceil($1)}'`

set NUM_OSERVER_NODES = 0
set NUM_BACKEND_PES = 0
Expand Down
10 changes: 5 additions & 5 deletions geoschemchem_setup
Original file line number Diff line number Diff line change
Expand Up @@ -1408,10 +1408,10 @@ if ( $DO_IOS == TRUE ) then
# In the calculations below, the weird bc-awk command is to round up the floating point calcs

# First we calculate the number of model nodes
set NUM_MODEL_NODES=`echo "scale=1;($MODEL_NPES / $NCPUS_PER_NODE)" | bc | awk 'function ceil(x, y){y=int(x); return(x>y?y+1:y)} {print ceil($1)}'`
set NUM_MODEL_NODES=`echo "scale=6;($MODEL_NPES / $NCPUS_PER_NODE)" | bc | awk 'function ceil(x, y){y=int(x); return(x>y?y+1:y)} {print ceil($1)}'`

# Next the number of frontend PEs is 10% of the model PEs
set NUM_FRONTEND_PES=`echo "scale=1;($MODEL_NPES * 0.1)" | bc | awk 'function ceil(x, y){y=int(x); return(x>y?y+1:y)} {print ceil($1)}'`
set NUM_FRONTEND_PES=`echo "scale=6;($MODEL_NPES * 0.1)" | bc | awk 'function ceil(x, y){y=int(x); return(x>y?y+1:y)} {print ceil($1)}'`

# Now we roughly figure out the number of collections in the HISTORY.rc (this is not perfect, but is close to right)
set NUM_HIST_COLLECTIONS=`cat $TMPHIST | sed -n '/^COLLECTIONS:/,/^ *::$/{p;/^ *::$/q}' | grep -v '^ *#' | wc -l`
Expand All @@ -1420,10 +1420,10 @@ if ( $DO_IOS == TRUE ) then
@ NUM_OSERVER_PES=$NUM_FRONTEND_PES + $NUM_HIST_COLLECTIONS

# Now calculate the number of oserver nodes
set NUM_OSERVER_NODES=`echo "scale=1;($NUM_OSERVER_PES / $NCPUS_PER_NODE)" | bc | awk 'function ceil(x, y){y=int(x); return(x>y?y+1:y)} {print ceil($1)}'`
set NUM_OSERVER_NODES=`echo "scale=6;($NUM_OSERVER_PES / $NCPUS_PER_NODE)" | bc | awk 'function ceil(x, y){y=int(x); return(x>y?y+1:y)} {print ceil($1)}'`

# And then the number of backend PEs is the number of history collections divided by the number of oserver nodes
set NUM_BACKEND_PES=`echo "scale=1;($NUM_HIST_COLLECTIONS / $NUM_OSERVER_NODES)" | bc | awk 'function ceil(x, y){y=int(x); return(x>y?y+1:y)} {print ceil($1)}'`
set NUM_BACKEND_PES=`echo "scale=6;($NUM_HIST_COLLECTIONS / $NUM_OSERVER_NODES)" | bc | awk 'function ceil(x, y){y=int(x); return(x>y?y+1:y)} {print ceil($1)}'`

# multigroup requires at least two backend pes
if ($NUM_BACKEND_PES < 2) set NUM_BACKEND_PES = 2
Expand All @@ -1433,7 +1433,7 @@ if ( $DO_IOS == TRUE ) then

else
# Calculate the number of model nodes
set NODES=`echo "scale=1;($MODEL_NPES / $NCPUS_PER_NODE)" | bc | awk 'function ceil(x, y){y=int(x); return(x>y?y+1:y)} {print ceil($1)}'`
set NODES=`echo "scale=6;($MODEL_NPES / $NCPUS_PER_NODE)" | bc | awk 'function ceil(x, y){y=int(x); return(x>y?y+1:y)} {print ceil($1)}'`

set NUM_OSERVER_NODES = 0
set NUM_BACKEND_PES = 0
Expand Down
10 changes: 5 additions & 5 deletions gmichem_setup
Original file line number Diff line number Diff line change
Expand Up @@ -1541,10 +1541,10 @@ if ( $DO_IOS == TRUE ) then
# In the calculations below, the weird bc-awk command is to round up the floating point calcs

# First we calculate the number of model nodes
set NUM_MODEL_NODES=`echo "scale=1;($MODEL_NPES / $NCPUS_PER_NODE)" | bc | awk 'function ceil(x, y){y=int(x); return(x>y?y+1:y)} {print ceil($1)}'`
set NUM_MODEL_NODES=`echo "scale=6;($MODEL_NPES / $NCPUS_PER_NODE)" | bc | awk 'function ceil(x, y){y=int(x); return(x>y?y+1:y)} {print ceil($1)}'`

# Next the number of frontend PEs is 10% of the model PEs
set NUM_FRONTEND_PES=`echo "scale=1;($MODEL_NPES * 0.1)" | bc | awk 'function ceil(x, y){y=int(x); return(x>y?y+1:y)} {print ceil($1)}'`
set NUM_FRONTEND_PES=`echo "scale=6;($MODEL_NPES * 0.1)" | bc | awk 'function ceil(x, y){y=int(x); return(x>y?y+1:y)} {print ceil($1)}'`

# Now we roughly figure out the number of collections in the HISTORY.rc (this is not perfect, but is close to right)
set NUM_HIST_COLLECTIONS=`cat $TMPHIST | sed -n '/^COLLECTIONS:/,/^ *::$/{p;/^ *::$/q}' | grep -v '^ *#' | wc -l`
Expand All @@ -1553,10 +1553,10 @@ if ( $DO_IOS == TRUE ) then
@ NUM_OSERVER_PES=$NUM_FRONTEND_PES + $NUM_HIST_COLLECTIONS

# Now calculate the number of oserver nodes
set NUM_OSERVER_NODES=`echo "scale=1;($NUM_OSERVER_PES / $NCPUS_PER_NODE)" | bc | awk 'function ceil(x, y){y=int(x); return(x>y?y+1:y)} {print ceil($1)}'`
set NUM_OSERVER_NODES=`echo "scale=6;($NUM_OSERVER_PES / $NCPUS_PER_NODE)" | bc | awk 'function ceil(x, y){y=int(x); return(x>y?y+1:y)} {print ceil($1)}'`

# And then the number of backend PEs is the number of history collections divided by the number of oserver nodes
set NUM_BACKEND_PES=`echo "scale=1;($NUM_HIST_COLLECTIONS / $NUM_OSERVER_NODES)" | bc | awk 'function ceil(x, y){y=int(x); return(x>y?y+1:y)} {print ceil($1)}'`
set NUM_BACKEND_PES=`echo "scale=6;($NUM_HIST_COLLECTIONS / $NUM_OSERVER_NODES)" | bc | awk 'function ceil(x, y){y=int(x); return(x>y?y+1:y)} {print ceil($1)}'`

# multigroup requires at least two backend pes
if ($NUM_BACKEND_PES < 2) set NUM_BACKEND_PES = 2
Expand All @@ -1566,7 +1566,7 @@ if ( $DO_IOS == TRUE ) then

else
# Calculate the number of model nodes
set NODES=`echo "scale=1;($MODEL_NPES / $NCPUS_PER_NODE)" | bc | awk 'function ceil(x, y){y=int(x); return(x>y?y+1:y)} {print ceil($1)}'`
set NODES=`echo "scale=6;($MODEL_NPES / $NCPUS_PER_NODE)" | bc | awk 'function ceil(x, y){y=int(x); return(x>y?y+1:y)} {print ceil($1)}'`

set NUM_OSERVER_NODES = 0
set NUM_BACKEND_PES = 0
Expand Down
10 changes: 5 additions & 5 deletions stratchem_setup
Original file line number Diff line number Diff line change
Expand Up @@ -1393,10 +1393,10 @@ if ( $DO_IOS == TRUE ) then
# In the calculations below, the weird bc-awk command is to round up the floating point calcs

# First we calculate the number of model nodes
set NUM_MODEL_NODES=`echo "scale=1;($MODEL_NPES / $NCPUS_PER_NODE)" | bc | awk 'function ceil(x, y){y=int(x); return(x>y?y+1:y)} {print ceil($1)}'`
set NUM_MODEL_NODES=`echo "scale=6;($MODEL_NPES / $NCPUS_PER_NODE)" | bc | awk 'function ceil(x, y){y=int(x); return(x>y?y+1:y)} {print ceil($1)}'`

# Next the number of frontend PEs is 10% of the model PEs
set NUM_FRONTEND_PES=`echo "scale=1;($MODEL_NPES * 0.1)" | bc | awk 'function ceil(x, y){y=int(x); return(x>y?y+1:y)} {print ceil($1)}'`
set NUM_FRONTEND_PES=`echo "scale=6;($MODEL_NPES * 0.1)" | bc | awk 'function ceil(x, y){y=int(x); return(x>y?y+1:y)} {print ceil($1)}'`

# Now we roughly figure out the number of collections in the HISTORY.rc (this is not perfect, but is close to right)
set NUM_HIST_COLLECTIONS=`cat $TMPHIST | sed -n '/^COLLECTIONS:/,/^ *::$/{p;/^ *::$/q}' | grep -v '^ *#' | wc -l`
Expand All @@ -1405,10 +1405,10 @@ if ( $DO_IOS == TRUE ) then
@ NUM_OSERVER_PES=$NUM_FRONTEND_PES + $NUM_HIST_COLLECTIONS

# Now calculate the number of oserver nodes
set NUM_OSERVER_NODES=`echo "scale=1;($NUM_OSERVER_PES / $NCPUS_PER_NODE)" | bc | awk 'function ceil(x, y){y=int(x); return(x>y?y+1:y)} {print ceil($1)}'`
set NUM_OSERVER_NODES=`echo "scale=6;($NUM_OSERVER_PES / $NCPUS_PER_NODE)" | bc | awk 'function ceil(x, y){y=int(x); return(x>y?y+1:y)} {print ceil($1)}'`

# And then the number of backend PEs is the number of history collections divided by the number of oserver nodes
set NUM_BACKEND_PES=`echo "scale=1;($NUM_HIST_COLLECTIONS / $NUM_OSERVER_NODES)" | bc | awk 'function ceil(x, y){y=int(x); return(x>y?y+1:y)} {print ceil($1)}'`
set NUM_BACKEND_PES=`echo "scale=6;($NUM_HIST_COLLECTIONS / $NUM_OSERVER_NODES)" | bc | awk 'function ceil(x, y){y=int(x); return(x>y?y+1:y)} {print ceil($1)}'`

# multigroup requires at least two backend pes
if ($NUM_BACKEND_PES < 2) set NUM_BACKEND_PES = 2
Expand All @@ -1418,7 +1418,7 @@ if ( $DO_IOS == TRUE ) then

else
# Calculate the number of model nodes
set NODES=`echo "scale=1;($MODEL_NPES / $NCPUS_PER_NODE)" | bc | awk 'function ceil(x, y){y=int(x); return(x>y?y+1:y)} {print ceil($1)}'`
set NODES=`echo "scale=6;($MODEL_NPES / $NCPUS_PER_NODE)" | bc | awk 'function ceil(x, y){y=int(x); return(x>y?y+1:y)} {print ceil($1)}'`

set NUM_OSERVER_NODES = 0
set NUM_BACKEND_PES = 0
Expand Down

0 comments on commit b6111a5

Please sign in to comment.