From 76061ee0f6c9ec9a99e26fb3fd5f13d1c96ac8c7 Mon Sep 17 00:00:00 2001 From: Qiming Sun Date: Wed, 14 Feb 2018 13:08:01 -0800 Subject: [PATCH] Fix Fortran APIs --- ChangeLog | 4 +++- README.md | 4 ++-- src/c2f.h | 18 +++++++++++------- 3 files changed, 16 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2a8a7bb..e12c944 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,6 @@ -Version 3.0.7 (2017-01-15): +Version 3.0.8 (2018-02-14): + * Fix Fortran APIs +Version 3.0.7 (2018-01-15): * Add 3-center SOC integrals Version 3.0.6 (2017-12-20): * Add integrals for X2C graidents and hessian diff --git a/README.md b/README.md index 710340e..4e22349 100644 --- a/README.md +++ b/README.md @@ -3,9 +3,9 @@ qcint (quick libcint) An optimized libcint branch for X86 platform -version 3.0.7 +version 3.0.8 -2017-01-15 +2018-02-14 What is qcint diff --git a/src/c2f.h b/src/c2f.h index 2f0b35d..cb458b5 100644 --- a/src/c2f.h +++ b/src/c2f.h @@ -20,30 +20,34 @@ #define ALL_CINT_FORTRAN_(NAME) \ int c##NAME##_sph_(double *out, int *shls, int *atm, int *natm, \ - int *bas, int *nbas, double *env, CINTOpt *opt) { \ + int *bas, int *nbas, double *env, int64_t optptr_as_integer8) { \ + CINTOpt **opt = (CINTOpt **)optptr_as_integer8; \ return NAME##_sph(out, NULL, shls, \ - atm, *natm, bas, *nbas, env, opt, NULL); \ + atm, *natm, bas, *nbas, env, *opt, NULL); \ } \ void c##NAME##_sph_optimizer_(CINTOpt **opt, int *atm, int *natm, \ int *bas, int *nbas, double *env) { \ NAME##_optimizer(opt, atm, *natm, bas, *nbas, env); \ } \ int c##NAME##_cart_(double *out, int *shls, int *atm, int *natm, \ - int *bas, int *nbas, double *env, CINTOpt *opt) { \ + int *bas, int *nbas, double *env, int64_t optptr_as_integer8) { \ + CINTOpt **opt = (CINTOpt **)optptr_as_integer8; \ return NAME##_cart(out, NULL, shls, \ - atm, *natm, bas, *nbas, env, opt, NULL); \ + atm, *natm, bas, *nbas, env, *opt, NULL); \ } \ void c##NAME##_cart_optimizer_(CINTOpt **opt, int *atm, int *natm, \ int *bas, int *nbas, double *env) { \ NAME##_optimizer(opt, atm, *natm, bas, *nbas, env); \ } \ int c##NAME##_(double *out, int *shls, int *atm, int *natm, \ - int *bas, int *nbas, double *env, CINTOpt *opt) { \ + int *bas, int *nbas, double *env, int64_t optptr_as_integer8) { \ + CINTOpt **opt = (CINTOpt **)optptr_as_integer8; \ return NAME##_spinor((double complex *)out, NULL, shls, \ - atm, *natm, bas, *nbas, env, opt, NULL); \ + atm, *natm, bas, *nbas, env, *opt, NULL); \ } \ -void c##NAME##_optimizer_(CINTOpt **opt, int *atm, int *natm, \ +void c##NAME##_optimizer_(int64_t optptr_as_integer8, int *atm, int *natm, \ int *bas, int *nbas, double *env) { \ + CINTOpt **opt = (CINTOpt **)optptr_as_integer8; \ NAME##_optimizer(opt, atm, *natm, bas, *nbas, env); \ }