Skip to content

Commit abb66ec

Browse files
authored
Merge pull request #287 from intel/develop
Develop
2 parents 8831f57 + f230374 commit abb66ec

23 files changed

+18
-3969
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ and Intel(R) graphics processors.
6868

6969
## Backward-compatibility notices
7070
### Version 4
71+
* Version 4.05.00 removes the "out-of-band" genetic-algorithm tuning script
72+
due to lack of resources for maintenance and testing.
7173
* Version 4.04.00 deprecates the existing `void* {set,get}_elements_in_slice()`
7274
APIs and provides safer `float*` and `double*` versions.
7375
* Version 4.03.00 is a significant release with the following notices:

docs/YASK-tutorial.pdf

-295 KB
Binary file not shown.

src/common/common_utils.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ namespace yask {
4747
// https://semver.org/.
4848

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

5252
string yask_get_version_string() {
5353
return version;

src/contrib/coefficients/fd_coeff.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ namespace yask {
5858
int m_idx = (order+1)*num_points;
5959
int n_idx = num_points;
6060
int dsz = m_idx * n_idx;
61-
double d[dsz];
61+
vector<double> d(dsz);
6262

6363
for (int i = 1; i < dsz; i++)
6464
d[i] = 0.0;

src/kernel/lib/halo.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -516,13 +516,12 @@ namespace yask {
516516
auto* var_send_reqs = var_mpi_data.send_reqs.data();
517517
auto* var_recv_stats = var_mpi_data.recv_stats.data();
518518
auto* var_send_stats = var_mpi_data.send_stats.data();
519+
auto* stats = var_mpi_data.stats.data();
520+
auto* indices = var_mpi_data.indices.data();
519521

520522
#ifndef USE_INDIV_MPI_TESTS
521523

522524
// Bulk testing.
523-
auto asize = max(var_mpi_data.recv_reqs.size(), var_mpi_data.send_reqs.size());
524-
int indices[asize];
525-
MPI_Status stats[asize];
526525
int n = 0;
527526
MPI_Testsome(int(var_mpi_data.recv_reqs.size()), var_recv_reqs, &n, indices, stats);
528527
num_tests++;

src/kernel/lib/settings.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -570,6 +570,8 @@ namespace yask {
570570
std::vector<MPI_Request> send_reqs;
571571
std::vector<MPI_Status> recv_stats;
572572
std::vector<MPI_Status> send_stats;
573+
std::vector<MPI_Status> stats;
574+
std::vector<int> indices;
573575

574576
MPIData(MPIInfoPtr mpi_info) :
575577
_mpi_info(mpi_info) {
@@ -586,6 +588,8 @@ namespace yask {
586588
memset(&nullst, 0, sizeof(nullst));
587589
recv_stats.resize(n, nullst);
588590
send_stats.resize(n, nullst);
591+
stats.resize(n, nullst);
592+
indices.resize(n, 0);
589593
}
590594

591595
void reset_locks() {

src/kernel/lib/setup.cpp

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -254,8 +254,12 @@ namespace yask {
254254
rank_domain_offsets.set_vals_same(0);
255255

256256
// Tables to share data across ranks.
257-
idx_t coords[nr][nddims]; // rank indices.
258-
idx_t rsizes[nr][nddims]; // rank sizes.
257+
vector<vector<idx_t>> coords(nr); // rank indices.
258+
vector<vector<idx_t>> rsizes(nr); // rank sizes.
259+
for (int rn = 0; rn < nr; rn++) {
260+
coords[rn].resize(nddims);
261+
rsizes[rn].resize(nddims);
262+
}
259263

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

275279
// Exchange coord and size info between all ranks.
276280
for (int rn = 0; rn < nr; rn++) {
277-
MPI_Bcast(&coords[rn][0], nddims, MPI_INTEGER8,
281+
MPI_Bcast(coords[rn].data(), nddims, MPI_INTEGER8,
278282
rn, env->comm);
279-
MPI_Bcast(&rsizes[rn][0], nddims, MPI_INTEGER8,
283+
MPI_Bcast(rsizes[rn].data(), nddims, MPI_INTEGER8,
280284
rn, env->comm);
281285
}
282286
// Now, the tables are filled in for all ranks.

0 commit comments

Comments
 (0)