GithubHelp home page GithubHelp logo

trex-coe / qmckl Goto Github PK

View Code? Open in Web Editor NEW
33.0 33.0 14.0 13.18 MB

Quantum Monte Carlo Kernel Library

Home Page: http://trex-coe.github.io/qmckl/index.html

License: BSD 3-Clause "New" or "Revised" License

Makefile 0.43% Shell 0.70% Emacs Lisp 0.44% Python 72.12% M4 2.46% CSS 1.00% C 22.09% Fortran 0.17% HTML 0.01% CMake 0.14% SWIG 0.22% Scheme 0.22%
library quantum-monte-carlo

qmckl's People

Contributors

addman2 avatar gianfree avatar haampie avatar justemax avatar pablooliveira avatar purplepachyderm avatar q-posev avatar scemama avatar tgorni avatar v1j4y avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

qmckl's Issues

Too big stack arrays in qmckl_compute_een_rescaled_e

Some compilers/systems are limiting stack size (beyond "ulimit -s").
About Intel compilers, limitation is 4 MB. That can be changed via the KMP_STACKSIZE env. variable, for instance using "10m" value for a 10 Megabytes limit.

source: https://community.intel.com/t5/Intel-Fortran-Compiler/Segmentation-fault-when-using-large-array-with-OpenMP/m-p/758829

bench_jastrow is segfaulting on the Alz_large dataset, more precisely on the een_rescaled_e_ij local stack array defined in the parallel region of the qmckl_compute_een_rescaled_e_hpc function.

A naive workaround consist in dynamically (heap) allocating that array (and then freeing it at the end of the scope). Maybe you could find a smarter fix...

Instead of
double een_rescaled_e_ij[len_een_ij];
I have succesfuly tested
double *een_rescaled_e_ij = malloc (len_een_ij * sizeof (een_rescaled_e_ij[0]));
...
free (een_rescaled_e_ij);

Probably better to use qmckl_malloc/free, if applicable.

Chameleon build options

Begin the Chameleon build of QMCkl. This implies extensive work to make it easy for the user to install QMCkl with Chameleon support.

  • Build with chameleon
  • Use chameleon via define flags
  • Example version of dgemm with chameleon

Bug in `qmckl_get_ao_basis_nucleus_index` function

The function was not updated after transition to the new TREXIO basis set format and so it currently returns nucleus_index array of size nucleus_num instead of ao_basis_shell_num.

I can fix that one but now the tests have to be updated too.

Parallel make

With Nvidia compilers, fortran generates an internal compiler error. Dependencies in configure need to be checked.

Improvements

  • README: out of source build
  • configure without swig

[WIP] electron nuclear distances

Write en-distances based on ee-distances already started.

  • Make sure build is working
  • Make sure testing is working
  • en distance implementation
  • Write tests

MOs

TODO list for MOs

  • Implement native qmckl_dgemm
  • Implement MOs
  • Add tests

Autogenerate c and fortran interface

The c and fortran inteface of qmckl can be set up to be autogenerated from the documentation of the functions.

There are multiple advantages of this strategy which are as follows:

  • Consistent interface generation
  • Consistent conventions of function names
  • Consistent conventions for arguments
  • Documentation is by construction up to date with the code
  • Users and developers are not required to write the interface thus reducing hand written lines of code

Some important points that need to be stressed while adopting this strategy are as follows:

  • New users and developers need to be introduced to the documentation procedure
  • A standard has to be clearly documented and defined

[WIP] Slater Determinant and Local Energy

TODO for calculating Kinetic Energy:

  • Implement determinant, adjoint, and inverse of the matrix
  • VGL of Determinant
  • Adjoint matrix
  • Inverse of Determinant
  • Kinetic energy
  • Potential energy
  • Local energy
  • Drift vector
  • Move
  • Acceptance probability

Confusion between main and master branches

Currently there are two principal branches: main and master.
It's not clear which one is the authoritative one. I suggest we pick one and stick with it.

The main branch seems to lag behind but some of the links still point to it. For example, the README.md in master branch documentation has links that point to the main branch instead.

What do you think @scemama ?

Thanks !

Verificarlo-CI -> org

Files in tools` directory should be put in org-mode files with documentation around.

Mixed language compilation with `ifort` and `gcc`

While compiling fortran files with ifort the following FLAGS are needed:

FCFLAGS='-nofor-main -assume nounderscore'

The call to configure including the above options for developers would look like:

QMCKL_DEVEL=1 ./configure --enable-silent-rules --enable-maintainer-mode FC='ifort' FCFLAGS='-nofor-main -assume nounderscore'

Fail: local_energy and det tests with `icc` and `ifort`

TLDR: Local energy and Determinant tests failing with icc and ifort

Configure command used:

./configure --prefix=$CONDA_PREFIX FC=ifort FCFLAGS='-g -xCORE-AVX2 -O3 ' CC='icc' CFLAGS='-g -xCORE-AVX2 -O3 -fno-omit-frame-pointer'

Summary of configuration:

CC..............: icc
CPPFLAGS........: 
CFLAGS..........: -g -xCORE-AVX2 -O3 -fno-omit-frame-pointer  
FC..............: ifort
FCLAGS..........: -g -xCORE-AVX2 -O3  -nofor-main
LDFLAGS:........: 
LIBS............: -lopenblas    -ltrexio -lpthread -lm 
USE CHAMELEON...: 
HPC version.....: no

Package features:
   trexio

Output running make check:

============================================================================
Testsuite summary for qmckl 0.1.1
============================================================================
# TOTAL: 16
# PASS:  14
# SKIP:  0
# XFAIL: 0
# FAIL:  2
# XPASS: 0
# ERROR: 0

Failing tests:

./tools/test-driver: line 107: 226043 Segmentation fault      (core dumped) "$@" > $log_file 2>&1
FAIL: tests/test_qmckl_determinant
...
./tools/test-driver: line 107: 226277 Segmentation fault      (core dumped) "$@" > $log_file 2>&1
FAIL: tests/test_qmckl_local_energy

Ignore failures on docs generation

We should not require the make all to depend on building the html documentation files using htmlize.el. The reason is that it happens every now and then that the htmlize.el is not present and so each make attempt will try to download it (e.g. after make maintainer-clean). Several issues that I observed:

  1. No internet connection at build time: this is quite common (maybe remove htmlize.el from the files to be cleaned?)
  2. No access to git: in principal, it would be nice to decouple the build process from the git commands, see one of my last commits #85a0d485575e55b0a04a192331f37538e0ab5900 . For example. building Guix package from the GitHub repo fails exactly because of that (internal issue to clone the git submodule).

Jastrow Factor

Calculate the Jastrow factor and derivatives using a simple DGEMM formulation.

  • Build factor_ee
  • Build factor_en
  • Build factor_een
  • Build factor_ee_deriv_e
  • Build factor_en_deriv_e
  • Build factor_een_deriv_e

FAIL : test_qmckl_local_energy

On latest master commit while using icc/ifort 2021.3 + -xCORE-AVX2 + fno-omit-frame-pointer
I tried to run test-driver directly but didn't manage to have it to work (was always missing one argument apparently ...).

Configure command used :
./configure --prefix=$PWD/_install CC=icc FC=ifort CFLAGS="-g -O2 -xCORE-AVX2 -fno-omit-frame-pointer" FCFLAGS="-cpp -g -O2 -xCORE-AVX2 -fno-omit-frame-pointer"

Resume :

qmckl Version 0.1.1  -- Developer mode

Prefix: '/home/kcamus/Trex/qmckl/qmckl/_install'.

CC..............: icc
CPPFLAGS........: 
CFLAGS..........: -g -O2 -xCORE-AVX2 -fno-omit-frame-pointer  
FC..............: ifort
FCLAGS..........: -cpp -g -O2 -xCORE-AVX2 -fno-omit-frame-pointer -nofor-main
LDFLAGS:........: 
LIBS............: -lopenblas -llapack -lopenblas   -ltrexio -lpthread -lm 
USE CHAMELEON...: 

Package features:
   trexio

Output extract when running make check (all others tests pass):

PASS: tests/test_qmckl_jastrow
./tools/test-driver: line 109: 541134 Segmentation fault      (core dumped) "$@" > $log_file 2>&1
FAIL: tests/test_qmckl_local_energy

Let me know if you need anything specific or if I need to try something.

Add argument to qmkl_malloc

An extra pointer argument to an abstract struct is needed to enable the possibility to pass infos to allocate memory on CPU or GPU, alignment, etc...

Build install issue

Try to fix build install fails in 4a63473

  • First make sure make install works
  • Make sure the make dist check works

Compilation : User side improvement

Same issue as the one reported for TREXIO: TREX-CoE/trexio#62


  • Issue: Compilation fails with the following message

make[2]: *** No rule to make target 'share/qmckl/fortran/qmckl_f.f90', needed by 'src/qmckl_f.f90'. Stop.

  • Steps to reproduce

Clone the repository
git clone https://github.com/TREX-CoE/qmckl
configure
./autogen
./configure --without-trexio
Issue make command
make


GPU library

TODO: Create a new repo containing all GPU functions. This will allow to configure and compile teh GPU functions with the best GPU compiler and keep the best CPU compiler for CPU functions.

Sherman-Morrison-Woodbury

Integrate Sherman-Morrison-Woodbury into QMCkl

  • Basic integration of kernels (QMCkl compiles and kernels are callable from outside)
  • Complete basic requirements documentation
  • Add real tests
  • Add and complete documentation
  • Take care of compiler warnings

Non-uniform lists of arguments in the header file

In the generated qmckl.h header file the lists of arguments follow 3 different patterns (see below). It adds additional complexity to processing the header file by external tools (e.g. SWIG which parses the header file looking for certain patterns in the arguments lists).

Having arguments in one line is also good for grep-ing but might decrease the readability of the header file.

<func_name> (<type1>* <arg1>, ...)

<func_name> (<type1> * <arg1>, ...) (space between pointer and type declaration)

<func_name> (<type1> <arg1>,
             <type2> <arg2>,
                       ...
                      )

munit alias

The following define statement can be added before including munit.h
#define MUNIT_ENABLE_ASSERT_ALIASES
in order to get rid of the munit_ prefix in munit_assert calls, e.g. assert_int instead of munit_assert_int

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.