To clarify - I would like to have a petsc test with MSYS2 working.

Previously I was lost with MSYS2 - so I stick with what I'm familiar with. 
However with your instructions - I'm hoping to make progress.

What I object to are suggestions (that come up regularly) of replacing what we 
currently have with:
- WSL2
- MSYS2

Satish


On Sun, 28 Jun 2020, Pierre Jolivet wrote:

> Hello Paolo,
> 
> > On 28 Jun 2020, at 4:19 PM, Satish Balay <ba...@mcs.anl.gov> wrote:
> > 
> > On Sun, 28 Jun 2020, Paolo Lampitella wrote:
> > 
> >>  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:
> >> 
> >> 
> >> 
> >> https://doc.freefem.org/introduction/installation.html#compilation-on-windows
> >> 
> 
> Sorry, our (FreeFEM) documentation is not the best…
> 
> MSYS2+MinGW64 is a fantastic tool to deploy .exe with PETSc.
> For example, in this .exe 
> https://github.com/FreeFem/FreeFem-sources/releases/download/v4.6/FreeFEM-4.6-win7-64.exe
>  
> <https://github.com/FreeFem/FreeFem-sources/releases/download/v4.6/FreeFEM-4.6-win7-64.exe>,
>  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 :)
> There are some tricks, that you can copy/paste from 
> https://github.com/FreeFem/FreeFem-sources/blob/master/3rdparty/ff-petsc/Makefile#L99-L120
>  
> <https://github.com/FreeFem/FreeFem-sources/blob/master/3rdparty/ff-petsc/Makefile#L99-L120>
> 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:
> '--download-metis-cmake-arguments=-G "MSYS Makefiles"' 
> '--download-parmetis-cmake-arguments=-G "MSYS Makefiles"' 
> '--download-superlu-cmake-arguments=-G "MSYS Makefiles"'
> 
> This is tested on a daily basis on Windows 7 and Windows 10, so I’m a little 
> puzzled by your MPI problems.
> I’d suggest you stick to MS-MPI (that’s what we use and it’s trivial to 
> install on MSYS2 https://packages.msys2.org/package/mingw-w64-x86_64-msmpi 
> <https://packages.msys2.org/package/mingw-w64-x86_64-msmpi>).
> 
> I’m not sure this is specific to PETSc, so feel free to have a chat in 
> private.
> 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.
> 
> Thanks,
> Pierre
> 
> >> 
> >> 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).
> >> 
> >> 
> >> 
> >> As a side note, there seems to be an official effort in porting petsc to 
> >> msys2 
> >> (https://github.com/okhlybov/MINGW-packages/tree/whpc/mingw-w64-petsc), 
> >> but it didn’t get into the official packages yet, which I interpret as a 
> >> warning
> >> 
> >> 
> >> 
> >>  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
> >>  2.  Didn’t try PGI as I actually didn’t know if I would then been able to 
> >> make PETSc work.
> >> 
> >> So, here there are some questions I have with respect to where I stand now 
> >> and the points above:
> >> 
> >> 
> >>     *   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?
> > 
> > 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.
> > 
> >>     *   What about the PGI route? I don’t see it mentioned as well. I 
> >> guess it would require some work on win32fe
> > 
> > Again - no experience here.
> > 
> >>     *   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?
> > 
> > I would think Cygwin-GNU route should work. I'll have to see if I can 
> > reproduce the issues you have.
> > 
> > Satish
> > 
> >>     *   More generally, is there some known working, albeit non official, 
> >> route given my constraints (free+fortran+windows+mpi+petsc)?
> >> 
> >> Thanks for your attention and your great work on PETSc
> >> 
> >> Best regards
> >> 
> >> Paolo Lampitella
> 
> 

Reply via email to