compiling version 6.0 for windows

Miscellaneous discussion topics about Code_Saturne (development, ...)
Post Reply
roberto.bernetti
Posts: 34
Joined: Tue Apr 16, 2019 10:03 pm

compiling version 6.0 for windows

Post by roberto.bernetti »

Dear All
is there anyone working on compiling the production version 6.0 on a MS Windows system?
In any event is it possible to discuss here about the effort needed to obtain such goal?
For example starting from :
  • list of the prerefquisittes necessary
  • the sequence of task necessary for a succesful compilation and the release of a windows binary
Saluti
Roberto
Yvan Fournier
Posts: 4153
Joined: Mon Feb 20, 2012 3:25 pm

Re: compiling version 6.0 for windows

Post by Yvan Fournier »

Hello,

On our side, I ran a few tests for an alternative approach:
  • Use the graphical interface natively on Windows (using PyQt, and Pyside 2 n the near future)
  • Installing the non-graphical portions in the Windows subsystem for Linux (or providing a Docker container with that portion)
I ran a simple test with an Intern in which code_saturne was istalled in the WSL, and we simply copied the GUI Python code to another directory under Windows, and were able to run it using Windows native PyQt. To do things more cleanly will require a bit of additional "cleanup/modularity work" on the GUI/Python code, and some local changes in the build system, but does not require a full build, so we could have that relatively soon.

To do a full, native Windows build, a full revamp of the build system would probably be necessary, and I have no sign of anybody working on that.

Finally, building a full Windows installer would require yet more work, and the main difficulty is keeping it up to date (not actually difficult, but needs to be fully redone if not maintained for a period of time longer than a year or 2).

Were you thinking of of binary installer (need help) or just getting the code to work on Windows (almost there) ?

The discussion can continue on this forum, and if it becomes more specific/active/task oriented, can be continue on the bug-tracker.

Best regards,

Yvan
roberto.bernetti
Posts: 34
Joined: Tue Apr 16, 2019 10:03 pm

Re: compiling version 6.0 for windows

Post by roberto.bernetti »

Hi
Yvan Fournier wrote: Tue Nov 05, 2019 1:37 pm ...........

Were you thinking of of binary installer (need help) or just getting the code to work on Windows (almost there) ?
I was thinking as a first step to know how to make the code working on Windows and following your hints it is necessary to install on Windows:
  • WSL (with Debian with all the dependancy highlilghted in the standard installation manual....with the name of the debian package if possible :D )
  • Python 3.8
Then
  • an insight on how to do the local change in the build system
  • some test to evaluate the performace.
Last but not least I wonder if the parallel feature of the code is retained using the WSL 1 and if it still work using a cluster of windows box or mixed OSes.
Saluti
Roberto
Yvan Fournier
Posts: 4153
Joined: Mon Feb 20, 2012 3:25 pm

Re: compiling version 6.0 for windows

Post by Yvan Fournier »

Hello,

To run on Windows, the first quick step would be to install on the WSL (Debian, Ubuntu, another: your choice) as if you were on Linux, including the graphical part. You can then install an X server to run the graphical interface.

The solution I mentioned to use Native Windows Python/Qt should be ready at the end of the year or beginning of 2020, but I will not have the time to work on it before mid-December. If you really want to test it and work on it yourself, I could explain briefly how we did a short test/proof of concept and which files you need to modify, but in any case it is easier to start from a full install on the WSL.

If you install MPI on the WSL, I see no reason why you would lose the parallelism as long a you are on the same Windows box. To run in parallel across multiple machines or on a cluster, you need to configure MPI across all those boxes. I assume this might be feasible if all are running the WSL, or a mix of Windows with the WSL and the same Linux version natively on other machines. But in this case, you also need to configure the batch system.

Also, the code_saturne scripts assume that in parallel, a shared filesystem is available. On most high-performance clusters, this is a true parallel filesystem such as GPFS or LUSTRE, but on smaller clusters, a shared NFS filesystem will do, as long as you avoid massive I/O.
In any case, running on a heterogeneous cluster is more difficult (you need to install the code on similar paths on each machine, avoid mixing big-endian/little-endian, and configure MPI accordingly), and load balancing can be a pain.
And when running on multiple nodes, performance will be highly dependent on network performance, so if you have Infiniband or some other fast network, things are fine, but if you only have Ethernet, things may be slow.

Running smaller cases and setting-up small to medium (or even quite large) cases on Windows and running cases which are too large for good performance on a single node on Linux clusters seems a practical/realistic approach.

Regards,

Yvan
roberto.bernetti
Posts: 34
Joined: Tue Apr 16, 2019 10:03 pm

Re: compiling version 6.0 for windows

Post by roberto.bernetti »

Yvan Fournier wrote: Thu Nov 07, 2019 7:35 pm Hello,

..... files you need to modify, but in any case it is easier to start from a full install on the WSL.
....
Regards,

Yvan
So I start from a full install on WSL.
I installed WSL with Debian. Using a windows insder version of MSWindows 10 allowing to use WSL 1 or 2
Surfing the net, if I grap it correctly, WSL 1 needs an x-server on MS-Windows side, while with WSL 2 the linux kernel is inside WSL allowing for a correct handle of all the system call.
Saluti
Roberto
Yvan Fournier
Posts: 4153
Joined: Mon Feb 20, 2012 3:25 pm

Re: compiling version 6.0 for windows

Post by Yvan Fournier »

Hello Roberto,

I do not know much about the differences betwen the WSL and WSL2. In any case, for the tests we ran, we used an X server for Windows (I don't remember which one, it was not on my machine, but it was one of the up to date/maintained free X servers, such as VcXsrv or Xming).

We also needed to add "export DISPLAY=:0" in the WSL terminal from which we ran "code_saturne gui" for the GUI to work (DISPLAY=:0 or :1 is often by default on Linux, not on the WSL).

Best regards,

Yvan
Post Reply