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

MPI_Status_f2c and MPI_Status_c2f undefined references in Intel MPI 2021.12

Louise-Linaro
Beginner
719 Views

 

Compilation:

 $ mpiicc -o statusf2c statusf2c.c 
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: /tmp/icx-ef92159ca4/statusf2c-1d1ec7.o: in function `main':
statusf2c.c:(.text+0x2f): undefined reference to `MPI_Status_f2c'
icx: error: linker command failed with exit code 1 (use -v to see invocation)

 $ mpiicc -v
mpiicx for the Intel(R) MPI Library @IMPI_OFFICIALVERSION@ for Linux*
Copyright Intel Corporation.
Intel(R) oneAPI DPC++/C++ Compiler 2024.1.0 (2024.1.0.20240308)
Target: x86_64-unknown-linux-gnu
Thread model: posix

 

statusf2c.c

 

#include "mpi.h"

int main(int argc, char* argv[])
{
    MPI_Init(&argc, &argv);

    const MPI_Fint *f_status;
    MPI_Status *c_status;

    MPI_Status_f2c(f_status, c_status);

    MPI_Finalize();
}

 

 

Compilation:

 $ mpiicc -o statusc2f statusc2f.c 
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: /tmp/icx-c05bcc98a2/statusc2f-14ef22.o: in function `main':
statusc2f.c:(.text+0x2f): undefined reference to `MPI_Status_c2f'
icx: error: linker command failed with exit code 1 (use -v to see invocation)

statusc2f.c

 $ cat statusc2f.c 
#include "mpi.h"

int main(int argc, char* argv[])
{
    MPI_Init(&argc, &argv);

    MPI_Fint *f_status;
    const MPI_Status *c_status;

    MPI_Status_c2f(c_status, f_status);

    MPI_Finalize();
}

 

Started failing with Intel MPI 2021.12

Not previously failing with Intel MPI 2021.11.

 

 

 

 

0 Kudos
1 Solution
TobiasK
Moderator
641 Views

@Louise-Linaro


actually we just put a patch release online that fixes this issue, please update to 2021.12.1:

https://www.intel.com/content/www/us/en/developer/articles/tool/oneapi-standalone-components.html#mpi



View solution in original post

0 Kudos
5 Replies
TobiasK
Moderator
659 Views

@Louise-Linaro 

Can you please use
mpiicx instead of mpiicc?

0 Kudos
Louise-Linaro
Beginner
656 Views

Hi @TobiasK 

 

I get the same problem. The symbol is missing.

 

 $ mv statusc2f.c statusc2f.cpp

 $ mpiicpx -o statusc2f statusc2f.cpp
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: /tmp/icpx-3554b074ae/statusc2f-5e7312.o: in function `main':
statusc2f.cpp:(.text+0x2f): undefined reference to `MPI_Status_c2f'
icpx: error: linker command failed with exit code 1 (use -v to see invocation)
0 Kudos
TobiasK
Moderator
642 Views

@Louise-Linaro


actually we just put a patch release online that fixes this issue, please update to 2021.12.1:

https://www.intel.com/content/www/us/en/developer/articles/tool/oneapi-standalone-components.html#mpi



0 Kudos
Louise-Linaro
Beginner
586 Views

Thanks @TobiasK 

Yes my issue was resolved with 2021.12.1

0 Kudos
TobiasK
Moderator
585 Views

Thanks for the confirmation!


0 Kudos
Reply