== Introduction == The following is a collection of tips for debugging various types of unexpected behavior when building and/or running ISSM. NOTE: 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. === Valgrind === Information on using Valgrind can be found on the ISSM Web site [https://issm.jpl.nasa.gov/documentation/faq/debugging/ "Debugging" page]. === Jenkins Jobs === When debugging a given Jenkins build, one way to eliminate variables is by feeding its corresponding configuration file into the Jenkins driver script on a local machine, {{{ cd $ISSM_DIR ./jenkins/jenkins.sh ./jenkins/ }}} as a bonus, you do not have to remember to run `source $ISSM_DIR/etc/environment.sh` after each external package installation. However, you might find yourself frequently removing more than one external package in the process of finding a combination that works well together. You can do so manually each time, but this is a waste of time. Instead, run, {{{ for i in {,,...,}; do rm -rf $ISSM_DIR/externalpackages/$i/install; done }}} where `` is the name of an external package that you wish to remove. === !BinRead.py === Sometimes 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. ==== Running Tests ==== Individual 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, {{{ runme('id',) }}} Python tests can be run from a Unixy command line by setting first setting the environment with, {{{ export PYTHONPATH="$ISSM_DIR/src/m/dev" export PYTHONSTARTUP="${PYTHONPATH}/devpath.py" export PYTHONUNBUFFERED=1 }}} then calling the Python test driver with options, {{{ ./runme.py -i }}} Various input and output files are generated for such runs, and are located in `execution/test--