<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Menlo;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 2.0cm 2.0cm 2.0cm;}
div.WordSection1
{page:WordSection1;}
--></style>
</head>
<body lang="IT" link="blue" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">Hi Barry,</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">thanks for the suggestion. I tried this but doesn’t seem to work as expected. That is, configure actually works, but it is because it is not seeing the LLVM based compilers, only the intel classical ones. Yet the variables seem correctly
exported.</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Paolo</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="mso-element:para-border-div;border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" style="border:none;padding:0cm"><b>Da: </b><a href="mailto:bsmith@petsc.dev">Barry Smith</a><br>
<b>Inviato: </b>lunedì 3 ottobre 2022 15:19<br>
<b>A: </b><a href="mailto:paololampitella@hotmail.com">Paolo Lampitella</a><br>
<b>Cc: </b><a href="mailto:petsc-users@mcs.anl.gov">petsc-users@mcs.anl.gov</a><br>
<b>Oggetto: </b>Re: [petsc-users] How to use Intel OneApi mpi wrappers on Linux</p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Menlo",serif">bsmith@petsc-01:~$ mpicc<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Menlo",serif">This script invokes an appropriate specialized C MPI compiler driver.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Menlo",serif">The following ways (priority order) can be used for changing default<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Menlo",serif">compiler name (gcc):<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Menlo",serif"> 1. Command line option: -cc=<compiler_name><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Menlo",serif"> 2. Environment variable: I_MPI_CC (current value '')<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Menlo",serif"> 3. Environment variable: MPICH_CC (current value '')<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><br>
<br>
<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Menlo",serif">So </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Menlo",serif">export I_MPI_CC=icx </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Menlo",serif">export I_MPI_CXX=icpx</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Menlo",serif">export I_MPI_FC=ifx </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Menlo",serif">should do the trick.</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><br>
<br>
<o:p></o:p></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p class="MsoNormal">On Oct 3, 2022, at 5:43 AM, Paolo Lampitella <<a href="mailto:paololampitella@hotmail.com">paololampitella@hotmail.com</a>> wrote:<o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">Dear PETSc users and developers,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">as per the title, I recently installed the base and HPC Intel OneApi toolkits on a machine running Ubuntu 20.04.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">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).<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">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.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">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:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">mpiicc -cc=icx<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">mpiicpc -cxx=icpx<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">mpiifort -fc=ifx<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">The problem I have is that I have no idea how to pass them correctly to the configure and whatever comes after that.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">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.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">I started with an alias in my .bash_aliases (which works for simple compilation tests from command line) but doesn’t with configure.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">I also tried adding the flags to the COPTFLAGS, CXXOPTFLAGS and FOPTFLAGS but didn’t work as well.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Do you have any experience with the new Intel compilers and, in case, could you share hot to properly use them with MPI?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Thanks<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Paolo<o:p></o:p></p>
</div>
</div>
</blockquote>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>