diff --git a/.github/workflows/test-build.yml b/.github/workflows/test-build.yml index 0c24e73..2b5794b 100644 --- a/.github/workflows/test-build.yml +++ b/.github/workflows/test-build.yml @@ -45,8 +45,8 @@ jobs: if: failure() uses: actions/upload-artifact@v4 with: - name: test-report-ubuntu - path: test-suite.log + name: qmckl-standard + path: _build/test-suite.log - name: Dist test run: make distcheck @@ -105,7 +105,7 @@ jobs: if: failure() uses: actions/upload-artifact@v4 with: - name: test-report-ubuntu-debug + name: qmckl-debug path: _build_debug/test-suite.log hpc: @@ -144,7 +144,7 @@ jobs: if: failure() uses: actions/upload-artifact@v4 with: - name: test-report-ubuntu-debug + name: qmckl-hpc path: _build_hpc/test-suite.log macos: @@ -189,6 +189,6 @@ jobs: if: failure() uses: actions/upload-artifact@v4 with: - name: test-report-macos-x86 + name: qmckl-macos-x86 path: _build_hpc/test-suite.log diff --git a/org/qmckl_jastrow_champ.org b/org/qmckl_jastrow_champ.org index fd186c9..14fb813 100644 --- a/org/qmckl_jastrow_champ.org +++ b/org/qmckl_jastrow_champ.org @@ -2859,7 +2859,7 @@ assert(qmckl_electron_provided(context)); printf("ee_distance_rescaled_gl\n"); double fd[walk_num][elec_num][elec_num][4]; - double delta_x = 0.0001; + double delta_x = 0.001; // Finite difference coefficients for gradients double coef[9] = { 1.0/280.0, -4.0/105.0, 1.0/5.0, -4.0/5.0, 0.0, 4.0/5.0, -1.0/5.0, 4.0/105.0, -1.0/280.0 }; @@ -2953,14 +2953,20 @@ assert(qmckl_electron_provided(context)); for (int i = 0; i < elec_num; i++) { for (int j = 0; j < elec_num; j++) { for (int k = 0; k < 3; k++){ -// printf("%.10f\t", fd[nw][i][j][k]); -// printf("%.10f\n", ee_distance_rescaled_gl[nw][i][j][k]); + if (fabs(fd[nw][i][j][k] - ee_distance_rescaled_gl[nw][i][j][k]) > 1.e-12) { + printf("nw=%d i=%d j=%d k=%d\n", nw, i, j, k); + printf("fd =%f\n", fd[nw][i][j][k]); + printf("ee_distance_rescaled_gl=%f\n", ee_distance_rescaled_gl[nw][i][j][k]); + } assert(fabs(fd[nw][i][j][k] - ee_distance_rescaled_gl[nw][i][j][k]) < 1.e-8); } int k=3; if (i != j) { -// printf("%.10f\t", fd[nw][i][j][k]); -// printf("%.10f\n", ee_distance_rescaled_gl[nw][i][j][k]); + if (fabs(fd[nw][i][j][k] - ee_distance_rescaled_gl[nw][i][j][k]) > 1.e-12) { + printf("nw=%d i=%d j=%d k=%d\n", nw, i, j, k); + printf("fd =%f\n", fd[nw][i][j][k]); + printf("ee_distance_rescaled_gl=%f\n", ee_distance_rescaled_gl[nw][i][j][k]); + } assert(fabs(fd[nw][i][j][k] - ee_distance_rescaled_gl[nw][i][j][k]) < 1.e-6); } } @@ -2988,7 +2994,12 @@ assert(qmckl_electron_provided(context)); &(ee_distance_rescaled_gl_hpc[0])); assert(rc == QMCKL_SUCCESS); - for (int i = 0; i < walk_num*nucl_num*elec_num*4; i++) { + for (int64_t i = 0; i < walk_num*nucl_num*elec_num*4; i++) { + if (fabs(ee_distance_rescaled_gl_hpc[i] - ee_distance_rescaled_gl_doc[i]) > 1.e-12) { + printf("i=%ld\n", i); + printf("ee_distance_rescaled_gl_doc=%f\n", ee_distance_rescaled_gl_doc[i]); + printf("ee_distance_rescaled_gl_hpc=%f\n", ee_distance_rescaled_gl_hpc[i]); + } assert(fabs(ee_distance_rescaled_gl_doc[i] - ee_distance_rescaled_gl_hpc[i]) < 1.e-8); } } @@ -3543,6 +3554,11 @@ assert(qmckl_jastrow_champ_provided(context)); assert (rc == QMCKL_SUCCESS); for (int64_t i = 0; i < walk_num; i++) { + if (fabs(factor_ee_doc[i] - factor_ee_hpc[i]) > 1.e-12) { + printf("i=%ld\n", i); + printf("factor_ee_doc=%f\n", factor_ee_doc[i]); + printf("factor_ee_hpc=%f\n", factor_ee_hpc[i]); + } assert(fabs(factor_ee_doc[i] - factor_ee_hpc[i]) < 1.e-8); } } @@ -4159,7 +4175,7 @@ assert(qmckl_jastrow_champ_provided(context)); { printf("factor_ee_gl\n"); double fd[walk_num][4][elec_num]; - double delta_x = 0.0001; + double delta_x = 0.001; // Finite difference coefficients for gradients double coef[9] = { 1.0/280.0, -4.0/105.0, 1.0/5.0, -4.0/5.0, 0.0, 4.0/5.0, -1.0/5.0, 4.0/105.0, -1.0/280.0 }; @@ -4248,14 +4264,20 @@ assert(qmckl_jastrow_champ_provided(context)); for (int nw = 0; nw < walk_num; nw++){ for (int i = 0; i < elec_num; i++) { for (int k = 0; k < 3; k++){ - printf("%.10f\t", fd[nw][k][i]); - printf("%.10f\n", factor_ee_gl[nw][k][i]); + if (fabs(fd[nw][k][i] - factor_ee_gl[nw][k][i]) > 1.e-12) { + printf("nw=%d i=%d k=%d\n", nw, i, k); + printf("fd=%f factor_ee_gl=%f\n", fd[nw][k][i], factor_ee_gl[nw][k][i]); + } assert(fabs(fd[nw][k][i] - factor_ee_gl[nw][k][i]) < 1.e-8); } int k=3; + if (fabs(fd[nw][k][i] - factor_ee_gl[nw][k][i]) > 1.e-12) { + printf("nw=%d i=%d k=%d\n", nw, i, k); + printf("fd=%f factor_ee_gl=%f\n", fd[nw][k][i], factor_ee_gl[nw][k][i]); + } printf("%.10f\t", fd[nw][k][i]); printf("%.10f\n", factor_ee_gl[nw][k][i]); - assert(fabs(fd[nw][k][i] - factor_ee_gl[nw][k][i]) < 2.e-5); + assert(fabs(fd[nw][k][i] - factor_ee_gl[nw][k][i]) < 1.e-5); } } printf("OK\n"); @@ -4309,7 +4331,9 @@ assert(qmckl_jastrow_champ_provided(context)); assert(rc == QMCKL_SUCCESS); for (int64_t i = 0 ; i < walk_num*4*elec_num ; i++) { - printf("%ld %f %f\n", i, factor_ee_gl_hpc[i], factor_ee_gl_doc[i]); + if (fabs(factor_ee_gl_hpc[i] - factor_ee_gl_doc[i]) > 1.e-12) { + printf("i=%ld\nfactor_ee_gl_hpc=%f\nfactor_ee_gl_doc=%f\n", i, factor_ee_gl_hpc[i], factor_ee_gl_doc[i]); + } assert(fabs(factor_ee_gl_hpc[i] - factor_ee_gl_doc[i]) < 1.e-8); } } @@ -5002,6 +5026,9 @@ assert(fabs(en_distance_rescaled[0][0][6] - 0.4726452953409436) < 1.e-12); assert(rc == QMCKL_SUCCESS); for (int64_t i=0 ; i 1.e-12) { + printf("i = %ld, doc = %e, hpc = %e\n", i, en_distance_rescaled_doc[i], en_distance_rescaled_hpc[i]); + } assert(fabs(en_distance_rescaled_doc[i] - en_distance_rescaled_hpc[i]) < 1.e-8); } } @@ -5391,7 +5418,7 @@ assert(qmckl_electron_provided(context)); printf("en_distance_rescaled_gl\n"); double fd[walk_num][nucl_num][elec_num][4]; - double delta_x = 0.0001; + double delta_x = 0.001; // Finite difference coefficients for gradients double coef[9] = { 1.0/280.0, -4.0/105.0, 1.0/5.0, -4.0/5.0, 0.0, 4.0/5.0, -1.0/5.0, 4.0/105.0, -1.0/280.0 }; @@ -6543,7 +6570,7 @@ assert(qmckl_jastrow_champ_provided(context)); { printf("factor_en_gl\n"); double fd[walk_num][4][elec_num]; - double delta_x = 0.0001; + double delta_x = 0.001; // Finite difference coefficients for gradients double coef[9] = { 1.0/280.0, -4.0/105.0, 1.0/5.0, -4.0/5.0, 0.0, 4.0/5.0, -1.0/5.0, 4.0/105.0, -1.0/280.0 }; @@ -6675,6 +6702,9 @@ assert(qmckl_jastrow_champ_provided(context)); assert(rc == QMCKL_SUCCESS); for (int64_t i = 0; i < walk_num*4*elec_num; i++) { + if (fabs(factor_en_gl_doc[i] - factor_en_gl_hpc[i]) > 1.e-12) { + printf("i=%ld doc=%f hpc=%f\n", i, factor_en_gl_doc[i], factor_en_gl_hpc[i]); + } assert(fabs(factor_en_gl_doc[i] - factor_en_gl_hpc[i]) < 1.e-8); } } @@ -7852,8 +7882,10 @@ assert(qmckl_electron_provided(context)); assert(rc == QMCKL_SUCCESS); for (int64_t i = 0; i < walk_num*(cord_num + 1)*elec_num*4*elec_num; i++) { - printf("i = %ld, doc = %e, hpc = %e\n", i, een_rescaled_e_gl_doc[i], een_rescaled_e_gl_hpc[i]); - assert(fabs(een_rescaled_e_gl_doc[i] - een_rescaled_e_gl_hpc[i]) < 1.e-10); + if (fabs(een_rescaled_e_gl_doc[i] - een_rescaled_e_gl_hpc[i]) > 1.e-12) { + printf("i = %ld, doc = %f, hpc = %f\n", i, een_rescaled_e_gl_doc[i], een_rescaled_e_gl_hpc[i]); + } + assert(fabs(een_rescaled_e_gl_doc[i] - een_rescaled_e_gl_hpc[i]) < 1.e-8); } } @@ -7865,7 +7897,7 @@ assert(qmckl_electron_provided(context)); double fd[walk_num][cord_num+1][elec_num][4][elec_num]; - double delta_x = 0.01; + double delta_x = 0.001; // Finite difference coefficients for gradients double coef[9] = { 1.0/280.0, -4.0/105.0, 1.0/5.0, -4.0/5.0, 0.0, 4.0/5.0, -1.0/5.0, 4.0/105.0, -1.0/280.0 }; @@ -11762,6 +11794,11 @@ TODO factor_een_gl_hpc); for (int64_t i = 0; i < walk_num*4*elec_num; ++i) { + if (fabs(factor_een_gl_doc[i] - factor_een_gl_hpc[i]) > 1e-12) { + printf("i = %ld\n", i); + printf("factor_een_gl_doc = %20.15e\n", factor_een_gl_doc[i]); + printf("factor_een_gl_hpc = %20.15e\n", factor_een_gl_hpc[i]); + } assert(fabs(factor_een_gl_doc[i] - factor_een_gl_hpc[i]) < 1e-8); } }