<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class=""><br class=""></div><div style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">bsmith@petsc-01:~$ mpicc</span></div><div style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">This script invokes an appropriate specialized C MPI compiler driver.</span></div><div style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">The following ways (priority order) can be used for changing default</span></div><div style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">compiler name (gcc):</span></div><div style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">   1. Command line option:  -cc=<compiler_name></span></div><div style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">   2. Environment variable: I_MPI_CC (current value '')</span></div><div style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">   3. Environment variable: MPICH_CC (current value '')</span></div><div class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div class=""><span style="font-variant-ligatures: no-common-ligatures; font-size: 14px;" class=""><font face="Menlo" class="">So </font></span></div><div class=""><font face="Menlo" style="font-size: 14px;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">export </span>I_MPI_CC=icx </font></div><div class=""><font face="Menlo" style="font-size: 14px;" class="">export I_MPI_CXX=icpx</font></div><div class=""><font face="Menlo" style="font-size: 14px;" class="">export I_MPI_FC=ifx </font></div><div class=""><font face="Menlo" style="font-size: 14px;" class=""><br class=""></font></div><div class=""><font face="Menlo" style="font-size: 14px;" class="">should do the trick.</font></div><div class=""><span style="font-family: Calibri, sans-serif; font-size: 11pt;" class=""><br class=""></span></div><div><br class=""><blockquote type="cite" class=""><div class="">On Oct 3, 2022, at 5:43 AM, Paolo Lampitella <<a href="mailto:paololampitella@hotmail.com" class="">paololampitella@hotmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta charset="UTF-8" class=""><div class="WordSection1" style="page: WordSection1; caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 18px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Dear PETSc users and developers,</div><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">as per the title, I recently installed the base and HPC Intel OneApi toolkits on a machine running Ubuntu 20.04.</div><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">As you probably know, OneApi comes with the classical compilers (icc, icpc, ifort) and relative mpi wrappers (mpiicc, mpiicpc, mpiifort) as well as with the new LLVM based compilers (icx, icpx, ifx).</div><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">My experience so far with PETSc on Linux has been without troubles using both gcc compilers and either Mpich or OpenMPI and Intel classical compilers and MPI.</div><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">However, I have now troubles using the MPI wrappers of the new LLVM compilers as, in fact, there aren’t dedicated mpi wrappers for them. Instead, they can be used with certain flags for the classical wrappers:</div><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">mpiicc -cc=icx</div><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">mpiicpc -cxx=icpx</div><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">mpiifort -fc=ifx</div><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">The problem I have is that I have no idea how to pass them correctly to the configure and whatever comes after that.</div><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Admittedly, I am just starting to use the new compilers, so I have no clue how I would use them in other projects as well.</div><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">I started with an alias in my .bash_aliases (which works for simple compilation tests from command line) but doesn’t with configure.</div><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">I also tried adding the flags to the COPTFLAGS, CXXOPTFLAGS and FOPTFLAGS but didn’t work as well.</div><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Do you have any experience with the new Intel compilers and, in case, could you share hot to properly use them with MPI?</div><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Thanks</div><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Paolo</div></div></div></blockquote></div><br class=""></body></html>