Intel® oneAPI HPC Toolkit
Get help with building, analyzing, optimizing, and scaling high-performance computing (HPC) applications.
Announcements
This community is designed for sharing of public information. Please do not share Intel or third-party confidential information here.
1918 Discussions

MPI openmp fopenmp oopenmp qopenmp

jimdempseyatthecove
Black Belt
420 Views

On Linux, using Eclipse, I am creating a C project that uses a combination of MPI and OpenMP.

I can get the project to build, but with some warning that I can ignore. This may not necessarily be an Intel, but a heads up.

When building the sample "Hello world" as OpenMP only, icc is used, and the build works without warnings.
When building the sample "Hello world" as MPI only, mpicc is used, and the build works without warnings.

When I build a mixed program, using mpicc, I receive warning relating to choice of options for enabling OpenMP. It appears that icc and mpicc are not using the same options.

The following is a successful build, but with warnings:

Building file: ../src/TestCramesOpenMPMPI.c
Invoking: Intel C Compiler
mpicc -g -O0 -I/opt/intel/compilers_and_libraries_2016.3.210/linux/mpi/intel64/include -qopenmp -fopenmp -MMD -MP -MF"src/TestCramesOpenMPMPI.d" -MT"src/TestCramesOpenMPMPI.d" -c -o "src/TestCramesOpenMPMPI.o" "../src/TestCramesOpenMPMPI.c"
gcc: unrecognized option '-qopenmp'
Finished building: ../src/TestCramesOpenMPMPI.c
 
Building target: TestCramesOpenMPMPI
Invoking: Intel C++ Linker
mpicc -shared-intel -qopenmp -L/opt/intel/compilers_and_libraries_2016.3.210/linux/compiler/lib/intel64 -fopenmp -o "TestCramesOpenMPMPI"  ./src/TestCramesOpenMPMPI.o   
gcc: unrecognized option '-shared-intel'
gcc: unrecognized option '-qopenmp'
Finished building target: TestCramesOpenMPMPI

Jim Dempsey

0 Kudos
2 Replies
TimP
Black Belt
420 Views

Intel mpi provides wrappers mpiicc for icc and mpicc for gcc.  So the usual convention that mpicc defaults to gcc is followed.  Some open source mpi require rebuilding mpi against icc to make the switch.

jimdempseyatthecove
Black Belt
420 Views

Thanks. I will have to consider/experiment with mpiicc.

What threw me off was the build announcement:

Invoking: Intel C Compiler

Silly of me to assume that meant the Intel C Compiler was going to be used to compile the program...

Jim Dempsey

Reply