Hello Barbara,
Thanks for your reply. I don’t see the extra undefined reference you mentioned. The complete make output is:
h5test.c: In function ‘h5_dump_info_object’:
h5test.c:1050:72: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
printf(“Dumping MPI Info Object(%d) (up to %d bytes per item):\n”, (int)info,
^
In file included from h5test.c:25:0:
At top level:
H5srcdir.h:51:20: warning: ‘H5_get_srcdir’ defined but not used [-Wunused-function]
static const char *H5_get_srcdir(void)
^~~~~~~~~~~~~
tarray.c: In function ‘test_array_funcs’:
tarray.c:190:10: warning: conversion to ‘int’ from ‘size_t {aka long unsigned int}’ may alter its value [-Wconversion]
size=H5Tget_precision(type);
^~~~~~~~~~~~~~~~
tarray.c:193:10: warning: conversion to ‘int’ from ‘size_t {aka long unsigned int}’ may alter its value [-Wconversion]
size=H5Tget_size(type);
^~~~~~~~~~~
tarray.c:196:10: warning: conversion to ‘int’ from ‘size_t {aka long unsigned int}’ may alter its value [-Wconversion]
size=H5Tget_ebias(type);
^~~~~~~~~~~~
tarray.c: In function ‘test_array_compound_atomic’:
tarray.c:542:39: warning: conversion to ‘float’ from ‘int’ may alter its value [-Wconversion]
wdata[i][j].f = (float)(i * 2.5F + j);
^
tarray.c:542:46: warning: conversion to ‘float’ from ‘int’ may alter its value [-Wconversion]
wdata[i][j].f = (float)(i * 2.5F + j);
^
tarray.c: In function ‘test_array_compound_array’:
tarray.c:746:44: warning: conversion to ‘float’ from ‘int’ may alter its value [-Wconversion]
wdata[i][j].f[k]=(float)(i * 10.0F + j * 2.5F + k);
^
tarray.c:746:56: warning: conversion to ‘float’ from ‘int’ may alter its value [-Wconversion]
wdata[i][j].f[k]=(float)(i * 10.0F + j * 2.5F + k);
^
tarray.c:746:63: warning: conversion to ‘float’ from ‘int’ may alter its value [-Wconversion]
wdata[i][j].f[k]=(float)(i * 10.0F + j * 2.5F + k);
^
tarray.c: In function ‘test_array_alloc_custom’:
tarray.c:975:18: warning: conversion to ‘size_t {aka long unsigned int}’ from ‘int’ may change the sign of the result [-Wsign-conversion]
*mem_used+=size;
^~
tarray.c:975:20: warning: conversion to ‘int’ from ‘size_t {aka long unsigned int}’ may alter its value [-Wconversion]
*mem_used+=size;
^~~~
tarray.c: In function ‘test_array_free_custom’:
tarray.c:1003:18: warning: conversion to ‘size_t {aka long unsigned int}’ from ‘int’ may change the sign of the result [-Wsign-conversion]
mem_used-=(size_t *)mem;
^~
tarray.c:1003:20: warning: conversion to ‘int’ from ‘size_t {aka long unsigned int}’ may alter its value [-Wconversion]
mem_used-=(size_t *)mem;
^
In file included from testhdf5.h:25:0,
from tarray.c:22:
tarray.c: In function ‘test_array_vlen_atomic’:
tarray.c:1042:43: warning: conversion to ‘long unsigned int’ from ‘int’ may change the sign of the result [-Wsign-conversion]
wdata[i][j].p=HDmalloc((i+j+1)*sizeof(unsigned int));
^
…/src/H5private.h:978:35: note: in definition of macro ‘HDmalloc’
#define HDmalloc(Z) malloc(Z)
^
tarray.c:1043:29: warning: conversion to ‘size_t {aka long unsigned int}’ from ‘int’ may change the sign of the result [-Wsign-conversion]
wdata[i][j].len=i+j+1;
^
tarray.c:1045:52: warning: conversion to ‘unsigned int’ from ‘int’ may change the sign of the result [-Wsign-conversion]
((unsigned int )wdata[i][j].p)[k]=i100+j*10+k;
^
In file included from testhdf5.h:25:0,
from tarray.c:22:
tarray.c: In function ‘test_array_vlen_array’:
tarray.c:1253:43: warning: conversion to ‘long unsigned int’ from ‘int’ may change the sign of the result [-Wsign-conversion]
wdata[i][j].p=HDmalloc((i+j+1)*(sizeof(unsigned int)*ARRAY1_DIM1));
^
…/src/H5private.h:978:35: note: in definition of macro ‘HDmalloc’
#define HDmalloc(Z) malloc(Z)
^
tarray.c:1254:29: warning: conversion to ‘size_t {aka long unsigned int}’ from ‘int’ may change the sign of the result [-Wsign-conversion]
wdata[i][j].len=i+j+1;
^
tarray.c:1257:70: warning: conversion to ‘unsigned int’ from ‘int’ may change the sign of the result [-Wsign-conversion]
((unsigned int )wdata[i][j].p)[kARRAY1_DIM1+l]=i1000+j100+k*10+l;
^
tarray.c: In function ‘test_array_bkg’:
tarray.c:1535:31: warning: conversion to ‘float’ from ‘int’ may alter its value [-Wconversion]
cf[i].b[j] = (float)(100.0F*(i+1) + 0.01F*j);
^
tarray.c:1535:45: warning: conversion to ‘float’ from ‘int’ may alter its value [-Wconversion]
cf[i].b[j] = (float)(100.0F*(i+1) + 0.01F*j);
^
tarray.c:1536:32: warning: conversion to ‘float’ from ‘int’ may alter its value [-Wconversion]
cf[i].c[j] = (double)(100.0F*(i+1) + 0.02F*j);
^
tarray.c:1536:46: warning: conversion to ‘float’ from ‘int’ may alter its value [-Wconversion]
cf[i].c[j] = (double)(100.0F*(i+1) + 0.02F*j);
^
In file included from tarray.c:23:0:
At top level:
H5srcdir.h:51:20: warning: ‘H5_get_srcdir’ defined but not used [-Wunused-function]
static const char *H5_get_srcdir(void)
^~~~~~~~~~~~~
H5srcdir.h:33:20: warning: ‘H5_get_srcdir_filename’ defined but not used [-Wunused-function]
static const char *H5_get_srcdir_filename(const char *filename)
^~~~~~~~~~~~~~~~~~~~~~
tfile.c: In function ‘test_file_open_overlap’:
tfile.c:1849:13: warning: conversion to ‘int’ from ‘ssize_t {aka long int}’ may alter its value [-Wconversion]
nobjs = H5Fget_obj_count(fid1, H5F_OBJ_LOCAL|H5F_OBJ_ALL);
^~~~~~~~~~~~~~~~
tfile.c:1870:13: warning: conversion to ‘int’ from ‘ssize_t {aka long int}’ may alter its value [-Wconversion]
nobjs = H5Fget_obj_count(fid2, H5F_OBJ_ALL);
^~~~~~~~~~~~~~~~
In file included from tfile.c:24:0:
At top level:
H5srcdir.h:51:20: warning: ‘H5_get_srcdir’ defined but not used [-Wunused-function]
static const char *H5_get_srcdir(void)
^~~~~~~~~~~~~
H5srcdir.h:33:20: warning: ‘H5_get_srcdir_filename’ defined but not used [-Wunused-function]
static const char *H5_get_srcdir_filename(const char *filename)
^~~~~~~~~~~~~~~~~~~~~~
th5s.c: In function ‘test_h5s_zero_dim’:
th5s.c:560:27: warning: conversion to ‘int’ from ‘unsigned int’ may change the sign of the result [-Wsign-conversion]
wdata[i][j] = i + j;
^
th5s.c:562:33: warning: conversion to ‘short int’ from ‘unsigned int’ may alter its value [-Wconversion]
wdata_short[i][j] = i + j;
^
th5s.c:569:39: warning: conversion to ‘int’ from ‘unsigned int’ may change the sign of the result [-Wsign-conversion]
wdata_real[i][j][k] = i + j + k;
^
th5s.c: In function ‘test_h5s_chunk’:
th5s.c:1749:52: warning: conversion to ‘float’ from ‘int’ may alter its value [-Wconversion]
chunk_data_flt[i][j] = (float)((i + 1) * 2.5F - j * 100.3F);
^
th5s.c:1749:63: warning: conversion to ‘float’ from ‘int’ may alter its value [-Wconversion]
chunk_data_flt[i][j] = (float)((i + 1) * 2.5F - j * 100.3F);
^
In file included from th5s.c:23:0:
At top level:
H5srcdir.h:51:20: warning: ‘H5_get_srcdir’ defined but not used [-Wunused-function]
static const char *H5_get_srcdir(void)
^~~~~~~~~~~~~
H5srcdir.h:33:20: warning: ‘H5_get_srcdir_filename’ defined but not used [-Wunused-function]
static const char *H5_get_srcdir_filename(const char *filename)
^~~~~~~~~~~~~~~~~~~~~~
tmisc.c: In function ‘test_misc8’:
tmisc.c:1260:22: warning: conversion to ‘int’ from ‘unsigned int’ may change the sign of the result [-Wsign-conversion]
tdata++=((uMISC8_DIM1)+v)%13;
^
In file included from tmisc.c:30:0:
testhdf5.h:83:34: warning: conversion to ‘long int’ from ‘long unsigned int’ may change the sign of the result [-Wsign-conversion]
long __x = (long)_x, __val = (long)_val; \
^
tmisc.c:1316:5: note: in expansion of macro ‘VERIFY’
VERIFY(storage_size, MISC8_DIM0 * MISC8_DIM1 * H5Tget_size(H5T_NATIVE_INT), “H5Dget_storage_size”);
^~~~~~
testhdf5.h:83:34: warning: conversion to ‘long int’ from ‘long unsigned int’ may change the sign of the result [-Wsign-conversion]
long __x = (long)_x, __val = (long)_val; \
^
tmisc.c:1411:5: note: in expansion of macro ‘VERIFY’
VERIFY(storage_size, MISC8_DIM0 * MISC8_DIM1 * H5Tget_size(H5T_NATIVE_INT), “H5Dget_storage_size”);
^~~~~~
testhdf5.h:83:34: warning: conversion to ‘long int’ from ‘long unsigned int’ may change the sign of the result [-Wsign-conversion]
long __x = (long)_x, __val = (long)_val; \
^
tmisc.c:1438:5: note: in expansion of macro ‘VERIFY’
VERIFY(storage_size, MISC8_DIM0 * MISC8_DIM1 * H5Tget_size(H5T_NATIVE_INT), “H5Dget_storage_size”);
^~~~~~
tmisc.c: In function ‘test_misc16’:
tmisc.c:2728:63: warning: initialization makes integer from pointer without a cast [-Wint-conversion]
{“1234567”, “1234567\0”, “12345678”, {NULL}};
^~~~
tmisc.c:2728:63: note: (near initialization for ‘wdata[3][0]’)
tmisc.c: In function ‘test_misc17’:
tmisc.c:2807:63: warning: initialization makes integer from pointer without a cast [-Wint-conversion]
{“1234567”, “1234567\0”, “12345678”, {NULL}};
^~~~
tmisc.c:2807:63: note: (near initialization for ‘wdata[3][0]’)
tmisc.c: In function ‘test_misc23’:
tmisc.c:3885:14: warning: conversion to ‘herr_t {aka int}’ from ‘ssize_t {aka long int}’ may alter its value [-Wconversion]
status = H5Iget_name(tmp_id, objname, (size_t)MISC23_NAME_BUF_SIZE);
^~~~~~~~~~~
tmisc.c: In function ‘test_misc28’:
tmisc.c:5041:18: warning: conversion to ‘char’ from ‘int’ may alter its value [-Wconversion]
buf[i] = i;
^
tmisc.c:306:33: warning: conversion to ‘char’ from ‘int’ may alter its value [-Wconversion]
#define MISC28_SIZE 10
^
tmisc.c:5062:18: note: in expansion of macro ‘MISC28_SIZE’
buf[i] = MISC28_SIZE - 1 - i;
^~~~~~~~~~~
In file included from tmisc.c:31:0:
At top level:
H5srcdir.h:51:20: warning: ‘H5_get_srcdir’ defined but not used [-Wunused-function]
static const char *H5_get_srcdir(void)
^~~~~~~~~~~~~
…/src/.libs/libhdf5.so: undefined reference to `OMPI_C_MPI_NULL_COPY_FN’
collect2: error: ld returned 1 exit status
make[1]: *** [testhdf5] Error 1
make: *** [all-recursive] Error 1
I din’t have this problem when compiling with mpich-3.0.1, however now I need to use openmpi. Do you know if there is a openmpi version suitable for compiling with hdf5 ?
Kind Regards,