<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 29 Jun 2020, at 6:27 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="">I think I made the first step of having mingw64 from msys2 working with ms-mpi.</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 found that the issue I was having was related to:</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://gcc.gnu.org/bugzilla/show_bug.cgi?id=91556" style="color: blue; text-decoration: underline;" class="">https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91556</a><o:p class=""></o:p></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="">and, probably (but impossible to check now), I was using an msys2 and/or mingw mpi package before this fix:<o:p class=""></o:p></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/msys2/MINGW-packages/commit/11b4cff3d2ec7411037b692b0ad5a9f3e9b9978d#diff-eac59989e3096be97d940c8f47b50fba" style="color: blue; text-decoration: underline;" class="">https://github.com/msys2/MINGW-packages/commit/11b4cff3d2ec7411037b692b0ad5a9f3e9b9978d#diff-eac59989e3096be97d940c8f47b50fba</a><o:p class=""></o:p></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="">Admittedly, I never used gcc 10 before on any machine. Still, I feel that reporting that sort of error in that way is,<o:p class=""></o:p></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">at least, misleading (I would have preferred the initial implementation as mentioned in the gcc bug track).<o:p class=""></o:p></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 second thing that I was not used to, and made me more uncertain of the procedure I was following, is having to compile myself the mpi module. There are several version of this out there, but I decided to stick with this one:<o:p class=""></o:p></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://www.scivision.dev/windows-mpi-msys2/" style="color: blue; text-decoration: underline;" class="">https://www.scivision.dev/windows-mpi-msys2/</a><o:p class=""></o:p></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="">even if there seems to be no need to include -fno-range-check and the current mpi.f90 version is different from the mpif.h as reported here:<o:p class=""></o:p></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><o:p class=""></o:p></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="">which, to me, are both signs of lack of attention on the fortran side by those that maintain this thing.<o:p class=""></o:p></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="">In summary, this is the procedure I followed so far (on a 64 bit machine with Windows 10):<o:p class=""></o:p></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><ul type="disc" style="margin-bottom: 0cm; margin-top: 0cm;" class=""><li class="MsoListParagraph" style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;">Install MSYS2 from<span class="Apple-converted-space"> </span><a href="https://www.msys2.org/" style="color: blue; text-decoration: underline;" class="">https://www.msys2.org/</a><span class="Apple-converted-space"> </span>and just follow the install wizard<o:p class=""></o:p></li><li class="MsoListParagraph" style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;">Open the MSYS2 terminal and execute: pacman -Syuu<o:p class=""></o:p></li><li class="MsoListParagraph" style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;">Close the terminal when asked and reopen it<o:p class=""></o:p></li><li class="MsoListParagraph" style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;">Keep executing ‘pacman -Syuu’ until nothing else needs to be updated<o:p class=""></o:p></li><li class="MsoListParagraph" style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;">Close the MSYS2 terminal and reopen it (I guess because was in paranoid mode), then install packages with:<o:p class=""></o:p></li></ul><div style="margin: 0cm 0cm 0.0001pt 36pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0cm 0cm 0.0001pt 70.8pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">pacman -S base-devel git gcc gcc-fortran bsdcpio lndir pax-git unzip<o:p class=""></o:p></div><div style="margin: 0cm 0cm 0.0001pt 70.8pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">pacman -S mingw-w64-x86_64-toolchain<o:p class=""></o:p></div><div style="margin: 0cm 0cm 0.0001pt 70.8pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">pacman -S mingw-w64-x86_64-msmpi<o:p class=""></o:p></div><div style="margin: 0cm 0cm 0.0001pt 70.8pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">pacman -S mingw-w64-x86_64-cmake<o:p class=""></o:p></div><div style="margin: 0cm 0cm 0.0001pt 70.8pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">pacman -S mingw-w64-x86_64-freeglut<o:p class=""></o:p></div><div style="margin: 0cm 0cm 0.0001pt 70.8pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">pacman -S mingw-w64-x86_64-gsl<o:p class=""></o:p></div><div style="margin: 0cm 0cm 0.0001pt 70.8pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">pacman -S mingw-w64-x86_64-libmicroutils<o:p class=""></o:p></div><div style="margin: 0cm 0cm 0.0001pt 70.8pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">pacman -S mingw-w64-x86_64-hdf5<o:p class=""></o:p></div><div style="margin: 0cm 0cm 0.0001pt 70.8pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">pacman -S mingw-w64-x86_64-openblas<o:p class=""></o:p></div><div style="margin: 0cm 0cm 0.0001pt 70.8pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">pacman -S mingw-w64-x86_64-arpack<o:p class=""></o:p></div><div style="margin: 0cm 0cm 0.0001pt 70.8pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">pacman -S mingw-w64-x86_64-jq<o:p class=""></o:p></div><div style="margin: 0cm 0cm 0.0001pt 36pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0cm 0cm 0.0001pt 36pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">This set should include all the libraries mentioned by Pierre and/or used by his Jenkins, as the final scope here is to have PETSc and dependencies working. But I think that for pure MPI one could stop to msmpi (even, maybe, just install msmpi and have the dependencies figured out by pacman). Honestly, I don’t remember the exact order I used to install the packages, but this should not affect things. Also, as I was still in paranoid mode, I kept executing ‘pacman -Syuu’ after each package was installed. After this, close the MSYS2 terminal.<o:p class=""></o:p></div><div style="margin: 0cm 0cm 0.0001pt 36pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><ul type="disc" style="margin-bottom: 0cm; margin-top: 0cm;" class=""><li class="MsoListParagraph" style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;">Open the MINGW64 terminal and create the .mod file out of the mpi.f90 file, as mentioned here<span class="Apple-converted-space"> </span><a href="https://www.scivision.dev/windows-mpi-msys2/" style="color: blue; text-decoration: underline;" class=""><span class="apple-converted-space"><span style="color: windowtext; text-decoration: none;" class="">https://www.scivision.dev/windows-mpi-msys2/</span></span></a>, with:<o:p class=""></o:p></li></ul><div style="margin: 0cm 0cm 0.0001pt 36pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0cm 0cm 0.0001pt 70.8pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">cd /mingw64/include<o:p class=""></o:p></div><div style="margin: 0cm 0cm 0.0001pt 70.8pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">gfortran mpif90 -c -fno-range-check -fallow-invalid-boz</div></div></div></blockquote><div><br class=""></div><div>Ah, yes, that’s new to gfortran 10 (we use gfortran 9 on our workers), which is now what’s ship with MSYS2 (we haven’t updated yet). Sorry that I forgot about that.</div><br class=""><blockquote type="cite" 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 36pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">This is needed to ‘USE mpi’ (as opposed to INCLUDE ‘mpif.h’)<o:p class=""></o:p></div><div style="margin: 0cm 0cm 0.0001pt 36pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><ul type="disc" style="margin-bottom: 0cm; margin-top: 0cm;" class=""><li class="MsoListParagraph" style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;">Install the latest MS-MPI (both sdk and setup) from<span class="Apple-converted-space"> </span><a href="https://www.microsoft.com/en-us/download/details.aspx?id=100593" style="color: blue; text-decoration: underline;" class=""><span class="apple-converted-space"><span style="color: windowtext; text-decoration: none;" class="">https://www.microsoft.com/en-us/download/details.aspx?id=100593</span></span></a><o:p class=""></o:p></li></ul><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’ve been able to compile (using the MINGW64 terminal) different mpi test programs and they run as expected in the classical Windows prompt. I added this function to my .bashrc in MSYS2 in order to easily copy the required dependencies out of MSYS:<o:p class=""></o:p></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 35.4pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">function copydep() { ldd $1 | grep "=> /$2" | awk '{print $3}' | xargs -I '{}' cp -v '{}' .; }<o:p class=""></o:p></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="">which can be used, with the MINGW64 terminal, by navigating to the folder where the final executable, say, my.exe, resides (even if under a Windows path) and executing:<o:p class=""></o:p></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 35.4pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">copydep my.exe mingw64<o:p class=""></o:p></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="">This, of course, must be done before actually trying to execute the .exe in the windows cmd prompt.<o:p class=""></o:p></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="">Hopefully, I should now be able to follow Pierre’s instructions for PETSc (but first I wanna give a try to the system python before removing it)</div></div></blockquote><div><br class=""></div><div>Looks like the hard part is over. It’s usually easier to deal with ./configure issues.</div><div>If you have weird errors like “incomplete Cygwin install” or whatever, this is the kind of issues I was referring to earlier.</div><div>In that case, what I’d suggest is just, as before:</div><div>pacman -R mingw-w64-x86_64-python mingw-w64-x86_64-gdb</div><div>pacman -S python</div><div><br class=""></div><div>Thanks,</div><div>Pierre</div><br class=""><blockquote type="cite" 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="">Thanks<o:p class=""></o:p></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></blockquote></div><br class=""></body></html>