mirror of
https://github.com/TREX-CoE/qmckl.git
synced 2024-08-14 16:58:38 +02: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 );
|
const int64_t ldv );
|
||||||
#+end_src
|
#+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)
|
#+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)
|
X, R, lmax, n, L, ldl, VGL, ldv) result(info)
|
||||||
use qmckl
|
use qmckl
|
||||||
implicit none
|
implicit none
|
||||||
@ -4187,14 +4224,14 @@ integer function qmckl_ao_polynomial_vgl_f (context, &
|
|||||||
|
|
||||||
info = QMCKL_SUCCESS
|
info = QMCKL_SUCCESS
|
||||||
|
|
||||||
end function qmckl_ao_polynomial_vgl_f
|
end function qmckl_ao_polynomial_vgl_doc_f
|
||||||
#+end_src
|
#+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:
|
#+RESULTS:
|
||||||
#+begin_src f90 :tangle (eval f) :comments org :exports none
|
#+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) &
|
(context, X, R, lmax, n, L, ldl, VGL, ldv) &
|
||||||
bind(C) result(info)
|
bind(C) result(info)
|
||||||
|
|
||||||
@ -4211,14 +4248,40 @@ end function qmckl_ao_polynomial_vgl_f
|
|||||||
real (c_double ) , intent(out) :: VGL(ldv,n)
|
real (c_double ) , intent(out) :: VGL(ldv,n)
|
||||||
integer (c_int64_t) , intent(in) , value :: ldv
|
integer (c_int64_t) , intent(in) , value :: ldv
|
||||||
|
|
||||||
integer(c_int32_t), external :: qmckl_ao_polynomial_vgl_f
|
integer(c_int32_t), external :: qmckl_ao_polynomial_vgl_doc_f
|
||||||
info = qmckl_ao_polynomial_vgl_f &
|
info = qmckl_ao_polynomial_vgl_doc_f &
|
||||||
(context, X, R, lmax, n, L, ldl, VGL, ldv)
|
(context, X, R, lmax, n, L, ldl, VGL, ldv)
|
||||||
|
|
||||||
end function qmckl_ao_polynomial_vgl
|
end function qmckl_ao_polynomial_vgl_doc
|
||||||
#+end_src
|
#+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:
|
#+RESULTS:
|
||||||
#+begin_src f90 :tangle (eval fh_func) :comments org :exports none
|
#+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 interface
|
||||||
#+end_src
|
#+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
|
#+begin_src c :tangle (eval h_func) :comments org
|
||||||
qmckl_exit_code qmckl_ao_polynomial_transp_vgl (
|
qmckl_exit_code qmckl_ao_polynomial_transp_vgl (
|
||||||
const qmckl_context context,
|
const qmckl_context context,
|
||||||
@ -4258,8 +4323,45 @@ end function qmckl_ao_polynomial_vgl_f
|
|||||||
const int64_t ldv );
|
const int64_t ldv );
|
||||||
#+end_src
|
#+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)
|
#+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)
|
X, R, lmax, n, L, ldl, VGL, ldv) result(info)
|
||||||
use qmckl
|
use qmckl
|
||||||
implicit none
|
implicit none
|
||||||
@ -4386,14 +4488,14 @@ integer function qmckl_ao_polynomial_transp_vgl_f (context, &
|
|||||||
|
|
||||||
info = QMCKL_SUCCESS
|
info = QMCKL_SUCCESS
|
||||||
|
|
||||||
end function qmckl_ao_polynomial_transp_vgl_f
|
end function qmckl_ao_polynomial_transp_vgl_doc_f
|
||||||
#+end_src
|
#+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:
|
#+RESULTS:
|
||||||
#+begin_src f90 :tangle (eval f) :comments org :exports none
|
#+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) &
|
(context, X, R, lmax, n, L, ldl, VGL, ldv) &
|
||||||
bind(C) result(info)
|
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_int64_t) , intent(inout) :: n
|
||||||
integer (c_int32_t) , intent(out) :: L(ldl,n)
|
integer (c_int32_t) , intent(out) :: L(ldl,n)
|
||||||
integer (c_int64_t) , intent(in) , value :: ldl
|
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_int64_t) , intent(in) , value :: ldv
|
||||||
|
|
||||||
integer(c_int32_t), external :: qmckl_ao_polynomial_transp_vgl_f
|
integer(c_int32_t), external :: qmckl_ao_polynomial_transp_vgl_doc_f
|
||||||
info = qmckl_ao_polynomial_transp_vgl_f &
|
info = qmckl_ao_polynomial_transp_vgl_doc_f &
|
||||||
(context, X, R, lmax, n, L, ldl, VGL, ldv)
|
(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
|
#+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:
|
#+RESULTS:
|
||||||
#+begin_src f90 :tangle (eval fh_func) :comments org :exports none
|
#+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_int64_t) , intent(inout) :: n
|
||||||
integer (c_int32_t) , intent(out) :: L(ldl,n)
|
integer (c_int32_t) , intent(out) :: L(ldl,n)
|
||||||
integer (c_int64_t) , intent(in) , value :: ldl
|
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_int64_t) , intent(in) , value :: ldv
|
||||||
|
|
||||||
end function qmckl_ao_polynomial_transp_vgl
|
end function qmckl_ao_polynomial_transp_vgl
|
||||||
@ -4602,7 +4730,7 @@ integer function qmckl_compute_ao_vgl_doc_f(context, &
|
|||||||
integer :: lstart(0:20)
|
integer :: lstart(0:20)
|
||||||
double precision :: x, y, z, r2
|
double precision :: x, y, z, r2
|
||||||
double precision :: cutoff
|
double precision :: cutoff
|
||||||
integer, external :: qmckl_ao_polynomial_vgl_f
|
integer, external :: qmckl_ao_polynomial_vgl_doc_f
|
||||||
|
|
||||||
double precision, allocatable :: poly_vgl(:,:)
|
double precision, allocatable :: poly_vgl(:,:)
|
||||||
integer , allocatable :: powers(:,:), ao_index(:)
|
integer , allocatable :: powers(:,:), ao_index(:)
|
||||||
@ -4650,7 +4778,7 @@ integer function qmckl_compute_ao_vgl_doc_f(context, &
|
|||||||
end if
|
end if
|
||||||
|
|
||||||
! Compute polynomials
|
! 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, &
|
nucleus_max_ang_mom(inucl), n_poly, powers, 3_8, &
|
||||||
poly_vgl, 5_8)
|
poly_vgl, 5_8)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user