How to solve the openmpi applications error?

I installed intel oneapi compiler, then use icx and icpx to compile and install openmpi software (openmpi-4.1.5) by specifying “CC=icx” and “CXX=icpx”.
However, the installed “openmpi” can not be used to compile the MPI codes.The same process, no errors occurred on Linuxmint system. What is the problem?

(1) The error is as follows:
/usr/bin/ld: /opt/eos/cgp-1.6_icx/lib/libcgp.a(add_hamming_win.o): in function add_hamming_win_1d1(int, int, int, int, int, cgp_complex*)': undefined reference to _intel_fast_memset’
/usr/bin/ld: undefined reference to `_intel_fast_memset’

Here, ‘add_hamming_win_1d1’ is a subroutine in my own code.

(2) when I check the “mpicxx -v” command, I got the messages. The installed “openmpi” looks like based on gcc.

使用内建 specs。COLLECT_GCC=/usr/bin/g++
配置为:/build/gcc/src/gcc/configure --enable-languages=ada,c,c++,d,fortran,go,lto,objc,obj-c++ --enable-bootstrap --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl= --with-build-config=bootstrap-lto --with-linker-hash-style=gnu --with-system-zlib --enable-__cxa_atexit --enable-cet=auto --enable-checking=release --enable-clocale=gnu --enable-default-pie --enable-default-ssp --enable-gnu-indirect-function --enable-gnu-unique-object --enable-libstdcxx-backtrace --enable-link-serialization=1 --enable-linker-build-id --enable-lto --enable-multilib --enable-plugin --enable-shared --enable-threads=posix --disable-libssp --disable-libstdcxx-pch --disable-werror
支持的 LTO 压缩算法:zlib zstd
gcc 版本 13.1.1 20230429 (GCC)

I pasted your error into

Thanks for your answer!
“-lircmt” doesn’t work, /usr/bin/ld: can not find -lircmt: No such file or directory.

What I’m wondering is, why is the version of mpicxx (command: mpicxx -v) displayed based on gcc? Moreover, there is no problem with the same command under Linuxmint.

did you set the LD_LIBRARY_PATH ???

export LD_LIBRARY_PATH=/path/to/openmpi/lib:$LD_LIBRARY_PATH

see: 3.5 Installing & Using Shared Libraries

and mpirun -x LD_LIBRARY_PATH