Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MPI support for SGP construction #14

Open
wants to merge 245 commits into
base: master
Choose a base branch
from
Open

MPI support for SGP construction #14

wants to merge 245 commits into from

Conversation

YuuuXie
Copy link
Collaborator

@YuuuXie YuuuXie commented May 18, 2021

Features

Added a new class ParallelSGP to build SGP from a large, fixed training data set using MPI, not on-the-fly construction. The construction of SGP consists of two processes:

  • Load, distribute training data and compute descriptors, by method load_local_training_data
  • Compute kernel matrices and vectors from the training set, by method compute_matrices
  • Method build is a general interface, which calls load_local_training_data and compute_matrices

Added unit test: tests/test_parallel_sgp.cpp

  • To run the unit test, try ./tests for serial version,
  • and mpirun -n <N_procs> ./tests for parallel version, N_procs=1, 4, 9, 16,...

Added timing test of MPI: timing/mpi_construction.cpp

  • To run the timing test, go into the folder build/timing, and run mpirun -n <N_procs> ./time_mpi <N_strucs>, N_strucs is the number of training structures, each structure will have 100 atoms and 5 sparse envs

Added .xyz file reader. Since the distmatrix does not support python binding, the ParallelSGP can not build python interface, thus python io like ASE can not be used to convert data in file into arrays. So a c++ reader for xyz file is provided

  • src/flare_pp/utils.cpp
  • flare_pp/utils.py
  • test_utils.cpp

Dependencies

  • OpenMPI. Below are the modules that need to be loaded before running cmake
module load cmake/3.17.3-fasrc01
module load gcc/9.3.0-fasrc01 openmpi/4.0.5-fasrc01
module load intel-mkl/2019.5.281-fasrc01
module load python/3.6.3-fasrc01
module load eigen/3.3.7-fasrc01
  • Distmatrix by Anders. Added to CMakeLists.txt

Todos

  • unit test: tests/test_parallel_sgp.cpp
  • Timing test of MPI: timing/mpi_construction.cpp
  • .xyz file reader.
  • multiple kernels/descriptors
  • Pull branch Likelihood gradient computed from Sigma #20
  • Add likelihood and gradient evaluation
  • Add more docs
    • docs for python api
  • Move some printings to the debug flag
  • The distmatrix needs to be public @anjohan

Lower priority:

  • Add update_matrix to support OTF training (theoretically we can still do OTF with current ParallelSGP, but each time it construct on the whole dataset, instead of update matrices with the new added data)
  • The distmatrix class needs python binding

@YuuuXie YuuuXie changed the title [WIP] MPI support for SGP construction MPI support for SGP construction Oct 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant