-
Notifications
You must be signed in to change notification settings - Fork 39
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
Confusing MPI FullEnvironment
logic
#587
Comments
The only valid interpretation I can think of is "QUESO behaves as if it was configured in serial"; how equipped we are to do that I don't know. Using MPI_COMM_SELF might work as a hack for now? |
I think we should have a dummy communicator class. Right now we're trying to
We're trying to understand what should happen if the user uses the serial Scenario AIf 1, 2 and 3 are all true then the dummy communicator will basically just use Scenario BIf 1 and 2 are true but 3 is false then we don't have access to the ranks like Scenario CIf 1 is true, 2 is false and 3 is true then there is only one process and we Scenario DIf 1 is true but 2 and 3 are both false then Scenario EIf 1 is false but 2 and 3 are both true then Scenario FIf 1 is false, 2 is true, and 3 is false this is nonsense, but Scenario GIf 1 and 2 are both false but 3 is true then there is only one process, there Scenario HIf 1, 2, and 3 are all false then we can fall back to scenario G. Does this all make sense? I think the point of this comment is to establish |
The way you've written things, "2 is false" is pretty iffy - the MPI standard allows implementations to both provide and require a special startup command. IIRC I once worked with an MPI stack where So I'll talk as if "2 is false" means "the code was invoked on one processor" and "2 is true" means "the code was invoked on two or more processors". Scenario A: In this case every processor is effectively processor 0, and should write output etc., and that had better be what the user wanted, because that's exactly what they asked for. It's not unreasonable that users might have a parallel code but want to invoke QUESO on individual processors in serial. However, MPI_COMM_SELF is not useful in this case, because MPI operations which can only follow MPI_Init still can only follow MPI_Init even if they're operating over MPI_COMM_SELF! Scenario B: In this case, libMesh calls MPI_Init() to make things easier on the users; throwing an exception is also a reasonable thing to do though. Scenario C, D: Correct. Scenario E,F,G,H: If 1 is false, then QUESO can't even safely include mpi.h, so MPI_COMM_SELF is out of the question. Okay, it looks like my MPI_COMM_SELF advice earlier turned out to be a red herring. We need a serial "dummy communicator" that works the way libMesh's does: without relying on MPI at all. I'd consider seriously just swiping parallel.h (and its two header dependencies) from libMesh and making them "package-independent" with the same handful of changes we used for GetPot. |
Regarding item 2, I had assumed Scenario B: Ok, cool. Honestly I'd prefer it if the environment called Scenario E, F, G, H: Oh, of course! It seems while I was writing up the tree of possible outcomes, I totally overlooked that simple fact. Thanks for pointing that out. Dummy communicator it is. Regarding swiping libmesh code, I'm looking at these files: Am I missing any other files? |
With every MPI stack I've seen in at least the last 5 years, those are interchangeable, but even the MPI 3.0 standard doesn't guarantee it. Yeah, I prefer doing the Those are the three files, yes. |
We have this constructor which the user can call if they don't want to use MPI, but if the user doesn't pass
--disable-mpi
toconfigure
(i.e.,QUESO_HAVE_MPI
is defined), how should this constructor behave?We call it here, in our tests and it's not entirely clear what it's supposed to do.
The text was updated successfully, but these errors were encountered: