diff --git a/CMakeLists.txt b/CMakeLists.txt index 7160419..858dbaa 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) 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(),