From 56678f5fd4e2d71649161732e02bc24b48b8d4b5 Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Wed, 21 May 2014 21:51:20 +0200 Subject: [PATCH 01/13] Included omptl dependency --- CMakeLists.txt | 6 ++++++ external/omptl-20120422.tar.bz2 | Bin 0 -> 21465 bytes 2 files changed, 6 insertions(+) create mode 100644 external/omptl-20120422.tar.bz2 diff --git a/CMakeLists.txt b/CMakeLists.txt index 1f4dace..97575e1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -48,6 +48,12 @@ if (ENABLE_SHARP) SET(SHARP_INCLUDE_PATH ${DEP_BUILD}/include) endif (ENABLE_SHARP) +ExternalProject_Add(omptl + URL ${CMAKE_SOURCE_DIR}/external/omptl-20120422.tar.bz2 + CONFIGURE_COMMAND echo "No configure" + BUILD_COMMAND echo "No build" + INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_BINARY_DIR}/omptl-prefix/src/omptl ${CMAKE_BINARY_DIR}/external/stage/include/omptl +) set(HDF5_FIND_COMPONENTS HL CXX) if(HDF5_ROOTDIR) diff --git a/external/omptl-20120422.tar.bz2 b/external/omptl-20120422.tar.bz2 new file mode 100644 index 0000000000000000000000000000000000000000..cfbed0726d9e5062e96b9bc432078140c0186b01 GIT binary patch literal 21465 zcmV(?K-a%QT4*^jL0KkKS%2sq&j9Ulf1dyU|NMLZ|NsC0|Nj5~|Na0000aO600ICA zV0~NN_s-S;0)ZR~`a8F`UiSmJ@1~%M*p=nSm#K7jcXu~$rgGbA)kjoY9p7~JIt}aw z<8Xk&piyq&-Oe2VQP9%P?ZWL%0M~7T4yv6kb&lP+(+kA2|#uUvb5 zw=Znib!R@_Uu})+tmb>Sl>jP)&DTSXmEO-Lx3am~<*%kH?%a2`B6MnH*H>)Wn>}>n zwK@}=?z(EPb9XwW3PVKWI<}j-?b{s2b%TP|q>=5RF1gt|HAj|tCFr=*TeFLk+nj8( z0qpFUD(QxsT3>7m>aYuV$o>9 zj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0200 Subject: [PATCH 02/13] Fixed compilation issues --- src/cic.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cic.hpp b/src/cic.hpp index 31ba069..560ba2f 100644 --- a/src/cic.hpp +++ b/src/cic.hpp @@ -36,7 +36,7 @@ knowledge of the CeCILL license and that you accept its terms. #ifndef __CICFILTER_HPP #define __CICFILTER_HPP -#include "CosmoTool/config.hpp" +#include "config.hpp" #include using namespace CosmoTool; From b89dbe0987a6bb48fc4549dbf1a3563e37d675a7 Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Thu, 22 May 2014 09:27:53 +0200 Subject: [PATCH 03/13] Finished packaging omptl --- CMakeLists.txt | 4 +++- src/CMakeLists.txt | 2 ++ src/mykdtree.tcc | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 880f616..135b5ab 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -50,12 +50,14 @@ if (ENABLE_SHARP) SET(SHARP_INCLUDE_PATH ${DEP_BUILD}/include) endif (ENABLE_SHARP) +SET(OMPTL_BUILD_DIR ${CMAKE_BINARY_DIR}/omptl-prefix/src/omptl) ExternalProject_Add(omptl URL ${CMAKE_SOURCE_DIR}/external/omptl-20120422.tar.bz2 CONFIGURE_COMMAND echo "No configure" BUILD_COMMAND echo "No build" - INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_BINARY_DIR}/omptl-prefix/src/omptl ${CMAKE_BINARY_DIR}/external/stage/include/omptl + INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory ${OMPTL_BUILD_DIR} ${CMAKE_BINARY_DIR}/external/stage/include/omptl ) +include_directories(${OMPTL_BUILD_DIR}/..) set(HDF5_FIND_COMPONENTS HL CXX) if(HDF5_ROOTDIR) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 611deaa..ea15ca3 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -89,5 +89,7 @@ endif (BUILD_SHARED_LIBS) install(DIRECTORY . DESTINATION include/CosmoTool FILES_MATCHING PATTERN "*.hpp") +install(DIRECTORY ${OMPTL_BUILD_DIR} + DESTINATION include/CosmoTool/omptl) install(DIRECTORY . DESTINATION include/CosmoTool FILES_MATCHING PATTERN "*.tcc") diff --git a/src/mykdtree.tcc b/src/mykdtree.tcc index e276cad..3d66564 100644 --- a/src/mykdtree.tcc +++ b/src/mykdtree.tcc @@ -1,5 +1,6 @@ #include "replicateGenerator.hpp" #include +#include "omptl/omptl_algorithm" #include #include #include From 29c9536ff142dfdf9dfc88ee03313c601dc93469 Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Thu, 22 May 2014 09:33:52 +0200 Subject: [PATCH 04/13] White space fix --- src/fourier/details/euclidian_transform.hpp | 38 ++++++++++----------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/src/fourier/details/euclidian_transform.hpp b/src/fourier/details/euclidian_transform.hpp index e5ef34a..b11985f 100644 --- a/src/fourier/details/euclidian_transform.hpp +++ b/src/fourier/details/euclidian_transform.hpp @@ -83,30 +83,30 @@ namespace CosmoTool Nc = 1; volume = 1; for (int i = 0; i < dims.size(); i++) - { - N *= dims[i]; + { + N *= dims[i]; Nc *= m_dims_hc[i]; - volume *= L[i]; - dk[i] = 2*M_PI/L[i]; + volume *= L[i]; + dk[i] = 2*M_PI/L[i]; swapped_dims[dims.size()-1-i] = dims[i]; - } + } realMap = new EuclidianFourierMapReal( - boost::shared_ptr(calls::alloc_real(N), - std::ptr_fun(calls::free)), - m_dims); + boost::shared_ptr(calls::alloc_real(N), + std::ptr_fun(calls::free)), + m_dims); fourierMap = new EuclidianFourierMapComplex( - boost::shared_ptr >((std::complex*)calls::alloc_complex(Nc), - std::ptr_fun(calls::free)), - dims[0], m_dims_hc, dk); - { - m_analysis = calls::plan_dft_r2c(dims.size(), &swapped_dims[0], - realMap->data(), (typename calls::complex_type *)fourierMap->data(), - FFTW_DESTROY_INPUT|FFTW_MEASURE); - m_synthesis = calls::plan_dft_c2r(dims.size(), &swapped_dims[0], - (typename calls::complex_type *)fourierMap->data(), realMap->data(), - FFTW_DESTROY_INPUT|FFTW_MEASURE); - } + boost::shared_ptr >((std::complex*)calls::alloc_complex(Nc), + std::ptr_fun(calls::free)), + dims[0], m_dims_hc, dk); + { + m_analysis = calls::plan_dft_r2c(dims.size(), &swapped_dims[0], + realMap->data(), (typename calls::complex_type *)fourierMap->data(), + FFTW_DESTROY_INPUT|FFTW_MEASURE); + m_synthesis = calls::plan_dft_c2r(dims.size(), &swapped_dims[0], + (typename calls::complex_type *)fourierMap->data(), realMap->data(), + FFTW_DESTROY_INPUT|FFTW_MEASURE); + } } virtual ~EuclidianFourierTransform() From 285eeb8edeafae3098e32307600ddc1a8e53426f Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Thu, 22 May 2014 09:35:54 +0200 Subject: [PATCH 05/13] Fixed gather_sources --- build_tools/gather_sources.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/build_tools/gather_sources.py b/build_tools/gather_sources.py index ca8c3d1..509f1a4 100644 --- a/build_tools/gather_sources.py +++ b/build_tools/gather_sources.py @@ -131,13 +131,14 @@ The fact that you are presently reading this means that you have had knowledge of the CeCILL license and that you accept its terms. +*/ """ - relimit = r'^(?s)/\*\+.*\+\*/' + relimit = r'^(?s)/\*\+.*\+\*/\n' print("C++ file: %s" % filename) apply_license(license, relimit, filename) def analyze_tree(prefix, t): - for ename,entry in t.items(): + for entry in t.items(): + ename = entry.name if ename == 'external' or ename == 'zobov': continue if type(entry) == Tree: From 61c6f1b3eaced875fa70b3916ce5584531a6114c Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Thu, 22 May 2014 09:37:20 +0200 Subject: [PATCH 06/13] Fixed gather_sources --- build_tools/gather_sources.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build_tools/gather_sources.py b/build_tools/gather_sources.py index 509f1a4..a2b0ff2 100644 --- a/build_tools/gather_sources.py +++ b/build_tools/gather_sources.py @@ -55,7 +55,7 @@ def apply_license(license, relimit, filename): def apply_python_license(filename): license="""#+ -# This is CosmoTool (@FILENAME@) -- Copyright (C) Guilhem Lavaux (2007-2013) +# This is CosmoTool (@FILENAME@) -- Copyright (C) Guilhem Lavaux (2007-2014) # # guilhem.lavaux@gmail.com # @@ -97,7 +97,7 @@ def apply_python_license(filename): def apply_cpp_license(filename): license="""/*+ -This is CosmoTool (@FILENAME@) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (@FILENAME@) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com @@ -137,7 +137,7 @@ knowledge of the CeCILL license and that you accept its terms. def analyze_tree(prefix, t): - for entry in t.items(): + for entry in t: ename = entry.name if ename == 'external' or ename == 'zobov': continue From 7f27897b831a59d7ce58fc84efed50e027efa963 Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Thu, 22 May 2014 09:38:59 +0200 Subject: [PATCH 07/13] Updated copyright headers --- build_tools/gather_sources.py | 2 +- sample/gadgetToArray.cpp | 34 ++++++++++++++++++ sample/gadgetToDensity.cpp | 34 ++++++++++++++++++ sample/simple3DFilter.cpp | 34 ++++++++++++++++++ sample/testAlgo.cpp | 2 +- sample/testBQueue.cpp | 2 +- sample/testBSP.cpp | 2 +- sample/testDelaunay.cpp | 2 +- sample/testEskow.cpp | 2 +- sample/testHDF5.cpp | 34 ++++++++++++++++++ sample/testInterpolate.cpp | 2 +- sample/testNewton.cpp | 2 +- sample/testPool.cpp | 2 +- sample/testReadFlash.cpp | 2 +- sample/testSmooth.cpp | 2 +- sample/test_cosmopower.cpp | 2 +- sample/test_fft_calls.cpp | 2 +- sample/test_healpix_calls.cpp | 2 +- sample/testkd.cpp | 2 +- sample/testkd2.cpp | 2 +- sample/testkd3.cpp | 2 +- src/algo.hpp | 2 +- src/bqueue.hpp | 2 +- src/bsp_simple.hpp | 2 +- src/cic.cpp | 2 +- src/cic.hpp | 2 +- src/config.hpp | 2 +- src/cosmopower.cpp | 2 +- src/cosmopower.hpp | 2 +- src/dinterpolate.hpp | 2 +- src/eskow.hpp | 2 +- src/field.hpp | 2 +- src/fixArray.hpp | 2 +- src/fortran.cpp | 2 +- src/fortran.hpp | 2 +- src/fourier/base_types.hpp | 2 +- src/fourier/details/euclidian_maps.hpp | 2 +- src/fourier/details/euclidian_spectrum_1d.hpp | 2 +- .../details/euclidian_spectrum_1d_bin.hpp | 2 +- src/fourier/details/euclidian_transform.hpp | 2 +- src/fourier/details/healpix_alms.hpp | 2 +- src/fourier/details/healpix_map.hpp | 2 +- src/fourier/details/healpix_spectrum.hpp | 2 +- src/fourier/details/healpix_transform.hpp | 2 +- src/fourier/details/healpix_utility.hpp | 2 +- src/fourier/euclidian.hpp | 2 +- src/fourier/fft/fftw_calls.hpp | 2 +- src/fourier/healpix.hpp | 2 +- src/growthFactor.cpp | 2 +- src/growthFactor.hpp | 2 +- src/h5_readFlash.cpp | 36 ++++++++++++++++++- src/h5_readFlash.hpp | 36 ++++++++++++++++++- src/hdf5_array.hpp | 34 ++++++++++++++++++ src/hdf5_flash.h | 33 +++++++++++++++-- src/interpolate.cpp | 2 +- src/interpolate.hpp | 2 +- src/interpolate3d.hpp | 2 +- src/kdtree_leaf.hpp | 2 +- src/kdtree_splitters.hpp | 2 +- src/loadFlash.cpp | 2 +- src/loadFlash.hpp | 2 +- src/loadFlash_dummy.cpp | 2 +- src/loadGadget.cpp | 2 +- src/loadGadget.hpp | 2 +- src/loadRamses.cpp | 2 +- src/loadRamses.hpp | 2 +- src/loadSimu.hpp | 2 +- src/load_data.cpp | 2 +- src/load_data.hpp | 2 +- src/mach.hpp | 2 +- src/miniargs.cpp | 2 +- src/miniargs.hpp | 2 +- src/mykdtree.hpp | 2 +- src/newton.hpp | 2 +- src/octTree.cpp | 2 +- src/octTree.hpp | 2 +- src/pool.hpp | 2 +- src/powerSpectrum.cpp | 2 +- src/powerSpectrum.hpp | 2 +- src/replicateGenerator.hpp | 2 +- src/sparseGrid.hpp | 2 +- src/sphSmooth.hpp | 2 +- src/yorick.hpp | 2 +- src/yorick_nc3.cpp | 2 +- src/yorick_nc4.cpp | 2 +- 85 files changed, 347 insertions(+), 82 deletions(-) diff --git a/build_tools/gather_sources.py b/build_tools/gather_sources.py index a2b0ff2..85d7d43 100644 --- a/build_tools/gather_sources.py +++ b/build_tools/gather_sources.py @@ -1,5 +1,5 @@ #+ -# This is CosmoTool (./build_tools/gather_sources.py) -- Copyright (C) Guilhem Lavaux (2007-2013) +# This is CosmoTool (./build_tools/gather_sources.py) -- Copyright (C) Guilhem Lavaux (2007-2014) # # guilhem.lavaux@gmail.com # diff --git a/sample/gadgetToArray.cpp b/sample/gadgetToArray.cpp index 7d4669c..6f646c6 100644 --- a/sample/gadgetToArray.cpp +++ b/sample/gadgetToArray.cpp @@ -1,3 +1,37 @@ +/*+ +This is CosmoTool (./sample/gadgetToArray.cpp) -- Copyright (C) Guilhem Lavaux (2007-2014) + +guilhem.lavaux@gmail.com + +This software is a computer program whose purpose is to provide a toolbox for cosmological +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, +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". + +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. + +In this respect, the user's attention is drawn to the risks associated +with loading, using, modifying and/or developing or reproducing the +software by the user in light of its specific status of free software, +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. + +The fact that you are presently reading this means that you have had +knowledge of the CeCILL license and that you accept its terms. ++*/ #include #include #include diff --git a/sample/gadgetToDensity.cpp b/sample/gadgetToDensity.cpp index d17f263..2f7d5de 100644 --- a/sample/gadgetToDensity.cpp +++ b/sample/gadgetToDensity.cpp @@ -1,3 +1,37 @@ +/*+ +This is CosmoTool (./sample/gadgetToDensity.cpp) -- Copyright (C) Guilhem Lavaux (2007-2014) + +guilhem.lavaux@gmail.com + +This software is a computer program whose purpose is to provide a toolbox for cosmological +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, +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". + +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. + +In this respect, the user's attention is drawn to the risks associated +with loading, using, modifying and/or developing or reproducing the +software by the user in light of its specific status of free software, +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. + +The fact that you are presently reading this means that you have had +knowledge of the CeCILL license and that you accept its terms. ++*/ #include #include #include diff --git a/sample/simple3DFilter.cpp b/sample/simple3DFilter.cpp index 1932e97..357af83 100644 --- a/sample/simple3DFilter.cpp +++ b/sample/simple3DFilter.cpp @@ -1,3 +1,37 @@ +/*+ +This is CosmoTool (./sample/simple3DFilter.cpp) -- Copyright (C) Guilhem Lavaux (2007-2014) + +guilhem.lavaux@gmail.com + +This software is a computer program whose purpose is to provide a toolbox for cosmological +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, +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". + +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. + +In this respect, the user's attention is drawn to the risks associated +with loading, using, modifying and/or developing or reproducing the +software by the user in light of its specific status of free software, +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. + +The fact that you are presently reading this means that you have had +knowledge of the CeCILL license and that you accept its terms. ++*/ #include #include "yorick.hpp" #include "sphSmooth.hpp" diff --git a/sample/testAlgo.cpp b/sample/testAlgo.cpp index cdf7971..3f081e0 100644 --- a/sample/testAlgo.cpp +++ b/sample/testAlgo.cpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./sample/testAlgo.cpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./sample/testAlgo.cpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/sample/testBQueue.cpp b/sample/testBQueue.cpp index 08beb6d..eebb195 100644 --- a/sample/testBQueue.cpp +++ b/sample/testBQueue.cpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./sample/testBQueue.cpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./sample/testBQueue.cpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/sample/testBSP.cpp b/sample/testBSP.cpp index def0717..0c79445 100644 --- a/sample/testBSP.cpp +++ b/sample/testBSP.cpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./sample/testBSP.cpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./sample/testBSP.cpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/sample/testDelaunay.cpp b/sample/testDelaunay.cpp index 8d2d9d4..e7ce6d8 100644 --- a/sample/testDelaunay.cpp +++ b/sample/testDelaunay.cpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./sample/testDelaunay.cpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./sample/testDelaunay.cpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/sample/testEskow.cpp b/sample/testEskow.cpp index aa48d2b..8093e5d 100644 --- a/sample/testEskow.cpp +++ b/sample/testEskow.cpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./sample/testEskow.cpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./sample/testEskow.cpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/sample/testHDF5.cpp b/sample/testHDF5.cpp index 82c3230..d38eb01 100644 --- a/sample/testHDF5.cpp +++ b/sample/testHDF5.cpp @@ -1,3 +1,37 @@ +/*+ +This is CosmoTool (./sample/testHDF5.cpp) -- Copyright (C) Guilhem Lavaux (2007-2014) + +guilhem.lavaux@gmail.com + +This software is a computer program whose purpose is to provide a toolbox for cosmological +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, +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". + +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. + +In this respect, the user's attention is drawn to the risks associated +with loading, using, modifying and/or developing or reproducing the +software by the user in light of its specific status of free software, +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. + +The fact that you are presently reading this means that you have had +knowledge of the CeCILL license and that you accept its terms. ++*/ #include #include #include "hdf5_array.hpp" diff --git a/sample/testInterpolate.cpp b/sample/testInterpolate.cpp index b863170..3e71744 100644 --- a/sample/testInterpolate.cpp +++ b/sample/testInterpolate.cpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./sample/testInterpolate.cpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./sample/testInterpolate.cpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/sample/testNewton.cpp b/sample/testNewton.cpp index 5677bbc..b592224 100644 --- a/sample/testNewton.cpp +++ b/sample/testNewton.cpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./sample/testNewton.cpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./sample/testNewton.cpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/sample/testPool.cpp b/sample/testPool.cpp index e4ff8c1..a6b8d87 100644 --- a/sample/testPool.cpp +++ b/sample/testPool.cpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./sample/testPool.cpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./sample/testPool.cpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/sample/testReadFlash.cpp b/sample/testReadFlash.cpp index 93a5b64..52e64bd 100644 --- a/sample/testReadFlash.cpp +++ b/sample/testReadFlash.cpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./sample/testReadFlash.cpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./sample/testReadFlash.cpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/sample/testSmooth.cpp b/sample/testSmooth.cpp index ddb8c3e..14cd779 100644 --- a/sample/testSmooth.cpp +++ b/sample/testSmooth.cpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./sample/testSmooth.cpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./sample/testSmooth.cpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/sample/test_cosmopower.cpp b/sample/test_cosmopower.cpp index 1bf1ec8..635b9e0 100644 --- a/sample/test_cosmopower.cpp +++ b/sample/test_cosmopower.cpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./sample/test_cosmopower.cpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./sample/test_cosmopower.cpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/sample/test_fft_calls.cpp b/sample/test_fft_calls.cpp index e49ad82..e35f768 100644 --- a/sample/test_fft_calls.cpp +++ b/sample/test_fft_calls.cpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./sample/test_fft_calls.cpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./sample/test_fft_calls.cpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/sample/test_healpix_calls.cpp b/sample/test_healpix_calls.cpp index 75473d8..6b1e8f8 100644 --- a/sample/test_healpix_calls.cpp +++ b/sample/test_healpix_calls.cpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./sample/test_healpix_calls.cpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./sample/test_healpix_calls.cpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/sample/testkd.cpp b/sample/testkd.cpp index f810571..699947f 100644 --- a/sample/testkd.cpp +++ b/sample/testkd.cpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./sample/testkd.cpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./sample/testkd.cpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/sample/testkd2.cpp b/sample/testkd2.cpp index 7c29b1e..c4d4298 100644 --- a/sample/testkd2.cpp +++ b/sample/testkd2.cpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./sample/testkd2.cpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./sample/testkd2.cpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/sample/testkd3.cpp b/sample/testkd3.cpp index 50eba07..d238c5d 100644 --- a/sample/testkd3.cpp +++ b/sample/testkd3.cpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./sample/testkd3.cpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./sample/testkd3.cpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/src/algo.hpp b/src/algo.hpp index 2dce3eb..be03a77 100644 --- a/src/algo.hpp +++ b/src/algo.hpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/algo.hpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/algo.hpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/src/bqueue.hpp b/src/bqueue.hpp index 872830e..87b3a1c 100644 --- a/src/bqueue.hpp +++ b/src/bqueue.hpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/bqueue.hpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/bqueue.hpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/src/bsp_simple.hpp b/src/bsp_simple.hpp index 298256e..f9d2681 100644 --- a/src/bsp_simple.hpp +++ b/src/bsp_simple.hpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/bsp_simple.hpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/bsp_simple.hpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/src/cic.cpp b/src/cic.cpp index 8a24597..ba6bac5 100644 --- a/src/cic.cpp +++ b/src/cic.cpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/cic.cpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/cic.cpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/src/cic.hpp b/src/cic.hpp index 560ba2f..f76ec81 100644 --- a/src/cic.hpp +++ b/src/cic.hpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/cic.hpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/cic.hpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/src/config.hpp b/src/config.hpp index 8fd7b2d..5bf23a4 100644 --- a/src/config.hpp +++ b/src/config.hpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/config.hpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/config.hpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/src/cosmopower.cpp b/src/cosmopower.cpp index 20026a2..ba92a15 100644 --- a/src/cosmopower.cpp +++ b/src/cosmopower.cpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/cosmopower.cpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/cosmopower.cpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/src/cosmopower.hpp b/src/cosmopower.hpp index dd86cf1..01649c7 100644 --- a/src/cosmopower.hpp +++ b/src/cosmopower.hpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/cosmopower.hpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/cosmopower.hpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/src/dinterpolate.hpp b/src/dinterpolate.hpp index 1bf3322..980d0d0 100644 --- a/src/dinterpolate.hpp +++ b/src/dinterpolate.hpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/dinterpolate.hpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/dinterpolate.hpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/src/eskow.hpp b/src/eskow.hpp index 987cb88..3e09767 100644 --- a/src/eskow.hpp +++ b/src/eskow.hpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/eskow.hpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/eskow.hpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/src/field.hpp b/src/field.hpp index 45f6eac..d0b9377 100644 --- a/src/field.hpp +++ b/src/field.hpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/field.hpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/field.hpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/src/fixArray.hpp b/src/fixArray.hpp index 0d2e26d..556cc78 100644 --- a/src/fixArray.hpp +++ b/src/fixArray.hpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/fixArray.hpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/fixArray.hpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/src/fortran.cpp b/src/fortran.cpp index 79641ac..f0b9c86 100644 --- a/src/fortran.cpp +++ b/src/fortran.cpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/fortran.cpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/fortran.cpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/src/fortran.hpp b/src/fortran.hpp index d63e8d3..85e7618 100644 --- a/src/fortran.hpp +++ b/src/fortran.hpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/fortran.hpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/fortran.hpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/src/fourier/base_types.hpp b/src/fourier/base_types.hpp index 42b579a..c5cf4e9 100644 --- a/src/fourier/base_types.hpp +++ b/src/fourier/base_types.hpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/fourier/base_types.hpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/fourier/base_types.hpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/src/fourier/details/euclidian_maps.hpp b/src/fourier/details/euclidian_maps.hpp index 4cbf6a3..5b808b2 100644 --- a/src/fourier/details/euclidian_maps.hpp +++ b/src/fourier/details/euclidian_maps.hpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/fourier/details/euclidian_maps.hpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/fourier/details/euclidian_maps.hpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/src/fourier/details/euclidian_spectrum_1d.hpp b/src/fourier/details/euclidian_spectrum_1d.hpp index 01a7dac..8d8b021 100644 --- a/src/fourier/details/euclidian_spectrum_1d.hpp +++ b/src/fourier/details/euclidian_spectrum_1d.hpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/fourier/details/euclidian_spectrum_1d.hpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/fourier/details/euclidian_spectrum_1d.hpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/src/fourier/details/euclidian_spectrum_1d_bin.hpp b/src/fourier/details/euclidian_spectrum_1d_bin.hpp index ee6cd0b..eb50209 100644 --- a/src/fourier/details/euclidian_spectrum_1d_bin.hpp +++ b/src/fourier/details/euclidian_spectrum_1d_bin.hpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/fourier/details/euclidian_spectrum_1d_bin.hpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/fourier/details/euclidian_spectrum_1d_bin.hpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/src/fourier/details/euclidian_transform.hpp b/src/fourier/details/euclidian_transform.hpp index b11985f..ac16fa9 100644 --- a/src/fourier/details/euclidian_transform.hpp +++ b/src/fourier/details/euclidian_transform.hpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/fourier/details/euclidian_transform.hpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/fourier/details/euclidian_transform.hpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/src/fourier/details/healpix_alms.hpp b/src/fourier/details/healpix_alms.hpp index fb438a8..3cfe43c 100644 --- a/src/fourier/details/healpix_alms.hpp +++ b/src/fourier/details/healpix_alms.hpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/fourier/details/healpix_alms.hpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/fourier/details/healpix_alms.hpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/src/fourier/details/healpix_map.hpp b/src/fourier/details/healpix_map.hpp index a2a3f18..ee6f031 100644 --- a/src/fourier/details/healpix_map.hpp +++ b/src/fourier/details/healpix_map.hpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/fourier/details/healpix_map.hpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/fourier/details/healpix_map.hpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/src/fourier/details/healpix_spectrum.hpp b/src/fourier/details/healpix_spectrum.hpp index 92f7085..349b88c 100644 --- a/src/fourier/details/healpix_spectrum.hpp +++ b/src/fourier/details/healpix_spectrum.hpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/fourier/details/healpix_spectrum.hpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/fourier/details/healpix_spectrum.hpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/src/fourier/details/healpix_transform.hpp b/src/fourier/details/healpix_transform.hpp index 37e79e8..73bb180 100644 --- a/src/fourier/details/healpix_transform.hpp +++ b/src/fourier/details/healpix_transform.hpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/fourier/details/healpix_transform.hpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/fourier/details/healpix_transform.hpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/src/fourier/details/healpix_utility.hpp b/src/fourier/details/healpix_utility.hpp index 11219d6..06f22ab 100644 --- a/src/fourier/details/healpix_utility.hpp +++ b/src/fourier/details/healpix_utility.hpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/fourier/details/healpix_utility.hpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/fourier/details/healpix_utility.hpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/src/fourier/euclidian.hpp b/src/fourier/euclidian.hpp index efc76e7..2ab4b5e 100644 --- a/src/fourier/euclidian.hpp +++ b/src/fourier/euclidian.hpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/fourier/euclidian.hpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/fourier/euclidian.hpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/src/fourier/fft/fftw_calls.hpp b/src/fourier/fft/fftw_calls.hpp index c811728..7d1138f 100644 --- a/src/fourier/fft/fftw_calls.hpp +++ b/src/fourier/fft/fftw_calls.hpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/fourier/fft/fftw_calls.hpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/fourier/fft/fftw_calls.hpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/src/fourier/healpix.hpp b/src/fourier/healpix.hpp index e8b8b2d..1e2cd54 100644 --- a/src/fourier/healpix.hpp +++ b/src/fourier/healpix.hpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/fourier/healpix.hpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/fourier/healpix.hpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/src/growthFactor.cpp b/src/growthFactor.cpp index b718d4e..f185e90 100644 --- a/src/growthFactor.cpp +++ b/src/growthFactor.cpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/growthFactor.cpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/growthFactor.cpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/src/growthFactor.hpp b/src/growthFactor.hpp index 1a455df..30c2155 100644 --- a/src/growthFactor.hpp +++ b/src/growthFactor.hpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/growthFactor.hpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/growthFactor.hpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/src/h5_readFlash.cpp b/src/h5_readFlash.cpp index e460bdb..2ace735 100644 --- a/src/h5_readFlash.cpp +++ b/src/h5_readFlash.cpp @@ -1,11 +1,45 @@ /*+ +This is CosmoTool (./src/h5_readFlash.cpp) -- Copyright (C) Guilhem Lavaux (2007-2014) + +guilhem.lavaux@gmail.com + +This software is a computer program whose purpose is to provide a toolbox for cosmological +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, +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". + +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. + +In this respect, the user's attention is drawn to the risks associated +with loading, using, modifying and/or developing or reproducing the +software by the user in light of its specific status of free software, +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. + +The fact that you are presently reading this means that you have had +knowledge of the CeCILL license and that you accept its terms. ++*/ +/*+ !! This file has been developped by P. M. Sutter !! -+*/ +*/ /* This file contains the functions that read the data from the HDF5 file * The functions accept the PARAMESH data through arguments. */ diff --git a/src/h5_readFlash.hpp b/src/h5_readFlash.hpp index abcf9aa..3c6982d 100644 --- a/src/h5_readFlash.hpp +++ b/src/h5_readFlash.hpp @@ -1,4 +1,38 @@ /*+ +This is CosmoTool (./src/h5_readFlash.hpp) -- Copyright (C) Guilhem Lavaux (2007-2014) + +guilhem.lavaux@gmail.com + +This software is a computer program whose purpose is to provide a toolbox for cosmological +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, +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". + +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. + +In this respect, the user's attention is drawn to the risks associated +with loading, using, modifying and/or developing or reproducing the +software by the user in light of its specific status of free software, +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. + +The fact that you are presently reading this means that you have had +knowledge of the CeCILL license and that you accept its terms. ++*/ +/*+ !!! NOTE !!! @@ -6,7 +40,7 @@ This file has been developped by P. M. Sutter. !!!! -+*/ +*/ /* This file contains the functions that read the data from the HDF5 file * The functions accept the PARAMESH data through arguments. */ diff --git a/src/hdf5_array.hpp b/src/hdf5_array.hpp index 46673ba..455d4b7 100644 --- a/src/hdf5_array.hpp +++ b/src/hdf5_array.hpp @@ -1,3 +1,37 @@ +/*+ +This is CosmoTool (./src/hdf5_array.hpp) -- Copyright (C) Guilhem Lavaux (2007-2014) + +guilhem.lavaux@gmail.com + +This software is a computer program whose purpose is to provide a toolbox for cosmological +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, +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". + +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. + +In this respect, the user's attention is drawn to the risks associated +with loading, using, modifying and/or developing or reproducing the +software by the user in light of its specific status of free software, +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. + +The fact that you are presently reading this means that you have had +knowledge of the CeCILL license and that you accept its terms. ++*/ #ifndef __COSMO_HDF5_ARRAY_HPP #define __COSMO_HDF5_ARRAY_HPP diff --git a/src/hdf5_flash.h b/src/hdf5_flash.h index bf53f36..8963802 100644 --- a/src/hdf5_flash.h +++ b/src/hdf5_flash.h @@ -1,9 +1,36 @@ /*+ -!! +This is CosmoTool (./src/hdf5_flash.h) -- Copyright (C) Guilhem Lavaux (2007-2014) -This particular file has been developped by P. M. Sutter +guilhem.lavaux@gmail.com -!! +This software is a computer program whose purpose is to provide a toolbox for cosmological +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, +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". + +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. + +In this respect, the user's attention is drawn to the risks associated +with loading, using, modifying and/or developing or reproducing the +software by the user in light of its specific status of free software, +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. + +The fact that you are presently reading this means that you have had +knowledge of the CeCILL license and that you accept its terms. +*/ /* general header file for the HDF 5 IO in FLASH */ diff --git a/src/interpolate.cpp b/src/interpolate.cpp index ec6575c..7ce0efd 100644 --- a/src/interpolate.cpp +++ b/src/interpolate.cpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/interpolate.cpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/interpolate.cpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/src/interpolate.hpp b/src/interpolate.hpp index 2e30e29..53acd46 100644 --- a/src/interpolate.hpp +++ b/src/interpolate.hpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/interpolate.hpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/interpolate.hpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/src/interpolate3d.hpp b/src/interpolate3d.hpp index 0f66d02..8d66a40 100644 --- a/src/interpolate3d.hpp +++ b/src/interpolate3d.hpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/interpolate3d.hpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/interpolate3d.hpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/src/kdtree_leaf.hpp b/src/kdtree_leaf.hpp index 0481889..0aa91b3 100644 --- a/src/kdtree_leaf.hpp +++ b/src/kdtree_leaf.hpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/kdtree_leaf.hpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/kdtree_leaf.hpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/src/kdtree_splitters.hpp b/src/kdtree_splitters.hpp index c0364a6..8f0e22e 100644 --- a/src/kdtree_splitters.hpp +++ b/src/kdtree_splitters.hpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/kdtree_splitters.hpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/kdtree_splitters.hpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/src/loadFlash.cpp b/src/loadFlash.cpp index d437f25..5f54f3d 100644 --- a/src/loadFlash.cpp +++ b/src/loadFlash.cpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/loadFlash.cpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/loadFlash.cpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/src/loadFlash.hpp b/src/loadFlash.hpp index 62f511b..b11498f 100644 --- a/src/loadFlash.hpp +++ b/src/loadFlash.hpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/loadFlash.hpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/loadFlash.hpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/src/loadFlash_dummy.cpp b/src/loadFlash_dummy.cpp index 2c6a86c..cc70346 100644 --- a/src/loadFlash_dummy.cpp +++ b/src/loadFlash_dummy.cpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/loadFlash_dummy.cpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/loadFlash_dummy.cpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/src/loadGadget.cpp b/src/loadGadget.cpp index f9f1072..11929f4 100644 --- a/src/loadGadget.cpp +++ b/src/loadGadget.cpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/loadGadget.cpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/loadGadget.cpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/src/loadGadget.hpp b/src/loadGadget.hpp index e05a187..adbc818 100644 --- a/src/loadGadget.hpp +++ b/src/loadGadget.hpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/loadGadget.hpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/loadGadget.hpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/src/loadRamses.cpp b/src/loadRamses.cpp index 5154921..ecf340b 100644 --- a/src/loadRamses.cpp +++ b/src/loadRamses.cpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/loadRamses.cpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/loadRamses.cpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/src/loadRamses.hpp b/src/loadRamses.hpp index 5282a3c..5834c29 100644 --- a/src/loadRamses.hpp +++ b/src/loadRamses.hpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/loadRamses.hpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/loadRamses.hpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/src/loadSimu.hpp b/src/loadSimu.hpp index 1c360a4..ed9a1f8 100644 --- a/src/loadSimu.hpp +++ b/src/loadSimu.hpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/loadSimu.hpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/loadSimu.hpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/src/load_data.cpp b/src/load_data.cpp index f23f909..9fd2552 100644 --- a/src/load_data.cpp +++ b/src/load_data.cpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/load_data.cpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/load_data.cpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/src/load_data.hpp b/src/load_data.hpp index 6be3bbb..6643eaa 100644 --- a/src/load_data.hpp +++ b/src/load_data.hpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/load_data.hpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/load_data.hpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/src/mach.hpp b/src/mach.hpp index 6bea525..9ef1942 100644 --- a/src/mach.hpp +++ b/src/mach.hpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/mach.hpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/mach.hpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/src/miniargs.cpp b/src/miniargs.cpp index 7c23230..c994e7e 100644 --- a/src/miniargs.cpp +++ b/src/miniargs.cpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/miniargs.cpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/miniargs.cpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/src/miniargs.hpp b/src/miniargs.hpp index 9f04b58..1157783 100644 --- a/src/miniargs.hpp +++ b/src/miniargs.hpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/miniargs.hpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/miniargs.hpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/src/mykdtree.hpp b/src/mykdtree.hpp index bf1eaa0..1f50bca 100644 --- a/src/mykdtree.hpp +++ b/src/mykdtree.hpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/mykdtree.hpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/mykdtree.hpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/src/newton.hpp b/src/newton.hpp index d3975fe..3cb82ae 100644 --- a/src/newton.hpp +++ b/src/newton.hpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/newton.hpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/newton.hpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/src/octTree.cpp b/src/octTree.cpp index 2c76609..9f1d5f7 100644 --- a/src/octTree.cpp +++ b/src/octTree.cpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/octTree.cpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/octTree.cpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/src/octTree.hpp b/src/octTree.hpp index 425d8fd..877017a 100644 --- a/src/octTree.hpp +++ b/src/octTree.hpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/octTree.hpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/octTree.hpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/src/pool.hpp b/src/pool.hpp index b3e2637..d536275 100644 --- a/src/pool.hpp +++ b/src/pool.hpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/pool.hpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/pool.hpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/src/powerSpectrum.cpp b/src/powerSpectrum.cpp index b2a34be..777654c 100644 --- a/src/powerSpectrum.cpp +++ b/src/powerSpectrum.cpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/powerSpectrum.cpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/powerSpectrum.cpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/src/powerSpectrum.hpp b/src/powerSpectrum.hpp index d4c6761..efed489 100644 --- a/src/powerSpectrum.hpp +++ b/src/powerSpectrum.hpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/powerSpectrum.hpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/powerSpectrum.hpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/src/replicateGenerator.hpp b/src/replicateGenerator.hpp index 4d89050..44d5953 100644 --- a/src/replicateGenerator.hpp +++ b/src/replicateGenerator.hpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/replicateGenerator.hpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/replicateGenerator.hpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/src/sparseGrid.hpp b/src/sparseGrid.hpp index 516be9d..1b665d0 100644 --- a/src/sparseGrid.hpp +++ b/src/sparseGrid.hpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/sparseGrid.hpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/sparseGrid.hpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/src/sphSmooth.hpp b/src/sphSmooth.hpp index b347178..d116dd4 100644 --- a/src/sphSmooth.hpp +++ b/src/sphSmooth.hpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/sphSmooth.hpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/sphSmooth.hpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/src/yorick.hpp b/src/yorick.hpp index 59d4656..f38200e 100644 --- a/src/yorick.hpp +++ b/src/yorick.hpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/yorick.hpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/yorick.hpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/src/yorick_nc3.cpp b/src/yorick_nc3.cpp index 8a69d9b..30a8173 100644 --- a/src/yorick_nc3.cpp +++ b/src/yorick_nc3.cpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/yorick_nc3.cpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/yorick_nc3.cpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/src/yorick_nc4.cpp b/src/yorick_nc4.cpp index 49ae5b5..a0234df 100644 --- a/src/yorick_nc4.cpp +++ b/src/yorick_nc4.cpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/yorick_nc4.cpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/yorick_nc4.cpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com From b584ff54a79daa80a08adcd1d72bb8efc5271b1e Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Sun, 25 May 2014 10:43:06 +0200 Subject: [PATCH 08/13] Added python --- CMakeLists.txt | 14 +++++++++++++ python/CMakeLists.txt | 49 +++++++++++++++++++++++++++++++++++++++++++ python/_cosmotool.pyx | 1 + sample/CMakeLists.txt | 4 ++-- src/CMakeLists.txt | 1 - 5 files changed, 66 insertions(+), 3 deletions(-) create mode 100644 python/CMakeLists.txt create mode 100644 python/_cosmotool.pyx diff --git a/CMakeLists.txt b/CMakeLists.txt index 880f616..2a23c18 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,6 +7,11 @@ include(GetGitRevisionDescription) include(ExternalProject) include(FindOpenMP) +include(FindPythonLibs) +set(NumPy_FIND_REQUIRED TRUE) +include(${CMAKE_SOURCE_DIR}/FindNumPy.cmake) + + get_git_head_revision(HEAD GIT_VER) option(BUILD_SHARED_LIBS "Build shared libraries." OFF) @@ -14,6 +19,12 @@ option(BUILD_STATIC_LIBS "Build static libraries." ON) option(ENABLE_OPENMP "Enable OpenMP support." OFF) option(ENABLE_SHARP "Enable SPHT support." ON) +IF(BUILD_SHARED_LIBS AND BUILD_STATIC_LIBS) + SET(CosmoTool_local CosmoTool_static) +ELSE(BUILD_SHARED_LIBS AND BUILD_STATIC_LIBS) + SET(CosmoTool_local CosmoTool) +ENDIF(BUILD_SHARED_LIBS AND BUILD_STATIC_LIBS) + find_path(NETCDF_INCLUDE_PATH NAMES netcdf.h) find_path(NETCDFCPP_INCLUDE_PATH NAMES netcdfcpp.h netcdf) find_path(GSL_INCLUDE_PATH NAMES gsl/gsl_blas.h) @@ -31,6 +42,8 @@ find_library(NETCDF_LIBRARY netcdf) find_library(GSL_LIBRARY gsl) find_library(GSLCBLAS_LIBRARY gslcblas) +find_program(CYTHON cython) + find_package(Boost 1.53) if (ENABLE_SHARP) @@ -108,5 +121,6 @@ SET(CPACK_SOURCE_IGNORE_FILES add_subdirectory(src) add_subdirectory(sample) +add_subdirectory(python) include(CPack) diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt new file mode 100644 index 0000000..c3138a2 --- /dev/null +++ b/python/CMakeLists.txt @@ -0,0 +1,49 @@ +set(CMAKE_SHARED_MODULE_PREFIX) + +include_directories(${NUMPY_INCLUDE_DIRS} ${PYTHON_INCLUDE_PATH} ${CMAKE_SOURCE_DIR}/src ${CMAKE_BINARY_DIR}/src) + +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) + +ENDIF(CYTHON) + + +add_library(_cosmotool MODULE ${CMAKE_CURRENT_BINARY_DIR}/_cosmotool.cpp) + +SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Bsymbolic-functions") + +target_link_libraries(_cosmotool ${CosmoTool_local} ${PYTHON_LIBRARIES} ${GSL_LIBRARIES}) + +# Discover where to put packages +if (NOT PYTHON_SITE_PACKAGES) + execute_process (COMMAND ${PYTHON_EXECUTABLE} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()" OUTPUT_VARIABLE internal_PYTHON_SITE_PACKAGES OUTPUT_STRIP_TRAILING_WHITESPACE) + SET(SYSTEM_PYTHON_SITE_PACKAGES ${internal_PYTHON_SITE_PACKAGES} CACHE PATH "Path to the target system-wide site-package where to install python modules") + + execute_process (COMMAND ${PYTHON_EXECUTABLE} -c "from site import USER_SITE; print USER_SITE" OUTPUT_VARIABLE internal_PYTHON_SITE_PACKAGES OUTPUT_STRIP_TRAILING_WHITESPACE) + SET(USER_PYTHON_SITE_PACKAGES ${internal_PYTHON_SITE_PACKAGES} CACHE PATH "Path to the target user site-package where to install python modules") + + mark_as_advanced(USER_PYTHON_SITE_PACKAGES SYSTEM_PYTHON_SITE_PACKAGES) +endif (NOT PYTHON_SITE_PACKAGES) + +OPTION(INSTALL_PYTHON_LOCAL OFF) + +IF (NOT INSTALL_PYTHON_LOCAL) + SET(PYTHON_SITE_PACKAGES ${SYSTEM_PYTHON_SITE_PACKAGES}) +ELSE (NOT INSTALL_PYTHON_LOCAL) + SET(PYTHON_SITE_PACKAGES ${USER_PYTHON_SITE_PACKAGES}) +ENDIF(NOT INSTALL_PYTHON_LOCAL) + + +if (WIN32 AND NOT CYGWIN) + SET_TARGET_PROPERTIES(_cosmotool PROPERTIES SUFFIX ".pyd") +endif (WIN32 AND NOT CYGWIN) + +INSTALL(TARGETS _cosmotool + LIBRARY DESTINATION ${PYTHON_SITE_PACKAGES}/flints +) + +INSTALL(DIRECTORY cosmotool DESTINATION ${PYTHON_SITE_PACKAGES} + FILES_MATCHING PATTERN "*.py") diff --git a/python/_cosmotool.pyx b/python/_cosmotool.pyx new file mode 100644 index 0000000..a22b22b --- /dev/null +++ b/python/_cosmotool.pyx @@ -0,0 +1 @@ +import numpy as np diff --git a/sample/CMakeLists.txt b/sample/CMakeLists.txt index 47a74b5..ec7b961 100644 --- a/sample/CMakeLists.txt +++ b/sample/CMakeLists.txt @@ -1,4 +1,4 @@ -SET(tolink ${GSL_LIBRARIES} CosmoTool ${CosmoTool_LIBS}) +SET(tolink ${GSL_LIBRARIES} ${CosmoTool_local} ${CosmoTool_LIBS}) include_directories(${CMAKE_SOURCE_DIR}/src) include_directories(${FFTW3_INCLUDE_DIRS} ${EIGEN3_INCLUDE_DIRS} ${NETCDF_INCLUDE_PATH} ${GSL_INCLUDE_PATH}) @@ -32,7 +32,7 @@ add_executable(testPool testPool.cpp) target_link_libraries(testPool ${tolink}) if (HDF5_FOUND) - add_executable(testReadFlash testReadFlash.cpp) + add_executable(testReadFlash testReadFlash.cpp) target_link_libraries(testReadFlash ${tolink}) add_executable(testHDF5 testHDF5.cpp) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 611deaa..441378b 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -69,7 +69,6 @@ set(CosmoTool_LIBS ${CosmoTool_LIBS} PARENT_SCOPE) if (BUILD_SHARED_LIBS) add_library(CosmoTool SHARED ${CosmoTool_SRCS}) target_link_libraries(CosmoTool ${CosmoTool_LIBS}) - if (BUILD_STATIC_LIBS) add_library(CosmoTool_static STATIC ${CosmoTool_SRCS}) endif(BUILD_STATIC_LIBS) From ab1a181bb632290e997991a171ed0c31034320c8 Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Sun, 25 May 2014 11:11:44 +0200 Subject: [PATCH 09/13] First Python support --- python/_cosmotool.pyx | 64 +++++++++++++++++++++++++++++++++++++++++++ src/CMakeLists.txt | 2 ++ src/config.hpp | 7 +++-- 3 files changed, 70 insertions(+), 3 deletions(-) diff --git a/python/_cosmotool.pyx b/python/_cosmotool.pyx index a22b22b..d745876 100644 --- a/python/_cosmotool.pyx +++ b/python/_cosmotool.pyx @@ -1 +1,65 @@ +from libcpp cimport bool import numpy as np +cimport numpy as np + + +cdef extern from "loadSimu.hpp" namespace "CosmoTool": + + cdef cppclass SimuData: + np.float_t BoxSize + np.float_t time + np.float_t Hubble + + np.float_t Omega_M + np.float_t Omega_Lambda + np.int64_t TotalNumParticles + np.int64_t NumParticles + np.int64_t *Id + np.float_t *Pos[3] + np.float_t *Vel[3] + int *type + + cdef const int NEED_GADGET_ID + cdef const int NEED_POSITION + cdef const int NEED_VELOCITY + cdef const int NEED_TYPE + +cdef extern from "loadGadget.hpp" namespace "CosmoTool": + + SimuData *loadGadgetMulti(const char *fname, int id, int flags) except + + + + +cdef class Simulation: + + cdef float BoxSize + cdef float Hubble + cdef list Position + cdef list Velocities + + cdef SimuData *data + + def __cinit__(Simulation self): + self.data = 0 + + def __dealloc__(Simulation self): + if self.data != 0: + del self.data + +def loadGadget(str filename, int snapshot_id, bool loadPosition = True, bool loadVelocity = True): + + cdef int flags + cdef SimuData *data + cdef Simulation simu + + flags = 0 + if loadPosition: + flags |= NEED_POSITION + if loadVelocity: + flags |= NEED_VELOCITY + + data = loadGadgetMulti(filename, snapshot_id, flags) + + simu = Simulation() + simu.data = data + return simu diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 0ee8a05..4feb000 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,3 +1,5 @@ +add_definitions(-fPIC) + SET(CosmoTool_SRCS fortran.cpp interpolate.cpp diff --git a/src/config.hpp b/src/config.hpp index 5bf23a4..6fa7b63 100644 --- a/src/config.hpp +++ b/src/config.hpp @@ -39,6 +39,7 @@ knowledge of the CeCILL license and that you accept its terms. #include #include #include +#include #include namespace CosmoTool @@ -83,13 +84,13 @@ namespace CosmoTool * Base exception class for all exceptions handled by * this library. */ - class Exception : public std::exception + class Exception : public std::runtime_error { public: Exception(const std::string& mess) - : msg(mess), msgok(true) {} + : std::runtime_error(mess), msg(mess), msgok(true) {} Exception() - : msgok(false) {} + : std::runtime_error("No message"), msgok(false) {} virtual ~Exception() throw () {} From 6dc94056f1c00ab9bcc29fcdc978c0ed5f3aa507 Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Mon, 26 May 2014 14:24:53 +0200 Subject: [PATCH 10/13] Finished early binding --- FindNumPy.cmake | 102 +++++++++++++++++++++++++++++++++++ python/CMakeLists.txt | 2 +- python/_cosmotool.pyx | 97 +++++++++++++++++++++++++++++---- python/cosmotool/__init__.py | 1 + 4 files changed, 192 insertions(+), 10 deletions(-) create mode 100644 FindNumPy.cmake create mode 100644 python/cosmotool/__init__.py diff --git a/FindNumPy.cmake b/FindNumPy.cmake new file mode 100644 index 0000000..eafed16 --- /dev/null +++ b/FindNumPy.cmake @@ -0,0 +1,102 @@ +# - Find the NumPy libraries +# This module finds if NumPy is installed, and sets the following variables +# indicating where it is. +# +# TODO: Update to provide the libraries and paths for linking npymath lib. +# +# NUMPY_FOUND - was NumPy found +# NUMPY_VERSION - the version of NumPy found as a string +# NUMPY_VERSION_MAJOR - the major version number of NumPy +# NUMPY_VERSION_MINOR - the minor version number of NumPy +# NUMPY_VERSION_PATCH - the patch version number of NumPy +# NUMPY_VERSION_DECIMAL - e.g. version 1.6.1 is 10601 +# NUMPY_INCLUDE_DIRS - path to the NumPy include files + +#============================================================================ +# Copyright 2012 Continuum Analytics, Inc. +# +# MIT License +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files +# (the "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to permit +# persons to whom the Software is furnished to do so, subject to +# the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR +# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +# OTHER DEALINGS IN THE SOFTWARE. +# +#============================================================================ + +# Finding NumPy involves calling the Python interpreter +if(NumPy_FIND_REQUIRED) + find_package(PythonInterp REQUIRED) +else() + find_package(PythonInterp) +endif() + +if(NOT PYTHONINTERP_FOUND) + set(NUMPY_FOUND FALSE) + return() +endif() + +execute_process(COMMAND "${PYTHON_EXECUTABLE}" "-c" + "import numpy as n; print(n.__version__); print(n.get_include());" + RESULT_VARIABLE _NUMPY_SEARCH_SUCCESS + OUTPUT_VARIABLE _NUMPY_VALUES_OUTPUT + ERROR_VARIABLE _NUMPY_ERROR_VALUE + OUTPUT_STRIP_TRAILING_WHITESPACE) + +if(NOT _NUMPY_SEARCH_SUCCESS MATCHES 0) + if(NumPy_FIND_REQUIRED) + message(FATAL_ERROR + "NumPy import failure:\n${_NUMPY_ERROR_VALUE}") + endif() + set(NUMPY_FOUND FALSE) + return() +endif() + +# Convert the process output into a list +string(REGEX REPLACE ";" "\\\\;" _NUMPY_VALUES ${_NUMPY_VALUES_OUTPUT}) +string(REGEX REPLACE "\n" ";" _NUMPY_VALUES ${_NUMPY_VALUES}) +# Just in case there is unexpected output from the Python command. +list(GET _NUMPY_VALUES -2 NUMPY_VERSION) +list(GET _NUMPY_VALUES -1 NUMPY_INCLUDE_DIRS) + +string(REGEX MATCH "^[0-9]+\\.[0-9]+\\.[0-9]+" _VER_CHECK "${NUMPY_VERSION}") +if("${_VER_CHECK}" STREQUAL "") + # The output from Python was unexpected. Raise an error always + # here, because we found NumPy, but it appears to be corrupted somehow. + message(FATAL_ERROR + "Requested version and include path from NumPy, got instead:\n${_NUMPY_VALUES_OUTPUT}\n") + return() +endif() + +# Make sure all directory separators are '/' +string(REGEX REPLACE "\\\\" "/" NUMPY_INCLUDE_DIRS ${NUMPY_INCLUDE_DIRS}) + +# Get the major and minor version numbers +string(REGEX REPLACE "\\." ";" _NUMPY_VERSION_LIST ${NUMPY_VERSION}) +list(GET _NUMPY_VERSION_LIST 0 NUMPY_VERSION_MAJOR) +list(GET _NUMPY_VERSION_LIST 1 NUMPY_VERSION_MINOR) +list(GET _NUMPY_VERSION_LIST 2 NUMPY_VERSION_PATCH) +string(REGEX MATCH "[0-9]*" NUMPY_VERSION_PATCH ${NUMPY_VERSION_PATCH}) +math(EXPR NUMPY_VERSION_DECIMAL + "(${NUMPY_VERSION_MAJOR} * 10000) + (${NUMPY_VERSION_MINOR} * 100) + ${NUMPY_VERSION_PATCH}") + +find_package_message(NUMPY + "Found NumPy: version \"${NUMPY_VERSION}\" ${NUMPY_INCLUDE_DIRS}" + "${NUMPY_INCLUDE_DIRS}${NUMPY_VERSION}") + +set(NUMPY_FOUND TRUE) + diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index c3138a2..e7d4653 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -42,7 +42,7 @@ if (WIN32 AND NOT CYGWIN) endif (WIN32 AND NOT CYGWIN) INSTALL(TARGETS _cosmotool - LIBRARY DESTINATION ${PYTHON_SITE_PACKAGES}/flints + LIBRARY DESTINATION ${PYTHON_SITE_PACKAGES}/cosmotool ) INSTALL(DIRECTORY cosmotool DESTINATION ${PYTHON_SITE_PACKAGES} diff --git a/python/_cosmotool.pyx b/python/_cosmotool.pyx index d745876..488171b 100644 --- a/python/_cosmotool.pyx +++ b/python/_cosmotool.pyx @@ -1,6 +1,9 @@ from libcpp cimport bool import numpy as np cimport numpy as np +from cpython cimport PyObject, Py_INCREF + +np.import_array() cdef extern from "loadSimu.hpp" namespace "CosmoTool": @@ -12,11 +15,11 @@ cdef extern from "loadSimu.hpp" namespace "CosmoTool": np.float_t Omega_M np.float_t Omega_Lambda - np.int64_t TotalNumParticles - np.int64_t NumParticles + np.int64_t TotalNumPart + np.int64_t NumPart np.int64_t *Id - np.float_t *Pos[3] - np.float_t *Vel[3] + float *Pos[3] + float *Vel[3] int *type cdef const int NEED_GADGET_ID @@ -29,23 +32,94 @@ cdef extern from "loadGadget.hpp" namespace "CosmoTool": SimuData *loadGadgetMulti(const char *fname, int id, int flags) except + - cdef class Simulation: - cdef float BoxSize - cdef float Hubble - cdef list Position - cdef list Velocities + cdef list positions + cdef list velocities cdef SimuData *data + property BoxSize: + def __get__(Simulation self): + return self.data.BoxSize + + property Hubble: + def __get__(Simulation self): + return self.data.Hubble + + property Omega_M: + def __get__(Simulation self): + return self.data.Omega_M + + property positions: + def __get__(Simulation self): + return self.positions + + property velocities: + def __get__(Simulation self): + return self.velocities + + property numParticles: + def __get__(Simulation self): + return self.data.NumPart + def __cinit__(Simulation self): self.data = 0 def __dealloc__(Simulation self): if self.data != 0: + print("Clearing simulation data") del self.data + +cdef class ArrayWrapper: + cdef void* data_ptr + cdef int size + + cdef set_data(self, int size, void* data_ptr): + """ Set the data of the array + +This cannot be done in the constructor as it must recieve C-level +arguments. + +Parameters: +----------- +size: int +Length of the array. +data_ptr: void* +Pointer to the data + + """ + self.data_ptr = data_ptr + self.size = size + + 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, np.NPY_FLOAT, 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_float_array(float *p, np.uint64_t s): + cdef np.ndarray ndarray + cdef ArrayWrapper wrapper + + wrapper = ArrayWrapper() + wrapper.set_data(s, p) + ndarray = np.array(wrapper, copy=False) + ndarray.base = wrapper + Py_INCREF(wrapper) + + return ndarray + def loadGadget(str filename, int snapshot_id, bool loadPosition = True, bool loadVelocity = True): cdef int flags @@ -62,4 +136,9 @@ def loadGadget(str filename, int snapshot_id, bool loadPosition = True, bool loa simu = Simulation() simu.data = data + if loadPosition: + simu.positions = [wrap_float_array(data.Pos[i], data.NumPart) for i in xrange(3)] + if loadVelocity: + simu.velocities = [wrap_float_array(data.Vel[i], data.NumPart) for i in xrange(3)] + return simu diff --git a/python/cosmotool/__init__.py b/python/cosmotool/__init__.py new file mode 100644 index 0000000..70fc1f1 --- /dev/null +++ b/python/cosmotool/__init__.py @@ -0,0 +1 @@ +from _cosmotool import * From 9223ddbc3c9a1372ceb427b0e1cd6739198cf093 Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Tue, 27 May 2014 13:54:42 +0200 Subject: [PATCH 11/13] Check for 0 pointer --- python/_cosmotool.pyx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python/_cosmotool.pyx b/python/_cosmotool.pyx index 488171b..5e8c5dc 100644 --- a/python/_cosmotool.pyx +++ b/python/_cosmotool.pyx @@ -133,6 +133,8 @@ def loadGadget(str filename, int snapshot_id, bool loadPosition = True, bool loa flags |= NEED_VELOCITY data = loadGadgetMulti(filename, snapshot_id, flags) + if data == 0: + return None simu = Simulation() simu.data = data From bf4977721f1c389ec18b984dba9569bc135d03fa Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Fri, 30 May 2014 11:39:13 +0200 Subject: [PATCH 12/13] Added support for ramses in _cosmotool. Fixlet in gadget --- python/_cosmotool.pyx | 40 +++++++++++++++++++++++++++++++++------- src/loadGadget.cpp | 2 +- 2 files changed, 34 insertions(+), 8 deletions(-) diff --git a/python/_cosmotool.pyx b/python/_cosmotool.pyx index 5e8c5dc..fdc934e 100644 --- a/python/_cosmotool.pyx +++ b/python/_cosmotool.pyx @@ -31,6 +31,8 @@ cdef extern from "loadGadget.hpp" namespace "CosmoTool": SimuData *loadGadgetMulti(const char *fname, int id, int flags) except + +cdef extern from "loadRamses.hpp" namespace "CosmoTool": + SimuData *loadRamsesSimu(const char *basename, int id, int cpuid, bool dp, int flags) except + cdef class Simulation: @@ -120,7 +122,18 @@ cdef object wrap_float_array(float *p, np.uint64_t s): return ndarray -def loadGadget(str filename, int snapshot_id, bool loadPosition = True, bool loadVelocity = True): +cdef object wrap_simudata(SimuData *data, int flags): + cdef Simulation simu + + simu = Simulation() + simu.data = data + if flags & NEED_POSITION: + simu.positions = [wrap_float_array(data.Pos[i], data.NumPart) for i in xrange(3)] + if flags & NEED_VELOCITY: + simu.velocities = [wrap_float_array(data.Vel[i], data.NumPart) for i in xrange(3)] + return simu + +def loadGadget(str filename, int snapshot_id, bool loadPosition = True, bool loadVelocity = False): cdef int flags cdef SimuData *data @@ -136,11 +149,24 @@ def loadGadget(str filename, int snapshot_id, bool loadPosition = True, bool loa if data == 0: return None - simu = Simulation() - simu.data = data + return wrap_simudata(data, flags) + +def loadRamses(str basepath, int snapshot_id, int cpu_id, bool doublePrecision = False, bool loadPosition = True, bool loadVelocity = 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. +""" + cdef int flags + cdef SimuData *data + cdef Simulation simu + + flags = 0 if loadPosition: - simu.positions = [wrap_float_array(data.Pos[i], data.NumPart) for i in xrange(3)] + flags |= NEED_POSITION if loadVelocity: - simu.velocities = [wrap_float_array(data.Vel[i], data.NumPart) for i in xrange(3)] - - return simu + flags |= NEED_VELOCITY + + data = loadRamsesSimu(basepath, snapshot_id, cpu_id, doublePrecision, flags) + if data == 0: + return None + + return wrap_simudata(data, flags) diff --git a/src/loadGadget.cpp b/src/loadGadget.cpp index 11929f4..be1bf14 100644 --- a/src/loadGadget.cpp +++ b/src/loadGadget.cpp @@ -96,7 +96,7 @@ SimuData *CosmoTool::loadGadgetMulti(const char *fname, int id, if (f == 0) return 0; - delete out_fname; + delete[] out_fname; } else { From 2afccc3411ece07cd254b466846f47cb9fe9af8c Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Fri, 30 May 2014 13:21:12 +0200 Subject: [PATCH 13/13] grab particle ids too --- python/_cosmotool.pyx | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/python/_cosmotool.pyx b/python/_cosmotool.pyx index fdc934e..091b9a4 100644 --- a/python/_cosmotool.pyx +++ b/python/_cosmotool.pyx @@ -38,6 +38,7 @@ cdef class Simulation: cdef list positions cdef list velocities + cdef object identifiers cdef SimuData *data @@ -45,6 +46,10 @@ cdef class Simulation: def __get__(Simulation self): return self.data.BoxSize + property time: + def __get__(Simulation self): + return self.data.time + property Hubble: def __get__(Simulation self): return self.data.Hubble @@ -77,8 +82,9 @@ cdef class Simulation: cdef class ArrayWrapper: cdef void* data_ptr cdef int size + cdef int type_array - cdef set_data(self, int size, void* data_ptr): + cdef set_data(self, int 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 @@ -94,6 +100,7 @@ Pointer to the data """ 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 @@ -102,7 +109,7 @@ tries to get an array from the object.""" shape[0] = self.size # Create a 1D array, of length 'size' - ndarray = np.PyArray_SimpleNewFromData(1, shape, np.NPY_FLOAT, self.data_ptr) + ndarray = np.PyArray_SimpleNewFromData(1, shape, self.type_array, self.data_ptr) return ndarray def __dealloc__(self): @@ -110,18 +117,25 @@ tries to get an array from the object.""" references to the object are gone. """ pass -cdef object wrap_float_array(float *p, np.uint64_t s): +cdef object wrap_array(void *p, np.uint64_t s, int typ): cdef np.ndarray ndarray cdef ArrayWrapper wrapper wrapper = ArrayWrapper() - wrapper.set_data(s, p) + wrapper.set_data(s, typ, p) ndarray = np.array(wrapper, copy=False) ndarray.base = wrapper Py_INCREF(wrapper) return ndarray + +cdef object wrap_float_array(float *p, np.uint64_t s): + return wrap_array(p, s, np.NPY_FLOAT) + +cdef object wrap_int64_array(np.int64_t* p, np.uint64_t s): + return wrap_array(p, s, np.NPY_INT64) + cdef object wrap_simudata(SimuData *data, int flags): cdef Simulation simu @@ -131,9 +145,11 @@ cdef object wrap_simudata(SimuData *data, int flags): simu.positions = [wrap_float_array(data.Pos[i], data.NumPart) for i in xrange(3)] if flags & NEED_VELOCITY: simu.velocities = [wrap_float_array(data.Vel[i], data.NumPart) for i in xrange(3)] + if flags & NEED_GADGET_ID: + simu.identifiers = wrap_int64_array(data.Id, data.NumPart) return simu -def loadGadget(str filename, int snapshot_id, bool loadPosition = True, bool loadVelocity = False): +def loadGadget(str filename, int snapshot_id, bool loadPosition = True, bool loadVelocity = False, bool loadId = False): cdef int flags cdef SimuData *data @@ -144,6 +160,8 @@ def loadGadget(str filename, int snapshot_id, bool loadPosition = True, bool loa flags |= NEED_POSITION if loadVelocity: flags |= NEED_VELOCITY + if loadId: + flags |= NEED_GADGET_ID data = loadGadgetMulti(filename, snapshot_id, flags) if data == 0: