Changes between Initial Version and Version 1 of debugging_tips


Ignore:
Timestamp:
10/04/19 11:23:14 (5 years ago)
Author:
jdquinn
Comment:

Initial authoring

Legend:

Unmodified
Added
Removed
Modified
  • debugging_tips

    v1 v1  
     1== Introduction ==
     2The following is a collection of tips for debugging various types of unexpected behavior when building and/or running ISSM.
     3
     4NOTE: Some of this information may overlap with the public-facing [https://issm.jpl.nasa.gov ISSM Web site], and in some cases it may be best to simply host it there.
     5
     6
     7=== !BinRead.py ===
     8Sometimes you may observe results from ISSM that exceed a given tolerance, differ depending on operating system and/or configuration, or seem to be incorrect altogether. It may be helpful in such cases to use a script designed for marshaling human-readable model settings from binary ISSM input files.
     9
     10==== Running Tests ====
     11Individual regression tests (designed for our Jenkins testing suite, but available to all users through the SVN repo) and the drivers for them are located at `test/NightlyRun`. With this as the working directory, tests can be run from within MATLAB with,
     12{{{
     13runme('id',<test_num>)
     14}}}
     15Python tests can be run from a Unixy command line by setting first setting the environment with,
     16{{{
     17export PYTHONPATH="$ISSM_DIR/src/m/dev"
     18export PYTHONSTARTUP="${PYTHONPATH}/devpath.py"
     19export PYTHONUNBUFFERED=1
     20}}}
     21then calling the Python test driver with options,
     22{{{
     23./runme.py -i <test_no>
     24}}}
     25Various input and output files are generated for such runs, and are located in `execution/test<test_num>-<date>-<time>-<pid>/`.
     26
     27NOTE: It may be difficult to sort out which subdirectory of `execution/` corresponds to a given test run. As such, if you are doing multiple runs of the same test with the intention of comparing the results, it is recommended that you make note of the name of the new subdirectory.
     28
     29==== Marshalling Binary Input Files ====
     30Now that we have run one or more tests, we can inspect contents of the binary input file by running,
     31{{{
     32scripts/BinRead.py execution/test<test_num>-<date>-<time>-<pid>/test<test_num>.bin
     33}}}
     34
     35If we wish to compare the binary files for, say, MATLAB versus Python runs of the same test, we can redirect the output of `BinRead.py` to a text file, then run,
     36{{{
     37diff /path/to/BinRead_output_1 /path/to/BinRead_output_2
     38}}}