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) add_subdirectory(fftpack)
endif() 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 # General make flags
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wno-type-limits \ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wno-type-limits \
-Werror=implicit-function-declaration -Wno-unused-parameter \ -Werror=implicit-function-declaration -Wno-unused-parameter \
-Werror=return-type") -Werror=return-type")
@ -99,7 +94,7 @@ else() # Linux compile
# This should become optional later on, and be added to the windows list as # This should become optional later on, and be added to the windows list as
# well. # well.
endif(CMAKE_SYSTEM_NAME STREQUAL "Windows") endif()
set(CYTHON_FLAGS "--fast-fail") set(CYTHON_FLAGS "--fast-fail")
if(LASP_DEBUG) if(LASP_DEBUG)

View File

@ -31,9 +31,9 @@
/* Single / double precision */ /* Single / double precision */
#ifdef LASP_DOUBLE_PRECISION #ifdef LASP_DOUBLE_PRECISION
#define LASP_FLOAT 64 #define LASP_FLOAT_SIZE 64
#else #else
#define LASP_FLOAT 32 #define LASP_FLOAT_SIZE 32
#endif #endif
/* Serial / parallel computation */ /* 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 // To change the whole code to 32-bit floating points, change this to
// float. // float.
#if LASP_FLOAT == 32 #if LASP_FLOAT_SIZE == 32
typedef float d; /* Shortcut for double */ typedef float d; /* Shortcut for double */
#elif LASP_FLOAT == 64 #elif LASP_FLOAT_SIZE == 64
typedef double d; /* Shortcut for double */ typedef double d; /* Shortcut for double */
#else #else
#error LASP_FLOAT should be either 32 or 64 #error LASP_FLOAT_SIZE should be either 32 or 64
#endif #endif
@ -43,7 +43,7 @@ typedef double d; /* Shortcut for double */
#ifdef __cplusplus #ifdef __cplusplus
typedef std::complex<d> c; typedef std::complex<d> c;
#else #else
#if LASP_FLOAT == 32 #if LASP_FLOAT_SIZE == 32
typedef float complex c; typedef float complex c;
#else #else
typedef double complex c; typedef double complex c;

View File

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

View File

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

View File

@ -17,7 +17,7 @@ setup(
author='J.A. de Jong - ASCEE', author='J.A. de Jong - ASCEE',
author_email="j.a.dejong@ascee.nl", author_email="j.a.dejong@ascee.nl",
install_requires=['matplotlib>=1.0', 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', 'dataclasses_json', 'cython',
], ],
license='MIT', license='MIT',