mirror of
https://github.com/TREX-CoE/qmckl.git
synced 2024-12-23 04:44:03 +01:00
c version of compute_asymp_jasb
This commit is contained in:
commit
3a727b7688
108
.github/workflows/test-build.yml
vendored
108
.github/workflows/test-build.yml
vendored
@ -18,70 +18,94 @@ jobs:
|
|||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: sudo apt-get install emacs autoconf libhdf5-dev
|
run: sudo apt-get install emacs autoconf libhdf5-dev
|
||||||
|
|
||||||
- name: Install trexio
|
#- name: Install trexio from the distribution tarball
|
||||||
|
# run: |
|
||||||
|
# export TAG=v2.1.0
|
||||||
|
# export VERSION=2.1.0
|
||||||
|
# wget https://github.com/TREX-CoE/trexio/releases/download/${TAG}/trexio-${VERSION}.tar.gz
|
||||||
|
# tar -zxf trexio-${VERSION}.tar.gz
|
||||||
|
# cd trexio-${VERSION}
|
||||||
|
# ./configure --prefix=/usr
|
||||||
|
# make -j 4
|
||||||
|
# sudo make install
|
||||||
|
- name: Install the latest TREXIO from the GitHub clone
|
||||||
run: |
|
run: |
|
||||||
export TAG=v2.1.0
|
git clone https://github.com/TREX-CoE/trexio.git
|
||||||
export VERSION=2.1.0
|
cd trexio
|
||||||
wget https://github.com/TREX-CoE/trexio/releases/download/${TAG}/trexio-${VERSION}.tar.gz
|
./autogen.sh
|
||||||
tar -zxf trexio-${VERSION}.tar.gz
|
|
||||||
cd trexio-${VERSION}
|
|
||||||
./configure --prefix=/usr
|
./configure --prefix=/usr
|
||||||
make -j 8
|
make -j 4
|
||||||
sudo make install
|
sudo make install
|
||||||
|
|
||||||
- name: Build
|
- name: Build QMCkl
|
||||||
run: |
|
run: |
|
||||||
./autogen.sh
|
./autogen.sh
|
||||||
./configure --enable-silent-rules --enable-debug
|
./configure --enable-silent-rules --enable-debug
|
||||||
make -j 8
|
make -j 4
|
||||||
|
|
||||||
- name: Run test
|
- name: Run test
|
||||||
run: |
|
run: make -j 4 check
|
||||||
make -j check
|
|
||||||
|
|
||||||
- name: Archive test log file
|
- name: Archive test log file
|
||||||
if: failure()
|
if: failure()
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: test-report
|
name: test-report-ubuntu
|
||||||
path: test-suite.log
|
path: test-suite.log
|
||||||
|
|
||||||
- name: Dist test
|
- name: Dist test
|
||||||
run: |
|
run: make distcheck
|
||||||
make distcheck
|
|
||||||
|
|
||||||
- name: Archive test log file
|
- name: Archive test log file
|
||||||
if: failure()
|
if: failure()
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: dist-report
|
name: dist-report-ubuntu
|
||||||
path: test-suite.log
|
path: test-suite.log
|
||||||
|
|
||||||
|
x86_macos:
|
||||||
|
|
||||||
# x86_macos:
|
runs-on: macos-latest
|
||||||
#
|
name: x86 MacOS latest
|
||||||
# runs-on: macos-latest
|
|
||||||
# name: x86 MacOS latest
|
steps:
|
||||||
#
|
- uses: actions/checkout@v2
|
||||||
# steps:
|
- name: install dependencies
|
||||||
# - uses: actions/checkout@v2
|
run: brew install emacs hdf5 automake pkg-config
|
||||||
# - name: install dependencies
|
|
||||||
# run: |
|
- name: Symlink gfortran (macOS)
|
||||||
# brew install gfortran-10
|
if: runner.os == 'macOS'
|
||||||
# brew install emacs
|
run: |
|
||||||
# brew install autoconf automake libtool
|
# make sure gfortran is available
|
||||||
# - name: install trexio
|
# https://github.com/actions/virtual-environments/issues/2524
|
||||||
# run: |
|
# https://github.com/cbg-ethz/dce/blob/master/.github/workflows/pkgdown.yaml
|
||||||
# wget https://github.com/TREX-CoE/trexio/releases/download/v1.0/trexio-1.0.0.tar.gz
|
sudo ln -s /usr/local/bin/gfortran-10 /usr/local/bin/gfortran
|
||||||
# tar -zxf trexio-1.0.0.tar.gz
|
sudo mkdir /usr/local/gfortran
|
||||||
# cd trexio-1.0.0
|
sudo ln -s /usr/local/Cellar/gcc@10/*/lib/gcc/10 /usr/local/gfortran/lib
|
||||||
# ./configure
|
gfortran --version
|
||||||
# make -j 8
|
|
||||||
# sudo make install
|
- name: Install the latest TREXIO from the GitHub clone
|
||||||
# - name: Run test
|
run: |
|
||||||
# run: |
|
git clone https://github.com/TREX-CoE/trexio.git
|
||||||
# ./autogen.sh
|
cd trexio
|
||||||
# ./configure --enable-silent-rules --enable-debug
|
./autogen.sh
|
||||||
# make -j 8
|
./configure --prefix=${PWD}/_install --enable-silent-rules
|
||||||
# make -j check
|
make -j 4
|
||||||
# make distcheck
|
make install
|
||||||
|
|
||||||
|
- name: Build QMCkl
|
||||||
|
run: |
|
||||||
|
export PKG_CONFIG_PATH=${PWD}/trexio/_install/lib/pkgconfig:$PKG_CONFIG_PATH
|
||||||
|
./autogen.sh
|
||||||
|
./configure --enable-silent-rules --enable-debug
|
||||||
|
make -j 4
|
||||||
|
|
||||||
|
- name: Run test
|
||||||
|
run: make -j 4 check
|
||||||
|
|
||||||
|
- name: Archive test log file
|
||||||
|
if: failure()
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: test-report-macos
|
||||||
|
path: test-suite.log
|
||||||
|
@ -75,7 +75,6 @@ AC_PROG_CC
|
|||||||
m4_version_prereq([2.70],[], [AC_PROG_CC_C99])
|
m4_version_prereq([2.70],[], [AC_PROG_CC_C99])
|
||||||
AS_IF([test "$ac_cv_prog_cc_c99" = "no"], [AC_MSG_ERROR([The compiler does not support C99])])
|
AS_IF([test "$ac_cv_prog_cc_c99" = "no"], [AC_MSG_ERROR([The compiler does not support C99])])
|
||||||
AC_PROG_CC_C_O
|
AC_PROG_CC_C_O
|
||||||
AC_PROG_F77
|
|
||||||
AC_PROG_FC
|
AC_PROG_FC
|
||||||
AC_PROG_FC_C_O
|
AC_PROG_FC_C_O
|
||||||
AC_FC_SRCEXT([f90])
|
AC_FC_SRCEXT([f90])
|
||||||
|
@ -349,7 +349,7 @@ qmckl_exit_code qmckl_init_jastrow(qmckl_context context) {
|
|||||||
qmckl_context_struct* const ctx = (qmckl_context_struct* const) context;
|
qmckl_context_struct* const ctx = (qmckl_context_struct* const) context;
|
||||||
assert (ctx != NULL);
|
assert (ctx != NULL);
|
||||||
|
|
||||||
ctx->jastrow.uninitialized = (1 << 6) - 1;
|
ctx->jastrow.uninitialized = (1 << 5) - 1;
|
||||||
|
|
||||||
/* Default values */
|
/* Default values */
|
||||||
|
|
||||||
@ -633,7 +633,6 @@ qmckl_exit_code qmckl_set_jastrow_type_nucl_vector (qmckl_context context, con
|
|||||||
qmckl_exit_code qmckl_set_jastrow_aord_vector (qmckl_context context, const double * aord_vector);
|
qmckl_exit_code qmckl_set_jastrow_aord_vector (qmckl_context context, const double * aord_vector);
|
||||||
qmckl_exit_code qmckl_set_jastrow_bord_vector (qmckl_context context, const double * bord_vector);
|
qmckl_exit_code qmckl_set_jastrow_bord_vector (qmckl_context context, const double * bord_vector);
|
||||||
qmckl_exit_code qmckl_set_jastrow_cord_vector (qmckl_context context, const double * cord_vector);
|
qmckl_exit_code qmckl_set_jastrow_cord_vector (qmckl_context context, const double * cord_vector);
|
||||||
qmckl_exit_code qmckl_set_jastrow_dependencies (qmckl_context context);
|
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
#+NAME:pre2
|
#+NAME:pre2
|
||||||
@ -650,8 +649,8 @@ qmckl_context_struct* const ctx = (qmckl_context_struct* const) context;
|
|||||||
ctx->jastrow.uninitialized &= ~mask;
|
ctx->jastrow.uninitialized &= ~mask;
|
||||||
ctx->jastrow.provided = (ctx->jastrow.uninitialized == 0);
|
ctx->jastrow.provided = (ctx->jastrow.uninitialized == 0);
|
||||||
if (ctx->jastrow.provided) {
|
if (ctx->jastrow.provided) {
|
||||||
//qmckl_exit_code rc_ = qmckl_set_jastrow_dependencies(context);
|
qmckl_exit_code rc_ = qmckl_finalize_jastrow(context);
|
||||||
//if (rc_ != QMCKL_SUCCESS) return rc_;
|
if (rc_ != QMCKL_SUCCESS) return rc_;
|
||||||
}
|
}
|
||||||
|
|
||||||
return QMCKL_SUCCESS;
|
return QMCKL_SUCCESS;
|
||||||
@ -918,30 +917,6 @@ qmckl_exit_code qmckl_set_jastrow_cord_vector(qmckl_context context, double cons
|
|||||||
<<post2>>
|
<<post2>>
|
||||||
}
|
}
|
||||||
|
|
||||||
qmckl_exit_code qmckl_set_jastrow_dependencies(qmckl_context context) {
|
|
||||||
<<pre2>>
|
|
||||||
|
|
||||||
/* Check for electron data */
|
|
||||||
if (!(ctx->electron.provided)) {
|
|
||||||
return qmckl_failwith( context,
|
|
||||||
QMCKL_NOT_PROVIDED,
|
|
||||||
"qmckl_provide_ee_distance",
|
|
||||||
NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Check for nucleus data */
|
|
||||||
if (!(ctx->nucleus.provided)) {
|
|
||||||
return qmckl_failwith( context,
|
|
||||||
QMCKL_NOT_PROVIDED,
|
|
||||||
"qmckl_provide_en_distance",
|
|
||||||
NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
int32_t mask = 1 << 6;
|
|
||||||
|
|
||||||
<<post2>>
|
|
||||||
}
|
|
||||||
|
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
When the required information is completely entered, other data structures are
|
When the required information is completely entered, other data structures are
|
||||||
@ -988,13 +963,9 @@ qmckl_exit_code qmckl_finalize_jastrow(qmckl_context context) {
|
|||||||
NULL);
|
NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
qmckl_exit_code rc = QMCKL_FAILURE;
|
qmckl_exit_code rc = QMCKL_SUCCESS;
|
||||||
return rc;
|
return rc;
|
||||||
|
|
||||||
/* ----------------------------------- */
|
|
||||||
/* Start calculation of data */
|
|
||||||
/* ----------------------------------- */
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
#+end_src
|
#+end_src
|
||||||
@ -1339,7 +1310,7 @@ qmckl_exit_code qmckl_compute_asymp_jasb (
|
|||||||
const double* bord_vector,
|
const double* bord_vector,
|
||||||
const double rescale_factor_kappa_ee,
|
const double rescale_factor_kappa_ee,
|
||||||
double* const asymp_jasb ) {
|
double* const asymp_jasb ) {
|
||||||
// What is wrong here?
|
|
||||||
double kappa_inv, x, asym_one;
|
double kappa_inv, x, asym_one;
|
||||||
|
|
||||||
kappa_inv = 1.0 / rescale_factor_kappa_ee;
|
kappa_inv = 1.0 / rescale_factor_kappa_ee;
|
||||||
@ -1438,8 +1409,6 @@ rc = qmckl_set_jastrow_bord_vector(context, bord_vector);
|
|||||||
assert(rc == QMCKL_SUCCESS);
|
assert(rc == QMCKL_SUCCESS);
|
||||||
rc = qmckl_set_jastrow_cord_vector(context, cord_vector);
|
rc = qmckl_set_jastrow_cord_vector(context, cord_vector);
|
||||||
assert(rc == QMCKL_SUCCESS);
|
assert(rc == QMCKL_SUCCESS);
|
||||||
rc = qmckl_set_jastrow_dependencies(context);
|
|
||||||
assert(rc == QMCKL_SUCCESS);
|
|
||||||
|
|
||||||
/* Check if Jastrow is properly initialized */
|
/* Check if Jastrow is properly initialized */
|
||||||
assert(qmckl_jastrow_provided(context));
|
assert(qmckl_jastrow_provided(context));
|
||||||
|
@ -2,10 +2,12 @@ rank_metadata_code 0
|
|||||||
rank_metadata_author 0
|
rank_metadata_author 0
|
||||||
metadata_code_num_isSet 0
|
metadata_code_num_isSet 0
|
||||||
metadata_author_num_isSet 0
|
metadata_author_num_isSet 0
|
||||||
|
metadata_unsafe_isSet 0
|
||||||
len_metadata_package_version 6
|
len_metadata_package_version 6
|
||||||
metadata_package_version
|
metadata_package_version
|
||||||
2.0.0
|
2.2.0
|
||||||
len_metadata_description 0
|
len_metadata_description 0
|
||||||
metadata_description
|
metadata_description
|
||||||
metadata_code
|
metadata_code
|
||||||
metadata_author
|
metadata_author
|
||||||
|
metadata_unsafe_isSet 0
|
||||||
|
Loading…
Reference in New Issue
Block a user