Skip to content

Commit

Permalink
Merge pull request #287 from intel/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
chuckyount authored Apr 11, 2024
2 parents 8831f57 + f230374 commit abb66ec
Show file tree
Hide file tree
Showing 23 changed files with 18 additions and 3,969 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ and Intel(R) graphics processors.

## Backward-compatibility notices
### Version 4
* Version 4.05.00 removes the "out-of-band" genetic-algorithm tuning script
due to lack of resources for maintenance and testing.
* Version 4.04.00 deprecates the existing `void* {set,get}_elements_in_slice()`
APIs and provides safer `float*` and `double*` versions.
* Version 4.03.00 is a significant release with the following notices:
Expand Down
Binary file modified docs/YASK-tutorial.pdf
Binary file not shown.
2 changes: 1 addition & 1 deletion src/common/common_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ namespace yask {
// https://semver.org/.

// Format: "major.minor.patch[-alpha|-beta]".
const string version = "4.04.09";
const string version = "4.05.00";

string yask_get_version_string() {
return version;
Expand Down
2 changes: 1 addition & 1 deletion src/contrib/coefficients/fd_coeff.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ namespace yask {
int m_idx = (order+1)*num_points;
int n_idx = num_points;
int dsz = m_idx * n_idx;
double d[dsz];
vector<double> d(dsz);

for (int i = 1; i < dsz; i++)
d[i] = 0.0;
Expand Down
5 changes: 2 additions & 3 deletions src/kernel/lib/halo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -516,13 +516,12 @@ namespace yask {
auto* var_send_reqs = var_mpi_data.send_reqs.data();
auto* var_recv_stats = var_mpi_data.recv_stats.data();
auto* var_send_stats = var_mpi_data.send_stats.data();
auto* stats = var_mpi_data.stats.data();
auto* indices = var_mpi_data.indices.data();

#ifndef USE_INDIV_MPI_TESTS

// Bulk testing.
auto asize = max(var_mpi_data.recv_reqs.size(), var_mpi_data.send_reqs.size());
int indices[asize];
MPI_Status stats[asize];
int n = 0;
MPI_Testsome(int(var_mpi_data.recv_reqs.size()), var_recv_reqs, &n, indices, stats);
num_tests++;
Expand Down
4 changes: 4 additions & 0 deletions src/kernel/lib/settings.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -570,6 +570,8 @@ namespace yask {
std::vector<MPI_Request> send_reqs;
std::vector<MPI_Status> recv_stats;
std::vector<MPI_Status> send_stats;
std::vector<MPI_Status> stats;
std::vector<int> indices;

MPIData(MPIInfoPtr mpi_info) :
_mpi_info(mpi_info) {
Expand All @@ -586,6 +588,8 @@ namespace yask {
memset(&nullst, 0, sizeof(nullst));
recv_stats.resize(n, nullst);
send_stats.resize(n, nullst);
stats.resize(n, nullst);
indices.resize(n, 0);
}

void reset_locks() {
Expand Down
12 changes: 8 additions & 4 deletions src/kernel/lib/setup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,12 @@ namespace yask {
rank_domain_offsets.set_vals_same(0);

// Tables to share data across ranks.
idx_t coords[nr][nddims]; // rank indices.
idx_t rsizes[nr][nddims]; // rank sizes.
vector<vector<idx_t>> coords(nr); // rank indices.
vector<vector<idx_t>> rsizes(nr); // rank sizes.
for (int rn = 0; rn < nr; rn++) {
coords[rn].resize(nddims);
rsizes[rn].resize(nddims);
}

// Two passes over ranks:
// 0: sum all specified local sizes.
Expand All @@ -274,9 +278,9 @@ namespace yask {

// Exchange coord and size info between all ranks.
for (int rn = 0; rn < nr; rn++) {
MPI_Bcast(&coords[rn][0], nddims, MPI_INTEGER8,
MPI_Bcast(coords[rn].data(), nddims, MPI_INTEGER8,
rn, env->comm);
MPI_Bcast(&rsizes[rn][0], nddims, MPI_INTEGER8,
MPI_Bcast(rsizes[rn].data(), nddims, MPI_INTEGER8,
rn, env->comm);
}
// Now, the tables are filled in for all ranks.
Expand Down
Loading

0 comments on commit abb66ec

Please sign in to comment.