Intel® MPI Library
Get help with building, analyzing, optimizing, and scaling high-performance computing (HPC) applications.
2264 Discussions

Missing MPI_f08_status conversion functions in Intel MPI

Linaro_Josh
Novice
1,010 Views

Hey Intel,

 
I have noticed that IntelMPI is currently missing the following functions:
  • MPI_Status_f082f
  • MPI_Status_f2f08
  • MPI_Status_f082c
  • MPI_Status_c2f08
 
 
These functions are required for our MPI wrappers, but it appears they are also required by the MPI standard since 3.0. They are required to be avliable in both the C and Fortran workspace:
 
f08_conversions.png
 
I was wondering if it was possible to add these functions into IntelMPI?
0 Kudos
5 Replies
TobiasK
Moderator
915 Views

@Linaro_Josh 
do you have a reproducer that fails to build? Which version did you use to build? OS?

0 Kudos
Linaro_Josh
Novice
899 Views

I used Intel MPI 2021.21 to compile on SLES-15.5.

 

Reproducer:

#include <mpi.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>

int main(int argc, char** argv, char** environ)
{
    int i;
    int my_rank;       /* Rank of process */
    int p;             /* Number of processors */
    int source;        /* Rank of sender */
    int dest;          /* Rank of receiver */
    int tag = 50;      /* Tag for messages */
    char message[100]; /* Storage for the message */

    MPI_Status status; /* Return status for receive */

    MPI_Init(&argc, &argv);
    MPI_Comm_rank(MPI_COMM_WORLD, &my_rank);
    MPI_Comm_size(MPI_COMM_WORLD, &p);

    if (my_rank != 0) /* deliberately mismatch send-recv with 7 procs */
    {
        sprintf(message, "Greetings from process %d!", my_rank);
        printf("sending message from (%d)\n", my_rank);
        dest = 0;
        /* Use strlen(message)+1 to include '\0' */
        MPI_Send(message, strlen(message) + 1, MPI_CHAR, dest, tag, MPI_COMM_WORLD);
    } else {
        /* my_rank == 0 */
        for (source = 1; source < p; source++) {
            printf("waiting for message from (%d)\n", source);
            MPI_Recv(message, 100, MPI_CHAR, source, tag, MPI_COMM_WORLD, &status);
            printf("%s\n", message);
            MPI_F08_status f08_status;
            MPI_Status_c2f08(&status, &f08_status);
        }
    }

    printf("all done...(%d)\n", my_rank);

    return 0;
}

 For example, if compiled with OpenMPI 5.0.0 this will compile okay but for IntelMPI I would get the following:

$ mpicc -g -O0 -o repro ./repro.c 
./repro.c:37:13: error: call to undeclared function 'MPI_Status_c2f08'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
   37 |             MPI_Status_c2f08(&status, &f08_status);
      |             ^
./repro.c:37:13: note: did you mean 'MPI_Status_c2f'?
/path/to/intel_installation/2024.1.0/mpi/2021.12/include/mpi.h:1648:5: note: 'MPI_Status_c2f' declared here
 1648 | int MPI_Status_c2f(const MPI_Status *c_status, MPI_Fint *f_status) MPICH_API_PUBLIC;
      |     ^
1 error generated.
0 Kudos
TobiasK
Moderator
858 Views

Thanks for reporting that, we will likely fix it in the second next release, shipped with the oneAPI 2025.0 release.


TobiasK
Moderator
648 Views

@Linaro_Josh


it's now confirmed, the fix is in 2025.0


Linaro_Josh
Novice
637 Views

Thanks @TobiasK, do let me know when this becomes available.

0 Kudos
Reply