Performance improvement CheckBlankModules#378
Conversation
This routine seems to be providing no functionality but iterates over every CRHM variable and is called twice for every module on every time step. Performance on one core of my CPU with Kevin's project file (see #372) is given below. ORIGINAL real 3m15.966s user 2m9.290s sys 1m6.573s CORRECTED real 2m39.832s user 1m34.995s sys 1m4.760s
|
Hi Peter, From the Borland CRHM CRHMmain.cpp that Tom coded, see the link from the source code file CRHMmain.cpp https://github.com/srlabUsask/crhmcode/blob/master/borland_source/CRHMmain.cpp From Line 1019 to 1034: // Simple project for module obs. For group always when !CRHMStatus otherwise only selected groups There are two calls of CheckBlankModule; maybe one call is for p from the module in group prj file, and the other call is for p from module obs in simple prj file. |
|
I had noticed these calls but never looked at the method before. The method CheckBlankModule iterates over the map of variables but does not do anything. The code is functionally identical in the Borland code and the CRHMcode version. I think it is safe to remove and save our processors some cycles. |
|
okay, thanks. |
This routine seems to be providing no functionality but iterates over every CRHM variable and is called twice for every module on every time step.
Performance on one core of my CPU with Kevin's project file (see #372) is given below.
ORIGINAL
real 3m15.966s
user 2m9.290s
sys 1m6.573s
CORRECTED
real 2m39.832s
user 1m34.995s
sys 1m4.760s