-
Notifications
You must be signed in to change notification settings - Fork 45
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
FC=caf build fails #333
Comments
Hmm. The main obstacle with using pFUnit on co-array code is that you must ensure that such tests span all of MPI comm world. So if you are running on 8 processes, all the tests must also use 8 processes, and hence 8 CAF images. With F2018, this limitation can be better handled with teams, but such work has not been done. But the error above looks to be more like "loader.mod" is from a different compiler. Somehow the environment is schizophrenic. Could you paste here the output of your CMake command? It will be interesting to see what it reports. I recommend starting with some very simple unit test that does something like printing |
Actually, the unit test that I am trying is the following:
which is trivial and doesn't use any coarray features, but nevertheless fails to build properly. For clarity, it's not Here is the output of
This is the subsequent
|
Can you redo the make step with I still cannot envision any error other than the fact that |
Sure. Here is the output of
I don't think I have any other compilers, just gfortran and some wrappers (mpifort, caf).
And then
|
OK - the pure gfortran case got past the earlier problem, which is good. My best guess is that gfortran somehow changes the format of |
Looks like rebuilding pFUnit with Here is LastTest.log in case it's helpful:
Am I to expect that building for caf should break MPI (I suspect it shouldn't)? If so, how would I then test caf? |
OK - so first, you will want to have An example test is here: https://github.com/Goddard-Fortran-Ecosystem/pFUnit_demos/blob/df02c379be766d31c0106dfe37f082555b799230/MPI/tests/test_halo.pf#L145-L167 So you would have something like
and only run on 8 images. At one time there was a prototype that let you use "*" meaning use all the processes available. Maybe it is still there, but looking at the preprocessor it does not look like it to me. But the better fix is to introduce CAF teams and then create smaller teams for each test in the same way that we create subcommunicators in the MPI case. |
Perhaps I do not understand. However, if I simply clone the directory you linked, and do (after adding
then it fails as above. However, if I replace Unfortunately I am just starting out with CAF so I can't comment much on how to use teams. |
OK - I suspect this problem is because CAF is launching MPI in the background and the command line has already launched MPI. You'll need to ask someone more familiar with CAF (and/or GFortran's implementation) to see if there is a way to get CAF to "inherit" the MPI environment. What happens with the above experiment if you edit the |
I'm sorry, how would I edit it to launch serially? Wouldn't that require editing several tests as well (changing |
Hi,
I understand that pFUnit does not explicitly support coarrays, but from a previous issue, it looks like it should be able to at least somewhat handle them. I have Open Coarrays installed, and I can build my source fine without pFUnit (using
FC=caf cmake ..
). If I remove all coarrays in my code and simply usecmake ..
, it builds fine. However, if I build withFC=caf cmake ..
then it returns the error:Of course, I want to use coarrays and without
FC=caf
it fails. Is there a way around this or is this not the correct tool for CAF?The text was updated successfully, but these errors were encountered: