Commit 1197d838 authored by rjzamora's avatar rjzamora
Browse files

changing rshift to shift both read and write ops, because we have unchache...

changing rshift to shift both read and write ops, because we have unchache flag now. The rshift now provides a case where strided agg placement is a bith off
parent 5309ebb6
......@@ -154,4 +154,4 @@ The implementation of `ADIOI_OneSidedWriteAggregation_CA` currently spans **~124
## References
[1] François Tessier, Venkatram Vishwanath, Emmanuel Jeannot - TAPIOCA: An I/O Library for Optimized Topology-Aware Data Aggregation on Large-Scale Supercomputers - IEEE Cluster 2017, Honolulu, HI (Sept. 2017)l
\ No newline at end of file
[1] François Tessier, Venkatram Vishwanath, Emmanuel Jeannot - TAPIOCA: An I/O Library for Optimized Topology-Aware Data Aggregation on Large-Scale Supercomputers - IEEE Cluster 2017, Honolulu, HI (Sept. 2017)
\ No newline at end of file
......@@ -371,7 +371,7 @@ int main( int argc, char* argv[] )
MPI_Barrier(MPI_COMM_WORLD);
if (rank == 0) {
printf("useMetaDataCollectives: %d addDerivedTypeDataset: %d addAttributes: %d useIndependentIO: %d numDims: %d useChunked: %d readShift: %d uncache: %d\n",
printf("useMetaDataCollectives: %d addDerivedTypeDataset: %d addAttributes: %d useIndependentIO: %d numDims: %d useChunked: %d rankShift: %d uncache: %d\n",
useMetaDataCollectives,addDerivedTypeDataset,addAttributes,useIndependentIO,numDims,useChunked,rankshift,uncache);
printf("Metric Bufsize H5DWrite RawWrBDWTH H5Dread RawRdBDWTH Dataset Group Attribute H5Fopen H5Fclose H5Fflush OtherClose\n");
printf("WARNING: Bufsize is the size of the double-type dataset (The derived-type dataset is 8x larger!).\n");
......@@ -599,10 +599,10 @@ int main( int argc, char* argv[] )
// data buffers for writing and reading
double *dataBuffer = (double *) malloc(sizeof(double) * NumDoubleElements);
double *checkBuffer = (double *) malloc(sizeof(double) * NumDoubleElements);
double *dataBufferShift;
if (rankshift > 0) {
dataBufferShift = (double *) malloc(sizeof(double) * NumDoubleElements);
}
//double *dataBufferShift;
//if (0 && (rankshift > 0)) {
// dataBufferShift = (double *) malloc(sizeof(double) * NumDoubleElements);
//}
sim_params_t *sim_params = (sim_params_t *) malloc(sizeof(sim_params_t) * NumSimParamElements);
for (i=0;i<NumSimParamElements;i++) {
sim_params[i].total_blocks = i+rank*100;
......@@ -625,16 +625,6 @@ int main( int argc, char* argv[] )
dataBuffer[ii] = 0.0;
}
checkBuffer[ii] = 0.0;
// Populate a buffer with expected data for "shifted" read...
if (rankshift > 0) {
if (j < memBlock_dbl){
cary = rank + rankshift;
if (cary >= nprocs) cary -= nprocs;
dataBufferShift[ii] = (double)(cary + 1);
}else{
dataBufferShift[ii] = 0.0;
}
}
}
}
......@@ -797,6 +787,15 @@ int main( int argc, char* argv[] )
memDataSpace = H5Screate_simple(1, memDataSpaceDims, NULL);
fileDataSpace = H5Screate_simple(numDims, dataSetDims, NULL);
// Change rankLocation list if we are shifting the ranks...
if (rankshift > 0) {
// We are basically shifting the location of the ranks in the file...
for (i=0;i<numDims;i++) {
fileStart[i] = fileStride[i] * fileCount[i] * rankLocationShifted[i];
}
MPI_Barrier(MPI_COMM_WORLD);
}
/* define hyperslab for memory data space */
H5Sselect_hyperslab(memDataSpace, H5S_SELECT_SET, memStart, memStride, memCount, memBlock);
/* define hyperslab for file data space */
......@@ -994,10 +993,8 @@ int main( int argc, char* argv[] )
if (doWriteat) {
if (!maxcheck_set || (BufSizeTotalDouble <= maxcheck)) {
for (i=0;i<(NumDoubleElements);i++) {
if (rankshift == 0 && (dataBuffer[i] != checkBuffer[i])) {
if (dataBuffer[i] != checkBuffer[i]) {
printf("Rank %d - ERROR on read: index %d doesn't match - expected %20.16f got %20.16f \n",rank,i,dataBuffer[i],checkBuffer[i]);
} else if (rankshift > 0 && (dataBufferShift[i] != checkBuffer[i])) {
printf("Rank %d - ERROR on read: index %d doesn't match - expected %20.16f got %20.16f \n",rank,i,dataBufferShift[i],checkBuffer[i]);
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment