From a4899f42d8e423eaf3329e6f71f120f38c5e3a97 Mon Sep 17 00:00:00 2001 From: Brendan O'Donoghue Date: Tue, 25 Jun 2024 16:46:41 +0100 Subject: [PATCH 1/7] attempt to fix gpu workflow --- .github/workflows/gpu.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/gpu.yml b/.github/workflows/gpu.yml index 96a4ad94..bdcf1ff6 100644 --- a/.github/workflows/gpu.yml +++ b/.github/workflows/gpu.yml @@ -8,7 +8,11 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: Jimver/cuda-toolkit@v0.2.5 + - uses: Jimver/cuda-toolkit@v0.2.16 + id: cuda-toolkit + - run: echo "Installed cuda version is: ${{steps.cuda-toolkit.outputs.cuda}}" + - run: echo "Cuda install location: ${{steps.cuda-toolkit.outputs.CUDA_PATH}}" + - run: nvcc -V - run: sudo apt-get install libopenblas-dev liblapack-dev - run: make gpu - run: make test_gpu From cafa5b20c5c66d477c8c8e4658f4002d65425295 Mon Sep 17 00:00:00 2001 From: Brendan O'Donoghue Date: Tue, 25 Jun 2024 16:50:17 +0100 Subject: [PATCH 2/7] new line --- .github/workflows/gpu.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/gpu.yml b/.github/workflows/gpu.yml index bdcf1ff6..1c340151 100644 --- a/.github/workflows/gpu.yml +++ b/.github/workflows/gpu.yml @@ -10,6 +10,7 @@ jobs: - uses: actions/checkout@v4 - uses: Jimver/cuda-toolkit@v0.2.16 id: cuda-toolkit + - run: echo "Installed cuda version is: ${{steps.cuda-toolkit.outputs.cuda}}" - run: echo "Cuda install location: ${{steps.cuda-toolkit.outputs.CUDA_PATH}}" - run: nvcc -V From 1164a22f50904491d52cb0e678cd81e3c9db6694 Mon Sep 17 00:00:00 2001 From: Brendan O'Donoghue Date: Tue, 25 Jun 2024 16:55:20 +0100 Subject: [PATCH 3/7] link yml --- .github/workflows/gpu.yml | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/.github/workflows/gpu.yml b/.github/workflows/gpu.yml index 1c340151..0e08524e 100644 --- a/.github/workflows/gpu.yml +++ b/.github/workflows/gpu.yml @@ -1,8 +1,8 @@ --- name: GPU - -on: [push, pull_request] - +on: + - push + - pull_request jobs: linux: runs-on: ubuntu-latest @@ -10,12 +10,8 @@ jobs: - uses: actions/checkout@v4 - uses: Jimver/cuda-toolkit@v0.2.16 id: cuda-toolkit - - - run: echo "Installed cuda version is: ${{steps.cuda-toolkit.outputs.cuda}}" - - run: echo "Cuda install location: ${{steps.cuda-toolkit.outputs.CUDA_PATH}}" - run: nvcc -V - run: sudo apt-get install libopenblas-dev liblapack-dev - run: make gpu - run: make test_gpu # - run: out/run_tests_gpu_indirect # gpus not available yet - From b1864f85d0a03cfae9ed8b81d40646fff4f04b8d Mon Sep 17 00:00:00 2001 From: Brendan O'Donoghue Date: Tue, 25 Jun 2024 17:12:53 +0100 Subject: [PATCH 4/7] try some subpackages --- .github/workflows/gpu.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/gpu.yml b/.github/workflows/gpu.yml index 0e08524e..d6e64d30 100644 --- a/.github/workflows/gpu.yml +++ b/.github/workflows/gpu.yml @@ -10,7 +10,9 @@ jobs: - uses: actions/checkout@v4 - uses: Jimver/cuda-toolkit@v0.2.16 id: cuda-toolkit - - run: nvcc -V + with: + method: network + sub-packages: '["cusparse", "cublas", "cudart"]' - run: sudo apt-get install libopenblas-dev liblapack-dev - run: make gpu - run: make test_gpu From 6bc2b97bab6f234482f35821cfdbfbeb6758e074 Mon Sep 17 00:00:00 2001 From: Brendan O'Donoghue Date: Tue, 25 Jun 2024 17:15:17 +0100 Subject: [PATCH 5/7] try some non cuda subpackages --- .github/workflows/gpu.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/gpu.yml b/.github/workflows/gpu.yml index d6e64d30..fbdef96f 100644 --- a/.github/workflows/gpu.yml +++ b/.github/workflows/gpu.yml @@ -12,7 +12,7 @@ jobs: id: cuda-toolkit with: method: network - sub-packages: '["cusparse", "cublas", "cudart"]' + non-cuda-sub-packages: '["libcublas", "libcusparse"]' - run: sudo apt-get install libopenblas-dev liblapack-dev - run: make gpu - run: make test_gpu From 8e045f7567d53be117ff179dabf44dadb5c724ea Mon Sep 17 00:00:00 2001 From: Brendan O'Donoghue Date: Tue, 25 Jun 2024 17:20:19 +0100 Subject: [PATCH 6/7] add cudart --- .github/workflows/gpu.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/gpu.yml b/.github/workflows/gpu.yml index fbdef96f..0156e66f 100644 --- a/.github/workflows/gpu.yml +++ b/.github/workflows/gpu.yml @@ -12,7 +12,7 @@ jobs: id: cuda-toolkit with: method: network - non-cuda-sub-packages: '["libcublas", "libcusparse"]' + non-cuda-sub-packages: '["libcublas", "libcusparse", "libcudart"]' - run: sudo apt-get install libopenblas-dev liblapack-dev - run: make gpu - run: make test_gpu From 41c65af6f63762d7491f09fc2ed0f1e629a207d2 Mon Sep 17 00:00:00 2001 From: Brendan O'Donoghue Date: Wed, 26 Jun 2024 16:55:00 +0100 Subject: [PATCH 7/7] log more data to csv --- linsys/cpu/direct/private.c | 2 +- linsys/cpu/indirect/private.c | 2 +- src/rw.c | 14 ++++++++++++++ 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/linsys/cpu/direct/private.c b/linsys/cpu/direct/private.c index 4263ab65..2b33f2f3 100644 --- a/linsys/cpu/direct/private.c +++ b/linsys/cpu/direct/private.c @@ -1,6 +1,6 @@ #include "private.h" -const char *scs_get_lin_sys_method() { +const char *scs_get_lin_sys_method(void) { return "sparse-direct-amd-qdldl"; } diff --git a/linsys/cpu/indirect/private.c b/linsys/cpu/indirect/private.c index 7fc41fd3..b68e8de0 100644 --- a/linsys/cpu/indirect/private.c +++ b/linsys/cpu/indirect/private.c @@ -1,6 +1,6 @@ #include "private.h" -const char *scs_get_lin_sys_method() { +const char *scs_get_lin_sys_method(void) { return "sparse-indirect-scs"; } diff --git a/src/rw.c b/src/rw.c index 7a0f3a25..d7aaca73 100644 --- a/src/rw.c +++ b/src/rw.c @@ -328,8 +328,15 @@ void SCS(log_data_to_csv)(const ScsCone *k, const ScsSettings *stgs, "tau_normalized," "kap_normalized," "ax_nrm_inf," + "ax_s_nrm_inf" "px_nrm_inf," "aty_nrm_inf," + "xt_p_x," + "xt_p_x_tau," + "ctx," + "ctx_tau," + "bty," + "bty_tau," "b_nrm_inf," "c_nrm_inf," "scale," @@ -385,8 +392,15 @@ void SCS(log_data_to_csv)(const ScsCone *k, const ScsSettings *stgs, fprintf(fout, "%.16e,", r_n->tau); fprintf(fout, "%.16e,", r_n->kap); fprintf(fout, "%.16e,", SCS(norm_inf)(r->ax, w->d->m)); + fprintf(fout, "%.16e,", SCS(norm_inf)(r->ax_s, w->d->m)); fprintf(fout, "%.16e,", SCS(norm_inf)(r->px, w->d->n)); fprintf(fout, "%.16e,", SCS(norm_inf)(r->aty, w->d->n)); + fprintf(fout, "%.16e,", r->xt_p_x); + fprintf(fout, "%.16e,", r->xt_p_x_tau); + fprintf(fout, "%.16e,", r->ctx); + fprintf(fout, "%.16e,", r->ctx_tau); + fprintf(fout, "%.16e,", r->bty); + fprintf(fout, "%.16e,", r->bty_tau); fprintf(fout, "%.16e,", SCS(norm_inf)(w->b_orig, w->d->m)); fprintf(fout, "%.16e,", SCS(norm_inf)(w->c_orig, w->d->n)); fprintf(fout, "%.16e,", w->stgs->scale);