Mentions légales du service

Skip to content
Snippets Groups Projects
Commit cfa17b8c authored by PRUVOST Florent's avatar PRUVOST Florent
Browse files

Squashed 'external/fmr/' changes from 4c9ee3b..9e7b28a

9e7b28a Merge branch 'fix_readh5_inittile_sym' into 'master'
bd897bc Fix how we init tiles when reading in symetric mode, chamupper version

git-subtree-dir: external/fmr
git-subtree-split: 9e7b28a8350008ee58097361bff0b0ce691a8485
parent bd65b7da
No related branches found
No related tags found
No related merge requests found
......@@ -1097,6 +1097,16 @@ void readHDF5Panel(ChameleonDenseWrapper<FSize, FReal> &data, const std::string
hsize_t start[2];
hsize_t count[2];
int **chameleon_inittiles;
chameleon_inittiles = new int*[nbtilesrows];
for (int i=0; i < nbtilesrows; i++){
chameleon_inittiles[i] = new int[nbtilescols];
for (int j=0; j < nbtilescols; j++){
chameleon_inittiles[i][j] = 0;
}
}
int nbtile = 0;
/* main loop over all H5 sub blocks to read */
for (int igl=0; igl < nsubblocks; igl++){
......@@ -1105,6 +1115,9 @@ void readHDF5Panel(ChameleonDenseWrapper<FSize, FReal> &data, const std::string
/* global tile index on cols */
int jt = colsglo->idx[0]/tilesize;
if ( data.getUpperLower() == ChamUpper ) {
jt = std::max( it, jt );
}
start[0] = rows->idx[0];
start[1] = cols->idx[0];
......@@ -1112,24 +1125,19 @@ void readHDF5Panel(ChameleonDenseWrapper<FSize, FReal> &data, const std::string
count[1] = cols->idx[1]-cols->idx[0]+1;
hsize_t buffersize = count[0]*count[1];
size_t jtmax = colsglo->idx[1];
if ( data.getUpperLower() == ChamUpper ) {
jt = it;
} else if ( data.getUpperLower() == ChamLower ) {
jtmax = (size_t)((it+1)*tilesize-1);
}
while ( (size_t)(jt*tilesize) <= jtmax ) {
/* get the chameleon tile starpu handle */
starpu_data_handle_t th = (starpu_data_handle_t)Chameleon::runtime_data_getaddr( desc, it, jt );
/* submit task to init tile */
insert_inittile( h5blocks->cl_inittile, th);
while ( (size_t)(jt*tilesize) <= colsglo->idx[1] ) {
if (chameleon_inittiles[it][jt] == 0) {
/* get the chameleon tile starpu handle */
starpu_data_handle_t th = (starpu_data_handle_t)Chameleon::runtime_data_getaddr( desc, it, jt );
/* submit task to init tile */
insert_inittile( h5blocks->cl_inittile, th);
chameleon_inittiles[it][jt] = 1;
}
jt++;
}
jt = colsglo->idx[0]/tilesize;
if ( data.getUpperLower() == ChamUpper ) {
jt = it;
} else {
jt = colsglo->idx[0]/tilesize;
jt = std::max( it, jt );
}
/* register our buffer to starpu and get the starpu struct opaque
......@@ -1143,7 +1151,7 @@ void readHDF5Panel(ChameleonDenseWrapper<FSize, FReal> &data, const std::string
count[0], count[1], start[0], start[1], ph);
/* copy tiles from the panel into the chameleon matrix */
while ( (size_t)(jt*tilesize) <= jtmax ) {
while ( (size_t)(jt*tilesize) <= colsglo->idx[1] ) {
/* test whether or not to read the tile and consider symmetry
depending on the formats of both the H5 data (given in FULL
......@@ -1221,6 +1229,10 @@ void readHDF5Panel(ChameleonDenseWrapper<FSize, FReal> &data, const std::string
}
}
}
for (int i = 0; i < nbtilesrows; ++i) {
delete[] chameleon_inittiles[i];
}
delete[] chameleon_inittiles;
//timeTac("[fmr] TIME:CHAMELEON:initH5Blocks2:read=");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment