Skip to content

Commit

Permalink
Merge pull request #76 from SeisSol/davschneller/var-len-strings
Browse files Browse the repository at this point in the history
Set boundary format string storage size to variable
  • Loading branch information
vikaskurapati authored Aug 19, 2024
2 parents 20226b6 + 39b0a57 commit 629845e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 0 additions & 2 deletions src/aux/MPIConvenience.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ void sparseAlltoallv(const void* sendbuf, const std::size_t* sendsize, const std
const std::size_t* recvdisp, MPI_Datatype recvtype, MPI_Comm comm) {
int commsize;
int commrank;
int sendtypesizePre;
int recvtypesizePre;
MPI_Comm_size(comm, &commsize);
MPI_Comm_rank(comm, &commrank);

Expand Down
5 changes: 3 additions & 2 deletions src/pumgen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -448,10 +448,11 @@ int main(int argc, char* argv[]) {

hid_t attrSpace = checkH5Err(H5Screate(H5S_SCALAR));
hid_t attrType = checkH5Err(H5Tcopy(H5T_C_S1));
checkH5Err(H5Tset_size(attrType, boundaryFormatAttr.size() + 1));
checkH5Err(H5Tset_size(attrType, H5T_VARIABLE));
hid_t attrBoundary = checkH5Err(
H5Acreate(h5file, "boundary-format", attrType, attrSpace, H5P_DEFAULT, H5P_DEFAULT));
checkH5Err(H5Awrite(attrBoundary, attrType, boundaryFormatAttr.data()));
void* stringData = boundaryFormatAttr.data();
checkH5Err(H5Awrite(attrBoundary, attrType, &stringData));
checkH5Err(H5Aclose(attrBoundary));
checkH5Err(H5Sclose(attrSpace));
checkH5Err(H5Tclose(attrType));
Expand Down

0 comments on commit 629845e

Please sign in to comment.