diff --git a/base/modules/Makefile b/base/modules/Makefile index 20a848d4..6778092b 100644 --- a/base/modules/Makefile +++ b/base/modules/Makefile @@ -124,7 +124,7 @@ FINCLUDES=$(FMFLAG)$(LIBDIR) $(FMFLAG). $(FIFLAG). objs: $(MODULES) $(OBJS) $(MPFOBJS) /bin/cp -p $(CPUPDFLAG) *$(.mod) $(MODDIR) - /bin/cp -p $(CPUPDFLAG) psb_config.h $(INCDIR) + /bin/cp -p $(CPUPDFLAG) psb_config.h psb_types.h $(INCDIR) lib: objs $(LIBDIR)/$(LIBNAME) diff --git a/base/modules/psb_config.h.in b/base/modules/psb_config.h.in index b91f87aa..3bf9a645 100644 --- a/base/modules/psb_config.h.in +++ b/base/modules/psb_config.h.in @@ -1,15 +1,6 @@ #ifndef PSB_CONFIG_H #define PSB_CONFIG_H -#include - -#ifdef __cplusplus -#include -#else -#include -#include -#endif - #define PSB_ERR_ERROR -1 #define PSB_ERR_SUCCESS 0 @@ -35,30 +26,4 @@ - typedef int32_t psb_m_t; - -#if defined(PSB_IPK4) && defined(PSB_LPK4) - typedef int32_t psb_i_t; - typedef int32_t psb_l_t; -#elif defined(PSB_IPK4) && defined(PSB_LPK8) - typedef int32_t psb_i_t; - typedef int64_t psb_l_t; -#elif defined(PSB_IPK8) && defined(PSB_LPK8) - typedef int64_t psb_i_t; - typedef int64_t psb_l_t; -#else -#endif - typedef int64_t psb_e_t; - - typedef float psb_s_t; - typedef double psb_d_t; - -#ifdef __cplusplus - typedef std::complex psb_c_t; - typedef std::complex psb_z_t; -#else - typedef float complex psb_c_t; - typedef double complex psb_z_t; -#endif - #endif diff --git a/base/modules/psb_fakempi.h b/base/modules/psb_fakempi.h index 27973fbd..164f4794 100644 --- a/base/modules/psb_fakempi.h +++ b/base/modules/psb_fakempi.h @@ -1,6 +1,7 @@ #ifndef PSB_FAKEMPI_H #define PSB_FAKEMPI_H #include "psb_config.h" +#include "psb_types.h" #define MPI_INTEGER 1 #define MPI_INTEGER8 2 diff --git a/base/modules/psb_types.h b/base/modules/psb_types.h new file mode 100644 index 00000000..d8495ff9 --- /dev/null +++ b/base/modules/psb_types.h @@ -0,0 +1,38 @@ +#ifndef PSB_TYPES_H +#define PSB_TYPES_H + + +#include + +#ifdef __cplusplus +#include +#else +#include +#include +#endif + typedef int32_t psb_m_t; + +#if defined(PSB_IPK4) && defined(PSB_LPK4) + typedef int32_t psb_i_t; + typedef int32_t psb_l_t; +#elif defined(PSB_IPK4) && defined(PSB_LPK8) + typedef int32_t psb_i_t; + typedef int64_t psb_l_t; +#elif defined(PSB_IPK8) && defined(PSB_LPK8) + typedef int64_t psb_i_t; + typedef int64_t psb_l_t; +#else +#endif + typedef int64_t psb_e_t; + + typedef float psb_s_t; + typedef double psb_d_t; + +#ifdef __cplusplus + typedef std::complex psb_c_t; + typedef std::complex psb_z_t; +#else + typedef float complex psb_c_t; + typedef double complex psb_z_t; +#endif +#endif diff --git a/cbind/base/psb_c_base.h b/cbind/base/psb_c_base.h index 09f7f7dd..601ba8c1 100644 --- a/cbind/base/psb_c_base.h +++ b/cbind/base/psb_c_base.h @@ -14,6 +14,7 @@ extern "C" { #include #include "psb_config.h" +#include "psb_types.h" typedef struct PSB_C_DESCRIPTOR { diff --git a/cuda/cintrf.h b/cuda/cintrf.h index 4f1cb015..c9b70ce3 100644 --- a/cuda/cintrf.h +++ b/cuda/cintrf.h @@ -36,6 +36,7 @@ #include #include #include "psb_config.h" +#include "psb_types.h" #include "core.h" #define ELL_PITCH_ALIGN_S 32 diff --git a/cuda/spgpu/core.h b/cuda/spgpu/core.h index 4ba85fd9..35d5849d 100644 --- a/cuda/spgpu/core.h +++ b/cuda/spgpu/core.h @@ -47,6 +47,7 @@ */ #include "psb_config.h" +#include "psb_types.h" #include "driver_types.h" #include "cuComplex.h" diff --git a/test/pargen/runs/ppde.inp b/test/pargen/runs/ppde.inp index ae8bfe8f..d28af007 100644 --- a/test/pargen/runs/ppde.inp +++ b/test/pargen/runs/ppde.inp @@ -2,7 +2,7 @@ BICGSTAB Iterative method BICGSTAB CGS BICG BICGSTABL RGMRES FCG CGR RICHARDSON BJAC Preconditioner NONE DIAG BJAC CSR Storage format for matrix A: CSR COO -200 Domain size (acutal system is this**3 (pde3d) or **2 (pde2d) ) +100 Domain size (acutal system is this**3 (pde3d) or **2 (pde2d) ) 3 Partition: 1 BLOCK 3 3D 2 Stopping criterion 1 2 0200 MAXIT diff --git a/util/psb_amd_order.c b/util/psb_amd_order.c index 5c2f1a18..13130396 100644 --- a/util/psb_amd_order.c +++ b/util/psb_amd_order.c @@ -30,6 +30,7 @@ */ #include "psb_config.h" +#include "psb_types.h" #ifdef PSB_HAVE_AMD #include "amd.h" #endif diff --git a/util/psb_metis_int.h.in b/util/psb_metis_int.h.in index c13ffd2c..873fd3c9 100644 --- a/util/psb_metis_int.h.in +++ b/util/psb_metis_int.h.in @@ -1,6 +1,7 @@ #include #include #include "psb_config.h" +#include "psb_types.h" #if defined(PSB_HAVE_METIS) #include "@METISINCFILE@" #endif