The error indicated that during configure, HDF5 concluded the
sizeof (long) is 8 bytes but when testhdf5 was compiled,
sizeof (long) is only 4 bytes.  Similar meanings for the other 3
data types.

I think your system has 32bits as the default mode.  You changed it
to the 64bits object mode by the "export OBJECT_MODE=64 ... configure"
but did not do so during the "make" stage.  Therefore, xlc
continued with the default 32bits mode and generated 32bits mode
objects.  If you go to the test/ directory and do "file testhdf5",
you would find it is actually a 32bits object file, not as a
"64-bit XCOFF executable".

To "fix" this, you need to have $OBJECT_MODE set to 64 in all
stages of configure/make/make check.  I have a caution that if
this built library is used later to compile other applications,
the users must use the same $OBJECT_MODE value of 64, otherwise
you will get mixed mode objects. That usually resulted in linking
errors.

According to the following IBM document, it is advised to use
-q64 instead of using OBJECT_MODE=64.  
http://publib.boulder.ibm.com/infocenter/comphelp/v8v101/index.jsp?topic=/com.ibm.xlf101a.doc/xlfcr/objmode.htm
  
Important note 
Using OBJECT_MODE to determine the default bit mode can have serious 
implications if you are not aware of the setting of OBJECT_MODE at the time of 
invocation. For example, you may not be aware that OBJECT_MODE has been set to 
64, and you may unexpectedly obtain 64-bit object files.
We strongly urge you to be aware of the setting of OBJECT_MODE at all times and 
to set OBJECT_MODE yourself to ensure that the compiler is invoked for the 
correct bit mode. Instead, you can always use the -q32 or -q64 option to 
specify the bit mode. 
Therefore, I would advise you to change your configure command to this:
export CC=/usr/vac/bin/xlc
export CFLAGS=-q64 
export FC=/bin/xlf90
export FCFLAGS=-q64
export CPP=/bin/cpp
export CXX=/usr/vacpp/bin/xlC
export CXXFLAGS=-q64
export AR="ar -X 64"            # need to tell ar to use 64bits mode too
./configure --prefix=/gpfs1/home/rajesh/test/hdf5-1.6.10
--with-zlib=/usr/lib --enable-fortran --enable-netcdf-4
--disable-shared

Then you can simply run "make", "make check" and "make install".
Everything will run in the 64bits mode. Even the installed "h5cc/h5fc/h5c++"
will compile and link in the 64bit mode.

BTW, I am not sure why you have "--enable-netcdf-4" in the
configure command. "--enable-netcdf-4" is NOT a recognized
option by the HDF5 configure and is ignored by the configure
command.

I hope this helps.

-Albert
THG Developer

At 02:04 AM 3/19/2010, you wrote:
>Hi HDF users,
>
>While trying to install HDF5 on AIX5.3 the following error occurred.
>
>@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
>
>============================
>Testing  testhdf5
>============================
> testhdf5  Test Log
>============================
>
>For help use: ./testhdf5 -help
>Linked with hdf5 version 1.6 release 10
>Testing  -- Configure definitions (config)
>Error: sizeof(long) is 4 but H5_SIZEOF_LONG is 8
>Error: sizeof(unsigned long) is 4 but H5_SIZEOF_LONG is 8
>Error: sizeof(size_t) is 4 but H5_SIZEOF_SIZE_T is 8
>Error: sizeof(ssize_t) is 4 but H5_SIZEOF_SSIZE_T is 8
>Testing  -- Encode/decode metadata code (metadata)
>Testing  -- Ternary Search Trees (tst)
>Testing  -- Memory Heaps (heap)
>Testing  -- Skip Lists (skiplist)
>Testing  -- Reference Counted Strings (refstr)
>Testing  -- Low-Level File I/O (file)
>Testing  -- Dataspaces (h5s)
>Testing  -- Dataspace coordinates (coords)
>
>@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
>
>The command I gave is
>
>export OBJECT_MODE=64
>export CC=/usr/vac/bin/xlc
>export FC=/bin/xlf90
>export CPP=/bin/cpp
>export CXX=/usr/vacpp/bin/xlC
>./configure --prefix=/gpfs1/home/rajesh/test/hdf5-1.6.10
>--with-zlib=/usr/lib --enable-fortran --enable-netcdf-4
>--disable-shared
>
>Could anyone please help in this regard?
>
>Thanks,
>
>Rajesh
>Consultant,
>('PRITHVI' High Performance Computing System,
>Indian Institute of Tropical Meteorology, Pune)
>HCL Infosystems Ltd.
>Arena 10, Pune Nagar Road, Viman Nagar, Pune
>
>_______________________________________________
>Hdf-forum is for HDF software users discussion.
>[email protected]
>http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org
_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]
http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org

Reply via email to