summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Laird <jlaird@hdfgroup.org>2005-05-05 16:51:46 (GMT)
committerJames Laird <jlaird@hdfgroup.org>2005-05-05 16:51:46 (GMT)
commit8570c314ef67c03f9b3ef9609c49cff7ee6488c0 (patch)
treea7c549f7c0900dede57abceb77809cba421deb9b
parenta78417597b82adc7841d1aa318e816e5e79422dd (diff)
downloadhdf5-8570c314ef67c03f9b3ef9609c49cff7ee6488c0.zip
hdf5-8570c314ef67c03f9b3ef9609c49cff7ee6488c0.tar.gz
hdf5-8570c314ef67c03f9b3ef9609c49cff7ee6488c0.tar.bz2
[svn-r10729] Purpose:
Cray X1 Port Description: Porting 1.7 branch to Cray X1. With these changes, HDF5 builds, but there are some errors in the tests. Working on the errors. Solution: Added nv1-cray file to config directory. Cleaned up some code in hl/c++ that was causing compiler to complain. Platforms tested: Cray X1, mir, sleipnir Misc. update:
-rw-r--r--MANIFEST1
-rw-r--r--config/nv1-cray192
-rw-r--r--fortran/src/H5f90i.h8
-rw-r--r--hl/c++/test/ptableTest.cpp13
4 files changed, 207 insertions, 7 deletions
diff --git a/MANIFEST b/MANIFEST
index b82dae7..c8a5042 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -77,6 +77,7 @@
./config/linux-gnulibc1
./config/linux-gnulibc2
./config/lt_vers.am
+./config/nv1-cray
./config/Makefile.am.blank
./config/pgi-fflags
./config/pgi-flags
diff --git a/config/nv1-cray b/config/nv1-cray
new file mode 100644
index 0000000..7d5df6c
--- /dev/null
+++ b/config/nv1-cray
@@ -0,0 +1,192 @@
+# -*- shell-script -*-
+#
+# This file is part of the HDF5 build script. It is processed shortly
+# after configure starts and defines, among other things, flags for
+# the various compile modes.
+
+# Choosing a C Compiler
+# ---------------------
+#
+# The user should be able to specify the compiler by setting the CC
+# environment variable to the name of the compiler and any switches it
+# requires for proper operation. If CC is unset then this script may
+# set it. If CC is unset by time this script completes then configure
+# will try `gcc' and `cc' in that order (perhaps some others too).
+#
+# Note: Code later in this file may depend on the value of $CC_BASENAME
+# in order to distinguish between different compilers when
+# deciding which compiler command-line switches to use. This
+# variable is set based on the incoming value of $CC and is only
+# used within this file.
+
+if test "X-" = "X-$CC"; then
+ CC=cc
+ CC_BASENAME=cc
+fi
+# no need to use RANLIB
+RANLIB=:
+
+# C Compiler and Preprocessor Flags
+# ---------------------------------
+#
+# Flags that end with `_CFLAGS' are always passed to the compiler.
+# Flags that end with `_CPPFLAGS' are passed to the compiler when
+# compiling but not when linking.
+#
+# DEBUG_CFLAGS Flags to pass to the compiler to create a
+# DEBUG_CPPFLAGS library suitable for use with debugging
+# tools. Usually this list will exclude
+# optimization switches (like `-O') and include
+# switches that turn on symbolic debugging
+# support (like `-g').
+#
+# PROD_CFLAGS Flags to pass to the compiler to create a
+# PROFILE_CPPFLAGS library suitable for performance testing (like
+# `-pg'). This may or may not include debugging
+# or production flags.
+#
+# CFLAGS Flags can be added to this variable which
+# might already be partially initialized. These
+# flags will always be passed to the compiler
+# and should include switches to turn on full
+# warnings. HDF5 attempts to be ANSI and Posix
+# compliant and employ good programming
+# practices resulting in few if any
+# warnings.
+#
+# Warning flags do not have to be added to CFLAGS
+# variable if the compiler is the GNU gcc
+# compiler or a descendent of gcc such as EGCS or PGCC.
+#
+# The CFLAGS should contains *something* or else
+# configure will probably add `-g'. For most
+# systems this isn't a problem but some systems
+# will disable optimizations in favor of the
+# `-g'.
+#
+#
+# These flags should be set according to the compiler being used.
+# There are two ways to check the compiler. You can try using `-v' or
+# `--version' to see if the compiler will print a version string. You
+# can use the value of $CC_BASENAME which is the base name of the
+# first word in $CC (note that the value of CC may have changed
+# above).
+
+case $CC_BASENAME in
+ gcc)
+ CFLAGS="$CFLAGS -Wsign-compare" #Only works for some versions
+ DEBUG_CFLAGS="-g -fverbose-asm"
+ DEBUG_CPPFLAGS=
+ PROD_CFLAGS="-O3 -fomit-frame-pointer"
+ PROD_CPPFLAGS=
+ PROFILE_CFLAGS="-pg"
+ PROFILE_CPPFLAGS=
+ ;;
+
+ cc)
+ CFLAGS="$CFLAGS"
+ DEBUG_CFLAGS="-g"
+ DEBUG_CPPFLAGS=
+ PROD_CFLAGS=""
+ PROD_CPPFLAGS=
+ PROFILE_CFLAGS=
+ PROFILE_CPPFLAGS=
+ ;;
+
+ *)
+ CFLAGS="$CFLAGS -ansi"
+ DEBUG_CFLAGS="-g"
+ DEBUG_CPPFLAGS=
+ PROD_CFLAGS="-O"
+ PROD_CPPFLAGS=
+ PROFILE_CFLAGS="-pg"
+ PROFILE_CPPFLAGS=
+ ;;
+esac
+
+
+
+# Overriding Configure Tests
+# --------------------------
+#
+# Values for overriding configuration tests when cross compiling.
+# This includes compiling on some machines where the serial front end
+# compiles for a parallel back end.
+
+# Set this to `yes' or `no' depending on whether the target is big
+# endian or little endian.
+#ac_cv_c_bigendian=${ac_cv_c_bigendian='yes'}
+
+# Set this to the width required by printf() to print type `long
+# long'. For instance, if the format would be `%lld' then set it to
+# `ll' or if the format would be `%qd' set it to `q'.
+#hdf5_cv_printf_ll=${hdf5_cv_printf_ll='ll'}
+
+# Hard set the flag to indicate that converting denormalized floating-point
+# values doesn't work.
+hdf5_cv_convert_denormal_float=${hdf5_cv_convert_denormal_float='no'}
+
+# The default Fortran 90 compiler
+
+#
+# HDF5 integers
+#
+# R_LARGE is the number of digits for the bigest integer supported.
+# R_INTEGER is the number of digits in INTEGER
+#
+# (for the UNICOS architechture)
+#
+R_LARGE=18
+R_INTEGER=9
+HADDR_T='SELECTED_INT_KIND(R_LARGE)'
+HSIZE_T='SELECTED_INT_KIND(R_LARGE)'
+HSSIZE_T='SELECTED_INT_KIND(R_LARGE)'
+HID_T='SELECTED_INT_KIND(R_INTEGER)'
+SIZE_T='SELECTED_INT_KIND(R_LARGE)'
+OBJECT_NAMELEN_DEFAULT_F=-1
+
+if test "X-" = "X-$F9X"; then
+ F9X=ftn
+fi
+
+if test "X-" = "X-$f9x_flags_set"; then
+ # -Wl passes flags to the linker and -M# will ignore warnings with
+ # number #. Warning 405 and 412 were stopping the executable from being built.
+ F9XSUFFIXFLAG=""
+ FSEARCH_DIRS=""
+ FFLAGS="$FFLAGS"
+ DEBUG_FFLAGS="-g"
+ PROD_FFLAGS=""
+ PROFILE_FFLAGS=""
+ f9x_flags_set=yes
+fi
+
+# The default C++ compiler
+
+if test -z "$CXX"; then
+ CXX="CC"
+ CXX_BASENAME=CC
+fi
+
+case $CXX_BASENAME in
+ g++)
+ CXXFLAGS="$CXXFLAGS -Wsign-compare" #Only works for some versions
+ DEBUG_CXXFLAGS="-g -fverbose-asm"
+ DEBUG_CPPFLAGS=
+ PROD_CXXFLAGS="-O3 -fomit-frame-pointer"
+ PROD_CPPFLAGS=
+ PROFILE_CXXFLAGS="-pg"
+ PROFILE_CPPFLAGS=
+ ;;
+
+ *)
+ CXXFLAGS="$CXXFLAGS"
+ DEBUG_CXXFLAGS="-g"
+ DEBUG_CPPFLAGS=
+ PROD_CXXFLAGS=""
+ PROD_CPPFLAGS=
+ PROFILE_CXXFLAGS=
+ PROFILE_CPPFLAGS=
+ ;;
+esac
+
diff --git a/fortran/src/H5f90i.h b/fortran/src/H5f90i.h
index d3a30e9..d99353b 100644
--- a/fortran/src/H5f90i.h
+++ b/fortran/src/H5f90i.h
@@ -22,7 +22,7 @@
*/
#include "H5f90i_gen.h"
-#if (defined (UNICOS) || (defined (_UNICOS)))
+#if (defined (UNICOS) || defined (_UNICOS)) && !defined(__crayx1)
#include <fortran.h>
@@ -73,6 +73,12 @@ typedef float real_f;
#define _fcdtocp(desc) (desc)
#endif /* IRIX */
+#if defined(__crayx1)
+typedef char *_fcd;
+typedef float real_f;
+#define _fcdtocp(desc) (desc)
+#endif /* Cray X1 */
+
#if (defined(SUN) || defined(sun) || defined(__sun__) || defined(__SUNPRO_C)) & !defined(__i386)
typedef char *_fcd;
diff --git a/hl/c++/test/ptableTest.cpp b/hl/c++/test/ptableTest.cpp
index efe4f10..9dc2bffe 100644
--- a/hl/c++/test/ptableTest.cpp
+++ b/hl/c++/test/ptableTest.cpp
@@ -172,6 +172,9 @@ out:
int TestGetNext()
{
int error;
+ int record;
+ int records[2];
+ int i;
TESTING("GetNextPacket")
@@ -181,15 +184,12 @@ int TestGetNext()
if(! wrapper.IsValid())
goto out;
- int record;
- int records[2];
-
/* Append 5 records to the dataset */
for(record = 1; record < 6; record++)
wrapper.AppendPacket(&record);
/* Ensure that we can interate through the records and get the right ones */
- for(int i = 1; i < 6; i++)
+ for(i = 1; i < 6; i++)
{
wrapper.GetNextPacket(&record);
if(record != i)
@@ -199,7 +199,7 @@ int TestGetNext()
wrapper.ResetIndex();
/* Ensure that we can interate through the records and get the right ones */
- for(int i = 1; i < 6; i++)
+ for(i = 1; i < 6; i++)
{
error = wrapper.GetNextPacket(&record);
if(record != i || error <0)
@@ -230,6 +230,7 @@ int TestGetPacket()
{
int record;
int theRecs[3];
+ int i;
TESTING("GetPacket")
/* Create a dataset */
@@ -249,7 +250,7 @@ int TestGetPacket()
/* Ensure that we can retrieve multiple records */
wrapper.GetPackets(1, 3, theRecs);
- for(int i = 0; i < 3; i++)
+ for(i = 0; i < 3; i++)
{
if(theRecs[i] != i+2)
goto out;