Hello Diego,

The problem is the old (hopefully sometime deprecated) MPI Fortran interface 
(mpif.h) that now hits you as GCC 10 introduced stricter checks.
Using mpif.h you cannot have function overloading based on argument types as, 
e.g., in C++, so the compiler sees two type mismatching calls here.

Best way to solve this is to update your application to the new mpif08 module.
I know this may end up in a lot of work and finding bugs along the way. ;)

Best regards
Christoph Niethammer


----- Original Message -----
From: "Open MPI Users" <users@lists.open-mpi.org>
To: "Open MPI Users" <users@lists.open-mpi.org>
Cc: "Luis Diego Pinto" <diegor...@libero.it>
Sent: Wednesday, 17 February, 2021 13:20:18
Subject: [OMPI users] weird mpi error report: Type mismatch between arguments

Dear OPENMPI users,

i'd like to notify you a strange issue that arised right after installing a new 
up-to-date version of Linux (Kubuntu 20.10, with gcc-10 version )

I am developing a software to be run in distributed memory machines with 
OpenMPI version 4.0.3.

The error seems to be as much simple as weird. Each time i compile the program, 
the following problem is reported:


692 | call  MPI_BCAST (config,1000*100,MPI_DOUBLE,0,MPI_COMM_WORLD,ierr)
|                  2
693 | call MPI_BCAST(N,1,MPI_INT,0,MPI_COMM_WORLD,ierr2)
|                1
Error: Type mismatch between actual argument at (1) and actual argument at (2) 
(INTEGER(4)/REAL(8)).



If i compile the same program on an older machine (with an older version of 
gcc, the 9th one), i don't get back any error like this.

Moreover, the command doesn't sound like a syntax error nor a logical error, 
since it represents just two consecutive trivial operations of broadcasting, 
each independent to the other. The first operation broadcasts an array named 
"config" of 100000 double elements, while the second operation broadcasts a 
single integer variable named "N"

It seems that the compiler finds some strange links between the line 692 and 
693, and believes that i should put the two arrays "config" and "N" in a 
consistent way, while they are clearly absolutely independent so they are not 
requested to be of the same type.

Searching on the web, i read that this issue could be ascribed  to the new 
version of gcc (the 10th) which contains some well known bugs.

I have even tried to compile with the flag -fallow-argument-mismatch, and it 
fixed some similar report problems indeed, but this specific problem remains

what do you think about?

thank you very much

Best Regards


Diego

Reply via email to