-
Notifications
You must be signed in to change notification settings - Fork 48
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
Error with mpich 4.1: Type mismatch in argument 'baseptr' at (1); passed TYPE(c_ptr) to INTEGER(4) #661
Comments
@alazzaro: for instance @barracuda156: I wonder if the basepointer issue is "just a warning" or if the related code actually crashes... |
@hfp There is a topic with test results: #645 |
@alazzaro Could you please take a look? |
@barracuda156 I'm sorry, it cannot be today, likely next week. MPICH 4.1 is still not supported in our tests, so it is not a surprise you see this error. |
I am currently working on the MPI backend and try to upgrade DBCSR to the new mpi_f08 module. The warnings might be related to missing explicit interfaces on the library side which are to be expected here. I wonder about the errors in case of MPICH 4.1. The MPI standard (including MPI 3.0 and MPI 3.1) requires in case of the mpi module (not mpi_f08) to overload MPI_Alloc_mem with a TYPE(C_PTR) version if TYPE(C_PTR) is available compiler-wise. DBCSR's wrapper is in accordance to the example provided in the standard itself and thus should work in my opinion. I am still glancing through Google what it might be related to. |
Maybe unrelated, sometimes it matters if |
I have observed it already in a different context but in the given case, even the MPI standard does not use the |
@barracuda156 I've just merged #678 so now the problem of this issue should go away if you build DCBSR with |
Thank you very much! I will test that tonight. |
@alazzaro Unfortunately, still fails:
This is the latest commit To the config in the portfile https://github.com/macports/macports-ports/blob/master/math/dbcsr/Portfile |
@alazzaro Building DBCSR with MPICH 4.1.2 and GCC 13.1.0 using the cmake flag |
@mkrack thanks for confirmation, I did a similar test on MacOS (GCC 13.1, MPICH 4.1.2) and it works. @barracuda156 just for confirmation, I don't see
So basically the brew version of MPICH is missing the F08 interface and we are back to the original problem of the F77 MPI interface (we will fix it). Can you check your MPI has the F08 module? My understanding is that only new GCC can compile MPICH with F08 support (see for example here).
to make sure I have the F08 module. |
@alazzaro This is an awesome point. Indeed, it is disabled: https://github.com/macports/macports-ports/blob/100bdfdca9908a07bb07a92663434f401c1f71f9/science/mpich/Portfile#L179-L180 Need to review why it failed, but we do have new GCC (all tested systems use 12.3.0 now, including my PowerPC ones). |
@alazzaro I have built MPICH 4.1.2 with enabled F08 now, and DBCSR built fine. Your solution works. |
OK, then we have a solution. My summary is the following:
@barracuda156 is this something reasonable for you? In your case it requires MPICH 4.1 with F08 support, add the flag I would like to thank @fstein93 who did the F08 porting of the MPI code and @mkrack for testing it. |
@alazzaro I do not control MPICH port in Macports, while I am a maintainer of DBCSR port, so I can only say I hope that will work. I have requested maintainers of MPICH to enable F08 in the next update to the port (that will have to be tested on other systems – I only verified it builds for me locally). If that is done, I will add the fix to DBCSR, so that it can be built again normally. Requirement for a new GCC will temporarily leave PowerPC builds broken on < 10.6, but I plan to update those to GCC 12 anyway, hopefully soon. (Technically everything ready for that, but changes to toolchain aren’t the easiest to push through.) |
Well, this is only required for the new MPICH 4.1. In all other cases, the default will work... |
Well, MPICH 4.x is the current reality. (Introducing back a legacy MPICH just to build one port is too much. I hope we can sort out enabling F08 instead.) |
I'm going to close this issue, please open a new for further discussions |
@alazzaro what's the current status of this? I'm running into this issue with So:
|
The problem is in the new MPICH, so nothing to do with compilers. |
Could you take a look at spack/spack#40494? |
Seems reasonable. Do you have any other question? |
I didn't understand whether the CP2K build issue with mpich 4.1 is because CP2K builds vendored DBCSR and hits the issue in this thread, or because it also needs fixes inside CP2K itself? |
The latter... this is due to MPICH 4.1 to be strictly complainant with the standard, therefore they enforce the full F77 interface, unless you ask for the F08. You get the first error in DBCSR simply because it is the first to compile... |
For the record, Macports still stuck with non-F08 MPICH, waiting for it to be updated. Locally I have MPICH 4.1.2 with F08 and gcc13, works fine on the old 10.6 PowerPC :) |
With mpich 4.0.2 I get warnings instead:
The text was updated successfully, but these errors were encountered: