Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Other fix for #78 : Fortran logical and MPI_LOGICAL are actually 32 bits wide, not...
authorAugustin Degomme <adegomme@users.noreply.github.com>
Fri, 6 Aug 2021 13:00:40 +0000 (15:00 +0200)
committerAugustin Degomme <adegomme@users.noreply.github.com>
Fri, 6 Aug 2021 13:00:40 +0000 (15:00 +0200)
Because why not.

include/smpi/mpif.h.in
src/smpi/bindings/smpi_f77.cpp

index 0da3d5e..40860db 100644 (file)
 
       parameter(MPI_BYTE=1)
       parameter(MPI_CHARACTER=2)
-      parameter(MPI_LOGICAL=3)
+      parameter(MPI_LOGICAL=18)
       parameter(MPI_INT=4)
       parameter(MPI_INTEGER=4)
       parameter(MPI_INTEGER1=5)
index 85885bb..0316d22 100644 (file)
@@ -23,11 +23,10 @@ void smpi_init_fortran_types()
     MPI_COMM_WORLD->add_f();
     MPI_BYTE->add_f(); // MPI_BYTE
     MPI_CHAR->add_f(); // MPI_CHARACTER
+    MPI_C_BOOL->add_f(); // MPI_LOGICAL
     if (sizeof(void*) == 8) {
-      MPI_C_BOOL->add_f(); // MPI_LOGICAL
       MPI_INT->add_f();    // MPI_INTEGER
     } else {
-      MPI_C_BOOL->add_f(); // MPI_LOGICAL
       MPI_LONG->add_f();   // MPI_INTEGER
     }
     MPI_INT8_T->add_f();    // MPI_INTEGER1