<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=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On 28 Jun 2020, at 5:13 PM, Paolo Lampitella <<a href="mailto:paololampitella@hotmail.com" class="">paololampitella@hotmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="WordSection1" style="page: WordSection1; caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; 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 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Hello Pierre,</div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">thank you very much. Knowing that you actually test it on a daily basis is already enough for me to then focus on the MSYS2-MinGw64 toolchain, which would be more straighforward to deploy (instead of having someone install cygwin) and valuable to reuse.</div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">I already had the impression that your work on it was recent but, knowing that your actual code is C++, and seeing some recent issues with MS-MPI and gfortran, say</div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><a href="https://github.com/microsoft/Microsoft-MPI/issues/33" style="color: blue; text-decoration: underline;" class="">https://github.com/microsoft/Microsoft-MPI/issues/33</a></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">gave me the impression that the overall toolchain was poorly mantained/tested by Microsoft on the fortran side and maybe this could go undetected in non fortran projects.</div></div></div></blockquote><div><br class=""></div><div>It may be poorly tested, but it’s working, at least with MUMPS, see attached screenshot.</div><div>What I’d suggest is:</div><div>1) start from scratch with MSYS2 MS-MPI + mingw-w64-x86_64-toolchain, mingw-w64-x86_64-openblas, flex, gawk, gcc, gcc-fortran, gcc-libs, stuff like that (all installed by pacman, cf. <a href="https://github.com/FreeFem/FreeFem-sources/blob/master/etc/jenkins/deployRelease/README.md#windows-system" class="">https://github.com/FreeFem/FreeFem-sources/blob/master/etc/jenkins/deployRelease/README.md#windows-system</a>)</div><div>2) you need to explicitly _remove_ mingw-w64-x86_64-python because PETSc ./configure cannot work with it (there has been recent changes w.r.t. Python 3 so maybe it’s better now): pacman -R mingw-w64-x86_64-python mingw-w64-x86_64-gdb</div><div>3) then use the same makefile as we use for PETSc</div><div>Do not hesitate if you run into issues.</div><div><br class=""></div><div>Thanks,</div><div>Pierre</div><div><br class=""></div><div><img apple-inline="yes" id="231375EB-8ADF-4523-905E-CCA8AEA3A900" width="640" height="409" src="cid:6C049CBE-D8F1-436D-99B9-7729C397C119@numericable.fr" class=""></div><br class=""><blockquote type="cite" class=""><div class=""><div class="WordSection1" style="page: WordSection1; caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; 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 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">I can also confirm that my problems with MSYS2 and MinGW64 already started at the MPI level and had nothing to do with PETSc… yet.</div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">At this point, I guess, we can either go off radar (if there really isn’t much love for MSYS2 here<span class="Apple-converted-space"> </span><span style="font-family: "Segoe UI Emoji", sans-serif;" class="">😉</span>) or keep it going.</div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">I will try to rework everything from scratch with MSYS2 and first make extensive MPI tests again. Maybe expect to be bothered again when I try to reuse your Makefile<span class="Apple-converted-space"> </span><span style="font-family: "Segoe UI Emoji", sans-serif;" class="">😉</span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Thanks again</div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Paolo</div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Inviato da<span class="Apple-converted-space"> </span><a href="https://go.microsoft.com/fwlink/?LinkId=550986" style="color: blue; text-decoration: underline;" class="">Posta</a><span class="Apple-converted-space"> </span>per Windows 10</div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="border-style: solid none none; border-top-width: 1pt; border-top-color: rgb(225, 225, 225); padding: 3pt 0cm 0cm;" class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; border: none; padding: 0cm;" class=""><b class="">Da:<span class="Apple-converted-space"> </span></b><a href="mailto:pierre.jolivet@enseeiht.fr" style="color: blue; text-decoration: underline;" class="">Pierre Jolivet</a><br class=""><b class="">Inviato:<span class="Apple-converted-space"> </span></b>domenica 28 giugno 2020 16:42<br class=""><b class="">A:<span class="Apple-converted-space"> </span></b><a href="mailto:paololampitella@hotmail.com" style="color: blue; text-decoration: underline;" class="">Paolo Lampitella</a><br class=""><b class="">Cc:<span class="Apple-converted-space"> </span></b><a href="mailto:balay@mcs.anl.gov" style="color: blue; text-decoration: underline;" class="">Satish Balay</a>;<span class="Apple-converted-space"> </span><a href="mailto:petsc-users@mcs.anl.gov" style="color: blue; text-decoration: underline;" class="">petsc-users</a><br class=""><b class="">Oggetto:<span class="Apple-converted-space"> </span></b>Re: [petsc-users] PETSc and Windows 10</div></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Hello Paolo,<o:p class=""></o:p></div><div class=""><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><br class=""><br class=""><o:p class=""></o:p></div><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">On 28 Jun 2020, at 4:19 PM, Satish Balay <<a href="mailto:balay@mcs.anl.gov" style="color: blue; text-decoration: underline;" class="">balay@mcs.anl.gov</a>> wrote:<o:p class=""></o:p></div></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div class=""><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">On Sun, 28 Jun 2020, Paolo Lampitella wrote:<br class=""><br class=""><br class=""><o:p class=""></o:p></div><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><p class="MsoNormal" style="margin: 0cm 0cm 12pt; font-size: 11pt; font-family: Calibri, sans-serif;"> 1.  MSYS2+MinGW64 compilers. I understood that MinGW is not well supported, probably because of how it handles paths, but I wanted to give it a try, because it should be more “native” and there seems to be relevant examples out there that managed to do it. I first tried with the msys2 mpi distribution, produced the .mod file out of the mpi.f90 file in the distribution (I tried my best with different hacks from known limitations of this file as also present in the official MS-MPI distribution) and tried with my code without petsc, but it failed in compiling the code with some strange MPI related error (argument mismatch between two unrelated MPI calls in the code, which is non sense to me). In contrast, simple mpi tests (hello world like) worked as expected. Then I decided to follow this:<br class=""><br class=""><br class=""><br class=""><a href="https://doc.freefem.org/introduction/installation.html#compilation-on-windows" style="color: blue; text-decoration: underline;" class="">https://doc.freefem.org/introduction/installation.html#compilation-on-windows</a><o:p class=""></o:p></p></blockquote></div></div></blockquote><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Sorry, our (FreeFEM) documentation is not the best…<o:p class=""></o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">MSYS2+MinGW64 is a fantastic tool to deploy .exe with PETSc.<o:p class=""></o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">For example, in this .exe <a href="https://github.com/FreeFem/FreeFem-sources/releases/download/v4.6/FreeFEM-4.6-win7-64.exe" style="color: blue; text-decoration: underline;" class="">https://github.com/FreeFem/FreeFem-sources/releases/download/v4.6/FreeFEM-4.6-win7-64.exe</a>, we ship PETSc + SLEPc (in real + complex) with MS-MPI, hypre, MUMPS, ScaLAPACK, SuperLU, SuiteSparse, ParMETIS, METIS, SCOTCH, TetGen, HPDDM, all compiled by PETSc, needless to say :)<o:p class=""></o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">There are some tricks, that you can copy/paste from <a href="https://github.com/FreeFem/FreeFem-sources/blob/master/3rdparty/ff-petsc/Makefile#L99-L120" style="color: blue; text-decoration: underline;" class="">https://github.com/FreeFem/FreeFem-sources/blob/master/3rdparty/ff-petsc/Makefile#L99-L120</a><o:p class=""></o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Basically, hypre + MinGW64 does not work if you don’t supply '--download-hypre-configure-arguments=--build=x86_64-linux-gnu --host=x86_64-linux-gnu' and all CMake packages need an additional flag as well:<o:p class=""></o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">'--download-metis-cmake-arguments=-G "MSYS Makefiles"' '--download-parmetis-cmake-arguments=-G "MSYS Makefiles"' '--download-superlu-cmake-arguments=-G "MSYS Makefiles"'<o:p class=""></o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">This is tested on a daily basis on Windows 7 and Windows 10, so I’m a little puzzled by your MPI problems.<o:p class=""></o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">I’d suggest you stick to MS-MPI (that’s what we use and it’s trivial to install on MSYS2 <a href="https://packages.msys2.org/package/mingw-w64-x86_64-msmpi" style="color: blue; text-decoration: underline;" class="">https://packages.msys2.org/package/mingw-w64-x86_64-msmpi</a>).<o:p class=""></o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">I’m not sure this is specific to PETSc, so feel free to have a chat in private.<o:p class=""></o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">But I guess we can continue on the mailing list as well, it’s just that there is not much love for MSYS2 over here, sadly.<o:p class=""></o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Thanks,<o:p class=""></o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Pierre<o:p class=""></o:p></div></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><br class=""><br class=""><o:p class=""></o:p></div><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div class=""><div class=""><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><br class="">but the exact same type of error came up (MPI calls in my code were different, but the error was the same). Trying again from scratch (i.e., without all the things I did in the beginning to compile my code) the same error came up in compiling some of the freefem dependencies (this time not even mpi calls).<br class=""><br class=""><br class=""><br class="">As a side note, there seems to be an official effort in porting petsc to msys2 (<a href="https://github.com/okhlybov/MINGW-packages/tree/whpc/mingw-w64-petsc" style="color: blue; text-decoration: underline;" class="">https://github.com/okhlybov/MINGW-packages/tree/whpc/mingw-w64-petsc</a>), but it didn’t get into the official packages yet, which I interpret as a warning<br class=""><br class=""><br class=""><br class=""> 1.  Didn’t give a try to cross compiling with MinGw from Linux, as I tought it couldn’t be any better than doing it from MSYS2<br class=""> 2.  Didn’t try PGI as I actually didn’t know if I would then been able to make PETSc work.<br class=""><br class="">So, here there are some questions I have with respect to where I stand now and the points above:<br class=""><br class=""><br class="">    *   I haven’t seen the MSYS2-MinGw64 toolchain mentioned at all in official documentation/discussions. Should I definitely abandon it (despite someone mentioning it as working) because of known issues?<o:p class=""></o:p></div></blockquote><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><br class="">I don't have experience with MSYS2-MinGw64, However Pierre does - and perhaps can comment on this. I don't know how things work on the fortran side.<br class=""><br class=""><br class=""><o:p class=""></o:p></div><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">    *   What about the PGI route? I don’t see it mentioned as well. I guess it would require some work on win32fe<o:p class=""></o:p></div></blockquote><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><br class="">Again - no experience here.<br class=""><br class=""><br class=""><o:p class=""></o:p></div><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">    *   For my Cygwin-GNU route (basically what is mentioned in PFLOTRAN documentation), am I expected to then run from the cygwin terminal or should the windows prompt work as well? Is the fact that I require a second Enter hit and the mismanagement of serial executables the sign of something wrong with the Windows prompt?<o:p class=""></o:p></div></blockquote><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><br class="">I would think Cygwin-GNU route should work. I'll have to see if I can reproduce the issues you have.<br class=""><br class="">Satish<br class=""><br class=""><br class=""><o:p class=""></o:p></div><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">    *   More generally, is there some known working, albeit non official, route given my constraints (free+fortran+windows+mpi+petsc)?<br class=""><br class="">Thanks for your attention and your great work on PETSc<br class=""><br class="">Best regards<br class=""><br class="">Paolo Lampitella</div></blockquote></div></div></blockquote></div></div></div></div></blockquote></div><br class=""></body></html>