A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Apply the default settings of 'smpi/buffering' too
[simgrid.git]
/
src
/
smpi
/
mpi
/
smpi_datatype.cpp
diff --git
a/src/smpi/mpi/smpi_datatype.cpp
b/src/smpi/mpi/smpi_datatype.cpp
index
a4b307f
..
a22b3d4
100644
(file)
--- a/
src/smpi/mpi/smpi_datatype.cpp
+++ b/
src/smpi/mpi/smpi_datatype.cpp
@@
-129,8
+129,6
@@
Datatype::Datatype(Datatype *datatype, int* ret) : name_(nullptr), size_(datatyp
{
flags_ &= ~DT_FLAG_PREDEFINED;
*ret = MPI_SUCCESS;
- if(datatype->name_)
- name_ = xbt_strdup(datatype->name_);
if (not datatype->attributes()->empty()) {
int flag=0;
@@
-240,8
+238,12
@@
int Datatype::extent(MPI_Aint * lb, MPI_Aint * extent){
}
void Datatype::get_name(char* name, int* length){
- *length = strlen(name_);
- strncpy(name, name_, *length+1);
+ if(name_!=nullptr){
+ *length = strlen(name_);
+ strncpy(name, name_, *length+1);
+ }else{
+ *length = 0;
+ }
}
void Datatype::set_name(const char* name){