<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">Or you can use MinGW, it’s not tricky, you don’t need to change any PETSc code, and you can ship .exe for either x86_64 (mingw-w64-x86_64-gcc) or ARM (mingw-w64-clang-aarch64-clang, without MPI).<div><br></div><div>Thanks,</div><div>Pierre<br><div><br><blockquote type="cite"><div>On 7 Nov 2022, at 1:38 PM, hamid badi <badi.hamid@gmail.com> wrote:</div><br class="Apple-interchange-newline"><div><div dir="auto">You can try gcc/clang cross-compilers, it's a little but tricky, i had to change some petsc codes but it works fine.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le lun. 7 nov. 2022 à 13:30, Matthew Knepley <<a href="mailto:knepley@gmail.com">knepley@gmail.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div dir="ltr">On Mon, Nov 7, 2022 at 7:11 AM Mohammad Ali Yaqteen <<a href="mailto:mhyaqteen@sju.ac.kr" target="_blank" rel="noreferrer">mhyaqteen@sju.ac.kr</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>
<div lang="EN-US">
<div><p class="MsoNormal">Once I finish writing the code, the .exe file will not change. Can I make an .exe file using WSL2 and VScode?</p></div></div></div></blockquote><div><br></div><div>If you build in WSL2, it will link to system libraries. You would probably need to run in WSL2 after that. If you are planning</div><div>on running on native Windows, you likely need to build there.</div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div lang="EN-US"><div><p class="MsoNormal"><u></u></p><p class="MsoNormal">Thanks,<u></u><u></u></p><p class="MsoNormal">Ali<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p>
<div style="border-right:none;border-bottom:none;border-left:none;border-top:1pt solid rgb(225,225,225);padding:3pt 0in 0in"><p class="MsoNormal"><b>From:</b> Matthew Knepley <<a href="mailto:knepley@gmail.com" target="_blank" rel="noreferrer">knepley@gmail.com</a>> <br>
<b>Sent:</b> Monday, November 7, 2022 7:13 PM<br>
<b>To:</b> Mohammad Ali Yaqteen <<a href="mailto:mhyaqteen@sju.ac.kr" target="_blank" rel="noreferrer">mhyaqteen@sju.ac.kr</a>><br>
<b>Cc:</b> petsc-users <<a href="mailto:petsc-users@mcs.anl.gov" target="_blank" rel="noreferrer">petsc-users@mcs.anl.gov</a>><br>
<b>Subject:</b> Re: [petsc-users] PETSc Windows Installation<u></u><u></u></p>
</div><p class="MsoNormal"><u></u> <u></u></p>
<div>
<div><p class="MsoNormal">On Mon, Nov 7, 2022 at 12:21 AM Mohammad Ali Yaqteen <<a href="mailto:mhyaqteen@sju.ac.kr" target="_blank" rel="noreferrer">mhyaqteen@sju.ac.kr</a>> wrote:<u></u><u></u></p>
</div>
<div>
<blockquote style="border-top:none;border-right:none;border-bottom:none;border-left:1pt solid rgb(204,204,204);padding:0in 0in 0in 6pt;margin-left:4.8pt;margin-right:0in"><p class="MsoNormal">I have written backend code for a software company. If WSL2 and VSCode(Linux) can be called through a command line and executed at the backend, then it will be great. But if I have to install WSL2 and other required things on every other
PC that will run that software, then I think I will be at a disadvantage. What do you suggest?<u></u><u></u></p>
</blockquote>
<div><p class="MsoNormal"><u></u> <u></u></p>
</div>
<div><p class="MsoNormal">As long as you do not change the architecture and the compiler libraries are available, you can run the executable.<u></u><u></u></p>
</div>
<div><p class="MsoNormal"><u></u> <u></u></p>
</div>
<div><p class="MsoNormal"> Thanks,<u></u><u></u></p>
</div>
<div><p class="MsoNormal"><u></u> <u></u></p>
</div>
<div><p class="MsoNormal"> Matt<u></u><u></u></p>
</div>
<div><p class="MsoNormal"> <u></u><u></u></p>
</div>
<blockquote style="border-top:none;border-right:none;border-bottom:none;border-left:1pt solid rgb(204,204,204);padding:0in 0in 0in 6pt;margin-left:4.8pt;margin-right:0in"><p class="MsoNormal" style="margin-bottom:12pt">Thank you<br>
Ali<br>
<br>
-----Original Message-----<br>
From: Satish Balay <<a href="mailto:balay@mcs.anl.gov" target="_blank" rel="noreferrer">balay@mcs.anl.gov</a>>
<br>
Sent: Monday, November 7, 2022 12:00 AM<br>
To: Matthew Knepley <<a href="mailto:knepley@gmail.com" target="_blank" rel="noreferrer">knepley@gmail.com</a>><br>
Cc: Mohammad Ali Yaqteen <<a href="mailto:mhyaqteen@sju.ac.kr" target="_blank" rel="noreferrer">mhyaqteen@sju.ac.kr</a>>;
<a href="mailto:petsc-users@mcs.anl.gov" target="_blank" rel="noreferrer">petsc-users@mcs.anl.gov</a><br>
Subject: Re: [petsc-users] PETSc Windows Installation<br>
<br>
Likely the compilers are not setup correctly as per instructions.<br>
<br>
<a href="https://petsc.org/release/install/windows/#installation-with-microsoft-intel-windows-compilers" target="_blank" rel="noreferrer">https://petsc.org/release/install/windows/#installation-with-microsoft-intel-windows-compilers</a><br>
<br>
And if you do not have a specific windows need - and only need IDE - perhaps a WSL2 (aka linux) install with VSCode(linux) might be the way to go.<br>
<br>
Satish<br>
<br>
On Sun, 6 Nov 2022, Matthew Knepley wrote:<br>
<br>
> We need to see configure.log to see what is going on. Can you send it?<br>
> <br>
> Thanks,<br>
> <br>
> Matt<br>
> <br>
> On Sun, Nov 6, 2022 at 4:29 AM Mohammad Ali Yaqteen <br>
> <<a href="mailto:mhyaqteen@sju.ac.kr" target="_blank" rel="noreferrer">mhyaqteen@sju.ac.kr</a>><br>
> wrote:<br>
> <br>
> > Dear Sir/Madam,<br>
> ><br>
> ><br>
> ><br>
> > I am installing PETSc on windows but it keeps giving me unexpected errors.<br>
> > I want to use it on MS Visual Studio or Codeblocks. When I use the <br>
> > command on your webpage (./configure --with-cc='win32fe cl' <br>
> > --with-fc='win32fe ifort' --with-cxx='win32fe cl' --with-mpi=0 <br>
> > --download-fblaslapack), I get the following error message:<br>
> ><br>
> ><br>
> ><br>
> > $ ./configure --with-cc='win32fe cl' --with-fc='win32fe ifort'<br>
> > --with-cxx='win32fe cl' --with-mpi=0 --download-fblaslapack<br>
> ><br>
> ><br>
> > ====================================================================<br>
> > =========================<br>
> ><br>
> > Configuring PETSc to compile on your system<br>
> ><br>
> ><br>
> > ====================================================================<br>
> > =========================<br>
> ><br>
> > TESTING: checkCCompiler from<br>
> > config.setCompilers(config/BuildSystem/config/setCompilers.py:1341)*<br>
> > ********************************************************************<br>
> > **********<br>
> ><br>
> > UNABLE to CONFIGURE with GIVEN OPTIONS (see configure.log for<br>
> > details):<br>
> ><br>
> ><br>
> > --------------------------------------------------------------------<br>
> > -----------<br>
> ><br>
> > C compiler you provided with -with-cc=win32fe cl cannot be found or <br>
> > does not work.<br>
> ><br>
> > Cannot compile/link C with<br>
> > /home/SEJONG/petsc-3.18.1/lib/petsc/bin/win32fe/win32fe cl.<br>
> ><br>
> ><br>
> ><br>
> > Kindly look into this problem! Your prompt response will highly be <br>
> > appreciated<br>
> ><br>
> ><br>
> ><br>
> > Thank you<br>
> ><br>
> > Ali<br>
> ><br>
> <br>
> <br>
> <u></u><u></u></p>
</blockquote>
</div><p class="MsoNormal"><br clear="all">
<u></u><u></u></p>
<div><p class="MsoNormal"><u></u> <u></u></p>
</div><p class="MsoNormal">-- <u></u><u></u></p>
<div>
<div>
<div>
<div>
<div>
<div>
<div><p class="MsoNormal">What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>
-- Norbert Wiener<u></u><u></u></p>
</div>
<div><p class="MsoNormal"><u></u> <u></u></p>
</div>
<div><p class="MsoNormal"><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank" rel="noreferrer">https://www.cse.buffalo.edu/~knepley/</a><u></u><u></u></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div></blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div><div><br></div><div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank" rel="noreferrer">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>
</blockquote></div>
</div></blockquote></div><br></div></body></html>