Skip to content

Commit

Permalink
fix build for fp32 cpu
Browse files Browse the repository at this point in the history
  • Loading branch information
zhi-wang committed Nov 9, 2023
1 parent d4dfb2d commit 70bd052
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,7 @@ add_subdirectory (test)

## executables
add_library (__t9_main_o OBJECT src/main.cc)
target_link_libraries (__t9_main_o PRIVATE __t9_intf PRIVATE tinkerFToCpp)
target_link_libraries (__t9_main_o PRIVATE __t9_intf tinkerFToCpp)
set_target_properties (__t9_main_o PROPERTIES CXX_STANDARD ${T9_CPPSTD})
## tinker9 and all.tests
list (APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
Expand Down
3 changes: 2 additions & 1 deletion include/math/libfunc.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ extern "C"
# endif

# if TINKER_REAL_SIZE == 4
# define REAL_ABS std::fabsf
// Bug. Cannot use std::fabsf. See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79700
# define REAL_ABS ::fabsf
# endif
#endif

Expand Down
2 changes: 1 addition & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ cudart/thrustcache.cpp
)
endif ()
add_library (tinker9_cpp STATIC "${__T9_CPP_SRC}")
target_link_libraries (tinker9_cpp PRIVATE __t9_intf PRIVATE tinkerFToCpp)
target_link_libraries (tinker9_cpp PRIVATE __t9_intf tinkerFToCpp)
set_target_properties (tinker9_cpp PROPERTIES CXX_STANDARD ${T9_CPPSTD})

add_library (tinker9_version OBJECT
Expand Down
2 changes: 1 addition & 1 deletion src/acc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ cmake_minimum_required (VERSION 3.18)
## libtinker9_acc.a
include (cmakesrc.txt)
add_library (tinker9_acc STATIC "${__T9_ACC_SRC}")
target_link_libraries (tinker9_acc PRIVATE __t9_intf PRIVATE tinkerFToCpp)
target_link_libraries (tinker9_acc PRIVATE __t9_intf tinkerFToCpp)
set_target_properties (tinker9_acc PROPERTIES CXX_STANDARD ${T9_CPPSTD})


Expand Down
2 changes: 1 addition & 1 deletion src/cu/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ set_target_properties (tinker9_cu
CUDA_ARCHITECTURES "${T9_CUCCLIST}"
)
target_include_directories (tinker9_cu PRIVATE "${PROJECT_SOURCE_DIR}/include/syntax/cu")
target_link_libraries (tinker9_cu PRIVATE __t9_intf PRIVATE tinkerFToCpp)
target_link_libraries (tinker9_cu PRIVATE __t9_intf tinkerFToCpp)
target_link_libraries (tinker9_cu PUBLIC cufft cublas)

# ## -gencode arch=compute_60,code=sm_60 -gencode arch=compute_70,code=sm_70
Expand Down
2 changes: 1 addition & 1 deletion test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ cmake_minimum_required (VERSION 3.18)
## test files
include (cmakesrc.txt)
add_library (__t9_all_tests_o OBJECT ${__T9_TEST_SRC})
target_link_libraries (__t9_all_tests_o PRIVATE __t9_intf PRIVATE tinkerFToCpp)
target_link_libraries (__t9_all_tests_o PRIVATE __t9_intf tinkerFToCpp)
set_target_properties (__t9_all_tests_o PROPERTIES CXX_STANDARD ${T9_CPPSTD})
if (14 LESS_EQUAL ${T9_CPPSTD})
find_package (Catch2 PATHS "${CMAKE_BINARY_DIR}/catch2")
Expand Down

0 comments on commit 70bd052

Please sign in to comment.