Mentions légales du service

Skip to content
Snippets Groups Projects

Allocate panel memory manually if it is the read node

Closed LEANDRO NESI Lucas requested to merge lleandro/cppdiodon:allocate_panels into master
2 files
+ 31
4
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -1121,9 +1121,13 @@ void readHDF5Panel(ChameleonDenseWrapper<FSize, FReal> &data, const std::string
}
jt = colsglo->idx[0]/tilesize;
/* register our buffer to starpu and get the starpu struct opaque
pointer to give to the task */
starpu_data_handle_t ph = get_starpu_handle<FReal>( handlesH5_id, h5blocks->handlesH5, igl, NULL, buffersize, mpirank, mpiranks->rank);
/* allocate the data if we are the node and register our buffer to starpu
and get the starpu struct opaque pointer to give to the task */
FReal* ptr = NULL;
if(mpirank == mpiranks->rank){
ptr = (FReal*)malloc(buffersize * sizeof(FReal));
}
starpu_data_handle_t ph = get_starpu_handle<FReal>( handlesH5_id, h5blocks->handlesH5, igl, ptr, buffersize, mpirank, mpiranks->rank);
/* submit the task to read one H5 sub block by panel (range of
lines) */
@@ -1190,7 +1194,11 @@ void readHDF5Panel(ChameleonDenseWrapper<FSize, FReal> &data, const std::string
}
/* clean H5 panel and save memory */
unregister_starpu_handle( 1, &ph );
if(mpirank == mpiranks->rank){
free_unregister_starpu_handle( 1, &ph );
}else{
unregister_starpu_handle( 1, &ph );
}
/* consider next subblock in the list */
mpiranks = mpiranks->next;
Loading