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
Fix bug in SMPI with permanent receive mode.
[simgrid.git]
/
src
/
smpi
/
smpi_mpi_dt.c
diff --git
a/src/smpi/smpi_mpi_dt.c
b/src/smpi/smpi_mpi_dt.c
index
852b4d4
..
29843af
100644
(file)
--- a/
src/smpi/smpi_mpi_dt.c
+++ b/
src/smpi/smpi_mpi_dt.c
@@
-182,12
+182,20
@@
MPI_Datatype smpi_datatype_dup(MPI_Datatype datatype)
int smpi_datatype_extent(MPI_Datatype datatype, MPI_Aint * lb,
MPI_Aint * extent)
{
int smpi_datatype_extent(MPI_Datatype datatype, MPI_Aint * lb,
MPI_Aint * extent)
{
+ if(datatype == MPI_DATATYPE_NULL){
+ *lb=0;
+ *extent=0;
+ return MPI_SUCCESS;
+ }
*lb = datatype->lb;
*extent = datatype->ub - datatype->lb;
return MPI_SUCCESS;
}
MPI_Aint smpi_datatype_get_extent(MPI_Datatype datatype){
*lb = datatype->lb;
*extent = datatype->ub - datatype->lb;
return MPI_SUCCESS;
}
MPI_Aint smpi_datatype_get_extent(MPI_Datatype datatype){
+ if(datatype == MPI_DATATYPE_NULL){
+ return 0;
+ }
return datatype->ub - datatype->lb;
}
return datatype->ub - datatype->lb;
}
@@
-205,7
+213,7
@@
int smpi_datatype_copy(void *sendbuf, int sendcount, MPI_Datatype sendtype,
{
int count;
if(smpi_privatize_global_variables){
{
int count;
if(smpi_privatize_global_variables){
- switch_data_segment(smpi_process_index());
+ s
mpi_s
witch_data_segment(smpi_process_index());
}
/* First check if we really have something to do */
if (recvcount > 0 && recvbuf != sendbuf) {
}
/* First check if we really have something to do */
if (recvcount > 0 && recvbuf != sendbuf) {
@@
-1608,8
+1616,8
@@
void smpi_op_apply(MPI_Op op, void *invec, void *inoutvec, int *len,
MPI_Datatype * datatype)
{
if(smpi_privatize_global_variables){ //we need to switch here, as the called function may silently touch global variables
MPI_Datatype * datatype)
{
if(smpi_privatize_global_variables){ //we need to switch here, as the called function may silently touch global variables
- XBT_
VERB
("Applying operation, switch to the right data frame ");
- switch_data_segment(smpi_process_index());
+ XBT_
DEBUG
("Applying operation, switch to the right data frame ");
+ s
mpi_s
witch_data_segment(smpi_process_index());
}
if(!_xbt_replay_is_active())
}
if(!_xbt_replay_is_active())