Fixed boost dependency. Fixed I/O in test bispectrum
This commit is contained in:
parent
c61daed876
commit
8b2f0f7557
2
external/external_build.cmake
vendored
2
external/external_build.cmake
vendored
@ -155,9 +155,11 @@ if (INTERNAL_BOOST)
|
||||
set(Boost_INCLUDE_DIRS ${BOOST_SOURCE_DIR} CACHE STRING "Boost path" FORCE)
|
||||
set(Boost_LIBRARIES ${BOOST_SOURCE_DIR}/stage/lib/libboost_python.a CACHE STRING "Boost libraries" FORCE)
|
||||
set(Boost_FOUND YES)
|
||||
set(Boost_DEP boost)
|
||||
|
||||
ELSE (INTERNAL_BOOST)
|
||||
find_package(Boost 1.53)
|
||||
set(Boost_DEP)
|
||||
endif (INTERNAL_BOOST)
|
||||
mark_as_advanced(Boost_INCLUDE_DIRS Boost_LIBRARIES)
|
||||
|
||||
|
@ -54,7 +54,9 @@ if (Boost_FOUND)
|
||||
include_directories(${Boost_INCLUDE_DIRS})
|
||||
add_library(_cosmo_bispectrum MODULE _cosmo_bispectrum.cpp)
|
||||
target_link_libraries(_cosmo_bispectrum ${MATH_LIBRARY})
|
||||
add_dependencies(_cosmo_bispectrum boost)
|
||||
if (Boost_DEP)
|
||||
add_dependencies(_cosmo_bispectrum ${Boost_DEP})
|
||||
endif()
|
||||
SET(ct_TARGETS ${ct_TARGETS} _cosmo_bispectrum)
|
||||
endif()
|
||||
|
||||
|
@ -17,7 +17,7 @@ def myfun(N):
|
||||
|
||||
y = BB/x
|
||||
|
||||
np.savez("bispec_%d.npy" % N, y=y, B=B, P=P, rho=rho);
|
||||
np.savez("bispec_%d.npz" % N, y=y, B_nt=B[0], B_r=B[1], P_n=P[0], P=P[1], rho=rho);
|
||||
|
||||
|
||||
print( timeit.timeit('from __main__ import myfun; myfun(16)', number=1) )
|
||||
|
Loading…
Reference in New Issue
Block a user