1
1

Silence malloc(0) warnings reported by Lisandro

Этот коммит содержится в:
Ralph Castain 2015-05-12 12:38:58 -07:00
родитель 3cee4152fc
Коммит 9a70765f27
3 изменённых файлов: 5 добавлений и 5 удалений

Просмотреть файл

@ -10,7 +10,7 @@ enable_debug=yes
enable_shared=yes
enable_static=no
enable_memchecker=no
enable_ipv6=yes
enable_ipv6=no
enable_mpi_fortran=yes
enable_mpi_cxx=no
enable_mpi_cxx_seek=no

Просмотреть файл

@ -51,9 +51,9 @@ int ompi_coll_libnbc_ireduce_scatter_block(void* sendbuf, void* recvbuf, int rec
res = MPI_Comm_rank(comm, &rank);
if (MPI_SUCCESS != res) { printf("MPI Error in MPI_Comm_rank() (%i)\n", res); return res; }
res = MPI_Comm_size(comm, &p);
if (MPI_SUCCESS != res) { printf("MPI Error in MPI_Comm_size() (%i)\n", res); return res; }
if (MPI_SUCCESS != res || 0 == p) { printf("MPI Error in MPI_Comm_size() (%i:%i)\n", res, p); return (MPI_SUCCESS == res) ? MPI_ERR_SIZE : res; }
res = MPI_Type_extent(datatype, &ext);
if (MPI_SUCCESS != res) { printf("MPI Error in MPI_Type_extent() (%i)\n", res); return res; }
if (MPI_SUCCESS != res || 0 == ext) { printf("MPI Error in MPI_Type_extent() (%i:%i)\n", res, (int)ext); return (MPI_SUCCESS == res) ? MPI_ERR_SIZE : res; }
schedule = (NBC_Schedule*)malloc(sizeof(NBC_Schedule));
if (NULL == schedule) { printf("Error in malloc()\n"); return NBC_OOR; }
@ -65,7 +65,7 @@ int ompi_coll_libnbc_ireduce_scatter_block(void* sendbuf, void* recvbuf, int rec
count = 0;
for(r=0;r<p;r++) count += recvcount;
handle->tmpbuf = malloc(ext*count*2);
if(handle->tmpbuf == NULL) { printf("Error in malloc()\n"); return NBC_OOR; }

Просмотреть файл

@ -501,7 +501,7 @@ static inline int NBC_Copy(void *src, int srccount, MPI_Datatype srctype, void *
} else {
/* we have to pack and unpack */
res = MPI_Pack_size(srccount, srctype, comm, &size);
if (MPI_SUCCESS != res) { printf("MPI Error in MPI_Pack_size() (%i)\n", res); return res; }
if (MPI_SUCCESS != res || 0 == size) { printf("MPI Error in MPI_Pack_size() (%i:%i)\n", res, size); return (MPI_SUCCESS == res) ? MPI_ERR_SIZE : res; }
packbuf = malloc(size);
if (NULL == packbuf) { printf("Error in malloc()\n"); return res; }
pos=0;