Instructions for taking a problem module and turning it into a test module

  1. Link and build your problem module.
  2. Modifying the data files to follow the format of those in Template
  3. 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)
  4. make a ref directory parallel to the out directory and copy over chombo00001.hdf
  5. make a logs directory
  6. make an images directory
  7. Run bear2fix and select operations to make a nice image that can be used to verify the solution is 'correct'
  8. run ../../bear2fix/ps2png.pl out/pgout00001.ps
  9. mv out/pgout00001.png images/ref.png
  10. Now rerun the same code with a different number of processors and pipe the output to logs/testlog
  11. Rerun bear2fix in batch mode to produce another image for this run
  12. run ../../bear2fix/ps2png.pl out/pgout00001.ps
  13. mv out/pgout00001.png images/sim.png
  14. mv bear2fix.data bear2fix.data.img
  15. Run bear2fix and select operation 10
  16. mv bear2fix.data bear2fix.data.test
  17. mv out/chombo00001.hdf logs/sim.hdf
  18. 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
  19. add bear2fix.data.img and bear2fix.data.test to the mercurial repository (hg add bear2fix.data.img bear2fix.data.test)
  20. 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!
  21. Commit the new file additions and the modification of buildproblem to the repo.
  22. Now you will want to use svn to check out a new version of the test repo. svn co file:///cloverdata/repositories/tests ~/tests
  23. Create a directory for your problem module in the test repo parallel to Bondi, etc…
  24. Navigate into your newly created directory and move the logs, images, and ref directory from your code directory
  25. Now add your test problem directory to the svn repo using svn add MolecularCloudFormation (or whatever yours is called)
  26. Now we can commit those additions to the svn repo. svn ci -m 'added my problem module'
  27. 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.
  28. 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
  29. Now go back to your code directory and run buildproblem -np 8 -t to start the problem testing
  30. If this passes then you are all set to check in your mercurial repo! If not then seek help
  31. Don't forget to add your problem module to https://clover.pas.rochester.edu/trac/astrobear/wiki/TestSuite
  32. And then create a page for your module using the TestTemplate template

Comments

1. ehansen -- 12 years ago

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?