Use of BOINC and WSL: some confusion

Message boards : Questions and problems : Use of BOINC and WSL: some confusion
Message board moderation

To post messages, you must log in.

1 · 2 · Next

AuthorMessage
RobbieMackenzie

Send message
Joined: 20 Mar 21
Posts: 4
Message 103612 - Posted: 20 Mar 2021, 15:39:02 UTC

Hi all,

Firstly, nice to meet you all. I checked out a distributed computing project a few months in to our first COVID wave here in the UK, and have quickly caught the bug. I hope, long term, I can contribute to the community on here.

I've had separate Windows and Ubuntu machines running Boinc for a little while now, but recently became aware that much more work is available for ClimatePrediction.net if one is using a Linux OS. As such, I'd like to run BOINC under WSL on my Windows machine some of the time. My understanding is that this is possible, but I've not been able to find instructions on how to do so that I can understand/follow to completion.

Details
> BOINC version: 7.16.11
> Computer OS: Windows 10 Home v. 2004, build 19041.867
> Projects undertaken: World Community Grid, ClimatePrediction.net
> Installed as a service? I am not sure, so I assume not.
> WSL OS: Ubuntu 20.04.2 LTS (focal)
> WSL BOINC version: 7.16.6

Event log
The first few lines of my event log when opening from Windows:
20/03/2021 07:34:06 | | cc_config.xml not found - using defaults
20/03/2021 07:34:06 | | Starting BOINC client version 7.16.11 for windows_x86_64
20/03/2021 07:34:06 | | log flags: file_xfer, sched_ops, task
20/03/2021 07:34:06 | | Libraries: libcurl/7.47.1 OpenSSL/1.0.2s zlib/1.2.8
20/03/2021 07:34:06 | | Data directory: C:\ProgramData\BOINC
20/03/2021 07:34:06 | | Running under account Robbie
20/03/2021 07:34:06 | | OpenCL: Intel GPU 0: Intel(R) UHD Graphics 630 (driver version 27.20.100.9313, device version OpenCL 3.0 NEO, 1577MB, 1577MB available, 230 GFLOPS peak)
20/03/2021 07:34:07 | | Windows processor group 0: 20 processors
20/03/2021 07:34:07 | | Host name: DESKTOP-VI81I2A
20/03/2021 07:34:07 | | Processor: 20 GenuineIntel Intel(R) Core(TM) i9-10850K CPU @ 3.60GHz [Family 6 Model 165 Stepping 5]
20/03/2021 07:34:07 | | Processor features: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss htt tm pni ssse3 fma cx16 sse4_1 sse4_2 movebe popcnt aes f16c rdrandsyscall nx lm avx avx2 vmx tm2 pbe fsgsbase bmi1 smep bmi2
20/03/2021 07:34:07 | | OS: Microsoft Windows 10: Core x64 Edition, (10.00.19041.00)
20/03/2021 07:34:07 | | Memory: 3.85 GB physical, 10.60 GB virtual
20/03/2021 07:34:07 | | Disk: 237.61 GB total, 176.45 GB free
20/03/2021 07:34:07 | | Local time is UTC -7 hours
20/03/2021 07:34:07 | | WSL detected:
20/03/2021 07:34:07 | | [Ubuntu] (default): Linux Ubuntu (Ubuntu 20.04.2 LTS [4.4.0-19041-Microsoft])

(If you've noticed some of my hardware choices seem odd, like pairing an i9 processor with 4GB of RAM and no graphics card, then I agree - I'm having to buy components as and when I can afford them. As is stands the PC mostly for numerical work anyway, so it's doing a much better job than my work laptop).

Problem
My problem is as follows: I believe that it's possible to run BOINC through WSL using the Windows GUI, as described here: https://boincsynergy.ca/download/Guida.en.pdf
However, when I try to reassign the Windows port number from Windows cmd, I get a usage help list (i.e. the command isn't recognised). I've had a healthy Google for solutions, and have searched these forums, but haven't managed to find anything so far.

As the event log lists that it recognises WSL, I am wondering, is there an "easy" way to do this? If not, would anybody be willing to walk me through the process?

Thanks in advance for any help you can give,
Robbie
ID: 103612 · Report as offensive     Reply Quote
Profile Dave

Send message
Joined: 28 Jun 10
Posts: 1387
United Kingdom
Message 103614 - Posted: 20 Mar 2021, 17:06:50 UTC - in response to Message 103612.  

Probably won't get a chance to search the for the post till tomorrow or Monday but there is someone who posted in the CPDN forums who has tasks running under WSL. I don't know what the overheads are but you will almost certainly need to not run too many tasks at once with only 4GB of RAM. If you find the post before I do, it may be worth asking them for more detail about how they did it.
ID: 103614 · Report as offensive     Reply Quote
Profile Contact
Avatar

Send message
Joined: 29 Aug 05
Posts: 35
Canada
Message 103615 - Posted: 20 Mar 2021, 17:53:11 UTC - in response to Message 103612.  
Last modified: 20 Mar 2021, 18:12:05 UTC

RobbieMackenzie wrote:
Problem
when I try to reassign the Windows port number from Windows cmd, I get a usage help list (i.e. the command isn't recognised).

I translated this document from the original Italian to English and the part you may have got snagged on wasn't translated very clearly.
It seems you got stuck at this step?

Guida.en.pdf wrote:
2) Manage Boinc Manager in WSL from Windows (as a service)
...
1) Open the Windows command prompt, go to the folder C: \ Program files \ Boinc and here start launch the
following command: boinccmd --gui_rpc_port 2536 ( this is one random example , put whatever you
want). This will set the Windows Boinc port to 2536, while the WSL port will remain 31416.
...

That will be revised shortly, and should have said
Open the Windows command prompt and type:
cd C:\Program Files\BOINC and then launch the following command from that directory:
boinccmd --gui_rpc_port 2536
(this is one random example, put whatever you want). This will set the Windows BOINC port to 2536, while the WSL port will remain 31416.

[Edit] I just tried it now and the command did not execute properly.
ID: 103615 · Report as offensive     Reply Quote
Bryn Mawr
Help desk expert

Send message
Joined: 31 Dec 18
Posts: 154
United Kingdom
Message 103616 - Posted: 20 Mar 2021, 17:54:55 UTC

https://www.cpdn.org/forum_thread.php?id=9025#63462
ID: 103616 · Report as offensive     Reply Quote
Profile Contact
Avatar

Send message
Joined: 29 Aug 05
Posts: 35
Canada
Message 103617 - Posted: 20 Mar 2021, 19:18:25 UTC - in response to Message 103615.  

Guida.en.pdf wrote:
[2)
Open the Windows command prompt and type:
cd C:\Program Files\BOINC and then launch the following command from that directory:
boinccmd --gui_rpc_port 2536
(this is one random example, put whatever you want). This will set the Windows BOINC port to 2536, while the WSL port will remain 31416.


Okay. I seem to have had success with the command:
boinc --gui_rpc_port 2536 instead of boinccmd --gui_rpc_port 2536

Does that work for anyone else or just me?
ID: 103617 · Report as offensive     Reply Quote
Richard Haselgrove
Volunteer tester
Help desk expert

Send message
Joined: 5 Oct 06
Posts: 4498
United Kingdom
Message 103618 - Posted: 20 Mar 2021, 19:39:43 UTC - in response to Message 103617.  

Okay. I seem to have had success with the command:
boinc --gui_rpc_port 2536 instead of boinccmd --gui_rpc_port 2536

Does that work for anyone else or just me?
Yes, that makes sense. That command starts a BOINC client running, and tells it to listen for commands on the non-standard port.

Later on, you'll want to command it to do something, or manage what's happening already. You'll use boinccmd or boincmgr to do that, and you'll have to tell those tools to send their commands on the same non-standard port.
ID: 103618 · Report as offensive     Reply Quote
Profile Contact
Avatar

Send message
Joined: 29 Aug 05
Posts: 35
Canada
Message 103619 - Posted: 20 Mar 2021, 20:00:48 UTC - in response to Message 103618.  

Richard Haselgrove wrote:
That command starts a BOINC client running, and tells it to listen for commands on the non-standard port.

Of course! Thanks for the clarification.
ID: 103619 · Report as offensive     Reply Quote
RobbieMackenzie

Send message
Joined: 20 Mar 21
Posts: 4
Message 103623 - Posted: 21 Mar 2021, 9:36:38 UTC

Thanks for all the help everyone!

There are a couple of options here, so when I get a chance later, I'll try the alternate port suggestion first. Failing that, will follow the CPDN thread to see where it leads. From a skim I can see that the latter raised a few issues with what happens when the computer is shut down, but it may be that that's just how it is for now when running under WSL.

Either way, I'll let you know how I get on.

you will almost certainly need to not run too many tasks at once with only 4GB of RAM
- agreed Dave! I'm looking forward to a payday browse on CEX.[/quote]
ID: 103623 · Report as offensive     Reply Quote
Profile Contact
Avatar

Send message
Joined: 29 Aug 05
Posts: 35
Canada
Message 103642 - Posted: 22 Mar 2021, 3:36:59 UTC

BOINC Italy has just updated their WSL Guide and the English translation has also been updated.
ID: 103642 · Report as offensive     Reply Quote
RobbieMackenzie

Send message
Joined: 20 Mar 21
Posts: 4
Message 103645 - Posted: 22 Mar 2021, 10:17:11 UTC

Update: I've got BOINC working under WSL, including with BOINC Manager. There still appears to be an issue with CPDN, but I am running a WCG task now which seems to be going OK. If it runs to completion then that will suggest the problem, from here on in, is with CPDN specifically rather than BOINC when using WSL. It may even just be the aforementioned memory issue. Of course, I'm aware that CPDN periodically has faulty batches anyway, which suffer computation errors, so it may take a little while to figure out the issue.

Once I've got it all working properly (or given up), I'll write a step-by-step on here for anyone interested in future. The method is more or less a combination of both the sources pointed to in the thread, but there are some extra bits worth mentioning.
ID: 103645 · Report as offensive     Reply Quote
Profile Dave

Send message
Joined: 28 Jun 10
Posts: 1387
United Kingdom
Message 103647 - Posted: 22 Mar 2021, 11:59:55 UTC - in response to Message 103645.  
Last modified: 22 Mar 2021, 12:02:38 UTC

Of course, I'm aware that CPDN periodically has faulty batches anyway, which suffer computation errors, so it may take a little while to figure out the issue.
If you have read the CPDN thread you will I assume have installed the 32bit libraries needed for Linux tasks to run. Of the current tasks for Linux the HADAM4 don't seem to have many failures apart from those caused by missing libraries. the HADCM3 do have a much higher failure rate. Two recently failed for me with an error that indicates an impossible climate has been generated or would be needed to make the equations add up.

With CPDN tasks failure rate when shutting down and restarting the computer are much less likely if tasks are suspended and the manager exited through the manager dialogue if your version of BOINC allows it. If it doesn't it is worth using boinccmd to exit the client before restarting the computer.

And well done!
ID: 103647 · Report as offensive     Reply Quote
klepel

Send message
Joined: 3 Apr 21
Posts: 5
Message 103837 - Posted: 3 Apr 2021, 19:18:50 UTC
Last modified: 3 Apr 2021, 19:20:20 UTC

I tried to run climateprediction.net with WSL and I commented it on this thread mentioned above:
https://www.cpdn.org/forum_thread.php?id=9025#63462
Besides, the errors of the climateprediction.net WUs, the ODLK1 WUs work.
However, cc_config.xml and app_config.xml are not read. And the first is all over the place (see my message: Mensaje 63790).
Maybe, someone has a suggestion, which cc_config.xml to use, as well where to place the app_config.xml and why the project folder are not at their expected places.
I am pretty sure, some of you has accumulated more experience with WSL since the last post here and the guide version 0.8.
Thanks a lot!
ID: 103837 · Report as offensive     Reply Quote
klepel

Send message
Joined: 3 Apr 21
Posts: 5
Message 104111 - Posted: 25 Apr 2021, 18:31:09 UTC - in response to Message 103837.  

I have installed WSL as indicated in “Guide to using The BOINC Client in Microsoft´s WSL” (Version 0.8): Title: WSL installation, Steps: 1 to 7.
I am wondering how I might check, if WSL version 2 is running? Where and with which command, it might get the version of WSL?
Under Titel: BOINC Client installation in WSL and link to a project, there is a Note: “WSL, by default uses all available cores and memory of you PC”and a command
notepad "$ env: USERPROFILE / .wslconfig"
When I execute this command, I get the following error (Spanish): “Bloc de Notas, El nombre de archive, el nombre de directorio o la sintaxis de la etiqueta del volume no son correctos.”
However I am able to click this messages away and put the lines:
[wsl2]
memory = 3GB # Limit the machine memory to 3GB
processors = 4 # Limit the cores available to the VM to 4
in the archive.
I would like to ask: where, with which name and with which extension the file shall be saved? I guess somebody with VM experience might answer this question as well.
Thanks a lot!
ID: 104111 · Report as offensive     Reply Quote
boboviz
Help desk expert

Send message
Joined: 12 Feb 11
Posts: 390
Italy
Message 104112 - Posted: 25 Apr 2021, 19:41:39 UTC - in response to Message 103615.  

That will be revised shortly, and should have said
Open the Windows command prompt and type:
cd C:\Program Files\BOINC and then launch the following command from that directory:
boinccmd --gui_rpc_port 2536
(this is one random example, put whatever you want). This will set the Windows BOINC port to 2536, while the WSL port will remain 31416.


I'm the writer of this guide.
And, in the latest version i've added this line:
"For the most recent version of Boinc, the command is: boinc.exe -daemon -gui_rpc_port 2536"
Maybe this part is not translated in the english version of the guide....
ID: 104112 · Report as offensive     Reply Quote
boboviz
Help desk expert

Send message
Joined: 12 Feb 11
Posts: 390
Italy
Message 104113 - Posted: 25 Apr 2021, 19:58:15 UTC - in response to Message 104111.  
Last modified: 25 Apr 2021, 19:59:03 UTC

I am wondering how I might check, if WSL version 2 is running? Where and with which command, it might get the version of WSL?

The command is
wsl -l -v

I'll add this command to the next version of guide


Under Titel: BOINC Client installation in WSL and link to a project, there is a Note: “WSL, by default uses all available cores and memory of you PC”and a command
notepad "$ env: USERPROFILE / .wslconfig"
When I execute this command, I get the following error (Spanish): “Bloc de Notas, El nombre de archive, el nombre de directorio o la sintaxis de la etiqueta del volume no son correctos.”

Seems a problem of your Windows...If you search for your error you will find a lot of articles.


I would like to ask: where, with which name and with which extension the file shall be saved?

This is an old guide for wsl.conf file, but maybe useful
ID: 104113 · Report as offensive     Reply Quote
Profile Contact
Avatar

Send message
Joined: 29 Aug 05
Posts: 35
Canada
Message 104114 - Posted: 25 Apr 2021, 20:19:23 UTC - in response to Message 104112.  

"For the most recent version of Boinc, the command is: boinc.exe -daemon -gui_rpc_port 2536"
Maybe this part is not translated in the english version of the guide....
Fear not, that post referred to a previous version of my English Translation. Your addition did make it to v0.8 English Translation on page 7
ID: 104114 · Report as offensive     Reply Quote
klepel

Send message
Joined: 3 Apr 21
Posts: 5
Message 104118 - Posted: 26 Apr 2021, 3:36:40 UTC - in response to Message 104113.  
Last modified: 26 Apr 2021, 3:38:27 UTC

[quote]Under Titel: BOINC Client installation in WSL and link to a project, there is a Note: “WSL, by default uses all available cores and memory of you PC”and a command
notepad "$ env: USERPROFILE / .wslconfig"
When I execute this command, I get the following error (Spanish): “Bloc de Notas, El nombre de archive, el nombre de directorio o la sintaxis de la etiqueta del volume no son correctos.”

Seems a problem of your Windows...If you search for your error you will find a lot of articles.
I would like to ask: where, with which name and with which extension the file shall be saved?

geophi in the CPDN forum guided me to:

https://docs.microsoft.com/en-us/windows/wsl/wsl-config#configure-global-options-with-wslconfig
tells you to save the file .wslconfig (no extension), in your Windows user's root directory, i.e. C:\users\(user). Then restart WSL 2 and it will read the file upon restart and that should limit CPUs and RAM used in the VM.

and although still received the error, it worked as he indicated.
ID: 104118 · Report as offensive     Reply Quote
boboviz
Help desk expert

Send message
Joined: 12 Feb 11
Posts: 390
Italy
Message 104121 - Posted: 26 Apr 2021, 9:36:07 UTC - in response to Message 104114.  

"For the most recent version of Boinc, the command is: boinc.exe -daemon -gui_rpc_port 2536"
Maybe this part is not translated in the english version of the guide....
Fear not, that post referred to a previous version of my English Translation. Your addition did make it to v0.8 English Translation on page 7


Oh, well, thank you!
ID: 104121 · Report as offensive     Reply Quote
boboviz
Help desk expert

Send message
Joined: 12 Feb 11
Posts: 390
Italy
Message 104122 - Posted: 26 Apr 2021, 9:37:07 UTC - in response to Message 104118.  

I would like to ask: where, with which name and with which extension the file shall be saved?

geophi in the CPDN forum guided me to:

https://docs.microsoft.com/en-us/windows/wsl/wsl-config#configure-global-options-with-wslconfig
tells you to save the file .wslconfig (no extension), in your Windows user's root directory, i.e. C:\users\(user). Then restart WSL 2 and it will read the file upon restart and that should limit CPUs and RAM used in the VM.

and although still received the error, it worked as he indicated.


I'll add also this in a new version of the guide.
Thank you!
ID: 104122 · Report as offensive     Reply Quote
klepel

Send message
Joined: 3 Apr 21
Posts: 5
Message 104124 - Posted: 26 Apr 2021, 14:49:31 UTC - in response to Message 104122.  
Last modified: 26 Apr 2021, 14:50:27 UTC

@boboviz
Another important information to include in your guide is that VM has to be activated in the BIOS of the computer in order to install WSL2. And how to do it.
As I imagen that the guide shall be used by less experienced Windows users like me – I never installed a VM machine or used PowerShell before – this is an important part missing in your guide. This step was not obvious to me!
However this guide and WSL2 are essential for CPDN at the moment, as it has only long running Linux tasks and with the few users over there, it might take ages until we will finish the current WU supply.
Thanks a lot!
ID: 104124 · Report as offensive     Reply Quote
1 · 2 · Next

Message boards : Questions and problems : Use of BOINC and WSL: some confusion

Copyright © 2021 University of California. 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.