Fixed thread related problem preventing execution
This commit is contained in:
parent
18c81baac9
commit
0c9e97f732
@ -50,15 +50,15 @@ if(APPLE)
|
|||||||
set(CMAKE_MODULE_LINKER_FLAGS "-undefined dynamic_lookup")
|
set(CMAKE_MODULE_LINKER_FLAGS "-undefined dynamic_lookup")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_link_libraries(_cosmotool ${CosmoTool_local} ${PYTHON_LIBRARIES} ${GSL_LIBRARIES})
|
target_link_libraries(_cosmotool ${CosmoTool_local} ${PYTHON_LIBRARY} ${GSL_LIBRARIES})
|
||||||
target_link_libraries(_cosmo_power ${CosmoTool_local} ${PYTHON_LIBRARIES} ${GSL_LIBRARIES})
|
target_link_libraries(_cosmo_power ${CosmoTool_local} ${PYTHON_LIBRARY} ${GSL_LIBRARIES})
|
||||||
target_link_libraries(_cosmo_cic ${CosmoTool_local} ${PYTHON_LIBRARIES} ${GSL_LIBRARIES})
|
target_link_libraries(_cosmo_cic ${CosmoTool_local} ${PYTHON_LIBRARY} ${GSL_LIBRARIES})
|
||||||
target_link_libraries(_project ${PYTHON_LIBRARIES})
|
target_link_libraries(_project ${PYTHON_LIBRARY})
|
||||||
target_link_libraries(_fast_interp ${CosmoTool_local} ${PYTHON_LIBRARIES})
|
target_link_libraries(_fast_interp ${CosmoTool_local} ${PYTHON_LIBRARY})
|
||||||
|
|
||||||
SET(ct_TARGETS _cosmotool _project _cosmo_power _cosmo_cic _fast_interp )
|
SET(ct_TARGETS _cosmotool _project _cosmo_power _cosmo_cic _fast_interp )
|
||||||
|
|
||||||
if (Boost_FOUND)
|
if (FALSE AND Boost_FOUND)
|
||||||
message(STATUS "Building bispectrum support (path = ${Boost_INCLUDE_DIRS})")
|
message(STATUS "Building bispectrum support (path = ${Boost_INCLUDE_DIRS})")
|
||||||
include_directories(${Boost_INCLUDE_DIRS})
|
include_directories(${Boost_INCLUDE_DIRS})
|
||||||
add_library(_cosmo_bispectrum MODULE _cosmo_bispectrum.cpp)
|
add_library(_cosmo_bispectrum MODULE _cosmo_bispectrum.cpp)
|
||||||
|
@ -545,6 +545,7 @@ def project_cic(npx.ndarray[DTYPE_t, ndim=2] x not None, npx.ndarray[DTYPE_t, nd
|
|||||||
cdef npx.ndarray[DTYPE_t, ndim=3] g
|
cdef npx.ndarray[DTYPE_t, ndim=3] g
|
||||||
cdef double shifter
|
cdef double shifter
|
||||||
cdef bool local_periodic
|
cdef bool local_periodic
|
||||||
|
cdef DTYPE_t[:] d_mass
|
||||||
|
|
||||||
local_periodic = periodic
|
local_periodic = periodic
|
||||||
|
|
||||||
@ -560,21 +561,25 @@ def project_cic(npx.ndarray[DTYPE_t, ndim=2] x not None, npx.ndarray[DTYPE_t, nd
|
|||||||
raise ValueError("Mass array and coordinate array must have the same number of elements")
|
raise ValueError("Mass array and coordinate array must have the same number of elements")
|
||||||
|
|
||||||
g = np.zeros((Ngrid,Ngrid,Ngrid),dtype=DTYPE)
|
g = np.zeros((Ngrid,Ngrid,Ngrid),dtype=DTYPE)
|
||||||
|
cdef DTYPE_t[:,:,:] d_g = g
|
||||||
|
cdef DTYPE_t[:,:] d_x = x
|
||||||
|
|
||||||
if not local_periodic:
|
if not local_periodic:
|
||||||
if mass is None:
|
if mass is None:
|
||||||
with nogil:
|
with nogil:
|
||||||
INTERNAL_project_cic_no_mass(g, x, Ngrid, Lbox, shifter)
|
INTERNAL_project_cic_no_mass(d_g, d_x, Ngrid, Lbox, shifter)
|
||||||
else:
|
else:
|
||||||
|
d_mass = mass
|
||||||
with nogil:
|
with nogil:
|
||||||
INTERNAL_project_cic_with_mass(g, x, mass, Ngrid, Lbox, shifter)
|
INTERNAL_project_cic_with_mass(d_g, d_x, d_mass, Ngrid, Lbox, shifter)
|
||||||
else:
|
else:
|
||||||
if mass is None:
|
if mass is None:
|
||||||
with nogil:
|
with nogil:
|
||||||
INTERNAL_project_cic_no_mass_periodic(g, x, Ngrid, Lbox, shifter)
|
INTERNAL_project_cic_no_mass_periodic(d_g, d_x, Ngrid, Lbox, shifter)
|
||||||
else:
|
else:
|
||||||
|
d_mass = mass
|
||||||
with nogil:
|
with nogil:
|
||||||
INTERNAL_project_cic_with_mass_periodic(g, x, mass, Ngrid, Lbox, shifter)
|
INTERNAL_project_cic_with_mass_periodic(d_g, d_x, d_mass, Ngrid, Lbox, shifter)
|
||||||
|
|
||||||
return g
|
return g
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user