Skip to content

Commit

Permalink
update variable names
Browse files Browse the repository at this point in the history
  • Loading branch information
Angelyr committed Nov 28, 2024
1 parent 59071e7 commit 2f587ee
Show file tree
Hide file tree
Showing 24 changed files with 139 additions and 139 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ if(EnGPar_VERSION VERSION_LESS 1.1.0)
message(FATAL_ERROR "EnGPar version >= 1.1.0 required.")
endif()

option(PP_PRINT_ENABLED "PUMIPIC print statements enabled" ON)
option(PUMIPIC_PRINT_ENABLED "PUMIPIC print statements enabled" ON)
find_package(spdlog QUIET)

set(debug_flag)
Expand Down
14 changes: 7 additions & 7 deletions particle_structs/src/cabm/cabm.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ namespace pumipic {
int comm_rank;
MPI_Comm_rank(mpi_comm, &comm_rank);
if(!comm_rank)
pPrintInfo( "building CabM\n");
printInfo( "building CabM\n");

// build view of offsets for SoA indices within particle elements
offsets = buildOffset(particles_per_element, num_ptcls, extra_padding, padding_start);
Expand All @@ -181,7 +181,7 @@ namespace pumipic {
}
// populate AoSoA with input data if given
if (particle_elements.size() > 0 && particle_info != NULL) {
if(!comm_rank) pPrintInfo( "initializing CabM data\n");
if(!comm_rank) printInfo( "initializing CabM data\n");
fillAoSoA(particle_elements, particle_info); // initialize data
}
}
Expand All @@ -202,7 +202,7 @@ namespace pumipic {
int comm_rank;
MPI_Comm_rank(input.mpi_comm, &comm_rank);
if(!comm_rank)
pPrintInfo( "building CabM for %s\n", name.c_str());
printInfo( "building CabM for %s\n", name.c_str());

// build view of offsets for SoA indices within particle elements
offsets = buildOffset(input.ppe, num_ptcls, extra_padding, padding_start);
Expand All @@ -222,7 +222,7 @@ namespace pumipic {
createGlobalMapping(input.e_gids, element_to_gid, element_gid_to_lid);
// populate AoSoA with input data if given
if (input.particle_elms.size() > 0 && input.p_info != NULL) {
if(!comm_rank) pPrintInfo( "initializing CabM data\n");
if(!comm_rank) printInfo( "initializing CabM data\n");
fillAoSoA(input.particle_elms, input.p_info); // initialize data
}
}
Expand Down Expand Up @@ -306,7 +306,7 @@ namespace pumipic {
ptr += sprintf(ptr, "Empty Elements <Tot %%> %d %.3f%%\n", num_empty_elements,
num_empty_elements * 100.0 / num_elems);

pPrintInfo("%s\n", buffer);
printInfo("%s\n", buffer);
}

template <class DataTypes, typename MemSpace>
Expand Down Expand Up @@ -375,7 +375,7 @@ namespace pumipic {
template <class MSpace>
typename CabM<DataTypes, MemSpace>::template Mirror<MSpace>* CabM<DataTypes, MemSpace>::copy() {
if (std::is_same<memory_space, typename MSpace::memory_space>::value) {
pPrintError( "[ERROR] Copy to same memory space not supported\n");
printError( "[ERROR] Copy to same memory space not supported\n");
exit(EXIT_FAILURE);
}
Mirror<MSpace>* mirror_copy = new CabM<DataTypes, MSpace>();
Expand Down Expand Up @@ -478,7 +478,7 @@ namespace pumipic {
Mirror<MSpace>* copy() {reportError(); return NULL;}

private:
void reportError() const {pPrintError( "[ERROR] pumi-pic was built "
void reportError() const {printError( "[ERROR] pumi-pic was built "
"without Cabana so the CabM structure "
"can not be used\n");}
};
Expand Down
4 changes: 2 additions & 2 deletions particle_structs/src/csr/CSR.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ namespace pumipic {
ptr += sprintf(ptr, "Number of Elements %d, Number of Particles %d, Capacity %d\n",
num_elems, num_ptcls, capacity_);

pPrintInfo("%s\n", buffer);
printInfo("%s\n", buffer);
}

template <class DataTypes, typename MemSpace>
Expand Down Expand Up @@ -269,7 +269,7 @@ namespace pumipic {
template <class MSpace>
typename CSR<DataTypes, MemSpace>::template Mirror<MSpace>* CSR<DataTypes, MemSpace>::copy() {
if (std::is_same<memory_space, typename MSpace::memory_space>::value) {
pPrintError( "[ERROR] Copy to same memory space not supported\n");
printError( "[ERROR] Copy to same memory space not supported\n");
exit(EXIT_FAILURE);
}
Mirror<MSpace>* mirror_copy = new CSR<DataTypes, MSpace>();
Expand Down
4 changes: 2 additions & 2 deletions particle_structs/src/csr/CSR_buildFns.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ namespace pumipic {
MPI_Comm_rank(mpi_comm, &comm_rank);

if(!comm_rank)
pPrintInfo( "Building CSR\n");
printInfo( "Building CSR\n");

// SS1 allocate the offsets array and use an exclusive_scan (aka prefix sum)
// to fill the entries of the offsets array.
Expand All @@ -85,7 +85,7 @@ namespace pumipic {
// If particle info is provided then enter the information
lid_t given_particles = particle_elements.size();
if (given_particles > 0 && particle_info != NULL) {
if(!comm_rank) pPrintInfo( "initializing CSR data\n");
if(!comm_rank) printInfo( "initializing CSR data\n");
initCsrData(particle_elements, particle_info);
}

Expand Down
10 changes: 5 additions & 5 deletions particle_structs/src/dps/dps.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ namespace pumipic {
int comm_rank;
MPI_Comm_rank(mpi_comm, &comm_rank);
if(!comm_rank)
pPrintInfo( "building DPS\n");
printInfo( "building DPS\n");

// calculate num_soa_ from number of particles + extra padding
num_soa_ = Kokkos::ceil(Kokkos::ceil(double(num_ptcls)/AoSoA_t::vector_length)*(1+extra_padding));
Expand All @@ -145,7 +145,7 @@ namespace pumipic {
createGlobalMapping(element_gids, element_to_gid, element_gid_to_lid);
// populate AoSoA with input data if given
if (particle_elements.size() > 0 && particle_info != NULL) {
if(!comm_rank) pPrintInfo( "initializing DPS data\n");
if(!comm_rank) printInfo( "initializing DPS data\n");
fillAoSoA(particle_elements, particle_info, parentElms_); // fill aosoa with data
}
else
Expand Down Expand Up @@ -242,7 +242,7 @@ namespace pumipic {
template <class MSpace>
typename DPS<DataTypes, MemSpace>::template Mirror<MSpace>* DPS<DataTypes, MemSpace>::copy() {
if (std::is_same<memory_space, typename MSpace::memory_space>::value) {
pPrintError( "[ERROR] Copy to same memory space not supported\n");
printError( "[ERROR] Copy to same memory space not supported\n");
exit(EXIT_FAILURE);
}
Mirror<MSpace>* mirror_copy = new DPS<DataTypes, MSpace>();
Expand Down Expand Up @@ -291,7 +291,7 @@ namespace pumipic {
// Padded Cells
ptr += sprintf(ptr, "Padded Cells <Tot %%> %d %.3f%%\n", num_padded,
num_padded * 100.0 / capacity_);
pPrintInfo("%s\n", buffer);
printInfo("%s\n", buffer);
}

template <class DataTypes, typename MemSpace>
Expand Down Expand Up @@ -410,7 +410,7 @@ namespace pumipic {
Mirror<MSpace>* copy() {reportError(); return NULL;}

private:
void reportError() const {pPrintError( "[ERROR] pumi-pic was built "
void reportError() const {printError( "[ERROR] pumi-pic was built "
"without Cabana so the DPS structure "
"can not be used\n");}
};
Expand Down
4 changes: 2 additions & 2 deletions particle_structs/src/ps_for.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ namespace pumipic {
dps->parallel_for(fn, s);
return;
}
pPrintError( "[ERROR] Structure does not support parallel for used on kernel %s\n",
printError( "[ERROR] Structure does not support parallel for used on kernel %s\n",
s.c_str());
throw 1;
}
Expand All @@ -49,7 +49,7 @@ namespace pumipic {
return dps->template copy<MSpace>();
}

pPrintError( "[ERROR] Structure does not support copy\n");
printError( "[ERROR] Structure does not support copy\n");
throw 1;
return NULL;
}
Expand Down
2 changes: 1 addition & 1 deletion particle_structs/src/scs/SCS_rebuild.h
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ namespace pumipic {
});
auto hasInactivePtcls_h = deviceToHost(hasInactivePtcls);
if( hasInactivePtcls_h(0) ) {
pPrintError( "[ERROR] there are new particles being added that are marked"
printError( "[ERROR] there are new particles being added that are marked"
"as inactive (element id set to -1)\n");
exit(EXIT_FAILURE);
}
Expand Down
6 changes: 3 additions & 3 deletions particle_structs/src/scs/SellCSigma.h
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ void SellCSigma<DataTypes, MemSpace>::construct(kkLidView ptcls_per_elem,
C_ = chooseChunkHeight(C_max, ptcls_per_elem);

if(!comm_rank)
pPrintInfo( "Building SCS with C: %d sigma: %d V: %d\n",C_,sigma,V_);
printInfo( "Building SCS with C: %d sigma: %d V: %d\n",C_,sigma,V_);
//Perform sorting
kkLidView ptcls;
kkLidView index;
Expand Down Expand Up @@ -337,7 +337,7 @@ template<class DataTypes, typename MemSpace>
template <class MSpace>
typename SellCSigma<DataTypes, MemSpace>::template Mirror<MSpace>* SellCSigma<DataTypes, MemSpace>::copy() {
if (std::is_same<memory_space, typename MSpace::memory_space>::value) {
pPrintError( "[ERROR] Copy to same memory space not supported\n");
printError( "[ERROR] Copy to same memory space not supported\n");
exit(EXIT_FAILURE);
}
const auto cmax = maxChunk<MSpace>(C_max);
Expand Down Expand Up @@ -520,7 +520,7 @@ void SellCSigma<DataTypes, MemSpace>::printMetrics(MPI_Comm mpi_comm) const {
ptr += sprintf(ptr, "Empty Rows <Tot %%> %d %.3f\n", num_empty_elements,
num_empty_elements * 100.0 / numRows());

pPrintInfo("%s\n",buffer);
printInfo("%s\n",buffer);
}

template <class DataTypes, typename MemSpace>
Expand Down
4 changes: 2 additions & 2 deletions particle_structs/src/support/MemberTypeLibraries.h
Original file line number Diff line number Diff line change
Expand Up @@ -156,14 +156,14 @@ namespace pumipic {
Kokkos::parallel_for(ps_indices.size(), KOKKOS_LAMBDA(const int& i) {
const int index = ps_indices(i);
if (index >= size || index < 0) {
pPrintInfo("[ERROR] copying view to view from %d to %d outside of [0-%d)\n", i, index, size);
printInfo("[ERROR] copying view to view from %d to %d outside of [0-%d)\n", i, index, size);
hasFailed(0) = 1;
}
CopyViewToView<T,Device>(dst, index, src, i);
});
auto hasFailed_h = deviceToHost(hasFailed);
if( hasFailed_h(0) ) {
pPrintError( "[ERROR] index out of range in view-to-view copy\n");
printError( "[ERROR] index out of range in view-to-view copy\n");
exit(EXIT_FAILURE);
}
CopyViewsToViewsImpl<View, Types...>(dsts+1, srcs+1, ps_indices);
Expand Down
Loading

0 comments on commit 2f587ee

Please sign in to comment.