instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1);
extra->type = TRACING_IRECV;
- extra->send_size = count;
extra->src = src_traced;
extra->dst = rank;
- extra->datatype1 = encode_datatype(datatype);
+ int known=0;
+ extra->datatype1 = encode_datatype(datatype, &known);
+ int dt_size_send = 1;
+ if(!known)
+ dt_size_send = smpi_datatype_size(datatype);
+ extra->send_size = count*dt_size_send;
TRACE_smpi_ptp_in(rank, src_traced, rank, __FUNCTION__, extra);
#endif
#ifdef HAVE_TRACING
int rank = comm != MPI_COMM_NULL ? smpi_process_index() : -1;
int dst_traced = smpi_group_index(smpi_comm_group(comm), dst);
-
instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1);
extra->type = TRACING_ISEND;
- extra->send_size = count;
extra->src = rank;
extra->dst = dst_traced;
- extra->datatype1 = encode_datatype(datatype);
+ int known=0;
+ extra->datatype1 = encode_datatype(datatype, &known);
+ int dt_size_send = 1;
+ if(!known)
+ dt_size_send = smpi_datatype_size(datatype);
+ extra->send_size = count*dt_size_send;
TRACE_smpi_ptp_in(rank, rank, dst_traced, __FUNCTION__, extra);
TRACE_smpi_send(rank, rank, dst_traced, count*smpi_datatype_size(datatype));
#endif
int dst_traced = smpi_group_index(smpi_comm_group(comm), dst);
instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1);
extra->type = TRACING_ISSEND;
- extra->send_size = count;
extra->src = rank;
extra->dst = dst_traced;
- extra->datatype1 = encode_datatype(datatype);
+ int known=0;
+ extra->datatype1 = encode_datatype(datatype, &known);
+ int dt_size_send = 1;
+ if(!known)
+ dt_size_send = smpi_datatype_size(datatype);
+ extra->send_size = count*dt_size_send;
TRACE_smpi_ptp_in(rank, rank, dst_traced, __FUNCTION__, extra);
TRACE_smpi_send(rank, rank, dst_traced, count*smpi_datatype_size(datatype));
#endif
int src_traced = smpi_group_index(smpi_comm_group(comm), src);
instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1);
extra->type = TRACING_RECV;
- extra->send_size = count;
extra->src = src_traced;
extra->dst = rank;
- extra->datatype1 = encode_datatype(datatype);
+ int known=0;
+ extra->datatype1 = encode_datatype(datatype, &known);
+ int dt_size_send = 1;
+ if(!known)
+ dt_size_send = smpi_datatype_size(datatype);
+ extra->send_size = count*dt_size_send;
TRACE_smpi_ptp_in(rank, src_traced, rank, __FUNCTION__, extra);
#endif
int dst_traced = smpi_group_index(smpi_comm_group(comm), dst);
instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1);
extra->type = TRACING_SEND;
- extra->send_size = count;
extra->src = rank;
extra->dst = dst_traced;
- extra->datatype1 = encode_datatype(datatype);
+ int known=0;
+ extra->datatype1 = encode_datatype(datatype, &known);
+ int dt_size_send = 1;
+ if(!known)
+ dt_size_send = smpi_datatype_size(datatype);
+ extra->send_size = count*dt_size_send;
TRACE_smpi_ptp_in(rank, rank, dst_traced, __FUNCTION__, extra);
TRACE_smpi_send(rank, rank, dst_traced,count*smpi_datatype_size(datatype));
#endif
int dst_traced = smpi_group_index(smpi_comm_group(comm), dst);
instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1);
extra->type = TRACING_SSEND;
- extra->send_size = count;
extra->src = rank;
extra->dst = dst_traced;
- extra->datatype1 = encode_datatype(datatype);
+ int known=0;
+ extra->datatype1 = encode_datatype(datatype, &known);
+ int dt_size_send = 1;
+ if(!known)
+ dt_size_send = smpi_datatype_size(datatype);
+ extra->send_size = count*dt_size_send;
TRACE_smpi_ptp_in(rank, rank, dst_traced, __FUNCTION__, extra); TRACE_smpi_send(rank, rank, dst_traced,count*smpi_datatype_size(datatype));
#endif
int src_traced = smpi_group_index(smpi_comm_group(comm), src);
instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1);
extra->type = TRACING_SENDRECV;
- extra->send_size = sendcount;
- extra->recv_size = recvcount;
extra->src = src_traced;
extra->dst = dst_traced;
- extra->datatype1 = encode_datatype(sendtype);
- extra->datatype2 = encode_datatype(recvtype);
+ int known=0;
+ extra->datatype1 = encode_datatype(sendtype, &known);
+ int dt_size_send = 1;
+ if(!known)
+ dt_size_send = smpi_datatype_size(sendtype);
+ extra->send_size = sendcount*dt_size_send;
+ extra->datatype2 = encode_datatype(recvtype, &known);
+ int dt_size_recv = 1;
+ if(!known)
+ dt_size_recv = smpi_datatype_size(recvtype);
+ extra->recv_size = recvcount*dt_size_recv;
TRACE_smpi_ptp_in(rank, src_traced, dst_traced, __FUNCTION__, extra);
TRACE_smpi_send(rank, rank, dst_traced,sendcount*smpi_datatype_size(sendtype));
instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1);
extra->type = TRACING_BCAST;
- extra->send_size = count;
extra->root = root_traced;
- extra->datatype1 = encode_datatype(datatype);
+ int known=0;
+ extra->datatype1 = encode_datatype(datatype, &known);
+ int dt_size_send = 1;
+ if(!known)
+ dt_size_send = smpi_datatype_size(datatype);
+ extra->send_size = count*dt_size_send;
TRACE_smpi_collective_in(rank, root_traced, __FUNCTION__, extra);
#endif
int root_traced = smpi_group_index(smpi_comm_group(comm), root);
instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1);
extra->type = TRACING_GATHER;
- extra->send_size = sendtmpcount;
- extra->recv_size = recvcount;
extra->root = root_traced;
- extra->datatype1 = encode_datatype(sendtmptype);
- extra->datatype2 = encode_datatype(recvtype);
+ int known=0;
+ extra->datatype1 = encode_datatype(sendtmptype, &known);
+ int dt_size_send = 1;
+ if(!known)
+ dt_size_send = smpi_datatype_size(sendtmptype);
+ extra->send_size = sendtmpcount*dt_size_send;
+ extra->datatype2 = encode_datatype(recvtype, &known);
+ int dt_size_recv = 1;
+ if((smpi_comm_rank(comm)==root) && !known)
+ dt_size_recv = smpi_datatype_size(recvtype);
+ extra->recv_size = recvcount*dt_size_recv;
TRACE_smpi_collective_in(rank, root_traced, __FUNCTION__, extra);
#endif
int size = smpi_comm_size(comm);
instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1);
extra->type = TRACING_GATHERV;
- extra->send_size = sendtmpcount;
- extra->recvcounts= xbt_malloc(size*sizeof(int));
- for(i=0; i< size; i++)//copy data to avoid bad free
- extra->recvcounts[i] = recvcounts[i];
extra->num_processes = size;
extra->root = root_traced;
- extra->datatype1 = encode_datatype(sendtmptype);
- extra->datatype2 = encode_datatype(recvtype);
+ int known=0;
+ extra->datatype1 = encode_datatype(sendtmptype, &known);
+ int dt_size_send = 1;
+ if(!known)
+ dt_size_send = smpi_datatype_size(sendtype);
+ extra->send_size = sendtmpcount*dt_size_send;
+ extra->datatype2 = encode_datatype(recvtype, &known);
+ int dt_size_recv = 1;
+ if(!known)
+ dt_size_recv = smpi_datatype_size(recvtype);
+ extra->recvcounts= xbt_malloc(size*sizeof(int));
+ for(i=0; i< size; i++)//copy data to avoid bad free
+ extra->recvcounts[i] = recvcounts[i]*dt_size_recv;
TRACE_smpi_collective_in(rank, root_traced, __FUNCTION__,extra);
#endif
int rank = comm != MPI_COMM_NULL ? smpi_process_index() : -1;
instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1);
extra->type = TRACING_ALLGATHER;
- extra->send_size = sendcount;
- extra->recv_size = recvcount;
- extra->datatype1 = encode_datatype(sendtype);
- extra->datatype2 = encode_datatype(recvtype);
+ int known=0;
+ extra->datatype1 = encode_datatype(sendtype, &known);
+ int dt_size_send = 1;
+ if(!known)
+ dt_size_send = smpi_datatype_size(sendtype);
+ extra->send_size = sendcount*dt_size_send;
+ extra->datatype2 = encode_datatype(recvtype, &known);
+ int dt_size_recv = 1;
+ if(!known)
+ dt_size_recv = smpi_datatype_size(recvtype);
+ extra->recv_size = recvcount*dt_size_recv;
TRACE_smpi_collective_in(rank, -1, __FUNCTION__, extra);
#endif
int size = smpi_comm_size(comm);
instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1);
extra->type = TRACING_ALLGATHERV;
- extra->send_size = sendcount;
+ extra->num_processes = size;
+ int known=0;
+ extra->datatype1 = encode_datatype(sendtype, &known);
+ int dt_size_send = 1;
+ if(!known)
+ dt_size_send = smpi_datatype_size(sendtype);
+ extra->send_size = sendcount*dt_size_send;
+ extra->datatype2 = encode_datatype(recvtype, &known);
+ int dt_size_recv = 1;
+ if(!known)
+ dt_size_recv = smpi_datatype_size(recvtype);
extra->recvcounts= xbt_malloc(size*sizeof(int));
for(i=0; i< size; i++)//copy data to avoid bad free
- extra->recvcounts[i] = recvcounts[i];
- extra->num_processes = size;
- extra->datatype1 = encode_datatype(sendtype);
- extra->datatype2 = encode_datatype(recvtype);
+ extra->recvcounts[i] = recvcounts[i]*dt_size_recv;
TRACE_smpi_collective_in(rank, -1, __FUNCTION__,extra);
#endif
int root_traced = smpi_group_index(smpi_comm_group(comm), root);
instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1);
extra->type = TRACING_SCATTER;
- extra->send_size = sendcount;
- extra->recv_size= recvcount;
extra->root = root_traced;
- extra->datatype1 = encode_datatype(sendtype);
- extra->datatype2 = encode_datatype(recvtype);
-
+ int known=0;
+ extra->datatype1 = encode_datatype(sendtype, &known);
+ int dt_size_send = 1;
+ if((smpi_comm_rank(comm)==root) && !known)
+ dt_size_send = smpi_datatype_size(sendtype);
+ extra->send_size = sendcount*dt_size_send;
+ extra->datatype2 = encode_datatype(recvtype, &known);
+ int dt_size_recv = 1;
+ if(!known)
+ dt_size_recv = smpi_datatype_size(recvtype);
+ extra->recv_size = recvcount*dt_size_recv;
TRACE_smpi_collective_in(rank, root_traced, __FUNCTION__,extra);
#endif
mpi_coll_scatter_fun(sendbuf, sendcount, sendtype, recvbuf, recvcount,
int size = smpi_comm_size(comm);
instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1);
extra->type = TRACING_SCATTERV;
- extra->recv_size = recvcount;
- extra->sendcounts= xbt_malloc(size*sizeof(int));
- for(i=0; i< size; i++)//copy data to avoid bad free
- extra->sendcounts[i] = sendcounts[i];
extra->num_processes = size;
extra->root = root_traced;
- extra->datatype1 = encode_datatype(sendtype);
- extra->datatype2 = encode_datatype(recvtype);
-
+ int known=0;
+ extra->datatype1 = encode_datatype(sendtype, &known);
+ int dt_size_send = 1;
+ if(!known)
+ dt_size_send = smpi_datatype_size(sendtype);
+ extra->sendcounts= xbt_malloc(size*sizeof(int));
+ for(i=0; i< size; i++)//copy data to avoid bad free
+ extra->sendcounts[i] = sendcounts[i]*dt_size_send;
+ extra->datatype2 = encode_datatype(recvtype, &known);
+ int dt_size_recv = 1;
+ if(!known)
+ dt_size_recv = smpi_datatype_size(recvtype);
+ extra->recv_size = recvcount*dt_size_recv;
TRACE_smpi_collective_in(rank, root_traced, __FUNCTION__,extra);
#endif
int root_traced = smpi_group_index(smpi_comm_group(comm), root);
instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1);
extra->type = TRACING_REDUCE;
- extra->send_size = count;
- extra->datatype1 = encode_datatype(datatype);
+ int known=0;
+ extra->datatype1 = encode_datatype(datatype, &known);
+ int dt_size_send = 1;
+ if(!known)
+ dt_size_send = smpi_datatype_size(datatype);
+ extra->send_size = count*dt_size_send;
extra->root = root_traced;
TRACE_smpi_collective_in(rank, root_traced, __FUNCTION__,extra);
int rank = comm != MPI_COMM_NULL ? smpi_process_index() : -1;
instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1);
extra->type = TRACING_ALLREDUCE;
- extra->send_size = count;
- extra->datatype1 = encode_datatype(datatype);
+ int known=0;
+ extra->datatype1 = encode_datatype(datatype, &known);
+ int dt_size_send = 1;
+ if(!known)
+ dt_size_send = smpi_datatype_size(datatype);
+ extra->send_size = count*dt_size_send;
TRACE_smpi_collective_in(rank, -1, __FUNCTION__,extra);
#endif
int rank = comm != MPI_COMM_NULL ? smpi_process_index() : -1;
instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1);
extra->type = TRACING_SCAN;
- extra->send_size = count;
- extra->datatype1 = encode_datatype(datatype);
+ int known=0;
+ extra->datatype1 = encode_datatype(datatype, &known);
+ int dt_size_send = 1;
+ if(!known)
+ dt_size_send = smpi_datatype_size(datatype);
+ extra->send_size = count*dt_size_send;
TRACE_smpi_collective_in(rank, -1, __FUNCTION__,extra);
#endif
int rank = comm != MPI_COMM_NULL ? smpi_process_index() : -1;
instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1);
extra->type = TRACING_EXSCAN;
- extra->send_size = count;
- extra->datatype1 = encode_datatype(datatype);
-
+ int known=0;
+ extra->datatype1 = encode_datatype(datatype, &known);
+ int dt_size_send = 1;
+ if(!known)
+ dt_size_send = smpi_datatype_size(datatype);
+ extra->send_size = count*dt_size_send;
TRACE_smpi_collective_in(rank, -1, __FUNCTION__,extra);
#endif
smpi_mpi_exscan(sendbuf, recvbuf, count, datatype, op, comm);
int size = smpi_comm_size(comm);
instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1);
extra->type = TRACING_REDUCE_SCATTER;
+ extra->num_processes = size;
+ int known=0;
+ extra->datatype1 = encode_datatype(datatype, &known);
+ int dt_size_send = 1;
+ if(!known)
+ dt_size_send = smpi_datatype_size(datatype);
extra->send_size = 0;
extra->recvcounts= xbt_malloc(size*sizeof(int));
for(i=0; i< size; i++)//copy data to avoid bad free
- extra->recvcounts[i] = recvcounts[i];
- extra->num_processes = size;
- extra->datatype1 = encode_datatype(datatype);
-
+ extra->recvcounts[i] = recvcounts[i]*dt_size_send;
TRACE_smpi_collective_in(rank, -1, __FUNCTION__,extra);
#endif
void* sendtmpbuf=sendbuf;
int rank = comm != MPI_COMM_NULL ? smpi_process_index() : -1;
instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1);
extra->type = TRACING_REDUCE_SCATTER;
+ extra->num_processes = count;
+ int known=0;
+ extra->datatype1 = encode_datatype(datatype, &known);
+ int dt_size_send = 1;
+ if(!known)
+ dt_size_send = smpi_datatype_size(datatype);
extra->send_size = 0;
extra->recvcounts= xbt_malloc(count*sizeof(int));
for(i=0; i< count; i++)//copy data to avoid bad free
- extra->recvcounts[i] = recvcount;
- extra->num_processes = count;
- extra->datatype1 = encode_datatype(datatype);
+ extra->recvcounts[i] = recvcount*dt_size_send;
TRACE_smpi_collective_in(rank, -1, __FUNCTION__,extra);
#endif
int rank = comm != MPI_COMM_NULL ? smpi_process_index() : -1;
instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1);
extra->type = TRACING_ALLTOALL;
- extra->send_size = sendcount;
- extra->recv_size = recvcount;
- extra->datatype1 = encode_datatype(sendtype);
- extra->datatype2 = encode_datatype(recvtype);
-
+ int known=0;
+ extra->datatype1 = encode_datatype(sendtype, &known);
+ if(!known)
+ extra->send_size = sendcount*smpi_datatype_size(sendtype);
+ else
+ extra->send_size = sendcount;
+ extra->datatype2 = encode_datatype(recvtype, &known);
+ if(!known)
+ extra->recv_size = recvcount*smpi_datatype_size(recvtype);
+ else
+ extra->recv_size = recvcount;
TRACE_smpi_collective_in(rank, -1, __FUNCTION__,extra);
#endif
retval = mpi_coll_alltoall_fun(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm);
extra->recv_size = 0;
extra->recvcounts= xbt_malloc(size*sizeof(int));
extra->sendcounts= xbt_malloc(size*sizeof(int));
-
+ int known=0;
+ extra->datatype1 = encode_datatype(sendtype, &known);
+ int dt_size_send = 1;
+ if(!known)
+ dt_size_send = smpi_datatype_size(sendtype);
+ int dt_size_recv = 1;
+ extra->datatype2 = encode_datatype(recvtype, &known);
+ if(!known)
+ dt_size_recv = smpi_datatype_size(recvtype);
for(i=0; i< size; i++){//copy data to avoid bad free
- extra->send_size += sendcounts[i];
- extra->recv_size += recvcounts[i];
+ extra->send_size += sendcounts[i]*dt_size_send;
+ extra->recv_size += recvcounts[i]*dt_size_recv;
- extra->sendcounts[i] = sendcounts[i];
- extra->recvcounts[i] = recvcounts[i];
+ extra->sendcounts[i] = sendcounts[i]*dt_size_send;
+ extra->recvcounts[i] = recvcounts[i]*dt_size_recv;
}
extra->num_processes = size;
-
- extra->datatype1 = encode_datatype(sendtype);
- extra->datatype2 = encode_datatype(recvtype);
-
TRACE_smpi_collective_in(rank, -1, __FUNCTION__,extra);
#endif
retval =
if (comm_old == MPI_COMM_NULL){
retval = MPI_ERR_COMM;
} else if (ndims < 0 ||
- (ndims > 0 && (dims == NULL ||
+ (ndims > 0 && (dims == NULL ||
periodic == NULL)) ||
comm_cart == NULL) {
retval = MPI_ERR_ARG;
int blocks[3] = { 1, 1, 1 };
MPI_Aint disps[3] = { lb, 0, lb+extent };
MPI_Datatype types[3] = { MPI_LB, oldtype, MPI_UB };
-
+
s_smpi_mpi_struct_t* subtype = smpi_datatype_struct_create( blocks,
disps,
3,
}
+int PMPI_Win_post(MPI_Group group, int assert, MPI_Win win){
+ int retval = 0;
+ smpi_bench_end();
+ if (win == MPI_WIN_NULL) {
+ retval = MPI_ERR_WIN;
+ } else if (group==MPI_GROUP_NULL){
+ retval = MPI_ERR_GROUP;
+ }
+ else {
+#ifdef HAVE_TRACING
+ int rank = smpi_process_index();
+ TRACE_smpi_collective_in(rank, -1, __FUNCTION__, NULL);
+#endif
+ retval = smpi_mpi_win_post(group,assert,win);
+#ifdef HAVE_TRACING
+ TRACE_smpi_collective_out(rank, -1, __FUNCTION__);
+#endif
+ }
+ smpi_bench_begin();
+ return retval;
+}
+
+int PMPI_Win_start(MPI_Group group, int assert, MPI_Win win){
+ int retval = 0;
+ smpi_bench_end();
+ if (win == MPI_WIN_NULL) {
+ retval = MPI_ERR_WIN;
+ } else if (group==MPI_GROUP_NULL){
+ retval = MPI_ERR_GROUP;
+ }
+ else {
+#ifdef HAVE_TRACING
+ int rank = smpi_process_index();
+ TRACE_smpi_collective_in(rank, -1, __FUNCTION__, NULL);
+#endif
+ retval = smpi_mpi_win_start(group,assert,win);
+#ifdef HAVE_TRACING
+ TRACE_smpi_collective_out(rank, -1, __FUNCTION__);
+#endif
+ }
+ smpi_bench_begin();
+ return retval;
+}
+
+
+int PMPI_Win_complete(MPI_Win win){
+ int retval = 0;
+ smpi_bench_end();
+ if (win == MPI_WIN_NULL) {
+ retval = MPI_ERR_WIN;
+ }
+ else {
+#ifdef HAVE_TRACING
+ int rank = smpi_process_index();
+ TRACE_smpi_collective_in(rank, -1, __FUNCTION__, NULL);
+#endif
+ retval = smpi_mpi_win_complete(win);
+#ifdef HAVE_TRACING
+ TRACE_smpi_collective_out(rank, -1, __FUNCTION__);
+#endif
+ }
+ smpi_bench_begin();
+ return retval;
+}
+
+int PMPI_Win_wait(MPI_Win win){
+ int retval = 0;
+ smpi_bench_end();
+ if (win == MPI_WIN_NULL) {
+ retval = MPI_ERR_WIN;
+ }
+ else {
+#ifdef HAVE_TRACING
+ int rank = smpi_process_index();
+ TRACE_smpi_collective_in(rank, -1, __FUNCTION__, NULL);
+#endif
+ retval = smpi_mpi_win_wait(win);
+#ifdef HAVE_TRACING
+ TRACE_smpi_collective_out(rank, -1, __FUNCTION__);
+#endif
+ }
+ smpi_bench_begin();
+ return retval;
+}
+
int PMPI_Alloc_mem(MPI_Aint size, MPI_Info info, void *baseptr){
void *ptr = xbt_malloc(size);
if(!ptr)
return smpi_comm_c2f(comm);
}
+MPI_Info PMPI_Info_f2c(MPI_Fint info){
+ return smpi_info_f2c(info);
+}
+
+MPI_Fint PMPI_Info_c2f(MPI_Info info){
+ return smpi_info_c2f(info);
+}
+
int PMPI_Keyval_create(MPI_Copy_function* copy_fn, MPI_Delete_function* delete_fn, int* keyval, void* extra_state) {
return smpi_comm_keyval_create(copy_fn, delete_fn, keyval, extra_state);
}
return MPI_ERR_ARG;
*info = xbt_new(s_smpi_mpi_info_t, 1);
(*info)->info_dict= xbt_dict_new_homogeneous(NULL);
+ (*info)->refcount=1;
return MPI_SUCCESS;
}
int PMPI_Info_free( MPI_Info *info){
if (info == NULL || *info==NULL)
return MPI_ERR_ARG;
- xbt_dict_free(&((*info)->info_dict));
- xbt_free(*info);
+ (*info)->refcount--;
+ if((*info)->refcount==0){
+ xbt_dict_free(&((*info)->info_dict));
+ xbt_free(*info);
+ }
*info=MPI_INFO_NULL;
return MPI_SUCCESS;
}
return MPI_ERR_ARG;
if (value == NULL)
return MPI_ERR_INFO_VALUE;
- *flag=FALSE;
+ *flag=FALSE;
char* tmpvalue=(char*)xbt_dict_get_or_null(info->info_dict, key);
if(tmpvalue){
- memcpy(value,tmpvalue, (strlen(tmpvalue) + 1 < valuelen) ?
+ memcpy(value,tmpvalue, (strlen(tmpvalue) + 1 < valuelen) ?
strlen(tmpvalue) + 1 : valuelen);
*flag=TRUE;
}
int num=0;
xbt_dict_foreach(info->info_dict,cursor,keyn,data){
if(num==n){
- memcpy(key,keyn, strlen(keyn));
+ strcpy(key,keyn);
return MPI_SUCCESS;
}
num++;
int PMPI_Info_get_valuelen( MPI_Info info, char *key, int *valuelen, int *flag){
if (info == NULL || key == NULL || valuelen <0)
return MPI_ERR_ARG;
- *flag=FALSE;
+ *flag=FALSE;
char* tmpvalue=(char*)xbt_dict_get_or_null(info->info_dict, key);
if(tmpvalue){
*valuelen=strlen(tmpvalue);
return MPI_ERR_TYPE;
if(comm==MPI_COMM_NULL)
return MPI_ERR_COMM;
-
+
*size=incount*smpi_datatype_size(datatype);
-
+
return MPI_SUCCESS;
}
return MPI_SUCCESS; \
}
-
-MPI_Info PMPI_Info_f2c(MPI_Fint info){
- NOT_YET_IMPLEMENTED
-}
-
-MPI_Fint PMPI_Info_c2f(MPI_Info info){
- NOT_YET_IMPLEMENTED
-}
-
MPI_Errhandler PMPI_Errhandler_f2c(MPI_Fint errhandler){
NOT_YET_IMPLEMENTED
}
NOT_YET_IMPLEMENTED
}
-int PMPI_Win_complete(MPI_Win win){
- NOT_YET_IMPLEMENTED
-}
-
int PMPI_Win_lock(int lock_type, int rank, int assert, MPI_Win win) {
NOT_YET_IMPLEMENTED
}
-int PMPI_Win_post(MPI_Group group, int assert, MPI_Win win){
- NOT_YET_IMPLEMENTED
-}
-
-int PMPI_Win_start(MPI_Group group, int assert, MPI_Win win){
- NOT_YET_IMPLEMENTED
-}
-
int PMPI_Win_test(MPI_Win win, int *flag){
NOT_YET_IMPLEMENTED
}
NOT_YET_IMPLEMENTED
}
-int PMPI_Win_wait(MPI_Win win){
- NOT_YET_IMPLEMENTED
-}