Intel® MPI Library
Get help with building, analyzing, optimizing, and scaling high-performance computing (HPC) applications.
Announcements
FPGA community forums and blogs have moved to the Altera Community. Existing Intel Community members can sign in with their current credentials.
2276 Discussions

ifx and mpi_init using -check all

Jaapw
Beginner
3,614 Views

I would like to try the ifx compiler since we like good performance. If I compile a small test program which looks as follows:

 

program hello
use mpi_f08
implicit none
integer :: ierr
call MPI_Init(ierr)
print *, 'MPI_Init ierr=',ierr
call MPI_Finalize(ierr)
print *, 'MPI_Finalize ierr=',ierr
end program hello

 

using 

 

mpif90 test.F90 -o test

 

I get:

 

MPI_Init ierr= 0
MPI_Finalize ierr= 0

 

which looks as expected.

 

However if I use the -check all flag the executable stops at the MPI_init call :

 

Uninitialized bytes in strcmp at offset 0 inside [0x712000000d8a, 2)
==1016011==WARNING: MemorySanitizer: use-of-uninitialized-value
#0 0x7fffece5209c (/lib64/libucp.so.0+0x2309c) (BuildId: f062d71c65c8053ad6f696e66d11227ab55fb9d9)
#1 0x7fffece52e76 (/lib64/libucp.so.0+0x23e76) (BuildId: f062d71c65c8053ad6f696e66d11227ab55fb9d9)
#2 0x7fffece5910c in ucp_init_version (/lib64/libucp.so.0+0x2a10c) (BuildId: f062d71c65c8053ad6f696e66d11227ab55fb9d9)
#3 0x7fffea2d917b in mlx_domain_open (/cm/shared/apps/oneapi/2024.2.1/mpi/2021.13/opt/mpi/libfabric/lib/prov/libmlx-fi.so+0xb17b) (BuildId: 1dd5a82efea27007226e0e98f8c29bbb99bc0506)

 

How can I use the check all flag in combination with mpi? The flag is very helpful to avoid errors in the code so I would like to use it.

 

I am using the OneAPI HPC 2024.2.1 package.

0 Kudos
2 Replies
TobiasK
Moderator
3,375 Views

@Jaapw you are hitting an IFX issue:
https://community.intel.com/t5/Intel-Fortran-Compiler/IFX-issue-when-building-check-all-or-check-uninit/m-p/1545825

please use oneAPI 2025.2 / Intel MPI 2021.16 and try again.

0 Kudos
JW20
Beginner
2,749 Views

Thank you for the advice. It indeed works, the hello world test works in debug mode.  Nice!

 

If I run valgrind I get the message below. Is this something to worry about? I do not specify FI_PROVIDER but with mlx or psm3 I do get message too.

 

==1591512== Memcheck, a memory error detector
==1591512== Copyright (C) 2002-2024, and GNU GPL'd, by Julian Seward et al.
==1591512== Using Valgrind-3.24.0 and LibVEX; rerun with -h for copyright info
==1591512== Command: ./test
==1591512==
==1591512== WARNING: valgrind ignores shmget(shmflg) SHM_HUGETLB
==1591512== Conditional jump or move depends on uninitialised value(s)
==1591512== at 0xFDC7BF5: ??? (in /usr/lib64/libibverbs.so.1.14.47.0)
==1591512== by 0xFDCBF08: ibv_cmd_create_srq (in /usr/lib64/libibverbs.so.1.14.47.0)
==1591512== by 0x1146CCD9: ??? (in /usr/lib64/libmlx5.so.1.24.47.0)
==1591512== by 0xFDD399A: ibv_create_srq (in /usr/lib64/libibverbs.so.1.14.47.0)
==1591512== by 0x118B5DA9: uct_rc_iface_init_rx (in /usr/lib64/ucx/libuct_ib.so.0.0.0)
==1591512== by 0x118B9039: uct_rc_iface_t_init (in /usr/lib64/ucx/libuct_ib.so.0.0.0)
==1591512== by 0x118B9F3F: ??? (in /usr/lib64/ucx/libuct_ib.so.0.0.0)
==1591512== by 0x118BA3DD: ??? (in /usr/lib64/ucx/libuct_ib.so.0.0.0)
==1591512== by 0x1121886D: uct_iface_open (in /usr/lib64/libuct.so.0.0.0)
==1591512== by 0x11176033: ucp_worker_iface_open (in /usr/lib64/libucp.so.0.0.0)
==1591512== by 0x1117EC85: ucp_worker_create (in /usr/lib64/libucp.so.0.0.0)
==1591512== by 0x10EEBC11: mlx_ep_open (in /cm/shared/apps/oneapi-2025.2/mpi/2021.16/opt/mpi/libfabric/lib/prov/libmlx-fi.so)
==1591512==
==1591512== Warning: set address range perms: large range [0x2f0000000000, 0x2f0083000000) (defined)

 

 

0 Kudos
Reply