Added single/longdouble to cmake and added regression tests to tux autotest
This commit is contained in:
parent
b2e2eedc4d
commit
e758460272
@ -99,6 +99,14 @@ co="--enable-bigint --enable-debug"
|
||||
test.sh basictest.sh $src_dir -co: $co -mo: $mo -ro: $ro -eo: -bigint
|
||||
renametest.sh basictest $output_dir/basictest--enable-bigint
|
||||
|
||||
co="--enable-single --enable-debug"
|
||||
test.sh basictest.sh $src_dir -co: $co -mo: $mo -ro: -single
|
||||
renametest.sh basictest $output_dir/basictest--enable-single
|
||||
|
||||
co="--enable-longdouble --enable-debug"
|
||||
test.sh basictest.sh $src_dir -co: $co -mo: $mo -ro: -longdouble
|
||||
renametest.sh basictest $output_dir/basictest--enable-longdouble
|
||||
|
||||
co="--enable-maxdim=4 --enable-debug"
|
||||
test.sh basictest.sh $src_dir -co: $co -mo: $mo -eo: -maxdim
|
||||
renametest.sh basictest $output_dir/basictest--enable-maxdim=4
|
||||
@ -140,6 +148,14 @@ co="-DHYPRE_BIGINT=ON"
|
||||
test.sh cmaketest.sh $src_dir -co: $co -mo: $mo -ro: $ro
|
||||
renametest.sh cmaketest $output_dir/cmaketest-bigint
|
||||
|
||||
co="-DHYPRE_SINGLE=ON"
|
||||
test.sh cmaketest.sh $src_dir -co: $co -mo: $mo -ro: -single
|
||||
renametest.sh cmaketest $output_dir/cmaketest-single
|
||||
|
||||
co="-DHYPRE_LONG_DOUBLE=ON"
|
||||
test.sh cmaketest.sh $src_dir -co: $co -mo: $mo -ro: -longdouble
|
||||
renametest.sh cmaketest $output_dir/cmaketest-longdouble
|
||||
|
||||
# cmake build doesn't currently support maxdim
|
||||
# cmake build doesn't currently support complex
|
||||
|
||||
|
||||
@ -25,6 +25,8 @@ set (CMAKE_BUILD_TYPE "${HYPRE_BUILD_TYPE}" CACHE INTERNAL "" FORCE)
|
||||
# Configuration options
|
||||
option(HYPRE_SHARED "Build a shared library" OFF)
|
||||
option(HYPRE_BIGINT "Use long long int for HYPRE_Int" OFF)
|
||||
option(HYPRE_SINGLE "Use float for HYPRE_Real" OFF)
|
||||
option(HYPRE_LONG_DOUBLE "Use long double for HYPRE_Real" OFF)
|
||||
option(HYPRE_SEQUENTIAL "Compile without MPI" OFF)
|
||||
option(HYPRE_TIMING "Use HYPRE timing routines" OFF)
|
||||
option(HYPRE_USING_HYPRE_BLAS "Use internal BLAS library" ON)
|
||||
@ -44,6 +46,14 @@ if (HYPRE_BIGINT)
|
||||
set (HYPRE_USING_FEI OFF CACHE BOOL "" FORCE)
|
||||
endif ()
|
||||
|
||||
if (HYPRE_SINGLE)
|
||||
set (HYPRE_USING_FEI OFF CACHE BOOL "" FORCE)
|
||||
endif ()
|
||||
|
||||
if (HYPRE_LONG_DOUBLE)
|
||||
set (HYPRE_USING_FEI OFF CACHE BOOL "" FORCE)
|
||||
endif ()
|
||||
|
||||
if (HYPRE_SEQUENTIAL)
|
||||
set (HYPRE_NO_GLOBAL_PARTITION OFF CACHE BOOL "" FORCE)
|
||||
endif ()
|
||||
|
||||
@ -19,6 +19,12 @@
|
||||
/* Use long long int for HYPRE_Int */
|
||||
#cmakedefine HYPRE_BIGINT
|
||||
|
||||
/* Use single precision values for HYPRE_Real */
|
||||
#cmakedefine HYPRE_SINGLE
|
||||
|
||||
/* Use long double precision values for HYPRE_Real */
|
||||
#cmakedefine HYPRE_LONG_DOUBLE
|
||||
|
||||
/* Use complex values */
|
||||
#cmakedefine HYPRE_COMPLEX
|
||||
|
||||
|
||||
@ -22,9 +22,9 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef HYPRE_SINGLE
|
||||
#if defined(HYPRE_SINGLE)
|
||||
#define sqrt sqrtf
|
||||
#elif HYPRE_LONG_DOUBLE
|
||||
#elif defined(HYPRE_LONG_DOUBLE)
|
||||
#define sqrt sqrtl
|
||||
#endif
|
||||
|
||||
|
||||
@ -43,7 +43,7 @@ extern "C" {
|
||||
* Big int stuff
|
||||
*--------------------------------------------------------------------------*/
|
||||
|
||||
#ifdef HYPRE_BIGINT
|
||||
#if defined(HYPRE_BIGINT)
|
||||
typedef long long int HYPRE_Int;
|
||||
#define HYPRE_MPI_INT MPI_LONG_LONG_INT
|
||||
|
||||
@ -58,7 +58,7 @@ typedef int HYPRE_Int;
|
||||
|
||||
#include <float.h>
|
||||
|
||||
#ifdef HYPRE_SINGLE
|
||||
#if defined(HYPRE_SINGLE)
|
||||
typedef float HYPRE_Real;
|
||||
#define HYPRE_REAL_MAX FLT_MAX
|
||||
#define HYPRE_REAL_MIN FLT_MIN
|
||||
@ -66,7 +66,7 @@ typedef float HYPRE_Real;
|
||||
#define HYPRE_REAL_MIN_EXP FLT_MIN_EXP
|
||||
#define HYPRE_MPI_REAL MPI_FLOAT
|
||||
|
||||
#elif HYPRE_LONG_DOUBLE
|
||||
#elif defined(HYPRE_LONG_DOUBLE)
|
||||
typedef long double HYPRE_Real;
|
||||
#define HYPRE_REAL_MAX LDBL_MAX
|
||||
#define HYPRE_REAL_MIN LDBL_MIN
|
||||
@ -83,7 +83,7 @@ typedef double HYPRE_Real;
|
||||
#define HYPRE_MPI_REAL MPI_DOUBLE
|
||||
#endif
|
||||
|
||||
#ifdef HYPRE_COMPLEX
|
||||
#if defined(HYPRE_COMPLEX)
|
||||
typedef double _Complex HYPRE_Complex;
|
||||
#define HYPRE_MPI_COMPLEX MPI_C_DOUBLE_COMPLEX /* or MPI_LONG_DOUBLE ? */
|
||||
|
||||
|
||||
@ -54,7 +54,7 @@ new_format( const char *format,
|
||||
{
|
||||
case 'd':
|
||||
case 'i':
|
||||
#ifdef HYPRE_BIGINT
|
||||
#if defined(HYPRE_BIGINT)
|
||||
*nfp = 'l'; nfp++;
|
||||
*nfp = 'l'; nfp++;
|
||||
#endif
|
||||
@ -64,8 +64,8 @@ new_format( const char *format,
|
||||
case 'E':
|
||||
case 'g':
|
||||
case 'G':
|
||||
#ifdef HYPRE_SINGLE /* no modifier */
|
||||
#elif HYPRE_LONG_DOUBLE /* modify with 'L' */
|
||||
#if defined(HYPRE_SINGLE) /* no modifier */
|
||||
#elif defined(HYPRE_LONG_DOUBLE) /* modify with 'L' */
|
||||
*nfp = 'L'; nfp++;
|
||||
#else /* modify with 'l' (default is _double_) */
|
||||
*nfp = 'l'; nfp++;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user