It is not always clear how many threads will be optimal for a model. For smaller models, it may not matter much, but some models take hours to run, and choosing the right number of threads can make a big difference.
In the latest version of RAS (6.7 Beta 4+), HEC has added a feature to test how many cores produces the best results. This would be a welcome feature for EPASWMM5.
I think it could be done by running the same model for a limited time (maybe 30 seconds after it initializes the full computations, but this could be user-specified), with each number of cores and seeing how far it gets in the calculations, then telling the user the number of cores that gets farthest in the simulation. The engine would have to make sure it was fully into the calculations where threading is being actively utilized before starting to count the 30 seconds.
It is possible that the 'dry' calculations at the beginning of a run are not conducive to determining the best number of threads, so perhaps a variant would be to analyze the system and set a starting water elevation that engages at least 1/2 of the network in active flow conditions, then run that variation of the model several times.
It is not always clear how many threads will be optimal for a model. For smaller models, it may not matter much, but some models take hours to run, and choosing the right number of threads can make a big difference.
In the latest version of RAS (6.7 Beta 4+), HEC has added a feature to test how many cores produces the best results. This would be a welcome feature for EPASWMM5.
I think it could be done by running the same model for a limited time (maybe 30 seconds after it initializes the full computations, but this could be user-specified), with each number of cores and seeing how far it gets in the calculations, then telling the user the number of cores that gets farthest in the simulation. The engine would have to make sure it was fully into the calculations where threading is being actively utilized before starting to count the 30 seconds.
It is possible that the 'dry' calculations at the beginning of a run are not conducive to determining the best number of threads, so perhaps a variant would be to analyze the system and set a starting water elevation that engages at least 1/2 of the network in active flow conditions, then run that variation of the model several times.