diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3947c982..7770230a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,13 +13,16 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-22.04, ubuntu-24.04] + os: [ubuntu-22.04, ubuntu-24.04, ubuntu-22.04-arm, ubuntu-24.04-arm] cxx: [g++, clang++] + exclude: + - os: ubuntu-22.04-arm + cxx: clang++ fail-fast: false env: CXX: ${{ matrix.cxx }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Install run: | sudo apt-get update -y @@ -27,14 +30,14 @@ jobs: $CXX --version - name: Script run: | - make prpll -O -j "$(nproc)" + make -O -j "$(nproc)" cd build-release rm -f -- *.o ./prpll -h - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v6 if: always() with: - name: ${{ matrix.os }}_${{ matrix.cxx }}_prpll + name: ${{ matrix.os }}_${{ endsWith(matrix.os, '-arm') && 'arm' || 'x86' }}_${{ matrix.cxx }}_prpll path: ${{ github.workspace }} - name: Cppcheck run: cppcheck --enable=all --force . @@ -49,15 +52,17 @@ jobs: Windows: name: Windows - runs-on: windows-latest + runs-on: ${{ matrix.os }} strategy: matrix: + os: [windows-latest] # windows-11-arm cxx: [g++, clang++] fail-fast: false env: CXX: ${{ matrix.cxx }} + PACKAGE_PREFIX: mingw-w64-${{ endsWith(matrix.os, '-arm') && 'clang-aarch64' || 'x86_64' }}- steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Before Install run: | echo "C:\msys64\mingw64\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append @@ -66,7 +71,7 @@ jobs: echo "LIBPATH=-LC:\msys64\mingw64\lib" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append - name: Install run: | - pacman -S --noconfirm mingw-w64-x86_64-gmp mingw-w64-x86_64-opencl-icd + pacman -S --noconfirm "${env:PACKAGE_PREFIX}opencl-icd" & $env:CXX --version - name: Install Clang if: ${{ matrix.cxx == 'clang++' }} @@ -74,34 +79,40 @@ jobs: pacman -S --noconfirm mingw-w64-x86_64-clang & $env:CXX --version - name: Script - run: | # Cannot use `make exe`, as the OpenCL ICD Loader does not support static linking - make prpll -O -j $env:NUMBER_OF_PROCESSORS + run: | + make -O -j $env:NUMBER_OF_PROCESSORS cd build-release rm *.o .\prpll.exe -h - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v6 if: always() with: - name: win_${{ matrix.cxx }}_prpll + name: win_${{ endsWith(matrix.os, '-arm') && 'arm' || 'x86' }}_${{ matrix.cxx }}_prpll path: ${{ github.workspace }} macOS: name: macOS - runs-on: macos-13 + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [macos-15-intel, macos-latest] + fail-fast: false + env: + CXX: g++-15 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Install run: | - brew install gcc@14 + $CXX --version - name: Script run: | - make prpll -j "$(sysctl -n hw.ncpu)" + make -j "$(sysctl -n hw.ncpu)" cd build-release rm -f -- *.o ./prpll -h - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v6 if: always() with: - name: macos_prpll + name: macos_${{ endsWith(matrix.os, '-intel') && 'x86' || 'arm' }}_prpll path: ${{ github.workspace }} diff --git a/Makefile b/Makefile index 26bffeda..b1c021e0 100644 --- a/Makefile +++ b/Makefile @@ -14,9 +14,9 @@ HOST_OS = $(shell uname -s) ifeq ($(HOST_OS), Darwin) # Real GCC (not clang), needed for 128-bit floats and std::filesystem::path -CXX = g++-14 +CXX ?= g++-15 else -CXX = g++ +CXX ?= g++ endif ifneq ($(findstring MINGW, $(HOST_OS)), MINGW) @@ -45,7 +45,7 @@ else BIN=build-release -CXXFLAGS = -O2 -DNDEBUG $(COMMON_FLAGS) +CXXFLAGS = -O3 -DNDEBUG $(COMMON_FLAGS) STRIP=-s endif @@ -90,7 +90,7 @@ $(BIN)/%.o : src/%.cpp $(DEPDIR)/%.d # src/bundle.cpp is just a wrapping of the OpenCL sources (*.cl) as a C string. src/bundle.cpp: genbundle.sh src/cl/*.cl - ./genbundle.sh $^ > src/bundle.cpp + bash genbundle.sh $^ > src/bundle.cpp $(DEPDIR)/%.d: ; .PRECIOUS: $(DEPDIR)/%.d diff --git a/genbundle.sh b/genbundle.sh index ec042bb2..9d176062 100755 --- a/genbundle.sh +++ b/genbundle.sh @@ -1,3 +1,4 @@ +#!/bin/bash cat < CL_FILE_NAMES\{${names}\}\; +echo "static const std::vector CL_FILE_NAMES{${names}};" cat <& getClFileNames() { return CL_FILE_NAMES; } diff --git a/src/Args.cpp b/src/Args.cpp index 041202ad..b18a95ba 100644 --- a/src/Args.cpp +++ b/src/Args.cpp @@ -118,7 +118,7 @@ and should be able to run. PRPLL keeps the active tasks in per-worker files worktodo-0.txt, worktodo-1.txt etc in the local directory. These per-worker files are supplied from the global worktodo.txt file if -pool is used. In turn the global worktodo.txt can be supplied through the primenet.py script, -either the one located at gpuowl/tools/primenet.py or https://download.mersenne.ca/primenet.py +either the one located at gpuowl/tools/primenet.py or https://download.mersenne.ca/AutoPrimeNet It is also possible to manually add exponents by adding lines of the form "PRP=118063003" to worktodo-.txt diff --git a/src/common.h b/src/common.h index 516b099d..6303e539 100644 --- a/src/common.h +++ b/src/common.h @@ -13,7 +13,7 @@ using i64 = int64_t; using u64 = uint64_t; using i128 = __int128; using u128 = unsigned __int128; -using f128 = __float128; +// using f128 = __float128; static_assert(sizeof(u8) == 1, "size u8"); static_assert(sizeof(u32) == 4, "size u32"); diff --git a/src/tune.cpp b/src/tune.cpp index 3b773437..b9cf1f71 100644 --- a/src/tune.cpp +++ b/src/tune.cpp @@ -947,7 +947,7 @@ void Tune::tune() { config.write("\n -log 1000000\n"); } if (args->workers < 2) { - config.write("\n# Running two workers sometimes gives better throughput. Autoprimenet will need to create up a second worktodo file."); + config.write("\n# Running two workers sometimes gives better throughput. AutoPrimeNet will need to create up a second worktodo file (use --num-workers 2)."); config.write("\n# -workers 2\n"); config.write("\n# Changing TAIL_KERNELS to 3 when running two workers may be better."); config.write("\n# -use TAIL_KERNELS=3\n");