diff --git a/.github/workflows/meson.yml b/.github/workflows/meson.yml index 23e1f1f7..b66667e3 100644 --- a/.github/workflows/meson.yml +++ b/.github/workflows/meson.yml @@ -39,11 +39,11 @@ jobs: arch: 'arm64' metis: 64 allow_failure: true - # - os: ubuntu-latest - # compiler: nvidia-hpc - # compiler_version: '25.1' - # metis: 32 - # allow_failure: true + - os: ubuntu-latest + compiler: nvidia-hpc + compiler_version: '25.7' + metis: 32 + allow_failure: true runs-on: ${{ matrix.os }} steps: - name: Check out SPRAL @@ -141,6 +141,7 @@ jobs: METIS64="false" LIBBLAS="blas32" LIBLAPACK="lapack32" + OPENMP="true" CSTD="c99" CPPSTD="c++11" LD_CLASSIC="" @@ -162,6 +163,7 @@ jobs: LIBLAPACK="mkl_rt" fi if [[ "${{matrix.compiler}}" == "nvidia-hpc" ]]; then + OPENMP="false" CSTD="none" CPPSTD="none" fi @@ -183,7 +185,8 @@ jobs: -Dc_std=$CSTD \ -Dcpp_std=$CPPSTD \ -Dfortran_link_args=${LD_CLASSIC} \ - -Dcpp_link_args=${LD_CLASSIC} + -Dcpp_link_args=${LD_CLASSIC} \ + -Dopenmp=${OPENMP} - name: Build SPRAL shell: bash diff --git a/src/ssids/cpu/kernels/ldlt_app.cxx b/src/ssids/cpu/kernels/ldlt_app.cxx index aa419436..6c92efbd 100644 --- a/src/ssids/cpu/kernels/ldlt_app.cxx +++ b/src/ssids/cpu/kernels/ldlt_app.cxx @@ -1316,7 +1316,9 @@ class LDLT { #ifdef PROFILE Profile::Task task("TA_LDLT_DIAG"); #endif - if (debug) printf("Factor(%d)\n", blk); + if (debug) { + printf("Factor(%d)\n", blk); + } BlockSpec dblk(blk, blk, m, n, cdata, a, lda, block_size); // Store a copy for recovery in case of a failed column dblk.backup(backup); @@ -1379,7 +1381,9 @@ class LDLT { #ifdef PROFILE Profile::Task task("TA_LDLT_APPLY"); #endif - if (debug) printf("ApplyT(%d,%d)\n", blk, jblk); + if (debug) { + printf("ApplyT(%d,%d)\n", blk, jblk); + } BlockSpec dblk(blk, blk, m, n, cdata, a, lda, block_size); BlockSpec cblk(blk, jblk, m, n, cdata, a, lda, block_size); // Apply row permutation from factorization of dblk and in @@ -1412,7 +1416,9 @@ class LDLT { #ifdef PROFILE Profile::Task task("TA_LDLT_APPLY"); #endif - if (debug) printf("ApplyN(%d,%d)\n", iblk, blk); + if (debug) { + printf("ApplyN(%d,%d)\n", iblk, blk); + } BlockSpec dblk(blk, blk, m, n, cdata, a, lda, block_size); BlockSpec rblk(iblk, blk, m, n, cdata, a, lda, block_size); // Apply column permutation from factorization of dblk and in @@ -1457,8 +1463,13 @@ class LDLT { for (int iblk = jblk; iblk < mblk; iblk++) { // Calculate block index we depend on for i // (we only work with lower half of matrix) - int adep_idx = (blk < iblk) ? blk*block_size*lda + iblk*block_size - : iblk*block_size*lda + blk*block_size; + int adep_idx; + if (blk < iblk) { + adep_idx = blk * block_size * lda + iblk * block_size; + } else { + adep_idx = iblk * block_size * lda + blk * block_size; + } + #pragma omp task \ firstprivate(blk, iblk, jblk) \ shared(a, abort, cdata, backup, work) \ @@ -1606,7 +1617,9 @@ class LDLT { // Factor diagonal: depend on perm[blk*block_size] as we init npass { - if(debug) printf("Factor(%d)\n", blk); + if (debug) { + printf("Factor(%d)\n", blk); + } BlockSpec dblk(blk, blk, m, n, cdata, a, lda, block_size); // Store a copy for recovery in case of a failed column dblk.backup(backup); @@ -1621,7 +1634,9 @@ class LDLT { // Loop over off-diagonal blocks applying pivot for(int jblk=0; jblk