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
19 changes: 14 additions & 5 deletions include/gauxc/basisset.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,26 @@ namespace GauXC {
*/
template <typename F>
struct BasisSet : public std::vector<Shell<F>> {

private:
/// Tests if the base class can be constructed from @p Args
template <typename... Args>
static constexpr auto can_construct_base_v =
std::is_constructible_v<std::vector<Shell<F>>, Args...>;

public:
/**
* @brief Construct a BasisSet object
*
*
* Delegates to std::vector<Shell<F>>::vector
*
* @tparam Args Parameter pack for arguements that are passed to
* @tparam Args Parameter pack for arguments that are passed to
* base constructor
* @tparam <anonymous> Used to disable this method via SFINAE if the base
* class can not be constructed from @p Args
*/
template <typename... Args>
BasisSet( Args&&... args ) :
template <typename... Args,
typename = std::enable_if_t<can_construct_base_v<Args...>>>
explicit BasisSet( Args&&... args ) :
std::vector<Shell<F>>( std::forward<Args>(args)... ) { }

/// Copy a BasisSet object
Expand Down
4 changes: 2 additions & 2 deletions include/gauxc/shell.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ class alignas(256) Shell {

Shell( PrimSize nprim, AngularMomentum l, SphericalType pure,
prim_array alpha, prim_array coeff, cart_array O, bool _normalize = true ) :
nprim_( nprim.get() ), l_( l.get() ), pure_( pure.get() ),
alpha_( alpha ), coeff_( coeff ), O_( O ) {
alpha_( alpha ), coeff_( coeff ), O_( O ),
nprim_( nprim.get() ), l_( l.get() ), pure_( pure.get() ) {

if( _normalize ) normalize();
compute_shell_cutoff();
Expand Down
4 changes: 1 addition & 3 deletions include/gauxc/util/real_solid_harmonics.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,11 @@ inline constexpr double real_solid_harmonic_coeff( int l, int m, int lx, int ly,

class SphericalHarmonicTransform {

int max_l_;
std::vector< std::vector<double> > table_;

public:

inline SphericalHarmonicTransform( int max_l ) :
max_l_(max_l) {
inline SphericalHarmonicTransform( int max_l ) {

table_.resize(max_l+1);
for( auto l = 0; l <= max_l; ++ l ) {
Expand Down
2 changes: 1 addition & 1 deletion src/external/hdf5_read.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ void read_hdf5_record( std::vector<Atom>& mol, std::string fname, std::string ds
}


void read_hdf5_record( int32_t M, int32_t N, double* A, int32_t LDA,
void read_hdf5_record( int32_t /*M*/, int32_t /*N*/, double* /*A*/, int32_t /*LDA*/,
std::string fname, std::string dset ) {


Expand Down
7 changes: 3 additions & 4 deletions src/load_balancer/rebalance.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ auto rebalance(TaskIterator begin, TaskIterator end, const CostFunctor& cost, MP
std::vector<task_message> task_outgoing;
auto it = local_prefix_sum.begin();
for( int i = 0; i < world_size; ++i) {
auto n_it = std::lower_bound(it, local_prefix_sum.end(), i,
auto n_it = std::lower_bound(it, local_prefix_sum.end(), (size_t)i,
[=](auto a, auto b) { return a / task_avg < b+1; });
size_t st_idx = std::distance(local_prefix_sum.begin(), it );
size_t en_idx = std::distance(local_prefix_sum.begin(), n_it);
Expand Down Expand Up @@ -255,8 +255,8 @@ auto rebalance(TaskIterator begin, TaskIterator end, const CostFunctor& cost, MP
auto lps_begin = local_prefix_sum.begin();
auto lps_end = local_prefix_sum.end();
auto local_begin =
world_rank ? std::lower_bound(lps_begin,lps_end,world_rank-1,func) : lps_begin;
auto local_end = std::lower_bound(local_begin, lps_end, world_rank,func);
world_rank ? std::lower_bound(lps_begin,lps_end,(size_t)(world_rank-1),func) : lps_begin;
auto local_end = std::lower_bound(local_begin, lps_end, (size_t)world_rank,func);
size_t st_idx = std::distance(lps_begin, local_begin);
size_t en_idx = std::distance(lps_begin, local_end );

Expand Down Expand Up @@ -371,7 +371,6 @@ void LoadBalancerImpl::rebalance_weights() {
void LoadBalancerImpl::rebalance_exc_vxc() {
#ifdef GAUXC_HAS_MPI
auto& tasks = get_tasks();
const size_t natoms = molecule().natoms();
auto cost = [=](const auto& task){ return task.cost_exc_vxc(1); };
auto new_tasks = rebalance( tasks.begin(), tasks.end(), cost, runtime_.comm());
tasks = std::move(new_tasks);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,11 +252,6 @@ namespace XCPU {

// Scalar SIMD Emulation
#else
#ifdef __GNUC__
#warning "Warning: ISA Not Specified: Using Scalar Code"
#else
#pragma message "Warning: ISA Not Specified: Using Scalar Code"
#endif
#define SIMD_TYPE double

#define SIMD_LENGTH 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace XCPU {
void integral_4(size_t npts,
double *_points,
point rA,
point rB,
point /*rB*/,
int nprim_pairs,
prim_pair *prim_pairs,
double *Xi,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
namespace XCPU {
void integral_4_0(size_t npts,
double *_points,
point rA,
point /*rA*/,
point /*rB*/,
int nprim_pairs,
prim_pair *prim_pairs,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1166,7 +1166,6 @@ void ReferenceLocalHostWorkDriver::eval_zmat_gga_vxc_gks( size_t npts, size_t nb
cou_offsets_map[shell_list[i]] = cou_cart_sizes[i];
}

size_t ndo = 0;
{
#if 0
//size_t ioff_cart = 0;
Expand All @@ -1186,7 +1185,6 @@ void ReferenceLocalHostWorkDriver::eval_zmat_gga_vxc_gks( size_t npts, size_t nb
const size_t joff_cart = cou_cart_sizes[j] * npts;
XCPU::point ket_origin{ket.O()[0],ket.O()[1],ket.O()[2]};
if(!need_sp(ish,jsh)) continue;
++ndo;

auto sh_pair = shpairs.at(ish,jsh);
auto prim_pair_data = sh_pair.prim_pairs();
Expand Down Expand Up @@ -1225,7 +1223,6 @@ void ReferenceLocalHostWorkDriver::eval_zmat_gga_vxc_gks( size_t npts, size_t nb
auto prim_pair_data = sh_pair.prim_pairs();
auto nprim_pair = sh_pair.nprim_pairs();

ndo++;
XCPU::compute_integral_shell_pair( ish == jsh,
npts, _points_transposed.data(),
bra.l(), ket.l(), bra_origin, ket_origin,
Expand All @@ -1236,7 +1233,6 @@ void ReferenceLocalHostWorkDriver::eval_zmat_gga_vxc_gks( size_t npts, size_t nb
}
#endif
}
//std::cout << "NDO " << ndo << " " << ndo / double(nshells*(nshells+1)/2) << std::endl;

for( auto i = 0ul; i < nbe_cart; ++i )
for( auto j = 0ul; j < npts; ++j ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ typename ReplicatedXCHostIntegratorFactory<ValueType>::ptr_return_t

}

template class ReplicatedXCHostIntegratorFactory<double>;
template struct ReplicatedXCHostIntegratorFactory<double>;


} // namespace GauXC::detail
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ void ShellBatchedReplicatedXCIntegrator<BaseIntegratorType, IncoreIntegratorType
const value_type* Pz, int64_t ldpz,
const value_type* Py, int64_t ldpy,
const value_type* Px, int64_t ldpx,
value_type* EXC, const IntegratorSettingsXC& ks_settings) {
value_type* EXC, const IntegratorSettingsXC& /*ks_settings*/) {


const auto& basis = this->load_balancer_->basis();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ void ShellBatchedReplicatedXCIntegrator<BaseIntegratorType, IncoreIntegratorType
value_type* VXCz, int64_t ldvxcz,
value_type* VXCy, int64_t ldvxcy,
value_type* VXCx, int64_t ldvxcx,
value_type* EXC, const IntegratorSettingsXC& ks_settings) {
value_type* EXC, const IntegratorSettingsXC& /*ks_settings*/) {


const auto& basis = this->load_balancer_->basis();
Expand Down
17 changes: 17 additions & 0 deletions tests/basisset_test.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,23 @@ TEST_CASE("BasisSet", "[basisset]") {
Molecule mol = make_water();
BasisSet<double> basis = make_631Gd(mol, SphericalType(test_spherical));

SECTION("Copy Ctor"){

BasisSet<double> basis_copy(basis);
CHECK( basis_copy.nshells() == 10 );
CHECK( basis_copy.nbf() == (test_spherical ? 18 : 19) );

}

SECTION("Move Ctor"){

BasisSet<double> basis_copy(basis);
BasisSet<double> basis_move(std::move(basis_copy));
CHECK( basis_move.nshells() == 10 );
CHECK( basis_move.nbf() == (test_spherical ? 18 : 19) );

}

CHECK( basis.nshells() == 10 );
CHECK( basis.nbf() == (test_spherical ? 18 : 19) );
BasisSetMap basis_map( basis, mol );
Expand Down