[FLASH-USERS] [EXT] Type mismatch for while running 'make'
Reyes, Adam
adam.reyes at rochester.edu
Fri May 17 10:56:14 EDT 2024
Hi Dennis,
I hadn’t noticed this before. For me it’s just a warning and the compilation carries on normally, where it was getting buried in a wall of text.
Does the compilation still work for you? This part of the build generates the “Makefile.depends” is there anything in that file for you?
I think the fix should be as simple as making all those strings it’s compelling about raw string literals, so “” -> r”"
*********************************************
Adam Reyes

Code Group Leader, Flash Center for Computational Science
Research Scientist, Dept. of Physics and Astronomy
University of Rochester
River Campus: Bausch and Lomb Hall, 369
500 Wilson Blvd. PO Box 270171, Rochester, NY 14627
Email adam.reyes at rochester.edu
Web https://flash.rochester.edu
(he / him / his)

*********************************************
> On May 17, 2024, at 4:38 PM, Bertini, Denis Dr. <D.Bertini at gsi.de> wrote:
>
> Hi Adam
> I confirm that adding the flag, the FLASH code base compiled with errors.
> But i still have errors coming from the python setup:
>
> /setup_depends.py --generateINTERMEDIATElines -I/usr/local//include -ggdb -c -O2 -fdefault-real-8 -fdefault-double-8 -Wuninitialized -fallow-argument-mismatch -I/usr/local//include -I/usr/local//include -DH5_USE_16_API -ggdb -c -O2 -Wuninitialized -D_FORTIFY_SOURCE=2 *.f *.f90 *.F90 *.F
> /u/dbertini/plasma/software/FLASH4.8/object/./setup_depends.py:9: SyntaxWarning: invalid escape sequence '\s'
> usemodpatt = "^\s*use\s+([A-Za-z_0-9]+)[,]?.*"
> /u/dbertini/plasma/software/FLASH4.8/object/./setup_depends.py:10: SyntaxWarning: invalid escape sequence '\s'
> incpatt = """^\s*[#]\s*include\s+["']?([A-Za-z._0-9]+)['"]?\s+.*"""
> /u/dbertini/plasma/software/FLASH4.8/object/./setup_depends.py:11: SyntaxWarning: invalid escape sequence '\s'
> defmodpatt = "^\s*module\s+([A-Za-z][A-Za-z_0-9]*)\s*$"
> /u/dbertini/plasma/software/FLASH4.8/object/./setup_depends.py:12: SyntaxWarning: invalid escape sequence '\s'
> reordpatt = "^\s*!!\s*REORDER[(]([2345])[)]:.*$"
> /u/dbertini/plasma/software/FLASH4.8/object/./setup_depends.py:16: SyntaxWarning: invalid escape sequence '\w'
> PMfilepatt = "^(mpi_|amr_)\w+.F90"
> /u/dbertini/plasma/software/FLASH4.8/object/./setup_depends.py:67: SyntaxWarning: invalid escape sequence '\.'
> obj = re.compile(name+"\.[fF](90)?$",re.I)
> ./setup_addcdepends.py -I/usr/local//include -I/usr/local//include -DH5_USE_16_API -ggdb -c -O2 -Wuninitialized -D_FORTIFY_SOURCE=2 *.c
> /u/dbertini/plasma/software/FLASH4.8/object/./setup_addcdepends.py:8: SyntaxWarning: invalid escape sequence '\s'
> incpatt = """^\s*[#]\s*include\s+["']?([A-Za-z._0-9]+)['"]?\s+.*"""
> ./setup_addcdepends.py -I/usr/local//include -I/usr/local//include -DH5_USE_16_API -ggdb -c -O2 -Wuninitialized -D_FORTIFY_SOURCE=2 *.cxx
> /u/dbertini/plasma/software/FLASH4.8/object/./setup_addcdepends.py:8: SyntaxWarning: invalid escape sequence '\s'
> incpatt = """^\s*[#]\s*include\s+["']?([A-Za-z._0-9]+)['"]?\s+.*"""
> rm -f reorder.sh
>
>
> I use python 3.12.3
> From: Reyes, Adam <adam.reyes at rochester.edu>
> Sent: Friday, May 17, 2024 10:24:52 AM
> To: Bertini, Denis Dr.
> Cc: Neogi, Srijan; flash-users at flash.rochester.edu
> Subject: Re: [EXT] [FLASH-USERS] Type mismatch for while running 'make'
>
> It complains because it doesn’t have any knowledge of the overloads for MPI_Bcast for various types and just assumes that the first call, in this case with an integer, is the only correct way to call the routine. By using the mpi module, “use mpi” vs “include “mpif.h”, you give the compiler access to the provided interfaces for MPI_Bcast from the library and it knows that both signatures are allowed.
>
> You can see for example "source/Simulation/Mpi.fh” or "source/Simulation/Flash_mpi_implicitNone.fh” for the differences in how they can be used in FLASH. Setting “USE_MPI=1” in your Makefile.h will define “HAVE_MPI_MODULE” when compiling and force the source code to use the module instead and then the argument type checking will work.
> *********************************************
> Adam Reyes
>
> <FLASH.jpg>
> Code Group Leader, Flash Center for Computational Science
> Research Scientist, Dept. of Physics and Astronomy
> University of Rochester
> River Campus: Bausch and Lomb Hall, 369
> 500 Wilson Blvd. PO Box 270171, Rochester, NY 14627
> Email adam.reyes at rochester.edu
> Web https://flash.rochester.edu
> (he / him / his)
> <FLASH-pride-sml.png>
>
> *********************************************
>
>
>
>> On May 17, 2024, at 10:11 AM, Bertini, Denis Dr. <D.Bertini at gsi.de> wrote:
>>
>> Humm
>> Okay... i do not know really why then the fortran compiler complains about type mismatch ...
>> Is this a compiler internal error?
>> Cheers,
>> Denis
>> From: Reyes, Adam <adam.reyes at rochester.edu <mailto:adam.reyes at rochester.edu>>
>> Sent: Friday, May 17, 2024 10:06:59 AM
>> To: Bertini, Denis Dr.
>> Cc: Neogi, Srijan; flash-users at flash.rochester.edu <mailto:flash-users at flash.rochester.edu>
>> Subject: Re: [EXT] [FLASH-USERS] Type mismatch for while running 'make'
>>
>> dtMinLoc(1) is an integer. The first argument to MPI_Bcast is the start of the buffer being communicated and should match the type declared in the third argument, MPI_REAL or MPI_INTEGER. “Pgmin” in the 4th place is the rank of the broadcast origin, which is always an integer, in this case the process that owns the limiting time step.
>>
>> https://www.mpich.org/static/docs/v3.1/www3/MPI_Bcast.html
>> *********************************************
>> Adam Reyes
>>
>> <FLASH.jpg>
>> Code Group Leader, Flash Center for Computational Science
>> Research Scientist, Dept. of Physics and Astronomy
>> University of Rochester
>> River Campus: Bausch and Lomb Hall, 369
>> 500 Wilson Blvd. PO Box 270171, Rochester, NY 14627
>> Email adam.reyes at rochester.edu <mailto:adam.reyes at rochester.edu>
>> Web https://flash.rochester.edu <https://flash.rochester.edu/>
>> (he / him / his)
>> <FLASH-pride-sml.png>
>>
>> *********************************************
>>
>>
>>
>>> On May 17, 2024, at 10:00 AM, Bertini, Denis Dr. <D.Bertini at gsi.de <mailto:D.Bertini at gsi.de>> wrote:
>>>
>>> Hi Adam
>>> in MPI_Bcast dtMinloc(10 or extraHydroninfo are declared as REAL, but pgmin is INTEGER.
>>> Cheers,
>>> Denis
>>>
>>> From: Reyes, Adam <adam.reyes at rochester.edu <mailto:adam.reyes at rochester.edu>>
>>> Sent: Friday, May 17, 2024 9:54:58 AM
>>> To: Bertini, Denis Dr.
>>> Cc: Neogi, Srijan; flash-users at flash.rochester.edu <mailto:flash-users at flash.rochester.edu>
>>> Subject: Re: [EXT] [FLASH-USERS] Type mismatch for while running 'make'
>>>
>>> Hi Dennis,
>>>
>>> I’m not sure what you mean. Gfortran complains here because the same subroutine, “MPI_Bcast”, is being called twice with different signatures, first with an integer argument then with a real, but are broadcasting to two different variables “dtMinLoc(1)” & “extraHydroInfo". GCC 10 introduced much stricter type checking and only allows this kind of function overloading with an explicit interface. The default behavior in FLASH is to use the “mpif.h” header file, which does not provide any interfaces.
>>>
>>> In 4.8 we have added the option to use the mpi module instead by adding a line “USE_MPI=1” in your Makefile.h that should allow you to leave out the “allow-mismatch” flag.
>>> *********************************************
>>> Adam Reyes
>>>
>>> <FLASH.jpg>
>>> Code Group Leader, Flash Center for Computational Science
>>> Research Scientist, Dept. of Physics and Astronomy
>>> University of Rochester
>>> River Campus: Bausch and Lomb Hall, 369
>>> 500 Wilson Blvd. PO Box 270171, Rochester, NY 14627
>>> Email adam.reyes at rochester.edu <mailto:adam.reyes at rochester.edu>
>>> Web https://flash.rochester.edu <https://flash.rochester.edu/>
>>> (he / him / his)
>>> <FLASH-pride-sml.png>
>>>
>>> *********************************************
>>>
>>>
>>>
>>>> On May 17, 2024, at 9:42 AM, Bertini, Denis Dr. <D.Bertini at gsi.de <mailto:D.Bertini at gsi.de>> wrote:
>>>>
>>>> Hi Adam
>>>> I am not sure about the validity of the allow-mismatch flag in this context.
>>>> You basically send a real anf receive it as an integer ... this is not allowed in MPI and will
>>>> not garantee the validity of reveived message.
>>>>
>>>> Basically i have to downgrade the gfortran compiler to v8.x to be able to compile this code,
>>>> any modern gcc compiler 12,13, 14 does not accept that and ... it is correct.
>>>>
>>>>
>>>> Cheers,
>>>> Denis
>>>>
>>>> PS this is only the first hit, there are still many other place in the code where the same error is done
>>>> with Bcast.
>>>>
>>>> From: flash-users <flash-users-bounces at flash.rochester.edu <mailto:flash-users-bounces at flash.rochester.edu>> on behalf of Reyes, Adam <adam.reyes at rochester.edu <mailto:adam.reyes at rochester.edu>>
>>>> Sent: Friday, May 17, 2024 8:01:15 AM
>>>> To: Neogi, Srijan
>>>> Cc: flash-users at flash.rochester.edu <mailto:flash-users at flash.rochester.edu>
>>>> Subject: Re: [FLASH-USERS] Type mismatch for while running 'make'
>>>>
>>>> Hi Srijan,
>>>>
>>>> See the solution offered here: https://flash.rochester.edu/pipermail/flash-users/2023-June/004054.html
>>>> And the links within.
>>>> *********************************************
>>>> Adam Reyes
>>>>
>>>> <FLASH.jpg>
>>>> Code Group Leader, Flash Center for Computational Science
>>>> Research Scientist, Dept. of Physics and Astronomy
>>>> University of Rochester
>>>> River Campus: Bausch and Lomb Hall, 369
>>>> 500 Wilson Blvd. PO Box 270171, Rochester, NY 14627
>>>> Email adam.reyes at rochester.edu <mailto:adam.reyes at rochester.edu>
>>>> Web https://flash.rochester.edu <https://flash.rochester.edu/>
>>>> (he / him / his)
>>>> <FLASH-pride-sml.png>
>>>>
>>>> *********************************************
>>>>
>>>>
>>>>
>>>>> On May 17, 2024, at 5:28 AM, Neogi, Srijan <srijan_neogi at brown.edu <mailto:srijan_neogi at brown.edu>> wrote:
>>>>>
>>>>> Dear Users,
>>>>> I am trying to build and install Flash 4.8. I followed the steps given in the manual:
>>>>> 1. unpack the FLASH source code distribution.
>>>>> tar -xvf FLASHX.Y.tar
>>>>> 2. Type
>>>>> ./setup Sedov -auto (SUCCESS)
>>>>> 3. Tried to compile with:
>>>>> cd object
>>>>> make
>>>>> and I get the following error: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(8)/INTEGER(4))
>>>>> I have attached a screenshot of my terminal if that helps.
>>>>> <Screenshot 2024-05-16 at 11.26.38 PM.png>
>>>>>
>>>>> Thanks in advance!
>>>>>
>>>>> Best Regards,
>>>>> Srijan
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> flash-users mailing list
>>>>> flash-users at flash.rochester.edu <mailto:flash-users at flash.rochester.edu>
>>>>>
>>>>> For list info, including unsubscribe:
>>>>> https://flash.rochester.edu/mailman/listinfo/flash-users
>>
>> <favicon.ico>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://flash.rochester.edu/pipermail/flash-users/attachments/20240517/6aa32b7c/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: FLASH.jpg
Type: image/jpeg
Size: 23876 bytes
Desc: not available
URL: <http://flash.rochester.edu/pipermail/flash-users/attachments/20240517/6aa32b7c/attachment-0001.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: FLASH-pride-sml.png
Type: image/png
Size: 12732 bytes
Desc: not available
URL: <http://flash.rochester.edu/pipermail/flash-users/attachments/20240517/6aa32b7c/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 1391 bytes
Desc: not available
URL: <http://flash.rochester.edu/pipermail/flash-users/attachments/20240517/6aa32b7c/attachment-0001.p7s>
More information about the flash-users
mailing list