From 83dea2b77398b8053e5efbdf3ac7a1d5373c65d4 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Fri, 23 Feb 2024 11:56:28 +0100 Subject: [PATCH] Fix warnings with Cray ftn --- org/qmckl_ao.org | 20 ++++++++++---------- org/qmckl_context.org | 1 - org/qmckl_electron.org | 4 ++++ org/qmckl_jastrow_champ.org | 7 +++---- tools/build_qmckl_f.sh | 1 - 5 files changed, 17 insertions(+), 16 deletions(-) diff --git a/org/qmckl_ao.org b/org/qmckl_ao.org index 8da7cbc1..624a468b 100644 --- a/org/qmckl_ao.org +++ b/org/qmckl_ao.org @@ -4284,10 +4284,10 @@ function qmckl_ao_power(context, n, X, LMAX, P, ldp) & integer (qmckl_context), intent(in) , value :: context integer (c_int64_t) , intent(in) , value :: n + integer (c_int64_t) , intent(in) , value :: ldp real (c_double ) , intent(in) :: X(n) integer (c_int32_t) , intent(in) :: LMAX(n) real (c_double ) , intent(out) :: P(ldp,n) - integer (c_int64_t) , intent(in) , value :: ldp integer(qmckl_exit_code) :: info integer(c_int64_t) :: i,k @@ -4339,10 +4339,10 @@ end function qmckl_ao_power integer (qmckl_context), intent(in) , value :: context integer (c_int64_t) , intent(in) , value :: n + integer (c_int64_t) , intent(in) , value :: ldp real (c_double ) , intent(in) :: X(n) integer (c_int32_t) , intent(in) :: LMAX(n) real (c_double ) , intent(out) :: P(ldp,n) - integer (c_int64_t) , intent(in) , value :: ldp end function qmckl_ao_power end interface @@ -4679,10 +4679,10 @@ end function qmckl_ao_polynomial_vgl_doc real (c_double ) , intent(in) :: R(3) integer (c_int32_t) , intent(in) , value :: lmax integer (c_int64_t) , intent(inout) :: n - integer (c_int32_t) , intent(out) :: L(ldl,n) integer (c_int64_t) , intent(in) , value :: ldl - real (c_double ) , intent(out) :: VGL(ldv,n) integer (c_int64_t) , intent(in) , value :: ldv + integer (c_int32_t) , intent(out) :: L(ldl,n) + real (c_double ) , intent(out) :: VGL(ldv,n) end function qmckl_ao_polynomial_vgl_doc end interface @@ -4704,11 +4704,11 @@ end function qmckl_ao_polynomial_vgl_doc real (c_double ) , intent(in) :: X(3) real (c_double ) , intent(in) :: R(3) integer (c_int32_t) , intent(in) , value :: lmax - integer (c_int64_t) , intent(inout) :: n - integer (c_int32_t) , intent(out) :: L(ldl,n) + integer (c_int64_t) , intent(inout) :: n integer (c_int64_t) , intent(in) , value :: ldl - real (c_double ) , intent(out) :: VGL(ldv,n) integer (c_int64_t) , intent(in) , value :: ldv + integer (c_int32_t) , intent(out) :: L(ldl,n) + real (c_double ) , intent(out) :: VGL(ldv,n) end function qmckl_ao_polynomial_vgl end interface @@ -5226,10 +5226,10 @@ qmckl_ao_polynomial_transp_vgl_hpc (const qmckl_context context, real (c_double ) , intent(in) :: R(3) integer (c_int32_t) , intent(in) , value :: lmax integer (c_int64_t) , intent(inout) :: n - integer (c_int32_t) , intent(out) :: L(ldl,n) integer (c_int64_t) , intent(in) , value :: ldl - real (c_double ) , intent(out) :: VGL(ldv,5) integer (c_int64_t) , intent(in) , value :: ldv + integer (c_int32_t) , intent(out) :: L(ldl,n) + real (c_double ) , intent(out) :: VGL(ldv,5) end function qmckl_ao_polynomial_transp_vgl end interface @@ -6879,8 +6879,8 @@ qmckl_compute_ao_vgl_hpc_gaussian ( } break; } - } else { /* + } else { for (int64_t il=0 ; ilelectron.walker_old = ctx->electron.walker; ctx->date += 1UL; ctx->point.date = ctx-> date; return QMCKL_SUCCESS; diff --git a/org/qmckl_electron.org b/org/qmckl_electron.org index 016b4010..c4370fac 100644 --- a/org/qmckl_electron.org +++ b/org/qmckl_electron.org @@ -334,6 +334,10 @@ qmckl_set_electron_coord(qmckl_context context, ctx->electron.walker.num = walk_num; memcpy(&(ctx->electron.walker.point), &(ctx->point), sizeof(qmckl_point_struct)); + // If it is the first time we set the electrons, we set also walkers_old. + if (ctx->electron.walker_old.num == 0) { + qmckl_set_electron_coord(context, transp, walk_num, coord, size_max); + } return QMCKL_SUCCESS; } diff --git a/org/qmckl_jastrow_champ.org b/org/qmckl_jastrow_champ.org index 8c699752..8b22a20c 100644 --- a/org/qmckl_jastrow_champ.org +++ b/org/qmckl_jastrow_champ.org @@ -6630,8 +6630,9 @@ integer function qmckl_compute_jastrow_champ_factor_een_rescaled_e_gl_f( & end do end do - ! prepare the actual een table - een_rescaled_e_gl(:,:,:,0,nw) = 0.d0 +! Not necessary: should be set to zero by qmckl_malloc +! een_rescaled_e_gl(:,:,:,0,nw) = 0.d0 + do l = 1, cord_num kappa_l = - dble(l) * rescale_factor_ee do j = 1, elec_num @@ -7162,8 +7163,6 @@ integer function qmckl_compute_een_rescaled_n_f( & return endif - ! Prepare table of exponentiated distances raised to appropriate power - een_rescaled_n = 0.0d0 do nw = 1, walk_num ! prepare the actual een table diff --git a/tools/build_qmckl_f.sh b/tools/build_qmckl_f.sh index df1eb7d0..705e4a3d 100755 --- a/tools/build_qmckl_f.sh +++ b/tools/build_qmckl_f.sh @@ -89,7 +89,6 @@ cat << EOF >> ${qmckl_f} end module qmckl_constants module qmckl - use, intrinsic :: iso_c_binding use qmckl_constants EOF