mersenneforum.org  

Go Back   mersenneforum.org > Great Internet Mersenne Prime Search > Software

Reply
 
Thread Tools
Old 2020-07-09, 14:04   #1
storm5510
Random Account
 
storm5510's Avatar
 
Aug 2009
U.S.A.

32·173 Posts
Default 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 mprime 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 worktodo file. Placing sudo 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 sudo 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 mprime 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 Prime95. it is set to two threads for a single worker and two threads for the helper. I did this in local.txt. 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!

storm5510 is offline   Reply With Quote
Old 2020-07-09, 16:58   #2
M344587487
 
M344587487's Avatar
 
"Composite as Heck"
Oct 2017

5×127 Posts
Default

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.
M344587487 is offline   Reply With Quote
Old 2020-07-09, 19:50   #3
kriesel
 
kriesel's Avatar
 
"TF79LL86GIMPS96gpu17"
Mar 2017
US midwest

116F16 Posts
Default

Quote:
Originally Posted by storm5510 View Post
I used a command prompt window to do a directory search of the HD to find the mprime folder I had created with the Ubuntu shell. It was way down in the User/AppData area.
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.)
kriesel is online now   Reply With Quote
Old 2020-07-10, 00:05   #4
storm5510
Random Account
 
storm5510's Avatar
 
Aug 2009
U.S.A.

32·173 Posts
Default

Quote:
Originally Posted by M344587487 View Post
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.
WSL1 most likely as this is v1909. I believe WSL2 is a v2004 feature and also requires a VM setup as well.

Quote:
Originally Posted by 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.)
All the files are visible in both environments. I only modify three: prime.txt, local.txt, and worktodo.txt. I read results.txt. 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 mprime 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 CoresPerTest from 4 to 3. The performance impact was minimal. 10 minute tests became 11 minutes.
storm5510 is offline   Reply With Quote
Old 2020-07-10, 12:47   #5
Happy5214
 
Happy5214's Avatar
 
"Alexander"
Nov 2008
The Alamo City

2·33·7 Posts
Default

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).
Happy5214 is offline   Reply With Quote
Old 2020-07-10, 13:16   #6
Xyzzy
 
Xyzzy's Avatar
 
"Mike"
Aug 2002

13·593 Posts
Default

Try:

cd /mnt/c/Users/"your username"/Desktop
Xyzzy is offline   Reply With Quote
Old 2020-07-10, 14:47   #7
storm5510
Random Account
 
storm5510's Avatar
 
Aug 2009
U.S.A.

32×173 Posts
Default

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 mprime folder. As it turned out, I already had it.

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

Code:
C:\Users\ndway\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc\LocalState\rootfs\mprime

Last fiddled with by storm5510 on 2020-07-10 at 14:59 Reason: Additional
storm5510 is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Windows Subsystem for Linux v2 gets real Linux kernel tServo Software 0 2019-05-07 16:59
compiling mprime on linux graysky Software 6 2011-03-14 07:00
mprime and linux Echoblade Information & Answers 3 2007-06-24 22:28
going from linux to windows nbv4 Software 1 2006-04-04 02:04
MPrime on Linux optim Software 13 2003-12-06 04:27

All times are UTC. The time now is 22:36.

Thu Oct 1 22:36:01 UTC 2020 up 21 days, 19:46, 0 users, load averages: 1.18, 1.52, 1.53

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

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.