... | @@ -5,10 +5,10 @@ Reliability in the face of complexity is the real challenge of software developm |
... | @@ -5,10 +5,10 @@ Reliability in the face of complexity is the real challenge of software developm |
|
----
|
|
----
|
|
|
|
|
|
|
|
|
|
# Download and explode the test cases
|
|
## Download and explode the test cases
|
|
|
|
|
|
The input files are in the directories below tsuite in the distribution.
|
|
The input files are in the directories below tsuite in the distribution.
|
|
The output is in [ftp://gradj.pa.uky.edu/gary/cloudy_gold/tsuite_output/ this] ftp directory.
|
|
The output is in [this]( ftp)http://data.nublado.org/cloudy_releases/) directory.
|
|
|
|
|
|
There are four directories below tsuite in the distribution.
|
|
There are four directories below tsuite in the distribution.
|
|
These contain different types of tests.
|
|
These contain different types of tests.
|
... | @@ -16,20 +16,20 @@ Those in the *auto* directory are run every night in Lexington. |
... | @@ -16,20 +16,20 @@ Those in the *auto* directory are run every night in Lexington. |
|
These are a large number of simulations that test some aspect of the physics.
|
|
These are a large number of simulations that test some aspect of the physics.
|
|
The tests in the *slow* directory take about three days and are continuously running on machines here.
|
|
The tests in the *slow* directory take about three days and are continuously running on machines here.
|
|
The directories under *programs* contain programs that call Cloudy as a subroutine.
|
|
The directories under *programs* contain programs that call Cloudy as a subroutine.
|
|
Finally the *crash* directory contains a series of tests which should cause the code to
|
|
Finally, the *crash* directory contains a series of tests that should cause the code to
|
|
crash if it has been compiled correctly.
|
|
crash if it has been compiled correctly.
|
|
|
|
|
|
Each directory contains several perl scripts and html files.
|
|
Each directory contains several Perl scripts and html files.
|
|
The *readme_*.htm* files describe the contents of each directory.
|
|
The *readme_*.htm* files describe the contents of each directory.
|
|
The file *doc_tsuite.htm* documents the purpose of each of the tests.
|
|
The file *doc_tsuite.htm* documents the purpose of each of the tests.
|
|
It could be studied to see how to set up the code.
|
|
It could be studied to see how to set up the code.
|
|
|
|
|
|
The tests should not be placed in a directory which contained an older version until the old version is first deleted. The names of the test cases change from time to time and placing the current version of the suite on top of an old one will not overwrite all the old ones. This will cause problems when the test suite is run. Either start with a new directory or first delete the contents of the directory.
|
|
The tests should not be placed in a directory that contained an older version until the old version is first deleted. The names of the test cases change from time to time and placing the current version of the suite on top of an old one will not overwrite all the old ones. This will cause problems when the test suite is run. Either start with a new directory or first delete the contents of the directory.
|
|
|
|
|
|
-----
|
|
-----
|
|
|
|
|
|
|
|
|
|
# Running the test cases
|
|
## Running the test cases
|
|
|
|
|
|
The test suite includes a Perl script to run all the test cases and then check for problems. It is called *run_parallel.pl*. It will use multiple cores to run several test suite cases in parallel, thus considerably reducing the amount of wallclock time needed to run the test suite. The syntax is:
|
|
The test suite includes a Perl script to run all the test cases and then check for problems. It is called *run_parallel.pl*. It will use multiple cores to run several test suite cases in parallel, thus considerably reducing the amount of wallclock time needed to run the test suite. The syntax is:
|
|
|
|
|
... | @@ -37,9 +37,9 @@ The test suite includes a Perl script to run all the test cases and then check f |
... | @@ -37,9 +37,9 @@ The test suite includes a Perl script to run all the test cases and then check f |
|
|
|
|
|
`run_parallel.pl [ <sub-dir> ] [ <#cpu> ] [ <list of input scripts> ] (C17 and later)`
|
|
`run_parallel.pl [ <sub-dir> ] [ <#cpu> ] [ <list of input scripts> ] (C17 and later)`
|
|
|
|
|
|
By default, *run_parallel.pl* will assume that the Cloudy executable was built in the source directory, use all available cores on your system (provided it can determine that number -- this should work on most systems) and run all the scripts in the test suite. If you built Cloudy in one of the subdirectories, you should add the directory name as a first parameter. If you want to use less cores, or the number was determined incorrectly, simply add the number of cores that should be used as a second parameter. Some typical examples are:
|
|
By default, *run_parallel.pl* will assume that the Cloudy executable was built in the source directory, use all available cores on your system (provided it can determine that number -- this should work on most systems) and run all the scripts in the test suite. If you built Cloudy in one of the subdirectories, you should add the directory name as a first parameter. If you want to use fewer cores, or the number was determined incorrectly, simply add the number of cores that should be used as a second parameter. Some typical examples are:
|
|
|
|
|
|
*run_parallel.pl* (cloudy.exe in source directory, use all available cores)
|
|
*run_parallel.pl* (cloudy.exe in the source directory, use all available cores)
|
|
|
|
|
|
*run_parallel.pl sys_icc 3* (cloudy.exe in sys_icc directory, use 3 cores)
|
|
*run_parallel.pl sys_icc 3* (cloudy.exe in sys_icc directory, use 3 cores)
|
|
|
|
|
... | @@ -54,9 +54,9 @@ Since C17 you can run only a subset of all the available scripts, e.g. like this |
... | @@ -54,9 +54,9 @@ Since C17 you can run only a subset of all the available scripts, e.g. like this |
|
|
|
|
|
*run_parallel.pl . 8 blr*.in*
|
|
*run_parallel.pl . 8 blr*.in*
|
|
|
|
|
|
You can use all shell wildcard characters here. This example will only run input scripts starting with *blr*. Note that in this case it is mandatory to supply the directory and the number of cores, even if you want those at the default values.
|
|
You can use all shell wildcard characters here. This example will only run input scripts starting with *blr*. Note that in this case, it is mandatory to supply the directory and the number of cores, even if you want those at the default values.
|
|
|
|
|
|
*_BEWARE: The run_parallel.pl script will clean out the test suite*_ (i.e., it calls *clean_tsuite.pl*) before running the test suite to remove any files from a previous run. Make sure that you saved any relevant output from a previous run of the test suite before executing *run_parallel.pl*! Don't put any of your own files in the test suite directories, create a separate directory for that. Alternatively, since C17 you can use the script *rerun_parallel.pl* which works exactly as shown above, except that it does not call *clean_tsuite.pl*. This is especially useful if you want to rerun a specific subset of the input scripts, but want to keep the output of the other scripts.
|
|
*BEWARE: The run_parallel.pl script will clean out the test suite* (i.e., it calls *clean_tsuite.pl*) before running the test suite to remove any files from a previous run. Make sure that you saved any relevant output from a previous run of the test suite before executing *run_parallel.pl*! Don't put any of your own files in the test suite directories, create a separate directory for that. Alternatively, since C17 you can use the script *rerun_parallel.pl* which works exactly as shown above, except that it does not call *clean_tsuite.pl*. This is especially useful if you want to rerun a specific subset of the input scripts, but want to keep the output of the other scripts.
|
|
|
|
|
|
Starting with the C08 release there are 3 incarnations of the *run_parallel.pl* script: *tsuite/auto/run_parallel.pl* and *tsuite/slow/run_parallel.pl* run the auto or slow test suite only, while *tsuite/run_parallel.pl* runs both test suites combined. The same applies to *rerun_parallel.pl* since C17.
|
|
Starting with the C08 release there are 3 incarnations of the *run_parallel.pl* script: *tsuite/auto/run_parallel.pl* and *tsuite/slow/run_parallel.pl* run the auto or slow test suite only, while *tsuite/run_parallel.pl* runs both test suites combined. The same applies to *rerun_parallel.pl* since C17.
|
|
|
|
|
... | @@ -64,23 +64,23 @@ If running the *run_parallel.pl* fails with a message similar to |
... | @@ -64,23 +64,23 @@ If running the *run_parallel.pl* fails with a message similar to |
|
|
|
|
|
`Undefined subroutine &RunService::initialize called at ./run_parallel.pl line 16`
|
|
`Undefined subroutine &RunService::initialize called at ./run_parallel.pl line 16`
|
|
|
|
|
|
you may need to install the perl Math::BigInt module. Mitchell Revalski discovered this problem on Cygwin.
|
|
you may need to install the Perl Math::BigInt module. Mitchell Revalski discovered this problem on Cygwin.
|
|
|
|
|
|
|
|
|
|
## Cleaning up the test suite directory
|
|
### Cleaning up the test suite directory
|
|
|
|
|
|
If you want to clean up the test suite directory after a run, you can type the command *clean_tsuite.pl*, which will delete all the test suite output. This is useful if diskspace is at a premium.
|
|
If you want to clean up the test suite directory after a run, you can type the command *clean_tsuite.pl*, which will delete all the test suite output. This is useful if disk space is at a premium.
|
|
The test suite output is surprisingly bulky! The command only works in the local directory, so you need to change directory to the test suite directory first before entering the command.
|
|
The test suite output is surprisingly bulky! The command only works in the local directory, so you need to change the directory to the test suite directory first before entering the command.
|
|
|
|
|
|
Starting with the C08 release there are 3 incarnations of the *clean_tsuite.pl* script: *tsuite/auto/clean_tsuite.pl* and *tsuite/slow/clean_tsuite.pl* clean the auto or slow test suite only, while *tsuite/clean_tsuite.pl* cleans both test suites.
|
|
Starting with the C08 release there are 3 incarnations of the *clean_tsuite.pl* script: *tsuite/auto/clean_tsuite.pl* and *tsuite/slow/clean_tsuite.pl* clean the auto or slow test suite only, while *tsuite/clean_tsuite.pl* cleans both test suites.
|
|
|
|
|
|
------
|
|
------
|
|
|
|
|
|
|
|
|
|
# The "monitor" commands within the test suite
|
|
## The "monitor" commands within the test suite
|
|
|
|
|
|
A large code must be completely checked every time anything is changed.
|
|
A large code must be completely checked every time anything is changed.
|
|
The code uses extensive self-checking during a calculation to insure that the results are valid.
|
|
The code uses extensive self-checking during a calculation to ensure that the results are valid.
|
|
The monitor commands in the input files tell the code what answer to expect
|
|
The monitor commands in the input files tell the code what answer to expect
|
|
based either on analytical or previous results.
|
|
based either on analytical or previous results.
|
|
This allows the code to confirm that it has found the correct answer.
|
|
This allows the code to confirm that it has found the correct answer.
|
... | @@ -90,14 +90,14 @@ other problems, or crashes. |
... | @@ -90,14 +90,14 @@ other problems, or crashes. |
|
These would indicate a problem.
|
|
These would indicate a problem.
|
|
|
|
|
|
The monitor commands have nothing to do with the simulation or the astrophysics,
|
|
The monitor commands have nothing to do with the simulation or the astrophysics,
|
|
but instead provide a way for the code to implement these automatic self-checks.
|
|
but instead, provide a way for the code to implement these automatic self-checks.
|
|
The Perl script *tests_remove_monitors.pl* will remove all the monitor commands
|
|
The Perl script *tests_remove_monitors.pl* will remove all the monitor commands
|
|
if you wish to reuse these scripts for other purposes.
|
|
if you wish to reuse these scripts for other purposes.
|
|
|
|
|
|
------
|
|
------
|
|
|
|
|
|
|
|
|
|
# Check the results
|
|
## Check the results
|
|
|
|
|
|
Problems will be announced at the end of the calculation by a line that includes the string *PROBLEM*, *DISASTER* or *BOTCHED MONITORS*. If the code crashes then the normal end-of-calculation string will not be printed.
|
|
Problems will be announced at the end of the calculation by a line that includes the string *PROBLEM*, *DISASTER* or *BOTCHED MONITORS*. If the code crashes then the normal end-of-calculation string will not be printed.
|
|
|
|
|
... | @@ -111,10 +111,10 @@ Starting with the C08 release, the checkall.pl script will quietly skip sims tha |
... | @@ -111,10 +111,10 @@ Starting with the C08 release, the checkall.pl script will quietly skip sims tha |
|
-----
|
|
-----
|
|
|
|
|
|
|
|
|
|
# Programs
|
|
## Programs
|
|
|
|
|
|
The *programs* directory contains a number of programs that use Cloudy as a subroutine.
|
|
The *programs* directory contains a number of programs that use Cloudy as a subroutine.
|
|
Each program lives in its own directory, and is accompanied by a readme file, which explains its purpose.
|
|
Each program lives in its own directory and is accompanied by a readme file, which explains its purpose.
|
|
Scripts to compile and/or run each of these programs by themselves or in succession are provided.
|
|
Scripts to compile and/or run each of these programs by themselves or in succession are provided.
|
|
|
|
|
|
The directory also contains a template C++ program as an example of using Cloudy as a subroutine.
|
|
The directory also contains a template C++ program as an example of using Cloudy as a subroutine.
|
... | @@ -129,6 +129,6 @@ Only calls from C++ programs are currently supported. |
... | @@ -129,6 +129,6 @@ Only calls from C++ programs are currently supported. |
|
-----
|
|
-----
|
|
Next step, apply any [HotFixes](HotFixes).
|
|
Next step, apply any [HotFixes](HotFixes).
|
|
|
|
|
|
Return to the [StepByStep](StepByStep) instructions.
|
|
Return to the [StepByStep](StepByStep) instructions or go [home](home).
|
|
|
|
|
|
----- |
|
----- |