Re: [petsc-dev] Preferred Windows Installation

2020-06-15 Thread Junchao Zhang
On Mon, Jun 15, 2020 at 8:33 PM 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
>  without
> breaking the illusion of linux.
>
The website you give only says "Run Windows tools from Linux" (such as
notepad), not "any windows binaries/apps".


>
> Best regards,
>
> Jacob Faibussowitsch
> (Jacob Fai - booss - oh - vitch)
> Cell: (312) 694-3391
>
> On Jun 15, 2020, at 8:27 PM, Satish Balay  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
>
>
>
>
>
>


Re: [petsc-dev] Preferred Windows Installation

2020-06-15 Thread Satish Balay via petsc-dev
On Mon, 15 Jun 2020, Jacob Faibussowitsch wrote:

> 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. 

BTW: https://www.mcs.anl.gov/petsc/documentation/installation.html#windows says:

>>>
Microsoft Windows Installation:
Are you sure you want to use Microsoft Windows? We recommend using Linux if 
possible [and minimize troubleshooting Microsoft windows related issues].
Installation With GNU gcc/g++/gfortran compilers:
The following configurations are much like regular Linux systems. Our regular 
[Linux] instructions should work with them. Most externalpackages will also 
work. The configure option --download-mpich should work for these systems. 
(These do not support Microsoft/Intel Windows compilers; nor can you use 
MS-MPI, Intel-MPI or MPICH2).

Cygwin Unix emulator for Microsoft Windows. See the instructions below for 
installing Cygwin for PETSc. Be sure to install the GNU compilers, do not use 
the win32fe script.
Windows Subsystem for Linux 2 (WLS2). Untested, let us know your experience.
Docker for Windows. Untested, let us know your experience.
Git bash. You must also install the GNU compilers via MinGW. Untested, let 
us know your experience.
Linux virtual machine via VirtualBox. One sample tutorial is at 
https://www.psychocats.net/ubuntu/virtualbox. Google can provide more 
tutorials. Untested, let us know your experience.

Installation With Microsoft/Intel Windows Compilers:




So we do mention all the ways of PETSc on windows *before* the installation 
instructions with MS Compilers [using Cygwin]

Sure - WSL line can do with updating. One reason its not the first and highly 
recommended mode is - Some windows users might not be comfortable with the 
whole linux sys-admin side of things on WSL. But its listed as one of the 5 
alternatives [to using MS Compilres]

Satish


Re: [petsc-dev] Preferred Windows Installation

2020-06-15 Thread Satish Balay via petsc-dev
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
>  
> 
>  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  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
> >>> 
> >>> 
> >> 
> > 
> 
> 



Re: [petsc-dev] Preferred Windows Installation

2020-06-15 Thread Jacob Faibussowitsch
> 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
 

 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  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
>>> 
>>> 
>> 
> 



Re: [petsc-dev] Preferred Windows Installation

2020-06-15 Thread Satish Balay via petsc-dev
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
> > 
> > 
> 



Re: [petsc-dev] Preferred Windows Installation

2020-06-15 Thread Satish Balay via petsc-dev
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
> 
> 



Re: [petsc-dev] Preferred Windows Installation

2020-06-15 Thread Matthew Knepley
On Mon, Jun 15, 2020 at 7:38 PM 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.
>

I agree with you. I think the hold-up was mostly that WSL was only
available on newer Windows distros. I think now enough time has
passed to reconsider this.

  Thanks,

 Matt


> Best regards,
>
> Jacob Faibussowitsch
> (Jacob Fai - booss - oh - vitch)
> Cell: (312) 694-3391
>
>

-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener

https://www.cse.buffalo.edu/~knepley/ 


[petsc-dev] Preferred Windows Installation

2020-06-15 Thread Jacob Faibussowitsch
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