From 84a1d3bf4792717ed985c2290c7a9e37e8b860a4 Mon Sep 17 00:00:00 2001 From: LAVAUX Guilhem Date: Mon, 26 Oct 2020 08:49:12 +0100 Subject: [PATCH 01/89] Add omp parallelization for bessel function --- .gitignore | 5 +++++ CMakeLists.txt | 4 ++-- python/_cosmomath.pyx | 9 ++++++++- setup.py | 2 +- 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 9e4c862..a33a7a3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,9 @@ *~ +.eggs/ +dist/ +wheelhouse/ +cosmotool.egg-info/ +build/ *.o *.prog *.pyc diff --git a/CMakeLists.txt b/CMakeLists.txt index 565a80e..ca6f9ca 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -70,8 +70,8 @@ SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "A toolbox for impatient cosmologists") SET(CPACK_PACKAGE_VENDOR "Guilhem Lavaux") SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENCE_CeCILL_V2") SET(CPACK_PACKAGE_VERSION_MAJOR "1") -SET(CPACK_PACKAGE_VERSION_MINOR "0") -SET(CPACK_PACKAGE_VERSION_PATCH "0${EXTRA_VERSION}") +SET(CPACK_PACKAGE_VERSION_MINOR "1") +SET(CPACK_PACKAGE_VERSION_PATCH "1${EXTRA_VERSION}") SET(CPACK_PACKAGE_INSTALL_DIRECTORY "CosmoToolbox-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}") SET(CPACK_STRIP_FILES "lib/libCosmoTool.so") SET(CPACK_SOURCE_IGNORE_FILES diff --git a/python/_cosmomath.pyx b/python/_cosmomath.pyx index 4b2b21f..0aa5fd4 100644 --- a/python/_cosmomath.pyx +++ b/python/_cosmomath.pyx @@ -1,3 +1,4 @@ +#cython: language_level=3 import numpy as np cimport numpy as np @@ -7,15 +8,21 @@ np.import_ufunc() cdef extern from "sys/types.h": ctypedef np.int64_t int64_t +cdef extern from "numpy/npy_common.h": + ctypedef npy_intp + cdef extern from "special_math.hpp" namespace "CosmoTool": T log_modified_bessel_first_kind[T](T v, T z) nogil except + +cdef extern from "numpy_adaptor.hpp" namespace "CosmoTool": + void parallel_ufunc_dd_d[T,IT](char **args, IT* dimensions, IT* steps, void *func) + cdef np.PyUFuncGenericFunction loop_func[1] cdef char input_output_types[3] cdef void *elementwise_funcs[1] -loop_func[0] = np.PyUFunc_dd_d +loop_func[0] = parallel_ufunc_dd_d[double,npy_intp] input_output_types[0] = np.NPY_DOUBLE input_output_types[1] = np.NPY_DOUBLE diff --git a/setup.py b/setup.py index 08d94d9..04e9df0 100644 --- a/setup.py +++ b/setup.py @@ -218,7 +218,7 @@ class BuildCMakeExt(build_ext): CosmoTool_extension = CMakeExtension(name="cosmotool") setup(name='cosmotool', - version='1.1.0', + version='1.1.1', packages=["cosmotool"], package_dir={'cosmotool': 'python/cosmotool'}, install_requires=['numpy','cffi','numexpr','pyfftw','h5py'], From 3f7da964ee025f6c4838d190997442cf30a1a797 Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Mon, 26 Oct 2020 11:40:44 +0100 Subject: [PATCH 02/89] Add adaptor --- src/numpy_adaptors.hpp | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 src/numpy_adaptors.hpp diff --git a/src/numpy_adaptors.hpp b/src/numpy_adaptors.hpp new file mode 100644 index 0000000..fe3962c --- /dev/null +++ b/src/numpy_adaptors.hpp @@ -0,0 +1,30 @@ +#ifndef __COSMOTOOL_NUMPY_ADAPTOR_HPP +#define __COSMOTOOL_NUMPY_ADAPTOR_HPP + +namespace CosmoTool { + + template + void parallel_ufunc_dd_d(char **args, IT* dimensions, IT* steps, void *func) { + IT i; + IT n = dimensions[0]; + char *in = args[0], *in2 = args[1], *out = args[2]; + IT in_step = steps[0], in2_step = args[1], out_step = steps[2]; + + double tmp; + typedef double (*F_t)(double,double); + + F_t f = (F_t)func; + +#pragma omp parallel for schedule(static) + for (i = 0; i < n; i++) { + T *out_t = (T *)(out + i * out_step); + T *in_t = (T *)(in + i * in_step); + T *in2_t = (T *)(in2 + i * in2_step); + *out_t = f(*in_t, *in2_t); + } + } + + +} + +#endif From 5e6d69f017c331a0982df2de2448e3babebad201 Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Mon, 26 Oct 2020 12:00:50 +0100 Subject: [PATCH 03/89] Fixed missing files --- python/_cosmomath.pyx | 2 +- src/numpy_adaptors.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/python/_cosmomath.pyx b/python/_cosmomath.pyx index 0aa5fd4..e5ab880 100644 --- a/python/_cosmomath.pyx +++ b/python/_cosmomath.pyx @@ -14,7 +14,7 @@ cdef extern from "numpy/npy_common.h": cdef extern from "special_math.hpp" namespace "CosmoTool": T log_modified_bessel_first_kind[T](T v, T z) nogil except + -cdef extern from "numpy_adaptor.hpp" namespace "CosmoTool": +cdef extern from "numpy_adaptors.hpp" namespace "CosmoTool": void parallel_ufunc_dd_d[T,IT](char **args, IT* dimensions, IT* steps, void *func) diff --git a/src/numpy_adaptors.hpp b/src/numpy_adaptors.hpp index fe3962c..196206b 100644 --- a/src/numpy_adaptors.hpp +++ b/src/numpy_adaptors.hpp @@ -8,7 +8,7 @@ namespace CosmoTool { IT i; IT n = dimensions[0]; char *in = args[0], *in2 = args[1], *out = args[2]; - IT in_step = steps[0], in2_step = args[1], out_step = steps[2]; + IT in_step = steps[0], in2_step = steps[1], out_step = steps[2]; double tmp; typedef double (*F_t)(double,double); From 75de5fb4d90826fe4b6b739366791f6e88b74b2f Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Mon, 26 Oct 2020 13:58:07 +0100 Subject: [PATCH 04/89] Add Py3.9 --- builder/build-wheels.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builder/build-wheels.sh b/builder/build-wheels.sh index 1e310aa..90f87a9 100755 --- a/builder/build-wheels.sh +++ b/builder/build-wheels.sh @@ -13,7 +13,7 @@ yum install -y cmake3 gsl-devel zlib-devel ln -fs /usr/bin/cmake3 /usr/bin/cmake -ALL_PYTHON="cp36-cp36m cp37-cp37m cp38-cp38" +ALL_PYTHON="cp36-cp36m cp37-cp37m cp38-cp38 cp39-cp39" # Compile wheels for pkg in $ALL_PYTHON; do From 9b148414b67e748dab49d667c53f2e359e4f0f0f Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Wed, 11 Nov 2020 10:46:27 +0100 Subject: [PATCH 05/89] Fixup --- python/_cosmo_power.pyx | 2 +- src/fortran.cpp | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/python/_cosmo_power.pyx b/python/_cosmo_power.pyx index 2d01e72..bf4bd4b 100644 --- a/python/_cosmo_power.pyx +++ b/python/_cosmo_power.pyx @@ -81,7 +81,7 @@ cdef class CosmologyPower: if 'ns' in cosmo: self.power.n = cosmo['ns'] if 'T27' in cosmo: - self.power.THETA_27 = cosmo['T27'] + self.power.Theta_27 = cosmo['T27'] assert self.power.OMEGA_C > 0 diff --git a/src/fortran.cpp b/src/fortran.cpp index 83e9730..376d62d 100644 --- a/src/fortran.cpp +++ b/src/fortran.cpp @@ -143,10 +143,16 @@ void UnformattedRead::endCheckpoint(bool autodrop) delete[] recordBuffer; recordBuffer = 0; } + if (cSize == Check_32bits) { + if (checkPointAccum >= 1<<32UL) { + always_fail = true; + checkPointAccum %= (1<<32UL); + } + } if (checkPointRef != checkPointAccum) { - if (!autodrop || checkPointAccum > checkPointRef) { + if (always_fail || !autodrop || checkPointAccum > checkPointRef) { throw InvalidUnformattedAccess(); } f->seekg(checkPointRef-checkPointAccum, ios::cur); From 014f7f9564fbaac6f6a280fdac91782de31742ef Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Wed, 11 Nov 2020 10:48:40 +0100 Subject: [PATCH 06/89] Bump version --- CMakeLists.txt | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ca6f9ca..8c64358 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -71,7 +71,7 @@ SET(CPACK_PACKAGE_VENDOR "Guilhem Lavaux") SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENCE_CeCILL_V2") SET(CPACK_PACKAGE_VERSION_MAJOR "1") SET(CPACK_PACKAGE_VERSION_MINOR "1") -SET(CPACK_PACKAGE_VERSION_PATCH "1${EXTRA_VERSION}") +SET(CPACK_PACKAGE_VERSION_PATCH "2${EXTRA_VERSION}") SET(CPACK_PACKAGE_INSTALL_DIRECTORY "CosmoToolbox-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}") SET(CPACK_STRIP_FILES "lib/libCosmoTool.so") SET(CPACK_SOURCE_IGNORE_FILES diff --git a/setup.py b/setup.py index 04e9df0..6975776 100644 --- a/setup.py +++ b/setup.py @@ -218,7 +218,7 @@ class BuildCMakeExt(build_ext): CosmoTool_extension = CMakeExtension(name="cosmotool") setup(name='cosmotool', - version='1.1.1', + version='1.1.2', packages=["cosmotool"], package_dir={'cosmotool': 'python/cosmotool'}, install_requires=['numpy','cffi','numexpr','pyfftw','h5py'], From 7e436bb0e729106368b8fe58423f0fa649773835 Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Fri, 13 Nov 2020 13:32:06 +0100 Subject: [PATCH 07/89] Add missing declaration --- src/fortran.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/fortran.cpp b/src/fortran.cpp index 376d62d..d831dc5 100644 --- a/src/fortran.cpp +++ b/src/fortran.cpp @@ -139,6 +139,8 @@ void UnformattedRead::beginCheckpoint(bool bufferRecord) void UnformattedRead::endCheckpoint(bool autodrop) { + bool always_fail = false; + if (recordBuffer != 0) { delete[] recordBuffer; recordBuffer = 0; From cb9e97e2c1d634d90b13758bdd03369df7d19505 Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Sun, 24 Jan 2021 09:31:01 +0100 Subject: [PATCH 08/89] Fixes --- python/_cosmotool.pyx | 2 +- src/fortran.cpp | 6 ++++-- src/loadGadget.cpp | 10 +++++----- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/python/_cosmotool.pyx b/python/_cosmotool.pyx index ed9195e..3bfc88c 100644 --- a/python/_cosmotool.pyx +++ b/python/_cosmotool.pyx @@ -410,7 +410,7 @@ def loadGadget(str filename, int snapshot_id, int gadgetFormat = 1, bool loadPos with nogil: data = loadGadgetMulti(filename_bs, snapshot_id, flags, gadgetFormat) if data == 0: - return None + raise RuntimeError("File could not be read") return PySimulationAdaptor(wrap_simudata(data, flags)) diff --git a/src/fortran.cpp b/src/fortran.cpp index 376d62d..967b19a 100644 --- a/src/fortran.cpp +++ b/src/fortran.cpp @@ -139,14 +139,16 @@ void UnformattedRead::beginCheckpoint(bool bufferRecord) void UnformattedRead::endCheckpoint(bool autodrop) { + bool always_fail = false; + if (recordBuffer != 0) { delete[] recordBuffer; recordBuffer = 0; } if (cSize == Check_32bits) { - if (checkPointAccum >= 1<<32UL) { + if (checkPointAccum >= 1UL<<32UL) { always_fail = true; - checkPointAccum %= (1<<32UL); + checkPointAccum %= (1UL<<32UL); } } diff --git a/src/loadGadget.cpp b/src/loadGadget.cpp index 0a5a0f0..3969ec2 100644 --- a/src/loadGadget.cpp +++ b/src/loadGadget.cpp @@ -221,7 +221,7 @@ SimuData *CosmoTool::loadGadgetMulti(const char *fname, int id, cerr << "Invalid format while reading header" << endl; delete data; delete f; - return 0; + throw; } @@ -275,7 +275,7 @@ SimuData *CosmoTool::loadGadgetMulti(const char *fname, int id, cerr << "Invalid format while reading positions" << endl; delete f; delete data; - return 0; + throw; } } else { @@ -292,7 +292,7 @@ SimuData *CosmoTool::loadGadgetMulti(const char *fname, int id, { delete f; delete data; - return 0; + throw; } } @@ -317,7 +317,7 @@ SimuData *CosmoTool::loadGadgetMulti(const char *fname, int id, cerr << "Invalid format while reading velocities" << endl; delete f; delete data; - return 0; + throw; } // THE VELOCITIES ARE IN PHYSICAL COORDINATES @@ -367,7 +367,7 @@ SimuData *CosmoTool::loadGadgetMulti(const char *fname, int id, cerr << "Invalid unformatted access while reading ID" << endl; delete f; delete data; - return 0; + throw; } } else { f->skip(2*4); From 793c649a8dfe3735f9ff0e1452c6607d7ac0ddc6 Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Sun, 24 Jan 2021 09:40:58 +0100 Subject: [PATCH 09/89] Fixes for compiler detection in setup.py --- CMakeLists.txt | 4 ++-- setup.py | 11 ++++++++--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8c64358..e7bc520 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -70,8 +70,8 @@ SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "A toolbox for impatient cosmologists") SET(CPACK_PACKAGE_VENDOR "Guilhem Lavaux") SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENCE_CeCILL_V2") SET(CPACK_PACKAGE_VERSION_MAJOR "1") -SET(CPACK_PACKAGE_VERSION_MINOR "1") -SET(CPACK_PACKAGE_VERSION_PATCH "2${EXTRA_VERSION}") +SET(CPACK_PACKAGE_VERSION_MINOR "2") +SET(CPACK_PACKAGE_VERSION_PATCH "0${EXTRA_VERSION}") SET(CPACK_PACKAGE_INSTALL_DIRECTORY "CosmoToolbox-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}") SET(CPACK_STRIP_FILES "lib/libCosmoTool.so") SET(CPACK_SOURCE_IGNORE_FILES diff --git a/setup.py b/setup.py index 6975776..95542a8 100644 --- a/setup.py +++ b/setup.py @@ -167,15 +167,20 @@ class BuildCMakeExt(build_ext): # Change your cmake arguments below as necessary # Below is just an example set of arguments for building Blender as a Python module + compilers=[] + if "CC" in os.environ: + compilers.append('-DCMAKE_C_COMPILER=' + os.environ["CC"]) + if "CXX" in os.environ: + compilers.append("-DCMAKE_CXX_COMPILER=" + os.environ["CXX"]) + self.spawn(['cmake', '-H'+SOURCE_DIR, '-B'+self.build_temp, - '-DCMAKE_C_COMPILER=' + os.environ["CC"], "-DCMAKE_CXX_COMPILER=" + os.environ["CXX"], '-DENABLE_OPENMP=ON','-DINTERNAL_BOOST=ON','-DINTERNAL_EIGEN=ON', '-DINTERNAL_HDF5=ON','-DINTERNAL_NETCDF=ON', '-DBUILD_PYTHON=ON', '-DINSTALL_PYTHON_LOCAL=OFF', '-DCOSMOTOOL_PYTHON_PACKAGING=ON', f"-DCYTHON={cython_code}", f"-DPYTHON_SITE_PACKAGES={build_dir.absolute()}/private_install", - f"-DPYTHON_EXECUTABLE={sys.executable}"]) + f"-DPYTHON_EXECUTABLE={sys.executable}"] + compilers) self.announce("Building binaries", level=3) @@ -218,7 +223,7 @@ class BuildCMakeExt(build_ext): CosmoTool_extension = CMakeExtension(name="cosmotool") setup(name='cosmotool', - version='1.1.2', + version='1.2.0', packages=["cosmotool"], package_dir={'cosmotool': 'python/cosmotool'}, install_requires=['numpy','cffi','numexpr','pyfftw','h5py'], From 041cfc0630c84cf02ea16e0e7a5f4c96c77378ff Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Mon, 25 Jan 2021 09:50:48 +0100 Subject: [PATCH 10/89] Symbols protection --- builder/build-wheels.sh | 13 +++++++------ python/CMakeLists.txt | 4 ++++ python/cosmotool.version | 7 +++++++ 3 files changed, 18 insertions(+), 6 deletions(-) create mode 100644 python/cosmotool.version diff --git a/builder/build-wheels.sh b/builder/build-wheels.sh index 90f87a9..ac343fe 100755 --- a/builder/build-wheels.sh +++ b/builder/build-wheels.sh @@ -8,7 +8,7 @@ export CC CXX # Install a system package required by our library #yum install -y atlas-devel -yum install -y cmake3 gsl-devel zlib-devel +yum install -y cmake3 gsl-devel zlib-devel fftw3-devel ln -fs /usr/bin/cmake3 /usr/bin/cmake @@ -19,17 +19,18 @@ ALL_PYTHON="cp36-cp36m cp37-cp37m cp38-cp38 cp39-cp39" for pkg in $ALL_PYTHON; do PYBIN=/opt/python/${pkg}/bin # "${PYBIN}/pip" install -r /io/dev-requirements.txt + "${PYBIN}/pip" install setuptools wheel Cython "${PYBIN}/pip" install -r /io/requirements.txt "${PYBIN}/pip" wheel -vvv /io/ -w wheelhouse/ done # Bundle external shared libraries into the wheels -for whl in wheelhouse/*.whl; do +for whl in wheelhouse/cosmotool*.whl; do auditwheel repair "$whl" --plat $PLAT -w /io/wheelhouse/ done # Install packages and test -for pkg in $ALL_PYTHON; do - PYBIN=/opt/python/${pkg}/bin - "${PYBIN}/pip" install cosmotool --no-index -f /io/wheelhouse -done +#for pkg in $ALL_PYTHON; do +# PYBIN=/opt/python/${pkg}/bin +# "${PYBIN}/pip" install cosmotool --no-index -f /io/wheelhouse +#done diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index e2ea884..db4bc17 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -54,6 +54,10 @@ SET(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Bsymbolic-functions if(APPLE) set(CMAKE_MODULE_LINKER_FLAGS "-undefined dynamic_lookup") endif() +IF(NOT APPLE) + set(CMAKE_MODULE_LINKER_FLAGS "-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/cosmotool.version") +ENDIF() + target_link_libraries(_cosmotool PRIVATE ${CosmoTool_local} ${GSL_LIBRARIES}) target_link_libraries(_cosmo_power PRIVATE ${CosmoTool_local} ${GSL_LIBRARIES}) diff --git a/python/cosmotool.version b/python/cosmotool.version new file mode 100644 index 0000000..fb25144 --- /dev/null +++ b/python/cosmotool.version @@ -0,0 +1,7 @@ +CODEABI_1.0 { + global: + PyInit_*; + _init; + _fini; + local: *; +}; From 52f870e0c196b6050e2c92bf1f50d562df5379aa Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Mon, 25 Jan 2021 09:51:18 +0100 Subject: [PATCH 11/89] Bump version --- CMakeLists.txt | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e7bc520..6225de6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -71,7 +71,7 @@ SET(CPACK_PACKAGE_VENDOR "Guilhem Lavaux") SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENCE_CeCILL_V2") SET(CPACK_PACKAGE_VERSION_MAJOR "1") SET(CPACK_PACKAGE_VERSION_MINOR "2") -SET(CPACK_PACKAGE_VERSION_PATCH "0${EXTRA_VERSION}") +SET(CPACK_PACKAGE_VERSION_PATCH "1${EXTRA_VERSION}") SET(CPACK_PACKAGE_INSTALL_DIRECTORY "CosmoToolbox-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}") SET(CPACK_STRIP_FILES "lib/libCosmoTool.so") SET(CPACK_SOURCE_IGNORE_FILES diff --git a/setup.py b/setup.py index 95542a8..2a5e548 100644 --- a/setup.py +++ b/setup.py @@ -223,7 +223,7 @@ class BuildCMakeExt(build_ext): CosmoTool_extension = CMakeExtension(name="cosmotool") setup(name='cosmotool', - version='1.2.0', + version='1.2.1', packages=["cosmotool"], package_dir={'cosmotool': 'python/cosmotool'}, install_requires=['numpy','cffi','numexpr','pyfftw','h5py'], From e6950440a32293f0191903356fb00f5a5d0de53e Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Mon, 8 Feb 2021 18:36:56 +0100 Subject: [PATCH 12/89] Remove generation of dump of power spectrum --- src/cosmopower.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/cosmopower.cpp b/src/cosmopower.cpp index 3278876..5e58c2c 100644 --- a/src/cosmopower.cpp +++ b/src/cosmopower.cpp @@ -342,12 +342,14 @@ void CosmoPower::normalize(double k_min, double k_max) normPower = 1; +#if 0 ofstream ff("PP_k.txt"); for (int i = 0; i < 100; i++) { double k = pow(10.0, 8.0*i/100.-4); ff << k << " " << power(k) << endl; } +#endif // gsl_integration_qagiu(&f, 0, 0, TOLERANCE, NUM_ITERATION, w, &normVal, &abserr); gsl_integration_qag(&f, x_min, x_max, 0, TOLERANCE, NUM_ITERATION, GSL_INTEG_GAUSS61, w, &normVal, &abserr); From 3e013139f2c710f2e6c89644db5d65dfca1f9fea Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Thu, 22 Apr 2021 08:27:18 +0200 Subject: [PATCH 13/89] Reformat and add 1d support --- src/fourier/fft/fftw_calls.hpp | 176 ++++++++++++----------- src/fourier/fft/fftw_calls_mpi.hpp | 219 ++++++++++++++++------------- 2 files changed, 218 insertions(+), 177 deletions(-) diff --git a/src/fourier/fft/fftw_calls.hpp b/src/fourier/fft/fftw_calls.hpp index a5ef225..5ffefcc 100644 --- a/src/fourier/fft/fftw_calls.hpp +++ b/src/fourier/fft/fftw_calls.hpp @@ -39,91 +39,107 @@ knowledge of the CeCILL license and that you accept its terms. #include #include -namespace CosmoTool -{ +namespace CosmoTool { -static inline void init_fftw_wisdom() -{ - fftw_import_system_wisdom(); - fftw_import_wisdom_from_filename("fft_wisdom"); -} + static inline void init_fftw_wisdom() { + fftw_import_system_wisdom(); + fftw_import_wisdom_from_filename("fft_wisdom"); + } -static inline void save_fftw_wisdom() -{ - fftw_export_wisdom_to_filename("fft_wisdom"); -} + static inline void save_fftw_wisdom() { + fftw_export_wisdom_to_filename("fft_wisdom"); + } -template class FFTW_Calls {}; + template + class FFTW_Calls {}; +#define FFTW_CALLS_BASE(rtype, prefix) \ + template <> \ + class FFTW_Calls { \ + public: \ + typedef rtype real_type; \ + typedef prefix##_complex complex_type; \ + typedef prefix##_plan plan_type; \ + \ + static complex_type *alloc_complex(size_t N) { \ + return prefix##_alloc_complex(N); \ + } \ + static real_type *alloc_real(size_t N) { return prefix##_alloc_real(N); } \ + static void free(void *p) { fftw_free(p); } \ + \ + static void execute(plan_type p) { prefix##_execute(p); } \ + static void execute_r2c(plan_type p, real_type *in, complex_type *out) { \ + prefix##_execute_dft_r2c(p, in, out); \ + } \ + static void execute_c2r(plan_type p, complex_type *in, real_type *out) { \ + prefix##_execute_dft_c2r(p, in, out); \ + } \ + static void \ + execute_r2c(plan_type p, real_type *in, std::complex *out) { \ + prefix##_execute_dft_r2c(p, in, (complex_type *)out); \ + } \ + static void \ + execute_c2r(plan_type p, std::complex *in, real_type *out) { \ + prefix##_execute_dft_c2r(p, (complex_type *)in, out); \ + } \ + static void execute_c2c( \ + plan_type p, std::complex *in, \ + std::complex *out) { \ + prefix##_execute_dft(p, (complex_type *)in, (complex_type *)out); \ + } \ + static plan_type plan_dft_r2c_1d( \ + int Nx, real_type *in, complex_type *out, unsigned flags) { \ + return prefix##_plan_dft_r2c_1d(Nx, in, out, flags); \ + } \ + static plan_type plan_dft_c2r_1d( \ + int Nx, complex_type *in, real_type *out, unsigned flags) { \ + return prefix##_plan_dft_c2r_1d(Nx, in, out, flags); \ + } \ + static plan_type plan_dft_r2c_2d( \ + int Nx, int Ny, real_type *in, complex_type *out, unsigned flags) { \ + return prefix##_plan_dft_r2c_2d(Nx, Ny, in, out, flags); \ + } \ + static plan_type plan_dft_c2r_2d( \ + int Nx, int Ny, complex_type *in, real_type *out, unsigned flags) { \ + return prefix##_plan_dft_c2r_2d(Nx, Ny, in, out, flags); \ + } \ + static plan_type plan_dft_r2c_3d( \ + int Nx, int Ny, int Nz, real_type *in, complex_type *out, \ + unsigned flags) { \ + return prefix##_plan_dft_r2c_3d(Nx, Ny, Nz, in, out, flags); \ + } \ + static plan_type plan_dft_c2r_3d( \ + int Nx, int Ny, int Nz, complex_type *in, real_type *out, \ + unsigned flags) { \ + return prefix##_plan_dft_c2r_3d(Nx, Ny, Nz, in, out, flags); \ + } \ + \ + static plan_type plan_dft_r2c( \ + int rank, const int *n, real_type *in, complex_type *out, \ + unsigned flags) { \ + return prefix##_plan_dft_r2c(rank, n, in, out, flags); \ + } \ + static plan_type plan_dft_c2r( \ + int rank, const int *n, complex_type *in, real_type *out, \ + unsigned flags) { \ + return prefix##_plan_dft_c2r(rank, n, in, out, flags); \ + } \ + static plan_type plan_dft_3d( \ + int Nx, int Ny, int Nz, complex_type *in, complex_type *out, int sign, \ + unsigned flags) { \ + return prefix##_plan_dft_3d(Nx, Ny, Nz, in, out, sign, flags); \ + } \ + static plan_type plan_dft_2d( \ + int Nx, int Ny, complex_type *in, complex_type *out, int sign, \ + unsigned flags) { \ + return prefix##_plan_dft_2d(Nx, Ny, in, out, sign, flags); \ + } \ + static void destroy_plan(plan_type plan) { prefix##_destroy_plan(plan); } \ + } -#define FFTW_CALLS_BASE(rtype, prefix) \ - template<> \ -class FFTW_Calls { \ -public: \ - typedef rtype real_type; \ - typedef prefix ## _complex complex_type; \ - typedef prefix ## _plan plan_type; \ - \ - static complex_type *alloc_complex(size_t N) { return prefix ## _alloc_complex(N); } \ - static real_type *alloc_real(size_t N) { return prefix ## _alloc_real(N); } \ - static void free(void *p) { fftw_free(p); } \ -\ - static void execute(plan_type p) { prefix ## _execute(p); } \ - static void execute_r2c(plan_type p, real_type *in, complex_type *out) { prefix ## _execute_dft_r2c(p, in, out); } \ - static void execute_c2r(plan_type p, complex_type *in, real_type *out) { prefix ## _execute_dft_c2r(p, in, out); } \ - static void execute_r2c(plan_type p, real_type *in, std::complex *out) { prefix ## _execute_dft_r2c(p, in, (complex_type*)out); } \ - static void execute_c2r(plan_type p, std::complex *in, real_type *out) { prefix ## _execute_dft_c2r(p, (complex_type*) in, out); } \ - static void execute_c2c(plan_type p, std::complex *in, std::complex *out) { prefix ## _execute_dft(p, (complex_type *)in, (complex_type*)out); } \ - static plan_type plan_dft_r2c_2d(int Nx, int Ny, \ - real_type *in, complex_type *out, \ - unsigned flags) \ - { \ - return prefix ## _plan_dft_r2c_2d(Nx, Ny, in, out, \ - flags); \ - } \ - static plan_type plan_dft_c2r_2d(int Nx, int Ny, \ - complex_type *in, real_type *out, \ - unsigned flags) \ - { \ - return prefix ## _plan_dft_c2r_2d(Nx, Ny, in, out, \ - flags); \ - } \ - static plan_type plan_dft_r2c_3d(int Nx, int Ny, int Nz, \ - real_type *in, complex_type *out, \ - unsigned flags) \ - { \ - return prefix ## _plan_dft_r2c_3d(Nx, Ny, Nz, in, out, flags); \ - } \ - static plan_type plan_dft_c2r_3d(int Nx, int Ny, int Nz, \ - complex_type *in, real_type *out, \ - unsigned flags) \ - { \ - return prefix ## _plan_dft_c2r_3d(Nx, Ny, Nz, in, out, flags); \ - } \ -\ - static plan_type plan_dft_r2c(int rank, const int *n, real_type *in, \ - complex_type *out, unsigned flags) \ - { \ - return prefix ## _plan_dft_r2c(rank, n, in, out, flags); \ - } \ - static plan_type plan_dft_c2r(int rank, const int *n, complex_type *in, \ - real_type *out, unsigned flags) \ - { \ - return prefix ## _plan_dft_c2r(rank, n, in, out, flags); \ - } \ - static plan_type plan_dft_3d(int Nx, int Ny, int Nz, complex_type *in, complex_type *out, int sign, unsigned flags) { \ - return prefix ## _plan_dft_3d(Nx, Ny, Nz, in, out, sign, flags); \ - } \ - static plan_type plan_dft_2d(int Nx, int Ny, complex_type *in, complex_type *out, int sign, unsigned flags) { \ - return prefix ## _plan_dft_2d(Nx, Ny, in, out, sign, flags); \ - } \ - static void destroy_plan(plan_type plan) { prefix ## _destroy_plan(plan); } \ -} - - -FFTW_CALLS_BASE(double, fftw); -FFTW_CALLS_BASE(float, fftwf); + FFTW_CALLS_BASE(double, fftw); + FFTW_CALLS_BASE(float, fftwf); #undef FFTW_CALLS_BASE -}; +}; // namespace CosmoTool #endif diff --git a/src/fourier/fft/fftw_calls_mpi.hpp b/src/fourier/fft/fftw_calls_mpi.hpp index b592220..160a604 100644 --- a/src/fourier/fft/fftw_calls_mpi.hpp +++ b/src/fourier/fft/fftw_calls_mpi.hpp @@ -5,110 +5,135 @@ #include #include -namespace CosmoTool -{ +namespace CosmoTool { -static inline void init_fftw_mpi() -{ - fftw_mpi_init(); -} + static inline void init_fftw_mpi() { fftw_mpi_init(); } -static inline void done_fftw_mpi() -{ - fftw_mpi_cleanup(); -} + static inline void done_fftw_mpi() { fftw_mpi_cleanup(); } -template class FFTW_MPI_Calls {}; + template + class FFTW_MPI_Calls {}; +#define FFTW_MPI_CALLS_BASE(rtype, prefix) \ + template <> \ + class FFTW_MPI_Calls { \ + public: \ + typedef rtype real_type; \ + typedef prefix##_complex complex_type; \ + typedef prefix##_plan plan_type; \ + \ + static complex_type *alloc_complex(size_t N) { \ + return prefix##_alloc_complex(N); \ + } \ + static real_type *alloc_real(size_t N) { return prefix##_alloc_real(N); } \ + static void free(void *p) { fftw_free(p); } \ + \ + template \ + static ptrdiff_t local_size( \ + std::array const &N, MPI_Comm comm, \ + ptrdiff_t *local_n0, ptrdiff_t *local_0_start) { \ + return prefix##_mpi_local_size( \ + Nd, N.data(), comm, local_n0, local_0_start); \ + } \ + static ptrdiff_t local_size_2d( \ + ptrdiff_t N0, ptrdiff_t N1, MPI_Comm comm, ptrdiff_t *local_n0, \ + ptrdiff_t *local_0_start) { \ + return prefix##_mpi_local_size_2d( \ + N0, N1, comm, local_n0, local_0_start); \ + } \ + \ + static ptrdiff_t local_size_3d( \ + ptrdiff_t N0, ptrdiff_t N1, ptrdiff_t N2, MPI_Comm comm, \ + ptrdiff_t *local_n0, ptrdiff_t *local_0_start) { \ + return prefix##_mpi_local_size_3d( \ + N0, N1, N2, comm, local_n0, local_0_start); \ + } \ + \ + static void execute(plan_type p) { prefix##_execute(p); } \ + static void \ + execute_c2c(plan_type p, complex_type *in, complex_type *out) { \ + prefix##_mpi_execute_dft(p, in, out); \ + } \ + static void execute_c2c( \ + plan_type p, std::complex *in, \ + std::complex *out) { \ + prefix##_mpi_execute_dft(p, (complex_type *)in, (complex_type *)out); \ + } \ + static void execute_r2c(plan_type p, real_type *in, complex_type *out) { \ + prefix##_mpi_execute_dft_r2c(p, in, out); \ + } \ + static void \ + execute_c2r(plan_type p, std::complex *in, real_type *out) { \ + prefix##_mpi_execute_dft_c2r(p, (complex_type *)in, out); \ + } \ + static void execute_c2r(plan_type p, complex_type *in, real_type *out) { \ + prefix##_mpi_execute_dft_c2r(p, in, out); \ + } \ + static void \ + execute_r2c(plan_type p, real_type *in, std::complex *out) { \ + prefix##_mpi_execute_dft_r2c(p, in, (complex_type *)out); \ + } \ + \ + static plan_type plan_dft_r2c_1d( \ + int n, real_type *in, complex_type *out, MPI_Comm, unsigned flags) { \ + return prefix##_plan_dft_r2c_1d(n, in, out, flags); \ + } \ + \ + static plan_type plan_dft_r2c_2d( \ + int Nx, int Ny, real_type *in, complex_type *out, MPI_Comm comm, \ + unsigned flags) { \ + return prefix##_mpi_plan_dft_r2c_2d(Nx, Ny, in, out, comm, flags); \ + } \ + \ + static plan_type plan_dft_r2c_1d( \ + int n, complex_type *in, real_type *out, MPI_Comm, unsigned flags) { \ + return prefix##_plan_dft_c2r_1d(n, in, out, flags); \ + } \ + static plan_type plan_dft_c2r_2d( \ + int Nx, int Ny, complex_type *in, real_type *out, MPI_Comm comm, \ + unsigned flags) { \ + return prefix##_mpi_plan_dft_c2r_2d(Nx, Ny, in, out, comm, flags); \ + } \ + \ + static plan_type plan_dft_r2c_3d( \ + int Nx, int Ny, int Nz, real_type *in, complex_type *out, \ + MPI_Comm comm, unsigned flags) { \ + return prefix##_mpi_plan_dft_r2c_3d(Nx, Ny, Nz, in, out, comm, flags); \ + } \ + static plan_type plan_dft_c2r_3d( \ + int Nx, int Ny, int Nz, complex_type *in, real_type *out, \ + MPI_Comm comm, unsigned flags) { \ + return prefix##_mpi_plan_dft_c2r_3d(Nx, Ny, Nz, in, out, comm, flags); \ + } \ + \ + static plan_type plan_dft_r2c( \ + int rank, const ptrdiff_t *n, real_type *in, complex_type *out, \ + MPI_Comm comm, unsigned flags) { \ + return prefix##_mpi_plan_dft_r2c(rank, n, in, out, comm, flags); \ + } \ + static plan_type plan_dft_c2r( \ + int rank, const ptrdiff_t *n, complex_type *in, real_type *out, \ + MPI_Comm comm, unsigned flags) { \ + return prefix##_mpi_plan_dft_c2r(rank, n, in, out, comm, flags); \ + } \ + static plan_type plan_dft_3d( \ + int Nx, int Ny, int Nz, complex_type *in, complex_type *out, \ + MPI_Comm comm, int sign, unsigned flags) { \ + return prefix##_mpi_plan_dft_3d(Nx, Ny, Nz, in, out, comm, sign, flags); \ + } \ + static plan_type plan_dft_2d( \ + int Nx, int Ny, complex_type *in, complex_type *out, MPI_Comm comm, \ + int sign, unsigned flags) { \ + return prefix##_mpi_plan_dft_2d(Nx, Ny, in, out, comm, sign, flags); \ + } \ + static void destroy_plan(plan_type plan) { prefix##_destroy_plan(plan); } \ + } -#define FFTW_MPI_CALLS_BASE(rtype, prefix) \ - template<> \ -class FFTW_MPI_Calls { \ -public: \ - typedef rtype real_type; \ - typedef prefix ## _complex complex_type; \ - typedef prefix ## _plan plan_type; \ - \ - static complex_type *alloc_complex(size_t N) { return prefix ## _alloc_complex(N); } \ - static real_type *alloc_real(size_t N) { return prefix ## _alloc_real(N); } \ - static void free(void *p) { fftw_free(p); } \ -\ - template \ - static ptrdiff_t local_size(std::array const& N, MPI_Comm comm, \ - ptrdiff_t *local_n0, ptrdiff_t *local_0_start) { \ - return prefix ## _mpi_local_size(Nd, N.data(), comm, local_n0, local_0_start); \ - } \ - static ptrdiff_t local_size_2d(ptrdiff_t N0, ptrdiff_t N1, MPI_Comm comm, \ - ptrdiff_t *local_n0, ptrdiff_t *local_0_start) { \ - return prefix ## _mpi_local_size_2d(N0, N1, comm, local_n0, local_0_start); \ - } \ -\ - static ptrdiff_t local_size_3d(ptrdiff_t N0, ptrdiff_t N1, ptrdiff_t N2, MPI_Comm comm, \ - ptrdiff_t *local_n0, ptrdiff_t *local_0_start) { \ - return prefix ## _mpi_local_size_3d(N0, N1, N2, comm, local_n0, local_0_start); \ - } \ -\ - static void execute(plan_type p) { prefix ## _execute(p); } \ - static void execute_c2c(plan_type p, complex_type *in, complex_type *out) { prefix ## _mpi_execute_dft(p, in, out); } \ - static void execute_c2c(plan_type p, std::complex *in, std::complex *out) { prefix ## _mpi_execute_dft(p, (complex_type*)in, (complex_type*)out); } \ - static void execute_r2c(plan_type p, real_type *in, complex_type *out) { prefix ## _mpi_execute_dft_r2c(p, in, out); } \ - static void execute_c2r(plan_type p, std::complex *in, real_type *out) { prefix ## _mpi_execute_dft_c2r(p, (complex_type*)in, out); } \ - static void execute_c2r(plan_type p, complex_type *in, real_type *out) { prefix ## _mpi_execute_dft_c2r(p, in, out); } \ - static void execute_r2c(plan_type p, real_type *in, std::complex *out) { prefix ## _mpi_execute_dft_r2c(p, in, (complex_type*)out); } \ -\ - static plan_type plan_dft_r2c_2d(int Nx, int Ny, \ - real_type *in, complex_type *out, \ - MPI_Comm comm, unsigned flags) \ - { \ - return prefix ## _mpi_plan_dft_r2c_2d(Nx, Ny, in, out, \ - comm, flags); \ - } \ - static plan_type plan_dft_c2r_2d(int Nx, int Ny, \ - complex_type *in, real_type *out, \ - MPI_Comm comm, unsigned flags) \ - { \ - return prefix ## _mpi_plan_dft_c2r_2d(Nx, Ny, in, out, \ - comm, flags); \ - } \ - static plan_type plan_dft_r2c_3d(int Nx, int Ny, int Nz, \ - real_type *in, complex_type *out, \ - MPI_Comm comm, unsigned flags) \ - { \ - return prefix ## _mpi_plan_dft_r2c_3d(Nx, Ny, Nz, in, out, comm, flags); \ - } \ - static plan_type plan_dft_c2r_3d(int Nx, int Ny, int Nz, \ - complex_type *in, real_type *out, \ - MPI_Comm comm, \ - unsigned flags) \ - { \ - return prefix ## _mpi_plan_dft_c2r_3d(Nx, Ny, Nz, in, out, comm, flags); \ - } \ -\ - static plan_type plan_dft_r2c(int rank, const ptrdiff_t *n, real_type *in, \ - complex_type *out, MPI_Comm comm, unsigned flags) \ - { \ - return prefix ## _mpi_plan_dft_r2c(rank, n, in, out, comm, flags); \ - } \ - static plan_type plan_dft_c2r(int rank, const ptrdiff_t *n, complex_type *in, \ - real_type *out, MPI_Comm comm, unsigned flags) \ - { \ - return prefix ## _mpi_plan_dft_c2r(rank, n, in, out, comm, flags); \ - } \ - static plan_type plan_dft_3d(int Nx, int Ny, int Nz, complex_type *in, complex_type *out, MPI_Comm comm, int sign, unsigned flags) { \ - return prefix ## _mpi_plan_dft_3d(Nx, Ny, Nz, in, out, comm, sign, flags); \ - } \ - static plan_type plan_dft_2d(int Nx, int Ny, complex_type *in, complex_type *out, MPI_Comm comm, int sign, unsigned flags) { \ - return prefix ## _mpi_plan_dft_2d(Nx, Ny, in, out, comm, sign, flags); \ - } \ - static void destroy_plan(plan_type plan) { prefix ## _destroy_plan(plan); } \ -} - - -FFTW_MPI_CALLS_BASE(double, fftw); -FFTW_MPI_CALLS_BASE(float, fftwf); + FFTW_MPI_CALLS_BASE(double, fftw); + FFTW_MPI_CALLS_BASE(float, fftwf); #undef FFTW_MPI_CALLS_BASE -}; +}; // namespace CosmoTool #endif From 8068ebe3ae87537deb47c00746a645136f049c62 Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Thu, 22 Apr 2021 08:42:24 +0200 Subject: [PATCH 14/89] Fix 1d support --- src/fourier/fft/fftw_calls.hpp | 5 +++++ src/fourier/fft/fftw_calls_mpi.hpp | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/fourier/fft/fftw_calls.hpp b/src/fourier/fft/fftw_calls.hpp index 5ffefcc..67a714a 100644 --- a/src/fourier/fft/fftw_calls.hpp +++ b/src/fourier/fft/fftw_calls.hpp @@ -134,6 +134,11 @@ namespace CosmoTool { unsigned flags) { \ return prefix##_plan_dft_2d(Nx, Ny, in, out, sign, flags); \ } \ + static plan_type plan_dft_1d( \ + int Nx, complex_type *in, complex_type *out, int sign, \ + unsigned flags) { \ + return prefix##_plan_dft_1d(Nx, in, out, sign, flags); \ + } \ static void destroy_plan(plan_type plan) { prefix##_destroy_plan(plan); } \ } diff --git a/src/fourier/fft/fftw_calls_mpi.hpp b/src/fourier/fft/fftw_calls_mpi.hpp index 160a604..aa31233 100644 --- a/src/fourier/fft/fftw_calls_mpi.hpp +++ b/src/fourier/fft/fftw_calls_mpi.hpp @@ -85,7 +85,7 @@ namespace CosmoTool { return prefix##_mpi_plan_dft_r2c_2d(Nx, Ny, in, out, comm, flags); \ } \ \ - static plan_type plan_dft_r2c_1d( \ + static plan_type plan_dft_c2r_1d( \ int n, complex_type *in, real_type *out, MPI_Comm, unsigned flags) { \ return prefix##_plan_dft_c2r_1d(n, in, out, flags); \ } \ @@ -126,6 +126,11 @@ namespace CosmoTool { int sign, unsigned flags) { \ return prefix##_mpi_plan_dft_2d(Nx, Ny, in, out, comm, sign, flags); \ } \ + static plan_type plan_dft_1d( \ + int Nx, complex_type *in, complex_type *out, MPI_Comm comm, int sign, \ + unsigned flags) { \ + return prefix##_plan_dft_1d(Nx, in, out, sign, flags); \ + } \ static void destroy_plan(plan_type plan) { prefix##_destroy_plan(plan); } \ } From 56e6761bf5db361999a3dfee26d62bef2387692b Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Fri, 23 Apr 2021 11:46:36 +0200 Subject: [PATCH 15/89] Improve compatibility for 32 bits dump --- src/fortran.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/fortran.cpp b/src/fortran.cpp index 376d62d..967b19a 100644 --- a/src/fortran.cpp +++ b/src/fortran.cpp @@ -139,14 +139,16 @@ void UnformattedRead::beginCheckpoint(bool bufferRecord) void UnformattedRead::endCheckpoint(bool autodrop) { + bool always_fail = false; + if (recordBuffer != 0) { delete[] recordBuffer; recordBuffer = 0; } if (cSize == Check_32bits) { - if (checkPointAccum >= 1<<32UL) { + if (checkPointAccum >= 1UL<<32UL) { always_fail = true; - checkPointAccum %= (1<<32UL); + checkPointAccum %= (1UL<<32UL); } } From f668fb00fd3c0f94e9c7ad27eb4650cdd37c1a3d Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Fri, 23 Apr 2021 12:43:39 +0200 Subject: [PATCH 16/89] Update version --- CMakeLists.txt | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6225de6..7ef422f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -71,7 +71,7 @@ SET(CPACK_PACKAGE_VENDOR "Guilhem Lavaux") SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENCE_CeCILL_V2") SET(CPACK_PACKAGE_VERSION_MAJOR "1") SET(CPACK_PACKAGE_VERSION_MINOR "2") -SET(CPACK_PACKAGE_VERSION_PATCH "1${EXTRA_VERSION}") +SET(CPACK_PACKAGE_VERSION_PATCH "2${EXTRA_VERSION}") SET(CPACK_PACKAGE_INSTALL_DIRECTORY "CosmoToolbox-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}") SET(CPACK_STRIP_FILES "lib/libCosmoTool.so") SET(CPACK_SOURCE_IGNORE_FILES diff --git a/setup.py b/setup.py index 2a5e548..b8c6925 100644 --- a/setup.py +++ b/setup.py @@ -223,7 +223,7 @@ class BuildCMakeExt(build_ext): CosmoTool_extension = CMakeExtension(name="cosmotool") setup(name='cosmotool', - version='1.2.1', + version='1.2.2', packages=["cosmotool"], package_dir={'cosmotool': 'python/cosmotool'}, install_requires=['numpy','cffi','numexpr','pyfftw','h5py'], From 83884a37472df9258f777c6e045942373afe1e0f Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Sun, 9 May 2021 14:28:39 +0300 Subject: [PATCH 17/89] Add warning fix --- external/patch-omptl | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/external/patch-omptl b/external/patch-omptl index f9b2e6d..8d5887b 100644 --- a/external/patch-omptl +++ b/external/patch-omptl @@ -92,3 +92,15 @@ diff -ur omptl.orig/omptl_numeric_par.h omptl/omptl_numeric_par.h namespace omptl { +diff -ur omptl.orig/omptl_algorithm_par.h omptl/omptl_algorithm_par.h +--- omptl.orig/omptl_algorithm_par.h 2021-05-09 14:26:47.227632829 +0300 ++++ omptl/omptl_algorithm_par.h 2021-05-09 14:27:02.815744567 +0300 +@@ -1700,7 +1700,7 @@ + + std::vector 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::tr1::log2(P))); + assert(1u << max_depth <= P); + for (unsigned i = 0; i < max_depth; ++i) + { From 10409ca7f02bbf45481535d1c79262c2cb25f687 Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Sun, 9 May 2021 14:48:45 +0300 Subject: [PATCH 18/89] Fix warnings --- src/hdf5_array.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/hdf5_array.hpp b/src/hdf5_array.hpp index 4cab937..9587189 100644 --- a/src/hdf5_array.hpp +++ b/src/hdf5_array.hpp @@ -144,8 +144,8 @@ namespace CosmoTool { bool useBases = false) { std::vector memdims(data.shape(), data.shape() + data.num_dimensions()); - H5::DataSpace dataspace(dimensions.size(), dimensions.data()); - H5::DataSpace memspace(memdims.size(), memdims.data()); + H5::DataSpace dataspace(int(dimensions.size()), dimensions.data()); + H5::DataSpace memspace(int(memdims.size()), memdims.data()); if (useBases) { std::vector offsets(data.index_bases(), data.index_bases() + data.num_dimensions()); @@ -398,7 +398,7 @@ namespace CosmoTool { hdf5_weak_check_array(data, dimensions); std::vector memdims(data.shape(), data.shape() + data.num_dimensions()); - H5::DataSpace memspace(memdims.size(), memdims.data()); + H5::DataSpace memspace(int(memdims.size()), memdims.data()); std::vector offsets(data.index_bases(), data.index_bases() + data.num_dimensions()); dataspace.selectHyperslab(H5S_SELECT_SET, memdims.data(), offsets.data()); From 8942adab6c60fd96c29f7e63fac6e04e0d18be9e Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Wed, 26 May 2021 06:47:08 +0200 Subject: [PATCH 19/89] Update conda --- conda/build.sh | 3 +++ conda/meta.yaml | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/conda/build.sh b/conda/build.sh index 5a5aeeb..4993e3a 100644 --- a/conda/build.sh +++ b/conda/build.sh @@ -1 +1,4 @@ +export CC=$(basename ${CC}) +export CXX=$(basename ${CXX}) + $PYTHON setup.py install diff --git a/conda/meta.yaml b/conda/meta.yaml index 8cc271b..fd564fc 100644 --- a/conda/meta.yaml +++ b/conda/meta.yaml @@ -9,8 +9,8 @@ source: requirements: build: - numpy >=1.11 - - gcc_linux-64 - - gxx_linux-64 + - {{ compiler('c') }} + - {{ compiler('cxx') }} - python - setuptools - cython From a16ae603820c3b83654f3cee7827f77eb621e49c Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Wed, 26 May 2021 15:07:54 +0200 Subject: [PATCH 20/89] Update meta for conda --- conda/conda_build_config.yaml | 1 + conda/meta.yaml | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/conda/conda_build_config.yaml b/conda/conda_build_config.yaml index b120466..288df1f 100644 --- a/conda/conda_build_config.yaml +++ b/conda/conda_build_config.yaml @@ -1,6 +1,7 @@ python: - 3.7 - 3.8 + - 3.9 numpy: - 1.11 diff --git a/conda/meta.yaml b/conda/meta.yaml index fd564fc..249bebd 100644 --- a/conda/meta.yaml +++ b/conda/meta.yaml @@ -1,9 +1,9 @@ package: name: cosmotool - version: "1.0.0a7" + version: "1.2.2" source: - git_rev: 7fce73e + git_rev: 03033b6 git_url: https://bitbucket.org/glavaux/cosmotool requirements: @@ -21,6 +21,16 @@ requirements: - gsl - h5py + host: + - python + - numexpr + - cython + - healpy + - cffi + - pyfftw + - gsl + - h5py + run: - numpy - python From 51e84a3f4f5006827d16fea8e95ca78dbd361617 Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Wed, 2 Jun 2021 08:52:01 +0200 Subject: [PATCH 21/89] Update Manifest --- MANIFEST.in | 1 + 1 file changed, 1 insertion(+) diff --git a/MANIFEST.in b/MANIFEST.in index 8d92fca..e90c111 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -86,6 +86,7 @@ include sample/testSmooth.cpp include sample/test_cosmopower.cpp include sample/test_fft_calls.cpp include sample/test_healpix_calls.cpp +include sample/test_special.cpp include sample/testkd.cpp include sample/testkd2.cpp include sample/testkd3.cpp From 033fe2263825069fa234e1b05e9779c3f320ead1 Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Mon, 7 Jun 2021 22:33:08 +0200 Subject: [PATCH 22/89] Fix warnings --- src/hdf5_array.hpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/hdf5_array.hpp b/src/hdf5_array.hpp index 9587189..db75a33 100644 --- a/src/hdf5_array.hpp +++ b/src/hdf5_array.hpp @@ -426,7 +426,7 @@ namespace CosmoTool { #define CTOOL_HDF5_INSERT_ELEMENT(r, STRUCT, element) \ { \ ::CosmoTool::get_hdf5_data_type 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)); \ type.insertMember(field_name, position, t.type()); \ } @@ -439,7 +439,6 @@ namespace CosmoTool { \ \ TNAME() : type(sizeof(STRUCT)) \ { \ - long position; \ BOOST_PP_SEQ_FOR_EACH(CTOOL_HDF5_INSERT_ELEMENT, STRUCT, ATTRIBUTES) \ } \ \ @@ -471,7 +470,6 @@ namespace CosmoTool { \ \ TNAME() : type(sizeof(STRUCT)) \ { \ - long position; \ BOOST_PP_SEQ_FOR_EACH(CTOOL_HDF5_INSERT_ENUM_ELEMENT, STRUCT, ATTRIBUTES) \ } \ \ From f3e05ad90304024cd9a54a04bc7ae3dadf35e051 Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Sun, 20 Jun 2021 07:55:45 +0200 Subject: [PATCH 23/89] Enforce numpy<1.19 for tensorflow compat --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index ef3f5d4..3a4577b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -numpy +numpy<1.19 cffi numexpr pyfftw From 17d4f4429c03b73662855eeab8832b8ee11f957a Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Sun, 20 Jun 2021 07:56:01 +0200 Subject: [PATCH 24/89] Adjust conda but not done yet --- conda/conda_build_config.yaml | 11 +++++++---- conda/meta.yaml | 7 ++++--- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/conda/conda_build_config.yaml b/conda/conda_build_config.yaml index 288df1f..35246cd 100644 --- a/conda/conda_build_config.yaml +++ b/conda/conda_build_config.yaml @@ -1,8 +1,11 @@ python: - - 3.7 - 3.8 - - 3.9 numpy: - - 1.11 - - 1.19 + - 1.20 + +gsl: + - 2.4 + +pin_run_as_build: + gsl: x.x diff --git a/conda/meta.yaml b/conda/meta.yaml index 249bebd..0993d98 100644 --- a/conda/meta.yaml +++ b/conda/meta.yaml @@ -8,17 +8,17 @@ source: requirements: build: - - numpy >=1.11 + - numpy {{ numpy }} - {{ compiler('c') }} - {{ compiler('cxx') }} - - python + - python {{ python }} - setuptools - cython - healpy - numexpr - cffi - pyfftw - - gsl + - gsl {{ gsl }} - h5py host: @@ -30,6 +30,7 @@ requirements: - pyfftw - gsl - h5py + - numpy run: - numpy From f412a9b4424bb3ad548a5db05e9e308853a4fc55 Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Sun, 20 Jun 2021 07:56:08 +0200 Subject: [PATCH 25/89] Bump version number --- CMakeLists.txt | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7ef422f..c7b3581 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -71,7 +71,7 @@ SET(CPACK_PACKAGE_VENDOR "Guilhem Lavaux") SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENCE_CeCILL_V2") SET(CPACK_PACKAGE_VERSION_MAJOR "1") 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_STRIP_FILES "lib/libCosmoTool.so") SET(CPACK_SOURCE_IGNORE_FILES diff --git a/setup.py b/setup.py index b8c6925..22e07e8 100644 --- a/setup.py +++ b/setup.py @@ -223,7 +223,7 @@ class BuildCMakeExt(build_ext): CosmoTool_extension = CMakeExtension(name="cosmotool") setup(name='cosmotool', - version='1.2.2', + version='1.2.3', packages=["cosmotool"], package_dir={'cosmotool': 'python/cosmotool'}, install_requires=['numpy','cffi','numexpr','pyfftw','h5py'], From c416ff751f04fea73baae282f2de3f7a66e3f251 Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Sun, 20 Jun 2021 13:13:35 +0200 Subject: [PATCH 26/89] Fix conda package builder --- conda/conda_build_config.yaml | 7 +++---- conda/meta.yaml | 34 ++++++++++++++++------------------ 2 files changed, 19 insertions(+), 22 deletions(-) diff --git a/conda/conda_build_config.yaml b/conda/conda_build_config.yaml index 35246cd..1f026b6 100644 --- a/conda/conda_build_config.yaml +++ b/conda/conda_build_config.yaml @@ -1,11 +1,10 @@ python: + - 3.9 - 3.8 + - 3.7 numpy: - - 1.20 + - 1.19 gsl: - 2.4 - -pin_run_as_build: - gsl: x.x diff --git a/conda/meta.yaml b/conda/meta.yaml index 0993d98..a91f788 100644 --- a/conda/meta.yaml +++ b/conda/meta.yaml @@ -1,6 +1,6 @@ package: name: cosmotool - version: "1.2.2" + version: "1.2.3" source: git_rev: 03033b6 @@ -8,42 +8,40 @@ source: requirements: build: - - numpy {{ numpy }} + - 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('cxx') }} - - python {{ python }} - - setuptools + + host: + - python + - pip + - numpy + - pkgconfig + - numexpr - cython - healpy - - numexpr - cffi - pyfftw - gsl {{ gsl }} - h5py - - host: - - python - - numexpr - - cython - - healpy - - cffi - - pyfftw - - gsl - - h5py - - numpy - run: - - numpy - python + - {{ pin_compatible('numpy') }} - healpy - numexpr - cffi - pyfftw - h5py + - {{ pin_compatible('gsl') }} test: imports: - cosmotool + requires: + - pip about: home: https://bitbucket.org/glavaux/cosmotool From 5d653cfee87657657156c25b08058c10d33483e4 Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Sun, 20 Jun 2021 13:37:40 +0200 Subject: [PATCH 27/89] Add missing item --- MANIFEST.in | 1 + 1 file changed, 1 insertion(+) diff --git a/MANIFEST.in b/MANIFEST.in index e90c111..5c4f363 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -168,3 +168,4 @@ include src/tf_fit.hpp include src/yorick.hpp include src/yorick_nc3.cpp include src/yorick_nc4.cpp +include src/special_math.hpp From 81c2d0e6885eea17e665f85e3bb92e5b3055c5c0 Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Sun, 20 Jun 2021 15:10:14 +0200 Subject: [PATCH 28/89] Upgrade boost --- external/external_build.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/external/external_build.cmake b/external/external_build.cmake index 5459427..d9b83d4 100644 --- a/external/external_build.cmake +++ b/external/external_build.cmake @@ -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(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(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 ") mark_as_advanced(FFTW_URL EIGEN_URL HDF5_URL NETCDF_URL BOOST_URL GSL_URL) From 793134d1ba38e86ca900c502801d46634cbad5f8 Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Sun, 20 Jun 2021 15:41:21 +0200 Subject: [PATCH 29/89] Update patch --- external/patch-omptl | 132 +++++++++++++++++++++++++++++++------------ 1 file changed, 96 insertions(+), 36 deletions(-) diff --git a/external/patch-omptl b/external/patch-omptl index 8d5887b..5a40388 100644 --- a/external/patch-omptl +++ b/external/patch-omptl @@ -1,6 +1,6 @@ -diff -ur omptl.orig/omptl_algorithm omptl/omptl_algorithm ---- omptl.orig/omptl_algorithm 2017-01-16 14:58:37.996690639 +0100 -+++ omptl/omptl_algorithm 2017-01-16 15:00:26.678641720 +0100 +diff -ur omptl.old/algorithm omptl/algorithm +--- omptl.old/algorithm 2012-04-22 16:29:41.000000000 +0200 ++++ omptl/algorithm 2021-06-20 15:40:29.000000000 +0200 @@ -20,7 +20,7 @@ #define OMPTL_ALGORITHM 1 @@ -22,23 +22,9 @@ diff -ur omptl.orig/omptl_algorithm omptl/omptl_algorithm #endif #endif /* OMPTL_ALGORITHM */ -diff -ur omptl.orig/omptl_algorithm_par.h omptl/omptl_algorithm_par.h ---- omptl.orig/omptl_algorithm_par.h 2017-01-16 14:58:37.996690639 +0100 -+++ omptl/omptl_algorithm_par.h 2017-01-16 14:59:57.974126410 +0100 -@@ -21,8 +21,8 @@ - #include - #include - --#include --#include -+#include "omptl_tools.h" -+#include "omptl_numeric" - - #include - -diff -ur omptl.orig/omptl_numeric omptl/omptl_numeric ---- omptl.orig/omptl_numeric 2017-01-16 14:58:37.996690639 +0100 -+++ omptl/omptl_numeric 2017-01-16 15:00:57.051186974 +0100 +diff -ur omptl.old/numeric omptl/numeric +--- omptl.old/numeric 2012-04-22 16:29:41.000000000 +0200 ++++ omptl/numeric 2021-06-20 15:40:29.000000000 +0200 @@ -19,7 +19,7 @@ #define OMPTL_NUMERIC 1 @@ -63,9 +49,83 @@ diff -ur omptl.orig/omptl_numeric omptl/omptl_numeric +#include "omptl_numeric_extensions.h" #endif /* OMPTL_NUMERIC */ -diff -ur omptl.orig/omptl_numeric_extensions.h omptl/omptl_numeric_extensions.h ---- omptl.orig/omptl_numeric_extensions.h 2017-01-16 14:58:37.996690639 +0100 -+++ omptl/omptl_numeric_extensions.h 2017-01-16 14:59:21.549472508 +0100 +diff -ur omptl.old/omptl_algorithm omptl/omptl_algorithm +--- omptl.old/omptl_algorithm 2012-04-22 16:29:41.000000000 +0200 ++++ omptl/omptl_algorithm 2021-06-20 15:40:29.000000000 +0200 +@@ -20,7 +20,7 @@ + #define OMPTL_ALGORITHM 1 + + #include +-#include ++#include "omptl" + + namespace omptl + { +@@ -553,9 +553,9 @@ + } // namespace omptl + + #ifdef _OPENMP +- #include ++ #include "omptl_algorithm_par.h" + #else +- #include ++ #include "omptl_algorithm_ser.h" + #endif + + #endif /* OMPTL_ALGORITHM */ +diff -ur omptl.old/omptl_algorithm_par.h omptl/omptl_algorithm_par.h +--- omptl.old/omptl_algorithm_par.h 2012-04-22 16:29:41.000000000 +0200 ++++ omptl/omptl_algorithm_par.h 2021-06-20 15:40:50.000000000 +0200 +@@ -21,8 +21,8 @@ + #include + #include + +-#include +-#include ++#include "omptl_tools.h" ++#include "omptl_numeric" + + #include + +@@ -1700,7 +1700,7 @@ + + std::vector 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 @@ + #define OMPTL_NUMERIC 1 + + #include +-#include ++#include "omptl" + + namespace omptl + { +@@ -73,11 +73,11 @@ + } // namespace omptl + + #ifdef _OPENMP +- #include ++ #include "omptl_numeric_par.h" + #else +- #include ++ #include "omptl_numeric_ser.h" + #endif + +-#include ++#include "omptl_numeric_extensions.h" + + #endif /* OMPTL_NUMERIC */ +diff -ur omptl.old/omptl_numeric_extensions.h omptl/omptl_numeric_extensions.h +--- omptl.old/omptl_numeric_extensions.h 2012-04-22 16:29:41.000000000 +0200 ++++ omptl/omptl_numeric_extensions.h 2021-06-20 15:40:29.000000000 +0200 @@ -51,9 +51,9 @@ } // namespace @@ -78,9 +138,9 @@ diff -ur omptl.orig/omptl_numeric_extensions.h omptl/omptl_numeric_extensions.h #endif namespace omptl -diff -ur omptl.orig/omptl_numeric_par.h omptl/omptl_numeric_par.h ---- omptl.orig/omptl_numeric_par.h 2017-01-16 14:58:37.996690639 +0100 -+++ omptl/omptl_numeric_par.h 2017-01-16 14:59:36.397739066 +0100 +diff -ur omptl.old/omptl_numeric_par.h omptl/omptl_numeric_par.h +--- omptl.old/omptl_numeric_par.h 2012-04-22 16:29:41.000000000 +0200 ++++ omptl/omptl_numeric_par.h 2021-06-20 15:40:29.000000000 +0200 @@ -23,8 +23,8 @@ #include #include @@ -92,15 +152,15 @@ diff -ur omptl.orig/omptl_numeric_par.h omptl/omptl_numeric_par.h namespace omptl { -diff -ur omptl.orig/omptl_algorithm_par.h omptl/omptl_algorithm_par.h ---- omptl.orig/omptl_algorithm_par.h 2021-05-09 14:26:47.227632829 +0300 -+++ omptl/omptl_algorithm_par.h 2021-05-09 14:27:02.815744567 +0300 -@@ -1700,7 +1700,7 @@ +diff -ur omptl.old/omptl_tools.h omptl/omptl_tools.h +--- omptl.old/omptl_tools.h 2012-04-22 16:29:41.000000000 +0200 ++++ omptl/omptl_tools.h 2021-06-20 15:40:42.000000000 +0200 +@@ -25,7 +25,7 @@ + #include + #include - std::vector pivot_used(pivots.size(), false); // can't be bool due to parallel write +-#include ++#include -- const unsigned max_depth = std::floor(std::tr1::log2(P)); -+ const unsigned max_depth = unsigned(std::floor(std::tr1::log2(P))); - assert(1u << max_depth <= P); - for (unsigned i = 0; i < max_depth; ++i) - { + namespace omptl + { From a86c9a85c219d50ca114c8b94969889e6b510531 Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Wed, 23 Jun 2021 09:02:24 +0200 Subject: [PATCH 30/89] Ensure that all the flags are really passed to CMake --- conda/meta.yaml | 5 ++++- setup.py | 14 ++++++++++---- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/conda/meta.yaml b/conda/meta.yaml index a91f788..3e69c41 100644 --- a/conda/meta.yaml +++ b/conda/meta.yaml @@ -3,7 +3,7 @@ package: version: "1.2.3" source: - git_rev: 03033b6 + git_rev: 793134d git_url: https://bitbucket.org/glavaux/cosmotool requirements: @@ -14,6 +14,8 @@ requirements: - numpy # [build_platform != target_platform] - {{ compiler('c') }} - {{ compiler('cxx') }} + - llvm-openmp # [osx] + - libgomp # [linux] host: - python @@ -36,6 +38,7 @@ requirements: - pyfftw - h5py - {{ pin_compatible('gsl') }} + - llvm-openmp test: imports: diff --git a/setup.py b/setup.py index 22e07e8..593d3d8 100644 --- a/setup.py +++ b/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 compilers=[] - if "CC" in os.environ: - compilers.append('-DCMAKE_C_COMPILER=' + os.environ["CC"]) - if "CXX" in os.environ: - compilers.append("-DCMAKE_CXX_COMPILER=" + os.environ["CXX"]) + fill_up_settings=[ + ("CMAKE_C_COMPILER", "CC"), + ("CMAKE_CXX_COMPILER", "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: + 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, '-DENABLE_OPENMP=ON','-DINTERNAL_BOOST=ON','-DINTERNAL_EIGEN=ON', From d1013ee784028c442626d44d4d8491e72b748492 Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Wed, 23 Jun 2021 09:09:06 +0200 Subject: [PATCH 31/89] Fix syntax error --- conda/meta.yaml | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/conda/meta.yaml b/conda/meta.yaml index 3e69c41..333a565 100644 --- a/conda/meta.yaml +++ b/conda/meta.yaml @@ -3,7 +3,7 @@ package: version: "1.2.3" source: - git_rev: 793134d + git_rev: a86c9a8 git_url: https://bitbucket.org/glavaux/cosmotool requirements: diff --git a/setup.py b/setup.py index 593d3d8..da984f3 100644 --- a/setup.py +++ b/setup.py @@ -175,7 +175,7 @@ class BuildCMakeExt(build_ext): ("CMAKE_EXE_LINKER_FLAGS_INIT", "LDFLAGS"), ("CMAKE_SHARED_LINKER_FLAGS_INIT", "LDFLAGS"), ("CMAKE_MODULE_LINKER_FLAGS_INIT", "LDFLAGS")] - for cmake_flag, os_flag: + 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]}") From 2b01b1ca11d271c6caace11139849685aa3a7bc7 Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Fri, 25 Jun 2021 23:07:57 +0200 Subject: [PATCH 32/89] Patch the patch file --- external/patch-omptl | 51 -------------------------------------------- 1 file changed, 51 deletions(-) diff --git a/external/patch-omptl b/external/patch-omptl index 5a40388..9ea9d28 100644 --- a/external/patch-omptl +++ b/external/patch-omptl @@ -1,54 +1,3 @@ -diff -ur omptl.old/algorithm omptl/algorithm ---- omptl.old/algorithm 2012-04-22 16:29:41.000000000 +0200 -+++ omptl/algorithm 2021-06-20 15:40:29.000000000 +0200 -@@ -20,7 +20,7 @@ - #define OMPTL_ALGORITHM 1 - - #include --#include -+#include "omptl" - - namespace omptl - { -@@ -553,9 +553,9 @@ - } // namespace omptl - - #ifdef _OPENMP -- #include -+ #include "omptl_algorithm_par.h" - #else -- #include -+ #include "omptl_algorithm_ser.h" - #endif - - #endif /* OMPTL_ALGORITHM */ -diff -ur omptl.old/numeric omptl/numeric ---- omptl.old/numeric 2012-04-22 16:29:41.000000000 +0200 -+++ omptl/numeric 2021-06-20 15:40:29.000000000 +0200 -@@ -19,7 +19,7 @@ - #define OMPTL_NUMERIC 1 - - #include --#include -+#include "omptl" - - namespace omptl - { -@@ -73,11 +73,11 @@ - } // namespace omptl - - #ifdef _OPENMP -- #include -+ #include "omptl_numeric_par.h" - #else -- #include -+ #include "omptl_numeric_ser.h" - #endif - --#include -+#include "omptl_numeric_extensions.h" - - #endif /* OMPTL_NUMERIC */ diff -ur omptl.old/omptl_algorithm omptl/omptl_algorithm --- omptl.old/omptl_algorithm 2012-04-22 16:29:41.000000000 +0200 +++ omptl/omptl_algorithm 2021-06-20 15:40:29.000000000 +0200 From 7feba4788fdb0c497d53a17317870ea6702d5385 Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Sat, 26 Jun 2021 09:42:12 +0200 Subject: [PATCH 33/89] Add MD5 hash for cosmotool --- external/external_build.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/external/external_build.cmake b/external/external_build.cmake index d9b83d4..bbe3e77 100644 --- a/external/external_build.cmake +++ b/external/external_build.cmake @@ -234,6 +234,7 @@ if (INTERNAL_BOOST) ExternalProject_Add(boost URL ${BOOST_URL} PREFIX ${BUILD_PREFIX}/boost-prefix + URL_HASH MD5=da07ca30dd1c0d1fdedbd487efee01bd CONFIGURE_COMMAND ${BOOST_SOURCE_DIR}/bootstrap.sh --prefix=${CMAKE_BINARY_DIR}/ext_build/boost BUILD_IN_SOURCE 1 From 65b3139ba94946aa4dd6517de04292656ffe106a Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Fri, 2 Jul 2021 17:53:51 +0200 Subject: [PATCH 34/89] Add missing dependency --- src/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 4f39695..c075396 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -38,6 +38,7 @@ if (HDF5_FOUND) h5_readFlash.cpp loadFlash.cpp ) + add_dependencies(CosmoHDF5 ${cosmotool_DEPS}) set_property(TARGET CosmoHDF5 PROPERTY POSITION_INDEPENDENT_CODE ${BUILD_SHARED_LIBS}) target_include_directories(CosmoHDF5 BEFORE PRIVATE ${HDF5_INCLUDE_DIR}) else(HDF5_FOUND) From 6cafdd50b223932b7ee16aca65d30837fa3557cb Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Thu, 5 Aug 2021 08:50:31 +0300 Subject: [PATCH 35/89] Update to allow accumulators in CIC projection --- python/CMakeLists.txt | 35 +++++++---- python/_cosmotool.pyx | 137 ++++++++++++++++++++-------------------- python/_project.pyx | 143 ++++++++++++++++++++++-------------------- 3 files changed, 167 insertions(+), 148 deletions(-) diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index db4bc17..7eda7ac 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -8,32 +8,32 @@ IF(CYTHON) add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/_cosmotool.cpp COMMAND ${CYTHON} --cplus -o ${CMAKE_CURRENT_BINARY_DIR}/_cosmotool.cpp ${CMAKE_CURRENT_SOURCE_DIR}/_cosmotool.pyx - DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/_cosmotool.pyx) + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/_cosmotool.pyx) add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/_cosmo_power.cpp COMMAND ${CYTHON} --cplus -o ${CMAKE_CURRENT_BINARY_DIR}/_cosmo_power.cpp ${CMAKE_CURRENT_SOURCE_DIR}/_cosmo_power.pyx - DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/_cosmo_power.pyx) + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/_cosmo_power.pyx) add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/_fast_interp.cpp COMMAND ${CYTHON} --cplus -o ${CMAKE_CURRENT_BINARY_DIR}/_fast_interp.cpp ${CMAKE_CURRENT_SOURCE_DIR}/_fast_interp.pyx - DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/_fast_interp.pyx) + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/_fast_interp.pyx) add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/_cosmo_cic.cpp COMMAND ${CYTHON} --cplus -o ${CMAKE_CURRENT_BINARY_DIR}/_cosmo_cic.cpp ${CMAKE_CURRENT_SOURCE_DIR}/_cosmo_cic.pyx - DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/_cosmo_cic.pyx) + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/_cosmo_cic.pyx) add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/_project.cpp COMMAND ${CYTHON} --cplus -o ${CMAKE_CURRENT_BINARY_DIR}/_project.cpp ${CMAKE_CURRENT_SOURCE_DIR}/_project.pyx - DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/_project.pyx ${CMAKE_CURRENT_SOURCE_DIR}/project_tool.hpp ) + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/_project.pyx ${CMAKE_CURRENT_SOURCE_DIR}/project_tool.hpp ) add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/_cosmomath.cpp COMMAND ${CYTHON} --cplus -o ${CMAKE_CURRENT_BINARY_DIR}/_cosmomath.cpp ${CMAKE_CURRENT_SOURCE_DIR}/_cosmomath.pyx - DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/_cosmomath.pyx ) + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/_cosmomath.pyx ) ENDIF(CYTHON) @@ -43,11 +43,11 @@ add_library(_cosmo_cic MODULE ${CMAKE_CURRENT_BINARY_DIR}/_cosmo_cic.cpp) add_library(_fast_interp MODULE ${CMAKE_CURRENT_BINARY_DIR}/_fast_interp.cpp) add_library(_project MODULE ${CMAKE_CURRENT_BINARY_DIR}/_project.cpp) add_library(_cosmomath MODULE ${CMAKE_CURRENT_BINARY_DIR}/_cosmomath.cpp) -target_include_directories(_cosmotool PRIVATE ${PYTHON_INCLUDES}) -target_include_directories(_cosmo_power PRIVATE ${PYTHON_INCLUDES}) -target_include_directories(_cosmo_cic PRIVATE ${PYTHON_INCLUDES}) -target_include_directories(_fast_interp PRIVATE ${PYTHON_INCLUDES}) -target_include_directories(_project PRIVATE ${PYTHON_INCLUDES}) +target_include_directories(_cosmotool PRIVATE ${PYTHON_INCLUDES}) +target_include_directories(_cosmo_power PRIVATE ${PYTHON_INCLUDES}) +target_include_directories(_cosmo_cic PRIVATE ${PYTHON_INCLUDES}) +target_include_directories(_fast_interp PRIVATE ${PYTHON_INCLUDES}) +target_include_directories(_project PRIVATE ${PYTHON_INCLUDES}) target_include_directories(_cosmomath PRIVATE ${PYTHON_INCLUDES}) SET(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Bsymbolic-functions") @@ -114,10 +114,19 @@ endif (WIN32 AND NOT CYGWIN) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cosmotool/config.py.in ${CMAKE_CURRENT_BINARY_DIR}/cosmotool/config.py @ONLY) -INSTALL(TARGETS +INSTALL(TARGETS ${ct_TARGETS} + COMPONENT python LIBRARY DESTINATION ${PYTHON_SITE_PACKAGES}/cosmotool ) -INSTALL(DIRECTORY cosmotool ${CMAKE_CURRENT_BINARY_DIR}/cosmotool DESTINATION ${PYTHON_SITE_PACKAGES} +INSTALL(DIRECTORY cosmotool ${CMAKE_CURRENT_BINARY_DIR}/cosmotool + COMPONENT python DESTINATION ${PYTHON_SITE_PACKAGES} FILES_MATCHING PATTERN "*.py") + +add_custom_target( + python-install + DEPENDS ${ct_TARGETS} + COMMAND "${CMAKE_COMMAND}" -DCMAKE_INSTALL_COMPONENT=python -P + "${CMAKE_BINARY_DIR}/cmake_install.cmake") + diff --git a/python/_cosmotool.pyx b/python/_cosmotool.pyx index 3bfc88c..b2494bd 100644 --- a/python/_cosmotool.pyx +++ b/python/_cosmotool.pyx @@ -31,7 +31,7 @@ cdef extern from "loadSimu.hpp" namespace "CosmoTool": bool noAuto - cdef const int NEED_GADGET_ID + cdef const int NEED_GADGET_ID cdef const int NEED_POSITION cdef const int NEED_VELOCITY cdef const int NEED_TYPE @@ -57,36 +57,36 @@ class PySimulationBase(object): """ This is the base class to representation Simulation in CosmoTool/python. """ - + def getPositions(self): """ getPositions(self) - + Returns: - A list of three arrays holding the positions of the particles. + A list of three arrays holding the positions of the particles. The i-th element is the i-th coordinate of each particle. It may be None if the positions were not requested. """ raise NotImplementedError("getPositions is not implemented") - + def getVelocities(self): """ getVelocities(self) - + Returns: - A list of three arrays holding the velocities of the particles. + A list of three arrays holding the velocities of the particles. The i-th element is the i-th coordinate of each particle. It may be None if the velocities were not requested. """ raise NotImplementedError("getVelocities is not implemented") - + def getIdentifiers(self): """ getIdentifiers(self) - + Returns: Returns an integer array that hold the unique identifiers of - each particle. + each particle. It may be None if the identifiers were not requested. """ raise NotImplementedError("getIdentifiers is not implemented") @@ -94,10 +94,10 @@ class PySimulationBase(object): def getTypes(self): """ getTypes(self) - + Returns: Returns an integer array that hold the type of - each particle. + each particle. It may be None if the types were not requested. """ raise NotImplementedError("getTypes is not implemented") @@ -105,27 +105,27 @@ class PySimulationBase(object): def getOmega_M(self): """ getOmega_M(self) - + Returns: the mean matter density in the simulation, with respect to the critical density. - """ + """ raise NotImplementedError("getOmega_M is not implemented") - + def getOmega_Lambda(self): """ getOmega_Lambda(self) - + Returns: the mean dark energy density in the simulation, with respect to the critical density. - """ + """ raise NotImplementedError("getOmega_Lambda is not implemented") def getTime(self): """ getTime(self) - + Returns: the time the snapshot was taken in the simulation. It can have various units depending on the file format. @@ -135,7 +135,7 @@ class PySimulationBase(object): def getHubble(self): """ getHubble(self) - + Returns: the hubble constant in unit of 100 km/s/Mpc """ @@ -144,7 +144,7 @@ class PySimulationBase(object): def getBoxsize(self): """ getBoxsize(self) - + Returns: the size of the simulation box. The length unit is not fixed, though it is customary to have it in Mpc/h if the loader has @@ -155,7 +155,7 @@ class PySimulationBase(object): def getMasses(self): """ getMasses(self) - + Returns: an array with the masses of each particles, in unspecified unit that depend on the loader. @@ -165,7 +165,7 @@ class PySimulationBase(object): cdef class Simulation: """ Simulation() - + Class that directly manages internal loaded data obtained from a loader """ @@ -180,7 +180,7 @@ cdef class Simulation: property BoxSize: def __get__(Simulation self): return self.data.BoxSize - + property time: def __get__(Simulation self): return self.data.time @@ -192,15 +192,15 @@ cdef class Simulation: property Omega_M: def __get__(Simulation self): return self.data.Omega_M - + property Omega_Lambda: def __get__(Simulation self): return self.data.Omega_Lambda - + property positions: def __get__(Simulation self): return self.positions - + property velocities: def __get__(Simulation self): return self.velocities @@ -216,7 +216,7 @@ cdef class Simulation: property masses: def __get__(Simulation self): return self.masses - + property numParticles: def __get__(Simulation self): return self.data.NumPart @@ -228,7 +228,7 @@ cdef class Simulation: def __cinit__(Simulation self): self.data = 0 - + def __dealloc__(Simulation self): if self.data != 0: del self.data @@ -237,40 +237,43 @@ cdef class Simulation: class PySimulationAdaptor(PySimulationBase): """ PySimulationAdaptor(PySimulationBase_) - + This class is an adaptor for an internal type to the loader. It defines all the methods of PySimulationBase. - + Attributes: simu: a Simulation_ object """ def __init__(self,sim): self.simu = sim + def getNumParticles(self): + return self.simu.numParticles + def getBoxsize(self): return self.simu.BoxSize - + def getPositions(self): return self.simu.positions def getTypes(self): return self.simu.types - + def getVelocities(self): return self.simu.velocities - + def getIdentifiers(self): return self.simu.identifiers def getTime(self): return self.simu.time - + def getHubble(self): return self.simu.Hubble - + def getOmega_M(self): return self.simu.Omega_M - + def getOmega_Lambda(self): return self.simu.Omega_Lambda @@ -281,7 +284,7 @@ cdef class ArrayWrapper: cdef void* data_ptr cdef np.uint64_t size cdef int type_array - + cdef set_data(self, np.uint64_t size, int type_array, void* data_ptr): """ Set the data of the array This cannot be done in the constructor as it must recieve C-level @@ -294,22 +297,22 @@ cdef class ArrayWrapper: self.data_ptr = data_ptr self.size = size self.type_array = type_array - + def __array__(self): """ Here we use the __array__ method, that is called when numpy tries to get an array from the object.""" cdef np.npy_intp shape[1] - + shape[0] = self.size # Create a 1D array, of length 'size' ndarray = np.PyArray_SimpleNewFromData(1, shape, self.type_array, self.data_ptr) return ndarray - + def __dealloc__(self): """ Frees the array. This is called by Python when all the references to the object are gone. """ pass - + cdef object wrap_array(void *p, np.uint64_t s, int typ): cdef np.ndarray ndarray cdef ArrayWrapper wrapper @@ -319,7 +322,7 @@ cdef object wrap_array(void *p, np.uint64_t s, int typ): ndarray = np.array(wrapper, copy=False) ndarray.base = wrapper Py_INCREF(wrapper) - + return ndarray @@ -368,7 +371,7 @@ def loadGadget(str filename, int snapshot_id, int gadgetFormat = 1, bool loadPos """loadGadget(filename, snapshot_id, gadgetFormat = 1, loadPosition=True, loadVelocity=False, loadId=False, loadType=False) This function loads Gadget-1 snapshot format. - + If snapshot_id is negative then the snapshot is considered not to be part of a set of snapshots written by different cpu. Otherwise the filename is modified to reflect the indicated snapshot_id. @@ -376,16 +379,16 @@ def loadGadget(str filename, int snapshot_id, int gadgetFormat = 1, bool loadPos Arguments: filename (str): input filename snapshot_id (int): identifier of the gadget file if it is a multi-file snapshot - + Keyword arguments: loadPosition (bool): whether to load positions loadVelocity (bool): whether to load velocities loadId (bool): whether to load unique identifiers loadType (bool): whether to set types to particles loadMass (bool): whether to set the mass of particles - + Returns: - an PySimulationAdaptor instance. + an PySimulationAdaptor instance. """ cdef int flags @@ -419,13 +422,13 @@ def loadParallelGadget(object filename_list, int gadgetFormat = 1, bool loadPosi Arguments: filename (list): a list or tuple of filenames to load in parallel - + Keyword arguments: loadPosition (bool): indicate to load positions loadVelocity (bool): indicate to load velocities loadId (bool): indicate to load id loadType (bool): indicate to load particle types - + Returns: It loads a gadget-1 snapshot and return a cosmotool.PySimulationBase_ object. """ @@ -453,16 +456,16 @@ def loadParallelGadget(object filename_list, int gadgetFormat = 1, bool loadPosi data = alloc_simudata(num_files) for i,l in enumerate(filename_list): filenames[i] = l.encode('utf-8') - + with nogil: for i in prange(num_files): local_data = loadGadgetMulti_safe(filenames[i], flags, gadgetFormat) data[i] = local_data # data[i] = loadGadgetMulti(filenames[i].c_str(), -1, flags) - + out_arrays = [] for i in xrange(num_files): - if data[i] == 0: + if data[i] == 0: out_arrays.append(None) else: out_arrays.append(PySimulationAdaptor(wrap_simudata(data[i], flags))) @@ -473,10 +476,10 @@ def loadParallelGadget(object filename_list, int gadgetFormat = 1, bool loadPosi def writeGadget(str filename, object simulation): """writeGadget(filename, simulation) - - This function attempts to write the content of the simulation object into + + This function attempts to write the content of the simulation object into a file named `filename` using a Gadget-1 file format. - + Arguments: filename (str): output filename simulation (PySimulationBase): a simulation object @@ -486,23 +489,23 @@ def writeGadget(str filename, object simulation): cdef np.ndarray[np.int64_t, ndim=1] ids cdef np.int64_t NumPart cdef int j - + if not isinstance(simulation,PySimulationBase): raise TypeError("Second argument must be of type SimulationBase") - + NumPart = simulation.positions[0].size simdata.noAuto = True - + for j in xrange(3): pos = simulation.getPositions()[j] vel = simulation.getVelocities()[j] - + if pos.size != NumPart or vel.size != NumPart: raise ValueError("Invalid number of particles") - + simdata.Pos[j] = pos.data simdata.Vel[j] = vel.data - + ids = simulation.getIdentifiers() simdata.Id = ids.data simdata.BoxSize = simulation.getBoxsize() @@ -519,21 +522,21 @@ def writeGadget(str filename, object simulation): def loadRamses(str basepath, int snapshot_id, int cpu_id, bool doublePrecision = False, bool loadPosition = True, bool loadVelocity = False, bool loadId = False, bool loadMass = False): """ loadRamses(basepath, snapshot_id, cpu_id, doublePrecision = False, loadPosition = True, loadVelocity = False) Loads the indicated snapshot based on the cpu id, snapshot id and basepath. It is important to specify the correct precision in doublePrecision otherwise the loading will fail. There is no way of auto-detecting properly the precision of the snapshot file. - + Args: basepath (str): the base directory of the snapshot snapshot_id (int): the snapshot id cpu_id (int): the cpu id of the file to load - + Keyword args: doublePrecision (bool): By default it is False, thus singlePrecision loadPosition (bool): Whether to load positions loadVelocity (bool): Whether to load velocities loadId (bool): Whether to load identifiers - loadMass (bool): Whether to load mass value - + loadMass (bool): Whether to load mass value + Returns: - An object derived from PySimulationBase_. + An object derived from PySimulationBase_. """ cdef int flags cdef SimuData *data @@ -549,7 +552,7 @@ def loadRamses(str basepath, int snapshot_id, int cpu_id, bool doublePrecision = if loadMass: flags |= NEED_MASS - encpath = basepath.encode('utf-8') + encpath = basepath.encode('utf-8') try: data = loadRamsesSimu(encpath, snapshot_id, cpu_id, doublePrecision, flags) if data == 0: @@ -558,4 +561,4 @@ def loadRamses(str basepath, int snapshot_id, int cpu_id, bool doublePrecision = raise RuntimeError(str(e) + ' (check the float precision in snapshot)') return PySimulationAdaptor(wrap_simudata(data, flags)) - + diff --git a/python/_project.pyx b/python/_project.pyx index 6ff1d5c..bd64667 100644 --- a/python/_project.pyx +++ b/python/_project.pyx @@ -25,8 +25,8 @@ cdef extern from "openmp.hpp" namespace "CosmoTool": @cython.boundscheck(False) @cython.cdivision(True) @cython.wraparound(False) -cdef void interp3d_INTERNAL_periodic(DTYPE_t x, DTYPE_t y, - DTYPE_t z, +cdef void interp3d_INTERNAL_periodic(DTYPE_t x, DTYPE_t y, + DTYPE_t z, DTYPE_t[:,:,:] d, DTYPE_t Lbox, DTYPE_t *retval) nogil: cdef int Ngrid = d.shape[0] @@ -84,8 +84,8 @@ cdef void interp3d_INTERNAL_periodic(DTYPE_t x, DTYPE_t y, @cython.boundscheck(False) @cython.cdivision(True) @cython.wraparound(False) -cdef void ngp3d_INTERNAL_periodic(DTYPE_t x, DTYPE_t y, - DTYPE_t z, +cdef void ngp3d_INTERNAL_periodic(DTYPE_t x, DTYPE_t y, + DTYPE_t z, DTYPE_t[:,:,:] d, DTYPE_t Lbox, DTYPE_t *retval) nogil: cdef int Ngrid = d.shape[0] @@ -108,14 +108,14 @@ cdef void ngp3d_INTERNAL_periodic(DTYPE_t x, DTYPE_t y, iy = iy%Ngrid iz = iz%Ngrid - retval[0] = d[ix ,iy ,iz ] + retval[0] = d[ix ,iy ,iz ] @cython.boundscheck(False) @cython.cdivision(True) @cython.wraparound(False) -cdef void ngp3d_INTERNAL(DTYPE_t x, DTYPE_t y, - DTYPE_t z, +cdef void ngp3d_INTERNAL(DTYPE_t x, DTYPE_t y, + DTYPE_t z, DTYPE_t[:,:,:] d, DTYPE_t Lbox, DTYPE_t *retval, DTYPE_t inval) nogil: cdef int Ngrid = d.shape[0] @@ -137,16 +137,16 @@ cdef void ngp3d_INTERNAL(DTYPE_t x, DTYPE_t y, retval[0] = inval return - retval[0] = d[ix ,iy ,iz ] + retval[0] = d[ix ,iy ,iz ] @cython.boundscheck(False) @cython.cdivision(True) @cython.wraparound(False) -cdef void interp3d_INTERNAL(DTYPE_t x, DTYPE_t y, - DTYPE_t z, +cdef void interp3d_INTERNAL(DTYPE_t x, DTYPE_t y, + DTYPE_t z, DTYPE_t[:,:,:] d, DTYPE_t Lbox, DTYPE_t *retval, DTYPE_t inval) nogil: - + cdef int Ngrid = d.shape[0] cdef DTYPE_t inv_delta = Ngrid/Lbox cdef int ix, iy, iz @@ -193,13 +193,13 @@ cdef void interp3d_INTERNAL(DTYPE_t x, DTYPE_t y, d[ix+1,iy+1,iz+1] * f[1][1][1] @cython.boundscheck(False) -def interp3d(x not None, y not None, +def interp3d(x not None, y not None, z not None, npx.ndarray[DTYPE_t, ndim=3] d not None, DTYPE_t Lbox, bool periodic=False, bool centered=True, bool ngp=False, DTYPE_t inval = 0): """ interp3d(x,y,z,d,Lbox,periodic=False,centered=True,ngp=False) -> interpolated values - - Compute the tri-linear interpolation of the given field (d) at the given position (x,y,z). It assumes that they are box-centered coordinates. So (x,y,z) == (0,0,0) is equivalent to the pixel at (Nx/2,Ny/2,Nz/2) with Nx,Ny,Nz = d.shape. If periodic is set, it assumes the box is periodic + + Compute the tri-linear interpolation of the given field (d) at the given position (x,y,z). It assumes that they are box-centered coordinates. So (x,y,z) == (0,0,0) is equivalent to the pixel at (Nx/2,Ny/2,Nz/2) with Nx,Ny,Nz = d.shape. If periodic is set, it assumes the box is periodic """ cdef npx.ndarray[DTYPE_t] out cdef DTYPE_t[:] out_slice @@ -227,12 +227,12 @@ def interp3d(x not None, y not None, if type(x) == np.ndarray or type(y) == np.ndarray or type(z) == np.ndarray: if type(x) != np.ndarray or type(y) != np.ndarray or type(z) != np.ndarray: raise ValueError("All or no array. No partial arguments") - + ax = x ay = y az = z assert ax.size == ay.size and ax.size == az.size - + out = np.empty(x.shape, dtype=DTYPE) out_slice = out in_slice = d @@ -280,10 +280,10 @@ cdef DTYPE_t interp2d_INTERNAL_periodic(DTYPE_t x, DTYPE_t y, rx = (inv_delta*x + Ngrid/2) ry = (inv_delta*y + Ngrid/2) - + ix = int(floor(rx)) iy = int(floor(ry)) - + rx -= ix ry -= iy @@ -291,13 +291,13 @@ cdef DTYPE_t interp2d_INTERNAL_periodic(DTYPE_t x, DTYPE_t y, ix += Ngrid while iy < 0: iy += Ngrid - + jx = (ix+1)%Ngrid jy = (iy+1)%Ngrid - + assert ((ix >= 0) and ((jx) < Ngrid)) assert ((iy >= 0) and ((jy) < Ngrid)) - + f[0][0] = (1-rx)*(1-ry) f[1][0] = ( rx)*(1-ry) f[0][1] = (1-rx)*( ry) @@ -314,7 +314,7 @@ cdef DTYPE_t interp2d_INTERNAL_periodic(DTYPE_t x, DTYPE_t y, @cython.cdivision(True) cdef DTYPE_t interp2d_INTERNAL(DTYPE_t x, DTYPE_t y, npx.ndarray[DTYPE_t, ndim=2] d, DTYPE_t Lbox) except? 0: - + cdef int Ngrid = d.shape[0] cdef DTYPE_t inv_delta = Ngrid/Lbox cdef int ix, iy @@ -348,7 +348,7 @@ cdef DTYPE_t interp2d_INTERNAL(DTYPE_t x, DTYPE_t y, d[ix+1,iy ] * f[1][0] + \ d[ix ,iy+1] * f[0][1] + \ d[ix+1,iy+1] * f[1][1] - + def interp2d(x not None, y not None, npx.ndarray[DTYPE_t, ndim=2] d not None, DTYPE_t Lbox, bool periodic=False): @@ -362,11 +362,11 @@ def interp2d(x not None, y not None, if type(x) == np.ndarray or type(y) == np.ndarray: if type(x) != np.ndarray or type(y) != np.ndarray: raise ValueError("All or no array. No partial arguments") - + ax = x ay = y - assert ax.size == ay.size - + assert ax.size == ay.size + out = np.empty(x.shape, dtype=DTYPE) if periodic: for i in range(ax.size): @@ -381,8 +381,8 @@ def interp2d(x not None, y not None, return interp2d_INTERNAL_periodic(x, y, d, Lbox) else: return interp2d_INTERNAL(x, y, d, Lbox) - - + + @cython.boundscheck(False) @cython.cdivision(True) cdef void INTERNAL_project_cic_no_mass(DTYPE_t[:,:,:] g, @@ -450,7 +450,7 @@ cdef void INTERNAL_project_cic_no_mass_periodic(DTYPE_t[:,:,:] g, ag[b1[0],b[1],b[2]] += a[0]*c[1]*c[2] ag[b[0],b1[1],b[2]] += c[0]*a[1]*c[2] ag[b1[0],b1[1],b[2]] += a[0]*a[1]*c[2] - + ag[b[0],b[1],b1[2]] += c[0]*c[1]*a[2] ag[b1[0],b[1],b1[2]] += a[0]*c[1]*a[2] ag[b[0],b1[1],b1[2]] += c[0]*a[1]*a[2] @@ -525,20 +525,21 @@ cdef void INTERNAL_project_cic_with_mass_periodic(DTYPE_t[:,:,:] g, g[b1[0],b[1],b[2]] += a[0]*c[1]*c[2]*m0 g[b[0],b1[1],b[2]] += c[0]*a[1]*c[2]*m0 g[b1[0],b1[1],b[2]] += a[0]*a[1]*c[2]*m0 - + g[b[0],b[1],b1[2]] += c[0]*c[1]*a[2]*m0 g[b1[0],b[1],b1[2]] += a[0]*c[1]*a[2]*m0 g[b[0],b1[1],b1[2]] += c[0]*a[1]*a[2]*m0 g[b1[0],b1[1],b1[2]] += a[0]*a[1]*a[2]*m0 - -def project_cic(npx.ndarray[DTYPE_t, ndim=2] x not None, npx.ndarray[DTYPE_t, ndim=1] mass, int Ngrid, - double Lbox, bool periodic = False, centered=True): - """ - project_cic(x array (N,3), mass (may be None), Ngrid, Lbox, periodict, centered=True) - This function does a Cloud-In-Cell projection of a 3d unstructured dataset. First argument is a Nx3 array of coordinates. +def project_cic(npx.ndarray[DTYPE_t, ndim=2] x not None, npx.ndarray[DTYPE_t, ndim=1] mass, int Ngrid, + double Lbox, bool periodic = False, centered=True, output=None): + """ + project_cic(x array (N,3), mass (may be None), Ngrid, Lbox, periodict, centered=True, output=None) + + This function does a Cloud-In-Cell projection of a 3d unstructured dataset. First argument is a Nx3 array of coordinates. Second argument is an optinal mass. Ngrid is the size output grid and Lbox is the physical size of the grid. + if output is not None, it must be a numpy array with dimension NgridxNgridxNgrid. The result will be accumulated in that array. """ cdef npx.ndarray[DTYPE_t, ndim=3] g cdef double shifter @@ -558,7 +559,13 @@ def project_cic(npx.ndarray[DTYPE_t, ndim=2] x not None, npx.ndarray[DTYPE_t, nd if mass is not None and mass.shape[0] != x.shape[0]: raise ValueError("Mass array and coordinate array must have the same number of elements") - g = np.zeros((Ngrid,Ngrid,Ngrid),dtype=DTYPE) + if output is None: + g = np.zeros((Ngrid,Ngrid,Ngrid),dtype=DTYPE) + else: + if type(output) != np.ndarray: + raise ValueError("Invalid array type") + g = output + cdef DTYPE_t[:,:,:] d_g = g cdef DTYPE_t[:,:] d_x = x @@ -569,7 +576,7 @@ def project_cic(npx.ndarray[DTYPE_t, ndim=2] x not None, npx.ndarray[DTYPE_t, nd else: d_mass = mass with nogil: - INTERNAL_project_cic_with_mass(d_g, d_x, d_mass, Ngrid, Lbox, shifter) + INTERNAL_project_cic_with_mass(d_g, d_x, d_mass, Ngrid, Lbox, shifter) else: if mass is None: with nogil: @@ -577,13 +584,13 @@ def project_cic(npx.ndarray[DTYPE_t, ndim=2] x not None, npx.ndarray[DTYPE_t, nd else: d_mass = mass with nogil: - INTERNAL_project_cic_with_mass_periodic(d_g, d_x, d_mass, Ngrid, Lbox, shifter) - + INTERNAL_project_cic_with_mass_periodic(d_g, d_x, d_mass, Ngrid, Lbox, shifter) + return g def tophat_fourier_internal(npx.ndarray[DTYPE_t, ndim=1] x not None): cdef int i - cdef npx.ndarray[DTYPE_t] y + cdef npx.ndarray[DTYPE_t] y cdef DTYPE_t x0 y = np.empty(x.size, dtype=DTYPE) @@ -609,7 +616,7 @@ def tophat_fourier(x not None): return b.reshape(x.shape) - + @cython.boundscheck(False) @cython.cdivision(True) @@ -659,25 +666,25 @@ cdef DTYPE_t cube_integral_trilin(DTYPE_t u[3], DTYPE_t u0[3], int r[1], DTYPE_t if tmp_a < alpha_max: alpha_max = tmp_a j = i - + I = compute_projection(vertex_value, u, u0, alpha_max) - + for i in xrange(3): u0[i] += u[i]*alpha_max # alpha_max is the integration length # we integrate between 0 and alpha_max (curvilinear coordinates) r[0] = j - + return I @cython.boundscheck(False) cdef DTYPE_t integrator0(DTYPE_t[:,:,:] density, DTYPE_t u[3], DTYPE_t u0[3], int u_delta[3], int iu0[3], int jumper[1], DTYPE_t alpha_max) nogil: cdef DTYPE_t d - + d = density[iu0[0], iu0[1], iu0[2]] - + return cube_integral(u, u0, jumper, alpha_max)*d @cython.boundscheck(False) @@ -687,7 +694,7 @@ cdef DTYPE_t integrator1(DTYPE_t[:,:,:] density, cdef DTYPE_t d cdef int a[3][2] cdef int i - + for i in xrange(3): a[i][0] = iu0[i] a[i][1] = iu0[i]+1 @@ -705,14 +712,14 @@ cdef DTYPE_t integrator1(DTYPE_t[:,:,:] density, return cube_integral_trilin(u, u0, jumper, vertex_value, alpha_max) - + @cython.boundscheck(False) cdef DTYPE_t C_line_of_sight_projection(DTYPE_t[:,:,:] density, DTYPE_t a_u[3], DTYPE_t min_distance, DTYPE_t max_distance, DTYPE_t[:] shifter, int integrator_id) nogil except? 0: - cdef DTYPE_t u[3] + cdef DTYPE_t u[3] cdef DTYPE_t ifu0[3] cdef DTYPE_t u0[3] cdef DTYPE_t utot[3] @@ -724,7 +731,7 @@ cdef DTYPE_t C_line_of_sight_projection(DTYPE_t[:,:,:] density, cdef int completed cdef DTYPE_t I0, d, dist2, delta, s, max_distance2 cdef int jumper[1] - + cdef DTYPE_t (*integrator)(DTYPE_t[:,:,:], DTYPE_t u[3], DTYPE_t u0[3], int u_delta[3], int iu0[3], int jumper[1], DTYPE_t alpha_max) nogil @@ -747,7 +754,7 @@ cdef DTYPE_t C_line_of_sight_projection(DTYPE_t[:,:,:] density, if (not ((iu0[i]>= 0) and (iu0[i] < N))): with gil: raise RuntimeError("iu0[%d] = %d !!" % (i,iu0[i])) - + if (not (u0[i]>=0 and u0[i]<=1)): with gil: raise RuntimeError("u0[%d] = %g !" % (i,u0[i])) @@ -756,7 +763,7 @@ cdef DTYPE_t C_line_of_sight_projection(DTYPE_t[:,:,:] density, if ((iu0[0] >= N-1) or (iu0[0] <= 0) or (iu0[1] >= N-1) or (iu0[1] <= 0) or (iu0[2] >= N-1) or (iu0[2] <= 0)): - completed = 1 + completed = 1 I0 = 0 jumper[0] = 0 @@ -771,8 +778,8 @@ cdef DTYPE_t C_line_of_sight_projection(DTYPE_t[:,:,:] density, iu0[jumper[0]] += 1 u0[jumper[0]] = 0 - - if ((iu0[0] >= N-1) or (iu0[0] <= 0) or + + if ((iu0[0] >= N-1) or (iu0[0] <= 0) or (iu0[1] >= N-1) or (iu0[1] <= 0) or (iu0[2] >= N-1) or (iu0[2] <= 0)): completed = 1 @@ -787,7 +794,7 @@ cdef DTYPE_t C_line_of_sight_projection(DTYPE_t[:,:,:] density, #delta = sqrt(dist2) - max_distance #I0 -= d*delta completed = 1 - + return I0 def line_of_sight_projection(DTYPE_t[:,:,:] density not None, @@ -795,18 +802,18 @@ def line_of_sight_projection(DTYPE_t[:,:,:] density not None, DTYPE_t min_distance, DTYPE_t max_distance, DTYPE_t[:] shifter not None, int integrator_id=0): cdef DTYPE_t u[3] - + u[0] = a_u[0] u[1] = a_u[1] u[2] = a_u[2] - + return C_line_of_sight_projection(density, u, min_distance, max_distance, shifter, integrator_id) -cdef double _spherical_projloop(double theta, double phi, DTYPE_t[:,:,:] density, - double min_distance, double max_distance, +cdef double _spherical_projloop(double theta, double phi, DTYPE_t[:,:,:] density, + double min_distance, double max_distance, DTYPE_t[:] shifter, int integrator_id) nogil: cdef DTYPE_t u0[3] @@ -814,7 +821,7 @@ cdef double _spherical_projloop(double theta, double phi, DTYPE_t[:,:,:] density u0[0] = cos(phi)*stheta u0[1] = sin(phi)*stheta u0[2] = cos(theta) - + return C_line_of_sight_projection(density, u0, min_distance, max_distance, shifter, integrator_id) @@ -825,20 +832,20 @@ def spherical_projection(int Nside, DTYPE_t max_distance, int progress=1, int integrator_id=0, DTYPE_t[:] shifter = None, int booster=-1): """ spherical_projection(Nside, density, min_distance, max_distance, progress=1, integrator_id=0, shifter=None, booster=-1) - + Keyword arguments: progress (int): show progress if it is equal to 1 integrator_id (int): specify the order of integration along the line of shift shifter (DTYPE_t array): this is an array of size 3. It specifies the amount of shift to apply to the center, in unit of voxel booster (int): what is the frequency of refreshment of the progress bar. Small number decreases performance by locking the GIL. - + Arguments: Nside (int): Nside of the returned map density (NxNxN array): this is the density field, expressed as a cubic array min_distance (float): lower bound of the integration max_distance (float): upper bound of the integration - + Returns: an healpix map, as a 1-dimensional array. """ @@ -853,11 +860,11 @@ def spherical_projection(int Nside, cdef long N, N0 cdef double stheta cdef int tid - + if shifter is None: shifter = view.array(shape=(3,), format=FORMAT_DTYPE, itemsize=sizeof(DTYPE_t)) shifter[:] = 0 - + print("allocating map") outm_array = np.empty(hp.nside2npix(Nside),dtype=DTYPE) print("initializing views") @@ -870,10 +877,10 @@ def spherical_projection(int Nside, N = smp_get_max_threads() N0 = outm.size - + if booster < 0: booster = 1#000 - + job_done = view.array(shape=(N,), format="i", itemsize=sizeof(int)) job_done[:] = 0 theta,phi = hp.pix2ang(Nside, np.arange(N0)) From c9ac439dd5c2dec968b0124895551ea1632ea411 Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Thu, 5 Aug 2021 08:55:44 +0300 Subject: [PATCH 36/89] Correct exceptions and reformat --- src/yorick.hpp | 55 +++++++++++++++++++++++----------------------- src/yorick_nc4.cpp | 51 +++++++++++++++++++++--------------------- 2 files changed, 52 insertions(+), 54 deletions(-) diff --git a/src/yorick.hpp b/src/yorick.hpp index f38200e..dca3713 100644 --- a/src/yorick.hpp +++ b/src/yorick.hpp @@ -7,16 +7,16 @@ This software is a computer program whose purpose is to provide a toolbox for co data analysis (e.g. filters, generalized Fourier transforms, power spectra, ...) This software is governed by the CeCILL license under French law and -abiding by the rules of distribution of free software. You can use, +abiding by the rules of distribution of free software. You can use, modify and/ or redistribute the software under the terms of the CeCILL license as circulated by CEA, CNRS and INRIA at the following URL -"http://www.cecill.info". +"http://www.cecill.info". As a counterpart to the access to the source code and rights to copy, modify and redistribute granted by the license, users are provided only with a limited warranty and the software's author, the holder of the economic rights, and the successive licensors have only limited -liability. +liability. In this respect, the user's attention is drawn to the risks associated with loading, using, modifying and/or developing or reproducing the @@ -25,9 +25,9 @@ that may mean that it is complicated to manipulate, and that also therefore means that it is reserved for developers and experienced professionals having in-depth computer knowledge. Users are therefore encouraged to load and test the software's suitability as regards their -requirements in conditions enabling the security of their systems and/or -data to be ensured and, more generally, to use and operate it in the -same conditions as regards security. +requirements in conditions enabling the security of their systems and/or +data to be ensured and, more generally, to use and operate it in the +same conditions as regards security. The fact that you are presently reading this means that you have had knowledge of the CeCILL license and that you accept its terms. @@ -42,7 +42,7 @@ knowledge of the CeCILL license and that you accept its terms. #include -namespace CosmoTool +namespace CosmoTool { class ProgressiveDoubleOutputImpl @@ -75,7 +75,7 @@ namespace CosmoTool bool initialized; int *ref; ProgressiveDoubleOutputImpl *impl; - + friend ProgressiveDoubleOutput saveDoubleArrayProgressive(const char *fname, uint32_t *dimList, uint32_t rank); void decRef(); public: @@ -86,7 +86,7 @@ namespace CosmoTool virtual void addDouble(double a); - const ProgressiveDoubleOutput& operator=(const ProgressiveDoubleOutput& b); + const ProgressiveDoubleOutput& operator=(const ProgressiveDoubleOutput& b); }; template @@ -95,12 +95,12 @@ namespace CosmoTool private: int *ref; ProgressiveInputImpl *impl; - + void decRef() { if (ref == 0) return; - + (*ref)--; if (*ref == 0) { @@ -112,17 +112,17 @@ namespace CosmoTool } public: - static ProgressiveInput - loadArrayProgressive(const std::string& fname, uint32_t *&dimList, + static ProgressiveInput + loadArrayProgressive(const std::string& fname, uint32_t *&dimList, uint32_t& rank); ProgressiveInput() { - impl = 0; - ref = 0; + impl = 0; + ref = 0; } ProgressiveInput(ProgressiveInputImpl *i) { - impl = i; - ref = new int; + impl = i; + ref = new int; *ref = 1; } ProgressiveInput(const ProgressiveInput& o) { @@ -161,12 +161,12 @@ namespace CosmoTool private: int *ref; ProgressiveOutputImpl *impl; - + void decRef() { if (ref == 0) return; - + (*ref)--; if (*ref == 0) { @@ -178,17 +178,17 @@ namespace CosmoTool } public: - static ProgressiveOutput - saveArrayProgressive(const std::string& fname, uint32_t *dimList, + static ProgressiveOutput + saveArrayProgressive(const std::string& fname, uint32_t *dimList, uint32_t rank); ProgressiveOutput() { - impl = 0; - ref = 0; + impl = 0; + ref = 0; } ProgressiveOutput(ProgressiveOutputImpl *i) { - impl = i; - ref = new int; + impl = i; + ref = new int; *ref = 1; } ProgressiveOutput(const ProgressiveOutput& o) { @@ -222,10 +222,9 @@ namespace CosmoTool template void loadArray(const std::string& fname, - T*& array, uint32_t *& dimList, uint32_t& rank) - throw (NoSuchFileException); + T*& array, uint32_t *& dimList, uint32_t& rank); - ProgressiveDoubleOutput saveDoubleArrayProgressive(const char *fname, uint32_t *dimList, uint32_t rank); + ProgressiveDoubleOutput saveDoubleArrayProgressive(const char *fname, uint32_t *dimList, uint32_t rank); }; #endif diff --git a/src/yorick_nc4.cpp b/src/yorick_nc4.cpp index a0234df..e956438 100644 --- a/src/yorick_nc4.cpp +++ b/src/yorick_nc4.cpp @@ -7,16 +7,16 @@ This software is a computer program whose purpose is to provide a toolbox for co data analysis (e.g. filters, generalized Fourier transforms, power spectra, ...) This software is governed by the CeCILL license under French law and -abiding by the rules of distribution of free software. You can use, +abiding by the rules of distribution of free software. You can use, modify and/ or redistribute the software under the terms of the CeCILL license as circulated by CEA, CNRS and INRIA at the following URL -"http://www.cecill.info". +"http://www.cecill.info". As a counterpart to the access to the source code and rights to copy, modify and redistribute granted by the license, users are provided only with a limited warranty and the software's author, the holder of the economic rights, and the successive licensors have only limited -liability. +liability. In this respect, the user's attention is drawn to the risks associated with loading, using, modifying and/or developing or reproducing the @@ -25,9 +25,9 @@ that may mean that it is complicated to manipulate, and that also therefore means that it is reserved for developers and experienced professionals having in-depth computer knowledge. Users are therefore encouraged to load and test the software's suitability as regards their -requirements in conditions enabling the security of their systems and/or -data to be ensured and, more generally, to use and operate it in the -same conditions as regards security. +requirements in conditions enabling the security of their systems and/or +data to be ensured and, more generally, to use and operate it in the +same conditions as regards security. The fact that you are presently reading this means that you have had knowledge of the CeCILL license and that you accept its terms. @@ -53,7 +53,7 @@ public: vector counts; vector dimList; uint32_t rank; - + NetCDF_handle(NcFile *f, NcVar v, vector& dimList, uint32_t rank); virtual ~NetCDF_handle(); }; @@ -86,14 +86,14 @@ public: InputGenCDF(NcFile *f, NcVar v, vector& dimList, uint32_t rank) : NetCDF_handle(f,v,dimList,rank) {} - virtual ~InputGenCDF() {} + virtual ~InputGenCDF() {} virtual T read() { T a; curVar.getVar(curPos, counts, &a); - + curPos[rank-1]++; for (long i = rank-1; i >= 1; i--) { @@ -102,7 +102,7 @@ public: curPos[i-1]++; curPos[i] = 0; } - } + } return a; } @@ -120,12 +120,12 @@ public: OutputGenCDF(NcFile *f, NcVar v, vector& dimList, uint32_t rank) : NetCDF_handle(f,v,dimList,rank) {} - virtual ~OutputGenCDF() {} + virtual ~OutputGenCDF() {} virtual void put(T a) { curVar.putVar(curPos, counts, &a); - + curPos[rank-1]++; for (long i = rank-1; i >= 1; i--) { @@ -134,7 +134,7 @@ public: curPos[i-1]++; curPos[i] = 0; } - } + } } }; @@ -159,17 +159,17 @@ namespace CosmoTool { uint32_t rank) { NcFile *f = new NcFile(fname, NcFile::replace); - + vector dimArray; for (uint32_t i = 0; i < rank; i++) { char dimName[255]; - + sprintf(dimName, "dim%d", i); dimArray.push_back(f->addDim(dimName, dimList[rank-1-i])); } - - NcVar v = f->addVar("array", get_NetCDF_type(), dimArray); + + NcVar v = f->addVar("array", get_NetCDF_type(), dimArray); vector ldimList; @@ -177,7 +177,7 @@ namespace CosmoTool { ldimList.push_back(dimArray[i]); OutputGenCDF *impl = new OutputGenCDF(f, v, ldimList, rank); - return ProgressiveOutput(impl); + return ProgressiveOutput(impl); } template @@ -206,32 +206,31 @@ namespace CosmoTool { const T *array, uint32_t *dimList, uint32_t rank) { NcFile f(fname.c_str(), NcFile::replace); - + vector dimArray; for (uint32_t i = 0; i < rank; i++) { char dimName[255]; - + sprintf(dimName, "dim%d", i); dimArray.push_back(f.addDim(dimName, dimList[i])); } NcVar v = f.addVar("array", get_NetCDF_type(), dimArray); - + v.putVar(array); } template void loadArray(const std::string& fname, T*&array, uint32_t *&dimList, uint32_t& rank) - throw (NoSuchFileException) { NcFile f(fname.c_str(), NcFile::read); - + //if (!f.is_valid()) // throw NoSuchFileException(fname); - - NcVar v = f.getVar("array"); + + NcVar v = f.getVar("array"); vector dims = v.getDims(); rank = v.getDimCount(); uint32_t fullSize = 1; @@ -268,5 +267,5 @@ namespace CosmoTool { const float *array, uint32_t *dimList, uint32_t rank); template void saveArray(const std::string& fname, const double *array, uint32_t *dimList, uint32_t rank); - + } From 009fae24180cb046a8daf264efcae0340eb493ec Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Thu, 5 Aug 2021 08:00:19 +0200 Subject: [PATCH 37/89] Bump version --- CMakeLists.txt | 4 ++-- conda/meta.yaml | 2 +- setup.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c7b3581..068430b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -70,8 +70,8 @@ SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "A toolbox for impatient cosmologists") SET(CPACK_PACKAGE_VENDOR "Guilhem Lavaux") SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENCE_CeCILL_V2") SET(CPACK_PACKAGE_VERSION_MAJOR "1") -SET(CPACK_PACKAGE_VERSION_MINOR "2") -SET(CPACK_PACKAGE_VERSION_PATCH "3${EXTRA_VERSION}") +SET(CPACK_PACKAGE_VERSION_MINOR "3") +SET(CPACK_PACKAGE_VERSION_PATCH "0${EXTRA_VERSION}") SET(CPACK_PACKAGE_INSTALL_DIRECTORY "CosmoToolbox-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}") SET(CPACK_STRIP_FILES "lib/libCosmoTool.so") SET(CPACK_SOURCE_IGNORE_FILES diff --git a/conda/meta.yaml b/conda/meta.yaml index 333a565..3f62832 100644 --- a/conda/meta.yaml +++ b/conda/meta.yaml @@ -1,6 +1,6 @@ package: name: cosmotool - version: "1.2.3" + version: "1.3.0" source: git_rev: a86c9a8 diff --git a/setup.py b/setup.py index da984f3..8e9dabc 100644 --- a/setup.py +++ b/setup.py @@ -229,7 +229,7 @@ class BuildCMakeExt(build_ext): CosmoTool_extension = CMakeExtension(name="cosmotool") setup(name='cosmotool', - version='1.2.3', + version='1.3.0', packages=["cosmotool"], package_dir={'cosmotool': 'python/cosmotool'}, install_requires=['numpy','cffi','numexpr','pyfftw','h5py'], From b01543a02ae0abfc42992dcea4287c3b6d97e76b Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Fri, 15 Oct 2021 18:38:55 +0200 Subject: [PATCH 38/89] Use 64 bits instead of 32 bits --- sample/simple3DFilter.cpp | 6 +++--- src/mykdtree.hpp | 20 ++++++++++---------- src/mykdtree.tcc | 14 +++++++------- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/sample/simple3DFilter.cpp b/sample/simple3DFilter.cpp index 000c6b7..8683807 100644 --- a/sample/simple3DFilter.cpp +++ b/sample/simple3DFilter.cpp @@ -108,7 +108,7 @@ int main(int argc, char **argv) H5::H5File in_f(fname1, 0); H5::H5File out_f("fields.h5", H5F_ACC_TRUNC); array_type v1_data; - uint32_t N1_points, N2_points; + uint64_t N1_points, N2_points; array3_type bins(boost::extents[Nres][Nres][Nres]); @@ -124,12 +124,12 @@ int main(int argc, char **argv) MyCell *allCells_1 = new MyCell[N1_points]; #pragma omp parallel for schedule(static) - for (long i = 0; i < Nres*Nres*Nres; i++) + for (uint32_t i = 0; i < Nres*Nres*Nres; i++) bins.data()[i] = 0; cout << "Shuffling data in cells..." << endl; #pragma omp parallel for schedule(static) - for (int i = 0 ; i < N1_points; i++) + for (uint64_t i = 0 ; i < N1_points; i++) { for (int j = 0; j < 3; j++) allCells_1[i].coord[j] = v1_data[i][j]; diff --git a/src/mykdtree.hpp b/src/mykdtree.hpp index 1b36eea..6599c33 100644 --- a/src/mykdtree.hpp +++ b/src/mykdtree.hpp @@ -99,8 +99,8 @@ namespace CosmoTool { typename KDDef::CoordType r, r2; KDCell **cells; typename KDDef::CoordType *distances; - uint32_t currentRank; - uint32_t numCells; + uint64_t currentRank; + uint64_t numCells; }; @@ -114,7 +114,7 @@ namespace CosmoTool { RecursionMultipleInfo(const typename KDDef::KDCoordinates& rx, KDCell **cells, - uint32_t numCells) + uint64_t numCells) : queue(cells, numCells, INFINITY),traversed(0) { std::copy(rx, rx+N, x); @@ -153,20 +153,20 @@ namespace CosmoTool { std::copy(replicate, replicate+N, this->replicate); } - uint32_t getIntersection(const coords& x, CoordType r, + uint64_t getIntersection(const coords& x, CoordType r, Cell **cells, - uint32_t numCells); - uint32_t getIntersection(const coords& x, CoordType r, + uint64_t numCells); + uint64_t getIntersection(const coords& x, CoordType r, Cell **cells, CoordType *distances, - uint32_t numCells); - uint32_t countCells(const coords& x, CoordType r); + uint64_t numCells); + uint64_t countCells(const coords& x, CoordType r); Cell *getNearestNeighbour(const coords& x); - void getNearestNeighbours(const coords& x, uint32_t NumCells, + void getNearestNeighbours(const coords& x, uint64_t NumCells, Cell **cells); - void getNearestNeighbours(const coords& x, uint32_t NumCells, + void getNearestNeighbours(const coords& x, uint64_t NumCells, Cell **cells, CoordType *distances); diff --git a/src/mykdtree.tcc b/src/mykdtree.tcc index e3fbdc8..6d555bd 100644 --- a/src/mykdtree.tcc +++ b/src/mykdtree.tcc @@ -80,9 +80,9 @@ namespace CosmoTool { } template - uint32_t KDTree::getIntersection(const coords& x, CoordType r, + uint64_t KDTree::getIntersection(const coords& x, CoordType r, KDTree::Cell **cells, - uint32_t numCells) + uint64_t numCells) { RecursionInfoCells info; @@ -112,10 +112,10 @@ namespace CosmoTool { } template - uint32_t KDTree::getIntersection(const coords& x, CoordType r, + uint64_t KDTree::getIntersection(const coords& x, CoordType r, Cell **cells, CoordType *distances, - uint32_t numCells) + uint64_t numCells) { RecursionInfoCells info; @@ -144,7 +144,7 @@ namespace CosmoTool { } template - uint32_t KDTree::countCells(const coords& x, CoordType r) + uint64_t KDTree::countCells(const coords& x, CoordType r) { RecursionInfoCells info; @@ -501,7 +501,7 @@ namespace CosmoTool { } template - void KDTree::getNearestNeighbours(const coords& x, uint32_t N2, + void KDTree::getNearestNeighbours(const coords& x, uint64_t N2, Cell **cells) { RecursionMultipleInfo info(x, cells, N2); @@ -527,7 +527,7 @@ namespace CosmoTool { } template - void KDTree::getNearestNeighbours(const coords& x, uint32_t N2, + void KDTree::getNearestNeighbours(const coords& x, uint64_t N2, Cell **cells, CoordType *distances) { From c264f2c69d34147ea34a19b043ff74887bf4b0e4 Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Thu, 27 Jan 2022 13:36:19 +0100 Subject: [PATCH 39/89] Add output file argument --- sample/simple3DFilter.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sample/simple3DFilter.cpp b/sample/simple3DFilter.cpp index 000c6b7..a774519 100644 --- a/sample/simple3DFilter.cpp +++ b/sample/simple3DFilter.cpp @@ -86,8 +86,7 @@ void computeInterpolatedField(MyTree *tree1, double boxsize, int Nres, double cx int main(int argc, char **argv) { - - char *fname1, *fname2; + char *fname1, *outFile; double rLimit, boxsize, rLimit2, cx, cy, cz; int Nres; @@ -99,6 +98,7 @@ int main(int argc, char **argv) { "CX", &cx, MINIARG_DOUBLE }, { "CY", &cy, MINIARG_DOUBLE }, { "CZ", &cz, MINIARG_DOUBLE }, + { "OUTPUT FILE", &outFile, MINIARG_STRING }, { 0, 0, MINIARG_NULL } }; @@ -106,7 +106,7 @@ int main(int argc, char **argv) return 1; H5::H5File in_f(fname1, 0); - H5::H5File out_f("fields.h5", H5F_ACC_TRUNC); + H5::H5File out_f(outFile, H5F_ACC_TRUNC); array_type v1_data; uint32_t N1_points, N2_points; From 8ab094ad3d0ef1b58be7d653979c1616f64ba89b Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Thu, 27 Jan 2022 16:28:16 +0100 Subject: [PATCH 40/89] Bump version --- CMakeLists.txt | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 068430b..b61f220 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -71,7 +71,7 @@ SET(CPACK_PACKAGE_VENDOR "Guilhem Lavaux") SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENCE_CeCILL_V2") SET(CPACK_PACKAGE_VERSION_MAJOR "1") SET(CPACK_PACKAGE_VERSION_MINOR "3") -SET(CPACK_PACKAGE_VERSION_PATCH "0${EXTRA_VERSION}") +SET(CPACK_PACKAGE_VERSION_PATCH "1${EXTRA_VERSION}") SET(CPACK_PACKAGE_INSTALL_DIRECTORY "CosmoToolbox-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}") SET(CPACK_STRIP_FILES "lib/libCosmoTool.so") SET(CPACK_SOURCE_IGNORE_FILES diff --git a/setup.py b/setup.py index 8e9dabc..576e0d6 100644 --- a/setup.py +++ b/setup.py @@ -229,7 +229,7 @@ class BuildCMakeExt(build_ext): CosmoTool_extension = CMakeExtension(name="cosmotool") setup(name='cosmotool', - version='1.3.0', + version='1.3.1', packages=["cosmotool"], package_dir={'cosmotool': 'python/cosmotool'}, install_requires=['numpy','cffi','numexpr','pyfftw','h5py'], From d87541620004ef41fe6da51bb0013b288b018056 Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Sat, 29 Jan 2022 08:22:08 +0100 Subject: [PATCH 41/89] Tweaks for speed --- sample/simple3DFilter.cpp | 259 ++++++++++++++++++-------------------- src/sphSmooth.tcc | 4 +- 2 files changed, 128 insertions(+), 135 deletions(-) diff --git a/sample/simple3DFilter.cpp b/sample/simple3DFilter.cpp index e180742..e075b06 100644 --- a/sample/simple3DFilter.cpp +++ b/sample/simple3DFilter.cpp @@ -1,22 +1,22 @@ -#include "openmp.hpp" -#include "omptl/algorithm" -#include -#include "yorick.hpp" -#include "sphSmooth.hpp" -#include "mykdtree.hpp" -#include "miniargs.hpp" -#include #include "hdf5_array.hpp" -#include -#include +#include "miniargs.hpp" +#include "mykdtree.hpp" +#include "omptl/algorithm" +#include "openmp.hpp" +#include "sphSmooth.hpp" +#include "yorick.hpp" +#include #include +#include +#include +#include using namespace std; using namespace CosmoTool; #define N_SPH 32 -struct VCoord{ +struct VCoord { float v[3]; float mass; }; @@ -27,80 +27,73 @@ typedef boost::multi_array array_type; typedef boost::multi_array array3_type; typedef boost::multi_array array4_type; -ComputePrecision getVelocity(const VCoord& v, int i) -{ - return v.mass * v.v[i]; -} +ComputePrecision getVelocity(const VCoord &v, int i) { return v.mass * v.v[i]; } -ComputePrecision getMass(const VCoord& v) -{ - return v.mass; -} +ComputePrecision getMass(const VCoord &v) { return v.mass; } typedef SPHSmooth MySmooth; typedef MySmooth::SPHTree MyTree; typedef MyTree::Cell MyCell; -template -void computeInterpolatedField(MyTree *tree1, double boxsize, int Nres, double cx, double cy, double cz, - array3_type& bins, array3_type& arr, FuncT func, double rLimit2) -{ -#pragma omp parallel +template +void computeInterpolatedField(MyTree *tree1, double boxsize, int Nres, + double cx, double cy, double cz, + array3_type &bins, array3_type &arr, FuncT func, + double rLimit2) { + int rz_max = 0; +#pragma omp parallel shared(rz_max) { MySmooth smooth1(tree1, N_SPH); - -#pragma omp for schedule(dynamic) - for (int rz = 0; rz < Nres; rz++) - { - double pz = (rz)*boxsize/Nres-cz; - cout << format("[%d] %d / %d") % smp_get_thread_id() % rz % Nres << endl; - for (int ry = 0; ry < Nres; ry++) - { - double py = (ry)*boxsize/Nres-cy; - for (int rx = 0; rx < Nres; rx++) - { - double px = (rx)*boxsize/Nres-cx; - - MyTree::coords c = { float(px), float(py), float(pz) }; +#pragma omp for collapse(3) schedule(dynamic) + for (int rz = 0; rz < Nres; rz++) { - double r2 = c[0]*c[0]+c[1]*c[1]+c[2]*c[2]; - if (r2 > rLimit2) - { - arr[rx][ry][rz] = 0; - continue; - } - - uint32_t numInCell = bins[rx][ry][rz]; - if (numInCell > N_SPH) - smooth1.fetchNeighbours(c, numInCell); - else - smooth1.fetchNeighbours(c); - - arr[rx][ry][rz] = smooth1.computeSmoothedValue(c, func); - } + for (int ry = 0; ry < Nres; ry++) { + for (int rx = 0; rx < Nres; rx++) { + if (rz > rz_max) { + rz_max = rz; + cout << format("[%d] %d / %d") % smp_get_thread_id() % rz % Nres + << endl; } + double px = (rx)*boxsize / Nres - cx; + double py = (ry)*boxsize / Nres - cy; + double pz = (rz)*boxsize / Nres - cz; + + MyTree::coords c = {float(px), float(py), float(pz)}; + + double r2 = c[0] * c[0] + c[1] * c[1] + c[2] * c[2]; + if (r2 > rLimit2) { + arr[rx][ry][rz] = 0; + continue; + } + + uint32_t numInCell = bins[rx][ry][rz]; + if (numInCell > N_SPH) + smooth1.fetchNeighbours(c, numInCell); + else + smooth1.fetchNeighbours(c); + + arr[rx][ry][rz] = smooth1.computeSmoothedValue(c, func); + } } + } } } -int main(int argc, char **argv) -{ +int main(int argc, char **argv) { char *fname1, *outFile; double rLimit, boxsize, rLimit2, cx, cy, cz; int Nres; - MiniArgDesc args[] = { - { "INPUT DATA1", &fname1, MINIARG_STRING }, - { "RADIUS LIMIT", &rLimit, MINIARG_DOUBLE }, - { "BOXSIZE", &boxsize, MINIARG_DOUBLE }, - { "RESOLUTION", &Nres, MINIARG_INT }, - { "CX", &cx, MINIARG_DOUBLE }, - { "CY", &cy, MINIARG_DOUBLE }, - { "CZ", &cz, MINIARG_DOUBLE }, - { "OUTPUT FILE", &outFile, MINIARG_STRING }, - { 0, 0, MINIARG_NULL } - }; + MiniArgDesc args[] = {{"INPUT DATA1", &fname1, MINIARG_STRING}, + {"RADIUS LIMIT", &rLimit, MINIARG_DOUBLE}, + {"BOXSIZE", &boxsize, MINIARG_DOUBLE}, + {"RESOLUTION", &Nres, MINIARG_INT}, + {"CX", &cx, MINIARG_DOUBLE}, + {"CY", &cy, MINIARG_DOUBLE}, + {"CZ", &cz, MINIARG_DOUBLE}, + {"OUTPUT FILE", &outFile, MINIARG_STRING}, + {0, 0, MINIARG_NULL}}; if (!parseMiniArgs(argc, argv, args)) return 1; @@ -109,48 +102,48 @@ int main(int argc, char **argv) H5::H5File out_f(outFile, H5F_ACC_TRUNC); array_type v1_data; uint64_t N1_points, N2_points; - + array3_type bins(boost::extents[Nres][Nres][Nres]); - rLimit2 = rLimit*rLimit; + rLimit2 = rLimit * rLimit; hdf5_read_array(in_f, "particles", v1_data); assert(v1_data.shape()[1] == 7); N1_points = v1_data.shape()[0]; - + cout << "Got " << N1_points << " in the first file." << endl; MyCell *allCells_1 = new MyCell[N1_points]; - + #pragma omp parallel for schedule(static) - for (uint32_t i = 0; i < Nres*Nres*Nres; i++) + for (uint32_t i = 0; i < Nres * Nres * Nres; i++) bins.data()[i] = 0; cout << "Shuffling data in cells..." << endl; #pragma omp parallel for schedule(static) - for (uint64_t i = 0 ; i < N1_points; i++) - { - for (int j = 0; j < 3; j++) - allCells_1[i].coord[j] = v1_data[i][j]; - for (int k = 0; k < 3; k++) - allCells_1[i].val.pValue.v[k] = v1_data[i][3+k]; - allCells_1[i].val.pValue.mass = v1_data[i][6]; - allCells_1[i].active = true; - allCells_1[i].val.weight = 0.0; + for (uint64_t i = 0; i < N1_points; i++) { + for (int j = 0; j < 3; j++) + allCells_1[i].coord[j] = v1_data[i][j]; + for (int k = 0; k < 3; k++) + allCells_1[i].val.pValue.v[k] = v1_data[i][3 + k]; + allCells_1[i].val.pValue.mass = v1_data[i][6]; + allCells_1[i].active = true; + allCells_1[i].val.weight = 0.0; - long rx = floor((allCells_1[i].coord[0]+cx)*Nres/boxsize+0.5); - long ry = floor((allCells_1[i].coord[1]+cy)*Nres/boxsize+0.5); - long rz = floor((allCells_1[i].coord[2]+cz)*Nres/boxsize+0.5); - - if (rx < 0 || rx >= Nres || ry < 0 || ry >= Nres || rz < 0 || rz >= Nres) - continue; - -//#pragma omp atomic update - bins[rx][ry][rz]++; - } + long rx = floor((allCells_1[i].coord[0] + cx) * Nres / boxsize + 0.5); + long ry = floor((allCells_1[i].coord[1] + cy) * Nres / boxsize + 0.5); + long rz = floor((allCells_1[i].coord[2] + cz) * Nres / boxsize + 0.5); + + if (rx < 0 || rx >= Nres || ry < 0 || ry >= Nres || rz < 0 || rz >= Nres) + continue; + + auto &b = bins[rx][ry][rz]; +#pragma omp atomic + b++; + } v1_data.resize(boost::extents[1][1]); - + hdf5_write_array(out_f, "num_in_cell", bins); cout << "Building trees..." << endl; @@ -158,61 +151,59 @@ int main(int argc, char **argv) cout << "Creating smoothing filter..." << endl; -// array3_type out_rad_1(boost::extents[Nres][Nres][Nres]); - + // array3_type out_rad_1(boost::extents[Nres][Nres][Nres]); + cout << "Weighing..." << endl; -#pragma omp parallel + int rz_max = 0; +#pragma omp parallel shared(rz_max) { MySmooth smooth1(&tree1, N_SPH); - -#pragma omp for schedule(dynamic) - for (int rz = 0; rz < Nres; rz++) - { - double pz = (rz)*boxsize/Nres-cz; - (cout << rz << " / " << Nres << endl).flush(); - for (int ry = 0; ry < Nres; ry++) - { - double py = (ry)*boxsize/Nres-cy; - for (int rx = 0; rx < Nres; rx++) - { - double px = (rx)*boxsize/Nres-cx; - - MyTree::coords c = { float(px), float(py), float(pz) }; - - double r2 = c[0]*c[0]+c[1]*c[1]+c[2]*c[2]; - if (r2 > rLimit2) - { - continue; - } - - uint32_t numInCell = bins[rx][ry][rz]; - if (numInCell > N_SPH) - smooth1.fetchNeighbours(c, numInCell); - else - smooth1.fetchNeighbours(c); -#pragma omp critical - smooth1.addGridSite(c); - } +#pragma omp for collapse(3) schedule(dynamic, 8) + for (int rz = 0; rz < Nres; rz++) { + for (int ry = 0; ry < Nres; ry++) { + for (int rx = 0; rx < Nres; rx++) { + if (rz > rz_max) { + rz_max = rz; + (cout << rz << " / " << Nres << endl).flush(); } - (cout << " Done " << rz << endl).flush(); - } + double pz = (rz)*boxsize / Nres - cz; + double py = (ry)*boxsize / Nres - cy; + double px = (rx)*boxsize / Nres - cx; + + MyTree::coords c = {float(px), float(py), float(pz)}; + + double r2 = c[0] * c[0] + c[1] * c[1] + c[2] * c[2]; + if (r2 > rLimit2) { + continue; + } + + uint32_t numInCell = bins[rx][ry][rz]; + if (numInCell > N_SPH) + smooth1.fetchNeighbours(c, numInCell); + else + smooth1.fetchNeighbours(c); + smooth1.addGridSite(c); + } + } + } } - + cout << "Interpolating..." << endl; array3_type interpolated(boost::extents[Nres][Nres][Nres]); - - computeInterpolatedField(&tree1, boxsize, Nres, cx, cy, cz, - bins, interpolated, getMass, rLimit2); + + computeInterpolatedField(&tree1, boxsize, Nres, cx, cy, cz, bins, + interpolated, getMass, rLimit2); hdf5_write_array(out_f, "density", interpolated); - //out_f.flush(); + // out_f.flush(); for (int i = 0; i < 3; i++) { - computeInterpolatedField(&tree1, boxsize, Nres, cx, cy, cz, - bins, interpolated, boost::bind(getVelocity, _1, i), rLimit2); - hdf5_write_array(out_f, str(format("p%d") % i), interpolated); + computeInterpolatedField(&tree1, boxsize, Nres, cx, cy, cz, bins, + interpolated, boost::bind(getVelocity, _1, i), + rLimit2); + hdf5_write_array(out_f, str(format("p%d") % i), interpolated); } - + return 0; }; diff --git a/src/sphSmooth.tcc b/src/sphSmooth.tcc index 45a3c29..86ddca7 100644 --- a/src/sphSmooth.tcc +++ b/src/sphSmooth.tcc @@ -192,7 +192,9 @@ void SPHSmooth::addGridSite(const typename SPHTree::coords& c) { ComputePrecision d = internal.distances[i]; SPHCell& cell = *(internal.ngb[i]); - cell.val.weight += getKernel(d/internal.smoothRadius) / r3; + double kernel_value = getKernel(d/internal.smoothRadius) / r3; +#pragma omp atomic + cell.val.weight += kernel_value; } } From e2a2c7287c40f8877349405b22f25f8fd51d18fc Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Thu, 10 Feb 2022 07:20:21 +0100 Subject: [PATCH 42/89] Remove obsolete exception specification --- src/yorick_nc3.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/yorick_nc3.cpp b/src/yorick_nc3.cpp index b1f09e9..07064c9 100644 --- a/src/yorick_nc3.cpp +++ b/src/yorick_nc3.cpp @@ -260,7 +260,6 @@ namespace CosmoTool { template void loadArray(const std::string& fname, T*&array, uint32_t *&dimList, uint32_t& rank) - throw (NoSuchFileException) { NcFile f(fname.c_str(), NcFile::ReadOnly); From 59bb99e7eed502377ae66cff63ed055e80f793b2 Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Fri, 27 May 2022 16:26:59 +0300 Subject: [PATCH 43/89] Fix check of kdtree loading from disk --- src/mykdtree.tcc | 68 ++++++++++++++++++++++++------------------------ 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/src/mykdtree.tcc b/src/mykdtree.tcc index 6d555bd..6b6831d 100644 --- a/src/mykdtree.tcc +++ b/src/mykdtree.tcc @@ -33,7 +33,7 @@ namespace CosmoTool { template KDTree::KDTree(Cell *cells, NodeIntType Ncells) { - periodic = false; + periodic = false; base_cell = cells; numNodes = Ncells; @@ -41,7 +41,7 @@ namespace CosmoTool { sortingHelper = new Cell *[Ncells]; for (NodeIntType i = 0; i < Ncells; i++) - sortingHelper[i] = &cells[i]; + sortingHelper[i] = &cells[i]; optimize(); } @@ -73,14 +73,14 @@ namespace CosmoTool { absoluteMax[k] = cell->coord[k]; } } - + std::cout << " rebuilding the tree..." << std::endl; - root = buildTree(sortingHelper, activeCells, 0, absoluteMin, absoluteMax); + root = buildTree(sortingHelper, activeCells, 0, absoluteMin, absoluteMax); std::cout << " done." << std::endl; } template - uint64_t KDTree::getIntersection(const coords& x, CoordType r, + uint64_t KDTree::getIntersection(const coords& x, CoordType r, KDTree::Cell **cells, uint64_t numCells) { @@ -112,7 +112,7 @@ namespace CosmoTool { } template - uint64_t KDTree::getIntersection(const coords& x, CoordType r, + uint64_t KDTree::getIntersection(const coords& x, CoordType r, Cell **cells, CoordType *distances, uint64_t numCells) @@ -175,7 +175,7 @@ namespace CosmoTool { template template - void KDTree::recursiveIntersectionCells(RecursionInfoCells& info, + void KDTree::recursiveIntersectionCells(RecursionInfoCells& info, Node *node, int level) { @@ -183,7 +183,7 @@ namespace CosmoTool { CoordType d2 = 0; #if __KD_TREE_ACTIVE_CELLS == 1 - if (node->value->active) + if (node->value->active) #endif { for (int j = 0; j < 3; j++) @@ -250,9 +250,9 @@ namespace CosmoTool { } template - void KD_default_cell_splitter::operator()(KDCell **cells, NodeIntType Ncells, + void KD_default_cell_splitter::operator()(KDCell **cells, NodeIntType Ncells, NodeIntType& split_index, int axis, - typename KDDef::KDCoordinates minBound, + typename KDDef::KDCoordinates minBound, typename KDDef::KDCoordinates maxBound) { CellCompare compare(axis); @@ -279,9 +279,9 @@ namespace CosmoTool { //#pragma omp atomic capture nodeId = (this->lastNode)++; - + node = &nodes[nodeId]; - + // Isolate the environment splitter(cell0, Ncells, mid, axis, minBound, maxBound); @@ -297,12 +297,12 @@ namespace CosmoTool { { node->children[0] = buildTree(cell0, mid, depth, minBound, tmpBound); } - + memcpy(tmpBound, minBound, sizeof(coords)); tmpBound[axis] = node->value->coord[axis]; #pragma omp task private(tmpBound) { - node->children[1] = buildTree(cell0+mid+1, Ncells-mid-1, depth, + node->children[1] = buildTree(cell0+mid+1, Ncells-mid-1, depth, tmpBound, maxBound); } @@ -391,17 +391,17 @@ namespace CosmoTool { } return; } - + // Check if current node is not the nearest - CoordType thisR2 = + CoordType thisR2 = computeDistance(node->value, x); - + if (thisR2 < R2) { R2 = thisR2; best = node->value; - } - + } + // Now we found the best. We check whether the hypersphere // intersect the hyperplane of the other branch @@ -435,11 +435,11 @@ namespace CosmoTool { { coords x_new; r.getPosition(x_new); - recursiveNearest(root, 0, x_new, R2, best); + recursiveNearest(root, 0, x_new, R2, best); } while (r.next()); } - + return best; } @@ -474,15 +474,15 @@ namespace CosmoTool { { recursiveMultipleNearest(info, go, level+1); } - + // Check if current node is not the nearest - CoordType thisR2 = + CoordType thisR2 = computeDistance(node->value, info.x); info.queue.push(node->value, thisR2); info.traversed++; // if (go == 0) // return; - + // Now we found the best. We check whether the hypersphere // intersect the hyperplane of the other branch @@ -497,7 +497,7 @@ namespace CosmoTool { { recursiveMultipleNearest(info, other, level+1); } - } + } } template @@ -505,7 +505,7 @@ namespace CosmoTool { Cell **cells) { RecursionMultipleInfo info(x, cells, N2); - + for (int i = 0; i < N2; i++) cells[i] = 0; @@ -532,7 +532,7 @@ namespace CosmoTool { CoordType *distances) { RecursionMultipleInfo info(x, cells, N2); - + for (int i = 0; i < N2; i++) cells[i] = 0; @@ -555,14 +555,14 @@ namespace CosmoTool { #ifdef __KD_TREE_SAVE_ON_DISK #define KDTREE_DISK_SIGNATURE "KDTREE" #define KDTREE_DISK_SIGNATURE_LEN 7 - + template struct KDTreeOnDisk { long cell_id; long children_node[2]; typename KDDef::KDCoordinates minBound, maxBound; - }; + }; struct KDTreeHeader { @@ -619,7 +619,7 @@ namespace CosmoTool { { std::cerr << "KDTree Signature invalid" << std::endl; throw InvalidOnDiskKDTree(); - } + } if (h.numCells != Ncells || h.nodesUsed < 0) { std::cerr << "The number of cells has changed (" << h.numCells << " != " << Ncells << ") or nodesUsed=" << h.nodesUsed << std::endl; @@ -643,8 +643,8 @@ namespace CosmoTool { throw InvalidOnDiskKDTree(); } if (node_on_disk.cell_id > numNodes || node_on_disk.cell_id < 0 || - node_on_disk.children_node[0] > lastNode || node_on_disk.children_node[0] < -1 || - node_on_disk.children_node[1] > lastNode || node_on_disk.children_node[1] < -1) + (node_on_disk.children_node[0] >= 0 && node_on_disk.children_node[0] > lastNode) || node_on_disk.children_node[0] < -1 || + (node_on_disk.children_node[1] >= 0 && node_on_disk.children_node[1] > lastNode) || node_on_disk.children_node[1] < -1) { delete[] nodes; std::cerr << "Invalid cell id or children node id invalid" << std::endl; @@ -683,10 +683,10 @@ namespace CosmoTool { } root = &nodes[h.rootId]; - + sortingHelper = new Cell *[Ncells]; for (NodeIntType i = 0; i < Ncells; i++) - sortingHelper[i] = &cells[i]; + sortingHelper[i] = &cells[i]; } #endif From a309aa732bbd83439acb622840dcafcd42c2fc4e Mon Sep 17 00:00:00 2001 From: Ewoud Date: Thu, 9 Jun 2022 17:48:56 +0200 Subject: [PATCH 44/89] Fix for C++17: switch out random_shuffle for shuffle. For details see https://clang.llvm.org/extra/clang-tidy/checks/modernize-replace-random-shuffle.html --- external/patch-omptl | 57 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/external/patch-omptl b/external/patch-omptl index 9ea9d28..6ff7c7b 100644 --- a/external/patch-omptl +++ b/external/patch-omptl @@ -113,3 +113,60 @@ diff -ur omptl.old/omptl_tools.h omptl/omptl_tools.h namespace omptl { +diff -ur omptl.old/omptl_algorithm_par.h omptl/omptl_algorithm_par.h +--- omptl.old/omptl_algorithm_par.h 2012-04-22 16:29:41.000000000 +0200 ++++ omptl/omptl_algorithm_par.h 2022-06-09 13:50:05.000000000 +0200 +@@ -20,6 +20,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -1309,14 +1310,14 @@ + void random_shuffle(RandomAccessIterator first, RandomAccessIterator last, + const unsigned P) + { +- std::random_shuffle(first, last); ++ std::shuffle(first, last, std::mt19937(std::random_device()())); + } + + template + void random_shuffle(RandomAccessIterator first, RandomAccessIterator last, + RandomNumberGenerator& rgen, const unsigned P) + { +- std::random_shuffle(first, last, rgen); ++ std::shuffle(first, last, std::mt19937(std::random_device()())); + } + + // Not (yet) parallelized, not straightforward due to possible dependencies +diff -ur omptl.old/omptl_algorithm_ser.h omptl/omptl_algorithm_ser.h +--- omptl.old/omptl_algorithm_ser.h 2012-04-22 16:29:41.000000000 +0200 ++++ omptl/omptl_algorithm_ser.h 2022-06-09 13:50:41.000000000 +0200 +@@ -14,7 +14,7 @@ + // You should have received a copy of the GNU Lesser General Public + // License along with this library; if not, write to the Free Software + // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +- ++#include + + namespace omptl + { +@@ -463,14 +463,14 @@ + void random_shuffle(RandomAccessIterator first, RandomAccessIterator last, + const unsigned P) + { +- return ::std::random_shuffle(first, last); ++ return ::std::shuffle(first, last, std::mt19937(std::random_device()())); + } + + template + void random_shuffle(RandomAccessIterator first, RandomAccessIterator last, + RandomNumberGenerator &rgen, const unsigned P) + { +- return ::std::random_shuffle(first, last, rgen); ++ return ::std::shuffle(first, last, std::mt19937(std::random_device()())); + } + + template From cc94866bc3d5e91ea32cfa0b05a6557dbe3fc78e Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Sun, 19 Jun 2022 08:24:26 +0200 Subject: [PATCH 45/89] Remove bind2nd from omptl --- external/patch-omptl | 258 +++++++++++++++++++++++++++++++------------ 1 file changed, 186 insertions(+), 72 deletions(-) diff --git a/external/patch-omptl b/external/patch-omptl index 6ff7c7b..63df1d1 100644 --- a/external/patch-omptl +++ b/external/patch-omptl @@ -1,6 +1,6 @@ -diff -ur omptl.old/omptl_algorithm omptl/omptl_algorithm ---- omptl.old/omptl_algorithm 2012-04-22 16:29:41.000000000 +0200 -+++ omptl/omptl_algorithm 2021-06-20 15:40:29.000000000 +0200 +diff -ur omptl.old/algorithm omptl/algorithm +--- omptl.old/algorithm 2022-06-19 08:21:39.815498672 +0200 ++++ omptl/algorithm 2022-06-19 08:21:52.953544672 +0200 @@ -20,7 +20,7 @@ #define OMPTL_ALGORITHM 1 @@ -22,32 +22,9 @@ diff -ur omptl.old/omptl_algorithm omptl/omptl_algorithm #endif #endif /* OMPTL_ALGORITHM */ -diff -ur omptl.old/omptl_algorithm_par.h omptl/omptl_algorithm_par.h ---- omptl.old/omptl_algorithm_par.h 2012-04-22 16:29:41.000000000 +0200 -+++ omptl/omptl_algorithm_par.h 2021-06-20 15:40:50.000000000 +0200 -@@ -21,8 +21,8 @@ - #include - #include - --#include --#include -+#include "omptl_tools.h" -+#include "omptl_numeric" - - #include - -@@ -1700,7 +1700,7 @@ - - std::vector 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 +diff -ur omptl.old/numeric omptl/numeric +--- omptl.old/numeric 2022-06-19 08:21:39.816498675 +0200 ++++ omptl/numeric 2022-06-19 08:21:52.955544679 +0200 @@ -19,7 +19,7 @@ #define OMPTL_NUMERIC 1 @@ -72,58 +49,91 @@ diff -ur omptl.old/omptl_numeric omptl/omptl_numeric +#include "omptl_numeric_extensions.h" #endif /* OMPTL_NUMERIC */ -diff -ur omptl.old/omptl_numeric_extensions.h omptl/omptl_numeric_extensions.h ---- omptl.old/omptl_numeric_extensions.h 2012-04-22 16:29:41.000000000 +0200 -+++ omptl/omptl_numeric_extensions.h 2021-06-20 15:40:29.000000000 +0200 -@@ -51,9 +51,9 @@ - } // namespace +diff -ur omptl.old/omptl_algorithm omptl/omptl_algorithm +--- omptl.old/omptl_algorithm 2022-06-19 08:21:39.815498672 +0200 ++++ omptl/omptl_algorithm 2022-06-19 08:21:52.953544672 +0200 +@@ -20,7 +20,7 @@ + #define OMPTL_ALGORITHM 1 + + #include +-#include ++#include "omptl" + + namespace omptl + { +@@ -553,9 +553,9 @@ + } // namespace omptl #ifdef _OPENMP -- #include -+ #include "omptl_numeric_extensions_par.h" +- #include ++ #include "omptl_algorithm_par.h" #else -- #include -+ #include "omptl_numeric_extensions_ser.h" +- #include ++ #include "omptl_algorithm_ser.h" #endif - namespace omptl -diff -ur omptl.old/omptl_numeric_par.h omptl/omptl_numeric_par.h ---- omptl.old/omptl_numeric_par.h 2012-04-22 16:29:41.000000000 +0200 -+++ omptl/omptl_numeric_par.h 2021-06-20 15:40:29.000000000 +0200 -@@ -23,8 +23,8 @@ - #include - #include - --#include --#include -+#include "omptl_algorithm" -+#include "omptl_tools.h" - - namespace omptl - { -diff -ur omptl.old/omptl_tools.h omptl/omptl_tools.h ---- omptl.old/omptl_tools.h 2012-04-22 16:29:41.000000000 +0200 -+++ omptl/omptl_tools.h 2021-06-20 15:40:42.000000000 +0200 -@@ -25,7 +25,7 @@ - #include - #include - --#include -+#include - - namespace omptl - { + #endif /* OMPTL_ALGORITHM */ diff -ur omptl.old/omptl_algorithm_par.h omptl/omptl_algorithm_par.h ---- omptl.old/omptl_algorithm_par.h 2012-04-22 16:29:41.000000000 +0200 -+++ omptl/omptl_algorithm_par.h 2022-06-09 13:50:05.000000000 +0200 -@@ -20,6 +20,7 @@ +--- omptl.old/omptl_algorithm_par.h 2022-06-19 08:21:39.816498675 +0200 ++++ omptl/omptl_algorithm_par.h 2022-06-19 08:23:50.705956964 +0200 +@@ -20,9 +20,10 @@ #include #include #include +#include - #include - #include +-#include +-#include ++#include "omptl_tools.h" ++#include "omptl_numeric" + + #include + +@@ -510,7 +511,7 @@ + + typename std::vector::iterator result = + std::find_if(results.begin(),results.end(), +- std::bind2nd(std::not_equal_to(), last) ); ++ std::bind(std::not_equal_to(), std::placeholders::_1, last) ); + + if ( result != results.end() ) + return *result; +@@ -569,7 +570,7 @@ + + const typename std::vector::iterator result + = std::find_if(results.begin(), results.end(), +- std::bind2nd(std::not_equal_to(), last) ); ++ std::bind(std::not_equal_to(), std::placeholders::_1, last) ); + + if ( result != results.end() ) + return *result; +@@ -654,7 +655,7 @@ + + const typename std::vector::iterator + result = std::find_if(results.begin(), results.end(), +- std::bind2nd(std::not_equal_to(), last1)); ++ std::bind(std::not_equal_to(), std::placeholders::_1, last1)); + + if ( result != results.end() ) + return *result; +@@ -953,7 +954,7 @@ + results[t] = std::lower_bound(partitions[t].first, partitions[t].second, value, comp); + + const typename std::vector::iterator result = +- std::find_if(results.begin(), results.end(), std::bind2nd(std::not_equal_to(), last) ); ++ std::find_if(results.begin(), results.end(), std::bind(std::not_equal_to(), std::placeholders::_1, last) ); + + if (result != results.end()) + return *result; +@@ -1179,7 +1180,7 @@ + + namespace detail + { +- ++ + template + Iterator _pivot_range(Iterator first, Iterator last, + const typename std::iterator_traits::value_type pivot, @@ -1309,14 +1310,14 @@ void random_shuffle(RandomAccessIterator first, RandomAccessIterator last, const unsigned P) @@ -141,9 +151,45 @@ diff -ur omptl.old/omptl_algorithm_par.h omptl/omptl_algorithm_par.h } // Not (yet) parallelized, not straightforward due to possible dependencies +@@ -1472,7 +1473,7 @@ + const T& new_value, const unsigned P) + { + return ::omptl::replace_copy_if(first, last, result, +- std::bind2nd(std::equal_to(), old_value), new_value, P); ++ std::bind(std::equal_to(), std::placeholders::_1, old_value), new_value, P); + } + + template +@@ -1700,7 +1701,7 @@ + + std::vector 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) + { +@@ -1781,7 +1782,7 @@ + std::cout << std::endl; + + std::cout << borders.size() << " " << partitions.size() << " " << P << std::endl; +-*/ ++*/ + // Round one: sort final partitions, split remaining + #pragma omp parallel for + for (int i = 0; i < int(partitions.size()); ++i) +@@ -1814,7 +1815,7 @@ + + const RandomAccessIterator begin = partitions[i].first; + const RandomAccessIterator end = partitions[i].second; +- ++ + const RandomAccessIterator middle = + detail::_pivot_range(begin, end, pivots[pivot_index], comp); + partitions[i ] = std::make_pair(begin, middle); diff -ur omptl.old/omptl_algorithm_ser.h omptl/omptl_algorithm_ser.h ---- omptl.old/omptl_algorithm_ser.h 2012-04-22 16:29:41.000000000 +0200 -+++ omptl/omptl_algorithm_ser.h 2022-06-09 13:50:41.000000000 +0200 +--- omptl.old/omptl_algorithm_ser.h 2022-06-19 08:21:39.815498672 +0200 ++++ omptl/omptl_algorithm_ser.h 2022-06-19 08:21:52.960544697 +0200 @@ -14,7 +14,7 @@ // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software @@ -170,3 +216,71 @@ diff -ur omptl.old/omptl_algorithm_ser.h omptl/omptl_algorithm_ser.h } template +diff -ur omptl.old/omptl_numeric omptl/omptl_numeric +--- omptl.old/omptl_numeric 2022-06-19 08:21:39.816498675 +0200 ++++ omptl/omptl_numeric 2022-06-19 08:21:52.955544679 +0200 +@@ -19,7 +19,7 @@ + #define OMPTL_NUMERIC 1 + + #include +-#include ++#include "omptl" + + namespace omptl + { +@@ -73,11 +73,11 @@ + } // namespace omptl + + #ifdef _OPENMP +- #include ++ #include "omptl_numeric_par.h" + #else +- #include ++ #include "omptl_numeric_ser.h" + #endif + +-#include ++#include "omptl_numeric_extensions.h" + + #endif /* OMPTL_NUMERIC */ +diff -ur omptl.old/omptl_numeric_extensions.h omptl/omptl_numeric_extensions.h +--- omptl.old/omptl_numeric_extensions.h 2022-06-19 08:21:39.815498672 +0200 ++++ omptl/omptl_numeric_extensions.h 2022-06-19 08:21:52.956544683 +0200 +@@ -51,9 +51,9 @@ + } // namespace + + #ifdef _OPENMP +- #include ++ #include "omptl_numeric_extensions_par.h" + #else +- #include ++ #include "omptl_numeric_extensions_ser.h" + #endif + + namespace omptl +diff -ur omptl.old/omptl_numeric_par.h omptl/omptl_numeric_par.h +--- omptl.old/omptl_numeric_par.h 2022-06-19 08:21:39.816498675 +0200 ++++ omptl/omptl_numeric_par.h 2022-06-19 08:21:52.957544686 +0200 +@@ -23,8 +23,8 @@ + #include + #include + +-#include +-#include ++#include "omptl_algorithm" ++#include "omptl_tools.h" + + namespace omptl + { +diff -ur omptl.old/omptl_tools.h omptl/omptl_tools.h +--- omptl.old/omptl_tools.h 2022-06-19 08:21:39.816498675 +0200 ++++ omptl/omptl_tools.h 2022-06-19 08:21:52.957544686 +0200 +@@ -25,7 +25,7 @@ + #include + #include + +-#include ++#include + + namespace omptl + { From 31d0f194081efe4ae3c4f8109dd05c33056c8b4e Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Sun, 19 Jun 2022 10:53:45 +0200 Subject: [PATCH 46/89] Fix patch --- external/patch-omptl | 51 -------------------------------------------- 1 file changed, 51 deletions(-) diff --git a/external/patch-omptl b/external/patch-omptl index 63df1d1..1386247 100644 --- a/external/patch-omptl +++ b/external/patch-omptl @@ -1,54 +1,3 @@ -diff -ur omptl.old/algorithm omptl/algorithm ---- omptl.old/algorithm 2022-06-19 08:21:39.815498672 +0200 -+++ omptl/algorithm 2022-06-19 08:21:52.953544672 +0200 -@@ -20,7 +20,7 @@ - #define OMPTL_ALGORITHM 1 - - #include --#include -+#include "omptl" - - namespace omptl - { -@@ -553,9 +553,9 @@ - } // namespace omptl - - #ifdef _OPENMP -- #include -+ #include "omptl_algorithm_par.h" - #else -- #include -+ #include "omptl_algorithm_ser.h" - #endif - - #endif /* OMPTL_ALGORITHM */ -diff -ur omptl.old/numeric omptl/numeric ---- omptl.old/numeric 2022-06-19 08:21:39.816498675 +0200 -+++ omptl/numeric 2022-06-19 08:21:52.955544679 +0200 -@@ -19,7 +19,7 @@ - #define OMPTL_NUMERIC 1 - - #include --#include -+#include "omptl" - - namespace omptl - { -@@ -73,11 +73,11 @@ - } // namespace omptl - - #ifdef _OPENMP -- #include -+ #include "omptl_numeric_par.h" - #else -- #include -+ #include "omptl_numeric_ser.h" - #endif - --#include -+#include "omptl_numeric_extensions.h" - - #endif /* OMPTL_NUMERIC */ diff -ur omptl.old/omptl_algorithm omptl/omptl_algorithm --- omptl.old/omptl_algorithm 2022-06-19 08:21:39.815498672 +0200 +++ omptl/omptl_algorithm 2022-06-19 08:21:52.953544672 +0200 From f03751907b0671b7e79247bb14188c40f97ad988 Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Wed, 17 Aug 2022 08:57:52 +0300 Subject: [PATCH 47/89] Push compatibility to HDF5 1.12 --- src/h5_readFlash.cpp | 96 ++++++++++++++++++++------------------------ 1 file changed, 43 insertions(+), 53 deletions(-) diff --git a/src/h5_readFlash.cpp b/src/h5_readFlash.cpp index 8e46b89..6e2ec3a 100644 --- a/src/h5_readFlash.cpp +++ b/src/h5_readFlash.cpp @@ -7,16 +7,16 @@ This software is a computer program whose purpose is to provide a toolbox for co data analysis (e.g. filters, generalized Fourier transforms, power spectra, ...) This software is governed by the CeCILL license under French law and -abiding by the rules of distribution of free software. You can use, +abiding by the rules of distribution of free software. You can use, modify and/ or redistribute the software under the terms of the CeCILL license as circulated by CEA, CNRS and INRIA at the following URL -"http://www.cecill.info". +"http://www.cecill.info". As a counterpart to the access to the source code and rights to copy, modify and redistribute granted by the license, users are provided only with a limited warranty and the software's author, the holder of the economic rights, and the successive licensors have only limited -liability. +liability. In this respect, the user's attention is drawn to the risks associated with loading, using, modifying and/or developing or reproducing the @@ -25,9 +25,9 @@ that may mean that it is complicated to manipulate, and that also therefore means that it is reserved for developers and experienced professionals having in-depth computer knowledge. Users are therefore encouraged to load and test the software's suitability as regards their -requirements in conditions enabling the security of their systems and/or -data to be ensured and, more generally, to use and operate it in the -same conditions as regards security. +requirements in conditions enabling the security of their systems and/or +data to be ensured and, more generally, to use and operate it in the +same conditions as regards security. The fact that you are presently reading this means that you have had knowledge of the CeCILL license and that you accept its terms. @@ -59,8 +59,8 @@ int ipvz_out = 5; /* xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx */ -/* n*_runtime_parameters should be set by the caller to - the maximum number of runtime parameters to read. +/* n*_runtime_parameters should be set by the caller to + the maximum number of runtime parameters to read. */ void h5_read_runtime_parameters @@ -100,12 +100,12 @@ void h5_read_runtime_parameters nreal_runtime_parameters = MAX_PARM; /* integer runtime parameters */ - int_rt_parms = (int_runtime_params_t *) malloc(nint_runtime_parameters * sizeof(int_runtime_params_t)); + int_rt_parms = (int_runtime_params_t *) malloc(nint_runtime_parameters * sizeof(int_runtime_params_t)); rank = 1; DataSet dataset = file->openDataSet("integer runtime parameters"); - - IntType int_rt_type = dataset.getIntType(); + + IntType int_rt_type = dataset.getIntType(); //int_rt_type = H5Dget_type(dataset); DataSpace dataspace = dataset.getSpace(); @@ -123,10 +123,7 @@ void h5_read_runtime_parameters DataSpace memspace(rank, &dimens_1d); //memspace = H5Screate_simple(rank, &dimens_1d, NULL); - dataset.read(int_rt_parms, int_rt_type, memspace, dataspace, - H5P_DEFAULT); - //status = H5Dread(dataset, int_rt_type, memspace, dataspace, - // H5P_DEFAULT, int_rt_parms); + dataset.read(int_rt_parms, int_rt_type, memspace, dataspace); for (i = 0; i < nint_runtime_parameters; i++) { @@ -145,14 +142,14 @@ void h5_read_runtime_parameters /* reals */ - real_rt_parms = (real_runtime_params_t *) malloc(nreal_runtime_parameters * sizeof(real_runtime_params_t)); - + real_rt_parms = (real_runtime_params_t *) malloc(nreal_runtime_parameters * sizeof(real_runtime_params_t)); + rank = 1; dataset = file->openDataSet("real runtime parameters"); - //dataset = H5Dopen(*file_identifier, "real runtime parameters"); - + //dataset = H5Dopen(*file_identifier, "real runtime parameters"); + dataspace = dataset.getSpace(); - FloatType real_rt_type = dataset.getFloatType(); + FloatType real_rt_type = dataset.getFloatType(); ndims = dataspace.getSimpleExtentDims(&dimens_1d, NULL); //dataspace = H5Dget_space(dataset); //real_rt_type = H5Dget_type(dataset); @@ -167,10 +164,7 @@ void h5_read_runtime_parameters memspace = DataSpace(rank, &dimens_1d); //memspace = H5Screate_simple(rank, &dimens_1d, NULL); - dataset.read(real_rt_parms, real_rt_type, memspace, dataspace, - H5P_DEFAULT); - //status = H5Dread(dataset, real_rt_type, memspace, dataspace, -// H5P_DEFAULT, real_rt_parms); + dataset.read(real_rt_parms, real_rt_type, memspace, dataspace); for (i = 0; i < nreal_runtime_parameters; i++) { @@ -193,7 +187,7 @@ void h5_read_runtime_parameters *LBox = real_runtime_parameter_values[i]; } if (strncmp(real_runtime_parameter_names[i],"hubbleconstant", 14) == 0 ) { - *hubble = real_runtime_parameter_values[i]; + *hubble = real_runtime_parameter_values[i]; } if (strncmp(real_runtime_parameter_names[i],"omegamatter", 11) == 0 ) { *omegam = real_runtime_parameter_values[i]; @@ -205,7 +199,7 @@ void h5_read_runtime_parameters *omegalambda = real_runtime_parameter_values[i]; } } - + for (i = 0; i < nint_runtime_parameters; i++) { if (strncmp(int_runtime_parameter_names[i],"pt_numx",7) == 0 ) { *numPart = int_runtime_parameter_values[i]; @@ -214,7 +208,7 @@ void h5_read_runtime_parameters } } - + /* xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx*/ void h5_read_flash3_particles (H5File* file, int* totalparticles, @@ -241,8 +235,8 @@ void h5_read_flash3_particles (H5File* file, char *propName; double *partBuffer; char part_names[50][OUTPUT_PROP_LENGTH]; - int string_size; - + int string_size; + // char part_names[NPART_PROPS][OUTPUT_PROP_LENGTH]; hsize_t dimens_2d[2], maxdimens_2d[2]; hsize_t start_2d[2], count_2d[2], stride_2d[2]; @@ -265,12 +259,12 @@ void h5_read_flash3_particles (H5File* file, //total number of particle properties numProps = dimens_2d[0]; - + string_size = OUTPUT_PROP_LENGTH; StrType string_type = H5Tcopy(H5T_C_S1); string_type.setSize(string_size); //status = H5Tset_size(string_type, string_size); - + rank = 2; start_2d[0] = 0; @@ -282,22 +276,20 @@ void h5_read_flash3_particles (H5File* file, count_2d[0] = dimens_2d[0]; count_2d[1] = dimens_2d[1]; - dataspace.selectHyperslab(H5S_SELECT_SET, count_2d, start_2d); + dataspace.selectHyperslab(H5S_SELECT_SET, count_2d, start_2d); //status = H5Sselect_hyperslab(dataspace, H5S_SELECT_SET, start_2d, // stride_2d, count_2d, NULL); DataSpace memspace(rank, dimens_2d); //memspace = H5Screate_simple(rank, dimens_2d, NULL); - dataset.read(part_names, string_type, H5S_ALL, H5S_ALL, H5P_DEFAULT); - //status = H5Dread(dataset, string_type, H5S_ALL, H5S_ALL, - // H5P_DEFAULT, part_names); + dataset.read(part_names, string_type); + - string_type.close(); memspace.close(); dataspace.close(); - dataset.close(); + dataset.close(); //H5Tclose(string_type); //H5Sclose(memspace); //H5Sclose(dataspace); @@ -313,7 +305,7 @@ void h5_read_flash3_particles (H5File* file, if (strncmp(part_names[i], "velz", 4) == 0) { ipvz = i+1; } } - if ((iptag < 0) || (ipx < 0) || (ipy < 0) || (ipz < 0) || (ipvx < 0) || + if ((iptag < 0) || (ipx < 0) || (ipy < 0) || (ipz < 0) || (ipvx < 0) || (ipvy < 0) || (ipvz < 0) ) { printf("One or more required particle attributes not found in file!\n"); return; @@ -325,7 +317,7 @@ void h5_read_flash3_particles (H5File* file, //read particles dataset = file->openDataSet("tracer particles"); //dataset = H5Dopen(*file_identifier, "tracer particles"); - + FloatType datatype = dataset.getFloatType(); //datatype = H5Dget_type(dataset); @@ -338,7 +330,7 @@ void h5_read_flash3_particles (H5File* file, ndims = dataspace.getSimpleExtentDims(dimens_2d, NULL); //dataspace = H5Dget_space(dataset); //H5Sget_simple_extent_dims(dataspace, dimens_2d, maxdimens_2d); - + /*insert particle properties (numPartBuffer) particles at a time*/ pstack = (*localnp); poffset = 0; @@ -366,7 +358,7 @@ void h5_read_flash3_particles (H5File* file, dimens_2d[0] = (pcount); dimens_2d[1] = (numProps); - dataspace.selectHyperslab(H5S_SELECT_SET, count_2d, start_2d); + dataspace.selectHyperslab(H5S_SELECT_SET, count_2d, start_2d); //status = H5Sselect_hyperslab(dataspace, H5S_SELECT_SET, start_2d, // stride_2d, count_2d, NULL); @@ -374,8 +366,7 @@ void h5_read_flash3_particles (H5File* file, //memspace = H5Screate_simple(rank, dimens_2d, maxdimens_2d); /* read data from the dataset */ - dataset.read(partBuffer, datatype, memspace, dataspace, H5P_DEFAULT); - //status = H5Dread(dataset, datatype, memspace, dataspace, H5P_DEFAULT, partBuffer); + dataset.read(partBuffer, datatype, memspace, dataspace); /* convert buffer into particle struct */ @@ -391,8 +382,8 @@ void h5_read_flash3_particles (H5File* file, pos3[p+poffset] = (float) *(partBuffer+ipz-1+p*numProps); } } - - + + if (vel1 && vel2 && vel3) { for(p=0; p < (pcount); p++) { vel1[p+poffset] = (float) *(partBuffer+ipvx-1+p*numProps); @@ -423,7 +414,7 @@ void h5_read_flash3_particles (H5File* file, //status = H5Sclose(dataspace); //status = H5Dclose(dataset); } - + /*xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx*/ @@ -451,7 +442,7 @@ void h5_read_flash3_header_info(H5File* file, H5std_string DATASET_NAME; - string_type = H5Tcopy(H5T_C_S1); + string_type = H5Tcopy(H5T_C_S1); H5Tset_size(string_type, MAX_STRING_LENGTH); DataSet dataset = file->openDataSet("real scalars"); @@ -467,13 +458,13 @@ void h5_read_flash3_header_info(H5File* file, /* malloc a pointer to a list of real_list_t's */ real_list = (real_list_t *) malloc(dimens_1d * sizeof(real_list_t)); - // create a new simple dataspace of 1 dimension and size of 'dimens_1d' + // create a new simple dataspace of 1 dimension and size of 'dimens_1d' DataSpace memspace(1, &dimens_1d); - // create an empty vessel sized to hold one real_list_t's worth of data + // create an empty vessel sized to hold one real_list_t's worth of data CompType real_list_type( sizeof(real_list_t) ); - // subdivide the empty vessel into its component sections (name and value) + // subdivide the empty vessel into its component sections (name and value) real_list_type.insertMember( "name", HOFFSET(real_list_t, name), @@ -484,9 +475,8 @@ void h5_read_flash3_header_info(H5File* file, HOFFSET(real_list_t, value), PredType::NATIVE_DOUBLE); - // read the data into 'real_list' - dataset.read( real_list, real_list_type, memspace, dataspace, - H5P_DEFAULT); + // read the data into 'real_list' + dataset.read( real_list, real_list_type, memspace, dataspace); if (status < 0) { From b538d4974dc1a213cf8bcffb500dc415d8cf91f1 Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Tue, 15 Nov 2022 09:02:11 +0100 Subject: [PATCH 48/89] Add and fix support for parallel SPH state --- src/sphSmooth.hpp | 37 ++++++++++++++++++------------------ src/sphSmooth.tcc | 48 +++++++++++++++++++++++++---------------------- 2 files changed, 45 insertions(+), 40 deletions(-) diff --git a/src/sphSmooth.hpp b/src/sphSmooth.hpp index c364621..de3914c 100644 --- a/src/sphSmooth.hpp +++ b/src/sphSmooth.hpp @@ -7,16 +7,16 @@ This software is a computer program whose purpose is to provide a toolbox for co data analysis (e.g. filters, generalized Fourier transforms, power spectra, ...) This software is governed by the CeCILL license under French law and -abiding by the rules of distribution of free software. You can use, +abiding by the rules of distribution of free software. You can use, modify and/ or redistribute the software under the terms of the CeCILL license as circulated by CEA, CNRS and INRIA at the following URL -"http://www.cecill.info". +"http://www.cecill.info". As a counterpart to the access to the source code and rights to copy, modify and redistribute granted by the license, users are provided only with a limited warranty and the software's author, the holder of the economic rights, and the successive licensors have only limited -liability. +liability. In this respect, the user's attention is drawn to the risks associated with loading, using, modifying and/or developing or reproducing the @@ -25,9 +25,9 @@ that may mean that it is complicated to manipulate, and that also therefore means that it is reserved for developers and experienced professionals having in-depth computer knowledge. Users are therefore encouraged to load and test the software's suitability as regards their -requirements in conditions enabling the security of their systems and/or -data to be ensured and, more generally, to use and operate it in the -same conditions as regards security. +requirements in conditions enabling the security of their systems and/or +data to be ensured and, more generally, to use and operate it in the +same conditions as regards security. The fact that you are presently reading this means that you have had knowledge of the CeCILL license and that you accept its terms. @@ -69,13 +69,13 @@ namespace CosmoTool int currentNgb; ComputePrecision smoothRadius; }; - - + + SPHSmooth(SPHTree *tree, uint32_t Nsph); - virtual ~SPHSmooth(); + virtual ~SPHSmooth(); void fetchNeighbours(const typename SPHTree::coords& c, SPHState *state = 0); - + void fetchNeighbours(const typename SPHTree::coords& c, uint32_t newNsph); void fetchNeighboursOnVolume(const typename SPHTree::coords& c, ComputePrecision radius); const typename SPHTree::coords& getCurrentCenter() const @@ -85,13 +85,13 @@ namespace CosmoTool template ComputePrecision computeSmoothedValue(const typename SPHTree::coords& c, - FuncT fun, SPHState *state = 0); - + FuncT fun, SPHState *state = 0); + template ComputePrecision computeInterpolatedValue(const typename SPHTree::coords& c, FuncT fun, SPHState *state = 0); - - ComputePrecision getMaxDistance(const typename SPHTree::coords& c, + + ComputePrecision getMaxDistance(const typename SPHTree::coords& c, SPHNode *node) const; ComputePrecision getSmoothingLen() const @@ -108,11 +108,12 @@ namespace CosmoTool template void runForEachNeighbour(FuncT fun, SPHState *state = 0); + void addGridSite(const typename SPHTree::coords& c, SPHState *state); void addGridSite(const typename SPHTree::coords& c); bool hasNeighbours() const; - virtual ComputePrecision getKernel(ComputePrecision d) const; + virtual ComputePrecision getKernel(ComputePrecision d) const; SPHTree *getTree() { return tree; } @@ -125,20 +126,20 @@ namespace CosmoTool uint32_t getCurrent() const { return internal.currentNgb; } uint32_t getNgb() const { return maxNgb; } - + protected: SPHState internal; uint32_t Nsph; uint32_t deltaNsph; uint32_t maxNgb; SPHTree *tree; - + template ComputePrecision computeWValue(const typename SPHTree::coords & c, SPHCell& cell, CoordType d, FuncT fun, SPHState *state); - + template void runUnrollNode(SPHNode *node, FuncT fun); diff --git a/src/sphSmooth.tcc b/src/sphSmooth.tcc index 86ddca7..0f917a1 100644 --- a/src/sphSmooth.tcc +++ b/src/sphSmooth.tcc @@ -11,7 +11,7 @@ SPHSmooth::SPHSmooth(SPHTree *tree, uint32_t Nsph) internal.currentNgb = 0; this->maxNgb = Nsph; - internal.ngb = boost::shared_ptr(new SPHCell *[maxNgb]); + internal.ngb = boost::shared_ptr(new SPHCell *[maxNgb]); internal.distances = boost::shared_ptr(new CoordType[maxNgb]); } @@ -64,7 +64,7 @@ SPHSmooth::fetchNeighbours(const typename SPHTree::coords& c, uin max_dist = d2; } - internal.smoothRadius = max_dist / 2; + internal.smoothRadius = max_dist / 2; } template @@ -78,20 +78,20 @@ void SPHSmooth::fetchNeighbours(const typename SPHTree::coords& c state->ngb = boost::shared_ptr(new SPHCell *[Nsph]); } else state = &internal; - + memcpy(state->currentCenter, c, sizeof(c)); - + tree->getNearestNeighbours(c, requested, state->ngb.get(), state->distances.get()); state->currentNgb = 0; for (uint32_t i = 0; i < requested && state->ngb[i] != 0; i++,state->currentNgb++) { - d2 = internal.distances[i] = sqrt(internal.distances[i]); + d2 = state->distances[i] = sqrt(state->distances[i]); if (d2 > max_dist) max_dist = d2; } - state->smoothRadius = max_dist / 2; + state->smoothRadius = max_dist / 2; } @@ -114,18 +114,18 @@ SPHSmooth::fetchNeighboursOnVolume(const typename SPHTree::coords if (d2 > max_dist) max_dist = d2; } - internal.smoothRadius = max_dist / 2; -} + internal.smoothRadius = max_dist / 2; +} template template -ComputePrecision +ComputePrecision SPHSmooth::computeSmoothedValue(const typename SPHTree::coords& c, FuncT fun, SPHState *state) { if (state == 0) state = &internal; - + ComputePrecision outputValue = 0; ComputePrecision max_dist = 0; ComputePrecision r3 = cube(state->smoothRadius); @@ -152,7 +152,7 @@ ComputePrecision SPHSmooth::computeInterpolatedValue(const typena { if (state == 0) state = &internal; - + ComputePrecision outputValue = 0; ComputePrecision max_dist = 0; ComputePrecision weight = 0; @@ -163,7 +163,7 @@ ComputePrecision SPHSmooth::computeInterpolatedValue(const typena weight += computeWValue(c, *state->ngb[i], state->distances[i], interpolateOne); } - return (outputValue == 0) ? 0 : (outputValue / weight); + return (outputValue == 0) ? 0 : (outputValue / weight); } template @@ -172,34 +172,38 @@ void SPHSmooth::runForEachNeighbour(FuncT fun, SPHState *state) { if (state == 0) state = &internal; - + for (uint32_t i = 0; i < state->currentNgb; i++) { fun(state->ngb[i]); } } - template -void SPHSmooth::addGridSite(const typename SPHTree::coords& c) +void SPHSmooth::addGridSite(const typename SPHTree::coords& c, SPHState *state) { ComputePrecision outputValue = 0; ComputePrecision max_dist = 0; - - ComputePrecision r3 = cube(internal.smoothRadius); + ComputePrecision r3 = cube(state->smoothRadius); - for (uint32_t i = 0; i < internal.currentNgb; i++) + for (uint32_t i = 0; i < state->currentNgb; i++) { - ComputePrecision d = internal.distances[i]; - SPHCell& cell = *(internal.ngb[i]); - double kernel_value = getKernel(d/internal.smoothRadius) / r3; + ComputePrecision d = state->distances[i]; + SPHCell& cell = *(state->ngb[i]); + double kernel_value = getKernel(d/state->smoothRadius) / r3; #pragma omp atomic cell.val.weight += kernel_value; } } template -ComputePrecision +void SPHSmooth::addGridSite(const typename SPHTree::coords& c) +{ + addGridSite(c, &internal); +} + +template +ComputePrecision SPHSmooth::getKernel(ComputePrecision x) const { // WARNING !!! This is an unnormalized version of the kernel. From 4633f6edc9b56a145b2423a859b636456eead40b Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Wed, 16 Nov 2022 16:48:31 +0100 Subject: [PATCH 49/89] Reformat --- src/sphSmooth.hpp | 92 +++++++++++++++++++++-------------------------- 1 file changed, 41 insertions(+), 51 deletions(-) diff --git a/src/sphSmooth.hpp b/src/sphSmooth.hpp index de3914c..431d423 100644 --- a/src/sphSmooth.hpp +++ b/src/sphSmooth.hpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/sphSmooth.hpp) -- Copyright (C) Guilhem Lavaux (2007-2014) +This is CosmoTool (./src/sphSmooth.hpp) -- Copyright (C) Guilhem Lavaux (2007-2022) guilhem.lavaux@gmail.com @@ -39,30 +39,26 @@ knowledge of the CeCILL license and that you accept its terms. #include "config.hpp" #include "mykdtree.hpp" -namespace CosmoTool -{ +namespace CosmoTool { template - class SPHSmooth - { + class SPHSmooth { public: - typedef struct - { + typedef struct { ComputePrecision weight; ValType pValue; } FullType; - typedef KDTree SPHTree; - typedef KDTreeNode SPHNode; - typedef KDCell SPHCell; - typedef typename KDTree::CoordType CoordType; + typedef KDTree SPHTree; + typedef KDTreeNode SPHNode; + typedef KDCell SPHCell; + typedef typename KDTree::CoordType CoordType; - typedef ComputePrecision (*computeParticleValue)(const ValType& t); - typedef void (*runParticleValue)(ValType& t); + typedef ComputePrecision (*computeParticleValue)(const ValType &t); + typedef void (*runParticleValue)(ValType &t); public: typedef SPHCell *P_SPHCell; - struct SPHState - { + struct SPHState { boost::shared_ptr ngb; boost::shared_ptr distances; typename SPHTree::coords currentCenter; @@ -70,46 +66,40 @@ namespace CosmoTool ComputePrecision smoothRadius; }; - SPHSmooth(SPHTree *tree, uint32_t Nsph); virtual ~SPHSmooth(); - void fetchNeighbours(const typename SPHTree::coords& c, SPHState *state = 0); + void + fetchNeighbours(const typename SPHTree::coords &c, SPHState *state = 0); - void fetchNeighbours(const typename SPHTree::coords& c, uint32_t newNsph); - void fetchNeighboursOnVolume(const typename SPHTree::coords& c, ComputePrecision radius); - const typename SPHTree::coords& getCurrentCenter() const - { + void fetchNeighbours(const typename SPHTree::coords &c, uint32_t newNsph); + void fetchNeighboursOnVolume( + const typename SPHTree::coords &c, ComputePrecision radius); + const typename SPHTree::coords &getCurrentCenter() const { return internal.currentCenter; } - template - ComputePrecision computeSmoothedValue(const typename SPHTree::coords& c, - FuncT fun, SPHState *state = 0); + template + ComputePrecision computeSmoothedValue( + const typename SPHTree::coords &c, FuncT fun, SPHState *state = 0); - template - ComputePrecision computeInterpolatedValue(const typename SPHTree::coords& c, - FuncT fun, SPHState *state = 0); + template + ComputePrecision computeInterpolatedValue( + const typename SPHTree::coords &c, FuncT fun, SPHState *state = 0); - ComputePrecision getMaxDistance(const typename SPHTree::coords& c, - SPHNode *node) const; + ComputePrecision + getMaxDistance(const typename SPHTree::coords &c, SPHNode *node) const; - ComputePrecision getSmoothingLen() const - { - return internal.smoothRadius; - } + ComputePrecision getSmoothingLen() const { return internal.smoothRadius; } // TO USE WITH EXTREME CARE ! - void setSmoothingLen(ComputePrecision len) - { - internal.smoothRadius = len; - } + void setSmoothingLen(ComputePrecision len) { internal.smoothRadius = len; } // END - template + template void runForEachNeighbour(FuncT fun, SPHState *state = 0); - void addGridSite(const typename SPHTree::coords& c, SPHState *state); - void addGridSite(const typename SPHTree::coords& c); + void addGridSite(const typename SPHTree::coords &c, SPHState *state); + void addGridSite(const typename SPHTree::coords &c); bool hasNeighbours() const; @@ -134,21 +124,21 @@ namespace CosmoTool uint32_t maxNgb; SPHTree *tree; - template - ComputePrecision computeWValue(const typename SPHTree::coords & c, - SPHCell& cell, - CoordType d, - FuncT fun, SPHState *state); + template + ComputePrecision computeWValue( + const typename SPHTree::coords &c, SPHCell &cell, CoordType d, + FuncT fun, SPHState *state); - template - void runUnrollNode(SPHNode *node, - FuncT fun); + template + void runUnrollNode(SPHNode *node, FuncT fun); }; - template - bool operator<(const SPHSmooth& s1, const SPHSmooth& s2); + template + bool operator<( + const SPHSmooth &s1, + const SPHSmooth &s2); -}; +}; // namespace CosmoTool #include "sphSmooth.tcc" From fe06434619ded5e83e513a45205b13129fed28c7 Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Wed, 16 Nov 2022 16:48:40 +0100 Subject: [PATCH 50/89] Reformat --- src/sphSmooth.tcc | 310 ++++++++++++++++++++++------------------------ 1 file changed, 147 insertions(+), 163 deletions(-) diff --git a/src/sphSmooth.tcc b/src/sphSmooth.tcc index 0f917a1..fe61347 100644 --- a/src/sphSmooth.tcc +++ b/src/sphSmooth.tcc @@ -3,231 +3,215 @@ namespace CosmoTool { -template -SPHSmooth::SPHSmooth(SPHTree *tree, uint32_t Nsph) -{ - this->Nsph = Nsph; - this->tree = tree; - internal.currentNgb = 0; + template + SPHSmooth::SPHSmooth(SPHTree *tree, uint32_t Nsph) { + this->Nsph = Nsph; + this->tree = tree; + internal.currentNgb = 0; - this->maxNgb = Nsph; - internal.ngb = boost::shared_ptr(new SPHCell *[maxNgb]); - internal.distances = boost::shared_ptr(new CoordType[maxNgb]); -} + this->maxNgb = Nsph; + internal.ngb = boost::shared_ptr(new SPHCell *[maxNgb]); + internal.distances = boost::shared_ptr(new CoordType[maxNgb]); + } -template -SPHSmooth::~SPHSmooth() -{ -} + template + SPHSmooth::~SPHSmooth() {} -template -template -ComputePrecision SPHSmooth::computeWValue(const typename SPHTree::coords& c, - SPHCell& cell, - CoordType d, - FuncT fun, SPHState *state) -{ - CoordType weight; + template + template + ComputePrecision SPHSmooth::computeWValue( + const typename SPHTree::coords &c, SPHCell &cell, CoordType d, FuncT fun, + SPHState *state) { + CoordType weight; - d /= state->smoothRadius; - weight = getKernel(d); + d /= state->smoothRadius; + weight = getKernel(d); - if (cell.val.weight != 0) - return weight * fun(cell.val.pValue) / cell.val.weight; - else - return 0; -} + if (cell.val.weight != 0) + return weight * fun(cell.val.pValue) / cell.val.weight; + else + return 0; + } -template -void -SPHSmooth::fetchNeighbours(const typename SPHTree::coords& c, uint32_t newNngb) -{ - ComputePrecision d2, max_dist = 0; - uint32_t requested = newNngb; + template + void SPHSmooth::fetchNeighbours( + const typename SPHTree::coords &c, uint32_t newNngb) { + ComputePrecision d2, max_dist = 0; + uint32_t requested = newNngb; - if (requested > maxNgb) - { + if (requested > maxNgb) { maxNgb = requested; internal.ngb = boost::shared_ptr(new P_SPHCell[maxNgb]); - internal.distances = boost::shared_ptr(new CoordType[maxNgb]); + internal.distances = + boost::shared_ptr(new CoordType[maxNgb]); } - memcpy(internal.currentCenter, c, sizeof(c)); - tree->getNearestNeighbours(c, requested, (SPHCell **)internal.ngb.get(), (CoordType*)internal.distances.get()); + memcpy(internal.currentCenter, c, sizeof(c)); + tree->getNearestNeighbours( + c, requested, (SPHCell **)internal.ngb.get(), + (CoordType *)internal.distances.get()); - internal.currentNgb = 0; - for (uint32_t i = 0; i < requested && (internal.ngb)[i] != 0; i++,internal.currentNgb++) - { + internal.currentNgb = 0; + for (uint32_t i = 0; i < requested && (internal.ngb)[i] != 0; + i++, internal.currentNgb++) { internal.distances[i] = sqrt(internal.distances[i]); d2 = internal.distances[i]; if (d2 > max_dist) max_dist = d2; } - internal.smoothRadius = max_dist / 2; -} + internal.smoothRadius = max_dist / 2; + } -template -void SPHSmooth::fetchNeighbours(const typename SPHTree::coords& c, SPHState *state) -{ - ComputePrecision d2, max_dist = 0; - uint32_t requested = Nsph; + template + void SPHSmooth::fetchNeighbours( + const typename SPHTree::coords &c, SPHState *state) { + ComputePrecision d2, max_dist = 0; + uint32_t requested = Nsph; - if (state != 0) { - state->distances = boost::shared_ptr(new CoordType[Nsph]); - state->ngb = boost::shared_ptr(new SPHCell *[Nsph]); - } else - state = &internal; + if (state != 0) { + state->distances = boost::shared_ptr(new CoordType[Nsph]); + state->ngb = boost::shared_ptr(new SPHCell *[Nsph]); + } else + state = &internal; - memcpy(state->currentCenter, c, sizeof(c)); + memcpy(state->currentCenter, c, sizeof(c)); - tree->getNearestNeighbours(c, requested, state->ngb.get(), state->distances.get()); + tree->getNearestNeighbours( + c, requested, state->ngb.get(), state->distances.get()); - state->currentNgb = 0; - for (uint32_t i = 0; i < requested && state->ngb[i] != 0; i++,state->currentNgb++) - { + state->currentNgb = 0; + for (uint32_t i = 0; i < requested && state->ngb[i] != 0; + i++, state->currentNgb++) { d2 = state->distances[i] = sqrt(state->distances[i]); if (d2 > max_dist) max_dist = d2; } - state->smoothRadius = max_dist / 2; -} + state->smoothRadius = max_dist / 2; + } + template + void SPHSmooth::fetchNeighboursOnVolume( + const typename SPHTree::coords &c, ComputePrecision radius) { + uint32_t numPart; + ComputePrecision d2, max_dist = 0; -template -void -SPHSmooth::fetchNeighboursOnVolume(const typename SPHTree::coords& c, - ComputePrecision radius) -{ - uint32_t numPart; - ComputePrecision d2, max_dist = 0; + memcpy(internal.currentCenter, c, sizeof(c)); - memcpy(internal.currentCenter, c, sizeof(c)); + internal.currentNgb = tree->getIntersection( + c, radius, internal.ngb, internal.distances, maxNgb); - internal.currentNgb = tree->getIntersection(c, radius, internal.ngb, internal.distances, - maxNgb); - - for (uint32_t i = 0; i < internal.currentNgb; i++) - { + for (uint32_t i = 0; i < internal.currentNgb; i++) { d2 = internal.distances[i] = sqrt(internal.distances[i]); if (d2 > max_dist) max_dist = d2; } - internal.smoothRadius = max_dist / 2; -} + internal.smoothRadius = max_dist / 2; + } -template -template -ComputePrecision -SPHSmooth::computeSmoothedValue(const typename SPHTree::coords& c, - FuncT fun, SPHState *state) -{ - if (state == 0) - state = &internal; + template + template + ComputePrecision SPHSmooth::computeSmoothedValue( + const typename SPHTree::coords &c, FuncT fun, SPHState *state) { + if (state == 0) + state = &internal; - ComputePrecision outputValue = 0; - ComputePrecision max_dist = 0; - ComputePrecision r3 = cube(state->smoothRadius); + ComputePrecision outputValue = 0; + ComputePrecision max_dist = 0; + ComputePrecision r3 = cube(state->smoothRadius); - for (uint32_t i = 0; i < state->currentNgb; i++) - { - outputValue += computeWValue(c, *state->ngb[i], state->distances[i], fun, state); + for (uint32_t i = 0; i < state->currentNgb; i++) { + outputValue += + computeWValue(c, *state->ngb[i], state->distances[i], fun, state); } - return outputValue / r3; -} + return outputValue / r3; + } -template -ComputePrecision interpolateOne(const ValType& t) -{ - return 1.0; -} + template + ComputePrecision interpolateOne(const ValType &t) { + return 1.0; + } -// WARNING ! Cell's weight must be 1 !!! -template -template -ComputePrecision SPHSmooth::computeInterpolatedValue(const typename SPHTree::coords& c, - FuncT fun, SPHState *state) -{ - if (state == 0) - state = &internal; + // WARNING ! Cell's weight must be 1 !!! + template + template + ComputePrecision SPHSmooth::computeInterpolatedValue( + const typename SPHTree::coords &c, FuncT fun, SPHState *state) { + if (state == 0) + state = &internal; - ComputePrecision outputValue = 0; - ComputePrecision max_dist = 0; - ComputePrecision weight = 0; + ComputePrecision outputValue = 0; + ComputePrecision max_dist = 0; + ComputePrecision weight = 0; - for (uint32_t i = 0; i < state->currentNgb; i++) - { + for (uint32_t i = 0; i < state->currentNgb; i++) { outputValue += computeWValue(c, *state->ngb[i], state->distances[i], fun); - weight += computeWValue(c, *state->ngb[i], state->distances[i], interpolateOne); + weight += + computeWValue(c, *state->ngb[i], state->distances[i], interpolateOne); } - return (outputValue == 0) ? 0 : (outputValue / weight); -} + return (outputValue == 0) ? 0 : (outputValue / weight); + } -template -template -void SPHSmooth::runForEachNeighbour(FuncT fun, SPHState *state) -{ - if (state == 0) - state = &internal; + template + template + void + SPHSmooth::runForEachNeighbour(FuncT fun, SPHState *state) { + if (state == 0) + state = &internal; - for (uint32_t i = 0; i < state->currentNgb; i++) - { + for (uint32_t i = 0; i < state->currentNgb; i++) { fun(state->ngb[i]); } -} + } -template -void SPHSmooth::addGridSite(const typename SPHTree::coords& c, SPHState *state) -{ - ComputePrecision outputValue = 0; - ComputePrecision max_dist = 0; - ComputePrecision r3 = cube(state->smoothRadius); + template + void SPHSmooth::addGridSite( + const typename SPHTree::coords &c, SPHState *state) { + ComputePrecision outputValue = 0; + ComputePrecision max_dist = 0; + ComputePrecision r3 = cube(state->smoothRadius); - for (uint32_t i = 0; i < state->currentNgb; i++) - { + for (uint32_t i = 0; i < state->currentNgb; i++) { ComputePrecision d = state->distances[i]; - SPHCell& cell = *(state->ngb[i]); - double kernel_value = getKernel(d/state->smoothRadius) / r3; + SPHCell &cell = *(state->ngb[i]); + double kernel_value = getKernel(d / state->smoothRadius) / r3; #pragma omp atomic cell.val.weight += kernel_value; } -} + } -template -void SPHSmooth::addGridSite(const typename SPHTree::coords& c) -{ - addGridSite(c, &internal); -} + template + void + SPHSmooth::addGridSite(const typename SPHTree::coords &c) { + addGridSite(c, &internal); + } -template -ComputePrecision -SPHSmooth::getKernel(ComputePrecision x) const -{ - // WARNING !!! This is an unnormalized version of the kernel. - if (x < 1) - return 1 - 1.5 * x * x + 0.75 * x * x * x; - else if (x < 2) - { + template + ComputePrecision + SPHSmooth::getKernel(ComputePrecision x) const { + // WARNING !!! This is an unnormalized version of the kernel. + if (x < 1) + return 1 - 1.5 * x * x + 0.75 * x * x * x; + else if (x < 2) { ComputePrecision d = 2 - x; return 0.25 * d * d * d; - } - else - return 0; -} + } else + return 0; + } -template -bool SPHSmooth::hasNeighbours() const -{ - return (internal.currentNgb != 0); -} + template + bool SPHSmooth::hasNeighbours() const { + return (internal.currentNgb != 0); + } -template -bool operator<(const SPHSmooth& s1, const SPHSmooth& s2) -{ - return (s1.getSmoothingLen() < s2.getSmoothingLen()); -} + template + bool operator<( + const SPHSmooth &s1, + const SPHSmooth &s2) { + return (s1.getSmoothingLen() < s2.getSmoothingLen()); + } -}; +}; // namespace CosmoTool From 046e9a1447ba1fed957d1fe1e8b95c68adcca9a9 Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Thu, 17 Nov 2022 21:50:06 +0100 Subject: [PATCH 51/89] Reformat and add some adjoint gradient --- src/mykdtree.hpp | 34 +++++++++++++++++----------------- src/sphSmooth.hpp | 16 ++++++++++++++++ src/sphSmooth.tcc | 28 ++++++++++++++++++++++++++++ 3 files changed, 61 insertions(+), 17 deletions(-) diff --git a/src/mykdtree.hpp b/src/mykdtree.hpp index 6599c33..67908cf 100644 --- a/src/mykdtree.hpp +++ b/src/mykdtree.hpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/mykdtree.hpp) -- Copyright (C) Guilhem Lavaux (2007-2014) +This is CosmoTool (./src/mykdtree.hpp) -- Copyright (C) Guilhem Lavaux (2007-2022) guilhem.lavaux@gmail.com @@ -7,16 +7,16 @@ This software is a computer program whose purpose is to provide a toolbox for co data analysis (e.g. filters, generalized Fourier transforms, power spectra, ...) This software is governed by the CeCILL license under French law and -abiding by the rules of distribution of free software. You can use, +abiding by the rules of distribution of free software. You can use, modify and/ or redistribute the software under the terms of the CeCILL license as circulated by CEA, CNRS and INRIA at the following URL -"http://www.cecill.info". +"http://www.cecill.info". As a counterpart to the access to the source code and rights to copy, modify and redistribute granted by the license, users are provided only with a limited warranty and the software's author, the holder of the economic rights, and the successive licensors have only limited -liability. +liability. In this respect, the user's attention is drawn to the risks associated with loading, using, modifying and/or developing or reproducing the @@ -25,9 +25,9 @@ that may mean that it is complicated to manipulate, and that also therefore means that it is reserved for developers and experienced professionals having in-depth computer knowledge. Users are therefore encouraged to load and test the software's suitability as regards their -requirements in conditions enabling the security of their systems and/or -data to be ensured and, more generally, to use and operate it in the -same conditions as regards security. +requirements in conditions enabling the security of their systems and/or +data to be ensured and, more generally, to use and operate it in the +same conditions as regards security. The fact that you are presently reading this means that you have had knowledge of the CeCILL license and that you accept its terms. @@ -48,13 +48,13 @@ namespace CosmoTool { typedef uint64_t NodeIntType; - template + template struct KDDef { typedef CType CoordType; typedef float KDCoordinates[N]; }; - + template struct KDCell { @@ -102,7 +102,7 @@ namespace CosmoTool { uint64_t currentRank; uint64_t numCells; }; - + template class RecursionMultipleInfo @@ -121,7 +121,7 @@ namespace CosmoTool { } }; - template + template struct KD_default_cell_splitter { void operator()(KDCell **cells, NodeIntType Ncells, NodeIntType& split_index, int axis, typename KDDef::KDCoordinates minBound, typename KDDef::KDCoordinates maxBound); @@ -135,7 +135,7 @@ namespace CosmoTool { typedef typename KDDef::KDCoordinates coords; typedef KDCell Cell; typedef KDTreeNode Node; - + CellSplitter splitter; KDTree(Cell *cells, NodeIntType Ncells); @@ -153,10 +153,10 @@ namespace CosmoTool { std::copy(replicate, replicate+N, this->replicate); } - uint64_t getIntersection(const coords& x, CoordType r, + uint64_t getIntersection(const coords& x, CoordType r, Cell **cells, uint64_t numCells); - uint64_t getIntersection(const coords& x, CoordType r, + uint64_t getIntersection(const coords& x, CoordType r, Cell **cells, CoordType *distances, uint64_t numCells); @@ -183,7 +183,7 @@ namespace CosmoTool { NodeIntType getNumberInNode(const Node *n) const { return n->numNodes; } #else NodeIntType getNumberInNode(const Node *n) const { - if (n == 0) + if (n == 0) return 0; return 1+getNumberInNode(n->children[0])+getNumberInNode(n->children[1]); } @@ -211,7 +211,7 @@ namespace CosmoTool { uint32_t depth, coords minBound, coords maxBound); - + template void recursiveIntersectionCells(RecursionInfoCells& info, Node *node, @@ -224,7 +224,7 @@ namespace CosmoTool { CoordType& R2, Cell*& cell); void recursiveMultipleNearest(RecursionMultipleInfo& info, Node *node, - int level); + int level); }; diff --git a/src/sphSmooth.hpp b/src/sphSmooth.hpp index 431d423..fdada71 100644 --- a/src/sphSmooth.hpp +++ b/src/sphSmooth.hpp @@ -79,14 +79,30 @@ namespace CosmoTool { return internal.currentCenter; } + /** This is the pure SPH smoothing function. It does not reweight by the + * value computed at each grid site. + */ template ComputePrecision computeSmoothedValue( const typename SPHTree::coords &c, FuncT fun, SPHState *state = 0); + /** This is the weighted SPH smoothing function. It does reweight by the + * value computed at each grid site. This ensures the total sum of the interpolated + * quantity is preserved by interpolating to the target mesh. + */ template ComputePrecision computeInterpolatedValue( const typename SPHTree::coords &c, FuncT fun, SPHState *state = 0); + /** This is the adjoint gradient of computeInterpolatedValue w.r.t. to the value + * array. FuncT is expected to have the following prototype: + * void((CellValue defined by the user), ComputePrecision weighted_ag_value) + */ + template + void computeAdjointGradientSmoothedValue( + const typename SPHTree::coords &c, ComputePrecision ag_value, FuncT fun, + SPHState *state = 0); + ComputePrecision getMaxDistance(const typename SPHTree::coords &c, SPHNode *node) const; diff --git a/src/sphSmooth.tcc b/src/sphSmooth.tcc index fe61347..c163feb 100644 --- a/src/sphSmooth.tcc +++ b/src/sphSmooth.tcc @@ -134,6 +134,34 @@ namespace CosmoTool { return 1.0; } + template + template + void SPHSmooth::computeAdjointGradientSmoothedValue( + const typename SPHTree::coords &c, ComputePrecision ag_value, FuncT fun, + SPHState *state) { + if (state == 0) + state = &internal; + + ComputePrecision outputValue = 0; + ComputePrecision max_dist = 0; + ComputePrecision weight = 0; + + for (uint32_t i = 0; i < state->currentNgb; i++) { + weight += + computeWValue(c, *state->ngb[i], state->distances[i], interpolateOne); + } + + for (uint32_t i = 0; i < state->currentNgb; i++) { + auto &cell = *state->ngb[i]; + double partial_ag = + computeWValue( + c, cell, state->distances[i], + [ag_value](ComputePrecision) { return ag_value; }) / + weight; + fun(cell.val.pValue, ag_value); + } + } + // WARNING ! Cell's weight must be 1 !!! template template From f79d7f6830f627c145ad37cc368478e1ce437477 Mon Sep 17 00:00:00 2001 From: Eleni Date: Thu, 1 Dec 2022 17:03:02 +0100 Subject: [PATCH 52/89] added BAO wiggles --- src/cosmopower.cpp | 23 +++++++++++++++++++++++ src/cosmopower.hpp | 4 +++- 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/src/cosmopower.cpp b/src/cosmopower.cpp index 5e58c2c..6108b8c 100644 --- a/src/cosmopower.cpp +++ b/src/cosmopower.cpp @@ -212,6 +212,26 @@ double CosmoPower::powerHuWiggles(double k) return normPower * pow(k,n) * T_k * T_k; } +double CosmoPower::sample_BAO(double k) +{ + // BAO wiggle parameterization for reconstruction + // Babic et al. 2022, https://arxiv.org/abs/2203.06177 + + // No-wiggle transfer function + + double ps_no_wiggle = powerHuBaryons(k); + + // Wiggle parameterization + + double A = 0; + double r_s = 10; + double k_D = 2 * M_PI / 100; + + double param = 1 + A * sin(k * r_s) * exp(- k / k_D); + + return ps_no_wiggle * param; + } + double CosmoPower::primordialPowerSpectrum(double k) { //Primordial power spectrum, needed for PNG @@ -444,6 +464,9 @@ void CosmoPower::setFunction(CosmoFunction f) case POWER_SUGIYAMA: eval = &CosmoPower::powerSugiyama; break; + case SAMPLE_WIGGLES: + eval = &CosmoPower::sample_BAO; + break; case POWER_BDM: eval = &CosmoPower::powerBDM; break; diff --git a/src/cosmopower.hpp b/src/cosmopower.hpp index ba0bffc..7b02f5f 100644 --- a/src/cosmopower.hpp +++ b/src/cosmopower.hpp @@ -89,7 +89,8 @@ namespace CosmoTool { POWER_SUGIYAMA, POWER_BDM, POWER_TEST, - HU_WIGGLES_ORIGINAL + HU_WIGGLES_ORIGINAL, + SAMPLE_WIGGLES }; CosmoPower(); @@ -122,6 +123,7 @@ namespace CosmoTool { double powerBDM(double k); double powerTest(double k); double powerHuWigglesOriginal(double k); + double sample_BAO(double k); }; }; From 2cc11b36332b0a513e3f9aeb8db02161fe67dba8 Mon Sep 17 00:00:00 2001 From: Eleni Date: Thu, 1 Dec 2022 18:52:18 +0100 Subject: [PATCH 53/89] wiggle parameterization --- src/cosmopower.cpp | 16 ++++++++++++++++ src/cosmopower.hpp | 4 +++- src/powerSpectrum.cpp | 26 ++++++++++++++++++++++++++ 3 files changed, 45 insertions(+), 1 deletion(-) diff --git a/src/cosmopower.cpp b/src/cosmopower.cpp index 6108b8c..c8acd75 100644 --- a/src/cosmopower.cpp +++ b/src/cosmopower.cpp @@ -269,6 +269,19 @@ double CosmoPower::matterTransferFunctionHu(double k) return T_k; } +double CosmoPower::noWiggleTk(double k) +{ + double s = 44.5 * log(9.83 / OmegaEff) / (sqrt(1 + 10 * pow(OMEGA_B * h * h, 0.75))); + double alpha_Gamma = 1 - 0.328 * log(431 * OmegaEff) * OMEGA_B / OMEGA_0 + 0.38 * log(22.3 * OmegaEff) * pow(OMEGA_B / OMEGA_0, 2); + double GammaEff = OMEGA_0 * h * (alpha_Gamma + (1 - alpha_Gamma)/(1 + pow(0.43 * k * s, 4))); + double q = k/(h*GammaEff) * pow(Theta_27, 2); + double L_0 = log(2 * M_E + 1.8 * q); + double C_0 = 14.2 + 731 / (1 + 62.5 * q); + double T0 = L_0 / (L_0 + C_0 * q * q); + + return T0; +} + double CosmoPower::powerHuBaryons(double k) { double s = 44.5 * log(9.83 / OmegaEff) / (sqrt(1 + 10 * pow(OMEGA_B * h * h, 0.75))); @@ -473,6 +486,9 @@ void CosmoPower::setFunction(CosmoFunction f) case POWER_TEST: eval = &CosmoPower::powerTest; break; + case NOWIGGLE_TK: + eval = &CosmoPower::noWiggleTk; + break; default: abort(); } diff --git a/src/cosmopower.hpp b/src/cosmopower.hpp index 7b02f5f..5ed9b61 100644 --- a/src/cosmopower.hpp +++ b/src/cosmopower.hpp @@ -90,7 +90,8 @@ namespace CosmoTool { POWER_BDM, POWER_TEST, HU_WIGGLES_ORIGINAL, - SAMPLE_WIGGLES + SAMPLE_WIGGLES, + NOWIGGLE_TK }; CosmoPower(); @@ -124,6 +125,7 @@ namespace CosmoTool { double powerTest(double k); double powerHuWigglesOriginal(double k); double sample_BAO(double k); + double noWiggleTk(double k); }; }; diff --git a/src/powerSpectrum.cpp b/src/powerSpectrum.cpp index 777654c..7786080 100644 --- a/src/powerSpectrum.cpp +++ b/src/powerSpectrum.cpp @@ -58,6 +58,7 @@ using namespace std; #define POWER_TEST 8 #define POWER_SPECTRUM POWER_EFSTATHIOU +#define SAMPLE_WIGGLES 9 namespace Cosmology { @@ -206,6 +207,31 @@ double powG(double y) */ double powerSpectrum(double k, double normPower) { +#if POWER_SPECTRUM == SAMPLE_WIGGLES + // BAO wiggle parameterization for reconstruction + // Babic et al. 2022, https://arxiv.org/abs/2203.06177 + + // No-wiggle transfer function + + double s = 44.5 * log(9.83 / OmegaEff) / (sqrt(1 + 10 * pow(OMEGA_B * h * h, 0.75))); + double alpha_Gamma = 1 - 0.328 * log(431 * OmegaEff) * OMEGA_B / OMEGA_0 + 0.38 * log(22.3 * OmegaEff) * pow(OMEGA_B / OMEGA_0, 2); + double GammaEff = OMEGA_0 * h * (alpha_Gamma + (1 - alpha_Gamma)/(1 + pow(0.43 * k * s, 4))); + double q = k/(h*GammaEff) * pow(Theta_27, 2); + double L_0 = log(2 * M_E + 1.8 * q); + double C_0 = 14.2 + 731 / (1 + 62.5 * q); + double T0 = L_0 / (L_0 + C_0 * q * q); + + // Wiggle parameterization + + double A = 0; + double r_s = 10; + double k_D = 2 * M_PI / 100; + + double param = 1 + A * sin(k * r_s) * exp(- k / k_D); + + return normPower * pow(k, n) * T0 * T0 * param; +#endif + #if POWER_SPECTRUM == POWER_EFSTATHIOU double a = 6.4/Gamma0; double b = 3/Gamma0; From 4509174d8144f027cde6f67bcd34fb990ec48aa6 Mon Sep 17 00:00:00 2001 From: Eleni Date: Fri, 2 Dec 2022 12:36:41 +0100 Subject: [PATCH 54/89] moved param to transfer func --- src/cosmopower.cpp | 30 +++++++++++++++++------------- src/cosmopower.hpp | 3 ++- 2 files changed, 19 insertions(+), 14 deletions(-) diff --git a/src/cosmopower.cpp b/src/cosmopower.cpp index c8acd75..7ecaf2d 100644 --- a/src/cosmopower.cpp +++ b/src/cosmopower.cpp @@ -212,24 +212,28 @@ double CosmoPower::powerHuWiggles(double k) return normPower * pow(k,n) * T_k * T_k; } -double CosmoPower::sample_BAO(double k) -{ - // BAO wiggle parameterization for reconstruction - // Babic et al. 2022, https://arxiv.org/abs/2203.06177 +double CosmoPower::BAO_Tk(double k){ - // No-wiggle transfer function - - double ps_no_wiggle = powerHuBaryons(k); - - // Wiggle parameterization + double no_wiggle_tk = noWiggleTk(k); double A = 0; double r_s = 10; double k_D = 2 * M_PI / 100; - double param = 1 + A * sin(k * r_s) * exp(- k / k_D); + //sqrt as we want to make the parameterization part of the transfer function + double param = sqrt(1 + A * sin(k * r_s) * exp(- k / k_D)); + return no_wiggle_tk * param; - return ps_no_wiggle * param; +} + +double CosmoPower::sample_BAO(double k) +{ + // BAO wiggle parameterization for reconstruction + // Babic et al. 2022, https://arxiv.org/abs/2203.06177 + + double T_k = BAO_Tk(k); + + return normPower * pow(k,n) * T_k * T_k; } double CosmoPower::primordialPowerSpectrum(double k) @@ -486,8 +490,8 @@ void CosmoPower::setFunction(CosmoFunction f) case POWER_TEST: eval = &CosmoPower::powerTest; break; - case NOWIGGLE_TK: - eval = &CosmoPower::noWiggleTk; + case BAO_TK: + eval = &CosmoPower::BAO_Tk; break; default: abort(); diff --git a/src/cosmopower.hpp b/src/cosmopower.hpp index 5ed9b61..86ad8b1 100644 --- a/src/cosmopower.hpp +++ b/src/cosmopower.hpp @@ -91,7 +91,7 @@ namespace CosmoTool { POWER_TEST, HU_WIGGLES_ORIGINAL, SAMPLE_WIGGLES, - NOWIGGLE_TK + BAO_TK }; CosmoPower(); @@ -126,6 +126,7 @@ namespace CosmoTool { double powerHuWigglesOriginal(double k); double sample_BAO(double k); double noWiggleTk(double k); + double BAO_Tk(double k); }; }; From f326962bc82f63962258750604df5f233e4aa75a Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Tue, 31 Jan 2023 14:38:04 +0100 Subject: [PATCH 55/89] Add dependencies --- builder/build-wheels.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/builder/build-wheels.sh b/builder/build-wheels.sh index ac343fe..585ab56 100755 --- a/builder/build-wheels.sh +++ b/builder/build-wheels.sh @@ -8,12 +8,12 @@ export CC CXX # Install a system package required by our library #yum install -y atlas-devel -yum install -y cmake3 gsl-devel zlib-devel fftw3-devel +yum install -y cmake3 gsl-devel zlib-devel fftw3-devel libffi-devel hdf5 hdf5-devel ln -fs /usr/bin/cmake3 /usr/bin/cmake -ALL_PYTHON="cp36-cp36m cp37-cp37m cp38-cp38 cp39-cp39" +ALL_PYTHON="cp37-cp37m cp38-cp38 cp39-cp39 cp310-cp310" # Compile wheels for pkg in $ALL_PYTHON; do From 957d5187e9fccd67c31628d1bc3bc9c5bf612d0a Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Fri, 3 Feb 2023 21:44:28 +0100 Subject: [PATCH 56/89] Bump requirement of numpy --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 3a4577b..8342e0f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -numpy<1.19 +numpy<1.22 cffi numexpr pyfftw From 5eb0fe210b87b3e639d94f8b04243d8e094c0400 Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Sat, 4 Feb 2023 08:26:42 +0100 Subject: [PATCH 57/89] Fix version --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 576e0d6..f9b7042 100644 --- a/setup.py +++ b/setup.py @@ -229,7 +229,7 @@ class BuildCMakeExt(build_ext): CosmoTool_extension = CMakeExtension(name="cosmotool") setup(name='cosmotool', - version='1.3.1', + version='1.3.2', packages=["cosmotool"], package_dir={'cosmotool': 'python/cosmotool'}, install_requires=['numpy','cffi','numexpr','pyfftw','h5py'], From fd16d7dc6979c95344c9e445d596cc899bf60b0e Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Sat, 4 Feb 2023 09:54:32 +0100 Subject: [PATCH 58/89] Add config.* updated tool for mac support --- external/config.guess | 1754 ++++++++++++++++++++++++++++++ external/config.sub | 1890 +++++++++++++++++++++++++++++++++ external/external_build.cmake | 6 +- 3 files changed, 3649 insertions(+), 1 deletion(-) create mode 100755 external/config.guess create mode 100755 external/config.sub diff --git a/external/config.guess b/external/config.guess new file mode 100755 index 0000000..7f76b62 --- /dev/null +++ b/external/config.guess @@ -0,0 +1,1754 @@ +#! /bin/sh +# Attempt to guess a canonical system name. +# Copyright 1992-2022 Free Software Foundation, Inc. + +# shellcheck disable=SC2006,SC2268 # see below for rationale + +timestamp='2022-01-09' + +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see . +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). +# +# Originally written by Per Bothner; maintained since 2000 by Ben Elliston. +# +# You can get the latest version of this script from: +# https://git.savannah.gnu.org/cgit/config.git/plain/config.guess +# +# Please send patches to . + + +# The "shellcheck disable" line above the timestamp inhibits complaints +# about features and limitations of the classic Bourne shell that were +# superseded or lifted in POSIX. However, this script identifies a wide +# variety of pre-POSIX systems that do not have POSIX shells at all, and +# even some reasonably current systems (Solaris 10 as case-in-point) still +# have a pre-POSIX /bin/sh. + + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] + +Output the configuration name of the system \`$me' is run on. + +Options: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.guess ($timestamp) + +Originally written by Per Bothner. +Copyright 1992-2022 Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + * ) + break ;; + esac +done + +if test $# != 0; then + echo "$me: too many arguments$help" >&2 + exit 1 +fi + +# Just in case it came from the environment. +GUESS= + +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a +# compiler to aid in system detection is discouraged as it requires +# temporary files to be created and, as you can see below, it is a +# headache to deal with in a portable fashion. + +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still +# use `HOST_CC' if defined, but it is deprecated. + +# Portable tmp directory creation inspired by the Autoconf team. + +tmp= +# shellcheck disable=SC2172 +trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15 + +set_cc_for_build() { + # prevent multiple calls if $tmp is already set + test "$tmp" && return 0 + : "${TMPDIR=/tmp}" + # shellcheck disable=SC2039,SC3028 + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } + dummy=$tmp/dummy + case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in + ,,) echo "int x;" > "$dummy.c" + for driver in cc gcc c89 c99 ; do + if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then + CC_FOR_BUILD=$driver + break + fi + done + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; + esac +} + +# This is needed to find uname on a Pyramid OSx when run in the BSD universe. +# (ghazi@noc.rutgers.edu 1994-08-24) +if test -f /.attbin/uname ; then + PATH=$PATH:/.attbin ; export PATH +fi + +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + +case $UNAME_SYSTEM in +Linux|GNU|GNU/*) + LIBC=unknown + + set_cc_for_build + cat <<-EOF > "$dummy.c" + #include + #if defined(__UCLIBC__) + LIBC=uclibc + #elif defined(__dietlibc__) + LIBC=dietlibc + #elif defined(__GLIBC__) + LIBC=gnu + #else + #include + /* First heuristic to detect musl libc. */ + #ifdef __DEFINED_va_list + LIBC=musl + #endif + #endif + EOF + cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` + eval "$cc_set_libc" + + # Second heuristic to detect musl libc. + if [ "$LIBC" = unknown ] && + command -v ldd >/dev/null && + ldd --version 2>&1 | grep -q ^musl; then + LIBC=musl + fi + + # If the system lacks a compiler, then just pick glibc. + # We could probably try harder. + if [ "$LIBC" = unknown ]; then + LIBC=gnu + fi + ;; +esac + +# Note: order is significant - the case branches are not exclusive. + +case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in + *:NetBSD:*:*) + # NetBSD (nbsd) targets should (where applicable) match one or + # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently + # switched to ELF, *-*-netbsd* would select the old + # object file format. This provides both forward + # compatibility and a consistent mechanism for selecting the + # object file format. + # + # Note: NetBSD doesn't particularly care about the vendor + # portion of the name. We always set it to "unknown". + UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ + /sbin/sysctl -n hw.machine_arch 2>/dev/null || \ + /usr/sbin/sysctl -n hw.machine_arch 2>/dev/null || \ + echo unknown)` + case $UNAME_MACHINE_ARCH in + aarch64eb) machine=aarch64_be-unknown ;; + armeb) machine=armeb-unknown ;; + arm*) machine=arm-unknown ;; + sh3el) machine=shl-unknown ;; + sh3eb) machine=sh-unknown ;; + sh5el) machine=sh5le-unknown ;; + earmv*) + arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'` + endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'` + machine=${arch}${endian}-unknown + ;; + *) machine=$UNAME_MACHINE_ARCH-unknown ;; + esac + # The Operating System including object format, if it has switched + # to ELF recently (or will in the future) and ABI. + case $UNAME_MACHINE_ARCH in + earm*) + os=netbsdelf + ;; + arm*|i386|m68k|ns32k|sh3*|sparc|vax) + set_cc_for_build + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ELF__ + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? + os=netbsd + else + os=netbsdelf + fi + ;; + *) + os=netbsd + ;; + esac + # Determine ABI tags. + case $UNAME_MACHINE_ARCH in + earm*) + expr='s/^earmv[0-9]/-eabi/;s/eb$//' + abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"` + ;; + esac + # The OS release + # Debian GNU/NetBSD machines have a different userland, and + # thus, need a distinct triplet. However, they do not need + # kernel version information, so it can be replaced with a + # suitable tag, in the style of linux-gnu. + case $UNAME_VERSION in + Debian*) + release='-gnu' + ;; + *) + release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2` + ;; + esac + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: + # contains redundant information, the shorter form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + GUESS=$machine-${os}${release}${abi-} + ;; + *:Bitrig:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` + GUESS=$UNAME_MACHINE_ARCH-unknown-bitrig$UNAME_RELEASE + ;; + *:OpenBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` + GUESS=$UNAME_MACHINE_ARCH-unknown-openbsd$UNAME_RELEASE + ;; + *:SecBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/SecBSD.//'` + GUESS=$UNAME_MACHINE_ARCH-unknown-secbsd$UNAME_RELEASE + ;; + *:LibertyBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` + GUESS=$UNAME_MACHINE_ARCH-unknown-libertybsd$UNAME_RELEASE + ;; + *:MidnightBSD:*:*) + GUESS=$UNAME_MACHINE-unknown-midnightbsd$UNAME_RELEASE + ;; + *:ekkoBSD:*:*) + GUESS=$UNAME_MACHINE-unknown-ekkobsd$UNAME_RELEASE + ;; + *:SolidBSD:*:*) + GUESS=$UNAME_MACHINE-unknown-solidbsd$UNAME_RELEASE + ;; + *:OS108:*:*) + GUESS=$UNAME_MACHINE-unknown-os108_$UNAME_RELEASE + ;; + macppc:MirBSD:*:*) + GUESS=powerpc-unknown-mirbsd$UNAME_RELEASE + ;; + *:MirBSD:*:*) + GUESS=$UNAME_MACHINE-unknown-mirbsd$UNAME_RELEASE + ;; + *:Sortix:*:*) + GUESS=$UNAME_MACHINE-unknown-sortix + ;; + *:Twizzler:*:*) + GUESS=$UNAME_MACHINE-unknown-twizzler + ;; + *:Redox:*:*) + GUESS=$UNAME_MACHINE-unknown-redox + ;; + mips:OSF1:*.*) + GUESS=mips-dec-osf1 + ;; + alpha:OSF1:*:*) + # Reset EXIT trap before exiting to avoid spurious non-zero exit code. + trap '' 0 + case $UNAME_RELEASE in + *4.0) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + ;; + *5.*) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + ;; + esac + # According to Compaq, /usr/sbin/psrinfo has been available on + # OSF/1 and Tru64 systems produced since 1995. I hope that + # covers most systems running today. This code pipes the CPU + # types through head -n 1, so we only detect the type of CPU 0. + ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` + case $ALPHA_CPU_TYPE in + "EV4 (21064)") + UNAME_MACHINE=alpha ;; + "EV4.5 (21064)") + UNAME_MACHINE=alpha ;; + "LCA4 (21066/21068)") + UNAME_MACHINE=alpha ;; + "EV5 (21164)") + UNAME_MACHINE=alphaev5 ;; + "EV5.6 (21164A)") + UNAME_MACHINE=alphaev56 ;; + "EV5.6 (21164PC)") + UNAME_MACHINE=alphapca56 ;; + "EV5.7 (21164PC)") + UNAME_MACHINE=alphapca57 ;; + "EV6 (21264)") + UNAME_MACHINE=alphaev6 ;; + "EV6.7 (21264A)") + UNAME_MACHINE=alphaev67 ;; + "EV6.8CB (21264C)") + UNAME_MACHINE=alphaev68 ;; + "EV6.8AL (21264B)") + UNAME_MACHINE=alphaev68 ;; + "EV6.8CX (21264D)") + UNAME_MACHINE=alphaev68 ;; + "EV6.9A (21264/EV69A)") + UNAME_MACHINE=alphaev69 ;; + "EV7 (21364)") + UNAME_MACHINE=alphaev7 ;; + "EV7.9 (21364A)") + UNAME_MACHINE=alphaev79 ;; + esac + # A Pn.n version is a patched version. + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. + OSF_REL=`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` + GUESS=$UNAME_MACHINE-dec-osf$OSF_REL + ;; + Amiga*:UNIX_System_V:4.0:*) + GUESS=m68k-unknown-sysv4 + ;; + *:[Aa]miga[Oo][Ss]:*:*) + GUESS=$UNAME_MACHINE-unknown-amigaos + ;; + *:[Mm]orph[Oo][Ss]:*:*) + GUESS=$UNAME_MACHINE-unknown-morphos + ;; + *:OS/390:*:*) + GUESS=i370-ibm-openedition + ;; + *:z/VM:*:*) + GUESS=s390-ibm-zvmoe + ;; + *:OS400:*:*) + GUESS=powerpc-ibm-os400 + ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + GUESS=arm-acorn-riscix$UNAME_RELEASE + ;; + arm*:riscos:*:*|arm*:RISCOS:*:*) + GUESS=arm-unknown-riscos + ;; + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) + GUESS=hppa1.1-hitachi-hiuxmpp + ;; + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. + case `(/bin/universe) 2>/dev/null` in + att) GUESS=pyramid-pyramid-sysv3 ;; + *) GUESS=pyramid-pyramid-bsd ;; + esac + ;; + NILE*:*:*:dcosx) + GUESS=pyramid-pyramid-svr4 + ;; + DRS?6000:unix:4.0:6*) + GUESS=sparc-icl-nx6 + ;; + DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) + case `/usr/bin/uname -p` in + sparc) GUESS=sparc-icl-nx7 ;; + esac + ;; + s390x:SunOS:*:*) + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=$UNAME_MACHINE-ibm-solaris2$SUN_REL + ;; + sun4H:SunOS:5.*:*) + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=sparc-hal-solaris2$SUN_REL + ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=sparc-sun-solaris2$SUN_REL + ;; + i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) + GUESS=i386-pc-auroraux$UNAME_RELEASE + ;; + i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) + set_cc_for_build + SUN_ARCH=i386 + # If there is a compiler, see if it is configured for 64-bit objects. + # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. + # This test works for both compilers. + if test "$CC_FOR_BUILD" != no_compiler_found; then + if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -m64 -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + SUN_ARCH=x86_64 + fi + fi + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=$SUN_ARCH-pc-solaris2$SUN_REL + ;; + sun4*:SunOS:6*:*) + # According to config.sub, this is the proper way to canonicalize + # SunOS6. Hard to guess exactly what SunOS6 will be like, but + # it's likely to be more like Solaris than SunOS4. + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=sparc-sun-solaris3$SUN_REL + ;; + sun4*:SunOS:*:*) + case `/usr/bin/arch -k` in + Series*|S4*) + UNAME_RELEASE=`uname -v` + ;; + esac + # Japanese Language versions have a version number like `4.1.3-JL'. + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/'` + GUESS=sparc-sun-sunos$SUN_REL + ;; + sun3*:SunOS:*:*) + GUESS=m68k-sun-sunos$UNAME_RELEASE + ;; + sun*:*:4.2BSD:*) + UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3 + case `/bin/arch` in + sun3) + GUESS=m68k-sun-sunos$UNAME_RELEASE + ;; + sun4) + GUESS=sparc-sun-sunos$UNAME_RELEASE + ;; + esac + ;; + aushp:SunOS:*:*) + GUESS=sparc-auspex-sunos$UNAME_RELEASE + ;; + # The situation for MiNT is a little confusing. The machine name + # can be virtually everything (everything which is not + # "atarist" or "atariste" at least should have a processor + # > m68000). The system name ranges from "MiNT" over "FreeMiNT" + # to the lowercase version "mint" (or "freemint"). Finally + # the system name "TOS" denotes a system which is actually not + # MiNT. But MiNT is downward compatible to TOS, so this should + # be no problem. + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) + GUESS=m68k-atari-mint$UNAME_RELEASE + ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + GUESS=m68k-atari-mint$UNAME_RELEASE + ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) + GUESS=m68k-atari-mint$UNAME_RELEASE + ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) + GUESS=m68k-milan-mint$UNAME_RELEASE + ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) + GUESS=m68k-hades-mint$UNAME_RELEASE + ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) + GUESS=m68k-unknown-mint$UNAME_RELEASE + ;; + m68k:machten:*:*) + GUESS=m68k-apple-machten$UNAME_RELEASE + ;; + powerpc:machten:*:*) + GUESS=powerpc-apple-machten$UNAME_RELEASE + ;; + RISC*:Mach:*:*) + GUESS=mips-dec-mach_bsd4.3 + ;; + RISC*:ULTRIX:*:*) + GUESS=mips-dec-ultrix$UNAME_RELEASE + ;; + VAX*:ULTRIX*:*:*) + GUESS=vax-dec-ultrix$UNAME_RELEASE + ;; + 2020:CLIX:*:* | 2430:CLIX:*:*) + GUESS=clipper-intergraph-clix$UNAME_RELEASE + ;; + mips:*:*:UMIPS | mips:*:*:RISCos) + set_cc_for_build + sed 's/^ //' << EOF > "$dummy.c" +#ifdef __cplusplus +#include /* for printf() prototype */ + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif + #if defined (host_mips) && defined (MIPSEB) + #if defined (SYSTYPE_SYSV) + printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_SVR4) + printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) + printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0); + #endif + #endif + exit (-1); + } +EOF + $CC_FOR_BUILD -o "$dummy" "$dummy.c" && + dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` && + SYSTEM_NAME=`"$dummy" "$dummyarg"` && + { echo "$SYSTEM_NAME"; exit; } + GUESS=mips-mips-riscos$UNAME_RELEASE + ;; + Motorola:PowerMAX_OS:*:*) + GUESS=powerpc-motorola-powermax + ;; + Motorola:*:4.3:PL8-*) + GUESS=powerpc-harris-powermax + ;; + Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) + GUESS=powerpc-harris-powermax + ;; + Night_Hawk:Power_UNIX:*:*) + GUESS=powerpc-harris-powerunix + ;; + m88k:CX/UX:7*:*) + GUESS=m88k-harris-cxux7 + ;; + m88k:*:4*:R4*) + GUESS=m88k-motorola-sysv4 + ;; + m88k:*:3*:R3*) + GUESS=m88k-motorola-sysv3 + ;; + AViiON:dgux:*:*) + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` + if test "$UNAME_PROCESSOR" = mc88100 || test "$UNAME_PROCESSOR" = mc88110 + then + if test "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx || \ + test "$TARGET_BINARY_INTERFACE"x = x + then + GUESS=m88k-dg-dgux$UNAME_RELEASE + else + GUESS=m88k-dg-dguxbcs$UNAME_RELEASE + fi + else + GUESS=i586-dg-dgux$UNAME_RELEASE + fi + ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + GUESS=m88k-dolphin-sysv3 + ;; + M88*:*:R3*:*) + # Delta 88k system running SVR3 + GUESS=m88k-motorola-sysv3 + ;; + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) + GUESS=m88k-tektronix-sysv3 + ;; + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) + GUESS=m68k-tektronix-bsd + ;; + *:IRIX*:*:*) + IRIX_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/g'` + GUESS=mips-sgi-irix$IRIX_REL + ;; + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. + GUESS=romp-ibm-aix # uname -m gives an 8 hex-code CPU id + ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + i*86:AIX:*:*) + GUESS=i386-ibm-aix + ;; + ia64:AIX:*:*) + if test -x /usr/bin/oslevel ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=$UNAME_VERSION.$UNAME_RELEASE + fi + GUESS=$UNAME_MACHINE-ibm-aix$IBM_REV + ;; + *:AIX:2:3) + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + set_cc_for_build + sed 's/^ //' << EOF > "$dummy.c" + #include + + main() + { + if (!__power_pc()) + exit(1); + puts("powerpc-ibm-aix3.2.5"); + exit(0); + } +EOF + if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` + then + GUESS=$SYSTEM_NAME + else + GUESS=rs6000-ibm-aix3.2.5 + fi + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then + GUESS=rs6000-ibm-aix3.2.4 + else + GUESS=rs6000-ibm-aix3.2 + fi + ;; + *:AIX:*:[4567]) + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` + if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then + IBM_ARCH=rs6000 + else + IBM_ARCH=powerpc + fi + if test -x /usr/bin/lslpp ; then + IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | \ + awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` + else + IBM_REV=$UNAME_VERSION.$UNAME_RELEASE + fi + GUESS=$IBM_ARCH-ibm-aix$IBM_REV + ;; + *:AIX:*:*) + GUESS=rs6000-ibm-aix + ;; + ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*) + GUESS=romp-ibm-bsd4.4 + ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and + GUESS=romp-ibm-bsd$UNAME_RELEASE # 4.3 with uname added to + ;; # report: romp-ibm BSD 4.3 + *:BOSX:*:*) + GUESS=rs6000-bull-bosx + ;; + DPX/2?00:B.O.S.:*:*) + GUESS=m68k-bull-sysv3 + ;; + 9000/[34]??:4.3bsd:1.*:*) + GUESS=m68k-hp-bsd + ;; + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) + GUESS=m68k-hp-bsd4.4 + ;; + 9000/[34678]??:HP-UX:*:*) + HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'` + case $UNAME_MACHINE in + 9000/31?) HP_ARCH=m68000 ;; + 9000/[34]??) HP_ARCH=m68k ;; + 9000/[678][0-9][0-9]) + if test -x /usr/bin/getconf; then + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case $sc_cpu_version in + 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 + 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case $sc_kernel_bits in + 32) HP_ARCH=hppa2.0n ;; + 64) HP_ARCH=hppa2.0w ;; + '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 + esac ;; + esac + fi + if test "$HP_ARCH" = ""; then + set_cc_for_build + sed 's/^ //' << EOF > "$dummy.c" + + #define _HPUX_SOURCE + #include + #include + + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); + + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } +EOF + (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"` + test -z "$HP_ARCH" && HP_ARCH=hppa + fi ;; + esac + if test "$HP_ARCH" = hppa2.0w + then + set_cc_for_build + + # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating + # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler + # generating 64-bit code. GNU and HP use different nomenclature: + # + # $ CC_FOR_BUILD=cc ./config.guess + # => hppa2.0w-hp-hpux11.23 + # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess + # => hppa64-hp-hpux11.23 + + if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | + grep -q __LP64__ + then + HP_ARCH=hppa2.0w + else + HP_ARCH=hppa64 + fi + fi + GUESS=$HP_ARCH-hp-hpux$HPUX_REV + ;; + ia64:HP-UX:*:*) + HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'` + GUESS=ia64-hp-hpux$HPUX_REV + ;; + 3050*:HI-UX:*:*) + set_cc_for_build + sed 's/^ //' << EOF > "$dummy.c" + #include + int + main () + { + long cpu = sysconf (_SC_CPU_VERSION); + /* The order matters, because CPU_IS_HP_MC68K erroneously returns + true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct + results, however. */ + if (CPU_IS_PA_RISC (cpu)) + { + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; + case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; + default: puts ("hppa-hitachi-hiuxwe2"); break; + } + } + else if (CPU_IS_HP_MC68K (cpu)) + puts ("m68k-hitachi-hiuxwe2"); + else puts ("unknown-hitachi-hiuxwe2"); + exit (0); + } +EOF + $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` && + { echo "$SYSTEM_NAME"; exit; } + GUESS=unknown-hitachi-hiuxwe2 + ;; + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*) + GUESS=hppa1.1-hp-bsd + ;; + 9000/8??:4.3bsd:*:*) + GUESS=hppa1.0-hp-bsd + ;; + *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) + GUESS=hppa1.0-hp-mpeix + ;; + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*) + GUESS=hppa1.1-hp-osf + ;; + hp8??:OSF1:*:*) + GUESS=hppa1.0-hp-osf + ;; + i*86:OSF1:*:*) + if test -x /usr/sbin/sysversion ; then + GUESS=$UNAME_MACHINE-unknown-osf1mk + else + GUESS=$UNAME_MACHINE-unknown-osf1 + fi + ;; + parisc*:Lites*:*:*) + GUESS=hppa1.1-hp-lites + ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + GUESS=c1-convex-bsd + ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + GUESS=c34-convex-bsd + ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + GUESS=c38-convex-bsd + ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + GUESS=c4-convex-bsd + ;; + CRAY*Y-MP:*:*:*) + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` + GUESS=ymp-cray-unicos$CRAY_REL + ;; + CRAY*[A-Z]90:*:*:*) + echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \ + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ + -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*TS:*:*:*) + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` + GUESS=t90-cray-unicos$CRAY_REL + ;; + CRAY*T3E:*:*:*) + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` + GUESS=alphaev5-cray-unicosmk$CRAY_REL + ;; + CRAY*SV1:*:*:*) + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` + GUESS=sv1-cray-unicos$CRAY_REL + ;; + *:UNICOS/mp:*:*) + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` + GUESS=craynv-cray-unicosmp$CRAY_REL + ;; + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) + FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` + FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` + FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'` + GUESS=${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL} + ;; + 5000:UNIX_System_V:4.*:*) + FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` + FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` + GUESS=sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL} + ;; + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) + GUESS=$UNAME_MACHINE-pc-bsdi$UNAME_RELEASE + ;; + sparc*:BSD/OS:*:*) + GUESS=sparc-unknown-bsdi$UNAME_RELEASE + ;; + *:BSD/OS:*:*) + GUESS=$UNAME_MACHINE-unknown-bsdi$UNAME_RELEASE + ;; + arm:FreeBSD:*:*) + UNAME_PROCESSOR=`uname -p` + set_cc_for_build + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_PCS_VFP + then + FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` + GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabi + else + FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` + GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabihf + fi + ;; + *:FreeBSD:*:*) + UNAME_PROCESSOR=`/usr/bin/uname -p` + case $UNAME_PROCESSOR in + amd64) + UNAME_PROCESSOR=x86_64 ;; + i386) + UNAME_PROCESSOR=i586 ;; + esac + FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` + GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL + ;; + i*:CYGWIN*:*) + GUESS=$UNAME_MACHINE-pc-cygwin + ;; + *:MINGW64*:*) + GUESS=$UNAME_MACHINE-pc-mingw64 + ;; + *:MINGW*:*) + GUESS=$UNAME_MACHINE-pc-mingw32 + ;; + *:MSYS*:*) + GUESS=$UNAME_MACHINE-pc-msys + ;; + i*:PW*:*) + GUESS=$UNAME_MACHINE-pc-pw32 + ;; + *:SerenityOS:*:*) + GUESS=$UNAME_MACHINE-pc-serenity + ;; + *:Interix*:*) + case $UNAME_MACHINE in + x86) + GUESS=i586-pc-interix$UNAME_RELEASE + ;; + authenticamd | genuineintel | EM64T) + GUESS=x86_64-unknown-interix$UNAME_RELEASE + ;; + IA64) + GUESS=ia64-unknown-interix$UNAME_RELEASE + ;; + esac ;; + i*:UWIN*:*) + GUESS=$UNAME_MACHINE-pc-uwin + ;; + amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) + GUESS=x86_64-pc-cygwin + ;; + prep*:SunOS:5.*:*) + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=powerpcle-unknown-solaris2$SUN_REL + ;; + *:GNU:*:*) + # the GNU system + GNU_ARCH=`echo "$UNAME_MACHINE" | sed -e 's,[-/].*$,,'` + GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's,/.*$,,'` + GUESS=$GNU_ARCH-unknown-$LIBC$GNU_REL + ;; + *:GNU/*:*:*) + # other systems with GNU libc and userland + GNU_SYS=`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"` + GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` + GUESS=$UNAME_MACHINE-unknown-$GNU_SYS$GNU_REL-$LIBC + ;; + *:Minix:*:*) + GUESS=$UNAME_MACHINE-unknown-minix + ;; + aarch64:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + aarch64_be:Linux:*:*) + UNAME_MACHINE=aarch64_be + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` in + EV5) UNAME_MACHINE=alphaev5 ;; + EV56) UNAME_MACHINE=alphaev56 ;; + PCA56) UNAME_MACHINE=alphapca56 ;; + PCA57) UNAME_MACHINE=alphapca56 ;; + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev68 ;; + esac + objdump --private-headers /bin/sh | grep -q ld.so.1 + if test "$?" = 0 ; then LIBC=gnulibc1 ; fi + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + arc:Linux:*:* | arceb:Linux:*:* | arc32:Linux:*:* | arc64:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + arm*:Linux:*:*) + set_cc_for_build + if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_EABI__ + then + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + else + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_PCS_VFP + then + GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabi + else + GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabihf + fi + fi + ;; + avr32*:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + cris:Linux:*:*) + GUESS=$UNAME_MACHINE-axis-linux-$LIBC + ;; + crisv32:Linux:*:*) + GUESS=$UNAME_MACHINE-axis-linux-$LIBC + ;; + e2k:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + frv:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + hexagon:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + i*86:Linux:*:*) + GUESS=$UNAME_MACHINE-pc-linux-$LIBC + ;; + ia64:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + k1om:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + loongarch32:Linux:*:* | loongarch64:Linux:*:* | loongarchx32:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + m32r*:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + m68*:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + mips:Linux:*:* | mips64:Linux:*:*) + set_cc_for_build + IS_GLIBC=0 + test x"${LIBC}" = xgnu && IS_GLIBC=1 + sed 's/^ //' << EOF > "$dummy.c" + #undef CPU + #undef mips + #undef mipsel + #undef mips64 + #undef mips64el + #if ${IS_GLIBC} && defined(_ABI64) + LIBCABI=gnuabi64 + #else + #if ${IS_GLIBC} && defined(_ABIN32) + LIBCABI=gnuabin32 + #else + LIBCABI=${LIBC} + #endif + #endif + + #if ${IS_GLIBC} && defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 + CPU=mipsisa64r6 + #else + #if ${IS_GLIBC} && !defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 + CPU=mipsisa32r6 + #else + #if defined(__mips64) + CPU=mips64 + #else + CPU=mips + #endif + #endif + #endif + + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + MIPS_ENDIAN=el + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + MIPS_ENDIAN= + #else + MIPS_ENDIAN= + #endif + #endif +EOF + cc_set_vars=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'` + eval "$cc_set_vars" + test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; } + ;; + mips64el:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + openrisc*:Linux:*:*) + GUESS=or1k-unknown-linux-$LIBC + ;; + or32:Linux:*:* | or1k*:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + padre:Linux:*:*) + GUESS=sparc-unknown-linux-$LIBC + ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + GUESS=hppa64-unknown-linux-$LIBC + ;; + parisc:Linux:*:* | hppa:Linux:*:*) + # Look for CPU level + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in + PA7*) GUESS=hppa1.1-unknown-linux-$LIBC ;; + PA8*) GUESS=hppa2.0-unknown-linux-$LIBC ;; + *) GUESS=hppa-unknown-linux-$LIBC ;; + esac + ;; + ppc64:Linux:*:*) + GUESS=powerpc64-unknown-linux-$LIBC + ;; + ppc:Linux:*:*) + GUESS=powerpc-unknown-linux-$LIBC + ;; + ppc64le:Linux:*:*) + GUESS=powerpc64le-unknown-linux-$LIBC + ;; + ppcle:Linux:*:*) + GUESS=powerpcle-unknown-linux-$LIBC + ;; + riscv32:Linux:*:* | riscv32be:Linux:*:* | riscv64:Linux:*:* | riscv64be:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + s390:Linux:*:* | s390x:Linux:*:*) + GUESS=$UNAME_MACHINE-ibm-linux-$LIBC + ;; + sh64*:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + sh*:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + sparc:Linux:*:* | sparc64:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + tile*:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + vax:Linux:*:*) + GUESS=$UNAME_MACHINE-dec-linux-$LIBC + ;; + x86_64:Linux:*:*) + set_cc_for_build + LIBCABI=$LIBC + if test "$CC_FOR_BUILD" != no_compiler_found; then + if (echo '#ifdef __ILP32__'; echo IS_X32; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_X32 >/dev/null + then + LIBCABI=${LIBC}x32 + fi + fi + GUESS=$UNAME_MACHINE-pc-linux-$LIBCABI + ;; + xtensa*:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + i*86:DYNIX/ptx:4*:*) + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. + # earlier versions are messed up and put the nodename in both + # sysname and nodename. + GUESS=i386-sequent-sysv4 + ;; + i*86:UNIX_SV:4.2MP:2.*) + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, + # I just have to hope. -- rms. + # Use sysv4.2uw... so that sysv4* matches it. + GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION + ;; + i*86:OS/2:*:*) + # If we were able to find `uname', then EMX Unix compatibility + # is probably installed. + GUESS=$UNAME_MACHINE-pc-os2-emx + ;; + i*86:XTS-300:*:STOP) + GUESS=$UNAME_MACHINE-unknown-stop + ;; + i*86:atheos:*:*) + GUESS=$UNAME_MACHINE-unknown-atheos + ;; + i*86:syllable:*:*) + GUESS=$UNAME_MACHINE-pc-syllable + ;; + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) + GUESS=i386-unknown-lynxos$UNAME_RELEASE + ;; + i*86:*DOS:*:*) + GUESS=$UNAME_MACHINE-pc-msdosdjgpp + ;; + i*86:*:4.*:*) + UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'` + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then + GUESS=$UNAME_MACHINE-univel-sysv$UNAME_REL + else + GUESS=$UNAME_MACHINE-pc-sysv$UNAME_REL + fi + ;; + i*86:*:5:[678]*) + # UnixWare 7.x, OpenUNIX and OpenServer 6. + case `/bin/uname -X | grep "^Machine"` in + *486*) UNAME_MACHINE=i486 ;; + *Pentium) UNAME_MACHINE=i586 ;; + *Pent*|*Celeron) UNAME_MACHINE=i686 ;; + esac + GUESS=$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} + ;; + i*86:*:3.2:*) + if test -f /usr/options/cb.name; then + UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then + UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` + (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ + && UNAME_MACHINE=i586 + (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ + && UNAME_MACHINE=i686 + (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ + && UNAME_MACHINE=i686 + GUESS=$UNAME_MACHINE-pc-sco$UNAME_REL + else + GUESS=$UNAME_MACHINE-pc-sysv32 + fi + ;; + pc:*:*:*) + # Left here for compatibility: + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i586. + # Note: whatever this is, it MUST be the same as what config.sub + # prints for the "djgpp" host, or else GDB configure will decide that + # this is a cross-build. + GUESS=i586-pc-msdosdjgpp + ;; + Intel:Mach:3*:*) + GUESS=i386-pc-mach3 + ;; + paragon:*:*:*) + GUESS=i860-intel-osf1 + ;; + i860:*:4.*:*) # i860-SVR4 + if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then + GUESS=i860-stardent-sysv$UNAME_RELEASE # Stardent Vistra i860-SVR4 + else # Add other i860-SVR4 vendors below as they are discovered. + GUESS=i860-unknown-sysv$UNAME_RELEASE # Unknown i860-SVR4 + fi + ;; + mini*:CTIX:SYS*5:*) + # "miniframe" + GUESS=m68010-convergent-sysv + ;; + mc68k:UNIX:SYSTEM5:3.51m) + GUESS=m68k-convergent-sysv + ;; + M680?0:D-NIX:5.3:*) + GUESS=m68k-diab-dnix + ;; + M68*:*:R3V[5678]*:*) + test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; + 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) + OS_REL='' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4; exit; } ;; + NCR*:*:4.2:* | MPRAS*:*:4.2:*) + OS_REL='.3' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } + /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ + && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) + GUESS=m68k-unknown-lynxos$UNAME_RELEASE + ;; + mc68030:UNIX_System_V:4.*:*) + GUESS=m68k-atari-sysv4 + ;; + TSUNAMI:LynxOS:2.*:*) + GUESS=sparc-unknown-lynxos$UNAME_RELEASE + ;; + rs6000:LynxOS:2.*:*) + GUESS=rs6000-unknown-lynxos$UNAME_RELEASE + ;; + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) + GUESS=powerpc-unknown-lynxos$UNAME_RELEASE + ;; + SM[BE]S:UNIX_SV:*:*) + GUESS=mips-dde-sysv$UNAME_RELEASE + ;; + RM*:ReliantUNIX-*:*:*) + GUESS=mips-sni-sysv4 + ;; + RM*:SINIX-*:*:*) + GUESS=mips-sni-sysv4 + ;; + *:SINIX-*:*:*) + if uname -p 2>/dev/null >/dev/null ; then + UNAME_MACHINE=`(uname -p) 2>/dev/null` + GUESS=$UNAME_MACHINE-sni-sysv4 + else + GUESS=ns32k-sni-sysv + fi + ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + GUESS=i586-unisys-sysv4 + ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes . + # How about differentiating between stratus architectures? -djm + GUESS=hppa1.1-stratus-sysv4 + ;; + *:*:*:FTX*) + # From seanf@swdc.stratus.com. + GUESS=i860-stratus-sysv4 + ;; + i*86:VOS:*:*) + # From Paul.Green@stratus.com. + GUESS=$UNAME_MACHINE-stratus-vos + ;; + *:VOS:*:*) + # From Paul.Green@stratus.com. + GUESS=hppa1.1-stratus-vos + ;; + mc68*:A/UX:*:*) + GUESS=m68k-apple-aux$UNAME_RELEASE + ;; + news*:NEWS-OS:6*:*) + GUESS=mips-sony-newsos6 + ;; + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) + if test -d /usr/nec; then + GUESS=mips-nec-sysv$UNAME_RELEASE + else + GUESS=mips-unknown-sysv$UNAME_RELEASE + fi + ;; + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. + GUESS=powerpc-be-beos + ;; + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. + GUESS=powerpc-apple-beos + ;; + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. + GUESS=i586-pc-beos + ;; + BePC:Haiku:*:*) # Haiku running on Intel PC compatible. + GUESS=i586-pc-haiku + ;; + x86_64:Haiku:*:*) + GUESS=x86_64-unknown-haiku + ;; + SX-4:SUPER-UX:*:*) + GUESS=sx4-nec-superux$UNAME_RELEASE + ;; + SX-5:SUPER-UX:*:*) + GUESS=sx5-nec-superux$UNAME_RELEASE + ;; + SX-6:SUPER-UX:*:*) + GUESS=sx6-nec-superux$UNAME_RELEASE + ;; + SX-7:SUPER-UX:*:*) + GUESS=sx7-nec-superux$UNAME_RELEASE + ;; + SX-8:SUPER-UX:*:*) + GUESS=sx8-nec-superux$UNAME_RELEASE + ;; + SX-8R:SUPER-UX:*:*) + GUESS=sx8r-nec-superux$UNAME_RELEASE + ;; + SX-ACE:SUPER-UX:*:*) + GUESS=sxace-nec-superux$UNAME_RELEASE + ;; + Power*:Rhapsody:*:*) + GUESS=powerpc-apple-rhapsody$UNAME_RELEASE + ;; + *:Rhapsody:*:*) + GUESS=$UNAME_MACHINE-apple-rhapsody$UNAME_RELEASE + ;; + arm64:Darwin:*:*) + GUESS=aarch64-apple-darwin$UNAME_RELEASE + ;; + *:Darwin:*:*) + UNAME_PROCESSOR=`uname -p` + case $UNAME_PROCESSOR in + unknown) UNAME_PROCESSOR=powerpc ;; + esac + if command -v xcode-select > /dev/null 2> /dev/null && \ + ! xcode-select --print-path > /dev/null 2> /dev/null ; then + # Avoid executing cc if there is no toolchain installed as + # cc will be a stub that puts up a graphical alert + # prompting the user to install developer tools. + CC_FOR_BUILD=no_compiler_found + else + set_cc_for_build + fi + if test "$CC_FOR_BUILD" != no_compiler_found; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + case $UNAME_PROCESSOR in + i386) UNAME_PROCESSOR=x86_64 ;; + powerpc) UNAME_PROCESSOR=powerpc64 ;; + esac + fi + # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc + if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_PPC >/dev/null + then + UNAME_PROCESSOR=powerpc + fi + elif test "$UNAME_PROCESSOR" = i386 ; then + # uname -m returns i386 or x86_64 + UNAME_PROCESSOR=$UNAME_MACHINE + fi + GUESS=$UNAME_PROCESSOR-apple-darwin$UNAME_RELEASE + ;; + *:procnto*:*:* | *:QNX:[0123456789]*:*) + UNAME_PROCESSOR=`uname -p` + if test "$UNAME_PROCESSOR" = x86; then + UNAME_PROCESSOR=i386 + UNAME_MACHINE=pc + fi + GUESS=$UNAME_PROCESSOR-$UNAME_MACHINE-nto-qnx$UNAME_RELEASE + ;; + *:QNX:*:4*) + GUESS=i386-pc-qnx + ;; + NEO-*:NONSTOP_KERNEL:*:*) + GUESS=neo-tandem-nsk$UNAME_RELEASE + ;; + NSE-*:NONSTOP_KERNEL:*:*) + GUESS=nse-tandem-nsk$UNAME_RELEASE + ;; + NSR-*:NONSTOP_KERNEL:*:*) + GUESS=nsr-tandem-nsk$UNAME_RELEASE + ;; + NSV-*:NONSTOP_KERNEL:*:*) + GUESS=nsv-tandem-nsk$UNAME_RELEASE + ;; + NSX-*:NONSTOP_KERNEL:*:*) + GUESS=nsx-tandem-nsk$UNAME_RELEASE + ;; + *:NonStop-UX:*:*) + GUESS=mips-compaq-nonstopux + ;; + BS2000:POSIX*:*:*) + GUESS=bs2000-siemens-sysv + ;; + DS/*:UNIX_System_V:*:*) + GUESS=$UNAME_MACHINE-$UNAME_SYSTEM-$UNAME_RELEASE + ;; + *:Plan9:*:*) + # "uname -m" is not consistent, so use $cputype instead. 386 + # is converted to i386 for consistency with other x86 + # operating systems. + if test "${cputype-}" = 386; then + UNAME_MACHINE=i386 + elif test "x${cputype-}" != x; then + UNAME_MACHINE=$cputype + fi + GUESS=$UNAME_MACHINE-unknown-plan9 + ;; + *:TOPS-10:*:*) + GUESS=pdp10-unknown-tops10 + ;; + *:TENEX:*:*) + GUESS=pdp10-unknown-tenex + ;; + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) + GUESS=pdp10-dec-tops20 + ;; + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) + GUESS=pdp10-xkl-tops20 + ;; + *:TOPS-20:*:*) + GUESS=pdp10-unknown-tops20 + ;; + *:ITS:*:*) + GUESS=pdp10-unknown-its + ;; + SEI:*:*:SEIUX) + GUESS=mips-sei-seiux$UNAME_RELEASE + ;; + *:DragonFly:*:*) + DRAGONFLY_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` + GUESS=$UNAME_MACHINE-unknown-dragonfly$DRAGONFLY_REL + ;; + *:*VMS:*:*) + UNAME_MACHINE=`(uname -p) 2>/dev/null` + case $UNAME_MACHINE in + A*) GUESS=alpha-dec-vms ;; + I*) GUESS=ia64-dec-vms ;; + V*) GUESS=vax-dec-vms ;; + esac ;; + *:XENIX:*:SysV) + GUESS=i386-pc-xenix + ;; + i*86:skyos:*:*) + SKYOS_REL=`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'` + GUESS=$UNAME_MACHINE-pc-skyos$SKYOS_REL + ;; + i*86:rdos:*:*) + GUESS=$UNAME_MACHINE-pc-rdos + ;; + i*86:Fiwix:*:*) + GUESS=$UNAME_MACHINE-pc-fiwix + ;; + *:AROS:*:*) + GUESS=$UNAME_MACHINE-unknown-aros + ;; + x86_64:VMkernel:*:*) + GUESS=$UNAME_MACHINE-unknown-esx + ;; + amd64:Isilon\ OneFS:*:*) + GUESS=x86_64-unknown-onefs + ;; + *:Unleashed:*:*) + GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE + ;; +esac + +# Do we have a guess based on uname results? +if test "x$GUESS" != x; then + echo "$GUESS" + exit +fi + +# No uname command or uname output not recognized. +set_cc_for_build +cat > "$dummy.c" < +#include +#endif +#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) +#if defined (vax) || defined (__vax) || defined (__vax__) || defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) +#include +#if defined(_SIZE_T_) || defined(SIGLOST) +#include +#endif +#endif +#endif +main () +{ +#if defined (sony) +#if defined (MIPSEB) + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, + I don't know.... */ + printf ("mips-sony-bsd\n"); exit (0); +#else +#include + printf ("m68k-sony-newsos%s\n", +#ifdef NEWSOS4 + "4" +#else + "" +#endif + ); exit (0); +#endif +#endif + +#if defined (NeXT) +#if !defined (__ARCHITECTURE__) +#define __ARCHITECTURE__ "m68k" +#endif + int version; + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; + if (version < 4) + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + else + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); + exit (0); +#endif + +#if defined (MULTIMAX) || defined (n16) +#if defined (UMAXV) + printf ("ns32k-encore-sysv\n"); exit (0); +#else +#if defined (CMU) + printf ("ns32k-encore-mach\n"); exit (0); +#else + printf ("ns32k-encore-bsd\n"); exit (0); +#endif +#endif +#endif + +#if defined (__386BSD__) + printf ("i386-pc-bsd\n"); exit (0); +#endif + +#if defined (sequent) +#if defined (i386) + printf ("i386-sequent-dynix\n"); exit (0); +#endif +#if defined (ns32000) + printf ("ns32k-sequent-dynix\n"); exit (0); +#endif +#endif + +#if defined (_SEQUENT_) + struct utsname un; + + uname(&un); + if (strncmp(un.version, "V2", 2) == 0) { + printf ("i386-sequent-ptx2\n"); exit (0); + } + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ + printf ("i386-sequent-ptx1\n"); exit (0); + } + printf ("i386-sequent-ptx\n"); exit (0); +#endif + +#if defined (vax) +#if !defined (ultrix) +#include +#if defined (BSD) +#if BSD == 43 + printf ("vax-dec-bsd4.3\n"); exit (0); +#else +#if BSD == 199006 + printf ("vax-dec-bsd4.3reno\n"); exit (0); +#else + printf ("vax-dec-bsd\n"); exit (0); +#endif +#endif +#else + printf ("vax-dec-bsd\n"); exit (0); +#endif +#else +#if defined(_SIZE_T_) || defined(SIGLOST) + struct utsname un; + uname (&un); + printf ("vax-dec-ultrix%s\n", un.release); exit (0); +#else + printf ("vax-dec-ultrix\n"); exit (0); +#endif +#endif +#endif +#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) +#if defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) +#if defined(_SIZE_T_) || defined(SIGLOST) + struct utsname *un; + uname (&un); + printf ("mips-dec-ultrix%s\n", un.release); exit (0); +#else + printf ("mips-dec-ultrix\n"); exit (0); +#endif +#endif +#endif + +#if defined (alliant) && defined (i860) + printf ("i860-alliant-bsd\n"); exit (0); +#endif + + exit (1); +} +EOF + +$CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=`"$dummy"` && + { echo "$SYSTEM_NAME"; exit; } + +# Apollos put the system type in the environment. +test -d /usr/apollo && { echo "$ISP-apollo-$SYSTYPE"; exit; } + +echo "$0: unable to guess system type" >&2 + +case $UNAME_MACHINE:$UNAME_SYSTEM in + mips:Linux | mips64:Linux) + # If we got here on MIPS GNU/Linux, output extra information. + cat >&2 <&2 <&2 </dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null` + +hostinfo = `(hostinfo) 2>/dev/null` +/bin/universe = `(/bin/universe) 2>/dev/null` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` +/bin/arch = `(/bin/arch) 2>/dev/null` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` + +UNAME_MACHINE = "$UNAME_MACHINE" +UNAME_RELEASE = "$UNAME_RELEASE" +UNAME_SYSTEM = "$UNAME_SYSTEM" +UNAME_VERSION = "$UNAME_VERSION" +EOF +fi + +exit 1 + +# Local variables: +# eval: (add-hook 'before-save-hook 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/external/config.sub b/external/config.sub new file mode 100755 index 0000000..dba16e8 --- /dev/null +++ b/external/config.sub @@ -0,0 +1,1890 @@ +#! /bin/sh +# Configuration validation subroutine script. +# Copyright 1992-2022 Free Software Foundation, Inc. + +# shellcheck disable=SC2006,SC2268 # see below for rationale + +timestamp='2022-01-03' + +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see . +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). + + +# Please send patches to . +# +# Configuration subroutine to validate and canonicalize a configuration type. +# Supply the specified configuration type as an argument. +# If it is invalid, we print an error message on stderr and exit with code 1. +# Otherwise, we print the canonical config type on stdout and succeed. + +# You can get the latest version of this script from: +# https://git.savannah.gnu.org/cgit/config.git/plain/config.sub + +# This file is supposed to be the same for all GNU packages +# and recognize all the CPU types, system types and aliases +# that are meaningful with *any* GNU software. +# Each package is responsible for reporting which valid configurations +# it does not support. The user should be able to distinguish +# a failure to support a valid configuration from a meaningless +# configuration. + +# The goal of this file is to map all the various variations of a given +# machine specification into a single specification in the form: +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or in some cases, the newer four-part form: +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# It is wrong to echo any other type of specification. + +# The "shellcheck disable" line above the timestamp inhibits complaints +# about features and limitations of the classic Bourne shell that were +# superseded or lifted in POSIX. However, this script identifies a wide +# variety of pre-POSIX systems that do not have POSIX shells at all, and +# even some reasonably current systems (Solaris 10 as case-in-point) still +# have a pre-POSIX /bin/sh. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS + +Canonicalize a configuration name. + +Options: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.sub ($timestamp) + +Copyright 1992-2022 Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + + *local*) + # First pass through any local machine types. + echo "$1" + exit ;; + + * ) + break ;; + esac +done + +case $# in + 0) echo "$me: missing argument$help" >&2 + exit 1;; + 1) ;; + *) echo "$me: too many arguments$help" >&2 + exit 1;; +esac + +# Split fields of configuration type +# shellcheck disable=SC2162 +saved_IFS=$IFS +IFS="-" read field1 field2 field3 field4 <&2 + exit 1 + ;; + *-*-*-*) + basic_machine=$field1-$field2 + basic_os=$field3-$field4 + ;; + *-*-*) + # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two + # parts + maybe_os=$field2-$field3 + case $maybe_os in + nto-qnx* | linux-* | uclinux-uclibc* \ + | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \ + | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \ + | storm-chaos* | os2-emx* | rtmk-nova*) + basic_machine=$field1 + basic_os=$maybe_os + ;; + android-linux) + basic_machine=$field1-unknown + basic_os=linux-android + ;; + *) + basic_machine=$field1-$field2 + basic_os=$field3 + ;; + esac + ;; + *-*) + # A lone config we happen to match not fitting any pattern + case $field1-$field2 in + decstation-3100) + basic_machine=mips-dec + basic_os= + ;; + *-*) + # Second component is usually, but not always the OS + case $field2 in + # Prevent following clause from handling this valid os + sun*os*) + basic_machine=$field1 + basic_os=$field2 + ;; + zephyr*) + basic_machine=$field1-unknown + basic_os=$field2 + ;; + # Manufacturers + dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \ + | att* | 7300* | 3300* | delta* | motorola* | sun[234]* \ + | unicom* | ibm* | next | hp | isi* | apollo | altos* \ + | convergent* | ncr* | news | 32* | 3600* | 3100* \ + | hitachi* | c[123]* | convex* | sun | crds | omron* | dg \ + | ultra | tti* | harris | dolphin | highlevel | gould \ + | cbm | ns | masscomp | apple | axis | knuth | cray \ + | microblaze* | sim | cisco \ + | oki | wec | wrs | winbond) + basic_machine=$field1-$field2 + basic_os= + ;; + *) + basic_machine=$field1 + basic_os=$field2 + ;; + esac + ;; + esac + ;; + *) + # Convert single-component short-hands not valid as part of + # multi-component configurations. + case $field1 in + 386bsd) + basic_machine=i386-pc + basic_os=bsd + ;; + a29khif) + basic_machine=a29k-amd + basic_os=udi + ;; + adobe68k) + basic_machine=m68010-adobe + basic_os=scout + ;; + alliant) + basic_machine=fx80-alliant + basic_os= + ;; + altos | altos3068) + basic_machine=m68k-altos + basic_os= + ;; + am29k) + basic_machine=a29k-none + basic_os=bsd + ;; + amdahl) + basic_machine=580-amdahl + basic_os=sysv + ;; + amiga) + basic_machine=m68k-unknown + basic_os= + ;; + amigaos | amigados) + basic_machine=m68k-unknown + basic_os=amigaos + ;; + amigaunix | amix) + basic_machine=m68k-unknown + basic_os=sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + basic_os=sysv + ;; + apollo68bsd) + basic_machine=m68k-apollo + basic_os=bsd + ;; + aros) + basic_machine=i386-pc + basic_os=aros + ;; + aux) + basic_machine=m68k-apple + basic_os=aux + ;; + balance) + basic_machine=ns32k-sequent + basic_os=dynix + ;; + blackfin) + basic_machine=bfin-unknown + basic_os=linux + ;; + cegcc) + basic_machine=arm-unknown + basic_os=cegcc + ;; + convex-c1) + basic_machine=c1-convex + basic_os=bsd + ;; + convex-c2) + basic_machine=c2-convex + basic_os=bsd + ;; + convex-c32) + basic_machine=c32-convex + basic_os=bsd + ;; + convex-c34) + basic_machine=c34-convex + basic_os=bsd + ;; + convex-c38) + basic_machine=c38-convex + basic_os=bsd + ;; + cray) + basic_machine=j90-cray + basic_os=unicos + ;; + crds | unos) + basic_machine=m68k-crds + basic_os= + ;; + da30) + basic_machine=m68k-da30 + basic_os= + ;; + decstation | pmax | pmin | dec3100 | decstatn) + basic_machine=mips-dec + basic_os= + ;; + delta88) + basic_machine=m88k-motorola + basic_os=sysv3 + ;; + dicos) + basic_machine=i686-pc + basic_os=dicos + ;; + djgpp) + basic_machine=i586-pc + basic_os=msdosdjgpp + ;; + ebmon29k) + basic_machine=a29k-amd + basic_os=ebmon + ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + basic_os=ose + ;; + gmicro) + basic_machine=tron-gmicro + basic_os=sysv + ;; + go32) + basic_machine=i386-pc + basic_os=go32 + ;; + h8300hms) + basic_machine=h8300-hitachi + basic_os=hms + ;; + h8300xray) + basic_machine=h8300-hitachi + basic_os=xray + ;; + h8500hms) + basic_machine=h8500-hitachi + basic_os=hms + ;; + harris) + basic_machine=m88k-harris + basic_os=sysv3 + ;; + hp300 | hp300hpux) + basic_machine=m68k-hp + basic_os=hpux + ;; + hp300bsd) + basic_machine=m68k-hp + basic_os=bsd + ;; + hppaosf) + basic_machine=hppa1.1-hp + basic_os=osf + ;; + hppro) + basic_machine=hppa1.1-hp + basic_os=proelf + ;; + i386mach) + basic_machine=i386-mach + basic_os=mach + ;; + isi68 | isi) + basic_machine=m68k-isi + basic_os=sysv + ;; + m68knommu) + basic_machine=m68k-unknown + basic_os=linux + ;; + magnum | m3230) + basic_machine=mips-mips + basic_os=sysv + ;; + merlin) + basic_machine=ns32k-utek + basic_os=sysv + ;; + mingw64) + basic_machine=x86_64-pc + basic_os=mingw64 + ;; + mingw32) + basic_machine=i686-pc + basic_os=mingw32 + ;; + mingw32ce) + basic_machine=arm-unknown + basic_os=mingw32ce + ;; + monitor) + basic_machine=m68k-rom68k + basic_os=coff + ;; + morphos) + basic_machine=powerpc-unknown + basic_os=morphos + ;; + moxiebox) + basic_machine=moxie-unknown + basic_os=moxiebox + ;; + msdos) + basic_machine=i386-pc + basic_os=msdos + ;; + msys) + basic_machine=i686-pc + basic_os=msys + ;; + mvs) + basic_machine=i370-ibm + basic_os=mvs + ;; + nacl) + basic_machine=le32-unknown + basic_os=nacl + ;; + ncr3000) + basic_machine=i486-ncr + basic_os=sysv4 + ;; + netbsd386) + basic_machine=i386-pc + basic_os=netbsd + ;; + netwinder) + basic_machine=armv4l-rebel + basic_os=linux + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + basic_os=newsos + ;; + news1000) + basic_machine=m68030-sony + basic_os=newsos + ;; + necv70) + basic_machine=v70-nec + basic_os=sysv + ;; + nh3000) + basic_machine=m68k-harris + basic_os=cxux + ;; + nh[45]000) + basic_machine=m88k-harris + basic_os=cxux + ;; + nindy960) + basic_machine=i960-intel + basic_os=nindy + ;; + mon960) + basic_machine=i960-intel + basic_os=mon960 + ;; + nonstopux) + basic_machine=mips-compaq + basic_os=nonstopux + ;; + os400) + basic_machine=powerpc-ibm + basic_os=os400 + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + basic_os=ose + ;; + os68k) + basic_machine=m68k-none + basic_os=os68k + ;; + paragon) + basic_machine=i860-intel + basic_os=osf + ;; + parisc) + basic_machine=hppa-unknown + basic_os=linux + ;; + psp) + basic_machine=mipsallegrexel-sony + basic_os=psp + ;; + pw32) + basic_machine=i586-unknown + basic_os=pw32 + ;; + rdos | rdos64) + basic_machine=x86_64-pc + basic_os=rdos + ;; + rdos32) + basic_machine=i386-pc + basic_os=rdos + ;; + rom68k) + basic_machine=m68k-rom68k + basic_os=coff + ;; + sa29200) + basic_machine=a29k-amd + basic_os=udi + ;; + sei) + basic_machine=mips-sei + basic_os=seiux + ;; + sequent) + basic_machine=i386-sequent + basic_os= + ;; + sps7) + basic_machine=m68k-bull + basic_os=sysv2 + ;; + st2000) + basic_machine=m68k-tandem + basic_os= + ;; + stratus) + basic_machine=i860-stratus + basic_os=sysv4 + ;; + sun2) + basic_machine=m68000-sun + basic_os= + ;; + sun2os3) + basic_machine=m68000-sun + basic_os=sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + basic_os=sunos4 + ;; + sun3) + basic_machine=m68k-sun + basic_os= + ;; + sun3os3) + basic_machine=m68k-sun + basic_os=sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + basic_os=sunos4 + ;; + sun4) + basic_machine=sparc-sun + basic_os= + ;; + sun4os3) + basic_machine=sparc-sun + basic_os=sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + basic_os=sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + basic_os=solaris2 + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + basic_os= + ;; + sv1) + basic_machine=sv1-cray + basic_os=unicos + ;; + symmetry) + basic_machine=i386-sequent + basic_os=dynix + ;; + t3e) + basic_machine=alphaev5-cray + basic_os=unicos + ;; + t90) + basic_machine=t90-cray + basic_os=unicos + ;; + toad1) + basic_machine=pdp10-xkl + basic_os=tops20 + ;; + tpf) + basic_machine=s390x-ibm + basic_os=tpf + ;; + udi29k) + basic_machine=a29k-amd + basic_os=udi + ;; + ultra3) + basic_machine=a29k-nyu + basic_os=sym1 + ;; + v810 | necv810) + basic_machine=v810-nec + basic_os=none + ;; + vaxv) + basic_machine=vax-dec + basic_os=sysv + ;; + vms) + basic_machine=vax-dec + basic_os=vms + ;; + vsta) + basic_machine=i386-pc + basic_os=vsta + ;; + vxworks960) + basic_machine=i960-wrs + basic_os=vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + basic_os=vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + basic_os=vxworks + ;; + xbox) + basic_machine=i686-pc + basic_os=mingw32 + ;; + ymp) + basic_machine=ymp-cray + basic_os=unicos + ;; + *) + basic_machine=$1 + basic_os= + ;; + esac + ;; +esac + +# Decode 1-component or ad-hoc basic machines +case $basic_machine in + # Here we handle the default manufacturer of certain CPU types. It is in + # some cases the only manufacturer, in others, it is the most popular. + w89k) + cpu=hppa1.1 + vendor=winbond + ;; + op50n) + cpu=hppa1.1 + vendor=oki + ;; + op60c) + cpu=hppa1.1 + vendor=oki + ;; + ibm*) + cpu=i370 + vendor=ibm + ;; + orion105) + cpu=clipper + vendor=highlevel + ;; + mac | mpw | mac-mpw) + cpu=m68k + vendor=apple + ;; + pmac | pmac-mpw) + cpu=powerpc + vendor=apple + ;; + + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) + cpu=m68000 + vendor=att + ;; + 3b*) + cpu=we32k + vendor=att + ;; + bluegene*) + cpu=powerpc + vendor=ibm + basic_os=cnk + ;; + decsystem10* | dec10*) + cpu=pdp10 + vendor=dec + basic_os=tops10 + ;; + decsystem20* | dec20*) + cpu=pdp10 + vendor=dec + basic_os=tops20 + ;; + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + cpu=m68k + vendor=motorola + ;; + dpx2*) + cpu=m68k + vendor=bull + basic_os=sysv3 + ;; + encore | umax | mmax) + cpu=ns32k + vendor=encore + ;; + elxsi) + cpu=elxsi + vendor=elxsi + basic_os=${basic_os:-bsd} + ;; + fx2800) + cpu=i860 + vendor=alliant + ;; + genix) + cpu=ns32k + vendor=ns + ;; + h3050r* | hiux*) + cpu=hppa1.1 + vendor=hitachi + basic_os=hiuxwe2 + ;; + hp3k9[0-9][0-9] | hp9[0-9][0-9]) + cpu=hppa1.0 + vendor=hp + ;; + hp9k2[0-9][0-9] | hp9k31[0-9]) + cpu=m68000 + vendor=hp + ;; + hp9k3[2-9][0-9]) + cpu=m68k + vendor=hp + ;; + hp9k6[0-9][0-9] | hp6[0-9][0-9]) + cpu=hppa1.0 + vendor=hp + ;; + hp9k7[0-79][0-9] | hp7[0-79][0-9]) + cpu=hppa1.1 + vendor=hp + ;; + hp9k78[0-9] | hp78[0-9]) + # FIXME: really hppa2.0-hp + cpu=hppa1.1 + vendor=hp + ;; + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) + # FIXME: really hppa2.0-hp + cpu=hppa1.1 + vendor=hp + ;; + hp9k8[0-9][13679] | hp8[0-9][13679]) + cpu=hppa1.1 + vendor=hp + ;; + hp9k8[0-9][0-9] | hp8[0-9][0-9]) + cpu=hppa1.0 + vendor=hp + ;; + i*86v32) + cpu=`echo "$1" | sed -e 's/86.*/86/'` + vendor=pc + basic_os=sysv32 + ;; + i*86v4*) + cpu=`echo "$1" | sed -e 's/86.*/86/'` + vendor=pc + basic_os=sysv4 + ;; + i*86v) + cpu=`echo "$1" | sed -e 's/86.*/86/'` + vendor=pc + basic_os=sysv + ;; + i*86sol2) + cpu=`echo "$1" | sed -e 's/86.*/86/'` + vendor=pc + basic_os=solaris2 + ;; + j90 | j90-cray) + cpu=j90 + vendor=cray + basic_os=${basic_os:-unicos} + ;; + iris | iris4d) + cpu=mips + vendor=sgi + case $basic_os in + irix*) + ;; + *) + basic_os=irix4 + ;; + esac + ;; + miniframe) + cpu=m68000 + vendor=convergent + ;; + *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*) + cpu=m68k + vendor=atari + basic_os=mint + ;; + news-3600 | risc-news) + cpu=mips + vendor=sony + basic_os=newsos + ;; + next | m*-next) + cpu=m68k + vendor=next + case $basic_os in + openstep*) + ;; + nextstep*) + ;; + ns2*) + basic_os=nextstep2 + ;; + *) + basic_os=nextstep3 + ;; + esac + ;; + np1) + cpu=np1 + vendor=gould + ;; + op50n-* | op60c-*) + cpu=hppa1.1 + vendor=oki + basic_os=proelf + ;; + pa-hitachi) + cpu=hppa1.1 + vendor=hitachi + basic_os=hiuxwe2 + ;; + pbd) + cpu=sparc + vendor=tti + ;; + pbb) + cpu=m68k + vendor=tti + ;; + pc532) + cpu=ns32k + vendor=pc532 + ;; + pn) + cpu=pn + vendor=gould + ;; + power) + cpu=power + vendor=ibm + ;; + ps2) + cpu=i386 + vendor=ibm + ;; + rm[46]00) + cpu=mips + vendor=siemens + ;; + rtpc | rtpc-*) + cpu=romp + vendor=ibm + ;; + sde) + cpu=mipsisa32 + vendor=sde + basic_os=${basic_os:-elf} + ;; + simso-wrs) + cpu=sparclite + vendor=wrs + basic_os=vxworks + ;; + tower | tower-32) + cpu=m68k + vendor=ncr + ;; + vpp*|vx|vx-*) + cpu=f301 + vendor=fujitsu + ;; + w65) + cpu=w65 + vendor=wdc + ;; + w89k-*) + cpu=hppa1.1 + vendor=winbond + basic_os=proelf + ;; + none) + cpu=none + vendor=none + ;; + leon|leon[3-9]) + cpu=sparc + vendor=$basic_machine + ;; + leon-*|leon[3-9]-*) + cpu=sparc + vendor=`echo "$basic_machine" | sed 's/-.*//'` + ;; + + *-*) + # shellcheck disable=SC2162 + saved_IFS=$IFS + IFS="-" read cpu vendor <&2 + exit 1 + ;; + esac + ;; +esac + +# Here we canonicalize certain aliases for manufacturers. +case $vendor in + digital*) + vendor=dec + ;; + commodore*) + vendor=cbm + ;; + *) + ;; +esac + +# Decode manufacturer-specific aliases for certain operating systems. + +if test x$basic_os != x +then + +# First recognize some ad-hoc cases, or perhaps split kernel-os, or else just +# set os. +case $basic_os in + gnu/linux*) + kernel=linux + os=`echo "$basic_os" | sed -e 's|gnu/linux|gnu|'` + ;; + os2-emx) + kernel=os2 + os=`echo "$basic_os" | sed -e 's|os2-emx|emx|'` + ;; + nto-qnx*) + kernel=nto + os=`echo "$basic_os" | sed -e 's|nto-qnx|qnx|'` + ;; + *-*) + # shellcheck disable=SC2162 + saved_IFS=$IFS + IFS="-" read kernel os <&2 + exit 1 + ;; +esac + +# As a final step for OS-related things, validate the OS-kernel combination +# (given a valid OS), if there is a kernel. +case $kernel-$os in + linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* \ + | linux-musl* | linux-relibc* | linux-uclibc* ) + ;; + uclinux-uclibc* ) + ;; + -dietlibc* | -newlib* | -musl* | -relibc* | -uclibc* ) + # These are just libc implementations, not actual OSes, and thus + # require a kernel. + echo "Invalid configuration \`$1': libc \`$os' needs explicit kernel." 1>&2 + exit 1 + ;; + kfreebsd*-gnu* | kopensolaris*-gnu*) + ;; + vxworks-simlinux | vxworks-simwindows | vxworks-spe) + ;; + nto-qnx*) + ;; + os2-emx) + ;; + *-eabi* | *-gnueabi*) + ;; + -*) + # Blank kernel with real OS is always fine. + ;; + *-*) + echo "Invalid configuration \`$1': Kernel \`$kernel' not known to work with OS \`$os'." 1>&2 + exit 1 + ;; +esac + +# Here we handle the case where we know the os, and the CPU type, but not the +# manufacturer. We pick the logical manufacturer. +case $vendor in + unknown) + case $cpu-$os in + *-riscix*) + vendor=acorn + ;; + *-sunos*) + vendor=sun + ;; + *-cnk* | *-aix*) + vendor=ibm + ;; + *-beos*) + vendor=be + ;; + *-hpux*) + vendor=hp + ;; + *-mpeix*) + vendor=hp + ;; + *-hiux*) + vendor=hitachi + ;; + *-unos*) + vendor=crds + ;; + *-dgux*) + vendor=dg + ;; + *-luna*) + vendor=omron + ;; + *-genix*) + vendor=ns + ;; + *-clix*) + vendor=intergraph + ;; + *-mvs* | *-opened*) + vendor=ibm + ;; + *-os400*) + vendor=ibm + ;; + s390-* | s390x-*) + vendor=ibm + ;; + *-ptx*) + vendor=sequent + ;; + *-tpf*) + vendor=ibm + ;; + *-vxsim* | *-vxworks* | *-windiss*) + vendor=wrs + ;; + *-aux*) + vendor=apple + ;; + *-hms*) + vendor=hitachi + ;; + *-mpw* | *-macos*) + vendor=apple + ;; + *-*mint | *-mint[0-9]* | *-*MiNT | *-MiNT[0-9]*) + vendor=atari + ;; + *-vos*) + vendor=stratus + ;; + esac + ;; +esac + +echo "$cpu-$vendor-${kernel:+$kernel-}$os" +exit + +# Local variables: +# eval: (add-hook 'before-save-hook 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/external/external_build.cmake b/external/external_build.cmake index bbe3e77..b82d692 100644 --- a/external/external_build.cmake +++ b/external/external_build.cmake @@ -65,7 +65,11 @@ if (ENABLE_SHARP) URL ${CMAKE_SOURCE_DIR}/external/libsharp-6077806.tar.gz PREFIX ${BUILD_PREFIX}/sharp-prefix BUILD_IN_SOURCE 1 - CONFIGURE_COMMAND autoconf && ./configure "CC=${CMAKE_C_COMPILER}" "CXX=${CMAKE_CXX_COMPILER}" --prefix=${DEP_BUILD} ${SHARP_OPENMP} + CONFIGURE_COMMAND + cp -f ${CMAKE_SOURCE_DIR}/external/config.guess . && + cp -f ${CMAKE_SOURCE_DIR}/external/config.sub . && + autoconf && + ./configure "CC=${CMAKE_C_COMPILER}" "CXX=${CMAKE_CXX_COMPILER}" --prefix=${DEP_BUILD} ${SHARP_OPENMP} INSTALL_COMMAND echo "No install" BUILD_BYPRODUCTS ${SHARP_LIBRARIES} ) From 522588fc1f770c3ee1233a9bf22de8345e7bd7e4 Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Mon, 27 Feb 2023 14:16:36 +0100 Subject: [PATCH 59/89] Fixup script for more modern pypa image --- builder/build-wheels.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/builder/build-wheels.sh b/builder/build-wheels.sh index 585ab56..60a8bfc 100755 --- a/builder/build-wheels.sh +++ b/builder/build-wheels.sh @@ -13,6 +13,9 @@ yum install -y cmake3 gsl-devel zlib-devel fftw3-devel libffi-devel hdf5 hdf5-de ln -fs /usr/bin/cmake3 /usr/bin/cmake +test -d /io/wheelhouse || mkdir /io/wheelhouse +test -d /io/wheelhouse/fix || mkdir /io/wheelhouse/fix + ALL_PYTHON="cp37-cp37m cp38-cp38 cp39-cp39 cp310-cp310" # Compile wheels @@ -25,8 +28,8 @@ for pkg in $ALL_PYTHON; do done # Bundle external shared libraries into the wheels -for whl in wheelhouse/cosmotool*.whl; do - auditwheel repair "$whl" --plat $PLAT -w /io/wheelhouse/ +for whl in /io/wheelhouse/cosmotool*.whl; do + auditwheel repair "$whl" --plat $PLAT -w /io/wheelhouse/fix done # Install packages and test From 05ac03fb7ac6aad8c739635c4288afeea8481116 Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Sat, 22 Apr 2023 17:21:14 +0200 Subject: [PATCH 60/89] Update bundled external libs --- external/external_build.cmake | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/external/external_build.cmake b/external/external_build.cmake index b82d692..c0e73eb 100644 --- a/external/external_build.cmake +++ b/external/external_build.cmake @@ -5,11 +5,11 @@ OPTION(ENABLE_OPENMP "Set to Yes if Healpix and/or you need openMP" OFF) SET(FFTW_URL "http://www.fftw.org/fftw-3.3.3.tar.gz" CACHE STRING "URL to download FFTW from") SET(EIGEN_URL "https://gitlab.com/libeigen/eigen/-/archive/3.3.7/eigen-3.3.7.tar.bz2" CACHE STRING "URL to download Eigen from") SET(GENGETOPT_URL "ftp://ftp.gnu.org/gnu/gengetopt/gengetopt-2.22.5.tar.gz" CACHE STRING "URL to download gengetopt 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(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 "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(HDF5_URL "https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.12/hdf5-1.12.2/src/hdf5-1.12.2.tar.gz" CACHE STRING "URL to download HDF5 from") +SET(NETCDF_URL "https://downloads.unidata.ucar.edu/netcdf-c/4.9.2/netcdf-c-4.9.2.tar.gz" CACHE STRING "URL to download NetCDF from") +SET(NETCDFCXX_URL "https://github.com/Unidata/netcdf-cxx4/archive/v4.3.1.tar.gz" CACHE STRING "URL to download NetCDF-C++ from") +SET(BOOST_URL "https://boostorg.jfrog.io/artifactory/main/release/1.82.0/source/boost_1_82_0.tar.gz" CACHE STRING "URL to download Boost from") +SET(GSL_URL "https://ftpmirror.gnu.org/gsl/gsl-2.7.tar.gz" CACHE STRING "URL to download GSL from ") mark_as_advanced(FFTW_URL EIGEN_URL HDF5_URL NETCDF_URL BOOST_URL GSL_URL) SET(all_deps) @@ -86,7 +86,7 @@ if (INTERNAL_HDF5) ExternalProject_Add(hdf5 PREFIX ${BUILD_PREFIX}/hdf5-prefix URL ${HDF5_URL} - URL_HASH MD5=29117bf488887f89888f9304c8ebea0b + URL_HASH MD5=30172c75e436d7f2180e274071a4ca97 CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXT_INSTALL} -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} @@ -95,6 +95,7 @@ if (INTERNAL_HDF5) -DHDF5_BUILD_TOOLS=ON -DHDF5_BUILD_HL_LIB=ON -DBUILD_SHARED_LIBS=OFF + -DHDF5_ENABLE_Z_LIB_SUPPORT=ON ) SET(cosmotool_DEPS ${cosmotool_DEPS} hdf5) SET(hdf5_built hdf5) @@ -102,11 +103,11 @@ if (INTERNAL_HDF5) SET(HDF5_ROOTDIR ${HDF5_BIN_DIR}) SET(CONFIGURE_LDFLAGS "${CONFIGURE_LDFLAGS} -L${HDF5_BIN_DIR}/lib") SET(CONFIGURE_LIBS "${CONFIGURE_LIBS} -ldl") - set(HDF5_C_STATIC_LIBRARY ${HDF5_BIN_DIR}/lib/libhdf5-static.a) - set(HDF5_HL_STATIC_LIBRARY ${HDF5_BIN_DIR}/lib/libhdf5_hl-static.a) - set(HDF5_LIBRARIES ${HDF5_BIN_DIR}/lib/libhdf5-static.a CACHE STRING "HDF5 lib" FORCE) - set(HDF5_HL_LIBRARIES ${HDF5_BIN_DIR}/lib/libhdf5_hl-static.a CACHE STRING "HDF5 HL lib" FORCE) - set(HDF5_CXX_LIBRARIES ${HDF5_BIN_DIR}/lib/libhdf5_cpp-static.a CACHE STRING "HDF5 C++ lib" FORCE) + set(HDF5_C_STATIC_LIBRARY ${HDF5_BIN_DIR}/lib/libhdf5.a) + set(HDF5_HL_STATIC_LIBRARY ${HDF5_BIN_DIR}/lib/libhdf5_hl.a) + set(HDF5_LIBRARIES ${HDF5_BIN_DIR}/lib/libhdf5.a CACHE STRING "HDF5 lib" FORCE) + set(HDF5_HL_LIBRARIES ${HDF5_BIN_DIR}/lib/libhdf5_hl.a CACHE STRING "HDF5 HL lib" FORCE) + set(HDF5_CXX_LIBRARIES ${HDF5_BIN_DIR}/lib/libhdf5_cpp.a CACHE STRING "HDF5 C++ lib" FORCE) SET(HDF5_INCLUDE_DIRS ${HDF5_BIN_DIR}/include CACHE STRING "HDF5 include path" FORCE) mark_as_advanced(HDF5_LIBRARIES HDF5_CXX_LIBRARIES HDF5_INCLUDE_DIRS) @@ -164,7 +165,7 @@ if (INTERNAL_NETCDF) SET(NETCDF_CONFIG_COMMAND ${NETCDF_SOURCE_DIR}/configure --prefix=${NETCDF_BIN_DIR} --libdir=${NETCDF_BIN_DIR}/lib --enable-netcdf-4 --with-pic --disable-shared --disable-dap - --disable-cdmremote --disable-rpc --enable-cxx-4 + --disable-byterange --disable-cdmremote --disable-rpc --enable-cxx-4 --disable-examples ${EXTRA_NC_FLAGS} CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER}) list(INSERT CMAKE_PREFIX_PATH 0 ${EXT_INSTALL}) @@ -182,6 +183,7 @@ if (INTERNAL_NETCDF) -DBUILD_TESTING=OFF -DCMAKE_BUILD_TYPE=Release -DENABLE_NETCDF4=ON + -DENABLE_BYTERANGE=FALSE -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DENABLE_DAP=OFF -DCMAKE_INSTALL_PREFIX=${NETCDF_BIN_DIR} @@ -238,7 +240,7 @@ if (INTERNAL_BOOST) ExternalProject_Add(boost URL ${BOOST_URL} PREFIX ${BUILD_PREFIX}/boost-prefix - URL_HASH MD5=da07ca30dd1c0d1fdedbd487efee01bd + URL_HASH MD5=f7050f554a65f6a42ece221eaeec1660 CONFIGURE_COMMAND ${BOOST_SOURCE_DIR}/bootstrap.sh --prefix=${CMAKE_BINARY_DIR}/ext_build/boost BUILD_IN_SOURCE 1 From d8b58bd8f154ab3f9759b0d12f6bcbd43789a744 Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Sun, 23 Apr 2023 12:44:12 +0200 Subject: [PATCH 61/89] Update version --- setup.py | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/setup.py b/setup.py index f9b7042..857eab4 100644 --- a/setup.py +++ b/setup.py @@ -76,9 +76,9 @@ class InstallCMakeLibs(install_lib): # # your files are moved to the appropriate location when the installation # # is run # -# libs = [os.path.join(bin_dir, _lib) for _lib in -# os.listdir(bin_dir) if -# os.path.isfile(os.path.join(bin_dir, _lib)) and +# libs = [os.path.join(bin_dir, _lib) for _lib in +# os.listdir(bin_dir) if +# os.path.isfile(os.path.join(bin_dir, _lib)) and # os.path.splitext(_lib)[1] in [".dll", ".so"] # and not (_lib.startswith("python") or _lib.startswith(PACKAGE_NAME))] # @@ -87,16 +87,16 @@ class InstallCMakeLibs(install_lib): # shutil.move(lib, os.path.join(self.build_dir, # os.path.basename(lib))) # -# # Mark the libs for installation, adding them to -# # distribution.data_files seems to ensure that setuptools' record +# # Mark the libs for installation, adding them to +# # distribution.data_files seems to ensure that setuptools' record # # writer appends them to installed-files.txt in the package's egg-info # # -# # Also tried adding the libraries to the distribution.libraries list, -# # but that never seemed to add them to the installed-files.txt in the -# # egg-info, and the online recommendation seems to be adding libraries -# # into eager_resources in the call to setup(), which I think puts them -# # in data_files anyways. -# # +# # Also tried adding the libraries to the distribution.libraries list, +# # but that never seemed to add them to the installed-files.txt in the +# # egg-info, and the online recommendation seems to be adding libraries +# # into eager_resources in the call to setup(), which I think puts them +# # in data_files anyways. +# # # # What is the best way? # # # These are the additional installation files that should be @@ -104,7 +104,7 @@ class InstallCMakeLibs(install_lib): # # step; depending on the files that are generated from your cmake # # build chain, you may need to modify the below code # -# self.distribution.data_files = [os.path.join(self.install_dir, +# self.distribution.data_files = [os.path.join(self.install_dir, # os.path.basename(lib)) # for lib in libs] # print(self.distribution.data_files) @@ -213,7 +213,7 @@ class BuildCMakeExt(build_ext): if _pyd_top[0].startswith(PACKAGE_NAME): if os.path.splitext(_pyd)[1] in [".pyd", ".so"] or _pyd_top[-1] == 'config.py': pyd_path.append((_pyd_top,_pyd)) - + for top,p in pyd_path: _,n = os.path.split(p) @@ -229,7 +229,7 @@ class BuildCMakeExt(build_ext): CosmoTool_extension = CMakeExtension(name="cosmotool") setup(name='cosmotool', - version='1.3.2', + version='1.3.3', packages=["cosmotool"], package_dir={'cosmotool': 'python/cosmotool'}, install_requires=['numpy','cffi','numexpr','pyfftw','h5py'], From 2aa7c96e4850bf04adc90b763da4e60095f8a994 Mon Sep 17 00:00:00 2001 From: "guilhem.lavaux@iap.fr" Date: Sun, 3 Dec 2023 20:29:56 +0100 Subject: [PATCH 62/89] Update for macmini --- external/external_build.cmake | 14 +++++++++----- external/libsharp-8d51946.tar.gz | Bin 0 -> 92135 bytes 2 files changed, 9 insertions(+), 5 deletions(-) create mode 100644 external/libsharp-8d51946.tar.gz diff --git a/external/external_build.cmake b/external/external_build.cmake index b82d692..990cdca 100644 --- a/external/external_build.cmake +++ b/external/external_build.cmake @@ -37,11 +37,12 @@ CHECK_CHANGE_STATE(INTERNAL_DLIB DLIB_INCLUDE_DIR DLIB_LIBRARIES) IF(ENABLE_OPENMP) IF (NOT OPENMP_FOUND) MESSAGE(ERROR "No known compiler option for enabling OpenMP") + ELSE() + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}") + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}") + SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_C_FLAGS}") ENDIF(NOT OPENMP_FOUND) - SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}") - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}") - SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_C_FLAGS}") ENDIF(ENABLE_OPENMP) @@ -55,21 +56,24 @@ if (ENABLE_SHARP) SET(DEP_BUILD ${BUILD_PREFIX}/sharp-prefix/src/sharp/auto) IF(NOT ENABLE_OPENMP) SET(SHARP_OPENMP --disable-openmp) + ELSE() + SET(SHARP_OPENMP) ENDIF() SET(CUTILS_LIBRARY ${DEP_BUILD}/lib/libc_utils.a) SET(FFTPACK_LIBRARY ${DEP_BUILD}/lib/libfftpack.a) SET(SHARP_LIBRARY ${DEP_BUILD}/lib/libsharp.a) SET(SHARP_LIBRARIES ${SHARP_LIBRARY} ${FFTPACK_LIBRARY} ${CUTILS_LIBRARY}) SET(SHARP_INCLUDE_PATH ${DEP_BUILD}/include) + message(STATUS "Flags: ${CMAKE_C_FLAGS}") ExternalProject_Add(sharp - URL ${CMAKE_SOURCE_DIR}/external/libsharp-6077806.tar.gz + URL ${CMAKE_SOURCE_DIR}/external/libsharp-8d51946.tar.gz PREFIX ${BUILD_PREFIX}/sharp-prefix BUILD_IN_SOURCE 1 CONFIGURE_COMMAND cp -f ${CMAKE_SOURCE_DIR}/external/config.guess . && cp -f ${CMAKE_SOURCE_DIR}/external/config.sub . && autoconf && - ./configure "CC=${CMAKE_C_COMPILER}" "CXX=${CMAKE_CXX_COMPILER}" --prefix=${DEP_BUILD} ${SHARP_OPENMP} + ./configure "CC=${CMAKE_C_COMPILER}" "CXX=${CMAKE_CXX_COMPILER}" "CFLAGS=${CMAKE_C_FLAGS}" "LDFLAGS=${CMAKE_EXE_LINKER_FLAGS}" --prefix=${DEP_BUILD} ${SHARP_OPENMP} INSTALL_COMMAND echo "No install" BUILD_BYPRODUCTS ${SHARP_LIBRARIES} ) diff --git a/external/libsharp-8d51946.tar.gz b/external/libsharp-8d51946.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..7ca7602b566408a29e58d09b6eca546994c001be GIT binary patch literal 92135 zcmV(xKdk#`N_$fH!okmIXTDor{}NE&c0jxFVM2{scab)II_s| z@>}bE@A)=!|3^Nr&h#u_txQ(_``h@{>AUmSZ>MkGy*zvS>g{}f{?^P-rtvH`)0eMb zy*@p8ck=Gtx%x-b{IAbn_eqnfT}H+F`5)E(i$8w``NNwxuMYb^es25!*~#gvm*2hm z>)GA?{FD3tpVxnPk(9|I%M0^I&ye_keo+5sZ(eTe{|p)6yT6MN|H<|LLpN7HbZxHw z?FaS4f8odVX2$=`m3k3XWiJ0+otLINi)KrsUd-}ro-Dd)zNmkO49m*;U;Vf8y8KcV zc#|#d*Sv^ksp%%!3`eXtodABGS5Lx0#G^=|b2!^O?uQse*q;kd8%Eyw3) zQ`jWW^jSy$N0k|U`tIGSQu;DqZ;E8GEcMalF}{5JuEUS?bzzJi=kxL@DvZ9)t1OO6 zY|znzY}V~4{fgE^*_SlQ^ti<8vZJq)dAZcrX`UAyeUaOe*5CFttmX9N`RU7(Q~faR zDcyfG#U=+8iPdXUtdg=cu`Y7}-StLCS*+v4mPInHN~5uMilbNbFfmr?e6GtS-b|C3 z$*j?FKC1{GcQn@P*)qx&Nw&~QN!w?6siQQ_pG@3UhlInQ`@%%4X=-TIWNG~NR?qW7 zufUA9UL5rQ*jVIPA-jye;LE3Iqc?d~s5zt&=PP(6=Gt{H7jon$TSp!cvmqP{FD^RtA>2o z?6VTsJ@Q)l1f7;4zpB8XUC8q{M?yIkgcAU34}^AvivYL3%EIF zLCYE1rNK_9VeI*WvkJddgFr4|w*U6_b8#?ceu*0DmnlCyvzF?jYyZ}86G6bsz= z%v_P-0(fPytyLk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T5H!QPKzb<~Sk^?jMij?Nfd_rXKCY0jK+K6bfYGOYYbpjk9^K72T z9J?IQ_~@~THz%SWH&H%x%gKE7yl3e4{wi`(pWMk2Civ{#ES#0)OKEQ8+GFP@3-0rng3L_2f@toJWk4B}9GB+(ZFX2n4Cx4a- zI$r`NIt9en=2ksKdZrtw{rsw1d0W&+ovz2rPTCF#r%+t<2oG-vAl@O>O1aHiz z7#Ll)w1?<5N}12*_|#X%zTG3pj%G}nhZ1XApIifl?1`54nw2PveEE>x3ME1W0dKnW!@V6h72?Z&LYx)J*>Cs|jQY L!ZXARJjDM178xt) literal 0 HcmV?d00001 From d4b1742cbf1083b198cc1ada1e848300eec4f20a Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Tue, 5 Dec 2023 16:35:43 +0100 Subject: [PATCH 63/89] Add periodic argument --- sample/simple3DFilter.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sample/simple3DFilter.cpp b/sample/simple3DFilter.cpp index e075b06..52d48aa 100644 --- a/sample/simple3DFilter.cpp +++ b/sample/simple3DFilter.cpp @@ -84,6 +84,7 @@ int main(int argc, char **argv) { char *fname1, *outFile; double rLimit, boxsize, rLimit2, cx, cy, cz; int Nres; + int periodic; MiniArgDesc args[] = {{"INPUT DATA1", &fname1, MINIARG_STRING}, {"RADIUS LIMIT", &rLimit, MINIARG_DOUBLE}, @@ -93,6 +94,7 @@ int main(int argc, char **argv) { {"CY", &cy, MINIARG_DOUBLE}, {"CZ", &cz, MINIARG_DOUBLE}, {"OUTPUT FILE", &outFile, MINIARG_STRING}, + {"PERIODIC", &periodic, MINIARG_INT}, {0, 0, MINIARG_NULL}}; if (!parseMiniArgs(argc, argv, args)) @@ -148,6 +150,7 @@ int main(int argc, char **argv) { cout << "Building trees..." << endl; MyTree tree1(allCells_1, N1_points); + tree1.setPeriodic(periodic != 0); cout << "Creating smoothing filter..." << endl; From 4afc982dfc7d4b1ef33d7aad85ae81355f3e19cd Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Wed, 6 Dec 2023 09:28:19 +0100 Subject: [PATCH 64/89] Cache downloads --- external/external_build.cmake | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/external/external_build.cmake b/external/external_build.cmake index cfcbdc4..7503e45 100644 --- a/external/external_build.cmake +++ b/external/external_build.cmake @@ -2,6 +2,7 @@ include(FindOpenMP) OPTION(ENABLE_OPENMP "Set to Yes if Healpix and/or you need openMP" OFF) +SET(SOURCE_PREFIX ${CMAKE_SOURCE_DIR}) SET(FFTW_URL "http://www.fftw.org/fftw-3.3.3.tar.gz" CACHE STRING "URL to download FFTW from") SET(EIGEN_URL "https://gitlab.com/libeigen/eigen/-/archive/3.3.7/eigen-3.3.7.tar.bz2" CACHE STRING "URL to download Eigen from") SET(GENGETOPT_URL "ftp://ftp.gnu.org/gnu/gengetopt/gengetopt-2.22.5.tar.gz" CACHE STRING "URL to download gengetopt from") @@ -12,6 +13,8 @@ SET(BOOST_URL "https://boostorg.jfrog.io/artifactory/main/release/1.82.0/source/ SET(GSL_URL "https://ftpmirror.gnu.org/gsl/gsl-2.7.tar.gz" CACHE STRING "URL to download GSL from ") mark_as_advanced(FFTW_URL EIGEN_URL HDF5_URL NETCDF_URL BOOST_URL GSL_URL) +file(MAKE_DIRECTORY ${SOURCE_PREFIX}/downloads) + SET(all_deps) MACRO(CHECK_CHANGE_STATE VAR) @@ -68,6 +71,7 @@ if (ENABLE_SHARP) ExternalProject_Add(sharp URL ${CMAKE_SOURCE_DIR}/external/libsharp-8d51946.tar.gz PREFIX ${BUILD_PREFIX}/sharp-prefix + DOWNLOAD_DIR ${SOURCE_PREFIX}/downloads BUILD_IN_SOURCE 1 CONFIGURE_COMMAND cp -f ${CMAKE_SOURCE_DIR}/external/config.guess . && @@ -91,6 +95,7 @@ if (INTERNAL_HDF5) PREFIX ${BUILD_PREFIX}/hdf5-prefix URL ${HDF5_URL} URL_HASH MD5=30172c75e436d7f2180e274071a4ca97 + DOWNLOAD_DIR ${SOURCE_PREFIX}/downloads CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXT_INSTALL} -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} @@ -177,6 +182,7 @@ if (INTERNAL_NETCDF) ExternalProject_Add(netcdf DEPENDS ${hdf5_built} PREFIX ${BUILD_PREFIX}/netcdf-prefix + DOWNLOAD_DIR ${SOURCE_PREFIX}/downloads URL ${NETCDF_URL} LIST_SEPARATOR | CMAKE_ARGS @@ -244,6 +250,7 @@ if (INTERNAL_BOOST) ExternalProject_Add(boost URL ${BOOST_URL} PREFIX ${BUILD_PREFIX}/boost-prefix + DOWNLOAD_DIR ${SOURCE_PREFIX}/downloads URL_HASH MD5=f7050f554a65f6a42ece221eaeec1660 CONFIGURE_COMMAND ${BOOST_SOURCE_DIR}/bootstrap.sh --prefix=${CMAKE_BINARY_DIR}/ext_build/boost @@ -287,6 +294,7 @@ IF(INTERNAL_GSL) ExternalProject_Add(gsl URL ${GSL_URL} PREFIX ${BUILD_PREFIX}/gsl-prefix + DOWNLOAD_DIR ${SOURCE_PREFIX}/downloads CONFIGURE_COMMAND ${GSL_SOURCE_DIR}/configure --prefix=${EXT_INSTALL} --disable-shared --with-pic @@ -339,6 +347,7 @@ IF(INTERNAL_FFTW) ExternalProject_Add(fftw URL ${FFTW_URL} PREFIX ${BUILD_PREFIX}/fftw-prefix + DOWNLOAD_DIR ${SOURCE_PREFIX}/downloads CONFIGURE_COMMAND ${FFTW_SOURCE}/configure --prefix=${EXT_INSTALL} @@ -368,6 +377,7 @@ IF (INTERNAL_EIGEN) ExternalProject_Add(eigen URL ${EIGEN_URL} URL_HASH MD5=b9e98a200d2455f06db9c661c5610496 + DOWNLOAD_DIR ${SOURCE_PREFIX}/downloads PREFIX ${BUILD_PREFIX}/eigen-prefix CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXT_INSTALL} -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} @@ -400,6 +410,7 @@ SET(cosmotool_DEPS ${cosmotool_DEPS} omptl) SET(OMPTL_BUILD_DIR ${BUILD_PREFIX}/omptl-prefix/src/omptl) ExternalProject_Add(omptl PREFIX ${BUILD_PREFIX}/omptl-prefix + DOWNLOAD_DIR ${SOURCE_PREFIX}/downloads URL ${CMAKE_SOURCE_DIR}/external/omptl-20120422.tar.bz2 CONFIGURE_COMMAND echo "No configure" BUILD_COMMAND echo "No build" From 0093a6aa0febf777fe679c0dc8b55cf295b175a5 Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Wed, 6 Dec 2023 09:28:36 +0100 Subject: [PATCH 65/89] Fix cython syntax and port to more recent numpy.pxd --- python/_cosmomath.pyx | 2 +- python/_cosmotool.pyx | 12 ++++++++++-- python/_project.pyx | 2 +- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/python/_cosmomath.pyx b/python/_cosmomath.pyx index e5ab880..fc4b3b6 100644 --- a/python/_cosmomath.pyx +++ b/python/_cosmomath.pyx @@ -12,7 +12,7 @@ cdef extern from "numpy/npy_common.h": ctypedef npy_intp cdef extern from "special_math.hpp" namespace "CosmoTool": - T log_modified_bessel_first_kind[T](T v, T z) nogil except + + T log_modified_bessel_first_kind[T](T v, T z) except + nogil cdef extern from "numpy_adaptors.hpp" namespace "CosmoTool": void parallel_ufunc_dd_d[T,IT](char **args, IT* dimensions, IT* steps, void *func) diff --git a/python/_cosmotool.pyx b/python/_cosmotool.pyx index b2494bd..7f2bc76 100644 --- a/python/_cosmotool.pyx +++ b/python/_cosmotool.pyx @@ -39,7 +39,7 @@ cdef extern from "loadSimu.hpp" namespace "CosmoTool": cdef extern from "loadGadget.hpp" namespace "CosmoTool": - SimuData *loadGadgetMulti(const char *fname, int id, int flags, int gformat) nogil except + + SimuData *loadGadgetMulti(const char *fname, int id, int flags, int gformat) except + nogil void cxx_writeGadget "CosmoTool::writeGadget" (const char * s, SimuData *data) except + cdef extern from "safe_gadget.hpp": @@ -313,6 +313,13 @@ tries to get an array from the object.""" references to the object are gone. """ pass + +cdef extern from "numpy/arrayobject.h": + # a little bit awkward: the reference to obj will be stolen + # using PyObject* to signal that Cython cannot handle it automatically + int PyArray_SetBaseObject(np.ndarray arr, PyObject *obj) except -1 # -1 means there was an error + + cdef object wrap_array(void *p, np.uint64_t s, int typ): cdef np.ndarray ndarray cdef ArrayWrapper wrapper @@ -320,7 +327,8 @@ cdef object wrap_array(void *p, np.uint64_t s, int typ): wrapper = ArrayWrapper() wrapper.set_data(s, typ, p) ndarray = np.array(wrapper, copy=False) - ndarray.base = wrapper + #ndarray.base = wrapper + PyArray_SetBaseObject(ndarray, wrapper) Py_INCREF(wrapper) return ndarray diff --git a/python/_project.pyx b/python/_project.pyx index bd64667..726ed0c 100644 --- a/python/_project.pyx +++ b/python/_project.pyx @@ -727,7 +727,7 @@ cdef DTYPE_t C_line_of_sight_projection(DTYPE_t[:,:,:] density, cdef int iu0[3] cdef int i cdef int N = density.shape[0] - cdef int half_N = density.shape[0]/2 + cdef int half_N = density.shape[0]//2 cdef int completed cdef DTYPE_t I0, d, dist2, delta, s, max_distance2 cdef int jumper[1] From c88f91ba809e6182210165f03729b10a8dab6413 Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Wed, 6 Dec 2023 09:29:58 +0100 Subject: [PATCH 66/89] Bump to 1.3.4 --- CMakeLists.txt | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b61f220..30d626f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -71,7 +71,7 @@ SET(CPACK_PACKAGE_VENDOR "Guilhem Lavaux") SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENCE_CeCILL_V2") SET(CPACK_PACKAGE_VERSION_MAJOR "1") SET(CPACK_PACKAGE_VERSION_MINOR "3") -SET(CPACK_PACKAGE_VERSION_PATCH "1${EXTRA_VERSION}") +SET(CPACK_PACKAGE_VERSION_PATCH "4${EXTRA_VERSION}") SET(CPACK_PACKAGE_INSTALL_DIRECTORY "CosmoToolbox-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}") SET(CPACK_STRIP_FILES "lib/libCosmoTool.so") SET(CPACK_SOURCE_IGNORE_FILES diff --git a/setup.py b/setup.py index 857eab4..93daaba 100644 --- a/setup.py +++ b/setup.py @@ -229,7 +229,7 @@ class BuildCMakeExt(build_ext): CosmoTool_extension = CMakeExtension(name="cosmotool") setup(name='cosmotool', - version='1.3.3', + version='1.3.4', packages=["cosmotool"], package_dir={'cosmotool': 'python/cosmotool'}, install_requires=['numpy','cffi','numexpr','pyfftw','h5py'], From 7a81120977aea431b55028b07ea43fe335503e33 Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Wed, 6 Dec 2023 18:40:06 +0100 Subject: [PATCH 67/89] Fix setPeriodic --- sample/simple3DFilter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sample/simple3DFilter.cpp b/sample/simple3DFilter.cpp index 52d48aa..2dbde42 100644 --- a/sample/simple3DFilter.cpp +++ b/sample/simple3DFilter.cpp @@ -150,7 +150,7 @@ int main(int argc, char **argv) { cout << "Building trees..." << endl; MyTree tree1(allCells_1, N1_points); - tree1.setPeriodic(periodic != 0); + tree1.setPeriodic(periodic != 0, boxsize); cout << "Creating smoothing filter..." << endl; From 7c7ccd6f878a4b341496dcce30069d7de5e7ff5e Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Wed, 6 Dec 2023 21:21:11 +0000 Subject: [PATCH 68/89] Changed to use configure and not CMake for hdf5. --- external/external_build.cmake | 18 ++++++++---------- src/interpolate.cpp | 1 + 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/external/external_build.cmake b/external/external_build.cmake index 7503e45..035622a 100644 --- a/external/external_build.cmake +++ b/external/external_build.cmake @@ -96,15 +96,9 @@ if (INTERNAL_HDF5) URL ${HDF5_URL} URL_HASH MD5=30172c75e436d7f2180e274071a4ca97 DOWNLOAD_DIR ${SOURCE_PREFIX}/downloads - CMAKE_ARGS - -DCMAKE_INSTALL_PREFIX=${EXT_INSTALL} - -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} - -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} - -DHDF5_BUILD_CPP_LIB=ON - -DHDF5_BUILD_TOOLS=ON - -DHDF5_BUILD_HL_LIB=ON - -DBUILD_SHARED_LIBS=OFF - -DHDF5_ENABLE_Z_LIB_SUPPORT=ON + CONFIGURE_COMMAND + ${HDF5_SOURCE_DIR}/configure "CC=${CMAKE_C_COMPILER}" "CXX=${CMAKE_CXX_COMPILER}" "CFLAGS=${CMAKE_C_FLAGS}" "LDFLAGS=${CMAKE_EXE_LINKER_FLAGS}" --prefix=${HDF5_BIN_DIR} --disable-shared --enable-cxx --enable-hl --enable-tools --with-pic + INSTALL_COMMAND make install ) SET(cosmotool_DEPS ${cosmotool_DEPS} hdf5) SET(hdf5_built hdf5) @@ -207,12 +201,16 @@ if (INTERNAL_NETCDF) ExternalProject_Add(netcdf-c++ DEPENDS ${hdf5_built} netcdf PREFIX ${BUILD_PREFIX}/netcdf-c++-prefix + DOWNLOAD_DIR ${SOURCE_PREFIX}/downloads URL ${NETCDFCXX_URL} CMAKE_ARGS -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -DBUILD_SHARED_LIBS=OFF - -DCMAKE_POSITION_INDEPENDENT_CODE=ON + -DCMAKE_POSITION_INDEPENDENT_CODE=ON + -DHDF5_C_LIBRARY=${HDF5_C_STATIC_LIBRARY} + -DHDF5_HL_LIBRARY=${HDF5_HL_STATIC_LIBRARY} + -DHDF5_INCLUDE_DIR=${HDF5_INCLUDE_DIRS} -DBUILD_TESTING=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${NETCDF_BIN_DIR} diff --git a/src/interpolate.cpp b/src/interpolate.cpp index 3de19f5..b996f7a 100644 --- a/src/interpolate.cpp +++ b/src/interpolate.cpp @@ -157,6 +157,7 @@ const Interpolate& Interpolate::operator=(const Interpolate& a) gsl_spline_init(spline, a.spline->x, a.spline->y, a.spline->size); logx = a.logx; logy = a.logy; + return *this; } double Interpolate::getMaxX() const From b878efb8b1dd0b27119f7e41ef3f493acaefec3a Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Wed, 6 Dec 2023 22:35:55 +0100 Subject: [PATCH 69/89] Fix requirements --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 8342e0f..e47ca7a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,4 +2,4 @@ numpy<1.22 cffi numexpr pyfftw -cython +cython<3 From 6adf02b287876388ba42821cd9c34a2b7f203818 Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Thu, 7 Dec 2023 08:56:24 +0100 Subject: [PATCH 70/89] Attempt to fix linkage errors --- CMakeLists.txt | 14 +++++++++++--- external/external_build.cmake | 14 ++++++++------ 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 30d626f..80b1743 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -42,6 +42,17 @@ ENDIF(BUILD_PYTHON) MESSAGE(STATUS "Using the target ${CosmoTool_local} to build python module") +find_library(ZLIB_LIBRARY z) +find_library(DL_LIBRARY dl) +find_library(RT_LIBRARY rt) +if (RT_LIBRARY) + SET(RT_DEP rt) + message(STATUS "RT found, linking against it") +else() + SET(RT_DEP) +endif() +find_library(MATH_LIBRARY m) + include(${CMAKE_SOURCE_DIR}/external/external_build.cmake) IF(YORICK_SUPPORT) @@ -55,9 +66,6 @@ IF(YORICK_SUPPORT) ENDIF(YORICK_SUPPORT) find_program(CYTHON NAMES cython3 cython) -find_library(ZLIB_LIBRARY z) -find_library(DL_LIBRARY dl) -find_library(MATH_LIBRARY m) set(NETCDF_FIND_REQUIRED ${YORICK_SUPPORT}) set(GSL_FIND_REQUIRED TRUE) diff --git a/external/external_build.cmake b/external/external_build.cmake index 035622a..0dad2cf 100644 --- a/external/external_build.cmake +++ b/external/external_build.cmake @@ -105,7 +105,7 @@ if (INTERNAL_HDF5) SET(ENV{HDF5_ROOT} ${HDF5_BIN_DIR}) SET(HDF5_ROOTDIR ${HDF5_BIN_DIR}) SET(CONFIGURE_LDFLAGS "${CONFIGURE_LDFLAGS} -L${HDF5_BIN_DIR}/lib") - SET(CONFIGURE_LIBS "${CONFIGURE_LIBS} -ldl") + SET(CONFIGURE_LIBS "${CONFIGURE_LIBS} -ldl ${RT_LIBRARY}") set(HDF5_C_STATIC_LIBRARY ${HDF5_BIN_DIR}/lib/libhdf5.a) set(HDF5_HL_STATIC_LIBRARY ${HDF5_BIN_DIR}/lib/libhdf5_hl.a) set(HDF5_LIBRARIES ${HDF5_BIN_DIR}/lib/libhdf5.a CACHE STRING "HDF5 lib" FORCE) @@ -175,26 +175,28 @@ if (INTERNAL_NETCDF) string(REPLACE ";" "|" CMAKE_PREFIX_PATH_ALT_SEP "${CMAKE_PREFIX_PATH}") ExternalProject_Add(netcdf DEPENDS ${hdf5_built} + URL_HASH MD5=f48ee01534365006934f0c63d4055ea0 PREFIX ${BUILD_PREFIX}/netcdf-prefix DOWNLOAD_DIR ${SOURCE_PREFIX}/downloads URL ${NETCDF_URL} - LIST_SEPARATOR | - CMAKE_ARGS + LIST_SEPARATOR | + CMAKE_ARGS -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH_ALT_SEP} -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} + -DNC_EXTRA_DEPS=${RT_DEP} -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTING=OFF -DCMAKE_BUILD_TYPE=Release -DENABLE_NETCDF4=ON -DENABLE_BYTERANGE=FALSE - -DCMAKE_POSITION_INDEPENDENT_CODE=ON - -DENABLE_DAP=OFF + -DCMAKE_POSITION_INDEPENDENT_CODE=ON + -DENABLE_DAP=OFF -DCMAKE_INSTALL_PREFIX=${NETCDF_BIN_DIR} -DHDF5_C_LIBRARY=${HDF5_C_STATIC_LIBRARY} -DHDF5_HL_LIBRARY=${HDF5_HL_STATIC_LIBRARY} -DHDF5_INCLUDE_DIR=${HDF5_INCLUDE_DIRS} - -DCMAKE_INSTALL_LIBDIR=lib + -DCMAKE_INSTALL_LIBDIR=lib ) SET(NETCDFCXX_SOURCE_DIR ${BUILD_PREFIX}/netcdf-c++-prefix/src/netcdf-c++) From 26e095fc7134bb9f74848ba19d95e41d830603b2 Mon Sep 17 00:00:00 2001 From: "guilhem.lavaux@iap.fr" Date: Tue, 16 Jan 2024 07:21:56 +0100 Subject: [PATCH 71/89] Fix for default MacOS build with python --- external/external_build.cmake | 2 +- python/CMakeLists.txt | 5 +---- setup.py | 26 +++++++++++++++++--------- 3 files changed, 19 insertions(+), 14 deletions(-) diff --git a/external/external_build.cmake b/external/external_build.cmake index 0dad2cf..65ee8b8 100644 --- a/external/external_build.cmake +++ b/external/external_build.cmake @@ -39,7 +39,7 @@ CHECK_CHANGE_STATE(INTERNAL_DLIB DLIB_INCLUDE_DIR DLIB_LIBRARIES) IF(ENABLE_OPENMP) IF (NOT OPENMP_FOUND) - MESSAGE(ERROR "No known compiler option for enabling OpenMP") + MESSAGE(NOTICE "No known compiler option for enabling OpenMP") ELSE() SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}") SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}") diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index 7eda7ac..368eed6 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -69,13 +69,10 @@ target_link_libraries(_fast_interp PRIVATE ${CosmoTool_local} ) SET(ct_TARGETS _cosmotool _project _cosmo_power _cosmo_cic _fast_interp _cosmomath) if (Boost_FOUND) - message(STATUS "Building bispectrum support (path = ${Boost_INCLUDE_DIRS})") + message(STATUS "Building bispectrum support") include_directories(${Boost_INCLUDE_DIRS}) add_library(_cosmo_bispectrum MODULE _cosmo_bispectrum.cpp) target_link_libraries(_cosmo_bispectrum ${MATH_LIBRARY}) - if(ENABLE_OPENMP) - set_target_properties(_cosmo_bispectrum PROPERTIES COMPILE_FLAGS "${OpenMP_CXX_FLAGS}" LINK_FLAGS "${OpenMP_CXX_FLAGS}") - endif() if (Boost_DEP) add_dependencies(_cosmo_bispectrum ${Boost_DEP}) endif() diff --git a/setup.py b/setup.py index 93daaba..0d2f694 100644 --- a/setup.py +++ b/setup.py @@ -2,6 +2,7 @@ import stat import os import sys import shutil +from sysconfig import get_config_var from distutils.command.install_data import install_data import pathlib from setuptools import find_packages, setup, Extension @@ -167,17 +168,24 @@ class BuildCMakeExt(build_ext): # Change your cmake arguments below as necessary # Below is just an example set of arguments for building Blender as a Python module + c_compiler=os.environ.get('CC', get_config_var("CC")) + cxx_compiler=os.environ.get('CXX', get_config_var("CXX")) + compilers=[] fill_up_settings=[ - ("CMAKE_C_COMPILER", "CC"), - ("CMAKE_CXX_COMPILER", "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]}") + ("CMAKE_C_COMPILER", "CC", get_config_var("CC")), + ("CMAKE_CXX_COMPILER", "CXX", get_config_var("CXX")), + ("CMAKE_C_FLAGS", "CFLAGS", None), + ("CMAKE_CXX_FLAGS", "CXXFLAGS", None), + ("CMAKE_EXE_LINKER_FLAGS_INIT", "LDFLAGS", None), + ("CMAKE_SHARED_LINKER_FLAGS_INIT", "LDFLAGS", None), + ("CMAKE_MODULE_LINKER_FLAGS_INIT", "LDFLAGS", None)] + for cmake_flag, os_flag, default_flag in fill_up_settings: + if os_flag in os.environ or default_flag is not None: + c = os.environ.get(os_flag, default_flag) + if not c is None: + compilers.append(f"-D{cmake_flag}={c}") + print(compilers) self.spawn(['cmake', '-H'+SOURCE_DIR, '-B'+self.build_temp, '-DENABLE_OPENMP=ON','-DINTERNAL_BOOST=ON','-DINTERNAL_EIGEN=ON', From 97a1e34132c73f2ef4f3ceebbf0840e7a8354a0c Mon Sep 17 00:00:00 2001 From: "guilhem.lavaux@iap.fr" Date: Tue, 16 Jan 2024 07:33:45 +0100 Subject: [PATCH 72/89] Strip mandatory pyfftw support --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 0d2f694..17ea91d 100644 --- a/setup.py +++ b/setup.py @@ -240,7 +240,7 @@ setup(name='cosmotool', version='1.3.4', packages=["cosmotool"], package_dir={'cosmotool': 'python/cosmotool'}, - install_requires=['numpy','cffi','numexpr','pyfftw','h5py'], + install_requires=['numpy','cffi','numexpr','h5py'], setup_requires=['cython','cffi','numpy','numexpr'], ext_modules=[CosmoTool_extension], description='A small cosmotool box of useful functions', From 751d8a19a068ea39c2d5c23c780a70e09b69a3ef Mon Sep 17 00:00:00 2001 From: "guilhem.lavaux@iap.fr" Date: Tue, 16 Jan 2024 07:49:08 +0100 Subject: [PATCH 73/89] Remove pyfftw from requirements --- requirements.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index e47ca7a..922eaeb 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,4 @@ numpy<1.22 cffi numexpr -pyfftw cython<3 From b8e60a7d335c6f6a2698375b21020dc43ed08db6 Mon Sep 17 00:00:00 2001 From: "guilhem.lavaux@iap.fr" Date: Tue, 16 Jan 2024 07:50:50 +0100 Subject: [PATCH 74/89] Updating to 1.3.5 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 17ea91d..7c07d3a 100644 --- a/setup.py +++ b/setup.py @@ -237,7 +237,7 @@ class BuildCMakeExt(build_ext): CosmoTool_extension = CMakeExtension(name="cosmotool") setup(name='cosmotool', - version='1.3.4', + version='1.3.5', packages=["cosmotool"], package_dir={'cosmotool': 'python/cosmotool'}, install_requires=['numpy','cffi','numexpr','h5py'], From 883c338c08c8761b09f263ee4d39709101d4aa23 Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Wed, 17 Jan 2024 14:00:09 +0100 Subject: [PATCH 75/89] Fixed building --- external/external_build.cmake | 1 + sample/CMakeLists.txt | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/external/external_build.cmake b/external/external_build.cmake index 65ee8b8..997cc4d 100644 --- a/external/external_build.cmake +++ b/external/external_build.cmake @@ -206,6 +206,7 @@ if (INTERNAL_NETCDF) DOWNLOAD_DIR ${SOURCE_PREFIX}/downloads URL ${NETCDFCXX_URL} CMAKE_ARGS + -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH_ALT_SEP} -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -DBUILD_SHARED_LIBS=OFF diff --git a/sample/CMakeLists.txt b/sample/CMakeLists.txt index 03709a7..6d019a7 100644 --- a/sample/CMakeLists.txt +++ b/sample/CMakeLists.txt @@ -1,4 +1,8 @@ SET(tolink ${CosmoTool_local} ${CosmoTool_LIBS} ${GSL_LIBRARIES} ${DL_LIBRARY}) +if (RT_LIBRARY) + SET(tolink ${tolink} ${RT_LIBRARY}) +endif() + include_directories(${CMAKE_SOURCE_DIR}/src) include_directories(${FFTW3_INCLUDE_DIRS} ${EIGEN3_INCLUDE_DIRS} ${GSL_INCLUDE_PATH}) if(YORICK_SUPPORT) From 54a59b5246407b0b8d226eddb90e8151f829278b Mon Sep 17 00:00:00 2001 From: "guilhem.lavaux@iap.fr" Date: Tue, 16 Jan 2024 07:54:48 +0100 Subject: [PATCH 76/89] Fix manifest --- MANIFEST.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MANIFEST.in b/MANIFEST.in index 5c4f363..2344e64 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -17,7 +17,7 @@ include doc/source/index.rst include doc/source/intro.rst include doc/source/pythonmodule.rst include external/external_build.cmake -include external/libsharp-6077806.tar.gz +include external/libsharp-8d51946.tar.gz include external/omptl-20120422.tar.bz2 include external/patch-omptl include python/CMakeLists.txt From f2a5092cf119760a9a0f03da81980b791dbf9389 Mon Sep 17 00:00:00 2001 From: "guilhem.lavaux@iap.fr" Date: Tue, 13 Feb 2024 07:53:06 +0100 Subject: [PATCH 77/89] Fix MANIFEST --- MANIFEST.in | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MANIFEST.in b/MANIFEST.in index 2344e64..6400359 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -16,6 +16,8 @@ include doc/source/cpplibrary.rst include doc/source/index.rst include doc/source/intro.rst include doc/source/pythonmodule.rst +include external/config.guess +include external/config.sub include external/external_build.cmake include external/libsharp-8d51946.tar.gz include external/omptl-20120422.tar.bz2 From 1db266b4ea982284c200739bf4e24f3166346b88 Mon Sep 17 00:00:00 2001 From: "guilhem.lavaux@iap.fr" Date: Tue, 13 Feb 2024 08:19:54 +0100 Subject: [PATCH 78/89] Add pyproject.toml --- MANIFEST.in | 1 + pyproject.toml | 4 ++++ 2 files changed, 5 insertions(+) create mode 100644 pyproject.toml diff --git a/MANIFEST.in b/MANIFEST.in index 6400359..4bc4264 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,4 +1,5 @@ include .gitignore +include pyproject.toml include CMakeLists.txt include FindNumPy.cmake include FindPyLibs.cmake diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..890c3fc --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,4 @@ +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" + From 1151d0c8b6008e095a692c166afbeef807557f24 Mon Sep 17 00:00:00 2001 From: "guilhem.lavaux@iap.fr" Date: Tue, 13 Feb 2024 08:25:14 +0100 Subject: [PATCH 79/89] Add cython back to dependency --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 7c07d3a..63377a0 100644 --- a/setup.py +++ b/setup.py @@ -240,7 +240,7 @@ setup(name='cosmotool', version='1.3.5', packages=["cosmotool"], package_dir={'cosmotool': 'python/cosmotool'}, - install_requires=['numpy','cffi','numexpr','h5py'], + install_requires=['cython','numpy','cffi','numexpr','h5py'], setup_requires=['cython','cffi','numpy','numexpr'], ext_modules=[CosmoTool_extension], description='A small cosmotool box of useful functions', From 1548fd84508ed84c6c5a00bd7da570967e2edf7c Mon Sep 17 00:00:00 2001 From: "guilhem.lavaux@iap.fr" Date: Tue, 13 Feb 2024 09:15:36 +0100 Subject: [PATCH 80/89] Add missing pyx in MANIFEST --- MANIFEST.in | 1 + pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/MANIFEST.in b/MANIFEST.in index 4bc4264..309d4fc 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -27,6 +27,7 @@ include python/CMakeLists.txt include python/_cosmo_bispectrum.cpp include python/_cosmo_cic.pyx include python/_cosmo_power.pyx +include python/_cosmomath.pyx include python/_cosmotool.pyx include python/_fast_interp.pyx include python/_project.pyx diff --git a/pyproject.toml b/pyproject.toml index 890c3fc..32826dd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,4 +1,4 @@ [build-system] -requires = ["setuptools"] +requires = ["setuptools","wheel","cython"] build-backend = "setuptools.build_meta" From 1d59533b175b5bbe0c8a3ce02fe2808a1fdc5e51 Mon Sep 17 00:00:00 2001 From: "guilhem.lavaux@iap.fr" Date: Tue, 13 Feb 2024 10:28:58 +0100 Subject: [PATCH 81/89] Add python in search path --- python/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index 368eed6..1b3fe10 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -2,7 +2,7 @@ set(CMAKE_SHARED_MODULE_PREFIX) set(PYTHON_INCLUDES ${NUMPY_INCLUDE_DIRS} ${PYTHON_INCLUDE_PATH} ${CMAKE_SOURCE_DIR}/python) -include_directories(${CMAKE_SOURCE_DIR}/src ${CMAKE_BINARY_DIR}/src) +include_directories(${CMAKE_SOURCE_DIR}/python ${CMAKE_SOURCE_DIR}/src ${CMAKE_BINARY_DIR}/src) IF(CYTHON) add_custom_command( From 4bcc5f32704867a6ff9068ac1cc8e328476d6fe9 Mon Sep 17 00:00:00 2001 From: "guilhem.lavaux@iap.fr" Date: Tue, 13 Feb 2024 10:37:52 +0100 Subject: [PATCH 82/89] Add missing numpy_adaptors --- MANIFEST.in | 1 + 1 file changed, 1 insertion(+) diff --git a/MANIFEST.in b/MANIFEST.in index 309d4fc..105a2d6 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -97,6 +97,7 @@ include sample/testkd3.cpp include setup.py include src/CMakeLists.txt include src/algo.hpp +include src/numpy_adaptors.hpp include src/bqueue.hpp include src/bqueue.tcc include src/bsp_simple.hpp From 47d63a25cec1f8a823aa14edaa10f6aa1fc93412 Mon Sep 17 00:00:00 2001 From: "guilhem.lavaux@iap.fr" Date: Tue, 13 Feb 2024 10:47:28 +0100 Subject: [PATCH 83/89] Bump version --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 63377a0..0b98cce 100644 --- a/setup.py +++ b/setup.py @@ -237,7 +237,7 @@ class BuildCMakeExt(build_ext): CosmoTool_extension = CMakeExtension(name="cosmotool") setup(name='cosmotool', - version='1.3.5', + version='1.3.6', packages=["cosmotool"], package_dir={'cosmotool': 'python/cosmotool'}, install_requires=['cython','numpy','cffi','numexpr','h5py'], From be64c7fd7afe1c1c173401c64842b2ca99f27a6f Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Thu, 25 Apr 2024 17:05:54 +0200 Subject: [PATCH 84/89] Remove support for old python --- builder/build-wheels.sh | 6 +++--- builder/start.sh | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/builder/build-wheels.sh b/builder/build-wheels.sh index 60a8bfc..8f529dd 100755 --- a/builder/build-wheels.sh +++ b/builder/build-wheels.sh @@ -16,7 +16,7 @@ ln -fs /usr/bin/cmake3 /usr/bin/cmake test -d /io/wheelhouse || mkdir /io/wheelhouse test -d /io/wheelhouse/fix || mkdir /io/wheelhouse/fix -ALL_PYTHON="cp37-cp37m cp38-cp38 cp39-cp39 cp310-cp310" +ALL_PYTHON="cp39-cp39 cp310-cp310" # Compile wheels for pkg in $ALL_PYTHON; do @@ -24,11 +24,11 @@ for pkg in $ALL_PYTHON; do # "${PYBIN}/pip" install -r /io/dev-requirements.txt "${PYBIN}/pip" install setuptools wheel Cython "${PYBIN}/pip" install -r /io/requirements.txt - "${PYBIN}/pip" wheel -vvv /io/ -w wheelhouse/ + "${PYBIN}/pip" wheel -vvv /io/ -w /io/wheelhouse/ done # Bundle external shared libraries into the wheels -for whl in /io/wheelhouse/cosmotool*.whl; do +for whl in /io/wheelhouse/cosmotool*linux*.whl; do auditwheel repair "$whl" --plat $PLAT -w /io/wheelhouse/fix done diff --git a/builder/start.sh b/builder/start.sh index 9fbc185..31f95f0 100755 --- a/builder/start.sh +++ b/builder/start.sh @@ -9,4 +9,4 @@ if ! [ -e ${d}/setup.py ] ; then exit 1 fi -podman run -ti --rm -e PLAT=manylinux2010_x86_64 -v ${d}:/io:Z quay.io/pypa/manylinux2010_x86_64 /io/builder/build-wheels.sh +podman run -ti --rm -e PLAT=manylinux2014_x86_64 -v ${d}:/io:Z quay.io/pypa/manylinux2014_x86_64 /io/builder/build-wheels.sh From 924047de22b6c1e1e367d807e0508d6641c5ea24 Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Thu, 25 Apr 2024 18:11:02 +0200 Subject: [PATCH 85/89] Add possibility to have an external state --- src/hdf5_array.hpp | 2 +- src/sphSmooth.hpp | 4 +++- src/sphSmooth.tcc | 37 +++++++++++++++++++++---------------- 3 files changed, 25 insertions(+), 18 deletions(-) diff --git a/src/hdf5_array.hpp b/src/hdf5_array.hpp index db75a33..55dc87b 100644 --- a/src/hdf5_array.hpp +++ b/src/hdf5_array.hpp @@ -426,7 +426,7 @@ namespace CosmoTool { #define CTOOL_HDF5_INSERT_ELEMENT(r, STRUCT, element) \ { \ ::CosmoTool::get_hdf5_data_type t; \ - long position = HOFFSET(STRUCT, BOOST_PP_TUPLE_ELEM(2, 1, element)); \ + long position = offsetof(STRUCT, 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()); \ } diff --git a/src/sphSmooth.hpp b/src/sphSmooth.hpp index fdada71..f9c468b 100644 --- a/src/sphSmooth.hpp +++ b/src/sphSmooth.hpp @@ -72,7 +72,9 @@ namespace CosmoTool { void fetchNeighbours(const typename SPHTree::coords &c, SPHState *state = 0); - void fetchNeighbours(const typename SPHTree::coords &c, uint32_t newNsph); + void fetchNeighbours( + const typename SPHTree::coords &c, uint32_t newNsph, + SPHState *state = 0); void fetchNeighboursOnVolume( const typename SPHTree::coords &c, ComputePrecision radius); const typename SPHTree::coords &getCurrentCenter() const { diff --git a/src/sphSmooth.tcc b/src/sphSmooth.tcc index c163feb..c50fb7e 100644 --- a/src/sphSmooth.tcc +++ b/src/sphSmooth.tcc @@ -35,32 +35,38 @@ namespace CosmoTool { template void SPHSmooth::fetchNeighbours( - const typename SPHTree::coords &c, uint32_t newNngb) { + const typename SPHTree::coords &c, uint32_t newNngb, SPHState *state) { ComputePrecision d2, max_dist = 0; uint32_t requested = newNngb; - if (requested > maxNgb) { - maxNgb = requested; - internal.ngb = boost::shared_ptr(new P_SPHCell[maxNgb]); - internal.distances = - boost::shared_ptr(new CoordType[maxNgb]); + if (state != 0) { + state->distances = boost::shared_ptr(new CoordType[Nsph]); + state->ngb = boost::shared_ptr(new SPHCell *[Nsph]); + } else { + state = &internal; + if (requested > maxNgb) { + maxNgb = requested; + internal.ngb = boost::shared_ptr(new P_SPHCell[maxNgb]); + internal.distances = + boost::shared_ptr(new CoordType[maxNgb]); + } } - memcpy(internal.currentCenter, c, sizeof(c)); + memcpy(state->currentCenter, c, sizeof(c)); tree->getNearestNeighbours( - c, requested, (SPHCell **)internal.ngb.get(), - (CoordType *)internal.distances.get()); + c, requested, (SPHCell **)state->ngb.get(), + (CoordType *)state->distances.get()); - internal.currentNgb = 0; - for (uint32_t i = 0; i < requested && (internal.ngb)[i] != 0; - i++, internal.currentNgb++) { - internal.distances[i] = sqrt(internal.distances[i]); - d2 = internal.distances[i]; + state->currentNgb = 0; + for (uint32_t i = 0; i < requested && (state->ngb)[i] != 0; + i++, state->currentNgb++) { + state->distances[i] = sqrt(state->distances[i]); + d2 = state->distances[i]; if (d2 > max_dist) max_dist = d2; } - internal.smoothRadius = max_dist / 2; + state->smoothRadius = max_dist / 2; } template @@ -241,5 +247,4 @@ namespace CosmoTool { const SPHSmooth &s2) { return (s1.getSmoothingLen() < s2.getSmoothingLen()); } - }; // namespace CosmoTool From fb51ffd35e5f111bbf7a679a0dffc562530c1cb1 Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Fri, 26 Apr 2024 08:53:38 +0200 Subject: [PATCH 86/89] Fixup for sph --- src/sphSmooth.tcc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sphSmooth.tcc b/src/sphSmooth.tcc index c50fb7e..6643dd3 100644 --- a/src/sphSmooth.tcc +++ b/src/sphSmooth.tcc @@ -40,8 +40,8 @@ namespace CosmoTool { uint32_t requested = newNngb; if (state != 0) { - state->distances = boost::shared_ptr(new CoordType[Nsph]); - state->ngb = boost::shared_ptr(new SPHCell *[Nsph]); + state->distances = boost::shared_ptr(new CoordType[newNngb]); + state->ngb = boost::shared_ptr(new SPHCell *[newNngb]); } else { state = &internal; if (requested > maxNgb) { @@ -212,7 +212,7 @@ namespace CosmoTool { ComputePrecision d = state->distances[i]; SPHCell &cell = *(state->ngb[i]); double kernel_value = getKernel(d / state->smoothRadius) / r3; -#pragma omp atomic +#pragma omp atomic update cell.val.weight += kernel_value; } } From 736531e9fd4c9a53d3ab63a9674aab42e4a5a7e3 Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Thu, 9 May 2024 09:55:02 +0300 Subject: [PATCH 87/89] Add towncrier experimental --- pyproject.toml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 32826dd..7a031e7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,3 +2,7 @@ requires = ["setuptools","wheel","cython"] build-backend = "setuptools.build_meta" + +[tool.towncrier] +directory = "changes" + From 70f6f88802a145caab0ebeb1edcde6d66923d5ea Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Tue, 11 Mar 2025 14:26:57 -0400 Subject: [PATCH 88/89] Add ZLIB package --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 80b1743..02a93d5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -42,6 +42,7 @@ ENDIF(BUILD_PYTHON) MESSAGE(STATUS "Using the target ${CosmoTool_local} to build python module") +find_package(ZLIB) find_library(ZLIB_LIBRARY z) find_library(DL_LIBRARY dl) find_library(RT_LIBRARY rt) @@ -82,7 +83,7 @@ SET(CPACK_PACKAGE_VERSION_MINOR "3") SET(CPACK_PACKAGE_VERSION_PATCH "4${EXTRA_VERSION}") SET(CPACK_PACKAGE_INSTALL_DIRECTORY "CosmoToolbox-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}") SET(CPACK_STRIP_FILES "lib/libCosmoTool.so") -SET(CPACK_SOURCE_IGNORE_FILES +SET(CPACK_SOURCE_IGNORE_FILES "/CVS/;/\\\\.git/;/\\\\.svn/;\\\\.swp$;\\\\.#;/#;.*~;cscope.*;/CMakeFiles/;.*\\\\.cmake;Makefile") add_subdirectory(src) From 36905042612f805723ca712e1457e4ee9d587224 Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Sun, 8 Jun 2025 11:02:51 +0200 Subject: [PATCH 89/89] fix: Force PIC building in all cases --- src/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index c075396..38c1901 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -39,7 +39,7 @@ if (HDF5_FOUND) 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 ON) target_include_directories(CosmoHDF5 BEFORE PRIVATE ${HDF5_INCLUDE_DIR}) else(HDF5_FOUND) add_library(CosmoHDF5 OBJECT