mersenneforum.org

mersenneforum.org (https://www.mersenneforum.org/index.php)
-   Software (https://www.mersenneforum.org/forumdisplay.php?f=10)
-   -   MPrime with Windows 10 Linux Subsystem (https://www.mersenneforum.org/showthread.php?t=25715)

storm5510 2020-07-09 14:04

MPrime with Windows 10 Linux Subsystem
 
Getting all this set up was a learning experience. After loosening a few teeth I managed to get it all working properly. Ubuntu 20.04 LTS is the Linux side. I had to cheat a bit to get all the files in the proper place. I used a command prompt window to do a directory search of the HD to find the [I]mprime[/I] folder I had created with the Ubuntu shell. It was way down in the User/AppData area. Once I navigated to it, I pinned it in the File Explorer.

I tried to run it by using the standard ./mprime -d command inside the shell. It said it was unable to create some files and could not find my [U]worktodo[/U] file. Placing [I]sudo[/I] at the front solved the problem. In this shell-only setup, I do not know if the permissions can be elevated to where the use of [I]sudo[/I] would not be needed.

There is one concern: Heat. During Stage 1, the temperature of the CPU will stay above 85°C and will sometimes spike to 90°C. The "Throttle" setting does not work with [I]mprime[/I] in this case. I suspect this has more to do with Windows 10 than anything else. There is probably another way to cut the heat down some, Affinity. In [I]Prime95[/I]. it is set to two threads for a single worker and two threads for the helper. I did this in [U]local.txt[/U]. Changing this to one and three might help.

This is all I have. I shared this in case anyone in the future wanted to try doing this. If anyone has any suggestions or comments, please feel free to write them. Thank you!

:smile:

M344587487 2020-07-09 16:58

Do you know if it's WSL1 or WSL2? I haven't tried WSL2, it's a relatively new feature that AFAIK replaces WSL1. WSL2 is basically a VM using hyper-V whereas WSL1 uses a translation layer, similar to wine but for ELF binaries. WSL2 has been reported to have reduced performance for some workloads but higher performance in others.

kriesel 2020-07-09 19:50

[QUOTE=storm5510;550109]I used a command prompt window to do a directory search of the HD to find the [I]mprime[/I] folder I had created with the Ubuntu shell. [B]It was way down in the User/AppData area.[/B][/QUOTE]That is what I called "well hidden" in my WSL1 experimentation. And files created by one OS might be invisible to the other in the same directory. (Using a Windows editor to create worktodo.txt for mprime would be futile, IIRC.)

storm5510 2020-07-10 00:05

[QUOTE=M344587487;550119]Do you know if it's WSL1 or WSL2? I haven't tried WSL2, it's a relatively new feature that AFAIK replaces WSL1. WSL2 is basically a VM using hyper-V whereas WSL1 uses a translation layer, similar to wine but for ELF binaries. WSL2 has been reported to have reduced performance for some workloads but higher performance in others.[/QUOTE]

WSL1 most likely as this is v1909. I believe WSL2 is a v2004 feature and also requires a VM setup as well.

[QUOTE=kriesel]That is what I called "well hidden" in my WSL1 experimentation. And files created by one OS might be invisible to the other in the same directory. (Using a Windows editor to create worktodo.txt for mprime would be futile, IIRC.)
[/QUOTE]

All the files are visible in both environments. I only modify three: [I]prime.txt[/I], [I]local.txt[/I], and [I]worktodo.txt[/I]. I read [I]results.txt[/I]. I can do this with Notepad. Everything else, I leave alone. Being able to do these things may be possible because this is a subsystem under Windows control. If I had a dual-boot drive setup with a complete OS of each, doing what I have written out above probably would not be possible because of partition types. There would be no need to do this.

I have to use "sudo" to get [I]mprime[/I] to run. This has to do with permissions and I would rather not mess with it.

In my OP, I wrote about a heat issue. I managed to get the temperature down a little by changing [C]CoresPerTest[/C] from 4 to 3. The performance impact was minimal. 10 minute tests became 11 minutes.

Happy5214 2020-07-10 12:47

When I was experimenting with WSL (not for mprime, but for a Perl script I used to receive LLR assignments from my server (before I rediscovered PRPNet)), I ended up adding a symlink for the LLR folder (something like "C:\Users\<censored>\rps\llr") under the WSL home folder. Symlinks are your friends (on *nix file systems, not NTFS).

Xyzzy 2020-07-10 13:16

Try:

[C]cd /mnt/c/Users/"your username"/Desktop[/C]

storm5510 2020-07-10 14:47

I am running everything in this setup on a SSD. I do not know the layout, so just for the sake of argument, I will refer to it as a mechanical. The boot record is in Sector 0. Among everything in that location, there is a descriptor for the file system. In this case, NTFS.

Being NTFS means everything stored in the volume must conform to it, including the subsystem. I have been at this since 1988 and, to my knowledge, two file systems cannot exist inside one volume. Multiple volumes can exist inside a partition, as is the case with the SSD and Windows 10 having two protected recovery volumes along with the boot volume.

The bottom line is that what I am doing works without problems. I was not expecting to be able to do so. I needed a simpler way to manage the files in the [I]mprime[/I] folder. As it turned out, I already had it.

[U]Edit[/U]: In my OP, I mention how deeply this is buried in the file system. Below is the full path to the [I]mprime[/I] folder.

[CODE]C:\Users\ndway\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc\LocalState\rootfs\mprime[/CODE]


All times are UTC. The time now is 19:43.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.