[Mitgcm-support] Binary searching for changes in model output

mitgcm-support at dev.mitgcm.org mitgcm-support at dev.mitgcm.org
Wed Jul 9 15:34:40 EDT 2003


Patrick just called out this so I'll post it here for reference.

Here's a semi-automatic approach for finding out when/what
changes to the code made the output change. The various -d and -P
options are crucial for this to work so don't miss them out.

1. Create new working directory
   cvs co -d debug -P models/MITgcmUV

2. Compile and run the expt you are debugging
   pushd verification/exp2/input
   ../../../tools/genmake -mods=../code
   make depend
   make
   ./mitgcm | grep -i cg2d

3a. output incorrect? note date/time on paper with an X
3b. output correct? not date/time on paper with a tick

4. Choose a new date using a binary search algorithm.

5. Obtain code for that date
   popd
   cvs -q update -D "20 May 2001 12:00" -d -P

6. How many files were updates?
   many? goto 2.
   just a few? those are the culprits

Here's one I did for the shapiro/filter bug I fixed last week:
 Jul 11  7:00  /
 Jul 13  7:00  /
 Jul 13 14:00  /
 Jul 13 16:00  /
 Jul 13 17:00  X
 Jul 14 14:00  X
 Jul 18 14:00  X

Only two files change between 16:00 and 17:00 were the ones
and were the cause of the difference.



More information about the MITgcm-support mailing list