Using query_tests

In CESM1.2, automated regression and system tests are now found in a single xml-based file in $CCSMROOT&/scripts/ccsm_utils/Testlistxml/testlist.xml. The new utility query_tests allows you to quickly and easily query the different CESM test categories that are supported as well as what tests are available for different grids, compsets, machines and compilers. You should use this command to become familiar with the latest CESM testing capabilities before you utilize create_test. You should first use the -h option in calling query_tests to document its input options. query_tests can be called with the following arguments:


query_tests \
   -list name             
        name can be [compsets,grids,compilers,machines,categories,tests] \
   -compset name
       limit selection to target compset name \
   -category name             
       limit selection to target category name \
   -machine name             
       limit selection to target machine name \
   -compiler name             
       limit selection to target compiler name \
   -grid name             
       limit selection to target grid name match \
   -outputlist   
       outputs the found tests to the old-style text test lists. \ 
   -outputxml  
       outputs the found tests to an xml test list. 

As an example to see all the tests that are supported for the compset B1850C5CN, call $query_tests as follows


./query_tests -compset B1850C5CN

And the following output will appear


Compset                      TestName  Grid       Machine_compiler      Category  
==================================================================================
B1850C5CN (B_1850_CAM5_CN)   ERI       f19_g16    hopper_pgi            prerelease                      
B1850C5CN (B_1850_CAM5_CN)   ERI       f19_g16    intrepid_ibm          prerelease                      
B1850C5CN (B_1850_CAM5_CN)   ERI       ne30_g16   hopper_pgi            prebeta                         
B1850C5CN (B_1850_CAM5_CN)   ERI       ne30_g16   intrepid_ibm          prebeta                         
B1850C5CN (B_1850_CAM5_CN)   ERS       ne30_g16   yellowstone_pgi       prebeta                         
B1850C5CN (B_1850_CAM5_CN)   ERS       ne30_g16   yellowstone_gnu       prebeta                         
B1850C5CN (B_1850_CAM5_CN)   ERS       ne30_g16   yellowstone_intel     prebeta                         
B1850C5CN (B_1850_CAM5_CN)   PFS       ne30_g16   edison_intel          prebeta                         
B1850C5CN (B_1850_CAM5_CN)   PFS       ne30_g16   mira_ibm              prebeta                         
B1850C5CN (B_1850_CAM5_CN)   PFS       ne30_g16   titan_pgi             prebeta                         
B1850C5CN (B_1850_CAM5_CN)   PFS       ne30_g16   yellowstone_gnu       prebeta                         
B1850C5CN (B_1850_CAM5_CN)   PFS       ne30_g16   yellowstone_pgi       prebeta                         
B1850C5CN (B_1850_CAM5_CN)   PFS       ne30_g16   yellowstone_intel     prebeta                         

To find all the tests that are configured to run on Yellowstone, run:


> ./query_tests -mach yellowstone 

The output will show the compset, test name, grid, machine / compiler combinaton, test category, and and optional namelist directory. (used for specifying custom namelists for tests)

To find all the tests configured to run on titan, using the PGI compiler, and using the 'prebeta' category, run:


> ./query_tests -mach titan -compiler pgi -category prebeta

To find all the tests using the B1850 compset, run:


> ./query_tests -compset B1850

If one wanted a new test list based on a particular query, one can use the -outputxml option to get the query output in XML format:


> ./query_tests -category aux_clm -outputxml > aux_clm.xml

The above command will give one all of the 'aux_clm' tests in the file 'aux_clm.xml'. Then, this test list can be used by create_test to run the aux_clm tests using the -xml_list option.