[petsc-dev] Preferred Windows Installation

Satish Balay balay at mcs.anl.gov
Mon Jun 15 20:46:49 CDT 2020


And what windows binaries are you thinking off - that running in WSL will help with PETSc usage? [and which mode of PETSc  usage?]

Note: PETSc is a library - so you build the library - and link with other libraries to build applications.

As far as I know you WSL doesn't provide this compatibly [i.e compile with gcc on WSL - and then link with some MS native library - either via gcc or via MS cl]

And even if you can run 'cl' in WSL - how does it work with WSL paths - when specifying -I/path etc options? So you can't really build PETSc with 'cl' in WSL.

If these features are available - we still have to build the duplicate of the infrastructure that we already have with cygwin [to build native binaries with cl]

And if there is no such requirement of working with native libraries [or running PETSc as native binary] - then why bother with mixing with MS side at-all? Use linux side to build the libraries and create linux binaries of the application. Once you have the linux binaries of petsc application - use them in whatever way that WSL supports using them.

Satish

On Mon, 15 Jun 2020, Jacob Faibussowitsch wrote:

> > And if one needs windows native/libraries - then dealing with windows and its quirks is unavoidable. 
> WSL2 allows you to run windows binaries natively inside WSL I believe https://docs.microsoft.com/en-us/windows/wsl/interop#run-windows-tools-from-linux <https://docs.microsoft.com/en-us/windows/wsl/interop#run-windows-tools-from-linux> without breaking the illusion of linux.
>  
> Best regards,
> 
> Jacob Faibussowitsch
> (Jacob Fai - booss - oh - vitch)
> Cell: (312) 694-3391
> 
> > On Jun 15, 2020, at 8:27 PM, Satish Balay <balay at mcs.anl.gov> wrote:
> > 
> > And if one needs windows native/libraries - then dealing with windows and its quirks is unavoidable. Its orthogonal to cygwin.
> > 
> > Satish
> > 
> > On Mon, 15 Jun 2020, Satish Balay via petsc-dev wrote:
> > 
> >> Sure - if WSL is sufficient for a use case that is fine. Its a simpler way to install something equivalent to a Linux VM on windows.
> >> 
> >> cygwin instructions are for building native windows binaries with MS compilers. [usable with other MS native libraries]. If this is not the use-case - its easier to just use linux - or linux equvalent like WSL
> >> 
> >> Satish
> >> 
> >> 
> >> On Mon, 15 Jun 2020, Jacob Faibussowitsch wrote:
> >> 
> >>> Hello All,
> >>> 
> >>> Having recently had to assist a coworker in setting up a petsc install on windows and running into a whole host of issues with getting Cygwin and an overly aggressive windows defender (of all things) to play nice I discovered WSL, specifically WSL2. With regards to ease-of-use and install time, WSL2 was by far easier to do than Cygwin. The only out of the ordinary step required was turning on virtualization in the BIOS but this seems like it is not a common step, and after installing an ubuntu distro it was smooth sailing.
> >>> 
> >>> The only performance hiccup that I have so far encountered when using WSL2 is that I/O performance when pulling from the windows filesystem in /mnt/c/foo/bar is somewhat slower than just moving files within the VM itself, but in my opinion this is relatively minor. Additionally while there is no current way to use CUDA on WSL, NVIDIA has apparently already started a limited test-release for WSL2.
> >>> 
> >>> Currently, from the installation page it seems like Cygwin is the preferred method of installing petsc on windows but if it is this easy to get things up and running with WSL2 (and the above performance qualms are satisfied) then we should consider making it the default. 
> >>> 
> >>> Best regards,
> >>> 
> >>> Jacob Faibussowitsch
> >>> (Jacob Fai - booss - oh - vitch)
> >>> Cell: (312) 694-3391
> >>> 
> >>> 
> >> 
> > 
> 
> 



More information about the petsc-dev mailing list