From 4737ee06a7b9336955a28c03443b72a5ce1bb72e Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Wed, 21 Aug 2013 14:50:38 -0400 Subject: [PATCH 1/3] Removed 'critical' section as it may cause problem in calling function. The thread safety is left for the caller --- src/fourier/details/euclidian_transform.hpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/fourier/details/euclidian_transform.hpp b/src/fourier/details/euclidian_transform.hpp index d87e610..eaab4fd 100644 --- a/src/fourier/details/euclidian_transform.hpp +++ b/src/fourier/details/euclidian_transform.hpp @@ -99,7 +99,6 @@ namespace CosmoTool boost::shared_ptr >((std::complex*)calls::alloc_complex(Nc), std::ptr_fun(calls::free)), dims[0], m_dims_hc, dk); -#pragma omp critical { m_analysis = calls::plan_dft_r2c(dims.size(), &swapped_dims[0], realMap->data(), (typename calls::complex_type *)fourierMap->data(), From bd310df1e38174aee98c3a93a28601d3650e9d67 Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Thu, 20 Feb 2014 17:45:35 +0100 Subject: [PATCH 2/3] Fixed incorrectly ordered parameters in prototype --- src/fourier/details/healpix_transform.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fourier/details/healpix_transform.hpp b/src/fourier/details/healpix_transform.hpp index d3f7927..b269471 100644 --- a/src/fourier/details/healpix_transform.hpp +++ b/src/fourier/details/healpix_transform.hpp @@ -67,7 +67,7 @@ namespace CosmoTool sharp_make_triangular_alm_info (Lmax, Mmax, 1, &ainfo); } - HealpixFourierTransform(long nSide, long Lmax, long Mmax, int iterate = 0, const std::valarray& weights ) + HealpixFourierTransform(long nSide, long Lmax, long Mmax, const std::valarray& weights, int iterate = 0 ) : realMap(nSide), fourierMap(Lmax, Mmax), ainfo(0), ginfo(0), m_iterate(iterate) { sharp_make_weighted_healpix_geom_info (nSide, 1, &weights[0], &ginfo); From 00f5cbf2bc750e0175ec655692ca2d39532f2294 Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Fri, 21 Feb 2014 09:34:15 +0100 Subject: [PATCH 3/3] Fixed netcdf detection --- CMakeLists.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c4888a4..1f4dace 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,17 +17,17 @@ option(ENABLE_SHARP "Enable SPHT support." ON) 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) +find_library(NETCDFCPP_LIBRARY NAMES netcdf_c++ netcdf_c++4) -IF(EXISTS ${NETCDFCPP_INCLUDE_PATH}/netcdf) +IF(EXISTS ${NETCDFCPP_INCLUDE_PATH}/netcdf AND ${NETCDFCPP_LIBRARY} MATCHES "netcdf_c\\+\\+4") SET(FOUND_NETCDF4 1) FILE(WRITE ${CMAKE_BINARY_DIR}/src/ctool_netcdf_ver.hpp "#define NETCDFCPP4 1") -ELSE(EXISTS ${NETCDFCPP_INCLUDE_PATH}/netcdf) +ELSE(EXISTS ${NETCDFCPP_INCLUDE_PATH}/netcdf AND ${NETCDFCPP_LIBRARY} MATCHES "netcdf_c\\+\\+4") SET(FOUND_NETCDF3 1) FILE(WRITE ${CMAKE_BINARY_DIR}/src/ctool_netcdf_ver.hpp "#undef NETCDFCPP4") -ENDIF(EXISTS ${NETCDFCPP_INCLUDE_PATH}/netcdf) +ENDIF(EXISTS ${NETCDFCPP_INCLUDE_PATH}/netcdf AND ${NETCDFCPP_LIBRARY} MATCHES "netcdf_c\\+\\+4") find_library(NETCDF_LIBRARY netcdf) -find_library(NETCDFCPP_LIBRARY NAMES netcdf_c++ netcdf_c++4) find_library(GSL_LIBRARY gsl) find_library(GSLCBLAS_LIBRARY gslcblas)