#1075: Test cases with specific number of processes --------------------------+------------------------------------------------- Reporter: eschnett | Owner: Type: enhancement | Status: reopened Priority: major | Milestone: ET_2013_11 Component: Cactus | Version: Resolution: | Keywords: --------------------------+-------------------------------------------------
Comment (by hinder):
I believe that this can be made to work with SimFactory, but it will require modifications to SimFactory. When SimFactory needs to run the tests as part of a simulation, it does this by using the file simfactory/bin/RunTestSuite as its "run script", passing the real machine runscript as an argument to that script. RunTestSuite then sets CCTK_TESTSUITE_RUN_COMMAND to call the passed runscript on '$parfile', which is supplied by the test system. The test system will also supply '$nprocs', since this command is usually an mpirun command, but simfactory ignores this at present. The reason is because the runscript has already been expanded at this point, so that @NUM_PROCS@ has been replaced with the number of processes that the whole simulation is running on. One solution would be to modify simfactory so that, in the case of running a testsuite, it expands @NUM_PROCS@ to a reference to an environment variable, e.g. $NUM_PROCS. The CCTK_TESTSUITE_RUN_COMMAND set in RunTestSuite can then set this variable to '$nprocs' before launching the machine's run script. This is similar to what is done for the parameter file; there is special code in simfactory to look at a TESTSUITE_PARFILE environment variable which is passed by the CCTK_TESTSUITE_RUN_COMMAND.
This assumes that changing only NUM_PROCS in the machine run script is sufficient to do what we want; other variables might have been used, and some mpirun commands might take the number of cores or something similar instead. I expect this to break some systems.