Skip to content
Open
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
8 changes: 4 additions & 4 deletions cmake/gauxc-dep-versions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ set( GAUXC_CUB_REVISION 1.10.0 )
set( GAUXC_CUTLASS_REPOSITORY https://github.com/NVIDIA/cutlass.git )
set( GAUXC_CUTLASS_REVISION v2.10.0 )

set( GAUXC_EXCHCXX_REPOSITORY https://github.com/wavefunction91/ExchCXX.git )
set( GAUXC_EXCHCXX_REVISION v1.0.0 )
set( GAUXC_EXCHCXX_REPOSITORY https://github.com/lorisercole/ExchCXX.git )
set( GAUXC_EXCHCXX_REVISION 601f72eb668e0721a8452fc3eaff510f431946b0 )

set( GAUXC_GAU2GRID_REPOSITORY https://github.com/dgasmith/gau2grid.git )
set( GAUXC_GAU2GRID_REVISION v2.0.6 )

set( GAUXC_INTEGRATORXX_REPOSITORY https://github.com/wavefunction91/IntegratorXX.git )
set( GAUXC_INTEGRATORXX_REVISION 1369be58d7a3235dac36d75dd964fef058830622 )
set( GAUXC_INTEGRATORXX_REPOSITORY https://github.com/lorisercole/IntegratorXX.git )
set( GAUXC_INTEGRATORXX_REVISION 58012a0b32c45f5b403380fab594047dd4587f55 )

set( GAUXC_HIGHFIVE_REPOSITORY https://github.com/highfive-devs/HighFive.git )
set( GAUXC_HIGHFIVE_REVISION 805f0e13d09b47c4b01d40682621904aa3b31bb8 )
2 changes: 1 addition & 1 deletion external/gau2grid/generated_source/gau2grid/gau2grid.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,4 @@ void gg_collocation_deriv3(int L, const unsigned long npoints, const double* PRA
#ifdef __cplusplus
}
#endif
#endif /* GAU2GRID_GUARD_H */
#endif /* GAU2GRID_GUARD_H */
Original file line number Diff line number Diff line change
Expand Up @@ -96,4 +96,4 @@
#define PRAGMA_RESTRICT __restrict__


#endif
#endif
1 change: 1 addition & 0 deletions external/gau2grid/generated_source/gau2grid_helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include <math.h>
#if defined(__clang__) && defined(_MSC_VER)
#include <malloc.h>
#include <stdlib.h>
#elif defined __clang__
#include <mm_malloc.h>
#elif defined _MSC_VER
Expand Down
7 changes: 6 additions & 1 deletion include/gauxc/exceptions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class generic_gauxc_exception : public std::exception {
<< " Line " << line_ << std::endl;
auto msg = ss.str();

return strdup( msg.c_str() );
return _strdup( msg.c_str() );
};

public:
Expand All @@ -76,8 +76,13 @@ class generic_gauxc_exception : public std::exception {

}

#ifdef _MSC_VER
#define GAUXC_GENERIC_EXCEPTION( MSG ) \
throw generic_gauxc_exception( __FILE__, __FUNCSIG__, __LINE__, MSG )
#else
#define GAUXC_GENERIC_EXCEPTION( MSG ) \
throw generic_gauxc_exception( __FILE__, __PRETTY_FUNCTION__, __LINE__, MSG )
#endif

#define GAUXC_PIMPL_NOT_INITIALIZED() \
GAUXC_GENERIC_EXCEPTION("PIMPL NOT INITIALIZED")
Expand Down
2 changes: 1 addition & 1 deletion include/gauxc/molecule.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class Molecule : public std::vector<Atom> {
})->Z;
}

bool operator==(const Molecule& other) {
bool operator==(const Molecule& other) const {
if(other.size() != this->size()) return false;
for( auto i = 0ul; i < this->size(); ++i )
if( other[i] != operator[](i) ) return false;
Expand Down
1 change: 1 addition & 0 deletions include/gauxc/reduction_driver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
*/
#pragma once
#include <memory>
#include <string>
#include <gauxc/gauxc_config.hpp>
#include <gauxc/runtime_environment.hpp>
#include <typeindex>
Expand Down
24 changes: 24 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,30 @@ if( GAUXC_CXX_HAS_WSHADOW )
target_compile_options( gauxc PRIVATE $<$<COMPILE_LANGUAGE:CXX>: -Wshadow> )
endif()

if(MSVC)
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
target_compile_options( gauxc PRIVATE
-Wno-covered-switch-default
-Wno-documentation
-Wno-documentation-unknown-command
-Wno-implicit-int-float-conversion
-Wno-language-extension-token
-Wno-reserved-identifier
-Wno-shorten-64-to-32
-Wno-sign-compare
-Wno-undef
)
else()
target_compile_options( gauxc PRIVATE
/W2
/wd4100 # unreferenced parameter
/wd4101 # unreferenced local variable
/wd4242 # 'identifier': conversion from 'type1' to 'type2', possible loss of data
/wd5219 # implicit conversion from 'type-1' to 'type-2', possible loss of data
)
endif()
endif()

target_link_libraries( gauxc PUBLIC
ExchCXX::ExchCXX
IntegratorXX::IntegratorXX
Expand Down
2 changes: 1 addition & 1 deletion src/exceptions/cublas_exception.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class cublas_exception : public std::exception {

auto msg = ss.str();

return strdup( msg.c_str() );
return _strdup( msg.c_str() );
}

public:
Expand Down
2 changes: 1 addition & 1 deletion src/exceptions/cuda_exception.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class cuda_exception : public std::exception {

auto msg = ss.str();

return strdup( msg.c_str() );
return _strdup( msg.c_str() );
}

public:
Expand Down
2 changes: 1 addition & 1 deletion src/exceptions/cutlass_exception.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class cutlass_exception : public std::exception {

auto msg = ss.str();

return strdup( msg.c_str() );
return _strdup( msg.c_str() );
}

public:
Expand Down
2 changes: 1 addition & 1 deletion src/exceptions/hip_exception.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class hip_exception : public std::exception {

auto msg = ss.str();

return strdup( msg.c_str() );
return _strdup( msg.c_str() );
}

public:
Expand Down
2 changes: 1 addition & 1 deletion src/exceptions/hipblas_exception.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ class hipblas_exception : public std::exception {

auto msg = ss.str();

return strdup( msg.c_str() );
return _strdup( msg.c_str() );
}

public:
Expand Down
2 changes: 1 addition & 1 deletion src/exceptions/magma_exception.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class magma_exception : public std::exception {

auto msg = ss.str();

return strdup( msg.c_str() );
return _strdup( msg.c_str() );
}

public:
Expand Down
29 changes: 26 additions & 3 deletions src/external/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,42 @@ if( GAUXC_ENABLE_HDF5 )
message(STATUS "HighFive REV = ${GAUXC_HIGHFIVE_REVISION} ")
FetchContent_Declare( HighFive
GIT_REPOSITORY ${GAUXC_HIGHFIVE_REPOSITORY}
GIT_TAG ${GAUXC_HIGHFIVE_REVISION}
GIT_TAG ${GAUXC_HIGHFIVE_REVISION}
)

set(HIGHFIVE_USE_BOOST OFF CACHE BOOL "" )
set(HIGHFIVE_UNIT_TESTS OFF CACHE BOOL "" )
set(HIGHFIVE_EXAMPLES OFF CACHE BOOL "" )
#set(HIGHFIVE_PARALLEL_HDF5 ON CACHE BOOL "" )
set(HIGHFIVE_BUILD_DOCS OFF CACHE BOOL "" )
FetchContent_MakeAvailable( HighFive )


# HighFive propagates HDF5_DEFINITIONS via its libdeps target.
# CMake's FindHDF5 module sets H5_BUILT_AS_DYNAMIC_LIB on Windows
# when HDF5_USE_STATIC_LIBRARIES is not set, even for static libs.
# Correct this when linking statically.
if(WIN32 AND HDF5_PROVIDES_STATIC_LIBS AND TARGET libdeps)
get_target_property(_libdeps_defs libdeps INTERFACE_COMPILE_DEFINITIONS)
if(_libdeps_defs)
list(REMOVE_ITEM _libdeps_defs "H5_BUILT_AS_DYNAMIC_LIB")
list(APPEND _libdeps_defs "H5_BUILT_AS_STATIC_LIB")
set_target_properties(libdeps PROPERTIES INTERFACE_COMPILE_DEFINITIONS "${_libdeps_defs}")
endif()
endif()

endif()
target_sources( gauxc PRIVATE hdf5_write.cxx hdf5_read.cxx )
target_link_libraries( gauxc PUBLIC HighFive )

# When linking HDF5 statically on Windows, HDF5's transitive
# dependencies (zlib, szip/aec, shlwapi) must be linked explicitly.
if(WIN32 AND HDF5_PROVIDES_STATIC_LIBS)
find_library(ZLIB_LIBRARY NAMES zlib z)
find_library(SZIP_LIBRARY NAMES szip-static szip sz)
find_library(AEC_LIBRARY NAMES aec-static aec)
target_link_libraries( gauxc PUBLIC
${ZLIB_LIBRARY} ${SZIP_LIBRARY} ${AEC_LIBRARY} shlwapi )
endif()
else()
message(WARNING "GAUXC_ENABLE_HDF5 was enabled, but HDF5 was not found, Disabling HDF5 Bindings")
endif()
Expand Down
3 changes: 2 additions & 1 deletion src/xc_integrator/integrator_util/exx_screening.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include "host/blas.hpp"
#include <gauxc/util/div_ceil.hpp>
#include <chrono>
#include <bit>
//#include <mpi.h>
//#include <fstream>
#ifdef GAUXC_HAS_CUDA
Expand Down Expand Up @@ -195,7 +196,7 @@ void exx_ek_screening(
}

uint32_t total_shells = 0;
for( auto x : task_ek_shells ) total_shells += __builtin_popcount(x);
for( auto x : task_ek_shells ) total_shells += std::popcount(x);

std::vector<uint32_t> ek_shells; ek_shells.reserve(total_shells);
for( auto i_block = 0u; i_block < util::div_ceil(nshells,32); ++i_block ) {
Expand Down
2 changes: 1 addition & 1 deletion src/xc_integrator/integrator_util/spherical_harmonics.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -168,4 +168,4 @@ void scaled_ylm_matrix(const int lmax, const double* points, const int32_t npts
const std::array<double, 3> x = {points[3 * i], points[3 * i + 1], points[3 * i + 2]};
scaled_ylm_new(lmax, x, center, radius, nlm, ylm_matrix + i * nharmonics);
}
}
}
2 changes: 1 addition & 1 deletion src/xc_integrator/integrator_util/spherical_harmonics.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
#include <cassert>


void scaled_ylm_matrix(const int lmax, const double* points, const int32_t npts, const std::array<double, 3> center, const double radius, double* ylm_matrix);
void scaled_ylm_matrix(const int lmax, const double* points, const int32_t npts, const std::array<double, 3> center, const double radius, double* ylm_matrix);
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ void integral_0(size_t npts,
int ldG,
double *weights,
double *boys_table) {
__attribute__((__aligned__(64))) double buffer[1 * NPTS_LOCAL + 3 * NPTS_LOCAL];
alignas(64) double buffer[1 * NPTS_LOCAL + 3 * NPTS_LOCAL];

double *temp = (buffer + 0);
double *Tval = (buffer + 1 * NPTS_LOCAL + 0 * NPTS_LOCAL);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ void integral_0_0(size_t npts,
int ldG,
double *weights,
double * /*boys_table*/) {
__attribute__((__aligned__(64))) double buffer[1 * NPTS_LOCAL + 3 * NPTS_LOCAL];
alignas(64) double buffer[1 * NPTS_LOCAL + 3 * NPTS_LOCAL];

double *temp = (buffer + 0);
double *Tval = (buffer + 1 * NPTS_LOCAL + 0 * NPTS_LOCAL);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ void integral_1(size_t npts,
int ldG,
double *weights,
double *boys_table) {
__attribute__((__aligned__(64))) double buffer[9 * NPTS_LOCAL + 3 * NPTS_LOCAL];
alignas(64) double buffer[9 * NPTS_LOCAL + 3 * NPTS_LOCAL];

double *temp = (buffer + 0);
double *Tval = (buffer + 9 * NPTS_LOCAL + 0 * NPTS_LOCAL);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ void integral_1_0(size_t npts,
int ldG,
double *weights,
double *boys_table) {
__attribute__((__aligned__(64))) double buffer[3 * NPTS_LOCAL + 3 * NPTS_LOCAL];
alignas(64) double buffer[3 * NPTS_LOCAL + 3 * NPTS_LOCAL];

double * __restrict__ temp = (buffer + 0);
double * __restrict__ Tval = (buffer + 3 * NPTS_LOCAL + 0 * NPTS_LOCAL);
double * __restrict__ Tval_inv_e = (buffer + 3 * NPTS_LOCAL + 1 * NPTS_LOCAL);
double * __restrict__ FmT = (buffer + 3 * NPTS_LOCAL + 2 * NPTS_LOCAL);
double * __restrict temp = (buffer + 0);
double * __restrict Tval = (buffer + 3 * NPTS_LOCAL + 0 * NPTS_LOCAL);
double * __restrict Tval_inv_e = (buffer + 3 * NPTS_LOCAL + 1 * NPTS_LOCAL);
double * __restrict FmT = (buffer + 3 * NPTS_LOCAL + 2 * NPTS_LOCAL);

size_t npts_upper = NPTS_LOCAL * (npts / NPTS_LOCAL);
size_t p_outer = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ void integral_1_1(size_t npts,
int ldG,
double *weights,
double *boys_table) {
__attribute__((__aligned__(64))) double buffer[9 * NPTS_LOCAL + 3 * NPTS_LOCAL];
alignas(64) double buffer[9 * NPTS_LOCAL + 3 * NPTS_LOCAL];

double *temp = (buffer + 0);
double *Tval = (buffer + 9 * NPTS_LOCAL + 0 * NPTS_LOCAL);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ void integral_2(size_t npts,
int ldG,
double *weights,
double *boys_table) {
__attribute__((__aligned__(64))) double buffer[31 * NPTS_LOCAL + 3 * NPTS_LOCAL];
alignas(64) double buffer[31 * NPTS_LOCAL + 3 * NPTS_LOCAL];

double *temp = (buffer + 0);
double *Tval = (buffer + 31 * NPTS_LOCAL + 0 * NPTS_LOCAL);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ void integral_2_0(size_t npts,
int ldG,
double *weights,
double *boys_table) {
__attribute__((__aligned__(64))) double buffer[6 * NPTS_LOCAL + 3 * NPTS_LOCAL];
alignas(64) double buffer[6 * NPTS_LOCAL + 3 * NPTS_LOCAL];

double *temp = (buffer + 0);
double *Tval = (buffer + 6 * NPTS_LOCAL + 0 * NPTS_LOCAL);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ void integral_2_1(size_t npts,
int ldG,
double *weights,
double *boys_table) {
__attribute__((__aligned__(64))) double buffer[16 * NPTS_LOCAL + 3 * NPTS_LOCAL];
alignas(64) double buffer[16 * NPTS_LOCAL + 3 * NPTS_LOCAL];

double *temp = (buffer + 0);
double *Tval = (buffer + 16 * NPTS_LOCAL + 0 * NPTS_LOCAL);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ void integral_2_2(size_t npts,
int ldG,
double *weights,
double *boys_table) {
__attribute__((__aligned__(64))) double buffer[31 * NPTS_LOCAL + 3 * NPTS_LOCAL];
alignas(64) double buffer[31 * NPTS_LOCAL + 3 * NPTS_LOCAL];

double *temp = (buffer + 0);
double *Tval = (buffer + 31 * NPTS_LOCAL + 0 * NPTS_LOCAL);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ void integral_3(size_t npts,
int ldG,
double *weights,
double *boys_table) {
__attribute__((__aligned__(64))) double buffer[74 * NPTS_LOCAL + 3 * NPTS_LOCAL];
alignas(64) double buffer[74 * NPTS_LOCAL + 3 * NPTS_LOCAL];

double *temp = (buffer + 0);
double *Tval = (buffer + 74 * NPTS_LOCAL + 0 * NPTS_LOCAL);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ void integral_3_0(size_t npts,
int ldG,
double *weights,
double *boys_table) {
__attribute__((__aligned__(64))) double buffer[10 * NPTS_LOCAL + 3 * NPTS_LOCAL];
alignas(64) double buffer[10 * NPTS_LOCAL + 3 * NPTS_LOCAL];

double *temp = (buffer + 0);
double *Tval = (buffer + 10 * NPTS_LOCAL + 0 * NPTS_LOCAL);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ void integral_3_1(size_t npts,
int ldG,
double *weights,
double *boys_table) {
__attribute__((__aligned__(64))) double buffer[25 * NPTS_LOCAL + 3 * NPTS_LOCAL];
alignas(64) double buffer[25 * NPTS_LOCAL + 3 * NPTS_LOCAL];

double *temp = (buffer + 0);
double *Tval = (buffer + 25 * NPTS_LOCAL + 0 * NPTS_LOCAL);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ void integral_3_2(size_t npts,
int ldG,
double *weights,
double *boys_table) {
__attribute__((__aligned__(64))) double buffer[46 * NPTS_LOCAL + 3 * NPTS_LOCAL];
alignas(64) double buffer[46 * NPTS_LOCAL + 3 * NPTS_LOCAL];

double *temp = (buffer + 0);
double *Tval = (buffer + 46 * NPTS_LOCAL + 0 * NPTS_LOCAL);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ void integral_3_3(size_t npts,
int ldG,
double *weights,
double *boys_table) {
__attribute__((__aligned__(64))) double buffer[74 * NPTS_LOCAL + 3 * NPTS_LOCAL];
alignas(64) double buffer[74 * NPTS_LOCAL + 3 * NPTS_LOCAL];

double *temp = (buffer + 0);
double *Tval = (buffer + 74 * NPTS_LOCAL + 0 * NPTS_LOCAL);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ void integral_4(size_t npts,
int ldG,
double *weights,
double *boys_table) {
__attribute__((__aligned__(64))) double buffer[145 * NPTS_LOCAL + 3 * NPTS_LOCAL];
alignas(64) double buffer[145 * NPTS_LOCAL + 3 * NPTS_LOCAL];

double *temp = (buffer + 0);
double *Tval = (buffer + 145 * NPTS_LOCAL + 0 * NPTS_LOCAL);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ void integral_4_0(size_t npts,
int ldG,
double *weights,
double *boys_table) {
__attribute__((__aligned__(64))) double buffer[15 * NPTS_LOCAL + 3 * NPTS_LOCAL];
alignas(64) double buffer[15 * NPTS_LOCAL + 3 * NPTS_LOCAL];

double *temp = (buffer + 0);
double *Tval = (buffer + 15 * NPTS_LOCAL + 0 * NPTS_LOCAL);
Expand Down
Loading
Loading