Development of script to measure differential time for all Madrigal derivation methods
The basic idea of this script is to create a text file listing every possible Madrigal derived parameter, and the differential time in nanoseconds to run that method. This script should automatically discover all derived methods. By differential time I mean the amount of time needed to run the method one additional time after it has been previously run. This means that the time to set up the code to run the method the first time is ignored - only the time needed to run the code another time is considered. This is because Cuda cannot reduce set up time - it can only reduce differential time.
Suggested implementation
Write a python script that uses the madrigal library. Use the madrigal file $MADROOT/experiments/1998/mlh/20jan98/mil980120g.003, since that is a test file installed automatically with every madrigal installation. To find the list of all possible derived parameters, use the library method madrigal.data.MadrigalFile.getMeasDervBothParmLists. Then for each derived parameter, run isprint twice, requesting only the one derived parameter. The first isprint run will have only a small amount of data, since it will use a time filter. The second isprint run will include all data. Your code will parse the isprint output, and do two things:
Count the number of data points returned
Verify that all floats are valid. Any values that are not floats should raise an exception, because that means the derivation method may not have been called.
The differential time is then ((Time of long run) - (Time of short run)) / ((Number of results long run) - (Number of results short run))
Output text file has two columns - mnemonic of parameter, and differential time in nanoseconds