nrc-cnrc / EGSnrc

Toolkit for Monte Carlo simulation of ionizing radiation — Trousse d'outils logiciels pour la simulation Monte Carlo du rayonnement ionisant
http://nrc-cnrc.github.io/EGSnrc
GNU Affero General Public License v3.0
242 stars 146 forks source link

Windows Subsystem for Linux (WSL) #54

Closed crcrewso closed 3 years ago

crcrewso commented 8 years ago

This is the start of a WSL compatibility discussion for EGSnrc, If there are specific requests for certain functionality tests, please reply below.

After last week's announcement of the new, Microsoft supported method of getting Bash on windows I played around with it for a bit. The great news is that all of the command line utilities appear to work, and the only flaws related to the expected lack of an x server and kde. A known issue in the current release of WSL.

I would continue testing if not for the fact that the rest of the Windows 10 release was quite buggy, including my loosing the ability to file bug reports. I will append this issue with further testing when the WSL moves to a more stable testing branch of Windows 10.

Again please list anything you'd like me to test or attache inp and modules. I'd like to see just how capable a prototyping system one can run on this system.

ftessier commented 8 years ago

Thank you @crcrewso! The advent of a native bash shell and the ability to run ELF binaries directly within the Windows Subsystem for Linux bodes very well for EGSnrc on Windows! We are very interested to hear more on your testing efforts, please keep us up to date. We are looking forward to maintaining a single set of files and configuration scripts on all platforms.

crcrewso commented 8 years ago

The Fast ring is a bit unstable for the rest of my work and the known nano issue with the current WSL system is driving the current fast ring community a bit bonkers (I know I know, not using vim is a sin) so I'm going to delay further testing until the summer release of the stable environment. I'll keep checking on this thread if people want to submit specific test requests.

ftessier commented 8 years ago

Sounds good, we are looking forward to hearing back on the stable release!

crcrewso commented 8 years ago

The stable release is out. I've spent about a day testing and found a few things.

1) You can get GUI's working with some effort 2) Command line stuff works as expected, but the base Ubuntu image is missing a lot of default packages which need to be installed

Preparation steps 1) Read the windows guide about installing the Linux subsystem for Windows. 2) Install the WSL, 3) apt-get install git g++ gcc gfortran make 3) optional if you're going to be adding the gui's add tcl tk grace qtcreator and a text editor (geany and medit were my first two)

note this is where I deviated from 'normal'. I performed the unsupported and unapproved action of updating Ubuntu to 16.04.02

Then I got xserver working through the dbus hack which I tested with medit and xclock.

Once that was all squared away I was able to fetch the Develop branch of EGSnrc and build it using the EGSnrc_configure_linux utility.

I've also installed it from this point using HEN_HOUSE/scripts/configure, which is why I put in that feature request today.

I'm still testing and will write up something a bit better. I just wanted to get the basics down quickly.

ftessier commented 7 years ago

@crcrewso do you have any update on configuring EGSnrc under the Windows Subsytem for Linux (WSL)?

crcrewso commented 7 years ago

I don't really. If you treat WSL like ssl'ing into a server without X then our documentation matches the capabilities. Where it breaks down is with getting X and the guis working. All of these issues have solutions in the WSL community, but they change between versions.

There is a new version of the WSL coming out in the Windows 10 Creators Update. I am hoping that after testing that version will be a LOT more user friendly.

ftessier commented 7 years ago

So the EGSnrc configuration runs on WSL? What about running simulations, does that work as expected? If only the guis are not working, then we ought to start documenting this in the Windows install Wiki. Presumably one can use the pre-compiled guis for Windows in conjunction with a WSL install?

crcrewso commented 7 years ago

@ftessier I'd be happy to help with that, one suggestion would be that the documentation not go live until after the Creators Update, as they are finally launching a newer version of Ubuntu than 14.04.

The simulations do run as expected, I've only been able to validate results to a point as I was using it to design my scripts and input files but I was actually running them for result on clusters. So I was running 100,000 histories on my little intel 6Y30 (or the desktop 4 core i5) and rerunning at 100,000,000 on a cluster

What would you like to see from me to help with this documenation?

ftessier commented 7 years ago

Sounds good. If you want, create a new mardown wiki page called "Install EGSnrc on Windows WSL", and we can add it to the wiki. If you want to start from the existing Windows install wiki page, simply clone the wiki with git clone https://github.com/nrc-cnrc/EGSnrc.wiki.git. You won't be able to push but you can attach the file to a comment and we can include it (with acknowledgement).

crcrewso commented 7 years ago

I have a page started that I'll be working from and testing once the Creator's Update launches. I should be able to send the procedure back to you after a couple of weeks of testing.

At present it's written from the point of view of a Linux user who has to install on a windows machine. Should I spend time expanding it to 'a window's user who has seen a tiny bit of Linux'?

crcrewso commented 6 years ago

I thought I'd update this thread. the reason for my delay in submitting the notes is twofold. Ubuntu has not been totally clear on how they will depreciate the x11 packages in the archive through the 18.04. This affects using vcxsrv to display our GUI's (all work right now). Additionally WSL is just now coming out of Beta. I will shoot for getting this fully documented for the Spring Creators Update so it 'should' be fully tested for the 2019 release.

I hope to include documentation for the Ubuntu/Debian and Fedora releases (if Fedora ever launches) Is it worth my time to look at Suse too?

crcrewso commented 6 years ago

I have found a complete use stopping bug in the WSL layer. The power management 'features' they added at some point seem to cause recent branches of EGS to freeze if the OS think's you're not using active WSL apps. I'm trying to track it down but at this point I've had to revert back to VM's for runs longer than a couple minutes.