-
Notifications
You must be signed in to change notification settings - Fork 91
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
Build fails with gcc>=10 with type mismatch error #18
Comments
To temporarily fix this, read http://www.gnu.org/software/gcc/gcc-10/changes.html
So, if you're using |
This is a well-known problem with the current gcc and MPI. It occurs when generic interfaces receive (individually correct) subsequent calls with differing argument types (a technique frequently used in all MPI_XXX() functions. So calling MPI_Isend(... MPI_INTEGER). and later MPI_Isend ( .... MPI_REAL) will trigger this error/warning. I don't know how to fix this in our code. Could be fixed upstream. Best if we add default argument "-fallow-argument-mismatch" in gcc>=10 CMake builds. |
OK thx Carsten. Could u plz add the flags to the git as appropriate. Thx.
…-Joseph
Y. Joseph Zhang
Web: schism.wiki
Office: 804 684 7466
From: Carsten Lemmen <[email protected]>
Sent: Tuesday, January 5, 2021 1:01 PM
To: schism-dev/schism <[email protected]>
Cc: Y. Joseph Zhang <[email protected]>; Comment <[email protected]>
Subject: Re: [schism-dev/schism] Build fails with gcc10 (#18)
[EXTERNAL to VIMS] This email originated from outside of VIMS. Do not click links or open attachments unless you recognize the sender and know the content is safe.
This is a well-known problem with the current gcc and MPI. It occurs when generic interfaces receive (individually correct) subsequent calls with differing argument types (a technique frequently used in all MPI_XXX() functions. So calling MPI_Isend(... MPI_INTEGER). and later MPI_Isend ( .... MPI_REAL) will trigger this error/warning. I don't know how to fix this in our code. Could be fixed upstream. Best if we add default argument "-fallow-argument-mismatch" in gcc>=10 CMake builds.
-
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fschism-dev%2Fschism%2Fissues%2F18%23issuecomment-754799940&data=04%7C01%7Cyjzhang%40vims.edu%7Ce47a3d0081d44d31d1e708d8b1a3d522%7C8cbcddd9588d4e3b9c1e2367dbdf1740%7C0%7C0%7C637454664510058711%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=XFSFtEA%2FL2Pd7e3tOVbA%2FLLhkUUsvhfdLL3PbqMDY0E%3D&reserved=0>, or unsubscribe<https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAFBKNZ3HRDWEUFAACYLS6ZDSYNHVBANCNFSM4QF4DLSQ&data=04%7C01%7Cyjzhang%40vims.edu%7Ce47a3d0081d44d31d1e708d8b1a3d522%7C8cbcddd9588d4e3b9c1e2367dbdf1740%7C0%7C0%7C637454664510058711%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=%2Bk%2FkDPLDpOGhmLzhHARrTEIFCys4Vks17%2FxXuAykgRM%3D&reserved=0>.
|
The solution is to add to CMakeList.txt the following code snippet
There are probably more concise ways to do this with CMake generator expressions. Haven't tested this yet but will add to git after testing. |
From the gcc manual: https://gcc.gnu.org/onlinedocs/gfortran/Fortran-Dialect-Options.html "Using this option is strongly discouraged. It is possible to provide standard-conforming code which allows different types of arguments by using an explicit interface and TYPE(*)." But we cannot avoid this until it is fixed upstream (i.e. in the MPI implementations) |
Thx Carsten. I'm not sure what exactly u wanted me to review but your fixes seem to be fine as they do not affect other compilers. Thx. |
I'd like your opinion on
I would like to merge this PR rather soon as more and more people are now using updated compilers (e.g. when they are on the latest Ubuntu) and need this fixed. |
HI Carsten: Warning messages are in general fine with us. I assume using ifort would not produce those messages? We hardly use gcc. Thx. |
I tested with ifort and it does not affect the ifort build at all. So I'll go ahead and merge! |
GCC 10 enforces stricter type checking, leading to build failures such as
The text was updated successfully, but these errors were encountered: