Skip to content

Commit

Permalink
64bit integer compilation of tools and tests enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
nimgould committed Jan 18, 2024
1 parent 6baf1ee commit efbfd8f
Show file tree
Hide file tree
Showing 39 changed files with 606 additions and 390 deletions.
8 changes: 5 additions & 3 deletions include/cutest.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* Boolean logicals provided, August 21 2013
* fortran intent(in) variables defined as const, Dec 2 2015
*
* this version 2023-11-16
* this version 2024-01-18
*
* ======================================================================
*/
Expand Down Expand Up @@ -68,7 +68,7 @@ typedef double rp_;
typedef double rpc_;
#endif

#ifdef CUTEST_LONG
#ifdef CUTEST_64BIT_INTEGER
typedef long long ip_;
typedef long long ipc_;
#else
Expand Down Expand Up @@ -320,6 +320,7 @@ void CUTEST_cdimsg ( integer *status, integer *nnzg );
void CUTEST_cdimsj ( integer *status, integer *nnzj );
void CUTEST_cdimsh ( integer *status, integer *nnzh );
void CUTEST_cdimcop ( integer *status, integer *nnzohp );
void CUTEST_cdimohp ( integer *status, integer *nnzohp );
void CUTEST_cdimchp ( integer *status, integer *nnzchp );
void CUTEST_cdimse ( integer *status, integer *ne, integer *nzh,
integer *nzirnh );
Expand Down Expand Up @@ -431,7 +432,7 @@ void CUTEST_cdhc ( integer *status, const integer *n, const integer *m,
const integer *lh1, doublereal *h );
void CUTEST_cdhj ( integer *status, const integer *n, const integer *m,
const doublereal *x, const doublereal *y0,
const doublereal *y, const integer *lh1,
const doublereal *y, const integer *lh1,
doublereal *h );
void CUTEST_cshp ( integer *status, const integer *n, integer *nnzh,
const integer *lh, integer *irnh, integer *icnh );
Expand Down Expand Up @@ -567,6 +568,7 @@ void CUTEST_cdimsg_s ( integer *status, integer *nnzg );
void CUTEST_cdimsj_s ( integer *status, integer *nnzj );
void CUTEST_cdimsh_s ( integer *status, integer *nnzh );
void CUTEST_cdimcop_s ( integer *status, integer *nnzohp );
void CUTEST_cdimohp_s ( integer *status, integer *nnzohp );
void CUTEST_cdimchp_s ( integer *status, integer *nnzchp );
void CUTEST_cdimse_s ( integer *status, integer *ne, integer *nzh,
integer *nzirnh );
Expand Down
57 changes: 28 additions & 29 deletions include/cutest_modules.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,26 @@

/*
* assign names for each CUTEst package using the C pre-processor.
* possibilities are long (i8) and normal (i4, default) integers and
* possibilities are 64 bit (i8) and normal (32 bit) (i4, default) integers and
* half (r2), single (r4), double (r8, default) and quadruple (r16) reals
*
* Nick Gould for CUTEst
* initial version, 2023-11-02
* this version 2023-11-02
* this version 2024-01-18
*/

#ifdef CUTEST_LONG
#define CUTEST_KINDS_integer CUTEST_KINDS_long
#ifdef CUTEST_64BIT_INTEGER
#define CUTEST_KINDS_integer CUTEST_KINDS_64
#else
#define CUTEST_KINDS_integer CUTEST_KINDS_int
#endif

#if defined CUTEST_HALF
#ifdef CUTEST_LONG
#define CUTEST_KINDS_precision CUTEST_KINDS_half_long
#define CUTEST_precision CUTEST_half_long
#define CUTEST_PROBLEM_precision CUTEST_PROBLEM_half_long
#define CUTEST_iNTERFACE_precision CUTEST_INTERFACE_half_long
#define CUTEST_LQP_precision CUTEST_LQP_half_long
#ifdef CUTEST_64BIT_INTEGER
#define CUTEST_KINDS_precision CUTEST_KINDS_half_64
#define CUTEST_precision CUTEST_half_64
#define CUTEST_PROBLEM_precision CUTEST_PROBLEM_half_64
#define CUTEST_iNTERFACE_precision CUTEST_INTERFACE_half_64
#define CUTEST_LQP_precision CUTEST_LQP_half_64
#else
#define CUTEST_KINDS_precision CUTEST_KINDS_half
#define CUTEST_precision CUTEST_half
Expand All @@ -31,12 +30,12 @@
#define CUTEST_LQP_precision CUTEST_LQP_half
#endif
#elif defined CUTEST_SINGLE
#ifdef CUTEST_LONG
#define CUTEST_KINDS_precision CUTEST_KINDS_single_long
#define CUTEST_precision CUTEST_single_long
#define CUTEST_PROBLEM_precision CUTEST_PROBLEM_single_long
#define CUTEST_INTERFACE_precision CUTEST_INTERFACE_single_long
#define CUTEST_LQP_precision CUTEST_LQP_single_long
#ifdef CUTEST_64BIT_INTEGER
#define CUTEST_KINDS_precision CUTEST_KINDS_single_64
#define CUTEST_precision CUTEST_single_64
#define CUTEST_PROBLEM_precision CUTEST_PROBLEM_single_64
#define CUTEST_INTERFACE_precision CUTEST_INTERFACE_single_64
#define CUTEST_LQP_precision CUTEST_LQP_single_64
#else
#define CUTEST_KINDS_precision CUTEST_KINDS_single
#define CUTEST_precision CUTEST_single
Expand All @@ -45,12 +44,12 @@
#define CUTEST_LQP_precision CUTEST_LQP_single
#endif
#elif defined CUTEST_QUAD
#ifdef CUTEST_LONG
#define CUTEST_KINDS_precision CUTEST_KINDS_quadruple_long
#define CUTEST_precision CUTEST_quadruple_long
#define CUTEST_PROBLEM_precision CUTEST_PROBLEM_quadruple_long
#define CUTEST_INTERFACE_precision CUTEST_INTERFACE_quadruple_long
#define CUTEST_LQP_precision CUTEST_LQP_quadruple_long
#ifdef CUTEST_64BIT_INTEGER
#define CUTEST_KINDS_precision CUTEST_KINDS_quadruple_64
#define CUTEST_precision CUTEST_quadruple_64
#define CUTEST_PROBLEM_precision CUTEST_PROBLEM_quadruple_64
#define CUTEST_INTERFACE_precision CUTEST_INTERFACE_quadruple_64
#define CUTEST_LQP_precision CUTEST_LQP_quadruple_64
#else
#define CUTEST_KINDS_precision CUTEST_KINDS_quadruple
#define CUTEST_precision CUTEST_quadruple
Expand All @@ -59,12 +58,12 @@
#define CUTEST_LQP_precision CUTEST_LQP_quadruple
#endif
#else
#ifdef CUTEST_LONG
#define CUTEST_KINDS_precision CUTEST_KINDS_double_long
#define CUTEST_precision CUTEST_double_long
#define CUTEST_PROBLEM_precision CUTEST_PROBLEM_double_long
#define CUTEST_iNTERFACE_precision CUTEST_INTERFACE_double_long
#define CUTEST_LQP_precision CUTEST_LQP_double_long
#ifdef CUTEST_64BIT_INTEGER
#define CUTEST_KINDS_precision CUTEST_KINDS_double_64
#define CUTEST_precision CUTEST_double_64
#define CUTEST_PROBLEM_precision CUTEST_PROBLEM_double_64
#define CUTEST_iNTERFACE_precision CUTEST_INTERFACE_double_64
#define CUTEST_LQP_precision CUTEST_LQP_double_64
#else
#define CUTEST_KINDS_precision CUTEST_KINDS_double
#define CUTEST_precision CUTEST_double
Expand Down
30 changes: 27 additions & 3 deletions src/makedefs/definitions
Original file line number Diff line number Diff line change
@@ -1,16 +1,28 @@
# Standard CUTEst makefile definitions

# Nick Gould, for GALAHAD production
# This version: 2023-11-22
# This version: 2024-01-18

# makefile shell

SHELL = /bin/$(BINSHELL)

ifeq "$(PRECIS)" "single"
DPREC = -DCUTEST_SINGLE
ifeq "$(INTEGER)" "64bit"
DPREC = -DCUTEST_SINGLE -DCUTEST_64BIT_INTEGER
HSL_PRECIS = s
else
DPREC = -DCUTEST_SINGLE
HSL_PRECIS = s
endif
else
DPREC = -DCUTEST_DOUBLE
ifeq "$(INTEGER)" "64bit"
DPREC = -DCUTEST_DOUBLE -DCUTEST_64BIT_INTEGER
HSL_PRECIS = d
else
DPREC = -DCUTEST_DOUBLE
HSL_PRECIS = d
endif
endif

# compiler flags
Expand Down Expand Up @@ -41,26 +53,38 @@ CRUNFFLAGS = $(OPTIMIZATION) $(CCDEBUG) \
LC = $(OBJ)/libcutest.a
LCS = $(OBJS)/libcutest.a
LCD = $(OBJD)/libcutest.a
LCS64 = $(OBJS64)/libcutest.a
LCD64 = $(OBJD64)/libcutest.a

BLC = $(OBJ)/libcutest_blas.a
BLCS = $(OBJS)/libcutest_blas.a
BLCD = $(OBJD)/libcutest_blas.a
BLCS64 = $(OBJS64)/libcutest_blas.a
BLCD64 = $(OBJD64)/libcutest_blas.a

DLC = $(OBJ)/libcutest_dummy.a
DLCS = $(OBJS)/libcutest_dummy.a
DLCD = $(OBJD)/libcutest_dummy.a
DLCS64 = $(OBJS64)/libcutest_dummy.a
DLCD64 = $(OBJD64)/libcutest_dummy.a

LLC = $(OBJ)/libcutest_lapack.a
LLCS = $(OBJS)/libcutest_lapack.a
LLCD = $(OBJD)/libcutest_lapack.a
LLCS64 = $(OBJS64)/libcutest_lapack.a
LLCD64 = $(OBJD64)/libcutest_lapack.a

MLC = $(OBJ)/libcutest_matlab.a
MLCS = $(OBJS)/libcutest_matlab.a
MLCD = $(OBJD)/libcutest_matlab.a
MLCS64 = $(OBJS64)/libcutest_matlab.a
MLCD64 = $(OBJD64)/libcutest_matlab.a

OLC = $(OBJ)/libcutest_octave.a
OLCS = $(OBJS)/libcutest_octave.a
OLCD = $(OBJD)/libcutest_octave.a
OLCS64 = $(OBJS64)/libcutest_octave.a
OLCD64 = $(OBJD64)/libcutest_octave.a

# Libraries used

Expand Down
Loading

0 comments on commit efbfd8f

Please sign in to comment.