Forgot to add 32-64 bits definitions to include in wrappers.pyx. Now fixed. Removed constrained on h5py version. This might result in new instabilities, but we expect it to be more fixed.

This commit is contained in:
Anne de Jong 2021-10-04 15:53:22 +02:00
parent 81d3779f9f
commit e958b8361a
6 changed files with 12 additions and 17 deletions

View File

@ -57,13 +57,8 @@ elseif(LASP_FFT_BACKEND STREQUAL "FFTPack")
add_subdirectory(fftpack)
endif()
# ##################### END Cmake variables converted to a macro
# set(Python_ADDITIONAL_VERSIONS "3.8")
# set(python_version_windll "38")
# #################### Setting definitions and debug-specific compilation flags
# General make flags
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wno-type-limits \
-Werror=implicit-function-declaration -Wno-unused-parameter \
-Werror=return-type")
@ -99,7 +94,7 @@ else() # Linux compile
# This should become optional later on, and be added to the windows list as
# well.
endif(CMAKE_SYSTEM_NAME STREQUAL "Windows")
endif()
set(CYTHON_FLAGS "--fast-fail")
if(LASP_DEBUG)

View File

@ -31,9 +31,9 @@
/* Single / double precision */
#ifdef LASP_DOUBLE_PRECISION
#define LASP_FLOAT 64
#define LASP_FLOAT_SIZE 64
#else
#define LASP_FLOAT 32
#define LASP_FLOAT_SIZE 32
#endif
/* Serial / parallel computation */

View File

@ -30,12 +30,12 @@ typedef size_t us; /* Size type I always use */
// To change the whole code to 32-bit floating points, change this to
// float.
#if LASP_FLOAT == 32
#if LASP_FLOAT_SIZE == 32
typedef float d; /* Shortcut for double */
#elif LASP_FLOAT == 64
#elif LASP_FLOAT_SIZE == 64
typedef double d; /* Shortcut for double */
#else
#error LASP_FLOAT should be either 32 or 64
#error LASP_FLOAT_SIZE should be either 32 or 64
#endif
@ -43,7 +43,7 @@ typedef double d; /* Shortcut for double */
#ifdef __cplusplus
typedef std::complex<d> c;
#else
#if LASP_FLOAT == 32
#if LASP_FLOAT_SIZE == 32
typedef float complex c;
#else
typedef double complex c;

View File

@ -4,7 +4,7 @@ cimport numpy as cnp
# Do this, our segfaults will be your destination
cnp.import_array()
DEF LASP_FLOAT = "@LASP_FLOAT@"
DEF LASP_DEBUG_CYTHON = "@LASP_DEBUG_CYTHON@"
DEF LASP_DOUBLE_PRECISION = "@LASP_DOUBLE_PRECISION@"
DEF LASP_DEBUG_CYTHON = "@LASP_DEBUG@"
from libcpp cimport bool

View File

@ -8,7 +8,7 @@ from numpy cimport import_array
import_array()
IF LASP_FLOAT == "double":
IF LASP_DOUBLE_PRECISION == "ON":
ctypedef double d
ctypedef double complex c
NUMPY_FLOAT_TYPE = np.float64

View File

@ -17,7 +17,7 @@ setup(
author='J.A. de Jong - ASCEE',
author_email="j.a.dejong@ascee.nl",
install_requires=['matplotlib>=1.0',
'scipy>=1.0', 'numpy>=1.0', 'h5py==3.2.0',
'scipy>=1.0', 'numpy>=1.0', 'h5py',
'dataclasses_json', 'cython',
],
license='MIT',