Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ for flexible and agile development in the field of KS-DFT.
* [Gau2Grid](https://github.com/dgasmith/gau2grid) (pregenerated source packaged with GauXC)
* MPI (Optional)
* OpenMP (CPU parallelism, Optional)
* [Cereal](https://github.com/USCiLab/cereal) (Optional)
* [HDF5](https://www.hdfgroup.org/solutions/hdf5/) (Optional)
* [Eigen3](https://eigen.tuxfamily.org/dox/) (Testing Only)
* [CUDA](https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html)/[cuBLAS](https://docs.nvidia.com/cuda/cublas/index.html) (Required only if CUDA enabled)
Expand Down
32 changes: 0 additions & 32 deletions cmake/BuildFindCereal.cmake

This file was deleted.

1 change: 0 additions & 1 deletion cmake/gauxc-cereal.cmake

This file was deleted.

3 changes: 0 additions & 3 deletions cmake/gauxc-dep-versions.cmake
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
set( GAUXC_LINALG_MODULES_REPOSITORY https://github.com/wavefunction91/linalg-cmake-modules.git )
set( GAUXC_LINALG_MODULES_REVISION 9d2c273a671d6811e9fd432f6a4fa3d915b144b8 )

set( GAUXC_CEREAL_REPOSITORY https://github.com/USCiLab/cereal.git )
set( GAUXC_CEREAL_REVISION v1.3.0 )

set( GAUXC_CUB_REPOSITORY https://github.com/NVIDIA/cub.git )
set( GAUXC_CUB_REVISION 1.10.0 )

Expand Down
12 changes: 0 additions & 12 deletions include/gauxc/atom.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,18 +46,6 @@ struct Atom {
Atom( AtomicNumber _Z, double _x, double _y, double _z ) :
Z(_Z), x(_x), y(_y), z(_z) { }

/**
* @brief (De)serialize an atom object to/from a particular cereal archive
*
* @tparam Archive Cereal archive type
*
* @param[in/out] ar Cereal archive
*/
template <typename Archive>
void serialize( Archive& ar ) {
ar( Z, x, y, z );
}

}; // struct Atom

/**
Expand Down
16 changes: 0 additions & 16 deletions include/gauxc/external/cereal.hpp

This file was deleted.

11 changes: 3 additions & 8 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ else()
endif()

include( gauxc-eigen3 )
include( gauxc-cereal )

#add_library( catch2_main STATIC ut_main.cxx)
#target_link_libraries( catch2_main PUBLIC gauxc_catch2 )
Expand Down Expand Up @@ -68,7 +67,7 @@ add_executable( gauxc_test
dd_psi_potential_test.cxx
2nd_derivative_test.cxx
)
target_link_libraries( gauxc_test PUBLIC gauxc gauxc_catch2 Eigen3::Eigen cereal )
target_link_libraries( gauxc_test PUBLIC gauxc gauxc_catch2 Eigen3::Eigen )
if(GAUXC_ENABLE_CUTLASS)
include(gauxc-cutlass)
target_link_libraries(gauxc_test PUBLIC gauxc_cutlass)
Expand All @@ -82,19 +81,15 @@ target_include_directories( gauxc_test PRIVATE ${PROJECT_SOURCE_DIR}/tests )


add_executable( standalone_driver standalone_driver.cxx standards.cxx basis/parse_basis.cxx ini_input.cxx )
target_link_libraries( standalone_driver PUBLIC gauxc gauxc_catch2 Eigen3::Eigen cereal )
target_link_libraries( standalone_driver PUBLIC gauxc gauxc_catch2 Eigen3::Eigen )
target_include_directories( standalone_driver PRIVATE ${PROJECT_BINARY_DIR}/tests )
target_include_directories( standalone_driver PRIVATE ${PROJECT_SOURCE_DIR}/tests )

#add_executable( grid_opt grid_opt.cxx standards.cxx basis/parse_basis.cxx ini_input.cxx )
#target_link_libraries( grid_opt PUBLIC gauxc gauxc_catch2 Eigen3::Eigen cereal )
#target_link_libraries( grid_opt PUBLIC gauxc gauxc_catch2 Eigen3::Eigen )
#target_include_directories( grid_opt PRIVATE ${PROJECT_BINARY_DIR}/tests )
#target_include_directories( grid_opt PRIVATE ${PROJECT_SOURCE_DIR}/tests )

#add_executable( conv_cereal_to_hdf5 conv_cereal_to_hdf5.cxx standards.cxx basis/parse_basis.cxx )
#target_link_libraries( conv_cereal_to_hdf5 PUBLIC gauxc gauxc_catch2 Eigen3::Eigen cereal )
#target_include_directories( conv_cereal_to_hdf5 PRIVATE ${PROJECT_BINARY_DIR}/tests )
#target_include_directories( conv_cereal_to_hdf5 PRIVATE ${PROJECT_SOURCE_DIR}/tests )

add_test( NAME GAUXC_SERIAL_TEST COMMAND $<TARGET_FILE:gauxc_test> )
if( GAUXC_ENABLE_MPI )
Expand Down
34 changes: 18 additions & 16 deletions tests/collocation.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -37,64 +37,66 @@ TEST_CASE( "Water / cc-pVDZ", "[collocation]" ) {

#ifdef GENERATE_TESTS

std::ofstream ref_data( "water_cc-pVDZ_collocation.bin", std::ios::binary );
generate_collocation_data( mol, basis, ref_data );
generate_collocation_data( mol, basis, "water_cc-pVDZ_collocation.hdf5" );

#else

std::ifstream ref_data( GAUXC_REF_DATA_PATH "/water_cc-pVDZ_collocation.bin",
std::ios::binary );
std::string ref_file = GAUXC_REF_DATA_PATH "/water_cc-pVDZ_collocation.hdf5";

#ifdef GAUXC_HAS_HOST
SECTION( "Host Eval" ) {
test_host_collocation( basis, ref_data );
test_host_collocation( basis, ref_file );
}

SECTION( "Host Eval Grad" ) {
test_host_collocation_deriv1( basis, ref_data );
test_host_collocation_deriv1( basis, ref_file );
}

SECTION( "Host Eval Hessian" ) {
test_host_collocation_deriv2( basis, ref_data );
test_host_collocation_deriv2( basis, ref_file );
}

SECTION( "Host Eval Laplacian Gradient" ) {
test_host_collocation_deriv3( basis, ref_file );
}
#endif

#ifdef GAUXC_HAS_CUDA
BasisSetMap basis_map( basis, mol );
SECTION( "CUDA Eval" ) {
test_cuda_collocation( basis, ref_data );
test_cuda_collocation( basis, ref_file );
}
SECTION( "CUDA Shell to Task Eval" ) {
test_cuda_collocation_shell_to_task( basis, basis_map, ref_data );
test_cuda_collocation_shell_to_task( basis, basis_map, ref_file );
}

SECTION( "CUDA Eval Grad" ) {
test_cuda_collocation_deriv1( basis, ref_data );
test_cuda_collocation_deriv1( basis, ref_file );
}
SECTION( "CUDA Shell to Task Eval Grad" ) {
test_cuda_collocation_shell_to_task_gradient( basis, basis_map, ref_data );
test_cuda_collocation_shell_to_task_gradient( basis, basis_map, ref_file );
}

SECTION( "CUDA Shell to Task Eval Hessian" ) {
test_cuda_collocation_shell_to_task_hessian( basis, basis_map, ref_data );
test_cuda_collocation_shell_to_task_hessian( basis, basis_map, ref_file );
}

SECTION( "CUDA Shell to Task Eval Laplacian" ) {
test_cuda_collocation_shell_to_task_laplacian( basis, basis_map, ref_data );
test_cuda_collocation_shell_to_task_laplacian( basis, basis_map, ref_file );
}

SECTION( "CUDA Shell to Task Eval Laplacian Gradient" ) {
test_cuda_collocation_shell_to_task_lapgrad( basis, basis_map, ref_data );
test_cuda_collocation_shell_to_task_lapgrad( basis, basis_map, ref_file );
}
#endif // GAUXC_HAS_CUDA

#ifdef GAUXC_HAS_HIP
SECTION( "HIP Eval" ) {
test_hip_collocation( basis, ref_data );
test_hip_collocation( basis, ref_file );
}

SECTION( "HIP Eval Grad" ) {
test_hip_collocation_deriv1( basis, ref_data );
test_hip_collocation_deriv1( basis, ref_file );
}
#endif // GAUXC_HAS_HIP

Expand Down
17 changes: 15 additions & 2 deletions tests/collocation_common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,20 @@ struct ref_collocation_data {

};

void check_collocation_transpose( int npts, int nbf, const double* ref_val, const double* comp_val, std::string msg = "" ) {
// Weights reference data structure
struct ref_weights_data {
Molecule mol;
std::shared_ptr<MolMeta> meta;
std::vector<XCTask> tasks_unm;
std::vector<XCTask> tasks_mod;

template <typename Archive>
void serialize( Archive& ar ) {
ar( mol, tasks_unm, tasks_mod );
}
};

inline void check_collocation_transpose( int npts, int nbf, const double* ref_val, const double* comp_val, std::string msg = "" ) {

// Check transpose
for( int i = 0; i < nbf; ++i )
Expand All @@ -60,7 +73,7 @@ void check_collocation_transpose( int npts, int nbf, const double* ref_val, cons

}

void check_collocation( int npts, int nbf, const double* ref_val, const double* comp_val ) {
inline void check_collocation( int npts, int nbf, const double* ref_val, const double* comp_val ) {

for( int i = 0; i < nbf; ++i )
for( int j = 0; j < npts; ++j ) {
Expand Down
46 changes: 21 additions & 25 deletions tests/collocation_cuda.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
*/
#ifdef GAUXC_HAS_CUDA
#include "collocation_common.hpp"
#include "hdf5_test_serialization.hpp"
#include "hdf5_test_serialization_impl.hpp"
#include "device/common/collocation_device.hpp"
#include "device_specific/cuda_util.hpp"
#include <gauxc/basisset_map.hpp>
Expand Down Expand Up @@ -215,16 +217,12 @@ void cuda_check_collocation( const std::vector<XCDeviceTask>& tasks,



void test_cuda_collocation_masked_combined( const BasisSet<double>& basis, std::ifstream& in_file, bool grad ) {
void test_cuda_collocation_masked_combined( const BasisSet<double>& basis, const std::string& filename, bool grad ) {



std::vector<ref_collocation_data> ref_data;

{
cereal::BinaryInputArchive ar( in_file );
ar( ref_data );
}
read_collocation_data(ref_data, filename);


device_queue stream( std::make_shared<util::cuda_stream>() );
Expand Down Expand Up @@ -264,15 +262,16 @@ void test_cuda_collocation_masked_combined( const BasisSet<double>& basis, std::
}

void test_cuda_collocation( const BasisSet<double>& basis,
std::ifstream& in_file ) {
const std::string& filename ) {

test_cuda_collocation_masked_combined( basis, in_file, false );
test_cuda_collocation_masked_combined( basis, filename, false );

}

void test_cuda_collocation_deriv1( const BasisSet<double>& basis,
std::ifstream& in_file ) {
const std::string& filename ) {

test_cuda_collocation_masked_combined( basis, in_file, true );
test_cuda_collocation_masked_combined( basis, filename, true );

}

Expand All @@ -291,14 +290,11 @@ void test_cuda_collocation_deriv1( const BasisSet<double>& basis,


void test_cuda_collocation_shell_to_task( const BasisSet<double>& basis, const BasisSetMap& basis_map,
std::ifstream& in_file, bool grad, bool hess, bool lapl, bool lapl_grad) {
const std::string& filename, bool grad, bool hess, bool lapl, bool lapl_grad) {

// Load reference data
std::vector<ref_collocation_data> ref_data;
{
cereal::BinaryInputArchive ar( in_file );
ar( ref_data );
}
read_collocation_data(ref_data, filename);

// Populate base task information
device_queue stream( std::make_shared<util::cuda_stream>() );
Expand Down Expand Up @@ -435,35 +431,35 @@ void test_cuda_collocation_shell_to_task( const BasisSet<double>& basis, const


void test_cuda_collocation_shell_to_task( const BasisSet<double>& basis,
const BasisSetMap& basis_map, std::ifstream& in_file) {
const BasisSetMap& basis_map, const std::string& filename) {

test_cuda_collocation_shell_to_task(basis,basis_map,in_file,false, false, false, false);
test_cuda_collocation_shell_to_task(basis,basis_map,filename,false, false, false, false);

}
void test_cuda_collocation_shell_to_task_gradient( const BasisSet<double>& basis,
const BasisSetMap& basis_map, std::ifstream& in_file) {
const BasisSetMap& basis_map, const std::string& filename) {

test_cuda_collocation_shell_to_task(basis,basis_map,in_file,true, false, false, false);
test_cuda_collocation_shell_to_task(basis,basis_map,filename,true, false, false, false);

}
void test_cuda_collocation_shell_to_task_hessian( const BasisSet<double>& basis,
const BasisSetMap& basis_map, std::ifstream& in_file) {
const BasisSetMap& basis_map, const std::string& filename) {

test_cuda_collocation_shell_to_task(basis,basis_map,in_file,true, true, false, false);
test_cuda_collocation_shell_to_task(basis,basis_map,filename,true, true, false, false);

}

void test_cuda_collocation_shell_to_task_laplacian( const BasisSet<double>& basis,
const BasisSetMap& basis_map, std::ifstream& in_file) {
const BasisSetMap& basis_map, const std::string& filename) {

test_cuda_collocation_shell_to_task(basis,basis_map,in_file,true, false, true, false);
test_cuda_collocation_shell_to_task(basis,basis_map,filename,true, false, true, false);

}

void test_cuda_collocation_shell_to_task_lapgrad( const BasisSet<double>& basis,
const BasisSetMap& basis_map, std::ifstream& in_file) {
const BasisSetMap& basis_map, const std::string& filename) {

test_cuda_collocation_shell_to_task(basis,basis_map,in_file,true, true, true, true);
test_cuda_collocation_shell_to_task(basis,basis_map,filename,true, true, true, true);

}

Expand Down
Loading