fix several typecasts
This commit was SVN r26957.
Этот коммит содержится в:
родитель
7895cd1114
Коммит
2f442799f8
@ -57,7 +57,7 @@ int ompi_coll_libnbc_ireduce_scatter_block(void* sendbuf, void* recvbuf, int rec
|
||||
res = NBC_Sched_create(schedule);
|
||||
if(res != NBC_OK) { printf("Error in NBC_Sched_create (%i)\n", res); return res; }
|
||||
|
||||
maxr = (int)ceil((log(p)/LOG2));
|
||||
maxr = (int)ceil((log((double)p)/LOG2));
|
||||
|
||||
count = 0;
|
||||
for(r=0;r<p;r++) count += recvcount;
|
||||
|
@ -176,7 +176,7 @@ static inline int allred_sched_diss(int rank, int p, int count, MPI_Datatype dat
|
||||
|
||||
root = 0; /* this makes the code for ireduce and iallreduce nearly identical - could be changed to improve performance */
|
||||
RANK2VRANK(rank, vrank, root);
|
||||
maxr = (int)ceil((log(p)/LOG2));
|
||||
maxr = (int)ceil((log((double)p)/LOG2));
|
||||
|
||||
firstred = 1;
|
||||
for(r=1; r<=maxr; r++) {
|
||||
|
@ -46,7 +46,7 @@ int ompi_coll_libnbc_ibarrier(struct ompi_communicator_t *comm, ompi_request_t *
|
||||
res = NBC_Sched_create(schedule);
|
||||
if(res != NBC_OK) { printf("Error in NBC_Sched_create (%i)\n", res); return res; }
|
||||
|
||||
maxround = (int)ceil((log(p)/LOG2)-1);
|
||||
maxround = (int)ceil((log((double)p)/LOG2)-1);
|
||||
|
||||
do {
|
||||
round++;
|
||||
|
@ -154,7 +154,7 @@ int ompi_coll_libnbc_ibcast(void *buffer, int count, MPI_Datatype datatype, int
|
||||
static inline int bcast_sched_binomial(int rank, int p, int root, NBC_Schedule *schedule, void *buffer, int count, MPI_Datatype datatype) {
|
||||
int maxr, vrank, peer, r, res;
|
||||
|
||||
maxr = (int)ceil((log(p)/LOG2));
|
||||
maxr = (int)ceil((log((double)p)/LOG2));
|
||||
|
||||
RANK2VRANK(rank, vrank, root);
|
||||
|
||||
|
@ -178,7 +178,7 @@ static inline int red_sched_binomial(int rank, int p, int root, void *sendbuf, v
|
||||
int firstred, vrank, vpeer, peer, res, maxr, r;
|
||||
|
||||
RANK2VRANK(rank, vrank, root);
|
||||
maxr = (int)ceil((log(p)/LOG2));
|
||||
maxr = (int)ceil((log((double)p)/LOG2));
|
||||
|
||||
firstred = 1;
|
||||
for(r=1; r<=maxr; r++) {
|
||||
|
@ -56,7 +56,7 @@ int ompi_coll_libnbc_ireduce_scatter(void* sendbuf, void* recvbuf, int *recvcoun
|
||||
res = NBC_Sched_create(schedule);
|
||||
if(res != NBC_OK) { printf("Error in NBC_Sched_create (%i)\n", res); return res; }
|
||||
|
||||
maxr = (int)ceil((log(p)/LOG2));
|
||||
maxr = (int)ceil((log((double)p)/LOG2));
|
||||
|
||||
count = 0;
|
||||
for(r=0;r<p;r++) count += recvcounts[r];
|
||||
|
@ -100,7 +100,7 @@ installdirs_windows_open(void)
|
||||
RegCloseKey(ompi_key);
|
||||
}
|
||||
|
||||
#ifdef OMPI_RELEASE_BUILD
|
||||
#if OMPI_RELEASE_BUILD
|
||||
/* the last try, check the executable path.
|
||||
* only used for binary releases, so that we
|
||||
* don't bother with the configured paths in mca_installdirs_config
|
||||
|
@ -239,7 +239,7 @@ static int store(const orte_process_name_t *proc,
|
||||
switch (type) {
|
||||
case OPAL_STRING:
|
||||
kv->type = OPAL_STRING;
|
||||
kv->data.string = strdup(data);
|
||||
kv->data.string = strdup( (const char *) data);
|
||||
break;
|
||||
case ORTE_VPID:
|
||||
case OPAL_UINT32:
|
||||
@ -261,7 +261,7 @@ static int store(const orte_process_name_t *proc,
|
||||
case OPAL_BYTE_OBJECT:
|
||||
kv->type = OPAL_BYTE_OBJECT;
|
||||
boptr = (opal_byte_object_t*)data;
|
||||
kv->data.bo.bytes = malloc(boptr->size);
|
||||
kv->data.bo.bytes = (uint8_t *) malloc(boptr->size);
|
||||
memcpy(kv->data.bo.bytes, boptr->bytes, boptr->size);
|
||||
kv->data.bo.size = boptr->size;
|
||||
break;
|
||||
@ -413,7 +413,7 @@ static int fetch(const orte_process_name_t *proc,
|
||||
return ORTE_ERR_TYPE_MISMATCH;
|
||||
}
|
||||
boptr = (opal_byte_object_t*)malloc(sizeof(opal_byte_object_t));
|
||||
boptr->bytes = malloc(kv->data.bo.size);
|
||||
boptr->bytes = (uint8_t *) malloc(kv->data.bo.size);
|
||||
memcpy(boptr->bytes, kv->data.bo.bytes, kv->data.bo.size);
|
||||
boptr->size = kv->data.bo.size;
|
||||
*data = boptr;
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user