Instructions for taking a problem module and turning it into a test module
- Link and build your problem module.
- Modifying the data files to follow the format of those in Template
- Adjust the number of frames to 1 and the final time to be something small so that the run completes in under 1 or 2 minutes (optimized)
- make a ref directory parallel to the out directory and copy over chombo00001.hdf
- make a logs directory
- make an images directory
- Run bear2fix and select operations to make a nice image that can be used to verify the solution is 'correct'
- run ../../bear2fix/ps2png.pl out/pgout00001.ps
- mv out/pgout00001.png images/ref.png
- Now rerun the same code with a different number of processors and pipe the output to logs/testlog
- Rerun bear2fix in batch mode to produce another image for this run
- run ../../bear2fix/ps2png.pl out/pgout00001.ps
- mv out/pgout00001.png images/sim.png
- mv bear2fix.data bear2fix.data.img
- Run bear2fix and select operation 10
- mv bear2fix.data bear2fix.data.test
- mv out/chombo00001.hdf logs/sim.hdf
- cp max_errors.data to the ref directory and mv max_errors.data mean_errors.data and max_rel_errors.data to the logs directory
- add bear2fix.data.img and bear2fix.data.test to the mercurial repository (hg add bear2fix.data.img bear2fix.data.test)
- Now navigate back up to the code base directory and add your problem module to the list of problems defined near the top of /scrambler/buildproblem. Add it to the front of the list for faster debugging!
- Commit the new file additions and the modification of buildproblem to the repo.
- Now you will want to use svn to check out a new version of the test repo. svn co file:///cloverdata/repositories/tests ~/tests
- Create a directory for your problem module in the test repo parallel to Bondi, etc…
- Navigate into your newly created directory and move the logs, images, and ref directory from your code directory
- Now add your test problem directory to the svn repo using svn add MolecularCloudFormation (or whatever yours is called)
- Now we can commit those additions to the svn repo. svn ci -m 'added my problem module'
- Now you need to let the trac test macro know about the new module directory. So log on to clover and go to /data/tests and run svn update and then run trac-admin /data/trac/astrobear changeset added tests N where N is the revision number you just updated to.
- At this point you should be able to go to the test page on the wiki and see your sample test results https://clover.pas.rochester.edu/trac/astrobear/wiki/AstroBearTesting
- Now go back to your code directory and run buildproblem -np 8 -t to start the problem testing
- If this passes then you are all set to check in your mercurial repo! If not then seek help
- Don't forget to add your problem module to https://clover.pas.rochester.edu/trac/astrobear/wiki/TestSuite
- And then create a page for your module using the TestTemplate template
Download in other formats:
Comments
This is good until I get to step 27 where it appears I don't have the right permissions on clover to do this…Also, after committing changes to the tests repo in your home directory, don't you have to push that into the official tests repo on clover?