-
Notifications
You must be signed in to change notification settings - Fork 283
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
skip motorBike tutorial case in OpenFOAM sanity check if available cores < 6 #2615
Conversation
The tutorial is hardcoded to use exactly 6 cores, so the sanity check will always fail if there are fewer cores than this available locally (even if there is no problem with the build). This change only attempts to run that case as a test if there are 6 or more cores locally.
An alternative here is to allow oversubscription of MPI ranks on cores, right @branfosj? |
@boegel yes, and that would be preferable however the actual mpirun command is burried inside a script within the OpenFOAM install and I didn't find an MPI-agnostic way to do it via enivironment variables (since this is in the easyblock, it needs to work for all the MPIs the easyconfig might be built with). Basically I couldn't make it work after a few hours struggling with it. Edit: I think there's only a foss OpenFOAM 8 for 2020b but I have a local intel version (I haven't contributed it as it's a trivial |
The runParallel function is defined in the RunFunctions script which is sourced at the beginning by
The function has some predefined options for mpirun but not for the oversubscription flag. The key section says:
I think it is not recommended to patch these lines as people might use these functions later in production when oversubscription is not desired. It might be possible to replace the line This is not the nice way from a style view but it keeps the sanity check and avoids a skip. It could also be something possible by changing the entry for Although I am not sure about this method changing the dicts because it's an intervention to the original tutorial files which might be inappropriate. EDIT: |
@Mormacill yes, there doesn't seem to be a clear easy solution to using this tutorial as a sanitycheck. I'm not familiar with using OpenFOAM, just building it - I don't suppose you are aware of a bundled tutorial case that would do as an adequate test case but needs 2 or 4 cores instead of 6? (Doesn't completely solve the problem but 4-cores is far more common at the "low end" of HPC systems, in my experience.) |
@LHurst-JM There are a few cases which are using 4 cores, just one I found with 2 by default (heatTransfer/buoyantSimpleFoam/iglooWithFridges). The advantage of motorBike tutorial sanity check is that it covers a wide range of functions being tested. |
@Mormacill thanks, I agree that sounds like a better plan. Not knowing OpenFOAM I find it hard to judge which cases are suitable. |
@LHurst-JM Does the sanity check also fail when OpenFOAM is built on top of Intel MPI? I know OpenMPI by default gives up when there are less cores available than "slots" (cores), but I don't remember running into that with Intel MPI? |
Hi @boegel, I'm sure I tried intel and had the same problem but testing again now.... If it is just OpenMPI, I think we can tell it to oversubscribe with an environment variable which will make this a lot simpler. |
@boegel my bad, you are entirely correct - it does seem to build with the Intel toolchain, I must have assumed the issue would be common to all mpirun implementations. That does explain why I was struggling to find how to make Intel's mpirun oversubscribe - it must do it by default! |
This change should no longer be needed if easybuilders/easybuild-framework#3909 gets merged... |
Looks good to me, I'll close this one. I think the general solution is much better than playing whack-a-mole with individual easyblocks. |
The tutorial is hardcoded to use exactly 6 cores, so the sanity check will always fail if there are fewer cores than this available locally (even if there is no problem with the build). Problem occurs with both foss and intel toolchains (I've not tested any others).
This change only attempts to run that case as a test if there are 6 or more cores locally.
Closes easybuilders/easybuild-easyconfigs#14291