mersenneforum.org Mlucas v19.1 available
 Register FAQ Search Today's Posts Mark Forums Read

2021-06-19, 20:37   #34
ewmayer
2ω=0

Sep 2002
República de California

2×73×17 Posts

Quote:
 Originally Posted by bayanne I probably did not express my request very clearly. I was hoping to update my Account Assignments Details which at present only show that my assignment was assigned on 2021-06-16 and that the last update was the same day. I have tried running primenet.py but it has not updated my progress on the exponent, or given the the estimated finish time. Can this be done with primenet.py?
I refer you again to the README:

"You must be connected to the internet when you launch the script; once it has done its initial work-fetching you can be offline most of the time; the program will simply periodically check whether there are any new results in the run directory in which it was launched; if yes *and* it is able to connect to the PrimeNet server it will submit the new results (usually just one, unless you are offline nearly all the time) and fetch new work; otherwise it will sleep and retry later. The default is to check for 'results to submit/work to get?' every 6 hours; you may override this via the -t option, followed by your desired time interval in seconds. '-t 0' means run a single-shot get-work-to-do and quit, if for some reason you prefer to periodically run the script manually yourself."

That periodic checkin also updates assignment details - my 'cpus' page is up to date.

1. What *exact* command did you use to run the py-script, and what was the resulting terminal output?

2. Does 'ps aux |grep primenet' show a running primenet.py?

3. If 'yes' to [2], does the exponent page show any update in last 12 hours?

2021-06-20, 05:00   #35
bayanne

"Tony Gott"
Aug 2002
Yell, Shetland, UK

22×83 Posts

Quote:
 Originally Posted by ewmayer I refer you again to the README: "You must be connected to the internet when you launch the script; once it has done its initial work-fetching you can be offline most of the time; the program will simply periodically check whether there are any new results in the run directory in which it was launched; if yes *and* it is able to connect to the PrimeNet server it will submit the new results (usually just one, unless you are offline nearly all the time) and fetch new work; otherwise it will sleep and retry later. The default is to check for 'results to submit/work to get?' every 6 hours; you may override this via the -t option, followed by your desired time interval in seconds. '-t 0' means run a single-shot get-work-to-do and quit, if for some reason you prefer to periodically run the script manually yourself." That periodic checkin also updates assignment details - my 'cpus' page is up to date. 1. What *exact* command did you use to run the py-script, and what was the resulting terminal output? 2. Does 'ps aux |grep primenet' show a running primenet.py? 3. If 'yes' to [2], does the exponent page show any update in last 12 hours?
I used the command :

I entered ps aux lgrep primenet

ps: illegal argument: lgrep
usage: ps [-AaCcEefhjlMmrSTvwXx] [-O fmt | -o fmt] [-G gid[,gid...]]
[-u]
[-p pid[,pid...]] [-t tty[,tty...]] [-U user[,user...]]
ps [-L]

I then restarted python primenet.py

primenet.py: send_progress: Cannot update, the registration is not done
primenet.py: send_progress: Call primenet.py with --register option

I then entered ps aux lgrep primenet
and nothing

Please forgive my lack of familiarity with these commands and instructions

2021-06-20, 05:01   #36
bayanne

"Tony Gott"
Aug 2002
Yell, Shetland, UK

33210 Posts

Quote:
 Originally Posted by M344587487 If you have a watt meter, it'd be interesting to know how much power the M1 chip draws under mlucas load. I've only just noticed Lorenzo's stats otherwise I'd be bugging you for that too, what a tasty thing to have missed.
Sorry, I don't have one

2021-06-20, 06:30   #37
Happy5214

"Alexander"
Nov 2008
The Alamo City

3·11·23 Posts

Quote:
 Originally Posted by ewmayer 2. Does 'ps aux |grep primenet' show a running primenet.py?
Quote:
 Originally Posted by bayanne I entered ps aux lgrep primenet and received: ps: illegal argument: lgrep usage: ps [-AaCcEefhjlMmrSTvwXx] [-O fmt | -o fmt] [-G gid[,gid...]] [-u] [-p pid[,pid...]] [-t tty[,tty...]] [-U user[,user...]] ps [-L]
Just a drive-by assist here. Spacing and a bad font choice might have been problems in ewmayer's post there. The invocation was ps aux | grep primenet, with a vertical bar between aux and grep. (This pipes, or redirects, the output of ps aux to grep primenet, which will search for the string "primenet" in the process list it's receiving.) bayanne accidentally used a lowercase L instead of a bar character, which caused the illegal argument error above.

Last fiddled with by Happy5214 on 2021-06-20 at 06:31

2021-06-20, 11:15   #38
bayanne

"Tony Gott"
Aug 2002
Yell, Shetland, UK

22×83 Posts

Quote:
 Originally Posted by Happy5214 Just a drive-by assist here. Spacing and a bad font choice might have been problems in ewmayer's post there. The invocation was ps aux | grep primenet, with a vertical bar between aux and grep. (This pipes, or redirects, the output of ps aux to grep primenet, which will search for the string "primenet" in the process list it's receiving.) bayanne accidentally used a lowercase L instead of a bar character, which caused the illegal argument error above.
Thanks, tried ps aux | grep primenet
but still nothing

2021-06-20, 20:54   #39
ewmayer
2ω=0

Sep 2002
República de California

2·73·17 Posts

Quote:
 Originally Posted by bayanne primenet.py: send_progress: Cannot update, the registration is not done primenet.py: send_progress: Call primenet.py with --register option
That 2nd error line is telling you what to do - the first time you invoke the now-Primenet-API-enabled script, you need to do some basic registration via 'primenet.py with --register'. Try that, and see what it prompts you for. Once done, reinvoke the script using your original command sequence.

That's on me - I see I forgot to mention the --register step on the README. Go ahead and try it, and I'll use your result/feedback to update the README.

2021-06-21, 09:50   #40
bayanne

"Tony Gott"
Aug 2002
Yell, Shetland, UK

22×83 Posts

Quote:
 Originally Posted by ewmayer That 2nd error line is telling you what to do - the first time you invoke the now-Primenet-API-enabled script, you need to do some basic registration via 'primenet.py with --register'. Try that, and see what it prompts you for. Once done, reinvoke the script using your original command sequence. That's on me - I see I forgot to mention the --register step on the README. Go ahead and try it, and I'll use your result/feedback to update the README.
My computer is registered, but still no further forward about being able to provide updates to Primenet

2021-06-21, 15:36   #41
tdulcet

"Teal Dulcet"
Jun 2018

1010102 Posts

Quote:
 Originally Posted by ewmayer That 2nd error line is telling you what to do - the first time you invoke the now-Primenet-API-enabled script, you need to do some basic registration via 'primenet.py with --register'. Try that, and see what it prompts you for. Once done, reinvoke the script using your original command sequence. That's on me - I see I forgot to mention the --register step on the README.
Just to note, Daniel and I's updated/improved PrimeNet script automatically registers the computer with PrimeNet if the user does NOT provide a password. The password is not needed because it can use the PrimeNet API to get assignments, just as Prime95/MPrime does.

For reference, the first time it can be run like this to just register the instance with PrimeNet:
python3 primenet.py -d -t 0 -T <Worktype> -u <PrimeNet User ID>

and then it can subsequently be run like this to automatically get assignments, report assignment results and progress to PrimeNet:
python3 primenet.py -d

If setting up more than one worker/run on the computer, the the above two commands are:
python3 primenet.py -d -t 0 -T <Worktype> -u <PrimeNet User ID> --num_workers <Number of workers>
and
python3 primenet.py -d -c <Worker/CPU core number>

See here or run python3 primenet.py --help for the full list of supported options. The Mlucas install script can automate all of this for Linux users.

2021-06-21, 19:53   #42
ewmayer
2ω=0

Sep 2002
República de California

2×73×17 Posts

Quote:
 Originally Posted by bayanne My computer is registered, but still no further forward about being able to provide updates to Primenet
Meaning you tried 'python primenet.py --register'? What happened on doing that? That should prompt for your primenet login userid. I just tried it from a newly-created test directory on one of my boxes:

[ewmayer@localhost obj_avx512]\$ python primenet.py --register
Usage: primenet.py [options]

primenet.py: error: To register the instance, --username and --hostname are required

OK, retry with

python primenet.py --register --username ewmayer --hostname knl_test
GUID 9e4336ce6f928e63d0f19696f688720f correctly registered with the following features:
Hostname: knl_test
CPU model: cpu.unknown
CPU features:
CPU L1 cache size: 8kB
CPU L2 cache size: 512kB
CPU cores: 1
CPU frequency: 100MHz
Memory size: 0MB
If you want to change the value, please rerun with the corresponding options or edit the local.ini file and rerun with --register option
https://www.mersenne.org/editcpu/?g=...f19696f688720f

Registration creates a local.ini file, here mine from the above:
Code:
[primenet]
worktype = 101
num_cache = 1
percent_limit = 90
hostname = knl_test
cpu_model = cpu.unknown
features =
frequency = 100
memory = 0
l1 = 8
l2 = 512
np = 1
hp = 0
guid = 9e4336ce6f928e63d0f19696f688720f
Then reinvoke the script using the syntax from the README:

python primenet.py -d [-T [worktype]] -u [uid] -p [pwd] [-t [frequency]] &

Note since registration has created a default worktype and most folks are OK with the default every-6-hour updates, so you really now just want

python primenet.py -d -u [uid] -p [pwd]

That will add couple fields to local.ini after the first few updates-to-server, including

usec_per_iter = [last per-iter-time for current assignment]

======================

@tdulcet: Correct me if I'm wrong, but I thought your setup script is Linux-only. Bayanne is using a Mac.

 2021-06-22, 04:53 #43 bayanne     "Tony Gott" Aug 2002 Yell, Shetland, UK 22·83 Posts OK, sorted now used: python primenet.py -d This created estimated completion, and days to go Used: python primenet.py --register --username[] --hostname[] And this confirmed registration details Thanks to you both.
2021-06-22, 11:47   #44
tdulcet

"Teal Dulcet"
Jun 2018

2×3×7 Posts

Quote:
 Originally Posted by ewmayer @tdulcet: Correct me if I'm wrong, but I thought your setup script is Linux-only. Bayanne is using a Mac.
Yes, my setup/install script is Linux only, but our PrimeNet script will work on Windows, macOS and Linux, the same as Loïc Le Loarer's PrimeNet script, which ours was built on. The commands I listed above were for manually using the PrimeNet script independently of the Mlucas install script.

The commands and output for our PrimeNet script is roughly the same as what you posted, except there is no -r/--register option since that is automatic. With Loïc's PrimeNet script, the -r/--register option controlled whether it either used the PrimeNet API to report assignment results and progress or only did manual testing. With Daniel and I's PrimeNet script, the -p/--password option controls this instead. If the user provides a password, it will only do manual testing and will not report the progress (this was of course the default behavior for old versions of the PrimeNet script before Loïc Le Loarer's version). If they do NOT provide a password, it will completely use the PrimeNet v5 API, just as Prime95/MPrime does.

There are other minor differences too, including different defaults. That usec_per_iter field was renamed to msec_per_iter, since the value of course is in milliseconds not microseconds. It also now defaults to hourly updates to support PRP proof uploading with GpuOwl and eventually Mlucas v20.1 (the Linux install script will keep the default 6 hour updates until v20.1 is released). Please see the dedicated thread for a long list of all our changes/improvements.

 Similar Threads Thread Thread Starter Forum Replies Last Post ewmayer Mlucas 89 2021-02-01 20:37 ewmayer Mlucas 48 2019-11-28 02:53 Lorenzo Mlucas 52 2016-03-13 08:45 Unregistered Mlucas 0 2009-10-27 20:35 delta_t Mlucas 14 2007-10-04 05:45

All times are UTC. The time now is 07:09.

Thu Oct 28 07:09:51 UTC 2021 up 97 days, 1:38, 0 users, load averages: 1.95, 1.96, 1.93

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.