Skip to content

Commit

Permalink
Updated Colab notebooks and GitHub Actions CI.
Browse files Browse the repository at this point in the history
  • Loading branch information
tdulcet committed Jan 29, 2024
1 parent 5b0b60c commit ca05c41
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 35 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
curl -sSO https://www.mersenne.org/favicon.ico
pyinstaller -F -i favicon.ico primenet.py
./dist/primenet --help
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: PrimeNet_Windows_${{ matrix.architecture }}
path: |
Expand All @@ -50,7 +50,7 @@ jobs:

runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
- name: Install
run: |
sudo apt-get -yqq update
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
gcc --version
- name: Script
run: bash -e -o pipefail -- cudalucas.sh ANONYMOUS
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: always()
with:
name: ${{ matrix.os }}_cudalucas
Expand Down Expand Up @@ -68,10 +68,10 @@ jobs:
$CXX --version
- name: Script
run: bash -e -o pipefail -- gpuowl.sh ANONYMOUS
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: always()
with:
name: ${{ matrix.os }}_gpuowl
name: ${{ matrix.os }}_${{ matrix.cxx }}_gpuowl
path: |
gpuowl/
- name: ShellCheck
Expand Down Expand Up @@ -121,7 +121,7 @@ jobs:
echo -e '## Clang-Tidy\n```' >> $GITHUB_STEP_SUMMARY
grep 'warning:' clang-tidy.log | sed 's/\x1B\[\([0-9]\+\(;[0-9]\+\)*\)\?m//g' | awk '{ print $NF }' | sort | uniq -c | sort -nr >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: always()
with:
name: ${{ matrix.os }}_${{ matrix.cc }}_mlucas
Expand Down
6 changes: 3 additions & 3 deletions google-colab/Colab CPU MPrime.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"id": "view-in-github"
},
"source": [
"<h4>(1 - Recommend). Create and save new notebook(s) to enable automatic re-mounting of Drive storage. Copy and paste the below code into a <a href=\"http://colab.research.google.com/#create=true\" target=\"_parent\">new notebook</a> in Colab and follow the directions in the <a href=\"../#how-to-use\" target=\"_parent\">How To Use</a> section of the <em>README</em></h4><h4>(2). Open the pre-formed version in Colab (requires manual authorization each time a notebook is opened) <a href=\"https://colab.research.google.com/github/tdulcet/Distributed-Computing-Scripts/blob/master/google-colab/Colab CPU MPrime.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a></h4>"
"<h4>(1 - Recommend). Create and save new notebook(s) to enable automatic re-mounting of Drive storage. Copy and paste the below code into a <a href=\"http://colab.research.google.com/#create=true\" target=\"_parent\">new notebook</a> in Colab and follow the directions in the <a href=\"../#how-to-use\" target=\"_parent\">How To Use</a> section of the <em>README</em></h4><h4>(2). Open the pre-formed version in Colab (requires manual authorization each time a notebook is opened) <a href=\"https://colab.research.google.com/github/tdulcet/Distributed-Computing-Scripts/blob/master/google-colab/Colab%20CPU%20MPrime.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a></h4>"
]
},
{
Expand Down Expand Up @@ -39,7 +39,7 @@
"#@markdown 6 | 0.372 | 0.745 | 1.117 | 1.49 | 1.862 | 2.235 | 2.475\n",
"#@markdown 7 | 0.745 | 1.49 | 2.235 | *2.98* | *3.725* | *4.47* | *4.95*\n",
"#@markdown 8 | 1.49 | *2.98* | *4.47* | 5.96 | 7.45 | 8.94 | 9.9\n",
"#@markdown 9 | ***2.98*** | **5.96** | 8.94 | 11.9 | 14.9 | 17.88 | 19.8\n",
"#@markdown 9 | ***2.98*** | **5.96** | 8.94 | 11.92 | 14.9 | 17.88 | 19.8\n",
"#@markdown 10 | 5.96 | 11.92 | **17.88** | **23.84** | **29.8** | **35.76** | **39.6**\n",
"#@markdown 11 | 11.92 | 23.84 | 35.76 | 47.68 | 59.6 | 71.52 | 79.2\n",
"#@markdown 12 | 23.84 | 47.68 | 71.52 | 95.36 | 119.2 | 143 | 158.4\n",
Expand Down Expand Up @@ -91,7 +91,7 @@
" '''Download/Install/Configure Prime95.'''\n",
" !wget -nv -O master.zip https://github.com/tdulcet/Distributed-Computing-Scripts/archive/master.zip\n",
" !unzip -o master.zip\n",
" print('Downloading and setting up Prime95\\n')\n",
" print('\\nDownloading and setting up Prime95\\n')\n",
" !cp Distributed-Computing-Scripts-master/{mprime2.sh,mprime2.exp,idletime.sh} .\n",
" !sed -i 's/\"mprime\"/\"mprime_cpu\"/' mprime2.sh # Name the folder specific to the runtime type\n",
" !sed -i '/^\\.\\/mprime / s/^/echo \"Skipped\" # /' mprime2.sh # Do not start Prime95\n",
Expand Down
11 changes: 6 additions & 5 deletions google-colab/Colab GPU CUDALucas.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"id": "view-in-github"
},
"source": [
"<h4>(1 - Recommend). Create and save new notebook(s) to enable automatic re-mounting of Drive storage. Copy and paste the below code into a <a href=\"http://colab.research.google.com/#create=true\" target=\"_parent\">new notebook</a> in Colab and follow the directions in the <a href=\"../#how-to-use\" target=\"_parent\">How To Use</a> section of the <em>README</em></h4><h4>(2). Open the pre-formed version in Colab (requires manual authorization each time a notebook is opened) <a href=\"https://colab.research.google.com/github/tdulcet/Distributed-Computing-Scripts/blob/master/google-colab/Colab GPU CUDALucas.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a></h4>"
"<h4>(1 - Recommend). Create and save new notebook(s) to enable automatic re-mounting of Drive storage. Copy and paste the below code into a <a href=\"http://colab.research.google.com/#create=true\" target=\"_parent\">new notebook</a> in Colab and follow the directions in the <a href=\"../#how-to-use\" target=\"_parent\">How To Use</a> section of the <em>README</em></h4><h4>(2). Open the pre-formed version in Colab (requires manual authorization each time a notebook is opened) <a href=\"https://colab.research.google.com/github/tdulcet/Distributed-Computing-Scripts/blob/master/google-colab/Colab%20GPU%20CUDALucas.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a></h4>"
]
},
{
Expand Down Expand Up @@ -41,7 +41,7 @@
"#@markdown 6 | 0.372 | 0.745 | 1.117 | 1.49 | 1.862 | 2.235 | 2.475\n",
"#@markdown 7 | 0.745 | 1.49 | 2.235 | *2.98* | *3.725* | *4.47* | *4.95*\n",
"#@markdown 8 | 1.49 | *2.98* | *4.47* | 5.96 | 7.45 | 8.94 | 9.9\n",
"#@markdown 9 | ***2.98*** | **5.96** | 8.94 | 11.9 | 14.9 | 17.88 | 19.8\n",
"#@markdown 9 | ***2.98*** | **5.96** | 8.94 | 11.92 | 14.9 | 17.88 | 19.8\n",
"#@markdown 10 | 5.96 | 11.92 | **17.88** | **23.84** | **29.8** | **35.76** | **39.6**\n",
"#@markdown 11 | 11.92 | 23.84 | 35.76 | 47.68 | 59.6 | 71.52 | 79.2\n",
"#@markdown 12 | 23.84 | 47.68 | 71.52 | 95.36 | 119.2 | 143 | 158.4\n",
Expand Down Expand Up @@ -103,20 +103,21 @@
" !wget -nv -O master.zip https://github.com/tdulcet/Distributed-Computing-Scripts/archive/master.zip\n",
" !unzip -o master.zip\n",
"\n",
" print('Downloading, building and setting up CUDALucas\\n')\n",
" print('\\nDownloading, building and setting up CUDALucas\\n')\n",
" !cp Distributed-Computing-Scripts-master/{cudalucas2.sh,primenet.py,idletime.sh} .\n",
" !sed -i '/^GPU=/,/^fi/ s/^/# /' cudalucas2.sh # Do not check for an Nvidia GPU\n",
" !sed -i '/^[[:blank:]]*if ! COMPUTE=/,/^[[:blank:]]*fi/!b; /^[[:blank:]]*fi/a echo \"$COMPUTE\"' cudalucas2.sh # Output CUDA compute capability of GPU\n",
" !sed -i 's/\\/$COMPUTE/\\/-gencode arch=compute_50,code=sm_50 -gencode arch=compute_60,code=sm_60 -gencode arch=compute_70,code=sm_70 -gencode arch=compute_75,code=sm_75 -gencode arch=compute_80,code=sm_80/' cudalucas2.sh\n",
" !sed -i '/^\\.\\/CUDALucas / s/^/# /' cudalucas2.sh # Disable optimization step for faster install\n",
" !sed -i '/^timeout / s/^/echo \"Skipped\" # /' cudalucas2.sh # Disable optimization step for faster install\n",
" !sed -i '/^nohup / s/^/echo \"Skipped\" # /' cudalucas2.sh # Do not start PrimeNet\n",
" !sed -i '/^python3 -OO / s/^/echo \"Skipped\" # /' cudalucas2.sh # Do not start PrimeNet\n",
" !bash -- cudalucas2.sh {computer_number} '{prime_ID}' '{computer_name}' {GPU_type_of_work}\n",
" print('Registering computer with PrimeNet\\n')\n",
" print('\\nRegistering computer with PrimeNet\\n')\n",
" !cd cudalucas && python3 -OO primenet.py -t 0 --checkin 1 -W 1 -T {GPU_type_of_work} -u '{prime_ID}' -i '{'worktodo' + computer_number + '.txt'}' -r '{'results' + computer_number + '.txt'}' -l '{'local' + computer_number + '.ini'}' --cudalucas '{'gpu' + computer_number + '.out'}' -H '{computer_name}'\n",
" !cp -u Distributed-Computing-Scripts-master/google-colab/gpu_optimizations/* cudalucas/\n",
"\n",
" print('Downloading and setting up Prime95\\n')\n",
" print('\\nDownloading and setting up Prime95\\n')\n",
" !cp Distributed-Computing-Scripts-master/{mprime2.sh,mprime2.exp} .\n",
" !sed -i 's/\"mprime\"/\"mprime_gpu\"/' mprime2.sh # Name the folder specific to the runtime type\n",
" !sed -i '/^\\.\\/mprime / s/^/echo \"Skipped\" # /' mprime2.sh # Do not start Prime95\n",
Expand Down
10 changes: 5 additions & 5 deletions google-colab/Colab GPU GpuOwl.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"id": "view-in-github"
},
"source": [
"<h4>(1 - Recommend). Create and save new notebook(s) to enable automatic re-mounting of Drive storage. Copy and paste the below code into a <a href=\"http://colab.research.google.com/#create=true\" target=\"_parent\">new notebook</a> in Colab and follow the directions in the <a href=\"../#how-to-use\" target=\"_parent\">How To Use</a> section of the <em>README</em></h4><h4>(2). Open the pre-formed version in Colab (requires manual authorization each time a notebook is opened) <a href=\"https://colab.research.google.com/github/tdulcet/Distributed-Computing-Scripts/blob/master/google-colab/Colab GPU GpuOwl.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a></h4>"
"<h4>(1 - Recommend). Create and save new notebook(s) to enable automatic re-mounting of Drive storage. Copy and paste the below code into a <a href=\"http://colab.research.google.com/#create=true\" target=\"_parent\">new notebook</a> in Colab and follow the directions in the <a href=\"../#how-to-use\" target=\"_parent\">How To Use</a> section of the <em>README</em></h4><h4>(2). Open the pre-formed version in Colab (requires manual authorization each time a notebook is opened) <a href=\"https://colab.research.google.com/github/tdulcet/Distributed-Computing-Scripts/blob/master/google-colab/Colab%20GPU%20GpuOwl.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a></h4>"
]
},
{
Expand Down Expand Up @@ -42,7 +42,7 @@
"#@markdown 6 | 0.372 | 0.745 | 1.117 | 1.49 | 1.862 | 2.235 | 2.475\n",
"#@markdown 7 | 0.745 | 1.49 | 2.235 | *2.98* | *3.725* | *4.47* | *4.95*\n",
"#@markdown 8 | 1.49 | *2.98* | *4.47* | 5.96 | 7.45 | 8.94 | 9.9\n",
"#@markdown 9 | ***2.98*** | **5.96** | 8.94 | 11.9 | 14.9 | 17.88 | 19.8\n",
"#@markdown 9 | ***2.98*** | **5.96** | 8.94 | 11.92 | 14.9 | 17.88 | 19.8\n",
"#@markdown 10 | 5.96 | 11.92 | **17.88** | **23.84** | **29.8** | **35.76** | **39.6**\n",
"#@markdown 11 | 11.92 | 23.84 | 35.76 | 47.68 | 59.6 | 71.52 | 79.2\n",
"#@markdown 12 | 23.84 | 47.68 | 71.52 | 95.36 | 119.2 | 143 | 158.4\n",
Expand Down Expand Up @@ -112,7 +112,7 @@
" !wget -nv -O master.zip https://github.com/tdulcet/Distributed-Computing-Scripts/archive/master.zip\n",
" !unzip -o master.zip\n",
"\n",
" print('Downloading, building and setting up GpuOwl\\n')\n",
" print('\\nDownloading, building and setting up GpuOwl\\n')\n",
" !cp Distributed-Computing-Scripts-master/{gpuowl2.sh,primenet.py,idletime.sh,gpuowl-bench.sh,gpuowl-wrapper.sh} .\n",
" !sed -i '/^GPU=/,/^fi/ s/^/# /' gpuowl2.sh # Do not check for an GPU\n",
" !sed -i '/^if command -v clinfo/,/^fi/ s/^/# /' gpuowl2.sh # Do not check for clinfo\n",
Expand All @@ -125,10 +125,10 @@
" !sed -i '/^ARGS3=/a \\\\t-jacobi 100000' '{file}'\n",
" !sed -i '/^ARGS1=/a \\\\t-mprimeDir ../../mprime_gpu' '{file}'\n",
" !sed -i 's/0.9/0.95/' '{file}' # Use up to 95% of GPU RAM\n",
" print('Registering computer with PrimeNet\\n')\n",
" print('\\nRegistering computer with PrimeNet\\n')\n",
" !cd '{'gpuowl/' + computer_number}' && python3 -OO ../primenet.py -t 0 --checkin 1 -W 1 -T {GPU_type_of_work} -u '{prime_ID}' -i 'worktodo.ini' -r 'results.ini' -g -H '{computer_name}'\n",
"\n",
" print('Downloading and setting up Prime95\\n')\n",
" print('\\nDownloading and setting up Prime95\\n')\n",
" !cp Distributed-Computing-Scripts-master/{mprime2.sh,mprime2.exp} .\n",
" !sed -i 's/\"mprime\"/\"mprime_gpu\"/' mprime2.sh # Name the folder specific to the runtime type\n",
" !sed -i '/^\\.\\/mprime / s/^/echo \"Skipped\" # /' mprime2.sh # Do not start Prime95\n",
Expand Down
Loading

0 comments on commit ca05c41

Please sign in to comment.