Skip to content

Conversation

@xylar
Copy link
Collaborator

@xylar xylar commented May 5, 2019

A large number of updates to the COMPASS ocean API including:

NOTE: This merge removes the capability to create the global meshes used in E3SM version 1, (2017-2018), where the base meshes were created with Doug Jacobsen’s tool. The global mesh creation remaining after this commit only uses the Jigsaw tool.

In order to recreate meshes and initial conditions used in E3SM version 1, use repositories as of
March 1, 2019:

  1. MPAS-Model commit:42029f218175d893cf25e19a26d9b43382a44d54
  2. MPAS-Tools commit:6d0fa3a24e879a1a5b6149d9fbfe80fa021489dc
  3. geometric_features tag:E3SMv3grids 76709be

closes #220
closes #213
closes #132
closes #166

@xylar xylar requested a review from mark-petersen May 5, 2019 16:18
@xylar xylar changed the base branch from master to ocean/develop May 5, 2019 16:18
@xylar
Copy link
Collaborator Author

xylar commented May 5, 2019

Testing

I set up an environment on my linux laptop and on LANL IC as follows:

conda create -n compass_py3.7 -c conda-forge -c xylar python=3.7 geometric_features mpas_tools \
    jigsaw metis pyflann scikit-image basemap
conda activate compass_py3.7

Note: I have uploaded test versions of geometric_features and mpas_tools to the xylar anaconda channel. These will be deleted as soon as the packages are approved and available on conda-forge instead.

To activate this environment on LANL IC, run:

module unload python
source /usr/projects/climate/SHARED_CLIMATE/anaconda_envs/base/etc/profile.d/conda.sh
conda activate compass_py3.7

COMPASS ocean test cases that have been tested and found to run successfully in this environment:

  • 40: -o ocean -c baroclinic_channel -r 10km -t decomp_test
  • 41: -o ocean -c baroclinic_channel -r 10km -t default
  • 42: -o ocean -c baroclinic_channel -r 10km -t restart_test
  • 43: -o ocean -c baroclinic_channel -r 10km -t threads_test
  • 44: -o ocean -c global_ocean -r EC60to30 -t init
  • 45: -o ocean -c global_ocean -r EC60to30 -t spin_up
  • 46: -o ocean -c global_ocean -r NAEC60to30cr8 -t init
  • 47: -o ocean -c global_ocean -r NAEC60to30cr8 -t spin_up
  • 48: -o ocean -c global_ocean -r QU240 -t init
  • 49: -o ocean -c global_ocean -r QU240 -t test
  • 50: -o ocean -c global_ocean -r QU60 -t init
  • 51: -o ocean -c global_ocean -r QU60 -t spin_up
  • 52: -o ocean -c global_ocean -r SOQU60to15 -t init
  • 53: -o ocean -c global_ocean -r SOQU60to15 -t spin_up
  • 54: -o ocean -c global_ocean -r USDEQU120cr10rr1 -t init
  • 55: -o ocean -c global_ocean -r USDEQU300cr20rr3 -t init
  • 56: -o ocean -c internal_waves -r 5km -t default
  • 57: -o ocean -c internal_waves -r 5km -t ten-day
  • 58: -o ocean -c isomip -r 10km -t expt1.01
  • 59: -o ocean -c isomip -r 10km -t expt2.01
  • 60: -o ocean -c isomip_plus -r 2km -t Ocean0
  • 61: -o ocean -c isomip_plus -r 2km -t Ocean1
  • 62: -o ocean -c isomip_plus -r 2km -t Ocean2
  • 63: -o ocean -c isomip_plus -r 5km -t Ocean0
  • 64: -o ocean -c isomip_plus -r 5km -t Ocean1
  • 65: -o ocean -c isomip_plus -r 5km -t Ocean2
  • 66: -o ocean -c lock_exchange -r 0.5km -t default
  • 67: -o ocean -c lock_exchange -r 16km -t default
  • 68: -o ocean -c overflow -r 10km -t default
  • 69: -o ocean -c periodic_planar -r 20km -t default_light
  • 70: -o ocean -c periodic_planar -r 20km -t region_reset_light_test
  • 71: -o ocean -c periodic_planar -r 20km -t time_reset_light_test
  • 72: -o ocean -c sea_mount -r 6.7km -t default
  • 73: -o ocean -c single_column_model -r planar -t cvmix_test
  • 74: -o ocean -c single_column_model -r sphere -t cvmix_test
  • 75: -o ocean -c soma -r 16km -t 3layer
  • 76: -o ocean -c soma -r 16km -t default
  • 77: -o ocean -c soma -r 16km -t surface_restoring
  • 78: -o ocean -c soma -r 32km -t 3layer
  • 79: -o ocean -c soma -r 32km -t default
  • 80: -o ocean -c soma -r 32km -t surface_restoring
  • 81: -o ocean -c soma -r 32km -t time_varying_wind
  • 82: -o ocean -c soma -r 4km -t 32to4km
  • 83: -o ocean -c soma -r 4km -t 3layer
  • 84: -o ocean -c soma -r 4km -t default
  • 85: -o ocean -c soma -r 4km -t surface_restoring
  • 86: -o ocean -c soma -r 8km -t 32to8km
  • 87: -o ocean -c soma -r 8km -t 3layer
  • 88: -o ocean -c soma -r 8km -t default
  • 89: -o ocean -c soma -r 8km -t surface_restoring
  • 90: -o ocean -c sub_ice_shelf_2D -r 5km -t Haney_number_init
  • 91: -o ocean -c sub_ice_shelf_2D -r 5km -t Haney_number_iterative_init
  • 92: -o ocean -c sub_ice_shelf_2D -r 5km -t default
  • 93: -o ocean -c sub_ice_shelf_2D -r 5km -t iterative_init
  • 94: -o ocean -c sub_ice_shelf_2D -r 5km -t restart_test
  • 95: -o ocean -c sub_ice_shelf_2D -r 5km -t with_frazil
  • 96: -o ocean -c ziso -r 10km -t default
  • 97: -o ocean -c ziso -r 2.5km -t default
  • 98: -o ocean -c ziso -r 20km -t default
  • 99: -o ocean -c ziso -r 20km -t with_frazil
  • 100: -o ocean -c ziso -r 5km -t default

Tests in bold failed, see below.

@xylar
Copy link
Collaborator Author

xylar commented May 5, 2019

Building MPAS with python 3 will require updating to the latest releases of CVMix and Ocean-BGC after this PR is merged:
E3SM-Project/Ocean-BGC#1
and releases of CVMix and Ocean-BGC have been made with this fix included.

@xylar xylar changed the title Update COMPASS ocean API to use geometric_features and mpas_tools conda packages Update COMPASS ocean API for python 3 and using conda packages May 6, 2019
@xylar xylar force-pushed the ocean/update_compass_api_geom_feat_and_mesh_tools branch from d40f92e to bf422e1 Compare May 6, 2019 08:54
@xylar
Copy link
Collaborator Author

xylar commented May 6, 2019

Failed tests

The following is a list of tests that failed (but for reasons I believe are unrelated to this PR):

  • -o ocean -c global_ocean -r EC60to30 -t spin_up during simulation because of CFL violation:
CFLNumberGlobal = 0.0917271835580922, 0.122637831833784, 0.150533786272102, 
    0.17555059144412, 0.197662099329266, 0.217073518294376, 
    0.234323872726046, 0.250136386921142, 0.264790486294835, 
    0.27825253635325, 0.290323188086416, 0.301051958089178, 
    0.310209832190098, 0.3176288821503, 0.32330034866235, 0.328730874921286, 
    0.340932315339754, 0.39929006348568, 0.818147632488227, 1.93089241771095, 
    3.78167130632891, 9.49790843196592, 0.358590340863955
  • -o ocean -c global_ocean -r NAEC60to30cr8 -t spin_up: the final (test_final_settings) phase seems to be misconfigured in various ways. Links to restart and Restart_timestamp are missing. timeSeriesStatsMonthly is enabled but there isn't a corresponding stream. It attempts to change to monthly restarts but the last restart is at 0001-01-07, which isn't an allowable combination in MPAS. In short, problems abound...
  • -o ocean -c global_ocean -r QU60 -t spin_up during simulation for unknown reasons during the first time step
  • -o ocean -c soma -r 4km -t 32to4km and -r 8km -t 32to8km because of missing MpasMeshGenerator.sh, see SOMA 32to8km and 32to4km test cases are broken #233
  • -o ocean -c ziso -r 2.5km -t default runs out of memory during forward run:
Insufficient memory to allocate Fortran RTL message buffer, message #41 = hex 00000029.
Insufficient memory to allocate Fortran RTL message buffer, message #41 = hex 00000029.
Insufficient memory to allocate Fortran RTL message buffer, message #41 = hex 00000029.
slurmstepd: error: Detected 1 oom-kill event(s) in step 16129387.2 cgroup. Some of your processes may have been killed by the cgroup out-of-memory handler.
srun: error: gr0510: tasks 0-2: Out Of Memory

@xylar
Copy link
Collaborator Author

xylar commented May 6, 2019

@caozd999, could you change permissions on the 2 files above that you own (in /usr/projects/regionalclimate/COMMON_MPAS/ocean/grids/mesh_database on LANL IC) so I can read them? Probably, they should belong to the climate group. Check also for other files there than you own.

@xylar xylar force-pushed the ocean/update_compass_api_geom_feat_and_mesh_tools branch from bf422e1 to 1e01db5 Compare May 6, 2019 13:59
@caozd999
Copy link

caozd999 commented May 6, 2019 via email

@xylar
Copy link
Collaborator Author

xylar commented May 6, 2019

@caozd999, the 2.5 km ZISO test case now runs but crashes with a memory issue. I think it's just running on too few nodes/processors. Would you be able to update the default settings for that test case so it runs without running out of memory? Or is that something for @pwolfram?

@caozd999
Copy link

caozd999 commented May 6, 2019 via email

@xylar xylar marked this pull request as ready for review May 6, 2019 17:04
@xylar xylar force-pushed the ocean/update_compass_api_geom_feat_and_mesh_tools branch 2 times, most recently from 84e2afa to ed9992c Compare May 7, 2019 09:56
@xylar
Copy link
Collaborator Author

xylar commented May 7, 2019

@pwolfram, I tried increasing the ziso 2.5 km run to 144 cores (4 nodes) on Grizzly and I'm still running out of memory. Is it seeding particles in proportion to the number of cores so that adding more cores doesn't solve the memory problem?

In any case, I'm going to make a separate issue for this since it's not related to this PR.

@xylar
Copy link
Collaborator Author

xylar commented May 7, 2019

I have now either successfully tested all test cases (55/61) or with this branch or created issues (#233, #234 and #235) to get issues that I think are unrelated to this PR addressed (6/61). I believe this branch is now ready for @mark-petersen to test and merge when ready.

@mark-petersen
Copy link
Contributor

@kristin-hoch and I tested together yesterday. We use the compass_py3.7 package and this PR and successfully ran QU240 init and QU240 test on grizzly and badger, compute node and front end node (except mpirun calls). This is great!

We will add and test the nightly regression suite this morning.

@mark-petersen
Copy link
Contributor

@xylar, @pwolfram @sbrus89 , I'd like to proceed with merge and test of several PRs. The proposed order is:

  1. Adds LIGHT modes and capabilities (passive floats, improved sampling) #56 LIGHT update
  2. Update sub-ice-shelf melt to remove coupled flag #164 small- ice shelf melt flag
  3. merge coastal branch
  4. rebase this one Update COMPASS ocean API for python 3 and using conda packages #229 and merge
  5. rebase CONUS mesh update #201 CONUS mesh update

(4) and (5) will have minor conflicts. Is this OK with you both? I will ask you to rebase later today.
I commented on the MPAS-Tools PR previously. Sorry for the confusion.

@xylar
Copy link
Collaborator Author

xylar commented May 8, 2019

@mark-petersen,

#56, #201 and ocean/coastal are all going to break python 3 support in this PR so I think they all need to be merged first, but the result is going to be another day or 2 of work for me here to add python 3 support to the scripts that are added by those and to fix outdated jigsaw calls and such. Regardless, it would be better to do this sooner rather than later.

#164 is completely independent of this work, so that one is fine.

@mark-petersen
Copy link
Contributor

Agreed. We will switch (4) and (5).

@xylar xylar force-pushed the ocean/update_compass_api_geom_feat_and_mesh_tools branch from 04be2b6 to de0becf Compare May 9, 2019 14:48
@xylar
Copy link
Collaborator Author

xylar commented May 9, 2019

Okay, it's rebased. Please do some last tests and merge when ready.

@xylar xylar removed the Don't merge label May 10, 2019
@mark-petersen mark-petersen merged commit de0becf into MPAS-Dev:ocean/develop May 10, 2019
mark-petersen added a commit that referenced this pull request May 10, 2019
…s' into ocean/develop

A large number of updates to the COMPASS ocean API including:

- using the geometric_features conda package
  (MPAS-Dev/geometric_features#102)
- using the mpas_tools conda package (MPAS-Dev/MPAS-Tools#248)
- updating the jigsaw_to_MPAS scripts to work as a python package and to
  support python 3
- update global_ocean scripts to python 3 and to use these new packages

NOTE: This merge removes the capability to create the global meshes used
in E3SM version 1, (2017-2018), where the base meshes were created with
Doug Jacobsen’s tool.  The global mesh creation remaining after this
commit only uses the Jigsaw tool.

In order to recreate meshes and initial conditions used in E3SM version
1, use repositories as of
March 1, 2019:
1. MPAS-Model commit:42029f218175d893cf25e19a26d9b43382a44d54
2. MPAS-Tools commit:6d0fa3a24e879a1a5b6149d9fbfe80fa021489dc
3. geometric_features tag:E3SMv3grids 76709be

closes #220
closes #213
closes #132
closes #166
@mark-petersen
Copy link
Contributor

@xylar thanks for your tremendous effort. This is a big accomplishment.

I tested the merged commit, all is OK. Will now make E3SM PR and then update nightly test suite.

@xylar xylar deleted the ocean/update_compass_api_geom_feat_and_mesh_tools branch May 10, 2019 15:22
@xylar
Copy link
Collaborator Author

xylar commented May 10, 2019

Thanks very much for shepherding this through, @mark-petersen!

mark-petersen added a commit to E3SM-Project/E3SM that referenced this pull request May 22, 2019
Includes:

1. LIGHT update (MPAS-Ocean Lagrangian particles): MPAS-Dev/MPAS-Model#56
2. clean up ice shelf melt flag: MPAS-Dev/MPAS-Model#164
3. merge coastal branch: MPAS-Dev/MPAS-Model#54
4. CONUS mesh update: MPAS-Dev/MPAS-Model#201
5. Major COMPASS upgrade to python 3: MPAS-Dev/MPAS-Model#229
6. Eliminate outdated -DUNDERSCORE flag: MPAS-Dev/MPAS-Model#156
7. PIO Version Compatibility Check - PGI Compiler Bug Fix: MPAS-Dev/MPAS-Model#212

These changes do not alter E3SM standard cases or testing on next. COMPASS is
the MPAS testing infrastructure. LIGHT and coastal changes are protected by
flags and not used in normal E3SM tests.
jonbob added a commit to E3SM-Project/E3SM that referenced this pull request May 22, 2019
Update mpas source

This PR update the mpas-source git submodule but only includes changes that
will not impact E3SM. These changes include:
* LIGHT update (MPAS-Ocean Lagrangian particles): MPAS-Dev/MPAS-Model#56
* clean up ice shelf melt flag: MPAS-Dev/MPAS-Model#164
* merge coastal branch: MPAS-Dev/MPAS-Model#54
* CONUS mesh update: MPAS-Dev/MPAS-Model#201
* Major COMPASS upgrade to python 3: MPAS-Dev/MPAS-Model#229
* Eliminate outdated -DUNDERSCORE flag: MPAS-Dev/MPAS-Model#156
* PIO Version Compatibility Check - PGI Compiler Bug Fix: MPAS-Dev/MPAS-Model#212

These changes do not alter E3SM standard cases or tested configurations.
COMPASS is the MPAS testing infrastructure. LIGHT and coastal changes
are protected by flags and not used in normal E3SM tests.

[NML]
[BFB]
jonbob added a commit to E3SM-Project/E3SM that referenced this pull request May 23, 2019
Update mpas source

This PR update the mpas-source git submodule but only includes changes that
will not impact E3SM. These changes include:
* LIGHT update (MPAS-Ocean Lagrangian particles): MPAS-Dev/MPAS-Model#56
* clean up ice shelf melt flag: MPAS-Dev/MPAS-Model#164
* merge coastal branch: MPAS-Dev/MPAS-Model#54
* CONUS mesh update: MPAS-Dev/MPAS-Model#201
* Major COMPASS upgrade to python 3: MPAS-Dev/MPAS-Model#229
* Eliminate outdated -DUNDERSCORE flag: MPAS-Dev/MPAS-Model#156
* PIO Version Compatibility Check - PGI Compiler Bug Fix: MPAS-Dev/MPAS-Model#212

These changes do not alter E3SM standard cases or tested configurations.
COMPASS is the MPAS testing infrastructure. LIGHT and coastal changes
are protected by flags and not used in normal E3SM tests.

[NML]
[BFB]
ashwathsv pushed a commit to ashwathsv/MPAS-Model that referenced this pull request Jul 21, 2020
…esh_tools' into ocean/develop

A large number of updates to the COMPASS ocean API including:

- using the geometric_features conda package
  (MPAS-Dev/geometric_features#102)
- using the mpas_tools conda package (MPAS-Dev/MPAS-Tools#248)
- updating the jigsaw_to_MPAS scripts to work as a python package and to
  support python 3
- update global_ocean scripts to python 3 and to use these new packages

NOTE: This merge removes the capability to create the global meshes used
in E3SM version 1, (2017-2018), where the base meshes were created with
Doug Jacobsen’s tool.  The global mesh creation remaining after this
commit only uses the Jigsaw tool.

In order to recreate meshes and initial conditions used in E3SM version
1, use repositories as of
March 1, 2019:
1. MPAS-Model commit:42029f218175d893cf25e19a26d9b43382a44d54
2. MPAS-Tools commit:6d0fa3a24e879a1a5b6149d9fbfe80fa021489dc
3. geometric_features tag:E3SMv3grids 76709be

closes MPAS-Dev#220
closes MPAS-Dev#213
closes MPAS-Dev#132
closes MPAS-Dev#166
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants