Skip to content

Commit

Permalink
Fixed size_t issue
Browse files Browse the repository at this point in the history
  • Loading branch information
nknk567 authored and sekelle committed Jun 12, 2023
1 parent f4d8ea3 commit a7d7d74
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion domain/test/unit_cuda/traversal/groups.cu
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ TEST(TargetGroups, makeSplits)
ret[1] = b;
return ret;
}
else { return SplitType{(b << 32) + a}; } // NOLINT
else { return SplitType{GpuConfig::ThreadMask(b << 32) + a}; } // NOLINT
};

{
Expand Down
6 changes: 3 additions & 3 deletions main/src/io/ifile_io_ascii.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class AsciiWriterNew : public IFileWriter

void stepAttribute(const std::string& key, FieldType val, int64_t /*size*/) override
{
if (key == "iteration") { iterationStep_ = *std::get<const size_t*>(val); }
if (key == "iteration") { iterationStep_ = *std::get<const int64_t*>(val); }
}

void writeField(const std::string& /*key*/, FieldType field, int col) override
Expand Down Expand Up @@ -124,11 +124,11 @@ class AsciiWriterNew : public IFileWriter

private:
MPI_Comm comm_;
size_t firstIndexStep_, lastIndexStep_;
int64_t firstIndexStep_, lastIndexStep_;
std::string pathStep_;
std::vector<int> columns_;
std::vector<Base::FieldVector> stepBuffer_;
size_t iterationStep_;
int64_t iterationStep_;
};

} // namespace sphexa
6 changes: 3 additions & 3 deletions main/src/sphexa/sphexa.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,10 @@ int main(int argc, char** argv)
if (rank == 0 && writeEnabled) { fileWriter->constants(simInit->constants(), outFile); }
if (rank == 0) { std::cout << "Data generated for " << d.numParticlesGlobal << " global particles\n"; }

size_t bucketSizeFocus = 64;
uint64_t bucketSizeFocus = 64;
// we want about 100 global nodes per rank to decompose the domain with +-1% accuracy
size_t bucketSize = std::max(bucketSizeFocus, d.numParticlesGlobal / (100 * numRanks));
Domain domain(rank, numRanks, bucketSize, bucketSizeFocus, theta, box);
uint64_t bucketSize = std::max(bucketSizeFocus, d.numParticlesGlobal / (100 * numRanks));
Domain domain(rank, numRanks, bucketSize, bucketSizeFocus, theta, box);

propagator->sync(domain, simData);
if (rank == 0) std::cout << "Domain synchronized, nLocalParticles " << d.x.size() << std::endl;
Expand Down
6 changes: 3 additions & 3 deletions sph/include/sph/particles_data.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ class ParticlesData : public cstone::FieldStates<ParticlesData<T, KeyType_, AccT
ParticlesData() = default;
ParticlesData(const ParticlesData&) = delete;

size_t iteration{1};
size_t numParticlesGlobal;
uint64_t iteration{1};
uint64_t numParticlesGlobal;

//! @brief default mean desired number of neighbors per particle, can be overriden per test case or input file
unsigned ng0{100};
Expand Down Expand Up @@ -147,7 +147,7 @@ class ParticlesData : public cstone::FieldStates<ParticlesData<T, KeyType_, AccT
}

//! @brief non-stateful variables for statistics
size_t totalNeighbors;
uint64_t totalNeighbors;

/*! @brief Particle fields
*
Expand Down

0 comments on commit a7d7d74

Please sign in to comment.