mirror of
https://github.com/TREX-CoE/qmckl.git
synced 2025-01-03 10:06:09 +01:00
Prepare polynomials for HPC
This commit is contained in:
parent
1c681d4d7e
commit
7ab099f4f5
168
org/qmckl_ao.org
168
org/qmckl_ao.org
@ -4060,8 +4060,45 @@ assert(0 == test_qmckl_ao_power(context));
|
||||
const int64_t ldv );
|
||||
#+end_src
|
||||
|
||||
#+CALL: generate_c_header(table=qmckl_ao_polynomial_vgl_args,rettyp=get_value("CRetType"),fname="qmckl_ao_polynomial_vgl_doc")
|
||||
|
||||
#+RESULTS:
|
||||
#+begin_src c :tangle (eval h_func) :comments org
|
||||
qmckl_exit_code qmckl_ao_polynomial_vgl_doc (
|
||||
const qmckl_context context,
|
||||
const double* X,
|
||||
const double* R,
|
||||
const int32_t lmax,
|
||||
int64_t* n,
|
||||
int32_t* const L,
|
||||
const int64_t ldl,
|
||||
double* const VGL,
|
||||
const int64_t ldv );
|
||||
#+end_src
|
||||
|
||||
#+begin_src c :tangle (eval c) :comments org
|
||||
qmckl_exit_code
|
||||
qmckl_ao_polynomial_vgl (const qmckl_context context,
|
||||
const double* X,
|
||||
const double* R,
|
||||
const int32_t lmax,
|
||||
int64_t* n,
|
||||
int32_t* const L,
|
||||
const int64_t ldl,
|
||||
double* const VGL,
|
||||
const int64_t ldv )
|
||||
{
|
||||
#ifdef HAVE_HPC
|
||||
//return qmckl_ao_polynomial_vgl_hpc (context, X, R, lmax, n, L, ldl, VGL, ldv);
|
||||
return qmckl_ao_polynomial_vgl_doc (context, X, R, lmax, n, L, ldl, VGL, ldv);
|
||||
#else
|
||||
return qmckl_ao_polynomial_vgl_doc (context, X, R, lmax, n, L, ldl, VGL, ldv);
|
||||
#endif
|
||||
}
|
||||
#+end_src
|
||||
|
||||
#+begin_src f90 :tangle (eval f)
|
||||
integer function qmckl_ao_polynomial_vgl_f (context, &
|
||||
integer function qmckl_ao_polynomial_vgl_doc_f (context, &
|
||||
X, R, lmax, n, L, ldl, VGL, ldv) result(info)
|
||||
use qmckl
|
||||
implicit none
|
||||
@ -4187,14 +4224,14 @@ integer function qmckl_ao_polynomial_vgl_f (context, &
|
||||
|
||||
info = QMCKL_SUCCESS
|
||||
|
||||
end function qmckl_ao_polynomial_vgl_f
|
||||
end function qmckl_ao_polynomial_vgl_doc_f
|
||||
#+end_src
|
||||
|
||||
#+CALL: generate_c_interface(table=qmckl_ao_polynomial_vgl_args,rettyp=get_value("CRetType"),fname=get_value("Name"))
|
||||
#+CALL: generate_c_interface(table=qmckl_ao_polynomial_vgl_args,rettyp=get_value("CRetType"),fname="qmckl_ao_polynomial_vgl_doc" )
|
||||
|
||||
#+RESULTS:
|
||||
#+begin_src f90 :tangle (eval f) :comments org :exports none
|
||||
integer(c_int32_t) function qmckl_ao_polynomial_vgl &
|
||||
integer(c_int32_t) function qmckl_ao_polynomial_vgl_doc &
|
||||
(context, X, R, lmax, n, L, ldl, VGL, ldv) &
|
||||
bind(C) result(info)
|
||||
|
||||
@ -4211,14 +4248,40 @@ end function qmckl_ao_polynomial_vgl_f
|
||||
real (c_double ) , intent(out) :: VGL(ldv,n)
|
||||
integer (c_int64_t) , intent(in) , value :: ldv
|
||||
|
||||
integer(c_int32_t), external :: qmckl_ao_polynomial_vgl_f
|
||||
info = qmckl_ao_polynomial_vgl_f &
|
||||
integer(c_int32_t), external :: qmckl_ao_polynomial_vgl_doc_f
|
||||
info = qmckl_ao_polynomial_vgl_doc_f &
|
||||
(context, X, R, lmax, n, L, ldl, VGL, ldv)
|
||||
|
||||
end function qmckl_ao_polynomial_vgl
|
||||
end function qmckl_ao_polynomial_vgl_doc
|
||||
#+end_src
|
||||
|
||||
#+CALL: generate_f_interface(table=qmckl_ao_polynomial_vgl_args,rettyp=get_value("FRetType"),fname=get_value("Name"))
|
||||
#+CALL: generate_f_interface(table=qmckl_ao_polynomial_vgl_args,rettyp=get_value("FRetType"),fname="qmckl_ao_polynomial_vgl_doc" )
|
||||
|
||||
#+RESULTS:
|
||||
#+begin_src f90 :tangle (eval fh_func) :comments org :exports none
|
||||
interface
|
||||
integer(c_int32_t) function qmckl_ao_polynomial_vgl_doc &
|
||||
(context, X, R, lmax, n, L, ldl, VGL, ldv) &
|
||||
bind(C)
|
||||
use, intrinsic :: iso_c_binding
|
||||
import
|
||||
implicit none
|
||||
|
||||
integer (c_int64_t) , intent(in) , value :: context
|
||||
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(in) , value :: ldl
|
||||
real (c_double ) , intent(out) :: VGL(ldv,n)
|
||||
integer (c_int64_t) , intent(in) , value :: ldv
|
||||
|
||||
end function qmckl_ao_polynomial_vgl_doc
|
||||
end interface
|
||||
#+end_src
|
||||
|
||||
#+CALL: generate_f_interface(table=qmckl_ao_polynomial_vgl_args,rettyp=get_value("FRetType"),fname="qmckl_ao_polynomial_vgl" )
|
||||
|
||||
#+RESULTS:
|
||||
#+begin_src f90 :tangle (eval fh_func) :comments org :exports none
|
||||
@ -4244,7 +4307,9 @@ end function qmckl_ao_polynomial_vgl_f
|
||||
end interface
|
||||
#+end_src
|
||||
|
||||
#+CALL: generate_c_header(table=qmckl_ao_polynomial_vgl_args,rettyp=get_value("CRetType"),fname="qmckl_ao_polynomial_transp_vgl")
|
||||
|
||||
#+RESULTS:
|
||||
#+begin_src c :tangle (eval h_func) :comments org
|
||||
qmckl_exit_code qmckl_ao_polynomial_transp_vgl (
|
||||
const qmckl_context context,
|
||||
@ -4258,8 +4323,45 @@ end function qmckl_ao_polynomial_vgl_f
|
||||
const int64_t ldv );
|
||||
#+end_src
|
||||
|
||||
#+CALL: generate_c_header(table=qmckl_ao_polynomial_vgl_args,rettyp=get_value("CRetType"),fname="qmckl_ao_polynomial_transp_vgl_doc")
|
||||
|
||||
#+RESULTS:
|
||||
#+begin_src c :tangle (eval h_func) :comments org
|
||||
qmckl_exit_code qmckl_ao_polynomial_transp_vgl_doc (
|
||||
const qmckl_context context,
|
||||
const double* X,
|
||||
const double* R,
|
||||
const int32_t lmax,
|
||||
int64_t* n,
|
||||
int32_t* const L,
|
||||
const int64_t ldl,
|
||||
double* const VGL,
|
||||
const int64_t ldv );
|
||||
#+end_src
|
||||
|
||||
#+begin_src c :tangle (eval c) :comments org
|
||||
qmckl_exit_code
|
||||
qmckl_ao_polynomial_transp_vgl (const qmckl_context context,
|
||||
const double* X,
|
||||
const double* R,
|
||||
const int32_t lmax,
|
||||
int64_t* n,
|
||||
int32_t* const L,
|
||||
const int64_t ldl,
|
||||
double* const VGL,
|
||||
const int64_t ldv )
|
||||
{
|
||||
#ifdef HAVE_HPC
|
||||
//return qmckl_ao_polynomial_transp_vgl_hpc (context, X, R, lmax, n, L, ldl, VGL, ldv);
|
||||
return qmckl_ao_polynomial_transp_vgl_doc (context, X, R, lmax, n, L, ldl, VGL, ldv);
|
||||
#else
|
||||
return qmckl_ao_polynomial_transp_vgl_doc (context, X, R, lmax, n, L, ldl, VGL, ldv);
|
||||
#endif
|
||||
}
|
||||
#+end_src
|
||||
|
||||
#+begin_src f90 :tangle (eval f)
|
||||
integer function qmckl_ao_polynomial_transp_vgl_f (context, &
|
||||
integer function qmckl_ao_polynomial_transp_vgl_doc_f (context, &
|
||||
X, R, lmax, n, L, ldl, VGL, ldv) result(info)
|
||||
use qmckl
|
||||
implicit none
|
||||
@ -4386,14 +4488,14 @@ integer function qmckl_ao_polynomial_transp_vgl_f (context, &
|
||||
|
||||
info = QMCKL_SUCCESS
|
||||
|
||||
end function qmckl_ao_polynomial_transp_vgl_f
|
||||
end function qmckl_ao_polynomial_transp_vgl_doc_f
|
||||
#+end_src
|
||||
|
||||
#+CALL: generate_c_interface(table=qmckl_ao_polynomial_vgl_args,rettyp=get_value("CRetType"),fname=get_value("Name"))
|
||||
#+CALL: generate_c_interface(table=qmckl_ao_polynomial_vgl_args,rettyp=get_value("CRetType"),fname="qmckl_ao_polynomial_transp_vgl_doc")
|
||||
|
||||
#+RESULTS:
|
||||
#+begin_src f90 :tangle (eval f) :comments org :exports none
|
||||
integer(c_int32_t) function qmckl_ao_polynomial_transp_vgl &
|
||||
integer(c_int32_t) function qmckl_ao_polynomial_transp_vgl_doc &
|
||||
(context, X, R, lmax, n, L, ldl, VGL, ldv) &
|
||||
bind(C) result(info)
|
||||
|
||||
@ -4407,17 +4509,43 @@ end function qmckl_ao_polynomial_transp_vgl_f
|
||||
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)
|
||||
real (c_double ) , intent(out) :: VGL(ldv,n)
|
||||
integer (c_int64_t) , intent(in) , value :: ldv
|
||||
|
||||
integer(c_int32_t), external :: qmckl_ao_polynomial_transp_vgl_f
|
||||
info = qmckl_ao_polynomial_transp_vgl_f &
|
||||
integer(c_int32_t), external :: qmckl_ao_polynomial_transp_vgl_doc_f
|
||||
info = qmckl_ao_polynomial_transp_vgl_doc_f &
|
||||
(context, X, R, lmax, n, L, ldl, VGL, ldv)
|
||||
|
||||
end function qmckl_ao_polynomial_transp_vgl
|
||||
end function qmckl_ao_polynomial_transp_vgl_doc
|
||||
#+end_src
|
||||
|
||||
#+CALL: generate_f_interface(table=qmckl_ao_polynomial_vgl_args,rettyp=get_value("FRetType"),fname=get_value("Name"))
|
||||
#+CALL: generate_f_interface(table=qmckl_ao_polynomial_vgl_args,rettyp=get_value("FRetType"),fname="qmckl_ao_polynomial_transp_vgl_doc")
|
||||
|
||||
#+RESULTS:
|
||||
#+begin_src f90 :tangle (eval fh_func) :comments org :exports none
|
||||
interface
|
||||
integer(c_int32_t) function qmckl_ao_polynomial_transp_vgl_doc &
|
||||
(context, X, R, lmax, n, L, ldl, VGL, ldv) &
|
||||
bind(C)
|
||||
use, intrinsic :: iso_c_binding
|
||||
import
|
||||
implicit none
|
||||
|
||||
integer (c_int64_t) , intent(in) , value :: context
|
||||
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(in) , value :: ldl
|
||||
real (c_double ) , intent(out) :: VGL(ldv,n)
|
||||
integer (c_int64_t) , intent(in) , value :: ldv
|
||||
|
||||
end function qmckl_ao_polynomial_transp_vgl_doc
|
||||
end interface
|
||||
#+end_src
|
||||
|
||||
#+CALL: generate_f_interface(table=qmckl_ao_polynomial_vgl_args,rettyp=get_value("FRetType"),fname="qmckl_ao_polynomial_transp_vgl")
|
||||
|
||||
#+RESULTS:
|
||||
#+begin_src f90 :tangle (eval fh_func) :comments org :exports none
|
||||
@ -4436,7 +4564,7 @@ end function qmckl_ao_polynomial_transp_vgl_f
|
||||
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)
|
||||
real (c_double ) , intent(out) :: VGL(ldv,n)
|
||||
integer (c_int64_t) , intent(in) , value :: ldv
|
||||
|
||||
end function qmckl_ao_polynomial_transp_vgl
|
||||
@ -4602,7 +4730,7 @@ integer function qmckl_compute_ao_vgl_doc_f(context, &
|
||||
integer :: lstart(0:20)
|
||||
double precision :: x, y, z, r2
|
||||
double precision :: cutoff
|
||||
integer, external :: qmckl_ao_polynomial_vgl_f
|
||||
integer, external :: qmckl_ao_polynomial_vgl_doc_f
|
||||
|
||||
double precision, allocatable :: poly_vgl(:,:)
|
||||
integer , allocatable :: powers(:,:), ao_index(:)
|
||||
@ -4650,7 +4778,7 @@ integer function qmckl_compute_ao_vgl_doc_f(context, &
|
||||
end if
|
||||
|
||||
! Compute polynomials
|
||||
info = qmckl_ao_polynomial_vgl_f(context, e_coord, n_coord, &
|
||||
info = qmckl_ao_polynomial_vgl_doc_f(context, e_coord, n_coord, &
|
||||
nucleus_max_ang_mom(inucl), n_poly, powers, 3_8, &
|
||||
poly_vgl, 5_8)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user