wiki:addnewNR

Version 7 (modified by Mathieu Morlighem, 7 years ago) ( diff )

--

Introduction

ISSM relies on regression tests to check that no bug is introduced during code development. All the tests are located in $ISSM_DIR/test/test/NightlyRun and all the tests whose number are less than 1000 are run after each change pushed to the svn repository (through jenkins) and 4 times a day (through cron jobs).

If a new capability is being added to ISSM, it is critical that a new test is created.

These nightly runs are not meant to be realistic. They rely on very coarse meshes. We only want to check that the numerics has not changed, the results are obviously meaningless. Each test should take less than 10 seconds to run.

Files to change/create

You must create a new test file in test/NightlyRun. Make sure to be consistent with the series:

  • 100s: Square ice shelf constrained (no ice front)
  • 200s: Square ice shelf with ice front
  • 300s: Square grounded ice constrained (no ice front)
  • 400s: Square grounded ice with ice front (some floating ice)
  • 500s: Pine Island Glacier (West Antarctica)
  • 600s: 79 North (Greenland)
  • 700s: flow band models
  • 800s: valley glaciers

Create a testXXX.m file with the simulation test. The very first line should be a comment with the test name (which should be unique):

%Test Name: TEST_NAME_HERE

at the end of the file make sure to include field_names, field_tolerances and field_values the names (no space) of the fields you want to check for your test with the tolerances associated (because every computer is different).

Run the following command to create the archive (the archive gives the reference values for all the fields that are checked):

>> runme('id',XXX,'procedure','update')

This archive is located in $ISSM_DIR/test/test/archives in NetCDF format, and is the same for the Python test if you create one as well. Now if you run

>> runme('id',XXX)

you should see SUCCESS everywhere. If not, you have to adjust the tolerances slightly.

NB : do the same thing for testXXX.py without creating the archive this time.

Checking in the new test

You can svn add the new files (testXXX.m, testXXX.py and archiveXXX.nc) and svn commit –m "NEW: added test to check ...”.

Note: See TracWiki for help on using the wiki.