Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
174 commits
Select commit Hold shift + click to select a range
46c6d09
Added tests for BlockUniTensor and Bond
yingjerkao Oct 31, 2023
67dd2b5
Create temporary files in the system's temp folder
IvanaGyro Aug 30, 2024
a66fbaa
Explicitly include CTest
IvanaGyro Aug 30, 2024
1cbb96f
Set CTest's working directory to `tests/`
IvanaGyro Aug 30, 2024
e44d0f6
Correct the pre-defined flag
IvanaGyro Aug 30, 2024
dd07122
Remove unused CTest properties
IvanaGyro Aug 30, 2024
96beb56
Revert "Fix set order"
IvanaGyro Aug 30, 2024
30fe5bf
Fix broken test when enabling address sanitizer
IvanaGyro Aug 30, 2024
f7edca6
fix setOrder function itself
jeffry1829 Aug 31, 2024
3106be9
Merge branch 're-fix-setOrder' into ctest-working-dir
jeffry1829 Aug 31, 2024
1be5056
remove comment
jeffry1829 Aug 31, 2024
e26c9eb
Revert "remove comment"
jeffry1829 Aug 31, 2024
dea928d
remove comment
jeffry1829 Aug 31, 2024
b4299d5
Merge pull request #458 from Cytnx-dev/re-fix-setOrder
IvanaGyro Aug 31, 2024
0be640d
Merge pull request #457 from Cytnx-dev/ctest-working-dir
IvanaGyro Aug 31, 2024
dfde0ce
Suppress Clang compilation errors
IvanaGyro Sep 1, 2024
72453ca
Suppress Clang compilation errors on Mac
IvanaGyro Sep 1, 2024
b67ae85
Merge pull request #461 from Cytnx-dev/suppress-clang-error
jeffry1829 Sep 7, 2024
4b45653
fixed segfault when a BlockUniTensor with no valid blocks was printed…
manuschneider Sep 10, 2024
0d5be85
better default return values for BlockUniTensor with no blocks
manuschneider Sep 11, 2024
f43dcbd
Merge pull request #464 from Cytnx-dev/noblock_fix
jeffry1829 Sep 12, 2024
dbacf92
fix cutt install & Svd_truncate error
jeffry1829 Sep 13, 2024
7013376
fix (Ge)Svd(_truncate) error with cuda
jeffry1829 Sep 14, 2024
dfd8837
fix-format
jeffry1829 Sep 14, 2024
17e751c
remove debug prints
jeffry1829 Sep 14, 2024
c4be1c9
fix format
jeffry1829 Sep 14, 2024
64baf43
fix cuda contract when used without cutensor and cuquantum
jeffry1829 Sep 16, 2024
cf91311
Fix combindbond in pybind so the default arguments is_grp=true will w…
hunghaoti Sep 18, 2024
009106e
Merge pull request #476 from Cytnx-dev/haoti/fix_combindbond_pybind
hunghaoti Sep 18, 2024
b1ea554
Modify reshape_ and permute_ in both unitensor and tensor, so now the…
hunghaoti Sep 20, 2024
e500a12
Merge pull request #471 from Cytnx-dev/fix-cutt-Svd_truncate
jeffry1829 Sep 23, 2024
51dc73e
Merge pull request #475 from Cytnx-dev/fix-cuda-contract-without-cute…
jeffry1829 Sep 23, 2024
e0ff293
fix cuTNPerm & cuGeSvd without is_U=false & attempt to fix cutt call …
jeffry1829 Sep 24, 2024
58e69a0
Replace magma with cusolver LU
yingjerkao Sep 26, 2024
6343018
Remove Magma Dependency
yingjerkao Sep 26, 2024
fe24972
Implement Eig using cusolver
yingjerkao Sep 26, 2024
81dc697
Remove Magma dependency
yingjerkao Sep 26, 2024
131ae96
Update CMakeLists.txt
jeffry1829 Sep 26, 2024
999ab32
Merge pull request #347 from Cytnx-dev/addtests
jeffry1829 Sep 30, 2024
35c95aa
fix (cu)Det error when U is singular &
jeffry1829 Oct 1, 2024
f9781a9
-fixed [#479]: Svd_truncate did not work if input type was Int or sim…
manuschneider Oct 1, 2024
0fd7e4e
fix cuTensor contraction performance by choosing different algo
jeffry1829 Oct 2, 2024
3588989
-Svd_truncate calls Svd, and then uses the dtype of U for the truncat…
manuschneider Oct 2, 2024
51bb277
Merge pull request #486 from Cytnx-dev/fix_SVDtruncate_int
jeffry1829 Oct 2, 2024
a7762fa
restore reverse_perm
jeffry1829 Oct 2, 2024
6a89c5c
Update gcovr version
jeffry1829 Oct 2, 2024
cd22a1c
Revert "fix (cu)Det error when U is singular &"
jeffry1829 Oct 2, 2024
6273512
remove unneccessary codes & use gtest ASSERT_TRUE
jeffry1829 Oct 2, 2024
bfe241c
remove unneccessary include
jeffry1829 Oct 2, 2024
7be113c
Merge pull request #488 from Cytnx-dev/fix-gcov
yingjerkao Oct 2, 2024
4861097
Merge pull request #483 from Cytnx-dev/remove_magma
jeffry1829 Oct 2, 2024
6238e02
Remove the unused argument
IvanaGyro Oct 4, 2024
0a464ef
Move namespace TestTools under namespace cytnx
IvanaGyro Oct 5, 2024
1acce4c
Add an assertion for checking equality of numbers
IvanaGyro Oct 5, 2024
8bf5288
Fix `linalg::Sum()` for complex data types on GPU
IvanaGyro Oct 6, 2024
4f70610
Remove unused test file
IvanaGyro Oct 6, 2024
c9059ba
Disable accuracy test of linalg::Sum() on CPU
IvanaGyro Oct 6, 2024
fd1abfd
Templatize cuReduce_gpu and use libcu++'s complex
IvanaGyro Oct 6, 2024
59fa674
typo/language
manuschneider Oct 7, 2024
c266ec2
Merge pull request #478 from Cytnx-dev/haoti/Fix_underline
hunghaoti Oct 8, 2024
4e97e44
-fixed bug with mindim, which was not respected in (Ge)Svd_truncate
manuschneider Oct 14, 2024
ebbb15f
-added (Ge)Svd_truncate with minblockdim; a minimal dimension for eac…
manuschneider Oct 14, 2024
28fb5df
-changed naming convention from minblockim to min_blockdim
manuschneider Oct 14, 2024
f21621e
-added further explanation of the truncation order for SVD_truncate
manuschneider Oct 15, 2024
7c62492
made the argument min_blockdim non-const to avoid copying twice
manuschneider Oct 16, 2024
cd87b56
-some comments about truncated Svd
manuschneider Nov 4, 2024
8e97a24
Merge pull request #480 from Cytnx-dev/fix-cutt-related
IvanaGyro Nov 8, 2024
21d901b
Skip test cases testing unimplemented functions
IvanaGyro Nov 9, 2024
9f46fd4
Merge pull request #503 from Cytnx-dev/skip-tests
manuschneider Nov 13, 2024
17a6edf
Add a helper class to check if a type is `complex`
IvanaGyro Nov 9, 2024
6c56bd6
Add a class for generating type pairs for testing
IvanaGyro Nov 12, 2024
eefd0dd
Refactor the test that fills a Storage with values
IvanaGyro Nov 12, 2024
c7effd2
Add test for appending value with reallocation
IvanaGyro Nov 12, 2024
83b07ca
Templatise `Movemem()` function
IvanaGyro Nov 9, 2024
fca444d
added a comment to explain usage of is_complex_v
manuschneider Nov 14, 2024
50c0553
Merge pull request #510 from Cytnx-dev/is-complex
manuschneider Nov 14, 2024
0b510a6
Merge pull request #509 from Cytnx-dev/test-storage-append
IvanaGyro Nov 19, 2024
6ff4e31
Merge pull request #504 from Cytnx-dev/templatise_functions
IvanaGyro Nov 19, 2024
19a3c39
Templatise `Fill()` functions used by `Storage`
IvanaGyro Nov 10, 2024
086034b
Increase block size used in FillGpu() to 1024
IvanaGyro Nov 10, 2024
eed01c2
Change the scheduling type to static for FillCpu()
IvanaGyro Nov 19, 2024
7fd2551
Merge pull request #507 from Cytnx-dev/templatise_fill
IvanaGyro Nov 19, 2024
e537d60
Refactor `Storage` class
IvanaGyro Nov 10, 2024
e2b00f0
Merge pull request #508 from Cytnx-dev/templatise_storage
IvanaGyro Nov 19, 2024
35feb80
Refactor Type.hpp
ianmccul Nov 21, 2024
4032272
remove __type::__pybind_type
ianmccul Nov 21, 2024
008db06
Format with git-clang-format
ianmccul Nov 22, 2024
8fb4fd5
Add cmake configuration for the location of the test data
ianmccul Nov 21, 2024
24b1bbe
changed to use add_compile_definitions()
ianmccul Nov 23, 2024
f6a9e28
Merge pull request #491 from Cytnx-dev/Svd_truncate
manuschneider Nov 25, 2024
83dfac6
Add CMAKE_INTERPROCEDURAL_OPTIMIZATION
ianmccul Nov 28, 2024
710c98c
Dispatch via std::variant, and type-safe conversion of Tensor::_impl-…
ianmccul Nov 28, 2024
cb0ea68
Merge branch 'dev-master' into refactor-types
IvanaGyro Nov 29, 2024
8a21eaf
Merge pull request #514 from ianmccul/refactor-types
IvanaGyro Nov 29, 2024
c1aa24b
Merge pull request #523 from Cytnx-dev/fix-test-data-dir
IvanaGyro Nov 29, 2024
309c9ed
Implement Tensor::gpu_ptr()
IvanaGyro Nov 29, 2024
55c58a9
Be consistent with the type of Type_struct::name
IvanaGyro Nov 29, 2024
f8bc550
Follow the header guard rule in Google style guide
IvanaGyro Nov 30, 2024
21efcbc
Delete stale files
IvanaGyro Nov 30, 2024
0340baa
Merge pull request #527 from Cytnx-dev/update-headers
IvanaGyro Dec 2, 2024
df97e05
Merge pull request #525 from Cytnx-dev/fix-cuda-build
IvanaGyro Dec 2, 2024
b5f1dd4
Merge branch 'dev-master' into fix-sum
IvanaGyro Dec 2, 2024
7fbd8db
Get number of CPU cores with std::thread
IvanaGyro Nov 29, 2024
4e814d1
Remove UNI_OMP guards surrounding `#pragma omp...`
IvanaGyro Nov 29, 2024
9c0843b
Remove `-fopenmp` flag when only enabling MKL
IvanaGyro Nov 30, 2024
672b7e9
Remove commented commands in CMakeLists.txt
IvanaGyro Nov 30, 2024
dd72877
Merge pull request #526 from Cytnx-dev/remove-uni-omp-pr
IvanaGyro Dec 2, 2024
562f093
Implement Storage::release()
IvanaGyro Dec 1, 2024
ad6610f
Do not assign the value to the variable of Stroage
IvanaGyro Dec 1, 2024
602507b
Encapsulate Storage_base class
IvanaGyro Dec 1, 2024
09b2c37
Remove unsed debug message
IvanaGyro Dec 2, 2024
d853a18
Merge branch 'dev-master' into addDetTests
IvanaGyro Dec 2, 2024
9c02402
Make tests for Det() buildable
IvanaGyro Dec 2, 2024
3849222
Allow to get typed complex pointers from Storage
IvanaGyro Dec 4, 2024
fe06e86
Uniform randomizing function respects given range
IvanaGyro Dec 4, 2024
eb67ff2
Det() returns zero for the sigular matrix
IvanaGyro Dec 4, 2024
32f2ef7
Merge pull request #530 from Cytnx-dev/return-zero-det
IvanaGyro Dec 5, 2024
4675b7e
Merge pull request #529 from Cytnx-dev/uniform-respect-range
IvanaGyro Dec 5, 2024
ccd59a5
Det() handles the sigular matrix on CPU
IvanaGyro Dec 5, 2024
f5d2d82
Merge pull request #489 from Cytnx-dev/addDetTests
IvanaGyro Dec 6, 2024
9f30132
Fix and refactor tests for Det()
IvanaGyro Dec 5, 2024
223667b
Prevent forward declarations
IvanaGyro Dec 5, 2024
1f09d66
Merge pull request #533 from Cytnx-dev/det-singular
manuschneider Dec 10, 2024
4b43ad7
Refactor SearchTree and PseudoUniTensor classes for improved memory m…
yingjerkao Dec 11, 2024
8c0542d
Refactor ContractionTree and Node classes to use smart pointers for i…
yingjerkao Dec 11, 2024
2d5f760
Enhance ContractionTree and Node classes with improved root pointer m…
yingjerkao Dec 11, 2024
f39a137
Refactor base node creation in RegularNetwork class for improved clar…
yingjerkao Dec 12, 2024
0cec911
Fix Clang-format error
yingjerkao Dec 12, 2024
e783b55
Fix Clang-Format error
yingjerkao Dec 12, 2024
31dcf7d
Reformat code
yingjerkao Dec 12, 2024
733d434
Merge pull request #490 from Cytnx-dev/fix-sum
yingjerkao Dec 12, 2024
68d03f6
Fix Clang-format
yingjerkao Dec 13, 2024
e622225
Merge branch 'dev-master' into fix-contraction-tree
yingjerkao Dec 13, 2024
25bd012
Added missing include for cytnx.hpp in Det_test.cpp to ensure proper …
yingjerkao Dec 13, 2024
adc303f
Fix Clang-format
yingjerkao Dec 13, 2024
2c303e9
Merge pull request #537 from Cytnx-dev/dev-master
IvanaGyro Dec 13, 2024
3debb4e
Remove debugging messages
yingjerkao Dec 13, 2024
1346166
Improve Readme.md
yrzheng0419 Dec 14, 2024
937d17b
Update Readme.md
yrzheng0419 Dec 14, 2024
bebe393
Fix build for Det tests
IvanaGyro Dec 16, 2024
0943480
Merge pull request #534 from Cytnx-dev/fix-det-test
hunghaoti Dec 23, 2024
4a1fccb
Merge branch 'dev-master' into fix-contraction-tree
yingjerkao Dec 23, 2024
bb1dc21
Merge pull request #536 from Cytnx-dev/fix-contraction-tree
yingjerkao Dec 23, 2024
f027d08
Merge branch 'dev-master' into encapsulate-storage
IvanaGyro Dec 25, 2024
7b3ba91
Remove debug code for fixing the format
IvanaGyro Dec 25, 2024
3cc7736
Merge pull request #528 from Cytnx-dev/encapsulate-storage
hunghaoti Dec 25, 2024
2c06b4e
Fix deprecated functions.
hunghaoti Dec 25, 2024
50490b4
Fix conflict.
hunghaoti Dec 25, 2024
a2960b5
Merge pull request #544 from Cytnx-dev/haoti/deprecated_fix
hunghaoti Dec 25, 2024
6a00436
Fix gpu unit test.
hunghaoti Dec 27, 2024
a6f126c
Merge pull request #546 from yrzheng0419/master
hunghaoti Dec 27, 2024
593a2d2
Update Readme.md
hunghaoti Dec 27, 2024
11c1c96
Fix release note link.
hunghaoti Dec 27, 2024
a069178
Update Readme.md
hunghaoti Dec 27, 2024
7dfabe9
Update Readme.md
hunghaoti Dec 27, 2024
f7368fe
Merge pull request #545 from Cytnx-dev/haoti/fix_gpu_unit_test
hunghaoti Dec 27, 2024
a7bf913
Minor changes and typos in the Readme
manuschneider Dec 27, 2024
df52215
Update dox.md
hunghaoti Dec 30, 2024
b9119bb
Fix all link.
hunghaoti Dec 30, 2024
3028994
Exclude some structure in documentation.
hunghaoti Dec 30, 2024
8ad219c
Fix doxygen documentation
hunghaoti Dec 30, 2024
e97e2f0
bump up version files.
hunghaoti Dec 30, 2024
b51ecc6
Fix random seed to avoid not good initial random state.
hunghaoti Dec 30, 2024
2b5cc06
Fix Clagn format.
hunghaoti Dec 30, 2024
99e76d1
Fix typo.
hunghaoti Dec 30, 2024
e5f0476
Modify Readme as suggestion.
hunghaoti Dec 30, 2024
41e33d4
Merge pull request #549 from Cytnx-dev/haoti/readme_update
hunghaoti Dec 30, 2024
fae0de2
Fix code.
hunghaoti Dec 30, 2024
77662b5
Fix the example of UniTensor as in the Readme file. The original code…
hunghaoti Dec 31, 2024
3f235ee
Fix the path of the logo in doxygen.
hunghaoti Jan 1, 2025
8370a59
Fix typo, Contigouos->contiguous
hunghaoti Jan 1, 2025
7b6cd4e
Fix casting to fit Clang compiler.
hunghaoti Jan 2, 2025
a9d753a
Add macos test build in dev-master branch.
hunghaoti Jan 2, 2025
48f854b
Test enable CMAKE_INTERPROCEDURAL_OPTIMIZATION
hunghaoti Jan 2, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 2 additions & 1 deletion .github/workflows/ci-cmake_pytests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ jobs:
shell: bash -l {0}
run: |
mamba install _openmp_mutex=*=*_llvm cmake make boost git compilers numpy mkl mkl-include mkl-service pybind11 libblas=*=*mkl beartype
mamba install gcovr gtest
python -m pip install gcovr
mamba install gtest

- name: CPU info
shell: bash -l {0}
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/ci-cmake_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ jobs:
shell: bash -l {0}
run: |
mamba install _openmp_mutex=*=*_llvm cmake make boost git compilers numpy mkl mkl-include mkl-service pybind11 libblas=*=*mkl beartype
mamba install gcovr gtest
python -m pip install gcovr
mamba install gtest
mamba install pytest pytest-cov

- name: CPU info
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/conda_build_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
pull_request:
branches:
- master
- dev-master

workflow_dispatch:

Expand Down
61 changes: 16 additions & 45 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

# set(CMAKE_CXX_EXTENSIONS OFF)
message(STATUS " Generator: ${CMAKE_GENERATOR}")
message(STATUS " Build Target: ${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}")
message(STATUS " Installation Prefix: ${CMAKE_INSTALL_PREFIX}")
Expand Down Expand Up @@ -85,7 +84,6 @@ option(BUILD_DOC "Build API docuemntation" OFF)
option(USE_HPTT "Build Cytnx with HPTT" OFF)
option(RUN_TESTS "Run Cytnx tests" OFF)
option(USE_CUTT "Build Cytnx with CUTT" OFF)
option(USE_MAGMA "Build Cytnx with MAGMA (requires CUDA)" ON)
option(USE_CUTENSOR "Build Cytnx with CuTensor (requires CUDA)" ON)
option(USE_CUQUANTUM "Build Cytnx with CUQuantum (requires CUDA)" ON)

Expand All @@ -96,6 +94,10 @@ option(DEV_MODE "Build testing dev_test.cpp with cytnx" OFF)
# #####################################################################
project(CYTNX VERSION ${CYTNX_VERSION} LANGUAGES CXX C)

# C++ uses link-time optimization anyway; this enables additionally -flto=auto,
# for parallel compilation
#set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)

add_library(cytnx STATIC)
set_property(TARGET cytnx PROPERTY C_VISIBILITY_PRESET hidden)
set_property(TARGET cytnx PROPERTY VISIBILITY_INLINES_HIDDEN ON)
Expand All @@ -115,20 +117,9 @@ target_include_directories(cytnx SYSTEM
${Boost_INCLUDE_DIRS}
)

# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wformat=0 -Wno-c++11-narrowing -w")
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wformat=0 -w -fsized-deallocation -fsanitize=address")

target_compile_options(cytnx PUBLIC -Wformat=0 -w -fsized-deallocation)

#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wformat=0 -w -fsized-deallocation -diag-disable=10441")

# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_LIBCPP_DISABLE_AVAILABILITY")
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION")
target_compile_features(cytnx PUBLIC cxx_std_17)

# target_compile_definitions(cytnx PUBLIC _LIBCPP_DISABLE_AVAILABILITY)
# target_compile_definitions(cytnx PUBLIC _LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION)
# set_property(TARGET cytnx PROPERTY CXX_STANDARD 11)
add_subdirectory(src)

if(USE_DEBUG)
Expand All @@ -138,21 +129,14 @@ if(USE_DEBUG)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address")
endif()

if(RUN_TESTS)
enable_testing()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -fprofile-arcs -ftest-coverage")
target_link_libraries(cytnx PUBLIC "-lgcov --coverage")
add_subdirectory(tests)
#add_subdirectory(bm_tests)
endif()

include(GNUInstallDirs)

if(USE_ICPC)
target_compile_definitions(cytnx PUBLIC UNI_ICPC)
# This option is to disable the warning of icpc
target_compile_options(cytnx PUBLIC -diag-disable=10441)
# This option is to maintain consistency of the floating point operation, also try to improve the performance
# This option is to maintain consistency of the floating point operation, also
# try to improve the performance
target_compile_options(cytnx PUBLIC -fp-model consistent -fimf-use-svml)
endif()

Expand Down Expand Up @@ -203,36 +187,24 @@ endif() # Backend torch
# ## Get Gtest & benchmark
# #####################################################################
if(RUN_TESTS)
find_package(GTest REQUIRED)
#find_package(benchmark REQUIRED)


#include(FetchContent)
#FetchContent_Declare(
# googletest
# URL https://github.com/google/googletest/archive/609281088cfefc76f9d0ce82e1ff6c30cc3591e5.zip
#)
# Include CTest explicitly to suppress the error that DartConfiguration.tcl
# is not found
include(CTest)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -fprofile-arcs -ftest-coverage")
target_link_libraries(cytnx PUBLIC "-lgcov --coverage")
# "-fopenmp" flag is appended to CMAKE_CXX_FLAGS in CytnxBKNDCMakeLists.cmake.
# To make the executalbe targets defined under tests/ link OpenMP correctly,
# tests/ must be added after including CytnxBKNDCMakeLists.cmake.
add_subdirectory(tests)
#add_subdirectory(bm_tests)

# For Windows: Prevent overriding the parent project's compiler/linker settings
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)

#FetchContent_Declare(
# googlebenchmark
# GIT_REPOSITORY https://github.com/google/benchmark.git
# GIT_TAG v1.7.1) # need master for benchmark::benchmark
#set(BENCHMARK_ENABLE_TESTING off) # to suppress benchmark internal tests

#FetchContent_MakeAvailable(
# googletest
# googlebenchmark)
endif()

# #######
# ## Python wrapper
# #######
IF(BUILD_PYTHON)
# PythonInterp is removed in newer version of cmake
# find_package(PythonInterp REQUIRED)
find_package (Python COMPONENTS Interpreter Development)
find_package(pybind11 REQUIRED)

Expand Down Expand Up @@ -402,7 +374,6 @@ message(STATUS " CXX Flags: ${CMAKE_CXX_FLAGS}")
message(STATUS " BLAS and LAPACK Libraries: ${LAPACK_LIBRARIES}")
message(STATUS " Link libraries: ${CYTNX_LINK_Libs}")

# # this need to append into the linkflags.tmp
FILE(APPEND "${CMAKE_BINARY_DIR}/linkflags.tmp" "${LAPACK_LIBRARIES}\n" "")
FILE(APPEND "${CMAKE_BINARY_DIR}/cxxflags.tmp" "${CMAKE_CXX_FLAGS}\n" "")

Expand Down
27 changes: 2 additions & 25 deletions CytnxBKNDCMakeLists.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,8 @@ if(USE_CUDA)
include_directories(${install_dir}/include)
message(STATUS "cutt install dir: ${install_dir}")
add_dependencies(cytnx cutt)
set_property(TARGET cytnx PROPERTY CUDA_ARCHITECTURES 52 53 60 61 62 70 72 75 80 86)
# set_property(TARGET cytnx PROPERTY CUDA_ARCHITECTURES 52 53 60 61 62 70 72 75 80 86)
set_property(TARGET cytnx PROPERTY CUDA_ARCHITECTURES native)
target_compile_definitions(cytnx PRIVATE UNI_CUTT)
target_link_libraries(cytnx PUBLIC ${install_dir}/lib/libcutt.a)
# relocate cutt
Expand All @@ -168,26 +169,6 @@ if(USE_CUDA)

endif()

if(USE_MAGMA)
find_package( MAGMA REQUIRED)
if(NOT MAGMA_FOUND)
message(FATAL_ERROR "MAGMA not found!")
endif()
message(STATUS "^^^magma root aft: ${MAGMA_ROOT}")
message(STATUS "^^^magma inc dr: ${MAGMA_INCLUDE_DIRS}")
message(STATUS "^^^magma lib dr: ${MAGMA_LIBRARY_DIRS}")
message(STATUS "^^^magma libs: ${MAGMA_LIBRARIES}")
#add_dependencies(cytnx magma)
target_include_directories(cytnx PRIVATE ${MAGMA_INCLUDE_DIRS})
target_compile_definitions(cytnx PRIVATE UNI_MAGMA)
target_link_libraries(cytnx PUBLIC ${MAGMA_LIBRARIES})

message( STATUS "Build with MAGMA: YES")
FILE(APPEND "${CMAKE_BINARY_DIR}/cxxflags.tmp" "-DUNI_MAGMA\n" "")
FILE(APPEND "${CMAKE_BINARY_DIR}/cxxflags.tmp" "-I${MAGMA_INCLUDE_DIRS}\n" "")
FILE(APPEND "${CMAKE_BINARY_DIR}/linkflags.tmp" "${MAGMA_LIBRARIES} -ldl\n" "") # use > to indicate special rt processing
message( STATUS "MAGMA: libdir:${MAGMA_LIBRARY_DIRS} incdir:${MAGMA_INCLUDE_DIRS} libs:${MAGMA_LIBRARIES}")
endif()

message( STATUS " Build CUDA Support: YES")
message( STATUS " - CUDA Version: ${CUDA_VERSION_STRING}")
Expand Down Expand Up @@ -280,10 +261,6 @@ if(USE_OMP)
else()
message( STATUS " Build OMP Support: NO")

if(USE_MKL)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp")
endif()

if(USE_HPTT)
find_package( OpenMP )
if ( OPENMP_FOUND )
Expand Down
Loading