Skip to content
Closed
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
2 changes: 1 addition & 1 deletion resolve/LinSolverIterativeRandFGMRES.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ namespace ReSolve
if (is_flexible) {
vec_Z_ = new vector_type(n_, restart_ + 1);
} else {
// otherwise Z is just a one vector, not multivector and we dont keep it
// otherwise Z is just one vector, not a multivector and we don't keep it
vec_Z_ = new vector_type(n_);
}
vec_Z_->allocate(memspace_);
Expand Down
4 changes: 3 additions & 1 deletion resolve/cpu/CpuMemory.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#pragma once

#include <cassert>
#include <resolve/utilities/logger/Logger.hpp>


namespace ReSolve
{
namespace memory
Expand Down Expand Up @@ -43,6 +44,7 @@ namespace ReSolve
static int deleteOnDevice(void* /* v */)
{
ReSolve::io::Logger::error() << "Trying to delete on a GPU device, but GPU support not available.\n";
assert(false && "Trying to delete on a GPU device, but GPU support not available.");
return -1;
}

Expand Down
4 changes: 2 additions & 2 deletions resolve/vector/Vector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -495,8 +495,8 @@ namespace ReSolve { namespace vector {
*/
int Vector::resize(index_type new_n_size)
{
assert(owns_cpu_data_ && owns_gpu_data_
&& "Cannot resize if vector is not owning the data.");
assert(owns_cpu_data_ || owns_gpu_data_
&& "Cannot resize if vector does not own data.");

if (new_n_size > n_capacity_) {
out::error() << "Trying to resize vector to " << new_n_size
Expand Down
2 changes: 1 addition & 1 deletion resolve/vector/Vector.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ namespace ReSolve { namespace vector {
bool gpu_updated_{false}; ///< DEVICE data flag (updated or not)
bool cpu_updated_{false}; ///< HOST data flag (updated or not)

bool owns_gpu_data_{true}; ///< data owneship flag for DEVICE data
bool owns_gpu_data_{false}; ///< data owneship flag for DEVICE data
bool owns_cpu_data_{true}; ///< data ownership flag for HOST data

MemoryHandler mem_; ///< Device memory manager object
Expand Down
1 change: 0 additions & 1 deletion tests/functionality/testRandGmres.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ int runTest(int argc, char *argv[])
vector_type* vec_rhs = generateRhs(n, memspace);

vector_type vec_x(A->getNumRows());
vec_x.allocate(memory::HOST);
vec_x.allocate(memspace);
vec_x.setToZero(memspace);

Expand Down