Skip to content

Commit

Permalink
Updated PrimeNet script to version 1.2.3.
Browse files Browse the repository at this point in the history
  • Loading branch information
tdulcet committed Mar 7, 2024
1 parent e3c3fff commit 9433dc8
Show file tree
Hide file tree
Showing 4 changed files with 151 additions and 120 deletions.
31 changes: 9 additions & 22 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,23 +104,6 @@ jobs:
echo -e '## Warnings\n```' >> $GITHUB_STEP_SUMMARY
grep 'warning:' Mlucas/obj/build.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
- name: GCC analyzer
if: ${{ matrix.os == 'ubuntu-22.04' && matrix.cc == 'gcc' }}
run: |
set -x
cd Mlucas/obj/ && $CC -c -fdiagnostics-color -g -O3 -march=native -DUSE_THREADS -fanalyzer ../src/*.c |& tee analyzer.log
make clean
echo -e '## GCC analyzer\n```' >> $GITHUB_STEP_SUMMARY
grep 'warning:' analyzer.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
- name: Clang-Tidy
if: ${{ matrix.cc == 'clang' }}
run: |
set -x
cd Mlucas/obj/ && clang-tidy --use-color -checks='bugprone-*,cert-*,clang-analyzer-*,concurrency-*,misc-const-correctness,misc-redundant-expression,misc-unused-*,modernize-*,performance-*,portability-*,readability-const-return-type,readability-container-*,readability-duplicate-include,readability-else-after-return,readability-make-member-function-cons,readability-non-const-parameter,readability-redundant-*,readability-simplify-*,readability-string-compare,readability-use-anyofallof' -header-filter='.*' ../src/*.c -- -Wall -O3 -march=native -DUSE_THREADS |& tee clang-tidy.log
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@v4
if: always()
with:
Expand Down Expand Up @@ -192,8 +175,6 @@ jobs:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install requests
python3 -m pip install --upgrade pip
python3 -m pip install requests
- name: Script
Expand All @@ -203,15 +184,17 @@ jobs:
sysctl -n hw.physicalcpu_max hw.logicalcpu_max
sysctl -n hw.cpufrequency hw.cpufrequency_max hw.tbfrequency kern.clockrate
sysctl -n hw.memsize
python -c 'import platform; print(platform.mac_ver())'
python3 -X dev -c 'import platform; print(platform.mac_ver())'
python primenet.py --help
python3 -X dev primenet.py --help
Windows:
name: PrimeNet Windows

runs-on: windows-latest
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-2019, windows-latest]
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Install dependencies
Expand All @@ -221,8 +204,12 @@ jobs:
- name: Script
run: |
wmic cpu get name
Get-CimInstance Win32_Processor | Select Name
wmic cpu get NumberOfCores,NumberOfLogicalProcessors
Get-CimInstance Win32_Processor | Select NumberOfCores,NumberOfLogicalProcessors
wmic cpu get MaxClockSpeed
Get-CimInstance Win32_Processor | Select MaxClockSpeed
wmic memphysical get MaxCapacity
Get-CimInstance Win32_PhysicalMemoryArray | Select MaxCapacity
python -X dev -c "import platform; print(platform.win32_ver())"
python -X dev primenet.py --help
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ PrimeNet script:
* Check for new results to submit and proof files to upload when the results file is updated.
* Automatically detect more system information using code from [psutil](https://github.com/giampaolo/psutil), so users do not have to manually determine and specify it.
* Currently this requires using the Bash install scripts for Linux.
* Get the number of cores on Linux without the `lscpu` command.
* Get the system information on Windows and macOS using the [ctypes library](https://docs.python.org/3/library/ctypes.html) instead of the `wmic` and `sysctl` commands respectively.
* Improve the performance.
* Add an option to send the user an e-mail/text message if there is an error, if the GIMPS program has stalled or if it found a prime, using the [Send Msg CLI/SendPy](https://github.com/tdulcet/Send-Msg-CLI).
* Support reporting interim residues.
Expand All @@ -300,6 +300,7 @@ PrimeNet script:
* Adapt Loïc Le Loarer's [test suite](https://github.com/llloic11/primenet/tree/main/tests).
* Add an optional GUI using [Tk](https://en.wikipedia.org/wiki/Tk_(software)) and the [tkinter library](https://docs.python.org/3/library/tkinter.html)
* Add docstrings to all functions
* Support submitting P-1 results for Fermat numbers

General:
* Create install script for the [CUDAPm1](https://sourceforge.net/projects/cudapm1/) GIMPS program
Expand Down
4 changes: 2 additions & 2 deletions gpuowl-bench.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ ITERS=${2:-20000}
# Device number
DEVICE=0

# Min FFT length (in K)
# Minimum FFT length (in K)
MIN=1024
# MIN=1
# Max FFT length (in K)
# Maximum FFT length (in K)
MAX=10240
# MAX=32768

Expand Down
Loading

0 comments on commit 9433dc8

Please sign in to comment.