Skip to content

Commit b6747cd

Browse files
authored
Merge pull request #210 from bertinia/master
updates to support cheyenne upgrade
2 parents d874a06 + d3924af commit b6747cd

File tree

17 files changed

+576
-24
lines changed

17 files changed

+576
-24
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,15 @@ ilamb/ilamb
1414
reshaper/pyReshaper
1515
conformer/conformer
1616
mpi_utils/pyTools
17+
ocean_remap/ocean_remap
1718

1819
# Ignore python build and dist dirs
1920
cesm_utils/dist/
2021
conform/dist/
2122
diag_utils/dist/
2223
diagnostics/dist/
2324
timeseries/dist/
25+
ocean_remap/dist/
2426

2527
# Ignore cesm-env2
2628
cesm-env2/

Externals.cfg

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,13 @@ repo_url = https://bitbucket.org/ncollier/ilamb
3333
local_path = ilamb/ilamb
3434
required = True
3535

36+
[ocean_remap]
37+
tag = master
38+
protocol = git
39+
repo_url = https://github.com/bertinia/ocean_remap
40+
local_path = ocean_remap/ocean_remap
41+
required = True
42+
3643
[externals_description]
3744
schema_version = 1.0.0
3845

Machines/cheyenne_modules

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,19 @@
22

33
echo "Python boot-strap modules for machine cheyenne"
44

5-
module load python/2.7.14
6-
module load intel/17.0.1
5+
module load python/2.7.16
6+
##module load intel/17.0.1
7+
module load gnu/8.3.0
78
module load ncarenv
89
module load ncarcompilers
910
module load mpt/2.19
10-
module load netcdf/4.6.1
11-
module load nco/4.7.4
12-
module load ncl/6.4.0
11+
module load netcdf/4.6.3
12+
module load nco/4.7.9
13+
module load ncl/6.6.2
1314

1415
# clone the ncat virtualenv first with helper script ncar_pylib
1516
# use "ncar_pylib --help" to see all options
16-
ncar_pylib -c 20181024 ${pp_dir}/cesm-env2
17+
ncar_pylib -c 20190627 ${pp_dir}/cesm-env2
1718

1819
export PYTHONPATH=${pp_dir}/cesm-env2/lib/python2.7/site-packages
1920

Machines/dav_modules

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@
22

33
echo "Python boot-strap modules for NCAR DAV"
44

5-
module load python/2.7.14
5+
module load python/2.7.15
66
module load intel/17.0.1
77
module load ncarenv
88
module load ncarcompilers
99
module load impi
1010
module load netcdf/4.6.1
1111
module load nco/4.7.4
12-
module load ncl/6.4.0
12+
module load ncl/6.6.2
1313

1414
# clone the ncat virtualenv first with helper script ncar_pylib
1515
# use "ncar_pylib --help" to see all options
16-
ncar_pylib -c 20181029 ${pp_dir}/cesm-env2
16+
ncar_pylib -c 20190326 ${pp_dir}/cesm-env2
1717

1818
export PYTHONPATH=${pp_dir}/cesm-env2/lib/python2.7/site-packages
1919

Machines/machine_postprocess.xml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
<machine name="dav" hostname="dav,geyser,caldera,pronghorn,casper">
66
<timeseries_pes nodes="4" pes_per_node="16" wallclock="04:00:00" memory="100G">64</timeseries_pes>
77
<xconform_pes nodes="4" pes_per_node="16" wallclock="06:00:00" memory="100G">64</xconform_pes>
8+
<ocn_remap_pes nodes="4" pes_per_node="9" wallclock="08:00:00" memory="100G">32</ocn_remap_pes>
89
<mpi_command>srun</mpi_command>
910
<pythonpath></pythonpath>
1011
<f2py fcompiler="intelem" f77exec="/glade/apps/opt/modulefiles/ys/cmpwrappers/ifort">f2py</f2py>
@@ -24,7 +25,7 @@
2425
<module>module load impi</module>
2526
<module>module load netcdf/4.6.1</module>
2627
<module>module load nco/4.7.4</module>
27-
<module>module load ncl/6.4.0</module>
28+
<module>module load ncl/6.6.2</module>
2829
</modules>
2930
<components>
3031
<component name="atm">
@@ -126,26 +127,27 @@
126127
<machine name="cheyenne" hostname="cheyenne">
127128
<timeseries_pes queue="regular" nodes="16" pes_per_node="9" wallclock="12:00:00">144</timeseries_pes>
128129
<xconform_pes queue="regular" nodes="16" pes_per_node="4" wallclock="12:00:00">64</xconform_pes>
130+
<ocn_remap_pes queue="regular" nodes="4" pes_per_node="9" wallclock="08:00:00">32</ocn_remap_pes>
129131
<mpi_command>mpiexec_mpt dplace -s 1</mpi_command>
130132
<pythonpath></pythonpath>
131133
<f2py fcompiler="intelem" f77exec="/glade/u/apps/ch/opt/ncarcompilers/0.4.1/mpi/ifort">f2py</f2py>
132134
<za>
133-
<compiler>ifort</compiler>
135+
<compiler>gfortran</compiler>
134136
<flags>-c -g -O2</flags>
135-
<include>-I/glade/u/apps/ch/opt/netcdf/4.6.1/intel/17.0.1/include</include>
136-
<libs>-L/glade/u/apps/ch/opt/netcdf/4.6.1/intel/17.0.1/lib -lnetcdff -lnetcdf</libs>
137+
<include>-I/glade/u/apps/ch/opt/netcdf/4.6.3/gnu/8.3.0/include</include>
138+
<libs>-L/glade/u/apps/ch/opt/netcdf/4.6.3/gnu/8.3.0/lib -lnetcdff -lnetcdf</libs>
137139
</za>
138140
<reset_modules>
139141
<module>module purge</module>
140142
</reset_modules>
141143
<modules>
142-
<module>module load intel/17.0.1</module>
144+
<module>module load gnu/8.3.0</module>
143145
<module>module load ncarenv</module>
144146
<module>module load ncarcompilers</module>
145147
<module>module load mpt/2.19</module>
146-
<module>module load netcdf/4.6.1</module>
147-
<module>module load nco/4.7.4</module>
148-
<module>module load ncl/6.4.0</module>
148+
<module>module load netcdf/4.6.3</module>
149+
<module>module load nco/4.7.9</module>
150+
<module>module load ncl/6.6.2</module>
149151
</modules>
150152
<components>
151153
<component name="atm">

Machines/machine_postprocess.xsd

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,34 @@
3838
</xs:complexType>
3939
</xs:element>
4040

41+
<xs:element name="xconform_pes">
42+
<xs:complexType>
43+
<xs:simpleContent>
44+
<xs:extension base="xs:string">
45+
<xs:attribute name="queue" use="optional"/>
46+
<xs:attribute name="nodes" use="optional"/>
47+
<xs:attribute name="pes_per_node" use="optional"/>
48+
<xs:attribute name="wallclock" use="required"/>
49+
<xs:attribute name="memory" use="optional"/>
50+
</xs:extension>
51+
</xs:simpleContent>
52+
</xs:complexType>
53+
</xs:element>
54+
55+
<xs:element name="ocn_remap_pes">
56+
<xs:complexType>
57+
<xs:simpleContent>
58+
<xs:extension base="xs:string">
59+
<xs:attribute name="queue" use="optional"/>
60+
<xs:attribute name="nodes" use="optional"/>
61+
<xs:attribute name="pes_per_node" use="optional"/>
62+
<xs:attribute name="wallclock" use="required"/>
63+
<xs:attribute name="memory" use="optional"/>
64+
</xs:extension>
65+
</xs:simpleContent>
66+
</xs:complexType>
67+
</xs:element>
68+
4169
<xs:element name="averages_pes">
4270
<xs:complexType>
4371
<xs:simpleContent>
@@ -158,6 +186,8 @@
158186
<xs:complexType>
159187
<xs:sequence>
160188
<xs:element ref="timeseries_pes" minOccurs="0" maxOccurs="1"/>
189+
<xs:element ref="xconform_pes" minOccurs="0" maxOccurs="1"/>
190+
<xs:element ref="ocn_remap_pes" minOccurs="0" maxOccurs="1"/>
161191
<xs:element ref="mpi_command" minOccurs="0" maxOccurs="1"/>
162192
<xs:element ref="pythonpath" minOccurs="0" maxOccurs="1"/>
163193
<xs:element ref="f2py" minOccurs="0" maxOccurs="1"/>

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ SUBDIRS = \
2727
conformer \
2828
conform \
2929
ilamb \
30-
diagnostics
30+
diagnostics \
31+
ocean_remap
3132

3233
# MAKECMDGOALS is the make option: make 'clobber' or 'all'
3334
TARGET = $(MAKECMDGOALS)

Tools/copy_html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,10 @@ def read_paths(env, comp_data):
261261
env[values[-2]].append(values[-1])
262262
else:
263263
env[values[-2]] = []
264+
265+
if 'OCNDIAG_WEBDIR' not in env:
266+
env['OCNDIAG_WEBDIR'] = list()
267+
264268
return env
265269

266270

Tools/ration_script

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ pwd
2323
. activate
2424

2525
## load the boot-strap modules
26-
##module load python/2.7.14
27-
module load intel/17.0.1
26+
module load gnu/8.3.0
2827
module load ncarenv
2928
module load ncarcompilers
3029
module load mpt/2.19

cesm_utils/cesm_utils/create_postprocess

Lines changed: 70 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,8 @@ def read_machine_xml(machineName, xmlFile):
280280
if machineName.lower() == xmlmachine.get('name').lower():
281281

282282
found = True
283-
# get the timeseries pes first
283+
284+
# get the timeseries pes
284285
tseries_pes = xmlmachine.find('timeseries_pes')
285286
machine['timeseries_pes'] = tseries_pes.text
286287
machine['timeseries_queue'] = ''
@@ -295,7 +296,6 @@ def read_machine_xml(machineName, xmlFile):
295296
if 'memory' in tseries_pes.attrib:
296297
machine['timeseries_memory'] = tseries_pes.get('memory')
297298

298-
299299
# get the conform pes
300300
xconform_pes = xmlmachine.find('xconform_pes')
301301
machine['xconform_pes'] = xconform_pes.text
@@ -311,6 +311,21 @@ def read_machine_xml(machineName, xmlFile):
311311
if 'memory' in xconform_pes.attrib:
312312
machine['conform_memory'] = xconform_pes.get('memory')
313313

314+
# get the ocn_remap pes
315+
ocn_remap_pes = xmlmachine.find('ocn_remap_pes')
316+
machine['ocn_remap_pes'] = ocn_remap_pes.text
317+
machine['ocn_remap_queue'] = ''
318+
if 'queue' in ocn_remap_pes.attrib:
319+
machine['ocn_remap_queue'] = ocn_remap_pes.get('queue').lower()
320+
machine['ocn_remap_ppn'] = ocn_remap_pes.get('pes_per_node').lower()
321+
machine['ocn_remap_wallclock'] = ocn_remap_pes.get('wallclock').lower()
322+
machine['ocn_remap_nodes'] = ''
323+
if 'nodes' in ocn_remap_pes.attrib:
324+
machine['ocn_remap_nodes'] = ocn_remap_pes.get('nodes').lower()
325+
machine['ocn_remap_memory'] = ''
326+
if 'memory' in ocn_remap_pes.attrib:
327+
machine['ocn_remap_memory'] = ocn_remap_pes.get('memory')
328+
314329
# get the mpi run command
315330
machine['mpi_command'] = xmlmachine.find('mpi_command').text
316331

@@ -685,6 +700,13 @@ def main(options):
685700
create_env_file(envDict=envDict, configFile=config_file, tmplFile=tmpl_file,
686701
envFile=env_file, obs_root='', comp='', standalone=standalone)
687702

703+
# generate the env_ocn_remap.xml file
704+
config_file = '{0}/diagnostics/diagnostics/ocn/Config/config_ocn_remap.xml'.format(envDict['POSTPROCESS_PATH'])
705+
env_file = '{0}/env_ocn_remap.xml'.format(envDict['PP_CASE_PATH'])
706+
tmpl_file = 'env_postprocess.tmpl'
707+
create_env_file(envDict=envDict, configFile=config_file, tmplFile=tmpl_file,
708+
envFile=env_file, obs_root='', comp='', standalone=standalone)
709+
688710
# generate the env_diags_[component].xml files
689711
for comp in itertools.chain(compList, imbList):
690712
dir_name = comp
@@ -769,6 +791,30 @@ def main(options):
769791
memory=machine['conform_memory'],
770792
options=options, standalone=standalone)
771793

794+
# generate the ocn_remap batch submit script from template files
795+
postProcessCmd = 'ocn_remap_generator.py'
796+
processName = 'ocn_remap'
797+
outFile = '{0}/{1}'.format(envDict['PP_CASE_PATH'],processName)
798+
ocn_remap_tmpl = 'postprocess.tmpl'
799+
create_batch(ppDir=envDict['POSTPROCESS_PATH'],
800+
pes=machine['ocn_remap_pes'],
801+
batchTmpl=batch_tmpl, runTmpl=ocn_remap_tmpl,
802+
postProcessCmd=postProcessCmd,
803+
mpiCmd=machine['mpi_command'], outFile=outFile,
804+
processName=processName,
805+
project=envDict['PROJECT'],
806+
pythonpath=machine['pythonpath'],
807+
caseRoot=envDict['PP_CASE_PATH'],
808+
reset_modules=machine['reset_modules'],
809+
modules=machine['modules'],
810+
queue=machine['ocn_remap_queue'],
811+
ppn=machine['ocn_remap_ppn'],
812+
nodes=machine['ocn_remap_nodes'],
813+
wallclock=machine['ocn_remap_wallclock'],
814+
memory=machine['ocn_remap_memory'],
815+
options=options, standalone=standalone)
816+
817+
772818
# generate the diagnostics batch submit scripts from template files
773819
for comp in compList:
774820
# generate the averages batch submit script
@@ -980,6 +1026,28 @@ def main(options):
9801026
memory=machine['conform_memory'],
9811027
options=options, standalone=standalone)
9821028

1029+
# generate the ocn_remap batch submit script from template files
1030+
postProcessCmd = 'ocn_remap_generator.py'
1031+
processName = 'ocn_remap_dav'
1032+
outFile = '{0}/{1}'.format(envDict['PP_CASE_PATH'],processName)
1033+
create_batch(ppDir=pp_dav,
1034+
pes=machine['ocn_remap_pes'],
1035+
batchTmpl=batch_tmpl, runTmpl=run_tmpl,
1036+
postProcessCmd=postProcessCmd,
1037+
mpiCmd=machine['mpi_command'], outFile=outFile,
1038+
processName=processName,
1039+
project=envDict['PROJECT'],
1040+
pythonpath=machine['pythonpath'],
1041+
caseRoot=envDict['PP_CASE_PATH'],
1042+
reset_modules=machine['reset_modules'],
1043+
modules=machine['modules'],
1044+
queue=machine['ocn_remap_queue'],
1045+
ppn=machine['ocn_remap_ppn'],
1046+
nodes=machine['ocn_remap_nodes'],
1047+
wallclock=machine['ocn_remap_wallclock'],
1048+
memory=machine['ocn_remap_memory'],
1049+
options=options, standalone=standalone)
1050+
9831051
# generate the diagnostics batch submit scripts from template files
9841052
for comp in compList:
9851053
# generate the averages batch submit script

0 commit comments

Comments
 (0)