![]() |
![]() |
#1 |
"Juan Tutors"
Mar 2004
569 Posts |
![]()
Still working out the kinks on how to use Google Colab. Please, no jabs! I am pasting my code, and also the endless loop it seems to be running into:
Code:
#@title The GPU72 Trial Factoring Colaboratory Notebook. { output-height: 8, form-width: "90%", display-mode: "form" } #@markdown -- Please see https://www.gpu72.com/ for more details. #@markdown <br><br> #@markdown -- Enter your Access Key below. Leave blank to work anonymously. #@markdown <br><br> #@markdown -- Leave "Logging_Level" as Default unless you are a developer. Access_Key = "acccesskeyacccesskeyacccesskey" #@param {type:"string"} Logging_Level = "Default" #@param ["Default", "Verbose"] import subprocess import signal !echo "Beginning GPU Trial Factoring Environment Bootstrapping..." !echo "Please see https://www.gpu72.com/ for additional details." !echo !mkdir -p /home/gpu72/ %cd -q /home/gpu72/ !wget -qO bootstrap.tgz https://www.gpu72.com/colab/bootstrap.tgz !tar -xzf bootstrap.tgz >/dev/null p = subprocess.Popen(['./bootstrap.pl', Access_Key, Logging_Level], stdout=subprocess.PIPE, universal_newlines=True, bufsize=0) try: for line in p.stdout: line=line[:-1] print(line) except KeyboardInterrupt: print("\nExiting...") p.send_signal(signal.SIGINT) !./comms.pl ShutDown 5 print("Done.") Insert_Work = "Factor=N/A,332370583,78,79" #@param {type:"string"} Delete_Results = True #@param {type:"boolean"} import os.path from google.colab import drive if not os.path.exists('/content/drive/My Drive'): drive.mount('/content/drive') %cd '/content/drive/My Drive/colab/' !ls -lha !echo if Insert_Work: print("Add string is:" + Insert_Work + "\n") f=open("worktodo.add","w+") f.write(Insert_Work + "\n") f.close() !cat worktodo.add !echo !cat "results.txt" !echo if Delete_Results: print("Deleting results!\n") !rm results.txt !cat worktodo.txt !wc -l worktodo.txt Code:
20210713_025217 ( 0:07): running a simple selftest... 20210713_025222 ( 0:07): Selftest statistics 20210713_025222 ( 0:07): number of tests 107 20210713_025222 ( 0:07): successfull tests 107 20210713_025222 ( 0:07): selftest PASSED! 20210713_025222 ( 0:07): Fetching initial work... 20210713_025223 ( 0:07): Running GPU type Tesla T4 Last fiddled with by Uncwilly on 2021-07-13 at 06:29 Reason: Removed access key. |
![]() |
![]() |
![]() |
#2 |
6809 > 6502
"""""""""""""""""""
Aug 2003
101×103 Posts
2×13×409 Posts |
![]()
Does it look like it has fetched work? It might be a problem on Chris's end.
|
![]() |
![]() |
![]() |
#3 | |
"Juan Tutors"
Mar 2004
569 Posts |
![]() Quote:
Code:
Insert_Work = "Factor=N/A,332370583,78,79" #@param {type:"string"} |
|
![]() |
![]() |
![]() |
#4 |
6809 > 6502
"""""""""""""""""""
Aug 2003
101×103 Posts
298A16 Posts |
![]()
The T4 was working last I saw one.
|
![]() |
![]() |
![]() |
#5 |
If I May
"Chris Halsall"
Sep 2002
Barbados
24×661 Posts |
![]() |
![]() |
![]() |
![]() |
#6 |
"Juan Tutors"
Mar 2004
569 Posts |
![]()
Thanks! Seems to be running but I can't seem to get it to work on assignments of my choosing. I have tried the following code on line 38 posted above, meaning I tried all of that code with line 38 containing one of these two lines.
Code:
Insert_Work = "Factor=N/A,332370583,78,79" #@param {type:"string"} Code:
Insert_Work = "Factor=[ASSIGNMENT ID FROM MERSENNE.ORG],332370583,78,79" #@param {type:"string"} |
![]() |
![]() |
![]() |
#7 |
Sep 2020
Germany
1011002 Posts |
![]()
I think there are some problems with your code. You are basically using the scripts of GPU72 to run an instance of mprime together with an instance of mfaktc. Chris has written this code in a way to avoid using a google drive. And it is designed to fetch work from GPU72.com in a loop until the session dies. The actual execution you can't see in the code you pasted because it is hidden in some perl code (bootstrap.pl) which is loaded after the start from gpu72.com.
So when I get it right, you will never reach the code block where you define your worktodo.add contents. And even if you ever reach it, it won't have any effect because the mfaktc execution doesn't use google drive and will never detect your worktodo.add. The program of GPU72 is just not defined for a scenario where you set a work item explicitely. Instead you do what GPU72 serves you based on the work type you selected when you created the colab notebook reference on GPU72. So, either you do that, then you should use exactly the code from gpu72.com without any changes. Or if you are interested enough in defining your own work items you have to write your own script based on python experience and the very helpful colab section in Kriesel's help pages to run mprime and/or mfaktc using google drive. Last fiddled with by Flaukrotist on 2021-07-14 at 17:16 Reason: added that perl code is not using google drive |
![]() |
![]() |
![]() |
#8 | |
If I May
"Chris Halsall"
Sep 2002
Barbados
24×661 Posts |
![]() Quote:
I /did/ have a bug on the server-side (a stupid constrained select for a particular work type) which was corrected. But, yeah. As with all things "tech", you touch it, you own it! ![]() |
|
![]() |
![]() |
![]() |
#9 | |
"TF79LL86GIMPS96gpu17"
Mar 2017
US midwest
3×7×317 Posts |
![]() Quote:
Sounds like Juan created a chimera. Shouldn't shock anyone much that half a horse plus half a tortoise doesn't run well. A good outcome is it led to detection and resolution of a GPU72 bug. Last fiddled with by kriesel on 2021-07-14 at 19:39 |
|
![]() |
![]() |
![]() |
#10 |
Mar 2019
12316 Posts |
![]() |
![]() |
![]() |
![]() |
#11 |
Romulan Interpreter
"name field"
Jun 2011
Thailand
100111000100102 Posts |
![]() |
![]() |
![]() |
![]() |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Google Diet Colab Notebook | Corbeau | Cloud Computing | 1225 | 2022-07-31 13:51 |
New Google Colab Notebooks For Primality Testing | danc2 | Cloud Computing | 86 | 2022-05-25 13:54 |
Alternatives to Google Colab | kriesel | Cloud Computing | 11 | 2020-01-14 18:45 |
x86 ASM loop control: JUMP vs LOOP | ewmayer | Programming | 23 | 2012-04-29 21:13 |
Unreserve exponent endless loop | luckyduck288 | Software | 3 | 2008-01-22 13:45 |