Get Your Free Google Computer!

Nick Name

Administrator
USA team member
Thanks to a recent thread over at the PrimeGrid forum I have learned that you can access Google's computing resources for free! The thread discusses GPU computing but you also get two CPU instances, if you want to use them. This is a resource offered mainly for student use, but at this time it works great for BOINC! Thanks to some scripts created by some helpful folks it's so easy to set up a cave man could do it. :D The actual hardware is one Tesla K80 GPU and two Xeon 2.30 Ghz CPU threads, not too shabby at all. If you're interested in getting this going, read on! The main limitations I'm aware of at this time are a 12 hour time limit, and of course you need a Google account.

The first thing you should do is create a Primegrid location (like Home, School, Work etc.) with reasonable settings, and set it as your default. Since the instance terminates around the 12 hour mark, you need to select apps that will complete in that time. You also want to set it as the default so your instance will get the correct work. You won't have the luxury of the usual BOINC manager, so it's best to make sure it's set to the correct location from the start. You can check the thread for comments about what people are running. I am crunching the PPSieve, both CPU and GPU. You can see my current host here. (Looks like a long-running Genefer 22 v3.21 prime search slipped in, that's going to fail. )

1. Log into your PrimeGrid account and set up your location.

2. Head on over to https://colab.research.google.com/ and log in with your Google account.

3. You will need to explicitly set the Runtime option to GPU. In the menu at the upper left you will see File | Edit | View etc. Select Runtime -> Change Runtime Type -> Set the Hardware Accelerator to GPU. If you don't do this you will only have two CPU threads available.

4. You will see a couple options beneath the menu, Code and Text. Make sure you are using a Code cell, as you will need to enter a Python script. There are a couple posted in the forum. This is the one I used.


import os.path
!apt-get update
!apt-get install boinc boinc-client
!cp /usr/bin/boinc /content
!cp /usr/bin/boinccmd /content
if not os.path.exists('/content/slots'):
!mkdir slots
if not os.path.exists('/content/slots/0'):
!boinc --daemon --attach_project "http://www.primegrid.com/" "account key here"
else:
!boinc --daemon
!boinccmd --set_gpu_mode always
!tail -f stdoutdae.txt


Paste this exactly as shown, but replace "account key here" with your PrimeGrid WEAK account key. You can find that in your Account settings when you log in.
Leave the quotes. There is a button that looks like a "Play" button beside the cell. Click it to execute the script.

5. You should see a bunch of text as BOINC is installed along with various other packages and libraries, then eventually some familiar BOINC messages about work being downloaded etc.

As I said, you don't have access to the usual BOINC tools like the manager, so if you somehow get the wrong tasks I don't know of any way to abort them other than stopping the instance. You can do that by clicking the Stop button. It's the same button that executes the script, but when the script is running it turns into a square.

As far as I know, you need to both keep the browser window open and active, meaning not minimized, to keep it running.

This should work for any project, as long as you observe the time restriction, set up your location / apps correctly, and of course use the correct project account key.
 
Top