Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
2d0f34fbc0
@ -71,7 +71,7 @@ SET(CPACK_PACKAGE_VENDOR "Guilhem Lavaux")
|
|||||||
SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENCE_CeCILL_V2")
|
SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENCE_CeCILL_V2")
|
||||||
SET(CPACK_PACKAGE_VERSION_MAJOR "1")
|
SET(CPACK_PACKAGE_VERSION_MAJOR "1")
|
||||||
SET(CPACK_PACKAGE_VERSION_MINOR "2")
|
SET(CPACK_PACKAGE_VERSION_MINOR "2")
|
||||||
SET(CPACK_PACKAGE_VERSION_PATCH "2${EXTRA_VERSION}")
|
SET(CPACK_PACKAGE_VERSION_PATCH "3${EXTRA_VERSION}")
|
||||||
SET(CPACK_PACKAGE_INSTALL_DIRECTORY "CosmoToolbox-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}")
|
SET(CPACK_PACKAGE_INSTALL_DIRECTORY "CosmoToolbox-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}")
|
||||||
SET(CPACK_STRIP_FILES "lib/libCosmoTool.so")
|
SET(CPACK_STRIP_FILES "lib/libCosmoTool.so")
|
||||||
SET(CPACK_SOURCE_IGNORE_FILES
|
SET(CPACK_SOURCE_IGNORE_FILES
|
||||||
|
@ -86,6 +86,7 @@ include sample/testSmooth.cpp
|
|||||||
include sample/test_cosmopower.cpp
|
include sample/test_cosmopower.cpp
|
||||||
include sample/test_fft_calls.cpp
|
include sample/test_fft_calls.cpp
|
||||||
include sample/test_healpix_calls.cpp
|
include sample/test_healpix_calls.cpp
|
||||||
|
include sample/test_special.cpp
|
||||||
include sample/testkd.cpp
|
include sample/testkd.cpp
|
||||||
include sample/testkd2.cpp
|
include sample/testkd2.cpp
|
||||||
include sample/testkd3.cpp
|
include sample/testkd3.cpp
|
||||||
@ -167,3 +168,4 @@ include src/tf_fit.hpp
|
|||||||
include src/yorick.hpp
|
include src/yorick.hpp
|
||||||
include src/yorick_nc3.cpp
|
include src/yorick_nc3.cpp
|
||||||
include src/yorick_nc4.cpp
|
include src/yorick_nc4.cpp
|
||||||
|
include src/special_math.hpp
|
||||||
|
@ -1,8 +1,10 @@
|
|||||||
python:
|
python:
|
||||||
- 3.7
|
|
||||||
- 3.8
|
|
||||||
- 3.9
|
- 3.9
|
||||||
|
- 3.8
|
||||||
|
- 3.7
|
||||||
|
|
||||||
numpy:
|
numpy:
|
||||||
- 1.11
|
|
||||||
- 1.19
|
- 1.19
|
||||||
|
|
||||||
|
gsl:
|
||||||
|
- 2.4
|
||||||
|
@ -1,48 +1,50 @@
|
|||||||
package:
|
package:
|
||||||
name: cosmotool
|
name: cosmotool
|
||||||
version: "1.2.2"
|
version: "1.2.3"
|
||||||
|
|
||||||
source:
|
source:
|
||||||
git_rev: 03033b6
|
git_rev: a86c9a8
|
||||||
git_url: https://bitbucket.org/glavaux/cosmotool
|
git_url: https://bitbucket.org/glavaux/cosmotool
|
||||||
|
|
||||||
requirements:
|
requirements:
|
||||||
build:
|
build:
|
||||||
- numpy >=1.11
|
- python # [build_platform != target_platform]
|
||||||
|
- cross-python_{{ target_platform }} # [build_platform != target_platform]
|
||||||
|
- cython # [build_platform != target_platform]
|
||||||
|
- numpy # [build_platform != target_platform]
|
||||||
- {{ compiler('c') }}
|
- {{ compiler('c') }}
|
||||||
- {{ compiler('cxx') }}
|
- {{ compiler('cxx') }}
|
||||||
- python
|
- llvm-openmp # [osx]
|
||||||
- setuptools
|
- libgomp # [linux]
|
||||||
- cython
|
|
||||||
- healpy
|
|
||||||
- numexpr
|
|
||||||
- cffi
|
|
||||||
- pyfftw
|
|
||||||
- gsl
|
|
||||||
- h5py
|
|
||||||
|
|
||||||
host:
|
host:
|
||||||
- python
|
- python
|
||||||
|
- pip
|
||||||
|
- numpy
|
||||||
|
- pkgconfig
|
||||||
- numexpr
|
- numexpr
|
||||||
- cython
|
- cython
|
||||||
- healpy
|
- healpy
|
||||||
- cffi
|
- cffi
|
||||||
- pyfftw
|
- pyfftw
|
||||||
- gsl
|
- gsl {{ gsl }}
|
||||||
- h5py
|
- h5py
|
||||||
|
|
||||||
run:
|
run:
|
||||||
- numpy
|
|
||||||
- python
|
- python
|
||||||
|
- {{ pin_compatible('numpy') }}
|
||||||
- healpy
|
- healpy
|
||||||
- numexpr
|
- numexpr
|
||||||
- cffi
|
- cffi
|
||||||
- pyfftw
|
- pyfftw
|
||||||
- h5py
|
- h5py
|
||||||
|
- {{ pin_compatible('gsl') }}
|
||||||
|
- llvm-openmp
|
||||||
|
|
||||||
test:
|
test:
|
||||||
imports:
|
imports:
|
||||||
- cosmotool
|
- cosmotool
|
||||||
|
requires:
|
||||||
|
- pip
|
||||||
|
|
||||||
about:
|
about:
|
||||||
home: https://bitbucket.org/glavaux/cosmotool
|
home: https://bitbucket.org/glavaux/cosmotool
|
||||||
|
3
external/external_build.cmake
vendored
3
external/external_build.cmake
vendored
@ -8,7 +8,7 @@ SET(GENGETOPT_URL "ftp://ftp.gnu.org/gnu/gengetopt/gengetopt-2.22.5.tar.gz" CACH
|
|||||||
SET(HDF5_URL "https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.8/hdf5-1.8.18/src/hdf5-1.8.18.tar.bz2" CACHE STRING "URL to download HDF5 from")
|
SET(HDF5_URL "https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.8/hdf5-1.8.18/src/hdf5-1.8.18.tar.bz2" CACHE STRING "URL to download HDF5 from")
|
||||||
SET(NETCDF_URL "ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-4.5.0.tar.gz" CACHE STRING "URL to download NetCDF from")
|
SET(NETCDF_URL "ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-4.5.0.tar.gz" CACHE STRING "URL to download NetCDF from")
|
||||||
SET(NETCDFCXX_URL "https://github.com/Unidata/netcdf-cxx4/archive/v4.3.0.tar.gz" CACHE STRING "URL to download NetCDF-C++ from")
|
SET(NETCDFCXX_URL "https://github.com/Unidata/netcdf-cxx4/archive/v4.3.0.tar.gz" CACHE STRING "URL to download NetCDF-C++ from")
|
||||||
SET(BOOST_URL "http://sourceforge.net/projects/boost/files/boost/1.61.0/boost_1_61_0.tar.gz/download" CACHE STRING "URL to download Boost from")
|
SET(BOOST_URL "https://boostorg.jfrog.io/artifactory/main/release/1.74.0/source/boost_1_74_0.tar.bz2" CACHE STRING "URL to download Boost from")
|
||||||
SET(GSL_URL "ftp://ftp.gnu.org/gnu/gsl/gsl-1.15.tar.gz" CACHE STRING "URL to download GSL from ")
|
SET(GSL_URL "ftp://ftp.gnu.org/gnu/gsl/gsl-1.15.tar.gz" CACHE STRING "URL to download GSL from ")
|
||||||
mark_as_advanced(FFTW_URL EIGEN_URL HDF5_URL NETCDF_URL BOOST_URL GSL_URL)
|
mark_as_advanced(FFTW_URL EIGEN_URL HDF5_URL NETCDF_URL BOOST_URL GSL_URL)
|
||||||
|
|
||||||
@ -234,6 +234,7 @@ if (INTERNAL_BOOST)
|
|||||||
ExternalProject_Add(boost
|
ExternalProject_Add(boost
|
||||||
URL ${BOOST_URL}
|
URL ${BOOST_URL}
|
||||||
PREFIX ${BUILD_PREFIX}/boost-prefix
|
PREFIX ${BUILD_PREFIX}/boost-prefix
|
||||||
|
URL_HASH MD5=da07ca30dd1c0d1fdedbd487efee01bd
|
||||||
CONFIGURE_COMMAND
|
CONFIGURE_COMMAND
|
||||||
${BOOST_SOURCE_DIR}/bootstrap.sh --prefix=${CMAKE_BINARY_DIR}/ext_build/boost
|
${BOOST_SOURCE_DIR}/bootstrap.sh --prefix=${CMAKE_BINARY_DIR}/ext_build/boost
|
||||||
BUILD_IN_SOURCE 1
|
BUILD_IN_SOURCE 1
|
||||||
|
57
external/patch-omptl
vendored
57
external/patch-omptl
vendored
@ -1,6 +1,6 @@
|
|||||||
diff -ur omptl.orig/omptl_algorithm omptl/omptl_algorithm
|
diff -ur omptl.old/omptl_algorithm omptl/omptl_algorithm
|
||||||
--- omptl.orig/omptl_algorithm 2017-01-16 14:58:37.996690639 +0100
|
--- omptl.old/omptl_algorithm 2012-04-22 16:29:41.000000000 +0200
|
||||||
+++ omptl/omptl_algorithm 2017-01-16 15:00:26.678641720 +0100
|
+++ omptl/omptl_algorithm 2021-06-20 15:40:29.000000000 +0200
|
||||||
@@ -20,7 +20,7 @@
|
@@ -20,7 +20,7 @@
|
||||||
#define OMPTL_ALGORITHM 1
|
#define OMPTL_ALGORITHM 1
|
||||||
|
|
||||||
@ -22,9 +22,9 @@ diff -ur omptl.orig/omptl_algorithm omptl/omptl_algorithm
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* OMPTL_ALGORITHM */
|
#endif /* OMPTL_ALGORITHM */
|
||||||
diff -ur omptl.orig/omptl_algorithm_par.h omptl/omptl_algorithm_par.h
|
diff -ur omptl.old/omptl_algorithm_par.h omptl/omptl_algorithm_par.h
|
||||||
--- omptl.orig/omptl_algorithm_par.h 2017-01-16 14:58:37.996690639 +0100
|
--- omptl.old/omptl_algorithm_par.h 2012-04-22 16:29:41.000000000 +0200
|
||||||
+++ omptl/omptl_algorithm_par.h 2017-01-16 14:59:57.974126410 +0100
|
+++ omptl/omptl_algorithm_par.h 2021-06-20 15:40:50.000000000 +0200
|
||||||
@@ -21,8 +21,8 @@
|
@@ -21,8 +21,8 @@
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
@ -36,9 +36,18 @@ diff -ur omptl.orig/omptl_algorithm_par.h omptl/omptl_algorithm_par.h
|
|||||||
|
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
|
|
||||||
diff -ur omptl.orig/omptl_numeric omptl/omptl_numeric
|
@@ -1700,7 +1700,7 @@
|
||||||
--- omptl.orig/omptl_numeric 2017-01-16 14:58:37.996690639 +0100
|
|
||||||
+++ omptl/omptl_numeric 2017-01-16 15:00:57.051186974 +0100
|
std::vector<char> pivot_used(pivots.size(), false); // can't be bool due to parallel write
|
||||||
|
|
||||||
|
- const unsigned max_depth = std::floor(std::tr1::log2(P));
|
||||||
|
+ const unsigned max_depth = unsigned(std::floor(std::log2(P)));
|
||||||
|
assert(1u << max_depth <= P);
|
||||||
|
for (unsigned i = 0; i < max_depth; ++i)
|
||||||
|
{
|
||||||
|
diff -ur omptl.old/omptl_numeric omptl/omptl_numeric
|
||||||
|
--- omptl.old/omptl_numeric 2012-04-22 16:29:41.000000000 +0200
|
||||||
|
+++ omptl/omptl_numeric 2021-06-20 15:40:29.000000000 +0200
|
||||||
@@ -19,7 +19,7 @@
|
@@ -19,7 +19,7 @@
|
||||||
#define OMPTL_NUMERIC 1
|
#define OMPTL_NUMERIC 1
|
||||||
|
|
||||||
@ -63,9 +72,9 @@ diff -ur omptl.orig/omptl_numeric omptl/omptl_numeric
|
|||||||
+#include "omptl_numeric_extensions.h"
|
+#include "omptl_numeric_extensions.h"
|
||||||
|
|
||||||
#endif /* OMPTL_NUMERIC */
|
#endif /* OMPTL_NUMERIC */
|
||||||
diff -ur omptl.orig/omptl_numeric_extensions.h omptl/omptl_numeric_extensions.h
|
diff -ur omptl.old/omptl_numeric_extensions.h omptl/omptl_numeric_extensions.h
|
||||||
--- omptl.orig/omptl_numeric_extensions.h 2017-01-16 14:58:37.996690639 +0100
|
--- omptl.old/omptl_numeric_extensions.h 2012-04-22 16:29:41.000000000 +0200
|
||||||
+++ omptl/omptl_numeric_extensions.h 2017-01-16 14:59:21.549472508 +0100
|
+++ omptl/omptl_numeric_extensions.h 2021-06-20 15:40:29.000000000 +0200
|
||||||
@@ -51,9 +51,9 @@
|
@@ -51,9 +51,9 @@
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
@ -78,9 +87,9 @@ diff -ur omptl.orig/omptl_numeric_extensions.h omptl/omptl_numeric_extensions.h
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace omptl
|
namespace omptl
|
||||||
diff -ur omptl.orig/omptl_numeric_par.h omptl/omptl_numeric_par.h
|
diff -ur omptl.old/omptl_numeric_par.h omptl/omptl_numeric_par.h
|
||||||
--- omptl.orig/omptl_numeric_par.h 2017-01-16 14:58:37.996690639 +0100
|
--- omptl.old/omptl_numeric_par.h 2012-04-22 16:29:41.000000000 +0200
|
||||||
+++ omptl/omptl_numeric_par.h 2017-01-16 14:59:36.397739066 +0100
|
+++ omptl/omptl_numeric_par.h 2021-06-20 15:40:29.000000000 +0200
|
||||||
@@ -23,8 +23,8 @@
|
@@ -23,8 +23,8 @@
|
||||||
#include <functional>
|
#include <functional>
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
@ -92,15 +101,15 @@ diff -ur omptl.orig/omptl_numeric_par.h omptl/omptl_numeric_par.h
|
|||||||
|
|
||||||
namespace omptl
|
namespace omptl
|
||||||
{
|
{
|
||||||
diff -ur omptl.orig/omptl_algorithm_par.h omptl/omptl_algorithm_par.h
|
diff -ur omptl.old/omptl_tools.h omptl/omptl_tools.h
|
||||||
--- omptl.orig/omptl_algorithm_par.h 2021-05-09 14:26:47.227632829 +0300
|
--- omptl.old/omptl_tools.h 2012-04-22 16:29:41.000000000 +0200
|
||||||
+++ omptl/omptl_algorithm_par.h 2021-05-09 14:27:02.815744567 +0300
|
+++ omptl/omptl_tools.h 2021-06-20 15:40:42.000000000 +0200
|
||||||
@@ -1700,7 +1700,7 @@
|
@@ -25,7 +25,7 @@
|
||||||
|
#include <climits>
|
||||||
|
#include <iterator>
|
||||||
|
|
||||||
std::vector<char> pivot_used(pivots.size(), false); // can't be bool due to parallel write
|
-#include <tr1/cmath>
|
||||||
|
+#include <cmath>
|
||||||
|
|
||||||
- const unsigned max_depth = std::floor(std::tr1::log2(P));
|
namespace omptl
|
||||||
+ const unsigned max_depth = unsigned(std::floor(std::tr1::log2(P)));
|
|
||||||
assert(1u << max_depth <= P);
|
|
||||||
for (unsigned i = 0; i < max_depth; ++i)
|
|
||||||
{
|
{
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
numpy
|
numpy<1.19
|
||||||
cffi
|
cffi
|
||||||
numexpr
|
numexpr
|
||||||
pyfftw
|
pyfftw
|
||||||
|
16
setup.py
16
setup.py
@ -168,10 +168,16 @@ class BuildCMakeExt(build_ext):
|
|||||||
# Below is just an example set of arguments for building Blender as a Python module
|
# Below is just an example set of arguments for building Blender as a Python module
|
||||||
|
|
||||||
compilers=[]
|
compilers=[]
|
||||||
if "CC" in os.environ:
|
fill_up_settings=[
|
||||||
compilers.append('-DCMAKE_C_COMPILER=' + os.environ["CC"])
|
("CMAKE_C_COMPILER", "CC"),
|
||||||
if "CXX" in os.environ:
|
("CMAKE_CXX_COMPILER", "CXX"),
|
||||||
compilers.append("-DCMAKE_CXX_COMPILER=" + os.environ["CXX"])
|
("CMAKE_C_FLAGS", "CFLAGS"),
|
||||||
|
("CMAKE_EXE_LINKER_FLAGS_INIT", "LDFLAGS"),
|
||||||
|
("CMAKE_SHARED_LINKER_FLAGS_INIT", "LDFLAGS"),
|
||||||
|
("CMAKE_MODULE_LINKER_FLAGS_INIT", "LDFLAGS")]
|
||||||
|
for cmake_flag, os_flag in fill_up_settings:
|
||||||
|
if os_flag in os.environ:
|
||||||
|
compilers.append(f"-D{cmake_flag}={os.environ[os_flag]}")
|
||||||
|
|
||||||
self.spawn(['cmake', '-H'+SOURCE_DIR, '-B'+self.build_temp,
|
self.spawn(['cmake', '-H'+SOURCE_DIR, '-B'+self.build_temp,
|
||||||
'-DENABLE_OPENMP=ON','-DINTERNAL_BOOST=ON','-DINTERNAL_EIGEN=ON',
|
'-DENABLE_OPENMP=ON','-DINTERNAL_BOOST=ON','-DINTERNAL_EIGEN=ON',
|
||||||
@ -223,7 +229,7 @@ class BuildCMakeExt(build_ext):
|
|||||||
CosmoTool_extension = CMakeExtension(name="cosmotool")
|
CosmoTool_extension = CMakeExtension(name="cosmotool")
|
||||||
|
|
||||||
setup(name='cosmotool',
|
setup(name='cosmotool',
|
||||||
version='1.2.2',
|
version='1.2.3',
|
||||||
packages=["cosmotool"],
|
packages=["cosmotool"],
|
||||||
package_dir={'cosmotool': 'python/cosmotool'},
|
package_dir={'cosmotool': 'python/cosmotool'},
|
||||||
install_requires=['numpy','cffi','numexpr','pyfftw','h5py'],
|
install_requires=['numpy','cffi','numexpr','pyfftw','h5py'],
|
||||||
|
@ -38,6 +38,7 @@ if (HDF5_FOUND)
|
|||||||
h5_readFlash.cpp
|
h5_readFlash.cpp
|
||||||
loadFlash.cpp
|
loadFlash.cpp
|
||||||
)
|
)
|
||||||
|
add_dependencies(CosmoHDF5 ${cosmotool_DEPS})
|
||||||
set_property(TARGET CosmoHDF5 PROPERTY POSITION_INDEPENDENT_CODE ${BUILD_SHARED_LIBS})
|
set_property(TARGET CosmoHDF5 PROPERTY POSITION_INDEPENDENT_CODE ${BUILD_SHARED_LIBS})
|
||||||
target_include_directories(CosmoHDF5 BEFORE PRIVATE ${HDF5_INCLUDE_DIR})
|
target_include_directories(CosmoHDF5 BEFORE PRIVATE ${HDF5_INCLUDE_DIR})
|
||||||
else(HDF5_FOUND)
|
else(HDF5_FOUND)
|
||||||
|
@ -426,7 +426,7 @@ namespace CosmoTool {
|
|||||||
#define CTOOL_HDF5_INSERT_ELEMENT(r, STRUCT, element) \
|
#define CTOOL_HDF5_INSERT_ELEMENT(r, STRUCT, element) \
|
||||||
{ \
|
{ \
|
||||||
::CosmoTool::get_hdf5_data_type<BOOST_PP_TUPLE_ELEM(2, 0, element)> t; \
|
::CosmoTool::get_hdf5_data_type<BOOST_PP_TUPLE_ELEM(2, 0, element)> t; \
|
||||||
position = HOFFSET(STRUCT, BOOST_PP_TUPLE_ELEM(2, 1, element)); \
|
long position = HOFFSET(STRUCT, BOOST_PP_TUPLE_ELEM(2, 1, element)); \
|
||||||
const char *field_name = BOOST_PP_STRINGIZE(BOOST_PP_TUPLE_ELEM(2, 1, element)); \
|
const char *field_name = BOOST_PP_STRINGIZE(BOOST_PP_TUPLE_ELEM(2, 1, element)); \
|
||||||
type.insertMember(field_name, position, t.type()); \
|
type.insertMember(field_name, position, t.type()); \
|
||||||
}
|
}
|
||||||
@ -439,7 +439,6 @@ namespace CosmoTool { \
|
|||||||
\
|
\
|
||||||
TNAME() : type(sizeof(STRUCT)) \
|
TNAME() : type(sizeof(STRUCT)) \
|
||||||
{ \
|
{ \
|
||||||
long position; \
|
|
||||||
BOOST_PP_SEQ_FOR_EACH(CTOOL_HDF5_INSERT_ELEMENT, STRUCT, ATTRIBUTES) \
|
BOOST_PP_SEQ_FOR_EACH(CTOOL_HDF5_INSERT_ELEMENT, STRUCT, ATTRIBUTES) \
|
||||||
} \
|
} \
|
||||||
\
|
\
|
||||||
@ -471,7 +470,6 @@ namespace CosmoTool { \
|
|||||||
\
|
\
|
||||||
TNAME() : type(sizeof(STRUCT)) \
|
TNAME() : type(sizeof(STRUCT)) \
|
||||||
{ \
|
{ \
|
||||||
long position; \
|
|
||||||
BOOST_PP_SEQ_FOR_EACH(CTOOL_HDF5_INSERT_ENUM_ELEMENT, STRUCT, ATTRIBUTES) \
|
BOOST_PP_SEQ_FOR_EACH(CTOOL_HDF5_INSERT_ENUM_ELEMENT, STRUCT, ATTRIBUTES) \
|
||||||
} \
|
} \
|
||||||
\
|
\
|
||||||
|
Loading…
Reference in New Issue
Block a user