diff --git a/CMakeLists.txt b/CMakeLists.txt index 7914ecc00a..d4e265adbe 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -167,7 +167,7 @@ set(ABACUS_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/source) set(ABACUS_TEST_DIR ${CMAKE_CURRENT_SOURCE_DIR}/tests) set(ABACUS_BIN_PATH ${CMAKE_CURRENT_BINARY_DIR}/${ABACUS_BIN_NAME}) include_directories(${ABACUS_SOURCE_DIR}) -include_directories(${ABACUS_SOURCE_DIR}/module_base/module_container) +include_directories(${ABACUS_SOURCE_DIR}/source_base/module_container) set(CMAKE_CXX_STANDARD 11) set(CMAKE_CXX_STANDARD_REQUIRED ON) diff --git a/build/source/source_base/CMakeFiles/CMakeDirectoryInformation.cmake b/build/source/source_base/CMakeFiles/CMakeDirectoryInformation.cmake new file mode 100644 index 0000000000..4f5306076f --- /dev/null +++ b/build/source/source_base/CMakeFiles/CMakeDirectoryInformation.cmake @@ -0,0 +1,16 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.27 + +# Relative path conversion top directories. +set(CMAKE_RELATIVE_PATH_TOP_SOURCE "/home/haozhihan/Documents/abacus-develop") +set(CMAKE_RELATIVE_PATH_TOP_BINARY "/home/haozhihan/Documents/abacus-develop/build") + +# Force unix paths in dependencies. +set(CMAKE_FORCE_UNIX_PATHS 1) + + +# The C and CXX include file regular expressions for this directory. +set(CMAKE_C_INCLUDE_REGEX_SCAN "^.*$") +set(CMAKE_C_INCLUDE_REGEX_COMPLAIN "^$") +set(CMAKE_CXX_INCLUDE_REGEX_SCAN ${CMAKE_C_INCLUDE_REGEX_SCAN}) +set(CMAKE_CXX_INCLUDE_REGEX_COMPLAIN ${CMAKE_C_INCLUDE_REGEX_COMPLAIN}) diff --git a/build/source/source_base/CMakeFiles/base.dir/DependInfo.cmake b/build/source/source_base/CMakeFiles/base.dir/DependInfo.cmake new file mode 100644 index 0000000000..748c285987 --- /dev/null +++ b/build/source/source_base/CMakeFiles/base.dir/DependInfo.cmake @@ -0,0 +1,73 @@ + +# Consider dependencies only in project. +set(CMAKE_DEPENDS_IN_PROJECT_ONLY OFF) + +# The set of languages for which implicit dependencies are needed: +set(CMAKE_DEPENDS_LANGUAGES + ) + +# The set of dependency files which are needed: +set(CMAKE_DEPENDS_DEPENDENCY_FILES + "/home/haozhihan/Documents/abacus-develop/source/source_base/abfs-vector3_order.cpp" "source/source_base/CMakeFiles/base.dir/abfs-vector3_order.cpp.o" "gcc" "source/source_base/CMakeFiles/base.dir/abfs-vector3_order.cpp.o.d" + "/home/haozhihan/Documents/abacus-develop/source/source_base/assoc_laguerre.cpp" "source/source_base/CMakeFiles/base.dir/assoc_laguerre.cpp.o" "gcc" "source/source_base/CMakeFiles/base.dir/assoc_laguerre.cpp.o.d" + "/home/haozhihan/Documents/abacus-develop/source/source_base/blas_connector_base.cpp" "source/source_base/CMakeFiles/base.dir/blas_connector_base.cpp.o" "gcc" "source/source_base/CMakeFiles/base.dir/blas_connector_base.cpp.o.d" + "/home/haozhihan/Documents/abacus-develop/source/source_base/blas_connector_matrix.cpp" "source/source_base/CMakeFiles/base.dir/blas_connector_matrix.cpp.o" "gcc" "source/source_base/CMakeFiles/base.dir/blas_connector_matrix.cpp.o.d" + "/home/haozhihan/Documents/abacus-develop/source/source_base/blas_connector_vector.cpp" "source/source_base/CMakeFiles/base.dir/blas_connector_vector.cpp.o" "gcc" "source/source_base/CMakeFiles/base.dir/blas_connector_vector.cpp.o.d" + "/home/haozhihan/Documents/abacus-develop/source/source_base/clebsch_gordan_coeff.cpp" "source/source_base/CMakeFiles/base.dir/clebsch_gordan_coeff.cpp.o" "gcc" "source/source_base/CMakeFiles/base.dir/clebsch_gordan_coeff.cpp.o.d" + "/home/haozhihan/Documents/abacus-develop/source/source_base/complexarray.cpp" "source/source_base/CMakeFiles/base.dir/complexarray.cpp.o" "gcc" "source/source_base/CMakeFiles/base.dir/complexarray.cpp.o.d" + "/home/haozhihan/Documents/abacus-develop/source/source_base/complexmatrix.cpp" "source/source_base/CMakeFiles/base.dir/complexmatrix.cpp.o" "gcc" "source/source_base/CMakeFiles/base.dir/complexmatrix.cpp.o.d" + "/home/haozhihan/Documents/abacus-develop/source/source_base/cubic_spline.cpp" "source/source_base/CMakeFiles/base.dir/cubic_spline.cpp.o" "gcc" "source/source_base/CMakeFiles/base.dir/cubic_spline.cpp.o.d" + "/home/haozhihan/Documents/abacus-develop/source/source_base/element_basis_index.cpp" "source/source_base/CMakeFiles/base.dir/element_basis_index.cpp.o" "gcc" "source/source_base/CMakeFiles/base.dir/element_basis_index.cpp.o.d" + "/home/haozhihan/Documents/abacus-develop/source/source_base/export.cpp" "source/source_base/CMakeFiles/base.dir/export.cpp.o" "gcc" "source/source_base/CMakeFiles/base.dir/export.cpp.o.d" + "/home/haozhihan/Documents/abacus-develop/source/source_base/gather_math_lib_info.cpp" "source/source_base/CMakeFiles/base.dir/gather_math_lib_info.cpp.o" "gcc" "source/source_base/CMakeFiles/base.dir/gather_math_lib_info.cpp.o.d" + "/home/haozhihan/Documents/abacus-develop/source/source_base/global_file.cpp" "source/source_base/CMakeFiles/base.dir/global_file.cpp.o" "gcc" "source/source_base/CMakeFiles/base.dir/global_file.cpp.o.d" + "/home/haozhihan/Documents/abacus-develop/source/source_base/global_function.cpp" "source/source_base/CMakeFiles/base.dir/global_function.cpp.o" "gcc" "source/source_base/CMakeFiles/base.dir/global_function.cpp.o.d" + "/home/haozhihan/Documents/abacus-develop/source/source_base/global_function_ddotreal.cpp" "source/source_base/CMakeFiles/base.dir/global_function_ddotreal.cpp.o" "gcc" "source/source_base/CMakeFiles/base.dir/global_function_ddotreal.cpp.o.d" + "/home/haozhihan/Documents/abacus-develop/source/source_base/global_variable.cpp" "source/source_base/CMakeFiles/base.dir/global_variable.cpp.o" "gcc" "source/source_base/CMakeFiles/base.dir/global_variable.cpp.o.d" + "/home/haozhihan/Documents/abacus-develop/source/source_base/intarray.cpp" "source/source_base/CMakeFiles/base.dir/intarray.cpp.o" "gcc" "source/source_base/CMakeFiles/base.dir/intarray.cpp.o.d" + "/home/haozhihan/Documents/abacus-develop/source/source_base/inverse_matrix.cpp" "source/source_base/CMakeFiles/base.dir/inverse_matrix.cpp.o" "gcc" "source/source_base/CMakeFiles/base.dir/inverse_matrix.cpp.o.d" + "/home/haozhihan/Documents/abacus-develop/source/source_base/math_bspline.cpp" "source/source_base/CMakeFiles/base.dir/math_bspline.cpp.o" "gcc" "source/source_base/CMakeFiles/base.dir/math_bspline.cpp.o.d" + "/home/haozhihan/Documents/abacus-develop/source/source_base/math_chebyshev.cpp" "source/source_base/CMakeFiles/base.dir/math_chebyshev.cpp.o" "gcc" "source/source_base/CMakeFiles/base.dir/math_chebyshev.cpp.o.d" + "/home/haozhihan/Documents/abacus-develop/source/source_base/math_erf_complex.cpp" "source/source_base/CMakeFiles/base.dir/math_erf_complex.cpp.o" "gcc" "source/source_base/CMakeFiles/base.dir/math_erf_complex.cpp.o.d" + "/home/haozhihan/Documents/abacus-develop/source/source_base/math_integral.cpp" "source/source_base/CMakeFiles/base.dir/math_integral.cpp.o" "gcc" "source/source_base/CMakeFiles/base.dir/math_integral.cpp.o.d" + "/home/haozhihan/Documents/abacus-develop/source/source_base/math_lebedev_laikov.cpp" "source/source_base/CMakeFiles/base.dir/math_lebedev_laikov.cpp.o" "gcc" "source/source_base/CMakeFiles/base.dir/math_lebedev_laikov.cpp.o.d" + "/home/haozhihan/Documents/abacus-develop/source/source_base/math_polyint.cpp" "source/source_base/CMakeFiles/base.dir/math_polyint.cpp.o" "gcc" "source/source_base/CMakeFiles/base.dir/math_polyint.cpp.o.d" + "/home/haozhihan/Documents/abacus-develop/source/source_base/math_sphbes.cpp" "source/source_base/CMakeFiles/base.dir/math_sphbes.cpp.o" "gcc" "source/source_base/CMakeFiles/base.dir/math_sphbes.cpp.o.d" + "/home/haozhihan/Documents/abacus-develop/source/source_base/math_ylmreal.cpp" "source/source_base/CMakeFiles/base.dir/math_ylmreal.cpp.o" "gcc" "source/source_base/CMakeFiles/base.dir/math_ylmreal.cpp.o.d" + "/home/haozhihan/Documents/abacus-develop/source/source_base/mathzone_add1.cpp" "source/source_base/CMakeFiles/base.dir/mathzone_add1.cpp.o" "gcc" "source/source_base/CMakeFiles/base.dir/mathzone_add1.cpp.o.d" + "/home/haozhihan/Documents/abacus-develop/source/source_base/matrix.cpp" "source/source_base/CMakeFiles/base.dir/matrix.cpp.o" "gcc" "source/source_base/CMakeFiles/base.dir/matrix.cpp.o.d" + "/home/haozhihan/Documents/abacus-develop/source/source_base/matrix3.cpp" "source/source_base/CMakeFiles/base.dir/matrix3.cpp.o" "gcc" "source/source_base/CMakeFiles/base.dir/matrix3.cpp.o.d" + "/home/haozhihan/Documents/abacus-develop/source/source_base/memory.cpp" "source/source_base/CMakeFiles/base.dir/memory.cpp.o" "gcc" "source/source_base/CMakeFiles/base.dir/memory.cpp.o.d" + "/home/haozhihan/Documents/abacus-develop/source/source_base/module_mixing/broyden_mixing.cpp" "source/source_base/CMakeFiles/base.dir/module_mixing/broyden_mixing.cpp.o" "gcc" "source/source_base/CMakeFiles/base.dir/module_mixing/broyden_mixing.cpp.o.d" + "/home/haozhihan/Documents/abacus-develop/source/source_base/module_mixing/mixing.cpp" "source/source_base/CMakeFiles/base.dir/module_mixing/mixing.cpp.o" "gcc" "source/source_base/CMakeFiles/base.dir/module_mixing/mixing.cpp.o.d" + "/home/haozhihan/Documents/abacus-develop/source/source_base/module_mixing/mixing_data.cpp" "source/source_base/CMakeFiles/base.dir/module_mixing/mixing_data.cpp.o" "gcc" "source/source_base/CMakeFiles/base.dir/module_mixing/mixing_data.cpp.o.d" + "/home/haozhihan/Documents/abacus-develop/source/source_base/module_mixing/plain_mixing.cpp" "source/source_base/CMakeFiles/base.dir/module_mixing/plain_mixing.cpp.o" "gcc" "source/source_base/CMakeFiles/base.dir/module_mixing/plain_mixing.cpp.o.d" + "/home/haozhihan/Documents/abacus-develop/source/source_base/module_mixing/pulay_mixing.cpp" "source/source_base/CMakeFiles/base.dir/module_mixing/pulay_mixing.cpp.o" "gcc" "source/source_base/CMakeFiles/base.dir/module_mixing/pulay_mixing.cpp.o.d" + "/home/haozhihan/Documents/abacus-develop/source/source_base/mymath.cpp" "source/source_base/CMakeFiles/base.dir/mymath.cpp.o" "gcc" "source/source_base/CMakeFiles/base.dir/mymath.cpp.o.d" + "/home/haozhihan/Documents/abacus-develop/source/source_base/opt_CG.cpp" "source/source_base/CMakeFiles/base.dir/opt_CG.cpp.o" "gcc" "source/source_base/CMakeFiles/base.dir/opt_CG.cpp.o.d" + "/home/haozhihan/Documents/abacus-develop/source/source_base/opt_DCsrch.cpp" "source/source_base/CMakeFiles/base.dir/opt_DCsrch.cpp.o" "gcc" "source/source_base/CMakeFiles/base.dir/opt_DCsrch.cpp.o.d" + "/home/haozhihan/Documents/abacus-develop/source/source_base/para_gemm.cpp" "source/source_base/CMakeFiles/base.dir/para_gemm.cpp.o" "gcc" "source/source_base/CMakeFiles/base.dir/para_gemm.cpp.o.d" + "/home/haozhihan/Documents/abacus-develop/source/source_base/parallel_2d.cpp" "source/source_base/CMakeFiles/base.dir/parallel_2d.cpp.o" "gcc" "source/source_base/CMakeFiles/base.dir/parallel_2d.cpp.o.d" + "/home/haozhihan/Documents/abacus-develop/source/source_base/parallel_comm.cpp" "source/source_base/CMakeFiles/base.dir/parallel_comm.cpp.o" "gcc" "source/source_base/CMakeFiles/base.dir/parallel_comm.cpp.o.d" + "/home/haozhihan/Documents/abacus-develop/source/source_base/parallel_common.cpp" "source/source_base/CMakeFiles/base.dir/parallel_common.cpp.o" "gcc" "source/source_base/CMakeFiles/base.dir/parallel_common.cpp.o.d" + "/home/haozhihan/Documents/abacus-develop/source/source_base/parallel_device.cpp" "source/source_base/CMakeFiles/base.dir/parallel_device.cpp.o" "gcc" "source/source_base/CMakeFiles/base.dir/parallel_device.cpp.o.d" + "/home/haozhihan/Documents/abacus-develop/source/source_base/parallel_global.cpp" "source/source_base/CMakeFiles/base.dir/parallel_global.cpp.o" "gcc" "source/source_base/CMakeFiles/base.dir/parallel_global.cpp.o.d" + "/home/haozhihan/Documents/abacus-develop/source/source_base/parallel_reduce.cpp" "source/source_base/CMakeFiles/base.dir/parallel_reduce.cpp.o" "gcc" "source/source_base/CMakeFiles/base.dir/parallel_reduce.cpp.o.d" + "/home/haozhihan/Documents/abacus-develop/source/source_base/projgen.cpp" "source/source_base/CMakeFiles/base.dir/projgen.cpp.o" "gcc" "source/source_base/CMakeFiles/base.dir/projgen.cpp.o.d" + "/home/haozhihan/Documents/abacus-develop/source/source_base/realarray.cpp" "source/source_base/CMakeFiles/base.dir/realarray.cpp.o" "gcc" "source/source_base/CMakeFiles/base.dir/realarray.cpp.o.d" + "/home/haozhihan/Documents/abacus-develop/source/source_base/sph_bessel_recursive-d1.cpp" "source/source_base/CMakeFiles/base.dir/sph_bessel_recursive-d1.cpp.o" "gcc" "source/source_base/CMakeFiles/base.dir/sph_bessel_recursive-d1.cpp.o.d" + "/home/haozhihan/Documents/abacus-develop/source/source_base/sph_bessel_recursive-d2.cpp" "source/source_base/CMakeFiles/base.dir/sph_bessel_recursive-d2.cpp.o" "gcc" "source/source_base/CMakeFiles/base.dir/sph_bessel_recursive-d2.cpp.o.d" + "/home/haozhihan/Documents/abacus-develop/source/source_base/spherical_bessel_transformer.cpp" "source/source_base/CMakeFiles/base.dir/spherical_bessel_transformer.cpp.o" "gcc" "source/source_base/CMakeFiles/base.dir/spherical_bessel_transformer.cpp.o.d" + "/home/haozhihan/Documents/abacus-develop/source/source_base/timer.cpp" "source/source_base/CMakeFiles/base.dir/timer.cpp.o" "gcc" "source/source_base/CMakeFiles/base.dir/timer.cpp.o.d" + "/home/haozhihan/Documents/abacus-develop/source/source_base/tool_check.cpp" "source/source_base/CMakeFiles/base.dir/tool_check.cpp.o" "gcc" "source/source_base/CMakeFiles/base.dir/tool_check.cpp.o.d" + "/home/haozhihan/Documents/abacus-develop/source/source_base/tool_quit.cpp" "source/source_base/CMakeFiles/base.dir/tool_quit.cpp.o" "gcc" "source/source_base/CMakeFiles/base.dir/tool_quit.cpp.o.d" + "/home/haozhihan/Documents/abacus-develop/source/source_base/tool_title.cpp" "source/source_base/CMakeFiles/base.dir/tool_title.cpp.o" "gcc" "source/source_base/CMakeFiles/base.dir/tool_title.cpp.o.d" + "/home/haozhihan/Documents/abacus-develop/source/source_base/ylm.cpp" "source/source_base/CMakeFiles/base.dir/ylm.cpp.o" "gcc" "source/source_base/CMakeFiles/base.dir/ylm.cpp.o.d" + ) + +# Targets to which this target links which contain Fortran sources. +set(CMAKE_Fortran_TARGET_LINKED_INFO_FILES + ) + +# Fortran module output directory. +set(CMAKE_Fortran_TARGET_MODULE_DIR "") diff --git a/build/source/source_base/CMakeFiles/base.dir/abfs-vector3_order.cpp.o b/build/source/source_base/CMakeFiles/base.dir/abfs-vector3_order.cpp.o new file mode 100644 index 0000000000..66a731b61f Binary files /dev/null and b/build/source/source_base/CMakeFiles/base.dir/abfs-vector3_order.cpp.o differ diff --git a/build/source/source_base/CMakeFiles/base.dir/abfs-vector3_order.cpp.o.d b/build/source/source_base/CMakeFiles/base.dir/abfs-vector3_order.cpp.o.d new file mode 100644 index 0000000000..5757fed2ad --- /dev/null +++ b/build/source/source_base/CMakeFiles/base.dir/abfs-vector3_order.cpp.o.d @@ -0,0 +1,235 @@ +source/source_base/CMakeFiles/base.dir/abfs-vector3_order.cpp.o: \ + /home/haozhihan/Documents/abacus-develop/source/source_base/abfs-vector3_order.cpp \ + /usr/include/stdc-predef.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/abfs-vector3_order.h \ + /home/haozhihan/Documents/abacus-develop/source/module_ri/abfs.h \ + /home/haozhihan/Documents/abacus-develop/source/module_ri/../source_base/vector3.h \ + /usr/include/c++/11/cmath \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++config.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/os_defines.h \ + /usr/include/features.h /usr/include/features-time64.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/cpu_defines.h \ + /usr/include/c++/11/bits/cpp_type_traits.h \ + /usr/include/c++/11/ext/type_traits.h /usr/include/math.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/math-vector.h \ + /usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h \ + /usr/include/x86_64-linux-gnu/bits/flt-eval-method.h \ + /usr/include/x86_64-linux-gnu/bits/fp-logb.h \ + /usr/include/x86_64-linux-gnu/bits/fp-fast.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-narrow.h \ + /usr/include/x86_64-linux-gnu/bits/iscanonical.h \ + /usr/include/c++/11/bits/std_abs.h /usr/include/stdlib.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h \ + /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/atomic_wide_counter.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h /usr/include/c++/11/iomanip \ + /usr/include/c++/11/iosfwd /usr/include/c++/11/bits/stringfwd.h \ + /usr/include/c++/11/bits/memoryfwd.h /usr/include/c++/11/bits/postypes.h \ + /usr/include/c++/11/cwchar /usr/include/wchar.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/wchar.h \ + /usr/include/x86_64-linux-gnu/bits/types/wint_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/wchar2.h \ + /usr/include/c++/11/bits/ios_base.h /usr/include/c++/11/ext/atomicity.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr-default.h \ + /usr/include/pthread.h /usr/include/sched.h \ + /usr/include/x86_64-linux-gnu/bits/sched.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h \ + /usr/include/x86_64-linux-gnu/bits/cpu-set.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/timex.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h \ + /usr/include/x86_64-linux-gnu/bits/setjmp.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct___jmp_buf_tag.h \ + /usr/include/x86_64-linux-gnu/bits/pthread_stack_min-dynamic.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/atomic_word.h \ + /usr/include/x86_64-linux-gnu/sys/single_threaded.h \ + /usr/include/c++/11/bits/localefwd.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++locale.h \ + /usr/include/c++/11/clocale /usr/include/locale.h \ + /usr/include/x86_64-linux-gnu/bits/locale.h /usr/include/c++/11/cctype \ + /usr/include/ctype.h /usr/include/c++/11/bits/locale_classes.h \ + /usr/include/c++/11/string /usr/include/c++/11/bits/char_traits.h \ + /usr/include/c++/11/bits/stl_algobase.h \ + /usr/include/c++/11/bits/functexcept.h \ + /usr/include/c++/11/bits/exception_defines.h \ + /usr/include/c++/11/ext/numeric_traits.h \ + /usr/include/c++/11/bits/stl_pair.h /usr/include/c++/11/bits/move.h \ + /usr/include/c++/11/type_traits \ + /usr/include/c++/11/bits/stl_iterator_base_types.h \ + /usr/include/c++/11/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/11/bits/concept_check.h \ + /usr/include/c++/11/debug/assertions.h \ + /usr/include/c++/11/bits/stl_iterator.h \ + /usr/include/c++/11/bits/ptr_traits.h /usr/include/c++/11/debug/debug.h \ + /usr/include/c++/11/bits/predefined_ops.h /usr/include/c++/11/cstdint \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdint.h /usr/include/stdint.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-uintn.h \ + /usr/include/c++/11/bits/allocator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++allocator.h \ + /usr/include/c++/11/ext/new_allocator.h /usr/include/c++/11/new \ + /usr/include/c++/11/bits/exception.h \ + /usr/include/c++/11/bits/ostream_insert.h \ + /usr/include/c++/11/bits/cxxabi_forced.h \ + /usr/include/c++/11/bits/stl_function.h \ + /usr/include/c++/11/backward/binders.h \ + /usr/include/c++/11/bits/range_access.h \ + /usr/include/c++/11/initializer_list \ + /usr/include/c++/11/bits/basic_string.h \ + /usr/include/c++/11/ext/alloc_traits.h \ + /usr/include/c++/11/bits/alloc_traits.h \ + /usr/include/c++/11/bits/stl_construct.h \ + /usr/include/c++/11/ext/string_conversions.h /usr/include/c++/11/cstdlib \ + /usr/include/c++/11/cstdio /usr/include/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/c++/11/cerrno \ + /usr/include/errno.h /usr/include/x86_64-linux-gnu/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/bits/types/error_t.h \ + /usr/include/c++/11/bits/charconv.h \ + /usr/include/c++/11/bits/functional_hash.h \ + /usr/include/c++/11/bits/hash_bytes.h \ + /usr/include/c++/11/bits/basic_string.tcc \ + /usr/include/c++/11/bits/locale_classes.tcc \ + /usr/include/c++/11/system_error \ + /usr/include/x86_64-linux-gnu/c++/11/bits/error_constants.h \ + /usr/include/c++/11/stdexcept /usr/include/c++/11/exception \ + /usr/include/c++/11/bits/exception_ptr.h \ + /usr/include/c++/11/bits/cxxabi_init_exception.h \ + /usr/include/c++/11/typeinfo /usr/include/c++/11/bits/nested_exception.h \ + /usr/include/c++/11/locale /usr/include/c++/11/bits/locale_facets.h \ + /usr/include/c++/11/cwctype /usr/include/wctype.h \ + /usr/include/x86_64-linux-gnu/bits/wctype-wchar.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_base.h \ + /usr/include/c++/11/streambuf /usr/include/c++/11/bits/streambuf.tcc \ + /usr/include/c++/11/bits/streambuf_iterator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_inline.h \ + /usr/include/c++/11/bits/locale_facets.tcc \ + /usr/include/c++/11/bits/locale_facets_nonio.h /usr/include/c++/11/ctime \ + /usr/include/x86_64-linux-gnu/c++/11/bits/time_members.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/messages_members.h \ + /usr/include/libintl.h /usr/include/c++/11/bits/codecvt.h \ + /usr/include/c++/11/bits/locale_facets_nonio.tcc \ + /usr/include/c++/11/bits/locale_conv.h \ + /usr/include/c++/11/bits/unique_ptr.h /usr/include/c++/11/utility \ + /usr/include/c++/11/bits/stl_relops.h /usr/include/c++/11/tuple \ + /usr/include/c++/11/array /usr/include/c++/11/bits/uses_allocator.h \ + /usr/include/c++/11/bits/invoke.h /usr/include/c++/11/iostream \ + /usr/include/c++/11/ostream /usr/include/c++/11/ios \ + /usr/include/c++/11/bits/basic_ios.h \ + /usr/include/c++/11/bits/basic_ios.tcc \ + /usr/include/c++/11/bits/ostream.tcc /usr/include/c++/11/istream \ + /usr/include/c++/11/bits/istream.tcc \ + /home/haozhihan/Documents/abacus-develop/source/module_ri/../source_base/matrix.h \ + /usr/include/c++/11/cassert /usr/include/assert.h \ + /usr/include/c++/11/fstream \ + /usr/include/x86_64-linux-gnu/c++/11/bits/basic_file.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++io.h \ + /usr/include/c++/11/bits/fstream.tcc \ + /home/haozhihan/Documents/abacus-develop/source/module_ri/exx_abfs.h \ + /usr/include/c++/11/vector /usr/include/c++/11/bits/stl_uninitialized.h \ + /usr/include/c++/11/bits/stl_vector.h \ + /usr/include/c++/11/bits/stl_bvector.h \ + /usr/include/c++/11/bits/vector.tcc /usr/include/c++/11/map \ + /usr/include/c++/11/bits/stl_tree.h \ + /usr/include/c++/11/ext/aligned_buffer.h \ + /usr/include/c++/11/bits/stl_map.h \ + /usr/include/c++/11/bits/stl_multimap.h \ + /usr/include/c++/11/bits/erase_if.h \ + /home/haozhihan/Documents/abacus-develop/source/module_ri/../module_basis/module_ao/ORB_atomic_lm.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/global_function.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/blas_connector.h \ + /usr/include/c++/11/complex /usr/include/c++/11/sstream \ + /usr/include/c++/11/bits/sstream.tcc \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_device/types.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/macros.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/global_function-func_each_2.h \ + /usr/include/c++/11/functional /usr/include/c++/11/bits/refwrap.h \ + /usr/include/c++/11/bits/std_function.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/global_variable.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/tool_check.h \ + /usr/include/c++/11/valarray /usr/include/c++/11/algorithm \ + /usr/include/c++/11/bits/stl_algo.h \ + /usr/include/c++/11/bits/algorithmfwd.h \ + /usr/include/c++/11/bits/stl_heap.h \ + /usr/include/c++/11/bits/stl_tempbuf.h \ + /usr/include/c++/11/bits/uniform_int_dist.h \ + /usr/include/c++/11/bits/valarray_array.h \ + /usr/include/c++/11/bits/valarray_array.tcc \ + /usr/include/c++/11/bits/valarray_before.h \ + /usr/include/c++/11/bits/slice_array.h \ + /usr/include/c++/11/bits/valarray_after.h \ + /usr/include/c++/11/bits/gslice.h \ + /usr/include/c++/11/bits/gslice_array.h \ + /usr/include/c++/11/bits/mask_array.h \ + /usr/include/c++/11/bits/indirect_array.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/tool_quit.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/tool_title.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/global_variable.h \ + /home/haozhihan/Documents/abacus-develop/source/module_ri/../source_base/element_basis_index.h \ + /usr/include/c++/11/cstddef /usr/include/c++/11/set \ + /usr/include/c++/11/bits/stl_set.h \ + /usr/include/c++/11/bits/stl_multiset.h /usr/include/c++/11/memory \ + /usr/include/c++/11/bits/stl_raw_storage_iter.h \ + /usr/include/c++/11/bits/align.h /usr/include/c++/11/bit \ + /usr/include/c++/11/bits/shared_ptr.h \ + /usr/include/c++/11/bits/shared_ptr_base.h \ + /usr/include/c++/11/bits/allocated_ptr.h \ + /usr/include/c++/11/ext/concurrence.h \ + /usr/include/c++/11/bits/shared_ptr_atomic.h \ + /usr/include/c++/11/bits/atomic_base.h \ + /usr/include/c++/11/bits/atomic_lockfree_defines.h \ + /usr/include/c++/11/backward/auto_ptr.h diff --git a/build/source/source_base/CMakeFiles/base.dir/assoc_laguerre.cpp.o b/build/source/source_base/CMakeFiles/base.dir/assoc_laguerre.cpp.o new file mode 100644 index 0000000000..afb78a4e8f Binary files /dev/null and b/build/source/source_base/CMakeFiles/base.dir/assoc_laguerre.cpp.o differ diff --git a/build/source/source_base/CMakeFiles/base.dir/assoc_laguerre.cpp.o.d b/build/source/source_base/CMakeFiles/base.dir/assoc_laguerre.cpp.o.d new file mode 100644 index 0000000000..ea5b0d2c11 --- /dev/null +++ b/build/source/source_base/CMakeFiles/base.dir/assoc_laguerre.cpp.o.d @@ -0,0 +1,216 @@ +source/source_base/CMakeFiles/base.dir/assoc_laguerre.cpp.o: \ + /home/haozhihan/Documents/abacus-develop/source/source_base/assoc_laguerre.cpp \ + /usr/include/stdc-predef.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/assoc_laguerre.h \ + /usr/include/c++/11/vector /usr/include/c++/11/bits/stl_algobase.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++config.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/os_defines.h \ + /usr/include/features.h /usr/include/features-time64.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/cpu_defines.h \ + /usr/include/c++/11/bits/functexcept.h \ + /usr/include/c++/11/bits/exception_defines.h \ + /usr/include/c++/11/bits/cpp_type_traits.h \ + /usr/include/c++/11/ext/type_traits.h \ + /usr/include/c++/11/ext/numeric_traits.h \ + /usr/include/c++/11/bits/stl_pair.h /usr/include/c++/11/bits/move.h \ + /usr/include/c++/11/type_traits \ + /usr/include/c++/11/bits/stl_iterator_base_types.h \ + /usr/include/c++/11/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/11/bits/concept_check.h \ + /usr/include/c++/11/debug/assertions.h \ + /usr/include/c++/11/bits/stl_iterator.h \ + /usr/include/c++/11/bits/ptr_traits.h /usr/include/c++/11/debug/debug.h \ + /usr/include/c++/11/bits/predefined_ops.h \ + /usr/include/c++/11/bits/allocator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++allocator.h \ + /usr/include/c++/11/ext/new_allocator.h /usr/include/c++/11/new \ + /usr/include/c++/11/bits/exception.h \ + /usr/include/c++/11/bits/memoryfwd.h \ + /usr/include/c++/11/bits/stl_construct.h \ + /usr/include/c++/11/bits/stl_uninitialized.h \ + /usr/include/c++/11/ext/alloc_traits.h \ + /usr/include/c++/11/bits/alloc_traits.h \ + /usr/include/c++/11/bits/stl_vector.h \ + /usr/include/c++/11/initializer_list \ + /usr/include/c++/11/bits/stl_bvector.h \ + /usr/include/c++/11/bits/functional_hash.h \ + /usr/include/c++/11/bits/hash_bytes.h \ + /usr/include/c++/11/bits/range_access.h \ + /usr/include/c++/11/bits/vector.tcc /usr/include/c++/11/string \ + /usr/include/c++/11/bits/stringfwd.h \ + /usr/include/c++/11/bits/char_traits.h \ + /usr/include/c++/11/bits/postypes.h /usr/include/c++/11/cwchar \ + /usr/include/wchar.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/wchar.h \ + /usr/include/x86_64-linux-gnu/bits/types/wint_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/wchar2.h /usr/include/c++/11/cstdint \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdint.h /usr/include/stdint.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-uintn.h \ + /usr/include/c++/11/bits/localefwd.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++locale.h \ + /usr/include/c++/11/clocale /usr/include/locale.h \ + /usr/include/x86_64-linux-gnu/bits/locale.h /usr/include/c++/11/iosfwd \ + /usr/include/c++/11/cctype /usr/include/ctype.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/c++/11/bits/ostream_insert.h \ + /usr/include/c++/11/bits/cxxabi_forced.h \ + /usr/include/c++/11/bits/stl_function.h \ + /usr/include/c++/11/backward/binders.h \ + /usr/include/c++/11/bits/basic_string.h \ + /usr/include/c++/11/ext/atomicity.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr-default.h \ + /usr/include/pthread.h /usr/include/sched.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/sched.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h \ + /usr/include/x86_64-linux-gnu/bits/cpu-set.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/timex.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/atomic_wide_counter.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h \ + /usr/include/x86_64-linux-gnu/bits/setjmp.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct___jmp_buf_tag.h \ + /usr/include/x86_64-linux-gnu/bits/pthread_stack_min-dynamic.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/atomic_word.h \ + /usr/include/x86_64-linux-gnu/sys/single_threaded.h \ + /usr/include/c++/11/ext/string_conversions.h /usr/include/c++/11/cstdlib \ + /usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/sys/types.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/include/c++/11/bits/std_abs.h /usr/include/c++/11/cstdio \ + /usr/include/stdio.h /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/c++/11/cerrno \ + /usr/include/errno.h /usr/include/x86_64-linux-gnu/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/bits/types/error_t.h \ + /usr/include/c++/11/bits/charconv.h \ + /usr/include/c++/11/bits/basic_string.tcc \ + /home/haozhihan/Documents/abacus-develop/source/source_base/global_function.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/blas_connector.h \ + /usr/include/c++/11/complex /usr/include/c++/11/cmath \ + /usr/include/math.h /usr/include/x86_64-linux-gnu/bits/math-vector.h \ + /usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h \ + /usr/include/x86_64-linux-gnu/bits/flt-eval-method.h \ + /usr/include/x86_64-linux-gnu/bits/fp-logb.h \ + /usr/include/x86_64-linux-gnu/bits/fp-fast.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-narrow.h \ + /usr/include/x86_64-linux-gnu/bits/iscanonical.h \ + /usr/include/c++/11/sstream /usr/include/c++/11/istream \ + /usr/include/c++/11/ios /usr/include/c++/11/exception \ + /usr/include/c++/11/bits/exception_ptr.h \ + /usr/include/c++/11/bits/cxxabi_init_exception.h \ + /usr/include/c++/11/typeinfo /usr/include/c++/11/bits/nested_exception.h \ + /usr/include/c++/11/bits/ios_base.h \ + /usr/include/c++/11/bits/locale_classes.h \ + /usr/include/c++/11/bits/locale_classes.tcc \ + /usr/include/c++/11/system_error \ + /usr/include/x86_64-linux-gnu/c++/11/bits/error_constants.h \ + /usr/include/c++/11/stdexcept /usr/include/c++/11/streambuf \ + /usr/include/c++/11/bits/streambuf.tcc \ + /usr/include/c++/11/bits/basic_ios.h \ + /usr/include/c++/11/bits/locale_facets.h /usr/include/c++/11/cwctype \ + /usr/include/wctype.h /usr/include/x86_64-linux-gnu/bits/wctype-wchar.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_base.h \ + /usr/include/c++/11/bits/streambuf_iterator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_inline.h \ + /usr/include/c++/11/bits/locale_facets.tcc \ + /usr/include/c++/11/bits/basic_ios.tcc /usr/include/c++/11/ostream \ + /usr/include/c++/11/bits/ostream.tcc \ + /usr/include/c++/11/bits/istream.tcc \ + /usr/include/c++/11/bits/sstream.tcc \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_device/types.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/macros.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/global_function-func_each_2.h \ + /usr/include/c++/11/functional /usr/include/c++/11/tuple \ + /usr/include/c++/11/utility /usr/include/c++/11/bits/stl_relops.h \ + /usr/include/c++/11/array /usr/include/c++/11/bits/uses_allocator.h \ + /usr/include/c++/11/bits/invoke.h /usr/include/c++/11/bits/refwrap.h \ + /usr/include/c++/11/bits/std_function.h /usr/include/c++/11/map \ + /usr/include/c++/11/bits/stl_tree.h \ + /usr/include/c++/11/ext/aligned_buffer.h \ + /usr/include/c++/11/bits/stl_map.h \ + /usr/include/c++/11/bits/stl_multimap.h \ + /usr/include/c++/11/bits/erase_if.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/global_variable.h \ + /usr/include/c++/11/fstream /usr/include/c++/11/bits/codecvt.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/basic_file.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++io.h \ + /usr/include/c++/11/bits/fstream.tcc /usr/include/c++/11/iomanip \ + /usr/include/c++/11/locale \ + /usr/include/c++/11/bits/locale_facets_nonio.h /usr/include/c++/11/ctime \ + /usr/include/x86_64-linux-gnu/c++/11/bits/time_members.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/messages_members.h \ + /usr/include/libintl.h /usr/include/c++/11/bits/locale_facets_nonio.tcc \ + /usr/include/c++/11/bits/locale_conv.h \ + /usr/include/c++/11/bits/unique_ptr.h /usr/include/c++/11/iostream \ + /home/haozhihan/Documents/abacus-develop/source/source_base/tool_check.h \ + /usr/include/c++/11/cassert /usr/include/assert.h \ + /usr/include/c++/11/valarray /usr/include/c++/11/algorithm \ + /usr/include/c++/11/bits/stl_algo.h \ + /usr/include/c++/11/bits/algorithmfwd.h \ + /usr/include/c++/11/bits/stl_heap.h \ + /usr/include/c++/11/bits/stl_tempbuf.h \ + /usr/include/c++/11/bits/uniform_int_dist.h \ + /usr/include/c++/11/bits/valarray_array.h \ + /usr/include/c++/11/bits/valarray_array.tcc \ + /usr/include/c++/11/bits/valarray_before.h \ + /usr/include/c++/11/bits/slice_array.h \ + /usr/include/c++/11/bits/valarray_after.h \ + /usr/include/c++/11/bits/gslice.h \ + /usr/include/c++/11/bits/gslice_array.h \ + /usr/include/c++/11/bits/mask_array.h \ + /usr/include/c++/11/bits/indirect_array.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/tool_quit.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/tool_title.h diff --git a/build/source/source_base/CMakeFiles/base.dir/blas_connector_base.cpp.o b/build/source/source_base/CMakeFiles/base.dir/blas_connector_base.cpp.o new file mode 100644 index 0000000000..39c091a7ad Binary files /dev/null and b/build/source/source_base/CMakeFiles/base.dir/blas_connector_base.cpp.o differ diff --git a/build/source/source_base/CMakeFiles/base.dir/blas_connector_base.cpp.o.d b/build/source/source_base/CMakeFiles/base.dir/blas_connector_base.cpp.o.d new file mode 100644 index 0000000000..a3dc799f35 --- /dev/null +++ b/build/source/source_base/CMakeFiles/base.dir/blas_connector_base.cpp.o.d @@ -0,0 +1,168 @@ +source/source_base/CMakeFiles/base.dir/blas_connector_base.cpp.o: \ + /home/haozhihan/Documents/abacus-develop/source/source_base/blas_connector_base.cpp \ + /usr/include/stdc-predef.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/blas_connector.h \ + /usr/include/c++/11/complex \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++config.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/os_defines.h \ + /usr/include/features.h /usr/include/features-time64.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/cpu_defines.h \ + /usr/include/c++/11/bits/cpp_type_traits.h \ + /usr/include/c++/11/ext/type_traits.h /usr/include/c++/11/cmath \ + /usr/include/math.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/math-vector.h \ + /usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h \ + /usr/include/x86_64-linux-gnu/bits/flt-eval-method.h \ + /usr/include/x86_64-linux-gnu/bits/fp-logb.h \ + /usr/include/x86_64-linux-gnu/bits/fp-fast.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-narrow.h \ + /usr/include/x86_64-linux-gnu/bits/iscanonical.h \ + /usr/include/c++/11/bits/std_abs.h /usr/include/stdlib.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h \ + /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/atomic_wide_counter.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h /usr/include/c++/11/sstream \ + /usr/include/c++/11/istream /usr/include/c++/11/ios \ + /usr/include/c++/11/iosfwd /usr/include/c++/11/bits/stringfwd.h \ + /usr/include/c++/11/bits/memoryfwd.h /usr/include/c++/11/bits/postypes.h \ + /usr/include/c++/11/cwchar /usr/include/wchar.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/wchar.h \ + /usr/include/x86_64-linux-gnu/bits/types/wint_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/wchar2.h \ + /usr/include/c++/11/exception /usr/include/c++/11/bits/exception.h \ + /usr/include/c++/11/bits/exception_ptr.h \ + /usr/include/c++/11/bits/exception_defines.h \ + /usr/include/c++/11/bits/cxxabi_init_exception.h \ + /usr/include/c++/11/typeinfo /usr/include/c++/11/bits/hash_bytes.h \ + /usr/include/c++/11/new /usr/include/c++/11/bits/move.h \ + /usr/include/c++/11/type_traits \ + /usr/include/c++/11/bits/nested_exception.h \ + /usr/include/c++/11/bits/char_traits.h \ + /usr/include/c++/11/bits/stl_algobase.h \ + /usr/include/c++/11/bits/functexcept.h \ + /usr/include/c++/11/ext/numeric_traits.h \ + /usr/include/c++/11/bits/stl_pair.h \ + /usr/include/c++/11/bits/stl_iterator_base_types.h \ + /usr/include/c++/11/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/11/bits/concept_check.h \ + /usr/include/c++/11/debug/assertions.h \ + /usr/include/c++/11/bits/stl_iterator.h \ + /usr/include/c++/11/bits/ptr_traits.h /usr/include/c++/11/debug/debug.h \ + /usr/include/c++/11/bits/predefined_ops.h /usr/include/c++/11/cstdint \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdint.h /usr/include/stdint.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-uintn.h \ + /usr/include/c++/11/bits/localefwd.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++locale.h \ + /usr/include/c++/11/clocale /usr/include/locale.h \ + /usr/include/x86_64-linux-gnu/bits/locale.h /usr/include/c++/11/cctype \ + /usr/include/ctype.h /usr/include/c++/11/bits/ios_base.h \ + /usr/include/c++/11/ext/atomicity.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr-default.h \ + /usr/include/pthread.h /usr/include/sched.h \ + /usr/include/x86_64-linux-gnu/bits/sched.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h \ + /usr/include/x86_64-linux-gnu/bits/cpu-set.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/timex.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h \ + /usr/include/x86_64-linux-gnu/bits/setjmp.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct___jmp_buf_tag.h \ + /usr/include/x86_64-linux-gnu/bits/pthread_stack_min-dynamic.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/atomic_word.h \ + /usr/include/x86_64-linux-gnu/sys/single_threaded.h \ + /usr/include/c++/11/bits/locale_classes.h /usr/include/c++/11/string \ + /usr/include/c++/11/bits/allocator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++allocator.h \ + /usr/include/c++/11/ext/new_allocator.h \ + /usr/include/c++/11/bits/ostream_insert.h \ + /usr/include/c++/11/bits/cxxabi_forced.h \ + /usr/include/c++/11/bits/stl_function.h \ + /usr/include/c++/11/backward/binders.h \ + /usr/include/c++/11/bits/range_access.h \ + /usr/include/c++/11/initializer_list \ + /usr/include/c++/11/bits/basic_string.h \ + /usr/include/c++/11/ext/alloc_traits.h \ + /usr/include/c++/11/bits/alloc_traits.h \ + /usr/include/c++/11/bits/stl_construct.h \ + /usr/include/c++/11/ext/string_conversions.h /usr/include/c++/11/cstdlib \ + /usr/include/c++/11/cstdio /usr/include/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/c++/11/cerrno \ + /usr/include/errno.h /usr/include/x86_64-linux-gnu/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/bits/types/error_t.h \ + /usr/include/c++/11/bits/charconv.h \ + /usr/include/c++/11/bits/functional_hash.h \ + /usr/include/c++/11/bits/basic_string.tcc \ + /usr/include/c++/11/bits/locale_classes.tcc \ + /usr/include/c++/11/system_error \ + /usr/include/x86_64-linux-gnu/c++/11/bits/error_constants.h \ + /usr/include/c++/11/stdexcept /usr/include/c++/11/streambuf \ + /usr/include/c++/11/bits/streambuf.tcc \ + /usr/include/c++/11/bits/basic_ios.h \ + /usr/include/c++/11/bits/locale_facets.h /usr/include/c++/11/cwctype \ + /usr/include/wctype.h /usr/include/x86_64-linux-gnu/bits/wctype-wchar.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_base.h \ + /usr/include/c++/11/bits/streambuf_iterator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_inline.h \ + /usr/include/c++/11/bits/locale_facets.tcc \ + /usr/include/c++/11/bits/basic_ios.tcc /usr/include/c++/11/ostream \ + /usr/include/c++/11/bits/ostream.tcc \ + /usr/include/c++/11/bits/istream.tcc \ + /usr/include/c++/11/bits/sstream.tcc \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_device/types.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/macros.h diff --git a/build/source/source_base/CMakeFiles/base.dir/blas_connector_matrix.cpp.o b/build/source/source_base/CMakeFiles/base.dir/blas_connector_matrix.cpp.o new file mode 100644 index 0000000000..f7cae5da6b Binary files /dev/null and b/build/source/source_base/CMakeFiles/base.dir/blas_connector_matrix.cpp.o differ diff --git a/build/source/source_base/CMakeFiles/base.dir/blas_connector_matrix.cpp.o.d b/build/source/source_base/CMakeFiles/base.dir/blas_connector_matrix.cpp.o.d new file mode 100644 index 0000000000..6e192339e4 --- /dev/null +++ b/build/source/source_base/CMakeFiles/base.dir/blas_connector_matrix.cpp.o.d @@ -0,0 +1,168 @@ +source/source_base/CMakeFiles/base.dir/blas_connector_matrix.cpp.o: \ + /home/haozhihan/Documents/abacus-develop/source/source_base/blas_connector_matrix.cpp \ + /usr/include/stdc-predef.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/blas_connector.h \ + /usr/include/c++/11/complex \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++config.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/os_defines.h \ + /usr/include/features.h /usr/include/features-time64.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/cpu_defines.h \ + /usr/include/c++/11/bits/cpp_type_traits.h \ + /usr/include/c++/11/ext/type_traits.h /usr/include/c++/11/cmath \ + /usr/include/math.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/math-vector.h \ + /usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h \ + /usr/include/x86_64-linux-gnu/bits/flt-eval-method.h \ + /usr/include/x86_64-linux-gnu/bits/fp-logb.h \ + /usr/include/x86_64-linux-gnu/bits/fp-fast.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-narrow.h \ + /usr/include/x86_64-linux-gnu/bits/iscanonical.h \ + /usr/include/c++/11/bits/std_abs.h /usr/include/stdlib.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h \ + /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/atomic_wide_counter.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h /usr/include/c++/11/sstream \ + /usr/include/c++/11/istream /usr/include/c++/11/ios \ + /usr/include/c++/11/iosfwd /usr/include/c++/11/bits/stringfwd.h \ + /usr/include/c++/11/bits/memoryfwd.h /usr/include/c++/11/bits/postypes.h \ + /usr/include/c++/11/cwchar /usr/include/wchar.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/wchar.h \ + /usr/include/x86_64-linux-gnu/bits/types/wint_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/wchar2.h \ + /usr/include/c++/11/exception /usr/include/c++/11/bits/exception.h \ + /usr/include/c++/11/bits/exception_ptr.h \ + /usr/include/c++/11/bits/exception_defines.h \ + /usr/include/c++/11/bits/cxxabi_init_exception.h \ + /usr/include/c++/11/typeinfo /usr/include/c++/11/bits/hash_bytes.h \ + /usr/include/c++/11/new /usr/include/c++/11/bits/move.h \ + /usr/include/c++/11/type_traits \ + /usr/include/c++/11/bits/nested_exception.h \ + /usr/include/c++/11/bits/char_traits.h \ + /usr/include/c++/11/bits/stl_algobase.h \ + /usr/include/c++/11/bits/functexcept.h \ + /usr/include/c++/11/ext/numeric_traits.h \ + /usr/include/c++/11/bits/stl_pair.h \ + /usr/include/c++/11/bits/stl_iterator_base_types.h \ + /usr/include/c++/11/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/11/bits/concept_check.h \ + /usr/include/c++/11/debug/assertions.h \ + /usr/include/c++/11/bits/stl_iterator.h \ + /usr/include/c++/11/bits/ptr_traits.h /usr/include/c++/11/debug/debug.h \ + /usr/include/c++/11/bits/predefined_ops.h /usr/include/c++/11/cstdint \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdint.h /usr/include/stdint.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-uintn.h \ + /usr/include/c++/11/bits/localefwd.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++locale.h \ + /usr/include/c++/11/clocale /usr/include/locale.h \ + /usr/include/x86_64-linux-gnu/bits/locale.h /usr/include/c++/11/cctype \ + /usr/include/ctype.h /usr/include/c++/11/bits/ios_base.h \ + /usr/include/c++/11/ext/atomicity.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr-default.h \ + /usr/include/pthread.h /usr/include/sched.h \ + /usr/include/x86_64-linux-gnu/bits/sched.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h \ + /usr/include/x86_64-linux-gnu/bits/cpu-set.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/timex.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h \ + /usr/include/x86_64-linux-gnu/bits/setjmp.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct___jmp_buf_tag.h \ + /usr/include/x86_64-linux-gnu/bits/pthread_stack_min-dynamic.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/atomic_word.h \ + /usr/include/x86_64-linux-gnu/sys/single_threaded.h \ + /usr/include/c++/11/bits/locale_classes.h /usr/include/c++/11/string \ + /usr/include/c++/11/bits/allocator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++allocator.h \ + /usr/include/c++/11/ext/new_allocator.h \ + /usr/include/c++/11/bits/ostream_insert.h \ + /usr/include/c++/11/bits/cxxabi_forced.h \ + /usr/include/c++/11/bits/stl_function.h \ + /usr/include/c++/11/backward/binders.h \ + /usr/include/c++/11/bits/range_access.h \ + /usr/include/c++/11/initializer_list \ + /usr/include/c++/11/bits/basic_string.h \ + /usr/include/c++/11/ext/alloc_traits.h \ + /usr/include/c++/11/bits/alloc_traits.h \ + /usr/include/c++/11/bits/stl_construct.h \ + /usr/include/c++/11/ext/string_conversions.h /usr/include/c++/11/cstdlib \ + /usr/include/c++/11/cstdio /usr/include/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/c++/11/cerrno \ + /usr/include/errno.h /usr/include/x86_64-linux-gnu/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/bits/types/error_t.h \ + /usr/include/c++/11/bits/charconv.h \ + /usr/include/c++/11/bits/functional_hash.h \ + /usr/include/c++/11/bits/basic_string.tcc \ + /usr/include/c++/11/bits/locale_classes.tcc \ + /usr/include/c++/11/system_error \ + /usr/include/x86_64-linux-gnu/c++/11/bits/error_constants.h \ + /usr/include/c++/11/stdexcept /usr/include/c++/11/streambuf \ + /usr/include/c++/11/bits/streambuf.tcc \ + /usr/include/c++/11/bits/basic_ios.h \ + /usr/include/c++/11/bits/locale_facets.h /usr/include/c++/11/cwctype \ + /usr/include/wctype.h /usr/include/x86_64-linux-gnu/bits/wctype-wchar.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_base.h \ + /usr/include/c++/11/bits/streambuf_iterator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_inline.h \ + /usr/include/c++/11/bits/locale_facets.tcc \ + /usr/include/c++/11/bits/basic_ios.tcc /usr/include/c++/11/ostream \ + /usr/include/c++/11/bits/ostream.tcc \ + /usr/include/c++/11/bits/istream.tcc \ + /usr/include/c++/11/bits/sstream.tcc \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_device/types.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/macros.h diff --git a/build/source/source_base/CMakeFiles/base.dir/blas_connector_vector.cpp.o b/build/source/source_base/CMakeFiles/base.dir/blas_connector_vector.cpp.o new file mode 100644 index 0000000000..58792c7966 Binary files /dev/null and b/build/source/source_base/CMakeFiles/base.dir/blas_connector_vector.cpp.o differ diff --git a/build/source/source_base/CMakeFiles/base.dir/blas_connector_vector.cpp.o.d b/build/source/source_base/CMakeFiles/base.dir/blas_connector_vector.cpp.o.d new file mode 100644 index 0000000000..a45900dd1f --- /dev/null +++ b/build/source/source_base/CMakeFiles/base.dir/blas_connector_vector.cpp.o.d @@ -0,0 +1,168 @@ +source/source_base/CMakeFiles/base.dir/blas_connector_vector.cpp.o: \ + /home/haozhihan/Documents/abacus-develop/source/source_base/blas_connector_vector.cpp \ + /usr/include/stdc-predef.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/blas_connector.h \ + /usr/include/c++/11/complex \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++config.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/os_defines.h \ + /usr/include/features.h /usr/include/features-time64.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/cpu_defines.h \ + /usr/include/c++/11/bits/cpp_type_traits.h \ + /usr/include/c++/11/ext/type_traits.h /usr/include/c++/11/cmath \ + /usr/include/math.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/math-vector.h \ + /usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h \ + /usr/include/x86_64-linux-gnu/bits/flt-eval-method.h \ + /usr/include/x86_64-linux-gnu/bits/fp-logb.h \ + /usr/include/x86_64-linux-gnu/bits/fp-fast.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-narrow.h \ + /usr/include/x86_64-linux-gnu/bits/iscanonical.h \ + /usr/include/c++/11/bits/std_abs.h /usr/include/stdlib.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h \ + /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/atomic_wide_counter.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h /usr/include/c++/11/sstream \ + /usr/include/c++/11/istream /usr/include/c++/11/ios \ + /usr/include/c++/11/iosfwd /usr/include/c++/11/bits/stringfwd.h \ + /usr/include/c++/11/bits/memoryfwd.h /usr/include/c++/11/bits/postypes.h \ + /usr/include/c++/11/cwchar /usr/include/wchar.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/wchar.h \ + /usr/include/x86_64-linux-gnu/bits/types/wint_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/wchar2.h \ + /usr/include/c++/11/exception /usr/include/c++/11/bits/exception.h \ + /usr/include/c++/11/bits/exception_ptr.h \ + /usr/include/c++/11/bits/exception_defines.h \ + /usr/include/c++/11/bits/cxxabi_init_exception.h \ + /usr/include/c++/11/typeinfo /usr/include/c++/11/bits/hash_bytes.h \ + /usr/include/c++/11/new /usr/include/c++/11/bits/move.h \ + /usr/include/c++/11/type_traits \ + /usr/include/c++/11/bits/nested_exception.h \ + /usr/include/c++/11/bits/char_traits.h \ + /usr/include/c++/11/bits/stl_algobase.h \ + /usr/include/c++/11/bits/functexcept.h \ + /usr/include/c++/11/ext/numeric_traits.h \ + /usr/include/c++/11/bits/stl_pair.h \ + /usr/include/c++/11/bits/stl_iterator_base_types.h \ + /usr/include/c++/11/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/11/bits/concept_check.h \ + /usr/include/c++/11/debug/assertions.h \ + /usr/include/c++/11/bits/stl_iterator.h \ + /usr/include/c++/11/bits/ptr_traits.h /usr/include/c++/11/debug/debug.h \ + /usr/include/c++/11/bits/predefined_ops.h /usr/include/c++/11/cstdint \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdint.h /usr/include/stdint.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-uintn.h \ + /usr/include/c++/11/bits/localefwd.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++locale.h \ + /usr/include/c++/11/clocale /usr/include/locale.h \ + /usr/include/x86_64-linux-gnu/bits/locale.h /usr/include/c++/11/cctype \ + /usr/include/ctype.h /usr/include/c++/11/bits/ios_base.h \ + /usr/include/c++/11/ext/atomicity.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr-default.h \ + /usr/include/pthread.h /usr/include/sched.h \ + /usr/include/x86_64-linux-gnu/bits/sched.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h \ + /usr/include/x86_64-linux-gnu/bits/cpu-set.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/timex.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h \ + /usr/include/x86_64-linux-gnu/bits/setjmp.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct___jmp_buf_tag.h \ + /usr/include/x86_64-linux-gnu/bits/pthread_stack_min-dynamic.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/atomic_word.h \ + /usr/include/x86_64-linux-gnu/sys/single_threaded.h \ + /usr/include/c++/11/bits/locale_classes.h /usr/include/c++/11/string \ + /usr/include/c++/11/bits/allocator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++allocator.h \ + /usr/include/c++/11/ext/new_allocator.h \ + /usr/include/c++/11/bits/ostream_insert.h \ + /usr/include/c++/11/bits/cxxabi_forced.h \ + /usr/include/c++/11/bits/stl_function.h \ + /usr/include/c++/11/backward/binders.h \ + /usr/include/c++/11/bits/range_access.h \ + /usr/include/c++/11/initializer_list \ + /usr/include/c++/11/bits/basic_string.h \ + /usr/include/c++/11/ext/alloc_traits.h \ + /usr/include/c++/11/bits/alloc_traits.h \ + /usr/include/c++/11/bits/stl_construct.h \ + /usr/include/c++/11/ext/string_conversions.h /usr/include/c++/11/cstdlib \ + /usr/include/c++/11/cstdio /usr/include/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/c++/11/cerrno \ + /usr/include/errno.h /usr/include/x86_64-linux-gnu/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/bits/types/error_t.h \ + /usr/include/c++/11/bits/charconv.h \ + /usr/include/c++/11/bits/functional_hash.h \ + /usr/include/c++/11/bits/basic_string.tcc \ + /usr/include/c++/11/bits/locale_classes.tcc \ + /usr/include/c++/11/system_error \ + /usr/include/x86_64-linux-gnu/c++/11/bits/error_constants.h \ + /usr/include/c++/11/stdexcept /usr/include/c++/11/streambuf \ + /usr/include/c++/11/bits/streambuf.tcc \ + /usr/include/c++/11/bits/basic_ios.h \ + /usr/include/c++/11/bits/locale_facets.h /usr/include/c++/11/cwctype \ + /usr/include/wctype.h /usr/include/x86_64-linux-gnu/bits/wctype-wchar.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_base.h \ + /usr/include/c++/11/bits/streambuf_iterator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_inline.h \ + /usr/include/c++/11/bits/locale_facets.tcc \ + /usr/include/c++/11/bits/basic_ios.tcc /usr/include/c++/11/ostream \ + /usr/include/c++/11/bits/ostream.tcc \ + /usr/include/c++/11/bits/istream.tcc \ + /usr/include/c++/11/bits/sstream.tcc \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_device/types.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/macros.h diff --git a/build/source/source_base/CMakeFiles/base.dir/build.make b/build/source/source_base/CMakeFiles/base.dir/build.make new file mode 100644 index 0000000000..58e6f408d8 --- /dev/null +++ b/build/source/source_base/CMakeFiles/base.dir/build.make @@ -0,0 +1,911 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.27 + +# Delete rule output on recipe failure. +.DELETE_ON_ERROR: + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Disable VCS-based implicit rules. +% : %,v + +# Disable VCS-based implicit rules. +% : RCS/% + +# Disable VCS-based implicit rules. +% : RCS/%,v + +# Disable VCS-based implicit rules. +% : SCCS/s.% + +# Disable VCS-based implicit rules. +% : s.% + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Command-line flag to silence nested $(MAKE). +$(VERBOSE)MAKESILENT = -s + +#Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E rm -f + +# Escaping for special characters. +EQUALS = = + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/haozhihan/Documents/abacus-develop + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/haozhihan/Documents/abacus-develop/build + +# Include any dependencies generated for this target. +include source/source_base/CMakeFiles/base.dir/depend.make +# Include any dependencies generated by the compiler for this target. +include source/source_base/CMakeFiles/base.dir/compiler_depend.make + +# Include the progress variables for this target. +include source/source_base/CMakeFiles/base.dir/progress.make + +# Include the compile flags for this target's objects. +include source/source_base/CMakeFiles/base.dir/flags.make + +source/source_base/CMakeFiles/base.dir/assoc_laguerre.cpp.o: source/source_base/CMakeFiles/base.dir/flags.make +source/source_base/CMakeFiles/base.dir/assoc_laguerre.cpp.o: /home/haozhihan/Documents/abacus-develop/source/source_base/assoc_laguerre.cpp +source/source_base/CMakeFiles/base.dir/assoc_laguerre.cpp.o: source/source_base/CMakeFiles/base.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green --progress-dir=/home/haozhihan/Documents/abacus-develop/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_1) "Building CXX object source/source_base/CMakeFiles/base.dir/assoc_laguerre.cpp.o" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT source/source_base/CMakeFiles/base.dir/assoc_laguerre.cpp.o -MF CMakeFiles/base.dir/assoc_laguerre.cpp.o.d -o CMakeFiles/base.dir/assoc_laguerre.cpp.o -c /home/haozhihan/Documents/abacus-develop/source/source_base/assoc_laguerre.cpp + +source/source_base/CMakeFiles/base.dir/assoc_laguerre.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Preprocessing CXX source to CMakeFiles/base.dir/assoc_laguerre.cpp.i" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/haozhihan/Documents/abacus-develop/source/source_base/assoc_laguerre.cpp > CMakeFiles/base.dir/assoc_laguerre.cpp.i + +source/source_base/CMakeFiles/base.dir/assoc_laguerre.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Compiling CXX source to assembly CMakeFiles/base.dir/assoc_laguerre.cpp.s" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/haozhihan/Documents/abacus-develop/source/source_base/assoc_laguerre.cpp -o CMakeFiles/base.dir/assoc_laguerre.cpp.s + +source/source_base/CMakeFiles/base.dir/blas_connector_base.cpp.o: source/source_base/CMakeFiles/base.dir/flags.make +source/source_base/CMakeFiles/base.dir/blas_connector_base.cpp.o: /home/haozhihan/Documents/abacus-develop/source/source_base/blas_connector_base.cpp +source/source_base/CMakeFiles/base.dir/blas_connector_base.cpp.o: source/source_base/CMakeFiles/base.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green --progress-dir=/home/haozhihan/Documents/abacus-develop/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_2) "Building CXX object source/source_base/CMakeFiles/base.dir/blas_connector_base.cpp.o" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT source/source_base/CMakeFiles/base.dir/blas_connector_base.cpp.o -MF CMakeFiles/base.dir/blas_connector_base.cpp.o.d -o CMakeFiles/base.dir/blas_connector_base.cpp.o -c /home/haozhihan/Documents/abacus-develop/source/source_base/blas_connector_base.cpp + +source/source_base/CMakeFiles/base.dir/blas_connector_base.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Preprocessing CXX source to CMakeFiles/base.dir/blas_connector_base.cpp.i" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/haozhihan/Documents/abacus-develop/source/source_base/blas_connector_base.cpp > CMakeFiles/base.dir/blas_connector_base.cpp.i + +source/source_base/CMakeFiles/base.dir/blas_connector_base.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Compiling CXX source to assembly CMakeFiles/base.dir/blas_connector_base.cpp.s" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/haozhihan/Documents/abacus-develop/source/source_base/blas_connector_base.cpp -o CMakeFiles/base.dir/blas_connector_base.cpp.s + +source/source_base/CMakeFiles/base.dir/blas_connector_vector.cpp.o: source/source_base/CMakeFiles/base.dir/flags.make +source/source_base/CMakeFiles/base.dir/blas_connector_vector.cpp.o: /home/haozhihan/Documents/abacus-develop/source/source_base/blas_connector_vector.cpp +source/source_base/CMakeFiles/base.dir/blas_connector_vector.cpp.o: source/source_base/CMakeFiles/base.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green --progress-dir=/home/haozhihan/Documents/abacus-develop/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_3) "Building CXX object source/source_base/CMakeFiles/base.dir/blas_connector_vector.cpp.o" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT source/source_base/CMakeFiles/base.dir/blas_connector_vector.cpp.o -MF CMakeFiles/base.dir/blas_connector_vector.cpp.o.d -o CMakeFiles/base.dir/blas_connector_vector.cpp.o -c /home/haozhihan/Documents/abacus-develop/source/source_base/blas_connector_vector.cpp + +source/source_base/CMakeFiles/base.dir/blas_connector_vector.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Preprocessing CXX source to CMakeFiles/base.dir/blas_connector_vector.cpp.i" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/haozhihan/Documents/abacus-develop/source/source_base/blas_connector_vector.cpp > CMakeFiles/base.dir/blas_connector_vector.cpp.i + +source/source_base/CMakeFiles/base.dir/blas_connector_vector.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Compiling CXX source to assembly CMakeFiles/base.dir/blas_connector_vector.cpp.s" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/haozhihan/Documents/abacus-develop/source/source_base/blas_connector_vector.cpp -o CMakeFiles/base.dir/blas_connector_vector.cpp.s + +source/source_base/CMakeFiles/base.dir/blas_connector_matrix.cpp.o: source/source_base/CMakeFiles/base.dir/flags.make +source/source_base/CMakeFiles/base.dir/blas_connector_matrix.cpp.o: /home/haozhihan/Documents/abacus-develop/source/source_base/blas_connector_matrix.cpp +source/source_base/CMakeFiles/base.dir/blas_connector_matrix.cpp.o: source/source_base/CMakeFiles/base.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green --progress-dir=/home/haozhihan/Documents/abacus-develop/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_4) "Building CXX object source/source_base/CMakeFiles/base.dir/blas_connector_matrix.cpp.o" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT source/source_base/CMakeFiles/base.dir/blas_connector_matrix.cpp.o -MF CMakeFiles/base.dir/blas_connector_matrix.cpp.o.d -o CMakeFiles/base.dir/blas_connector_matrix.cpp.o -c /home/haozhihan/Documents/abacus-develop/source/source_base/blas_connector_matrix.cpp + +source/source_base/CMakeFiles/base.dir/blas_connector_matrix.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Preprocessing CXX source to CMakeFiles/base.dir/blas_connector_matrix.cpp.i" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/haozhihan/Documents/abacus-develop/source/source_base/blas_connector_matrix.cpp > CMakeFiles/base.dir/blas_connector_matrix.cpp.i + +source/source_base/CMakeFiles/base.dir/blas_connector_matrix.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Compiling CXX source to assembly CMakeFiles/base.dir/blas_connector_matrix.cpp.s" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/haozhihan/Documents/abacus-develop/source/source_base/blas_connector_matrix.cpp -o CMakeFiles/base.dir/blas_connector_matrix.cpp.s + +source/source_base/CMakeFiles/base.dir/clebsch_gordan_coeff.cpp.o: source/source_base/CMakeFiles/base.dir/flags.make +source/source_base/CMakeFiles/base.dir/clebsch_gordan_coeff.cpp.o: /home/haozhihan/Documents/abacus-develop/source/source_base/clebsch_gordan_coeff.cpp +source/source_base/CMakeFiles/base.dir/clebsch_gordan_coeff.cpp.o: source/source_base/CMakeFiles/base.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green --progress-dir=/home/haozhihan/Documents/abacus-develop/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_5) "Building CXX object source/source_base/CMakeFiles/base.dir/clebsch_gordan_coeff.cpp.o" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT source/source_base/CMakeFiles/base.dir/clebsch_gordan_coeff.cpp.o -MF CMakeFiles/base.dir/clebsch_gordan_coeff.cpp.o.d -o CMakeFiles/base.dir/clebsch_gordan_coeff.cpp.o -c /home/haozhihan/Documents/abacus-develop/source/source_base/clebsch_gordan_coeff.cpp + +source/source_base/CMakeFiles/base.dir/clebsch_gordan_coeff.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Preprocessing CXX source to CMakeFiles/base.dir/clebsch_gordan_coeff.cpp.i" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/haozhihan/Documents/abacus-develop/source/source_base/clebsch_gordan_coeff.cpp > CMakeFiles/base.dir/clebsch_gordan_coeff.cpp.i + +source/source_base/CMakeFiles/base.dir/clebsch_gordan_coeff.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Compiling CXX source to assembly CMakeFiles/base.dir/clebsch_gordan_coeff.cpp.s" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/haozhihan/Documents/abacus-develop/source/source_base/clebsch_gordan_coeff.cpp -o CMakeFiles/base.dir/clebsch_gordan_coeff.cpp.s + +source/source_base/CMakeFiles/base.dir/complexarray.cpp.o: source/source_base/CMakeFiles/base.dir/flags.make +source/source_base/CMakeFiles/base.dir/complexarray.cpp.o: /home/haozhihan/Documents/abacus-develop/source/source_base/complexarray.cpp +source/source_base/CMakeFiles/base.dir/complexarray.cpp.o: source/source_base/CMakeFiles/base.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green --progress-dir=/home/haozhihan/Documents/abacus-develop/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_6) "Building CXX object source/source_base/CMakeFiles/base.dir/complexarray.cpp.o" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT source/source_base/CMakeFiles/base.dir/complexarray.cpp.o -MF CMakeFiles/base.dir/complexarray.cpp.o.d -o CMakeFiles/base.dir/complexarray.cpp.o -c /home/haozhihan/Documents/abacus-develop/source/source_base/complexarray.cpp + +source/source_base/CMakeFiles/base.dir/complexarray.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Preprocessing CXX source to CMakeFiles/base.dir/complexarray.cpp.i" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/haozhihan/Documents/abacus-develop/source/source_base/complexarray.cpp > CMakeFiles/base.dir/complexarray.cpp.i + +source/source_base/CMakeFiles/base.dir/complexarray.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Compiling CXX source to assembly CMakeFiles/base.dir/complexarray.cpp.s" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/haozhihan/Documents/abacus-develop/source/source_base/complexarray.cpp -o CMakeFiles/base.dir/complexarray.cpp.s + +source/source_base/CMakeFiles/base.dir/complexmatrix.cpp.o: source/source_base/CMakeFiles/base.dir/flags.make +source/source_base/CMakeFiles/base.dir/complexmatrix.cpp.o: /home/haozhihan/Documents/abacus-develop/source/source_base/complexmatrix.cpp +source/source_base/CMakeFiles/base.dir/complexmatrix.cpp.o: source/source_base/CMakeFiles/base.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green --progress-dir=/home/haozhihan/Documents/abacus-develop/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_7) "Building CXX object source/source_base/CMakeFiles/base.dir/complexmatrix.cpp.o" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT source/source_base/CMakeFiles/base.dir/complexmatrix.cpp.o -MF CMakeFiles/base.dir/complexmatrix.cpp.o.d -o CMakeFiles/base.dir/complexmatrix.cpp.o -c /home/haozhihan/Documents/abacus-develop/source/source_base/complexmatrix.cpp + +source/source_base/CMakeFiles/base.dir/complexmatrix.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Preprocessing CXX source to CMakeFiles/base.dir/complexmatrix.cpp.i" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/haozhihan/Documents/abacus-develop/source/source_base/complexmatrix.cpp > CMakeFiles/base.dir/complexmatrix.cpp.i + +source/source_base/CMakeFiles/base.dir/complexmatrix.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Compiling CXX source to assembly CMakeFiles/base.dir/complexmatrix.cpp.s" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/haozhihan/Documents/abacus-develop/source/source_base/complexmatrix.cpp -o CMakeFiles/base.dir/complexmatrix.cpp.s + +source/source_base/CMakeFiles/base.dir/element_basis_index.cpp.o: source/source_base/CMakeFiles/base.dir/flags.make +source/source_base/CMakeFiles/base.dir/element_basis_index.cpp.o: /home/haozhihan/Documents/abacus-develop/source/source_base/element_basis_index.cpp +source/source_base/CMakeFiles/base.dir/element_basis_index.cpp.o: source/source_base/CMakeFiles/base.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green --progress-dir=/home/haozhihan/Documents/abacus-develop/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_8) "Building CXX object source/source_base/CMakeFiles/base.dir/element_basis_index.cpp.o" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT source/source_base/CMakeFiles/base.dir/element_basis_index.cpp.o -MF CMakeFiles/base.dir/element_basis_index.cpp.o.d -o CMakeFiles/base.dir/element_basis_index.cpp.o -c /home/haozhihan/Documents/abacus-develop/source/source_base/element_basis_index.cpp + +source/source_base/CMakeFiles/base.dir/element_basis_index.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Preprocessing CXX source to CMakeFiles/base.dir/element_basis_index.cpp.i" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/haozhihan/Documents/abacus-develop/source/source_base/element_basis_index.cpp > CMakeFiles/base.dir/element_basis_index.cpp.i + +source/source_base/CMakeFiles/base.dir/element_basis_index.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Compiling CXX source to assembly CMakeFiles/base.dir/element_basis_index.cpp.s" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/haozhihan/Documents/abacus-develop/source/source_base/element_basis_index.cpp -o CMakeFiles/base.dir/element_basis_index.cpp.s + +source/source_base/CMakeFiles/base.dir/export.cpp.o: source/source_base/CMakeFiles/base.dir/flags.make +source/source_base/CMakeFiles/base.dir/export.cpp.o: /home/haozhihan/Documents/abacus-develop/source/source_base/export.cpp +source/source_base/CMakeFiles/base.dir/export.cpp.o: source/source_base/CMakeFiles/base.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green --progress-dir=/home/haozhihan/Documents/abacus-develop/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_9) "Building CXX object source/source_base/CMakeFiles/base.dir/export.cpp.o" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT source/source_base/CMakeFiles/base.dir/export.cpp.o -MF CMakeFiles/base.dir/export.cpp.o.d -o CMakeFiles/base.dir/export.cpp.o -c /home/haozhihan/Documents/abacus-develop/source/source_base/export.cpp + +source/source_base/CMakeFiles/base.dir/export.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Preprocessing CXX source to CMakeFiles/base.dir/export.cpp.i" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/haozhihan/Documents/abacus-develop/source/source_base/export.cpp > CMakeFiles/base.dir/export.cpp.i + +source/source_base/CMakeFiles/base.dir/export.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Compiling CXX source to assembly CMakeFiles/base.dir/export.cpp.s" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/haozhihan/Documents/abacus-develop/source/source_base/export.cpp -o CMakeFiles/base.dir/export.cpp.s + +source/source_base/CMakeFiles/base.dir/inverse_matrix.cpp.o: source/source_base/CMakeFiles/base.dir/flags.make +source/source_base/CMakeFiles/base.dir/inverse_matrix.cpp.o: /home/haozhihan/Documents/abacus-develop/source/source_base/inverse_matrix.cpp +source/source_base/CMakeFiles/base.dir/inverse_matrix.cpp.o: source/source_base/CMakeFiles/base.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green --progress-dir=/home/haozhihan/Documents/abacus-develop/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_10) "Building CXX object source/source_base/CMakeFiles/base.dir/inverse_matrix.cpp.o" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT source/source_base/CMakeFiles/base.dir/inverse_matrix.cpp.o -MF CMakeFiles/base.dir/inverse_matrix.cpp.o.d -o CMakeFiles/base.dir/inverse_matrix.cpp.o -c /home/haozhihan/Documents/abacus-develop/source/source_base/inverse_matrix.cpp + +source/source_base/CMakeFiles/base.dir/inverse_matrix.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Preprocessing CXX source to CMakeFiles/base.dir/inverse_matrix.cpp.i" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/haozhihan/Documents/abacus-develop/source/source_base/inverse_matrix.cpp > CMakeFiles/base.dir/inverse_matrix.cpp.i + +source/source_base/CMakeFiles/base.dir/inverse_matrix.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Compiling CXX source to assembly CMakeFiles/base.dir/inverse_matrix.cpp.s" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/haozhihan/Documents/abacus-develop/source/source_base/inverse_matrix.cpp -o CMakeFiles/base.dir/inverse_matrix.cpp.s + +source/source_base/CMakeFiles/base.dir/gather_math_lib_info.cpp.o: source/source_base/CMakeFiles/base.dir/flags.make +source/source_base/CMakeFiles/base.dir/gather_math_lib_info.cpp.o: /home/haozhihan/Documents/abacus-develop/source/source_base/gather_math_lib_info.cpp +source/source_base/CMakeFiles/base.dir/gather_math_lib_info.cpp.o: source/source_base/CMakeFiles/base.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green --progress-dir=/home/haozhihan/Documents/abacus-develop/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_11) "Building CXX object source/source_base/CMakeFiles/base.dir/gather_math_lib_info.cpp.o" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT source/source_base/CMakeFiles/base.dir/gather_math_lib_info.cpp.o -MF CMakeFiles/base.dir/gather_math_lib_info.cpp.o.d -o CMakeFiles/base.dir/gather_math_lib_info.cpp.o -c /home/haozhihan/Documents/abacus-develop/source/source_base/gather_math_lib_info.cpp + +source/source_base/CMakeFiles/base.dir/gather_math_lib_info.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Preprocessing CXX source to CMakeFiles/base.dir/gather_math_lib_info.cpp.i" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/haozhihan/Documents/abacus-develop/source/source_base/gather_math_lib_info.cpp > CMakeFiles/base.dir/gather_math_lib_info.cpp.i + +source/source_base/CMakeFiles/base.dir/gather_math_lib_info.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Compiling CXX source to assembly CMakeFiles/base.dir/gather_math_lib_info.cpp.s" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/haozhihan/Documents/abacus-develop/source/source_base/gather_math_lib_info.cpp -o CMakeFiles/base.dir/gather_math_lib_info.cpp.s + +source/source_base/CMakeFiles/base.dir/global_file.cpp.o: source/source_base/CMakeFiles/base.dir/flags.make +source/source_base/CMakeFiles/base.dir/global_file.cpp.o: /home/haozhihan/Documents/abacus-develop/source/source_base/global_file.cpp +source/source_base/CMakeFiles/base.dir/global_file.cpp.o: source/source_base/CMakeFiles/base.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green --progress-dir=/home/haozhihan/Documents/abacus-develop/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_12) "Building CXX object source/source_base/CMakeFiles/base.dir/global_file.cpp.o" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT source/source_base/CMakeFiles/base.dir/global_file.cpp.o -MF CMakeFiles/base.dir/global_file.cpp.o.d -o CMakeFiles/base.dir/global_file.cpp.o -c /home/haozhihan/Documents/abacus-develop/source/source_base/global_file.cpp + +source/source_base/CMakeFiles/base.dir/global_file.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Preprocessing CXX source to CMakeFiles/base.dir/global_file.cpp.i" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/haozhihan/Documents/abacus-develop/source/source_base/global_file.cpp > CMakeFiles/base.dir/global_file.cpp.i + +source/source_base/CMakeFiles/base.dir/global_file.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Compiling CXX source to assembly CMakeFiles/base.dir/global_file.cpp.s" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/haozhihan/Documents/abacus-develop/source/source_base/global_file.cpp -o CMakeFiles/base.dir/global_file.cpp.s + +source/source_base/CMakeFiles/base.dir/global_function.cpp.o: source/source_base/CMakeFiles/base.dir/flags.make +source/source_base/CMakeFiles/base.dir/global_function.cpp.o: /home/haozhihan/Documents/abacus-develop/source/source_base/global_function.cpp +source/source_base/CMakeFiles/base.dir/global_function.cpp.o: source/source_base/CMakeFiles/base.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green --progress-dir=/home/haozhihan/Documents/abacus-develop/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_13) "Building CXX object source/source_base/CMakeFiles/base.dir/global_function.cpp.o" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT source/source_base/CMakeFiles/base.dir/global_function.cpp.o -MF CMakeFiles/base.dir/global_function.cpp.o.d -o CMakeFiles/base.dir/global_function.cpp.o -c /home/haozhihan/Documents/abacus-develop/source/source_base/global_function.cpp + +source/source_base/CMakeFiles/base.dir/global_function.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Preprocessing CXX source to CMakeFiles/base.dir/global_function.cpp.i" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/haozhihan/Documents/abacus-develop/source/source_base/global_function.cpp > CMakeFiles/base.dir/global_function.cpp.i + +source/source_base/CMakeFiles/base.dir/global_function.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Compiling CXX source to assembly CMakeFiles/base.dir/global_function.cpp.s" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/haozhihan/Documents/abacus-develop/source/source_base/global_function.cpp -o CMakeFiles/base.dir/global_function.cpp.s + +source/source_base/CMakeFiles/base.dir/global_function_ddotreal.cpp.o: source/source_base/CMakeFiles/base.dir/flags.make +source/source_base/CMakeFiles/base.dir/global_function_ddotreal.cpp.o: /home/haozhihan/Documents/abacus-develop/source/source_base/global_function_ddotreal.cpp +source/source_base/CMakeFiles/base.dir/global_function_ddotreal.cpp.o: source/source_base/CMakeFiles/base.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green --progress-dir=/home/haozhihan/Documents/abacus-develop/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_14) "Building CXX object source/source_base/CMakeFiles/base.dir/global_function_ddotreal.cpp.o" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT source/source_base/CMakeFiles/base.dir/global_function_ddotreal.cpp.o -MF CMakeFiles/base.dir/global_function_ddotreal.cpp.o.d -o CMakeFiles/base.dir/global_function_ddotreal.cpp.o -c /home/haozhihan/Documents/abacus-develop/source/source_base/global_function_ddotreal.cpp + +source/source_base/CMakeFiles/base.dir/global_function_ddotreal.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Preprocessing CXX source to CMakeFiles/base.dir/global_function_ddotreal.cpp.i" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/haozhihan/Documents/abacus-develop/source/source_base/global_function_ddotreal.cpp > CMakeFiles/base.dir/global_function_ddotreal.cpp.i + +source/source_base/CMakeFiles/base.dir/global_function_ddotreal.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Compiling CXX source to assembly CMakeFiles/base.dir/global_function_ddotreal.cpp.s" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/haozhihan/Documents/abacus-develop/source/source_base/global_function_ddotreal.cpp -o CMakeFiles/base.dir/global_function_ddotreal.cpp.s + +source/source_base/CMakeFiles/base.dir/global_variable.cpp.o: source/source_base/CMakeFiles/base.dir/flags.make +source/source_base/CMakeFiles/base.dir/global_variable.cpp.o: /home/haozhihan/Documents/abacus-develop/source/source_base/global_variable.cpp +source/source_base/CMakeFiles/base.dir/global_variable.cpp.o: source/source_base/CMakeFiles/base.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green --progress-dir=/home/haozhihan/Documents/abacus-develop/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_15) "Building CXX object source/source_base/CMakeFiles/base.dir/global_variable.cpp.o" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT source/source_base/CMakeFiles/base.dir/global_variable.cpp.o -MF CMakeFiles/base.dir/global_variable.cpp.o.d -o CMakeFiles/base.dir/global_variable.cpp.o -c /home/haozhihan/Documents/abacus-develop/source/source_base/global_variable.cpp + +source/source_base/CMakeFiles/base.dir/global_variable.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Preprocessing CXX source to CMakeFiles/base.dir/global_variable.cpp.i" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/haozhihan/Documents/abacus-develop/source/source_base/global_variable.cpp > CMakeFiles/base.dir/global_variable.cpp.i + +source/source_base/CMakeFiles/base.dir/global_variable.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Compiling CXX source to assembly CMakeFiles/base.dir/global_variable.cpp.s" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/haozhihan/Documents/abacus-develop/source/source_base/global_variable.cpp -o CMakeFiles/base.dir/global_variable.cpp.s + +source/source_base/CMakeFiles/base.dir/intarray.cpp.o: source/source_base/CMakeFiles/base.dir/flags.make +source/source_base/CMakeFiles/base.dir/intarray.cpp.o: /home/haozhihan/Documents/abacus-develop/source/source_base/intarray.cpp +source/source_base/CMakeFiles/base.dir/intarray.cpp.o: source/source_base/CMakeFiles/base.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green --progress-dir=/home/haozhihan/Documents/abacus-develop/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_16) "Building CXX object source/source_base/CMakeFiles/base.dir/intarray.cpp.o" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT source/source_base/CMakeFiles/base.dir/intarray.cpp.o -MF CMakeFiles/base.dir/intarray.cpp.o.d -o CMakeFiles/base.dir/intarray.cpp.o -c /home/haozhihan/Documents/abacus-develop/source/source_base/intarray.cpp + +source/source_base/CMakeFiles/base.dir/intarray.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Preprocessing CXX source to CMakeFiles/base.dir/intarray.cpp.i" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/haozhihan/Documents/abacus-develop/source/source_base/intarray.cpp > CMakeFiles/base.dir/intarray.cpp.i + +source/source_base/CMakeFiles/base.dir/intarray.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Compiling CXX source to assembly CMakeFiles/base.dir/intarray.cpp.s" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/haozhihan/Documents/abacus-develop/source/source_base/intarray.cpp -o CMakeFiles/base.dir/intarray.cpp.s + +source/source_base/CMakeFiles/base.dir/math_integral.cpp.o: source/source_base/CMakeFiles/base.dir/flags.make +source/source_base/CMakeFiles/base.dir/math_integral.cpp.o: /home/haozhihan/Documents/abacus-develop/source/source_base/math_integral.cpp +source/source_base/CMakeFiles/base.dir/math_integral.cpp.o: source/source_base/CMakeFiles/base.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green --progress-dir=/home/haozhihan/Documents/abacus-develop/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_17) "Building CXX object source/source_base/CMakeFiles/base.dir/math_integral.cpp.o" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT source/source_base/CMakeFiles/base.dir/math_integral.cpp.o -MF CMakeFiles/base.dir/math_integral.cpp.o.d -o CMakeFiles/base.dir/math_integral.cpp.o -c /home/haozhihan/Documents/abacus-develop/source/source_base/math_integral.cpp + +source/source_base/CMakeFiles/base.dir/math_integral.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Preprocessing CXX source to CMakeFiles/base.dir/math_integral.cpp.i" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/haozhihan/Documents/abacus-develop/source/source_base/math_integral.cpp > CMakeFiles/base.dir/math_integral.cpp.i + +source/source_base/CMakeFiles/base.dir/math_integral.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Compiling CXX source to assembly CMakeFiles/base.dir/math_integral.cpp.s" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/haozhihan/Documents/abacus-develop/source/source_base/math_integral.cpp -o CMakeFiles/base.dir/math_integral.cpp.s + +source/source_base/CMakeFiles/base.dir/math_lebedev_laikov.cpp.o: source/source_base/CMakeFiles/base.dir/flags.make +source/source_base/CMakeFiles/base.dir/math_lebedev_laikov.cpp.o: /home/haozhihan/Documents/abacus-develop/source/source_base/math_lebedev_laikov.cpp +source/source_base/CMakeFiles/base.dir/math_lebedev_laikov.cpp.o: source/source_base/CMakeFiles/base.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green --progress-dir=/home/haozhihan/Documents/abacus-develop/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_18) "Building CXX object source/source_base/CMakeFiles/base.dir/math_lebedev_laikov.cpp.o" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT source/source_base/CMakeFiles/base.dir/math_lebedev_laikov.cpp.o -MF CMakeFiles/base.dir/math_lebedev_laikov.cpp.o.d -o CMakeFiles/base.dir/math_lebedev_laikov.cpp.o -c /home/haozhihan/Documents/abacus-develop/source/source_base/math_lebedev_laikov.cpp + +source/source_base/CMakeFiles/base.dir/math_lebedev_laikov.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Preprocessing CXX source to CMakeFiles/base.dir/math_lebedev_laikov.cpp.i" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/haozhihan/Documents/abacus-develop/source/source_base/math_lebedev_laikov.cpp > CMakeFiles/base.dir/math_lebedev_laikov.cpp.i + +source/source_base/CMakeFiles/base.dir/math_lebedev_laikov.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Compiling CXX source to assembly CMakeFiles/base.dir/math_lebedev_laikov.cpp.s" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/haozhihan/Documents/abacus-develop/source/source_base/math_lebedev_laikov.cpp -o CMakeFiles/base.dir/math_lebedev_laikov.cpp.s + +source/source_base/CMakeFiles/base.dir/math_polyint.cpp.o: source/source_base/CMakeFiles/base.dir/flags.make +source/source_base/CMakeFiles/base.dir/math_polyint.cpp.o: /home/haozhihan/Documents/abacus-develop/source/source_base/math_polyint.cpp +source/source_base/CMakeFiles/base.dir/math_polyint.cpp.o: source/source_base/CMakeFiles/base.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green --progress-dir=/home/haozhihan/Documents/abacus-develop/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_19) "Building CXX object source/source_base/CMakeFiles/base.dir/math_polyint.cpp.o" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT source/source_base/CMakeFiles/base.dir/math_polyint.cpp.o -MF CMakeFiles/base.dir/math_polyint.cpp.o.d -o CMakeFiles/base.dir/math_polyint.cpp.o -c /home/haozhihan/Documents/abacus-develop/source/source_base/math_polyint.cpp + +source/source_base/CMakeFiles/base.dir/math_polyint.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Preprocessing CXX source to CMakeFiles/base.dir/math_polyint.cpp.i" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/haozhihan/Documents/abacus-develop/source/source_base/math_polyint.cpp > CMakeFiles/base.dir/math_polyint.cpp.i + +source/source_base/CMakeFiles/base.dir/math_polyint.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Compiling CXX source to assembly CMakeFiles/base.dir/math_polyint.cpp.s" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/haozhihan/Documents/abacus-develop/source/source_base/math_polyint.cpp -o CMakeFiles/base.dir/math_polyint.cpp.s + +source/source_base/CMakeFiles/base.dir/math_sphbes.cpp.o: source/source_base/CMakeFiles/base.dir/flags.make +source/source_base/CMakeFiles/base.dir/math_sphbes.cpp.o: /home/haozhihan/Documents/abacus-develop/source/source_base/math_sphbes.cpp +source/source_base/CMakeFiles/base.dir/math_sphbes.cpp.o: source/source_base/CMakeFiles/base.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green --progress-dir=/home/haozhihan/Documents/abacus-develop/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_20) "Building CXX object source/source_base/CMakeFiles/base.dir/math_sphbes.cpp.o" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT source/source_base/CMakeFiles/base.dir/math_sphbes.cpp.o -MF CMakeFiles/base.dir/math_sphbes.cpp.o.d -o CMakeFiles/base.dir/math_sphbes.cpp.o -c /home/haozhihan/Documents/abacus-develop/source/source_base/math_sphbes.cpp + +source/source_base/CMakeFiles/base.dir/math_sphbes.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Preprocessing CXX source to CMakeFiles/base.dir/math_sphbes.cpp.i" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/haozhihan/Documents/abacus-develop/source/source_base/math_sphbes.cpp > CMakeFiles/base.dir/math_sphbes.cpp.i + +source/source_base/CMakeFiles/base.dir/math_sphbes.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Compiling CXX source to assembly CMakeFiles/base.dir/math_sphbes.cpp.s" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/haozhihan/Documents/abacus-develop/source/source_base/math_sphbes.cpp -o CMakeFiles/base.dir/math_sphbes.cpp.s + +source/source_base/CMakeFiles/base.dir/math_erf_complex.cpp.o: source/source_base/CMakeFiles/base.dir/flags.make +source/source_base/CMakeFiles/base.dir/math_erf_complex.cpp.o: /home/haozhihan/Documents/abacus-develop/source/source_base/math_erf_complex.cpp +source/source_base/CMakeFiles/base.dir/math_erf_complex.cpp.o: source/source_base/CMakeFiles/base.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green --progress-dir=/home/haozhihan/Documents/abacus-develop/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_21) "Building CXX object source/source_base/CMakeFiles/base.dir/math_erf_complex.cpp.o" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT source/source_base/CMakeFiles/base.dir/math_erf_complex.cpp.o -MF CMakeFiles/base.dir/math_erf_complex.cpp.o.d -o CMakeFiles/base.dir/math_erf_complex.cpp.o -c /home/haozhihan/Documents/abacus-develop/source/source_base/math_erf_complex.cpp + +source/source_base/CMakeFiles/base.dir/math_erf_complex.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Preprocessing CXX source to CMakeFiles/base.dir/math_erf_complex.cpp.i" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/haozhihan/Documents/abacus-develop/source/source_base/math_erf_complex.cpp > CMakeFiles/base.dir/math_erf_complex.cpp.i + +source/source_base/CMakeFiles/base.dir/math_erf_complex.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Compiling CXX source to assembly CMakeFiles/base.dir/math_erf_complex.cpp.s" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/haozhihan/Documents/abacus-develop/source/source_base/math_erf_complex.cpp -o CMakeFiles/base.dir/math_erf_complex.cpp.s + +source/source_base/CMakeFiles/base.dir/math_ylmreal.cpp.o: source/source_base/CMakeFiles/base.dir/flags.make +source/source_base/CMakeFiles/base.dir/math_ylmreal.cpp.o: /home/haozhihan/Documents/abacus-develop/source/source_base/math_ylmreal.cpp +source/source_base/CMakeFiles/base.dir/math_ylmreal.cpp.o: source/source_base/CMakeFiles/base.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green --progress-dir=/home/haozhihan/Documents/abacus-develop/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_22) "Building CXX object source/source_base/CMakeFiles/base.dir/math_ylmreal.cpp.o" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT source/source_base/CMakeFiles/base.dir/math_ylmreal.cpp.o -MF CMakeFiles/base.dir/math_ylmreal.cpp.o.d -o CMakeFiles/base.dir/math_ylmreal.cpp.o -c /home/haozhihan/Documents/abacus-develop/source/source_base/math_ylmreal.cpp + +source/source_base/CMakeFiles/base.dir/math_ylmreal.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Preprocessing CXX source to CMakeFiles/base.dir/math_ylmreal.cpp.i" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/haozhihan/Documents/abacus-develop/source/source_base/math_ylmreal.cpp > CMakeFiles/base.dir/math_ylmreal.cpp.i + +source/source_base/CMakeFiles/base.dir/math_ylmreal.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Compiling CXX source to assembly CMakeFiles/base.dir/math_ylmreal.cpp.s" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/haozhihan/Documents/abacus-develop/source/source_base/math_ylmreal.cpp -o CMakeFiles/base.dir/math_ylmreal.cpp.s + +source/source_base/CMakeFiles/base.dir/math_bspline.cpp.o: source/source_base/CMakeFiles/base.dir/flags.make +source/source_base/CMakeFiles/base.dir/math_bspline.cpp.o: /home/haozhihan/Documents/abacus-develop/source/source_base/math_bspline.cpp +source/source_base/CMakeFiles/base.dir/math_bspline.cpp.o: source/source_base/CMakeFiles/base.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green --progress-dir=/home/haozhihan/Documents/abacus-develop/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_23) "Building CXX object source/source_base/CMakeFiles/base.dir/math_bspline.cpp.o" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT source/source_base/CMakeFiles/base.dir/math_bspline.cpp.o -MF CMakeFiles/base.dir/math_bspline.cpp.o.d -o CMakeFiles/base.dir/math_bspline.cpp.o -c /home/haozhihan/Documents/abacus-develop/source/source_base/math_bspline.cpp + +source/source_base/CMakeFiles/base.dir/math_bspline.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Preprocessing CXX source to CMakeFiles/base.dir/math_bspline.cpp.i" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/haozhihan/Documents/abacus-develop/source/source_base/math_bspline.cpp > CMakeFiles/base.dir/math_bspline.cpp.i + +source/source_base/CMakeFiles/base.dir/math_bspline.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Compiling CXX source to assembly CMakeFiles/base.dir/math_bspline.cpp.s" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/haozhihan/Documents/abacus-develop/source/source_base/math_bspline.cpp -o CMakeFiles/base.dir/math_bspline.cpp.s + +source/source_base/CMakeFiles/base.dir/math_chebyshev.cpp.o: source/source_base/CMakeFiles/base.dir/flags.make +source/source_base/CMakeFiles/base.dir/math_chebyshev.cpp.o: /home/haozhihan/Documents/abacus-develop/source/source_base/math_chebyshev.cpp +source/source_base/CMakeFiles/base.dir/math_chebyshev.cpp.o: source/source_base/CMakeFiles/base.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green --progress-dir=/home/haozhihan/Documents/abacus-develop/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_24) "Building CXX object source/source_base/CMakeFiles/base.dir/math_chebyshev.cpp.o" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT source/source_base/CMakeFiles/base.dir/math_chebyshev.cpp.o -MF CMakeFiles/base.dir/math_chebyshev.cpp.o.d -o CMakeFiles/base.dir/math_chebyshev.cpp.o -c /home/haozhihan/Documents/abacus-develop/source/source_base/math_chebyshev.cpp + +source/source_base/CMakeFiles/base.dir/math_chebyshev.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Preprocessing CXX source to CMakeFiles/base.dir/math_chebyshev.cpp.i" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/haozhihan/Documents/abacus-develop/source/source_base/math_chebyshev.cpp > CMakeFiles/base.dir/math_chebyshev.cpp.i + +source/source_base/CMakeFiles/base.dir/math_chebyshev.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Compiling CXX source to assembly CMakeFiles/base.dir/math_chebyshev.cpp.s" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/haozhihan/Documents/abacus-develop/source/source_base/math_chebyshev.cpp -o CMakeFiles/base.dir/math_chebyshev.cpp.s + +source/source_base/CMakeFiles/base.dir/mathzone_add1.cpp.o: source/source_base/CMakeFiles/base.dir/flags.make +source/source_base/CMakeFiles/base.dir/mathzone_add1.cpp.o: /home/haozhihan/Documents/abacus-develop/source/source_base/mathzone_add1.cpp +source/source_base/CMakeFiles/base.dir/mathzone_add1.cpp.o: source/source_base/CMakeFiles/base.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green --progress-dir=/home/haozhihan/Documents/abacus-develop/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_25) "Building CXX object source/source_base/CMakeFiles/base.dir/mathzone_add1.cpp.o" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT source/source_base/CMakeFiles/base.dir/mathzone_add1.cpp.o -MF CMakeFiles/base.dir/mathzone_add1.cpp.o.d -o CMakeFiles/base.dir/mathzone_add1.cpp.o -c /home/haozhihan/Documents/abacus-develop/source/source_base/mathzone_add1.cpp + +source/source_base/CMakeFiles/base.dir/mathzone_add1.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Preprocessing CXX source to CMakeFiles/base.dir/mathzone_add1.cpp.i" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/haozhihan/Documents/abacus-develop/source/source_base/mathzone_add1.cpp > CMakeFiles/base.dir/mathzone_add1.cpp.i + +source/source_base/CMakeFiles/base.dir/mathzone_add1.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Compiling CXX source to assembly CMakeFiles/base.dir/mathzone_add1.cpp.s" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/haozhihan/Documents/abacus-develop/source/source_base/mathzone_add1.cpp -o CMakeFiles/base.dir/mathzone_add1.cpp.s + +source/source_base/CMakeFiles/base.dir/matrix.cpp.o: source/source_base/CMakeFiles/base.dir/flags.make +source/source_base/CMakeFiles/base.dir/matrix.cpp.o: /home/haozhihan/Documents/abacus-develop/source/source_base/matrix.cpp +source/source_base/CMakeFiles/base.dir/matrix.cpp.o: source/source_base/CMakeFiles/base.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green --progress-dir=/home/haozhihan/Documents/abacus-develop/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_26) "Building CXX object source/source_base/CMakeFiles/base.dir/matrix.cpp.o" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT source/source_base/CMakeFiles/base.dir/matrix.cpp.o -MF CMakeFiles/base.dir/matrix.cpp.o.d -o CMakeFiles/base.dir/matrix.cpp.o -c /home/haozhihan/Documents/abacus-develop/source/source_base/matrix.cpp + +source/source_base/CMakeFiles/base.dir/matrix.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Preprocessing CXX source to CMakeFiles/base.dir/matrix.cpp.i" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/haozhihan/Documents/abacus-develop/source/source_base/matrix.cpp > CMakeFiles/base.dir/matrix.cpp.i + +source/source_base/CMakeFiles/base.dir/matrix.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Compiling CXX source to assembly CMakeFiles/base.dir/matrix.cpp.s" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/haozhihan/Documents/abacus-develop/source/source_base/matrix.cpp -o CMakeFiles/base.dir/matrix.cpp.s + +source/source_base/CMakeFiles/base.dir/matrix3.cpp.o: source/source_base/CMakeFiles/base.dir/flags.make +source/source_base/CMakeFiles/base.dir/matrix3.cpp.o: /home/haozhihan/Documents/abacus-develop/source/source_base/matrix3.cpp +source/source_base/CMakeFiles/base.dir/matrix3.cpp.o: source/source_base/CMakeFiles/base.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green --progress-dir=/home/haozhihan/Documents/abacus-develop/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_27) "Building CXX object source/source_base/CMakeFiles/base.dir/matrix3.cpp.o" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT source/source_base/CMakeFiles/base.dir/matrix3.cpp.o -MF CMakeFiles/base.dir/matrix3.cpp.o.d -o CMakeFiles/base.dir/matrix3.cpp.o -c /home/haozhihan/Documents/abacus-develop/source/source_base/matrix3.cpp + +source/source_base/CMakeFiles/base.dir/matrix3.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Preprocessing CXX source to CMakeFiles/base.dir/matrix3.cpp.i" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/haozhihan/Documents/abacus-develop/source/source_base/matrix3.cpp > CMakeFiles/base.dir/matrix3.cpp.i + +source/source_base/CMakeFiles/base.dir/matrix3.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Compiling CXX source to assembly CMakeFiles/base.dir/matrix3.cpp.s" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/haozhihan/Documents/abacus-develop/source/source_base/matrix3.cpp -o CMakeFiles/base.dir/matrix3.cpp.s + +source/source_base/CMakeFiles/base.dir/memory.cpp.o: source/source_base/CMakeFiles/base.dir/flags.make +source/source_base/CMakeFiles/base.dir/memory.cpp.o: /home/haozhihan/Documents/abacus-develop/source/source_base/memory.cpp +source/source_base/CMakeFiles/base.dir/memory.cpp.o: source/source_base/CMakeFiles/base.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green --progress-dir=/home/haozhihan/Documents/abacus-develop/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_28) "Building CXX object source/source_base/CMakeFiles/base.dir/memory.cpp.o" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT source/source_base/CMakeFiles/base.dir/memory.cpp.o -MF CMakeFiles/base.dir/memory.cpp.o.d -o CMakeFiles/base.dir/memory.cpp.o -c /home/haozhihan/Documents/abacus-develop/source/source_base/memory.cpp + +source/source_base/CMakeFiles/base.dir/memory.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Preprocessing CXX source to CMakeFiles/base.dir/memory.cpp.i" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/haozhihan/Documents/abacus-develop/source/source_base/memory.cpp > CMakeFiles/base.dir/memory.cpp.i + +source/source_base/CMakeFiles/base.dir/memory.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Compiling CXX source to assembly CMakeFiles/base.dir/memory.cpp.s" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/haozhihan/Documents/abacus-develop/source/source_base/memory.cpp -o CMakeFiles/base.dir/memory.cpp.s + +source/source_base/CMakeFiles/base.dir/mymath.cpp.o: source/source_base/CMakeFiles/base.dir/flags.make +source/source_base/CMakeFiles/base.dir/mymath.cpp.o: /home/haozhihan/Documents/abacus-develop/source/source_base/mymath.cpp +source/source_base/CMakeFiles/base.dir/mymath.cpp.o: source/source_base/CMakeFiles/base.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green --progress-dir=/home/haozhihan/Documents/abacus-develop/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_29) "Building CXX object source/source_base/CMakeFiles/base.dir/mymath.cpp.o" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT source/source_base/CMakeFiles/base.dir/mymath.cpp.o -MF CMakeFiles/base.dir/mymath.cpp.o.d -o CMakeFiles/base.dir/mymath.cpp.o -c /home/haozhihan/Documents/abacus-develop/source/source_base/mymath.cpp + +source/source_base/CMakeFiles/base.dir/mymath.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Preprocessing CXX source to CMakeFiles/base.dir/mymath.cpp.i" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/haozhihan/Documents/abacus-develop/source/source_base/mymath.cpp > CMakeFiles/base.dir/mymath.cpp.i + +source/source_base/CMakeFiles/base.dir/mymath.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Compiling CXX source to assembly CMakeFiles/base.dir/mymath.cpp.s" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/haozhihan/Documents/abacus-develop/source/source_base/mymath.cpp -o CMakeFiles/base.dir/mymath.cpp.s + +source/source_base/CMakeFiles/base.dir/opt_CG.cpp.o: source/source_base/CMakeFiles/base.dir/flags.make +source/source_base/CMakeFiles/base.dir/opt_CG.cpp.o: /home/haozhihan/Documents/abacus-develop/source/source_base/opt_CG.cpp +source/source_base/CMakeFiles/base.dir/opt_CG.cpp.o: source/source_base/CMakeFiles/base.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green --progress-dir=/home/haozhihan/Documents/abacus-develop/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_30) "Building CXX object source/source_base/CMakeFiles/base.dir/opt_CG.cpp.o" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT source/source_base/CMakeFiles/base.dir/opt_CG.cpp.o -MF CMakeFiles/base.dir/opt_CG.cpp.o.d -o CMakeFiles/base.dir/opt_CG.cpp.o -c /home/haozhihan/Documents/abacus-develop/source/source_base/opt_CG.cpp + +source/source_base/CMakeFiles/base.dir/opt_CG.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Preprocessing CXX source to CMakeFiles/base.dir/opt_CG.cpp.i" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/haozhihan/Documents/abacus-develop/source/source_base/opt_CG.cpp > CMakeFiles/base.dir/opt_CG.cpp.i + +source/source_base/CMakeFiles/base.dir/opt_CG.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Compiling CXX source to assembly CMakeFiles/base.dir/opt_CG.cpp.s" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/haozhihan/Documents/abacus-develop/source/source_base/opt_CG.cpp -o CMakeFiles/base.dir/opt_CG.cpp.s + +source/source_base/CMakeFiles/base.dir/opt_DCsrch.cpp.o: source/source_base/CMakeFiles/base.dir/flags.make +source/source_base/CMakeFiles/base.dir/opt_DCsrch.cpp.o: /home/haozhihan/Documents/abacus-develop/source/source_base/opt_DCsrch.cpp +source/source_base/CMakeFiles/base.dir/opt_DCsrch.cpp.o: source/source_base/CMakeFiles/base.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green --progress-dir=/home/haozhihan/Documents/abacus-develop/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_31) "Building CXX object source/source_base/CMakeFiles/base.dir/opt_DCsrch.cpp.o" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT source/source_base/CMakeFiles/base.dir/opt_DCsrch.cpp.o -MF CMakeFiles/base.dir/opt_DCsrch.cpp.o.d -o CMakeFiles/base.dir/opt_DCsrch.cpp.o -c /home/haozhihan/Documents/abacus-develop/source/source_base/opt_DCsrch.cpp + +source/source_base/CMakeFiles/base.dir/opt_DCsrch.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Preprocessing CXX source to CMakeFiles/base.dir/opt_DCsrch.cpp.i" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/haozhihan/Documents/abacus-develop/source/source_base/opt_DCsrch.cpp > CMakeFiles/base.dir/opt_DCsrch.cpp.i + +source/source_base/CMakeFiles/base.dir/opt_DCsrch.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Compiling CXX source to assembly CMakeFiles/base.dir/opt_DCsrch.cpp.s" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/haozhihan/Documents/abacus-develop/source/source_base/opt_DCsrch.cpp -o CMakeFiles/base.dir/opt_DCsrch.cpp.s + +source/source_base/CMakeFiles/base.dir/para_gemm.cpp.o: source/source_base/CMakeFiles/base.dir/flags.make +source/source_base/CMakeFiles/base.dir/para_gemm.cpp.o: /home/haozhihan/Documents/abacus-develop/source/source_base/para_gemm.cpp +source/source_base/CMakeFiles/base.dir/para_gemm.cpp.o: source/source_base/CMakeFiles/base.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green --progress-dir=/home/haozhihan/Documents/abacus-develop/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_32) "Building CXX object source/source_base/CMakeFiles/base.dir/para_gemm.cpp.o" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT source/source_base/CMakeFiles/base.dir/para_gemm.cpp.o -MF CMakeFiles/base.dir/para_gemm.cpp.o.d -o CMakeFiles/base.dir/para_gemm.cpp.o -c /home/haozhihan/Documents/abacus-develop/source/source_base/para_gemm.cpp + +source/source_base/CMakeFiles/base.dir/para_gemm.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Preprocessing CXX source to CMakeFiles/base.dir/para_gemm.cpp.i" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/haozhihan/Documents/abacus-develop/source/source_base/para_gemm.cpp > CMakeFiles/base.dir/para_gemm.cpp.i + +source/source_base/CMakeFiles/base.dir/para_gemm.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Compiling CXX source to assembly CMakeFiles/base.dir/para_gemm.cpp.s" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/haozhihan/Documents/abacus-develop/source/source_base/para_gemm.cpp -o CMakeFiles/base.dir/para_gemm.cpp.s + +source/source_base/CMakeFiles/base.dir/realarray.cpp.o: source/source_base/CMakeFiles/base.dir/flags.make +source/source_base/CMakeFiles/base.dir/realarray.cpp.o: /home/haozhihan/Documents/abacus-develop/source/source_base/realarray.cpp +source/source_base/CMakeFiles/base.dir/realarray.cpp.o: source/source_base/CMakeFiles/base.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green --progress-dir=/home/haozhihan/Documents/abacus-develop/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_33) "Building CXX object source/source_base/CMakeFiles/base.dir/realarray.cpp.o" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT source/source_base/CMakeFiles/base.dir/realarray.cpp.o -MF CMakeFiles/base.dir/realarray.cpp.o.d -o CMakeFiles/base.dir/realarray.cpp.o -c /home/haozhihan/Documents/abacus-develop/source/source_base/realarray.cpp + +source/source_base/CMakeFiles/base.dir/realarray.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Preprocessing CXX source to CMakeFiles/base.dir/realarray.cpp.i" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/haozhihan/Documents/abacus-develop/source/source_base/realarray.cpp > CMakeFiles/base.dir/realarray.cpp.i + +source/source_base/CMakeFiles/base.dir/realarray.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Compiling CXX source to assembly CMakeFiles/base.dir/realarray.cpp.s" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/haozhihan/Documents/abacus-develop/source/source_base/realarray.cpp -o CMakeFiles/base.dir/realarray.cpp.s + +source/source_base/CMakeFiles/base.dir/sph_bessel_recursive-d1.cpp.o: source/source_base/CMakeFiles/base.dir/flags.make +source/source_base/CMakeFiles/base.dir/sph_bessel_recursive-d1.cpp.o: /home/haozhihan/Documents/abacus-develop/source/source_base/sph_bessel_recursive-d1.cpp +source/source_base/CMakeFiles/base.dir/sph_bessel_recursive-d1.cpp.o: source/source_base/CMakeFiles/base.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green --progress-dir=/home/haozhihan/Documents/abacus-develop/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_34) "Building CXX object source/source_base/CMakeFiles/base.dir/sph_bessel_recursive-d1.cpp.o" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT source/source_base/CMakeFiles/base.dir/sph_bessel_recursive-d1.cpp.o -MF CMakeFiles/base.dir/sph_bessel_recursive-d1.cpp.o.d -o CMakeFiles/base.dir/sph_bessel_recursive-d1.cpp.o -c /home/haozhihan/Documents/abacus-develop/source/source_base/sph_bessel_recursive-d1.cpp + +source/source_base/CMakeFiles/base.dir/sph_bessel_recursive-d1.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Preprocessing CXX source to CMakeFiles/base.dir/sph_bessel_recursive-d1.cpp.i" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/haozhihan/Documents/abacus-develop/source/source_base/sph_bessel_recursive-d1.cpp > CMakeFiles/base.dir/sph_bessel_recursive-d1.cpp.i + +source/source_base/CMakeFiles/base.dir/sph_bessel_recursive-d1.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Compiling CXX source to assembly CMakeFiles/base.dir/sph_bessel_recursive-d1.cpp.s" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/haozhihan/Documents/abacus-develop/source/source_base/sph_bessel_recursive-d1.cpp -o CMakeFiles/base.dir/sph_bessel_recursive-d1.cpp.s + +source/source_base/CMakeFiles/base.dir/sph_bessel_recursive-d2.cpp.o: source/source_base/CMakeFiles/base.dir/flags.make +source/source_base/CMakeFiles/base.dir/sph_bessel_recursive-d2.cpp.o: /home/haozhihan/Documents/abacus-develop/source/source_base/sph_bessel_recursive-d2.cpp +source/source_base/CMakeFiles/base.dir/sph_bessel_recursive-d2.cpp.o: source/source_base/CMakeFiles/base.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green --progress-dir=/home/haozhihan/Documents/abacus-develop/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_35) "Building CXX object source/source_base/CMakeFiles/base.dir/sph_bessel_recursive-d2.cpp.o" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT source/source_base/CMakeFiles/base.dir/sph_bessel_recursive-d2.cpp.o -MF CMakeFiles/base.dir/sph_bessel_recursive-d2.cpp.o.d -o CMakeFiles/base.dir/sph_bessel_recursive-d2.cpp.o -c /home/haozhihan/Documents/abacus-develop/source/source_base/sph_bessel_recursive-d2.cpp + +source/source_base/CMakeFiles/base.dir/sph_bessel_recursive-d2.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Preprocessing CXX source to CMakeFiles/base.dir/sph_bessel_recursive-d2.cpp.i" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/haozhihan/Documents/abacus-develop/source/source_base/sph_bessel_recursive-d2.cpp > CMakeFiles/base.dir/sph_bessel_recursive-d2.cpp.i + +source/source_base/CMakeFiles/base.dir/sph_bessel_recursive-d2.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Compiling CXX source to assembly CMakeFiles/base.dir/sph_bessel_recursive-d2.cpp.s" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/haozhihan/Documents/abacus-develop/source/source_base/sph_bessel_recursive-d2.cpp -o CMakeFiles/base.dir/sph_bessel_recursive-d2.cpp.s + +source/source_base/CMakeFiles/base.dir/timer.cpp.o: source/source_base/CMakeFiles/base.dir/flags.make +source/source_base/CMakeFiles/base.dir/timer.cpp.o: /home/haozhihan/Documents/abacus-develop/source/source_base/timer.cpp +source/source_base/CMakeFiles/base.dir/timer.cpp.o: source/source_base/CMakeFiles/base.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green --progress-dir=/home/haozhihan/Documents/abacus-develop/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_36) "Building CXX object source/source_base/CMakeFiles/base.dir/timer.cpp.o" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT source/source_base/CMakeFiles/base.dir/timer.cpp.o -MF CMakeFiles/base.dir/timer.cpp.o.d -o CMakeFiles/base.dir/timer.cpp.o -c /home/haozhihan/Documents/abacus-develop/source/source_base/timer.cpp + +source/source_base/CMakeFiles/base.dir/timer.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Preprocessing CXX source to CMakeFiles/base.dir/timer.cpp.i" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/haozhihan/Documents/abacus-develop/source/source_base/timer.cpp > CMakeFiles/base.dir/timer.cpp.i + +source/source_base/CMakeFiles/base.dir/timer.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Compiling CXX source to assembly CMakeFiles/base.dir/timer.cpp.s" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/haozhihan/Documents/abacus-develop/source/source_base/timer.cpp -o CMakeFiles/base.dir/timer.cpp.s + +source/source_base/CMakeFiles/base.dir/tool_check.cpp.o: source/source_base/CMakeFiles/base.dir/flags.make +source/source_base/CMakeFiles/base.dir/tool_check.cpp.o: /home/haozhihan/Documents/abacus-develop/source/source_base/tool_check.cpp +source/source_base/CMakeFiles/base.dir/tool_check.cpp.o: source/source_base/CMakeFiles/base.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green --progress-dir=/home/haozhihan/Documents/abacus-develop/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_37) "Building CXX object source/source_base/CMakeFiles/base.dir/tool_check.cpp.o" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT source/source_base/CMakeFiles/base.dir/tool_check.cpp.o -MF CMakeFiles/base.dir/tool_check.cpp.o.d -o CMakeFiles/base.dir/tool_check.cpp.o -c /home/haozhihan/Documents/abacus-develop/source/source_base/tool_check.cpp + +source/source_base/CMakeFiles/base.dir/tool_check.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Preprocessing CXX source to CMakeFiles/base.dir/tool_check.cpp.i" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/haozhihan/Documents/abacus-develop/source/source_base/tool_check.cpp > CMakeFiles/base.dir/tool_check.cpp.i + +source/source_base/CMakeFiles/base.dir/tool_check.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Compiling CXX source to assembly CMakeFiles/base.dir/tool_check.cpp.s" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/haozhihan/Documents/abacus-develop/source/source_base/tool_check.cpp -o CMakeFiles/base.dir/tool_check.cpp.s + +source/source_base/CMakeFiles/base.dir/tool_quit.cpp.o: source/source_base/CMakeFiles/base.dir/flags.make +source/source_base/CMakeFiles/base.dir/tool_quit.cpp.o: /home/haozhihan/Documents/abacus-develop/source/source_base/tool_quit.cpp +source/source_base/CMakeFiles/base.dir/tool_quit.cpp.o: source/source_base/CMakeFiles/base.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green --progress-dir=/home/haozhihan/Documents/abacus-develop/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_38) "Building CXX object source/source_base/CMakeFiles/base.dir/tool_quit.cpp.o" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT source/source_base/CMakeFiles/base.dir/tool_quit.cpp.o -MF CMakeFiles/base.dir/tool_quit.cpp.o.d -o CMakeFiles/base.dir/tool_quit.cpp.o -c /home/haozhihan/Documents/abacus-develop/source/source_base/tool_quit.cpp + +source/source_base/CMakeFiles/base.dir/tool_quit.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Preprocessing CXX source to CMakeFiles/base.dir/tool_quit.cpp.i" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/haozhihan/Documents/abacus-develop/source/source_base/tool_quit.cpp > CMakeFiles/base.dir/tool_quit.cpp.i + +source/source_base/CMakeFiles/base.dir/tool_quit.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Compiling CXX source to assembly CMakeFiles/base.dir/tool_quit.cpp.s" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/haozhihan/Documents/abacus-develop/source/source_base/tool_quit.cpp -o CMakeFiles/base.dir/tool_quit.cpp.s + +source/source_base/CMakeFiles/base.dir/tool_title.cpp.o: source/source_base/CMakeFiles/base.dir/flags.make +source/source_base/CMakeFiles/base.dir/tool_title.cpp.o: /home/haozhihan/Documents/abacus-develop/source/source_base/tool_title.cpp +source/source_base/CMakeFiles/base.dir/tool_title.cpp.o: source/source_base/CMakeFiles/base.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green --progress-dir=/home/haozhihan/Documents/abacus-develop/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_39) "Building CXX object source/source_base/CMakeFiles/base.dir/tool_title.cpp.o" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT source/source_base/CMakeFiles/base.dir/tool_title.cpp.o -MF CMakeFiles/base.dir/tool_title.cpp.o.d -o CMakeFiles/base.dir/tool_title.cpp.o -c /home/haozhihan/Documents/abacus-develop/source/source_base/tool_title.cpp + +source/source_base/CMakeFiles/base.dir/tool_title.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Preprocessing CXX source to CMakeFiles/base.dir/tool_title.cpp.i" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/haozhihan/Documents/abacus-develop/source/source_base/tool_title.cpp > CMakeFiles/base.dir/tool_title.cpp.i + +source/source_base/CMakeFiles/base.dir/tool_title.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Compiling CXX source to assembly CMakeFiles/base.dir/tool_title.cpp.s" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/haozhihan/Documents/abacus-develop/source/source_base/tool_title.cpp -o CMakeFiles/base.dir/tool_title.cpp.s + +source/source_base/CMakeFiles/base.dir/ylm.cpp.o: source/source_base/CMakeFiles/base.dir/flags.make +source/source_base/CMakeFiles/base.dir/ylm.cpp.o: /home/haozhihan/Documents/abacus-develop/source/source_base/ylm.cpp +source/source_base/CMakeFiles/base.dir/ylm.cpp.o: source/source_base/CMakeFiles/base.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green --progress-dir=/home/haozhihan/Documents/abacus-develop/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_40) "Building CXX object source/source_base/CMakeFiles/base.dir/ylm.cpp.o" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT source/source_base/CMakeFiles/base.dir/ylm.cpp.o -MF CMakeFiles/base.dir/ylm.cpp.o.d -o CMakeFiles/base.dir/ylm.cpp.o -c /home/haozhihan/Documents/abacus-develop/source/source_base/ylm.cpp + +source/source_base/CMakeFiles/base.dir/ylm.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Preprocessing CXX source to CMakeFiles/base.dir/ylm.cpp.i" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/haozhihan/Documents/abacus-develop/source/source_base/ylm.cpp > CMakeFiles/base.dir/ylm.cpp.i + +source/source_base/CMakeFiles/base.dir/ylm.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Compiling CXX source to assembly CMakeFiles/base.dir/ylm.cpp.s" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/haozhihan/Documents/abacus-develop/source/source_base/ylm.cpp -o CMakeFiles/base.dir/ylm.cpp.s + +source/source_base/CMakeFiles/base.dir/abfs-vector3_order.cpp.o: source/source_base/CMakeFiles/base.dir/flags.make +source/source_base/CMakeFiles/base.dir/abfs-vector3_order.cpp.o: /home/haozhihan/Documents/abacus-develop/source/source_base/abfs-vector3_order.cpp +source/source_base/CMakeFiles/base.dir/abfs-vector3_order.cpp.o: source/source_base/CMakeFiles/base.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green --progress-dir=/home/haozhihan/Documents/abacus-develop/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_41) "Building CXX object source/source_base/CMakeFiles/base.dir/abfs-vector3_order.cpp.o" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT source/source_base/CMakeFiles/base.dir/abfs-vector3_order.cpp.o -MF CMakeFiles/base.dir/abfs-vector3_order.cpp.o.d -o CMakeFiles/base.dir/abfs-vector3_order.cpp.o -c /home/haozhihan/Documents/abacus-develop/source/source_base/abfs-vector3_order.cpp + +source/source_base/CMakeFiles/base.dir/abfs-vector3_order.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Preprocessing CXX source to CMakeFiles/base.dir/abfs-vector3_order.cpp.i" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/haozhihan/Documents/abacus-develop/source/source_base/abfs-vector3_order.cpp > CMakeFiles/base.dir/abfs-vector3_order.cpp.i + +source/source_base/CMakeFiles/base.dir/abfs-vector3_order.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Compiling CXX source to assembly CMakeFiles/base.dir/abfs-vector3_order.cpp.s" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/haozhihan/Documents/abacus-develop/source/source_base/abfs-vector3_order.cpp -o CMakeFiles/base.dir/abfs-vector3_order.cpp.s + +source/source_base/CMakeFiles/base.dir/parallel_common.cpp.o: source/source_base/CMakeFiles/base.dir/flags.make +source/source_base/CMakeFiles/base.dir/parallel_common.cpp.o: /home/haozhihan/Documents/abacus-develop/source/source_base/parallel_common.cpp +source/source_base/CMakeFiles/base.dir/parallel_common.cpp.o: source/source_base/CMakeFiles/base.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green --progress-dir=/home/haozhihan/Documents/abacus-develop/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_42) "Building CXX object source/source_base/CMakeFiles/base.dir/parallel_common.cpp.o" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT source/source_base/CMakeFiles/base.dir/parallel_common.cpp.o -MF CMakeFiles/base.dir/parallel_common.cpp.o.d -o CMakeFiles/base.dir/parallel_common.cpp.o -c /home/haozhihan/Documents/abacus-develop/source/source_base/parallel_common.cpp + +source/source_base/CMakeFiles/base.dir/parallel_common.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Preprocessing CXX source to CMakeFiles/base.dir/parallel_common.cpp.i" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/haozhihan/Documents/abacus-develop/source/source_base/parallel_common.cpp > CMakeFiles/base.dir/parallel_common.cpp.i + +source/source_base/CMakeFiles/base.dir/parallel_common.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Compiling CXX source to assembly CMakeFiles/base.dir/parallel_common.cpp.s" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/haozhihan/Documents/abacus-develop/source/source_base/parallel_common.cpp -o CMakeFiles/base.dir/parallel_common.cpp.s + +source/source_base/CMakeFiles/base.dir/parallel_global.cpp.o: source/source_base/CMakeFiles/base.dir/flags.make +source/source_base/CMakeFiles/base.dir/parallel_global.cpp.o: /home/haozhihan/Documents/abacus-develop/source/source_base/parallel_global.cpp +source/source_base/CMakeFiles/base.dir/parallel_global.cpp.o: source/source_base/CMakeFiles/base.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green --progress-dir=/home/haozhihan/Documents/abacus-develop/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_43) "Building CXX object source/source_base/CMakeFiles/base.dir/parallel_global.cpp.o" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT source/source_base/CMakeFiles/base.dir/parallel_global.cpp.o -MF CMakeFiles/base.dir/parallel_global.cpp.o.d -o CMakeFiles/base.dir/parallel_global.cpp.o -c /home/haozhihan/Documents/abacus-develop/source/source_base/parallel_global.cpp + +source/source_base/CMakeFiles/base.dir/parallel_global.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Preprocessing CXX source to CMakeFiles/base.dir/parallel_global.cpp.i" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/haozhihan/Documents/abacus-develop/source/source_base/parallel_global.cpp > CMakeFiles/base.dir/parallel_global.cpp.i + +source/source_base/CMakeFiles/base.dir/parallel_global.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Compiling CXX source to assembly CMakeFiles/base.dir/parallel_global.cpp.s" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/haozhihan/Documents/abacus-develop/source/source_base/parallel_global.cpp -o CMakeFiles/base.dir/parallel_global.cpp.s + +source/source_base/CMakeFiles/base.dir/parallel_comm.cpp.o: source/source_base/CMakeFiles/base.dir/flags.make +source/source_base/CMakeFiles/base.dir/parallel_comm.cpp.o: /home/haozhihan/Documents/abacus-develop/source/source_base/parallel_comm.cpp +source/source_base/CMakeFiles/base.dir/parallel_comm.cpp.o: source/source_base/CMakeFiles/base.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green --progress-dir=/home/haozhihan/Documents/abacus-develop/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_44) "Building CXX object source/source_base/CMakeFiles/base.dir/parallel_comm.cpp.o" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT source/source_base/CMakeFiles/base.dir/parallel_comm.cpp.o -MF CMakeFiles/base.dir/parallel_comm.cpp.o.d -o CMakeFiles/base.dir/parallel_comm.cpp.o -c /home/haozhihan/Documents/abacus-develop/source/source_base/parallel_comm.cpp + +source/source_base/CMakeFiles/base.dir/parallel_comm.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Preprocessing CXX source to CMakeFiles/base.dir/parallel_comm.cpp.i" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/haozhihan/Documents/abacus-develop/source/source_base/parallel_comm.cpp > CMakeFiles/base.dir/parallel_comm.cpp.i + +source/source_base/CMakeFiles/base.dir/parallel_comm.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Compiling CXX source to assembly CMakeFiles/base.dir/parallel_comm.cpp.s" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/haozhihan/Documents/abacus-develop/source/source_base/parallel_comm.cpp -o CMakeFiles/base.dir/parallel_comm.cpp.s + +source/source_base/CMakeFiles/base.dir/parallel_reduce.cpp.o: source/source_base/CMakeFiles/base.dir/flags.make +source/source_base/CMakeFiles/base.dir/parallel_reduce.cpp.o: /home/haozhihan/Documents/abacus-develop/source/source_base/parallel_reduce.cpp +source/source_base/CMakeFiles/base.dir/parallel_reduce.cpp.o: source/source_base/CMakeFiles/base.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green --progress-dir=/home/haozhihan/Documents/abacus-develop/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_45) "Building CXX object source/source_base/CMakeFiles/base.dir/parallel_reduce.cpp.o" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT source/source_base/CMakeFiles/base.dir/parallel_reduce.cpp.o -MF CMakeFiles/base.dir/parallel_reduce.cpp.o.d -o CMakeFiles/base.dir/parallel_reduce.cpp.o -c /home/haozhihan/Documents/abacus-develop/source/source_base/parallel_reduce.cpp + +source/source_base/CMakeFiles/base.dir/parallel_reduce.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Preprocessing CXX source to CMakeFiles/base.dir/parallel_reduce.cpp.i" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/haozhihan/Documents/abacus-develop/source/source_base/parallel_reduce.cpp > CMakeFiles/base.dir/parallel_reduce.cpp.i + +source/source_base/CMakeFiles/base.dir/parallel_reduce.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Compiling CXX source to assembly CMakeFiles/base.dir/parallel_reduce.cpp.s" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/haozhihan/Documents/abacus-develop/source/source_base/parallel_reduce.cpp -o CMakeFiles/base.dir/parallel_reduce.cpp.s + +source/source_base/CMakeFiles/base.dir/parallel_device.cpp.o: source/source_base/CMakeFiles/base.dir/flags.make +source/source_base/CMakeFiles/base.dir/parallel_device.cpp.o: /home/haozhihan/Documents/abacus-develop/source/source_base/parallel_device.cpp +source/source_base/CMakeFiles/base.dir/parallel_device.cpp.o: source/source_base/CMakeFiles/base.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green --progress-dir=/home/haozhihan/Documents/abacus-develop/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_46) "Building CXX object source/source_base/CMakeFiles/base.dir/parallel_device.cpp.o" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT source/source_base/CMakeFiles/base.dir/parallel_device.cpp.o -MF CMakeFiles/base.dir/parallel_device.cpp.o.d -o CMakeFiles/base.dir/parallel_device.cpp.o -c /home/haozhihan/Documents/abacus-develop/source/source_base/parallel_device.cpp + +source/source_base/CMakeFiles/base.dir/parallel_device.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Preprocessing CXX source to CMakeFiles/base.dir/parallel_device.cpp.i" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/haozhihan/Documents/abacus-develop/source/source_base/parallel_device.cpp > CMakeFiles/base.dir/parallel_device.cpp.i + +source/source_base/CMakeFiles/base.dir/parallel_device.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Compiling CXX source to assembly CMakeFiles/base.dir/parallel_device.cpp.s" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/haozhihan/Documents/abacus-develop/source/source_base/parallel_device.cpp -o CMakeFiles/base.dir/parallel_device.cpp.s + +source/source_base/CMakeFiles/base.dir/spherical_bessel_transformer.cpp.o: source/source_base/CMakeFiles/base.dir/flags.make +source/source_base/CMakeFiles/base.dir/spherical_bessel_transformer.cpp.o: /home/haozhihan/Documents/abacus-develop/source/source_base/spherical_bessel_transformer.cpp +source/source_base/CMakeFiles/base.dir/spherical_bessel_transformer.cpp.o: source/source_base/CMakeFiles/base.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green --progress-dir=/home/haozhihan/Documents/abacus-develop/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_47) "Building CXX object source/source_base/CMakeFiles/base.dir/spherical_bessel_transformer.cpp.o" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT source/source_base/CMakeFiles/base.dir/spherical_bessel_transformer.cpp.o -MF CMakeFiles/base.dir/spherical_bessel_transformer.cpp.o.d -o CMakeFiles/base.dir/spherical_bessel_transformer.cpp.o -c /home/haozhihan/Documents/abacus-develop/source/source_base/spherical_bessel_transformer.cpp + +source/source_base/CMakeFiles/base.dir/spherical_bessel_transformer.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Preprocessing CXX source to CMakeFiles/base.dir/spherical_bessel_transformer.cpp.i" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/haozhihan/Documents/abacus-develop/source/source_base/spherical_bessel_transformer.cpp > CMakeFiles/base.dir/spherical_bessel_transformer.cpp.i + +source/source_base/CMakeFiles/base.dir/spherical_bessel_transformer.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Compiling CXX source to assembly CMakeFiles/base.dir/spherical_bessel_transformer.cpp.s" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/haozhihan/Documents/abacus-develop/source/source_base/spherical_bessel_transformer.cpp -o CMakeFiles/base.dir/spherical_bessel_transformer.cpp.s + +source/source_base/CMakeFiles/base.dir/cubic_spline.cpp.o: source/source_base/CMakeFiles/base.dir/flags.make +source/source_base/CMakeFiles/base.dir/cubic_spline.cpp.o: /home/haozhihan/Documents/abacus-develop/source/source_base/cubic_spline.cpp +source/source_base/CMakeFiles/base.dir/cubic_spline.cpp.o: source/source_base/CMakeFiles/base.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green --progress-dir=/home/haozhihan/Documents/abacus-develop/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_48) "Building CXX object source/source_base/CMakeFiles/base.dir/cubic_spline.cpp.o" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT source/source_base/CMakeFiles/base.dir/cubic_spline.cpp.o -MF CMakeFiles/base.dir/cubic_spline.cpp.o.d -o CMakeFiles/base.dir/cubic_spline.cpp.o -c /home/haozhihan/Documents/abacus-develop/source/source_base/cubic_spline.cpp + +source/source_base/CMakeFiles/base.dir/cubic_spline.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Preprocessing CXX source to CMakeFiles/base.dir/cubic_spline.cpp.i" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/haozhihan/Documents/abacus-develop/source/source_base/cubic_spline.cpp > CMakeFiles/base.dir/cubic_spline.cpp.i + +source/source_base/CMakeFiles/base.dir/cubic_spline.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Compiling CXX source to assembly CMakeFiles/base.dir/cubic_spline.cpp.s" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/haozhihan/Documents/abacus-develop/source/source_base/cubic_spline.cpp -o CMakeFiles/base.dir/cubic_spline.cpp.s + +source/source_base/CMakeFiles/base.dir/parallel_2d.cpp.o: source/source_base/CMakeFiles/base.dir/flags.make +source/source_base/CMakeFiles/base.dir/parallel_2d.cpp.o: /home/haozhihan/Documents/abacus-develop/source/source_base/parallel_2d.cpp +source/source_base/CMakeFiles/base.dir/parallel_2d.cpp.o: source/source_base/CMakeFiles/base.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green --progress-dir=/home/haozhihan/Documents/abacus-develop/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_49) "Building CXX object source/source_base/CMakeFiles/base.dir/parallel_2d.cpp.o" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT source/source_base/CMakeFiles/base.dir/parallel_2d.cpp.o -MF CMakeFiles/base.dir/parallel_2d.cpp.o.d -o CMakeFiles/base.dir/parallel_2d.cpp.o -c /home/haozhihan/Documents/abacus-develop/source/source_base/parallel_2d.cpp + +source/source_base/CMakeFiles/base.dir/parallel_2d.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Preprocessing CXX source to CMakeFiles/base.dir/parallel_2d.cpp.i" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/haozhihan/Documents/abacus-develop/source/source_base/parallel_2d.cpp > CMakeFiles/base.dir/parallel_2d.cpp.i + +source/source_base/CMakeFiles/base.dir/parallel_2d.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Compiling CXX source to assembly CMakeFiles/base.dir/parallel_2d.cpp.s" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/haozhihan/Documents/abacus-develop/source/source_base/parallel_2d.cpp -o CMakeFiles/base.dir/parallel_2d.cpp.s + +source/source_base/CMakeFiles/base.dir/projgen.cpp.o: source/source_base/CMakeFiles/base.dir/flags.make +source/source_base/CMakeFiles/base.dir/projgen.cpp.o: /home/haozhihan/Documents/abacus-develop/source/source_base/projgen.cpp +source/source_base/CMakeFiles/base.dir/projgen.cpp.o: source/source_base/CMakeFiles/base.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green --progress-dir=/home/haozhihan/Documents/abacus-develop/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_50) "Building CXX object source/source_base/CMakeFiles/base.dir/projgen.cpp.o" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT source/source_base/CMakeFiles/base.dir/projgen.cpp.o -MF CMakeFiles/base.dir/projgen.cpp.o.d -o CMakeFiles/base.dir/projgen.cpp.o -c /home/haozhihan/Documents/abacus-develop/source/source_base/projgen.cpp + +source/source_base/CMakeFiles/base.dir/projgen.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Preprocessing CXX source to CMakeFiles/base.dir/projgen.cpp.i" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/haozhihan/Documents/abacus-develop/source/source_base/projgen.cpp > CMakeFiles/base.dir/projgen.cpp.i + +source/source_base/CMakeFiles/base.dir/projgen.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Compiling CXX source to assembly CMakeFiles/base.dir/projgen.cpp.s" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/haozhihan/Documents/abacus-develop/source/source_base/projgen.cpp -o CMakeFiles/base.dir/projgen.cpp.s + +source/source_base/CMakeFiles/base.dir/module_mixing/mixing_data.cpp.o: source/source_base/CMakeFiles/base.dir/flags.make +source/source_base/CMakeFiles/base.dir/module_mixing/mixing_data.cpp.o: /home/haozhihan/Documents/abacus-develop/source/source_base/module_mixing/mixing_data.cpp +source/source_base/CMakeFiles/base.dir/module_mixing/mixing_data.cpp.o: source/source_base/CMakeFiles/base.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green --progress-dir=/home/haozhihan/Documents/abacus-develop/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_51) "Building CXX object source/source_base/CMakeFiles/base.dir/module_mixing/mixing_data.cpp.o" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT source/source_base/CMakeFiles/base.dir/module_mixing/mixing_data.cpp.o -MF CMakeFiles/base.dir/module_mixing/mixing_data.cpp.o.d -o CMakeFiles/base.dir/module_mixing/mixing_data.cpp.o -c /home/haozhihan/Documents/abacus-develop/source/source_base/module_mixing/mixing_data.cpp + +source/source_base/CMakeFiles/base.dir/module_mixing/mixing_data.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Preprocessing CXX source to CMakeFiles/base.dir/module_mixing/mixing_data.cpp.i" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/haozhihan/Documents/abacus-develop/source/source_base/module_mixing/mixing_data.cpp > CMakeFiles/base.dir/module_mixing/mixing_data.cpp.i + +source/source_base/CMakeFiles/base.dir/module_mixing/mixing_data.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Compiling CXX source to assembly CMakeFiles/base.dir/module_mixing/mixing_data.cpp.s" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/haozhihan/Documents/abacus-develop/source/source_base/module_mixing/mixing_data.cpp -o CMakeFiles/base.dir/module_mixing/mixing_data.cpp.s + +source/source_base/CMakeFiles/base.dir/module_mixing/mixing.cpp.o: source/source_base/CMakeFiles/base.dir/flags.make +source/source_base/CMakeFiles/base.dir/module_mixing/mixing.cpp.o: /home/haozhihan/Documents/abacus-develop/source/source_base/module_mixing/mixing.cpp +source/source_base/CMakeFiles/base.dir/module_mixing/mixing.cpp.o: source/source_base/CMakeFiles/base.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green --progress-dir=/home/haozhihan/Documents/abacus-develop/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_52) "Building CXX object source/source_base/CMakeFiles/base.dir/module_mixing/mixing.cpp.o" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT source/source_base/CMakeFiles/base.dir/module_mixing/mixing.cpp.o -MF CMakeFiles/base.dir/module_mixing/mixing.cpp.o.d -o CMakeFiles/base.dir/module_mixing/mixing.cpp.o -c /home/haozhihan/Documents/abacus-develop/source/source_base/module_mixing/mixing.cpp + +source/source_base/CMakeFiles/base.dir/module_mixing/mixing.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Preprocessing CXX source to CMakeFiles/base.dir/module_mixing/mixing.cpp.i" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/haozhihan/Documents/abacus-develop/source/source_base/module_mixing/mixing.cpp > CMakeFiles/base.dir/module_mixing/mixing.cpp.i + +source/source_base/CMakeFiles/base.dir/module_mixing/mixing.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Compiling CXX source to assembly CMakeFiles/base.dir/module_mixing/mixing.cpp.s" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/haozhihan/Documents/abacus-develop/source/source_base/module_mixing/mixing.cpp -o CMakeFiles/base.dir/module_mixing/mixing.cpp.s + +source/source_base/CMakeFiles/base.dir/module_mixing/plain_mixing.cpp.o: source/source_base/CMakeFiles/base.dir/flags.make +source/source_base/CMakeFiles/base.dir/module_mixing/plain_mixing.cpp.o: /home/haozhihan/Documents/abacus-develop/source/source_base/module_mixing/plain_mixing.cpp +source/source_base/CMakeFiles/base.dir/module_mixing/plain_mixing.cpp.o: source/source_base/CMakeFiles/base.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green --progress-dir=/home/haozhihan/Documents/abacus-develop/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_53) "Building CXX object source/source_base/CMakeFiles/base.dir/module_mixing/plain_mixing.cpp.o" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT source/source_base/CMakeFiles/base.dir/module_mixing/plain_mixing.cpp.o -MF CMakeFiles/base.dir/module_mixing/plain_mixing.cpp.o.d -o CMakeFiles/base.dir/module_mixing/plain_mixing.cpp.o -c /home/haozhihan/Documents/abacus-develop/source/source_base/module_mixing/plain_mixing.cpp + +source/source_base/CMakeFiles/base.dir/module_mixing/plain_mixing.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Preprocessing CXX source to CMakeFiles/base.dir/module_mixing/plain_mixing.cpp.i" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/haozhihan/Documents/abacus-develop/source/source_base/module_mixing/plain_mixing.cpp > CMakeFiles/base.dir/module_mixing/plain_mixing.cpp.i + +source/source_base/CMakeFiles/base.dir/module_mixing/plain_mixing.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Compiling CXX source to assembly CMakeFiles/base.dir/module_mixing/plain_mixing.cpp.s" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/haozhihan/Documents/abacus-develop/source/source_base/module_mixing/plain_mixing.cpp -o CMakeFiles/base.dir/module_mixing/plain_mixing.cpp.s + +source/source_base/CMakeFiles/base.dir/module_mixing/pulay_mixing.cpp.o: source/source_base/CMakeFiles/base.dir/flags.make +source/source_base/CMakeFiles/base.dir/module_mixing/pulay_mixing.cpp.o: /home/haozhihan/Documents/abacus-develop/source/source_base/module_mixing/pulay_mixing.cpp +source/source_base/CMakeFiles/base.dir/module_mixing/pulay_mixing.cpp.o: source/source_base/CMakeFiles/base.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green --progress-dir=/home/haozhihan/Documents/abacus-develop/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_54) "Building CXX object source/source_base/CMakeFiles/base.dir/module_mixing/pulay_mixing.cpp.o" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT source/source_base/CMakeFiles/base.dir/module_mixing/pulay_mixing.cpp.o -MF CMakeFiles/base.dir/module_mixing/pulay_mixing.cpp.o.d -o CMakeFiles/base.dir/module_mixing/pulay_mixing.cpp.o -c /home/haozhihan/Documents/abacus-develop/source/source_base/module_mixing/pulay_mixing.cpp + +source/source_base/CMakeFiles/base.dir/module_mixing/pulay_mixing.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Preprocessing CXX source to CMakeFiles/base.dir/module_mixing/pulay_mixing.cpp.i" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/haozhihan/Documents/abacus-develop/source/source_base/module_mixing/pulay_mixing.cpp > CMakeFiles/base.dir/module_mixing/pulay_mixing.cpp.i + +source/source_base/CMakeFiles/base.dir/module_mixing/pulay_mixing.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Compiling CXX source to assembly CMakeFiles/base.dir/module_mixing/pulay_mixing.cpp.s" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/haozhihan/Documents/abacus-develop/source/source_base/module_mixing/pulay_mixing.cpp -o CMakeFiles/base.dir/module_mixing/pulay_mixing.cpp.s + +source/source_base/CMakeFiles/base.dir/module_mixing/broyden_mixing.cpp.o: source/source_base/CMakeFiles/base.dir/flags.make +source/source_base/CMakeFiles/base.dir/module_mixing/broyden_mixing.cpp.o: /home/haozhihan/Documents/abacus-develop/source/source_base/module_mixing/broyden_mixing.cpp +source/source_base/CMakeFiles/base.dir/module_mixing/broyden_mixing.cpp.o: source/source_base/CMakeFiles/base.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green --progress-dir=/home/haozhihan/Documents/abacus-develop/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_55) "Building CXX object source/source_base/CMakeFiles/base.dir/module_mixing/broyden_mixing.cpp.o" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT source/source_base/CMakeFiles/base.dir/module_mixing/broyden_mixing.cpp.o -MF CMakeFiles/base.dir/module_mixing/broyden_mixing.cpp.o.d -o CMakeFiles/base.dir/module_mixing/broyden_mixing.cpp.o -c /home/haozhihan/Documents/abacus-develop/source/source_base/module_mixing/broyden_mixing.cpp + +source/source_base/CMakeFiles/base.dir/module_mixing/broyden_mixing.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Preprocessing CXX source to CMakeFiles/base.dir/module_mixing/broyden_mixing.cpp.i" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/haozhihan/Documents/abacus-develop/source/source_base/module_mixing/broyden_mixing.cpp > CMakeFiles/base.dir/module_mixing/broyden_mixing.cpp.i + +source/source_base/CMakeFiles/base.dir/module_mixing/broyden_mixing.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Compiling CXX source to assembly CMakeFiles/base.dir/module_mixing/broyden_mixing.cpp.s" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/haozhihan/Documents/abacus-develop/source/source_base/module_mixing/broyden_mixing.cpp -o CMakeFiles/base.dir/module_mixing/broyden_mixing.cpp.s + +base: source/source_base/CMakeFiles/base.dir/assoc_laguerre.cpp.o +base: source/source_base/CMakeFiles/base.dir/blas_connector_base.cpp.o +base: source/source_base/CMakeFiles/base.dir/blas_connector_vector.cpp.o +base: source/source_base/CMakeFiles/base.dir/blas_connector_matrix.cpp.o +base: source/source_base/CMakeFiles/base.dir/clebsch_gordan_coeff.cpp.o +base: source/source_base/CMakeFiles/base.dir/complexarray.cpp.o +base: source/source_base/CMakeFiles/base.dir/complexmatrix.cpp.o +base: source/source_base/CMakeFiles/base.dir/element_basis_index.cpp.o +base: source/source_base/CMakeFiles/base.dir/export.cpp.o +base: source/source_base/CMakeFiles/base.dir/inverse_matrix.cpp.o +base: source/source_base/CMakeFiles/base.dir/gather_math_lib_info.cpp.o +base: source/source_base/CMakeFiles/base.dir/global_file.cpp.o +base: source/source_base/CMakeFiles/base.dir/global_function.cpp.o +base: source/source_base/CMakeFiles/base.dir/global_function_ddotreal.cpp.o +base: source/source_base/CMakeFiles/base.dir/global_variable.cpp.o +base: source/source_base/CMakeFiles/base.dir/intarray.cpp.o +base: source/source_base/CMakeFiles/base.dir/math_integral.cpp.o +base: source/source_base/CMakeFiles/base.dir/math_lebedev_laikov.cpp.o +base: source/source_base/CMakeFiles/base.dir/math_polyint.cpp.o +base: source/source_base/CMakeFiles/base.dir/math_sphbes.cpp.o +base: source/source_base/CMakeFiles/base.dir/math_erf_complex.cpp.o +base: source/source_base/CMakeFiles/base.dir/math_ylmreal.cpp.o +base: source/source_base/CMakeFiles/base.dir/math_bspline.cpp.o +base: source/source_base/CMakeFiles/base.dir/math_chebyshev.cpp.o +base: source/source_base/CMakeFiles/base.dir/mathzone_add1.cpp.o +base: source/source_base/CMakeFiles/base.dir/matrix.cpp.o +base: source/source_base/CMakeFiles/base.dir/matrix3.cpp.o +base: source/source_base/CMakeFiles/base.dir/memory.cpp.o +base: source/source_base/CMakeFiles/base.dir/mymath.cpp.o +base: source/source_base/CMakeFiles/base.dir/opt_CG.cpp.o +base: source/source_base/CMakeFiles/base.dir/opt_DCsrch.cpp.o +base: source/source_base/CMakeFiles/base.dir/para_gemm.cpp.o +base: source/source_base/CMakeFiles/base.dir/realarray.cpp.o +base: source/source_base/CMakeFiles/base.dir/sph_bessel_recursive-d1.cpp.o +base: source/source_base/CMakeFiles/base.dir/sph_bessel_recursive-d2.cpp.o +base: source/source_base/CMakeFiles/base.dir/timer.cpp.o +base: source/source_base/CMakeFiles/base.dir/tool_check.cpp.o +base: source/source_base/CMakeFiles/base.dir/tool_quit.cpp.o +base: source/source_base/CMakeFiles/base.dir/tool_title.cpp.o +base: source/source_base/CMakeFiles/base.dir/ylm.cpp.o +base: source/source_base/CMakeFiles/base.dir/abfs-vector3_order.cpp.o +base: source/source_base/CMakeFiles/base.dir/parallel_common.cpp.o +base: source/source_base/CMakeFiles/base.dir/parallel_global.cpp.o +base: source/source_base/CMakeFiles/base.dir/parallel_comm.cpp.o +base: source/source_base/CMakeFiles/base.dir/parallel_reduce.cpp.o +base: source/source_base/CMakeFiles/base.dir/parallel_device.cpp.o +base: source/source_base/CMakeFiles/base.dir/spherical_bessel_transformer.cpp.o +base: source/source_base/CMakeFiles/base.dir/cubic_spline.cpp.o +base: source/source_base/CMakeFiles/base.dir/parallel_2d.cpp.o +base: source/source_base/CMakeFiles/base.dir/projgen.cpp.o +base: source/source_base/CMakeFiles/base.dir/module_mixing/mixing_data.cpp.o +base: source/source_base/CMakeFiles/base.dir/module_mixing/mixing.cpp.o +base: source/source_base/CMakeFiles/base.dir/module_mixing/plain_mixing.cpp.o +base: source/source_base/CMakeFiles/base.dir/module_mixing/pulay_mixing.cpp.o +base: source/source_base/CMakeFiles/base.dir/module_mixing/broyden_mixing.cpp.o +base: source/source_base/CMakeFiles/base.dir/build.make +.PHONY : base + +# Rule to build all files generated by this target. +source/source_base/CMakeFiles/base.dir/build: base +.PHONY : source/source_base/CMakeFiles/base.dir/build + +source/source_base/CMakeFiles/base.dir/clean: + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base && $(CMAKE_COMMAND) -P CMakeFiles/base.dir/cmake_clean.cmake +.PHONY : source/source_base/CMakeFiles/base.dir/clean + +source/source_base/CMakeFiles/base.dir/depend: + cd /home/haozhihan/Documents/abacus-develop/build && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/haozhihan/Documents/abacus-develop /home/haozhihan/Documents/abacus-develop/source/source_base /home/haozhihan/Documents/abacus-develop/build /home/haozhihan/Documents/abacus-develop/build/source/source_base /home/haozhihan/Documents/abacus-develop/build/source/source_base/CMakeFiles/base.dir/DependInfo.cmake "--color=$(COLOR)" +.PHONY : source/source_base/CMakeFiles/base.dir/depend + diff --git a/build/source/source_base/CMakeFiles/base.dir/clebsch_gordan_coeff.cpp.o b/build/source/source_base/CMakeFiles/base.dir/clebsch_gordan_coeff.cpp.o new file mode 100644 index 0000000000..cd3487f33b Binary files /dev/null and b/build/source/source_base/CMakeFiles/base.dir/clebsch_gordan_coeff.cpp.o differ diff --git a/build/source/source_base/CMakeFiles/base.dir/clebsch_gordan_coeff.cpp.o.d b/build/source/source_base/CMakeFiles/base.dir/clebsch_gordan_coeff.cpp.o.d new file mode 100644 index 0000000000..6457141e76 --- /dev/null +++ b/build/source/source_base/CMakeFiles/base.dir/clebsch_gordan_coeff.cpp.o.d @@ -0,0 +1,224 @@ +source/source_base/CMakeFiles/base.dir/clebsch_gordan_coeff.cpp.o: \ + /home/haozhihan/Documents/abacus-develop/source/source_base/clebsch_gordan_coeff.cpp \ + /usr/include/stdc-predef.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/clebsch_gordan_coeff.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/intarray.h \ + /usr/include/c++/11/cassert \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++config.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/os_defines.h \ + /usr/include/features.h /usr/include/features-time64.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/cpu_defines.h \ + /usr/include/assert.h /usr/include/c++/11/fstream \ + /usr/include/c++/11/istream /usr/include/c++/11/ios \ + /usr/include/c++/11/iosfwd /usr/include/c++/11/bits/stringfwd.h \ + /usr/include/c++/11/bits/memoryfwd.h /usr/include/c++/11/bits/postypes.h \ + /usr/include/c++/11/cwchar /usr/include/wchar.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/wchar.h \ + /usr/include/x86_64-linux-gnu/bits/types/wint_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/wchar2.h \ + /usr/include/c++/11/exception /usr/include/c++/11/bits/exception.h \ + /usr/include/c++/11/bits/exception_ptr.h \ + /usr/include/c++/11/bits/exception_defines.h \ + /usr/include/c++/11/bits/cxxabi_init_exception.h \ + /usr/include/c++/11/typeinfo /usr/include/c++/11/bits/hash_bytes.h \ + /usr/include/c++/11/new /usr/include/c++/11/bits/move.h \ + /usr/include/c++/11/type_traits \ + /usr/include/c++/11/bits/nested_exception.h \ + /usr/include/c++/11/bits/char_traits.h \ + /usr/include/c++/11/bits/stl_algobase.h \ + /usr/include/c++/11/bits/functexcept.h \ + /usr/include/c++/11/bits/cpp_type_traits.h \ + /usr/include/c++/11/ext/type_traits.h \ + /usr/include/c++/11/ext/numeric_traits.h \ + /usr/include/c++/11/bits/stl_pair.h \ + /usr/include/c++/11/bits/stl_iterator_base_types.h \ + /usr/include/c++/11/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/11/bits/concept_check.h \ + /usr/include/c++/11/debug/assertions.h \ + /usr/include/c++/11/bits/stl_iterator.h \ + /usr/include/c++/11/bits/ptr_traits.h /usr/include/c++/11/debug/debug.h \ + /usr/include/c++/11/bits/predefined_ops.h /usr/include/c++/11/cstdint \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdint.h /usr/include/stdint.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-uintn.h \ + /usr/include/c++/11/bits/localefwd.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++locale.h \ + /usr/include/c++/11/clocale /usr/include/locale.h \ + /usr/include/x86_64-linux-gnu/bits/locale.h /usr/include/c++/11/cctype \ + /usr/include/ctype.h /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/c++/11/bits/ios_base.h /usr/include/c++/11/ext/atomicity.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr-default.h \ + /usr/include/pthread.h /usr/include/sched.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/sched.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h \ + /usr/include/x86_64-linux-gnu/bits/cpu-set.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/timex.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/atomic_wide_counter.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h \ + /usr/include/x86_64-linux-gnu/bits/setjmp.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct___jmp_buf_tag.h \ + /usr/include/x86_64-linux-gnu/bits/pthread_stack_min-dynamic.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/atomic_word.h \ + /usr/include/x86_64-linux-gnu/sys/single_threaded.h \ + /usr/include/c++/11/bits/locale_classes.h /usr/include/c++/11/string \ + /usr/include/c++/11/bits/allocator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++allocator.h \ + /usr/include/c++/11/ext/new_allocator.h \ + /usr/include/c++/11/bits/ostream_insert.h \ + /usr/include/c++/11/bits/cxxabi_forced.h \ + /usr/include/c++/11/bits/stl_function.h \ + /usr/include/c++/11/backward/binders.h \ + /usr/include/c++/11/bits/range_access.h \ + /usr/include/c++/11/initializer_list \ + /usr/include/c++/11/bits/basic_string.h \ + /usr/include/c++/11/ext/alloc_traits.h \ + /usr/include/c++/11/bits/alloc_traits.h \ + /usr/include/c++/11/bits/stl_construct.h \ + /usr/include/c++/11/ext/string_conversions.h /usr/include/c++/11/cstdlib \ + /usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/sys/types.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/include/c++/11/bits/std_abs.h /usr/include/c++/11/cstdio \ + /usr/include/stdio.h /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/c++/11/cerrno \ + /usr/include/errno.h /usr/include/x86_64-linux-gnu/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/bits/types/error_t.h \ + /usr/include/c++/11/bits/charconv.h \ + /usr/include/c++/11/bits/functional_hash.h \ + /usr/include/c++/11/bits/basic_string.tcc \ + /usr/include/c++/11/bits/locale_classes.tcc \ + /usr/include/c++/11/system_error \ + /usr/include/x86_64-linux-gnu/c++/11/bits/error_constants.h \ + /usr/include/c++/11/stdexcept /usr/include/c++/11/streambuf \ + /usr/include/c++/11/bits/streambuf.tcc \ + /usr/include/c++/11/bits/basic_ios.h \ + /usr/include/c++/11/bits/locale_facets.h /usr/include/c++/11/cwctype \ + /usr/include/wctype.h /usr/include/x86_64-linux-gnu/bits/wctype-wchar.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_base.h \ + /usr/include/c++/11/bits/streambuf_iterator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_inline.h \ + /usr/include/c++/11/bits/locale_facets.tcc \ + /usr/include/c++/11/bits/basic_ios.tcc /usr/include/c++/11/ostream \ + /usr/include/c++/11/bits/ostream.tcc \ + /usr/include/c++/11/bits/istream.tcc /usr/include/c++/11/bits/codecvt.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/basic_file.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++io.h \ + /usr/include/c++/11/bits/fstream.tcc /usr/include/c++/11/iomanip \ + /usr/include/c++/11/locale \ + /usr/include/c++/11/bits/locale_facets_nonio.h /usr/include/c++/11/ctime \ + /usr/include/x86_64-linux-gnu/c++/11/bits/time_members.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/messages_members.h \ + /usr/include/libintl.h /usr/include/c++/11/bits/locale_facets_nonio.tcc \ + /usr/include/c++/11/bits/locale_conv.h \ + /usr/include/c++/11/bits/unique_ptr.h /usr/include/c++/11/utility \ + /usr/include/c++/11/bits/stl_relops.h /usr/include/c++/11/tuple \ + /usr/include/c++/11/array /usr/include/c++/11/bits/uses_allocator.h \ + /usr/include/c++/11/bits/invoke.h /usr/include/c++/11/iostream \ + /home/haozhihan/Documents/abacus-develop/source/source_base/matrix.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/realarray.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/vector3.h \ + /usr/include/c++/11/cmath /usr/include/math.h \ + /usr/include/x86_64-linux-gnu/bits/math-vector.h \ + /usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h \ + /usr/include/x86_64-linux-gnu/bits/flt-eval-method.h \ + /usr/include/x86_64-linux-gnu/bits/fp-logb.h \ + /usr/include/x86_64-linux-gnu/bits/fp-fast.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-narrow.h \ + /usr/include/x86_64-linux-gnu/bits/iscanonical.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/constants.h \ + /usr/include/c++/11/complex /usr/include/c++/11/sstream \ + /usr/include/c++/11/bits/sstream.tcc \ + /home/haozhihan/Documents/abacus-develop/source/source_base/inverse_matrix.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/global_function.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/blas_connector.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_device/types.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/macros.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/global_function-func_each_2.h \ + /usr/include/c++/11/functional /usr/include/c++/11/bits/refwrap.h \ + /usr/include/c++/11/bits/std_function.h /usr/include/c++/11/map \ + /usr/include/c++/11/bits/stl_tree.h \ + /usr/include/c++/11/ext/aligned_buffer.h \ + /usr/include/c++/11/bits/stl_map.h \ + /usr/include/c++/11/bits/stl_multimap.h \ + /usr/include/c++/11/bits/erase_if.h /usr/include/c++/11/vector \ + /usr/include/c++/11/bits/stl_uninitialized.h \ + /usr/include/c++/11/bits/stl_vector.h \ + /usr/include/c++/11/bits/stl_bvector.h \ + /usr/include/c++/11/bits/vector.tcc \ + /home/haozhihan/Documents/abacus-develop/source/source_base/global_variable.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/tool_check.h \ + /usr/include/c++/11/valarray /usr/include/c++/11/algorithm \ + /usr/include/c++/11/bits/stl_algo.h \ + /usr/include/c++/11/bits/algorithmfwd.h \ + /usr/include/c++/11/bits/stl_heap.h \ + /usr/include/c++/11/bits/stl_tempbuf.h \ + /usr/include/c++/11/bits/uniform_int_dist.h \ + /usr/include/c++/11/bits/valarray_array.h \ + /usr/include/c++/11/bits/valarray_array.tcc \ + /usr/include/c++/11/bits/valarray_before.h \ + /usr/include/c++/11/bits/slice_array.h \ + /usr/include/c++/11/bits/valarray_after.h \ + /usr/include/c++/11/bits/gslice.h \ + /usr/include/c++/11/bits/gslice_array.h \ + /usr/include/c++/11/bits/mask_array.h \ + /usr/include/c++/11/bits/indirect_array.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/tool_quit.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/tool_title.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/complexmatrix.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/matrix.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/math_ylmreal.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/vector3.h diff --git a/build/source/source_base/CMakeFiles/base.dir/cmake_clean.cmake b/build/source/source_base/CMakeFiles/base.dir/cmake_clean.cmake new file mode 100644 index 0000000000..ffd5432f08 --- /dev/null +++ b/build/source/source_base/CMakeFiles/base.dir/cmake_clean.cmake @@ -0,0 +1,117 @@ +file(REMOVE_RECURSE + "CMakeFiles/base.dir/abfs-vector3_order.cpp.o" + "CMakeFiles/base.dir/abfs-vector3_order.cpp.o.d" + "CMakeFiles/base.dir/assoc_laguerre.cpp.o" + "CMakeFiles/base.dir/assoc_laguerre.cpp.o.d" + "CMakeFiles/base.dir/blas_connector_base.cpp.o" + "CMakeFiles/base.dir/blas_connector_base.cpp.o.d" + "CMakeFiles/base.dir/blas_connector_matrix.cpp.o" + "CMakeFiles/base.dir/blas_connector_matrix.cpp.o.d" + "CMakeFiles/base.dir/blas_connector_vector.cpp.o" + "CMakeFiles/base.dir/blas_connector_vector.cpp.o.d" + "CMakeFiles/base.dir/clebsch_gordan_coeff.cpp.o" + "CMakeFiles/base.dir/clebsch_gordan_coeff.cpp.o.d" + "CMakeFiles/base.dir/complexarray.cpp.o" + "CMakeFiles/base.dir/complexarray.cpp.o.d" + "CMakeFiles/base.dir/complexmatrix.cpp.o" + "CMakeFiles/base.dir/complexmatrix.cpp.o.d" + "CMakeFiles/base.dir/cubic_spline.cpp.o" + "CMakeFiles/base.dir/cubic_spline.cpp.o.d" + "CMakeFiles/base.dir/element_basis_index.cpp.o" + "CMakeFiles/base.dir/element_basis_index.cpp.o.d" + "CMakeFiles/base.dir/export.cpp.o" + "CMakeFiles/base.dir/export.cpp.o.d" + "CMakeFiles/base.dir/gather_math_lib_info.cpp.o" + "CMakeFiles/base.dir/gather_math_lib_info.cpp.o.d" + "CMakeFiles/base.dir/global_file.cpp.o" + "CMakeFiles/base.dir/global_file.cpp.o.d" + "CMakeFiles/base.dir/global_function.cpp.o" + "CMakeFiles/base.dir/global_function.cpp.o.d" + "CMakeFiles/base.dir/global_function_ddotreal.cpp.o" + "CMakeFiles/base.dir/global_function_ddotreal.cpp.o.d" + "CMakeFiles/base.dir/global_variable.cpp.o" + "CMakeFiles/base.dir/global_variable.cpp.o.d" + "CMakeFiles/base.dir/intarray.cpp.o" + "CMakeFiles/base.dir/intarray.cpp.o.d" + "CMakeFiles/base.dir/inverse_matrix.cpp.o" + "CMakeFiles/base.dir/inverse_matrix.cpp.o.d" + "CMakeFiles/base.dir/math_bspline.cpp.o" + "CMakeFiles/base.dir/math_bspline.cpp.o.d" + "CMakeFiles/base.dir/math_chebyshev.cpp.o" + "CMakeFiles/base.dir/math_chebyshev.cpp.o.d" + "CMakeFiles/base.dir/math_erf_complex.cpp.o" + "CMakeFiles/base.dir/math_erf_complex.cpp.o.d" + "CMakeFiles/base.dir/math_integral.cpp.o" + "CMakeFiles/base.dir/math_integral.cpp.o.d" + "CMakeFiles/base.dir/math_lebedev_laikov.cpp.o" + "CMakeFiles/base.dir/math_lebedev_laikov.cpp.o.d" + "CMakeFiles/base.dir/math_polyint.cpp.o" + "CMakeFiles/base.dir/math_polyint.cpp.o.d" + "CMakeFiles/base.dir/math_sphbes.cpp.o" + "CMakeFiles/base.dir/math_sphbes.cpp.o.d" + "CMakeFiles/base.dir/math_ylmreal.cpp.o" + "CMakeFiles/base.dir/math_ylmreal.cpp.o.d" + "CMakeFiles/base.dir/mathzone_add1.cpp.o" + "CMakeFiles/base.dir/mathzone_add1.cpp.o.d" + "CMakeFiles/base.dir/matrix.cpp.o" + "CMakeFiles/base.dir/matrix.cpp.o.d" + "CMakeFiles/base.dir/matrix3.cpp.o" + "CMakeFiles/base.dir/matrix3.cpp.o.d" + "CMakeFiles/base.dir/memory.cpp.o" + "CMakeFiles/base.dir/memory.cpp.o.d" + "CMakeFiles/base.dir/module_mixing/broyden_mixing.cpp.o" + "CMakeFiles/base.dir/module_mixing/broyden_mixing.cpp.o.d" + "CMakeFiles/base.dir/module_mixing/mixing.cpp.o" + "CMakeFiles/base.dir/module_mixing/mixing.cpp.o.d" + "CMakeFiles/base.dir/module_mixing/mixing_data.cpp.o" + "CMakeFiles/base.dir/module_mixing/mixing_data.cpp.o.d" + "CMakeFiles/base.dir/module_mixing/plain_mixing.cpp.o" + "CMakeFiles/base.dir/module_mixing/plain_mixing.cpp.o.d" + "CMakeFiles/base.dir/module_mixing/pulay_mixing.cpp.o" + "CMakeFiles/base.dir/module_mixing/pulay_mixing.cpp.o.d" + "CMakeFiles/base.dir/mymath.cpp.o" + "CMakeFiles/base.dir/mymath.cpp.o.d" + "CMakeFiles/base.dir/opt_CG.cpp.o" + "CMakeFiles/base.dir/opt_CG.cpp.o.d" + "CMakeFiles/base.dir/opt_DCsrch.cpp.o" + "CMakeFiles/base.dir/opt_DCsrch.cpp.o.d" + "CMakeFiles/base.dir/para_gemm.cpp.o" + "CMakeFiles/base.dir/para_gemm.cpp.o.d" + "CMakeFiles/base.dir/parallel_2d.cpp.o" + "CMakeFiles/base.dir/parallel_2d.cpp.o.d" + "CMakeFiles/base.dir/parallel_comm.cpp.o" + "CMakeFiles/base.dir/parallel_comm.cpp.o.d" + "CMakeFiles/base.dir/parallel_common.cpp.o" + "CMakeFiles/base.dir/parallel_common.cpp.o.d" + "CMakeFiles/base.dir/parallel_device.cpp.o" + "CMakeFiles/base.dir/parallel_device.cpp.o.d" + "CMakeFiles/base.dir/parallel_global.cpp.o" + "CMakeFiles/base.dir/parallel_global.cpp.o.d" + "CMakeFiles/base.dir/parallel_reduce.cpp.o" + "CMakeFiles/base.dir/parallel_reduce.cpp.o.d" + "CMakeFiles/base.dir/projgen.cpp.o" + "CMakeFiles/base.dir/projgen.cpp.o.d" + "CMakeFiles/base.dir/realarray.cpp.o" + "CMakeFiles/base.dir/realarray.cpp.o.d" + "CMakeFiles/base.dir/sph_bessel_recursive-d1.cpp.o" + "CMakeFiles/base.dir/sph_bessel_recursive-d1.cpp.o.d" + "CMakeFiles/base.dir/sph_bessel_recursive-d2.cpp.o" + "CMakeFiles/base.dir/sph_bessel_recursive-d2.cpp.o.d" + "CMakeFiles/base.dir/spherical_bessel_transformer.cpp.o" + "CMakeFiles/base.dir/spherical_bessel_transformer.cpp.o.d" + "CMakeFiles/base.dir/timer.cpp.o" + "CMakeFiles/base.dir/timer.cpp.o.d" + "CMakeFiles/base.dir/tool_check.cpp.o" + "CMakeFiles/base.dir/tool_check.cpp.o.d" + "CMakeFiles/base.dir/tool_quit.cpp.o" + "CMakeFiles/base.dir/tool_quit.cpp.o.d" + "CMakeFiles/base.dir/tool_title.cpp.o" + "CMakeFiles/base.dir/tool_title.cpp.o.d" + "CMakeFiles/base.dir/ylm.cpp.o" + "CMakeFiles/base.dir/ylm.cpp.o.d" +) + +# Per-language clean rules from dependency scanning. +foreach(lang CXX) + include(CMakeFiles/base.dir/cmake_clean_${lang}.cmake OPTIONAL) +endforeach() diff --git a/build/source/source_base/CMakeFiles/base.dir/compiler_depend.make b/build/source/source_base/CMakeFiles/base.dir/compiler_depend.make new file mode 100644 index 0000000000..53f012c624 --- /dev/null +++ b/build/source/source_base/CMakeFiles/base.dir/compiler_depend.make @@ -0,0 +1,2 @@ +# Empty compiler generated dependencies file for base. +# This may be replaced when dependencies are built. diff --git a/build/source/source_base/CMakeFiles/base.dir/compiler_depend.ts b/build/source/source_base/CMakeFiles/base.dir/compiler_depend.ts new file mode 100644 index 0000000000..7e890b6504 --- /dev/null +++ b/build/source/source_base/CMakeFiles/base.dir/compiler_depend.ts @@ -0,0 +1,2 @@ +# CMAKE generated file: DO NOT EDIT! +# Timestamp file for compiler generated dependencies management for base. diff --git a/build/source/source_base/CMakeFiles/base.dir/complexarray.cpp.o b/build/source/source_base/CMakeFiles/base.dir/complexarray.cpp.o new file mode 100644 index 0000000000..381d94cdd0 Binary files /dev/null and b/build/source/source_base/CMakeFiles/base.dir/complexarray.cpp.o differ diff --git a/build/source/source_base/CMakeFiles/base.dir/complexarray.cpp.o.d b/build/source/source_base/CMakeFiles/base.dir/complexarray.cpp.o.d new file mode 100644 index 0000000000..aeda4ba7c5 --- /dev/null +++ b/build/source/source_base/CMakeFiles/base.dir/complexarray.cpp.o.d @@ -0,0 +1,213 @@ +source/source_base/CMakeFiles/base.dir/complexarray.cpp.o: \ + /home/haozhihan/Documents/abacus-develop/source/source_base/complexarray.cpp \ + /usr/include/stdc-predef.h /usr/include/c++/11/iostream \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++config.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/os_defines.h \ + /usr/include/features.h /usr/include/features-time64.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/cpu_defines.h \ + /usr/include/c++/11/ostream /usr/include/c++/11/ios \ + /usr/include/c++/11/iosfwd /usr/include/c++/11/bits/stringfwd.h \ + /usr/include/c++/11/bits/memoryfwd.h /usr/include/c++/11/bits/postypes.h \ + /usr/include/c++/11/cwchar /usr/include/wchar.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/wchar.h \ + /usr/include/x86_64-linux-gnu/bits/types/wint_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/wchar2.h \ + /usr/include/c++/11/exception /usr/include/c++/11/bits/exception.h \ + /usr/include/c++/11/bits/exception_ptr.h \ + /usr/include/c++/11/bits/exception_defines.h \ + /usr/include/c++/11/bits/cxxabi_init_exception.h \ + /usr/include/c++/11/typeinfo /usr/include/c++/11/bits/hash_bytes.h \ + /usr/include/c++/11/new /usr/include/c++/11/bits/move.h \ + /usr/include/c++/11/type_traits \ + /usr/include/c++/11/bits/nested_exception.h \ + /usr/include/c++/11/bits/char_traits.h \ + /usr/include/c++/11/bits/stl_algobase.h \ + /usr/include/c++/11/bits/functexcept.h \ + /usr/include/c++/11/bits/cpp_type_traits.h \ + /usr/include/c++/11/ext/type_traits.h \ + /usr/include/c++/11/ext/numeric_traits.h \ + /usr/include/c++/11/bits/stl_pair.h \ + /usr/include/c++/11/bits/stl_iterator_base_types.h \ + /usr/include/c++/11/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/11/bits/concept_check.h \ + /usr/include/c++/11/debug/assertions.h \ + /usr/include/c++/11/bits/stl_iterator.h \ + /usr/include/c++/11/bits/ptr_traits.h /usr/include/c++/11/debug/debug.h \ + /usr/include/c++/11/bits/predefined_ops.h /usr/include/c++/11/cstdint \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdint.h /usr/include/stdint.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-uintn.h \ + /usr/include/c++/11/bits/localefwd.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++locale.h \ + /usr/include/c++/11/clocale /usr/include/locale.h \ + /usr/include/x86_64-linux-gnu/bits/locale.h /usr/include/c++/11/cctype \ + /usr/include/ctype.h /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/c++/11/bits/ios_base.h /usr/include/c++/11/ext/atomicity.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr-default.h \ + /usr/include/pthread.h /usr/include/sched.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/sched.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h \ + /usr/include/x86_64-linux-gnu/bits/cpu-set.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/timex.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/atomic_wide_counter.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h \ + /usr/include/x86_64-linux-gnu/bits/setjmp.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct___jmp_buf_tag.h \ + /usr/include/x86_64-linux-gnu/bits/pthread_stack_min-dynamic.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/atomic_word.h \ + /usr/include/x86_64-linux-gnu/sys/single_threaded.h \ + /usr/include/c++/11/bits/locale_classes.h /usr/include/c++/11/string \ + /usr/include/c++/11/bits/allocator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++allocator.h \ + /usr/include/c++/11/ext/new_allocator.h \ + /usr/include/c++/11/bits/ostream_insert.h \ + /usr/include/c++/11/bits/cxxabi_forced.h \ + /usr/include/c++/11/bits/stl_function.h \ + /usr/include/c++/11/backward/binders.h \ + /usr/include/c++/11/bits/range_access.h \ + /usr/include/c++/11/initializer_list \ + /usr/include/c++/11/bits/basic_string.h \ + /usr/include/c++/11/ext/alloc_traits.h \ + /usr/include/c++/11/bits/alloc_traits.h \ + /usr/include/c++/11/bits/stl_construct.h \ + /usr/include/c++/11/ext/string_conversions.h /usr/include/c++/11/cstdlib \ + /usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/sys/types.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/include/c++/11/bits/std_abs.h /usr/include/c++/11/cstdio \ + /usr/include/stdio.h /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/c++/11/cerrno \ + /usr/include/errno.h /usr/include/x86_64-linux-gnu/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/bits/types/error_t.h \ + /usr/include/c++/11/bits/charconv.h \ + /usr/include/c++/11/bits/functional_hash.h \ + /usr/include/c++/11/bits/basic_string.tcc \ + /usr/include/c++/11/bits/locale_classes.tcc \ + /usr/include/c++/11/system_error \ + /usr/include/x86_64-linux-gnu/c++/11/bits/error_constants.h \ + /usr/include/c++/11/stdexcept /usr/include/c++/11/streambuf \ + /usr/include/c++/11/bits/streambuf.tcc \ + /usr/include/c++/11/bits/basic_ios.h \ + /usr/include/c++/11/bits/locale_facets.h /usr/include/c++/11/cwctype \ + /usr/include/wctype.h /usr/include/x86_64-linux-gnu/bits/wctype-wchar.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_base.h \ + /usr/include/c++/11/bits/streambuf_iterator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_inline.h \ + /usr/include/c++/11/bits/locale_facets.tcc \ + /usr/include/c++/11/bits/basic_ios.tcc \ + /usr/include/c++/11/bits/ostream.tcc /usr/include/c++/11/istream \ + /usr/include/c++/11/bits/istream.tcc /usr/include/c++/11/fstream \ + /usr/include/c++/11/bits/codecvt.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/basic_file.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++io.h \ + /usr/include/c++/11/bits/fstream.tcc /usr/include/c++/11/iomanip \ + /usr/include/c++/11/locale \ + /usr/include/c++/11/bits/locale_facets_nonio.h /usr/include/c++/11/ctime \ + /usr/include/x86_64-linux-gnu/c++/11/bits/time_members.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/messages_members.h \ + /usr/include/libintl.h /usr/include/c++/11/bits/locale_facets_nonio.tcc \ + /usr/include/c++/11/bits/locale_conv.h \ + /usr/include/c++/11/bits/unique_ptr.h /usr/include/c++/11/utility \ + /usr/include/c++/11/bits/stl_relops.h /usr/include/c++/11/tuple \ + /usr/include/c++/11/array /usr/include/c++/11/bits/uses_allocator.h \ + /usr/include/c++/11/bits/invoke.h /usr/include/c++/11/complex \ + /usr/include/c++/11/cmath /usr/include/math.h \ + /usr/include/x86_64-linux-gnu/bits/math-vector.h \ + /usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h \ + /usr/include/x86_64-linux-gnu/bits/flt-eval-method.h \ + /usr/include/x86_64-linux-gnu/bits/fp-logb.h \ + /usr/include/x86_64-linux-gnu/bits/fp-fast.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-narrow.h \ + /usr/include/x86_64-linux-gnu/bits/iscanonical.h \ + /usr/include/c++/11/sstream /usr/include/c++/11/bits/sstream.tcc \ + /usr/include/c++/11/cassert /usr/include/assert.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/complexarray.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/global_function.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/blas_connector.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_device/types.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/macros.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/global_function-func_each_2.h \ + /usr/include/c++/11/functional /usr/include/c++/11/bits/refwrap.h \ + /usr/include/c++/11/bits/std_function.h /usr/include/c++/11/map \ + /usr/include/c++/11/bits/stl_tree.h \ + /usr/include/c++/11/ext/aligned_buffer.h \ + /usr/include/c++/11/bits/stl_map.h \ + /usr/include/c++/11/bits/stl_multimap.h \ + /usr/include/c++/11/bits/erase_if.h /usr/include/c++/11/vector \ + /usr/include/c++/11/bits/stl_uninitialized.h \ + /usr/include/c++/11/bits/stl_vector.h \ + /usr/include/c++/11/bits/stl_bvector.h \ + /usr/include/c++/11/bits/vector.tcc \ + /home/haozhihan/Documents/abacus-develop/source/source_base/global_variable.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/tool_check.h \ + /usr/include/c++/11/valarray /usr/include/c++/11/algorithm \ + /usr/include/c++/11/bits/stl_algo.h \ + /usr/include/c++/11/bits/algorithmfwd.h \ + /usr/include/c++/11/bits/stl_heap.h \ + /usr/include/c++/11/bits/stl_tempbuf.h \ + /usr/include/c++/11/bits/uniform_int_dist.h \ + /usr/include/c++/11/bits/valarray_array.h \ + /usr/include/c++/11/bits/valarray_array.tcc \ + /usr/include/c++/11/bits/valarray_before.h \ + /usr/include/c++/11/bits/slice_array.h \ + /usr/include/c++/11/bits/valarray_after.h \ + /usr/include/c++/11/bits/gslice.h \ + /usr/include/c++/11/bits/gslice_array.h \ + /usr/include/c++/11/bits/mask_array.h \ + /usr/include/c++/11/bits/indirect_array.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/tool_quit.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/tool_title.h diff --git a/build/source/source_base/CMakeFiles/base.dir/complexmatrix.cpp.o b/build/source/source_base/CMakeFiles/base.dir/complexmatrix.cpp.o new file mode 100644 index 0000000000..37f7f36fbf Binary files /dev/null and b/build/source/source_base/CMakeFiles/base.dir/complexmatrix.cpp.o differ diff --git a/build/source/source_base/CMakeFiles/base.dir/complexmatrix.cpp.o.d b/build/source/source_base/CMakeFiles/base.dir/complexmatrix.cpp.o.d new file mode 100644 index 0000000000..31a025e963 --- /dev/null +++ b/build/source/source_base/CMakeFiles/base.dir/complexmatrix.cpp.o.d @@ -0,0 +1,177 @@ +source/source_base/CMakeFiles/base.dir/complexmatrix.cpp.o: \ + /home/haozhihan/Documents/abacus-develop/source/source_base/complexmatrix.cpp \ + /usr/include/stdc-predef.h /usr/include/c++/11/cassert \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++config.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/os_defines.h \ + /usr/include/features.h /usr/include/features-time64.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/cpu_defines.h \ + /usr/include/assert.h /usr/include/c++/11/new \ + /usr/include/c++/11/bits/exception.h /usr/include/c++/11/cstdlib \ + /usr/include/stdlib.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h \ + /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/atomic_wide_counter.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/include/c++/11/bits/std_abs.h /usr/include/c++/11/cstring \ + /usr/include/string.h /usr/include/strings.h \ + /usr/include/x86_64-linux-gnu/bits/strings_fortified.h \ + /usr/include/x86_64-linux-gnu/bits/string_fortified.h \ + /usr/include/c++/11/iostream /usr/include/c++/11/ostream \ + /usr/include/c++/11/ios /usr/include/c++/11/iosfwd \ + /usr/include/c++/11/bits/stringfwd.h \ + /usr/include/c++/11/bits/memoryfwd.h /usr/include/c++/11/bits/postypes.h \ + /usr/include/c++/11/cwchar /usr/include/wchar.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/wchar.h \ + /usr/include/x86_64-linux-gnu/bits/types/wint_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/wchar2.h \ + /usr/include/c++/11/exception /usr/include/c++/11/bits/exception_ptr.h \ + /usr/include/c++/11/bits/exception_defines.h \ + /usr/include/c++/11/bits/cxxabi_init_exception.h \ + /usr/include/c++/11/typeinfo /usr/include/c++/11/bits/hash_bytes.h \ + /usr/include/c++/11/bits/move.h /usr/include/c++/11/type_traits \ + /usr/include/c++/11/bits/nested_exception.h \ + /usr/include/c++/11/bits/char_traits.h \ + /usr/include/c++/11/bits/stl_algobase.h \ + /usr/include/c++/11/bits/functexcept.h \ + /usr/include/c++/11/bits/cpp_type_traits.h \ + /usr/include/c++/11/ext/type_traits.h \ + /usr/include/c++/11/ext/numeric_traits.h \ + /usr/include/c++/11/bits/stl_pair.h \ + /usr/include/c++/11/bits/stl_iterator_base_types.h \ + /usr/include/c++/11/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/11/bits/concept_check.h \ + /usr/include/c++/11/debug/assertions.h \ + /usr/include/c++/11/bits/stl_iterator.h \ + /usr/include/c++/11/bits/ptr_traits.h /usr/include/c++/11/debug/debug.h \ + /usr/include/c++/11/bits/predefined_ops.h /usr/include/c++/11/cstdint \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdint.h /usr/include/stdint.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-uintn.h \ + /usr/include/c++/11/bits/localefwd.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++locale.h \ + /usr/include/c++/11/clocale /usr/include/locale.h \ + /usr/include/x86_64-linux-gnu/bits/locale.h /usr/include/c++/11/cctype \ + /usr/include/ctype.h /usr/include/c++/11/bits/ios_base.h \ + /usr/include/c++/11/ext/atomicity.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr-default.h \ + /usr/include/pthread.h /usr/include/sched.h \ + /usr/include/x86_64-linux-gnu/bits/sched.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h \ + /usr/include/x86_64-linux-gnu/bits/cpu-set.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/timex.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h \ + /usr/include/x86_64-linux-gnu/bits/setjmp.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct___jmp_buf_tag.h \ + /usr/include/x86_64-linux-gnu/bits/pthread_stack_min-dynamic.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/atomic_word.h \ + /usr/include/x86_64-linux-gnu/sys/single_threaded.h \ + /usr/include/c++/11/bits/locale_classes.h /usr/include/c++/11/string \ + /usr/include/c++/11/bits/allocator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++allocator.h \ + /usr/include/c++/11/ext/new_allocator.h \ + /usr/include/c++/11/bits/ostream_insert.h \ + /usr/include/c++/11/bits/cxxabi_forced.h \ + /usr/include/c++/11/bits/stl_function.h \ + /usr/include/c++/11/backward/binders.h \ + /usr/include/c++/11/bits/range_access.h \ + /usr/include/c++/11/initializer_list \ + /usr/include/c++/11/bits/basic_string.h \ + /usr/include/c++/11/ext/alloc_traits.h \ + /usr/include/c++/11/bits/alloc_traits.h \ + /usr/include/c++/11/bits/stl_construct.h \ + /usr/include/c++/11/ext/string_conversions.h /usr/include/c++/11/cstdio \ + /usr/include/stdio.h /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/c++/11/cerrno \ + /usr/include/errno.h /usr/include/x86_64-linux-gnu/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/bits/types/error_t.h \ + /usr/include/c++/11/bits/charconv.h \ + /usr/include/c++/11/bits/functional_hash.h \ + /usr/include/c++/11/bits/basic_string.tcc \ + /usr/include/c++/11/bits/locale_classes.tcc \ + /usr/include/c++/11/system_error \ + /usr/include/x86_64-linux-gnu/c++/11/bits/error_constants.h \ + /usr/include/c++/11/stdexcept /usr/include/c++/11/streambuf \ + /usr/include/c++/11/bits/streambuf.tcc \ + /usr/include/c++/11/bits/basic_ios.h \ + /usr/include/c++/11/bits/locale_facets.h /usr/include/c++/11/cwctype \ + /usr/include/wctype.h /usr/include/x86_64-linux-gnu/bits/wctype-wchar.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_base.h \ + /usr/include/c++/11/bits/streambuf_iterator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_inline.h \ + /usr/include/c++/11/bits/locale_facets.tcc \ + /usr/include/c++/11/bits/basic_ios.tcc \ + /usr/include/c++/11/bits/ostream.tcc /usr/include/c++/11/istream \ + /usr/include/c++/11/bits/istream.tcc \ + /home/haozhihan/Documents/abacus-develop/source/source_base/complexmatrix.h \ + /usr/include/c++/11/complex /usr/include/c++/11/cmath \ + /usr/include/math.h /usr/include/x86_64-linux-gnu/bits/math-vector.h \ + /usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h \ + /usr/include/x86_64-linux-gnu/bits/flt-eval-method.h \ + /usr/include/x86_64-linux-gnu/bits/fp-logb.h \ + /usr/include/x86_64-linux-gnu/bits/fp-fast.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-narrow.h \ + /usr/include/x86_64-linux-gnu/bits/iscanonical.h \ + /usr/include/c++/11/sstream /usr/include/c++/11/bits/sstream.tcc \ + /home/haozhihan/Documents/abacus-develop/source/source_base/matrix.h \ + /usr/include/c++/11/fstream /usr/include/c++/11/bits/codecvt.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/basic_file.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++io.h \ + /usr/include/c++/11/bits/fstream.tcc \ + /home/haozhihan/Documents/abacus-develop/source/source_base/blas_connector.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_device/types.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/macros.h diff --git a/build/source/source_base/CMakeFiles/base.dir/cubic_spline.cpp.o b/build/source/source_base/CMakeFiles/base.dir/cubic_spline.cpp.o new file mode 100644 index 0000000000..435714f8c5 Binary files /dev/null and b/build/source/source_base/CMakeFiles/base.dir/cubic_spline.cpp.o differ diff --git a/build/source/source_base/CMakeFiles/base.dir/cubic_spline.cpp.o.d b/build/source/source_base/CMakeFiles/base.dir/cubic_spline.cpp.o.d new file mode 100644 index 0000000000..a97bd273b8 --- /dev/null +++ b/build/source/source_base/CMakeFiles/base.dir/cubic_spline.cpp.o.d @@ -0,0 +1,98 @@ +source/source_base/CMakeFiles/base.dir/cubic_spline.cpp.o: \ + /home/haozhihan/Documents/abacus-develop/source/source_base/cubic_spline.cpp \ + /usr/include/stdc-predef.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/cubic_spline.h \ + /usr/include/c++/11/vector /usr/include/c++/11/bits/stl_algobase.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++config.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/os_defines.h \ + /usr/include/features.h /usr/include/features-time64.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/cpu_defines.h \ + /usr/include/c++/11/bits/functexcept.h \ + /usr/include/c++/11/bits/exception_defines.h \ + /usr/include/c++/11/bits/cpp_type_traits.h \ + /usr/include/c++/11/ext/type_traits.h \ + /usr/include/c++/11/ext/numeric_traits.h \ + /usr/include/c++/11/bits/stl_pair.h /usr/include/c++/11/bits/move.h \ + /usr/include/c++/11/type_traits \ + /usr/include/c++/11/bits/stl_iterator_base_types.h \ + /usr/include/c++/11/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/11/bits/concept_check.h \ + /usr/include/c++/11/debug/assertions.h \ + /usr/include/c++/11/bits/stl_iterator.h \ + /usr/include/c++/11/bits/ptr_traits.h /usr/include/c++/11/debug/debug.h \ + /usr/include/c++/11/bits/predefined_ops.h \ + /usr/include/c++/11/bits/allocator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++allocator.h \ + /usr/include/c++/11/ext/new_allocator.h /usr/include/c++/11/new \ + /usr/include/c++/11/bits/exception.h \ + /usr/include/c++/11/bits/memoryfwd.h \ + /usr/include/c++/11/bits/stl_construct.h \ + /usr/include/c++/11/bits/stl_uninitialized.h \ + /usr/include/c++/11/ext/alloc_traits.h \ + /usr/include/c++/11/bits/alloc_traits.h \ + /usr/include/c++/11/bits/stl_vector.h \ + /usr/include/c++/11/initializer_list \ + /usr/include/c++/11/bits/stl_bvector.h \ + /usr/include/c++/11/bits/functional_hash.h \ + /usr/include/c++/11/bits/hash_bytes.h \ + /usr/include/c++/11/bits/range_access.h \ + /usr/include/c++/11/bits/vector.tcc /usr/include/c++/11/cstddef \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h \ + /usr/include/c++/11/cassert /usr/include/assert.h \ + /usr/include/c++/11/algorithm /usr/include/c++/11/utility \ + /usr/include/c++/11/bits/stl_relops.h \ + /usr/include/c++/11/bits/stl_algo.h /usr/include/c++/11/cstdlib \ + /usr/include/stdlib.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/atomic_wide_counter.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/include/c++/11/bits/std_abs.h \ + /usr/include/c++/11/bits/algorithmfwd.h \ + /usr/include/c++/11/bits/stl_heap.h \ + /usr/include/c++/11/bits/stl_tempbuf.h \ + /usr/include/c++/11/bits/uniform_int_dist.h /usr/include/c++/11/numeric \ + /usr/include/c++/11/bits/stl_numeric.h /usr/include/c++/11/functional \ + /usr/include/c++/11/bits/stl_function.h \ + /usr/include/c++/11/backward/binders.h /usr/include/c++/11/tuple \ + /usr/include/c++/11/array /usr/include/c++/11/bits/uses_allocator.h \ + /usr/include/c++/11/bits/invoke.h /usr/include/c++/11/bits/refwrap.h \ + /usr/include/c++/11/bits/std_function.h /usr/include/c++/11/typeinfo diff --git a/build/source/source_base/CMakeFiles/base.dir/depend.make b/build/source/source_base/CMakeFiles/base.dir/depend.make new file mode 100644 index 0000000000..b585b3c82d --- /dev/null +++ b/build/source/source_base/CMakeFiles/base.dir/depend.make @@ -0,0 +1,2 @@ +# Empty dependencies file for base. +# This may be replaced when dependencies are built. diff --git a/build/source/source_base/CMakeFiles/base.dir/element_basis_index.cpp.o b/build/source/source_base/CMakeFiles/base.dir/element_basis_index.cpp.o new file mode 100644 index 0000000000..9c7e7bb1c7 Binary files /dev/null and b/build/source/source_base/CMakeFiles/base.dir/element_basis_index.cpp.o differ diff --git a/build/source/source_base/CMakeFiles/base.dir/element_basis_index.cpp.o.d b/build/source/source_base/CMakeFiles/base.dir/element_basis_index.cpp.o.d new file mode 100644 index 0000000000..07b3909d5f --- /dev/null +++ b/build/source/source_base/CMakeFiles/base.dir/element_basis_index.cpp.o.d @@ -0,0 +1,47 @@ +source/source_base/CMakeFiles/base.dir/element_basis_index.cpp.o: \ + /home/haozhihan/Documents/abacus-develop/source/source_base/element_basis_index.cpp \ + /usr/include/stdc-predef.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/element_basis_index.h \ + /usr/include/c++/11/cstddef \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++config.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/os_defines.h \ + /usr/include/features.h /usr/include/features-time64.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/cpu_defines.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h \ + /usr/include/c++/11/vector /usr/include/c++/11/bits/stl_algobase.h \ + /usr/include/c++/11/bits/functexcept.h \ + /usr/include/c++/11/bits/exception_defines.h \ + /usr/include/c++/11/bits/cpp_type_traits.h \ + /usr/include/c++/11/ext/type_traits.h \ + /usr/include/c++/11/ext/numeric_traits.h \ + /usr/include/c++/11/bits/stl_pair.h /usr/include/c++/11/bits/move.h \ + /usr/include/c++/11/type_traits \ + /usr/include/c++/11/bits/stl_iterator_base_types.h \ + /usr/include/c++/11/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/11/bits/concept_check.h \ + /usr/include/c++/11/debug/assertions.h \ + /usr/include/c++/11/bits/stl_iterator.h \ + /usr/include/c++/11/bits/ptr_traits.h /usr/include/c++/11/debug/debug.h \ + /usr/include/c++/11/bits/predefined_ops.h \ + /usr/include/c++/11/bits/allocator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++allocator.h \ + /usr/include/c++/11/ext/new_allocator.h /usr/include/c++/11/new \ + /usr/include/c++/11/bits/exception.h \ + /usr/include/c++/11/bits/memoryfwd.h \ + /usr/include/c++/11/bits/stl_construct.h \ + /usr/include/c++/11/bits/stl_uninitialized.h \ + /usr/include/c++/11/ext/alloc_traits.h \ + /usr/include/c++/11/bits/alloc_traits.h \ + /usr/include/c++/11/bits/stl_vector.h \ + /usr/include/c++/11/initializer_list \ + /usr/include/c++/11/bits/stl_bvector.h \ + /usr/include/c++/11/bits/functional_hash.h \ + /usr/include/c++/11/bits/hash_bytes.h \ + /usr/include/c++/11/bits/range_access.h \ + /usr/include/c++/11/bits/vector.tcc diff --git a/build/source/source_base/CMakeFiles/base.dir/export.cpp.o b/build/source/source_base/CMakeFiles/base.dir/export.cpp.o new file mode 100644 index 0000000000..77f9abcd79 Binary files /dev/null and b/build/source/source_base/CMakeFiles/base.dir/export.cpp.o differ diff --git a/build/source/source_base/CMakeFiles/base.dir/export.cpp.o.d b/build/source/source_base/CMakeFiles/base.dir/export.cpp.o.d new file mode 100644 index 0000000000..fc3562c60c --- /dev/null +++ b/build/source/source_base/CMakeFiles/base.dir/export.cpp.o.d @@ -0,0 +1,215 @@ +source/source_base/CMakeFiles/base.dir/export.cpp.o: \ + /home/haozhihan/Documents/abacus-develop/source/source_base/export.cpp \ + /usr/include/stdc-predef.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/export.h \ + /usr/include/c++/11/string \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++config.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/os_defines.h \ + /usr/include/features.h /usr/include/features-time64.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/cpu_defines.h \ + /usr/include/c++/11/bits/stringfwd.h \ + /usr/include/c++/11/bits/memoryfwd.h \ + /usr/include/c++/11/bits/char_traits.h \ + /usr/include/c++/11/bits/stl_algobase.h \ + /usr/include/c++/11/bits/functexcept.h \ + /usr/include/c++/11/bits/exception_defines.h \ + /usr/include/c++/11/bits/cpp_type_traits.h \ + /usr/include/c++/11/ext/type_traits.h \ + /usr/include/c++/11/ext/numeric_traits.h \ + /usr/include/c++/11/bits/stl_pair.h /usr/include/c++/11/bits/move.h \ + /usr/include/c++/11/type_traits \ + /usr/include/c++/11/bits/stl_iterator_base_types.h \ + /usr/include/c++/11/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/11/bits/concept_check.h \ + /usr/include/c++/11/debug/assertions.h \ + /usr/include/c++/11/bits/stl_iterator.h \ + /usr/include/c++/11/bits/ptr_traits.h /usr/include/c++/11/debug/debug.h \ + /usr/include/c++/11/bits/predefined_ops.h \ + /usr/include/c++/11/bits/postypes.h /usr/include/c++/11/cwchar \ + /usr/include/wchar.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/wchar.h \ + /usr/include/x86_64-linux-gnu/bits/types/wint_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/wchar2.h /usr/include/c++/11/cstdint \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdint.h /usr/include/stdint.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-uintn.h \ + /usr/include/c++/11/bits/allocator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++allocator.h \ + /usr/include/c++/11/ext/new_allocator.h /usr/include/c++/11/new \ + /usr/include/c++/11/bits/exception.h \ + /usr/include/c++/11/bits/localefwd.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++locale.h \ + /usr/include/c++/11/clocale /usr/include/locale.h \ + /usr/include/x86_64-linux-gnu/bits/locale.h /usr/include/c++/11/iosfwd \ + /usr/include/c++/11/cctype /usr/include/ctype.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/c++/11/bits/ostream_insert.h \ + /usr/include/c++/11/bits/cxxabi_forced.h \ + /usr/include/c++/11/bits/stl_function.h \ + /usr/include/c++/11/backward/binders.h \ + /usr/include/c++/11/bits/range_access.h \ + /usr/include/c++/11/initializer_list \ + /usr/include/c++/11/bits/basic_string.h \ + /usr/include/c++/11/ext/atomicity.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr-default.h \ + /usr/include/pthread.h /usr/include/sched.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/sched.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h \ + /usr/include/x86_64-linux-gnu/bits/cpu-set.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/timex.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/atomic_wide_counter.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h \ + /usr/include/x86_64-linux-gnu/bits/setjmp.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct___jmp_buf_tag.h \ + /usr/include/x86_64-linux-gnu/bits/pthread_stack_min-dynamic.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/atomic_word.h \ + /usr/include/x86_64-linux-gnu/sys/single_threaded.h \ + /usr/include/c++/11/ext/alloc_traits.h \ + /usr/include/c++/11/bits/alloc_traits.h \ + /usr/include/c++/11/bits/stl_construct.h \ + /usr/include/c++/11/ext/string_conversions.h /usr/include/c++/11/cstdlib \ + /usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/sys/types.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/include/c++/11/bits/std_abs.h /usr/include/c++/11/cstdio \ + /usr/include/stdio.h /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/c++/11/cerrno \ + /usr/include/errno.h /usr/include/x86_64-linux-gnu/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/bits/types/error_t.h \ + /usr/include/c++/11/bits/charconv.h \ + /usr/include/c++/11/bits/functional_hash.h \ + /usr/include/c++/11/bits/hash_bytes.h \ + /usr/include/c++/11/bits/basic_string.tcc /usr/include/c++/11/iostream \ + /usr/include/c++/11/ostream /usr/include/c++/11/ios \ + /usr/include/c++/11/exception /usr/include/c++/11/bits/exception_ptr.h \ + /usr/include/c++/11/bits/cxxabi_init_exception.h \ + /usr/include/c++/11/typeinfo /usr/include/c++/11/bits/nested_exception.h \ + /usr/include/c++/11/bits/ios_base.h \ + /usr/include/c++/11/bits/locale_classes.h \ + /usr/include/c++/11/bits/locale_classes.tcc \ + /usr/include/c++/11/system_error \ + /usr/include/x86_64-linux-gnu/c++/11/bits/error_constants.h \ + /usr/include/c++/11/stdexcept /usr/include/c++/11/streambuf \ + /usr/include/c++/11/bits/streambuf.tcc \ + /usr/include/c++/11/bits/basic_ios.h \ + /usr/include/c++/11/bits/locale_facets.h /usr/include/c++/11/cwctype \ + /usr/include/wctype.h /usr/include/x86_64-linux-gnu/bits/wctype-wchar.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_base.h \ + /usr/include/c++/11/bits/streambuf_iterator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_inline.h \ + /usr/include/c++/11/bits/locale_facets.tcc \ + /usr/include/c++/11/bits/basic_ios.tcc \ + /usr/include/c++/11/bits/ostream.tcc /usr/include/c++/11/istream \ + /usr/include/c++/11/bits/istream.tcc /usr/include/c++/11/fstream \ + /usr/include/c++/11/bits/codecvt.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/basic_file.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++io.h \ + /usr/include/c++/11/bits/fstream.tcc /usr/include/c++/11/iomanip \ + /usr/include/c++/11/locale \ + /usr/include/c++/11/bits/locale_facets_nonio.h /usr/include/c++/11/ctime \ + /usr/include/x86_64-linux-gnu/c++/11/bits/time_members.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/messages_members.h \ + /usr/include/libintl.h /usr/include/c++/11/bits/locale_facets_nonio.tcc \ + /usr/include/c++/11/bits/locale_conv.h \ + /usr/include/c++/11/bits/unique_ptr.h /usr/include/c++/11/utility \ + /usr/include/c++/11/bits/stl_relops.h /usr/include/c++/11/tuple \ + /usr/include/c++/11/array /usr/include/c++/11/bits/uses_allocator.h \ + /usr/include/c++/11/bits/invoke.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/global_variable.h \ + /usr/include/c++/11/vector /usr/include/c++/11/bits/stl_uninitialized.h \ + /usr/include/c++/11/bits/stl_vector.h \ + /usr/include/c++/11/bits/stl_bvector.h \ + /usr/include/c++/11/bits/vector.tcc \ + /usr/lib/x86_64-linux-gnu/openmpi/include/mpi.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/mpi_portable_platform.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/mpicxx.h \ + /usr/include/c++/11/map /usr/include/c++/11/bits/stl_tree.h \ + /usr/include/c++/11/ext/aligned_buffer.h \ + /usr/include/c++/11/bits/stl_map.h \ + /usr/include/c++/11/bits/stl_multimap.h \ + /usr/include/c++/11/bits/erase_if.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/constants.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/functions.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/datatype.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/exception.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/op.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/status.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/request.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/group.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/comm.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/win.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/file.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/errhandler.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/intracomm.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/topology.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/intercomm.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/info.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/datatype_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/functions_inln.h \ + /usr/include/string.h /usr/include/strings.h \ + /usr/include/x86_64-linux-gnu/bits/strings_fortified.h \ + /usr/include/x86_64-linux-gnu/bits/string_fortified.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/request_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/comm_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/intracomm_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/topology_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/intercomm_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/group_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/op_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/errhandler_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/status_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/info_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/win_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/file_inln.h diff --git a/build/source/source_base/CMakeFiles/base.dir/flags.make b/build/source/source_base/CMakeFiles/base.dir/flags.make new file mode 100644 index 0000000000..3cf9bd6b6d --- /dev/null +++ b/build/source/source_base/CMakeFiles/base.dir/flags.make @@ -0,0 +1,10 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.27 + +# compile CXX with /usr/bin/c++ +CXX_DEFINES = -DCOMMIT_INFO -DMETIS -DUSE_CEREAL_SERIALIZATION -DUSE_NEW_TWO_CENTER -D__ELPA -D__FFTW3 -D__LCAO -D__MPI -D__SELINV + +CXX_INCLUDES = -I/home/haozhihan/Documents/abacus-develop/build -I/home/haozhihan/Documents/abacus-develop/source -I/home/haozhihan/Documents/abacus-develop/source/source_base/module_container -I/usr/lib/x86_64-linux-gnu/openmpi/include -I/usr/lib/x86_64-linux-gnu/openmpi/include/openmpi + +CXX_FLAGS = -fopenmp -std=gnu++11 -O3 -g + diff --git a/build/source/source_base/CMakeFiles/base.dir/gather_math_lib_info.cpp.o b/build/source/source_base/CMakeFiles/base.dir/gather_math_lib_info.cpp.o new file mode 100644 index 0000000000..8514dd6291 Binary files /dev/null and b/build/source/source_base/CMakeFiles/base.dir/gather_math_lib_info.cpp.o differ diff --git a/build/source/source_base/CMakeFiles/base.dir/gather_math_lib_info.cpp.o.d b/build/source/source_base/CMakeFiles/base.dir/gather_math_lib_info.cpp.o.d new file mode 100644 index 0000000000..1b7afd9dab --- /dev/null +++ b/build/source/source_base/CMakeFiles/base.dir/gather_math_lib_info.cpp.o.d @@ -0,0 +1,218 @@ +source/source_base/CMakeFiles/base.dir/gather_math_lib_info.cpp.o: \ + /home/haozhihan/Documents/abacus-develop/source/source_base/gather_math_lib_info.cpp \ + /usr/include/stdc-predef.h /usr/include/c++/11/ostream \ + /usr/include/c++/11/ios /usr/include/c++/11/iosfwd \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++config.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/os_defines.h \ + /usr/include/features.h /usr/include/features-time64.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/cpu_defines.h \ + /usr/include/c++/11/bits/stringfwd.h \ + /usr/include/c++/11/bits/memoryfwd.h /usr/include/c++/11/bits/postypes.h \ + /usr/include/c++/11/cwchar /usr/include/wchar.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/wchar.h \ + /usr/include/x86_64-linux-gnu/bits/types/wint_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/wchar2.h \ + /usr/include/c++/11/exception /usr/include/c++/11/bits/exception.h \ + /usr/include/c++/11/bits/exception_ptr.h \ + /usr/include/c++/11/bits/exception_defines.h \ + /usr/include/c++/11/bits/cxxabi_init_exception.h \ + /usr/include/c++/11/typeinfo /usr/include/c++/11/bits/hash_bytes.h \ + /usr/include/c++/11/new /usr/include/c++/11/bits/move.h \ + /usr/include/c++/11/type_traits \ + /usr/include/c++/11/bits/nested_exception.h \ + /usr/include/c++/11/bits/char_traits.h \ + /usr/include/c++/11/bits/stl_algobase.h \ + /usr/include/c++/11/bits/functexcept.h \ + /usr/include/c++/11/bits/cpp_type_traits.h \ + /usr/include/c++/11/ext/type_traits.h \ + /usr/include/c++/11/ext/numeric_traits.h \ + /usr/include/c++/11/bits/stl_pair.h \ + /usr/include/c++/11/bits/stl_iterator_base_types.h \ + /usr/include/c++/11/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/11/bits/concept_check.h \ + /usr/include/c++/11/debug/assertions.h \ + /usr/include/c++/11/bits/stl_iterator.h \ + /usr/include/c++/11/bits/ptr_traits.h /usr/include/c++/11/debug/debug.h \ + /usr/include/c++/11/bits/predefined_ops.h /usr/include/c++/11/cstdint \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdint.h /usr/include/stdint.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-uintn.h \ + /usr/include/c++/11/bits/localefwd.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++locale.h \ + /usr/include/c++/11/clocale /usr/include/locale.h \ + /usr/include/x86_64-linux-gnu/bits/locale.h /usr/include/c++/11/cctype \ + /usr/include/ctype.h /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/c++/11/bits/ios_base.h /usr/include/c++/11/ext/atomicity.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr-default.h \ + /usr/include/pthread.h /usr/include/sched.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/sched.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h \ + /usr/include/x86_64-linux-gnu/bits/cpu-set.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/timex.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/atomic_wide_counter.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h \ + /usr/include/x86_64-linux-gnu/bits/setjmp.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct___jmp_buf_tag.h \ + /usr/include/x86_64-linux-gnu/bits/pthread_stack_min-dynamic.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/atomic_word.h \ + /usr/include/x86_64-linux-gnu/sys/single_threaded.h \ + /usr/include/c++/11/bits/locale_classes.h /usr/include/c++/11/string \ + /usr/include/c++/11/bits/allocator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++allocator.h \ + /usr/include/c++/11/ext/new_allocator.h \ + /usr/include/c++/11/bits/ostream_insert.h \ + /usr/include/c++/11/bits/cxxabi_forced.h \ + /usr/include/c++/11/bits/stl_function.h \ + /usr/include/c++/11/backward/binders.h \ + /usr/include/c++/11/bits/range_access.h \ + /usr/include/c++/11/initializer_list \ + /usr/include/c++/11/bits/basic_string.h \ + /usr/include/c++/11/ext/alloc_traits.h \ + /usr/include/c++/11/bits/alloc_traits.h \ + /usr/include/c++/11/bits/stl_construct.h \ + /usr/include/c++/11/ext/string_conversions.h /usr/include/c++/11/cstdlib \ + /usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/sys/types.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/include/c++/11/bits/std_abs.h /usr/include/c++/11/cstdio \ + /usr/include/stdio.h /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/c++/11/cerrno \ + /usr/include/errno.h /usr/include/x86_64-linux-gnu/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/bits/types/error_t.h \ + /usr/include/c++/11/bits/charconv.h \ + /usr/include/c++/11/bits/functional_hash.h \ + /usr/include/c++/11/bits/basic_string.tcc \ + /usr/include/c++/11/bits/locale_classes.tcc \ + /usr/include/c++/11/system_error \ + /usr/include/x86_64-linux-gnu/c++/11/bits/error_constants.h \ + /usr/include/c++/11/stdexcept /usr/include/c++/11/streambuf \ + /usr/include/c++/11/bits/streambuf.tcc \ + /usr/include/c++/11/bits/basic_ios.h \ + /usr/include/c++/11/bits/locale_facets.h /usr/include/c++/11/cwctype \ + /usr/include/wctype.h /usr/include/x86_64-linux-gnu/bits/wctype-wchar.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_base.h \ + /usr/include/c++/11/bits/streambuf_iterator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_inline.h \ + /usr/include/c++/11/bits/locale_facets.tcc \ + /usr/include/c++/11/bits/basic_ios.tcc \ + /usr/include/c++/11/bits/ostream.tcc \ + /home/haozhihan/Documents/abacus-develop/source/source_base/blas_connector.h \ + /usr/include/c++/11/complex /usr/include/c++/11/cmath \ + /usr/include/math.h /usr/include/x86_64-linux-gnu/bits/math-vector.h \ + /usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h \ + /usr/include/x86_64-linux-gnu/bits/flt-eval-method.h \ + /usr/include/x86_64-linux-gnu/bits/fp-logb.h \ + /usr/include/x86_64-linux-gnu/bits/fp-fast.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-narrow.h \ + /usr/include/x86_64-linux-gnu/bits/iscanonical.h \ + /usr/include/c++/11/sstream /usr/include/c++/11/istream \ + /usr/include/c++/11/bits/istream.tcc \ + /usr/include/c++/11/bits/sstream.tcc \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_device/types.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/macros.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/lapack_connector.h \ + /usr/include/c++/11/iostream /usr/include/c++/11/cassert \ + /usr/include/assert.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/matrix.h \ + /usr/include/c++/11/fstream /usr/include/c++/11/bits/codecvt.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/basic_file.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++io.h \ + /usr/include/c++/11/bits/fstream.tcc \ + /home/haozhihan/Documents/abacus-develop/source/source_base/complexmatrix.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/global_function.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/blas_connector.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/global_function-func_each_2.h \ + /usr/include/c++/11/functional /usr/include/c++/11/tuple \ + /usr/include/c++/11/utility /usr/include/c++/11/bits/stl_relops.h \ + /usr/include/c++/11/array /usr/include/c++/11/bits/uses_allocator.h \ + /usr/include/c++/11/bits/invoke.h /usr/include/c++/11/bits/refwrap.h \ + /usr/include/c++/11/bits/std_function.h /usr/include/c++/11/map \ + /usr/include/c++/11/bits/stl_tree.h \ + /usr/include/c++/11/ext/aligned_buffer.h \ + /usr/include/c++/11/bits/stl_map.h \ + /usr/include/c++/11/bits/stl_multimap.h \ + /usr/include/c++/11/bits/erase_if.h /usr/include/c++/11/vector \ + /usr/include/c++/11/bits/stl_uninitialized.h \ + /usr/include/c++/11/bits/stl_vector.h \ + /usr/include/c++/11/bits/stl_bvector.h \ + /usr/include/c++/11/bits/vector.tcc \ + /home/haozhihan/Documents/abacus-develop/source/source_base/global_variable.h \ + /usr/include/c++/11/iomanip /usr/include/c++/11/locale \ + /usr/include/c++/11/bits/locale_facets_nonio.h /usr/include/c++/11/ctime \ + /usr/include/x86_64-linux-gnu/c++/11/bits/time_members.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/messages_members.h \ + /usr/include/libintl.h /usr/include/c++/11/bits/locale_facets_nonio.tcc \ + /usr/include/c++/11/bits/locale_conv.h \ + /usr/include/c++/11/bits/unique_ptr.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/tool_check.h \ + /usr/include/c++/11/valarray /usr/include/c++/11/algorithm \ + /usr/include/c++/11/bits/stl_algo.h \ + /usr/include/c++/11/bits/algorithmfwd.h \ + /usr/include/c++/11/bits/stl_heap.h \ + /usr/include/c++/11/bits/stl_tempbuf.h \ + /usr/include/c++/11/bits/uniform_int_dist.h \ + /usr/include/c++/11/bits/valarray_array.h \ + /usr/include/c++/11/bits/valarray_array.tcc \ + /usr/include/c++/11/bits/valarray_before.h \ + /usr/include/c++/11/bits/slice_array.h \ + /usr/include/c++/11/bits/valarray_after.h \ + /usr/include/c++/11/bits/gslice.h \ + /usr/include/c++/11/bits/gslice_array.h \ + /usr/include/c++/11/bits/mask_array.h \ + /usr/include/c++/11/bits/indirect_array.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/tool_quit.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/tool_title.h diff --git a/build/source/source_base/CMakeFiles/base.dir/global_file.cpp.o b/build/source/source_base/CMakeFiles/base.dir/global_file.cpp.o new file mode 100644 index 0000000000..5f5d905834 Binary files /dev/null and b/build/source/source_base/CMakeFiles/base.dir/global_file.cpp.o differ diff --git a/build/source/source_base/CMakeFiles/base.dir/global_file.cpp.o.d b/build/source/source_base/CMakeFiles/base.dir/global_file.cpp.o.d new file mode 100644 index 0000000000..0b6dae4cf5 --- /dev/null +++ b/build/source/source_base/CMakeFiles/base.dir/global_file.cpp.o.d @@ -0,0 +1,266 @@ +source/source_base/CMakeFiles/base.dir/global_file.cpp.o: \ + /home/haozhihan/Documents/abacus-develop/source/source_base/global_file.cpp \ + /usr/include/stdc-predef.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/global_file.h \ + /usr/include/c++/11/cstdlib \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++config.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/os_defines.h \ + /usr/include/features.h /usr/include/features-time64.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/cpu_defines.h \ + /usr/include/stdlib.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h \ + /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/atomic_wide_counter.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/include/c++/11/bits/std_abs.h /usr/include/c++/11/string \ + /usr/include/c++/11/bits/stringfwd.h \ + /usr/include/c++/11/bits/memoryfwd.h \ + /usr/include/c++/11/bits/char_traits.h \ + /usr/include/c++/11/bits/stl_algobase.h \ + /usr/include/c++/11/bits/functexcept.h \ + /usr/include/c++/11/bits/exception_defines.h \ + /usr/include/c++/11/bits/cpp_type_traits.h \ + /usr/include/c++/11/ext/type_traits.h \ + /usr/include/c++/11/ext/numeric_traits.h \ + /usr/include/c++/11/bits/stl_pair.h /usr/include/c++/11/bits/move.h \ + /usr/include/c++/11/type_traits \ + /usr/include/c++/11/bits/stl_iterator_base_types.h \ + /usr/include/c++/11/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/11/bits/concept_check.h \ + /usr/include/c++/11/debug/assertions.h \ + /usr/include/c++/11/bits/stl_iterator.h \ + /usr/include/c++/11/bits/ptr_traits.h /usr/include/c++/11/debug/debug.h \ + /usr/include/c++/11/bits/predefined_ops.h \ + /usr/include/c++/11/bits/postypes.h /usr/include/c++/11/cwchar \ + /usr/include/wchar.h /usr/lib/gcc/x86_64-linux-gnu/11/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/wchar.h \ + /usr/include/x86_64-linux-gnu/bits/types/wint_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/wchar2.h /usr/include/c++/11/cstdint \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdint.h /usr/include/stdint.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-uintn.h \ + /usr/include/c++/11/bits/allocator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++allocator.h \ + /usr/include/c++/11/ext/new_allocator.h /usr/include/c++/11/new \ + /usr/include/c++/11/bits/exception.h \ + /usr/include/c++/11/bits/localefwd.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++locale.h \ + /usr/include/c++/11/clocale /usr/include/locale.h \ + /usr/include/x86_64-linux-gnu/bits/locale.h /usr/include/c++/11/iosfwd \ + /usr/include/c++/11/cctype /usr/include/ctype.h \ + /usr/include/c++/11/bits/ostream_insert.h \ + /usr/include/c++/11/bits/cxxabi_forced.h \ + /usr/include/c++/11/bits/stl_function.h \ + /usr/include/c++/11/backward/binders.h \ + /usr/include/c++/11/bits/range_access.h \ + /usr/include/c++/11/initializer_list \ + /usr/include/c++/11/bits/basic_string.h \ + /usr/include/c++/11/ext/atomicity.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr-default.h \ + /usr/include/pthread.h /usr/include/sched.h \ + /usr/include/x86_64-linux-gnu/bits/sched.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h \ + /usr/include/x86_64-linux-gnu/bits/cpu-set.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/timex.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h \ + /usr/include/x86_64-linux-gnu/bits/setjmp.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct___jmp_buf_tag.h \ + /usr/include/x86_64-linux-gnu/bits/pthread_stack_min-dynamic.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/atomic_word.h \ + /usr/include/x86_64-linux-gnu/sys/single_threaded.h \ + /usr/include/c++/11/ext/alloc_traits.h \ + /usr/include/c++/11/bits/alloc_traits.h \ + /usr/include/c++/11/bits/stl_construct.h \ + /usr/include/c++/11/ext/string_conversions.h /usr/include/c++/11/cstdio \ + /usr/include/stdio.h /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/c++/11/cerrno \ + /usr/include/errno.h /usr/include/x86_64-linux-gnu/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/bits/types/error_t.h \ + /usr/include/c++/11/bits/charconv.h \ + /usr/include/c++/11/bits/functional_hash.h \ + /usr/include/c++/11/bits/hash_bytes.h \ + /usr/include/c++/11/bits/basic_string.tcc /usr/include/c++/11/fstream \ + /usr/include/c++/11/istream /usr/include/c++/11/ios \ + /usr/include/c++/11/exception /usr/include/c++/11/bits/exception_ptr.h \ + /usr/include/c++/11/bits/cxxabi_init_exception.h \ + /usr/include/c++/11/typeinfo /usr/include/c++/11/bits/nested_exception.h \ + /usr/include/c++/11/bits/ios_base.h \ + /usr/include/c++/11/bits/locale_classes.h \ + /usr/include/c++/11/bits/locale_classes.tcc \ + /usr/include/c++/11/system_error \ + /usr/include/x86_64-linux-gnu/c++/11/bits/error_constants.h \ + /usr/include/c++/11/stdexcept /usr/include/c++/11/streambuf \ + /usr/include/c++/11/bits/streambuf.tcc \ + /usr/include/c++/11/bits/basic_ios.h \ + /usr/include/c++/11/bits/locale_facets.h /usr/include/c++/11/cwctype \ + /usr/include/wctype.h /usr/include/x86_64-linux-gnu/bits/wctype-wchar.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_base.h \ + /usr/include/c++/11/bits/streambuf_iterator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_inline.h \ + /usr/include/c++/11/bits/locale_facets.tcc \ + /usr/include/c++/11/bits/basic_ios.tcc /usr/include/c++/11/ostream \ + /usr/include/c++/11/bits/ostream.tcc \ + /usr/include/c++/11/bits/istream.tcc /usr/include/c++/11/bits/codecvt.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/basic_file.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++io.h \ + /usr/include/c++/11/bits/fstream.tcc /usr/include/c++/11/iostream \ + /usr/include/c++/11/iomanip /usr/include/c++/11/locale \ + /usr/include/c++/11/bits/locale_facets_nonio.h /usr/include/c++/11/ctime \ + /usr/include/x86_64-linux-gnu/c++/11/bits/time_members.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/messages_members.h \ + /usr/include/libintl.h /usr/include/c++/11/bits/locale_facets_nonio.tcc \ + /usr/include/c++/11/bits/locale_conv.h \ + /usr/include/c++/11/bits/unique_ptr.h /usr/include/c++/11/utility \ + /usr/include/c++/11/bits/stl_relops.h /usr/include/c++/11/tuple \ + /usr/include/c++/11/array /usr/include/c++/11/bits/uses_allocator.h \ + /usr/include/c++/11/bits/invoke.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/mpi.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/mpi_portable_platform.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/mpicxx.h \ + /usr/include/c++/11/map /usr/include/c++/11/bits/stl_tree.h \ + /usr/include/c++/11/ext/aligned_buffer.h \ + /usr/include/c++/11/bits/stl_map.h \ + /usr/include/c++/11/bits/stl_multimap.h \ + /usr/include/c++/11/bits/erase_if.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/constants.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/functions.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/datatype.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/exception.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/op.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/status.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/request.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/group.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/comm.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/win.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/file.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/errhandler.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/intracomm.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/topology.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/intercomm.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/info.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/datatype_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/functions_inln.h \ + /usr/include/string.h /usr/include/strings.h \ + /usr/include/x86_64-linux-gnu/bits/strings_fortified.h \ + /usr/include/x86_64-linux-gnu/bits/string_fortified.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/request_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/comm_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/intracomm_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/topology_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/intercomm_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/group_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/op_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/errhandler_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/status_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/info_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/win_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/file_inln.h \ + /usr/include/unistd.h /usr/include/x86_64-linux-gnu/bits/posix_opt.h \ + /usr/include/x86_64-linux-gnu/bits/environments.h \ + /usr/include/x86_64-linux-gnu/bits/confname.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_posix.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_core.h \ + /usr/include/x86_64-linux-gnu/bits/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/unistd_ext.h \ + /usr/include/linux/close_range.h /usr/include/c++/11/sstream \ + /usr/include/c++/11/bits/sstream.tcc \ + /home/haozhihan/Documents/abacus-develop/source/source_base/global_function.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/blas_connector.h \ + /usr/include/c++/11/complex /usr/include/c++/11/cmath \ + /usr/include/math.h /usr/include/x86_64-linux-gnu/bits/math-vector.h \ + /usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h \ + /usr/include/x86_64-linux-gnu/bits/flt-eval-method.h \ + /usr/include/x86_64-linux-gnu/bits/fp-logb.h \ + /usr/include/x86_64-linux-gnu/bits/fp-fast.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-narrow.h \ + /usr/include/x86_64-linux-gnu/bits/iscanonical.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_device/types.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/macros.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/global_function-func_each_2.h \ + /usr/include/c++/11/functional /usr/include/c++/11/bits/refwrap.h \ + /usr/include/c++/11/bits/std_function.h /usr/include/c++/11/vector \ + /usr/include/c++/11/bits/stl_uninitialized.h \ + /usr/include/c++/11/bits/stl_vector.h \ + /usr/include/c++/11/bits/stl_bvector.h \ + /usr/include/c++/11/bits/vector.tcc \ + /home/haozhihan/Documents/abacus-develop/source/source_base/global_variable.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/tool_check.h \ + /usr/include/c++/11/cassert /usr/include/assert.h \ + /usr/include/c++/11/valarray /usr/include/c++/11/algorithm \ + /usr/include/c++/11/bits/stl_algo.h \ + /usr/include/c++/11/bits/algorithmfwd.h \ + /usr/include/c++/11/bits/stl_heap.h \ + /usr/include/c++/11/bits/stl_tempbuf.h \ + /usr/include/c++/11/bits/uniform_int_dist.h \ + /usr/include/c++/11/bits/valarray_array.h \ + /usr/include/c++/11/bits/valarray_array.tcc \ + /usr/include/c++/11/bits/valarray_before.h \ + /usr/include/c++/11/bits/slice_array.h \ + /usr/include/c++/11/bits/valarray_after.h \ + /usr/include/c++/11/bits/gslice.h \ + /usr/include/c++/11/bits/gslice_array.h \ + /usr/include/c++/11/bits/mask_array.h \ + /usr/include/c++/11/bits/indirect_array.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/tool_quit.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/tool_title.h \ + /home/haozhihan/Documents/abacus-develop/source/module_parameter/parameter.h \ + /home/haozhihan/Documents/abacus-develop/source/module_parameter/input_parameter.h \ + /home/haozhihan/Documents/abacus-develop/source/module_parameter/md_parameter.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/vector3.h \ + /home/haozhihan/Documents/abacus-develop/source/module_parameter/system_parameter.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/parallel_common.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/parallel_reduce.h diff --git a/build/source/source_base/CMakeFiles/base.dir/global_function.cpp.o b/build/source/source_base/CMakeFiles/base.dir/global_function.cpp.o new file mode 100644 index 0000000000..59c66bc87d Binary files /dev/null and b/build/source/source_base/CMakeFiles/base.dir/global_function.cpp.o differ diff --git a/build/source/source_base/CMakeFiles/base.dir/global_function.cpp.o.d b/build/source/source_base/CMakeFiles/base.dir/global_function.cpp.o.d new file mode 100644 index 0000000000..6e0dcb13eb --- /dev/null +++ b/build/source/source_base/CMakeFiles/base.dir/global_function.cpp.o.d @@ -0,0 +1,255 @@ +source/source_base/CMakeFiles/base.dir/global_function.cpp.o: \ + /home/haozhihan/Documents/abacus-develop/source/source_base/global_function.cpp \ + /usr/include/stdc-predef.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/global_function.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/blas_connector.h \ + /usr/include/c++/11/complex \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++config.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/os_defines.h \ + /usr/include/features.h /usr/include/features-time64.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/cpu_defines.h \ + /usr/include/c++/11/bits/cpp_type_traits.h \ + /usr/include/c++/11/ext/type_traits.h /usr/include/c++/11/cmath \ + /usr/include/math.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/math-vector.h \ + /usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h \ + /usr/include/x86_64-linux-gnu/bits/flt-eval-method.h \ + /usr/include/x86_64-linux-gnu/bits/fp-logb.h \ + /usr/include/x86_64-linux-gnu/bits/fp-fast.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-narrow.h \ + /usr/include/x86_64-linux-gnu/bits/iscanonical.h \ + /usr/include/c++/11/bits/std_abs.h /usr/include/stdlib.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h \ + /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/atomic_wide_counter.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h /usr/include/c++/11/sstream \ + /usr/include/c++/11/istream /usr/include/c++/11/ios \ + /usr/include/c++/11/iosfwd /usr/include/c++/11/bits/stringfwd.h \ + /usr/include/c++/11/bits/memoryfwd.h /usr/include/c++/11/bits/postypes.h \ + /usr/include/c++/11/cwchar /usr/include/wchar.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/wchar.h \ + /usr/include/x86_64-linux-gnu/bits/types/wint_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/wchar2.h \ + /usr/include/c++/11/exception /usr/include/c++/11/bits/exception.h \ + /usr/include/c++/11/bits/exception_ptr.h \ + /usr/include/c++/11/bits/exception_defines.h \ + /usr/include/c++/11/bits/cxxabi_init_exception.h \ + /usr/include/c++/11/typeinfo /usr/include/c++/11/bits/hash_bytes.h \ + /usr/include/c++/11/new /usr/include/c++/11/bits/move.h \ + /usr/include/c++/11/type_traits \ + /usr/include/c++/11/bits/nested_exception.h \ + /usr/include/c++/11/bits/char_traits.h \ + /usr/include/c++/11/bits/stl_algobase.h \ + /usr/include/c++/11/bits/functexcept.h \ + /usr/include/c++/11/ext/numeric_traits.h \ + /usr/include/c++/11/bits/stl_pair.h \ + /usr/include/c++/11/bits/stl_iterator_base_types.h \ + /usr/include/c++/11/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/11/bits/concept_check.h \ + /usr/include/c++/11/debug/assertions.h \ + /usr/include/c++/11/bits/stl_iterator.h \ + /usr/include/c++/11/bits/ptr_traits.h /usr/include/c++/11/debug/debug.h \ + /usr/include/c++/11/bits/predefined_ops.h /usr/include/c++/11/cstdint \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdint.h /usr/include/stdint.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-uintn.h \ + /usr/include/c++/11/bits/localefwd.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++locale.h \ + /usr/include/c++/11/clocale /usr/include/locale.h \ + /usr/include/x86_64-linux-gnu/bits/locale.h /usr/include/c++/11/cctype \ + /usr/include/ctype.h /usr/include/c++/11/bits/ios_base.h \ + /usr/include/c++/11/ext/atomicity.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr-default.h \ + /usr/include/pthread.h /usr/include/sched.h \ + /usr/include/x86_64-linux-gnu/bits/sched.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h \ + /usr/include/x86_64-linux-gnu/bits/cpu-set.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/timex.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h \ + /usr/include/x86_64-linux-gnu/bits/setjmp.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct___jmp_buf_tag.h \ + /usr/include/x86_64-linux-gnu/bits/pthread_stack_min-dynamic.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/atomic_word.h \ + /usr/include/x86_64-linux-gnu/sys/single_threaded.h \ + /usr/include/c++/11/bits/locale_classes.h /usr/include/c++/11/string \ + /usr/include/c++/11/bits/allocator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++allocator.h \ + /usr/include/c++/11/ext/new_allocator.h \ + /usr/include/c++/11/bits/ostream_insert.h \ + /usr/include/c++/11/bits/cxxabi_forced.h \ + /usr/include/c++/11/bits/stl_function.h \ + /usr/include/c++/11/backward/binders.h \ + /usr/include/c++/11/bits/range_access.h \ + /usr/include/c++/11/initializer_list \ + /usr/include/c++/11/bits/basic_string.h \ + /usr/include/c++/11/ext/alloc_traits.h \ + /usr/include/c++/11/bits/alloc_traits.h \ + /usr/include/c++/11/bits/stl_construct.h \ + /usr/include/c++/11/ext/string_conversions.h /usr/include/c++/11/cstdlib \ + /usr/include/c++/11/cstdio /usr/include/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/c++/11/cerrno \ + /usr/include/errno.h /usr/include/x86_64-linux-gnu/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/bits/types/error_t.h \ + /usr/include/c++/11/bits/charconv.h \ + /usr/include/c++/11/bits/functional_hash.h \ + /usr/include/c++/11/bits/basic_string.tcc \ + /usr/include/c++/11/bits/locale_classes.tcc \ + /usr/include/c++/11/system_error \ + /usr/include/x86_64-linux-gnu/c++/11/bits/error_constants.h \ + /usr/include/c++/11/stdexcept /usr/include/c++/11/streambuf \ + /usr/include/c++/11/bits/streambuf.tcc \ + /usr/include/c++/11/bits/basic_ios.h \ + /usr/include/c++/11/bits/locale_facets.h /usr/include/c++/11/cwctype \ + /usr/include/wctype.h /usr/include/x86_64-linux-gnu/bits/wctype-wchar.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_base.h \ + /usr/include/c++/11/bits/streambuf_iterator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_inline.h \ + /usr/include/c++/11/bits/locale_facets.tcc \ + /usr/include/c++/11/bits/basic_ios.tcc /usr/include/c++/11/ostream \ + /usr/include/c++/11/bits/ostream.tcc \ + /usr/include/c++/11/bits/istream.tcc \ + /usr/include/c++/11/bits/sstream.tcc \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_device/types.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/macros.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/global_function-func_each_2.h \ + /usr/include/c++/11/functional /usr/include/c++/11/tuple \ + /usr/include/c++/11/utility /usr/include/c++/11/bits/stl_relops.h \ + /usr/include/c++/11/array /usr/include/c++/11/bits/uses_allocator.h \ + /usr/include/c++/11/bits/invoke.h /usr/include/c++/11/bits/refwrap.h \ + /usr/include/c++/11/bits/std_function.h /usr/include/c++/11/map \ + /usr/include/c++/11/bits/stl_tree.h \ + /usr/include/c++/11/ext/aligned_buffer.h \ + /usr/include/c++/11/bits/stl_map.h \ + /usr/include/c++/11/bits/stl_multimap.h \ + /usr/include/c++/11/bits/erase_if.h /usr/include/c++/11/vector \ + /usr/include/c++/11/bits/stl_uninitialized.h \ + /usr/include/c++/11/bits/stl_vector.h \ + /usr/include/c++/11/bits/stl_bvector.h \ + /usr/include/c++/11/bits/vector.tcc \ + /home/haozhihan/Documents/abacus-develop/source/source_base/global_variable.h \ + /usr/include/c++/11/fstream /usr/include/c++/11/bits/codecvt.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/basic_file.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++io.h \ + /usr/include/c++/11/bits/fstream.tcc /usr/include/c++/11/iomanip \ + /usr/include/c++/11/locale \ + /usr/include/c++/11/bits/locale_facets_nonio.h /usr/include/c++/11/ctime \ + /usr/include/x86_64-linux-gnu/c++/11/bits/time_members.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/messages_members.h \ + /usr/include/libintl.h /usr/include/c++/11/bits/locale_facets_nonio.tcc \ + /usr/include/c++/11/bits/locale_conv.h \ + /usr/include/c++/11/bits/unique_ptr.h /usr/include/c++/11/iostream \ + /home/haozhihan/Documents/abacus-develop/source/source_base/tool_check.h \ + /usr/include/c++/11/cassert /usr/include/assert.h \ + /usr/include/c++/11/valarray /usr/include/c++/11/algorithm \ + /usr/include/c++/11/bits/stl_algo.h \ + /usr/include/c++/11/bits/algorithmfwd.h \ + /usr/include/c++/11/bits/stl_heap.h \ + /usr/include/c++/11/bits/stl_tempbuf.h \ + /usr/include/c++/11/bits/uniform_int_dist.h \ + /usr/include/c++/11/bits/valarray_array.h \ + /usr/include/c++/11/bits/valarray_array.tcc \ + /usr/include/c++/11/bits/valarray_before.h \ + /usr/include/c++/11/bits/slice_array.h \ + /usr/include/c++/11/bits/valarray_after.h \ + /usr/include/c++/11/bits/gslice.h \ + /usr/include/c++/11/bits/gslice_array.h \ + /usr/include/c++/11/bits/mask_array.h \ + /usr/include/c++/11/bits/indirect_array.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/tool_quit.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/tool_title.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/parallel_common.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/mpi.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/mpi_portable_platform.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/mpicxx.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/constants.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/functions.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/datatype.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/exception.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/op.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/status.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/request.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/group.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/comm.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/win.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/file.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/errhandler.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/intracomm.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/topology.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/intercomm.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/info.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/datatype_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/functions_inln.h \ + /usr/include/string.h /usr/include/strings.h \ + /usr/include/x86_64-linux-gnu/bits/strings_fortified.h \ + /usr/include/x86_64-linux-gnu/bits/string_fortified.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/request_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/comm_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/intracomm_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/topology_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/intercomm_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/group_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/op_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/errhandler_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/status_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/info_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/win_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/file_inln.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/global_file.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/memory.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/timer.h diff --git a/build/source/source_base/CMakeFiles/base.dir/global_function_ddotreal.cpp.o b/build/source/source_base/CMakeFiles/base.dir/global_function_ddotreal.cpp.o new file mode 100644 index 0000000000..3514d02c60 Binary files /dev/null and b/build/source/source_base/CMakeFiles/base.dir/global_function_ddotreal.cpp.o differ diff --git a/build/source/source_base/CMakeFiles/base.dir/global_function_ddotreal.cpp.o.d b/build/source/source_base/CMakeFiles/base.dir/global_function_ddotreal.cpp.o.d new file mode 100644 index 0000000000..b06da3e74f --- /dev/null +++ b/build/source/source_base/CMakeFiles/base.dir/global_function_ddotreal.cpp.o.d @@ -0,0 +1,252 @@ +source/source_base/CMakeFiles/base.dir/global_function_ddotreal.cpp.o: \ + /home/haozhihan/Documents/abacus-develop/source/source_base/global_function_ddotreal.cpp \ + /usr/include/stdc-predef.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/blas_connector.h \ + /usr/include/c++/11/complex \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++config.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/os_defines.h \ + /usr/include/features.h /usr/include/features-time64.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/cpu_defines.h \ + /usr/include/c++/11/bits/cpp_type_traits.h \ + /usr/include/c++/11/ext/type_traits.h /usr/include/c++/11/cmath \ + /usr/include/math.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/math-vector.h \ + /usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h \ + /usr/include/x86_64-linux-gnu/bits/flt-eval-method.h \ + /usr/include/x86_64-linux-gnu/bits/fp-logb.h \ + /usr/include/x86_64-linux-gnu/bits/fp-fast.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-narrow.h \ + /usr/include/x86_64-linux-gnu/bits/iscanonical.h \ + /usr/include/c++/11/bits/std_abs.h /usr/include/stdlib.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h \ + /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/atomic_wide_counter.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h /usr/include/c++/11/sstream \ + /usr/include/c++/11/istream /usr/include/c++/11/ios \ + /usr/include/c++/11/iosfwd /usr/include/c++/11/bits/stringfwd.h \ + /usr/include/c++/11/bits/memoryfwd.h /usr/include/c++/11/bits/postypes.h \ + /usr/include/c++/11/cwchar /usr/include/wchar.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/wchar.h \ + /usr/include/x86_64-linux-gnu/bits/types/wint_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/wchar2.h \ + /usr/include/c++/11/exception /usr/include/c++/11/bits/exception.h \ + /usr/include/c++/11/bits/exception_ptr.h \ + /usr/include/c++/11/bits/exception_defines.h \ + /usr/include/c++/11/bits/cxxabi_init_exception.h \ + /usr/include/c++/11/typeinfo /usr/include/c++/11/bits/hash_bytes.h \ + /usr/include/c++/11/new /usr/include/c++/11/bits/move.h \ + /usr/include/c++/11/type_traits \ + /usr/include/c++/11/bits/nested_exception.h \ + /usr/include/c++/11/bits/char_traits.h \ + /usr/include/c++/11/bits/stl_algobase.h \ + /usr/include/c++/11/bits/functexcept.h \ + /usr/include/c++/11/ext/numeric_traits.h \ + /usr/include/c++/11/bits/stl_pair.h \ + /usr/include/c++/11/bits/stl_iterator_base_types.h \ + /usr/include/c++/11/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/11/bits/concept_check.h \ + /usr/include/c++/11/debug/assertions.h \ + /usr/include/c++/11/bits/stl_iterator.h \ + /usr/include/c++/11/bits/ptr_traits.h /usr/include/c++/11/debug/debug.h \ + /usr/include/c++/11/bits/predefined_ops.h /usr/include/c++/11/cstdint \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdint.h /usr/include/stdint.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-uintn.h \ + /usr/include/c++/11/bits/localefwd.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++locale.h \ + /usr/include/c++/11/clocale /usr/include/locale.h \ + /usr/include/x86_64-linux-gnu/bits/locale.h /usr/include/c++/11/cctype \ + /usr/include/ctype.h /usr/include/c++/11/bits/ios_base.h \ + /usr/include/c++/11/ext/atomicity.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr-default.h \ + /usr/include/pthread.h /usr/include/sched.h \ + /usr/include/x86_64-linux-gnu/bits/sched.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h \ + /usr/include/x86_64-linux-gnu/bits/cpu-set.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/timex.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h \ + /usr/include/x86_64-linux-gnu/bits/setjmp.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct___jmp_buf_tag.h \ + /usr/include/x86_64-linux-gnu/bits/pthread_stack_min-dynamic.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/atomic_word.h \ + /usr/include/x86_64-linux-gnu/sys/single_threaded.h \ + /usr/include/c++/11/bits/locale_classes.h /usr/include/c++/11/string \ + /usr/include/c++/11/bits/allocator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++allocator.h \ + /usr/include/c++/11/ext/new_allocator.h \ + /usr/include/c++/11/bits/ostream_insert.h \ + /usr/include/c++/11/bits/cxxabi_forced.h \ + /usr/include/c++/11/bits/stl_function.h \ + /usr/include/c++/11/backward/binders.h \ + /usr/include/c++/11/bits/range_access.h \ + /usr/include/c++/11/initializer_list \ + /usr/include/c++/11/bits/basic_string.h \ + /usr/include/c++/11/ext/alloc_traits.h \ + /usr/include/c++/11/bits/alloc_traits.h \ + /usr/include/c++/11/bits/stl_construct.h \ + /usr/include/c++/11/ext/string_conversions.h /usr/include/c++/11/cstdlib \ + /usr/include/c++/11/cstdio /usr/include/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/c++/11/cerrno \ + /usr/include/errno.h /usr/include/x86_64-linux-gnu/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/bits/types/error_t.h \ + /usr/include/c++/11/bits/charconv.h \ + /usr/include/c++/11/bits/functional_hash.h \ + /usr/include/c++/11/bits/basic_string.tcc \ + /usr/include/c++/11/bits/locale_classes.tcc \ + /usr/include/c++/11/system_error \ + /usr/include/x86_64-linux-gnu/c++/11/bits/error_constants.h \ + /usr/include/c++/11/stdexcept /usr/include/c++/11/streambuf \ + /usr/include/c++/11/bits/streambuf.tcc \ + /usr/include/c++/11/bits/basic_ios.h \ + /usr/include/c++/11/bits/locale_facets.h /usr/include/c++/11/cwctype \ + /usr/include/wctype.h /usr/include/x86_64-linux-gnu/bits/wctype-wchar.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_base.h \ + /usr/include/c++/11/bits/streambuf_iterator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_inline.h \ + /usr/include/c++/11/bits/locale_facets.tcc \ + /usr/include/c++/11/bits/basic_ios.tcc /usr/include/c++/11/ostream \ + /usr/include/c++/11/bits/ostream.tcc \ + /usr/include/c++/11/bits/istream.tcc \ + /usr/include/c++/11/bits/sstream.tcc \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_device/types.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/macros.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/global_function.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/global_function-func_each_2.h \ + /usr/include/c++/11/functional /usr/include/c++/11/tuple \ + /usr/include/c++/11/utility /usr/include/c++/11/bits/stl_relops.h \ + /usr/include/c++/11/array /usr/include/c++/11/bits/uses_allocator.h \ + /usr/include/c++/11/bits/invoke.h /usr/include/c++/11/bits/refwrap.h \ + /usr/include/c++/11/bits/std_function.h /usr/include/c++/11/map \ + /usr/include/c++/11/bits/stl_tree.h \ + /usr/include/c++/11/ext/aligned_buffer.h \ + /usr/include/c++/11/bits/stl_map.h \ + /usr/include/c++/11/bits/stl_multimap.h \ + /usr/include/c++/11/bits/erase_if.h /usr/include/c++/11/vector \ + /usr/include/c++/11/bits/stl_uninitialized.h \ + /usr/include/c++/11/bits/stl_vector.h \ + /usr/include/c++/11/bits/stl_bvector.h \ + /usr/include/c++/11/bits/vector.tcc \ + /home/haozhihan/Documents/abacus-develop/source/source_base/global_variable.h \ + /usr/include/c++/11/fstream /usr/include/c++/11/bits/codecvt.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/basic_file.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++io.h \ + /usr/include/c++/11/bits/fstream.tcc /usr/include/c++/11/iomanip \ + /usr/include/c++/11/locale \ + /usr/include/c++/11/bits/locale_facets_nonio.h /usr/include/c++/11/ctime \ + /usr/include/x86_64-linux-gnu/c++/11/bits/time_members.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/messages_members.h \ + /usr/include/libintl.h /usr/include/c++/11/bits/locale_facets_nonio.tcc \ + /usr/include/c++/11/bits/locale_conv.h \ + /usr/include/c++/11/bits/unique_ptr.h /usr/include/c++/11/iostream \ + /home/haozhihan/Documents/abacus-develop/source/source_base/tool_check.h \ + /usr/include/c++/11/cassert /usr/include/assert.h \ + /usr/include/c++/11/valarray /usr/include/c++/11/algorithm \ + /usr/include/c++/11/bits/stl_algo.h \ + /usr/include/c++/11/bits/algorithmfwd.h \ + /usr/include/c++/11/bits/stl_heap.h \ + /usr/include/c++/11/bits/stl_tempbuf.h \ + /usr/include/c++/11/bits/uniform_int_dist.h \ + /usr/include/c++/11/bits/valarray_array.h \ + /usr/include/c++/11/bits/valarray_array.tcc \ + /usr/include/c++/11/bits/valarray_before.h \ + /usr/include/c++/11/bits/slice_array.h \ + /usr/include/c++/11/bits/valarray_after.h \ + /usr/include/c++/11/bits/gslice.h \ + /usr/include/c++/11/bits/gslice_array.h \ + /usr/include/c++/11/bits/mask_array.h \ + /usr/include/c++/11/bits/indirect_array.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/tool_quit.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/tool_title.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/parallel_reduce.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/mpi.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/mpi_portable_platform.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/mpicxx.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/constants.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/functions.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/datatype.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/exception.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/op.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/status.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/request.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/group.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/comm.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/win.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/file.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/errhandler.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/intracomm.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/topology.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/intercomm.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/info.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/datatype_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/functions_inln.h \ + /usr/include/string.h /usr/include/strings.h \ + /usr/include/x86_64-linux-gnu/bits/strings_fortified.h \ + /usr/include/x86_64-linux-gnu/bits/string_fortified.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/request_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/comm_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/intracomm_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/topology_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/intercomm_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/group_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/op_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/errhandler_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/status_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/info_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/win_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/file_inln.h diff --git a/build/source/source_base/CMakeFiles/base.dir/global_variable.cpp.o b/build/source/source_base/CMakeFiles/base.dir/global_variable.cpp.o new file mode 100644 index 0000000000..333bb6c93b Binary files /dev/null and b/build/source/source_base/CMakeFiles/base.dir/global_variable.cpp.o differ diff --git a/build/source/source_base/CMakeFiles/base.dir/global_variable.cpp.o.d b/build/source/source_base/CMakeFiles/base.dir/global_variable.cpp.o.d new file mode 100644 index 0000000000..a0810b9e84 --- /dev/null +++ b/build/source/source_base/CMakeFiles/base.dir/global_variable.cpp.o.d @@ -0,0 +1,171 @@ +source/source_base/CMakeFiles/base.dir/global_variable.cpp.o: \ + /home/haozhihan/Documents/abacus-develop/source/source_base/global_variable.cpp \ + /usr/include/stdc-predef.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/global_variable.h \ + /usr/include/c++/11/fstream /usr/include/c++/11/istream \ + /usr/include/c++/11/ios /usr/include/c++/11/iosfwd \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++config.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/os_defines.h \ + /usr/include/features.h /usr/include/features-time64.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/cpu_defines.h \ + /usr/include/c++/11/bits/stringfwd.h \ + /usr/include/c++/11/bits/memoryfwd.h /usr/include/c++/11/bits/postypes.h \ + /usr/include/c++/11/cwchar /usr/include/wchar.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/wchar.h \ + /usr/include/x86_64-linux-gnu/bits/types/wint_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/wchar2.h \ + /usr/include/c++/11/exception /usr/include/c++/11/bits/exception.h \ + /usr/include/c++/11/bits/exception_ptr.h \ + /usr/include/c++/11/bits/exception_defines.h \ + /usr/include/c++/11/bits/cxxabi_init_exception.h \ + /usr/include/c++/11/typeinfo /usr/include/c++/11/bits/hash_bytes.h \ + /usr/include/c++/11/new /usr/include/c++/11/bits/move.h \ + /usr/include/c++/11/type_traits \ + /usr/include/c++/11/bits/nested_exception.h \ + /usr/include/c++/11/bits/char_traits.h \ + /usr/include/c++/11/bits/stl_algobase.h \ + /usr/include/c++/11/bits/functexcept.h \ + /usr/include/c++/11/bits/cpp_type_traits.h \ + /usr/include/c++/11/ext/type_traits.h \ + /usr/include/c++/11/ext/numeric_traits.h \ + /usr/include/c++/11/bits/stl_pair.h \ + /usr/include/c++/11/bits/stl_iterator_base_types.h \ + /usr/include/c++/11/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/11/bits/concept_check.h \ + /usr/include/c++/11/debug/assertions.h \ + /usr/include/c++/11/bits/stl_iterator.h \ + /usr/include/c++/11/bits/ptr_traits.h /usr/include/c++/11/debug/debug.h \ + /usr/include/c++/11/bits/predefined_ops.h /usr/include/c++/11/cstdint \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdint.h /usr/include/stdint.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-uintn.h \ + /usr/include/c++/11/bits/localefwd.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++locale.h \ + /usr/include/c++/11/clocale /usr/include/locale.h \ + /usr/include/x86_64-linux-gnu/bits/locale.h /usr/include/c++/11/cctype \ + /usr/include/ctype.h /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/c++/11/bits/ios_base.h /usr/include/c++/11/ext/atomicity.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr-default.h \ + /usr/include/pthread.h /usr/include/sched.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/sched.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h \ + /usr/include/x86_64-linux-gnu/bits/cpu-set.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/timex.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/atomic_wide_counter.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h \ + /usr/include/x86_64-linux-gnu/bits/setjmp.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct___jmp_buf_tag.h \ + /usr/include/x86_64-linux-gnu/bits/pthread_stack_min-dynamic.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/atomic_word.h \ + /usr/include/x86_64-linux-gnu/sys/single_threaded.h \ + /usr/include/c++/11/bits/locale_classes.h /usr/include/c++/11/string \ + /usr/include/c++/11/bits/allocator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++allocator.h \ + /usr/include/c++/11/ext/new_allocator.h \ + /usr/include/c++/11/bits/ostream_insert.h \ + /usr/include/c++/11/bits/cxxabi_forced.h \ + /usr/include/c++/11/bits/stl_function.h \ + /usr/include/c++/11/backward/binders.h \ + /usr/include/c++/11/bits/range_access.h \ + /usr/include/c++/11/initializer_list \ + /usr/include/c++/11/bits/basic_string.h \ + /usr/include/c++/11/ext/alloc_traits.h \ + /usr/include/c++/11/bits/alloc_traits.h \ + /usr/include/c++/11/bits/stl_construct.h \ + /usr/include/c++/11/ext/string_conversions.h /usr/include/c++/11/cstdlib \ + /usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/sys/types.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/include/c++/11/bits/std_abs.h /usr/include/c++/11/cstdio \ + /usr/include/stdio.h /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/c++/11/cerrno \ + /usr/include/errno.h /usr/include/x86_64-linux-gnu/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/bits/types/error_t.h \ + /usr/include/c++/11/bits/charconv.h \ + /usr/include/c++/11/bits/functional_hash.h \ + /usr/include/c++/11/bits/basic_string.tcc \ + /usr/include/c++/11/bits/locale_classes.tcc \ + /usr/include/c++/11/system_error \ + /usr/include/x86_64-linux-gnu/c++/11/bits/error_constants.h \ + /usr/include/c++/11/stdexcept /usr/include/c++/11/streambuf \ + /usr/include/c++/11/bits/streambuf.tcc \ + /usr/include/c++/11/bits/basic_ios.h \ + /usr/include/c++/11/bits/locale_facets.h /usr/include/c++/11/cwctype \ + /usr/include/wctype.h /usr/include/x86_64-linux-gnu/bits/wctype-wchar.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_base.h \ + /usr/include/c++/11/bits/streambuf_iterator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_inline.h \ + /usr/include/c++/11/bits/locale_facets.tcc \ + /usr/include/c++/11/bits/basic_ios.tcc /usr/include/c++/11/ostream \ + /usr/include/c++/11/bits/ostream.tcc \ + /usr/include/c++/11/bits/istream.tcc /usr/include/c++/11/bits/codecvt.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/basic_file.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++io.h \ + /usr/include/c++/11/bits/fstream.tcc /usr/include/c++/11/iomanip \ + /usr/include/c++/11/locale \ + /usr/include/c++/11/bits/locale_facets_nonio.h /usr/include/c++/11/ctime \ + /usr/include/x86_64-linux-gnu/c++/11/bits/time_members.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/messages_members.h \ + /usr/include/libintl.h /usr/include/c++/11/bits/locale_facets_nonio.tcc \ + /usr/include/c++/11/bits/locale_conv.h \ + /usr/include/c++/11/bits/unique_ptr.h /usr/include/c++/11/utility \ + /usr/include/c++/11/bits/stl_relops.h /usr/include/c++/11/tuple \ + /usr/include/c++/11/array /usr/include/c++/11/bits/uses_allocator.h \ + /usr/include/c++/11/bits/invoke.h /usr/include/c++/11/iostream \ + /usr/include/c++/11/vector /usr/include/c++/11/bits/stl_uninitialized.h \ + /usr/include/c++/11/bits/stl_vector.h \ + /usr/include/c++/11/bits/stl_bvector.h \ + /usr/include/c++/11/bits/vector.tcc /usr/include/c++/11/sstream \ + /usr/include/c++/11/bits/sstream.tcc diff --git a/build/source/source_base/CMakeFiles/base.dir/intarray.cpp.o b/build/source/source_base/CMakeFiles/base.dir/intarray.cpp.o new file mode 100644 index 0000000000..1354ff0e0d Binary files /dev/null and b/build/source/source_base/CMakeFiles/base.dir/intarray.cpp.o differ diff --git a/build/source/source_base/CMakeFiles/base.dir/intarray.cpp.o.d b/build/source/source_base/CMakeFiles/base.dir/intarray.cpp.o.d new file mode 100644 index 0000000000..5ea21ee3d0 --- /dev/null +++ b/build/source/source_base/CMakeFiles/base.dir/intarray.cpp.o.d @@ -0,0 +1,169 @@ +source/source_base/CMakeFiles/base.dir/intarray.cpp.o: \ + /home/haozhihan/Documents/abacus-develop/source/source_base/intarray.cpp \ + /usr/include/stdc-predef.h /usr/include/c++/11/cstdlib \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++config.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/os_defines.h \ + /usr/include/features.h /usr/include/features-time64.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/cpu_defines.h \ + /usr/include/stdlib.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h \ + /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/atomic_wide_counter.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/include/c++/11/bits/std_abs.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/intarray.h \ + /usr/include/c++/11/cassert /usr/include/assert.h \ + /usr/include/c++/11/fstream /usr/include/c++/11/istream \ + /usr/include/c++/11/ios /usr/include/c++/11/iosfwd \ + /usr/include/c++/11/bits/stringfwd.h \ + /usr/include/c++/11/bits/memoryfwd.h /usr/include/c++/11/bits/postypes.h \ + /usr/include/c++/11/cwchar /usr/include/wchar.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/wchar.h \ + /usr/include/x86_64-linux-gnu/bits/types/wint_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/wchar2.h \ + /usr/include/c++/11/exception /usr/include/c++/11/bits/exception.h \ + /usr/include/c++/11/bits/exception_ptr.h \ + /usr/include/c++/11/bits/exception_defines.h \ + /usr/include/c++/11/bits/cxxabi_init_exception.h \ + /usr/include/c++/11/typeinfo /usr/include/c++/11/bits/hash_bytes.h \ + /usr/include/c++/11/new /usr/include/c++/11/bits/move.h \ + /usr/include/c++/11/type_traits \ + /usr/include/c++/11/bits/nested_exception.h \ + /usr/include/c++/11/bits/char_traits.h \ + /usr/include/c++/11/bits/stl_algobase.h \ + /usr/include/c++/11/bits/functexcept.h \ + /usr/include/c++/11/bits/cpp_type_traits.h \ + /usr/include/c++/11/ext/type_traits.h \ + /usr/include/c++/11/ext/numeric_traits.h \ + /usr/include/c++/11/bits/stl_pair.h \ + /usr/include/c++/11/bits/stl_iterator_base_types.h \ + /usr/include/c++/11/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/11/bits/concept_check.h \ + /usr/include/c++/11/debug/assertions.h \ + /usr/include/c++/11/bits/stl_iterator.h \ + /usr/include/c++/11/bits/ptr_traits.h /usr/include/c++/11/debug/debug.h \ + /usr/include/c++/11/bits/predefined_ops.h /usr/include/c++/11/cstdint \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdint.h /usr/include/stdint.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-uintn.h \ + /usr/include/c++/11/bits/localefwd.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++locale.h \ + /usr/include/c++/11/clocale /usr/include/locale.h \ + /usr/include/x86_64-linux-gnu/bits/locale.h /usr/include/c++/11/cctype \ + /usr/include/ctype.h /usr/include/c++/11/bits/ios_base.h \ + /usr/include/c++/11/ext/atomicity.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr-default.h \ + /usr/include/pthread.h /usr/include/sched.h \ + /usr/include/x86_64-linux-gnu/bits/sched.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h \ + /usr/include/x86_64-linux-gnu/bits/cpu-set.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/timex.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h \ + /usr/include/x86_64-linux-gnu/bits/setjmp.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct___jmp_buf_tag.h \ + /usr/include/x86_64-linux-gnu/bits/pthread_stack_min-dynamic.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/atomic_word.h \ + /usr/include/x86_64-linux-gnu/sys/single_threaded.h \ + /usr/include/c++/11/bits/locale_classes.h /usr/include/c++/11/string \ + /usr/include/c++/11/bits/allocator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++allocator.h \ + /usr/include/c++/11/ext/new_allocator.h \ + /usr/include/c++/11/bits/ostream_insert.h \ + /usr/include/c++/11/bits/cxxabi_forced.h \ + /usr/include/c++/11/bits/stl_function.h \ + /usr/include/c++/11/backward/binders.h \ + /usr/include/c++/11/bits/range_access.h \ + /usr/include/c++/11/initializer_list \ + /usr/include/c++/11/bits/basic_string.h \ + /usr/include/c++/11/ext/alloc_traits.h \ + /usr/include/c++/11/bits/alloc_traits.h \ + /usr/include/c++/11/bits/stl_construct.h \ + /usr/include/c++/11/ext/string_conversions.h /usr/include/c++/11/cstdio \ + /usr/include/stdio.h /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/c++/11/cerrno \ + /usr/include/errno.h /usr/include/x86_64-linux-gnu/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/bits/types/error_t.h \ + /usr/include/c++/11/bits/charconv.h \ + /usr/include/c++/11/bits/functional_hash.h \ + /usr/include/c++/11/bits/basic_string.tcc \ + /usr/include/c++/11/bits/locale_classes.tcc \ + /usr/include/c++/11/system_error \ + /usr/include/x86_64-linux-gnu/c++/11/bits/error_constants.h \ + /usr/include/c++/11/stdexcept /usr/include/c++/11/streambuf \ + /usr/include/c++/11/bits/streambuf.tcc \ + /usr/include/c++/11/bits/basic_ios.h \ + /usr/include/c++/11/bits/locale_facets.h /usr/include/c++/11/cwctype \ + /usr/include/wctype.h /usr/include/x86_64-linux-gnu/bits/wctype-wchar.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_base.h \ + /usr/include/c++/11/bits/streambuf_iterator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_inline.h \ + /usr/include/c++/11/bits/locale_facets.tcc \ + /usr/include/c++/11/bits/basic_ios.tcc /usr/include/c++/11/ostream \ + /usr/include/c++/11/bits/ostream.tcc \ + /usr/include/c++/11/bits/istream.tcc /usr/include/c++/11/bits/codecvt.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/basic_file.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++io.h \ + /usr/include/c++/11/bits/fstream.tcc /usr/include/c++/11/iomanip \ + /usr/include/c++/11/locale \ + /usr/include/c++/11/bits/locale_facets_nonio.h /usr/include/c++/11/ctime \ + /usr/include/x86_64-linux-gnu/c++/11/bits/time_members.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/messages_members.h \ + /usr/include/libintl.h /usr/include/c++/11/bits/locale_facets_nonio.tcc \ + /usr/include/c++/11/bits/locale_conv.h \ + /usr/include/c++/11/bits/unique_ptr.h /usr/include/c++/11/utility \ + /usr/include/c++/11/bits/stl_relops.h /usr/include/c++/11/tuple \ + /usr/include/c++/11/array /usr/include/c++/11/bits/uses_allocator.h \ + /usr/include/c++/11/bits/invoke.h /usr/include/c++/11/iostream diff --git a/build/source/source_base/CMakeFiles/base.dir/inverse_matrix.cpp.o b/build/source/source_base/CMakeFiles/base.dir/inverse_matrix.cpp.o new file mode 100644 index 0000000000..29cd963243 Binary files /dev/null and b/build/source/source_base/CMakeFiles/base.dir/inverse_matrix.cpp.o differ diff --git a/build/source/source_base/CMakeFiles/base.dir/inverse_matrix.cpp.o.d b/build/source/source_base/CMakeFiles/base.dir/inverse_matrix.cpp.o.d new file mode 100644 index 0000000000..e1ea3e7570 --- /dev/null +++ b/build/source/source_base/CMakeFiles/base.dir/inverse_matrix.cpp.o.d @@ -0,0 +1,220 @@ +source/source_base/CMakeFiles/base.dir/inverse_matrix.cpp.o: \ + /home/haozhihan/Documents/abacus-develop/source/source_base/inverse_matrix.cpp \ + /usr/include/stdc-predef.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/inverse_matrix.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/global_function.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/blas_connector.h \ + /usr/include/c++/11/complex \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++config.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/os_defines.h \ + /usr/include/features.h /usr/include/features-time64.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/cpu_defines.h \ + /usr/include/c++/11/bits/cpp_type_traits.h \ + /usr/include/c++/11/ext/type_traits.h /usr/include/c++/11/cmath \ + /usr/include/math.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/math-vector.h \ + /usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h \ + /usr/include/x86_64-linux-gnu/bits/flt-eval-method.h \ + /usr/include/x86_64-linux-gnu/bits/fp-logb.h \ + /usr/include/x86_64-linux-gnu/bits/fp-fast.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-narrow.h \ + /usr/include/x86_64-linux-gnu/bits/iscanonical.h \ + /usr/include/c++/11/bits/std_abs.h /usr/include/stdlib.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h \ + /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/atomic_wide_counter.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h /usr/include/c++/11/sstream \ + /usr/include/c++/11/istream /usr/include/c++/11/ios \ + /usr/include/c++/11/iosfwd /usr/include/c++/11/bits/stringfwd.h \ + /usr/include/c++/11/bits/memoryfwd.h /usr/include/c++/11/bits/postypes.h \ + /usr/include/c++/11/cwchar /usr/include/wchar.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/wchar.h \ + /usr/include/x86_64-linux-gnu/bits/types/wint_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/wchar2.h \ + /usr/include/c++/11/exception /usr/include/c++/11/bits/exception.h \ + /usr/include/c++/11/bits/exception_ptr.h \ + /usr/include/c++/11/bits/exception_defines.h \ + /usr/include/c++/11/bits/cxxabi_init_exception.h \ + /usr/include/c++/11/typeinfo /usr/include/c++/11/bits/hash_bytes.h \ + /usr/include/c++/11/new /usr/include/c++/11/bits/move.h \ + /usr/include/c++/11/type_traits \ + /usr/include/c++/11/bits/nested_exception.h \ + /usr/include/c++/11/bits/char_traits.h \ + /usr/include/c++/11/bits/stl_algobase.h \ + /usr/include/c++/11/bits/functexcept.h \ + /usr/include/c++/11/ext/numeric_traits.h \ + /usr/include/c++/11/bits/stl_pair.h \ + /usr/include/c++/11/bits/stl_iterator_base_types.h \ + /usr/include/c++/11/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/11/bits/concept_check.h \ + /usr/include/c++/11/debug/assertions.h \ + /usr/include/c++/11/bits/stl_iterator.h \ + /usr/include/c++/11/bits/ptr_traits.h /usr/include/c++/11/debug/debug.h \ + /usr/include/c++/11/bits/predefined_ops.h /usr/include/c++/11/cstdint \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdint.h /usr/include/stdint.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-uintn.h \ + /usr/include/c++/11/bits/localefwd.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++locale.h \ + /usr/include/c++/11/clocale /usr/include/locale.h \ + /usr/include/x86_64-linux-gnu/bits/locale.h /usr/include/c++/11/cctype \ + /usr/include/ctype.h /usr/include/c++/11/bits/ios_base.h \ + /usr/include/c++/11/ext/atomicity.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr-default.h \ + /usr/include/pthread.h /usr/include/sched.h \ + /usr/include/x86_64-linux-gnu/bits/sched.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h \ + /usr/include/x86_64-linux-gnu/bits/cpu-set.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/timex.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h \ + /usr/include/x86_64-linux-gnu/bits/setjmp.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct___jmp_buf_tag.h \ + /usr/include/x86_64-linux-gnu/bits/pthread_stack_min-dynamic.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/atomic_word.h \ + /usr/include/x86_64-linux-gnu/sys/single_threaded.h \ + /usr/include/c++/11/bits/locale_classes.h /usr/include/c++/11/string \ + /usr/include/c++/11/bits/allocator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++allocator.h \ + /usr/include/c++/11/ext/new_allocator.h \ + /usr/include/c++/11/bits/ostream_insert.h \ + /usr/include/c++/11/bits/cxxabi_forced.h \ + /usr/include/c++/11/bits/stl_function.h \ + /usr/include/c++/11/backward/binders.h \ + /usr/include/c++/11/bits/range_access.h \ + /usr/include/c++/11/initializer_list \ + /usr/include/c++/11/bits/basic_string.h \ + /usr/include/c++/11/ext/alloc_traits.h \ + /usr/include/c++/11/bits/alloc_traits.h \ + /usr/include/c++/11/bits/stl_construct.h \ + /usr/include/c++/11/ext/string_conversions.h /usr/include/c++/11/cstdlib \ + /usr/include/c++/11/cstdio /usr/include/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/c++/11/cerrno \ + /usr/include/errno.h /usr/include/x86_64-linux-gnu/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/bits/types/error_t.h \ + /usr/include/c++/11/bits/charconv.h \ + /usr/include/c++/11/bits/functional_hash.h \ + /usr/include/c++/11/bits/basic_string.tcc \ + /usr/include/c++/11/bits/locale_classes.tcc \ + /usr/include/c++/11/system_error \ + /usr/include/x86_64-linux-gnu/c++/11/bits/error_constants.h \ + /usr/include/c++/11/stdexcept /usr/include/c++/11/streambuf \ + /usr/include/c++/11/bits/streambuf.tcc \ + /usr/include/c++/11/bits/basic_ios.h \ + /usr/include/c++/11/bits/locale_facets.h /usr/include/c++/11/cwctype \ + /usr/include/wctype.h /usr/include/x86_64-linux-gnu/bits/wctype-wchar.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_base.h \ + /usr/include/c++/11/bits/streambuf_iterator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_inline.h \ + /usr/include/c++/11/bits/locale_facets.tcc \ + /usr/include/c++/11/bits/basic_ios.tcc /usr/include/c++/11/ostream \ + /usr/include/c++/11/bits/ostream.tcc \ + /usr/include/c++/11/bits/istream.tcc \ + /usr/include/c++/11/bits/sstream.tcc \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_device/types.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/macros.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/global_function-func_each_2.h \ + /usr/include/c++/11/functional /usr/include/c++/11/tuple \ + /usr/include/c++/11/utility /usr/include/c++/11/bits/stl_relops.h \ + /usr/include/c++/11/array /usr/include/c++/11/bits/uses_allocator.h \ + /usr/include/c++/11/bits/invoke.h /usr/include/c++/11/bits/refwrap.h \ + /usr/include/c++/11/bits/std_function.h /usr/include/c++/11/map \ + /usr/include/c++/11/bits/stl_tree.h \ + /usr/include/c++/11/ext/aligned_buffer.h \ + /usr/include/c++/11/bits/stl_map.h \ + /usr/include/c++/11/bits/stl_multimap.h \ + /usr/include/c++/11/bits/erase_if.h /usr/include/c++/11/vector \ + /usr/include/c++/11/bits/stl_uninitialized.h \ + /usr/include/c++/11/bits/stl_vector.h \ + /usr/include/c++/11/bits/stl_bvector.h \ + /usr/include/c++/11/bits/vector.tcc \ + /home/haozhihan/Documents/abacus-develop/source/source_base/global_variable.h \ + /usr/include/c++/11/fstream /usr/include/c++/11/bits/codecvt.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/basic_file.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++io.h \ + /usr/include/c++/11/bits/fstream.tcc /usr/include/c++/11/iomanip \ + /usr/include/c++/11/locale \ + /usr/include/c++/11/bits/locale_facets_nonio.h /usr/include/c++/11/ctime \ + /usr/include/x86_64-linux-gnu/c++/11/bits/time_members.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/messages_members.h \ + /usr/include/libintl.h /usr/include/c++/11/bits/locale_facets_nonio.tcc \ + /usr/include/c++/11/bits/locale_conv.h \ + /usr/include/c++/11/bits/unique_ptr.h /usr/include/c++/11/iostream \ + /home/haozhihan/Documents/abacus-develop/source/source_base/tool_check.h \ + /usr/include/c++/11/cassert /usr/include/assert.h \ + /usr/include/c++/11/valarray /usr/include/c++/11/algorithm \ + /usr/include/c++/11/bits/stl_algo.h \ + /usr/include/c++/11/bits/algorithmfwd.h \ + /usr/include/c++/11/bits/stl_heap.h \ + /usr/include/c++/11/bits/stl_tempbuf.h \ + /usr/include/c++/11/bits/uniform_int_dist.h \ + /usr/include/c++/11/bits/valarray_array.h \ + /usr/include/c++/11/bits/valarray_array.tcc \ + /usr/include/c++/11/bits/valarray_before.h \ + /usr/include/c++/11/bits/slice_array.h \ + /usr/include/c++/11/bits/valarray_after.h \ + /usr/include/c++/11/bits/gslice.h \ + /usr/include/c++/11/bits/gslice_array.h \ + /usr/include/c++/11/bits/mask_array.h \ + /usr/include/c++/11/bits/indirect_array.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/tool_quit.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/tool_title.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/complexmatrix.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/matrix.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/lapack_connector.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/timer.h diff --git a/build/source/source_base/CMakeFiles/base.dir/math_bspline.cpp.o b/build/source/source_base/CMakeFiles/base.dir/math_bspline.cpp.o new file mode 100644 index 0000000000..00f508ea6b Binary files /dev/null and b/build/source/source_base/CMakeFiles/base.dir/math_bspline.cpp.o differ diff --git a/build/source/source_base/CMakeFiles/base.dir/math_bspline.cpp.o.d b/build/source/source_base/CMakeFiles/base.dir/math_bspline.cpp.o.d new file mode 100644 index 0000000000..afb16f0e1f --- /dev/null +++ b/build/source/source_base/CMakeFiles/base.dir/math_bspline.cpp.o.d @@ -0,0 +1,54 @@ +source/source_base/CMakeFiles/base.dir/math_bspline.cpp.o: \ + /home/haozhihan/Documents/abacus-develop/source/source_base/math_bspline.cpp \ + /usr/include/stdc-predef.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/math_bspline.h \ + /usr/include/assert.h /usr/include/features.h \ + /usr/include/features-time64.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h /usr/include/c++/11/cstdlib \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++config.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/os_defines.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/cpu_defines.h \ + /usr/include/stdlib.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h \ + /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/atomic_wide_counter.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/include/c++/11/bits/std_abs.h diff --git a/build/source/source_base/CMakeFiles/base.dir/math_chebyshev.cpp.o b/build/source/source_base/CMakeFiles/base.dir/math_chebyshev.cpp.o new file mode 100644 index 0000000000..3adc46f9c6 Binary files /dev/null and b/build/source/source_base/CMakeFiles/base.dir/math_chebyshev.cpp.o differ diff --git a/build/source/source_base/CMakeFiles/base.dir/math_chebyshev.cpp.o.d b/build/source/source_base/CMakeFiles/base.dir/math_chebyshev.cpp.o.d new file mode 100644 index 0000000000..c44541a479 --- /dev/null +++ b/build/source/source_base/CMakeFiles/base.dir/math_chebyshev.cpp.o.d @@ -0,0 +1,300 @@ +source/source_base/CMakeFiles/base.dir/math_chebyshev.cpp.o: \ + /home/haozhihan/Documents/abacus-develop/source/source_base/math_chebyshev.cpp \ + /usr/include/stdc-predef.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/math_chebyshev.h \ + /usr/local/include/fftw3.h /usr/include/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/features.h /usr/include/features-time64.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_device/device.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_device/types.h \ + /usr/include/c++/11/fstream /usr/include/c++/11/istream \ + /usr/include/c++/11/ios /usr/include/c++/11/iosfwd \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++config.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/os_defines.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/cpu_defines.h \ + /usr/include/c++/11/bits/stringfwd.h \ + /usr/include/c++/11/bits/memoryfwd.h /usr/include/c++/11/bits/postypes.h \ + /usr/include/c++/11/cwchar /usr/include/wchar.h \ + /usr/include/x86_64-linux-gnu/bits/wchar.h \ + /usr/include/x86_64-linux-gnu/bits/types/wint_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/wchar2.h \ + /usr/include/c++/11/exception /usr/include/c++/11/bits/exception.h \ + /usr/include/c++/11/bits/exception_ptr.h \ + /usr/include/c++/11/bits/exception_defines.h \ + /usr/include/c++/11/bits/cxxabi_init_exception.h \ + /usr/include/c++/11/typeinfo /usr/include/c++/11/bits/hash_bytes.h \ + /usr/include/c++/11/new /usr/include/c++/11/bits/move.h \ + /usr/include/c++/11/type_traits \ + /usr/include/c++/11/bits/nested_exception.h \ + /usr/include/c++/11/bits/char_traits.h \ + /usr/include/c++/11/bits/stl_algobase.h \ + /usr/include/c++/11/bits/functexcept.h \ + /usr/include/c++/11/bits/cpp_type_traits.h \ + /usr/include/c++/11/ext/type_traits.h \ + /usr/include/c++/11/ext/numeric_traits.h \ + /usr/include/c++/11/bits/stl_pair.h \ + /usr/include/c++/11/bits/stl_iterator_base_types.h \ + /usr/include/c++/11/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/11/bits/concept_check.h \ + /usr/include/c++/11/debug/assertions.h \ + /usr/include/c++/11/bits/stl_iterator.h \ + /usr/include/c++/11/bits/ptr_traits.h /usr/include/c++/11/debug/debug.h \ + /usr/include/c++/11/bits/predefined_ops.h /usr/include/c++/11/cstdint \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdint.h /usr/include/stdint.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-uintn.h \ + /usr/include/c++/11/bits/localefwd.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++locale.h \ + /usr/include/c++/11/clocale /usr/include/locale.h \ + /usr/include/x86_64-linux-gnu/bits/locale.h /usr/include/c++/11/cctype \ + /usr/include/ctype.h /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/c++/11/bits/ios_base.h /usr/include/c++/11/ext/atomicity.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr-default.h \ + /usr/include/pthread.h /usr/include/sched.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/sched.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h \ + /usr/include/x86_64-linux-gnu/bits/cpu-set.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/timex.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/atomic_wide_counter.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h \ + /usr/include/x86_64-linux-gnu/bits/setjmp.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct___jmp_buf_tag.h \ + /usr/include/x86_64-linux-gnu/bits/pthread_stack_min-dynamic.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/atomic_word.h \ + /usr/include/x86_64-linux-gnu/sys/single_threaded.h \ + /usr/include/c++/11/bits/locale_classes.h /usr/include/c++/11/string \ + /usr/include/c++/11/bits/allocator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++allocator.h \ + /usr/include/c++/11/ext/new_allocator.h \ + /usr/include/c++/11/bits/ostream_insert.h \ + /usr/include/c++/11/bits/cxxabi_forced.h \ + /usr/include/c++/11/bits/stl_function.h \ + /usr/include/c++/11/backward/binders.h \ + /usr/include/c++/11/bits/range_access.h \ + /usr/include/c++/11/initializer_list \ + /usr/include/c++/11/bits/basic_string.h \ + /usr/include/c++/11/ext/alloc_traits.h \ + /usr/include/c++/11/bits/alloc_traits.h \ + /usr/include/c++/11/bits/stl_construct.h \ + /usr/include/c++/11/ext/string_conversions.h /usr/include/c++/11/cstdlib \ + /usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/sys/types.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/include/c++/11/bits/std_abs.h /usr/include/c++/11/cstdio \ + /usr/include/c++/11/cerrno /usr/include/errno.h \ + /usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \ + /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/bits/types/error_t.h \ + /usr/include/c++/11/bits/charconv.h \ + /usr/include/c++/11/bits/functional_hash.h \ + /usr/include/c++/11/bits/basic_string.tcc \ + /usr/include/c++/11/bits/locale_classes.tcc \ + /usr/include/c++/11/system_error \ + /usr/include/x86_64-linux-gnu/c++/11/bits/error_constants.h \ + /usr/include/c++/11/stdexcept /usr/include/c++/11/streambuf \ + /usr/include/c++/11/bits/streambuf.tcc \ + /usr/include/c++/11/bits/basic_ios.h \ + /usr/include/c++/11/bits/locale_facets.h /usr/include/c++/11/cwctype \ + /usr/include/wctype.h /usr/include/x86_64-linux-gnu/bits/wctype-wchar.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_base.h \ + /usr/include/c++/11/bits/streambuf_iterator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_inline.h \ + /usr/include/c++/11/bits/locale_facets.tcc \ + /usr/include/c++/11/bits/basic_ios.tcc /usr/include/c++/11/ostream \ + /usr/include/c++/11/bits/ostream.tcc \ + /usr/include/c++/11/bits/istream.tcc /usr/include/c++/11/bits/codecvt.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/basic_file.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++io.h \ + /usr/include/c++/11/bits/fstream.tcc \ + /usr/lib/x86_64-linux-gnu/openmpi/include/mpi.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/mpi_portable_platform.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/mpicxx.h \ + /usr/include/c++/11/map /usr/include/c++/11/bits/stl_tree.h \ + /usr/include/c++/11/ext/aligned_buffer.h \ + /usr/include/c++/11/bits/stl_map.h /usr/include/c++/11/tuple \ + /usr/include/c++/11/utility /usr/include/c++/11/bits/stl_relops.h \ + /usr/include/c++/11/array /usr/include/c++/11/bits/uses_allocator.h \ + /usr/include/c++/11/bits/invoke.h \ + /usr/include/c++/11/bits/stl_multimap.h \ + /usr/include/c++/11/bits/erase_if.h /usr/include/c++/11/iostream \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/constants.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/functions.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/datatype.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/exception.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/op.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/status.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/request.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/group.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/comm.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/win.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/file.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/errhandler.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/intracomm.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/topology.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/intercomm.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/info.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/datatype_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/functions_inln.h \ + /usr/include/string.h /usr/include/strings.h \ + /usr/include/x86_64-linux-gnu/bits/strings_fortified.h \ + /usr/include/x86_64-linux-gnu/bits/string_fortified.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/request_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/comm_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/intracomm_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/topology_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/intercomm_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/group_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/op_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/errhandler_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/status_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/info_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/win_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/file_inln.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_device/memory_op.h \ + /usr/include/c++/11/complex /usr/include/c++/11/cmath \ + /usr/include/math.h /usr/include/x86_64-linux-gnu/bits/math-vector.h \ + /usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h \ + /usr/include/x86_64-linux-gnu/bits/flt-eval-method.h \ + /usr/include/x86_64-linux-gnu/bits/fp-logb.h \ + /usr/include/x86_64-linux-gnu/bits/fp-fast.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-narrow.h \ + /usr/include/x86_64-linux-gnu/bits/iscanonical.h \ + /usr/include/c++/11/sstream /usr/include/c++/11/bits/sstream.tcc \ + /usr/include/c++/11/cstddef \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor_types.h \ + /usr/include/c++/11/regex /usr/include/c++/11/algorithm \ + /usr/include/c++/11/bits/stl_algo.h \ + /usr/include/c++/11/bits/algorithmfwd.h \ + /usr/include/c++/11/bits/stl_heap.h \ + /usr/include/c++/11/bits/stl_tempbuf.h \ + /usr/include/c++/11/bits/uniform_int_dist.h /usr/include/c++/11/bitset \ + /usr/include/c++/11/iterator /usr/include/c++/11/bits/stream_iterator.h \ + /usr/include/c++/11/locale \ + /usr/include/c++/11/bits/locale_facets_nonio.h /usr/include/c++/11/ctime \ + /usr/include/x86_64-linux-gnu/c++/11/bits/time_members.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/messages_members.h \ + /usr/include/libintl.h /usr/include/c++/11/bits/locale_facets_nonio.tcc \ + /usr/include/c++/11/bits/locale_conv.h \ + /usr/include/c++/11/bits/unique_ptr.h /usr/include/c++/11/memory \ + /usr/include/c++/11/bits/stl_uninitialized.h \ + /usr/include/c++/11/bits/stl_raw_storage_iter.h \ + /usr/include/c++/11/bits/align.h /usr/include/c++/11/bit \ + /usr/include/c++/11/bits/shared_ptr.h \ + /usr/include/c++/11/bits/shared_ptr_base.h \ + /usr/include/c++/11/bits/allocated_ptr.h \ + /usr/include/c++/11/bits/refwrap.h /usr/include/c++/11/ext/concurrence.h \ + /usr/include/c++/11/bits/shared_ptr_atomic.h \ + /usr/include/c++/11/bits/atomic_base.h \ + /usr/include/c++/11/bits/atomic_lockfree_defines.h \ + /usr/include/c++/11/backward/auto_ptr.h /usr/include/c++/11/stack \ + /usr/include/c++/11/deque /usr/include/c++/11/bits/stl_deque.h \ + /usr/include/c++/11/bits/deque.tcc /usr/include/c++/11/bits/stl_stack.h \ + /usr/include/c++/11/vector /usr/include/c++/11/bits/stl_vector.h \ + /usr/include/c++/11/bits/stl_bvector.h \ + /usr/include/c++/11/bits/vector.tcc /usr/include/c++/11/cstring \ + /usr/include/c++/11/bits/std_function.h \ + /usr/include/c++/11/bits/regex_constants.h \ + /usr/include/c++/11/bits/regex_error.h \ + /usr/include/c++/11/bits/regex_automaton.h \ + /usr/include/c++/11/bits/regex_automaton.tcc \ + /usr/include/c++/11/bits/regex_scanner.h \ + /usr/include/c++/11/bits/regex_scanner.tcc \ + /usr/include/c++/11/bits/regex_compiler.h \ + /usr/include/c++/11/bits/regex_compiler.tcc \ + /usr/include/c++/11/bits/regex.h /usr/include/c++/11/bits/regex.tcc \ + /usr/include/c++/11/bits/regex_executor.h \ + /usr/include/c++/11/bits/regex_executor.tcc /usr/include/c++/11/numeric \ + /usr/include/c++/11/bits/stl_numeric.h /usr/include/c++/11/iomanip \ + /usr/include/c++/11/unordered_map /usr/include/c++/11/bits/hashtable.h \ + /usr/include/c++/11/bits/hashtable_policy.h \ + /usr/include/c++/11/bits/enable_special_members.h \ + /usr/include/c++/11/bits/unordered_map.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_device/types.h \ + /usr/include/c++/11/functional \ + /home/haozhihan/Documents/abacus-develop/source/source_base/blas_connector.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/macros.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/constants.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/global_function.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/global_function-func_each_2.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/global_variable.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/tool_check.h \ + /usr/include/c++/11/cassert /usr/include/assert.h \ + /usr/include/c++/11/valarray /usr/include/c++/11/bits/valarray_array.h \ + /usr/include/c++/11/bits/valarray_array.tcc \ + /usr/include/c++/11/bits/valarray_before.h \ + /usr/include/c++/11/bits/slice_array.h \ + /usr/include/c++/11/bits/valarray_after.h \ + /usr/include/c++/11/bits/gslice.h \ + /usr/include/c++/11/bits/gslice_array.h \ + /usr/include/c++/11/bits/mask_array.h \ + /usr/include/c++/11/bits/indirect_array.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/tool_quit.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/tool_title.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/kernels/blas.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/base/core/allocator.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor_types.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor_shape.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor_buffer.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/base/core/refcount.h \ + /usr/include/c++/11/atomic \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor_accessor.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/base/macros/macros.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/base/utils/logging.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/base/utils/array_ref.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/kernels/memory.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/base/third_party/blas.h diff --git a/build/source/source_base/CMakeFiles/base.dir/math_erf_complex.cpp.o b/build/source/source_base/CMakeFiles/base.dir/math_erf_complex.cpp.o new file mode 100644 index 0000000000..46523a7254 Binary files /dev/null and b/build/source/source_base/CMakeFiles/base.dir/math_erf_complex.cpp.o differ diff --git a/build/source/source_base/CMakeFiles/base.dir/math_erf_complex.cpp.o.d b/build/source/source_base/CMakeFiles/base.dir/math_erf_complex.cpp.o.d new file mode 100644 index 0000000000..c828afcc64 --- /dev/null +++ b/build/source/source_base/CMakeFiles/base.dir/math_erf_complex.cpp.o.d @@ -0,0 +1,174 @@ +source/source_base/CMakeFiles/base.dir/math_erf_complex.cpp.o: \ + /home/haozhihan/Documents/abacus-develop/source/source_base/math_erf_complex.cpp \ + /usr/include/stdc-predef.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/math_erf_complex.h \ + /usr/include/c++/11/complex \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++config.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/os_defines.h \ + /usr/include/features.h /usr/include/features-time64.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/cpu_defines.h \ + /usr/include/c++/11/bits/cpp_type_traits.h \ + /usr/include/c++/11/ext/type_traits.h /usr/include/c++/11/cmath \ + /usr/include/math.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/math-vector.h \ + /usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h \ + /usr/include/x86_64-linux-gnu/bits/flt-eval-method.h \ + /usr/include/x86_64-linux-gnu/bits/fp-logb.h \ + /usr/include/x86_64-linux-gnu/bits/fp-fast.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-narrow.h \ + /usr/include/x86_64-linux-gnu/bits/iscanonical.h \ + /usr/include/c++/11/bits/std_abs.h /usr/include/stdlib.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h \ + /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/atomic_wide_counter.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h /usr/include/c++/11/sstream \ + /usr/include/c++/11/istream /usr/include/c++/11/ios \ + /usr/include/c++/11/iosfwd /usr/include/c++/11/bits/stringfwd.h \ + /usr/include/c++/11/bits/memoryfwd.h /usr/include/c++/11/bits/postypes.h \ + /usr/include/c++/11/cwchar /usr/include/wchar.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/wchar.h \ + /usr/include/x86_64-linux-gnu/bits/types/wint_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/wchar2.h \ + /usr/include/c++/11/exception /usr/include/c++/11/bits/exception.h \ + /usr/include/c++/11/bits/exception_ptr.h \ + /usr/include/c++/11/bits/exception_defines.h \ + /usr/include/c++/11/bits/cxxabi_init_exception.h \ + /usr/include/c++/11/typeinfo /usr/include/c++/11/bits/hash_bytes.h \ + /usr/include/c++/11/new /usr/include/c++/11/bits/move.h \ + /usr/include/c++/11/type_traits \ + /usr/include/c++/11/bits/nested_exception.h \ + /usr/include/c++/11/bits/char_traits.h \ + /usr/include/c++/11/bits/stl_algobase.h \ + /usr/include/c++/11/bits/functexcept.h \ + /usr/include/c++/11/ext/numeric_traits.h \ + /usr/include/c++/11/bits/stl_pair.h \ + /usr/include/c++/11/bits/stl_iterator_base_types.h \ + /usr/include/c++/11/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/11/bits/concept_check.h \ + /usr/include/c++/11/debug/assertions.h \ + /usr/include/c++/11/bits/stl_iterator.h \ + /usr/include/c++/11/bits/ptr_traits.h /usr/include/c++/11/debug/debug.h \ + /usr/include/c++/11/bits/predefined_ops.h /usr/include/c++/11/cstdint \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdint.h /usr/include/stdint.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-uintn.h \ + /usr/include/c++/11/bits/localefwd.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++locale.h \ + /usr/include/c++/11/clocale /usr/include/locale.h \ + /usr/include/x86_64-linux-gnu/bits/locale.h /usr/include/c++/11/cctype \ + /usr/include/ctype.h /usr/include/c++/11/bits/ios_base.h \ + /usr/include/c++/11/ext/atomicity.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr-default.h \ + /usr/include/pthread.h /usr/include/sched.h \ + /usr/include/x86_64-linux-gnu/bits/sched.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h \ + /usr/include/x86_64-linux-gnu/bits/cpu-set.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/timex.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h \ + /usr/include/x86_64-linux-gnu/bits/setjmp.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct___jmp_buf_tag.h \ + /usr/include/x86_64-linux-gnu/bits/pthread_stack_min-dynamic.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/atomic_word.h \ + /usr/include/x86_64-linux-gnu/sys/single_threaded.h \ + /usr/include/c++/11/bits/locale_classes.h /usr/include/c++/11/string \ + /usr/include/c++/11/bits/allocator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++allocator.h \ + /usr/include/c++/11/ext/new_allocator.h \ + /usr/include/c++/11/bits/ostream_insert.h \ + /usr/include/c++/11/bits/cxxabi_forced.h \ + /usr/include/c++/11/bits/stl_function.h \ + /usr/include/c++/11/backward/binders.h \ + /usr/include/c++/11/bits/range_access.h \ + /usr/include/c++/11/initializer_list \ + /usr/include/c++/11/bits/basic_string.h \ + /usr/include/c++/11/ext/alloc_traits.h \ + /usr/include/c++/11/bits/alloc_traits.h \ + /usr/include/c++/11/bits/stl_construct.h \ + /usr/include/c++/11/ext/string_conversions.h /usr/include/c++/11/cstdlib \ + /usr/include/c++/11/cstdio /usr/include/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/c++/11/cerrno \ + /usr/include/errno.h /usr/include/x86_64-linux-gnu/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/bits/types/error_t.h \ + /usr/include/c++/11/bits/charconv.h \ + /usr/include/c++/11/bits/functional_hash.h \ + /usr/include/c++/11/bits/basic_string.tcc \ + /usr/include/c++/11/bits/locale_classes.tcc \ + /usr/include/c++/11/system_error \ + /usr/include/x86_64-linux-gnu/c++/11/bits/error_constants.h \ + /usr/include/c++/11/stdexcept /usr/include/c++/11/streambuf \ + /usr/include/c++/11/bits/streambuf.tcc \ + /usr/include/c++/11/bits/basic_ios.h \ + /usr/include/c++/11/bits/locale_facets.h /usr/include/c++/11/cwctype \ + /usr/include/wctype.h /usr/include/x86_64-linux-gnu/bits/wctype-wchar.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_base.h \ + /usr/include/c++/11/bits/streambuf_iterator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_inline.h \ + /usr/include/c++/11/bits/locale_facets.tcc \ + /usr/include/c++/11/bits/basic_ios.tcc /usr/include/c++/11/ostream \ + /usr/include/c++/11/bits/ostream.tcc \ + /usr/include/c++/11/bits/istream.tcc \ + /usr/include/c++/11/bits/sstream.tcc /usr/include/c++/11/vector \ + /usr/include/c++/11/bits/stl_uninitialized.h \ + /usr/include/c++/11/bits/stl_vector.h \ + /usr/include/c++/11/bits/stl_bvector.h \ + /usr/include/c++/11/bits/vector.tcc \ + /home/haozhihan/Documents/abacus-develop/source/source_base/constants.h \ + /usr/include/c++/11/cfloat \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/float.h \ + /usr/include/c++/11/limits diff --git a/build/source/source_base/CMakeFiles/base.dir/math_integral.cpp.o b/build/source/source_base/CMakeFiles/base.dir/math_integral.cpp.o new file mode 100644 index 0000000000..96ea6970ab Binary files /dev/null and b/build/source/source_base/CMakeFiles/base.dir/math_integral.cpp.o differ diff --git a/build/source/source_base/CMakeFiles/base.dir/math_integral.cpp.o.d b/build/source/source_base/CMakeFiles/base.dir/math_integral.cpp.o.d new file mode 100644 index 0000000000..782690b030 --- /dev/null +++ b/build/source/source_base/CMakeFiles/base.dir/math_integral.cpp.o.d @@ -0,0 +1,176 @@ +source/source_base/CMakeFiles/base.dir/math_integral.cpp.o: \ + /home/haozhihan/Documents/abacus-develop/source/source_base/math_integral.cpp \ + /usr/include/stdc-predef.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/math_integral.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h \ + /usr/include/c++/11/cassert \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++config.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/os_defines.h \ + /usr/include/features.h /usr/include/features-time64.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/cpu_defines.h \ + /usr/include/assert.h /usr/include/c++/11/algorithm \ + /usr/include/c++/11/utility /usr/include/c++/11/bits/stl_relops.h \ + /usr/include/c++/11/bits/stl_pair.h /usr/include/c++/11/bits/move.h \ + /usr/include/c++/11/type_traits /usr/include/c++/11/initializer_list \ + /usr/include/c++/11/bits/stl_algobase.h \ + /usr/include/c++/11/bits/functexcept.h \ + /usr/include/c++/11/bits/exception_defines.h \ + /usr/include/c++/11/bits/cpp_type_traits.h \ + /usr/include/c++/11/ext/type_traits.h \ + /usr/include/c++/11/ext/numeric_traits.h \ + /usr/include/c++/11/bits/stl_iterator_base_types.h \ + /usr/include/c++/11/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/11/bits/concept_check.h \ + /usr/include/c++/11/debug/assertions.h \ + /usr/include/c++/11/bits/stl_iterator.h \ + /usr/include/c++/11/bits/ptr_traits.h /usr/include/c++/11/debug/debug.h \ + /usr/include/c++/11/bits/predefined_ops.h \ + /usr/include/c++/11/bits/stl_algo.h /usr/include/c++/11/cstdlib \ + /usr/include/stdlib.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/atomic_wide_counter.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/include/c++/11/bits/std_abs.h \ + /usr/include/c++/11/bits/algorithmfwd.h \ + /usr/include/c++/11/bits/stl_heap.h \ + /usr/include/c++/11/bits/stl_tempbuf.h \ + /usr/include/c++/11/bits/stl_construct.h /usr/include/c++/11/new \ + /usr/include/c++/11/bits/exception.h \ + /usr/include/c++/11/bits/uniform_int_dist.h \ + /usr/include/c++/11/functional /usr/include/c++/11/bits/stl_function.h \ + /usr/include/c++/11/backward/binders.h /usr/include/c++/11/tuple \ + /usr/include/c++/11/array /usr/include/c++/11/bits/range_access.h \ + /usr/include/c++/11/bits/uses_allocator.h \ + /usr/include/c++/11/bits/invoke.h \ + /usr/include/c++/11/bits/functional_hash.h \ + /usr/include/c++/11/bits/hash_bytes.h /usr/include/c++/11/bits/refwrap.h \ + /usr/include/c++/11/bits/std_function.h /usr/include/c++/11/typeinfo \ + /usr/include/c++/11/cmath /usr/include/math.h \ + /usr/include/x86_64-linux-gnu/bits/math-vector.h \ + /usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h \ + /usr/include/x86_64-linux-gnu/bits/flt-eval-method.h \ + /usr/include/x86_64-linux-gnu/bits/fp-logb.h \ + /usr/include/x86_64-linux-gnu/bits/fp-fast.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-narrow.h \ + /usr/include/x86_64-linux-gnu/bits/iscanonical.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/constants.h \ + /usr/include/c++/11/complex /usr/include/c++/11/sstream \ + /usr/include/c++/11/istream /usr/include/c++/11/ios \ + /usr/include/c++/11/iosfwd /usr/include/c++/11/bits/stringfwd.h \ + /usr/include/c++/11/bits/memoryfwd.h /usr/include/c++/11/bits/postypes.h \ + /usr/include/c++/11/cwchar /usr/include/wchar.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/wchar.h \ + /usr/include/x86_64-linux-gnu/bits/types/wint_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/wchar2.h \ + /usr/include/c++/11/exception /usr/include/c++/11/bits/exception_ptr.h \ + /usr/include/c++/11/bits/cxxabi_init_exception.h \ + /usr/include/c++/11/bits/nested_exception.h \ + /usr/include/c++/11/bits/char_traits.h /usr/include/c++/11/cstdint \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdint.h /usr/include/stdint.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-uintn.h \ + /usr/include/c++/11/bits/localefwd.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++locale.h \ + /usr/include/c++/11/clocale /usr/include/locale.h \ + /usr/include/x86_64-linux-gnu/bits/locale.h /usr/include/c++/11/cctype \ + /usr/include/ctype.h /usr/include/c++/11/bits/ios_base.h \ + /usr/include/c++/11/ext/atomicity.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr-default.h \ + /usr/include/pthread.h /usr/include/sched.h \ + /usr/include/x86_64-linux-gnu/bits/sched.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h \ + /usr/include/x86_64-linux-gnu/bits/cpu-set.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/timex.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h \ + /usr/include/x86_64-linux-gnu/bits/setjmp.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct___jmp_buf_tag.h \ + /usr/include/x86_64-linux-gnu/bits/pthread_stack_min-dynamic.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/atomic_word.h \ + /usr/include/x86_64-linux-gnu/sys/single_threaded.h \ + /usr/include/c++/11/bits/locale_classes.h /usr/include/c++/11/string \ + /usr/include/c++/11/bits/allocator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++allocator.h \ + /usr/include/c++/11/ext/new_allocator.h \ + /usr/include/c++/11/bits/ostream_insert.h \ + /usr/include/c++/11/bits/cxxabi_forced.h \ + /usr/include/c++/11/bits/basic_string.h \ + /usr/include/c++/11/ext/alloc_traits.h \ + /usr/include/c++/11/bits/alloc_traits.h \ + /usr/include/c++/11/ext/string_conversions.h /usr/include/c++/11/cstdio \ + /usr/include/stdio.h /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/c++/11/cerrno \ + /usr/include/errno.h /usr/include/x86_64-linux-gnu/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/bits/types/error_t.h \ + /usr/include/c++/11/bits/charconv.h \ + /usr/include/c++/11/bits/basic_string.tcc \ + /usr/include/c++/11/bits/locale_classes.tcc \ + /usr/include/c++/11/system_error \ + /usr/include/x86_64-linux-gnu/c++/11/bits/error_constants.h \ + /usr/include/c++/11/stdexcept /usr/include/c++/11/streambuf \ + /usr/include/c++/11/bits/streambuf.tcc \ + /usr/include/c++/11/bits/basic_ios.h \ + /usr/include/c++/11/bits/locale_facets.h /usr/include/c++/11/cwctype \ + /usr/include/wctype.h /usr/include/x86_64-linux-gnu/bits/wctype-wchar.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_base.h \ + /usr/include/c++/11/bits/streambuf_iterator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_inline.h \ + /usr/include/c++/11/bits/locale_facets.tcc \ + /usr/include/c++/11/bits/basic_ios.tcc /usr/include/c++/11/ostream \ + /usr/include/c++/11/bits/ostream.tcc \ + /usr/include/c++/11/bits/istream.tcc \ + /usr/include/c++/11/bits/sstream.tcc diff --git a/build/source/source_base/CMakeFiles/base.dir/math_lebedev_laikov.cpp.o b/build/source/source_base/CMakeFiles/base.dir/math_lebedev_laikov.cpp.o new file mode 100644 index 0000000000..edf10095bd Binary files /dev/null and b/build/source/source_base/CMakeFiles/base.dir/math_lebedev_laikov.cpp.o differ diff --git a/build/source/source_base/CMakeFiles/base.dir/math_lebedev_laikov.cpp.o.d b/build/source/source_base/CMakeFiles/base.dir/math_lebedev_laikov.cpp.o.d new file mode 100644 index 0000000000..4a30e8d0d8 --- /dev/null +++ b/build/source/source_base/CMakeFiles/base.dir/math_lebedev_laikov.cpp.o.d @@ -0,0 +1,186 @@ +source/source_base/CMakeFiles/base.dir/math_lebedev_laikov.cpp.o: \ + /home/haozhihan/Documents/abacus-develop/source/source_base/math_lebedev_laikov.cpp \ + /usr/include/stdc-predef.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/math_lebedev_laikov.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/vector3.h \ + /usr/include/c++/11/cmath \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++config.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/os_defines.h \ + /usr/include/features.h /usr/include/features-time64.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/cpu_defines.h \ + /usr/include/c++/11/bits/cpp_type_traits.h \ + /usr/include/c++/11/ext/type_traits.h /usr/include/math.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/math-vector.h \ + /usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h \ + /usr/include/x86_64-linux-gnu/bits/flt-eval-method.h \ + /usr/include/x86_64-linux-gnu/bits/fp-logb.h \ + /usr/include/x86_64-linux-gnu/bits/fp-fast.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-narrow.h \ + /usr/include/x86_64-linux-gnu/bits/iscanonical.h \ + /usr/include/c++/11/bits/std_abs.h /usr/include/stdlib.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h \ + /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/atomic_wide_counter.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h /usr/include/c++/11/iomanip \ + /usr/include/c++/11/iosfwd /usr/include/c++/11/bits/stringfwd.h \ + /usr/include/c++/11/bits/memoryfwd.h /usr/include/c++/11/bits/postypes.h \ + /usr/include/c++/11/cwchar /usr/include/wchar.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/wchar.h \ + /usr/include/x86_64-linux-gnu/bits/types/wint_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/wchar2.h \ + /usr/include/c++/11/bits/ios_base.h /usr/include/c++/11/ext/atomicity.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr-default.h \ + /usr/include/pthread.h /usr/include/sched.h \ + /usr/include/x86_64-linux-gnu/bits/sched.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h \ + /usr/include/x86_64-linux-gnu/bits/cpu-set.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/timex.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h \ + /usr/include/x86_64-linux-gnu/bits/setjmp.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct___jmp_buf_tag.h \ + /usr/include/x86_64-linux-gnu/bits/pthread_stack_min-dynamic.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/atomic_word.h \ + /usr/include/x86_64-linux-gnu/sys/single_threaded.h \ + /usr/include/c++/11/bits/localefwd.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++locale.h \ + /usr/include/c++/11/clocale /usr/include/locale.h \ + /usr/include/x86_64-linux-gnu/bits/locale.h /usr/include/c++/11/cctype \ + /usr/include/ctype.h /usr/include/c++/11/bits/locale_classes.h \ + /usr/include/c++/11/string /usr/include/c++/11/bits/char_traits.h \ + /usr/include/c++/11/bits/stl_algobase.h \ + /usr/include/c++/11/bits/functexcept.h \ + /usr/include/c++/11/bits/exception_defines.h \ + /usr/include/c++/11/ext/numeric_traits.h \ + /usr/include/c++/11/bits/stl_pair.h /usr/include/c++/11/bits/move.h \ + /usr/include/c++/11/type_traits \ + /usr/include/c++/11/bits/stl_iterator_base_types.h \ + /usr/include/c++/11/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/11/bits/concept_check.h \ + /usr/include/c++/11/debug/assertions.h \ + /usr/include/c++/11/bits/stl_iterator.h \ + /usr/include/c++/11/bits/ptr_traits.h /usr/include/c++/11/debug/debug.h \ + /usr/include/c++/11/bits/predefined_ops.h /usr/include/c++/11/cstdint \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdint.h /usr/include/stdint.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-uintn.h \ + /usr/include/c++/11/bits/allocator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++allocator.h \ + /usr/include/c++/11/ext/new_allocator.h /usr/include/c++/11/new \ + /usr/include/c++/11/bits/exception.h \ + /usr/include/c++/11/bits/ostream_insert.h \ + /usr/include/c++/11/bits/cxxabi_forced.h \ + /usr/include/c++/11/bits/stl_function.h \ + /usr/include/c++/11/backward/binders.h \ + /usr/include/c++/11/bits/range_access.h \ + /usr/include/c++/11/initializer_list \ + /usr/include/c++/11/bits/basic_string.h \ + /usr/include/c++/11/ext/alloc_traits.h \ + /usr/include/c++/11/bits/alloc_traits.h \ + /usr/include/c++/11/bits/stl_construct.h \ + /usr/include/c++/11/ext/string_conversions.h /usr/include/c++/11/cstdlib \ + /usr/include/c++/11/cstdio /usr/include/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/c++/11/cerrno \ + /usr/include/errno.h /usr/include/x86_64-linux-gnu/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/bits/types/error_t.h \ + /usr/include/c++/11/bits/charconv.h \ + /usr/include/c++/11/bits/functional_hash.h \ + /usr/include/c++/11/bits/hash_bytes.h \ + /usr/include/c++/11/bits/basic_string.tcc \ + /usr/include/c++/11/bits/locale_classes.tcc \ + /usr/include/c++/11/system_error \ + /usr/include/x86_64-linux-gnu/c++/11/bits/error_constants.h \ + /usr/include/c++/11/stdexcept /usr/include/c++/11/exception \ + /usr/include/c++/11/bits/exception_ptr.h \ + /usr/include/c++/11/bits/cxxabi_init_exception.h \ + /usr/include/c++/11/typeinfo /usr/include/c++/11/bits/nested_exception.h \ + /usr/include/c++/11/locale /usr/include/c++/11/bits/locale_facets.h \ + /usr/include/c++/11/cwctype /usr/include/wctype.h \ + /usr/include/x86_64-linux-gnu/bits/wctype-wchar.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_base.h \ + /usr/include/c++/11/streambuf /usr/include/c++/11/bits/streambuf.tcc \ + /usr/include/c++/11/bits/streambuf_iterator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_inline.h \ + /usr/include/c++/11/bits/locale_facets.tcc \ + /usr/include/c++/11/bits/locale_facets_nonio.h /usr/include/c++/11/ctime \ + /usr/include/x86_64-linux-gnu/c++/11/bits/time_members.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/messages_members.h \ + /usr/include/libintl.h /usr/include/c++/11/bits/codecvt.h \ + /usr/include/c++/11/bits/locale_facets_nonio.tcc \ + /usr/include/c++/11/bits/locale_conv.h \ + /usr/include/c++/11/bits/unique_ptr.h /usr/include/c++/11/utility \ + /usr/include/c++/11/bits/stl_relops.h /usr/include/c++/11/tuple \ + /usr/include/c++/11/array /usr/include/c++/11/bits/uses_allocator.h \ + /usr/include/c++/11/bits/invoke.h /usr/include/c++/11/iostream \ + /usr/include/c++/11/ostream /usr/include/c++/11/ios \ + /usr/include/c++/11/bits/basic_ios.h \ + /usr/include/c++/11/bits/basic_ios.tcc \ + /usr/include/c++/11/bits/ostream.tcc /usr/include/c++/11/istream \ + /usr/include/c++/11/bits/istream.tcc /usr/include/c++/11/set \ + /usr/include/c++/11/bits/stl_tree.h \ + /usr/include/c++/11/ext/aligned_buffer.h \ + /usr/include/c++/11/bits/stl_set.h \ + /usr/include/c++/11/bits/stl_multiset.h \ + /usr/include/c++/11/bits/erase_if.h /usr/include/c++/11/cassert \ + /usr/include/assert.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/constants.h \ + /usr/include/c++/11/complex /usr/include/c++/11/sstream \ + /usr/include/c++/11/bits/sstream.tcc /usr/include/c++/11/fstream \ + /usr/include/x86_64-linux-gnu/c++/11/bits/basic_file.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++io.h \ + /usr/include/c++/11/bits/fstream.tcc diff --git a/build/source/source_base/CMakeFiles/base.dir/math_polyint.cpp.o b/build/source/source_base/CMakeFiles/base.dir/math_polyint.cpp.o new file mode 100644 index 0000000000..43e4da6cae Binary files /dev/null and b/build/source/source_base/CMakeFiles/base.dir/math_polyint.cpp.o differ diff --git a/build/source/source_base/CMakeFiles/base.dir/math_polyint.cpp.o.d b/build/source/source_base/CMakeFiles/base.dir/math_polyint.cpp.o.d new file mode 100644 index 0000000000..6cacda7635 --- /dev/null +++ b/build/source/source_base/CMakeFiles/base.dir/math_polyint.cpp.o.d @@ -0,0 +1,174 @@ +source/source_base/CMakeFiles/base.dir/math_polyint.cpp.o: \ + /home/haozhihan/Documents/abacus-develop/source/source_base/math_polyint.cpp \ + /usr/include/stdc-predef.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/math_polyint.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/realarray.h \ + /usr/include/c++/11/cassert \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++config.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/os_defines.h \ + /usr/include/features.h /usr/include/features-time64.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/cpu_defines.h \ + /usr/include/assert.h /usr/include/c++/11/fstream \ + /usr/include/c++/11/istream /usr/include/c++/11/ios \ + /usr/include/c++/11/iosfwd /usr/include/c++/11/bits/stringfwd.h \ + /usr/include/c++/11/bits/memoryfwd.h /usr/include/c++/11/bits/postypes.h \ + /usr/include/c++/11/cwchar /usr/include/wchar.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/wchar.h \ + /usr/include/x86_64-linux-gnu/bits/types/wint_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/wchar2.h \ + /usr/include/c++/11/exception /usr/include/c++/11/bits/exception.h \ + /usr/include/c++/11/bits/exception_ptr.h \ + /usr/include/c++/11/bits/exception_defines.h \ + /usr/include/c++/11/bits/cxxabi_init_exception.h \ + /usr/include/c++/11/typeinfo /usr/include/c++/11/bits/hash_bytes.h \ + /usr/include/c++/11/new /usr/include/c++/11/bits/move.h \ + /usr/include/c++/11/type_traits \ + /usr/include/c++/11/bits/nested_exception.h \ + /usr/include/c++/11/bits/char_traits.h \ + /usr/include/c++/11/bits/stl_algobase.h \ + /usr/include/c++/11/bits/functexcept.h \ + /usr/include/c++/11/bits/cpp_type_traits.h \ + /usr/include/c++/11/ext/type_traits.h \ + /usr/include/c++/11/ext/numeric_traits.h \ + /usr/include/c++/11/bits/stl_pair.h \ + /usr/include/c++/11/bits/stl_iterator_base_types.h \ + /usr/include/c++/11/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/11/bits/concept_check.h \ + /usr/include/c++/11/debug/assertions.h \ + /usr/include/c++/11/bits/stl_iterator.h \ + /usr/include/c++/11/bits/ptr_traits.h /usr/include/c++/11/debug/debug.h \ + /usr/include/c++/11/bits/predefined_ops.h /usr/include/c++/11/cstdint \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdint.h /usr/include/stdint.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-uintn.h \ + /usr/include/c++/11/bits/localefwd.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++locale.h \ + /usr/include/c++/11/clocale /usr/include/locale.h \ + /usr/include/x86_64-linux-gnu/bits/locale.h /usr/include/c++/11/cctype \ + /usr/include/ctype.h /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/c++/11/bits/ios_base.h /usr/include/c++/11/ext/atomicity.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr-default.h \ + /usr/include/pthread.h /usr/include/sched.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/sched.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h \ + /usr/include/x86_64-linux-gnu/bits/cpu-set.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/timex.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/atomic_wide_counter.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h \ + /usr/include/x86_64-linux-gnu/bits/setjmp.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct___jmp_buf_tag.h \ + /usr/include/x86_64-linux-gnu/bits/pthread_stack_min-dynamic.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/atomic_word.h \ + /usr/include/x86_64-linux-gnu/sys/single_threaded.h \ + /usr/include/c++/11/bits/locale_classes.h /usr/include/c++/11/string \ + /usr/include/c++/11/bits/allocator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++allocator.h \ + /usr/include/c++/11/ext/new_allocator.h \ + /usr/include/c++/11/bits/ostream_insert.h \ + /usr/include/c++/11/bits/cxxabi_forced.h \ + /usr/include/c++/11/bits/stl_function.h \ + /usr/include/c++/11/backward/binders.h \ + /usr/include/c++/11/bits/range_access.h \ + /usr/include/c++/11/initializer_list \ + /usr/include/c++/11/bits/basic_string.h \ + /usr/include/c++/11/ext/alloc_traits.h \ + /usr/include/c++/11/bits/alloc_traits.h \ + /usr/include/c++/11/bits/stl_construct.h \ + /usr/include/c++/11/ext/string_conversions.h /usr/include/c++/11/cstdlib \ + /usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/sys/types.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/include/c++/11/bits/std_abs.h /usr/include/c++/11/cstdio \ + /usr/include/stdio.h /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/c++/11/cerrno \ + /usr/include/errno.h /usr/include/x86_64-linux-gnu/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/bits/types/error_t.h \ + /usr/include/c++/11/bits/charconv.h \ + /usr/include/c++/11/bits/functional_hash.h \ + /usr/include/c++/11/bits/basic_string.tcc \ + /usr/include/c++/11/bits/locale_classes.tcc \ + /usr/include/c++/11/system_error \ + /usr/include/x86_64-linux-gnu/c++/11/bits/error_constants.h \ + /usr/include/c++/11/stdexcept /usr/include/c++/11/streambuf \ + /usr/include/c++/11/bits/streambuf.tcc \ + /usr/include/c++/11/bits/basic_ios.h \ + /usr/include/c++/11/bits/locale_facets.h /usr/include/c++/11/cwctype \ + /usr/include/wctype.h /usr/include/x86_64-linux-gnu/bits/wctype-wchar.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_base.h \ + /usr/include/c++/11/bits/streambuf_iterator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_inline.h \ + /usr/include/c++/11/bits/locale_facets.tcc \ + /usr/include/c++/11/bits/basic_ios.tcc /usr/include/c++/11/ostream \ + /usr/include/c++/11/bits/ostream.tcc \ + /usr/include/c++/11/bits/istream.tcc /usr/include/c++/11/bits/codecvt.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/basic_file.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++io.h \ + /usr/include/c++/11/bits/fstream.tcc /usr/include/c++/11/iomanip \ + /usr/include/c++/11/locale \ + /usr/include/c++/11/bits/locale_facets_nonio.h /usr/include/c++/11/ctime \ + /usr/include/x86_64-linux-gnu/c++/11/bits/time_members.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/messages_members.h \ + /usr/include/libintl.h /usr/include/c++/11/bits/locale_facets_nonio.tcc \ + /usr/include/c++/11/bits/locale_conv.h \ + /usr/include/c++/11/bits/unique_ptr.h /usr/include/c++/11/utility \ + /usr/include/c++/11/bits/stl_relops.h /usr/include/c++/11/tuple \ + /usr/include/c++/11/array /usr/include/c++/11/bits/uses_allocator.h \ + /usr/include/c++/11/bits/invoke.h /usr/include/c++/11/iostream \ + /home/haozhihan/Documents/abacus-develop/source/source_base/timer.h \ + /usr/include/c++/11/map /usr/include/c++/11/bits/stl_tree.h \ + /usr/include/c++/11/ext/aligned_buffer.h \ + /usr/include/c++/11/bits/stl_map.h \ + /usr/include/c++/11/bits/stl_multimap.h \ + /usr/include/c++/11/bits/erase_if.h diff --git a/build/source/source_base/CMakeFiles/base.dir/math_sphbes.cpp.o b/build/source/source_base/CMakeFiles/base.dir/math_sphbes.cpp.o new file mode 100644 index 0000000000..bb9e7850c3 Binary files /dev/null and b/build/source/source_base/CMakeFiles/base.dir/math_sphbes.cpp.o differ diff --git a/build/source/source_base/CMakeFiles/base.dir/math_sphbes.cpp.o.d b/build/source/source_base/CMakeFiles/base.dir/math_sphbes.cpp.o.d new file mode 100644 index 0000000000..e562354b69 --- /dev/null +++ b/build/source/source_base/CMakeFiles/base.dir/math_sphbes.cpp.o.d @@ -0,0 +1,176 @@ +source/source_base/CMakeFiles/base.dir/math_sphbes.cpp.o: \ + /home/haozhihan/Documents/abacus-develop/source/source_base/math_sphbes.cpp \ + /usr/include/stdc-predef.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/math_sphbes.h \ + /usr/include/c++/11/functional \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++config.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/os_defines.h \ + /usr/include/features.h /usr/include/features-time64.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/cpu_defines.h \ + /usr/include/c++/11/bits/stl_function.h \ + /usr/include/c++/11/backward/binders.h /usr/include/c++/11/new \ + /usr/include/c++/11/bits/exception.h /usr/include/c++/11/tuple \ + /usr/include/c++/11/utility /usr/include/c++/11/bits/stl_relops.h \ + /usr/include/c++/11/bits/stl_pair.h /usr/include/c++/11/bits/move.h \ + /usr/include/c++/11/type_traits /usr/include/c++/11/initializer_list \ + /usr/include/c++/11/array /usr/include/c++/11/bits/functexcept.h \ + /usr/include/c++/11/bits/exception_defines.h \ + /usr/include/c++/11/bits/stl_algobase.h \ + /usr/include/c++/11/bits/cpp_type_traits.h \ + /usr/include/c++/11/ext/type_traits.h \ + /usr/include/c++/11/ext/numeric_traits.h \ + /usr/include/c++/11/bits/stl_iterator_base_types.h \ + /usr/include/c++/11/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/11/bits/concept_check.h \ + /usr/include/c++/11/debug/assertions.h \ + /usr/include/c++/11/bits/stl_iterator.h \ + /usr/include/c++/11/bits/ptr_traits.h /usr/include/c++/11/debug/debug.h \ + /usr/include/c++/11/bits/predefined_ops.h \ + /usr/include/c++/11/bits/range_access.h \ + /usr/include/c++/11/bits/uses_allocator.h \ + /usr/include/c++/11/bits/invoke.h \ + /usr/include/c++/11/bits/functional_hash.h \ + /usr/include/c++/11/bits/hash_bytes.h /usr/include/c++/11/bits/refwrap.h \ + /usr/include/c++/11/bits/std_function.h /usr/include/c++/11/typeinfo \ + /home/haozhihan/Documents/abacus-develop/source/source_base/constants.h \ + /usr/include/c++/11/complex /usr/include/c++/11/cmath \ + /usr/include/math.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/math-vector.h \ + /usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h \ + /usr/include/x86_64-linux-gnu/bits/flt-eval-method.h \ + /usr/include/x86_64-linux-gnu/bits/fp-logb.h \ + /usr/include/x86_64-linux-gnu/bits/fp-fast.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-narrow.h \ + /usr/include/x86_64-linux-gnu/bits/iscanonical.h \ + /usr/include/c++/11/bits/std_abs.h /usr/include/stdlib.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h \ + /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/atomic_wide_counter.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h /usr/include/c++/11/sstream \ + /usr/include/c++/11/istream /usr/include/c++/11/ios \ + /usr/include/c++/11/iosfwd /usr/include/c++/11/bits/stringfwd.h \ + /usr/include/c++/11/bits/memoryfwd.h /usr/include/c++/11/bits/postypes.h \ + /usr/include/c++/11/cwchar /usr/include/wchar.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/wchar.h \ + /usr/include/x86_64-linux-gnu/bits/types/wint_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/wchar2.h \ + /usr/include/c++/11/exception /usr/include/c++/11/bits/exception_ptr.h \ + /usr/include/c++/11/bits/cxxabi_init_exception.h \ + /usr/include/c++/11/bits/nested_exception.h \ + /usr/include/c++/11/bits/char_traits.h /usr/include/c++/11/cstdint \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdint.h /usr/include/stdint.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-uintn.h \ + /usr/include/c++/11/bits/localefwd.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++locale.h \ + /usr/include/c++/11/clocale /usr/include/locale.h \ + /usr/include/x86_64-linux-gnu/bits/locale.h /usr/include/c++/11/cctype \ + /usr/include/ctype.h /usr/include/c++/11/bits/ios_base.h \ + /usr/include/c++/11/ext/atomicity.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr-default.h \ + /usr/include/pthread.h /usr/include/sched.h \ + /usr/include/x86_64-linux-gnu/bits/sched.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h \ + /usr/include/x86_64-linux-gnu/bits/cpu-set.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/timex.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h \ + /usr/include/x86_64-linux-gnu/bits/setjmp.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct___jmp_buf_tag.h \ + /usr/include/x86_64-linux-gnu/bits/pthread_stack_min-dynamic.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/atomic_word.h \ + /usr/include/x86_64-linux-gnu/sys/single_threaded.h \ + /usr/include/c++/11/bits/locale_classes.h /usr/include/c++/11/string \ + /usr/include/c++/11/bits/allocator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++allocator.h \ + /usr/include/c++/11/ext/new_allocator.h \ + /usr/include/c++/11/bits/ostream_insert.h \ + /usr/include/c++/11/bits/cxxabi_forced.h \ + /usr/include/c++/11/bits/basic_string.h \ + /usr/include/c++/11/ext/alloc_traits.h \ + /usr/include/c++/11/bits/alloc_traits.h \ + /usr/include/c++/11/bits/stl_construct.h \ + /usr/include/c++/11/ext/string_conversions.h /usr/include/c++/11/cstdlib \ + /usr/include/c++/11/cstdio /usr/include/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/c++/11/cerrno \ + /usr/include/errno.h /usr/include/x86_64-linux-gnu/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/bits/types/error_t.h \ + /usr/include/c++/11/bits/charconv.h \ + /usr/include/c++/11/bits/basic_string.tcc \ + /usr/include/c++/11/bits/locale_classes.tcc \ + /usr/include/c++/11/system_error \ + /usr/include/x86_64-linux-gnu/c++/11/bits/error_constants.h \ + /usr/include/c++/11/stdexcept /usr/include/c++/11/streambuf \ + /usr/include/c++/11/bits/streambuf.tcc \ + /usr/include/c++/11/bits/basic_ios.h \ + /usr/include/c++/11/bits/locale_facets.h /usr/include/c++/11/cwctype \ + /usr/include/wctype.h /usr/include/x86_64-linux-gnu/bits/wctype-wchar.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_base.h \ + /usr/include/c++/11/bits/streambuf_iterator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_inline.h \ + /usr/include/c++/11/bits/locale_facets.tcc \ + /usr/include/c++/11/bits/basic_ios.tcc /usr/include/c++/11/ostream \ + /usr/include/c++/11/bits/ostream.tcc \ + /usr/include/c++/11/bits/istream.tcc \ + /usr/include/c++/11/bits/sstream.tcc /usr/include/c++/11/algorithm \ + /usr/include/c++/11/bits/stl_algo.h \ + /usr/include/c++/11/bits/algorithmfwd.h \ + /usr/include/c++/11/bits/stl_heap.h \ + /usr/include/c++/11/bits/stl_tempbuf.h \ + /usr/include/c++/11/bits/uniform_int_dist.h /usr/include/c++/11/iostream \ + /usr/include/c++/11/cassert /usr/include/assert.h diff --git a/build/source/source_base/CMakeFiles/base.dir/math_ylmreal.cpp.o b/build/source/source_base/CMakeFiles/base.dir/math_ylmreal.cpp.o new file mode 100644 index 0000000000..3252047ea0 Binary files /dev/null and b/build/source/source_base/CMakeFiles/base.dir/math_ylmreal.cpp.o differ diff --git a/build/source/source_base/CMakeFiles/base.dir/math_ylmreal.cpp.o.d b/build/source/source_base/CMakeFiles/base.dir/math_ylmreal.cpp.o.d new file mode 100644 index 0000000000..6390ea67af --- /dev/null +++ b/build/source/source_base/CMakeFiles/base.dir/math_ylmreal.cpp.o.d @@ -0,0 +1,219 @@ +source/source_base/CMakeFiles/base.dir/math_ylmreal.cpp.o: \ + /home/haozhihan/Documents/abacus-develop/source/source_base/math_ylmreal.cpp \ + /usr/include/stdc-predef.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/math_ylmreal.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/vector3.h \ + /usr/include/c++/11/cmath \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++config.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/os_defines.h \ + /usr/include/features.h /usr/include/features-time64.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/cpu_defines.h \ + /usr/include/c++/11/bits/cpp_type_traits.h \ + /usr/include/c++/11/ext/type_traits.h /usr/include/math.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/math-vector.h \ + /usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h \ + /usr/include/x86_64-linux-gnu/bits/flt-eval-method.h \ + /usr/include/x86_64-linux-gnu/bits/fp-logb.h \ + /usr/include/x86_64-linux-gnu/bits/fp-fast.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-narrow.h \ + /usr/include/x86_64-linux-gnu/bits/iscanonical.h \ + /usr/include/c++/11/bits/std_abs.h /usr/include/stdlib.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h \ + /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/atomic_wide_counter.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h /usr/include/c++/11/iomanip \ + /usr/include/c++/11/iosfwd /usr/include/c++/11/bits/stringfwd.h \ + /usr/include/c++/11/bits/memoryfwd.h /usr/include/c++/11/bits/postypes.h \ + /usr/include/c++/11/cwchar /usr/include/wchar.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/wchar.h \ + /usr/include/x86_64-linux-gnu/bits/types/wint_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/wchar2.h \ + /usr/include/c++/11/bits/ios_base.h /usr/include/c++/11/ext/atomicity.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr-default.h \ + /usr/include/pthread.h /usr/include/sched.h \ + /usr/include/x86_64-linux-gnu/bits/sched.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h \ + /usr/include/x86_64-linux-gnu/bits/cpu-set.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/timex.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h \ + /usr/include/x86_64-linux-gnu/bits/setjmp.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct___jmp_buf_tag.h \ + /usr/include/x86_64-linux-gnu/bits/pthread_stack_min-dynamic.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/atomic_word.h \ + /usr/include/x86_64-linux-gnu/sys/single_threaded.h \ + /usr/include/c++/11/bits/localefwd.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++locale.h \ + /usr/include/c++/11/clocale /usr/include/locale.h \ + /usr/include/x86_64-linux-gnu/bits/locale.h /usr/include/c++/11/cctype \ + /usr/include/ctype.h /usr/include/c++/11/bits/locale_classes.h \ + /usr/include/c++/11/string /usr/include/c++/11/bits/char_traits.h \ + /usr/include/c++/11/bits/stl_algobase.h \ + /usr/include/c++/11/bits/functexcept.h \ + /usr/include/c++/11/bits/exception_defines.h \ + /usr/include/c++/11/ext/numeric_traits.h \ + /usr/include/c++/11/bits/stl_pair.h /usr/include/c++/11/bits/move.h \ + /usr/include/c++/11/type_traits \ + /usr/include/c++/11/bits/stl_iterator_base_types.h \ + /usr/include/c++/11/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/11/bits/concept_check.h \ + /usr/include/c++/11/debug/assertions.h \ + /usr/include/c++/11/bits/stl_iterator.h \ + /usr/include/c++/11/bits/ptr_traits.h /usr/include/c++/11/debug/debug.h \ + /usr/include/c++/11/bits/predefined_ops.h /usr/include/c++/11/cstdint \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdint.h /usr/include/stdint.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-uintn.h \ + /usr/include/c++/11/bits/allocator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++allocator.h \ + /usr/include/c++/11/ext/new_allocator.h /usr/include/c++/11/new \ + /usr/include/c++/11/bits/exception.h \ + /usr/include/c++/11/bits/ostream_insert.h \ + /usr/include/c++/11/bits/cxxabi_forced.h \ + /usr/include/c++/11/bits/stl_function.h \ + /usr/include/c++/11/backward/binders.h \ + /usr/include/c++/11/bits/range_access.h \ + /usr/include/c++/11/initializer_list \ + /usr/include/c++/11/bits/basic_string.h \ + /usr/include/c++/11/ext/alloc_traits.h \ + /usr/include/c++/11/bits/alloc_traits.h \ + /usr/include/c++/11/bits/stl_construct.h \ + /usr/include/c++/11/ext/string_conversions.h /usr/include/c++/11/cstdlib \ + /usr/include/c++/11/cstdio /usr/include/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/c++/11/cerrno \ + /usr/include/errno.h /usr/include/x86_64-linux-gnu/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/bits/types/error_t.h \ + /usr/include/c++/11/bits/charconv.h \ + /usr/include/c++/11/bits/functional_hash.h \ + /usr/include/c++/11/bits/hash_bytes.h \ + /usr/include/c++/11/bits/basic_string.tcc \ + /usr/include/c++/11/bits/locale_classes.tcc \ + /usr/include/c++/11/system_error \ + /usr/include/x86_64-linux-gnu/c++/11/bits/error_constants.h \ + /usr/include/c++/11/stdexcept /usr/include/c++/11/exception \ + /usr/include/c++/11/bits/exception_ptr.h \ + /usr/include/c++/11/bits/cxxabi_init_exception.h \ + /usr/include/c++/11/typeinfo /usr/include/c++/11/bits/nested_exception.h \ + /usr/include/c++/11/locale /usr/include/c++/11/bits/locale_facets.h \ + /usr/include/c++/11/cwctype /usr/include/wctype.h \ + /usr/include/x86_64-linux-gnu/bits/wctype-wchar.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_base.h \ + /usr/include/c++/11/streambuf /usr/include/c++/11/bits/streambuf.tcc \ + /usr/include/c++/11/bits/streambuf_iterator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_inline.h \ + /usr/include/c++/11/bits/locale_facets.tcc \ + /usr/include/c++/11/bits/locale_facets_nonio.h /usr/include/c++/11/ctime \ + /usr/include/x86_64-linux-gnu/c++/11/bits/time_members.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/messages_members.h \ + /usr/include/libintl.h /usr/include/c++/11/bits/codecvt.h \ + /usr/include/c++/11/bits/locale_facets_nonio.tcc \ + /usr/include/c++/11/bits/locale_conv.h \ + /usr/include/c++/11/bits/unique_ptr.h /usr/include/c++/11/utility \ + /usr/include/c++/11/bits/stl_relops.h /usr/include/c++/11/tuple \ + /usr/include/c++/11/array /usr/include/c++/11/bits/uses_allocator.h \ + /usr/include/c++/11/bits/invoke.h /usr/include/c++/11/iostream \ + /usr/include/c++/11/ostream /usr/include/c++/11/ios \ + /usr/include/c++/11/bits/basic_ios.h \ + /usr/include/c++/11/bits/basic_ios.tcc \ + /usr/include/c++/11/bits/ostream.tcc /usr/include/c++/11/istream \ + /usr/include/c++/11/bits/istream.tcc \ + /home/haozhihan/Documents/abacus-develop/source/source_base/matrix.h \ + /usr/include/c++/11/cassert /usr/include/assert.h \ + /usr/include/c++/11/fstream \ + /usr/include/x86_64-linux-gnu/c++/11/bits/basic_file.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++io.h \ + /usr/include/c++/11/bits/fstream.tcc \ + /home/haozhihan/Documents/abacus-develop/source/source_base/constants.h \ + /usr/include/c++/11/complex /usr/include/c++/11/sstream \ + /usr/include/c++/11/bits/sstream.tcc \ + /home/haozhihan/Documents/abacus-develop/source/source_base/kernels/math_ylm_op.h \ + /home/haozhihan/Documents/abacus-develop/source/module_psi/psi.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_device/memory_op.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_device/types.h \ + /usr/include/c++/11/cstddef \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_device/types.h \ + /usr/include/c++/11/vector /usr/include/c++/11/bits/stl_uninitialized.h \ + /usr/include/c++/11/bits/stl_vector.h \ + /usr/include/c++/11/bits/stl_bvector.h \ + /usr/include/c++/11/bits/vector.tcc \ + /home/haozhihan/Documents/abacus-develop/source/source_base/libm/libm.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/array_pool.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/realarray.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/timer.h \ + /usr/include/c++/11/map /usr/include/c++/11/bits/stl_tree.h \ + /usr/include/c++/11/ext/aligned_buffer.h \ + /usr/include/c++/11/bits/stl_map.h \ + /usr/include/c++/11/bits/stl_multimap.h \ + /usr/include/c++/11/bits/erase_if.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/tool_quit.h \ + /usr/include/c++/11/valarray /usr/include/c++/11/algorithm \ + /usr/include/c++/11/bits/stl_algo.h \ + /usr/include/c++/11/bits/algorithmfwd.h \ + /usr/include/c++/11/bits/stl_heap.h \ + /usr/include/c++/11/bits/stl_tempbuf.h \ + /usr/include/c++/11/bits/uniform_int_dist.h \ + /usr/include/c++/11/bits/valarray_array.h \ + /usr/include/c++/11/bits/valarray_array.tcc \ + /usr/include/c++/11/bits/valarray_before.h \ + /usr/include/c++/11/bits/slice_array.h \ + /usr/include/c++/11/bits/valarray_after.h \ + /usr/include/c++/11/bits/gslice.h \ + /usr/include/c++/11/bits/gslice_array.h \ + /usr/include/c++/11/bits/mask_array.h \ + /usr/include/c++/11/bits/indirect_array.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/ylm.h diff --git a/build/source/source_base/CMakeFiles/base.dir/mathzone_add1.cpp.o b/build/source/source_base/CMakeFiles/base.dir/mathzone_add1.cpp.o new file mode 100644 index 0000000000..73659e0c32 Binary files /dev/null and b/build/source/source_base/CMakeFiles/base.dir/mathzone_add1.cpp.o differ diff --git a/build/source/source_base/CMakeFiles/base.dir/mathzone_add1.cpp.o.d b/build/source/source_base/CMakeFiles/base.dir/mathzone_add1.cpp.o.d new file mode 100644 index 0000000000..b8e01dc7fa --- /dev/null +++ b/build/source/source_base/CMakeFiles/base.dir/mathzone_add1.cpp.o.d @@ -0,0 +1,227 @@ +source/source_base/CMakeFiles/base.dir/mathzone_add1.cpp.o: \ + /home/haozhihan/Documents/abacus-develop/source/source_base/mathzone_add1.cpp \ + /usr/include/stdc-predef.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/mathzone_add1.h \ + /usr/include/c++/11/cassert \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++config.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/os_defines.h \ + /usr/include/features.h /usr/include/features-time64.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/cpu_defines.h \ + /usr/include/assert.h /usr/include/c++/11/cmath \ + /usr/include/c++/11/bits/cpp_type_traits.h \ + /usr/include/c++/11/ext/type_traits.h /usr/include/math.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/math-vector.h \ + /usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h \ + /usr/include/x86_64-linux-gnu/bits/flt-eval-method.h \ + /usr/include/x86_64-linux-gnu/bits/fp-logb.h \ + /usr/include/x86_64-linux-gnu/bits/fp-fast.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-narrow.h \ + /usr/include/x86_64-linux-gnu/bits/iscanonical.h \ + /usr/include/c++/11/bits/std_abs.h /usr/include/stdlib.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h \ + /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/atomic_wide_counter.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/timer.h \ + /usr/include/c++/11/ctime /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/timex.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h \ + /usr/include/c++/11/fstream /usr/include/c++/11/istream \ + /usr/include/c++/11/ios /usr/include/c++/11/iosfwd \ + /usr/include/c++/11/bits/stringfwd.h \ + /usr/include/c++/11/bits/memoryfwd.h /usr/include/c++/11/bits/postypes.h \ + /usr/include/c++/11/cwchar /usr/include/wchar.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/wchar.h \ + /usr/include/x86_64-linux-gnu/bits/types/wint_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/wchar2.h \ + /usr/include/c++/11/exception /usr/include/c++/11/bits/exception.h \ + /usr/include/c++/11/bits/exception_ptr.h \ + /usr/include/c++/11/bits/exception_defines.h \ + /usr/include/c++/11/bits/cxxabi_init_exception.h \ + /usr/include/c++/11/typeinfo /usr/include/c++/11/bits/hash_bytes.h \ + /usr/include/c++/11/new /usr/include/c++/11/bits/move.h \ + /usr/include/c++/11/type_traits \ + /usr/include/c++/11/bits/nested_exception.h \ + /usr/include/c++/11/bits/char_traits.h \ + /usr/include/c++/11/bits/stl_algobase.h \ + /usr/include/c++/11/bits/functexcept.h \ + /usr/include/c++/11/ext/numeric_traits.h \ + /usr/include/c++/11/bits/stl_pair.h \ + /usr/include/c++/11/bits/stl_iterator_base_types.h \ + /usr/include/c++/11/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/11/bits/concept_check.h \ + /usr/include/c++/11/debug/assertions.h \ + /usr/include/c++/11/bits/stl_iterator.h \ + /usr/include/c++/11/bits/ptr_traits.h /usr/include/c++/11/debug/debug.h \ + /usr/include/c++/11/bits/predefined_ops.h /usr/include/c++/11/cstdint \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdint.h /usr/include/stdint.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-uintn.h \ + /usr/include/c++/11/bits/localefwd.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++locale.h \ + /usr/include/c++/11/clocale /usr/include/locale.h \ + /usr/include/x86_64-linux-gnu/bits/locale.h /usr/include/c++/11/cctype \ + /usr/include/ctype.h /usr/include/c++/11/bits/ios_base.h \ + /usr/include/c++/11/ext/atomicity.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr-default.h \ + /usr/include/pthread.h /usr/include/sched.h \ + /usr/include/x86_64-linux-gnu/bits/sched.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h \ + /usr/include/x86_64-linux-gnu/bits/cpu-set.h \ + /usr/include/x86_64-linux-gnu/bits/setjmp.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct___jmp_buf_tag.h \ + /usr/include/x86_64-linux-gnu/bits/pthread_stack_min-dynamic.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/atomic_word.h \ + /usr/include/x86_64-linux-gnu/sys/single_threaded.h \ + /usr/include/c++/11/bits/locale_classes.h /usr/include/c++/11/string \ + /usr/include/c++/11/bits/allocator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++allocator.h \ + /usr/include/c++/11/ext/new_allocator.h \ + /usr/include/c++/11/bits/ostream_insert.h \ + /usr/include/c++/11/bits/cxxabi_forced.h \ + /usr/include/c++/11/bits/stl_function.h \ + /usr/include/c++/11/backward/binders.h \ + /usr/include/c++/11/bits/range_access.h \ + /usr/include/c++/11/initializer_list \ + /usr/include/c++/11/bits/basic_string.h \ + /usr/include/c++/11/ext/alloc_traits.h \ + /usr/include/c++/11/bits/alloc_traits.h \ + /usr/include/c++/11/bits/stl_construct.h \ + /usr/include/c++/11/ext/string_conversions.h /usr/include/c++/11/cstdlib \ + /usr/include/c++/11/cstdio /usr/include/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/c++/11/cerrno \ + /usr/include/errno.h /usr/include/x86_64-linux-gnu/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/bits/types/error_t.h \ + /usr/include/c++/11/bits/charconv.h \ + /usr/include/c++/11/bits/functional_hash.h \ + /usr/include/c++/11/bits/basic_string.tcc \ + /usr/include/c++/11/bits/locale_classes.tcc \ + /usr/include/c++/11/system_error \ + /usr/include/x86_64-linux-gnu/c++/11/bits/error_constants.h \ + /usr/include/c++/11/stdexcept /usr/include/c++/11/streambuf \ + /usr/include/c++/11/bits/streambuf.tcc \ + /usr/include/c++/11/bits/basic_ios.h \ + /usr/include/c++/11/bits/locale_facets.h /usr/include/c++/11/cwctype \ + /usr/include/wctype.h /usr/include/x86_64-linux-gnu/bits/wctype-wchar.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_base.h \ + /usr/include/c++/11/bits/streambuf_iterator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_inline.h \ + /usr/include/c++/11/bits/locale_facets.tcc \ + /usr/include/c++/11/bits/basic_ios.tcc /usr/include/c++/11/ostream \ + /usr/include/c++/11/bits/ostream.tcc \ + /usr/include/c++/11/bits/istream.tcc /usr/include/c++/11/bits/codecvt.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/basic_file.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++io.h \ + /usr/include/c++/11/bits/fstream.tcc /usr/include/c++/11/iomanip \ + /usr/include/c++/11/locale \ + /usr/include/c++/11/bits/locale_facets_nonio.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/time_members.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/messages_members.h \ + /usr/include/libintl.h /usr/include/c++/11/bits/locale_facets_nonio.tcc \ + /usr/include/c++/11/bits/locale_conv.h \ + /usr/include/c++/11/bits/unique_ptr.h /usr/include/c++/11/utility \ + /usr/include/c++/11/bits/stl_relops.h /usr/include/c++/11/tuple \ + /usr/include/c++/11/array /usr/include/c++/11/bits/uses_allocator.h \ + /usr/include/c++/11/bits/invoke.h /usr/include/c++/11/iostream \ + /usr/include/c++/11/map /usr/include/c++/11/bits/stl_tree.h \ + /usr/include/c++/11/ext/aligned_buffer.h \ + /usr/include/c++/11/bits/stl_map.h \ + /usr/include/c++/11/bits/stl_multimap.h \ + /usr/include/c++/11/bits/erase_if.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/mathzone.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/global_function.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/blas_connector.h \ + /usr/include/c++/11/complex /usr/include/c++/11/sstream \ + /usr/include/c++/11/bits/sstream.tcc \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_device/types.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/macros.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/global_function-func_each_2.h \ + /usr/include/c++/11/functional /usr/include/c++/11/bits/refwrap.h \ + /usr/include/c++/11/bits/std_function.h /usr/include/c++/11/vector \ + /usr/include/c++/11/bits/stl_uninitialized.h \ + /usr/include/c++/11/bits/stl_vector.h \ + /usr/include/c++/11/bits/stl_bvector.h \ + /usr/include/c++/11/bits/vector.tcc \ + /home/haozhihan/Documents/abacus-develop/source/source_base/global_variable.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/tool_check.h \ + /usr/include/c++/11/valarray /usr/include/c++/11/algorithm \ + /usr/include/c++/11/bits/stl_algo.h \ + /usr/include/c++/11/bits/algorithmfwd.h \ + /usr/include/c++/11/bits/stl_heap.h \ + /usr/include/c++/11/bits/stl_tempbuf.h \ + /usr/include/c++/11/bits/uniform_int_dist.h \ + /usr/include/c++/11/bits/valarray_array.h \ + /usr/include/c++/11/bits/valarray_array.tcc \ + /usr/include/c++/11/bits/valarray_before.h \ + /usr/include/c++/11/bits/slice_array.h \ + /usr/include/c++/11/bits/valarray_after.h \ + /usr/include/c++/11/bits/gslice.h \ + /usr/include/c++/11/bits/gslice_array.h \ + /usr/include/c++/11/bits/mask_array.h \ + /usr/include/c++/11/bits/indirect_array.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/tool_quit.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/tool_title.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/matrix3.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/matrix.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/vector3.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/realarray.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/constants.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/math_sphbes.h \ + /usr/local/include/fftw3.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/omp.h diff --git a/build/source/source_base/CMakeFiles/base.dir/matrix.cpp.o b/build/source/source_base/CMakeFiles/base.dir/matrix.cpp.o new file mode 100644 index 0000000000..e7296f8511 Binary files /dev/null and b/build/source/source_base/CMakeFiles/base.dir/matrix.cpp.o differ diff --git a/build/source/source_base/CMakeFiles/base.dir/matrix.cpp.o.d b/build/source/source_base/CMakeFiles/base.dir/matrix.cpp.o.d new file mode 100644 index 0000000000..7e90b5bafd --- /dev/null +++ b/build/source/source_base/CMakeFiles/base.dir/matrix.cpp.o.d @@ -0,0 +1,218 @@ +source/source_base/CMakeFiles/base.dir/matrix.cpp.o: \ + /home/haozhihan/Documents/abacus-develop/source/source_base/matrix.cpp \ + /usr/include/stdc-predef.h /usr/include/c++/11/iostream \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++config.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/os_defines.h \ + /usr/include/features.h /usr/include/features-time64.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/cpu_defines.h \ + /usr/include/c++/11/ostream /usr/include/c++/11/ios \ + /usr/include/c++/11/iosfwd /usr/include/c++/11/bits/stringfwd.h \ + /usr/include/c++/11/bits/memoryfwd.h /usr/include/c++/11/bits/postypes.h \ + /usr/include/c++/11/cwchar /usr/include/wchar.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/wchar.h \ + /usr/include/x86_64-linux-gnu/bits/types/wint_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/wchar2.h \ + /usr/include/c++/11/exception /usr/include/c++/11/bits/exception.h \ + /usr/include/c++/11/bits/exception_ptr.h \ + /usr/include/c++/11/bits/exception_defines.h \ + /usr/include/c++/11/bits/cxxabi_init_exception.h \ + /usr/include/c++/11/typeinfo /usr/include/c++/11/bits/hash_bytes.h \ + /usr/include/c++/11/new /usr/include/c++/11/bits/move.h \ + /usr/include/c++/11/type_traits \ + /usr/include/c++/11/bits/nested_exception.h \ + /usr/include/c++/11/bits/char_traits.h \ + /usr/include/c++/11/bits/stl_algobase.h \ + /usr/include/c++/11/bits/functexcept.h \ + /usr/include/c++/11/bits/cpp_type_traits.h \ + /usr/include/c++/11/ext/type_traits.h \ + /usr/include/c++/11/ext/numeric_traits.h \ + /usr/include/c++/11/bits/stl_pair.h \ + /usr/include/c++/11/bits/stl_iterator_base_types.h \ + /usr/include/c++/11/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/11/bits/concept_check.h \ + /usr/include/c++/11/debug/assertions.h \ + /usr/include/c++/11/bits/stl_iterator.h \ + /usr/include/c++/11/bits/ptr_traits.h /usr/include/c++/11/debug/debug.h \ + /usr/include/c++/11/bits/predefined_ops.h /usr/include/c++/11/cstdint \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdint.h /usr/include/stdint.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-uintn.h \ + /usr/include/c++/11/bits/localefwd.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++locale.h \ + /usr/include/c++/11/clocale /usr/include/locale.h \ + /usr/include/x86_64-linux-gnu/bits/locale.h /usr/include/c++/11/cctype \ + /usr/include/ctype.h /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/c++/11/bits/ios_base.h /usr/include/c++/11/ext/atomicity.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr-default.h \ + /usr/include/pthread.h /usr/include/sched.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/sched.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h \ + /usr/include/x86_64-linux-gnu/bits/cpu-set.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/timex.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/atomic_wide_counter.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h \ + /usr/include/x86_64-linux-gnu/bits/setjmp.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct___jmp_buf_tag.h \ + /usr/include/x86_64-linux-gnu/bits/pthread_stack_min-dynamic.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/atomic_word.h \ + /usr/include/x86_64-linux-gnu/sys/single_threaded.h \ + /usr/include/c++/11/bits/locale_classes.h /usr/include/c++/11/string \ + /usr/include/c++/11/bits/allocator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++allocator.h \ + /usr/include/c++/11/ext/new_allocator.h \ + /usr/include/c++/11/bits/ostream_insert.h \ + /usr/include/c++/11/bits/cxxabi_forced.h \ + /usr/include/c++/11/bits/stl_function.h \ + /usr/include/c++/11/backward/binders.h \ + /usr/include/c++/11/bits/range_access.h \ + /usr/include/c++/11/initializer_list \ + /usr/include/c++/11/bits/basic_string.h \ + /usr/include/c++/11/ext/alloc_traits.h \ + /usr/include/c++/11/bits/alloc_traits.h \ + /usr/include/c++/11/bits/stl_construct.h \ + /usr/include/c++/11/ext/string_conversions.h /usr/include/c++/11/cstdlib \ + /usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/sys/types.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/include/c++/11/bits/std_abs.h /usr/include/c++/11/cstdio \ + /usr/include/stdio.h /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/c++/11/cerrno \ + /usr/include/errno.h /usr/include/x86_64-linux-gnu/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/bits/types/error_t.h \ + /usr/include/c++/11/bits/charconv.h \ + /usr/include/c++/11/bits/functional_hash.h \ + /usr/include/c++/11/bits/basic_string.tcc \ + /usr/include/c++/11/bits/locale_classes.tcc \ + /usr/include/c++/11/system_error \ + /usr/include/x86_64-linux-gnu/c++/11/bits/error_constants.h \ + /usr/include/c++/11/stdexcept /usr/include/c++/11/streambuf \ + /usr/include/c++/11/bits/streambuf.tcc \ + /usr/include/c++/11/bits/basic_ios.h \ + /usr/include/c++/11/bits/locale_facets.h /usr/include/c++/11/cwctype \ + /usr/include/wctype.h /usr/include/x86_64-linux-gnu/bits/wctype-wchar.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_base.h \ + /usr/include/c++/11/bits/streambuf_iterator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_inline.h \ + /usr/include/c++/11/bits/locale_facets.tcc \ + /usr/include/c++/11/bits/basic_ios.tcc \ + /usr/include/c++/11/bits/ostream.tcc /usr/include/c++/11/istream \ + /usr/include/c++/11/bits/istream.tcc /usr/include/c++/11/fstream \ + /usr/include/c++/11/bits/codecvt.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/basic_file.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++io.h \ + /usr/include/c++/11/bits/fstream.tcc /usr/include/c++/11/iomanip \ + /usr/include/c++/11/locale \ + /usr/include/c++/11/bits/locale_facets_nonio.h /usr/include/c++/11/ctime \ + /usr/include/x86_64-linux-gnu/c++/11/bits/time_members.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/messages_members.h \ + /usr/include/libintl.h /usr/include/c++/11/bits/locale_facets_nonio.tcc \ + /usr/include/c++/11/bits/locale_conv.h \ + /usr/include/c++/11/bits/unique_ptr.h /usr/include/c++/11/utility \ + /usr/include/c++/11/bits/stl_relops.h /usr/include/c++/11/tuple \ + /usr/include/c++/11/array /usr/include/c++/11/bits/uses_allocator.h \ + /usr/include/c++/11/bits/invoke.h /usr/include/c++/11/cassert \ + /usr/include/assert.h /usr/include/c++/11/cstring /usr/include/string.h \ + /usr/include/strings.h \ + /usr/include/x86_64-linux-gnu/bits/strings_fortified.h \ + /usr/include/x86_64-linux-gnu/bits/string_fortified.h \ + /usr/include/c++/11/cmath /usr/include/math.h \ + /usr/include/x86_64-linux-gnu/bits/math-vector.h \ + /usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h \ + /usr/include/x86_64-linux-gnu/bits/flt-eval-method.h \ + /usr/include/x86_64-linux-gnu/bits/fp-logb.h \ + /usr/include/x86_64-linux-gnu/bits/fp-fast.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-narrow.h \ + /usr/include/x86_64-linux-gnu/bits/iscanonical.h \ + /usr/include/c++/11/limits \ + /home/haozhihan/Documents/abacus-develop/source/source_base/matrix.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/global_function.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/blas_connector.h \ + /usr/include/c++/11/complex /usr/include/c++/11/sstream \ + /usr/include/c++/11/bits/sstream.tcc \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_device/types.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/macros.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/global_function-func_each_2.h \ + /usr/include/c++/11/functional /usr/include/c++/11/bits/refwrap.h \ + /usr/include/c++/11/bits/std_function.h /usr/include/c++/11/map \ + /usr/include/c++/11/bits/stl_tree.h \ + /usr/include/c++/11/ext/aligned_buffer.h \ + /usr/include/c++/11/bits/stl_map.h \ + /usr/include/c++/11/bits/stl_multimap.h \ + /usr/include/c++/11/bits/erase_if.h /usr/include/c++/11/vector \ + /usr/include/c++/11/bits/stl_uninitialized.h \ + /usr/include/c++/11/bits/stl_vector.h \ + /usr/include/c++/11/bits/stl_bvector.h \ + /usr/include/c++/11/bits/vector.tcc \ + /home/haozhihan/Documents/abacus-develop/source/source_base/global_variable.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/tool_check.h \ + /usr/include/c++/11/valarray /usr/include/c++/11/algorithm \ + /usr/include/c++/11/bits/stl_algo.h \ + /usr/include/c++/11/bits/algorithmfwd.h \ + /usr/include/c++/11/bits/stl_heap.h \ + /usr/include/c++/11/bits/stl_tempbuf.h \ + /usr/include/c++/11/bits/uniform_int_dist.h \ + /usr/include/c++/11/bits/valarray_array.h \ + /usr/include/c++/11/bits/valarray_array.tcc \ + /usr/include/c++/11/bits/valarray_before.h \ + /usr/include/c++/11/bits/slice_array.h \ + /usr/include/c++/11/bits/valarray_after.h \ + /usr/include/c++/11/bits/gslice.h \ + /usr/include/c++/11/bits/gslice_array.h \ + /usr/include/c++/11/bits/mask_array.h \ + /usr/include/c++/11/bits/indirect_array.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/tool_quit.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/tool_title.h diff --git a/build/source/source_base/CMakeFiles/base.dir/matrix3.cpp.o b/build/source/source_base/CMakeFiles/base.dir/matrix3.cpp.o new file mode 100644 index 0000000000..e518e52d48 Binary files /dev/null and b/build/source/source_base/CMakeFiles/base.dir/matrix3.cpp.o differ diff --git a/build/source/source_base/CMakeFiles/base.dir/matrix3.cpp.o.d b/build/source/source_base/CMakeFiles/base.dir/matrix3.cpp.o.d new file mode 100644 index 0000000000..7ec83a4b49 --- /dev/null +++ b/build/source/source_base/CMakeFiles/base.dir/matrix3.cpp.o.d @@ -0,0 +1,180 @@ +source/source_base/CMakeFiles/base.dir/matrix3.cpp.o: \ + /home/haozhihan/Documents/abacus-develop/source/source_base/matrix3.cpp \ + /usr/include/stdc-predef.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/matrix3.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/matrix.h \ + /usr/include/c++/11/ostream /usr/include/c++/11/ios \ + /usr/include/c++/11/iosfwd \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++config.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/os_defines.h \ + /usr/include/features.h /usr/include/features-time64.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/cpu_defines.h \ + /usr/include/c++/11/bits/stringfwd.h \ + /usr/include/c++/11/bits/memoryfwd.h /usr/include/c++/11/bits/postypes.h \ + /usr/include/c++/11/cwchar /usr/include/wchar.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/wchar.h \ + /usr/include/x86_64-linux-gnu/bits/types/wint_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/wchar2.h \ + /usr/include/c++/11/exception /usr/include/c++/11/bits/exception.h \ + /usr/include/c++/11/bits/exception_ptr.h \ + /usr/include/c++/11/bits/exception_defines.h \ + /usr/include/c++/11/bits/cxxabi_init_exception.h \ + /usr/include/c++/11/typeinfo /usr/include/c++/11/bits/hash_bytes.h \ + /usr/include/c++/11/new /usr/include/c++/11/bits/move.h \ + /usr/include/c++/11/type_traits \ + /usr/include/c++/11/bits/nested_exception.h \ + /usr/include/c++/11/bits/char_traits.h \ + /usr/include/c++/11/bits/stl_algobase.h \ + /usr/include/c++/11/bits/functexcept.h \ + /usr/include/c++/11/bits/cpp_type_traits.h \ + /usr/include/c++/11/ext/type_traits.h \ + /usr/include/c++/11/ext/numeric_traits.h \ + /usr/include/c++/11/bits/stl_pair.h \ + /usr/include/c++/11/bits/stl_iterator_base_types.h \ + /usr/include/c++/11/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/11/bits/concept_check.h \ + /usr/include/c++/11/debug/assertions.h \ + /usr/include/c++/11/bits/stl_iterator.h \ + /usr/include/c++/11/bits/ptr_traits.h /usr/include/c++/11/debug/debug.h \ + /usr/include/c++/11/bits/predefined_ops.h /usr/include/c++/11/cstdint \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdint.h /usr/include/stdint.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-uintn.h \ + /usr/include/c++/11/bits/localefwd.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++locale.h \ + /usr/include/c++/11/clocale /usr/include/locale.h \ + /usr/include/x86_64-linux-gnu/bits/locale.h /usr/include/c++/11/cctype \ + /usr/include/ctype.h /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/c++/11/bits/ios_base.h /usr/include/c++/11/ext/atomicity.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr-default.h \ + /usr/include/pthread.h /usr/include/sched.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/sched.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h \ + /usr/include/x86_64-linux-gnu/bits/cpu-set.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/timex.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/atomic_wide_counter.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h \ + /usr/include/x86_64-linux-gnu/bits/setjmp.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct___jmp_buf_tag.h \ + /usr/include/x86_64-linux-gnu/bits/pthread_stack_min-dynamic.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/atomic_word.h \ + /usr/include/x86_64-linux-gnu/sys/single_threaded.h \ + /usr/include/c++/11/bits/locale_classes.h /usr/include/c++/11/string \ + /usr/include/c++/11/bits/allocator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++allocator.h \ + /usr/include/c++/11/ext/new_allocator.h \ + /usr/include/c++/11/bits/ostream_insert.h \ + /usr/include/c++/11/bits/cxxabi_forced.h \ + /usr/include/c++/11/bits/stl_function.h \ + /usr/include/c++/11/backward/binders.h \ + /usr/include/c++/11/bits/range_access.h \ + /usr/include/c++/11/initializer_list \ + /usr/include/c++/11/bits/basic_string.h \ + /usr/include/c++/11/ext/alloc_traits.h \ + /usr/include/c++/11/bits/alloc_traits.h \ + /usr/include/c++/11/bits/stl_construct.h \ + /usr/include/c++/11/ext/string_conversions.h /usr/include/c++/11/cstdlib \ + /usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/sys/types.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/include/c++/11/bits/std_abs.h /usr/include/c++/11/cstdio \ + /usr/include/stdio.h /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/c++/11/cerrno \ + /usr/include/errno.h /usr/include/x86_64-linux-gnu/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/bits/types/error_t.h \ + /usr/include/c++/11/bits/charconv.h \ + /usr/include/c++/11/bits/functional_hash.h \ + /usr/include/c++/11/bits/basic_string.tcc \ + /usr/include/c++/11/bits/locale_classes.tcc \ + /usr/include/c++/11/system_error \ + /usr/include/x86_64-linux-gnu/c++/11/bits/error_constants.h \ + /usr/include/c++/11/stdexcept /usr/include/c++/11/streambuf \ + /usr/include/c++/11/bits/streambuf.tcc \ + /usr/include/c++/11/bits/basic_ios.h \ + /usr/include/c++/11/bits/locale_facets.h /usr/include/c++/11/cwctype \ + /usr/include/wctype.h /usr/include/x86_64-linux-gnu/bits/wctype-wchar.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_base.h \ + /usr/include/c++/11/bits/streambuf_iterator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_inline.h \ + /usr/include/c++/11/bits/locale_facets.tcc \ + /usr/include/c++/11/bits/basic_ios.tcc \ + /usr/include/c++/11/bits/ostream.tcc /usr/include/c++/11/cassert \ + /usr/include/assert.h /usr/include/c++/11/fstream \ + /usr/include/c++/11/istream /usr/include/c++/11/bits/istream.tcc \ + /usr/include/c++/11/bits/codecvt.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/basic_file.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++io.h \ + /usr/include/c++/11/bits/fstream.tcc \ + /home/haozhihan/Documents/abacus-develop/source/source_base/vector3.h \ + /usr/include/c++/11/cmath /usr/include/math.h \ + /usr/include/x86_64-linux-gnu/bits/math-vector.h \ + /usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h \ + /usr/include/x86_64-linux-gnu/bits/flt-eval-method.h \ + /usr/include/x86_64-linux-gnu/bits/fp-logb.h \ + /usr/include/x86_64-linux-gnu/bits/fp-fast.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-narrow.h \ + /usr/include/x86_64-linux-gnu/bits/iscanonical.h \ + /usr/include/c++/11/iomanip /usr/include/c++/11/locale \ + /usr/include/c++/11/bits/locale_facets_nonio.h /usr/include/c++/11/ctime \ + /usr/include/x86_64-linux-gnu/c++/11/bits/time_members.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/messages_members.h \ + /usr/include/libintl.h /usr/include/c++/11/bits/locale_facets_nonio.tcc \ + /usr/include/c++/11/bits/locale_conv.h \ + /usr/include/c++/11/bits/unique_ptr.h /usr/include/c++/11/utility \ + /usr/include/c++/11/bits/stl_relops.h /usr/include/c++/11/tuple \ + /usr/include/c++/11/array /usr/include/c++/11/bits/uses_allocator.h \ + /usr/include/c++/11/bits/invoke.h /usr/include/c++/11/iostream diff --git a/build/source/source_base/CMakeFiles/base.dir/memory.cpp.o b/build/source/source_base/CMakeFiles/base.dir/memory.cpp.o new file mode 100644 index 0000000000..b709ea7748 Binary files /dev/null and b/build/source/source_base/CMakeFiles/base.dir/memory.cpp.o differ diff --git a/build/source/source_base/CMakeFiles/base.dir/memory.cpp.o.d b/build/source/source_base/CMakeFiles/base.dir/memory.cpp.o.d new file mode 100644 index 0000000000..bbf97ee097 --- /dev/null +++ b/build/source/source_base/CMakeFiles/base.dir/memory.cpp.o.d @@ -0,0 +1,225 @@ +source/source_base/CMakeFiles/base.dir/memory.cpp.o: \ + /home/haozhihan/Documents/abacus-develop/source/source_base/memory.cpp \ + /usr/include/stdc-predef.h /usr/include/c++/11/cassert \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++config.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/os_defines.h \ + /usr/include/features.h /usr/include/features-time64.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/cpu_defines.h \ + /usr/include/assert.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/memory.h \ + /usr/include/c++/11/fstream /usr/include/c++/11/istream \ + /usr/include/c++/11/ios /usr/include/c++/11/iosfwd \ + /usr/include/c++/11/bits/stringfwd.h \ + /usr/include/c++/11/bits/memoryfwd.h /usr/include/c++/11/bits/postypes.h \ + /usr/include/c++/11/cwchar /usr/include/wchar.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/wchar.h \ + /usr/include/x86_64-linux-gnu/bits/types/wint_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/wchar2.h \ + /usr/include/c++/11/exception /usr/include/c++/11/bits/exception.h \ + /usr/include/c++/11/bits/exception_ptr.h \ + /usr/include/c++/11/bits/exception_defines.h \ + /usr/include/c++/11/bits/cxxabi_init_exception.h \ + /usr/include/c++/11/typeinfo /usr/include/c++/11/bits/hash_bytes.h \ + /usr/include/c++/11/new /usr/include/c++/11/bits/move.h \ + /usr/include/c++/11/type_traits \ + /usr/include/c++/11/bits/nested_exception.h \ + /usr/include/c++/11/bits/char_traits.h \ + /usr/include/c++/11/bits/stl_algobase.h \ + /usr/include/c++/11/bits/functexcept.h \ + /usr/include/c++/11/bits/cpp_type_traits.h \ + /usr/include/c++/11/ext/type_traits.h \ + /usr/include/c++/11/ext/numeric_traits.h \ + /usr/include/c++/11/bits/stl_pair.h \ + /usr/include/c++/11/bits/stl_iterator_base_types.h \ + /usr/include/c++/11/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/11/bits/concept_check.h \ + /usr/include/c++/11/debug/assertions.h \ + /usr/include/c++/11/bits/stl_iterator.h \ + /usr/include/c++/11/bits/ptr_traits.h /usr/include/c++/11/debug/debug.h \ + /usr/include/c++/11/bits/predefined_ops.h /usr/include/c++/11/cstdint \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdint.h /usr/include/stdint.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-uintn.h \ + /usr/include/c++/11/bits/localefwd.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++locale.h \ + /usr/include/c++/11/clocale /usr/include/locale.h \ + /usr/include/x86_64-linux-gnu/bits/locale.h /usr/include/c++/11/cctype \ + /usr/include/ctype.h /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/c++/11/bits/ios_base.h /usr/include/c++/11/ext/atomicity.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr-default.h \ + /usr/include/pthread.h /usr/include/sched.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/sched.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h \ + /usr/include/x86_64-linux-gnu/bits/cpu-set.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/timex.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/atomic_wide_counter.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h \ + /usr/include/x86_64-linux-gnu/bits/setjmp.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct___jmp_buf_tag.h \ + /usr/include/x86_64-linux-gnu/bits/pthread_stack_min-dynamic.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/atomic_word.h \ + /usr/include/x86_64-linux-gnu/sys/single_threaded.h \ + /usr/include/c++/11/bits/locale_classes.h /usr/include/c++/11/string \ + /usr/include/c++/11/bits/allocator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++allocator.h \ + /usr/include/c++/11/ext/new_allocator.h \ + /usr/include/c++/11/bits/ostream_insert.h \ + /usr/include/c++/11/bits/cxxabi_forced.h \ + /usr/include/c++/11/bits/stl_function.h \ + /usr/include/c++/11/backward/binders.h \ + /usr/include/c++/11/bits/range_access.h \ + /usr/include/c++/11/initializer_list \ + /usr/include/c++/11/bits/basic_string.h \ + /usr/include/c++/11/ext/alloc_traits.h \ + /usr/include/c++/11/bits/alloc_traits.h \ + /usr/include/c++/11/bits/stl_construct.h \ + /usr/include/c++/11/ext/string_conversions.h /usr/include/c++/11/cstdlib \ + /usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/sys/types.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/include/c++/11/bits/std_abs.h /usr/include/c++/11/cstdio \ + /usr/include/stdio.h /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/c++/11/cerrno \ + /usr/include/errno.h /usr/include/x86_64-linux-gnu/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/bits/types/error_t.h \ + /usr/include/c++/11/bits/charconv.h \ + /usr/include/c++/11/bits/functional_hash.h \ + /usr/include/c++/11/bits/basic_string.tcc \ + /usr/include/c++/11/bits/locale_classes.tcc \ + /usr/include/c++/11/system_error \ + /usr/include/x86_64-linux-gnu/c++/11/bits/error_constants.h \ + /usr/include/c++/11/stdexcept /usr/include/c++/11/streambuf \ + /usr/include/c++/11/bits/streambuf.tcc \ + /usr/include/c++/11/bits/basic_ios.h \ + /usr/include/c++/11/bits/locale_facets.h /usr/include/c++/11/cwctype \ + /usr/include/wctype.h /usr/include/x86_64-linux-gnu/bits/wctype-wchar.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_base.h \ + /usr/include/c++/11/bits/streambuf_iterator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_inline.h \ + /usr/include/c++/11/bits/locale_facets.tcc \ + /usr/include/c++/11/bits/basic_ios.tcc /usr/include/c++/11/ostream \ + /usr/include/c++/11/bits/ostream.tcc \ + /usr/include/c++/11/bits/istream.tcc /usr/include/c++/11/bits/codecvt.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/basic_file.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++io.h \ + /usr/include/c++/11/bits/fstream.tcc \ + /home/haozhihan/Documents/abacus-develop/source/source_base/global_variable.h \ + /usr/include/c++/11/iomanip /usr/include/c++/11/locale \ + /usr/include/c++/11/bits/locale_facets_nonio.h /usr/include/c++/11/ctime \ + /usr/include/x86_64-linux-gnu/c++/11/bits/time_members.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/messages_members.h \ + /usr/include/libintl.h /usr/include/c++/11/bits/locale_facets_nonio.tcc \ + /usr/include/c++/11/bits/locale_conv.h \ + /usr/include/c++/11/bits/unique_ptr.h /usr/include/c++/11/utility \ + /usr/include/c++/11/bits/stl_relops.h /usr/include/c++/11/tuple \ + /usr/include/c++/11/array /usr/include/c++/11/bits/uses_allocator.h \ + /usr/include/c++/11/bits/invoke.h /usr/include/c++/11/iostream \ + /usr/include/c++/11/vector /usr/include/c++/11/bits/stl_uninitialized.h \ + /usr/include/c++/11/bits/stl_vector.h \ + /usr/include/c++/11/bits/stl_bvector.h \ + /usr/include/c++/11/bits/vector.tcc \ + /home/haozhihan/Documents/abacus-develop/source/source_base/parallel_reduce.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/mpi.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/mpi_portable_platform.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/mpicxx.h \ + /usr/include/c++/11/map /usr/include/c++/11/bits/stl_tree.h \ + /usr/include/c++/11/ext/aligned_buffer.h \ + /usr/include/c++/11/bits/stl_map.h \ + /usr/include/c++/11/bits/stl_multimap.h \ + /usr/include/c++/11/bits/erase_if.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/constants.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/functions.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/datatype.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/exception.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/op.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/status.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/request.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/group.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/comm.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/win.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/file.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/errhandler.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/intracomm.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/topology.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/intercomm.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/info.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/datatype_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/functions_inln.h \ + /usr/include/string.h /usr/include/strings.h \ + /usr/include/x86_64-linux-gnu/bits/strings_fortified.h \ + /usr/include/x86_64-linux-gnu/bits/string_fortified.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/request_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/comm_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/intracomm_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/topology_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/intercomm_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/group_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/op_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/errhandler_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/status_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/info_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/win_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/file_inln.h \ + /usr/include/c++/11/complex /usr/include/c++/11/cmath \ + /usr/include/math.h /usr/include/x86_64-linux-gnu/bits/math-vector.h \ + /usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h \ + /usr/include/x86_64-linux-gnu/bits/flt-eval-method.h \ + /usr/include/x86_64-linux-gnu/bits/fp-logb.h \ + /usr/include/x86_64-linux-gnu/bits/fp-fast.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-narrow.h \ + /usr/include/x86_64-linux-gnu/bits/iscanonical.h \ + /usr/include/c++/11/sstream /usr/include/c++/11/bits/sstream.tcc diff --git a/build/source/source_base/CMakeFiles/base.dir/module_mixing/broyden_mixing.cpp.o b/build/source/source_base/CMakeFiles/base.dir/module_mixing/broyden_mixing.cpp.o new file mode 100644 index 0000000000..9ef836bacf Binary files /dev/null and b/build/source/source_base/CMakeFiles/base.dir/module_mixing/broyden_mixing.cpp.o differ diff --git a/build/source/source_base/CMakeFiles/base.dir/module_mixing/broyden_mixing.cpp.o.d b/build/source/source_base/CMakeFiles/base.dir/module_mixing/broyden_mixing.cpp.o.d new file mode 100644 index 0000000000..3a37f9373c --- /dev/null +++ b/build/source/source_base/CMakeFiles/base.dir/module_mixing/broyden_mixing.cpp.o.d @@ -0,0 +1,271 @@ +source/source_base/CMakeFiles/base.dir/module_mixing/broyden_mixing.cpp.o: \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_mixing/broyden_mixing.cpp \ + /usr/include/stdc-predef.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_mixing/broyden_mixing.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_mixing/mixing.h \ + /usr/include/c++/11/functional \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++config.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/os_defines.h \ + /usr/include/features.h /usr/include/features-time64.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/cpu_defines.h \ + /usr/include/c++/11/bits/stl_function.h \ + /usr/include/c++/11/backward/binders.h /usr/include/c++/11/new \ + /usr/include/c++/11/bits/exception.h /usr/include/c++/11/tuple \ + /usr/include/c++/11/utility /usr/include/c++/11/bits/stl_relops.h \ + /usr/include/c++/11/bits/stl_pair.h /usr/include/c++/11/bits/move.h \ + /usr/include/c++/11/type_traits /usr/include/c++/11/initializer_list \ + /usr/include/c++/11/array /usr/include/c++/11/bits/functexcept.h \ + /usr/include/c++/11/bits/exception_defines.h \ + /usr/include/c++/11/bits/stl_algobase.h \ + /usr/include/c++/11/bits/cpp_type_traits.h \ + /usr/include/c++/11/ext/type_traits.h \ + /usr/include/c++/11/ext/numeric_traits.h \ + /usr/include/c++/11/bits/stl_iterator_base_types.h \ + /usr/include/c++/11/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/11/bits/concept_check.h \ + /usr/include/c++/11/debug/assertions.h \ + /usr/include/c++/11/bits/stl_iterator.h \ + /usr/include/c++/11/bits/ptr_traits.h /usr/include/c++/11/debug/debug.h \ + /usr/include/c++/11/bits/predefined_ops.h \ + /usr/include/c++/11/bits/range_access.h \ + /usr/include/c++/11/bits/uses_allocator.h \ + /usr/include/c++/11/bits/invoke.h \ + /usr/include/c++/11/bits/functional_hash.h \ + /usr/include/c++/11/bits/hash_bytes.h /usr/include/c++/11/bits/refwrap.h \ + /usr/include/c++/11/bits/std_function.h /usr/include/c++/11/typeinfo \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_mixing/mixing_data.h \ + /usr/include/c++/11/vector /usr/include/c++/11/bits/allocator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++allocator.h \ + /usr/include/c++/11/ext/new_allocator.h \ + /usr/include/c++/11/bits/memoryfwd.h \ + /usr/include/c++/11/bits/stl_construct.h \ + /usr/include/c++/11/bits/stl_uninitialized.h \ + /usr/include/c++/11/ext/alloc_traits.h \ + /usr/include/c++/11/bits/alloc_traits.h \ + /usr/include/c++/11/bits/stl_vector.h \ + /usr/include/c++/11/bits/stl_bvector.h \ + /usr/include/c++/11/bits/vector.tcc \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/tensor.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/base/core/allocator.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor_types.h \ + /usr/include/c++/11/regex /usr/include/c++/11/algorithm \ + /usr/include/c++/11/bits/stl_algo.h /usr/include/c++/11/cstdlib \ + /usr/include/stdlib.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h \ + /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/atomic_wide_counter.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/include/c++/11/bits/std_abs.h \ + /usr/include/c++/11/bits/algorithmfwd.h \ + /usr/include/c++/11/bits/stl_heap.h \ + /usr/include/c++/11/bits/stl_tempbuf.h \ + /usr/include/c++/11/bits/uniform_int_dist.h /usr/include/c++/11/bitset \ + /usr/include/c++/11/string /usr/include/c++/11/bits/stringfwd.h \ + /usr/include/c++/11/bits/char_traits.h \ + /usr/include/c++/11/bits/postypes.h /usr/include/c++/11/cwchar \ + /usr/include/wchar.h /usr/lib/gcc/x86_64-linux-gnu/11/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/wchar.h \ + /usr/include/x86_64-linux-gnu/bits/types/wint_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/wchar2.h /usr/include/c++/11/cstdint \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdint.h /usr/include/stdint.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-uintn.h \ + /usr/include/c++/11/bits/localefwd.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++locale.h \ + /usr/include/c++/11/clocale /usr/include/locale.h \ + /usr/include/x86_64-linux-gnu/bits/locale.h /usr/include/c++/11/iosfwd \ + /usr/include/c++/11/cctype /usr/include/ctype.h \ + /usr/include/c++/11/bits/ostream_insert.h \ + /usr/include/c++/11/bits/cxxabi_forced.h \ + /usr/include/c++/11/bits/basic_string.h \ + /usr/include/c++/11/ext/atomicity.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr-default.h \ + /usr/include/pthread.h /usr/include/sched.h \ + /usr/include/x86_64-linux-gnu/bits/sched.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h \ + /usr/include/x86_64-linux-gnu/bits/cpu-set.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/timex.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h \ + /usr/include/x86_64-linux-gnu/bits/setjmp.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct___jmp_buf_tag.h \ + /usr/include/x86_64-linux-gnu/bits/pthread_stack_min-dynamic.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/atomic_word.h \ + /usr/include/x86_64-linux-gnu/sys/single_threaded.h \ + /usr/include/c++/11/ext/string_conversions.h /usr/include/c++/11/cstdio \ + /usr/include/stdio.h /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/c++/11/cerrno \ + /usr/include/errno.h /usr/include/x86_64-linux-gnu/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/bits/types/error_t.h \ + /usr/include/c++/11/bits/charconv.h \ + /usr/include/c++/11/bits/basic_string.tcc /usr/include/c++/11/iterator \ + /usr/include/c++/11/bits/stream_iterator.h \ + /usr/include/c++/11/bits/streambuf_iterator.h \ + /usr/include/c++/11/streambuf /usr/include/c++/11/bits/ios_base.h \ + /usr/include/c++/11/bits/locale_classes.h \ + /usr/include/c++/11/bits/locale_classes.tcc \ + /usr/include/c++/11/system_error \ + /usr/include/x86_64-linux-gnu/c++/11/bits/error_constants.h \ + /usr/include/c++/11/stdexcept /usr/include/c++/11/exception \ + /usr/include/c++/11/bits/exception_ptr.h \ + /usr/include/c++/11/bits/cxxabi_init_exception.h \ + /usr/include/c++/11/bits/nested_exception.h \ + /usr/include/c++/11/bits/streambuf.tcc /usr/include/c++/11/locale \ + /usr/include/c++/11/bits/locale_facets.h /usr/include/c++/11/cwctype \ + /usr/include/wctype.h /usr/include/x86_64-linux-gnu/bits/wctype-wchar.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_base.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_inline.h \ + /usr/include/c++/11/bits/locale_facets.tcc \ + /usr/include/c++/11/bits/locale_facets_nonio.h /usr/include/c++/11/ctime \ + /usr/include/x86_64-linux-gnu/c++/11/bits/time_members.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/messages_members.h \ + /usr/include/libintl.h /usr/include/c++/11/bits/codecvt.h \ + /usr/include/c++/11/bits/locale_facets_nonio.tcc \ + /usr/include/c++/11/bits/locale_conv.h \ + /usr/include/c++/11/bits/unique_ptr.h /usr/include/c++/11/memory \ + /usr/include/c++/11/bits/stl_raw_storage_iter.h \ + /usr/include/c++/11/bits/align.h /usr/include/c++/11/bit \ + /usr/include/c++/11/bits/shared_ptr.h \ + /usr/include/c++/11/bits/shared_ptr_base.h \ + /usr/include/c++/11/bits/allocated_ptr.h \ + /usr/include/c++/11/ext/aligned_buffer.h \ + /usr/include/c++/11/ext/concurrence.h \ + /usr/include/c++/11/bits/shared_ptr_atomic.h \ + /usr/include/c++/11/bits/atomic_base.h \ + /usr/include/c++/11/bits/atomic_lockfree_defines.h \ + /usr/include/c++/11/backward/auto_ptr.h /usr/include/c++/11/sstream \ + /usr/include/c++/11/istream /usr/include/c++/11/ios \ + /usr/include/c++/11/bits/basic_ios.h \ + /usr/include/c++/11/bits/basic_ios.tcc /usr/include/c++/11/ostream \ + /usr/include/c++/11/bits/ostream.tcc \ + /usr/include/c++/11/bits/istream.tcc \ + /usr/include/c++/11/bits/sstream.tcc /usr/include/c++/11/stack \ + /usr/include/c++/11/deque /usr/include/c++/11/bits/stl_deque.h \ + /usr/include/c++/11/bits/deque.tcc /usr/include/c++/11/bits/stl_stack.h \ + /usr/include/c++/11/map /usr/include/c++/11/bits/stl_tree.h \ + /usr/include/c++/11/bits/stl_map.h \ + /usr/include/c++/11/bits/stl_multimap.h \ + /usr/include/c++/11/bits/erase_if.h /usr/include/c++/11/cstring \ + /usr/include/string.h /usr/include/strings.h \ + /usr/include/x86_64-linux-gnu/bits/strings_fortified.h \ + /usr/include/x86_64-linux-gnu/bits/string_fortified.h \ + /usr/include/c++/11/bits/regex_constants.h \ + /usr/include/c++/11/bits/regex_error.h \ + /usr/include/c++/11/bits/regex_automaton.h \ + /usr/include/c++/11/bits/regex_automaton.tcc \ + /usr/include/c++/11/bits/regex_scanner.h \ + /usr/include/c++/11/bits/regex_scanner.tcc \ + /usr/include/c++/11/bits/regex_compiler.h \ + /usr/include/c++/11/bits/regex_compiler.tcc \ + /usr/include/c++/11/bits/regex.h /usr/include/c++/11/bits/regex.tcc \ + /usr/include/c++/11/bits/regex_executor.h \ + /usr/include/c++/11/bits/regex_executor.tcc /usr/include/c++/11/numeric \ + /usr/include/c++/11/bits/stl_numeric.h /usr/include/c++/11/complex \ + /usr/include/c++/11/cmath /usr/include/math.h \ + /usr/include/x86_64-linux-gnu/bits/math-vector.h \ + /usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h \ + /usr/include/x86_64-linux-gnu/bits/flt-eval-method.h \ + /usr/include/x86_64-linux-gnu/bits/fp-logb.h \ + /usr/include/x86_64-linux-gnu/bits/fp-fast.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-narrow.h \ + /usr/include/x86_64-linux-gnu/bits/iscanonical.h \ + /usr/include/c++/11/iomanip /usr/include/c++/11/iostream \ + /usr/include/c++/11/unordered_map /usr/include/c++/11/bits/hashtable.h \ + /usr/include/c++/11/bits/hashtable_policy.h \ + /usr/include/c++/11/bits/enable_special_members.h \ + /usr/include/c++/11/bits/unordered_map.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_device/types.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor_shape.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor_buffer.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/base/core/refcount.h \ + /usr/include/c++/11/atomic \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor_accessor.h \ + /usr/include/c++/11/cstddef \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/base/macros/macros.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/base/utils/logging.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/base/utils/array_ref.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/kernels/memory.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/matrix.h \ + /usr/include/c++/11/cassert /usr/include/assert.h \ + /usr/include/c++/11/fstream \ + /usr/include/x86_64-linux-gnu/c++/11/bits/basic_file.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++io.h \ + /usr/include/c++/11/bits/fstream.tcc \ + /home/haozhihan/Documents/abacus-develop/source/source_base/lapack_connector.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/matrix.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/complexmatrix.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/global_function.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/blas_connector.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/macros.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/global_function-func_each_2.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/global_variable.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/tool_check.h \ + /usr/include/c++/11/valarray /usr/include/c++/11/bits/valarray_array.h \ + /usr/include/c++/11/bits/valarray_array.tcc \ + /usr/include/c++/11/bits/valarray_before.h \ + /usr/include/c++/11/bits/slice_array.h \ + /usr/include/c++/11/bits/valarray_after.h \ + /usr/include/c++/11/bits/gslice.h \ + /usr/include/c++/11/bits/gslice_array.h \ + /usr/include/c++/11/bits/mask_array.h \ + /usr/include/c++/11/bits/indirect_array.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/tool_quit.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/tool_title.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/memory.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/base/third_party/blas.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/timer.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/tool_title.h diff --git a/build/source/source_base/CMakeFiles/base.dir/module_mixing/mixing.cpp.o b/build/source/source_base/CMakeFiles/base.dir/module_mixing/mixing.cpp.o new file mode 100644 index 0000000000..ed9324fa82 Binary files /dev/null and b/build/source/source_base/CMakeFiles/base.dir/module_mixing/mixing.cpp.o differ diff --git a/build/source/source_base/CMakeFiles/base.dir/module_mixing/mixing.cpp.o.d b/build/source/source_base/CMakeFiles/base.dir/module_mixing/mixing.cpp.o.d new file mode 100644 index 0000000000..ef9981c01e --- /dev/null +++ b/build/source/source_base/CMakeFiles/base.dir/module_mixing/mixing.cpp.o.d @@ -0,0 +1,241 @@ +source/source_base/CMakeFiles/base.dir/module_mixing/mixing.cpp.o: \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_mixing/mixing.cpp \ + /usr/include/stdc-predef.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_mixing/mixing.h \ + /usr/include/c++/11/functional \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++config.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/os_defines.h \ + /usr/include/features.h /usr/include/features-time64.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/cpu_defines.h \ + /usr/include/c++/11/bits/stl_function.h \ + /usr/include/c++/11/backward/binders.h /usr/include/c++/11/new \ + /usr/include/c++/11/bits/exception.h /usr/include/c++/11/tuple \ + /usr/include/c++/11/utility /usr/include/c++/11/bits/stl_relops.h \ + /usr/include/c++/11/bits/stl_pair.h /usr/include/c++/11/bits/move.h \ + /usr/include/c++/11/type_traits /usr/include/c++/11/initializer_list \ + /usr/include/c++/11/array /usr/include/c++/11/bits/functexcept.h \ + /usr/include/c++/11/bits/exception_defines.h \ + /usr/include/c++/11/bits/stl_algobase.h \ + /usr/include/c++/11/bits/cpp_type_traits.h \ + /usr/include/c++/11/ext/type_traits.h \ + /usr/include/c++/11/ext/numeric_traits.h \ + /usr/include/c++/11/bits/stl_iterator_base_types.h \ + /usr/include/c++/11/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/11/bits/concept_check.h \ + /usr/include/c++/11/debug/assertions.h \ + /usr/include/c++/11/bits/stl_iterator.h \ + /usr/include/c++/11/bits/ptr_traits.h /usr/include/c++/11/debug/debug.h \ + /usr/include/c++/11/bits/predefined_ops.h \ + /usr/include/c++/11/bits/range_access.h \ + /usr/include/c++/11/bits/uses_allocator.h \ + /usr/include/c++/11/bits/invoke.h \ + /usr/include/c++/11/bits/functional_hash.h \ + /usr/include/c++/11/bits/hash_bytes.h /usr/include/c++/11/bits/refwrap.h \ + /usr/include/c++/11/bits/std_function.h /usr/include/c++/11/typeinfo \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_mixing/mixing_data.h \ + /usr/include/c++/11/vector /usr/include/c++/11/bits/allocator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++allocator.h \ + /usr/include/c++/11/ext/new_allocator.h \ + /usr/include/c++/11/bits/memoryfwd.h \ + /usr/include/c++/11/bits/stl_construct.h \ + /usr/include/c++/11/bits/stl_uninitialized.h \ + /usr/include/c++/11/ext/alloc_traits.h \ + /usr/include/c++/11/bits/alloc_traits.h \ + /usr/include/c++/11/bits/stl_vector.h \ + /usr/include/c++/11/bits/stl_bvector.h \ + /usr/include/c++/11/bits/vector.tcc \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/tensor.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/base/core/allocator.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor_types.h \ + /usr/include/c++/11/regex /usr/include/c++/11/algorithm \ + /usr/include/c++/11/bits/stl_algo.h /usr/include/c++/11/cstdlib \ + /usr/include/stdlib.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h \ + /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/atomic_wide_counter.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/include/c++/11/bits/std_abs.h \ + /usr/include/c++/11/bits/algorithmfwd.h \ + /usr/include/c++/11/bits/stl_heap.h \ + /usr/include/c++/11/bits/stl_tempbuf.h \ + /usr/include/c++/11/bits/uniform_int_dist.h /usr/include/c++/11/bitset \ + /usr/include/c++/11/string /usr/include/c++/11/bits/stringfwd.h \ + /usr/include/c++/11/bits/char_traits.h \ + /usr/include/c++/11/bits/postypes.h /usr/include/c++/11/cwchar \ + /usr/include/wchar.h /usr/lib/gcc/x86_64-linux-gnu/11/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/wchar.h \ + /usr/include/x86_64-linux-gnu/bits/types/wint_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/wchar2.h /usr/include/c++/11/cstdint \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdint.h /usr/include/stdint.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-uintn.h \ + /usr/include/c++/11/bits/localefwd.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++locale.h \ + /usr/include/c++/11/clocale /usr/include/locale.h \ + /usr/include/x86_64-linux-gnu/bits/locale.h /usr/include/c++/11/iosfwd \ + /usr/include/c++/11/cctype /usr/include/ctype.h \ + /usr/include/c++/11/bits/ostream_insert.h \ + /usr/include/c++/11/bits/cxxabi_forced.h \ + /usr/include/c++/11/bits/basic_string.h \ + /usr/include/c++/11/ext/atomicity.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr-default.h \ + /usr/include/pthread.h /usr/include/sched.h \ + /usr/include/x86_64-linux-gnu/bits/sched.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h \ + /usr/include/x86_64-linux-gnu/bits/cpu-set.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/timex.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h \ + /usr/include/x86_64-linux-gnu/bits/setjmp.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct___jmp_buf_tag.h \ + /usr/include/x86_64-linux-gnu/bits/pthread_stack_min-dynamic.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/atomic_word.h \ + /usr/include/x86_64-linux-gnu/sys/single_threaded.h \ + /usr/include/c++/11/ext/string_conversions.h /usr/include/c++/11/cstdio \ + /usr/include/stdio.h /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/c++/11/cerrno \ + /usr/include/errno.h /usr/include/x86_64-linux-gnu/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/bits/types/error_t.h \ + /usr/include/c++/11/bits/charconv.h \ + /usr/include/c++/11/bits/basic_string.tcc /usr/include/c++/11/iterator \ + /usr/include/c++/11/bits/stream_iterator.h \ + /usr/include/c++/11/bits/streambuf_iterator.h \ + /usr/include/c++/11/streambuf /usr/include/c++/11/bits/ios_base.h \ + /usr/include/c++/11/bits/locale_classes.h \ + /usr/include/c++/11/bits/locale_classes.tcc \ + /usr/include/c++/11/system_error \ + /usr/include/x86_64-linux-gnu/c++/11/bits/error_constants.h \ + /usr/include/c++/11/stdexcept /usr/include/c++/11/exception \ + /usr/include/c++/11/bits/exception_ptr.h \ + /usr/include/c++/11/bits/cxxabi_init_exception.h \ + /usr/include/c++/11/bits/nested_exception.h \ + /usr/include/c++/11/bits/streambuf.tcc /usr/include/c++/11/locale \ + /usr/include/c++/11/bits/locale_facets.h /usr/include/c++/11/cwctype \ + /usr/include/wctype.h /usr/include/x86_64-linux-gnu/bits/wctype-wchar.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_base.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_inline.h \ + /usr/include/c++/11/bits/locale_facets.tcc \ + /usr/include/c++/11/bits/locale_facets_nonio.h /usr/include/c++/11/ctime \ + /usr/include/x86_64-linux-gnu/c++/11/bits/time_members.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/messages_members.h \ + /usr/include/libintl.h /usr/include/c++/11/bits/codecvt.h \ + /usr/include/c++/11/bits/locale_facets_nonio.tcc \ + /usr/include/c++/11/bits/locale_conv.h \ + /usr/include/c++/11/bits/unique_ptr.h /usr/include/c++/11/memory \ + /usr/include/c++/11/bits/stl_raw_storage_iter.h \ + /usr/include/c++/11/bits/align.h /usr/include/c++/11/bit \ + /usr/include/c++/11/bits/shared_ptr.h \ + /usr/include/c++/11/bits/shared_ptr_base.h \ + /usr/include/c++/11/bits/allocated_ptr.h \ + /usr/include/c++/11/ext/aligned_buffer.h \ + /usr/include/c++/11/ext/concurrence.h \ + /usr/include/c++/11/bits/shared_ptr_atomic.h \ + /usr/include/c++/11/bits/atomic_base.h \ + /usr/include/c++/11/bits/atomic_lockfree_defines.h \ + /usr/include/c++/11/backward/auto_ptr.h /usr/include/c++/11/sstream \ + /usr/include/c++/11/istream /usr/include/c++/11/ios \ + /usr/include/c++/11/bits/basic_ios.h \ + /usr/include/c++/11/bits/basic_ios.tcc /usr/include/c++/11/ostream \ + /usr/include/c++/11/bits/ostream.tcc \ + /usr/include/c++/11/bits/istream.tcc \ + /usr/include/c++/11/bits/sstream.tcc /usr/include/c++/11/stack \ + /usr/include/c++/11/deque /usr/include/c++/11/bits/stl_deque.h \ + /usr/include/c++/11/bits/deque.tcc /usr/include/c++/11/bits/stl_stack.h \ + /usr/include/c++/11/map /usr/include/c++/11/bits/stl_tree.h \ + /usr/include/c++/11/bits/stl_map.h \ + /usr/include/c++/11/bits/stl_multimap.h \ + /usr/include/c++/11/bits/erase_if.h /usr/include/c++/11/cstring \ + /usr/include/string.h /usr/include/strings.h \ + /usr/include/x86_64-linux-gnu/bits/strings_fortified.h \ + /usr/include/x86_64-linux-gnu/bits/string_fortified.h \ + /usr/include/c++/11/bits/regex_constants.h \ + /usr/include/c++/11/bits/regex_error.h \ + /usr/include/c++/11/bits/regex_automaton.h \ + /usr/include/c++/11/bits/regex_automaton.tcc \ + /usr/include/c++/11/bits/regex_scanner.h \ + /usr/include/c++/11/bits/regex_scanner.tcc \ + /usr/include/c++/11/bits/regex_compiler.h \ + /usr/include/c++/11/bits/regex_compiler.tcc \ + /usr/include/c++/11/bits/regex.h /usr/include/c++/11/bits/regex.tcc \ + /usr/include/c++/11/bits/regex_executor.h \ + /usr/include/c++/11/bits/regex_executor.tcc /usr/include/c++/11/numeric \ + /usr/include/c++/11/bits/stl_numeric.h /usr/include/c++/11/complex \ + /usr/include/c++/11/cmath /usr/include/math.h \ + /usr/include/x86_64-linux-gnu/bits/math-vector.h \ + /usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h \ + /usr/include/x86_64-linux-gnu/bits/flt-eval-method.h \ + /usr/include/x86_64-linux-gnu/bits/fp-logb.h \ + /usr/include/x86_64-linux-gnu/bits/fp-fast.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-narrow.h \ + /usr/include/x86_64-linux-gnu/bits/iscanonical.h \ + /usr/include/c++/11/iomanip /usr/include/c++/11/iostream \ + /usr/include/c++/11/unordered_map /usr/include/c++/11/bits/hashtable.h \ + /usr/include/c++/11/bits/hashtable_policy.h \ + /usr/include/c++/11/bits/enable_special_members.h \ + /usr/include/c++/11/bits/unordered_map.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_device/types.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor_shape.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor_buffer.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/base/core/refcount.h \ + /usr/include/c++/11/atomic \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor_accessor.h \ + /usr/include/c++/11/cstddef \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/base/macros/macros.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/base/utils/logging.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/base/utils/array_ref.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/kernels/memory.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/base/third_party/blas.h diff --git a/build/source/source_base/CMakeFiles/base.dir/module_mixing/mixing_data.cpp.o b/build/source/source_base/CMakeFiles/base.dir/module_mixing/mixing_data.cpp.o new file mode 100644 index 0000000000..3e8784c9bc Binary files /dev/null and b/build/source/source_base/CMakeFiles/base.dir/module_mixing/mixing_data.cpp.o differ diff --git a/build/source/source_base/CMakeFiles/base.dir/module_mixing/mixing_data.cpp.o.d b/build/source/source_base/CMakeFiles/base.dir/module_mixing/mixing_data.cpp.o.d new file mode 100644 index 0000000000..51c03a8f70 --- /dev/null +++ b/build/source/source_base/CMakeFiles/base.dir/module_mixing/mixing_data.cpp.o.d @@ -0,0 +1,240 @@ +source/source_base/CMakeFiles/base.dir/module_mixing/mixing_data.cpp.o: \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_mixing/mixing_data.cpp \ + /usr/include/stdc-predef.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_mixing/mixing_data.h \ + /usr/include/c++/11/vector /usr/include/c++/11/bits/stl_algobase.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++config.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/os_defines.h \ + /usr/include/features.h /usr/include/features-time64.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/cpu_defines.h \ + /usr/include/c++/11/bits/functexcept.h \ + /usr/include/c++/11/bits/exception_defines.h \ + /usr/include/c++/11/bits/cpp_type_traits.h \ + /usr/include/c++/11/ext/type_traits.h \ + /usr/include/c++/11/ext/numeric_traits.h \ + /usr/include/c++/11/bits/stl_pair.h /usr/include/c++/11/bits/move.h \ + /usr/include/c++/11/type_traits \ + /usr/include/c++/11/bits/stl_iterator_base_types.h \ + /usr/include/c++/11/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/11/bits/concept_check.h \ + /usr/include/c++/11/debug/assertions.h \ + /usr/include/c++/11/bits/stl_iterator.h \ + /usr/include/c++/11/bits/ptr_traits.h /usr/include/c++/11/debug/debug.h \ + /usr/include/c++/11/bits/predefined_ops.h \ + /usr/include/c++/11/bits/allocator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++allocator.h \ + /usr/include/c++/11/ext/new_allocator.h /usr/include/c++/11/new \ + /usr/include/c++/11/bits/exception.h \ + /usr/include/c++/11/bits/memoryfwd.h \ + /usr/include/c++/11/bits/stl_construct.h \ + /usr/include/c++/11/bits/stl_uninitialized.h \ + /usr/include/c++/11/ext/alloc_traits.h \ + /usr/include/c++/11/bits/alloc_traits.h \ + /usr/include/c++/11/bits/stl_vector.h \ + /usr/include/c++/11/initializer_list \ + /usr/include/c++/11/bits/stl_bvector.h \ + /usr/include/c++/11/bits/functional_hash.h \ + /usr/include/c++/11/bits/hash_bytes.h \ + /usr/include/c++/11/bits/range_access.h \ + /usr/include/c++/11/bits/vector.tcc \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/tensor.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/base/core/allocator.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor_types.h \ + /usr/include/c++/11/regex /usr/include/c++/11/algorithm \ + /usr/include/c++/11/utility /usr/include/c++/11/bits/stl_relops.h \ + /usr/include/c++/11/bits/stl_algo.h /usr/include/c++/11/cstdlib \ + /usr/include/stdlib.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h \ + /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/atomic_wide_counter.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/include/c++/11/bits/std_abs.h \ + /usr/include/c++/11/bits/algorithmfwd.h \ + /usr/include/c++/11/bits/stl_heap.h \ + /usr/include/c++/11/bits/stl_tempbuf.h \ + /usr/include/c++/11/bits/uniform_int_dist.h /usr/include/c++/11/bitset \ + /usr/include/c++/11/string /usr/include/c++/11/bits/stringfwd.h \ + /usr/include/c++/11/bits/char_traits.h \ + /usr/include/c++/11/bits/postypes.h /usr/include/c++/11/cwchar \ + /usr/include/wchar.h /usr/lib/gcc/x86_64-linux-gnu/11/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/wchar.h \ + /usr/include/x86_64-linux-gnu/bits/types/wint_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/wchar2.h /usr/include/c++/11/cstdint \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdint.h /usr/include/stdint.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-uintn.h \ + /usr/include/c++/11/bits/localefwd.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++locale.h \ + /usr/include/c++/11/clocale /usr/include/locale.h \ + /usr/include/x86_64-linux-gnu/bits/locale.h /usr/include/c++/11/iosfwd \ + /usr/include/c++/11/cctype /usr/include/ctype.h \ + /usr/include/c++/11/bits/ostream_insert.h \ + /usr/include/c++/11/bits/cxxabi_forced.h \ + /usr/include/c++/11/bits/stl_function.h \ + /usr/include/c++/11/backward/binders.h \ + /usr/include/c++/11/bits/basic_string.h \ + /usr/include/c++/11/ext/atomicity.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr-default.h \ + /usr/include/pthread.h /usr/include/sched.h \ + /usr/include/x86_64-linux-gnu/bits/sched.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h \ + /usr/include/x86_64-linux-gnu/bits/cpu-set.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/timex.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h \ + /usr/include/x86_64-linux-gnu/bits/setjmp.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct___jmp_buf_tag.h \ + /usr/include/x86_64-linux-gnu/bits/pthread_stack_min-dynamic.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/atomic_word.h \ + /usr/include/x86_64-linux-gnu/sys/single_threaded.h \ + /usr/include/c++/11/ext/string_conversions.h /usr/include/c++/11/cstdio \ + /usr/include/stdio.h /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/c++/11/cerrno \ + /usr/include/errno.h /usr/include/x86_64-linux-gnu/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/bits/types/error_t.h \ + /usr/include/c++/11/bits/charconv.h \ + /usr/include/c++/11/bits/basic_string.tcc /usr/include/c++/11/iterator \ + /usr/include/c++/11/bits/stream_iterator.h \ + /usr/include/c++/11/bits/streambuf_iterator.h \ + /usr/include/c++/11/streambuf /usr/include/c++/11/bits/ios_base.h \ + /usr/include/c++/11/bits/locale_classes.h \ + /usr/include/c++/11/bits/locale_classes.tcc \ + /usr/include/c++/11/system_error \ + /usr/include/x86_64-linux-gnu/c++/11/bits/error_constants.h \ + /usr/include/c++/11/stdexcept /usr/include/c++/11/exception \ + /usr/include/c++/11/bits/exception_ptr.h \ + /usr/include/c++/11/bits/cxxabi_init_exception.h \ + /usr/include/c++/11/typeinfo /usr/include/c++/11/bits/nested_exception.h \ + /usr/include/c++/11/bits/streambuf.tcc /usr/include/c++/11/locale \ + /usr/include/c++/11/bits/locale_facets.h /usr/include/c++/11/cwctype \ + /usr/include/wctype.h /usr/include/x86_64-linux-gnu/bits/wctype-wchar.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_base.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_inline.h \ + /usr/include/c++/11/bits/locale_facets.tcc \ + /usr/include/c++/11/bits/locale_facets_nonio.h /usr/include/c++/11/ctime \ + /usr/include/x86_64-linux-gnu/c++/11/bits/time_members.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/messages_members.h \ + /usr/include/libintl.h /usr/include/c++/11/bits/codecvt.h \ + /usr/include/c++/11/bits/locale_facets_nonio.tcc \ + /usr/include/c++/11/bits/locale_conv.h \ + /usr/include/c++/11/bits/unique_ptr.h /usr/include/c++/11/tuple \ + /usr/include/c++/11/array /usr/include/c++/11/bits/uses_allocator.h \ + /usr/include/c++/11/bits/invoke.h /usr/include/c++/11/memory \ + /usr/include/c++/11/bits/stl_raw_storage_iter.h \ + /usr/include/c++/11/bits/align.h /usr/include/c++/11/bit \ + /usr/include/c++/11/bits/shared_ptr.h \ + /usr/include/c++/11/bits/shared_ptr_base.h \ + /usr/include/c++/11/bits/allocated_ptr.h \ + /usr/include/c++/11/bits/refwrap.h \ + /usr/include/c++/11/ext/aligned_buffer.h \ + /usr/include/c++/11/ext/concurrence.h \ + /usr/include/c++/11/bits/shared_ptr_atomic.h \ + /usr/include/c++/11/bits/atomic_base.h \ + /usr/include/c++/11/bits/atomic_lockfree_defines.h \ + /usr/include/c++/11/backward/auto_ptr.h /usr/include/c++/11/sstream \ + /usr/include/c++/11/istream /usr/include/c++/11/ios \ + /usr/include/c++/11/bits/basic_ios.h \ + /usr/include/c++/11/bits/basic_ios.tcc /usr/include/c++/11/ostream \ + /usr/include/c++/11/bits/ostream.tcc \ + /usr/include/c++/11/bits/istream.tcc \ + /usr/include/c++/11/bits/sstream.tcc /usr/include/c++/11/stack \ + /usr/include/c++/11/deque /usr/include/c++/11/bits/stl_deque.h \ + /usr/include/c++/11/bits/deque.tcc /usr/include/c++/11/bits/stl_stack.h \ + /usr/include/c++/11/map /usr/include/c++/11/bits/stl_tree.h \ + /usr/include/c++/11/bits/stl_map.h \ + /usr/include/c++/11/bits/stl_multimap.h \ + /usr/include/c++/11/bits/erase_if.h /usr/include/c++/11/cstring \ + /usr/include/string.h /usr/include/strings.h \ + /usr/include/x86_64-linux-gnu/bits/strings_fortified.h \ + /usr/include/x86_64-linux-gnu/bits/string_fortified.h \ + /usr/include/c++/11/bits/std_function.h \ + /usr/include/c++/11/bits/regex_constants.h \ + /usr/include/c++/11/bits/regex_error.h \ + /usr/include/c++/11/bits/regex_automaton.h \ + /usr/include/c++/11/bits/regex_automaton.tcc \ + /usr/include/c++/11/bits/regex_scanner.h \ + /usr/include/c++/11/bits/regex_scanner.tcc \ + /usr/include/c++/11/bits/regex_compiler.h \ + /usr/include/c++/11/bits/regex_compiler.tcc \ + /usr/include/c++/11/bits/regex.h /usr/include/c++/11/bits/regex.tcc \ + /usr/include/c++/11/bits/regex_executor.h \ + /usr/include/c++/11/bits/regex_executor.tcc /usr/include/c++/11/numeric \ + /usr/include/c++/11/bits/stl_numeric.h /usr/include/c++/11/complex \ + /usr/include/c++/11/cmath /usr/include/math.h \ + /usr/include/x86_64-linux-gnu/bits/math-vector.h \ + /usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h \ + /usr/include/x86_64-linux-gnu/bits/flt-eval-method.h \ + /usr/include/x86_64-linux-gnu/bits/fp-logb.h \ + /usr/include/x86_64-linux-gnu/bits/fp-fast.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-narrow.h \ + /usr/include/x86_64-linux-gnu/bits/iscanonical.h \ + /usr/include/c++/11/iomanip /usr/include/c++/11/iostream \ + /usr/include/c++/11/unordered_map /usr/include/c++/11/bits/hashtable.h \ + /usr/include/c++/11/bits/hashtable_policy.h \ + /usr/include/c++/11/bits/enable_special_members.h \ + /usr/include/c++/11/bits/unordered_map.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_device/types.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor_shape.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor_buffer.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/base/core/refcount.h \ + /usr/include/c++/11/atomic \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor_accessor.h \ + /usr/include/c++/11/cstddef \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/base/macros/macros.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/base/utils/logging.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/base/utils/array_ref.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/kernels/memory.h diff --git a/build/source/source_base/CMakeFiles/base.dir/module_mixing/plain_mixing.cpp.o b/build/source/source_base/CMakeFiles/base.dir/module_mixing/plain_mixing.cpp.o new file mode 100644 index 0000000000..c2e883b7be Binary files /dev/null and b/build/source/source_base/CMakeFiles/base.dir/module_mixing/plain_mixing.cpp.o differ diff --git a/build/source/source_base/CMakeFiles/base.dir/module_mixing/plain_mixing.cpp.o.d b/build/source/source_base/CMakeFiles/base.dir/module_mixing/plain_mixing.cpp.o.d new file mode 100644 index 0000000000..15fa1d4182 --- /dev/null +++ b/build/source/source_base/CMakeFiles/base.dir/module_mixing/plain_mixing.cpp.o.d @@ -0,0 +1,258 @@ +source/source_base/CMakeFiles/base.dir/module_mixing/plain_mixing.cpp.o: \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_mixing/plain_mixing.cpp \ + /usr/include/stdc-predef.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_mixing/plain_mixing.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_mixing/mixing.h \ + /usr/include/c++/11/functional \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++config.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/os_defines.h \ + /usr/include/features.h /usr/include/features-time64.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/cpu_defines.h \ + /usr/include/c++/11/bits/stl_function.h \ + /usr/include/c++/11/backward/binders.h /usr/include/c++/11/new \ + /usr/include/c++/11/bits/exception.h /usr/include/c++/11/tuple \ + /usr/include/c++/11/utility /usr/include/c++/11/bits/stl_relops.h \ + /usr/include/c++/11/bits/stl_pair.h /usr/include/c++/11/bits/move.h \ + /usr/include/c++/11/type_traits /usr/include/c++/11/initializer_list \ + /usr/include/c++/11/array /usr/include/c++/11/bits/functexcept.h \ + /usr/include/c++/11/bits/exception_defines.h \ + /usr/include/c++/11/bits/stl_algobase.h \ + /usr/include/c++/11/bits/cpp_type_traits.h \ + /usr/include/c++/11/ext/type_traits.h \ + /usr/include/c++/11/ext/numeric_traits.h \ + /usr/include/c++/11/bits/stl_iterator_base_types.h \ + /usr/include/c++/11/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/11/bits/concept_check.h \ + /usr/include/c++/11/debug/assertions.h \ + /usr/include/c++/11/bits/stl_iterator.h \ + /usr/include/c++/11/bits/ptr_traits.h /usr/include/c++/11/debug/debug.h \ + /usr/include/c++/11/bits/predefined_ops.h \ + /usr/include/c++/11/bits/range_access.h \ + /usr/include/c++/11/bits/uses_allocator.h \ + /usr/include/c++/11/bits/invoke.h \ + /usr/include/c++/11/bits/functional_hash.h \ + /usr/include/c++/11/bits/hash_bytes.h /usr/include/c++/11/bits/refwrap.h \ + /usr/include/c++/11/bits/std_function.h /usr/include/c++/11/typeinfo \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_mixing/mixing_data.h \ + /usr/include/c++/11/vector /usr/include/c++/11/bits/allocator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++allocator.h \ + /usr/include/c++/11/ext/new_allocator.h \ + /usr/include/c++/11/bits/memoryfwd.h \ + /usr/include/c++/11/bits/stl_construct.h \ + /usr/include/c++/11/bits/stl_uninitialized.h \ + /usr/include/c++/11/ext/alloc_traits.h \ + /usr/include/c++/11/bits/alloc_traits.h \ + /usr/include/c++/11/bits/stl_vector.h \ + /usr/include/c++/11/bits/stl_bvector.h \ + /usr/include/c++/11/bits/vector.tcc \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/tensor.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/base/core/allocator.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor_types.h \ + /usr/include/c++/11/regex /usr/include/c++/11/algorithm \ + /usr/include/c++/11/bits/stl_algo.h /usr/include/c++/11/cstdlib \ + /usr/include/stdlib.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h \ + /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/atomic_wide_counter.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/include/c++/11/bits/std_abs.h \ + /usr/include/c++/11/bits/algorithmfwd.h \ + /usr/include/c++/11/bits/stl_heap.h \ + /usr/include/c++/11/bits/stl_tempbuf.h \ + /usr/include/c++/11/bits/uniform_int_dist.h /usr/include/c++/11/bitset \ + /usr/include/c++/11/string /usr/include/c++/11/bits/stringfwd.h \ + /usr/include/c++/11/bits/char_traits.h \ + /usr/include/c++/11/bits/postypes.h /usr/include/c++/11/cwchar \ + /usr/include/wchar.h /usr/lib/gcc/x86_64-linux-gnu/11/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/wchar.h \ + /usr/include/x86_64-linux-gnu/bits/types/wint_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/wchar2.h /usr/include/c++/11/cstdint \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdint.h /usr/include/stdint.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-uintn.h \ + /usr/include/c++/11/bits/localefwd.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++locale.h \ + /usr/include/c++/11/clocale /usr/include/locale.h \ + /usr/include/x86_64-linux-gnu/bits/locale.h /usr/include/c++/11/iosfwd \ + /usr/include/c++/11/cctype /usr/include/ctype.h \ + /usr/include/c++/11/bits/ostream_insert.h \ + /usr/include/c++/11/bits/cxxabi_forced.h \ + /usr/include/c++/11/bits/basic_string.h \ + /usr/include/c++/11/ext/atomicity.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr-default.h \ + /usr/include/pthread.h /usr/include/sched.h \ + /usr/include/x86_64-linux-gnu/bits/sched.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h \ + /usr/include/x86_64-linux-gnu/bits/cpu-set.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/timex.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h \ + /usr/include/x86_64-linux-gnu/bits/setjmp.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct___jmp_buf_tag.h \ + /usr/include/x86_64-linux-gnu/bits/pthread_stack_min-dynamic.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/atomic_word.h \ + /usr/include/x86_64-linux-gnu/sys/single_threaded.h \ + /usr/include/c++/11/ext/string_conversions.h /usr/include/c++/11/cstdio \ + /usr/include/stdio.h /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/c++/11/cerrno \ + /usr/include/errno.h /usr/include/x86_64-linux-gnu/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/bits/types/error_t.h \ + /usr/include/c++/11/bits/charconv.h \ + /usr/include/c++/11/bits/basic_string.tcc /usr/include/c++/11/iterator \ + /usr/include/c++/11/bits/stream_iterator.h \ + /usr/include/c++/11/bits/streambuf_iterator.h \ + /usr/include/c++/11/streambuf /usr/include/c++/11/bits/ios_base.h \ + /usr/include/c++/11/bits/locale_classes.h \ + /usr/include/c++/11/bits/locale_classes.tcc \ + /usr/include/c++/11/system_error \ + /usr/include/x86_64-linux-gnu/c++/11/bits/error_constants.h \ + /usr/include/c++/11/stdexcept /usr/include/c++/11/exception \ + /usr/include/c++/11/bits/exception_ptr.h \ + /usr/include/c++/11/bits/cxxabi_init_exception.h \ + /usr/include/c++/11/bits/nested_exception.h \ + /usr/include/c++/11/bits/streambuf.tcc /usr/include/c++/11/locale \ + /usr/include/c++/11/bits/locale_facets.h /usr/include/c++/11/cwctype \ + /usr/include/wctype.h /usr/include/x86_64-linux-gnu/bits/wctype-wchar.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_base.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_inline.h \ + /usr/include/c++/11/bits/locale_facets.tcc \ + /usr/include/c++/11/bits/locale_facets_nonio.h /usr/include/c++/11/ctime \ + /usr/include/x86_64-linux-gnu/c++/11/bits/time_members.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/messages_members.h \ + /usr/include/libintl.h /usr/include/c++/11/bits/codecvt.h \ + /usr/include/c++/11/bits/locale_facets_nonio.tcc \ + /usr/include/c++/11/bits/locale_conv.h \ + /usr/include/c++/11/bits/unique_ptr.h /usr/include/c++/11/memory \ + /usr/include/c++/11/bits/stl_raw_storage_iter.h \ + /usr/include/c++/11/bits/align.h /usr/include/c++/11/bit \ + /usr/include/c++/11/bits/shared_ptr.h \ + /usr/include/c++/11/bits/shared_ptr_base.h \ + /usr/include/c++/11/bits/allocated_ptr.h \ + /usr/include/c++/11/ext/aligned_buffer.h \ + /usr/include/c++/11/ext/concurrence.h \ + /usr/include/c++/11/bits/shared_ptr_atomic.h \ + /usr/include/c++/11/bits/atomic_base.h \ + /usr/include/c++/11/bits/atomic_lockfree_defines.h \ + /usr/include/c++/11/backward/auto_ptr.h /usr/include/c++/11/sstream \ + /usr/include/c++/11/istream /usr/include/c++/11/ios \ + /usr/include/c++/11/bits/basic_ios.h \ + /usr/include/c++/11/bits/basic_ios.tcc /usr/include/c++/11/ostream \ + /usr/include/c++/11/bits/ostream.tcc \ + /usr/include/c++/11/bits/istream.tcc \ + /usr/include/c++/11/bits/sstream.tcc /usr/include/c++/11/stack \ + /usr/include/c++/11/deque /usr/include/c++/11/bits/stl_deque.h \ + /usr/include/c++/11/bits/deque.tcc /usr/include/c++/11/bits/stl_stack.h \ + /usr/include/c++/11/map /usr/include/c++/11/bits/stl_tree.h \ + /usr/include/c++/11/bits/stl_map.h \ + /usr/include/c++/11/bits/stl_multimap.h \ + /usr/include/c++/11/bits/erase_if.h /usr/include/c++/11/cstring \ + /usr/include/string.h /usr/include/strings.h \ + /usr/include/x86_64-linux-gnu/bits/strings_fortified.h \ + /usr/include/x86_64-linux-gnu/bits/string_fortified.h \ + /usr/include/c++/11/bits/regex_constants.h \ + /usr/include/c++/11/bits/regex_error.h \ + /usr/include/c++/11/bits/regex_automaton.h \ + /usr/include/c++/11/bits/regex_automaton.tcc \ + /usr/include/c++/11/bits/regex_scanner.h \ + /usr/include/c++/11/bits/regex_scanner.tcc \ + /usr/include/c++/11/bits/regex_compiler.h \ + /usr/include/c++/11/bits/regex_compiler.tcc \ + /usr/include/c++/11/bits/regex.h /usr/include/c++/11/bits/regex.tcc \ + /usr/include/c++/11/bits/regex_executor.h \ + /usr/include/c++/11/bits/regex_executor.tcc /usr/include/c++/11/numeric \ + /usr/include/c++/11/bits/stl_numeric.h /usr/include/c++/11/complex \ + /usr/include/c++/11/cmath /usr/include/math.h \ + /usr/include/x86_64-linux-gnu/bits/math-vector.h \ + /usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h \ + /usr/include/x86_64-linux-gnu/bits/flt-eval-method.h \ + /usr/include/x86_64-linux-gnu/bits/fp-logb.h \ + /usr/include/x86_64-linux-gnu/bits/fp-fast.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-narrow.h \ + /usr/include/x86_64-linux-gnu/bits/iscanonical.h \ + /usr/include/c++/11/iomanip /usr/include/c++/11/iostream \ + /usr/include/c++/11/unordered_map /usr/include/c++/11/bits/hashtable.h \ + /usr/include/c++/11/bits/hashtable_policy.h \ + /usr/include/c++/11/bits/enable_special_members.h \ + /usr/include/c++/11/bits/unordered_map.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_device/types.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor_shape.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor_buffer.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/base/core/refcount.h \ + /usr/include/c++/11/atomic \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor_accessor.h \ + /usr/include/c++/11/cstddef \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/base/macros/macros.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/base/utils/logging.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/base/utils/array_ref.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/kernels/memory.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/memory.h \ + /usr/include/c++/11/fstream \ + /usr/include/x86_64-linux-gnu/c++/11/bits/basic_file.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++io.h \ + /usr/include/c++/11/bits/fstream.tcc \ + /home/haozhihan/Documents/abacus-develop/source/source_base/timer.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/tool_title.h \ + /usr/include/c++/11/valarray /usr/include/c++/11/bits/valarray_array.h \ + /usr/include/c++/11/bits/valarray_array.tcc \ + /usr/include/c++/11/bits/valarray_before.h \ + /usr/include/c++/11/bits/slice_array.h \ + /usr/include/c++/11/bits/valarray_after.h \ + /usr/include/c++/11/bits/gslice.h \ + /usr/include/c++/11/bits/gslice_array.h \ + /usr/include/c++/11/bits/mask_array.h \ + /usr/include/c++/11/bits/indirect_array.h /usr/include/c++/11/cassert \ + /usr/include/assert.h diff --git a/build/source/source_base/CMakeFiles/base.dir/module_mixing/pulay_mixing.cpp.o b/build/source/source_base/CMakeFiles/base.dir/module_mixing/pulay_mixing.cpp.o new file mode 100644 index 0000000000..870a632f2b Binary files /dev/null and b/build/source/source_base/CMakeFiles/base.dir/module_mixing/pulay_mixing.cpp.o differ diff --git a/build/source/source_base/CMakeFiles/base.dir/module_mixing/pulay_mixing.cpp.o.d b/build/source/source_base/CMakeFiles/base.dir/module_mixing/pulay_mixing.cpp.o.d new file mode 100644 index 0000000000..90d66b1845 --- /dev/null +++ b/build/source/source_base/CMakeFiles/base.dir/module_mixing/pulay_mixing.cpp.o.d @@ -0,0 +1,270 @@ +source/source_base/CMakeFiles/base.dir/module_mixing/pulay_mixing.cpp.o: \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_mixing/pulay_mixing.cpp \ + /usr/include/stdc-predef.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_mixing/pulay_mixing.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_mixing/mixing.h \ + /usr/include/c++/11/functional \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++config.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/os_defines.h \ + /usr/include/features.h /usr/include/features-time64.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/cpu_defines.h \ + /usr/include/c++/11/bits/stl_function.h \ + /usr/include/c++/11/backward/binders.h /usr/include/c++/11/new \ + /usr/include/c++/11/bits/exception.h /usr/include/c++/11/tuple \ + /usr/include/c++/11/utility /usr/include/c++/11/bits/stl_relops.h \ + /usr/include/c++/11/bits/stl_pair.h /usr/include/c++/11/bits/move.h \ + /usr/include/c++/11/type_traits /usr/include/c++/11/initializer_list \ + /usr/include/c++/11/array /usr/include/c++/11/bits/functexcept.h \ + /usr/include/c++/11/bits/exception_defines.h \ + /usr/include/c++/11/bits/stl_algobase.h \ + /usr/include/c++/11/bits/cpp_type_traits.h \ + /usr/include/c++/11/ext/type_traits.h \ + /usr/include/c++/11/ext/numeric_traits.h \ + /usr/include/c++/11/bits/stl_iterator_base_types.h \ + /usr/include/c++/11/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/11/bits/concept_check.h \ + /usr/include/c++/11/debug/assertions.h \ + /usr/include/c++/11/bits/stl_iterator.h \ + /usr/include/c++/11/bits/ptr_traits.h /usr/include/c++/11/debug/debug.h \ + /usr/include/c++/11/bits/predefined_ops.h \ + /usr/include/c++/11/bits/range_access.h \ + /usr/include/c++/11/bits/uses_allocator.h \ + /usr/include/c++/11/bits/invoke.h \ + /usr/include/c++/11/bits/functional_hash.h \ + /usr/include/c++/11/bits/hash_bytes.h /usr/include/c++/11/bits/refwrap.h \ + /usr/include/c++/11/bits/std_function.h /usr/include/c++/11/typeinfo \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_mixing/mixing_data.h \ + /usr/include/c++/11/vector /usr/include/c++/11/bits/allocator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++allocator.h \ + /usr/include/c++/11/ext/new_allocator.h \ + /usr/include/c++/11/bits/memoryfwd.h \ + /usr/include/c++/11/bits/stl_construct.h \ + /usr/include/c++/11/bits/stl_uninitialized.h \ + /usr/include/c++/11/ext/alloc_traits.h \ + /usr/include/c++/11/bits/alloc_traits.h \ + /usr/include/c++/11/bits/stl_vector.h \ + /usr/include/c++/11/bits/stl_bvector.h \ + /usr/include/c++/11/bits/vector.tcc \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/tensor.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/base/core/allocator.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor_types.h \ + /usr/include/c++/11/regex /usr/include/c++/11/algorithm \ + /usr/include/c++/11/bits/stl_algo.h /usr/include/c++/11/cstdlib \ + /usr/include/stdlib.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h \ + /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/atomic_wide_counter.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/include/c++/11/bits/std_abs.h \ + /usr/include/c++/11/bits/algorithmfwd.h \ + /usr/include/c++/11/bits/stl_heap.h \ + /usr/include/c++/11/bits/stl_tempbuf.h \ + /usr/include/c++/11/bits/uniform_int_dist.h /usr/include/c++/11/bitset \ + /usr/include/c++/11/string /usr/include/c++/11/bits/stringfwd.h \ + /usr/include/c++/11/bits/char_traits.h \ + /usr/include/c++/11/bits/postypes.h /usr/include/c++/11/cwchar \ + /usr/include/wchar.h /usr/lib/gcc/x86_64-linux-gnu/11/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/wchar.h \ + /usr/include/x86_64-linux-gnu/bits/types/wint_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/wchar2.h /usr/include/c++/11/cstdint \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdint.h /usr/include/stdint.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-uintn.h \ + /usr/include/c++/11/bits/localefwd.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++locale.h \ + /usr/include/c++/11/clocale /usr/include/locale.h \ + /usr/include/x86_64-linux-gnu/bits/locale.h /usr/include/c++/11/iosfwd \ + /usr/include/c++/11/cctype /usr/include/ctype.h \ + /usr/include/c++/11/bits/ostream_insert.h \ + /usr/include/c++/11/bits/cxxabi_forced.h \ + /usr/include/c++/11/bits/basic_string.h \ + /usr/include/c++/11/ext/atomicity.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr-default.h \ + /usr/include/pthread.h /usr/include/sched.h \ + /usr/include/x86_64-linux-gnu/bits/sched.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h \ + /usr/include/x86_64-linux-gnu/bits/cpu-set.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/timex.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h \ + /usr/include/x86_64-linux-gnu/bits/setjmp.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct___jmp_buf_tag.h \ + /usr/include/x86_64-linux-gnu/bits/pthread_stack_min-dynamic.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/atomic_word.h \ + /usr/include/x86_64-linux-gnu/sys/single_threaded.h \ + /usr/include/c++/11/ext/string_conversions.h /usr/include/c++/11/cstdio \ + /usr/include/stdio.h /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/c++/11/cerrno \ + /usr/include/errno.h /usr/include/x86_64-linux-gnu/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/bits/types/error_t.h \ + /usr/include/c++/11/bits/charconv.h \ + /usr/include/c++/11/bits/basic_string.tcc /usr/include/c++/11/iterator \ + /usr/include/c++/11/bits/stream_iterator.h \ + /usr/include/c++/11/bits/streambuf_iterator.h \ + /usr/include/c++/11/streambuf /usr/include/c++/11/bits/ios_base.h \ + /usr/include/c++/11/bits/locale_classes.h \ + /usr/include/c++/11/bits/locale_classes.tcc \ + /usr/include/c++/11/system_error \ + /usr/include/x86_64-linux-gnu/c++/11/bits/error_constants.h \ + /usr/include/c++/11/stdexcept /usr/include/c++/11/exception \ + /usr/include/c++/11/bits/exception_ptr.h \ + /usr/include/c++/11/bits/cxxabi_init_exception.h \ + /usr/include/c++/11/bits/nested_exception.h \ + /usr/include/c++/11/bits/streambuf.tcc /usr/include/c++/11/locale \ + /usr/include/c++/11/bits/locale_facets.h /usr/include/c++/11/cwctype \ + /usr/include/wctype.h /usr/include/x86_64-linux-gnu/bits/wctype-wchar.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_base.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_inline.h \ + /usr/include/c++/11/bits/locale_facets.tcc \ + /usr/include/c++/11/bits/locale_facets_nonio.h /usr/include/c++/11/ctime \ + /usr/include/x86_64-linux-gnu/c++/11/bits/time_members.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/messages_members.h \ + /usr/include/libintl.h /usr/include/c++/11/bits/codecvt.h \ + /usr/include/c++/11/bits/locale_facets_nonio.tcc \ + /usr/include/c++/11/bits/locale_conv.h \ + /usr/include/c++/11/bits/unique_ptr.h /usr/include/c++/11/memory \ + /usr/include/c++/11/bits/stl_raw_storage_iter.h \ + /usr/include/c++/11/bits/align.h /usr/include/c++/11/bit \ + /usr/include/c++/11/bits/shared_ptr.h \ + /usr/include/c++/11/bits/shared_ptr_base.h \ + /usr/include/c++/11/bits/allocated_ptr.h \ + /usr/include/c++/11/ext/aligned_buffer.h \ + /usr/include/c++/11/ext/concurrence.h \ + /usr/include/c++/11/bits/shared_ptr_atomic.h \ + /usr/include/c++/11/bits/atomic_base.h \ + /usr/include/c++/11/bits/atomic_lockfree_defines.h \ + /usr/include/c++/11/backward/auto_ptr.h /usr/include/c++/11/sstream \ + /usr/include/c++/11/istream /usr/include/c++/11/ios \ + /usr/include/c++/11/bits/basic_ios.h \ + /usr/include/c++/11/bits/basic_ios.tcc /usr/include/c++/11/ostream \ + /usr/include/c++/11/bits/ostream.tcc \ + /usr/include/c++/11/bits/istream.tcc \ + /usr/include/c++/11/bits/sstream.tcc /usr/include/c++/11/stack \ + /usr/include/c++/11/deque /usr/include/c++/11/bits/stl_deque.h \ + /usr/include/c++/11/bits/deque.tcc /usr/include/c++/11/bits/stl_stack.h \ + /usr/include/c++/11/map /usr/include/c++/11/bits/stl_tree.h \ + /usr/include/c++/11/bits/stl_map.h \ + /usr/include/c++/11/bits/stl_multimap.h \ + /usr/include/c++/11/bits/erase_if.h /usr/include/c++/11/cstring \ + /usr/include/string.h /usr/include/strings.h \ + /usr/include/x86_64-linux-gnu/bits/strings_fortified.h \ + /usr/include/x86_64-linux-gnu/bits/string_fortified.h \ + /usr/include/c++/11/bits/regex_constants.h \ + /usr/include/c++/11/bits/regex_error.h \ + /usr/include/c++/11/bits/regex_automaton.h \ + /usr/include/c++/11/bits/regex_automaton.tcc \ + /usr/include/c++/11/bits/regex_scanner.h \ + /usr/include/c++/11/bits/regex_scanner.tcc \ + /usr/include/c++/11/bits/regex_compiler.h \ + /usr/include/c++/11/bits/regex_compiler.tcc \ + /usr/include/c++/11/bits/regex.h /usr/include/c++/11/bits/regex.tcc \ + /usr/include/c++/11/bits/regex_executor.h \ + /usr/include/c++/11/bits/regex_executor.tcc /usr/include/c++/11/numeric \ + /usr/include/c++/11/bits/stl_numeric.h /usr/include/c++/11/complex \ + /usr/include/c++/11/cmath /usr/include/math.h \ + /usr/include/x86_64-linux-gnu/bits/math-vector.h \ + /usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h \ + /usr/include/x86_64-linux-gnu/bits/flt-eval-method.h \ + /usr/include/x86_64-linux-gnu/bits/fp-logb.h \ + /usr/include/x86_64-linux-gnu/bits/fp-fast.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-narrow.h \ + /usr/include/x86_64-linux-gnu/bits/iscanonical.h \ + /usr/include/c++/11/iomanip /usr/include/c++/11/iostream \ + /usr/include/c++/11/unordered_map /usr/include/c++/11/bits/hashtable.h \ + /usr/include/c++/11/bits/hashtable_policy.h \ + /usr/include/c++/11/bits/enable_special_members.h \ + /usr/include/c++/11/bits/unordered_map.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_device/types.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor_shape.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor_buffer.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/base/core/refcount.h \ + /usr/include/c++/11/atomic \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor_accessor.h \ + /usr/include/c++/11/cstddef \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/base/macros/macros.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/base/utils/logging.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/base/utils/array_ref.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/kernels/memory.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/matrix.h \ + /usr/include/c++/11/cassert /usr/include/assert.h \ + /usr/include/c++/11/fstream \ + /usr/include/x86_64-linux-gnu/c++/11/bits/basic_file.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++io.h \ + /usr/include/c++/11/bits/fstream.tcc \ + /home/haozhihan/Documents/abacus-develop/source/source_base/lapack_connector.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/matrix.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/complexmatrix.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/global_function.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/blas_connector.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/macros.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/global_function-func_each_2.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/global_variable.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/tool_check.h \ + /usr/include/c++/11/valarray /usr/include/c++/11/bits/valarray_array.h \ + /usr/include/c++/11/bits/valarray_array.tcc \ + /usr/include/c++/11/bits/valarray_before.h \ + /usr/include/c++/11/bits/slice_array.h \ + /usr/include/c++/11/bits/valarray_after.h \ + /usr/include/c++/11/bits/gslice.h \ + /usr/include/c++/11/bits/gslice_array.h \ + /usr/include/c++/11/bits/mask_array.h \ + /usr/include/c++/11/bits/indirect_array.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/tool_quit.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/tool_title.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/memory.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/timer.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/tool_title.h diff --git a/build/source/source_base/CMakeFiles/base.dir/mymath.cpp.o b/build/source/source_base/CMakeFiles/base.dir/mymath.cpp.o new file mode 100644 index 0000000000..9d09742311 Binary files /dev/null and b/build/source/source_base/CMakeFiles/base.dir/mymath.cpp.o differ diff --git a/build/source/source_base/CMakeFiles/base.dir/mymath.cpp.o.d b/build/source/source_base/CMakeFiles/base.dir/mymath.cpp.o.d new file mode 100644 index 0000000000..4bc2466b50 --- /dev/null +++ b/build/source/source_base/CMakeFiles/base.dir/mymath.cpp.o.d @@ -0,0 +1,174 @@ +source/source_base/CMakeFiles/base.dir/mymath.cpp.o: \ + /home/haozhihan/Documents/abacus-develop/source/source_base/mymath.cpp \ + /usr/include/stdc-predef.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/mymath.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/timer.h \ + /usr/include/c++/11/ctime \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++config.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/os_defines.h \ + /usr/include/features.h /usr/include/features-time64.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/cpu_defines.h \ + /usr/include/time.h /usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/timex.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/c++/11/fstream /usr/include/c++/11/istream \ + /usr/include/c++/11/ios /usr/include/c++/11/iosfwd \ + /usr/include/c++/11/bits/stringfwd.h \ + /usr/include/c++/11/bits/memoryfwd.h /usr/include/c++/11/bits/postypes.h \ + /usr/include/c++/11/cwchar /usr/include/wchar.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/wchar.h \ + /usr/include/x86_64-linux-gnu/bits/types/wint_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/wchar2.h \ + /usr/include/c++/11/exception /usr/include/c++/11/bits/exception.h \ + /usr/include/c++/11/bits/exception_ptr.h \ + /usr/include/c++/11/bits/exception_defines.h \ + /usr/include/c++/11/bits/cxxabi_init_exception.h \ + /usr/include/c++/11/typeinfo /usr/include/c++/11/bits/hash_bytes.h \ + /usr/include/c++/11/new /usr/include/c++/11/bits/move.h \ + /usr/include/c++/11/type_traits \ + /usr/include/c++/11/bits/nested_exception.h \ + /usr/include/c++/11/bits/char_traits.h \ + /usr/include/c++/11/bits/stl_algobase.h \ + /usr/include/c++/11/bits/functexcept.h \ + /usr/include/c++/11/bits/cpp_type_traits.h \ + /usr/include/c++/11/ext/type_traits.h \ + /usr/include/c++/11/ext/numeric_traits.h \ + /usr/include/c++/11/bits/stl_pair.h \ + /usr/include/c++/11/bits/stl_iterator_base_types.h \ + /usr/include/c++/11/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/11/bits/concept_check.h \ + /usr/include/c++/11/debug/assertions.h \ + /usr/include/c++/11/bits/stl_iterator.h \ + /usr/include/c++/11/bits/ptr_traits.h /usr/include/c++/11/debug/debug.h \ + /usr/include/c++/11/bits/predefined_ops.h /usr/include/c++/11/cstdint \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdint.h /usr/include/stdint.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-uintn.h \ + /usr/include/c++/11/bits/localefwd.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++locale.h \ + /usr/include/c++/11/clocale /usr/include/locale.h \ + /usr/include/x86_64-linux-gnu/bits/locale.h /usr/include/c++/11/cctype \ + /usr/include/ctype.h /usr/include/c++/11/bits/ios_base.h \ + /usr/include/c++/11/ext/atomicity.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr-default.h \ + /usr/include/pthread.h /usr/include/sched.h \ + /usr/include/x86_64-linux-gnu/bits/sched.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h \ + /usr/include/x86_64-linux-gnu/bits/cpu-set.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/atomic_wide_counter.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h \ + /usr/include/x86_64-linux-gnu/bits/setjmp.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct___jmp_buf_tag.h \ + /usr/include/x86_64-linux-gnu/bits/pthread_stack_min-dynamic.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/atomic_word.h \ + /usr/include/x86_64-linux-gnu/sys/single_threaded.h \ + /usr/include/c++/11/bits/locale_classes.h /usr/include/c++/11/string \ + /usr/include/c++/11/bits/allocator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++allocator.h \ + /usr/include/c++/11/ext/new_allocator.h \ + /usr/include/c++/11/bits/ostream_insert.h \ + /usr/include/c++/11/bits/cxxabi_forced.h \ + /usr/include/c++/11/bits/stl_function.h \ + /usr/include/c++/11/backward/binders.h \ + /usr/include/c++/11/bits/range_access.h \ + /usr/include/c++/11/initializer_list \ + /usr/include/c++/11/bits/basic_string.h \ + /usr/include/c++/11/ext/alloc_traits.h \ + /usr/include/c++/11/bits/alloc_traits.h \ + /usr/include/c++/11/bits/stl_construct.h \ + /usr/include/c++/11/ext/string_conversions.h /usr/include/c++/11/cstdlib \ + /usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/sys/types.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/include/c++/11/bits/std_abs.h /usr/include/c++/11/cstdio \ + /usr/include/stdio.h /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/c++/11/cerrno \ + /usr/include/errno.h /usr/include/x86_64-linux-gnu/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/bits/types/error_t.h \ + /usr/include/c++/11/bits/charconv.h \ + /usr/include/c++/11/bits/functional_hash.h \ + /usr/include/c++/11/bits/basic_string.tcc \ + /usr/include/c++/11/bits/locale_classes.tcc \ + /usr/include/c++/11/system_error \ + /usr/include/x86_64-linux-gnu/c++/11/bits/error_constants.h \ + /usr/include/c++/11/stdexcept /usr/include/c++/11/streambuf \ + /usr/include/c++/11/bits/streambuf.tcc \ + /usr/include/c++/11/bits/basic_ios.h \ + /usr/include/c++/11/bits/locale_facets.h /usr/include/c++/11/cwctype \ + /usr/include/wctype.h /usr/include/x86_64-linux-gnu/bits/wctype-wchar.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_base.h \ + /usr/include/c++/11/bits/streambuf_iterator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_inline.h \ + /usr/include/c++/11/bits/locale_facets.tcc \ + /usr/include/c++/11/bits/basic_ios.tcc /usr/include/c++/11/ostream \ + /usr/include/c++/11/bits/ostream.tcc \ + /usr/include/c++/11/bits/istream.tcc /usr/include/c++/11/bits/codecvt.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/basic_file.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++io.h \ + /usr/include/c++/11/bits/fstream.tcc /usr/include/c++/11/iomanip \ + /usr/include/c++/11/locale \ + /usr/include/c++/11/bits/locale_facets_nonio.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/time_members.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/messages_members.h \ + /usr/include/libintl.h /usr/include/c++/11/bits/locale_facets_nonio.tcc \ + /usr/include/c++/11/bits/locale_conv.h \ + /usr/include/c++/11/bits/unique_ptr.h /usr/include/c++/11/utility \ + /usr/include/c++/11/bits/stl_relops.h /usr/include/c++/11/tuple \ + /usr/include/c++/11/array /usr/include/c++/11/bits/uses_allocator.h \ + /usr/include/c++/11/bits/invoke.h /usr/include/c++/11/iostream \ + /usr/include/c++/11/map /usr/include/c++/11/bits/stl_tree.h \ + /usr/include/c++/11/ext/aligned_buffer.h \ + /usr/include/c++/11/bits/stl_map.h \ + /usr/include/c++/11/bits/stl_multimap.h \ + /usr/include/c++/11/bits/erase_if.h diff --git a/build/source/source_base/CMakeFiles/base.dir/opt_CG.cpp.o b/build/source/source_base/CMakeFiles/base.dir/opt_CG.cpp.o new file mode 100644 index 0000000000..cab11ded51 Binary files /dev/null and b/build/source/source_base/CMakeFiles/base.dir/opt_CG.cpp.o differ diff --git a/build/source/source_base/CMakeFiles/base.dir/opt_CG.cpp.o.d b/build/source/source_base/CMakeFiles/base.dir/opt_CG.cpp.o.d new file mode 100644 index 0000000000..3dc68add14 --- /dev/null +++ b/build/source/source_base/CMakeFiles/base.dir/opt_CG.cpp.o.d @@ -0,0 +1,253 @@ +source/source_base/CMakeFiles/base.dir/opt_CG.cpp.o: \ + /home/haozhihan/Documents/abacus-develop/source/source_base/opt_CG.cpp \ + /usr/include/stdc-predef.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/opt_CG.h \ + /usr/include/c++/11/math.h /usr/include/c++/11/cmath \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++config.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/os_defines.h \ + /usr/include/features.h /usr/include/features-time64.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/cpu_defines.h \ + /usr/include/c++/11/bits/cpp_type_traits.h \ + /usr/include/c++/11/ext/type_traits.h /usr/include/math.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/math-vector.h \ + /usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h \ + /usr/include/x86_64-linux-gnu/bits/flt-eval-method.h \ + /usr/include/x86_64-linux-gnu/bits/fp-logb.h \ + /usr/include/x86_64-linux-gnu/bits/fp-fast.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-narrow.h \ + /usr/include/x86_64-linux-gnu/bits/iscanonical.h \ + /usr/include/c++/11/bits/std_abs.h /usr/include/stdlib.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h \ + /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/atomic_wide_counter.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h /usr/include/c++/11/iostream \ + /usr/include/c++/11/ostream /usr/include/c++/11/ios \ + /usr/include/c++/11/iosfwd /usr/include/c++/11/bits/stringfwd.h \ + /usr/include/c++/11/bits/memoryfwd.h /usr/include/c++/11/bits/postypes.h \ + /usr/include/c++/11/cwchar /usr/include/wchar.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/wchar.h \ + /usr/include/x86_64-linux-gnu/bits/types/wint_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/wchar2.h \ + /usr/include/c++/11/exception /usr/include/c++/11/bits/exception.h \ + /usr/include/c++/11/bits/exception_ptr.h \ + /usr/include/c++/11/bits/exception_defines.h \ + /usr/include/c++/11/bits/cxxabi_init_exception.h \ + /usr/include/c++/11/typeinfo /usr/include/c++/11/bits/hash_bytes.h \ + /usr/include/c++/11/new /usr/include/c++/11/bits/move.h \ + /usr/include/c++/11/type_traits \ + /usr/include/c++/11/bits/nested_exception.h \ + /usr/include/c++/11/bits/char_traits.h \ + /usr/include/c++/11/bits/stl_algobase.h \ + /usr/include/c++/11/bits/functexcept.h \ + /usr/include/c++/11/ext/numeric_traits.h \ + /usr/include/c++/11/bits/stl_pair.h \ + /usr/include/c++/11/bits/stl_iterator_base_types.h \ + /usr/include/c++/11/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/11/bits/concept_check.h \ + /usr/include/c++/11/debug/assertions.h \ + /usr/include/c++/11/bits/stl_iterator.h \ + /usr/include/c++/11/bits/ptr_traits.h /usr/include/c++/11/debug/debug.h \ + /usr/include/c++/11/bits/predefined_ops.h /usr/include/c++/11/cstdint \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdint.h /usr/include/stdint.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-uintn.h \ + /usr/include/c++/11/bits/localefwd.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++locale.h \ + /usr/include/c++/11/clocale /usr/include/locale.h \ + /usr/include/x86_64-linux-gnu/bits/locale.h /usr/include/c++/11/cctype \ + /usr/include/ctype.h /usr/include/c++/11/bits/ios_base.h \ + /usr/include/c++/11/ext/atomicity.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr-default.h \ + /usr/include/pthread.h /usr/include/sched.h \ + /usr/include/x86_64-linux-gnu/bits/sched.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h \ + /usr/include/x86_64-linux-gnu/bits/cpu-set.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/timex.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h \ + /usr/include/x86_64-linux-gnu/bits/setjmp.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct___jmp_buf_tag.h \ + /usr/include/x86_64-linux-gnu/bits/pthread_stack_min-dynamic.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/atomic_word.h \ + /usr/include/x86_64-linux-gnu/sys/single_threaded.h \ + /usr/include/c++/11/bits/locale_classes.h /usr/include/c++/11/string \ + /usr/include/c++/11/bits/allocator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++allocator.h \ + /usr/include/c++/11/ext/new_allocator.h \ + /usr/include/c++/11/bits/ostream_insert.h \ + /usr/include/c++/11/bits/cxxabi_forced.h \ + /usr/include/c++/11/bits/stl_function.h \ + /usr/include/c++/11/backward/binders.h \ + /usr/include/c++/11/bits/range_access.h \ + /usr/include/c++/11/initializer_list \ + /usr/include/c++/11/bits/basic_string.h \ + /usr/include/c++/11/ext/alloc_traits.h \ + /usr/include/c++/11/bits/alloc_traits.h \ + /usr/include/c++/11/bits/stl_construct.h \ + /usr/include/c++/11/ext/string_conversions.h /usr/include/c++/11/cstdlib \ + /usr/include/c++/11/cstdio /usr/include/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/c++/11/cerrno \ + /usr/include/errno.h /usr/include/x86_64-linux-gnu/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/bits/types/error_t.h \ + /usr/include/c++/11/bits/charconv.h \ + /usr/include/c++/11/bits/functional_hash.h \ + /usr/include/c++/11/bits/basic_string.tcc \ + /usr/include/c++/11/bits/locale_classes.tcc \ + /usr/include/c++/11/system_error \ + /usr/include/x86_64-linux-gnu/c++/11/bits/error_constants.h \ + /usr/include/c++/11/stdexcept /usr/include/c++/11/streambuf \ + /usr/include/c++/11/bits/streambuf.tcc \ + /usr/include/c++/11/bits/basic_ios.h \ + /usr/include/c++/11/bits/locale_facets.h /usr/include/c++/11/cwctype \ + /usr/include/wctype.h /usr/include/x86_64-linux-gnu/bits/wctype-wchar.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_base.h \ + /usr/include/c++/11/bits/streambuf_iterator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_inline.h \ + /usr/include/c++/11/bits/locale_facets.tcc \ + /usr/include/c++/11/bits/basic_ios.tcc \ + /usr/include/c++/11/bits/ostream.tcc /usr/include/c++/11/istream \ + /usr/include/c++/11/bits/istream.tcc \ + /home/haozhihan/Documents/abacus-develop/source/source_base/global_function.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/blas_connector.h \ + /usr/include/c++/11/complex /usr/include/c++/11/sstream \ + /usr/include/c++/11/bits/sstream.tcc \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_device/types.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/macros.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/global_function-func_each_2.h \ + /usr/include/c++/11/functional /usr/include/c++/11/tuple \ + /usr/include/c++/11/utility /usr/include/c++/11/bits/stl_relops.h \ + /usr/include/c++/11/array /usr/include/c++/11/bits/uses_allocator.h \ + /usr/include/c++/11/bits/invoke.h /usr/include/c++/11/bits/refwrap.h \ + /usr/include/c++/11/bits/std_function.h /usr/include/c++/11/map \ + /usr/include/c++/11/bits/stl_tree.h \ + /usr/include/c++/11/ext/aligned_buffer.h \ + /usr/include/c++/11/bits/stl_map.h \ + /usr/include/c++/11/bits/stl_multimap.h \ + /usr/include/c++/11/bits/erase_if.h /usr/include/c++/11/vector \ + /usr/include/c++/11/bits/stl_uninitialized.h \ + /usr/include/c++/11/bits/stl_vector.h \ + /usr/include/c++/11/bits/stl_bvector.h \ + /usr/include/c++/11/bits/vector.tcc \ + /home/haozhihan/Documents/abacus-develop/source/source_base/global_variable.h \ + /usr/include/c++/11/fstream /usr/include/c++/11/bits/codecvt.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/basic_file.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++io.h \ + /usr/include/c++/11/bits/fstream.tcc /usr/include/c++/11/iomanip \ + /usr/include/c++/11/locale \ + /usr/include/c++/11/bits/locale_facets_nonio.h /usr/include/c++/11/ctime \ + /usr/include/x86_64-linux-gnu/c++/11/bits/time_members.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/messages_members.h \ + /usr/include/libintl.h /usr/include/c++/11/bits/locale_facets_nonio.tcc \ + /usr/include/c++/11/bits/locale_conv.h \ + /usr/include/c++/11/bits/unique_ptr.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/tool_check.h \ + /usr/include/c++/11/cassert /usr/include/assert.h \ + /usr/include/c++/11/valarray /usr/include/c++/11/algorithm \ + /usr/include/c++/11/bits/stl_algo.h \ + /usr/include/c++/11/bits/algorithmfwd.h \ + /usr/include/c++/11/bits/stl_heap.h \ + /usr/include/c++/11/bits/stl_tempbuf.h \ + /usr/include/c++/11/bits/uniform_int_dist.h \ + /usr/include/c++/11/bits/valarray_array.h \ + /usr/include/c++/11/bits/valarray_array.tcc \ + /usr/include/c++/11/bits/valarray_before.h \ + /usr/include/c++/11/bits/slice_array.h \ + /usr/include/c++/11/bits/valarray_after.h \ + /usr/include/c++/11/bits/gslice.h \ + /usr/include/c++/11/bits/gslice_array.h \ + /usr/include/c++/11/bits/mask_array.h \ + /usr/include/c++/11/bits/indirect_array.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/tool_quit.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/tool_title.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/parallel_reduce.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/mpi.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/mpi_portable_platform.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/mpicxx.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/constants.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/functions.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/datatype.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/exception.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/op.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/status.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/request.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/group.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/comm.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/win.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/file.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/errhandler.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/intracomm.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/topology.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/intercomm.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/info.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/datatype_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/functions_inln.h \ + /usr/include/string.h /usr/include/strings.h \ + /usr/include/x86_64-linux-gnu/bits/strings_fortified.h \ + /usr/include/x86_64-linux-gnu/bits/string_fortified.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/request_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/comm_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/intracomm_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/topology_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/intercomm_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/group_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/op_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/errhandler_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/status_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/info_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/win_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/file_inln.h diff --git a/build/source/source_base/CMakeFiles/base.dir/opt_DCsrch.cpp.o b/build/source/source_base/CMakeFiles/base.dir/opt_DCsrch.cpp.o new file mode 100644 index 0000000000..8e6210b578 Binary files /dev/null and b/build/source/source_base/CMakeFiles/base.dir/opt_DCsrch.cpp.o differ diff --git a/build/source/source_base/CMakeFiles/base.dir/opt_DCsrch.cpp.o.d b/build/source/source_base/CMakeFiles/base.dir/opt_DCsrch.cpp.o.d new file mode 100644 index 0000000000..32b493c08c --- /dev/null +++ b/build/source/source_base/CMakeFiles/base.dir/opt_DCsrch.cpp.o.d @@ -0,0 +1,168 @@ +source/source_base/CMakeFiles/base.dir/opt_DCsrch.cpp.o: \ + /home/haozhihan/Documents/abacus-develop/source/source_base/opt_DCsrch.cpp \ + /usr/include/stdc-predef.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/opt_DCsrch.h \ + /usr/include/c++/11/iostream \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++config.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/os_defines.h \ + /usr/include/features.h /usr/include/features-time64.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/cpu_defines.h \ + /usr/include/c++/11/ostream /usr/include/c++/11/ios \ + /usr/include/c++/11/iosfwd /usr/include/c++/11/bits/stringfwd.h \ + /usr/include/c++/11/bits/memoryfwd.h /usr/include/c++/11/bits/postypes.h \ + /usr/include/c++/11/cwchar /usr/include/wchar.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/wchar.h \ + /usr/include/x86_64-linux-gnu/bits/types/wint_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/wchar2.h \ + /usr/include/c++/11/exception /usr/include/c++/11/bits/exception.h \ + /usr/include/c++/11/bits/exception_ptr.h \ + /usr/include/c++/11/bits/exception_defines.h \ + /usr/include/c++/11/bits/cxxabi_init_exception.h \ + /usr/include/c++/11/typeinfo /usr/include/c++/11/bits/hash_bytes.h \ + /usr/include/c++/11/new /usr/include/c++/11/bits/move.h \ + /usr/include/c++/11/type_traits \ + /usr/include/c++/11/bits/nested_exception.h \ + /usr/include/c++/11/bits/char_traits.h \ + /usr/include/c++/11/bits/stl_algobase.h \ + /usr/include/c++/11/bits/functexcept.h \ + /usr/include/c++/11/bits/cpp_type_traits.h \ + /usr/include/c++/11/ext/type_traits.h \ + /usr/include/c++/11/ext/numeric_traits.h \ + /usr/include/c++/11/bits/stl_pair.h \ + /usr/include/c++/11/bits/stl_iterator_base_types.h \ + /usr/include/c++/11/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/11/bits/concept_check.h \ + /usr/include/c++/11/debug/assertions.h \ + /usr/include/c++/11/bits/stl_iterator.h \ + /usr/include/c++/11/bits/ptr_traits.h /usr/include/c++/11/debug/debug.h \ + /usr/include/c++/11/bits/predefined_ops.h /usr/include/c++/11/cstdint \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdint.h /usr/include/stdint.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-uintn.h \ + /usr/include/c++/11/bits/localefwd.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++locale.h \ + /usr/include/c++/11/clocale /usr/include/locale.h \ + /usr/include/x86_64-linux-gnu/bits/locale.h /usr/include/c++/11/cctype \ + /usr/include/ctype.h /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/c++/11/bits/ios_base.h /usr/include/c++/11/ext/atomicity.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr-default.h \ + /usr/include/pthread.h /usr/include/sched.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/sched.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h \ + /usr/include/x86_64-linux-gnu/bits/cpu-set.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/timex.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/atomic_wide_counter.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h \ + /usr/include/x86_64-linux-gnu/bits/setjmp.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct___jmp_buf_tag.h \ + /usr/include/x86_64-linux-gnu/bits/pthread_stack_min-dynamic.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/atomic_word.h \ + /usr/include/x86_64-linux-gnu/sys/single_threaded.h \ + /usr/include/c++/11/bits/locale_classes.h /usr/include/c++/11/string \ + /usr/include/c++/11/bits/allocator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++allocator.h \ + /usr/include/c++/11/ext/new_allocator.h \ + /usr/include/c++/11/bits/ostream_insert.h \ + /usr/include/c++/11/bits/cxxabi_forced.h \ + /usr/include/c++/11/bits/stl_function.h \ + /usr/include/c++/11/backward/binders.h \ + /usr/include/c++/11/bits/range_access.h \ + /usr/include/c++/11/initializer_list \ + /usr/include/c++/11/bits/basic_string.h \ + /usr/include/c++/11/ext/alloc_traits.h \ + /usr/include/c++/11/bits/alloc_traits.h \ + /usr/include/c++/11/bits/stl_construct.h \ + /usr/include/c++/11/ext/string_conversions.h /usr/include/c++/11/cstdlib \ + /usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/sys/types.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/include/c++/11/bits/std_abs.h /usr/include/c++/11/cstdio \ + /usr/include/stdio.h /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/c++/11/cerrno \ + /usr/include/errno.h /usr/include/x86_64-linux-gnu/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/bits/types/error_t.h \ + /usr/include/c++/11/bits/charconv.h \ + /usr/include/c++/11/bits/functional_hash.h \ + /usr/include/c++/11/bits/basic_string.tcc \ + /usr/include/c++/11/bits/locale_classes.tcc \ + /usr/include/c++/11/system_error \ + /usr/include/x86_64-linux-gnu/c++/11/bits/error_constants.h \ + /usr/include/c++/11/stdexcept /usr/include/c++/11/streambuf \ + /usr/include/c++/11/bits/streambuf.tcc \ + /usr/include/c++/11/bits/basic_ios.h \ + /usr/include/c++/11/bits/locale_facets.h /usr/include/c++/11/cwctype \ + /usr/include/wctype.h /usr/include/x86_64-linux-gnu/bits/wctype-wchar.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_base.h \ + /usr/include/c++/11/bits/streambuf_iterator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_inline.h \ + /usr/include/c++/11/bits/locale_facets.tcc \ + /usr/include/c++/11/bits/basic_ios.tcc \ + /usr/include/c++/11/bits/ostream.tcc /usr/include/c++/11/istream \ + /usr/include/c++/11/bits/istream.tcc \ + /home/haozhihan/Documents/abacus-develop/source/source_base/constants.h \ + /usr/include/c++/11/complex /usr/include/c++/11/cmath \ + /usr/include/math.h /usr/include/x86_64-linux-gnu/bits/math-vector.h \ + /usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h \ + /usr/include/x86_64-linux-gnu/bits/flt-eval-method.h \ + /usr/include/x86_64-linux-gnu/bits/fp-logb.h \ + /usr/include/x86_64-linux-gnu/bits/fp-fast.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-narrow.h \ + /usr/include/x86_64-linux-gnu/bits/iscanonical.h \ + /usr/include/c++/11/sstream /usr/include/c++/11/bits/sstream.tcc \ + /usr/include/c++/11/math.h /usr/include/string.h /usr/include/strings.h \ + /usr/include/x86_64-linux-gnu/bits/strings_fortified.h \ + /usr/include/x86_64-linux-gnu/bits/string_fortified.h diff --git a/build/source/source_base/CMakeFiles/base.dir/para_gemm.cpp.o b/build/source/source_base/CMakeFiles/base.dir/para_gemm.cpp.o new file mode 100644 index 0000000000..7fc659d4a6 Binary files /dev/null and b/build/source/source_base/CMakeFiles/base.dir/para_gemm.cpp.o differ diff --git a/build/source/source_base/CMakeFiles/base.dir/para_gemm.cpp.o.d b/build/source/source_base/CMakeFiles/base.dir/para_gemm.cpp.o.d new file mode 100644 index 0000000000..b1dfcb7997 --- /dev/null +++ b/build/source/source_base/CMakeFiles/base.dir/para_gemm.cpp.o.d @@ -0,0 +1,236 @@ +source/source_base/CMakeFiles/base.dir/para_gemm.cpp.o: \ + /home/haozhihan/Documents/abacus-develop/source/source_base/para_gemm.cpp \ + /usr/include/stdc-predef.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/para_gemm.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_device/device.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_device/types.h \ + /usr/include/c++/11/fstream /usr/include/c++/11/istream \ + /usr/include/c++/11/ios /usr/include/c++/11/iosfwd \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++config.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/os_defines.h \ + /usr/include/features.h /usr/include/features-time64.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/cpu_defines.h \ + /usr/include/c++/11/bits/stringfwd.h \ + /usr/include/c++/11/bits/memoryfwd.h /usr/include/c++/11/bits/postypes.h \ + /usr/include/c++/11/cwchar /usr/include/wchar.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/wchar.h \ + /usr/include/x86_64-linux-gnu/bits/types/wint_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/wchar2.h \ + /usr/include/c++/11/exception /usr/include/c++/11/bits/exception.h \ + /usr/include/c++/11/bits/exception_ptr.h \ + /usr/include/c++/11/bits/exception_defines.h \ + /usr/include/c++/11/bits/cxxabi_init_exception.h \ + /usr/include/c++/11/typeinfo /usr/include/c++/11/bits/hash_bytes.h \ + /usr/include/c++/11/new /usr/include/c++/11/bits/move.h \ + /usr/include/c++/11/type_traits \ + /usr/include/c++/11/bits/nested_exception.h \ + /usr/include/c++/11/bits/char_traits.h \ + /usr/include/c++/11/bits/stl_algobase.h \ + /usr/include/c++/11/bits/functexcept.h \ + /usr/include/c++/11/bits/cpp_type_traits.h \ + /usr/include/c++/11/ext/type_traits.h \ + /usr/include/c++/11/ext/numeric_traits.h \ + /usr/include/c++/11/bits/stl_pair.h \ + /usr/include/c++/11/bits/stl_iterator_base_types.h \ + /usr/include/c++/11/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/11/bits/concept_check.h \ + /usr/include/c++/11/debug/assertions.h \ + /usr/include/c++/11/bits/stl_iterator.h \ + /usr/include/c++/11/bits/ptr_traits.h /usr/include/c++/11/debug/debug.h \ + /usr/include/c++/11/bits/predefined_ops.h /usr/include/c++/11/cstdint \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdint.h /usr/include/stdint.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-uintn.h \ + /usr/include/c++/11/bits/localefwd.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++locale.h \ + /usr/include/c++/11/clocale /usr/include/locale.h \ + /usr/include/x86_64-linux-gnu/bits/locale.h /usr/include/c++/11/cctype \ + /usr/include/ctype.h /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/c++/11/bits/ios_base.h /usr/include/c++/11/ext/atomicity.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr-default.h \ + /usr/include/pthread.h /usr/include/sched.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/sched.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h \ + /usr/include/x86_64-linux-gnu/bits/cpu-set.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/timex.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/atomic_wide_counter.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h \ + /usr/include/x86_64-linux-gnu/bits/setjmp.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct___jmp_buf_tag.h \ + /usr/include/x86_64-linux-gnu/bits/pthread_stack_min-dynamic.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/atomic_word.h \ + /usr/include/x86_64-linux-gnu/sys/single_threaded.h \ + /usr/include/c++/11/bits/locale_classes.h /usr/include/c++/11/string \ + /usr/include/c++/11/bits/allocator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++allocator.h \ + /usr/include/c++/11/ext/new_allocator.h \ + /usr/include/c++/11/bits/ostream_insert.h \ + /usr/include/c++/11/bits/cxxabi_forced.h \ + /usr/include/c++/11/bits/stl_function.h \ + /usr/include/c++/11/backward/binders.h \ + /usr/include/c++/11/bits/range_access.h \ + /usr/include/c++/11/initializer_list \ + /usr/include/c++/11/bits/basic_string.h \ + /usr/include/c++/11/ext/alloc_traits.h \ + /usr/include/c++/11/bits/alloc_traits.h \ + /usr/include/c++/11/bits/stl_construct.h \ + /usr/include/c++/11/ext/string_conversions.h /usr/include/c++/11/cstdlib \ + /usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/sys/types.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/include/c++/11/bits/std_abs.h /usr/include/c++/11/cstdio \ + /usr/include/stdio.h /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/c++/11/cerrno \ + /usr/include/errno.h /usr/include/x86_64-linux-gnu/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/bits/types/error_t.h \ + /usr/include/c++/11/bits/charconv.h \ + /usr/include/c++/11/bits/functional_hash.h \ + /usr/include/c++/11/bits/basic_string.tcc \ + /usr/include/c++/11/bits/locale_classes.tcc \ + /usr/include/c++/11/system_error \ + /usr/include/x86_64-linux-gnu/c++/11/bits/error_constants.h \ + /usr/include/c++/11/stdexcept /usr/include/c++/11/streambuf \ + /usr/include/c++/11/bits/streambuf.tcc \ + /usr/include/c++/11/bits/basic_ios.h \ + /usr/include/c++/11/bits/locale_facets.h /usr/include/c++/11/cwctype \ + /usr/include/wctype.h /usr/include/x86_64-linux-gnu/bits/wctype-wchar.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_base.h \ + /usr/include/c++/11/bits/streambuf_iterator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_inline.h \ + /usr/include/c++/11/bits/locale_facets.tcc \ + /usr/include/c++/11/bits/basic_ios.tcc /usr/include/c++/11/ostream \ + /usr/include/c++/11/bits/ostream.tcc \ + /usr/include/c++/11/bits/istream.tcc /usr/include/c++/11/bits/codecvt.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/basic_file.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++io.h \ + /usr/include/c++/11/bits/fstream.tcc \ + /usr/lib/x86_64-linux-gnu/openmpi/include/mpi.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/mpi_portable_platform.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/mpicxx.h \ + /usr/include/c++/11/map /usr/include/c++/11/bits/stl_tree.h \ + /usr/include/c++/11/ext/aligned_buffer.h \ + /usr/include/c++/11/bits/stl_map.h /usr/include/c++/11/tuple \ + /usr/include/c++/11/utility /usr/include/c++/11/bits/stl_relops.h \ + /usr/include/c++/11/array /usr/include/c++/11/bits/uses_allocator.h \ + /usr/include/c++/11/bits/invoke.h \ + /usr/include/c++/11/bits/stl_multimap.h \ + /usr/include/c++/11/bits/erase_if.h /usr/include/c++/11/iostream \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/constants.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/functions.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/datatype.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/exception.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/op.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/status.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/request.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/group.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/comm.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/win.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/file.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/errhandler.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/intracomm.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/topology.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/intercomm.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/info.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/datatype_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/functions_inln.h \ + /usr/include/string.h /usr/include/strings.h \ + /usr/include/x86_64-linux-gnu/bits/strings_fortified.h \ + /usr/include/x86_64-linux-gnu/bits/string_fortified.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/request_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/comm_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/intracomm_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/topology_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/intercomm_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/group_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/op_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/errhandler_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/status_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/info_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/win_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/file_inln.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_device/memory_op.h \ + /usr/include/c++/11/complex /usr/include/c++/11/cmath \ + /usr/include/math.h /usr/include/x86_64-linux-gnu/bits/math-vector.h \ + /usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h \ + /usr/include/x86_64-linux-gnu/bits/flt-eval-method.h \ + /usr/include/x86_64-linux-gnu/bits/fp-logb.h \ + /usr/include/x86_64-linux-gnu/bits/fp-fast.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-narrow.h \ + /usr/include/x86_64-linux-gnu/bits/iscanonical.h \ + /usr/include/c++/11/sstream /usr/include/c++/11/bits/sstream.tcc \ + /usr/include/c++/11/cstddef /usr/include/c++/11/vector \ + /usr/include/c++/11/bits/stl_uninitialized.h \ + /usr/include/c++/11/bits/stl_vector.h \ + /usr/include/c++/11/bits/stl_bvector.h \ + /usr/include/c++/11/bits/vector.tcc \ + /home/haozhihan/Documents/abacus-develop/source/source_base/kernels/math_kernel_op.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/macros.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/blas_connector.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_device/types.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/macros.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/parallel_reduce.h \ + /usr/include/c++/11/cassert /usr/include/assert.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/parallel_device.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/timer.h \ + /usr/include/c++/11/ctime /usr/include/c++/11/iomanip \ + /usr/include/c++/11/locale \ + /usr/include/c++/11/bits/locale_facets_nonio.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/time_members.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/messages_members.h \ + /usr/include/libintl.h /usr/include/c++/11/bits/locale_facets_nonio.tcc \ + /usr/include/c++/11/bits/locale_conv.h \ + /usr/include/c++/11/bits/unique_ptr.h diff --git a/build/source/source_base/CMakeFiles/base.dir/parallel_2d.cpp.o b/build/source/source_base/CMakeFiles/base.dir/parallel_2d.cpp.o new file mode 100644 index 0000000000..f782335a6d Binary files /dev/null and b/build/source/source_base/CMakeFiles/base.dir/parallel_2d.cpp.o differ diff --git a/build/source/source_base/CMakeFiles/base.dir/parallel_2d.cpp.o.d b/build/source/source_base/CMakeFiles/base.dir/parallel_2d.cpp.o.d new file mode 100644 index 0000000000..f418c5b8b5 --- /dev/null +++ b/build/source/source_base/CMakeFiles/base.dir/parallel_2d.cpp.o.d @@ -0,0 +1,217 @@ +source/source_base/CMakeFiles/base.dir/parallel_2d.cpp.o: \ + /home/haozhihan/Documents/abacus-develop/source/source_base/parallel_2d.cpp \ + /usr/include/stdc-predef.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/parallel_2d.h \ + /usr/include/c++/11/cstdint \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++config.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/os_defines.h \ + /usr/include/features.h /usr/include/features-time64.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/cpu_defines.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdint.h /usr/include/stdint.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/wchar.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-uintn.h \ + /usr/include/c++/11/vector /usr/include/c++/11/bits/stl_algobase.h \ + /usr/include/c++/11/bits/functexcept.h \ + /usr/include/c++/11/bits/exception_defines.h \ + /usr/include/c++/11/bits/cpp_type_traits.h \ + /usr/include/c++/11/ext/type_traits.h \ + /usr/include/c++/11/ext/numeric_traits.h \ + /usr/include/c++/11/bits/stl_pair.h /usr/include/c++/11/bits/move.h \ + /usr/include/c++/11/type_traits \ + /usr/include/c++/11/bits/stl_iterator_base_types.h \ + /usr/include/c++/11/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/11/bits/concept_check.h \ + /usr/include/c++/11/debug/assertions.h \ + /usr/include/c++/11/bits/stl_iterator.h \ + /usr/include/c++/11/bits/ptr_traits.h /usr/include/c++/11/debug/debug.h \ + /usr/include/c++/11/bits/predefined_ops.h \ + /usr/include/c++/11/bits/allocator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++allocator.h \ + /usr/include/c++/11/ext/new_allocator.h /usr/include/c++/11/new \ + /usr/include/c++/11/bits/exception.h \ + /usr/include/c++/11/bits/memoryfwd.h \ + /usr/include/c++/11/bits/stl_construct.h \ + /usr/include/c++/11/bits/stl_uninitialized.h \ + /usr/include/c++/11/ext/alloc_traits.h \ + /usr/include/c++/11/bits/alloc_traits.h \ + /usr/include/c++/11/bits/stl_vector.h \ + /usr/include/c++/11/initializer_list \ + /usr/include/c++/11/bits/stl_bvector.h \ + /usr/include/c++/11/bits/functional_hash.h \ + /usr/include/c++/11/bits/hash_bytes.h \ + /usr/include/c++/11/bits/range_access.h \ + /usr/include/c++/11/bits/vector.tcc \ + /home/haozhihan/Documents/abacus-develop/source/source_base/blacs_connector.h \ + /usr/include/c++/11/complex /usr/include/c++/11/cmath \ + /usr/include/math.h /usr/include/x86_64-linux-gnu/bits/math-vector.h \ + /usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h \ + /usr/include/x86_64-linux-gnu/bits/flt-eval-method.h \ + /usr/include/x86_64-linux-gnu/bits/fp-logb.h \ + /usr/include/x86_64-linux-gnu/bits/fp-fast.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-narrow.h \ + /usr/include/x86_64-linux-gnu/bits/iscanonical.h \ + /usr/include/c++/11/bits/std_abs.h /usr/include/stdlib.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h \ + /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/atomic_wide_counter.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h /usr/include/c++/11/sstream \ + /usr/include/c++/11/istream /usr/include/c++/11/ios \ + /usr/include/c++/11/iosfwd /usr/include/c++/11/bits/stringfwd.h \ + /usr/include/c++/11/bits/postypes.h /usr/include/c++/11/cwchar \ + /usr/include/wchar.h /usr/lib/gcc/x86_64-linux-gnu/11/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/types/wint_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/wchar2.h \ + /usr/include/c++/11/exception /usr/include/c++/11/bits/exception_ptr.h \ + /usr/include/c++/11/bits/cxxabi_init_exception.h \ + /usr/include/c++/11/typeinfo /usr/include/c++/11/bits/nested_exception.h \ + /usr/include/c++/11/bits/char_traits.h \ + /usr/include/c++/11/bits/localefwd.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++locale.h \ + /usr/include/c++/11/clocale /usr/include/locale.h \ + /usr/include/x86_64-linux-gnu/bits/locale.h /usr/include/c++/11/cctype \ + /usr/include/ctype.h /usr/include/c++/11/bits/ios_base.h \ + /usr/include/c++/11/ext/atomicity.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr-default.h \ + /usr/include/pthread.h /usr/include/sched.h \ + /usr/include/x86_64-linux-gnu/bits/sched.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h \ + /usr/include/x86_64-linux-gnu/bits/cpu-set.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/timex.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h \ + /usr/include/x86_64-linux-gnu/bits/setjmp.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct___jmp_buf_tag.h \ + /usr/include/x86_64-linux-gnu/bits/pthread_stack_min-dynamic.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/atomic_word.h \ + /usr/include/x86_64-linux-gnu/sys/single_threaded.h \ + /usr/include/c++/11/bits/locale_classes.h /usr/include/c++/11/string \ + /usr/include/c++/11/bits/ostream_insert.h \ + /usr/include/c++/11/bits/cxxabi_forced.h \ + /usr/include/c++/11/bits/stl_function.h \ + /usr/include/c++/11/backward/binders.h \ + /usr/include/c++/11/bits/basic_string.h \ + /usr/include/c++/11/ext/string_conversions.h /usr/include/c++/11/cstdlib \ + /usr/include/c++/11/cstdio /usr/include/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/c++/11/cerrno \ + /usr/include/errno.h /usr/include/x86_64-linux-gnu/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/bits/types/error_t.h \ + /usr/include/c++/11/bits/charconv.h \ + /usr/include/c++/11/bits/basic_string.tcc \ + /usr/include/c++/11/bits/locale_classes.tcc \ + /usr/include/c++/11/system_error \ + /usr/include/x86_64-linux-gnu/c++/11/bits/error_constants.h \ + /usr/include/c++/11/stdexcept /usr/include/c++/11/streambuf \ + /usr/include/c++/11/bits/streambuf.tcc \ + /usr/include/c++/11/bits/basic_ios.h \ + /usr/include/c++/11/bits/locale_facets.h /usr/include/c++/11/cwctype \ + /usr/include/wctype.h /usr/include/x86_64-linux-gnu/bits/wctype-wchar.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_base.h \ + /usr/include/c++/11/bits/streambuf_iterator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_inline.h \ + /usr/include/c++/11/bits/locale_facets.tcc \ + /usr/include/c++/11/bits/basic_ios.tcc /usr/include/c++/11/ostream \ + /usr/include/c++/11/bits/ostream.tcc \ + /usr/include/c++/11/bits/istream.tcc \ + /usr/include/c++/11/bits/sstream.tcc \ + /usr/lib/x86_64-linux-gnu/openmpi/include/mpi.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/mpi_portable_platform.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/mpicxx.h \ + /usr/include/c++/11/map /usr/include/c++/11/bits/stl_tree.h \ + /usr/include/c++/11/ext/aligned_buffer.h \ + /usr/include/c++/11/bits/stl_map.h /usr/include/c++/11/tuple \ + /usr/include/c++/11/utility /usr/include/c++/11/bits/stl_relops.h \ + /usr/include/c++/11/array /usr/include/c++/11/bits/uses_allocator.h \ + /usr/include/c++/11/bits/invoke.h \ + /usr/include/c++/11/bits/stl_multimap.h \ + /usr/include/c++/11/bits/erase_if.h /usr/include/c++/11/iostream \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/constants.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/functions.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/datatype.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/exception.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/op.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/status.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/request.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/group.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/comm.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/win.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/file.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/errhandler.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/intracomm.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/topology.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/intercomm.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/info.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/datatype_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/functions_inln.h \ + /usr/include/string.h /usr/include/strings.h \ + /usr/include/x86_64-linux-gnu/bits/strings_fortified.h \ + /usr/include/x86_64-linux-gnu/bits/string_fortified.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/request_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/comm_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/intracomm_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/topology_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/intercomm_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/group_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/op_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/errhandler_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/status_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/info_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/win_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/file_inln.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/scalapack_connector.h \ + /usr/include/c++/11/cassert /usr/include/assert.h \ + /usr/include/c++/11/numeric /usr/include/c++/11/bits/stl_numeric.h diff --git a/build/source/source_base/CMakeFiles/base.dir/parallel_comm.cpp.o b/build/source/source_base/CMakeFiles/base.dir/parallel_comm.cpp.o new file mode 100644 index 0000000000..198b26cd5e Binary files /dev/null and b/build/source/source_base/CMakeFiles/base.dir/parallel_comm.cpp.o differ diff --git a/build/source/source_base/CMakeFiles/base.dir/parallel_comm.cpp.o.d b/build/source/source_base/CMakeFiles/base.dir/parallel_comm.cpp.o.d new file mode 100644 index 0000000000..5acf3eb1fc --- /dev/null +++ b/build/source/source_base/CMakeFiles/base.dir/parallel_comm.cpp.o.d @@ -0,0 +1,208 @@ +source/source_base/CMakeFiles/base.dir/parallel_comm.cpp.o: \ + /home/haozhihan/Documents/abacus-develop/source/source_base/parallel_comm.cpp \ + /usr/include/stdc-predef.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/mpi.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/mpi_portable_platform.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/mpicxx.h \ + /usr/include/c++/11/map /usr/include/c++/11/bits/stl_tree.h \ + /usr/include/c++/11/bits/stl_algobase.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++config.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/os_defines.h \ + /usr/include/features.h /usr/include/features-time64.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/cpu_defines.h \ + /usr/include/c++/11/bits/functexcept.h \ + /usr/include/c++/11/bits/exception_defines.h \ + /usr/include/c++/11/bits/cpp_type_traits.h \ + /usr/include/c++/11/ext/type_traits.h \ + /usr/include/c++/11/ext/numeric_traits.h \ + /usr/include/c++/11/bits/stl_pair.h /usr/include/c++/11/bits/move.h \ + /usr/include/c++/11/type_traits \ + /usr/include/c++/11/bits/stl_iterator_base_types.h \ + /usr/include/c++/11/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/11/bits/concept_check.h \ + /usr/include/c++/11/debug/assertions.h \ + /usr/include/c++/11/bits/stl_iterator.h \ + /usr/include/c++/11/bits/ptr_traits.h /usr/include/c++/11/debug/debug.h \ + /usr/include/c++/11/bits/predefined_ops.h \ + /usr/include/c++/11/bits/allocator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++allocator.h \ + /usr/include/c++/11/ext/new_allocator.h /usr/include/c++/11/new \ + /usr/include/c++/11/bits/exception.h \ + /usr/include/c++/11/bits/memoryfwd.h \ + /usr/include/c++/11/bits/stl_function.h \ + /usr/include/c++/11/backward/binders.h \ + /usr/include/c++/11/ext/alloc_traits.h \ + /usr/include/c++/11/bits/alloc_traits.h \ + /usr/include/c++/11/bits/stl_construct.h \ + /usr/include/c++/11/ext/aligned_buffer.h \ + /usr/include/c++/11/bits/stl_map.h /usr/include/c++/11/initializer_list \ + /usr/include/c++/11/tuple /usr/include/c++/11/utility \ + /usr/include/c++/11/bits/stl_relops.h /usr/include/c++/11/array \ + /usr/include/c++/11/bits/range_access.h \ + /usr/include/c++/11/bits/uses_allocator.h \ + /usr/include/c++/11/bits/invoke.h \ + /usr/include/c++/11/bits/stl_multimap.h \ + /usr/include/c++/11/bits/erase_if.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdarg.h /usr/include/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/c++/11/iostream \ + /usr/include/c++/11/ostream /usr/include/c++/11/ios \ + /usr/include/c++/11/iosfwd /usr/include/c++/11/bits/stringfwd.h \ + /usr/include/c++/11/bits/postypes.h /usr/include/c++/11/cwchar \ + /usr/include/wchar.h /usr/include/x86_64-linux-gnu/bits/wchar.h \ + /usr/include/x86_64-linux-gnu/bits/types/wint_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/wchar2.h \ + /usr/include/c++/11/exception /usr/include/c++/11/bits/exception_ptr.h \ + /usr/include/c++/11/bits/cxxabi_init_exception.h \ + /usr/include/c++/11/typeinfo /usr/include/c++/11/bits/hash_bytes.h \ + /usr/include/c++/11/bits/nested_exception.h \ + /usr/include/c++/11/bits/char_traits.h /usr/include/c++/11/cstdint \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdint.h /usr/include/stdint.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-uintn.h \ + /usr/include/c++/11/bits/localefwd.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++locale.h \ + /usr/include/c++/11/clocale /usr/include/locale.h \ + /usr/include/x86_64-linux-gnu/bits/locale.h /usr/include/c++/11/cctype \ + /usr/include/ctype.h /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/c++/11/bits/ios_base.h /usr/include/c++/11/ext/atomicity.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr-default.h \ + /usr/include/pthread.h /usr/include/sched.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/sched.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h \ + /usr/include/x86_64-linux-gnu/bits/cpu-set.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/timex.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/atomic_wide_counter.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h \ + /usr/include/x86_64-linux-gnu/bits/setjmp.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct___jmp_buf_tag.h \ + /usr/include/x86_64-linux-gnu/bits/pthread_stack_min-dynamic.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/atomic_word.h \ + /usr/include/x86_64-linux-gnu/sys/single_threaded.h \ + /usr/include/c++/11/bits/locale_classes.h /usr/include/c++/11/string \ + /usr/include/c++/11/bits/ostream_insert.h \ + /usr/include/c++/11/bits/cxxabi_forced.h \ + /usr/include/c++/11/bits/basic_string.h \ + /usr/include/c++/11/ext/string_conversions.h /usr/include/c++/11/cstdlib \ + /usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/sys/types.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/include/c++/11/bits/std_abs.h /usr/include/c++/11/cstdio \ + /usr/include/c++/11/cerrno /usr/include/errno.h \ + /usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \ + /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/bits/types/error_t.h \ + /usr/include/c++/11/bits/charconv.h \ + /usr/include/c++/11/bits/functional_hash.h \ + /usr/include/c++/11/bits/basic_string.tcc \ + /usr/include/c++/11/bits/locale_classes.tcc \ + /usr/include/c++/11/system_error \ + /usr/include/x86_64-linux-gnu/c++/11/bits/error_constants.h \ + /usr/include/c++/11/stdexcept /usr/include/c++/11/streambuf \ + /usr/include/c++/11/bits/streambuf.tcc \ + /usr/include/c++/11/bits/basic_ios.h \ + /usr/include/c++/11/bits/locale_facets.h /usr/include/c++/11/cwctype \ + /usr/include/wctype.h /usr/include/x86_64-linux-gnu/bits/wctype-wchar.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_base.h \ + /usr/include/c++/11/bits/streambuf_iterator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_inline.h \ + /usr/include/c++/11/bits/locale_facets.tcc \ + /usr/include/c++/11/bits/basic_ios.tcc \ + /usr/include/c++/11/bits/ostream.tcc /usr/include/c++/11/istream \ + /usr/include/c++/11/bits/istream.tcc \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/constants.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/functions.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/datatype.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/exception.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/op.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/status.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/request.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/group.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/comm.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/win.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/file.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/errhandler.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/intracomm.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/topology.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/intercomm.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/info.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/datatype_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/functions_inln.h \ + /usr/include/string.h /usr/include/strings.h \ + /usr/include/x86_64-linux-gnu/bits/strings_fortified.h \ + /usr/include/x86_64-linux-gnu/bits/string_fortified.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/request_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/comm_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/intracomm_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/topology_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/intercomm_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/group_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/op_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/errhandler_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/status_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/info_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/win_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/file_inln.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/parallel_global.h \ + /usr/include/c++/11/complex /usr/include/c++/11/cmath \ + /usr/include/math.h /usr/include/x86_64-linux-gnu/bits/math-vector.h \ + /usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h \ + /usr/include/x86_64-linux-gnu/bits/flt-eval-method.h \ + /usr/include/x86_64-linux-gnu/bits/fp-logb.h \ + /usr/include/x86_64-linux-gnu/bits/fp-fast.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-narrow.h \ + /usr/include/x86_64-linux-gnu/bits/iscanonical.h \ + /usr/include/c++/11/sstream /usr/include/c++/11/bits/sstream.tcc \ + /home/haozhihan/Documents/abacus-develop/source/source_base/parallel_comm.h diff --git a/build/source/source_base/CMakeFiles/base.dir/parallel_common.cpp.o b/build/source/source_base/CMakeFiles/base.dir/parallel_common.cpp.o new file mode 100644 index 0000000000..5b16fcf33d Binary files /dev/null and b/build/source/source_base/CMakeFiles/base.dir/parallel_common.cpp.o differ diff --git a/build/source/source_base/CMakeFiles/base.dir/parallel_common.cpp.o.d b/build/source/source_base/CMakeFiles/base.dir/parallel_common.cpp.o.d new file mode 100644 index 0000000000..9b3feefde8 --- /dev/null +++ b/build/source/source_base/CMakeFiles/base.dir/parallel_common.cpp.o.d @@ -0,0 +1,208 @@ +source/source_base/CMakeFiles/base.dir/parallel_common.cpp.o: \ + /home/haozhihan/Documents/abacus-develop/source/source_base/parallel_common.cpp \ + /usr/include/stdc-predef.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/parallel_common.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/mpi.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/mpi_portable_platform.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/mpicxx.h \ + /usr/include/c++/11/map /usr/include/c++/11/bits/stl_tree.h \ + /usr/include/c++/11/bits/stl_algobase.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++config.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/os_defines.h \ + /usr/include/features.h /usr/include/features-time64.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/cpu_defines.h \ + /usr/include/c++/11/bits/functexcept.h \ + /usr/include/c++/11/bits/exception_defines.h \ + /usr/include/c++/11/bits/cpp_type_traits.h \ + /usr/include/c++/11/ext/type_traits.h \ + /usr/include/c++/11/ext/numeric_traits.h \ + /usr/include/c++/11/bits/stl_pair.h /usr/include/c++/11/bits/move.h \ + /usr/include/c++/11/type_traits \ + /usr/include/c++/11/bits/stl_iterator_base_types.h \ + /usr/include/c++/11/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/11/bits/concept_check.h \ + /usr/include/c++/11/debug/assertions.h \ + /usr/include/c++/11/bits/stl_iterator.h \ + /usr/include/c++/11/bits/ptr_traits.h /usr/include/c++/11/debug/debug.h \ + /usr/include/c++/11/bits/predefined_ops.h \ + /usr/include/c++/11/bits/allocator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++allocator.h \ + /usr/include/c++/11/ext/new_allocator.h /usr/include/c++/11/new \ + /usr/include/c++/11/bits/exception.h \ + /usr/include/c++/11/bits/memoryfwd.h \ + /usr/include/c++/11/bits/stl_function.h \ + /usr/include/c++/11/backward/binders.h \ + /usr/include/c++/11/ext/alloc_traits.h \ + /usr/include/c++/11/bits/alloc_traits.h \ + /usr/include/c++/11/bits/stl_construct.h \ + /usr/include/c++/11/ext/aligned_buffer.h \ + /usr/include/c++/11/bits/stl_map.h /usr/include/c++/11/initializer_list \ + /usr/include/c++/11/tuple /usr/include/c++/11/utility \ + /usr/include/c++/11/bits/stl_relops.h /usr/include/c++/11/array \ + /usr/include/c++/11/bits/range_access.h \ + /usr/include/c++/11/bits/uses_allocator.h \ + /usr/include/c++/11/bits/invoke.h \ + /usr/include/c++/11/bits/stl_multimap.h \ + /usr/include/c++/11/bits/erase_if.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdarg.h /usr/include/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/c++/11/iostream \ + /usr/include/c++/11/ostream /usr/include/c++/11/ios \ + /usr/include/c++/11/iosfwd /usr/include/c++/11/bits/stringfwd.h \ + /usr/include/c++/11/bits/postypes.h /usr/include/c++/11/cwchar \ + /usr/include/wchar.h /usr/include/x86_64-linux-gnu/bits/wchar.h \ + /usr/include/x86_64-linux-gnu/bits/types/wint_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/wchar2.h \ + /usr/include/c++/11/exception /usr/include/c++/11/bits/exception_ptr.h \ + /usr/include/c++/11/bits/cxxabi_init_exception.h \ + /usr/include/c++/11/typeinfo /usr/include/c++/11/bits/hash_bytes.h \ + /usr/include/c++/11/bits/nested_exception.h \ + /usr/include/c++/11/bits/char_traits.h /usr/include/c++/11/cstdint \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdint.h /usr/include/stdint.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-uintn.h \ + /usr/include/c++/11/bits/localefwd.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++locale.h \ + /usr/include/c++/11/clocale /usr/include/locale.h \ + /usr/include/x86_64-linux-gnu/bits/locale.h /usr/include/c++/11/cctype \ + /usr/include/ctype.h /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/c++/11/bits/ios_base.h /usr/include/c++/11/ext/atomicity.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr-default.h \ + /usr/include/pthread.h /usr/include/sched.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/sched.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h \ + /usr/include/x86_64-linux-gnu/bits/cpu-set.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/timex.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/atomic_wide_counter.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h \ + /usr/include/x86_64-linux-gnu/bits/setjmp.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct___jmp_buf_tag.h \ + /usr/include/x86_64-linux-gnu/bits/pthread_stack_min-dynamic.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/atomic_word.h \ + /usr/include/x86_64-linux-gnu/sys/single_threaded.h \ + /usr/include/c++/11/bits/locale_classes.h /usr/include/c++/11/string \ + /usr/include/c++/11/bits/ostream_insert.h \ + /usr/include/c++/11/bits/cxxabi_forced.h \ + /usr/include/c++/11/bits/basic_string.h \ + /usr/include/c++/11/ext/string_conversions.h /usr/include/c++/11/cstdlib \ + /usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/sys/types.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/include/c++/11/bits/std_abs.h /usr/include/c++/11/cstdio \ + /usr/include/c++/11/cerrno /usr/include/errno.h \ + /usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \ + /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/bits/types/error_t.h \ + /usr/include/c++/11/bits/charconv.h \ + /usr/include/c++/11/bits/functional_hash.h \ + /usr/include/c++/11/bits/basic_string.tcc \ + /usr/include/c++/11/bits/locale_classes.tcc \ + /usr/include/c++/11/system_error \ + /usr/include/x86_64-linux-gnu/c++/11/bits/error_constants.h \ + /usr/include/c++/11/stdexcept /usr/include/c++/11/streambuf \ + /usr/include/c++/11/bits/streambuf.tcc \ + /usr/include/c++/11/bits/basic_ios.h \ + /usr/include/c++/11/bits/locale_facets.h /usr/include/c++/11/cwctype \ + /usr/include/wctype.h /usr/include/x86_64-linux-gnu/bits/wctype-wchar.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_base.h \ + /usr/include/c++/11/bits/streambuf_iterator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_inline.h \ + /usr/include/c++/11/bits/locale_facets.tcc \ + /usr/include/c++/11/bits/basic_ios.tcc \ + /usr/include/c++/11/bits/ostream.tcc /usr/include/c++/11/istream \ + /usr/include/c++/11/bits/istream.tcc \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/constants.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/functions.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/datatype.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/exception.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/op.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/status.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/request.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/group.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/comm.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/win.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/file.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/errhandler.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/intracomm.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/topology.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/intercomm.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/info.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/datatype_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/functions_inln.h \ + /usr/include/string.h /usr/include/strings.h \ + /usr/include/x86_64-linux-gnu/bits/strings_fortified.h \ + /usr/include/x86_64-linux-gnu/bits/string_fortified.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/request_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/comm_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/intracomm_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/topology_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/intercomm_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/group_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/op_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/errhandler_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/status_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/info_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/win_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/file_inln.h \ + /usr/include/c++/11/complex /usr/include/c++/11/cmath \ + /usr/include/math.h /usr/include/x86_64-linux-gnu/bits/math-vector.h \ + /usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h \ + /usr/include/x86_64-linux-gnu/bits/flt-eval-method.h \ + /usr/include/x86_64-linux-gnu/bits/fp-logb.h \ + /usr/include/x86_64-linux-gnu/bits/fp-fast.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-narrow.h \ + /usr/include/x86_64-linux-gnu/bits/iscanonical.h \ + /usr/include/c++/11/sstream /usr/include/c++/11/bits/sstream.tcc \ + /usr/include/c++/11/cstring diff --git a/build/source/source_base/CMakeFiles/base.dir/parallel_device.cpp.o b/build/source/source_base/CMakeFiles/base.dir/parallel_device.cpp.o new file mode 100644 index 0000000000..e9b0ebb1cb Binary files /dev/null and b/build/source/source_base/CMakeFiles/base.dir/parallel_device.cpp.o differ diff --git a/build/source/source_base/CMakeFiles/base.dir/parallel_device.cpp.o.d b/build/source/source_base/CMakeFiles/base.dir/parallel_device.cpp.o.d new file mode 100644 index 0000000000..0e85daa733 --- /dev/null +++ b/build/source/source_base/CMakeFiles/base.dir/parallel_device.cpp.o.d @@ -0,0 +1,215 @@ +source/source_base/CMakeFiles/base.dir/parallel_device.cpp.o: \ + /home/haozhihan/Documents/abacus-develop/source/source_base/parallel_device.cpp \ + /usr/include/stdc-predef.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/parallel_device.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/mpi.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/mpi_portable_platform.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/mpicxx.h \ + /usr/include/c++/11/map /usr/include/c++/11/bits/stl_tree.h \ + /usr/include/c++/11/bits/stl_algobase.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++config.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/os_defines.h \ + /usr/include/features.h /usr/include/features-time64.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/cpu_defines.h \ + /usr/include/c++/11/bits/functexcept.h \ + /usr/include/c++/11/bits/exception_defines.h \ + /usr/include/c++/11/bits/cpp_type_traits.h \ + /usr/include/c++/11/ext/type_traits.h \ + /usr/include/c++/11/ext/numeric_traits.h \ + /usr/include/c++/11/bits/stl_pair.h /usr/include/c++/11/bits/move.h \ + /usr/include/c++/11/type_traits \ + /usr/include/c++/11/bits/stl_iterator_base_types.h \ + /usr/include/c++/11/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/11/bits/concept_check.h \ + /usr/include/c++/11/debug/assertions.h \ + /usr/include/c++/11/bits/stl_iterator.h \ + /usr/include/c++/11/bits/ptr_traits.h /usr/include/c++/11/debug/debug.h \ + /usr/include/c++/11/bits/predefined_ops.h \ + /usr/include/c++/11/bits/allocator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++allocator.h \ + /usr/include/c++/11/ext/new_allocator.h /usr/include/c++/11/new \ + /usr/include/c++/11/bits/exception.h \ + /usr/include/c++/11/bits/memoryfwd.h \ + /usr/include/c++/11/bits/stl_function.h \ + /usr/include/c++/11/backward/binders.h \ + /usr/include/c++/11/ext/alloc_traits.h \ + /usr/include/c++/11/bits/alloc_traits.h \ + /usr/include/c++/11/bits/stl_construct.h \ + /usr/include/c++/11/ext/aligned_buffer.h \ + /usr/include/c++/11/bits/stl_map.h /usr/include/c++/11/initializer_list \ + /usr/include/c++/11/tuple /usr/include/c++/11/utility \ + /usr/include/c++/11/bits/stl_relops.h /usr/include/c++/11/array \ + /usr/include/c++/11/bits/range_access.h \ + /usr/include/c++/11/bits/uses_allocator.h \ + /usr/include/c++/11/bits/invoke.h \ + /usr/include/c++/11/bits/stl_multimap.h \ + /usr/include/c++/11/bits/erase_if.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdarg.h /usr/include/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/c++/11/iostream \ + /usr/include/c++/11/ostream /usr/include/c++/11/ios \ + /usr/include/c++/11/iosfwd /usr/include/c++/11/bits/stringfwd.h \ + /usr/include/c++/11/bits/postypes.h /usr/include/c++/11/cwchar \ + /usr/include/wchar.h /usr/include/x86_64-linux-gnu/bits/wchar.h \ + /usr/include/x86_64-linux-gnu/bits/types/wint_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/wchar2.h \ + /usr/include/c++/11/exception /usr/include/c++/11/bits/exception_ptr.h \ + /usr/include/c++/11/bits/cxxabi_init_exception.h \ + /usr/include/c++/11/typeinfo /usr/include/c++/11/bits/hash_bytes.h \ + /usr/include/c++/11/bits/nested_exception.h \ + /usr/include/c++/11/bits/char_traits.h /usr/include/c++/11/cstdint \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdint.h /usr/include/stdint.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-uintn.h \ + /usr/include/c++/11/bits/localefwd.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++locale.h \ + /usr/include/c++/11/clocale /usr/include/locale.h \ + /usr/include/x86_64-linux-gnu/bits/locale.h /usr/include/c++/11/cctype \ + /usr/include/ctype.h /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/c++/11/bits/ios_base.h /usr/include/c++/11/ext/atomicity.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr-default.h \ + /usr/include/pthread.h /usr/include/sched.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/sched.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h \ + /usr/include/x86_64-linux-gnu/bits/cpu-set.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/timex.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/atomic_wide_counter.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h \ + /usr/include/x86_64-linux-gnu/bits/setjmp.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct___jmp_buf_tag.h \ + /usr/include/x86_64-linux-gnu/bits/pthread_stack_min-dynamic.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/atomic_word.h \ + /usr/include/x86_64-linux-gnu/sys/single_threaded.h \ + /usr/include/c++/11/bits/locale_classes.h /usr/include/c++/11/string \ + /usr/include/c++/11/bits/ostream_insert.h \ + /usr/include/c++/11/bits/cxxabi_forced.h \ + /usr/include/c++/11/bits/basic_string.h \ + /usr/include/c++/11/ext/string_conversions.h /usr/include/c++/11/cstdlib \ + /usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/sys/types.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/include/c++/11/bits/std_abs.h /usr/include/c++/11/cstdio \ + /usr/include/c++/11/cerrno /usr/include/errno.h \ + /usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \ + /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/bits/types/error_t.h \ + /usr/include/c++/11/bits/charconv.h \ + /usr/include/c++/11/bits/functional_hash.h \ + /usr/include/c++/11/bits/basic_string.tcc \ + /usr/include/c++/11/bits/locale_classes.tcc \ + /usr/include/c++/11/system_error \ + /usr/include/x86_64-linux-gnu/c++/11/bits/error_constants.h \ + /usr/include/c++/11/stdexcept /usr/include/c++/11/streambuf \ + /usr/include/c++/11/bits/streambuf.tcc \ + /usr/include/c++/11/bits/basic_ios.h \ + /usr/include/c++/11/bits/locale_facets.h /usr/include/c++/11/cwctype \ + /usr/include/wctype.h /usr/include/x86_64-linux-gnu/bits/wctype-wchar.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_base.h \ + /usr/include/c++/11/bits/streambuf_iterator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_inline.h \ + /usr/include/c++/11/bits/locale_facets.tcc \ + /usr/include/c++/11/bits/basic_ios.tcc \ + /usr/include/c++/11/bits/ostream.tcc /usr/include/c++/11/istream \ + /usr/include/c++/11/bits/istream.tcc \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/constants.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/functions.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/datatype.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/exception.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/op.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/status.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/request.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/group.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/comm.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/win.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/file.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/errhandler.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/intracomm.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/topology.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/intercomm.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/info.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/datatype_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/functions_inln.h \ + /usr/include/string.h /usr/include/strings.h \ + /usr/include/x86_64-linux-gnu/bits/strings_fortified.h \ + /usr/include/x86_64-linux-gnu/bits/string_fortified.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/request_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/comm_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/intracomm_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/topology_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/intercomm_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/group_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/op_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/errhandler_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/status_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/info_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/win_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/file_inln.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_device/device.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_device/types.h \ + /usr/include/c++/11/fstream /usr/include/c++/11/bits/codecvt.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/basic_file.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++io.h \ + /usr/include/c++/11/bits/fstream.tcc \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_device/memory_op.h \ + /usr/include/c++/11/complex /usr/include/c++/11/cmath \ + /usr/include/math.h /usr/include/x86_64-linux-gnu/bits/math-vector.h \ + /usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h \ + /usr/include/x86_64-linux-gnu/bits/flt-eval-method.h \ + /usr/include/x86_64-linux-gnu/bits/fp-logb.h \ + /usr/include/x86_64-linux-gnu/bits/fp-fast.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-narrow.h \ + /usr/include/x86_64-linux-gnu/bits/iscanonical.h \ + /usr/include/c++/11/sstream /usr/include/c++/11/bits/sstream.tcc \ + /usr/include/c++/11/cstddef diff --git a/build/source/source_base/CMakeFiles/base.dir/parallel_global.cpp.o b/build/source/source_base/CMakeFiles/base.dir/parallel_global.cpp.o new file mode 100644 index 0000000000..86f1acbd46 Binary files /dev/null and b/build/source/source_base/CMakeFiles/base.dir/parallel_global.cpp.o differ diff --git a/build/source/source_base/CMakeFiles/base.dir/parallel_global.cpp.o.d b/build/source/source_base/CMakeFiles/base.dir/parallel_global.cpp.o.d new file mode 100644 index 0000000000..125a8b10ad --- /dev/null +++ b/build/source/source_base/CMakeFiles/base.dir/parallel_global.cpp.o.d @@ -0,0 +1,267 @@ +source/source_base/CMakeFiles/base.dir/parallel_global.cpp.o: \ + /home/haozhihan/Documents/abacus-develop/source/source_base/parallel_global.cpp \ + /usr/include/stdc-predef.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/parallel_global.h \ + /usr/include/c++/11/complex \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++config.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/os_defines.h \ + /usr/include/features.h /usr/include/features-time64.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/cpu_defines.h \ + /usr/include/c++/11/bits/cpp_type_traits.h \ + /usr/include/c++/11/ext/type_traits.h /usr/include/c++/11/cmath \ + /usr/include/math.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/math-vector.h \ + /usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h \ + /usr/include/x86_64-linux-gnu/bits/flt-eval-method.h \ + /usr/include/x86_64-linux-gnu/bits/fp-logb.h \ + /usr/include/x86_64-linux-gnu/bits/fp-fast.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-narrow.h \ + /usr/include/x86_64-linux-gnu/bits/iscanonical.h \ + /usr/include/c++/11/bits/std_abs.h /usr/include/stdlib.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h \ + /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/atomic_wide_counter.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h /usr/include/c++/11/sstream \ + /usr/include/c++/11/istream /usr/include/c++/11/ios \ + /usr/include/c++/11/iosfwd /usr/include/c++/11/bits/stringfwd.h \ + /usr/include/c++/11/bits/memoryfwd.h /usr/include/c++/11/bits/postypes.h \ + /usr/include/c++/11/cwchar /usr/include/wchar.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/wchar.h \ + /usr/include/x86_64-linux-gnu/bits/types/wint_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/wchar2.h \ + /usr/include/c++/11/exception /usr/include/c++/11/bits/exception.h \ + /usr/include/c++/11/bits/exception_ptr.h \ + /usr/include/c++/11/bits/exception_defines.h \ + /usr/include/c++/11/bits/cxxabi_init_exception.h \ + /usr/include/c++/11/typeinfo /usr/include/c++/11/bits/hash_bytes.h \ + /usr/include/c++/11/new /usr/include/c++/11/bits/move.h \ + /usr/include/c++/11/type_traits \ + /usr/include/c++/11/bits/nested_exception.h \ + /usr/include/c++/11/bits/char_traits.h \ + /usr/include/c++/11/bits/stl_algobase.h \ + /usr/include/c++/11/bits/functexcept.h \ + /usr/include/c++/11/ext/numeric_traits.h \ + /usr/include/c++/11/bits/stl_pair.h \ + /usr/include/c++/11/bits/stl_iterator_base_types.h \ + /usr/include/c++/11/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/11/bits/concept_check.h \ + /usr/include/c++/11/debug/assertions.h \ + /usr/include/c++/11/bits/stl_iterator.h \ + /usr/include/c++/11/bits/ptr_traits.h /usr/include/c++/11/debug/debug.h \ + /usr/include/c++/11/bits/predefined_ops.h /usr/include/c++/11/cstdint \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdint.h /usr/include/stdint.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-uintn.h \ + /usr/include/c++/11/bits/localefwd.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++locale.h \ + /usr/include/c++/11/clocale /usr/include/locale.h \ + /usr/include/x86_64-linux-gnu/bits/locale.h /usr/include/c++/11/cctype \ + /usr/include/ctype.h /usr/include/c++/11/bits/ios_base.h \ + /usr/include/c++/11/ext/atomicity.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr-default.h \ + /usr/include/pthread.h /usr/include/sched.h \ + /usr/include/x86_64-linux-gnu/bits/sched.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h \ + /usr/include/x86_64-linux-gnu/bits/cpu-set.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/timex.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h \ + /usr/include/x86_64-linux-gnu/bits/setjmp.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct___jmp_buf_tag.h \ + /usr/include/x86_64-linux-gnu/bits/pthread_stack_min-dynamic.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/atomic_word.h \ + /usr/include/x86_64-linux-gnu/sys/single_threaded.h \ + /usr/include/c++/11/bits/locale_classes.h /usr/include/c++/11/string \ + /usr/include/c++/11/bits/allocator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++allocator.h \ + /usr/include/c++/11/ext/new_allocator.h \ + /usr/include/c++/11/bits/ostream_insert.h \ + /usr/include/c++/11/bits/cxxabi_forced.h \ + /usr/include/c++/11/bits/stl_function.h \ + /usr/include/c++/11/backward/binders.h \ + /usr/include/c++/11/bits/range_access.h \ + /usr/include/c++/11/initializer_list \ + /usr/include/c++/11/bits/basic_string.h \ + /usr/include/c++/11/ext/alloc_traits.h \ + /usr/include/c++/11/bits/alloc_traits.h \ + /usr/include/c++/11/bits/stl_construct.h \ + /usr/include/c++/11/ext/string_conversions.h /usr/include/c++/11/cstdlib \ + /usr/include/c++/11/cstdio /usr/include/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/c++/11/cerrno \ + /usr/include/errno.h /usr/include/x86_64-linux-gnu/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/bits/types/error_t.h \ + /usr/include/c++/11/bits/charconv.h \ + /usr/include/c++/11/bits/functional_hash.h \ + /usr/include/c++/11/bits/basic_string.tcc \ + /usr/include/c++/11/bits/locale_classes.tcc \ + /usr/include/c++/11/system_error \ + /usr/include/x86_64-linux-gnu/c++/11/bits/error_constants.h \ + /usr/include/c++/11/stdexcept /usr/include/c++/11/streambuf \ + /usr/include/c++/11/bits/streambuf.tcc \ + /usr/include/c++/11/bits/basic_ios.h \ + /usr/include/c++/11/bits/locale_facets.h /usr/include/c++/11/cwctype \ + /usr/include/wctype.h /usr/include/x86_64-linux-gnu/bits/wctype-wchar.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_base.h \ + /usr/include/c++/11/bits/streambuf_iterator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_inline.h \ + /usr/include/c++/11/bits/locale_facets.tcc \ + /usr/include/c++/11/bits/basic_ios.tcc /usr/include/c++/11/ostream \ + /usr/include/c++/11/bits/ostream.tcc \ + /usr/include/c++/11/bits/istream.tcc \ + /usr/include/c++/11/bits/sstream.tcc \ + /home/haozhihan/Documents/abacus-develop/source/source_base/parallel_comm.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/mpi.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/mpi_portable_platform.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/mpicxx.h \ + /usr/include/c++/11/map /usr/include/c++/11/bits/stl_tree.h \ + /usr/include/c++/11/ext/aligned_buffer.h \ + /usr/include/c++/11/bits/stl_map.h /usr/include/c++/11/tuple \ + /usr/include/c++/11/utility /usr/include/c++/11/bits/stl_relops.h \ + /usr/include/c++/11/array /usr/include/c++/11/bits/uses_allocator.h \ + /usr/include/c++/11/bits/invoke.h \ + /usr/include/c++/11/bits/stl_multimap.h \ + /usr/include/c++/11/bits/erase_if.h /usr/include/c++/11/iostream \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/constants.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/functions.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/datatype.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/exception.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/op.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/status.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/request.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/group.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/comm.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/win.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/file.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/errhandler.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/intracomm.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/topology.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/intercomm.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/info.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/datatype_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/functions_inln.h \ + /usr/include/string.h /usr/include/strings.h \ + /usr/include/x86_64-linux-gnu/bits/strings_fortified.h \ + /usr/include/x86_64-linux-gnu/bits/string_fortified.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/request_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/comm_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/intracomm_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/topology_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/intercomm_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/group_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/op_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/errhandler_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/status_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/info_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/win_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/file_inln.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/omp.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/global_function.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/blas_connector.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_device/types.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/macros.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/global_function-func_each_2.h \ + /usr/include/c++/11/functional /usr/include/c++/11/bits/refwrap.h \ + /usr/include/c++/11/bits/std_function.h /usr/include/c++/11/vector \ + /usr/include/c++/11/bits/stl_uninitialized.h \ + /usr/include/c++/11/bits/stl_vector.h \ + /usr/include/c++/11/bits/stl_bvector.h \ + /usr/include/c++/11/bits/vector.tcc \ + /home/haozhihan/Documents/abacus-develop/source/source_base/global_variable.h \ + /usr/include/c++/11/fstream /usr/include/c++/11/bits/codecvt.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/basic_file.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++io.h \ + /usr/include/c++/11/bits/fstream.tcc /usr/include/c++/11/iomanip \ + /usr/include/c++/11/locale \ + /usr/include/c++/11/bits/locale_facets_nonio.h /usr/include/c++/11/ctime \ + /usr/include/x86_64-linux-gnu/c++/11/bits/time_members.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/messages_members.h \ + /usr/include/libintl.h /usr/include/c++/11/bits/locale_facets_nonio.tcc \ + /usr/include/c++/11/bits/locale_conv.h \ + /usr/include/c++/11/bits/unique_ptr.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/tool_check.h \ + /usr/include/c++/11/cassert /usr/include/assert.h \ + /usr/include/c++/11/valarray /usr/include/c++/11/algorithm \ + /usr/include/c++/11/bits/stl_algo.h \ + /usr/include/c++/11/bits/algorithmfwd.h \ + /usr/include/c++/11/bits/stl_heap.h \ + /usr/include/c++/11/bits/stl_tempbuf.h \ + /usr/include/c++/11/bits/uniform_int_dist.h \ + /usr/include/c++/11/bits/valarray_array.h \ + /usr/include/c++/11/bits/valarray_array.tcc \ + /usr/include/c++/11/bits/valarray_before.h \ + /usr/include/c++/11/bits/slice_array.h \ + /usr/include/c++/11/bits/valarray_after.h \ + /usr/include/c++/11/bits/gslice.h \ + /usr/include/c++/11/bits/gslice_array.h \ + /usr/include/c++/11/bits/mask_array.h \ + /usr/include/c++/11/bits/indirect_array.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/tool_quit.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/tool_title.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/parallel_common.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/parallel_reduce.h \ + /home/haozhihan/Documents/abacus-develop/source/module_parameter/parameter.h \ + /home/haozhihan/Documents/abacus-develop/source/module_parameter/input_parameter.h \ + /home/haozhihan/Documents/abacus-develop/source/module_parameter/md_parameter.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/vector3.h \ + /home/haozhihan/Documents/abacus-develop/source/module_parameter/system_parameter.h \ + /home/haozhihan/Documents/abacus-develop/source/source_main/version.h \ + /usr/include/c++/11/thread /usr/include/c++/11/bits/std_thread.h \ + /usr/include/c++/11/bits/this_thread_sleep.h /usr/include/c++/11/chrono \ + /usr/include/c++/11/ratio /usr/include/c++/11/limits \ + /usr/include/c++/11/bits/parse_numbers.h \ + /home/haozhihan/Documents/abacus-develop/build/commit.h diff --git a/build/source/source_base/CMakeFiles/base.dir/parallel_reduce.cpp.o b/build/source/source_base/CMakeFiles/base.dir/parallel_reduce.cpp.o new file mode 100644 index 0000000000..a9469ca086 Binary files /dev/null and b/build/source/source_base/CMakeFiles/base.dir/parallel_reduce.cpp.o differ diff --git a/build/source/source_base/CMakeFiles/base.dir/parallel_reduce.cpp.o.d b/build/source/source_base/CMakeFiles/base.dir/parallel_reduce.cpp.o.d new file mode 100644 index 0000000000..67fbcedaf5 --- /dev/null +++ b/build/source/source_base/CMakeFiles/base.dir/parallel_reduce.cpp.o.d @@ -0,0 +1,213 @@ +source/source_base/CMakeFiles/base.dir/parallel_reduce.cpp.o: \ + /home/haozhihan/Documents/abacus-develop/source/source_base/parallel_reduce.cpp \ + /usr/include/stdc-predef.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/parallel_reduce.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/mpi.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/mpi_portable_platform.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/mpicxx.h \ + /usr/include/c++/11/map /usr/include/c++/11/bits/stl_tree.h \ + /usr/include/c++/11/bits/stl_algobase.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++config.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/os_defines.h \ + /usr/include/features.h /usr/include/features-time64.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/cpu_defines.h \ + /usr/include/c++/11/bits/functexcept.h \ + /usr/include/c++/11/bits/exception_defines.h \ + /usr/include/c++/11/bits/cpp_type_traits.h \ + /usr/include/c++/11/ext/type_traits.h \ + /usr/include/c++/11/ext/numeric_traits.h \ + /usr/include/c++/11/bits/stl_pair.h /usr/include/c++/11/bits/move.h \ + /usr/include/c++/11/type_traits \ + /usr/include/c++/11/bits/stl_iterator_base_types.h \ + /usr/include/c++/11/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/11/bits/concept_check.h \ + /usr/include/c++/11/debug/assertions.h \ + /usr/include/c++/11/bits/stl_iterator.h \ + /usr/include/c++/11/bits/ptr_traits.h /usr/include/c++/11/debug/debug.h \ + /usr/include/c++/11/bits/predefined_ops.h \ + /usr/include/c++/11/bits/allocator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++allocator.h \ + /usr/include/c++/11/ext/new_allocator.h /usr/include/c++/11/new \ + /usr/include/c++/11/bits/exception.h \ + /usr/include/c++/11/bits/memoryfwd.h \ + /usr/include/c++/11/bits/stl_function.h \ + /usr/include/c++/11/backward/binders.h \ + /usr/include/c++/11/ext/alloc_traits.h \ + /usr/include/c++/11/bits/alloc_traits.h \ + /usr/include/c++/11/bits/stl_construct.h \ + /usr/include/c++/11/ext/aligned_buffer.h \ + /usr/include/c++/11/bits/stl_map.h /usr/include/c++/11/initializer_list \ + /usr/include/c++/11/tuple /usr/include/c++/11/utility \ + /usr/include/c++/11/bits/stl_relops.h /usr/include/c++/11/array \ + /usr/include/c++/11/bits/range_access.h \ + /usr/include/c++/11/bits/uses_allocator.h \ + /usr/include/c++/11/bits/invoke.h \ + /usr/include/c++/11/bits/stl_multimap.h \ + /usr/include/c++/11/bits/erase_if.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdarg.h /usr/include/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/c++/11/iostream \ + /usr/include/c++/11/ostream /usr/include/c++/11/ios \ + /usr/include/c++/11/iosfwd /usr/include/c++/11/bits/stringfwd.h \ + /usr/include/c++/11/bits/postypes.h /usr/include/c++/11/cwchar \ + /usr/include/wchar.h /usr/include/x86_64-linux-gnu/bits/wchar.h \ + /usr/include/x86_64-linux-gnu/bits/types/wint_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/wchar2.h \ + /usr/include/c++/11/exception /usr/include/c++/11/bits/exception_ptr.h \ + /usr/include/c++/11/bits/cxxabi_init_exception.h \ + /usr/include/c++/11/typeinfo /usr/include/c++/11/bits/hash_bytes.h \ + /usr/include/c++/11/bits/nested_exception.h \ + /usr/include/c++/11/bits/char_traits.h /usr/include/c++/11/cstdint \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdint.h /usr/include/stdint.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-uintn.h \ + /usr/include/c++/11/bits/localefwd.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++locale.h \ + /usr/include/c++/11/clocale /usr/include/locale.h \ + /usr/include/x86_64-linux-gnu/bits/locale.h /usr/include/c++/11/cctype \ + /usr/include/ctype.h /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/c++/11/bits/ios_base.h /usr/include/c++/11/ext/atomicity.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr-default.h \ + /usr/include/pthread.h /usr/include/sched.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/sched.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h \ + /usr/include/x86_64-linux-gnu/bits/cpu-set.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/timex.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/atomic_wide_counter.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h \ + /usr/include/x86_64-linux-gnu/bits/setjmp.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct___jmp_buf_tag.h \ + /usr/include/x86_64-linux-gnu/bits/pthread_stack_min-dynamic.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/atomic_word.h \ + /usr/include/x86_64-linux-gnu/sys/single_threaded.h \ + /usr/include/c++/11/bits/locale_classes.h /usr/include/c++/11/string \ + /usr/include/c++/11/bits/ostream_insert.h \ + /usr/include/c++/11/bits/cxxabi_forced.h \ + /usr/include/c++/11/bits/basic_string.h \ + /usr/include/c++/11/ext/string_conversions.h /usr/include/c++/11/cstdlib \ + /usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/sys/types.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/include/c++/11/bits/std_abs.h /usr/include/c++/11/cstdio \ + /usr/include/c++/11/cerrno /usr/include/errno.h \ + /usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \ + /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/bits/types/error_t.h \ + /usr/include/c++/11/bits/charconv.h \ + /usr/include/c++/11/bits/functional_hash.h \ + /usr/include/c++/11/bits/basic_string.tcc \ + /usr/include/c++/11/bits/locale_classes.tcc \ + /usr/include/c++/11/system_error \ + /usr/include/x86_64-linux-gnu/c++/11/bits/error_constants.h \ + /usr/include/c++/11/stdexcept /usr/include/c++/11/streambuf \ + /usr/include/c++/11/bits/streambuf.tcc \ + /usr/include/c++/11/bits/basic_ios.h \ + /usr/include/c++/11/bits/locale_facets.h /usr/include/c++/11/cwctype \ + /usr/include/wctype.h /usr/include/x86_64-linux-gnu/bits/wctype-wchar.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_base.h \ + /usr/include/c++/11/bits/streambuf_iterator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_inline.h \ + /usr/include/c++/11/bits/locale_facets.tcc \ + /usr/include/c++/11/bits/basic_ios.tcc \ + /usr/include/c++/11/bits/ostream.tcc /usr/include/c++/11/istream \ + /usr/include/c++/11/bits/istream.tcc \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/constants.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/functions.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/datatype.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/exception.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/op.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/status.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/request.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/group.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/comm.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/win.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/file.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/errhandler.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/intracomm.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/topology.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/intercomm.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/info.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/datatype_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/functions_inln.h \ + /usr/include/string.h /usr/include/strings.h \ + /usr/include/x86_64-linux-gnu/bits/strings_fortified.h \ + /usr/include/x86_64-linux-gnu/bits/string_fortified.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/request_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/comm_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/intracomm_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/topology_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/intercomm_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/group_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/op_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/errhandler_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/status_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/info_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/win_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/file_inln.h \ + /usr/include/c++/11/cassert /usr/include/assert.h \ + /usr/include/c++/11/complex /usr/include/c++/11/cmath \ + /usr/include/math.h /usr/include/x86_64-linux-gnu/bits/math-vector.h \ + /usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h \ + /usr/include/x86_64-linux-gnu/bits/flt-eval-method.h \ + /usr/include/x86_64-linux-gnu/bits/fp-logb.h \ + /usr/include/x86_64-linux-gnu/bits/fp-fast.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-narrow.h \ + /usr/include/x86_64-linux-gnu/bits/iscanonical.h \ + /usr/include/c++/11/sstream /usr/include/c++/11/bits/sstream.tcc \ + /home/haozhihan/Documents/abacus-develop/source/source_base/parallel_comm.h \ + /usr/include/c++/11/vector /usr/include/c++/11/bits/stl_uninitialized.h \ + /usr/include/c++/11/bits/stl_vector.h \ + /usr/include/c++/11/bits/stl_bvector.h \ + /usr/include/c++/11/bits/vector.tcc diff --git a/build/source/source_base/CMakeFiles/base.dir/progress.make b/build/source/source_base/CMakeFiles/base.dir/progress.make new file mode 100644 index 0000000000..a9956d9077 --- /dev/null +++ b/build/source/source_base/CMakeFiles/base.dir/progress.make @@ -0,0 +1,56 @@ +CMAKE_PROGRESS_1 = +CMAKE_PROGRESS_2 = +CMAKE_PROGRESS_3 = +CMAKE_PROGRESS_4 = 1 +CMAKE_PROGRESS_5 = +CMAKE_PROGRESS_6 = +CMAKE_PROGRESS_7 = +CMAKE_PROGRESS_8 = +CMAKE_PROGRESS_9 = +CMAKE_PROGRESS_10 = 2 +CMAKE_PROGRESS_11 = +CMAKE_PROGRESS_12 = +CMAKE_PROGRESS_13 = +CMAKE_PROGRESS_14 = +CMAKE_PROGRESS_15 = +CMAKE_PROGRESS_16 = 3 +CMAKE_PROGRESS_17 = +CMAKE_PROGRESS_18 = +CMAKE_PROGRESS_19 = +CMAKE_PROGRESS_20 = +CMAKE_PROGRESS_21 = +CMAKE_PROGRESS_22 = 4 +CMAKE_PROGRESS_23 = +CMAKE_PROGRESS_24 = +CMAKE_PROGRESS_25 = +CMAKE_PROGRESS_26 = +CMAKE_PROGRESS_27 = +CMAKE_PROGRESS_28 = 5 +CMAKE_PROGRESS_29 = +CMAKE_PROGRESS_30 = +CMAKE_PROGRESS_31 = +CMAKE_PROGRESS_32 = +CMAKE_PROGRESS_33 = +CMAKE_PROGRESS_34 = 6 +CMAKE_PROGRESS_35 = +CMAKE_PROGRESS_36 = +CMAKE_PROGRESS_37 = +CMAKE_PROGRESS_38 = +CMAKE_PROGRESS_39 = +CMAKE_PROGRESS_40 = 7 +CMAKE_PROGRESS_41 = +CMAKE_PROGRESS_42 = +CMAKE_PROGRESS_43 = +CMAKE_PROGRESS_44 = +CMAKE_PROGRESS_45 = +CMAKE_PROGRESS_46 = 8 +CMAKE_PROGRESS_47 = +CMAKE_PROGRESS_48 = +CMAKE_PROGRESS_49 = +CMAKE_PROGRESS_50 = +CMAKE_PROGRESS_51 = +CMAKE_PROGRESS_52 = 9 +CMAKE_PROGRESS_53 = +CMAKE_PROGRESS_54 = +CMAKE_PROGRESS_55 = + diff --git a/build/source/source_base/CMakeFiles/base.dir/projgen.cpp.o b/build/source/source_base/CMakeFiles/base.dir/projgen.cpp.o new file mode 100644 index 0000000000..df8bdcbe17 Binary files /dev/null and b/build/source/source_base/CMakeFiles/base.dir/projgen.cpp.o differ diff --git a/build/source/source_base/CMakeFiles/base.dir/projgen.cpp.o.d b/build/source/source_base/CMakeFiles/base.dir/projgen.cpp.o.d new file mode 100644 index 0000000000..ec1123d97f --- /dev/null +++ b/build/source/source_base/CMakeFiles/base.dir/projgen.cpp.o.d @@ -0,0 +1,122 @@ +source/source_base/CMakeFiles/base.dir/projgen.cpp.o: \ + /home/haozhihan/Documents/abacus-develop/source/source_base/projgen.cpp \ + /usr/include/stdc-predef.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/projgen.h \ + /usr/include/c++/11/vector /usr/include/c++/11/bits/stl_algobase.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++config.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/os_defines.h \ + /usr/include/features.h /usr/include/features-time64.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/cpu_defines.h \ + /usr/include/c++/11/bits/functexcept.h \ + /usr/include/c++/11/bits/exception_defines.h \ + /usr/include/c++/11/bits/cpp_type_traits.h \ + /usr/include/c++/11/ext/type_traits.h \ + /usr/include/c++/11/ext/numeric_traits.h \ + /usr/include/c++/11/bits/stl_pair.h /usr/include/c++/11/bits/move.h \ + /usr/include/c++/11/type_traits \ + /usr/include/c++/11/bits/stl_iterator_base_types.h \ + /usr/include/c++/11/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/11/bits/concept_check.h \ + /usr/include/c++/11/debug/assertions.h \ + /usr/include/c++/11/bits/stl_iterator.h \ + /usr/include/c++/11/bits/ptr_traits.h /usr/include/c++/11/debug/debug.h \ + /usr/include/c++/11/bits/predefined_ops.h \ + /usr/include/c++/11/bits/allocator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++allocator.h \ + /usr/include/c++/11/ext/new_allocator.h /usr/include/c++/11/new \ + /usr/include/c++/11/bits/exception.h \ + /usr/include/c++/11/bits/memoryfwd.h \ + /usr/include/c++/11/bits/stl_construct.h \ + /usr/include/c++/11/bits/stl_uninitialized.h \ + /usr/include/c++/11/ext/alloc_traits.h \ + /usr/include/c++/11/bits/alloc_traits.h \ + /usr/include/c++/11/bits/stl_vector.h \ + /usr/include/c++/11/initializer_list \ + /usr/include/c++/11/bits/stl_bvector.h \ + /usr/include/c++/11/bits/functional_hash.h \ + /usr/include/c++/11/bits/hash_bytes.h \ + /usr/include/c++/11/bits/range_access.h \ + /usr/include/c++/11/bits/vector.tcc /usr/include/c++/11/algorithm \ + /usr/include/c++/11/utility /usr/include/c++/11/bits/stl_relops.h \ + /usr/include/c++/11/bits/stl_algo.h /usr/include/c++/11/cstdlib \ + /usr/include/stdlib.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h \ + /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/atomic_wide_counter.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/include/c++/11/bits/std_abs.h \ + /usr/include/c++/11/bits/algorithmfwd.h \ + /usr/include/c++/11/bits/stl_heap.h \ + /usr/include/c++/11/bits/stl_tempbuf.h \ + /usr/include/c++/11/bits/uniform_int_dist.h /usr/include/c++/11/cassert \ + /usr/include/assert.h /usr/include/c++/11/cmath /usr/include/math.h \ + /usr/include/x86_64-linux-gnu/bits/math-vector.h \ + /usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h \ + /usr/include/x86_64-linux-gnu/bits/flt-eval-method.h \ + /usr/include/x86_64-linux-gnu/bits/fp-logb.h \ + /usr/include/x86_64-linux-gnu/bits/fp-fast.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-narrow.h \ + /usr/include/x86_64-linux-gnu/bits/iscanonical.h \ + /usr/include/c++/11/cstdio /usr/include/stdio.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/c++/11/numeric \ + /usr/include/c++/11/bits/stl_numeric.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/cubic_spline.h \ + /usr/include/c++/11/cstddef \ + /home/haozhihan/Documents/abacus-develop/source/source_base/math_integral.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/math_sphbes.h \ + /usr/include/c++/11/functional /usr/include/c++/11/bits/stl_function.h \ + /usr/include/c++/11/backward/binders.h /usr/include/c++/11/tuple \ + /usr/include/c++/11/array /usr/include/c++/11/bits/uses_allocator.h \ + /usr/include/c++/11/bits/invoke.h /usr/include/c++/11/bits/refwrap.h \ + /usr/include/c++/11/bits/std_function.h /usr/include/c++/11/typeinfo diff --git a/build/source/source_base/CMakeFiles/base.dir/realarray.cpp.o b/build/source/source_base/CMakeFiles/base.dir/realarray.cpp.o new file mode 100644 index 0000000000..2d18fe5c63 Binary files /dev/null and b/build/source/source_base/CMakeFiles/base.dir/realarray.cpp.o differ diff --git a/build/source/source_base/CMakeFiles/base.dir/realarray.cpp.o.d b/build/source/source_base/CMakeFiles/base.dir/realarray.cpp.o.d new file mode 100644 index 0000000000..93677ac61d --- /dev/null +++ b/build/source/source_base/CMakeFiles/base.dir/realarray.cpp.o.d @@ -0,0 +1,167 @@ +source/source_base/CMakeFiles/base.dir/realarray.cpp.o: \ + /home/haozhihan/Documents/abacus-develop/source/source_base/realarray.cpp \ + /usr/include/stdc-predef.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/realarray.h \ + /usr/include/c++/11/cassert \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++config.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/os_defines.h \ + /usr/include/features.h /usr/include/features-time64.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/cpu_defines.h \ + /usr/include/assert.h /usr/include/c++/11/fstream \ + /usr/include/c++/11/istream /usr/include/c++/11/ios \ + /usr/include/c++/11/iosfwd /usr/include/c++/11/bits/stringfwd.h \ + /usr/include/c++/11/bits/memoryfwd.h /usr/include/c++/11/bits/postypes.h \ + /usr/include/c++/11/cwchar /usr/include/wchar.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/wchar.h \ + /usr/include/x86_64-linux-gnu/bits/types/wint_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/wchar2.h \ + /usr/include/c++/11/exception /usr/include/c++/11/bits/exception.h \ + /usr/include/c++/11/bits/exception_ptr.h \ + /usr/include/c++/11/bits/exception_defines.h \ + /usr/include/c++/11/bits/cxxabi_init_exception.h \ + /usr/include/c++/11/typeinfo /usr/include/c++/11/bits/hash_bytes.h \ + /usr/include/c++/11/new /usr/include/c++/11/bits/move.h \ + /usr/include/c++/11/type_traits \ + /usr/include/c++/11/bits/nested_exception.h \ + /usr/include/c++/11/bits/char_traits.h \ + /usr/include/c++/11/bits/stl_algobase.h \ + /usr/include/c++/11/bits/functexcept.h \ + /usr/include/c++/11/bits/cpp_type_traits.h \ + /usr/include/c++/11/ext/type_traits.h \ + /usr/include/c++/11/ext/numeric_traits.h \ + /usr/include/c++/11/bits/stl_pair.h \ + /usr/include/c++/11/bits/stl_iterator_base_types.h \ + /usr/include/c++/11/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/11/bits/concept_check.h \ + /usr/include/c++/11/debug/assertions.h \ + /usr/include/c++/11/bits/stl_iterator.h \ + /usr/include/c++/11/bits/ptr_traits.h /usr/include/c++/11/debug/debug.h \ + /usr/include/c++/11/bits/predefined_ops.h /usr/include/c++/11/cstdint \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdint.h /usr/include/stdint.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-uintn.h \ + /usr/include/c++/11/bits/localefwd.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++locale.h \ + /usr/include/c++/11/clocale /usr/include/locale.h \ + /usr/include/x86_64-linux-gnu/bits/locale.h /usr/include/c++/11/cctype \ + /usr/include/ctype.h /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/c++/11/bits/ios_base.h /usr/include/c++/11/ext/atomicity.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr-default.h \ + /usr/include/pthread.h /usr/include/sched.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/sched.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h \ + /usr/include/x86_64-linux-gnu/bits/cpu-set.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/timex.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/atomic_wide_counter.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h \ + /usr/include/x86_64-linux-gnu/bits/setjmp.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct___jmp_buf_tag.h \ + /usr/include/x86_64-linux-gnu/bits/pthread_stack_min-dynamic.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/atomic_word.h \ + /usr/include/x86_64-linux-gnu/sys/single_threaded.h \ + /usr/include/c++/11/bits/locale_classes.h /usr/include/c++/11/string \ + /usr/include/c++/11/bits/allocator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++allocator.h \ + /usr/include/c++/11/ext/new_allocator.h \ + /usr/include/c++/11/bits/ostream_insert.h \ + /usr/include/c++/11/bits/cxxabi_forced.h \ + /usr/include/c++/11/bits/stl_function.h \ + /usr/include/c++/11/backward/binders.h \ + /usr/include/c++/11/bits/range_access.h \ + /usr/include/c++/11/initializer_list \ + /usr/include/c++/11/bits/basic_string.h \ + /usr/include/c++/11/ext/alloc_traits.h \ + /usr/include/c++/11/bits/alloc_traits.h \ + /usr/include/c++/11/bits/stl_construct.h \ + /usr/include/c++/11/ext/string_conversions.h /usr/include/c++/11/cstdlib \ + /usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/sys/types.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/include/c++/11/bits/std_abs.h /usr/include/c++/11/cstdio \ + /usr/include/stdio.h /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/c++/11/cerrno \ + /usr/include/errno.h /usr/include/x86_64-linux-gnu/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/bits/types/error_t.h \ + /usr/include/c++/11/bits/charconv.h \ + /usr/include/c++/11/bits/functional_hash.h \ + /usr/include/c++/11/bits/basic_string.tcc \ + /usr/include/c++/11/bits/locale_classes.tcc \ + /usr/include/c++/11/system_error \ + /usr/include/x86_64-linux-gnu/c++/11/bits/error_constants.h \ + /usr/include/c++/11/stdexcept /usr/include/c++/11/streambuf \ + /usr/include/c++/11/bits/streambuf.tcc \ + /usr/include/c++/11/bits/basic_ios.h \ + /usr/include/c++/11/bits/locale_facets.h /usr/include/c++/11/cwctype \ + /usr/include/wctype.h /usr/include/x86_64-linux-gnu/bits/wctype-wchar.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_base.h \ + /usr/include/c++/11/bits/streambuf_iterator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_inline.h \ + /usr/include/c++/11/bits/locale_facets.tcc \ + /usr/include/c++/11/bits/basic_ios.tcc /usr/include/c++/11/ostream \ + /usr/include/c++/11/bits/ostream.tcc \ + /usr/include/c++/11/bits/istream.tcc /usr/include/c++/11/bits/codecvt.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/basic_file.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++io.h \ + /usr/include/c++/11/bits/fstream.tcc /usr/include/c++/11/iomanip \ + /usr/include/c++/11/locale \ + /usr/include/c++/11/bits/locale_facets_nonio.h /usr/include/c++/11/ctime \ + /usr/include/x86_64-linux-gnu/c++/11/bits/time_members.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/messages_members.h \ + /usr/include/libintl.h /usr/include/c++/11/bits/locale_facets_nonio.tcc \ + /usr/include/c++/11/bits/locale_conv.h \ + /usr/include/c++/11/bits/unique_ptr.h /usr/include/c++/11/utility \ + /usr/include/c++/11/bits/stl_relops.h /usr/include/c++/11/tuple \ + /usr/include/c++/11/array /usr/include/c++/11/bits/uses_allocator.h \ + /usr/include/c++/11/bits/invoke.h /usr/include/c++/11/iostream diff --git a/build/source/source_base/CMakeFiles/base.dir/sph_bessel_recursive-d1.cpp.o b/build/source/source_base/CMakeFiles/base.dir/sph_bessel_recursive-d1.cpp.o new file mode 100644 index 0000000000..69e8369e79 Binary files /dev/null and b/build/source/source_base/CMakeFiles/base.dir/sph_bessel_recursive-d1.cpp.o differ diff --git a/build/source/source_base/CMakeFiles/base.dir/sph_bessel_recursive-d1.cpp.o.d b/build/source/source_base/CMakeFiles/base.dir/sph_bessel_recursive-d1.cpp.o.d new file mode 100644 index 0000000000..87ee49c2ca --- /dev/null +++ b/build/source/source_base/CMakeFiles/base.dir/sph_bessel_recursive-d1.cpp.o.d @@ -0,0 +1,171 @@ +source/source_base/CMakeFiles/base.dir/sph_bessel_recursive-d1.cpp.o: \ + /home/haozhihan/Documents/abacus-develop/source/source_base/sph_bessel_recursive-d1.cpp \ + /usr/include/stdc-predef.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/sph_bessel_recursive.h \ + /usr/include/c++/11/vector /usr/include/c++/11/bits/stl_algobase.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++config.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/os_defines.h \ + /usr/include/features.h /usr/include/features-time64.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/cpu_defines.h \ + /usr/include/c++/11/bits/functexcept.h \ + /usr/include/c++/11/bits/exception_defines.h \ + /usr/include/c++/11/bits/cpp_type_traits.h \ + /usr/include/c++/11/ext/type_traits.h \ + /usr/include/c++/11/ext/numeric_traits.h \ + /usr/include/c++/11/bits/stl_pair.h /usr/include/c++/11/bits/move.h \ + /usr/include/c++/11/type_traits \ + /usr/include/c++/11/bits/stl_iterator_base_types.h \ + /usr/include/c++/11/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/11/bits/concept_check.h \ + /usr/include/c++/11/debug/assertions.h \ + /usr/include/c++/11/bits/stl_iterator.h \ + /usr/include/c++/11/bits/ptr_traits.h /usr/include/c++/11/debug/debug.h \ + /usr/include/c++/11/bits/predefined_ops.h \ + /usr/include/c++/11/bits/allocator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++allocator.h \ + /usr/include/c++/11/ext/new_allocator.h /usr/include/c++/11/new \ + /usr/include/c++/11/bits/exception.h \ + /usr/include/c++/11/bits/memoryfwd.h \ + /usr/include/c++/11/bits/stl_construct.h \ + /usr/include/c++/11/bits/stl_uninitialized.h \ + /usr/include/c++/11/ext/alloc_traits.h \ + /usr/include/c++/11/bits/alloc_traits.h \ + /usr/include/c++/11/bits/stl_vector.h \ + /usr/include/c++/11/initializer_list \ + /usr/include/c++/11/bits/stl_bvector.h \ + /usr/include/c++/11/bits/functional_hash.h \ + /usr/include/c++/11/bits/hash_bytes.h \ + /usr/include/c++/11/bits/range_access.h \ + /usr/include/c++/11/bits/vector.tcc /usr/include/c++/11/cstddef \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h \ + /usr/include/c++/11/cmath /usr/include/math.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/math-vector.h \ + /usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h \ + /usr/include/x86_64-linux-gnu/bits/flt-eval-method.h \ + /usr/include/x86_64-linux-gnu/bits/fp-logb.h \ + /usr/include/x86_64-linux-gnu/bits/fp-fast.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-narrow.h \ + /usr/include/x86_64-linux-gnu/bits/iscanonical.h \ + /usr/include/c++/11/bits/std_abs.h /usr/include/stdlib.h \ + /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/atomic_wide_counter.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/include/c++/11/stdexcept /usr/include/c++/11/exception \ + /usr/include/c++/11/bits/exception_ptr.h \ + /usr/include/c++/11/bits/cxxabi_init_exception.h \ + /usr/include/c++/11/typeinfo /usr/include/c++/11/bits/nested_exception.h \ + /usr/include/c++/11/string /usr/include/c++/11/bits/stringfwd.h \ + /usr/include/c++/11/bits/char_traits.h \ + /usr/include/c++/11/bits/postypes.h /usr/include/c++/11/cwchar \ + /usr/include/wchar.h /usr/lib/gcc/x86_64-linux-gnu/11/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/wchar.h \ + /usr/include/x86_64-linux-gnu/bits/types/wint_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/wchar2.h /usr/include/c++/11/cstdint \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdint.h /usr/include/stdint.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-uintn.h \ + /usr/include/c++/11/bits/localefwd.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++locale.h \ + /usr/include/c++/11/clocale /usr/include/locale.h \ + /usr/include/x86_64-linux-gnu/bits/locale.h /usr/include/c++/11/iosfwd \ + /usr/include/c++/11/cctype /usr/include/ctype.h \ + /usr/include/c++/11/bits/ostream_insert.h \ + /usr/include/c++/11/bits/cxxabi_forced.h \ + /usr/include/c++/11/bits/stl_function.h \ + /usr/include/c++/11/backward/binders.h \ + /usr/include/c++/11/bits/basic_string.h \ + /usr/include/c++/11/ext/atomicity.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr-default.h \ + /usr/include/pthread.h /usr/include/sched.h \ + /usr/include/x86_64-linux-gnu/bits/sched.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h \ + /usr/include/x86_64-linux-gnu/bits/cpu-set.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/timex.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h \ + /usr/include/x86_64-linux-gnu/bits/setjmp.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct___jmp_buf_tag.h \ + /usr/include/x86_64-linux-gnu/bits/pthread_stack_min-dynamic.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/atomic_word.h \ + /usr/include/x86_64-linux-gnu/sys/single_threaded.h \ + /usr/include/c++/11/ext/string_conversions.h /usr/include/c++/11/cstdlib \ + /usr/include/c++/11/cstdio /usr/include/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/c++/11/cerrno \ + /usr/include/errno.h /usr/include/x86_64-linux-gnu/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/bits/types/error_t.h \ + /usr/include/c++/11/bits/charconv.h \ + /usr/include/c++/11/bits/basic_string.tcc \ + /home/haozhihan/Documents/abacus-develop/source/source_base/constants.h \ + /usr/include/c++/11/complex /usr/include/c++/11/sstream \ + /usr/include/c++/11/istream /usr/include/c++/11/ios \ + /usr/include/c++/11/bits/ios_base.h \ + /usr/include/c++/11/bits/locale_classes.h \ + /usr/include/c++/11/bits/locale_classes.tcc \ + /usr/include/c++/11/system_error \ + /usr/include/x86_64-linux-gnu/c++/11/bits/error_constants.h \ + /usr/include/c++/11/streambuf /usr/include/c++/11/bits/streambuf.tcc \ + /usr/include/c++/11/bits/basic_ios.h \ + /usr/include/c++/11/bits/locale_facets.h /usr/include/c++/11/cwctype \ + /usr/include/wctype.h /usr/include/x86_64-linux-gnu/bits/wctype-wchar.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_base.h \ + /usr/include/c++/11/bits/streambuf_iterator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_inline.h \ + /usr/include/c++/11/bits/locale_facets.tcc \ + /usr/include/c++/11/bits/basic_ios.tcc /usr/include/c++/11/ostream \ + /usr/include/c++/11/bits/ostream.tcc \ + /usr/include/c++/11/bits/istream.tcc \ + /usr/include/c++/11/bits/sstream.tcc diff --git a/build/source/source_base/CMakeFiles/base.dir/sph_bessel_recursive-d2.cpp.o b/build/source/source_base/CMakeFiles/base.dir/sph_bessel_recursive-d2.cpp.o new file mode 100644 index 0000000000..a8e2dbcead Binary files /dev/null and b/build/source/source_base/CMakeFiles/base.dir/sph_bessel_recursive-d2.cpp.o differ diff --git a/build/source/source_base/CMakeFiles/base.dir/sph_bessel_recursive-d2.cpp.o.d b/build/source/source_base/CMakeFiles/base.dir/sph_bessel_recursive-d2.cpp.o.d new file mode 100644 index 0000000000..51c7b6234a --- /dev/null +++ b/build/source/source_base/CMakeFiles/base.dir/sph_bessel_recursive-d2.cpp.o.d @@ -0,0 +1,171 @@ +source/source_base/CMakeFiles/base.dir/sph_bessel_recursive-d2.cpp.o: \ + /home/haozhihan/Documents/abacus-develop/source/source_base/sph_bessel_recursive-d2.cpp \ + /usr/include/stdc-predef.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/sph_bessel_recursive.h \ + /usr/include/c++/11/vector /usr/include/c++/11/bits/stl_algobase.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++config.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/os_defines.h \ + /usr/include/features.h /usr/include/features-time64.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/cpu_defines.h \ + /usr/include/c++/11/bits/functexcept.h \ + /usr/include/c++/11/bits/exception_defines.h \ + /usr/include/c++/11/bits/cpp_type_traits.h \ + /usr/include/c++/11/ext/type_traits.h \ + /usr/include/c++/11/ext/numeric_traits.h \ + /usr/include/c++/11/bits/stl_pair.h /usr/include/c++/11/bits/move.h \ + /usr/include/c++/11/type_traits \ + /usr/include/c++/11/bits/stl_iterator_base_types.h \ + /usr/include/c++/11/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/11/bits/concept_check.h \ + /usr/include/c++/11/debug/assertions.h \ + /usr/include/c++/11/bits/stl_iterator.h \ + /usr/include/c++/11/bits/ptr_traits.h /usr/include/c++/11/debug/debug.h \ + /usr/include/c++/11/bits/predefined_ops.h \ + /usr/include/c++/11/bits/allocator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++allocator.h \ + /usr/include/c++/11/ext/new_allocator.h /usr/include/c++/11/new \ + /usr/include/c++/11/bits/exception.h \ + /usr/include/c++/11/bits/memoryfwd.h \ + /usr/include/c++/11/bits/stl_construct.h \ + /usr/include/c++/11/bits/stl_uninitialized.h \ + /usr/include/c++/11/ext/alloc_traits.h \ + /usr/include/c++/11/bits/alloc_traits.h \ + /usr/include/c++/11/bits/stl_vector.h \ + /usr/include/c++/11/initializer_list \ + /usr/include/c++/11/bits/stl_bvector.h \ + /usr/include/c++/11/bits/functional_hash.h \ + /usr/include/c++/11/bits/hash_bytes.h \ + /usr/include/c++/11/bits/range_access.h \ + /usr/include/c++/11/bits/vector.tcc /usr/include/c++/11/cstddef \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h \ + /usr/include/c++/11/cmath /usr/include/math.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/math-vector.h \ + /usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h \ + /usr/include/x86_64-linux-gnu/bits/flt-eval-method.h \ + /usr/include/x86_64-linux-gnu/bits/fp-logb.h \ + /usr/include/x86_64-linux-gnu/bits/fp-fast.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-narrow.h \ + /usr/include/x86_64-linux-gnu/bits/iscanonical.h \ + /usr/include/c++/11/bits/std_abs.h /usr/include/stdlib.h \ + /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/atomic_wide_counter.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/include/c++/11/stdexcept /usr/include/c++/11/exception \ + /usr/include/c++/11/bits/exception_ptr.h \ + /usr/include/c++/11/bits/cxxabi_init_exception.h \ + /usr/include/c++/11/typeinfo /usr/include/c++/11/bits/nested_exception.h \ + /usr/include/c++/11/string /usr/include/c++/11/bits/stringfwd.h \ + /usr/include/c++/11/bits/char_traits.h \ + /usr/include/c++/11/bits/postypes.h /usr/include/c++/11/cwchar \ + /usr/include/wchar.h /usr/lib/gcc/x86_64-linux-gnu/11/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/wchar.h \ + /usr/include/x86_64-linux-gnu/bits/types/wint_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/wchar2.h /usr/include/c++/11/cstdint \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdint.h /usr/include/stdint.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-uintn.h \ + /usr/include/c++/11/bits/localefwd.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++locale.h \ + /usr/include/c++/11/clocale /usr/include/locale.h \ + /usr/include/x86_64-linux-gnu/bits/locale.h /usr/include/c++/11/iosfwd \ + /usr/include/c++/11/cctype /usr/include/ctype.h \ + /usr/include/c++/11/bits/ostream_insert.h \ + /usr/include/c++/11/bits/cxxabi_forced.h \ + /usr/include/c++/11/bits/stl_function.h \ + /usr/include/c++/11/backward/binders.h \ + /usr/include/c++/11/bits/basic_string.h \ + /usr/include/c++/11/ext/atomicity.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr-default.h \ + /usr/include/pthread.h /usr/include/sched.h \ + /usr/include/x86_64-linux-gnu/bits/sched.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h \ + /usr/include/x86_64-linux-gnu/bits/cpu-set.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/timex.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h \ + /usr/include/x86_64-linux-gnu/bits/setjmp.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct___jmp_buf_tag.h \ + /usr/include/x86_64-linux-gnu/bits/pthread_stack_min-dynamic.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/atomic_word.h \ + /usr/include/x86_64-linux-gnu/sys/single_threaded.h \ + /usr/include/c++/11/ext/string_conversions.h /usr/include/c++/11/cstdlib \ + /usr/include/c++/11/cstdio /usr/include/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/c++/11/cerrno \ + /usr/include/errno.h /usr/include/x86_64-linux-gnu/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/bits/types/error_t.h \ + /usr/include/c++/11/bits/charconv.h \ + /usr/include/c++/11/bits/basic_string.tcc \ + /home/haozhihan/Documents/abacus-develop/source/source_base/constants.h \ + /usr/include/c++/11/complex /usr/include/c++/11/sstream \ + /usr/include/c++/11/istream /usr/include/c++/11/ios \ + /usr/include/c++/11/bits/ios_base.h \ + /usr/include/c++/11/bits/locale_classes.h \ + /usr/include/c++/11/bits/locale_classes.tcc \ + /usr/include/c++/11/system_error \ + /usr/include/x86_64-linux-gnu/c++/11/bits/error_constants.h \ + /usr/include/c++/11/streambuf /usr/include/c++/11/bits/streambuf.tcc \ + /usr/include/c++/11/bits/basic_ios.h \ + /usr/include/c++/11/bits/locale_facets.h /usr/include/c++/11/cwctype \ + /usr/include/wctype.h /usr/include/x86_64-linux-gnu/bits/wctype-wchar.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_base.h \ + /usr/include/c++/11/bits/streambuf_iterator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_inline.h \ + /usr/include/c++/11/bits/locale_facets.tcc \ + /usr/include/c++/11/bits/basic_ios.tcc /usr/include/c++/11/ostream \ + /usr/include/c++/11/bits/ostream.tcc \ + /usr/include/c++/11/bits/istream.tcc \ + /usr/include/c++/11/bits/sstream.tcc diff --git a/build/source/source_base/CMakeFiles/base.dir/spherical_bessel_transformer.cpp.o b/build/source/source_base/CMakeFiles/base.dir/spherical_bessel_transformer.cpp.o new file mode 100644 index 0000000000..e416377026 Binary files /dev/null and b/build/source/source_base/CMakeFiles/base.dir/spherical_bessel_transformer.cpp.o differ diff --git a/build/source/source_base/CMakeFiles/base.dir/spherical_bessel_transformer.cpp.o.d b/build/source/source_base/CMakeFiles/base.dir/spherical_bessel_transformer.cpp.o.d new file mode 100644 index 0000000000..b66e316333 --- /dev/null +++ b/build/source/source_base/CMakeFiles/base.dir/spherical_bessel_transformer.cpp.o.d @@ -0,0 +1,194 @@ +source/source_base/CMakeFiles/base.dir/spherical_bessel_transformer.cpp.o: \ + /home/haozhihan/Documents/abacus-develop/source/source_base/spherical_bessel_transformer.cpp \ + /usr/include/stdc-predef.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/spherical_bessel_transformer.h \ + /usr/include/c++/11/memory /usr/include/c++/11/bits/stl_algobase.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++config.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/os_defines.h \ + /usr/include/features.h /usr/include/features-time64.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/cpu_defines.h \ + /usr/include/c++/11/bits/functexcept.h \ + /usr/include/c++/11/bits/exception_defines.h \ + /usr/include/c++/11/bits/cpp_type_traits.h \ + /usr/include/c++/11/ext/type_traits.h \ + /usr/include/c++/11/ext/numeric_traits.h \ + /usr/include/c++/11/bits/stl_pair.h /usr/include/c++/11/bits/move.h \ + /usr/include/c++/11/type_traits \ + /usr/include/c++/11/bits/stl_iterator_base_types.h \ + /usr/include/c++/11/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/11/bits/concept_check.h \ + /usr/include/c++/11/debug/assertions.h \ + /usr/include/c++/11/bits/stl_iterator.h \ + /usr/include/c++/11/bits/ptr_traits.h /usr/include/c++/11/debug/debug.h \ + /usr/include/c++/11/bits/predefined_ops.h \ + /usr/include/c++/11/bits/allocator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++allocator.h \ + /usr/include/c++/11/ext/new_allocator.h /usr/include/c++/11/new \ + /usr/include/c++/11/bits/exception.h \ + /usr/include/c++/11/bits/memoryfwd.h \ + /usr/include/c++/11/bits/stl_construct.h \ + /usr/include/c++/11/bits/stl_uninitialized.h \ + /usr/include/c++/11/ext/alloc_traits.h \ + /usr/include/c++/11/bits/alloc_traits.h \ + /usr/include/c++/11/bits/stl_tempbuf.h \ + /usr/include/c++/11/bits/stl_raw_storage_iter.h \ + /usr/include/c++/11/bits/align.h /usr/include/c++/11/bit \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdint.h /usr/include/stdint.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/wchar.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-uintn.h \ + /usr/include/c++/11/bits/uses_allocator.h \ + /usr/include/c++/11/bits/unique_ptr.h /usr/include/c++/11/utility \ + /usr/include/c++/11/bits/stl_relops.h \ + /usr/include/c++/11/initializer_list /usr/include/c++/11/tuple \ + /usr/include/c++/11/array /usr/include/c++/11/bits/range_access.h \ + /usr/include/c++/11/bits/invoke.h \ + /usr/include/c++/11/bits/stl_function.h \ + /usr/include/c++/11/backward/binders.h \ + /usr/include/c++/11/bits/functional_hash.h \ + /usr/include/c++/11/bits/hash_bytes.h \ + /usr/include/c++/11/bits/shared_ptr.h /usr/include/c++/11/iosfwd \ + /usr/include/c++/11/bits/stringfwd.h /usr/include/c++/11/bits/postypes.h \ + /usr/include/c++/11/cwchar /usr/include/wchar.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/types/wint_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/wchar2.h \ + /usr/include/c++/11/bits/shared_ptr_base.h /usr/include/c++/11/typeinfo \ + /usr/include/c++/11/bits/allocated_ptr.h \ + /usr/include/c++/11/bits/refwrap.h \ + /usr/include/c++/11/ext/aligned_buffer.h \ + /usr/include/c++/11/ext/atomicity.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr-default.h \ + /usr/include/pthread.h /usr/include/sched.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/sched.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h \ + /usr/include/x86_64-linux-gnu/bits/cpu-set.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/timex.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/atomic_wide_counter.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h \ + /usr/include/x86_64-linux-gnu/bits/setjmp.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct___jmp_buf_tag.h \ + /usr/include/x86_64-linux-gnu/bits/pthread_stack_min-dynamic.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/atomic_word.h \ + /usr/include/x86_64-linux-gnu/sys/single_threaded.h \ + /usr/include/c++/11/ext/concurrence.h /usr/include/c++/11/exception \ + /usr/include/c++/11/bits/exception_ptr.h \ + /usr/include/c++/11/bits/cxxabi_init_exception.h \ + /usr/include/c++/11/bits/nested_exception.h \ + /usr/include/c++/11/bits/shared_ptr_atomic.h \ + /usr/include/c++/11/bits/atomic_base.h \ + /usr/include/c++/11/bits/atomic_lockfree_defines.h \ + /usr/include/c++/11/backward/auto_ptr.h /usr/local/include/fftw3.h \ + /usr/include/stdio.h /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/c++/11/vector \ + /usr/include/c++/11/bits/stl_vector.h \ + /usr/include/c++/11/bits/stl_bvector.h \ + /usr/include/c++/11/bits/vector.tcc /usr/include/c++/11/algorithm \ + /usr/include/c++/11/bits/stl_algo.h /usr/include/c++/11/cstdlib \ + /usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/sys/types.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/include/c++/11/bits/std_abs.h \ + /usr/include/c++/11/bits/algorithmfwd.h \ + /usr/include/c++/11/bits/stl_heap.h \ + /usr/include/c++/11/bits/uniform_int_dist.h /usr/include/c++/11/cmath \ + /usr/include/math.h /usr/include/x86_64-linux-gnu/bits/math-vector.h \ + /usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h \ + /usr/include/x86_64-linux-gnu/bits/flt-eval-method.h \ + /usr/include/x86_64-linux-gnu/bits/fp-logb.h \ + /usr/include/x86_64-linux-gnu/bits/fp-fast.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-narrow.h \ + /usr/include/x86_64-linux-gnu/bits/iscanonical.h \ + /usr/include/c++/11/numeric /usr/include/c++/11/bits/stl_numeric.h \ + /usr/include/c++/11/cassert /usr/include/assert.h \ + /usr/include/c++/11/complex /usr/include/c++/11/sstream \ + /usr/include/c++/11/istream /usr/include/c++/11/ios \ + /usr/include/c++/11/bits/char_traits.h /usr/include/c++/11/cstdint \ + /usr/include/c++/11/bits/localefwd.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++locale.h \ + /usr/include/c++/11/clocale /usr/include/locale.h \ + /usr/include/x86_64-linux-gnu/bits/locale.h /usr/include/c++/11/cctype \ + /usr/include/ctype.h /usr/include/c++/11/bits/ios_base.h \ + /usr/include/c++/11/bits/locale_classes.h /usr/include/c++/11/string \ + /usr/include/c++/11/bits/ostream_insert.h \ + /usr/include/c++/11/bits/cxxabi_forced.h \ + /usr/include/c++/11/bits/basic_string.h \ + /usr/include/c++/11/ext/string_conversions.h /usr/include/c++/11/cstdio \ + /usr/include/c++/11/cerrno /usr/include/errno.h \ + /usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \ + /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/bits/types/error_t.h \ + /usr/include/c++/11/bits/charconv.h \ + /usr/include/c++/11/bits/basic_string.tcc \ + /usr/include/c++/11/bits/locale_classes.tcc \ + /usr/include/c++/11/system_error \ + /usr/include/x86_64-linux-gnu/c++/11/bits/error_constants.h \ + /usr/include/c++/11/stdexcept /usr/include/c++/11/streambuf \ + /usr/include/c++/11/bits/streambuf.tcc \ + /usr/include/c++/11/bits/basic_ios.h \ + /usr/include/c++/11/bits/locale_facets.h /usr/include/c++/11/cwctype \ + /usr/include/wctype.h /usr/include/x86_64-linux-gnu/bits/wctype-wchar.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_base.h \ + /usr/include/c++/11/bits/streambuf_iterator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_inline.h \ + /usr/include/c++/11/bits/locale_facets.tcc \ + /usr/include/c++/11/bits/basic_ios.tcc /usr/include/c++/11/ostream \ + /usr/include/c++/11/bits/ostream.tcc \ + /usr/include/c++/11/bits/istream.tcc \ + /usr/include/c++/11/bits/sstream.tcc \ + /home/haozhihan/Documents/abacus-develop/source/source_base/math_integral.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/math_sphbes.h \ + /usr/include/c++/11/functional /usr/include/c++/11/bits/std_function.h diff --git a/build/source/source_base/CMakeFiles/base.dir/timer.cpp.o b/build/source/source_base/CMakeFiles/base.dir/timer.cpp.o new file mode 100644 index 0000000000..d14d2f73f2 Binary files /dev/null and b/build/source/source_base/CMakeFiles/base.dir/timer.cpp.o differ diff --git a/build/source/source_base/CMakeFiles/base.dir/timer.cpp.o.d b/build/source/source_base/CMakeFiles/base.dir/timer.cpp.o.d new file mode 100644 index 0000000000..6f0af123ae --- /dev/null +++ b/build/source/source_base/CMakeFiles/base.dir/timer.cpp.o.d @@ -0,0 +1,234 @@ +source/source_base/CMakeFiles/base.dir/timer.cpp.o: \ + /home/haozhihan/Documents/abacus-develop/source/source_base/timer.cpp \ + /usr/include/stdc-predef.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/timer.h \ + /usr/include/c++/11/ctime \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++config.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/os_defines.h \ + /usr/include/features.h /usr/include/features-time64.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/cpu_defines.h \ + /usr/include/time.h /usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/timex.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/c++/11/fstream /usr/include/c++/11/istream \ + /usr/include/c++/11/ios /usr/include/c++/11/iosfwd \ + /usr/include/c++/11/bits/stringfwd.h \ + /usr/include/c++/11/bits/memoryfwd.h /usr/include/c++/11/bits/postypes.h \ + /usr/include/c++/11/cwchar /usr/include/wchar.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/wchar.h \ + /usr/include/x86_64-linux-gnu/bits/types/wint_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/wchar2.h \ + /usr/include/c++/11/exception /usr/include/c++/11/bits/exception.h \ + /usr/include/c++/11/bits/exception_ptr.h \ + /usr/include/c++/11/bits/exception_defines.h \ + /usr/include/c++/11/bits/cxxabi_init_exception.h \ + /usr/include/c++/11/typeinfo /usr/include/c++/11/bits/hash_bytes.h \ + /usr/include/c++/11/new /usr/include/c++/11/bits/move.h \ + /usr/include/c++/11/type_traits \ + /usr/include/c++/11/bits/nested_exception.h \ + /usr/include/c++/11/bits/char_traits.h \ + /usr/include/c++/11/bits/stl_algobase.h \ + /usr/include/c++/11/bits/functexcept.h \ + /usr/include/c++/11/bits/cpp_type_traits.h \ + /usr/include/c++/11/ext/type_traits.h \ + /usr/include/c++/11/ext/numeric_traits.h \ + /usr/include/c++/11/bits/stl_pair.h \ + /usr/include/c++/11/bits/stl_iterator_base_types.h \ + /usr/include/c++/11/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/11/bits/concept_check.h \ + /usr/include/c++/11/debug/assertions.h \ + /usr/include/c++/11/bits/stl_iterator.h \ + /usr/include/c++/11/bits/ptr_traits.h /usr/include/c++/11/debug/debug.h \ + /usr/include/c++/11/bits/predefined_ops.h /usr/include/c++/11/cstdint \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdint.h /usr/include/stdint.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-uintn.h \ + /usr/include/c++/11/bits/localefwd.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++locale.h \ + /usr/include/c++/11/clocale /usr/include/locale.h \ + /usr/include/x86_64-linux-gnu/bits/locale.h /usr/include/c++/11/cctype \ + /usr/include/ctype.h /usr/include/c++/11/bits/ios_base.h \ + /usr/include/c++/11/ext/atomicity.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr-default.h \ + /usr/include/pthread.h /usr/include/sched.h \ + /usr/include/x86_64-linux-gnu/bits/sched.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h \ + /usr/include/x86_64-linux-gnu/bits/cpu-set.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/atomic_wide_counter.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h \ + /usr/include/x86_64-linux-gnu/bits/setjmp.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct___jmp_buf_tag.h \ + /usr/include/x86_64-linux-gnu/bits/pthread_stack_min-dynamic.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/atomic_word.h \ + /usr/include/x86_64-linux-gnu/sys/single_threaded.h \ + /usr/include/c++/11/bits/locale_classes.h /usr/include/c++/11/string \ + /usr/include/c++/11/bits/allocator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++allocator.h \ + /usr/include/c++/11/ext/new_allocator.h \ + /usr/include/c++/11/bits/ostream_insert.h \ + /usr/include/c++/11/bits/cxxabi_forced.h \ + /usr/include/c++/11/bits/stl_function.h \ + /usr/include/c++/11/backward/binders.h \ + /usr/include/c++/11/bits/range_access.h \ + /usr/include/c++/11/initializer_list \ + /usr/include/c++/11/bits/basic_string.h \ + /usr/include/c++/11/ext/alloc_traits.h \ + /usr/include/c++/11/bits/alloc_traits.h \ + /usr/include/c++/11/bits/stl_construct.h \ + /usr/include/c++/11/ext/string_conversions.h /usr/include/c++/11/cstdlib \ + /usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/sys/types.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/include/c++/11/bits/std_abs.h /usr/include/c++/11/cstdio \ + /usr/include/stdio.h /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/c++/11/cerrno \ + /usr/include/errno.h /usr/include/x86_64-linux-gnu/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/bits/types/error_t.h \ + /usr/include/c++/11/bits/charconv.h \ + /usr/include/c++/11/bits/functional_hash.h \ + /usr/include/c++/11/bits/basic_string.tcc \ + /usr/include/c++/11/bits/locale_classes.tcc \ + /usr/include/c++/11/system_error \ + /usr/include/x86_64-linux-gnu/c++/11/bits/error_constants.h \ + /usr/include/c++/11/stdexcept /usr/include/c++/11/streambuf \ + /usr/include/c++/11/bits/streambuf.tcc \ + /usr/include/c++/11/bits/basic_ios.h \ + /usr/include/c++/11/bits/locale_facets.h /usr/include/c++/11/cwctype \ + /usr/include/wctype.h /usr/include/x86_64-linux-gnu/bits/wctype-wchar.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_base.h \ + /usr/include/c++/11/bits/streambuf_iterator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_inline.h \ + /usr/include/c++/11/bits/locale_facets.tcc \ + /usr/include/c++/11/bits/basic_ios.tcc /usr/include/c++/11/ostream \ + /usr/include/c++/11/bits/ostream.tcc \ + /usr/include/c++/11/bits/istream.tcc /usr/include/c++/11/bits/codecvt.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/basic_file.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++io.h \ + /usr/include/c++/11/bits/fstream.tcc /usr/include/c++/11/iomanip \ + /usr/include/c++/11/locale \ + /usr/include/c++/11/bits/locale_facets_nonio.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/time_members.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/messages_members.h \ + /usr/include/libintl.h /usr/include/c++/11/bits/locale_facets_nonio.tcc \ + /usr/include/c++/11/bits/locale_conv.h \ + /usr/include/c++/11/bits/unique_ptr.h /usr/include/c++/11/utility \ + /usr/include/c++/11/bits/stl_relops.h /usr/include/c++/11/tuple \ + /usr/include/c++/11/array /usr/include/c++/11/bits/uses_allocator.h \ + /usr/include/c++/11/bits/invoke.h /usr/include/c++/11/iostream \ + /usr/include/c++/11/map /usr/include/c++/11/bits/stl_tree.h \ + /usr/include/c++/11/ext/aligned_buffer.h \ + /usr/include/c++/11/bits/stl_map.h \ + /usr/include/c++/11/bits/stl_multimap.h \ + /usr/include/c++/11/bits/erase_if.h /usr/include/c++/11/cmath \ + /usr/include/math.h /usr/include/x86_64-linux-gnu/bits/math-vector.h \ + /usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h \ + /usr/include/x86_64-linux-gnu/bits/flt-eval-method.h \ + /usr/include/x86_64-linux-gnu/bits/fp-logb.h \ + /usr/include/x86_64-linux-gnu/bits/fp-fast.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-narrow.h \ + /usr/include/x86_64-linux-gnu/bits/iscanonical.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/mpi.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/mpi_portable_platform.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/mpicxx.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/constants.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/functions.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/datatype.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/exception.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/op.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/status.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/request.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/group.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/comm.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/win.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/file.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/errhandler.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/intracomm.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/topology.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/intercomm.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/info.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/datatype_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/functions_inln.h \ + /usr/include/string.h /usr/include/strings.h \ + /usr/include/x86_64-linux-gnu/bits/strings_fortified.h \ + /usr/include/x86_64-linux-gnu/bits/string_fortified.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/request_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/comm_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/intracomm_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/topology_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/intercomm_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/group_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/op_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/errhandler_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/status_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/info_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/win_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/file_inln.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/omp.h \ + /usr/include/c++/11/vector /usr/include/c++/11/bits/stl_uninitialized.h \ + /usr/include/c++/11/bits/stl_vector.h \ + /usr/include/c++/11/bits/stl_bvector.h \ + /usr/include/c++/11/bits/vector.tcc /usr/include/c++/11/chrono \ + /usr/include/c++/11/ratio /usr/include/c++/11/limits \ + /usr/include/c++/11/bits/parse_numbers.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/formatter.h \ + /usr/include/c++/11/numeric /usr/include/c++/11/bits/stl_numeric.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/ndarray.h \ + /usr/include/c++/11/cassert /usr/include/assert.h \ + /usr/include/c++/11/algorithm /usr/include/c++/11/bits/stl_algo.h \ + /usr/include/c++/11/bits/algorithmfwd.h \ + /usr/include/c++/11/bits/stl_heap.h \ + /usr/include/c++/11/bits/stl_tempbuf.h \ + /usr/include/c++/11/bits/uniform_int_dist.h diff --git a/build/source/source_base/CMakeFiles/base.dir/tool_check.cpp.o b/build/source/source_base/CMakeFiles/base.dir/tool_check.cpp.o new file mode 100644 index 0000000000..6f2ae50dc2 Binary files /dev/null and b/build/source/source_base/CMakeFiles/base.dir/tool_check.cpp.o differ diff --git a/build/source/source_base/CMakeFiles/base.dir/tool_check.cpp.o.d b/build/source/source_base/CMakeFiles/base.dir/tool_check.cpp.o.d new file mode 100644 index 0000000000..adc31cb09f --- /dev/null +++ b/build/source/source_base/CMakeFiles/base.dir/tool_check.cpp.o.d @@ -0,0 +1,201 @@ +source/source_base/CMakeFiles/base.dir/tool_check.cpp.o: \ + /home/haozhihan/Documents/abacus-develop/source/source_base/tool_check.cpp \ + /usr/include/stdc-predef.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/tool_check.h \ + /usr/include/c++/11/cassert \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++config.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/os_defines.h \ + /usr/include/features.h /usr/include/features-time64.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/cpu_defines.h \ + /usr/include/assert.h /usr/include/c++/11/complex \ + /usr/include/c++/11/bits/cpp_type_traits.h \ + /usr/include/c++/11/ext/type_traits.h /usr/include/c++/11/cmath \ + /usr/include/math.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/math-vector.h \ + /usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h \ + /usr/include/x86_64-linux-gnu/bits/flt-eval-method.h \ + /usr/include/x86_64-linux-gnu/bits/fp-logb.h \ + /usr/include/x86_64-linux-gnu/bits/fp-fast.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-narrow.h \ + /usr/include/x86_64-linux-gnu/bits/iscanonical.h \ + /usr/include/c++/11/bits/std_abs.h /usr/include/stdlib.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h \ + /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/atomic_wide_counter.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h /usr/include/c++/11/sstream \ + /usr/include/c++/11/istream /usr/include/c++/11/ios \ + /usr/include/c++/11/iosfwd /usr/include/c++/11/bits/stringfwd.h \ + /usr/include/c++/11/bits/memoryfwd.h /usr/include/c++/11/bits/postypes.h \ + /usr/include/c++/11/cwchar /usr/include/wchar.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/wchar.h \ + /usr/include/x86_64-linux-gnu/bits/types/wint_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/wchar2.h \ + /usr/include/c++/11/exception /usr/include/c++/11/bits/exception.h \ + /usr/include/c++/11/bits/exception_ptr.h \ + /usr/include/c++/11/bits/exception_defines.h \ + /usr/include/c++/11/bits/cxxabi_init_exception.h \ + /usr/include/c++/11/typeinfo /usr/include/c++/11/bits/hash_bytes.h \ + /usr/include/c++/11/new /usr/include/c++/11/bits/move.h \ + /usr/include/c++/11/type_traits \ + /usr/include/c++/11/bits/nested_exception.h \ + /usr/include/c++/11/bits/char_traits.h \ + /usr/include/c++/11/bits/stl_algobase.h \ + /usr/include/c++/11/bits/functexcept.h \ + /usr/include/c++/11/ext/numeric_traits.h \ + /usr/include/c++/11/bits/stl_pair.h \ + /usr/include/c++/11/bits/stl_iterator_base_types.h \ + /usr/include/c++/11/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/11/bits/concept_check.h \ + /usr/include/c++/11/debug/assertions.h \ + /usr/include/c++/11/bits/stl_iterator.h \ + /usr/include/c++/11/bits/ptr_traits.h /usr/include/c++/11/debug/debug.h \ + /usr/include/c++/11/bits/predefined_ops.h /usr/include/c++/11/cstdint \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdint.h /usr/include/stdint.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-uintn.h \ + /usr/include/c++/11/bits/localefwd.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++locale.h \ + /usr/include/c++/11/clocale /usr/include/locale.h \ + /usr/include/x86_64-linux-gnu/bits/locale.h /usr/include/c++/11/cctype \ + /usr/include/ctype.h /usr/include/c++/11/bits/ios_base.h \ + /usr/include/c++/11/ext/atomicity.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr-default.h \ + /usr/include/pthread.h /usr/include/sched.h \ + /usr/include/x86_64-linux-gnu/bits/sched.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h \ + /usr/include/x86_64-linux-gnu/bits/cpu-set.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/timex.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h \ + /usr/include/x86_64-linux-gnu/bits/setjmp.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct___jmp_buf_tag.h \ + /usr/include/x86_64-linux-gnu/bits/pthread_stack_min-dynamic.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/atomic_word.h \ + /usr/include/x86_64-linux-gnu/sys/single_threaded.h \ + /usr/include/c++/11/bits/locale_classes.h /usr/include/c++/11/string \ + /usr/include/c++/11/bits/allocator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++allocator.h \ + /usr/include/c++/11/ext/new_allocator.h \ + /usr/include/c++/11/bits/ostream_insert.h \ + /usr/include/c++/11/bits/cxxabi_forced.h \ + /usr/include/c++/11/bits/stl_function.h \ + /usr/include/c++/11/backward/binders.h \ + /usr/include/c++/11/bits/range_access.h \ + /usr/include/c++/11/initializer_list \ + /usr/include/c++/11/bits/basic_string.h \ + /usr/include/c++/11/ext/alloc_traits.h \ + /usr/include/c++/11/bits/alloc_traits.h \ + /usr/include/c++/11/bits/stl_construct.h \ + /usr/include/c++/11/ext/string_conversions.h /usr/include/c++/11/cstdlib \ + /usr/include/c++/11/cstdio /usr/include/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/c++/11/cerrno \ + /usr/include/errno.h /usr/include/x86_64-linux-gnu/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/bits/types/error_t.h \ + /usr/include/c++/11/bits/charconv.h \ + /usr/include/c++/11/bits/functional_hash.h \ + /usr/include/c++/11/bits/basic_string.tcc \ + /usr/include/c++/11/bits/locale_classes.tcc \ + /usr/include/c++/11/system_error \ + /usr/include/x86_64-linux-gnu/c++/11/bits/error_constants.h \ + /usr/include/c++/11/stdexcept /usr/include/c++/11/streambuf \ + /usr/include/c++/11/bits/streambuf.tcc \ + /usr/include/c++/11/bits/basic_ios.h \ + /usr/include/c++/11/bits/locale_facets.h /usr/include/c++/11/cwctype \ + /usr/include/wctype.h /usr/include/x86_64-linux-gnu/bits/wctype-wchar.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_base.h \ + /usr/include/c++/11/bits/streambuf_iterator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_inline.h \ + /usr/include/c++/11/bits/locale_facets.tcc \ + /usr/include/c++/11/bits/basic_ios.tcc /usr/include/c++/11/ostream \ + /usr/include/c++/11/bits/ostream.tcc \ + /usr/include/c++/11/bits/istream.tcc \ + /usr/include/c++/11/bits/sstream.tcc /usr/include/c++/11/fstream \ + /usr/include/c++/11/bits/codecvt.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/basic_file.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++io.h \ + /usr/include/c++/11/bits/fstream.tcc /usr/include/c++/11/iomanip \ + /usr/include/c++/11/locale \ + /usr/include/c++/11/bits/locale_facets_nonio.h /usr/include/c++/11/ctime \ + /usr/include/x86_64-linux-gnu/c++/11/bits/time_members.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/messages_members.h \ + /usr/include/libintl.h /usr/include/c++/11/bits/locale_facets_nonio.tcc \ + /usr/include/c++/11/bits/locale_conv.h \ + /usr/include/c++/11/bits/unique_ptr.h /usr/include/c++/11/utility \ + /usr/include/c++/11/bits/stl_relops.h /usr/include/c++/11/tuple \ + /usr/include/c++/11/array /usr/include/c++/11/bits/uses_allocator.h \ + /usr/include/c++/11/bits/invoke.h /usr/include/c++/11/iostream \ + /usr/include/c++/11/valarray /usr/include/c++/11/algorithm \ + /usr/include/c++/11/bits/stl_algo.h \ + /usr/include/c++/11/bits/algorithmfwd.h \ + /usr/include/c++/11/bits/stl_heap.h \ + /usr/include/c++/11/bits/stl_tempbuf.h \ + /usr/include/c++/11/bits/uniform_int_dist.h \ + /usr/include/c++/11/bits/valarray_array.h \ + /usr/include/c++/11/bits/valarray_array.tcc \ + /usr/include/c++/11/bits/valarray_before.h \ + /usr/include/c++/11/bits/slice_array.h \ + /usr/include/c++/11/bits/valarray_after.h \ + /usr/include/c++/11/bits/gslice.h \ + /usr/include/c++/11/bits/gslice_array.h \ + /usr/include/c++/11/bits/mask_array.h \ + /usr/include/c++/11/bits/indirect_array.h /usr/include/c++/11/vector \ + /usr/include/c++/11/bits/stl_uninitialized.h \ + /usr/include/c++/11/bits/stl_vector.h \ + /usr/include/c++/11/bits/stl_bvector.h \ + /usr/include/c++/11/bits/vector.tcc \ + /home/haozhihan/Documents/abacus-develop/source/source_base/tool_quit.h diff --git a/build/source/source_base/CMakeFiles/base.dir/tool_quit.cpp.o b/build/source/source_base/CMakeFiles/base.dir/tool_quit.cpp.o new file mode 100644 index 0000000000..676ebc0985 Binary files /dev/null and b/build/source/source_base/CMakeFiles/base.dir/tool_quit.cpp.o differ diff --git a/build/source/source_base/CMakeFiles/base.dir/tool_quit.cpp.o.d b/build/source/source_base/CMakeFiles/base.dir/tool_quit.cpp.o.d new file mode 100644 index 0000000000..a00a779c18 --- /dev/null +++ b/build/source/source_base/CMakeFiles/base.dir/tool_quit.cpp.o.d @@ -0,0 +1,250 @@ +source/source_base/CMakeFiles/base.dir/tool_quit.cpp.o: \ + /home/haozhihan/Documents/abacus-develop/source/source_base/tool_quit.cpp \ + /usr/include/stdc-predef.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/tool_quit.h \ + /usr/include/c++/11/cassert \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++config.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/os_defines.h \ + /usr/include/features.h /usr/include/features-time64.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/cpu_defines.h \ + /usr/include/assert.h /usr/include/c++/11/complex \ + /usr/include/c++/11/bits/cpp_type_traits.h \ + /usr/include/c++/11/ext/type_traits.h /usr/include/c++/11/cmath \ + /usr/include/math.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/math-vector.h \ + /usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h \ + /usr/include/x86_64-linux-gnu/bits/flt-eval-method.h \ + /usr/include/x86_64-linux-gnu/bits/fp-logb.h \ + /usr/include/x86_64-linux-gnu/bits/fp-fast.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-narrow.h \ + /usr/include/x86_64-linux-gnu/bits/iscanonical.h \ + /usr/include/c++/11/bits/std_abs.h /usr/include/stdlib.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h \ + /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/atomic_wide_counter.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h /usr/include/c++/11/sstream \ + /usr/include/c++/11/istream /usr/include/c++/11/ios \ + /usr/include/c++/11/iosfwd /usr/include/c++/11/bits/stringfwd.h \ + /usr/include/c++/11/bits/memoryfwd.h /usr/include/c++/11/bits/postypes.h \ + /usr/include/c++/11/cwchar /usr/include/wchar.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/wchar.h \ + /usr/include/x86_64-linux-gnu/bits/types/wint_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/wchar2.h \ + /usr/include/c++/11/exception /usr/include/c++/11/bits/exception.h \ + /usr/include/c++/11/bits/exception_ptr.h \ + /usr/include/c++/11/bits/exception_defines.h \ + /usr/include/c++/11/bits/cxxabi_init_exception.h \ + /usr/include/c++/11/typeinfo /usr/include/c++/11/bits/hash_bytes.h \ + /usr/include/c++/11/new /usr/include/c++/11/bits/move.h \ + /usr/include/c++/11/type_traits \ + /usr/include/c++/11/bits/nested_exception.h \ + /usr/include/c++/11/bits/char_traits.h \ + /usr/include/c++/11/bits/stl_algobase.h \ + /usr/include/c++/11/bits/functexcept.h \ + /usr/include/c++/11/ext/numeric_traits.h \ + /usr/include/c++/11/bits/stl_pair.h \ + /usr/include/c++/11/bits/stl_iterator_base_types.h \ + /usr/include/c++/11/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/11/bits/concept_check.h \ + /usr/include/c++/11/debug/assertions.h \ + /usr/include/c++/11/bits/stl_iterator.h \ + /usr/include/c++/11/bits/ptr_traits.h /usr/include/c++/11/debug/debug.h \ + /usr/include/c++/11/bits/predefined_ops.h /usr/include/c++/11/cstdint \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdint.h /usr/include/stdint.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-uintn.h \ + /usr/include/c++/11/bits/localefwd.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++locale.h \ + /usr/include/c++/11/clocale /usr/include/locale.h \ + /usr/include/x86_64-linux-gnu/bits/locale.h /usr/include/c++/11/cctype \ + /usr/include/ctype.h /usr/include/c++/11/bits/ios_base.h \ + /usr/include/c++/11/ext/atomicity.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr-default.h \ + /usr/include/pthread.h /usr/include/sched.h \ + /usr/include/x86_64-linux-gnu/bits/sched.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h \ + /usr/include/x86_64-linux-gnu/bits/cpu-set.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/timex.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h \ + /usr/include/x86_64-linux-gnu/bits/setjmp.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct___jmp_buf_tag.h \ + /usr/include/x86_64-linux-gnu/bits/pthread_stack_min-dynamic.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/atomic_word.h \ + /usr/include/x86_64-linux-gnu/sys/single_threaded.h \ + /usr/include/c++/11/bits/locale_classes.h /usr/include/c++/11/string \ + /usr/include/c++/11/bits/allocator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++allocator.h \ + /usr/include/c++/11/ext/new_allocator.h \ + /usr/include/c++/11/bits/ostream_insert.h \ + /usr/include/c++/11/bits/cxxabi_forced.h \ + /usr/include/c++/11/bits/stl_function.h \ + /usr/include/c++/11/backward/binders.h \ + /usr/include/c++/11/bits/range_access.h \ + /usr/include/c++/11/initializer_list \ + /usr/include/c++/11/bits/basic_string.h \ + /usr/include/c++/11/ext/alloc_traits.h \ + /usr/include/c++/11/bits/alloc_traits.h \ + /usr/include/c++/11/bits/stl_construct.h \ + /usr/include/c++/11/ext/string_conversions.h /usr/include/c++/11/cstdlib \ + /usr/include/c++/11/cstdio /usr/include/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/c++/11/cerrno \ + /usr/include/errno.h /usr/include/x86_64-linux-gnu/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/bits/types/error_t.h \ + /usr/include/c++/11/bits/charconv.h \ + /usr/include/c++/11/bits/functional_hash.h \ + /usr/include/c++/11/bits/basic_string.tcc \ + /usr/include/c++/11/bits/locale_classes.tcc \ + /usr/include/c++/11/system_error \ + /usr/include/x86_64-linux-gnu/c++/11/bits/error_constants.h \ + /usr/include/c++/11/stdexcept /usr/include/c++/11/streambuf \ + /usr/include/c++/11/bits/streambuf.tcc \ + /usr/include/c++/11/bits/basic_ios.h \ + /usr/include/c++/11/bits/locale_facets.h /usr/include/c++/11/cwctype \ + /usr/include/wctype.h /usr/include/x86_64-linux-gnu/bits/wctype-wchar.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_base.h \ + /usr/include/c++/11/bits/streambuf_iterator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_inline.h \ + /usr/include/c++/11/bits/locale_facets.tcc \ + /usr/include/c++/11/bits/basic_ios.tcc /usr/include/c++/11/ostream \ + /usr/include/c++/11/bits/ostream.tcc \ + /usr/include/c++/11/bits/istream.tcc \ + /usr/include/c++/11/bits/sstream.tcc /usr/include/c++/11/fstream \ + /usr/include/c++/11/bits/codecvt.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/basic_file.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++io.h \ + /usr/include/c++/11/bits/fstream.tcc /usr/include/c++/11/iomanip \ + /usr/include/c++/11/locale \ + /usr/include/c++/11/bits/locale_facets_nonio.h /usr/include/c++/11/ctime \ + /usr/include/x86_64-linux-gnu/c++/11/bits/time_members.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/messages_members.h \ + /usr/include/libintl.h /usr/include/c++/11/bits/locale_facets_nonio.tcc \ + /usr/include/c++/11/bits/locale_conv.h \ + /usr/include/c++/11/bits/unique_ptr.h /usr/include/c++/11/utility \ + /usr/include/c++/11/bits/stl_relops.h /usr/include/c++/11/tuple \ + /usr/include/c++/11/array /usr/include/c++/11/bits/uses_allocator.h \ + /usr/include/c++/11/bits/invoke.h /usr/include/c++/11/iostream \ + /usr/include/c++/11/valarray /usr/include/c++/11/algorithm \ + /usr/include/c++/11/bits/stl_algo.h \ + /usr/include/c++/11/bits/algorithmfwd.h \ + /usr/include/c++/11/bits/stl_heap.h \ + /usr/include/c++/11/bits/stl_tempbuf.h \ + /usr/include/c++/11/bits/uniform_int_dist.h \ + /usr/include/c++/11/bits/valarray_array.h \ + /usr/include/c++/11/bits/valarray_array.tcc \ + /usr/include/c++/11/bits/valarray_before.h \ + /usr/include/c++/11/bits/slice_array.h \ + /usr/include/c++/11/bits/valarray_after.h \ + /usr/include/c++/11/bits/gslice.h \ + /usr/include/c++/11/bits/gslice_array.h \ + /usr/include/c++/11/bits/mask_array.h \ + /usr/include/c++/11/bits/indirect_array.h /usr/include/c++/11/vector \ + /usr/include/c++/11/bits/stl_uninitialized.h \ + /usr/include/c++/11/bits/stl_vector.h \ + /usr/include/c++/11/bits/stl_bvector.h \ + /usr/include/c++/11/bits/vector.tcc \ + /usr/lib/x86_64-linux-gnu/openmpi/include/mpi.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/mpi_portable_platform.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/mpicxx.h \ + /usr/include/c++/11/map /usr/include/c++/11/bits/stl_tree.h \ + /usr/include/c++/11/ext/aligned_buffer.h \ + /usr/include/c++/11/bits/stl_map.h \ + /usr/include/c++/11/bits/stl_multimap.h \ + /usr/include/c++/11/bits/erase_if.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/constants.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/functions.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/datatype.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/exception.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/op.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/status.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/request.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/group.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/comm.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/win.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/file.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/errhandler.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/intracomm.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/topology.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/intercomm.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/info.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/datatype_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/functions_inln.h \ + /usr/include/string.h /usr/include/strings.h \ + /usr/include/x86_64-linux-gnu/bits/strings_fortified.h \ + /usr/include/x86_64-linux-gnu/bits/string_fortified.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/request_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/comm_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/intracomm_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/topology_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/intercomm_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/group_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/op_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/errhandler_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/status_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/info_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/win_inln.h \ + /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/file_inln.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/global_variable.h \ + /home/haozhihan/Documents/abacus-develop/source/module_parameter/parameter.h \ + /home/haozhihan/Documents/abacus-develop/source/module_parameter/input_parameter.h \ + /home/haozhihan/Documents/abacus-develop/source/module_parameter/md_parameter.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/vector3.h \ + /home/haozhihan/Documents/abacus-develop/source/module_parameter/system_parameter.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/global_file.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/timer.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/memory.h diff --git a/build/source/source_base/CMakeFiles/base.dir/tool_title.cpp.o b/build/source/source_base/CMakeFiles/base.dir/tool_title.cpp.o new file mode 100644 index 0000000000..49b777ff30 Binary files /dev/null and b/build/source/source_base/CMakeFiles/base.dir/tool_title.cpp.o differ diff --git a/build/source/source_base/CMakeFiles/base.dir/tool_title.cpp.o.d b/build/source/source_base/CMakeFiles/base.dir/tool_title.cpp.o.d new file mode 100644 index 0000000000..4419c8c973 --- /dev/null +++ b/build/source/source_base/CMakeFiles/base.dir/tool_title.cpp.o.d @@ -0,0 +1,213 @@ +source/source_base/CMakeFiles/base.dir/tool_title.cpp.o: \ + /home/haozhihan/Documents/abacus-develop/source/source_base/tool_title.cpp \ + /usr/include/stdc-predef.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/tool_title.h \ + /usr/include/c++/11/vector /usr/include/c++/11/bits/stl_algobase.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++config.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/os_defines.h \ + /usr/include/features.h /usr/include/features-time64.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/cpu_defines.h \ + /usr/include/c++/11/bits/functexcept.h \ + /usr/include/c++/11/bits/exception_defines.h \ + /usr/include/c++/11/bits/cpp_type_traits.h \ + /usr/include/c++/11/ext/type_traits.h \ + /usr/include/c++/11/ext/numeric_traits.h \ + /usr/include/c++/11/bits/stl_pair.h /usr/include/c++/11/bits/move.h \ + /usr/include/c++/11/type_traits \ + /usr/include/c++/11/bits/stl_iterator_base_types.h \ + /usr/include/c++/11/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/11/bits/concept_check.h \ + /usr/include/c++/11/debug/assertions.h \ + /usr/include/c++/11/bits/stl_iterator.h \ + /usr/include/c++/11/bits/ptr_traits.h /usr/include/c++/11/debug/debug.h \ + /usr/include/c++/11/bits/predefined_ops.h \ + /usr/include/c++/11/bits/allocator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++allocator.h \ + /usr/include/c++/11/ext/new_allocator.h /usr/include/c++/11/new \ + /usr/include/c++/11/bits/exception.h \ + /usr/include/c++/11/bits/memoryfwd.h \ + /usr/include/c++/11/bits/stl_construct.h \ + /usr/include/c++/11/bits/stl_uninitialized.h \ + /usr/include/c++/11/ext/alloc_traits.h \ + /usr/include/c++/11/bits/alloc_traits.h \ + /usr/include/c++/11/bits/stl_vector.h \ + /usr/include/c++/11/initializer_list \ + /usr/include/c++/11/bits/stl_bvector.h \ + /usr/include/c++/11/bits/functional_hash.h \ + /usr/include/c++/11/bits/hash_bytes.h \ + /usr/include/c++/11/bits/range_access.h \ + /usr/include/c++/11/bits/vector.tcc /usr/include/c++/11/valarray \ + /usr/include/c++/11/cmath /usr/include/math.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/math-vector.h \ + /usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h \ + /usr/include/x86_64-linux-gnu/bits/flt-eval-method.h \ + /usr/include/x86_64-linux-gnu/bits/fp-logb.h \ + /usr/include/x86_64-linux-gnu/bits/fp-fast.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-narrow.h \ + /usr/include/x86_64-linux-gnu/bits/iscanonical.h \ + /usr/include/c++/11/bits/std_abs.h /usr/include/stdlib.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h \ + /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/atomic_wide_counter.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/include/c++/11/algorithm /usr/include/c++/11/utility \ + /usr/include/c++/11/bits/stl_relops.h \ + /usr/include/c++/11/bits/stl_algo.h /usr/include/c++/11/cstdlib \ + /usr/include/c++/11/bits/algorithmfwd.h \ + /usr/include/c++/11/bits/stl_heap.h \ + /usr/include/c++/11/bits/stl_tempbuf.h \ + /usr/include/c++/11/bits/uniform_int_dist.h \ + /usr/include/c++/11/bits/valarray_array.h \ + /usr/include/c++/11/bits/valarray_array.tcc \ + /usr/include/c++/11/bits/valarray_before.h \ + /usr/include/c++/11/bits/slice_array.h \ + /usr/include/c++/11/bits/valarray_after.h \ + /usr/include/c++/11/bits/gslice.h \ + /usr/include/c++/11/bits/gslice_array.h \ + /usr/include/c++/11/bits/mask_array.h \ + /usr/include/c++/11/bits/indirect_array.h /usr/include/c++/11/string \ + /usr/include/c++/11/bits/stringfwd.h \ + /usr/include/c++/11/bits/char_traits.h \ + /usr/include/c++/11/bits/postypes.h /usr/include/c++/11/cwchar \ + /usr/include/wchar.h /usr/lib/gcc/x86_64-linux-gnu/11/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/wchar.h \ + /usr/include/x86_64-linux-gnu/bits/types/wint_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/wchar2.h /usr/include/c++/11/cstdint \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdint.h /usr/include/stdint.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-uintn.h \ + /usr/include/c++/11/bits/localefwd.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++locale.h \ + /usr/include/c++/11/clocale /usr/include/locale.h \ + /usr/include/x86_64-linux-gnu/bits/locale.h /usr/include/c++/11/iosfwd \ + /usr/include/c++/11/cctype /usr/include/ctype.h \ + /usr/include/c++/11/bits/ostream_insert.h \ + /usr/include/c++/11/bits/cxxabi_forced.h \ + /usr/include/c++/11/bits/stl_function.h \ + /usr/include/c++/11/backward/binders.h \ + /usr/include/c++/11/bits/basic_string.h \ + /usr/include/c++/11/ext/atomicity.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr-default.h \ + /usr/include/pthread.h /usr/include/sched.h \ + /usr/include/x86_64-linux-gnu/bits/sched.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h \ + /usr/include/x86_64-linux-gnu/bits/cpu-set.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/timex.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h \ + /usr/include/x86_64-linux-gnu/bits/setjmp.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct___jmp_buf_tag.h \ + /usr/include/x86_64-linux-gnu/bits/pthread_stack_min-dynamic.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/atomic_word.h \ + /usr/include/x86_64-linux-gnu/sys/single_threaded.h \ + /usr/include/c++/11/ext/string_conversions.h /usr/include/c++/11/cstdio \ + /usr/include/stdio.h /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/c++/11/cerrno \ + /usr/include/errno.h /usr/include/x86_64-linux-gnu/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/bits/types/error_t.h \ + /usr/include/c++/11/bits/charconv.h \ + /usr/include/c++/11/bits/basic_string.tcc /usr/include/c++/11/fstream \ + /usr/include/c++/11/istream /usr/include/c++/11/ios \ + /usr/include/c++/11/exception /usr/include/c++/11/bits/exception_ptr.h \ + /usr/include/c++/11/bits/cxxabi_init_exception.h \ + /usr/include/c++/11/typeinfo /usr/include/c++/11/bits/nested_exception.h \ + /usr/include/c++/11/bits/ios_base.h \ + /usr/include/c++/11/bits/locale_classes.h \ + /usr/include/c++/11/bits/locale_classes.tcc \ + /usr/include/c++/11/system_error \ + /usr/include/x86_64-linux-gnu/c++/11/bits/error_constants.h \ + /usr/include/c++/11/stdexcept /usr/include/c++/11/streambuf \ + /usr/include/c++/11/bits/streambuf.tcc \ + /usr/include/c++/11/bits/basic_ios.h \ + /usr/include/c++/11/bits/locale_facets.h /usr/include/c++/11/cwctype \ + /usr/include/wctype.h /usr/include/x86_64-linux-gnu/bits/wctype-wchar.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_base.h \ + /usr/include/c++/11/bits/streambuf_iterator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_inline.h \ + /usr/include/c++/11/bits/locale_facets.tcc \ + /usr/include/c++/11/bits/basic_ios.tcc /usr/include/c++/11/ostream \ + /usr/include/c++/11/bits/ostream.tcc \ + /usr/include/c++/11/bits/istream.tcc /usr/include/c++/11/bits/codecvt.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/basic_file.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++io.h \ + /usr/include/c++/11/bits/fstream.tcc /usr/include/c++/11/iostream \ + /usr/include/c++/11/iomanip /usr/include/c++/11/locale \ + /usr/include/c++/11/bits/locale_facets_nonio.h /usr/include/c++/11/ctime \ + /usr/include/x86_64-linux-gnu/c++/11/bits/time_members.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/messages_members.h \ + /usr/include/libintl.h /usr/include/c++/11/bits/locale_facets_nonio.tcc \ + /usr/include/c++/11/bits/locale_conv.h \ + /usr/include/c++/11/bits/unique_ptr.h /usr/include/c++/11/tuple \ + /usr/include/c++/11/array /usr/include/c++/11/bits/uses_allocator.h \ + /usr/include/c++/11/bits/invoke.h /usr/include/c++/11/complex \ + /usr/include/c++/11/sstream /usr/include/c++/11/bits/sstream.tcc \ + /usr/include/c++/11/cassert /usr/include/assert.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/global_variable.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/global_function.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/blas_connector.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_device/types.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/macros.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/global_function-func_each_2.h \ + /usr/include/c++/11/functional /usr/include/c++/11/bits/refwrap.h \ + /usr/include/c++/11/bits/std_function.h /usr/include/c++/11/map \ + /usr/include/c++/11/bits/stl_tree.h \ + /usr/include/c++/11/ext/aligned_buffer.h \ + /usr/include/c++/11/bits/stl_map.h \ + /usr/include/c++/11/bits/stl_multimap.h \ + /usr/include/c++/11/bits/erase_if.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/tool_check.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/tool_quit.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/timer.h diff --git a/build/source/source_base/CMakeFiles/base.dir/ylm.cpp.o b/build/source/source_base/CMakeFiles/base.dir/ylm.cpp.o new file mode 100644 index 0000000000..5ad6d55d19 Binary files /dev/null and b/build/source/source_base/CMakeFiles/base.dir/ylm.cpp.o differ diff --git a/build/source/source_base/CMakeFiles/base.dir/ylm.cpp.o.d b/build/source/source_base/CMakeFiles/base.dir/ylm.cpp.o.d new file mode 100644 index 0000000000..bf0dafd180 --- /dev/null +++ b/build/source/source_base/CMakeFiles/base.dir/ylm.cpp.o.d @@ -0,0 +1,210 @@ +source/source_base/CMakeFiles/base.dir/ylm.cpp.o: \ + /home/haozhihan/Documents/abacus-develop/source/source_base/ylm.cpp \ + /usr/include/stdc-predef.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/ylm.h \ + /usr/include/c++/11/vector /usr/include/c++/11/bits/stl_algobase.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++config.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/os_defines.h \ + /usr/include/features.h /usr/include/features-time64.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/cpu_defines.h \ + /usr/include/c++/11/bits/functexcept.h \ + /usr/include/c++/11/bits/exception_defines.h \ + /usr/include/c++/11/bits/cpp_type_traits.h \ + /usr/include/c++/11/ext/type_traits.h \ + /usr/include/c++/11/ext/numeric_traits.h \ + /usr/include/c++/11/bits/stl_pair.h /usr/include/c++/11/bits/move.h \ + /usr/include/c++/11/type_traits \ + /usr/include/c++/11/bits/stl_iterator_base_types.h \ + /usr/include/c++/11/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/11/bits/concept_check.h \ + /usr/include/c++/11/debug/assertions.h \ + /usr/include/c++/11/bits/stl_iterator.h \ + /usr/include/c++/11/bits/ptr_traits.h /usr/include/c++/11/debug/debug.h \ + /usr/include/c++/11/bits/predefined_ops.h \ + /usr/include/c++/11/bits/allocator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++allocator.h \ + /usr/include/c++/11/ext/new_allocator.h /usr/include/c++/11/new \ + /usr/include/c++/11/bits/exception.h \ + /usr/include/c++/11/bits/memoryfwd.h \ + /usr/include/c++/11/bits/stl_construct.h \ + /usr/include/c++/11/bits/stl_uninitialized.h \ + /usr/include/c++/11/ext/alloc_traits.h \ + /usr/include/c++/11/bits/alloc_traits.h \ + /usr/include/c++/11/bits/stl_vector.h \ + /usr/include/c++/11/initializer_list \ + /usr/include/c++/11/bits/stl_bvector.h \ + /usr/include/c++/11/bits/functional_hash.h \ + /usr/include/c++/11/bits/hash_bytes.h \ + /usr/include/c++/11/bits/range_access.h \ + /usr/include/c++/11/bits/vector.tcc \ + /home/haozhihan/Documents/abacus-develop/source/source_base/vector3.h \ + /usr/include/c++/11/cmath /usr/include/math.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/math-vector.h \ + /usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h \ + /usr/include/x86_64-linux-gnu/bits/flt-eval-method.h \ + /usr/include/x86_64-linux-gnu/bits/fp-logb.h \ + /usr/include/x86_64-linux-gnu/bits/fp-fast.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-narrow.h \ + /usr/include/x86_64-linux-gnu/bits/iscanonical.h \ + /usr/include/c++/11/bits/std_abs.h /usr/include/stdlib.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h \ + /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/atomic_wide_counter.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h /usr/include/c++/11/iomanip \ + /usr/include/c++/11/iosfwd /usr/include/c++/11/bits/stringfwd.h \ + /usr/include/c++/11/bits/postypes.h /usr/include/c++/11/cwchar \ + /usr/include/wchar.h /usr/lib/gcc/x86_64-linux-gnu/11/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/wchar.h \ + /usr/include/x86_64-linux-gnu/bits/types/wint_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/wchar2.h \ + /usr/include/c++/11/bits/ios_base.h /usr/include/c++/11/ext/atomicity.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr-default.h \ + /usr/include/pthread.h /usr/include/sched.h \ + /usr/include/x86_64-linux-gnu/bits/sched.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h \ + /usr/include/x86_64-linux-gnu/bits/cpu-set.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/timex.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h \ + /usr/include/x86_64-linux-gnu/bits/setjmp.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct___jmp_buf_tag.h \ + /usr/include/x86_64-linux-gnu/bits/pthread_stack_min-dynamic.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/atomic_word.h \ + /usr/include/x86_64-linux-gnu/sys/single_threaded.h \ + /usr/include/c++/11/bits/localefwd.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++locale.h \ + /usr/include/c++/11/clocale /usr/include/locale.h \ + /usr/include/x86_64-linux-gnu/bits/locale.h /usr/include/c++/11/cctype \ + /usr/include/ctype.h /usr/include/c++/11/bits/locale_classes.h \ + /usr/include/c++/11/string /usr/include/c++/11/bits/char_traits.h \ + /usr/include/c++/11/cstdint \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdint.h /usr/include/stdint.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-uintn.h \ + /usr/include/c++/11/bits/ostream_insert.h \ + /usr/include/c++/11/bits/cxxabi_forced.h \ + /usr/include/c++/11/bits/stl_function.h \ + /usr/include/c++/11/backward/binders.h \ + /usr/include/c++/11/bits/basic_string.h \ + /usr/include/c++/11/ext/string_conversions.h /usr/include/c++/11/cstdlib \ + /usr/include/c++/11/cstdio /usr/include/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/c++/11/cerrno \ + /usr/include/errno.h /usr/include/x86_64-linux-gnu/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/bits/types/error_t.h \ + /usr/include/c++/11/bits/charconv.h \ + /usr/include/c++/11/bits/basic_string.tcc \ + /usr/include/c++/11/bits/locale_classes.tcc \ + /usr/include/c++/11/system_error \ + /usr/include/x86_64-linux-gnu/c++/11/bits/error_constants.h \ + /usr/include/c++/11/stdexcept /usr/include/c++/11/exception \ + /usr/include/c++/11/bits/exception_ptr.h \ + /usr/include/c++/11/bits/cxxabi_init_exception.h \ + /usr/include/c++/11/typeinfo /usr/include/c++/11/bits/nested_exception.h \ + /usr/include/c++/11/locale /usr/include/c++/11/bits/locale_facets.h \ + /usr/include/c++/11/cwctype /usr/include/wctype.h \ + /usr/include/x86_64-linux-gnu/bits/wctype-wchar.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_base.h \ + /usr/include/c++/11/streambuf /usr/include/c++/11/bits/streambuf.tcc \ + /usr/include/c++/11/bits/streambuf_iterator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_inline.h \ + /usr/include/c++/11/bits/locale_facets.tcc \ + /usr/include/c++/11/bits/locale_facets_nonio.h /usr/include/c++/11/ctime \ + /usr/include/x86_64-linux-gnu/c++/11/bits/time_members.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/messages_members.h \ + /usr/include/libintl.h /usr/include/c++/11/bits/codecvt.h \ + /usr/include/c++/11/bits/locale_facets_nonio.tcc \ + /usr/include/c++/11/bits/locale_conv.h \ + /usr/include/c++/11/bits/unique_ptr.h /usr/include/c++/11/utility \ + /usr/include/c++/11/bits/stl_relops.h /usr/include/c++/11/tuple \ + /usr/include/c++/11/array /usr/include/c++/11/bits/uses_allocator.h \ + /usr/include/c++/11/bits/invoke.h /usr/include/c++/11/iostream \ + /usr/include/c++/11/ostream /usr/include/c++/11/ios \ + /usr/include/c++/11/bits/basic_ios.h \ + /usr/include/c++/11/bits/basic_ios.tcc \ + /usr/include/c++/11/bits/ostream.tcc /usr/include/c++/11/istream \ + /usr/include/c++/11/bits/istream.tcc /usr/include/c++/11/cassert \ + /usr/include/assert.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/constants.h \ + /usr/include/c++/11/complex /usr/include/c++/11/sstream \ + /usr/include/c++/11/bits/sstream.tcc \ + /home/haozhihan/Documents/abacus-develop/source/source_base/timer.h \ + /usr/include/c++/11/fstream \ + /usr/include/x86_64-linux-gnu/c++/11/bits/basic_file.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++io.h \ + /usr/include/c++/11/bits/fstream.tcc /usr/include/c++/11/map \ + /usr/include/c++/11/bits/stl_tree.h \ + /usr/include/c++/11/ext/aligned_buffer.h \ + /usr/include/c++/11/bits/stl_map.h \ + /usr/include/c++/11/bits/stl_multimap.h \ + /usr/include/c++/11/bits/erase_if.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/tool_quit.h \ + /usr/include/c++/11/valarray /usr/include/c++/11/algorithm \ + /usr/include/c++/11/bits/stl_algo.h \ + /usr/include/c++/11/bits/algorithmfwd.h \ + /usr/include/c++/11/bits/stl_heap.h \ + /usr/include/c++/11/bits/stl_tempbuf.h \ + /usr/include/c++/11/bits/uniform_int_dist.h \ + /usr/include/c++/11/bits/valarray_array.h \ + /usr/include/c++/11/bits/valarray_array.tcc \ + /usr/include/c++/11/bits/valarray_before.h \ + /usr/include/c++/11/bits/slice_array.h \ + /usr/include/c++/11/bits/valarray_after.h \ + /usr/include/c++/11/bits/gslice.h \ + /usr/include/c++/11/bits/gslice_array.h \ + /usr/include/c++/11/bits/mask_array.h \ + /usr/include/c++/11/bits/indirect_array.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/array_pool.h diff --git a/build/source/source_base/CMakeFiles/progress.marks b/build/source/source_base/CMakeFiles/progress.marks new file mode 100644 index 0000000000..b4de394767 --- /dev/null +++ b/build/source/source_base/CMakeFiles/progress.marks @@ -0,0 +1 @@ +11 diff --git a/build/source/source_base/Makefile b/build/source/source_base/Makefile new file mode 100644 index 0000000000..b8e4dfdedd --- /dev/null +++ b/build/source/source_base/Makefile @@ -0,0 +1,1689 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.27 + +# Default target executed when no arguments are given to make. +default_target: all +.PHONY : default_target + +# Allow only one "make -f Makefile2" at a time, but pass parallelism. +.NOTPARALLEL: + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Disable VCS-based implicit rules. +% : %,v + +# Disable VCS-based implicit rules. +% : RCS/% + +# Disable VCS-based implicit rules. +% : RCS/%,v + +# Disable VCS-based implicit rules. +% : SCCS/s.% + +# Disable VCS-based implicit rules. +% : s.% + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Command-line flag to silence nested $(MAKE). +$(VERBOSE)MAKESILENT = -s + +#Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E rm -f + +# Escaping for special characters. +EQUALS = = + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/haozhihan/Documents/abacus-develop + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/haozhihan/Documents/abacus-develop/build + +#============================================================================= +# Targets provided globally by CMake. + +# Special rule for the target edit_cache +edit_cache: + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "No interactive CMake dialog available..." + /usr/bin/cmake -E echo No\ interactive\ CMake\ dialog\ available. +.PHONY : edit_cache + +# Special rule for the target edit_cache +edit_cache/fast: edit_cache +.PHONY : edit_cache/fast + +# Special rule for the target rebuild_cache +rebuild_cache: + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Running CMake to regenerate build system..." + /usr/bin/cmake --regenerate-during-build -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) +.PHONY : rebuild_cache + +# Special rule for the target rebuild_cache +rebuild_cache/fast: rebuild_cache +.PHONY : rebuild_cache/fast + +# Special rule for the target list_install_components +list_install_components: + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Available install components are: \"Unspecified\"" +.PHONY : list_install_components + +# Special rule for the target list_install_components +list_install_components/fast: list_install_components +.PHONY : list_install_components/fast + +# Special rule for the target install +install: preinstall + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Install the project..." + /usr/bin/cmake -P cmake_install.cmake +.PHONY : install + +# Special rule for the target install +install/fast: preinstall/fast + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Install the project..." + /usr/bin/cmake -P cmake_install.cmake +.PHONY : install/fast + +# Special rule for the target install/local +install/local: preinstall + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing only the local directory..." + /usr/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake +.PHONY : install/local + +# Special rule for the target install/local +install/local/fast: preinstall/fast + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing only the local directory..." + /usr/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake +.PHONY : install/local/fast + +# Special rule for the target install/strip +install/strip: preinstall + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing the project stripped..." + /usr/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake +.PHONY : install/strip + +# Special rule for the target install/strip +install/strip/fast: preinstall/fast + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing the project stripped..." + /usr/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake +.PHONY : install/strip/fast + +# The main all target +all: cmake_check_build_system + cd /home/haozhihan/Documents/abacus-develop/build && $(CMAKE_COMMAND) -E cmake_progress_start /home/haozhihan/Documents/abacus-develop/build/CMakeFiles /home/haozhihan/Documents/abacus-develop/build/source/source_base//CMakeFiles/progress.marks + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 source/source_base/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/haozhihan/Documents/abacus-develop/build/CMakeFiles 0 +.PHONY : all + +# The main clean target +clean: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 source/source_base/clean +.PHONY : clean + +# The main clean target +clean/fast: clean +.PHONY : clean/fast + +# Prepare targets for installation. +preinstall: all + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 source/source_base/preinstall +.PHONY : preinstall + +# Prepare targets for installation. +preinstall/fast: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 source/source_base/preinstall +.PHONY : preinstall/fast + +# clear depends +depend: + cd /home/haozhihan/Documents/abacus-develop/build && $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 +.PHONY : depend + +# Convenience name for target. +source/source_base/CMakeFiles/base.dir/rule: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 source/source_base/CMakeFiles/base.dir/rule +.PHONY : source/source_base/CMakeFiles/base.dir/rule + +# Convenience name for target. +base: source/source_base/CMakeFiles/base.dir/rule +.PHONY : base + +# fast build rule for target. +base/fast: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/build +.PHONY : base/fast + +abfs-vector3_order.o: abfs-vector3_order.cpp.o +.PHONY : abfs-vector3_order.o + +# target to build an object file +abfs-vector3_order.cpp.o: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/abfs-vector3_order.cpp.o +.PHONY : abfs-vector3_order.cpp.o + +abfs-vector3_order.i: abfs-vector3_order.cpp.i +.PHONY : abfs-vector3_order.i + +# target to preprocess a source file +abfs-vector3_order.cpp.i: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/abfs-vector3_order.cpp.i +.PHONY : abfs-vector3_order.cpp.i + +abfs-vector3_order.s: abfs-vector3_order.cpp.s +.PHONY : abfs-vector3_order.s + +# target to generate assembly for a file +abfs-vector3_order.cpp.s: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/abfs-vector3_order.cpp.s +.PHONY : abfs-vector3_order.cpp.s + +assoc_laguerre.o: assoc_laguerre.cpp.o +.PHONY : assoc_laguerre.o + +# target to build an object file +assoc_laguerre.cpp.o: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/assoc_laguerre.cpp.o +.PHONY : assoc_laguerre.cpp.o + +assoc_laguerre.i: assoc_laguerre.cpp.i +.PHONY : assoc_laguerre.i + +# target to preprocess a source file +assoc_laguerre.cpp.i: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/assoc_laguerre.cpp.i +.PHONY : assoc_laguerre.cpp.i + +assoc_laguerre.s: assoc_laguerre.cpp.s +.PHONY : assoc_laguerre.s + +# target to generate assembly for a file +assoc_laguerre.cpp.s: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/assoc_laguerre.cpp.s +.PHONY : assoc_laguerre.cpp.s + +blas_connector_base.o: blas_connector_base.cpp.o +.PHONY : blas_connector_base.o + +# target to build an object file +blas_connector_base.cpp.o: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/blas_connector_base.cpp.o +.PHONY : blas_connector_base.cpp.o + +blas_connector_base.i: blas_connector_base.cpp.i +.PHONY : blas_connector_base.i + +# target to preprocess a source file +blas_connector_base.cpp.i: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/blas_connector_base.cpp.i +.PHONY : blas_connector_base.cpp.i + +blas_connector_base.s: blas_connector_base.cpp.s +.PHONY : blas_connector_base.s + +# target to generate assembly for a file +blas_connector_base.cpp.s: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/blas_connector_base.cpp.s +.PHONY : blas_connector_base.cpp.s + +blas_connector_matrix.o: blas_connector_matrix.cpp.o +.PHONY : blas_connector_matrix.o + +# target to build an object file +blas_connector_matrix.cpp.o: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/blas_connector_matrix.cpp.o +.PHONY : blas_connector_matrix.cpp.o + +blas_connector_matrix.i: blas_connector_matrix.cpp.i +.PHONY : blas_connector_matrix.i + +# target to preprocess a source file +blas_connector_matrix.cpp.i: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/blas_connector_matrix.cpp.i +.PHONY : blas_connector_matrix.cpp.i + +blas_connector_matrix.s: blas_connector_matrix.cpp.s +.PHONY : blas_connector_matrix.s + +# target to generate assembly for a file +blas_connector_matrix.cpp.s: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/blas_connector_matrix.cpp.s +.PHONY : blas_connector_matrix.cpp.s + +blas_connector_vector.o: blas_connector_vector.cpp.o +.PHONY : blas_connector_vector.o + +# target to build an object file +blas_connector_vector.cpp.o: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/blas_connector_vector.cpp.o +.PHONY : blas_connector_vector.cpp.o + +blas_connector_vector.i: blas_connector_vector.cpp.i +.PHONY : blas_connector_vector.i + +# target to preprocess a source file +blas_connector_vector.cpp.i: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/blas_connector_vector.cpp.i +.PHONY : blas_connector_vector.cpp.i + +blas_connector_vector.s: blas_connector_vector.cpp.s +.PHONY : blas_connector_vector.s + +# target to generate assembly for a file +blas_connector_vector.cpp.s: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/blas_connector_vector.cpp.s +.PHONY : blas_connector_vector.cpp.s + +clebsch_gordan_coeff.o: clebsch_gordan_coeff.cpp.o +.PHONY : clebsch_gordan_coeff.o + +# target to build an object file +clebsch_gordan_coeff.cpp.o: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/clebsch_gordan_coeff.cpp.o +.PHONY : clebsch_gordan_coeff.cpp.o + +clebsch_gordan_coeff.i: clebsch_gordan_coeff.cpp.i +.PHONY : clebsch_gordan_coeff.i + +# target to preprocess a source file +clebsch_gordan_coeff.cpp.i: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/clebsch_gordan_coeff.cpp.i +.PHONY : clebsch_gordan_coeff.cpp.i + +clebsch_gordan_coeff.s: clebsch_gordan_coeff.cpp.s +.PHONY : clebsch_gordan_coeff.s + +# target to generate assembly for a file +clebsch_gordan_coeff.cpp.s: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/clebsch_gordan_coeff.cpp.s +.PHONY : clebsch_gordan_coeff.cpp.s + +complexarray.o: complexarray.cpp.o +.PHONY : complexarray.o + +# target to build an object file +complexarray.cpp.o: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/complexarray.cpp.o +.PHONY : complexarray.cpp.o + +complexarray.i: complexarray.cpp.i +.PHONY : complexarray.i + +# target to preprocess a source file +complexarray.cpp.i: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/complexarray.cpp.i +.PHONY : complexarray.cpp.i + +complexarray.s: complexarray.cpp.s +.PHONY : complexarray.s + +# target to generate assembly for a file +complexarray.cpp.s: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/complexarray.cpp.s +.PHONY : complexarray.cpp.s + +complexmatrix.o: complexmatrix.cpp.o +.PHONY : complexmatrix.o + +# target to build an object file +complexmatrix.cpp.o: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/complexmatrix.cpp.o +.PHONY : complexmatrix.cpp.o + +complexmatrix.i: complexmatrix.cpp.i +.PHONY : complexmatrix.i + +# target to preprocess a source file +complexmatrix.cpp.i: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/complexmatrix.cpp.i +.PHONY : complexmatrix.cpp.i + +complexmatrix.s: complexmatrix.cpp.s +.PHONY : complexmatrix.s + +# target to generate assembly for a file +complexmatrix.cpp.s: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/complexmatrix.cpp.s +.PHONY : complexmatrix.cpp.s + +cubic_spline.o: cubic_spline.cpp.o +.PHONY : cubic_spline.o + +# target to build an object file +cubic_spline.cpp.o: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/cubic_spline.cpp.o +.PHONY : cubic_spline.cpp.o + +cubic_spline.i: cubic_spline.cpp.i +.PHONY : cubic_spline.i + +# target to preprocess a source file +cubic_spline.cpp.i: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/cubic_spline.cpp.i +.PHONY : cubic_spline.cpp.i + +cubic_spline.s: cubic_spline.cpp.s +.PHONY : cubic_spline.s + +# target to generate assembly for a file +cubic_spline.cpp.s: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/cubic_spline.cpp.s +.PHONY : cubic_spline.cpp.s + +element_basis_index.o: element_basis_index.cpp.o +.PHONY : element_basis_index.o + +# target to build an object file +element_basis_index.cpp.o: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/element_basis_index.cpp.o +.PHONY : element_basis_index.cpp.o + +element_basis_index.i: element_basis_index.cpp.i +.PHONY : element_basis_index.i + +# target to preprocess a source file +element_basis_index.cpp.i: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/element_basis_index.cpp.i +.PHONY : element_basis_index.cpp.i + +element_basis_index.s: element_basis_index.cpp.s +.PHONY : element_basis_index.s + +# target to generate assembly for a file +element_basis_index.cpp.s: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/element_basis_index.cpp.s +.PHONY : element_basis_index.cpp.s + +export.o: export.cpp.o +.PHONY : export.o + +# target to build an object file +export.cpp.o: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/export.cpp.o +.PHONY : export.cpp.o + +export.i: export.cpp.i +.PHONY : export.i + +# target to preprocess a source file +export.cpp.i: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/export.cpp.i +.PHONY : export.cpp.i + +export.s: export.cpp.s +.PHONY : export.s + +# target to generate assembly for a file +export.cpp.s: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/export.cpp.s +.PHONY : export.cpp.s + +gather_math_lib_info.o: gather_math_lib_info.cpp.o +.PHONY : gather_math_lib_info.o + +# target to build an object file +gather_math_lib_info.cpp.o: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/gather_math_lib_info.cpp.o +.PHONY : gather_math_lib_info.cpp.o + +gather_math_lib_info.i: gather_math_lib_info.cpp.i +.PHONY : gather_math_lib_info.i + +# target to preprocess a source file +gather_math_lib_info.cpp.i: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/gather_math_lib_info.cpp.i +.PHONY : gather_math_lib_info.cpp.i + +gather_math_lib_info.s: gather_math_lib_info.cpp.s +.PHONY : gather_math_lib_info.s + +# target to generate assembly for a file +gather_math_lib_info.cpp.s: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/gather_math_lib_info.cpp.s +.PHONY : gather_math_lib_info.cpp.s + +global_file.o: global_file.cpp.o +.PHONY : global_file.o + +# target to build an object file +global_file.cpp.o: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/global_file.cpp.o +.PHONY : global_file.cpp.o + +global_file.i: global_file.cpp.i +.PHONY : global_file.i + +# target to preprocess a source file +global_file.cpp.i: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/global_file.cpp.i +.PHONY : global_file.cpp.i + +global_file.s: global_file.cpp.s +.PHONY : global_file.s + +# target to generate assembly for a file +global_file.cpp.s: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/global_file.cpp.s +.PHONY : global_file.cpp.s + +global_function.o: global_function.cpp.o +.PHONY : global_function.o + +# target to build an object file +global_function.cpp.o: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/global_function.cpp.o +.PHONY : global_function.cpp.o + +global_function.i: global_function.cpp.i +.PHONY : global_function.i + +# target to preprocess a source file +global_function.cpp.i: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/global_function.cpp.i +.PHONY : global_function.cpp.i + +global_function.s: global_function.cpp.s +.PHONY : global_function.s + +# target to generate assembly for a file +global_function.cpp.s: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/global_function.cpp.s +.PHONY : global_function.cpp.s + +global_function_ddotreal.o: global_function_ddotreal.cpp.o +.PHONY : global_function_ddotreal.o + +# target to build an object file +global_function_ddotreal.cpp.o: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/global_function_ddotreal.cpp.o +.PHONY : global_function_ddotreal.cpp.o + +global_function_ddotreal.i: global_function_ddotreal.cpp.i +.PHONY : global_function_ddotreal.i + +# target to preprocess a source file +global_function_ddotreal.cpp.i: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/global_function_ddotreal.cpp.i +.PHONY : global_function_ddotreal.cpp.i + +global_function_ddotreal.s: global_function_ddotreal.cpp.s +.PHONY : global_function_ddotreal.s + +# target to generate assembly for a file +global_function_ddotreal.cpp.s: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/global_function_ddotreal.cpp.s +.PHONY : global_function_ddotreal.cpp.s + +global_variable.o: global_variable.cpp.o +.PHONY : global_variable.o + +# target to build an object file +global_variable.cpp.o: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/global_variable.cpp.o +.PHONY : global_variable.cpp.o + +global_variable.i: global_variable.cpp.i +.PHONY : global_variable.i + +# target to preprocess a source file +global_variable.cpp.i: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/global_variable.cpp.i +.PHONY : global_variable.cpp.i + +global_variable.s: global_variable.cpp.s +.PHONY : global_variable.s + +# target to generate assembly for a file +global_variable.cpp.s: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/global_variable.cpp.s +.PHONY : global_variable.cpp.s + +intarray.o: intarray.cpp.o +.PHONY : intarray.o + +# target to build an object file +intarray.cpp.o: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/intarray.cpp.o +.PHONY : intarray.cpp.o + +intarray.i: intarray.cpp.i +.PHONY : intarray.i + +# target to preprocess a source file +intarray.cpp.i: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/intarray.cpp.i +.PHONY : intarray.cpp.i + +intarray.s: intarray.cpp.s +.PHONY : intarray.s + +# target to generate assembly for a file +intarray.cpp.s: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/intarray.cpp.s +.PHONY : intarray.cpp.s + +inverse_matrix.o: inverse_matrix.cpp.o +.PHONY : inverse_matrix.o + +# target to build an object file +inverse_matrix.cpp.o: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/inverse_matrix.cpp.o +.PHONY : inverse_matrix.cpp.o + +inverse_matrix.i: inverse_matrix.cpp.i +.PHONY : inverse_matrix.i + +# target to preprocess a source file +inverse_matrix.cpp.i: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/inverse_matrix.cpp.i +.PHONY : inverse_matrix.cpp.i + +inverse_matrix.s: inverse_matrix.cpp.s +.PHONY : inverse_matrix.s + +# target to generate assembly for a file +inverse_matrix.cpp.s: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/inverse_matrix.cpp.s +.PHONY : inverse_matrix.cpp.s + +math_bspline.o: math_bspline.cpp.o +.PHONY : math_bspline.o + +# target to build an object file +math_bspline.cpp.o: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/math_bspline.cpp.o +.PHONY : math_bspline.cpp.o + +math_bspline.i: math_bspline.cpp.i +.PHONY : math_bspline.i + +# target to preprocess a source file +math_bspline.cpp.i: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/math_bspline.cpp.i +.PHONY : math_bspline.cpp.i + +math_bspline.s: math_bspline.cpp.s +.PHONY : math_bspline.s + +# target to generate assembly for a file +math_bspline.cpp.s: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/math_bspline.cpp.s +.PHONY : math_bspline.cpp.s + +math_chebyshev.o: math_chebyshev.cpp.o +.PHONY : math_chebyshev.o + +# target to build an object file +math_chebyshev.cpp.o: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/math_chebyshev.cpp.o +.PHONY : math_chebyshev.cpp.o + +math_chebyshev.i: math_chebyshev.cpp.i +.PHONY : math_chebyshev.i + +# target to preprocess a source file +math_chebyshev.cpp.i: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/math_chebyshev.cpp.i +.PHONY : math_chebyshev.cpp.i + +math_chebyshev.s: math_chebyshev.cpp.s +.PHONY : math_chebyshev.s + +# target to generate assembly for a file +math_chebyshev.cpp.s: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/math_chebyshev.cpp.s +.PHONY : math_chebyshev.cpp.s + +math_erf_complex.o: math_erf_complex.cpp.o +.PHONY : math_erf_complex.o + +# target to build an object file +math_erf_complex.cpp.o: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/math_erf_complex.cpp.o +.PHONY : math_erf_complex.cpp.o + +math_erf_complex.i: math_erf_complex.cpp.i +.PHONY : math_erf_complex.i + +# target to preprocess a source file +math_erf_complex.cpp.i: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/math_erf_complex.cpp.i +.PHONY : math_erf_complex.cpp.i + +math_erf_complex.s: math_erf_complex.cpp.s +.PHONY : math_erf_complex.s + +# target to generate assembly for a file +math_erf_complex.cpp.s: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/math_erf_complex.cpp.s +.PHONY : math_erf_complex.cpp.s + +math_integral.o: math_integral.cpp.o +.PHONY : math_integral.o + +# target to build an object file +math_integral.cpp.o: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/math_integral.cpp.o +.PHONY : math_integral.cpp.o + +math_integral.i: math_integral.cpp.i +.PHONY : math_integral.i + +# target to preprocess a source file +math_integral.cpp.i: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/math_integral.cpp.i +.PHONY : math_integral.cpp.i + +math_integral.s: math_integral.cpp.s +.PHONY : math_integral.s + +# target to generate assembly for a file +math_integral.cpp.s: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/math_integral.cpp.s +.PHONY : math_integral.cpp.s + +math_lebedev_laikov.o: math_lebedev_laikov.cpp.o +.PHONY : math_lebedev_laikov.o + +# target to build an object file +math_lebedev_laikov.cpp.o: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/math_lebedev_laikov.cpp.o +.PHONY : math_lebedev_laikov.cpp.o + +math_lebedev_laikov.i: math_lebedev_laikov.cpp.i +.PHONY : math_lebedev_laikov.i + +# target to preprocess a source file +math_lebedev_laikov.cpp.i: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/math_lebedev_laikov.cpp.i +.PHONY : math_lebedev_laikov.cpp.i + +math_lebedev_laikov.s: math_lebedev_laikov.cpp.s +.PHONY : math_lebedev_laikov.s + +# target to generate assembly for a file +math_lebedev_laikov.cpp.s: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/math_lebedev_laikov.cpp.s +.PHONY : math_lebedev_laikov.cpp.s + +math_polyint.o: math_polyint.cpp.o +.PHONY : math_polyint.o + +# target to build an object file +math_polyint.cpp.o: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/math_polyint.cpp.o +.PHONY : math_polyint.cpp.o + +math_polyint.i: math_polyint.cpp.i +.PHONY : math_polyint.i + +# target to preprocess a source file +math_polyint.cpp.i: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/math_polyint.cpp.i +.PHONY : math_polyint.cpp.i + +math_polyint.s: math_polyint.cpp.s +.PHONY : math_polyint.s + +# target to generate assembly for a file +math_polyint.cpp.s: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/math_polyint.cpp.s +.PHONY : math_polyint.cpp.s + +math_sphbes.o: math_sphbes.cpp.o +.PHONY : math_sphbes.o + +# target to build an object file +math_sphbes.cpp.o: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/math_sphbes.cpp.o +.PHONY : math_sphbes.cpp.o + +math_sphbes.i: math_sphbes.cpp.i +.PHONY : math_sphbes.i + +# target to preprocess a source file +math_sphbes.cpp.i: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/math_sphbes.cpp.i +.PHONY : math_sphbes.cpp.i + +math_sphbes.s: math_sphbes.cpp.s +.PHONY : math_sphbes.s + +# target to generate assembly for a file +math_sphbes.cpp.s: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/math_sphbes.cpp.s +.PHONY : math_sphbes.cpp.s + +math_ylmreal.o: math_ylmreal.cpp.o +.PHONY : math_ylmreal.o + +# target to build an object file +math_ylmreal.cpp.o: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/math_ylmreal.cpp.o +.PHONY : math_ylmreal.cpp.o + +math_ylmreal.i: math_ylmreal.cpp.i +.PHONY : math_ylmreal.i + +# target to preprocess a source file +math_ylmreal.cpp.i: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/math_ylmreal.cpp.i +.PHONY : math_ylmreal.cpp.i + +math_ylmreal.s: math_ylmreal.cpp.s +.PHONY : math_ylmreal.s + +# target to generate assembly for a file +math_ylmreal.cpp.s: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/math_ylmreal.cpp.s +.PHONY : math_ylmreal.cpp.s + +mathzone_add1.o: mathzone_add1.cpp.o +.PHONY : mathzone_add1.o + +# target to build an object file +mathzone_add1.cpp.o: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/mathzone_add1.cpp.o +.PHONY : mathzone_add1.cpp.o + +mathzone_add1.i: mathzone_add1.cpp.i +.PHONY : mathzone_add1.i + +# target to preprocess a source file +mathzone_add1.cpp.i: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/mathzone_add1.cpp.i +.PHONY : mathzone_add1.cpp.i + +mathzone_add1.s: mathzone_add1.cpp.s +.PHONY : mathzone_add1.s + +# target to generate assembly for a file +mathzone_add1.cpp.s: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/mathzone_add1.cpp.s +.PHONY : mathzone_add1.cpp.s + +matrix.o: matrix.cpp.o +.PHONY : matrix.o + +# target to build an object file +matrix.cpp.o: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/matrix.cpp.o +.PHONY : matrix.cpp.o + +matrix.i: matrix.cpp.i +.PHONY : matrix.i + +# target to preprocess a source file +matrix.cpp.i: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/matrix.cpp.i +.PHONY : matrix.cpp.i + +matrix.s: matrix.cpp.s +.PHONY : matrix.s + +# target to generate assembly for a file +matrix.cpp.s: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/matrix.cpp.s +.PHONY : matrix.cpp.s + +matrix3.o: matrix3.cpp.o +.PHONY : matrix3.o + +# target to build an object file +matrix3.cpp.o: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/matrix3.cpp.o +.PHONY : matrix3.cpp.o + +matrix3.i: matrix3.cpp.i +.PHONY : matrix3.i + +# target to preprocess a source file +matrix3.cpp.i: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/matrix3.cpp.i +.PHONY : matrix3.cpp.i + +matrix3.s: matrix3.cpp.s +.PHONY : matrix3.s + +# target to generate assembly for a file +matrix3.cpp.s: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/matrix3.cpp.s +.PHONY : matrix3.cpp.s + +memory.o: memory.cpp.o +.PHONY : memory.o + +# target to build an object file +memory.cpp.o: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/memory.cpp.o +.PHONY : memory.cpp.o + +memory.i: memory.cpp.i +.PHONY : memory.i + +# target to preprocess a source file +memory.cpp.i: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/memory.cpp.i +.PHONY : memory.cpp.i + +memory.s: memory.cpp.s +.PHONY : memory.s + +# target to generate assembly for a file +memory.cpp.s: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/memory.cpp.s +.PHONY : memory.cpp.s + +module_mixing/broyden_mixing.o: module_mixing/broyden_mixing.cpp.o +.PHONY : module_mixing/broyden_mixing.o + +# target to build an object file +module_mixing/broyden_mixing.cpp.o: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/module_mixing/broyden_mixing.cpp.o +.PHONY : module_mixing/broyden_mixing.cpp.o + +module_mixing/broyden_mixing.i: module_mixing/broyden_mixing.cpp.i +.PHONY : module_mixing/broyden_mixing.i + +# target to preprocess a source file +module_mixing/broyden_mixing.cpp.i: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/module_mixing/broyden_mixing.cpp.i +.PHONY : module_mixing/broyden_mixing.cpp.i + +module_mixing/broyden_mixing.s: module_mixing/broyden_mixing.cpp.s +.PHONY : module_mixing/broyden_mixing.s + +# target to generate assembly for a file +module_mixing/broyden_mixing.cpp.s: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/module_mixing/broyden_mixing.cpp.s +.PHONY : module_mixing/broyden_mixing.cpp.s + +module_mixing/mixing.o: module_mixing/mixing.cpp.o +.PHONY : module_mixing/mixing.o + +# target to build an object file +module_mixing/mixing.cpp.o: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/module_mixing/mixing.cpp.o +.PHONY : module_mixing/mixing.cpp.o + +module_mixing/mixing.i: module_mixing/mixing.cpp.i +.PHONY : module_mixing/mixing.i + +# target to preprocess a source file +module_mixing/mixing.cpp.i: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/module_mixing/mixing.cpp.i +.PHONY : module_mixing/mixing.cpp.i + +module_mixing/mixing.s: module_mixing/mixing.cpp.s +.PHONY : module_mixing/mixing.s + +# target to generate assembly for a file +module_mixing/mixing.cpp.s: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/module_mixing/mixing.cpp.s +.PHONY : module_mixing/mixing.cpp.s + +module_mixing/mixing_data.o: module_mixing/mixing_data.cpp.o +.PHONY : module_mixing/mixing_data.o + +# target to build an object file +module_mixing/mixing_data.cpp.o: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/module_mixing/mixing_data.cpp.o +.PHONY : module_mixing/mixing_data.cpp.o + +module_mixing/mixing_data.i: module_mixing/mixing_data.cpp.i +.PHONY : module_mixing/mixing_data.i + +# target to preprocess a source file +module_mixing/mixing_data.cpp.i: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/module_mixing/mixing_data.cpp.i +.PHONY : module_mixing/mixing_data.cpp.i + +module_mixing/mixing_data.s: module_mixing/mixing_data.cpp.s +.PHONY : module_mixing/mixing_data.s + +# target to generate assembly for a file +module_mixing/mixing_data.cpp.s: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/module_mixing/mixing_data.cpp.s +.PHONY : module_mixing/mixing_data.cpp.s + +module_mixing/plain_mixing.o: module_mixing/plain_mixing.cpp.o +.PHONY : module_mixing/plain_mixing.o + +# target to build an object file +module_mixing/plain_mixing.cpp.o: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/module_mixing/plain_mixing.cpp.o +.PHONY : module_mixing/plain_mixing.cpp.o + +module_mixing/plain_mixing.i: module_mixing/plain_mixing.cpp.i +.PHONY : module_mixing/plain_mixing.i + +# target to preprocess a source file +module_mixing/plain_mixing.cpp.i: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/module_mixing/plain_mixing.cpp.i +.PHONY : module_mixing/plain_mixing.cpp.i + +module_mixing/plain_mixing.s: module_mixing/plain_mixing.cpp.s +.PHONY : module_mixing/plain_mixing.s + +# target to generate assembly for a file +module_mixing/plain_mixing.cpp.s: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/module_mixing/plain_mixing.cpp.s +.PHONY : module_mixing/plain_mixing.cpp.s + +module_mixing/pulay_mixing.o: module_mixing/pulay_mixing.cpp.o +.PHONY : module_mixing/pulay_mixing.o + +# target to build an object file +module_mixing/pulay_mixing.cpp.o: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/module_mixing/pulay_mixing.cpp.o +.PHONY : module_mixing/pulay_mixing.cpp.o + +module_mixing/pulay_mixing.i: module_mixing/pulay_mixing.cpp.i +.PHONY : module_mixing/pulay_mixing.i + +# target to preprocess a source file +module_mixing/pulay_mixing.cpp.i: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/module_mixing/pulay_mixing.cpp.i +.PHONY : module_mixing/pulay_mixing.cpp.i + +module_mixing/pulay_mixing.s: module_mixing/pulay_mixing.cpp.s +.PHONY : module_mixing/pulay_mixing.s + +# target to generate assembly for a file +module_mixing/pulay_mixing.cpp.s: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/module_mixing/pulay_mixing.cpp.s +.PHONY : module_mixing/pulay_mixing.cpp.s + +mymath.o: mymath.cpp.o +.PHONY : mymath.o + +# target to build an object file +mymath.cpp.o: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/mymath.cpp.o +.PHONY : mymath.cpp.o + +mymath.i: mymath.cpp.i +.PHONY : mymath.i + +# target to preprocess a source file +mymath.cpp.i: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/mymath.cpp.i +.PHONY : mymath.cpp.i + +mymath.s: mymath.cpp.s +.PHONY : mymath.s + +# target to generate assembly for a file +mymath.cpp.s: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/mymath.cpp.s +.PHONY : mymath.cpp.s + +opt_CG.o: opt_CG.cpp.o +.PHONY : opt_CG.o + +# target to build an object file +opt_CG.cpp.o: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/opt_CG.cpp.o +.PHONY : opt_CG.cpp.o + +opt_CG.i: opt_CG.cpp.i +.PHONY : opt_CG.i + +# target to preprocess a source file +opt_CG.cpp.i: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/opt_CG.cpp.i +.PHONY : opt_CG.cpp.i + +opt_CG.s: opt_CG.cpp.s +.PHONY : opt_CG.s + +# target to generate assembly for a file +opt_CG.cpp.s: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/opt_CG.cpp.s +.PHONY : opt_CG.cpp.s + +opt_DCsrch.o: opt_DCsrch.cpp.o +.PHONY : opt_DCsrch.o + +# target to build an object file +opt_DCsrch.cpp.o: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/opt_DCsrch.cpp.o +.PHONY : opt_DCsrch.cpp.o + +opt_DCsrch.i: opt_DCsrch.cpp.i +.PHONY : opt_DCsrch.i + +# target to preprocess a source file +opt_DCsrch.cpp.i: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/opt_DCsrch.cpp.i +.PHONY : opt_DCsrch.cpp.i + +opt_DCsrch.s: opt_DCsrch.cpp.s +.PHONY : opt_DCsrch.s + +# target to generate assembly for a file +opt_DCsrch.cpp.s: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/opt_DCsrch.cpp.s +.PHONY : opt_DCsrch.cpp.s + +para_gemm.o: para_gemm.cpp.o +.PHONY : para_gemm.o + +# target to build an object file +para_gemm.cpp.o: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/para_gemm.cpp.o +.PHONY : para_gemm.cpp.o + +para_gemm.i: para_gemm.cpp.i +.PHONY : para_gemm.i + +# target to preprocess a source file +para_gemm.cpp.i: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/para_gemm.cpp.i +.PHONY : para_gemm.cpp.i + +para_gemm.s: para_gemm.cpp.s +.PHONY : para_gemm.s + +# target to generate assembly for a file +para_gemm.cpp.s: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/para_gemm.cpp.s +.PHONY : para_gemm.cpp.s + +parallel_2d.o: parallel_2d.cpp.o +.PHONY : parallel_2d.o + +# target to build an object file +parallel_2d.cpp.o: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/parallel_2d.cpp.o +.PHONY : parallel_2d.cpp.o + +parallel_2d.i: parallel_2d.cpp.i +.PHONY : parallel_2d.i + +# target to preprocess a source file +parallel_2d.cpp.i: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/parallel_2d.cpp.i +.PHONY : parallel_2d.cpp.i + +parallel_2d.s: parallel_2d.cpp.s +.PHONY : parallel_2d.s + +# target to generate assembly for a file +parallel_2d.cpp.s: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/parallel_2d.cpp.s +.PHONY : parallel_2d.cpp.s + +parallel_comm.o: parallel_comm.cpp.o +.PHONY : parallel_comm.o + +# target to build an object file +parallel_comm.cpp.o: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/parallel_comm.cpp.o +.PHONY : parallel_comm.cpp.o + +parallel_comm.i: parallel_comm.cpp.i +.PHONY : parallel_comm.i + +# target to preprocess a source file +parallel_comm.cpp.i: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/parallel_comm.cpp.i +.PHONY : parallel_comm.cpp.i + +parallel_comm.s: parallel_comm.cpp.s +.PHONY : parallel_comm.s + +# target to generate assembly for a file +parallel_comm.cpp.s: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/parallel_comm.cpp.s +.PHONY : parallel_comm.cpp.s + +parallel_common.o: parallel_common.cpp.o +.PHONY : parallel_common.o + +# target to build an object file +parallel_common.cpp.o: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/parallel_common.cpp.o +.PHONY : parallel_common.cpp.o + +parallel_common.i: parallel_common.cpp.i +.PHONY : parallel_common.i + +# target to preprocess a source file +parallel_common.cpp.i: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/parallel_common.cpp.i +.PHONY : parallel_common.cpp.i + +parallel_common.s: parallel_common.cpp.s +.PHONY : parallel_common.s + +# target to generate assembly for a file +parallel_common.cpp.s: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/parallel_common.cpp.s +.PHONY : parallel_common.cpp.s + +parallel_device.o: parallel_device.cpp.o +.PHONY : parallel_device.o + +# target to build an object file +parallel_device.cpp.o: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/parallel_device.cpp.o +.PHONY : parallel_device.cpp.o + +parallel_device.i: parallel_device.cpp.i +.PHONY : parallel_device.i + +# target to preprocess a source file +parallel_device.cpp.i: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/parallel_device.cpp.i +.PHONY : parallel_device.cpp.i + +parallel_device.s: parallel_device.cpp.s +.PHONY : parallel_device.s + +# target to generate assembly for a file +parallel_device.cpp.s: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/parallel_device.cpp.s +.PHONY : parallel_device.cpp.s + +parallel_global.o: parallel_global.cpp.o +.PHONY : parallel_global.o + +# target to build an object file +parallel_global.cpp.o: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/parallel_global.cpp.o +.PHONY : parallel_global.cpp.o + +parallel_global.i: parallel_global.cpp.i +.PHONY : parallel_global.i + +# target to preprocess a source file +parallel_global.cpp.i: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/parallel_global.cpp.i +.PHONY : parallel_global.cpp.i + +parallel_global.s: parallel_global.cpp.s +.PHONY : parallel_global.s + +# target to generate assembly for a file +parallel_global.cpp.s: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/parallel_global.cpp.s +.PHONY : parallel_global.cpp.s + +parallel_reduce.o: parallel_reduce.cpp.o +.PHONY : parallel_reduce.o + +# target to build an object file +parallel_reduce.cpp.o: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/parallel_reduce.cpp.o +.PHONY : parallel_reduce.cpp.o + +parallel_reduce.i: parallel_reduce.cpp.i +.PHONY : parallel_reduce.i + +# target to preprocess a source file +parallel_reduce.cpp.i: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/parallel_reduce.cpp.i +.PHONY : parallel_reduce.cpp.i + +parallel_reduce.s: parallel_reduce.cpp.s +.PHONY : parallel_reduce.s + +# target to generate assembly for a file +parallel_reduce.cpp.s: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/parallel_reduce.cpp.s +.PHONY : parallel_reduce.cpp.s + +projgen.o: projgen.cpp.o +.PHONY : projgen.o + +# target to build an object file +projgen.cpp.o: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/projgen.cpp.o +.PHONY : projgen.cpp.o + +projgen.i: projgen.cpp.i +.PHONY : projgen.i + +# target to preprocess a source file +projgen.cpp.i: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/projgen.cpp.i +.PHONY : projgen.cpp.i + +projgen.s: projgen.cpp.s +.PHONY : projgen.s + +# target to generate assembly for a file +projgen.cpp.s: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/projgen.cpp.s +.PHONY : projgen.cpp.s + +realarray.o: realarray.cpp.o +.PHONY : realarray.o + +# target to build an object file +realarray.cpp.o: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/realarray.cpp.o +.PHONY : realarray.cpp.o + +realarray.i: realarray.cpp.i +.PHONY : realarray.i + +# target to preprocess a source file +realarray.cpp.i: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/realarray.cpp.i +.PHONY : realarray.cpp.i + +realarray.s: realarray.cpp.s +.PHONY : realarray.s + +# target to generate assembly for a file +realarray.cpp.s: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/realarray.cpp.s +.PHONY : realarray.cpp.s + +sph_bessel_recursive-d1.o: sph_bessel_recursive-d1.cpp.o +.PHONY : sph_bessel_recursive-d1.o + +# target to build an object file +sph_bessel_recursive-d1.cpp.o: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/sph_bessel_recursive-d1.cpp.o +.PHONY : sph_bessel_recursive-d1.cpp.o + +sph_bessel_recursive-d1.i: sph_bessel_recursive-d1.cpp.i +.PHONY : sph_bessel_recursive-d1.i + +# target to preprocess a source file +sph_bessel_recursive-d1.cpp.i: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/sph_bessel_recursive-d1.cpp.i +.PHONY : sph_bessel_recursive-d1.cpp.i + +sph_bessel_recursive-d1.s: sph_bessel_recursive-d1.cpp.s +.PHONY : sph_bessel_recursive-d1.s + +# target to generate assembly for a file +sph_bessel_recursive-d1.cpp.s: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/sph_bessel_recursive-d1.cpp.s +.PHONY : sph_bessel_recursive-d1.cpp.s + +sph_bessel_recursive-d2.o: sph_bessel_recursive-d2.cpp.o +.PHONY : sph_bessel_recursive-d2.o + +# target to build an object file +sph_bessel_recursive-d2.cpp.o: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/sph_bessel_recursive-d2.cpp.o +.PHONY : sph_bessel_recursive-d2.cpp.o + +sph_bessel_recursive-d2.i: sph_bessel_recursive-d2.cpp.i +.PHONY : sph_bessel_recursive-d2.i + +# target to preprocess a source file +sph_bessel_recursive-d2.cpp.i: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/sph_bessel_recursive-d2.cpp.i +.PHONY : sph_bessel_recursive-d2.cpp.i + +sph_bessel_recursive-d2.s: sph_bessel_recursive-d2.cpp.s +.PHONY : sph_bessel_recursive-d2.s + +# target to generate assembly for a file +sph_bessel_recursive-d2.cpp.s: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/sph_bessel_recursive-d2.cpp.s +.PHONY : sph_bessel_recursive-d2.cpp.s + +spherical_bessel_transformer.o: spherical_bessel_transformer.cpp.o +.PHONY : spherical_bessel_transformer.o + +# target to build an object file +spherical_bessel_transformer.cpp.o: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/spherical_bessel_transformer.cpp.o +.PHONY : spherical_bessel_transformer.cpp.o + +spherical_bessel_transformer.i: spherical_bessel_transformer.cpp.i +.PHONY : spherical_bessel_transformer.i + +# target to preprocess a source file +spherical_bessel_transformer.cpp.i: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/spherical_bessel_transformer.cpp.i +.PHONY : spherical_bessel_transformer.cpp.i + +spherical_bessel_transformer.s: spherical_bessel_transformer.cpp.s +.PHONY : spherical_bessel_transformer.s + +# target to generate assembly for a file +spherical_bessel_transformer.cpp.s: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/spherical_bessel_transformer.cpp.s +.PHONY : spherical_bessel_transformer.cpp.s + +timer.o: timer.cpp.o +.PHONY : timer.o + +# target to build an object file +timer.cpp.o: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/timer.cpp.o +.PHONY : timer.cpp.o + +timer.i: timer.cpp.i +.PHONY : timer.i + +# target to preprocess a source file +timer.cpp.i: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/timer.cpp.i +.PHONY : timer.cpp.i + +timer.s: timer.cpp.s +.PHONY : timer.s + +# target to generate assembly for a file +timer.cpp.s: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/timer.cpp.s +.PHONY : timer.cpp.s + +tool_check.o: tool_check.cpp.o +.PHONY : tool_check.o + +# target to build an object file +tool_check.cpp.o: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/tool_check.cpp.o +.PHONY : tool_check.cpp.o + +tool_check.i: tool_check.cpp.i +.PHONY : tool_check.i + +# target to preprocess a source file +tool_check.cpp.i: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/tool_check.cpp.i +.PHONY : tool_check.cpp.i + +tool_check.s: tool_check.cpp.s +.PHONY : tool_check.s + +# target to generate assembly for a file +tool_check.cpp.s: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/tool_check.cpp.s +.PHONY : tool_check.cpp.s + +tool_quit.o: tool_quit.cpp.o +.PHONY : tool_quit.o + +# target to build an object file +tool_quit.cpp.o: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/tool_quit.cpp.o +.PHONY : tool_quit.cpp.o + +tool_quit.i: tool_quit.cpp.i +.PHONY : tool_quit.i + +# target to preprocess a source file +tool_quit.cpp.i: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/tool_quit.cpp.i +.PHONY : tool_quit.cpp.i + +tool_quit.s: tool_quit.cpp.s +.PHONY : tool_quit.s + +# target to generate assembly for a file +tool_quit.cpp.s: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/tool_quit.cpp.s +.PHONY : tool_quit.cpp.s + +tool_title.o: tool_title.cpp.o +.PHONY : tool_title.o + +# target to build an object file +tool_title.cpp.o: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/tool_title.cpp.o +.PHONY : tool_title.cpp.o + +tool_title.i: tool_title.cpp.i +.PHONY : tool_title.i + +# target to preprocess a source file +tool_title.cpp.i: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/tool_title.cpp.i +.PHONY : tool_title.cpp.i + +tool_title.s: tool_title.cpp.s +.PHONY : tool_title.s + +# target to generate assembly for a file +tool_title.cpp.s: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/tool_title.cpp.s +.PHONY : tool_title.cpp.s + +ylm.o: ylm.cpp.o +.PHONY : ylm.o + +# target to build an object file +ylm.cpp.o: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/ylm.cpp.o +.PHONY : ylm.cpp.o + +ylm.i: ylm.cpp.i +.PHONY : ylm.i + +# target to preprocess a source file +ylm.cpp.i: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/ylm.cpp.i +.PHONY : ylm.cpp.i + +ylm.s: ylm.cpp.s +.PHONY : ylm.s + +# target to generate assembly for a file +ylm.cpp.s: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/CMakeFiles/base.dir/build.make source/source_base/CMakeFiles/base.dir/ylm.cpp.s +.PHONY : ylm.cpp.s + +# Help Target +help: + @echo "The following are some of the valid targets for this Makefile:" + @echo "... all (the default if no target is provided)" + @echo "... clean" + @echo "... depend" + @echo "... edit_cache" + @echo "... install" + @echo "... install/local" + @echo "... install/strip" + @echo "... list_install_components" + @echo "... rebuild_cache" + @echo "... base" + @echo "... abfs-vector3_order.o" + @echo "... abfs-vector3_order.i" + @echo "... abfs-vector3_order.s" + @echo "... assoc_laguerre.o" + @echo "... assoc_laguerre.i" + @echo "... assoc_laguerre.s" + @echo "... blas_connector_base.o" + @echo "... blas_connector_base.i" + @echo "... blas_connector_base.s" + @echo "... blas_connector_matrix.o" + @echo "... blas_connector_matrix.i" + @echo "... blas_connector_matrix.s" + @echo "... blas_connector_vector.o" + @echo "... blas_connector_vector.i" + @echo "... blas_connector_vector.s" + @echo "... clebsch_gordan_coeff.o" + @echo "... clebsch_gordan_coeff.i" + @echo "... clebsch_gordan_coeff.s" + @echo "... complexarray.o" + @echo "... complexarray.i" + @echo "... complexarray.s" + @echo "... complexmatrix.o" + @echo "... complexmatrix.i" + @echo "... complexmatrix.s" + @echo "... cubic_spline.o" + @echo "... cubic_spline.i" + @echo "... cubic_spline.s" + @echo "... element_basis_index.o" + @echo "... element_basis_index.i" + @echo "... element_basis_index.s" + @echo "... export.o" + @echo "... export.i" + @echo "... export.s" + @echo "... gather_math_lib_info.o" + @echo "... gather_math_lib_info.i" + @echo "... gather_math_lib_info.s" + @echo "... global_file.o" + @echo "... global_file.i" + @echo "... global_file.s" + @echo "... global_function.o" + @echo "... global_function.i" + @echo "... global_function.s" + @echo "... global_function_ddotreal.o" + @echo "... global_function_ddotreal.i" + @echo "... global_function_ddotreal.s" + @echo "... global_variable.o" + @echo "... global_variable.i" + @echo "... global_variable.s" + @echo "... intarray.o" + @echo "... intarray.i" + @echo "... intarray.s" + @echo "... inverse_matrix.o" + @echo "... inverse_matrix.i" + @echo "... inverse_matrix.s" + @echo "... math_bspline.o" + @echo "... math_bspline.i" + @echo "... math_bspline.s" + @echo "... math_chebyshev.o" + @echo "... math_chebyshev.i" + @echo "... math_chebyshev.s" + @echo "... math_erf_complex.o" + @echo "... math_erf_complex.i" + @echo "... math_erf_complex.s" + @echo "... math_integral.o" + @echo "... math_integral.i" + @echo "... math_integral.s" + @echo "... math_lebedev_laikov.o" + @echo "... math_lebedev_laikov.i" + @echo "... math_lebedev_laikov.s" + @echo "... math_polyint.o" + @echo "... math_polyint.i" + @echo "... math_polyint.s" + @echo "... math_sphbes.o" + @echo "... math_sphbes.i" + @echo "... math_sphbes.s" + @echo "... math_ylmreal.o" + @echo "... math_ylmreal.i" + @echo "... math_ylmreal.s" + @echo "... mathzone_add1.o" + @echo "... mathzone_add1.i" + @echo "... mathzone_add1.s" + @echo "... matrix.o" + @echo "... matrix.i" + @echo "... matrix.s" + @echo "... matrix3.o" + @echo "... matrix3.i" + @echo "... matrix3.s" + @echo "... memory.o" + @echo "... memory.i" + @echo "... memory.s" + @echo "... module_mixing/broyden_mixing.o" + @echo "... module_mixing/broyden_mixing.i" + @echo "... module_mixing/broyden_mixing.s" + @echo "... module_mixing/mixing.o" + @echo "... module_mixing/mixing.i" + @echo "... module_mixing/mixing.s" + @echo "... module_mixing/mixing_data.o" + @echo "... module_mixing/mixing_data.i" + @echo "... module_mixing/mixing_data.s" + @echo "... module_mixing/plain_mixing.o" + @echo "... module_mixing/plain_mixing.i" + @echo "... module_mixing/plain_mixing.s" + @echo "... module_mixing/pulay_mixing.o" + @echo "... module_mixing/pulay_mixing.i" + @echo "... module_mixing/pulay_mixing.s" + @echo "... mymath.o" + @echo "... mymath.i" + @echo "... mymath.s" + @echo "... opt_CG.o" + @echo "... opt_CG.i" + @echo "... opt_CG.s" + @echo "... opt_DCsrch.o" + @echo "... opt_DCsrch.i" + @echo "... opt_DCsrch.s" + @echo "... para_gemm.o" + @echo "... para_gemm.i" + @echo "... para_gemm.s" + @echo "... parallel_2d.o" + @echo "... parallel_2d.i" + @echo "... parallel_2d.s" + @echo "... parallel_comm.o" + @echo "... parallel_comm.i" + @echo "... parallel_comm.s" + @echo "... parallel_common.o" + @echo "... parallel_common.i" + @echo "... parallel_common.s" + @echo "... parallel_device.o" + @echo "... parallel_device.i" + @echo "... parallel_device.s" + @echo "... parallel_global.o" + @echo "... parallel_global.i" + @echo "... parallel_global.s" + @echo "... parallel_reduce.o" + @echo "... parallel_reduce.i" + @echo "... parallel_reduce.s" + @echo "... projgen.o" + @echo "... projgen.i" + @echo "... projgen.s" + @echo "... realarray.o" + @echo "... realarray.i" + @echo "... realarray.s" + @echo "... sph_bessel_recursive-d1.o" + @echo "... sph_bessel_recursive-d1.i" + @echo "... sph_bessel_recursive-d1.s" + @echo "... sph_bessel_recursive-d2.o" + @echo "... sph_bessel_recursive-d2.i" + @echo "... sph_bessel_recursive-d2.s" + @echo "... spherical_bessel_transformer.o" + @echo "... spherical_bessel_transformer.i" + @echo "... spherical_bessel_transformer.s" + @echo "... timer.o" + @echo "... timer.i" + @echo "... timer.s" + @echo "... tool_check.o" + @echo "... tool_check.i" + @echo "... tool_check.s" + @echo "... tool_quit.o" + @echo "... tool_quit.i" + @echo "... tool_quit.s" + @echo "... tool_title.o" + @echo "... tool_title.i" + @echo "... tool_title.s" + @echo "... ylm.o" + @echo "... ylm.i" + @echo "... ylm.s" +.PHONY : help + + + +#============================================================================= +# Special targets to cleanup operation of make. + +# Special rule to run CMake to check the build system integrity. +# No rule that depends on this can have commands that come from listfiles +# because they might be regenerated. +cmake_check_build_system: + cd /home/haozhihan/Documents/abacus-develop/build && $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 +.PHONY : cmake_check_build_system + diff --git a/build/source/source_base/cmake_install.cmake b/build/source/source_base/cmake_install.cmake new file mode 100644 index 0000000000..ed186f77d8 --- /dev/null +++ b/build/source/source_base/cmake_install.cmake @@ -0,0 +1,49 @@ +# Install script for directory: /home/haozhihan/Documents/abacus-develop/source/source_base + +# Set the install prefix +if(NOT DEFINED CMAKE_INSTALL_PREFIX) + set(CMAKE_INSTALL_PREFIX "/usr/local") +endif() +string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") + +# Set the install configuration name. +if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) + if(BUILD_TYPE) + string(REGEX REPLACE "^[^A-Za-z0-9_]+" "" + CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") + else() + set(CMAKE_INSTALL_CONFIG_NAME "") + endif() + message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") +endif() + +# Set the component getting installed. +if(NOT CMAKE_INSTALL_COMPONENT) + if(COMPONENT) + message(STATUS "Install component: \"${COMPONENT}\"") + set(CMAKE_INSTALL_COMPONENT "${COMPONENT}") + else() + set(CMAKE_INSTALL_COMPONENT) + endif() +endif() + +# Install shared libraries without execute permission? +if(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) + set(CMAKE_INSTALL_SO_NO_EXE "1") +endif() + +# Is this installation the result of a crosscompile? +if(NOT DEFINED CMAKE_CROSSCOMPILING) + set(CMAKE_CROSSCOMPILING "FALSE") +endif() + +# Set default install directory permissions. +if(NOT DEFINED CMAKE_OBJDUMP) + set(CMAKE_OBJDUMP "/usr/bin/objdump") +endif() + +if(NOT CMAKE_INSTALL_LOCAL_ONLY) + # Include the install script for the subdirectory. + include("/home/haozhihan/Documents/abacus-develop/build/source/source_base/module_container/cmake_install.cmake") +endif() + diff --git a/build/source/source_base/module_container/ATen/core/CMakeFiles/CMakeDirectoryInformation.cmake b/build/source/source_base/module_container/ATen/core/CMakeFiles/CMakeDirectoryInformation.cmake new file mode 100644 index 0000000000..4f5306076f --- /dev/null +++ b/build/source/source_base/module_container/ATen/core/CMakeFiles/CMakeDirectoryInformation.cmake @@ -0,0 +1,16 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.27 + +# Relative path conversion top directories. +set(CMAKE_RELATIVE_PATH_TOP_SOURCE "/home/haozhihan/Documents/abacus-develop") +set(CMAKE_RELATIVE_PATH_TOP_BINARY "/home/haozhihan/Documents/abacus-develop/build") + +# Force unix paths in dependencies. +set(CMAKE_FORCE_UNIX_PATHS 1) + + +# The C and CXX include file regular expressions for this directory. +set(CMAKE_C_INCLUDE_REGEX_SCAN "^.*$") +set(CMAKE_C_INCLUDE_REGEX_COMPLAIN "^$") +set(CMAKE_CXX_INCLUDE_REGEX_SCAN ${CMAKE_C_INCLUDE_REGEX_SCAN}) +set(CMAKE_CXX_INCLUDE_REGEX_COMPLAIN ${CMAKE_C_INCLUDE_REGEX_COMPLAIN}) diff --git a/build/source/source_base/module_container/ATen/core/CMakeFiles/progress.marks b/build/source/source_base/module_container/ATen/core/CMakeFiles/progress.marks new file mode 100644 index 0000000000..573541ac97 --- /dev/null +++ b/build/source/source_base/module_container/ATen/core/CMakeFiles/progress.marks @@ -0,0 +1 @@ +0 diff --git a/build/source/source_base/module_container/ATen/core/Makefile b/build/source/source_base/module_container/ATen/core/Makefile new file mode 100644 index 0000000000..6eb50dac0b --- /dev/null +++ b/build/source/source_base/module_container/ATen/core/Makefile @@ -0,0 +1,189 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.27 + +# Default target executed when no arguments are given to make. +default_target: all +.PHONY : default_target + +# Allow only one "make -f Makefile2" at a time, but pass parallelism. +.NOTPARALLEL: + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Disable VCS-based implicit rules. +% : %,v + +# Disable VCS-based implicit rules. +% : RCS/% + +# Disable VCS-based implicit rules. +% : RCS/%,v + +# Disable VCS-based implicit rules. +% : SCCS/s.% + +# Disable VCS-based implicit rules. +% : s.% + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Command-line flag to silence nested $(MAKE). +$(VERBOSE)MAKESILENT = -s + +#Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E rm -f + +# Escaping for special characters. +EQUALS = = + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/haozhihan/Documents/abacus-develop + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/haozhihan/Documents/abacus-develop/build + +#============================================================================= +# Targets provided globally by CMake. + +# Special rule for the target edit_cache +edit_cache: + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "No interactive CMake dialog available..." + /usr/bin/cmake -E echo No\ interactive\ CMake\ dialog\ available. +.PHONY : edit_cache + +# Special rule for the target edit_cache +edit_cache/fast: edit_cache +.PHONY : edit_cache/fast + +# Special rule for the target rebuild_cache +rebuild_cache: + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Running CMake to regenerate build system..." + /usr/bin/cmake --regenerate-during-build -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) +.PHONY : rebuild_cache + +# Special rule for the target rebuild_cache +rebuild_cache/fast: rebuild_cache +.PHONY : rebuild_cache/fast + +# Special rule for the target list_install_components +list_install_components: + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Available install components are: \"Unspecified\"" +.PHONY : list_install_components + +# Special rule for the target list_install_components +list_install_components/fast: list_install_components +.PHONY : list_install_components/fast + +# Special rule for the target install +install: preinstall + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Install the project..." + /usr/bin/cmake -P cmake_install.cmake +.PHONY : install + +# Special rule for the target install +install/fast: preinstall/fast + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Install the project..." + /usr/bin/cmake -P cmake_install.cmake +.PHONY : install/fast + +# Special rule for the target install/local +install/local: preinstall + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing only the local directory..." + /usr/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake +.PHONY : install/local + +# Special rule for the target install/local +install/local/fast: preinstall/fast + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing only the local directory..." + /usr/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake +.PHONY : install/local/fast + +# Special rule for the target install/strip +install/strip: preinstall + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing the project stripped..." + /usr/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake +.PHONY : install/strip + +# Special rule for the target install/strip +install/strip/fast: preinstall/fast + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing the project stripped..." + /usr/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake +.PHONY : install/strip/fast + +# The main all target +all: cmake_check_build_system + cd /home/haozhihan/Documents/abacus-develop/build && $(CMAKE_COMMAND) -E cmake_progress_start /home/haozhihan/Documents/abacus-develop/build/CMakeFiles /home/haozhihan/Documents/abacus-develop/build/source/source_base/module_container/ATen/core//CMakeFiles/progress.marks + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 source/source_base/module_container/ATen/core/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/haozhihan/Documents/abacus-develop/build/CMakeFiles 0 +.PHONY : all + +# The main clean target +clean: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 source/source_base/module_container/ATen/core/clean +.PHONY : clean + +# The main clean target +clean/fast: clean +.PHONY : clean/fast + +# Prepare targets for installation. +preinstall: all + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 source/source_base/module_container/ATen/core/preinstall +.PHONY : preinstall + +# Prepare targets for installation. +preinstall/fast: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 source/source_base/module_container/ATen/core/preinstall +.PHONY : preinstall/fast + +# clear depends +depend: + cd /home/haozhihan/Documents/abacus-develop/build && $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 +.PHONY : depend + +# Help Target +help: + @echo "The following are some of the valid targets for this Makefile:" + @echo "... all (the default if no target is provided)" + @echo "... clean" + @echo "... depend" + @echo "... edit_cache" + @echo "... install" + @echo "... install/local" + @echo "... install/strip" + @echo "... list_install_components" + @echo "... rebuild_cache" +.PHONY : help + + + +#============================================================================= +# Special targets to cleanup operation of make. + +# Special rule to run CMake to check the build system integrity. +# No rule that depends on this can have commands that come from listfiles +# because they might be regenerated. +cmake_check_build_system: + cd /home/haozhihan/Documents/abacus-develop/build && $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 +.PHONY : cmake_check_build_system + diff --git a/build/source/source_base/module_container/ATen/core/cmake_install.cmake b/build/source/source_base/module_container/ATen/core/cmake_install.cmake new file mode 100644 index 0000000000..5a17cb7224 --- /dev/null +++ b/build/source/source_base/module_container/ATen/core/cmake_install.cmake @@ -0,0 +1,44 @@ +# Install script for directory: /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core + +# Set the install prefix +if(NOT DEFINED CMAKE_INSTALL_PREFIX) + set(CMAKE_INSTALL_PREFIX "/usr/local") +endif() +string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") + +# Set the install configuration name. +if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) + if(BUILD_TYPE) + string(REGEX REPLACE "^[^A-Za-z0-9_]+" "" + CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") + else() + set(CMAKE_INSTALL_CONFIG_NAME "") + endif() + message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") +endif() + +# Set the component getting installed. +if(NOT CMAKE_INSTALL_COMPONENT) + if(COMPONENT) + message(STATUS "Install component: \"${COMPONENT}\"") + set(CMAKE_INSTALL_COMPONENT "${COMPONENT}") + else() + set(CMAKE_INSTALL_COMPONENT) + endif() +endif() + +# Install shared libraries without execute permission? +if(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) + set(CMAKE_INSTALL_SO_NO_EXE "1") +endif() + +# Is this installation the result of a crosscompile? +if(NOT DEFINED CMAKE_CROSSCOMPILING) + set(CMAKE_CROSSCOMPILING "FALSE") +endif() + +# Set default install directory permissions. +if(NOT DEFINED CMAKE_OBJDUMP) + set(CMAKE_OBJDUMP "/usr/bin/objdump") +endif() + diff --git a/build/source/source_base/module_container/ATen/kernels/CMakeFiles/CMakeDirectoryInformation.cmake b/build/source/source_base/module_container/ATen/kernels/CMakeFiles/CMakeDirectoryInformation.cmake new file mode 100644 index 0000000000..4f5306076f --- /dev/null +++ b/build/source/source_base/module_container/ATen/kernels/CMakeFiles/CMakeDirectoryInformation.cmake @@ -0,0 +1,16 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.27 + +# Relative path conversion top directories. +set(CMAKE_RELATIVE_PATH_TOP_SOURCE "/home/haozhihan/Documents/abacus-develop") +set(CMAKE_RELATIVE_PATH_TOP_BINARY "/home/haozhihan/Documents/abacus-develop/build") + +# Force unix paths in dependencies. +set(CMAKE_FORCE_UNIX_PATHS 1) + + +# The C and CXX include file regular expressions for this directory. +set(CMAKE_C_INCLUDE_REGEX_SCAN "^.*$") +set(CMAKE_C_INCLUDE_REGEX_COMPLAIN "^$") +set(CMAKE_CXX_INCLUDE_REGEX_SCAN ${CMAKE_C_INCLUDE_REGEX_SCAN}) +set(CMAKE_CXX_INCLUDE_REGEX_COMPLAIN ${CMAKE_C_INCLUDE_REGEX_COMPLAIN}) diff --git a/build/source/source_base/module_container/ATen/kernels/CMakeFiles/progress.marks b/build/source/source_base/module_container/ATen/kernels/CMakeFiles/progress.marks new file mode 100644 index 0000000000..573541ac97 --- /dev/null +++ b/build/source/source_base/module_container/ATen/kernels/CMakeFiles/progress.marks @@ -0,0 +1 @@ +0 diff --git a/build/source/source_base/module_container/ATen/kernels/Makefile b/build/source/source_base/module_container/ATen/kernels/Makefile new file mode 100644 index 0000000000..6943639d07 --- /dev/null +++ b/build/source/source_base/module_container/ATen/kernels/Makefile @@ -0,0 +1,189 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.27 + +# Default target executed when no arguments are given to make. +default_target: all +.PHONY : default_target + +# Allow only one "make -f Makefile2" at a time, but pass parallelism. +.NOTPARALLEL: + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Disable VCS-based implicit rules. +% : %,v + +# Disable VCS-based implicit rules. +% : RCS/% + +# Disable VCS-based implicit rules. +% : RCS/%,v + +# Disable VCS-based implicit rules. +% : SCCS/s.% + +# Disable VCS-based implicit rules. +% : s.% + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Command-line flag to silence nested $(MAKE). +$(VERBOSE)MAKESILENT = -s + +#Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E rm -f + +# Escaping for special characters. +EQUALS = = + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/haozhihan/Documents/abacus-develop + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/haozhihan/Documents/abacus-develop/build + +#============================================================================= +# Targets provided globally by CMake. + +# Special rule for the target edit_cache +edit_cache: + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "No interactive CMake dialog available..." + /usr/bin/cmake -E echo No\ interactive\ CMake\ dialog\ available. +.PHONY : edit_cache + +# Special rule for the target edit_cache +edit_cache/fast: edit_cache +.PHONY : edit_cache/fast + +# Special rule for the target rebuild_cache +rebuild_cache: + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Running CMake to regenerate build system..." + /usr/bin/cmake --regenerate-during-build -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) +.PHONY : rebuild_cache + +# Special rule for the target rebuild_cache +rebuild_cache/fast: rebuild_cache +.PHONY : rebuild_cache/fast + +# Special rule for the target list_install_components +list_install_components: + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Available install components are: \"Unspecified\"" +.PHONY : list_install_components + +# Special rule for the target list_install_components +list_install_components/fast: list_install_components +.PHONY : list_install_components/fast + +# Special rule for the target install +install: preinstall + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Install the project..." + /usr/bin/cmake -P cmake_install.cmake +.PHONY : install + +# Special rule for the target install +install/fast: preinstall/fast + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Install the project..." + /usr/bin/cmake -P cmake_install.cmake +.PHONY : install/fast + +# Special rule for the target install/local +install/local: preinstall + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing only the local directory..." + /usr/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake +.PHONY : install/local + +# Special rule for the target install/local +install/local/fast: preinstall/fast + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing only the local directory..." + /usr/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake +.PHONY : install/local/fast + +# Special rule for the target install/strip +install/strip: preinstall + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing the project stripped..." + /usr/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake +.PHONY : install/strip + +# Special rule for the target install/strip +install/strip/fast: preinstall/fast + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing the project stripped..." + /usr/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake +.PHONY : install/strip/fast + +# The main all target +all: cmake_check_build_system + cd /home/haozhihan/Documents/abacus-develop/build && $(CMAKE_COMMAND) -E cmake_progress_start /home/haozhihan/Documents/abacus-develop/build/CMakeFiles /home/haozhihan/Documents/abacus-develop/build/source/source_base/module_container/ATen/kernels//CMakeFiles/progress.marks + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 source/source_base/module_container/ATen/kernels/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/haozhihan/Documents/abacus-develop/build/CMakeFiles 0 +.PHONY : all + +# The main clean target +clean: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 source/source_base/module_container/ATen/kernels/clean +.PHONY : clean + +# The main clean target +clean/fast: clean +.PHONY : clean/fast + +# Prepare targets for installation. +preinstall: all + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 source/source_base/module_container/ATen/kernels/preinstall +.PHONY : preinstall + +# Prepare targets for installation. +preinstall/fast: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 source/source_base/module_container/ATen/kernels/preinstall +.PHONY : preinstall/fast + +# clear depends +depend: + cd /home/haozhihan/Documents/abacus-develop/build && $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 +.PHONY : depend + +# Help Target +help: + @echo "The following are some of the valid targets for this Makefile:" + @echo "... all (the default if no target is provided)" + @echo "... clean" + @echo "... depend" + @echo "... edit_cache" + @echo "... install" + @echo "... install/local" + @echo "... install/strip" + @echo "... list_install_components" + @echo "... rebuild_cache" +.PHONY : help + + + +#============================================================================= +# Special targets to cleanup operation of make. + +# Special rule to run CMake to check the build system integrity. +# No rule that depends on this can have commands that come from listfiles +# because they might be regenerated. +cmake_check_build_system: + cd /home/haozhihan/Documents/abacus-develop/build && $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 +.PHONY : cmake_check_build_system + diff --git a/build/source/source_base/module_container/ATen/kernels/cmake_install.cmake b/build/source/source_base/module_container/ATen/kernels/cmake_install.cmake new file mode 100644 index 0000000000..041b25c401 --- /dev/null +++ b/build/source/source_base/module_container/ATen/kernels/cmake_install.cmake @@ -0,0 +1,44 @@ +# Install script for directory: /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/kernels + +# Set the install prefix +if(NOT DEFINED CMAKE_INSTALL_PREFIX) + set(CMAKE_INSTALL_PREFIX "/usr/local") +endif() +string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") + +# Set the install configuration name. +if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) + if(BUILD_TYPE) + string(REGEX REPLACE "^[^A-Za-z0-9_]+" "" + CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") + else() + set(CMAKE_INSTALL_CONFIG_NAME "") + endif() + message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") +endif() + +# Set the component getting installed. +if(NOT CMAKE_INSTALL_COMPONENT) + if(COMPONENT) + message(STATUS "Install component: \"${COMPONENT}\"") + set(CMAKE_INSTALL_COMPONENT "${COMPONENT}") + else() + set(CMAKE_INSTALL_COMPONENT) + endif() +endif() + +# Install shared libraries without execute permission? +if(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) + set(CMAKE_INSTALL_SO_NO_EXE "1") +endif() + +# Is this installation the result of a crosscompile? +if(NOT DEFINED CMAKE_CROSSCOMPILING) + set(CMAKE_CROSSCOMPILING "FALSE") +endif() + +# Set default install directory permissions. +if(NOT DEFINED CMAKE_OBJDUMP) + set(CMAKE_OBJDUMP "/usr/bin/objdump") +endif() + diff --git a/build/source/source_base/module_container/ATen/ops/CMakeFiles/CMakeDirectoryInformation.cmake b/build/source/source_base/module_container/ATen/ops/CMakeFiles/CMakeDirectoryInformation.cmake new file mode 100644 index 0000000000..4f5306076f --- /dev/null +++ b/build/source/source_base/module_container/ATen/ops/CMakeFiles/CMakeDirectoryInformation.cmake @@ -0,0 +1,16 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.27 + +# Relative path conversion top directories. +set(CMAKE_RELATIVE_PATH_TOP_SOURCE "/home/haozhihan/Documents/abacus-develop") +set(CMAKE_RELATIVE_PATH_TOP_BINARY "/home/haozhihan/Documents/abacus-develop/build") + +# Force unix paths in dependencies. +set(CMAKE_FORCE_UNIX_PATHS 1) + + +# The C and CXX include file regular expressions for this directory. +set(CMAKE_C_INCLUDE_REGEX_SCAN "^.*$") +set(CMAKE_C_INCLUDE_REGEX_COMPLAIN "^$") +set(CMAKE_CXX_INCLUDE_REGEX_SCAN ${CMAKE_C_INCLUDE_REGEX_SCAN}) +set(CMAKE_CXX_INCLUDE_REGEX_COMPLAIN ${CMAKE_C_INCLUDE_REGEX_COMPLAIN}) diff --git a/build/source/source_base/module_container/ATen/ops/CMakeFiles/progress.marks b/build/source/source_base/module_container/ATen/ops/CMakeFiles/progress.marks new file mode 100644 index 0000000000..573541ac97 --- /dev/null +++ b/build/source/source_base/module_container/ATen/ops/CMakeFiles/progress.marks @@ -0,0 +1 @@ +0 diff --git a/build/source/source_base/module_container/ATen/ops/Makefile b/build/source/source_base/module_container/ATen/ops/Makefile new file mode 100644 index 0000000000..28bb81a7a9 --- /dev/null +++ b/build/source/source_base/module_container/ATen/ops/Makefile @@ -0,0 +1,189 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.27 + +# Default target executed when no arguments are given to make. +default_target: all +.PHONY : default_target + +# Allow only one "make -f Makefile2" at a time, but pass parallelism. +.NOTPARALLEL: + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Disable VCS-based implicit rules. +% : %,v + +# Disable VCS-based implicit rules. +% : RCS/% + +# Disable VCS-based implicit rules. +% : RCS/%,v + +# Disable VCS-based implicit rules. +% : SCCS/s.% + +# Disable VCS-based implicit rules. +% : s.% + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Command-line flag to silence nested $(MAKE). +$(VERBOSE)MAKESILENT = -s + +#Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E rm -f + +# Escaping for special characters. +EQUALS = = + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/haozhihan/Documents/abacus-develop + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/haozhihan/Documents/abacus-develop/build + +#============================================================================= +# Targets provided globally by CMake. + +# Special rule for the target edit_cache +edit_cache: + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "No interactive CMake dialog available..." + /usr/bin/cmake -E echo No\ interactive\ CMake\ dialog\ available. +.PHONY : edit_cache + +# Special rule for the target edit_cache +edit_cache/fast: edit_cache +.PHONY : edit_cache/fast + +# Special rule for the target rebuild_cache +rebuild_cache: + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Running CMake to regenerate build system..." + /usr/bin/cmake --regenerate-during-build -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) +.PHONY : rebuild_cache + +# Special rule for the target rebuild_cache +rebuild_cache/fast: rebuild_cache +.PHONY : rebuild_cache/fast + +# Special rule for the target list_install_components +list_install_components: + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Available install components are: \"Unspecified\"" +.PHONY : list_install_components + +# Special rule for the target list_install_components +list_install_components/fast: list_install_components +.PHONY : list_install_components/fast + +# Special rule for the target install +install: preinstall + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Install the project..." + /usr/bin/cmake -P cmake_install.cmake +.PHONY : install + +# Special rule for the target install +install/fast: preinstall/fast + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Install the project..." + /usr/bin/cmake -P cmake_install.cmake +.PHONY : install/fast + +# Special rule for the target install/local +install/local: preinstall + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing only the local directory..." + /usr/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake +.PHONY : install/local + +# Special rule for the target install/local +install/local/fast: preinstall/fast + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing only the local directory..." + /usr/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake +.PHONY : install/local/fast + +# Special rule for the target install/strip +install/strip: preinstall + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing the project stripped..." + /usr/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake +.PHONY : install/strip + +# Special rule for the target install/strip +install/strip/fast: preinstall/fast + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing the project stripped..." + /usr/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake +.PHONY : install/strip/fast + +# The main all target +all: cmake_check_build_system + cd /home/haozhihan/Documents/abacus-develop/build && $(CMAKE_COMMAND) -E cmake_progress_start /home/haozhihan/Documents/abacus-develop/build/CMakeFiles /home/haozhihan/Documents/abacus-develop/build/source/source_base/module_container/ATen/ops//CMakeFiles/progress.marks + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 source/source_base/module_container/ATen/ops/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/haozhihan/Documents/abacus-develop/build/CMakeFiles 0 +.PHONY : all + +# The main clean target +clean: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 source/source_base/module_container/ATen/ops/clean +.PHONY : clean + +# The main clean target +clean/fast: clean +.PHONY : clean/fast + +# Prepare targets for installation. +preinstall: all + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 source/source_base/module_container/ATen/ops/preinstall +.PHONY : preinstall + +# Prepare targets for installation. +preinstall/fast: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 source/source_base/module_container/ATen/ops/preinstall +.PHONY : preinstall/fast + +# clear depends +depend: + cd /home/haozhihan/Documents/abacus-develop/build && $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 +.PHONY : depend + +# Help Target +help: + @echo "The following are some of the valid targets for this Makefile:" + @echo "... all (the default if no target is provided)" + @echo "... clean" + @echo "... depend" + @echo "... edit_cache" + @echo "... install" + @echo "... install/local" + @echo "... install/strip" + @echo "... list_install_components" + @echo "... rebuild_cache" +.PHONY : help + + + +#============================================================================= +# Special targets to cleanup operation of make. + +# Special rule to run CMake to check the build system integrity. +# No rule that depends on this can have commands that come from listfiles +# because they might be regenerated. +cmake_check_build_system: + cd /home/haozhihan/Documents/abacus-develop/build && $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 +.PHONY : cmake_check_build_system + diff --git a/build/source/source_base/module_container/ATen/ops/cmake_install.cmake b/build/source/source_base/module_container/ATen/ops/cmake_install.cmake new file mode 100644 index 0000000000..a8e9e6354a --- /dev/null +++ b/build/source/source_base/module_container/ATen/ops/cmake_install.cmake @@ -0,0 +1,44 @@ +# Install script for directory: /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/ops + +# Set the install prefix +if(NOT DEFINED CMAKE_INSTALL_PREFIX) + set(CMAKE_INSTALL_PREFIX "/usr/local") +endif() +string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") + +# Set the install configuration name. +if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) + if(BUILD_TYPE) + string(REGEX REPLACE "^[^A-Za-z0-9_]+" "" + CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") + else() + set(CMAKE_INSTALL_CONFIG_NAME "") + endif() + message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") +endif() + +# Set the component getting installed. +if(NOT CMAKE_INSTALL_COMPONENT) + if(COMPONENT) + message(STATUS "Install component: \"${COMPONENT}\"") + set(CMAKE_INSTALL_COMPONENT "${COMPONENT}") + else() + set(CMAKE_INSTALL_COMPONENT) + endif() +endif() + +# Install shared libraries without execute permission? +if(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) + set(CMAKE_INSTALL_SO_NO_EXE "1") +endif() + +# Is this installation the result of a crosscompile? +if(NOT DEFINED CMAKE_CROSSCOMPILING) + set(CMAKE_CROSSCOMPILING "FALSE") +endif() + +# Set default install directory permissions. +if(NOT DEFINED CMAKE_OBJDUMP) + set(CMAKE_OBJDUMP "/usr/bin/objdump") +endif() + diff --git a/build/source/source_base/module_container/CMakeFiles/CMakeDirectoryInformation.cmake b/build/source/source_base/module_container/CMakeFiles/CMakeDirectoryInformation.cmake new file mode 100644 index 0000000000..4f5306076f --- /dev/null +++ b/build/source/source_base/module_container/CMakeFiles/CMakeDirectoryInformation.cmake @@ -0,0 +1,16 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.27 + +# Relative path conversion top directories. +set(CMAKE_RELATIVE_PATH_TOP_SOURCE "/home/haozhihan/Documents/abacus-develop") +set(CMAKE_RELATIVE_PATH_TOP_BINARY "/home/haozhihan/Documents/abacus-develop/build") + +# Force unix paths in dependencies. +set(CMAKE_FORCE_UNIX_PATHS 1) + + +# The C and CXX include file regular expressions for this directory. +set(CMAKE_C_INCLUDE_REGEX_SCAN "^.*$") +set(CMAKE_C_INCLUDE_REGEX_COMPLAIN "^$") +set(CMAKE_CXX_INCLUDE_REGEX_SCAN ${CMAKE_C_INCLUDE_REGEX_SCAN}) +set(CMAKE_CXX_INCLUDE_REGEX_COMPLAIN ${CMAKE_C_INCLUDE_REGEX_COMPLAIN}) diff --git a/build/source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor.cpp.o b/build/source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor.cpp.o new file mode 100644 index 0000000000..78fb635e6f Binary files /dev/null and b/build/source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor.cpp.o differ diff --git a/build/source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor.cpp.o.d b/build/source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor.cpp.o.d new file mode 100644 index 0000000000..e20d1fdd13 --- /dev/null +++ b/build/source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor.cpp.o.d @@ -0,0 +1,240 @@ +source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor.cpp.o: \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor.cpp \ + /usr/include/stdc-predef.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/base/core/allocator.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor_types.h \ + /usr/include/c++/11/regex /usr/include/c++/11/algorithm \ + /usr/include/c++/11/utility \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++config.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/os_defines.h \ + /usr/include/features.h /usr/include/features-time64.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/cpu_defines.h \ + /usr/include/c++/11/bits/stl_relops.h \ + /usr/include/c++/11/bits/stl_pair.h /usr/include/c++/11/bits/move.h \ + /usr/include/c++/11/type_traits /usr/include/c++/11/initializer_list \ + /usr/include/c++/11/bits/stl_algobase.h \ + /usr/include/c++/11/bits/functexcept.h \ + /usr/include/c++/11/bits/exception_defines.h \ + /usr/include/c++/11/bits/cpp_type_traits.h \ + /usr/include/c++/11/ext/type_traits.h \ + /usr/include/c++/11/ext/numeric_traits.h \ + /usr/include/c++/11/bits/stl_iterator_base_types.h \ + /usr/include/c++/11/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/11/bits/concept_check.h \ + /usr/include/c++/11/debug/assertions.h \ + /usr/include/c++/11/bits/stl_iterator.h \ + /usr/include/c++/11/bits/ptr_traits.h /usr/include/c++/11/debug/debug.h \ + /usr/include/c++/11/bits/predefined_ops.h \ + /usr/include/c++/11/bits/stl_algo.h /usr/include/c++/11/cstdlib \ + /usr/include/stdlib.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h \ + /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/atomic_wide_counter.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/include/c++/11/bits/std_abs.h \ + /usr/include/c++/11/bits/algorithmfwd.h \ + /usr/include/c++/11/bits/stl_heap.h \ + /usr/include/c++/11/bits/stl_tempbuf.h \ + /usr/include/c++/11/bits/stl_construct.h /usr/include/c++/11/new \ + /usr/include/c++/11/bits/exception.h \ + /usr/include/c++/11/bits/uniform_int_dist.h /usr/include/c++/11/bitset \ + /usr/include/c++/11/string /usr/include/c++/11/bits/stringfwd.h \ + /usr/include/c++/11/bits/memoryfwd.h \ + /usr/include/c++/11/bits/char_traits.h \ + /usr/include/c++/11/bits/postypes.h /usr/include/c++/11/cwchar \ + /usr/include/wchar.h /usr/lib/gcc/x86_64-linux-gnu/11/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/wchar.h \ + /usr/include/x86_64-linux-gnu/bits/types/wint_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/wchar2.h /usr/include/c++/11/cstdint \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdint.h /usr/include/stdint.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-uintn.h \ + /usr/include/c++/11/bits/allocator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++allocator.h \ + /usr/include/c++/11/ext/new_allocator.h \ + /usr/include/c++/11/bits/localefwd.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++locale.h \ + /usr/include/c++/11/clocale /usr/include/locale.h \ + /usr/include/x86_64-linux-gnu/bits/locale.h /usr/include/c++/11/iosfwd \ + /usr/include/c++/11/cctype /usr/include/ctype.h \ + /usr/include/c++/11/bits/ostream_insert.h \ + /usr/include/c++/11/bits/cxxabi_forced.h \ + /usr/include/c++/11/bits/stl_function.h \ + /usr/include/c++/11/backward/binders.h \ + /usr/include/c++/11/bits/range_access.h \ + /usr/include/c++/11/bits/basic_string.h \ + /usr/include/c++/11/ext/atomicity.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr-default.h \ + /usr/include/pthread.h /usr/include/sched.h \ + /usr/include/x86_64-linux-gnu/bits/sched.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h \ + /usr/include/x86_64-linux-gnu/bits/cpu-set.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/timex.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h \ + /usr/include/x86_64-linux-gnu/bits/setjmp.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct___jmp_buf_tag.h \ + /usr/include/x86_64-linux-gnu/bits/pthread_stack_min-dynamic.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/atomic_word.h \ + /usr/include/x86_64-linux-gnu/sys/single_threaded.h \ + /usr/include/c++/11/ext/alloc_traits.h \ + /usr/include/c++/11/bits/alloc_traits.h \ + /usr/include/c++/11/ext/string_conversions.h /usr/include/c++/11/cstdio \ + /usr/include/stdio.h /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/c++/11/cerrno \ + /usr/include/errno.h /usr/include/x86_64-linux-gnu/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/bits/types/error_t.h \ + /usr/include/c++/11/bits/charconv.h \ + /usr/include/c++/11/bits/functional_hash.h \ + /usr/include/c++/11/bits/hash_bytes.h \ + /usr/include/c++/11/bits/basic_string.tcc /usr/include/c++/11/iterator \ + /usr/include/c++/11/bits/stream_iterator.h \ + /usr/include/c++/11/bits/streambuf_iterator.h \ + /usr/include/c++/11/streambuf /usr/include/c++/11/bits/ios_base.h \ + /usr/include/c++/11/bits/locale_classes.h \ + /usr/include/c++/11/bits/locale_classes.tcc \ + /usr/include/c++/11/system_error \ + /usr/include/x86_64-linux-gnu/c++/11/bits/error_constants.h \ + /usr/include/c++/11/stdexcept /usr/include/c++/11/exception \ + /usr/include/c++/11/bits/exception_ptr.h \ + /usr/include/c++/11/bits/cxxabi_init_exception.h \ + /usr/include/c++/11/typeinfo /usr/include/c++/11/bits/nested_exception.h \ + /usr/include/c++/11/bits/streambuf.tcc /usr/include/c++/11/locale \ + /usr/include/c++/11/bits/locale_facets.h /usr/include/c++/11/cwctype \ + /usr/include/wctype.h /usr/include/x86_64-linux-gnu/bits/wctype-wchar.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_base.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_inline.h \ + /usr/include/c++/11/bits/locale_facets.tcc \ + /usr/include/c++/11/bits/locale_facets_nonio.h /usr/include/c++/11/ctime \ + /usr/include/x86_64-linux-gnu/c++/11/bits/time_members.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/messages_members.h \ + /usr/include/libintl.h /usr/include/c++/11/bits/codecvt.h \ + /usr/include/c++/11/bits/locale_facets_nonio.tcc \ + /usr/include/c++/11/bits/locale_conv.h \ + /usr/include/c++/11/bits/unique_ptr.h /usr/include/c++/11/tuple \ + /usr/include/c++/11/array /usr/include/c++/11/bits/uses_allocator.h \ + /usr/include/c++/11/bits/invoke.h /usr/include/c++/11/memory \ + /usr/include/c++/11/bits/stl_uninitialized.h \ + /usr/include/c++/11/bits/stl_raw_storage_iter.h \ + /usr/include/c++/11/bits/align.h /usr/include/c++/11/bit \ + /usr/include/c++/11/bits/shared_ptr.h \ + /usr/include/c++/11/bits/shared_ptr_base.h \ + /usr/include/c++/11/bits/allocated_ptr.h \ + /usr/include/c++/11/bits/refwrap.h \ + /usr/include/c++/11/ext/aligned_buffer.h \ + /usr/include/c++/11/ext/concurrence.h \ + /usr/include/c++/11/bits/shared_ptr_atomic.h \ + /usr/include/c++/11/bits/atomic_base.h \ + /usr/include/c++/11/bits/atomic_lockfree_defines.h \ + /usr/include/c++/11/backward/auto_ptr.h /usr/include/c++/11/sstream \ + /usr/include/c++/11/istream /usr/include/c++/11/ios \ + /usr/include/c++/11/bits/basic_ios.h \ + /usr/include/c++/11/bits/basic_ios.tcc /usr/include/c++/11/ostream \ + /usr/include/c++/11/bits/ostream.tcc \ + /usr/include/c++/11/bits/istream.tcc \ + /usr/include/c++/11/bits/sstream.tcc /usr/include/c++/11/stack \ + /usr/include/c++/11/deque /usr/include/c++/11/bits/stl_deque.h \ + /usr/include/c++/11/bits/deque.tcc /usr/include/c++/11/bits/stl_stack.h \ + /usr/include/c++/11/vector /usr/include/c++/11/bits/stl_vector.h \ + /usr/include/c++/11/bits/stl_bvector.h \ + /usr/include/c++/11/bits/vector.tcc /usr/include/c++/11/map \ + /usr/include/c++/11/bits/stl_tree.h /usr/include/c++/11/bits/stl_map.h \ + /usr/include/c++/11/bits/stl_multimap.h \ + /usr/include/c++/11/bits/erase_if.h /usr/include/c++/11/cstring \ + /usr/include/string.h /usr/include/strings.h \ + /usr/include/x86_64-linux-gnu/bits/strings_fortified.h \ + /usr/include/x86_64-linux-gnu/bits/string_fortified.h \ + /usr/include/c++/11/bits/std_function.h \ + /usr/include/c++/11/bits/regex_constants.h \ + /usr/include/c++/11/bits/regex_error.h \ + /usr/include/c++/11/bits/regex_automaton.h \ + /usr/include/c++/11/bits/regex_automaton.tcc \ + /usr/include/c++/11/bits/regex_scanner.h \ + /usr/include/c++/11/bits/regex_scanner.tcc \ + /usr/include/c++/11/bits/regex_compiler.h \ + /usr/include/c++/11/bits/regex_compiler.tcc \ + /usr/include/c++/11/bits/regex.h /usr/include/c++/11/bits/regex.tcc \ + /usr/include/c++/11/bits/regex_executor.h \ + /usr/include/c++/11/bits/regex_executor.tcc /usr/include/c++/11/numeric \ + /usr/include/c++/11/bits/stl_numeric.h /usr/include/c++/11/complex \ + /usr/include/c++/11/cmath /usr/include/math.h \ + /usr/include/x86_64-linux-gnu/bits/math-vector.h \ + /usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h \ + /usr/include/x86_64-linux-gnu/bits/flt-eval-method.h \ + /usr/include/x86_64-linux-gnu/bits/fp-logb.h \ + /usr/include/x86_64-linux-gnu/bits/fp-fast.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-narrow.h \ + /usr/include/x86_64-linux-gnu/bits/iscanonical.h \ + /usr/include/c++/11/iomanip /usr/include/c++/11/iostream \ + /usr/include/c++/11/unordered_map /usr/include/c++/11/bits/hashtable.h \ + /usr/include/c++/11/bits/hashtable_policy.h \ + /usr/include/c++/11/bits/enable_special_members.h \ + /usr/include/c++/11/bits/unordered_map.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_device/types.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor_shape.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor_buffer.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/base/core/refcount.h \ + /usr/include/c++/11/atomic \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor_accessor.h \ + /usr/include/c++/11/cstddef \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/base/macros/macros.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/base/utils/logging.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/base/utils/array_ref.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/kernels/memory.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor_map.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor_utils.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/base/core/cpu_allocator.h diff --git a/build/source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor_buffer.cpp.o b/build/source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor_buffer.cpp.o new file mode 100644 index 0000000000..d68a49ca86 Binary files /dev/null and b/build/source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor_buffer.cpp.o differ diff --git a/build/source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor_buffer.cpp.o.d b/build/source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor_buffer.cpp.o.d new file mode 100644 index 0000000000..29aa50d743 --- /dev/null +++ b/build/source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor_buffer.cpp.o.d @@ -0,0 +1,230 @@ +source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor_buffer.cpp.o: \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor_buffer.cpp \ + /usr/include/stdc-predef.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor_buffer.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/base/core/refcount.h \ + /usr/include/c++/11/atomic /usr/include/c++/11/bits/atomic_base.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++config.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/os_defines.h \ + /usr/include/features.h /usr/include/features-time64.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/cpu_defines.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdint.h /usr/include/stdint.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/wchar.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-uintn.h \ + /usr/include/c++/11/bits/atomic_lockfree_defines.h \ + /usr/include/c++/11/bits/move.h /usr/include/c++/11/type_traits \ + /usr/include/c++/11/memory /usr/include/c++/11/bits/stl_algobase.h \ + /usr/include/c++/11/bits/functexcept.h \ + /usr/include/c++/11/bits/exception_defines.h \ + /usr/include/c++/11/bits/cpp_type_traits.h \ + /usr/include/c++/11/ext/type_traits.h \ + /usr/include/c++/11/ext/numeric_traits.h \ + /usr/include/c++/11/bits/stl_pair.h \ + /usr/include/c++/11/bits/stl_iterator_base_types.h \ + /usr/include/c++/11/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/11/bits/concept_check.h \ + /usr/include/c++/11/debug/assertions.h \ + /usr/include/c++/11/bits/stl_iterator.h \ + /usr/include/c++/11/bits/ptr_traits.h /usr/include/c++/11/debug/debug.h \ + /usr/include/c++/11/bits/predefined_ops.h \ + /usr/include/c++/11/bits/allocator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++allocator.h \ + /usr/include/c++/11/ext/new_allocator.h /usr/include/c++/11/new \ + /usr/include/c++/11/bits/exception.h \ + /usr/include/c++/11/bits/memoryfwd.h \ + /usr/include/c++/11/bits/stl_construct.h \ + /usr/include/c++/11/bits/stl_uninitialized.h \ + /usr/include/c++/11/ext/alloc_traits.h \ + /usr/include/c++/11/bits/alloc_traits.h \ + /usr/include/c++/11/bits/stl_tempbuf.h \ + /usr/include/c++/11/bits/stl_raw_storage_iter.h \ + /usr/include/c++/11/bits/align.h /usr/include/c++/11/bit \ + /usr/include/c++/11/bits/uses_allocator.h \ + /usr/include/c++/11/bits/unique_ptr.h /usr/include/c++/11/utility \ + /usr/include/c++/11/bits/stl_relops.h \ + /usr/include/c++/11/initializer_list /usr/include/c++/11/tuple \ + /usr/include/c++/11/array /usr/include/c++/11/bits/range_access.h \ + /usr/include/c++/11/bits/invoke.h \ + /usr/include/c++/11/bits/stl_function.h \ + /usr/include/c++/11/backward/binders.h \ + /usr/include/c++/11/bits/functional_hash.h \ + /usr/include/c++/11/bits/hash_bytes.h \ + /usr/include/c++/11/bits/shared_ptr.h /usr/include/c++/11/iosfwd \ + /usr/include/c++/11/bits/stringfwd.h /usr/include/c++/11/bits/postypes.h \ + /usr/include/c++/11/cwchar /usr/include/wchar.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/types/wint_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/wchar2.h \ + /usr/include/c++/11/bits/shared_ptr_base.h /usr/include/c++/11/typeinfo \ + /usr/include/c++/11/bits/allocated_ptr.h \ + /usr/include/c++/11/bits/refwrap.h \ + /usr/include/c++/11/ext/aligned_buffer.h \ + /usr/include/c++/11/ext/atomicity.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr-default.h \ + /usr/include/pthread.h /usr/include/sched.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/sched.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h \ + /usr/include/x86_64-linux-gnu/bits/cpu-set.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/timex.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/atomic_wide_counter.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h \ + /usr/include/x86_64-linux-gnu/bits/setjmp.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct___jmp_buf_tag.h \ + /usr/include/x86_64-linux-gnu/bits/pthread_stack_min-dynamic.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/atomic_word.h \ + /usr/include/x86_64-linux-gnu/sys/single_threaded.h \ + /usr/include/c++/11/ext/concurrence.h /usr/include/c++/11/exception \ + /usr/include/c++/11/bits/exception_ptr.h \ + /usr/include/c++/11/bits/cxxabi_init_exception.h \ + /usr/include/c++/11/bits/nested_exception.h \ + /usr/include/c++/11/bits/shared_ptr_atomic.h \ + /usr/include/c++/11/backward/auto_ptr.h /usr/include/c++/11/iostream \ + /usr/include/c++/11/ostream /usr/include/c++/11/ios \ + /usr/include/c++/11/bits/char_traits.h /usr/include/c++/11/cstdint \ + /usr/include/c++/11/bits/localefwd.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++locale.h \ + /usr/include/c++/11/clocale /usr/include/locale.h \ + /usr/include/x86_64-linux-gnu/bits/locale.h /usr/include/c++/11/cctype \ + /usr/include/ctype.h /usr/include/c++/11/bits/ios_base.h \ + /usr/include/c++/11/bits/locale_classes.h /usr/include/c++/11/string \ + /usr/include/c++/11/bits/ostream_insert.h \ + /usr/include/c++/11/bits/cxxabi_forced.h \ + /usr/include/c++/11/bits/basic_string.h \ + /usr/include/c++/11/ext/string_conversions.h /usr/include/c++/11/cstdlib \ + /usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/sys/types.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/include/c++/11/bits/std_abs.h /usr/include/c++/11/cstdio \ + /usr/include/stdio.h /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/c++/11/cerrno \ + /usr/include/errno.h /usr/include/x86_64-linux-gnu/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/bits/types/error_t.h \ + /usr/include/c++/11/bits/charconv.h \ + /usr/include/c++/11/bits/basic_string.tcc \ + /usr/include/c++/11/bits/locale_classes.tcc \ + /usr/include/c++/11/system_error \ + /usr/include/x86_64-linux-gnu/c++/11/bits/error_constants.h \ + /usr/include/c++/11/stdexcept /usr/include/c++/11/streambuf \ + /usr/include/c++/11/bits/streambuf.tcc \ + /usr/include/c++/11/bits/basic_ios.h \ + /usr/include/c++/11/bits/locale_facets.h /usr/include/c++/11/cwctype \ + /usr/include/wctype.h /usr/include/x86_64-linux-gnu/bits/wctype-wchar.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_base.h \ + /usr/include/c++/11/bits/streambuf_iterator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_inline.h \ + /usr/include/c++/11/bits/locale_facets.tcc \ + /usr/include/c++/11/bits/basic_ios.tcc \ + /usr/include/c++/11/bits/ostream.tcc /usr/include/c++/11/istream \ + /usr/include/c++/11/bits/istream.tcc \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/base/core/allocator.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor_types.h \ + /usr/include/c++/11/regex /usr/include/c++/11/algorithm \ + /usr/include/c++/11/bits/stl_algo.h \ + /usr/include/c++/11/bits/algorithmfwd.h \ + /usr/include/c++/11/bits/stl_heap.h \ + /usr/include/c++/11/bits/uniform_int_dist.h /usr/include/c++/11/bitset \ + /usr/include/c++/11/iterator /usr/include/c++/11/bits/stream_iterator.h \ + /usr/include/c++/11/locale \ + /usr/include/c++/11/bits/locale_facets_nonio.h /usr/include/c++/11/ctime \ + /usr/include/x86_64-linux-gnu/c++/11/bits/time_members.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/messages_members.h \ + /usr/include/libintl.h /usr/include/c++/11/bits/codecvt.h \ + /usr/include/c++/11/bits/locale_facets_nonio.tcc \ + /usr/include/c++/11/bits/locale_conv.h /usr/include/c++/11/sstream \ + /usr/include/c++/11/bits/sstream.tcc /usr/include/c++/11/stack \ + /usr/include/c++/11/deque /usr/include/c++/11/bits/stl_deque.h \ + /usr/include/c++/11/bits/deque.tcc /usr/include/c++/11/bits/stl_stack.h \ + /usr/include/c++/11/vector /usr/include/c++/11/bits/stl_vector.h \ + /usr/include/c++/11/bits/stl_bvector.h \ + /usr/include/c++/11/bits/vector.tcc /usr/include/c++/11/map \ + /usr/include/c++/11/bits/stl_tree.h /usr/include/c++/11/bits/stl_map.h \ + /usr/include/c++/11/bits/stl_multimap.h \ + /usr/include/c++/11/bits/erase_if.h /usr/include/c++/11/cstring \ + /usr/include/string.h /usr/include/strings.h \ + /usr/include/x86_64-linux-gnu/bits/strings_fortified.h \ + /usr/include/x86_64-linux-gnu/bits/string_fortified.h \ + /usr/include/c++/11/bits/std_function.h \ + /usr/include/c++/11/bits/regex_constants.h \ + /usr/include/c++/11/bits/regex_error.h \ + /usr/include/c++/11/bits/regex_automaton.h \ + /usr/include/c++/11/bits/regex_automaton.tcc \ + /usr/include/c++/11/bits/regex_scanner.h \ + /usr/include/c++/11/bits/regex_scanner.tcc \ + /usr/include/c++/11/bits/regex_compiler.h \ + /usr/include/c++/11/bits/regex_compiler.tcc \ + /usr/include/c++/11/bits/regex.h /usr/include/c++/11/bits/regex.tcc \ + /usr/include/c++/11/bits/regex_executor.h \ + /usr/include/c++/11/bits/regex_executor.tcc /usr/include/c++/11/numeric \ + /usr/include/c++/11/bits/stl_numeric.h /usr/include/c++/11/complex \ + /usr/include/c++/11/cmath /usr/include/math.h \ + /usr/include/x86_64-linux-gnu/bits/math-vector.h \ + /usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h \ + /usr/include/x86_64-linux-gnu/bits/flt-eval-method.h \ + /usr/include/x86_64-linux-gnu/bits/fp-logb.h \ + /usr/include/x86_64-linux-gnu/bits/fp-fast.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-narrow.h \ + /usr/include/x86_64-linux-gnu/bits/iscanonical.h \ + /usr/include/c++/11/iomanip /usr/include/c++/11/unordered_map \ + /usr/include/c++/11/bits/hashtable.h \ + /usr/include/c++/11/bits/hashtable_policy.h \ + /usr/include/c++/11/bits/enable_special_members.h \ + /usr/include/c++/11/bits/unordered_map.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_device/types.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/base/core/cpu_allocator.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/base/macros/macros.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/base/utils/logging.h diff --git a/build/source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor_map.cpp.o b/build/source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor_map.cpp.o new file mode 100644 index 0000000000..45b01933ce Binary files /dev/null and b/build/source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor_map.cpp.o differ diff --git a/build/source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor_map.cpp.o.d b/build/source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor_map.cpp.o.d new file mode 100644 index 0000000000..372d75a93a --- /dev/null +++ b/build/source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor_map.cpp.o.d @@ -0,0 +1,240 @@ +source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor_map.cpp.o: \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor_map.cpp \ + /usr/include/stdc-predef.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor_map.h \ + /usr/include/c++/11/complex \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++config.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/os_defines.h \ + /usr/include/features.h /usr/include/features-time64.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/cpu_defines.h \ + /usr/include/c++/11/bits/cpp_type_traits.h \ + /usr/include/c++/11/ext/type_traits.h /usr/include/c++/11/cmath \ + /usr/include/math.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/math-vector.h \ + /usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h \ + /usr/include/x86_64-linux-gnu/bits/flt-eval-method.h \ + /usr/include/x86_64-linux-gnu/bits/fp-logb.h \ + /usr/include/x86_64-linux-gnu/bits/fp-fast.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-narrow.h \ + /usr/include/x86_64-linux-gnu/bits/iscanonical.h \ + /usr/include/c++/11/bits/std_abs.h /usr/include/stdlib.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h \ + /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/atomic_wide_counter.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h /usr/include/c++/11/sstream \ + /usr/include/c++/11/istream /usr/include/c++/11/ios \ + /usr/include/c++/11/iosfwd /usr/include/c++/11/bits/stringfwd.h \ + /usr/include/c++/11/bits/memoryfwd.h /usr/include/c++/11/bits/postypes.h \ + /usr/include/c++/11/cwchar /usr/include/wchar.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/wchar.h \ + /usr/include/x86_64-linux-gnu/bits/types/wint_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/wchar2.h \ + /usr/include/c++/11/exception /usr/include/c++/11/bits/exception.h \ + /usr/include/c++/11/bits/exception_ptr.h \ + /usr/include/c++/11/bits/exception_defines.h \ + /usr/include/c++/11/bits/cxxabi_init_exception.h \ + /usr/include/c++/11/typeinfo /usr/include/c++/11/bits/hash_bytes.h \ + /usr/include/c++/11/new /usr/include/c++/11/bits/move.h \ + /usr/include/c++/11/type_traits \ + /usr/include/c++/11/bits/nested_exception.h \ + /usr/include/c++/11/bits/char_traits.h \ + /usr/include/c++/11/bits/stl_algobase.h \ + /usr/include/c++/11/bits/functexcept.h \ + /usr/include/c++/11/ext/numeric_traits.h \ + /usr/include/c++/11/bits/stl_pair.h \ + /usr/include/c++/11/bits/stl_iterator_base_types.h \ + /usr/include/c++/11/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/11/bits/concept_check.h \ + /usr/include/c++/11/debug/assertions.h \ + /usr/include/c++/11/bits/stl_iterator.h \ + /usr/include/c++/11/bits/ptr_traits.h /usr/include/c++/11/debug/debug.h \ + /usr/include/c++/11/bits/predefined_ops.h /usr/include/c++/11/cstdint \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdint.h /usr/include/stdint.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-uintn.h \ + /usr/include/c++/11/bits/localefwd.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++locale.h \ + /usr/include/c++/11/clocale /usr/include/locale.h \ + /usr/include/x86_64-linux-gnu/bits/locale.h /usr/include/c++/11/cctype \ + /usr/include/ctype.h /usr/include/c++/11/bits/ios_base.h \ + /usr/include/c++/11/ext/atomicity.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr-default.h \ + /usr/include/pthread.h /usr/include/sched.h \ + /usr/include/x86_64-linux-gnu/bits/sched.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h \ + /usr/include/x86_64-linux-gnu/bits/cpu-set.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/timex.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h \ + /usr/include/x86_64-linux-gnu/bits/setjmp.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct___jmp_buf_tag.h \ + /usr/include/x86_64-linux-gnu/bits/pthread_stack_min-dynamic.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/atomic_word.h \ + /usr/include/x86_64-linux-gnu/sys/single_threaded.h \ + /usr/include/c++/11/bits/locale_classes.h /usr/include/c++/11/string \ + /usr/include/c++/11/bits/allocator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++allocator.h \ + /usr/include/c++/11/ext/new_allocator.h \ + /usr/include/c++/11/bits/ostream_insert.h \ + /usr/include/c++/11/bits/cxxabi_forced.h \ + /usr/include/c++/11/bits/stl_function.h \ + /usr/include/c++/11/backward/binders.h \ + /usr/include/c++/11/bits/range_access.h \ + /usr/include/c++/11/initializer_list \ + /usr/include/c++/11/bits/basic_string.h \ + /usr/include/c++/11/ext/alloc_traits.h \ + /usr/include/c++/11/bits/alloc_traits.h \ + /usr/include/c++/11/bits/stl_construct.h \ + /usr/include/c++/11/ext/string_conversions.h /usr/include/c++/11/cstdlib \ + /usr/include/c++/11/cstdio /usr/include/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/c++/11/cerrno \ + /usr/include/errno.h /usr/include/x86_64-linux-gnu/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/bits/types/error_t.h \ + /usr/include/c++/11/bits/charconv.h \ + /usr/include/c++/11/bits/functional_hash.h \ + /usr/include/c++/11/bits/basic_string.tcc \ + /usr/include/c++/11/bits/locale_classes.tcc \ + /usr/include/c++/11/system_error \ + /usr/include/x86_64-linux-gnu/c++/11/bits/error_constants.h \ + /usr/include/c++/11/stdexcept /usr/include/c++/11/streambuf \ + /usr/include/c++/11/bits/streambuf.tcc \ + /usr/include/c++/11/bits/basic_ios.h \ + /usr/include/c++/11/bits/locale_facets.h /usr/include/c++/11/cwctype \ + /usr/include/wctype.h /usr/include/x86_64-linux-gnu/bits/wctype-wchar.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_base.h \ + /usr/include/c++/11/bits/streambuf_iterator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_inline.h \ + /usr/include/c++/11/bits/locale_facets.tcc \ + /usr/include/c++/11/bits/basic_ios.tcc /usr/include/c++/11/ostream \ + /usr/include/c++/11/bits/ostream.tcc \ + /usr/include/c++/11/bits/istream.tcc \ + /usr/include/c++/11/bits/sstream.tcc \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/base/core/allocator.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor_types.h \ + /usr/include/c++/11/regex /usr/include/c++/11/algorithm \ + /usr/include/c++/11/utility /usr/include/c++/11/bits/stl_relops.h \ + /usr/include/c++/11/bits/stl_algo.h \ + /usr/include/c++/11/bits/algorithmfwd.h \ + /usr/include/c++/11/bits/stl_heap.h \ + /usr/include/c++/11/bits/stl_tempbuf.h \ + /usr/include/c++/11/bits/uniform_int_dist.h /usr/include/c++/11/bitset \ + /usr/include/c++/11/iterator /usr/include/c++/11/bits/stream_iterator.h \ + /usr/include/c++/11/locale \ + /usr/include/c++/11/bits/locale_facets_nonio.h /usr/include/c++/11/ctime \ + /usr/include/x86_64-linux-gnu/c++/11/bits/time_members.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/messages_members.h \ + /usr/include/libintl.h /usr/include/c++/11/bits/codecvt.h \ + /usr/include/c++/11/bits/locale_facets_nonio.tcc \ + /usr/include/c++/11/bits/locale_conv.h \ + /usr/include/c++/11/bits/unique_ptr.h /usr/include/c++/11/tuple \ + /usr/include/c++/11/array /usr/include/c++/11/bits/uses_allocator.h \ + /usr/include/c++/11/bits/invoke.h /usr/include/c++/11/memory \ + /usr/include/c++/11/bits/stl_uninitialized.h \ + /usr/include/c++/11/bits/stl_raw_storage_iter.h \ + /usr/include/c++/11/bits/align.h /usr/include/c++/11/bit \ + /usr/include/c++/11/bits/shared_ptr.h \ + /usr/include/c++/11/bits/shared_ptr_base.h \ + /usr/include/c++/11/bits/allocated_ptr.h \ + /usr/include/c++/11/bits/refwrap.h \ + /usr/include/c++/11/ext/aligned_buffer.h \ + /usr/include/c++/11/ext/concurrence.h \ + /usr/include/c++/11/bits/shared_ptr_atomic.h \ + /usr/include/c++/11/bits/atomic_base.h \ + /usr/include/c++/11/bits/atomic_lockfree_defines.h \ + /usr/include/c++/11/backward/auto_ptr.h /usr/include/c++/11/stack \ + /usr/include/c++/11/deque /usr/include/c++/11/bits/stl_deque.h \ + /usr/include/c++/11/bits/deque.tcc /usr/include/c++/11/bits/stl_stack.h \ + /usr/include/c++/11/vector /usr/include/c++/11/bits/stl_vector.h \ + /usr/include/c++/11/bits/stl_bvector.h \ + /usr/include/c++/11/bits/vector.tcc /usr/include/c++/11/map \ + /usr/include/c++/11/bits/stl_tree.h /usr/include/c++/11/bits/stl_map.h \ + /usr/include/c++/11/bits/stl_multimap.h \ + /usr/include/c++/11/bits/erase_if.h /usr/include/c++/11/cstring \ + /usr/include/string.h /usr/include/strings.h \ + /usr/include/x86_64-linux-gnu/bits/strings_fortified.h \ + /usr/include/x86_64-linux-gnu/bits/string_fortified.h \ + /usr/include/c++/11/bits/std_function.h \ + /usr/include/c++/11/bits/regex_constants.h \ + /usr/include/c++/11/bits/regex_error.h \ + /usr/include/c++/11/bits/regex_automaton.h \ + /usr/include/c++/11/bits/regex_automaton.tcc \ + /usr/include/c++/11/bits/regex_scanner.h \ + /usr/include/c++/11/bits/regex_scanner.tcc \ + /usr/include/c++/11/bits/regex_compiler.h \ + /usr/include/c++/11/bits/regex_compiler.tcc \ + /usr/include/c++/11/bits/regex.h /usr/include/c++/11/bits/regex.tcc \ + /usr/include/c++/11/bits/regex_executor.h \ + /usr/include/c++/11/bits/regex_executor.tcc /usr/include/c++/11/numeric \ + /usr/include/c++/11/bits/stl_numeric.h /usr/include/c++/11/iomanip \ + /usr/include/c++/11/iostream /usr/include/c++/11/unordered_map \ + /usr/include/c++/11/bits/hashtable.h \ + /usr/include/c++/11/bits/hashtable_policy.h \ + /usr/include/c++/11/bits/enable_special_members.h \ + /usr/include/c++/11/bits/unordered_map.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_device/types.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor_shape.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor_buffer.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/base/core/refcount.h \ + /usr/include/c++/11/atomic \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor_accessor.h \ + /usr/include/c++/11/cstddef \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/base/macros/macros.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/base/utils/logging.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/base/utils/array_ref.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/kernels/memory.h diff --git a/build/source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor_shape.cpp.o b/build/source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor_shape.cpp.o new file mode 100644 index 0000000000..fe184990a1 Binary files /dev/null and b/build/source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor_shape.cpp.o differ diff --git a/build/source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor_shape.cpp.o.d b/build/source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor_shape.cpp.o.d new file mode 100644 index 0000000000..9bd6271084 --- /dev/null +++ b/build/source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor_shape.cpp.o.d @@ -0,0 +1,156 @@ +source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor_shape.cpp.o: \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor_shape.cpp \ + /usr/include/stdc-predef.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor_shape.h \ + /usr/include/c++/11/vector /usr/include/c++/11/bits/stl_algobase.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++config.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/os_defines.h \ + /usr/include/features.h /usr/include/features-time64.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/cpu_defines.h \ + /usr/include/c++/11/bits/functexcept.h \ + /usr/include/c++/11/bits/exception_defines.h \ + /usr/include/c++/11/bits/cpp_type_traits.h \ + /usr/include/c++/11/ext/type_traits.h \ + /usr/include/c++/11/ext/numeric_traits.h \ + /usr/include/c++/11/bits/stl_pair.h /usr/include/c++/11/bits/move.h \ + /usr/include/c++/11/type_traits \ + /usr/include/c++/11/bits/stl_iterator_base_types.h \ + /usr/include/c++/11/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/11/bits/concept_check.h \ + /usr/include/c++/11/debug/assertions.h \ + /usr/include/c++/11/bits/stl_iterator.h \ + /usr/include/c++/11/bits/ptr_traits.h /usr/include/c++/11/debug/debug.h \ + /usr/include/c++/11/bits/predefined_ops.h \ + /usr/include/c++/11/bits/allocator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++allocator.h \ + /usr/include/c++/11/ext/new_allocator.h /usr/include/c++/11/new \ + /usr/include/c++/11/bits/exception.h \ + /usr/include/c++/11/bits/memoryfwd.h \ + /usr/include/c++/11/bits/stl_construct.h \ + /usr/include/c++/11/bits/stl_uninitialized.h \ + /usr/include/c++/11/ext/alloc_traits.h \ + /usr/include/c++/11/bits/alloc_traits.h \ + /usr/include/c++/11/bits/stl_vector.h \ + /usr/include/c++/11/initializer_list \ + /usr/include/c++/11/bits/stl_bvector.h \ + /usr/include/c++/11/bits/functional_hash.h \ + /usr/include/c++/11/bits/hash_bytes.h \ + /usr/include/c++/11/bits/range_access.h \ + /usr/include/c++/11/bits/vector.tcc /usr/include/c++/11/iostream \ + /usr/include/c++/11/ostream /usr/include/c++/11/ios \ + /usr/include/c++/11/iosfwd /usr/include/c++/11/bits/stringfwd.h \ + /usr/include/c++/11/bits/postypes.h /usr/include/c++/11/cwchar \ + /usr/include/wchar.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/wchar.h \ + /usr/include/x86_64-linux-gnu/bits/types/wint_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/wchar2.h \ + /usr/include/c++/11/exception /usr/include/c++/11/bits/exception_ptr.h \ + /usr/include/c++/11/bits/cxxabi_init_exception.h \ + /usr/include/c++/11/typeinfo /usr/include/c++/11/bits/nested_exception.h \ + /usr/include/c++/11/bits/char_traits.h /usr/include/c++/11/cstdint \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdint.h /usr/include/stdint.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-uintn.h \ + /usr/include/c++/11/bits/localefwd.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++locale.h \ + /usr/include/c++/11/clocale /usr/include/locale.h \ + /usr/include/x86_64-linux-gnu/bits/locale.h /usr/include/c++/11/cctype \ + /usr/include/ctype.h /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/c++/11/bits/ios_base.h /usr/include/c++/11/ext/atomicity.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr-default.h \ + /usr/include/pthread.h /usr/include/sched.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/sched.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h \ + /usr/include/x86_64-linux-gnu/bits/cpu-set.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/timex.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/atomic_wide_counter.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h \ + /usr/include/x86_64-linux-gnu/bits/setjmp.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct___jmp_buf_tag.h \ + /usr/include/x86_64-linux-gnu/bits/pthread_stack_min-dynamic.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/atomic_word.h \ + /usr/include/x86_64-linux-gnu/sys/single_threaded.h \ + /usr/include/c++/11/bits/locale_classes.h /usr/include/c++/11/string \ + /usr/include/c++/11/bits/ostream_insert.h \ + /usr/include/c++/11/bits/cxxabi_forced.h \ + /usr/include/c++/11/bits/stl_function.h \ + /usr/include/c++/11/backward/binders.h \ + /usr/include/c++/11/bits/basic_string.h \ + /usr/include/c++/11/ext/string_conversions.h /usr/include/c++/11/cstdlib \ + /usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/sys/types.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/include/c++/11/bits/std_abs.h /usr/include/c++/11/cstdio \ + /usr/include/stdio.h /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/c++/11/cerrno \ + /usr/include/errno.h /usr/include/x86_64-linux-gnu/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/bits/types/error_t.h \ + /usr/include/c++/11/bits/charconv.h \ + /usr/include/c++/11/bits/basic_string.tcc \ + /usr/include/c++/11/bits/locale_classes.tcc \ + /usr/include/c++/11/system_error \ + /usr/include/x86_64-linux-gnu/c++/11/bits/error_constants.h \ + /usr/include/c++/11/stdexcept /usr/include/c++/11/streambuf \ + /usr/include/c++/11/bits/streambuf.tcc \ + /usr/include/c++/11/bits/basic_ios.h \ + /usr/include/c++/11/bits/locale_facets.h /usr/include/c++/11/cwctype \ + /usr/include/wctype.h /usr/include/x86_64-linux-gnu/bits/wctype-wchar.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_base.h \ + /usr/include/c++/11/bits/streambuf_iterator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_inline.h \ + /usr/include/c++/11/bits/locale_facets.tcc \ + /usr/include/c++/11/bits/basic_ios.tcc \ + /usr/include/c++/11/bits/ostream.tcc /usr/include/c++/11/istream \ + /usr/include/c++/11/bits/istream.tcc diff --git a/build/source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor_types.cpp.o b/build/source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor_types.cpp.o new file mode 100644 index 0000000000..698786f223 Binary files /dev/null and b/build/source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor_types.cpp.o differ diff --git a/build/source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor_types.cpp.o.d b/build/source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor_types.cpp.o.d new file mode 100644 index 0000000000..2a71622845 --- /dev/null +++ b/build/source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor_types.cpp.o.d @@ -0,0 +1,225 @@ +source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor_types.cpp.o: \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor_types.cpp \ + /usr/include/stdc-predef.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor_types.h \ + /usr/include/c++/11/regex /usr/include/c++/11/algorithm \ + /usr/include/c++/11/utility \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++config.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/os_defines.h \ + /usr/include/features.h /usr/include/features-time64.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/cpu_defines.h \ + /usr/include/c++/11/bits/stl_relops.h \ + /usr/include/c++/11/bits/stl_pair.h /usr/include/c++/11/bits/move.h \ + /usr/include/c++/11/type_traits /usr/include/c++/11/initializer_list \ + /usr/include/c++/11/bits/stl_algobase.h \ + /usr/include/c++/11/bits/functexcept.h \ + /usr/include/c++/11/bits/exception_defines.h \ + /usr/include/c++/11/bits/cpp_type_traits.h \ + /usr/include/c++/11/ext/type_traits.h \ + /usr/include/c++/11/ext/numeric_traits.h \ + /usr/include/c++/11/bits/stl_iterator_base_types.h \ + /usr/include/c++/11/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/11/bits/concept_check.h \ + /usr/include/c++/11/debug/assertions.h \ + /usr/include/c++/11/bits/stl_iterator.h \ + /usr/include/c++/11/bits/ptr_traits.h /usr/include/c++/11/debug/debug.h \ + /usr/include/c++/11/bits/predefined_ops.h \ + /usr/include/c++/11/bits/stl_algo.h /usr/include/c++/11/cstdlib \ + /usr/include/stdlib.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h \ + /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/atomic_wide_counter.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/include/c++/11/bits/std_abs.h \ + /usr/include/c++/11/bits/algorithmfwd.h \ + /usr/include/c++/11/bits/stl_heap.h \ + /usr/include/c++/11/bits/stl_tempbuf.h \ + /usr/include/c++/11/bits/stl_construct.h /usr/include/c++/11/new \ + /usr/include/c++/11/bits/exception.h \ + /usr/include/c++/11/bits/uniform_int_dist.h /usr/include/c++/11/bitset \ + /usr/include/c++/11/string /usr/include/c++/11/bits/stringfwd.h \ + /usr/include/c++/11/bits/memoryfwd.h \ + /usr/include/c++/11/bits/char_traits.h \ + /usr/include/c++/11/bits/postypes.h /usr/include/c++/11/cwchar \ + /usr/include/wchar.h /usr/lib/gcc/x86_64-linux-gnu/11/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/wchar.h \ + /usr/include/x86_64-linux-gnu/bits/types/wint_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/wchar2.h /usr/include/c++/11/cstdint \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdint.h /usr/include/stdint.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-uintn.h \ + /usr/include/c++/11/bits/allocator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++allocator.h \ + /usr/include/c++/11/ext/new_allocator.h \ + /usr/include/c++/11/bits/localefwd.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++locale.h \ + /usr/include/c++/11/clocale /usr/include/locale.h \ + /usr/include/x86_64-linux-gnu/bits/locale.h /usr/include/c++/11/iosfwd \ + /usr/include/c++/11/cctype /usr/include/ctype.h \ + /usr/include/c++/11/bits/ostream_insert.h \ + /usr/include/c++/11/bits/cxxabi_forced.h \ + /usr/include/c++/11/bits/stl_function.h \ + /usr/include/c++/11/backward/binders.h \ + /usr/include/c++/11/bits/range_access.h \ + /usr/include/c++/11/bits/basic_string.h \ + /usr/include/c++/11/ext/atomicity.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr-default.h \ + /usr/include/pthread.h /usr/include/sched.h \ + /usr/include/x86_64-linux-gnu/bits/sched.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h \ + /usr/include/x86_64-linux-gnu/bits/cpu-set.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/timex.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h \ + /usr/include/x86_64-linux-gnu/bits/setjmp.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct___jmp_buf_tag.h \ + /usr/include/x86_64-linux-gnu/bits/pthread_stack_min-dynamic.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/atomic_word.h \ + /usr/include/x86_64-linux-gnu/sys/single_threaded.h \ + /usr/include/c++/11/ext/alloc_traits.h \ + /usr/include/c++/11/bits/alloc_traits.h \ + /usr/include/c++/11/ext/string_conversions.h /usr/include/c++/11/cstdio \ + /usr/include/stdio.h /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/c++/11/cerrno \ + /usr/include/errno.h /usr/include/x86_64-linux-gnu/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/bits/types/error_t.h \ + /usr/include/c++/11/bits/charconv.h \ + /usr/include/c++/11/bits/functional_hash.h \ + /usr/include/c++/11/bits/hash_bytes.h \ + /usr/include/c++/11/bits/basic_string.tcc /usr/include/c++/11/iterator \ + /usr/include/c++/11/bits/stream_iterator.h \ + /usr/include/c++/11/bits/streambuf_iterator.h \ + /usr/include/c++/11/streambuf /usr/include/c++/11/bits/ios_base.h \ + /usr/include/c++/11/bits/locale_classes.h \ + /usr/include/c++/11/bits/locale_classes.tcc \ + /usr/include/c++/11/system_error \ + /usr/include/x86_64-linux-gnu/c++/11/bits/error_constants.h \ + /usr/include/c++/11/stdexcept /usr/include/c++/11/exception \ + /usr/include/c++/11/bits/exception_ptr.h \ + /usr/include/c++/11/bits/cxxabi_init_exception.h \ + /usr/include/c++/11/typeinfo /usr/include/c++/11/bits/nested_exception.h \ + /usr/include/c++/11/bits/streambuf.tcc /usr/include/c++/11/locale \ + /usr/include/c++/11/bits/locale_facets.h /usr/include/c++/11/cwctype \ + /usr/include/wctype.h /usr/include/x86_64-linux-gnu/bits/wctype-wchar.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_base.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_inline.h \ + /usr/include/c++/11/bits/locale_facets.tcc \ + /usr/include/c++/11/bits/locale_facets_nonio.h /usr/include/c++/11/ctime \ + /usr/include/x86_64-linux-gnu/c++/11/bits/time_members.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/messages_members.h \ + /usr/include/libintl.h /usr/include/c++/11/bits/codecvt.h \ + /usr/include/c++/11/bits/locale_facets_nonio.tcc \ + /usr/include/c++/11/bits/locale_conv.h \ + /usr/include/c++/11/bits/unique_ptr.h /usr/include/c++/11/tuple \ + /usr/include/c++/11/array /usr/include/c++/11/bits/uses_allocator.h \ + /usr/include/c++/11/bits/invoke.h /usr/include/c++/11/memory \ + /usr/include/c++/11/bits/stl_uninitialized.h \ + /usr/include/c++/11/bits/stl_raw_storage_iter.h \ + /usr/include/c++/11/bits/align.h /usr/include/c++/11/bit \ + /usr/include/c++/11/bits/shared_ptr.h \ + /usr/include/c++/11/bits/shared_ptr_base.h \ + /usr/include/c++/11/bits/allocated_ptr.h \ + /usr/include/c++/11/bits/refwrap.h \ + /usr/include/c++/11/ext/aligned_buffer.h \ + /usr/include/c++/11/ext/concurrence.h \ + /usr/include/c++/11/bits/shared_ptr_atomic.h \ + /usr/include/c++/11/bits/atomic_base.h \ + /usr/include/c++/11/bits/atomic_lockfree_defines.h \ + /usr/include/c++/11/backward/auto_ptr.h /usr/include/c++/11/sstream \ + /usr/include/c++/11/istream /usr/include/c++/11/ios \ + /usr/include/c++/11/bits/basic_ios.h \ + /usr/include/c++/11/bits/basic_ios.tcc /usr/include/c++/11/ostream \ + /usr/include/c++/11/bits/ostream.tcc \ + /usr/include/c++/11/bits/istream.tcc \ + /usr/include/c++/11/bits/sstream.tcc /usr/include/c++/11/stack \ + /usr/include/c++/11/deque /usr/include/c++/11/bits/stl_deque.h \ + /usr/include/c++/11/bits/deque.tcc /usr/include/c++/11/bits/stl_stack.h \ + /usr/include/c++/11/vector /usr/include/c++/11/bits/stl_vector.h \ + /usr/include/c++/11/bits/stl_bvector.h \ + /usr/include/c++/11/bits/vector.tcc /usr/include/c++/11/map \ + /usr/include/c++/11/bits/stl_tree.h /usr/include/c++/11/bits/stl_map.h \ + /usr/include/c++/11/bits/stl_multimap.h \ + /usr/include/c++/11/bits/erase_if.h /usr/include/c++/11/cstring \ + /usr/include/string.h /usr/include/strings.h \ + /usr/include/x86_64-linux-gnu/bits/strings_fortified.h \ + /usr/include/x86_64-linux-gnu/bits/string_fortified.h \ + /usr/include/c++/11/bits/std_function.h \ + /usr/include/c++/11/bits/regex_constants.h \ + /usr/include/c++/11/bits/regex_error.h \ + /usr/include/c++/11/bits/regex_automaton.h \ + /usr/include/c++/11/bits/regex_automaton.tcc \ + /usr/include/c++/11/bits/regex_scanner.h \ + /usr/include/c++/11/bits/regex_scanner.tcc \ + /usr/include/c++/11/bits/regex_compiler.h \ + /usr/include/c++/11/bits/regex_compiler.tcc \ + /usr/include/c++/11/bits/regex.h /usr/include/c++/11/bits/regex.tcc \ + /usr/include/c++/11/bits/regex_executor.h \ + /usr/include/c++/11/bits/regex_executor.tcc /usr/include/c++/11/numeric \ + /usr/include/c++/11/bits/stl_numeric.h /usr/include/c++/11/complex \ + /usr/include/c++/11/cmath /usr/include/math.h \ + /usr/include/x86_64-linux-gnu/bits/math-vector.h \ + /usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h \ + /usr/include/x86_64-linux-gnu/bits/flt-eval-method.h \ + /usr/include/x86_64-linux-gnu/bits/fp-logb.h \ + /usr/include/x86_64-linux-gnu/bits/fp-fast.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-narrow.h \ + /usr/include/x86_64-linux-gnu/bits/iscanonical.h \ + /usr/include/c++/11/iomanip /usr/include/c++/11/iostream \ + /usr/include/c++/11/unordered_map /usr/include/c++/11/bits/hashtable.h \ + /usr/include/c++/11/bits/hashtable_policy.h \ + /usr/include/c++/11/bits/enable_special_members.h \ + /usr/include/c++/11/bits/unordered_map.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_device/types.h diff --git a/build/source/source_base/module_container/CMakeFiles/container.dir/ATen/kernels/blas.cpp.o b/build/source/source_base/module_container/CMakeFiles/container.dir/ATen/kernels/blas.cpp.o new file mode 100644 index 0000000000..2e7945c39f Binary files /dev/null and b/build/source/source_base/module_container/CMakeFiles/container.dir/ATen/kernels/blas.cpp.o differ diff --git a/build/source/source_base/module_container/CMakeFiles/container.dir/ATen/kernels/blas.cpp.o.d b/build/source/source_base/module_container/CMakeFiles/container.dir/ATen/kernels/blas.cpp.o.d new file mode 100644 index 0000000000..f0fc23bf57 --- /dev/null +++ b/build/source/source_base/module_container/CMakeFiles/container.dir/ATen/kernels/blas.cpp.o.d @@ -0,0 +1,239 @@ +source/source_base/module_container/CMakeFiles/container.dir/ATen/kernels/blas.cpp.o: \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/kernels/blas.cpp \ + /usr/include/stdc-predef.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/kernels/blas.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/base/core/allocator.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor_types.h \ + /usr/include/c++/11/regex /usr/include/c++/11/algorithm \ + /usr/include/c++/11/utility \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++config.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/os_defines.h \ + /usr/include/features.h /usr/include/features-time64.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/cpu_defines.h \ + /usr/include/c++/11/bits/stl_relops.h \ + /usr/include/c++/11/bits/stl_pair.h /usr/include/c++/11/bits/move.h \ + /usr/include/c++/11/type_traits /usr/include/c++/11/initializer_list \ + /usr/include/c++/11/bits/stl_algobase.h \ + /usr/include/c++/11/bits/functexcept.h \ + /usr/include/c++/11/bits/exception_defines.h \ + /usr/include/c++/11/bits/cpp_type_traits.h \ + /usr/include/c++/11/ext/type_traits.h \ + /usr/include/c++/11/ext/numeric_traits.h \ + /usr/include/c++/11/bits/stl_iterator_base_types.h \ + /usr/include/c++/11/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/11/bits/concept_check.h \ + /usr/include/c++/11/debug/assertions.h \ + /usr/include/c++/11/bits/stl_iterator.h \ + /usr/include/c++/11/bits/ptr_traits.h /usr/include/c++/11/debug/debug.h \ + /usr/include/c++/11/bits/predefined_ops.h \ + /usr/include/c++/11/bits/stl_algo.h /usr/include/c++/11/cstdlib \ + /usr/include/stdlib.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h \ + /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/atomic_wide_counter.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/include/c++/11/bits/std_abs.h \ + /usr/include/c++/11/bits/algorithmfwd.h \ + /usr/include/c++/11/bits/stl_heap.h \ + /usr/include/c++/11/bits/stl_tempbuf.h \ + /usr/include/c++/11/bits/stl_construct.h /usr/include/c++/11/new \ + /usr/include/c++/11/bits/exception.h \ + /usr/include/c++/11/bits/uniform_int_dist.h /usr/include/c++/11/bitset \ + /usr/include/c++/11/string /usr/include/c++/11/bits/stringfwd.h \ + /usr/include/c++/11/bits/memoryfwd.h \ + /usr/include/c++/11/bits/char_traits.h \ + /usr/include/c++/11/bits/postypes.h /usr/include/c++/11/cwchar \ + /usr/include/wchar.h /usr/lib/gcc/x86_64-linux-gnu/11/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/wchar.h \ + /usr/include/x86_64-linux-gnu/bits/types/wint_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/wchar2.h /usr/include/c++/11/cstdint \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdint.h /usr/include/stdint.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-uintn.h \ + /usr/include/c++/11/bits/allocator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++allocator.h \ + /usr/include/c++/11/ext/new_allocator.h \ + /usr/include/c++/11/bits/localefwd.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++locale.h \ + /usr/include/c++/11/clocale /usr/include/locale.h \ + /usr/include/x86_64-linux-gnu/bits/locale.h /usr/include/c++/11/iosfwd \ + /usr/include/c++/11/cctype /usr/include/ctype.h \ + /usr/include/c++/11/bits/ostream_insert.h \ + /usr/include/c++/11/bits/cxxabi_forced.h \ + /usr/include/c++/11/bits/stl_function.h \ + /usr/include/c++/11/backward/binders.h \ + /usr/include/c++/11/bits/range_access.h \ + /usr/include/c++/11/bits/basic_string.h \ + /usr/include/c++/11/ext/atomicity.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr-default.h \ + /usr/include/pthread.h /usr/include/sched.h \ + /usr/include/x86_64-linux-gnu/bits/sched.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h \ + /usr/include/x86_64-linux-gnu/bits/cpu-set.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/timex.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h \ + /usr/include/x86_64-linux-gnu/bits/setjmp.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct___jmp_buf_tag.h \ + /usr/include/x86_64-linux-gnu/bits/pthread_stack_min-dynamic.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/atomic_word.h \ + /usr/include/x86_64-linux-gnu/sys/single_threaded.h \ + /usr/include/c++/11/ext/alloc_traits.h \ + /usr/include/c++/11/bits/alloc_traits.h \ + /usr/include/c++/11/ext/string_conversions.h /usr/include/c++/11/cstdio \ + /usr/include/stdio.h /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/c++/11/cerrno \ + /usr/include/errno.h /usr/include/x86_64-linux-gnu/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/bits/types/error_t.h \ + /usr/include/c++/11/bits/charconv.h \ + /usr/include/c++/11/bits/functional_hash.h \ + /usr/include/c++/11/bits/hash_bytes.h \ + /usr/include/c++/11/bits/basic_string.tcc /usr/include/c++/11/iterator \ + /usr/include/c++/11/bits/stream_iterator.h \ + /usr/include/c++/11/bits/streambuf_iterator.h \ + /usr/include/c++/11/streambuf /usr/include/c++/11/bits/ios_base.h \ + /usr/include/c++/11/bits/locale_classes.h \ + /usr/include/c++/11/bits/locale_classes.tcc \ + /usr/include/c++/11/system_error \ + /usr/include/x86_64-linux-gnu/c++/11/bits/error_constants.h \ + /usr/include/c++/11/stdexcept /usr/include/c++/11/exception \ + /usr/include/c++/11/bits/exception_ptr.h \ + /usr/include/c++/11/bits/cxxabi_init_exception.h \ + /usr/include/c++/11/typeinfo /usr/include/c++/11/bits/nested_exception.h \ + /usr/include/c++/11/bits/streambuf.tcc /usr/include/c++/11/locale \ + /usr/include/c++/11/bits/locale_facets.h /usr/include/c++/11/cwctype \ + /usr/include/wctype.h /usr/include/x86_64-linux-gnu/bits/wctype-wchar.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_base.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_inline.h \ + /usr/include/c++/11/bits/locale_facets.tcc \ + /usr/include/c++/11/bits/locale_facets_nonio.h /usr/include/c++/11/ctime \ + /usr/include/x86_64-linux-gnu/c++/11/bits/time_members.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/messages_members.h \ + /usr/include/libintl.h /usr/include/c++/11/bits/codecvt.h \ + /usr/include/c++/11/bits/locale_facets_nonio.tcc \ + /usr/include/c++/11/bits/locale_conv.h \ + /usr/include/c++/11/bits/unique_ptr.h /usr/include/c++/11/tuple \ + /usr/include/c++/11/array /usr/include/c++/11/bits/uses_allocator.h \ + /usr/include/c++/11/bits/invoke.h /usr/include/c++/11/memory \ + /usr/include/c++/11/bits/stl_uninitialized.h \ + /usr/include/c++/11/bits/stl_raw_storage_iter.h \ + /usr/include/c++/11/bits/align.h /usr/include/c++/11/bit \ + /usr/include/c++/11/bits/shared_ptr.h \ + /usr/include/c++/11/bits/shared_ptr_base.h \ + /usr/include/c++/11/bits/allocated_ptr.h \ + /usr/include/c++/11/bits/refwrap.h \ + /usr/include/c++/11/ext/aligned_buffer.h \ + /usr/include/c++/11/ext/concurrence.h \ + /usr/include/c++/11/bits/shared_ptr_atomic.h \ + /usr/include/c++/11/bits/atomic_base.h \ + /usr/include/c++/11/bits/atomic_lockfree_defines.h \ + /usr/include/c++/11/backward/auto_ptr.h /usr/include/c++/11/sstream \ + /usr/include/c++/11/istream /usr/include/c++/11/ios \ + /usr/include/c++/11/bits/basic_ios.h \ + /usr/include/c++/11/bits/basic_ios.tcc /usr/include/c++/11/ostream \ + /usr/include/c++/11/bits/ostream.tcc \ + /usr/include/c++/11/bits/istream.tcc \ + /usr/include/c++/11/bits/sstream.tcc /usr/include/c++/11/stack \ + /usr/include/c++/11/deque /usr/include/c++/11/bits/stl_deque.h \ + /usr/include/c++/11/bits/deque.tcc /usr/include/c++/11/bits/stl_stack.h \ + /usr/include/c++/11/vector /usr/include/c++/11/bits/stl_vector.h \ + /usr/include/c++/11/bits/stl_bvector.h \ + /usr/include/c++/11/bits/vector.tcc /usr/include/c++/11/map \ + /usr/include/c++/11/bits/stl_tree.h /usr/include/c++/11/bits/stl_map.h \ + /usr/include/c++/11/bits/stl_multimap.h \ + /usr/include/c++/11/bits/erase_if.h /usr/include/c++/11/cstring \ + /usr/include/string.h /usr/include/strings.h \ + /usr/include/x86_64-linux-gnu/bits/strings_fortified.h \ + /usr/include/x86_64-linux-gnu/bits/string_fortified.h \ + /usr/include/c++/11/bits/std_function.h \ + /usr/include/c++/11/bits/regex_constants.h \ + /usr/include/c++/11/bits/regex_error.h \ + /usr/include/c++/11/bits/regex_automaton.h \ + /usr/include/c++/11/bits/regex_automaton.tcc \ + /usr/include/c++/11/bits/regex_scanner.h \ + /usr/include/c++/11/bits/regex_scanner.tcc \ + /usr/include/c++/11/bits/regex_compiler.h \ + /usr/include/c++/11/bits/regex_compiler.tcc \ + /usr/include/c++/11/bits/regex.h /usr/include/c++/11/bits/regex.tcc \ + /usr/include/c++/11/bits/regex_executor.h \ + /usr/include/c++/11/bits/regex_executor.tcc /usr/include/c++/11/numeric \ + /usr/include/c++/11/bits/stl_numeric.h /usr/include/c++/11/complex \ + /usr/include/c++/11/cmath /usr/include/math.h \ + /usr/include/x86_64-linux-gnu/bits/math-vector.h \ + /usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h \ + /usr/include/x86_64-linux-gnu/bits/flt-eval-method.h \ + /usr/include/x86_64-linux-gnu/bits/fp-logb.h \ + /usr/include/x86_64-linux-gnu/bits/fp-fast.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-narrow.h \ + /usr/include/x86_64-linux-gnu/bits/iscanonical.h \ + /usr/include/c++/11/iomanip /usr/include/c++/11/iostream \ + /usr/include/c++/11/unordered_map /usr/include/c++/11/bits/hashtable.h \ + /usr/include/c++/11/bits/hashtable_policy.h \ + /usr/include/c++/11/bits/enable_special_members.h \ + /usr/include/c++/11/bits/unordered_map.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_device/types.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor_shape.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor_buffer.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/base/core/refcount.h \ + /usr/include/c++/11/atomic \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor_accessor.h \ + /usr/include/c++/11/cstddef \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/base/macros/macros.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/base/utils/logging.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/base/utils/array_ref.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/kernels/memory.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/base/third_party/blas.h diff --git a/build/source/source_base/module_container/CMakeFiles/container.dir/ATen/kernels/lapack.cpp.o b/build/source/source_base/module_container/CMakeFiles/container.dir/ATen/kernels/lapack.cpp.o new file mode 100644 index 0000000000..448bf95f1e Binary files /dev/null and b/build/source/source_base/module_container/CMakeFiles/container.dir/ATen/kernels/lapack.cpp.o differ diff --git a/build/source/source_base/module_container/CMakeFiles/container.dir/ATen/kernels/lapack.cpp.o.d b/build/source/source_base/module_container/CMakeFiles/container.dir/ATen/kernels/lapack.cpp.o.d new file mode 100644 index 0000000000..b8662bdec3 --- /dev/null +++ b/build/source/source_base/module_container/CMakeFiles/container.dir/ATen/kernels/lapack.cpp.o.d @@ -0,0 +1,239 @@ +source/source_base/module_container/CMakeFiles/container.dir/ATen/kernels/lapack.cpp.o: \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/kernels/lapack.cpp \ + /usr/include/stdc-predef.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/kernels/lapack.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/base/core/allocator.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor_types.h \ + /usr/include/c++/11/regex /usr/include/c++/11/algorithm \ + /usr/include/c++/11/utility \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++config.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/os_defines.h \ + /usr/include/features.h /usr/include/features-time64.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/cpu_defines.h \ + /usr/include/c++/11/bits/stl_relops.h \ + /usr/include/c++/11/bits/stl_pair.h /usr/include/c++/11/bits/move.h \ + /usr/include/c++/11/type_traits /usr/include/c++/11/initializer_list \ + /usr/include/c++/11/bits/stl_algobase.h \ + /usr/include/c++/11/bits/functexcept.h \ + /usr/include/c++/11/bits/exception_defines.h \ + /usr/include/c++/11/bits/cpp_type_traits.h \ + /usr/include/c++/11/ext/type_traits.h \ + /usr/include/c++/11/ext/numeric_traits.h \ + /usr/include/c++/11/bits/stl_iterator_base_types.h \ + /usr/include/c++/11/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/11/bits/concept_check.h \ + /usr/include/c++/11/debug/assertions.h \ + /usr/include/c++/11/bits/stl_iterator.h \ + /usr/include/c++/11/bits/ptr_traits.h /usr/include/c++/11/debug/debug.h \ + /usr/include/c++/11/bits/predefined_ops.h \ + /usr/include/c++/11/bits/stl_algo.h /usr/include/c++/11/cstdlib \ + /usr/include/stdlib.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h \ + /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/atomic_wide_counter.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/include/c++/11/bits/std_abs.h \ + /usr/include/c++/11/bits/algorithmfwd.h \ + /usr/include/c++/11/bits/stl_heap.h \ + /usr/include/c++/11/bits/stl_tempbuf.h \ + /usr/include/c++/11/bits/stl_construct.h /usr/include/c++/11/new \ + /usr/include/c++/11/bits/exception.h \ + /usr/include/c++/11/bits/uniform_int_dist.h /usr/include/c++/11/bitset \ + /usr/include/c++/11/string /usr/include/c++/11/bits/stringfwd.h \ + /usr/include/c++/11/bits/memoryfwd.h \ + /usr/include/c++/11/bits/char_traits.h \ + /usr/include/c++/11/bits/postypes.h /usr/include/c++/11/cwchar \ + /usr/include/wchar.h /usr/lib/gcc/x86_64-linux-gnu/11/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/wchar.h \ + /usr/include/x86_64-linux-gnu/bits/types/wint_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/wchar2.h /usr/include/c++/11/cstdint \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdint.h /usr/include/stdint.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-uintn.h \ + /usr/include/c++/11/bits/allocator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++allocator.h \ + /usr/include/c++/11/ext/new_allocator.h \ + /usr/include/c++/11/bits/localefwd.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++locale.h \ + /usr/include/c++/11/clocale /usr/include/locale.h \ + /usr/include/x86_64-linux-gnu/bits/locale.h /usr/include/c++/11/iosfwd \ + /usr/include/c++/11/cctype /usr/include/ctype.h \ + /usr/include/c++/11/bits/ostream_insert.h \ + /usr/include/c++/11/bits/cxxabi_forced.h \ + /usr/include/c++/11/bits/stl_function.h \ + /usr/include/c++/11/backward/binders.h \ + /usr/include/c++/11/bits/range_access.h \ + /usr/include/c++/11/bits/basic_string.h \ + /usr/include/c++/11/ext/atomicity.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr-default.h \ + /usr/include/pthread.h /usr/include/sched.h \ + /usr/include/x86_64-linux-gnu/bits/sched.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h \ + /usr/include/x86_64-linux-gnu/bits/cpu-set.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/timex.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h \ + /usr/include/x86_64-linux-gnu/bits/setjmp.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct___jmp_buf_tag.h \ + /usr/include/x86_64-linux-gnu/bits/pthread_stack_min-dynamic.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/atomic_word.h \ + /usr/include/x86_64-linux-gnu/sys/single_threaded.h \ + /usr/include/c++/11/ext/alloc_traits.h \ + /usr/include/c++/11/bits/alloc_traits.h \ + /usr/include/c++/11/ext/string_conversions.h /usr/include/c++/11/cstdio \ + /usr/include/stdio.h /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/c++/11/cerrno \ + /usr/include/errno.h /usr/include/x86_64-linux-gnu/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/bits/types/error_t.h \ + /usr/include/c++/11/bits/charconv.h \ + /usr/include/c++/11/bits/functional_hash.h \ + /usr/include/c++/11/bits/hash_bytes.h \ + /usr/include/c++/11/bits/basic_string.tcc /usr/include/c++/11/iterator \ + /usr/include/c++/11/bits/stream_iterator.h \ + /usr/include/c++/11/bits/streambuf_iterator.h \ + /usr/include/c++/11/streambuf /usr/include/c++/11/bits/ios_base.h \ + /usr/include/c++/11/bits/locale_classes.h \ + /usr/include/c++/11/bits/locale_classes.tcc \ + /usr/include/c++/11/system_error \ + /usr/include/x86_64-linux-gnu/c++/11/bits/error_constants.h \ + /usr/include/c++/11/stdexcept /usr/include/c++/11/exception \ + /usr/include/c++/11/bits/exception_ptr.h \ + /usr/include/c++/11/bits/cxxabi_init_exception.h \ + /usr/include/c++/11/typeinfo /usr/include/c++/11/bits/nested_exception.h \ + /usr/include/c++/11/bits/streambuf.tcc /usr/include/c++/11/locale \ + /usr/include/c++/11/bits/locale_facets.h /usr/include/c++/11/cwctype \ + /usr/include/wctype.h /usr/include/x86_64-linux-gnu/bits/wctype-wchar.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_base.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_inline.h \ + /usr/include/c++/11/bits/locale_facets.tcc \ + /usr/include/c++/11/bits/locale_facets_nonio.h /usr/include/c++/11/ctime \ + /usr/include/x86_64-linux-gnu/c++/11/bits/time_members.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/messages_members.h \ + /usr/include/libintl.h /usr/include/c++/11/bits/codecvt.h \ + /usr/include/c++/11/bits/locale_facets_nonio.tcc \ + /usr/include/c++/11/bits/locale_conv.h \ + /usr/include/c++/11/bits/unique_ptr.h /usr/include/c++/11/tuple \ + /usr/include/c++/11/array /usr/include/c++/11/bits/uses_allocator.h \ + /usr/include/c++/11/bits/invoke.h /usr/include/c++/11/memory \ + /usr/include/c++/11/bits/stl_uninitialized.h \ + /usr/include/c++/11/bits/stl_raw_storage_iter.h \ + /usr/include/c++/11/bits/align.h /usr/include/c++/11/bit \ + /usr/include/c++/11/bits/shared_ptr.h \ + /usr/include/c++/11/bits/shared_ptr_base.h \ + /usr/include/c++/11/bits/allocated_ptr.h \ + /usr/include/c++/11/bits/refwrap.h \ + /usr/include/c++/11/ext/aligned_buffer.h \ + /usr/include/c++/11/ext/concurrence.h \ + /usr/include/c++/11/bits/shared_ptr_atomic.h \ + /usr/include/c++/11/bits/atomic_base.h \ + /usr/include/c++/11/bits/atomic_lockfree_defines.h \ + /usr/include/c++/11/backward/auto_ptr.h /usr/include/c++/11/sstream \ + /usr/include/c++/11/istream /usr/include/c++/11/ios \ + /usr/include/c++/11/bits/basic_ios.h \ + /usr/include/c++/11/bits/basic_ios.tcc /usr/include/c++/11/ostream \ + /usr/include/c++/11/bits/ostream.tcc \ + /usr/include/c++/11/bits/istream.tcc \ + /usr/include/c++/11/bits/sstream.tcc /usr/include/c++/11/stack \ + /usr/include/c++/11/deque /usr/include/c++/11/bits/stl_deque.h \ + /usr/include/c++/11/bits/deque.tcc /usr/include/c++/11/bits/stl_stack.h \ + /usr/include/c++/11/vector /usr/include/c++/11/bits/stl_vector.h \ + /usr/include/c++/11/bits/stl_bvector.h \ + /usr/include/c++/11/bits/vector.tcc /usr/include/c++/11/map \ + /usr/include/c++/11/bits/stl_tree.h /usr/include/c++/11/bits/stl_map.h \ + /usr/include/c++/11/bits/stl_multimap.h \ + /usr/include/c++/11/bits/erase_if.h /usr/include/c++/11/cstring \ + /usr/include/string.h /usr/include/strings.h \ + /usr/include/x86_64-linux-gnu/bits/strings_fortified.h \ + /usr/include/x86_64-linux-gnu/bits/string_fortified.h \ + /usr/include/c++/11/bits/std_function.h \ + /usr/include/c++/11/bits/regex_constants.h \ + /usr/include/c++/11/bits/regex_error.h \ + /usr/include/c++/11/bits/regex_automaton.h \ + /usr/include/c++/11/bits/regex_automaton.tcc \ + /usr/include/c++/11/bits/regex_scanner.h \ + /usr/include/c++/11/bits/regex_scanner.tcc \ + /usr/include/c++/11/bits/regex_compiler.h \ + /usr/include/c++/11/bits/regex_compiler.tcc \ + /usr/include/c++/11/bits/regex.h /usr/include/c++/11/bits/regex.tcc \ + /usr/include/c++/11/bits/regex_executor.h \ + /usr/include/c++/11/bits/regex_executor.tcc /usr/include/c++/11/numeric \ + /usr/include/c++/11/bits/stl_numeric.h /usr/include/c++/11/complex \ + /usr/include/c++/11/cmath /usr/include/math.h \ + /usr/include/x86_64-linux-gnu/bits/math-vector.h \ + /usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h \ + /usr/include/x86_64-linux-gnu/bits/flt-eval-method.h \ + /usr/include/x86_64-linux-gnu/bits/fp-logb.h \ + /usr/include/x86_64-linux-gnu/bits/fp-fast.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-narrow.h \ + /usr/include/x86_64-linux-gnu/bits/iscanonical.h \ + /usr/include/c++/11/iomanip /usr/include/c++/11/iostream \ + /usr/include/c++/11/unordered_map /usr/include/c++/11/bits/hashtable.h \ + /usr/include/c++/11/bits/hashtable_policy.h \ + /usr/include/c++/11/bits/enable_special_members.h \ + /usr/include/c++/11/bits/unordered_map.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_device/types.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor_shape.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor_buffer.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/base/core/refcount.h \ + /usr/include/c++/11/atomic \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor_accessor.h \ + /usr/include/c++/11/cstddef \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/base/macros/macros.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/base/utils/logging.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/base/utils/array_ref.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/kernels/memory.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/base/third_party/lapack.h diff --git a/build/source/source_base/module_container/CMakeFiles/container.dir/ATen/kernels/linalg.cpp.o b/build/source/source_base/module_container/CMakeFiles/container.dir/ATen/kernels/linalg.cpp.o new file mode 100644 index 0000000000..a6b35a0776 Binary files /dev/null and b/build/source/source_base/module_container/CMakeFiles/container.dir/ATen/kernels/linalg.cpp.o differ diff --git a/build/source/source_base/module_container/CMakeFiles/container.dir/ATen/kernels/linalg.cpp.o.d b/build/source/source_base/module_container/CMakeFiles/container.dir/ATen/kernels/linalg.cpp.o.d new file mode 100644 index 0000000000..9dd5e6c1de --- /dev/null +++ b/build/source/source_base/module_container/CMakeFiles/container.dir/ATen/kernels/linalg.cpp.o.d @@ -0,0 +1,240 @@ +source/source_base/module_container/CMakeFiles/container.dir/ATen/kernels/linalg.cpp.o: \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/kernels/linalg.cpp \ + /usr/include/stdc-predef.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/kernels/linalg.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/base/core/allocator.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor_types.h \ + /usr/include/c++/11/regex /usr/include/c++/11/algorithm \ + /usr/include/c++/11/utility \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++config.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/os_defines.h \ + /usr/include/features.h /usr/include/features-time64.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/cpu_defines.h \ + /usr/include/c++/11/bits/stl_relops.h \ + /usr/include/c++/11/bits/stl_pair.h /usr/include/c++/11/bits/move.h \ + /usr/include/c++/11/type_traits /usr/include/c++/11/initializer_list \ + /usr/include/c++/11/bits/stl_algobase.h \ + /usr/include/c++/11/bits/functexcept.h \ + /usr/include/c++/11/bits/exception_defines.h \ + /usr/include/c++/11/bits/cpp_type_traits.h \ + /usr/include/c++/11/ext/type_traits.h \ + /usr/include/c++/11/ext/numeric_traits.h \ + /usr/include/c++/11/bits/stl_iterator_base_types.h \ + /usr/include/c++/11/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/11/bits/concept_check.h \ + /usr/include/c++/11/debug/assertions.h \ + /usr/include/c++/11/bits/stl_iterator.h \ + /usr/include/c++/11/bits/ptr_traits.h /usr/include/c++/11/debug/debug.h \ + /usr/include/c++/11/bits/predefined_ops.h \ + /usr/include/c++/11/bits/stl_algo.h /usr/include/c++/11/cstdlib \ + /usr/include/stdlib.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h \ + /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/atomic_wide_counter.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/include/c++/11/bits/std_abs.h \ + /usr/include/c++/11/bits/algorithmfwd.h \ + /usr/include/c++/11/bits/stl_heap.h \ + /usr/include/c++/11/bits/stl_tempbuf.h \ + /usr/include/c++/11/bits/stl_construct.h /usr/include/c++/11/new \ + /usr/include/c++/11/bits/exception.h \ + /usr/include/c++/11/bits/uniform_int_dist.h /usr/include/c++/11/bitset \ + /usr/include/c++/11/string /usr/include/c++/11/bits/stringfwd.h \ + /usr/include/c++/11/bits/memoryfwd.h \ + /usr/include/c++/11/bits/char_traits.h \ + /usr/include/c++/11/bits/postypes.h /usr/include/c++/11/cwchar \ + /usr/include/wchar.h /usr/lib/gcc/x86_64-linux-gnu/11/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/wchar.h \ + /usr/include/x86_64-linux-gnu/bits/types/wint_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/wchar2.h /usr/include/c++/11/cstdint \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdint.h /usr/include/stdint.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-uintn.h \ + /usr/include/c++/11/bits/allocator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++allocator.h \ + /usr/include/c++/11/ext/new_allocator.h \ + /usr/include/c++/11/bits/localefwd.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++locale.h \ + /usr/include/c++/11/clocale /usr/include/locale.h \ + /usr/include/x86_64-linux-gnu/bits/locale.h /usr/include/c++/11/iosfwd \ + /usr/include/c++/11/cctype /usr/include/ctype.h \ + /usr/include/c++/11/bits/ostream_insert.h \ + /usr/include/c++/11/bits/cxxabi_forced.h \ + /usr/include/c++/11/bits/stl_function.h \ + /usr/include/c++/11/backward/binders.h \ + /usr/include/c++/11/bits/range_access.h \ + /usr/include/c++/11/bits/basic_string.h \ + /usr/include/c++/11/ext/atomicity.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr-default.h \ + /usr/include/pthread.h /usr/include/sched.h \ + /usr/include/x86_64-linux-gnu/bits/sched.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h \ + /usr/include/x86_64-linux-gnu/bits/cpu-set.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/timex.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h \ + /usr/include/x86_64-linux-gnu/bits/setjmp.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct___jmp_buf_tag.h \ + /usr/include/x86_64-linux-gnu/bits/pthread_stack_min-dynamic.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/atomic_word.h \ + /usr/include/x86_64-linux-gnu/sys/single_threaded.h \ + /usr/include/c++/11/ext/alloc_traits.h \ + /usr/include/c++/11/bits/alloc_traits.h \ + /usr/include/c++/11/ext/string_conversions.h /usr/include/c++/11/cstdio \ + /usr/include/stdio.h /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/c++/11/cerrno \ + /usr/include/errno.h /usr/include/x86_64-linux-gnu/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/bits/types/error_t.h \ + /usr/include/c++/11/bits/charconv.h \ + /usr/include/c++/11/bits/functional_hash.h \ + /usr/include/c++/11/bits/hash_bytes.h \ + /usr/include/c++/11/bits/basic_string.tcc /usr/include/c++/11/iterator \ + /usr/include/c++/11/bits/stream_iterator.h \ + /usr/include/c++/11/bits/streambuf_iterator.h \ + /usr/include/c++/11/streambuf /usr/include/c++/11/bits/ios_base.h \ + /usr/include/c++/11/bits/locale_classes.h \ + /usr/include/c++/11/bits/locale_classes.tcc \ + /usr/include/c++/11/system_error \ + /usr/include/x86_64-linux-gnu/c++/11/bits/error_constants.h \ + /usr/include/c++/11/stdexcept /usr/include/c++/11/exception \ + /usr/include/c++/11/bits/exception_ptr.h \ + /usr/include/c++/11/bits/cxxabi_init_exception.h \ + /usr/include/c++/11/typeinfo /usr/include/c++/11/bits/nested_exception.h \ + /usr/include/c++/11/bits/streambuf.tcc /usr/include/c++/11/locale \ + /usr/include/c++/11/bits/locale_facets.h /usr/include/c++/11/cwctype \ + /usr/include/wctype.h /usr/include/x86_64-linux-gnu/bits/wctype-wchar.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_base.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_inline.h \ + /usr/include/c++/11/bits/locale_facets.tcc \ + /usr/include/c++/11/bits/locale_facets_nonio.h /usr/include/c++/11/ctime \ + /usr/include/x86_64-linux-gnu/c++/11/bits/time_members.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/messages_members.h \ + /usr/include/libintl.h /usr/include/c++/11/bits/codecvt.h \ + /usr/include/c++/11/bits/locale_facets_nonio.tcc \ + /usr/include/c++/11/bits/locale_conv.h \ + /usr/include/c++/11/bits/unique_ptr.h /usr/include/c++/11/tuple \ + /usr/include/c++/11/array /usr/include/c++/11/bits/uses_allocator.h \ + /usr/include/c++/11/bits/invoke.h /usr/include/c++/11/memory \ + /usr/include/c++/11/bits/stl_uninitialized.h \ + /usr/include/c++/11/bits/stl_raw_storage_iter.h \ + /usr/include/c++/11/bits/align.h /usr/include/c++/11/bit \ + /usr/include/c++/11/bits/shared_ptr.h \ + /usr/include/c++/11/bits/shared_ptr_base.h \ + /usr/include/c++/11/bits/allocated_ptr.h \ + /usr/include/c++/11/bits/refwrap.h \ + /usr/include/c++/11/ext/aligned_buffer.h \ + /usr/include/c++/11/ext/concurrence.h \ + /usr/include/c++/11/bits/shared_ptr_atomic.h \ + /usr/include/c++/11/bits/atomic_base.h \ + /usr/include/c++/11/bits/atomic_lockfree_defines.h \ + /usr/include/c++/11/backward/auto_ptr.h /usr/include/c++/11/sstream \ + /usr/include/c++/11/istream /usr/include/c++/11/ios \ + /usr/include/c++/11/bits/basic_ios.h \ + /usr/include/c++/11/bits/basic_ios.tcc /usr/include/c++/11/ostream \ + /usr/include/c++/11/bits/ostream.tcc \ + /usr/include/c++/11/bits/istream.tcc \ + /usr/include/c++/11/bits/sstream.tcc /usr/include/c++/11/stack \ + /usr/include/c++/11/deque /usr/include/c++/11/bits/stl_deque.h \ + /usr/include/c++/11/bits/deque.tcc /usr/include/c++/11/bits/stl_stack.h \ + /usr/include/c++/11/vector /usr/include/c++/11/bits/stl_vector.h \ + /usr/include/c++/11/bits/stl_bvector.h \ + /usr/include/c++/11/bits/vector.tcc /usr/include/c++/11/map \ + /usr/include/c++/11/bits/stl_tree.h /usr/include/c++/11/bits/stl_map.h \ + /usr/include/c++/11/bits/stl_multimap.h \ + /usr/include/c++/11/bits/erase_if.h /usr/include/c++/11/cstring \ + /usr/include/string.h /usr/include/strings.h \ + /usr/include/x86_64-linux-gnu/bits/strings_fortified.h \ + /usr/include/x86_64-linux-gnu/bits/string_fortified.h \ + /usr/include/c++/11/bits/std_function.h \ + /usr/include/c++/11/bits/regex_constants.h \ + /usr/include/c++/11/bits/regex_error.h \ + /usr/include/c++/11/bits/regex_automaton.h \ + /usr/include/c++/11/bits/regex_automaton.tcc \ + /usr/include/c++/11/bits/regex_scanner.h \ + /usr/include/c++/11/bits/regex_scanner.tcc \ + /usr/include/c++/11/bits/regex_compiler.h \ + /usr/include/c++/11/bits/regex_compiler.tcc \ + /usr/include/c++/11/bits/regex.h /usr/include/c++/11/bits/regex.tcc \ + /usr/include/c++/11/bits/regex_executor.h \ + /usr/include/c++/11/bits/regex_executor.tcc /usr/include/c++/11/numeric \ + /usr/include/c++/11/bits/stl_numeric.h /usr/include/c++/11/complex \ + /usr/include/c++/11/cmath /usr/include/math.h \ + /usr/include/x86_64-linux-gnu/bits/math-vector.h \ + /usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h \ + /usr/include/x86_64-linux-gnu/bits/flt-eval-method.h \ + /usr/include/x86_64-linux-gnu/bits/fp-logb.h \ + /usr/include/x86_64-linux-gnu/bits/fp-fast.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-narrow.h \ + /usr/include/x86_64-linux-gnu/bits/iscanonical.h \ + /usr/include/c++/11/iomanip /usr/include/c++/11/iostream \ + /usr/include/c++/11/unordered_map /usr/include/c++/11/bits/hashtable.h \ + /usr/include/c++/11/bits/hashtable_policy.h \ + /usr/include/c++/11/bits/enable_special_members.h \ + /usr/include/c++/11/bits/unordered_map.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_device/types.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor_shape.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor_buffer.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/base/core/refcount.h \ + /usr/include/c++/11/atomic \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor_accessor.h \ + /usr/include/c++/11/cstddef \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/base/macros/macros.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/base/utils/logging.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/base/utils/array_ref.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/kernels/memory.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/ops/einsum_op.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor_map.h diff --git a/build/source/source_base/module_container/CMakeFiles/container.dir/ATen/kernels/memory_impl.cpp.o b/build/source/source_base/module_container/CMakeFiles/container.dir/ATen/kernels/memory_impl.cpp.o new file mode 100644 index 0000000000..03062a69ff Binary files /dev/null and b/build/source/source_base/module_container/CMakeFiles/container.dir/ATen/kernels/memory_impl.cpp.o differ diff --git a/build/source/source_base/module_container/CMakeFiles/container.dir/ATen/kernels/memory_impl.cpp.o.d b/build/source/source_base/module_container/CMakeFiles/container.dir/ATen/kernels/memory_impl.cpp.o.d new file mode 100644 index 0000000000..4b3b5b19dd --- /dev/null +++ b/build/source/source_base/module_container/CMakeFiles/container.dir/ATen/kernels/memory_impl.cpp.o.d @@ -0,0 +1,227 @@ +source/source_base/module_container/CMakeFiles/container.dir/ATen/kernels/memory_impl.cpp.o: \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/kernels/memory_impl.cpp \ + /usr/include/stdc-predef.h /usr/include/c++/11/iostream \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++config.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/os_defines.h \ + /usr/include/features.h /usr/include/features-time64.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/cpu_defines.h \ + /usr/include/c++/11/ostream /usr/include/c++/11/ios \ + /usr/include/c++/11/iosfwd /usr/include/c++/11/bits/stringfwd.h \ + /usr/include/c++/11/bits/memoryfwd.h /usr/include/c++/11/bits/postypes.h \ + /usr/include/c++/11/cwchar /usr/include/wchar.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/wchar.h \ + /usr/include/x86_64-linux-gnu/bits/types/wint_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/wchar2.h \ + /usr/include/c++/11/exception /usr/include/c++/11/bits/exception.h \ + /usr/include/c++/11/bits/exception_ptr.h \ + /usr/include/c++/11/bits/exception_defines.h \ + /usr/include/c++/11/bits/cxxabi_init_exception.h \ + /usr/include/c++/11/typeinfo /usr/include/c++/11/bits/hash_bytes.h \ + /usr/include/c++/11/new /usr/include/c++/11/bits/move.h \ + /usr/include/c++/11/type_traits \ + /usr/include/c++/11/bits/nested_exception.h \ + /usr/include/c++/11/bits/char_traits.h \ + /usr/include/c++/11/bits/stl_algobase.h \ + /usr/include/c++/11/bits/functexcept.h \ + /usr/include/c++/11/bits/cpp_type_traits.h \ + /usr/include/c++/11/ext/type_traits.h \ + /usr/include/c++/11/ext/numeric_traits.h \ + /usr/include/c++/11/bits/stl_pair.h \ + /usr/include/c++/11/bits/stl_iterator_base_types.h \ + /usr/include/c++/11/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/11/bits/concept_check.h \ + /usr/include/c++/11/debug/assertions.h \ + /usr/include/c++/11/bits/stl_iterator.h \ + /usr/include/c++/11/bits/ptr_traits.h /usr/include/c++/11/debug/debug.h \ + /usr/include/c++/11/bits/predefined_ops.h /usr/include/c++/11/cstdint \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdint.h /usr/include/stdint.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-uintn.h \ + /usr/include/c++/11/bits/localefwd.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++locale.h \ + /usr/include/c++/11/clocale /usr/include/locale.h \ + /usr/include/x86_64-linux-gnu/bits/locale.h /usr/include/c++/11/cctype \ + /usr/include/ctype.h /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/c++/11/bits/ios_base.h /usr/include/c++/11/ext/atomicity.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr-default.h \ + /usr/include/pthread.h /usr/include/sched.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/sched.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h \ + /usr/include/x86_64-linux-gnu/bits/cpu-set.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/timex.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/atomic_wide_counter.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h \ + /usr/include/x86_64-linux-gnu/bits/setjmp.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct___jmp_buf_tag.h \ + /usr/include/x86_64-linux-gnu/bits/pthread_stack_min-dynamic.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/atomic_word.h \ + /usr/include/x86_64-linux-gnu/sys/single_threaded.h \ + /usr/include/c++/11/bits/locale_classes.h /usr/include/c++/11/string \ + /usr/include/c++/11/bits/allocator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++allocator.h \ + /usr/include/c++/11/ext/new_allocator.h \ + /usr/include/c++/11/bits/ostream_insert.h \ + /usr/include/c++/11/bits/cxxabi_forced.h \ + /usr/include/c++/11/bits/stl_function.h \ + /usr/include/c++/11/backward/binders.h \ + /usr/include/c++/11/bits/range_access.h \ + /usr/include/c++/11/initializer_list \ + /usr/include/c++/11/bits/basic_string.h \ + /usr/include/c++/11/ext/alloc_traits.h \ + /usr/include/c++/11/bits/alloc_traits.h \ + /usr/include/c++/11/bits/stl_construct.h \ + /usr/include/c++/11/ext/string_conversions.h /usr/include/c++/11/cstdlib \ + /usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/sys/types.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/include/c++/11/bits/std_abs.h /usr/include/c++/11/cstdio \ + /usr/include/stdio.h /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/c++/11/cerrno \ + /usr/include/errno.h /usr/include/x86_64-linux-gnu/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/bits/types/error_t.h \ + /usr/include/c++/11/bits/charconv.h \ + /usr/include/c++/11/bits/functional_hash.h \ + /usr/include/c++/11/bits/basic_string.tcc \ + /usr/include/c++/11/bits/locale_classes.tcc \ + /usr/include/c++/11/system_error \ + /usr/include/x86_64-linux-gnu/c++/11/bits/error_constants.h \ + /usr/include/c++/11/stdexcept /usr/include/c++/11/streambuf \ + /usr/include/c++/11/bits/streambuf.tcc \ + /usr/include/c++/11/bits/basic_ios.h \ + /usr/include/c++/11/bits/locale_facets.h /usr/include/c++/11/cwctype \ + /usr/include/wctype.h /usr/include/x86_64-linux-gnu/bits/wctype-wchar.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_base.h \ + /usr/include/c++/11/bits/streambuf_iterator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_inline.h \ + /usr/include/c++/11/bits/locale_facets.tcc \ + /usr/include/c++/11/bits/basic_ios.tcc \ + /usr/include/c++/11/bits/ostream.tcc /usr/include/c++/11/istream \ + /usr/include/c++/11/bits/istream.tcc /usr/include/c++/11/complex \ + /usr/include/c++/11/cmath /usr/include/math.h \ + /usr/include/x86_64-linux-gnu/bits/math-vector.h \ + /usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h \ + /usr/include/x86_64-linux-gnu/bits/flt-eval-method.h \ + /usr/include/x86_64-linux-gnu/bits/fp-logb.h \ + /usr/include/x86_64-linux-gnu/bits/fp-fast.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-narrow.h \ + /usr/include/x86_64-linux-gnu/bits/iscanonical.h \ + /usr/include/c++/11/sstream /usr/include/c++/11/bits/sstream.tcc \ + /usr/include/string.h /usr/include/strings.h \ + /usr/include/x86_64-linux-gnu/bits/strings_fortified.h \ + /usr/include/x86_64-linux-gnu/bits/string_fortified.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/kernels/memory.h \ + /usr/include/c++/11/vector /usr/include/c++/11/bits/stl_uninitialized.h \ + /usr/include/c++/11/bits/stl_vector.h \ + /usr/include/c++/11/bits/stl_bvector.h \ + /usr/include/c++/11/bits/vector.tcc \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/base/macros/macros.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/base/utils/logging.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor_types.h \ + /usr/include/c++/11/regex /usr/include/c++/11/algorithm \ + /usr/include/c++/11/utility /usr/include/c++/11/bits/stl_relops.h \ + /usr/include/c++/11/bits/stl_algo.h \ + /usr/include/c++/11/bits/algorithmfwd.h \ + /usr/include/c++/11/bits/stl_heap.h \ + /usr/include/c++/11/bits/stl_tempbuf.h \ + /usr/include/c++/11/bits/uniform_int_dist.h /usr/include/c++/11/bitset \ + /usr/include/c++/11/iterator /usr/include/c++/11/bits/stream_iterator.h \ + /usr/include/c++/11/locale \ + /usr/include/c++/11/bits/locale_facets_nonio.h /usr/include/c++/11/ctime \ + /usr/include/x86_64-linux-gnu/c++/11/bits/time_members.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/messages_members.h \ + /usr/include/libintl.h /usr/include/c++/11/bits/codecvt.h \ + /usr/include/c++/11/bits/locale_facets_nonio.tcc \ + /usr/include/c++/11/bits/locale_conv.h \ + /usr/include/c++/11/bits/unique_ptr.h /usr/include/c++/11/tuple \ + /usr/include/c++/11/array /usr/include/c++/11/bits/uses_allocator.h \ + /usr/include/c++/11/bits/invoke.h /usr/include/c++/11/memory \ + /usr/include/c++/11/bits/stl_raw_storage_iter.h \ + /usr/include/c++/11/bits/align.h /usr/include/c++/11/bit \ + /usr/include/c++/11/bits/shared_ptr.h \ + /usr/include/c++/11/bits/shared_ptr_base.h \ + /usr/include/c++/11/bits/allocated_ptr.h \ + /usr/include/c++/11/bits/refwrap.h \ + /usr/include/c++/11/ext/aligned_buffer.h \ + /usr/include/c++/11/ext/concurrence.h \ + /usr/include/c++/11/bits/shared_ptr_atomic.h \ + /usr/include/c++/11/bits/atomic_base.h \ + /usr/include/c++/11/bits/atomic_lockfree_defines.h \ + /usr/include/c++/11/backward/auto_ptr.h /usr/include/c++/11/stack \ + /usr/include/c++/11/deque /usr/include/c++/11/bits/stl_deque.h \ + /usr/include/c++/11/bits/deque.tcc /usr/include/c++/11/bits/stl_stack.h \ + /usr/include/c++/11/map /usr/include/c++/11/bits/stl_tree.h \ + /usr/include/c++/11/bits/stl_map.h \ + /usr/include/c++/11/bits/stl_multimap.h \ + /usr/include/c++/11/bits/erase_if.h /usr/include/c++/11/cstring \ + /usr/include/c++/11/bits/std_function.h \ + /usr/include/c++/11/bits/regex_constants.h \ + /usr/include/c++/11/bits/regex_error.h \ + /usr/include/c++/11/bits/regex_automaton.h \ + /usr/include/c++/11/bits/regex_automaton.tcc \ + /usr/include/c++/11/bits/regex_scanner.h \ + /usr/include/c++/11/bits/regex_scanner.tcc \ + /usr/include/c++/11/bits/regex_compiler.h \ + /usr/include/c++/11/bits/regex_compiler.tcc \ + /usr/include/c++/11/bits/regex.h /usr/include/c++/11/bits/regex.tcc \ + /usr/include/c++/11/bits/regex_executor.h \ + /usr/include/c++/11/bits/regex_executor.tcc /usr/include/c++/11/numeric \ + /usr/include/c++/11/bits/stl_numeric.h /usr/include/c++/11/iomanip \ + /usr/include/c++/11/unordered_map /usr/include/c++/11/bits/hashtable.h \ + /usr/include/c++/11/bits/hashtable_policy.h \ + /usr/include/c++/11/bits/enable_special_members.h \ + /usr/include/c++/11/bits/unordered_map.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_device/types.h diff --git a/build/source/source_base/module_container/CMakeFiles/container.dir/ATen/ops/einsum_op.cpp.o b/build/source/source_base/module_container/CMakeFiles/container.dir/ATen/ops/einsum_op.cpp.o new file mode 100644 index 0000000000..aa07970e1b Binary files /dev/null and b/build/source/source_base/module_container/CMakeFiles/container.dir/ATen/ops/einsum_op.cpp.o differ diff --git a/build/source/source_base/module_container/CMakeFiles/container.dir/ATen/ops/einsum_op.cpp.o.d b/build/source/source_base/module_container/CMakeFiles/container.dir/ATen/ops/einsum_op.cpp.o.d new file mode 100644 index 0000000000..5b0f225fdb --- /dev/null +++ b/build/source/source_base/module_container/CMakeFiles/container.dir/ATen/ops/einsum_op.cpp.o.d @@ -0,0 +1,242 @@ +source/source_base/module_container/CMakeFiles/container.dir/ATen/ops/einsum_op.cpp.o: \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/ops/einsum_op.cpp \ + /usr/include/stdc-predef.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/ops/einsum_op.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/base/core/allocator.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor_types.h \ + /usr/include/c++/11/regex /usr/include/c++/11/algorithm \ + /usr/include/c++/11/utility \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++config.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/os_defines.h \ + /usr/include/features.h /usr/include/features-time64.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/cpu_defines.h \ + /usr/include/c++/11/bits/stl_relops.h \ + /usr/include/c++/11/bits/stl_pair.h /usr/include/c++/11/bits/move.h \ + /usr/include/c++/11/type_traits /usr/include/c++/11/initializer_list \ + /usr/include/c++/11/bits/stl_algobase.h \ + /usr/include/c++/11/bits/functexcept.h \ + /usr/include/c++/11/bits/exception_defines.h \ + /usr/include/c++/11/bits/cpp_type_traits.h \ + /usr/include/c++/11/ext/type_traits.h \ + /usr/include/c++/11/ext/numeric_traits.h \ + /usr/include/c++/11/bits/stl_iterator_base_types.h \ + /usr/include/c++/11/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/11/bits/concept_check.h \ + /usr/include/c++/11/debug/assertions.h \ + /usr/include/c++/11/bits/stl_iterator.h \ + /usr/include/c++/11/bits/ptr_traits.h /usr/include/c++/11/debug/debug.h \ + /usr/include/c++/11/bits/predefined_ops.h \ + /usr/include/c++/11/bits/stl_algo.h /usr/include/c++/11/cstdlib \ + /usr/include/stdlib.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h \ + /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/atomic_wide_counter.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/include/c++/11/bits/std_abs.h \ + /usr/include/c++/11/bits/algorithmfwd.h \ + /usr/include/c++/11/bits/stl_heap.h \ + /usr/include/c++/11/bits/stl_tempbuf.h \ + /usr/include/c++/11/bits/stl_construct.h /usr/include/c++/11/new \ + /usr/include/c++/11/bits/exception.h \ + /usr/include/c++/11/bits/uniform_int_dist.h /usr/include/c++/11/bitset \ + /usr/include/c++/11/string /usr/include/c++/11/bits/stringfwd.h \ + /usr/include/c++/11/bits/memoryfwd.h \ + /usr/include/c++/11/bits/char_traits.h \ + /usr/include/c++/11/bits/postypes.h /usr/include/c++/11/cwchar \ + /usr/include/wchar.h /usr/lib/gcc/x86_64-linux-gnu/11/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/wchar.h \ + /usr/include/x86_64-linux-gnu/bits/types/wint_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/wchar2.h /usr/include/c++/11/cstdint \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdint.h /usr/include/stdint.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-uintn.h \ + /usr/include/c++/11/bits/allocator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++allocator.h \ + /usr/include/c++/11/ext/new_allocator.h \ + /usr/include/c++/11/bits/localefwd.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++locale.h \ + /usr/include/c++/11/clocale /usr/include/locale.h \ + /usr/include/x86_64-linux-gnu/bits/locale.h /usr/include/c++/11/iosfwd \ + /usr/include/c++/11/cctype /usr/include/ctype.h \ + /usr/include/c++/11/bits/ostream_insert.h \ + /usr/include/c++/11/bits/cxxabi_forced.h \ + /usr/include/c++/11/bits/stl_function.h \ + /usr/include/c++/11/backward/binders.h \ + /usr/include/c++/11/bits/range_access.h \ + /usr/include/c++/11/bits/basic_string.h \ + /usr/include/c++/11/ext/atomicity.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr-default.h \ + /usr/include/pthread.h /usr/include/sched.h \ + /usr/include/x86_64-linux-gnu/bits/sched.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h \ + /usr/include/x86_64-linux-gnu/bits/cpu-set.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/timex.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h \ + /usr/include/x86_64-linux-gnu/bits/setjmp.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct___jmp_buf_tag.h \ + /usr/include/x86_64-linux-gnu/bits/pthread_stack_min-dynamic.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/atomic_word.h \ + /usr/include/x86_64-linux-gnu/sys/single_threaded.h \ + /usr/include/c++/11/ext/alloc_traits.h \ + /usr/include/c++/11/bits/alloc_traits.h \ + /usr/include/c++/11/ext/string_conversions.h /usr/include/c++/11/cstdio \ + /usr/include/stdio.h /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/c++/11/cerrno \ + /usr/include/errno.h /usr/include/x86_64-linux-gnu/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/bits/types/error_t.h \ + /usr/include/c++/11/bits/charconv.h \ + /usr/include/c++/11/bits/functional_hash.h \ + /usr/include/c++/11/bits/hash_bytes.h \ + /usr/include/c++/11/bits/basic_string.tcc /usr/include/c++/11/iterator \ + /usr/include/c++/11/bits/stream_iterator.h \ + /usr/include/c++/11/bits/streambuf_iterator.h \ + /usr/include/c++/11/streambuf /usr/include/c++/11/bits/ios_base.h \ + /usr/include/c++/11/bits/locale_classes.h \ + /usr/include/c++/11/bits/locale_classes.tcc \ + /usr/include/c++/11/system_error \ + /usr/include/x86_64-linux-gnu/c++/11/bits/error_constants.h \ + /usr/include/c++/11/stdexcept /usr/include/c++/11/exception \ + /usr/include/c++/11/bits/exception_ptr.h \ + /usr/include/c++/11/bits/cxxabi_init_exception.h \ + /usr/include/c++/11/typeinfo /usr/include/c++/11/bits/nested_exception.h \ + /usr/include/c++/11/bits/streambuf.tcc /usr/include/c++/11/locale \ + /usr/include/c++/11/bits/locale_facets.h /usr/include/c++/11/cwctype \ + /usr/include/wctype.h /usr/include/x86_64-linux-gnu/bits/wctype-wchar.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_base.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_inline.h \ + /usr/include/c++/11/bits/locale_facets.tcc \ + /usr/include/c++/11/bits/locale_facets_nonio.h /usr/include/c++/11/ctime \ + /usr/include/x86_64-linux-gnu/c++/11/bits/time_members.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/messages_members.h \ + /usr/include/libintl.h /usr/include/c++/11/bits/codecvt.h \ + /usr/include/c++/11/bits/locale_facets_nonio.tcc \ + /usr/include/c++/11/bits/locale_conv.h \ + /usr/include/c++/11/bits/unique_ptr.h /usr/include/c++/11/tuple \ + /usr/include/c++/11/array /usr/include/c++/11/bits/uses_allocator.h \ + /usr/include/c++/11/bits/invoke.h /usr/include/c++/11/memory \ + /usr/include/c++/11/bits/stl_uninitialized.h \ + /usr/include/c++/11/bits/stl_raw_storage_iter.h \ + /usr/include/c++/11/bits/align.h /usr/include/c++/11/bit \ + /usr/include/c++/11/bits/shared_ptr.h \ + /usr/include/c++/11/bits/shared_ptr_base.h \ + /usr/include/c++/11/bits/allocated_ptr.h \ + /usr/include/c++/11/bits/refwrap.h \ + /usr/include/c++/11/ext/aligned_buffer.h \ + /usr/include/c++/11/ext/concurrence.h \ + /usr/include/c++/11/bits/shared_ptr_atomic.h \ + /usr/include/c++/11/bits/atomic_base.h \ + /usr/include/c++/11/bits/atomic_lockfree_defines.h \ + /usr/include/c++/11/backward/auto_ptr.h /usr/include/c++/11/sstream \ + /usr/include/c++/11/istream /usr/include/c++/11/ios \ + /usr/include/c++/11/bits/basic_ios.h \ + /usr/include/c++/11/bits/basic_ios.tcc /usr/include/c++/11/ostream \ + /usr/include/c++/11/bits/ostream.tcc \ + /usr/include/c++/11/bits/istream.tcc \ + /usr/include/c++/11/bits/sstream.tcc /usr/include/c++/11/stack \ + /usr/include/c++/11/deque /usr/include/c++/11/bits/stl_deque.h \ + /usr/include/c++/11/bits/deque.tcc /usr/include/c++/11/bits/stl_stack.h \ + /usr/include/c++/11/vector /usr/include/c++/11/bits/stl_vector.h \ + /usr/include/c++/11/bits/stl_bvector.h \ + /usr/include/c++/11/bits/vector.tcc /usr/include/c++/11/map \ + /usr/include/c++/11/bits/stl_tree.h /usr/include/c++/11/bits/stl_map.h \ + /usr/include/c++/11/bits/stl_multimap.h \ + /usr/include/c++/11/bits/erase_if.h /usr/include/c++/11/cstring \ + /usr/include/string.h /usr/include/strings.h \ + /usr/include/x86_64-linux-gnu/bits/strings_fortified.h \ + /usr/include/x86_64-linux-gnu/bits/string_fortified.h \ + /usr/include/c++/11/bits/std_function.h \ + /usr/include/c++/11/bits/regex_constants.h \ + /usr/include/c++/11/bits/regex_error.h \ + /usr/include/c++/11/bits/regex_automaton.h \ + /usr/include/c++/11/bits/regex_automaton.tcc \ + /usr/include/c++/11/bits/regex_scanner.h \ + /usr/include/c++/11/bits/regex_scanner.tcc \ + /usr/include/c++/11/bits/regex_compiler.h \ + /usr/include/c++/11/bits/regex_compiler.tcc \ + /usr/include/c++/11/bits/regex.h /usr/include/c++/11/bits/regex.tcc \ + /usr/include/c++/11/bits/regex_executor.h \ + /usr/include/c++/11/bits/regex_executor.tcc /usr/include/c++/11/numeric \ + /usr/include/c++/11/bits/stl_numeric.h /usr/include/c++/11/complex \ + /usr/include/c++/11/cmath /usr/include/math.h \ + /usr/include/x86_64-linux-gnu/bits/math-vector.h \ + /usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h \ + /usr/include/x86_64-linux-gnu/bits/flt-eval-method.h \ + /usr/include/x86_64-linux-gnu/bits/fp-logb.h \ + /usr/include/x86_64-linux-gnu/bits/fp-fast.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-narrow.h \ + /usr/include/x86_64-linux-gnu/bits/iscanonical.h \ + /usr/include/c++/11/iomanip /usr/include/c++/11/iostream \ + /usr/include/c++/11/unordered_map /usr/include/c++/11/bits/hashtable.h \ + /usr/include/c++/11/bits/hashtable_policy.h \ + /usr/include/c++/11/bits/enable_special_members.h \ + /usr/include/c++/11/bits/unordered_map.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_device/types.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor_shape.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor_buffer.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/base/core/refcount.h \ + /usr/include/c++/11/atomic \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor_accessor.h \ + /usr/include/c++/11/cstddef \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/base/macros/macros.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/base/utils/logging.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/base/utils/array_ref.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/kernels/memory.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor_map.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/ops/linalg_op.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/kernels/blas.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/base/third_party/blas.h diff --git a/build/source/source_base/module_container/CMakeFiles/container.dir/ATen/ops/linalg_op.cpp.o b/build/source/source_base/module_container/CMakeFiles/container.dir/ATen/ops/linalg_op.cpp.o new file mode 100644 index 0000000000..ae82c51815 Binary files /dev/null and b/build/source/source_base/module_container/CMakeFiles/container.dir/ATen/ops/linalg_op.cpp.o differ diff --git a/build/source/source_base/module_container/CMakeFiles/container.dir/ATen/ops/linalg_op.cpp.o.d b/build/source/source_base/module_container/CMakeFiles/container.dir/ATen/ops/linalg_op.cpp.o.d new file mode 100644 index 0000000000..34813fdaec --- /dev/null +++ b/build/source/source_base/module_container/CMakeFiles/container.dir/ATen/ops/linalg_op.cpp.o.d @@ -0,0 +1,241 @@ +source/source_base/module_container/CMakeFiles/container.dir/ATen/ops/linalg_op.cpp.o: \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/ops/linalg_op.cpp \ + /usr/include/stdc-predef.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/ops/linalg_op.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/base/core/allocator.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor_types.h \ + /usr/include/c++/11/regex /usr/include/c++/11/algorithm \ + /usr/include/c++/11/utility \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++config.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/os_defines.h \ + /usr/include/features.h /usr/include/features-time64.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/cpu_defines.h \ + /usr/include/c++/11/bits/stl_relops.h \ + /usr/include/c++/11/bits/stl_pair.h /usr/include/c++/11/bits/move.h \ + /usr/include/c++/11/type_traits /usr/include/c++/11/initializer_list \ + /usr/include/c++/11/bits/stl_algobase.h \ + /usr/include/c++/11/bits/functexcept.h \ + /usr/include/c++/11/bits/exception_defines.h \ + /usr/include/c++/11/bits/cpp_type_traits.h \ + /usr/include/c++/11/ext/type_traits.h \ + /usr/include/c++/11/ext/numeric_traits.h \ + /usr/include/c++/11/bits/stl_iterator_base_types.h \ + /usr/include/c++/11/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/11/bits/concept_check.h \ + /usr/include/c++/11/debug/assertions.h \ + /usr/include/c++/11/bits/stl_iterator.h \ + /usr/include/c++/11/bits/ptr_traits.h /usr/include/c++/11/debug/debug.h \ + /usr/include/c++/11/bits/predefined_ops.h \ + /usr/include/c++/11/bits/stl_algo.h /usr/include/c++/11/cstdlib \ + /usr/include/stdlib.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h \ + /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/atomic_wide_counter.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/include/c++/11/bits/std_abs.h \ + /usr/include/c++/11/bits/algorithmfwd.h \ + /usr/include/c++/11/bits/stl_heap.h \ + /usr/include/c++/11/bits/stl_tempbuf.h \ + /usr/include/c++/11/bits/stl_construct.h /usr/include/c++/11/new \ + /usr/include/c++/11/bits/exception.h \ + /usr/include/c++/11/bits/uniform_int_dist.h /usr/include/c++/11/bitset \ + /usr/include/c++/11/string /usr/include/c++/11/bits/stringfwd.h \ + /usr/include/c++/11/bits/memoryfwd.h \ + /usr/include/c++/11/bits/char_traits.h \ + /usr/include/c++/11/bits/postypes.h /usr/include/c++/11/cwchar \ + /usr/include/wchar.h /usr/lib/gcc/x86_64-linux-gnu/11/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/wchar.h \ + /usr/include/x86_64-linux-gnu/bits/types/wint_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/wchar2.h /usr/include/c++/11/cstdint \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdint.h /usr/include/stdint.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-uintn.h \ + /usr/include/c++/11/bits/allocator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++allocator.h \ + /usr/include/c++/11/ext/new_allocator.h \ + /usr/include/c++/11/bits/localefwd.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++locale.h \ + /usr/include/c++/11/clocale /usr/include/locale.h \ + /usr/include/x86_64-linux-gnu/bits/locale.h /usr/include/c++/11/iosfwd \ + /usr/include/c++/11/cctype /usr/include/ctype.h \ + /usr/include/c++/11/bits/ostream_insert.h \ + /usr/include/c++/11/bits/cxxabi_forced.h \ + /usr/include/c++/11/bits/stl_function.h \ + /usr/include/c++/11/backward/binders.h \ + /usr/include/c++/11/bits/range_access.h \ + /usr/include/c++/11/bits/basic_string.h \ + /usr/include/c++/11/ext/atomicity.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr-default.h \ + /usr/include/pthread.h /usr/include/sched.h \ + /usr/include/x86_64-linux-gnu/bits/sched.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h \ + /usr/include/x86_64-linux-gnu/bits/cpu-set.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/timex.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h \ + /usr/include/x86_64-linux-gnu/bits/setjmp.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct___jmp_buf_tag.h \ + /usr/include/x86_64-linux-gnu/bits/pthread_stack_min-dynamic.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/atomic_word.h \ + /usr/include/x86_64-linux-gnu/sys/single_threaded.h \ + /usr/include/c++/11/ext/alloc_traits.h \ + /usr/include/c++/11/bits/alloc_traits.h \ + /usr/include/c++/11/ext/string_conversions.h /usr/include/c++/11/cstdio \ + /usr/include/stdio.h /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/c++/11/cerrno \ + /usr/include/errno.h /usr/include/x86_64-linux-gnu/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/bits/types/error_t.h \ + /usr/include/c++/11/bits/charconv.h \ + /usr/include/c++/11/bits/functional_hash.h \ + /usr/include/c++/11/bits/hash_bytes.h \ + /usr/include/c++/11/bits/basic_string.tcc /usr/include/c++/11/iterator \ + /usr/include/c++/11/bits/stream_iterator.h \ + /usr/include/c++/11/bits/streambuf_iterator.h \ + /usr/include/c++/11/streambuf /usr/include/c++/11/bits/ios_base.h \ + /usr/include/c++/11/bits/locale_classes.h \ + /usr/include/c++/11/bits/locale_classes.tcc \ + /usr/include/c++/11/system_error \ + /usr/include/x86_64-linux-gnu/c++/11/bits/error_constants.h \ + /usr/include/c++/11/stdexcept /usr/include/c++/11/exception \ + /usr/include/c++/11/bits/exception_ptr.h \ + /usr/include/c++/11/bits/cxxabi_init_exception.h \ + /usr/include/c++/11/typeinfo /usr/include/c++/11/bits/nested_exception.h \ + /usr/include/c++/11/bits/streambuf.tcc /usr/include/c++/11/locale \ + /usr/include/c++/11/bits/locale_facets.h /usr/include/c++/11/cwctype \ + /usr/include/wctype.h /usr/include/x86_64-linux-gnu/bits/wctype-wchar.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_base.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_inline.h \ + /usr/include/c++/11/bits/locale_facets.tcc \ + /usr/include/c++/11/bits/locale_facets_nonio.h /usr/include/c++/11/ctime \ + /usr/include/x86_64-linux-gnu/c++/11/bits/time_members.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/messages_members.h \ + /usr/include/libintl.h /usr/include/c++/11/bits/codecvt.h \ + /usr/include/c++/11/bits/locale_facets_nonio.tcc \ + /usr/include/c++/11/bits/locale_conv.h \ + /usr/include/c++/11/bits/unique_ptr.h /usr/include/c++/11/tuple \ + /usr/include/c++/11/array /usr/include/c++/11/bits/uses_allocator.h \ + /usr/include/c++/11/bits/invoke.h /usr/include/c++/11/memory \ + /usr/include/c++/11/bits/stl_uninitialized.h \ + /usr/include/c++/11/bits/stl_raw_storage_iter.h \ + /usr/include/c++/11/bits/align.h /usr/include/c++/11/bit \ + /usr/include/c++/11/bits/shared_ptr.h \ + /usr/include/c++/11/bits/shared_ptr_base.h \ + /usr/include/c++/11/bits/allocated_ptr.h \ + /usr/include/c++/11/bits/refwrap.h \ + /usr/include/c++/11/ext/aligned_buffer.h \ + /usr/include/c++/11/ext/concurrence.h \ + /usr/include/c++/11/bits/shared_ptr_atomic.h \ + /usr/include/c++/11/bits/atomic_base.h \ + /usr/include/c++/11/bits/atomic_lockfree_defines.h \ + /usr/include/c++/11/backward/auto_ptr.h /usr/include/c++/11/sstream \ + /usr/include/c++/11/istream /usr/include/c++/11/ios \ + /usr/include/c++/11/bits/basic_ios.h \ + /usr/include/c++/11/bits/basic_ios.tcc /usr/include/c++/11/ostream \ + /usr/include/c++/11/bits/ostream.tcc \ + /usr/include/c++/11/bits/istream.tcc \ + /usr/include/c++/11/bits/sstream.tcc /usr/include/c++/11/stack \ + /usr/include/c++/11/deque /usr/include/c++/11/bits/stl_deque.h \ + /usr/include/c++/11/bits/deque.tcc /usr/include/c++/11/bits/stl_stack.h \ + /usr/include/c++/11/vector /usr/include/c++/11/bits/stl_vector.h \ + /usr/include/c++/11/bits/stl_bvector.h \ + /usr/include/c++/11/bits/vector.tcc /usr/include/c++/11/map \ + /usr/include/c++/11/bits/stl_tree.h /usr/include/c++/11/bits/stl_map.h \ + /usr/include/c++/11/bits/stl_multimap.h \ + /usr/include/c++/11/bits/erase_if.h /usr/include/c++/11/cstring \ + /usr/include/string.h /usr/include/strings.h \ + /usr/include/x86_64-linux-gnu/bits/strings_fortified.h \ + /usr/include/x86_64-linux-gnu/bits/string_fortified.h \ + /usr/include/c++/11/bits/std_function.h \ + /usr/include/c++/11/bits/regex_constants.h \ + /usr/include/c++/11/bits/regex_error.h \ + /usr/include/c++/11/bits/regex_automaton.h \ + /usr/include/c++/11/bits/regex_automaton.tcc \ + /usr/include/c++/11/bits/regex_scanner.h \ + /usr/include/c++/11/bits/regex_scanner.tcc \ + /usr/include/c++/11/bits/regex_compiler.h \ + /usr/include/c++/11/bits/regex_compiler.tcc \ + /usr/include/c++/11/bits/regex.h /usr/include/c++/11/bits/regex.tcc \ + /usr/include/c++/11/bits/regex_executor.h \ + /usr/include/c++/11/bits/regex_executor.tcc /usr/include/c++/11/numeric \ + /usr/include/c++/11/bits/stl_numeric.h /usr/include/c++/11/complex \ + /usr/include/c++/11/cmath /usr/include/math.h \ + /usr/include/x86_64-linux-gnu/bits/math-vector.h \ + /usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h \ + /usr/include/x86_64-linux-gnu/bits/flt-eval-method.h \ + /usr/include/x86_64-linux-gnu/bits/fp-logb.h \ + /usr/include/x86_64-linux-gnu/bits/fp-fast.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-narrow.h \ + /usr/include/x86_64-linux-gnu/bits/iscanonical.h \ + /usr/include/c++/11/iomanip /usr/include/c++/11/iostream \ + /usr/include/c++/11/unordered_map /usr/include/c++/11/bits/hashtable.h \ + /usr/include/c++/11/bits/hashtable_policy.h \ + /usr/include/c++/11/bits/enable_special_members.h \ + /usr/include/c++/11/bits/unordered_map.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_device/types.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor_shape.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor_buffer.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/base/core/refcount.h \ + /usr/include/c++/11/atomic \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor_accessor.h \ + /usr/include/c++/11/cstddef \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/base/macros/macros.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/base/utils/logging.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/base/utils/array_ref.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/kernels/memory.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/ops/einsum_op.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor_map.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/kernels/linalg.h diff --git a/build/source/source_base/module_container/CMakeFiles/container.dir/DependInfo.cmake b/build/source/source_base/module_container/CMakeFiles/container.dir/DependInfo.cmake new file mode 100644 index 0000000000..c79d867a9a --- /dev/null +++ b/build/source/source_base/module_container/CMakeFiles/container.dir/DependInfo.cmake @@ -0,0 +1,31 @@ + +# Consider dependencies only in project. +set(CMAKE_DEPENDS_IN_PROJECT_ONLY OFF) + +# The set of languages for which implicit dependencies are needed: +set(CMAKE_DEPENDS_LANGUAGES + ) + +# The set of dependency files which are needed: +set(CMAKE_DEPENDS_DEPENDENCY_FILES + "/home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor.cpp" "source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor.cpp.o" "gcc" "source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor.cpp.o.d" + "/home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor_buffer.cpp" "source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor_buffer.cpp.o" "gcc" "source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor_buffer.cpp.o.d" + "/home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor_map.cpp" "source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor_map.cpp.o" "gcc" "source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor_map.cpp.o.d" + "/home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor_shape.cpp" "source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor_shape.cpp.o" "gcc" "source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor_shape.cpp.o.d" + "/home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor_types.cpp" "source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor_types.cpp.o" "gcc" "source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor_types.cpp.o.d" + "/home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/kernels/blas.cpp" "source/source_base/module_container/CMakeFiles/container.dir/ATen/kernels/blas.cpp.o" "gcc" "source/source_base/module_container/CMakeFiles/container.dir/ATen/kernels/blas.cpp.o.d" + "/home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/kernels/lapack.cpp" "source/source_base/module_container/CMakeFiles/container.dir/ATen/kernels/lapack.cpp.o" "gcc" "source/source_base/module_container/CMakeFiles/container.dir/ATen/kernels/lapack.cpp.o.d" + "/home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/kernels/linalg.cpp" "source/source_base/module_container/CMakeFiles/container.dir/ATen/kernels/linalg.cpp.o" "gcc" "source/source_base/module_container/CMakeFiles/container.dir/ATen/kernels/linalg.cpp.o.d" + "/home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/kernels/memory_impl.cpp" "source/source_base/module_container/CMakeFiles/container.dir/ATen/kernels/memory_impl.cpp.o" "gcc" "source/source_base/module_container/CMakeFiles/container.dir/ATen/kernels/memory_impl.cpp.o.d" + "/home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/ops/einsum_op.cpp" "source/source_base/module_container/CMakeFiles/container.dir/ATen/ops/einsum_op.cpp.o" "gcc" "source/source_base/module_container/CMakeFiles/container.dir/ATen/ops/einsum_op.cpp.o.d" + "/home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/ops/linalg_op.cpp" "source/source_base/module_container/CMakeFiles/container.dir/ATen/ops/linalg_op.cpp.o" "gcc" "source/source_base/module_container/CMakeFiles/container.dir/ATen/ops/linalg_op.cpp.o.d" + "/home/haozhihan/Documents/abacus-develop/source/source_base/module_container/base/core/cpu_allocator.cpp" "source/source_base/module_container/CMakeFiles/container.dir/base/core/cpu_allocator.cpp.o" "gcc" "source/source_base/module_container/CMakeFiles/container.dir/base/core/cpu_allocator.cpp.o.d" + "/home/haozhihan/Documents/abacus-develop/source/source_base/module_container/base/core/refcount.cpp" "source/source_base/module_container/CMakeFiles/container.dir/base/core/refcount.cpp.o" "gcc" "source/source_base/module_container/CMakeFiles/container.dir/base/core/refcount.cpp.o.d" + ) + +# Targets to which this target links which contain Fortran sources. +set(CMAKE_Fortran_TARGET_LINKED_INFO_FILES + ) + +# Fortran module output directory. +set(CMAKE_Fortran_TARGET_MODULE_DIR "") diff --git a/build/source/source_base/module_container/CMakeFiles/container.dir/base/core/cpu_allocator.cpp.o b/build/source/source_base/module_container/CMakeFiles/container.dir/base/core/cpu_allocator.cpp.o new file mode 100644 index 0000000000..e1e8abd9a7 Binary files /dev/null and b/build/source/source_base/module_container/CMakeFiles/container.dir/base/core/cpu_allocator.cpp.o differ diff --git a/build/source/source_base/module_container/CMakeFiles/container.dir/base/core/cpu_allocator.cpp.o.d b/build/source/source_base/module_container/CMakeFiles/container.dir/base/core/cpu_allocator.cpp.o.d new file mode 100644 index 0000000000..10d3d97790 --- /dev/null +++ b/build/source/source_base/module_container/CMakeFiles/container.dir/base/core/cpu_allocator.cpp.o.d @@ -0,0 +1,227 @@ +source/source_base/module_container/CMakeFiles/container.dir/base/core/cpu_allocator.cpp.o: \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/base/core/cpu_allocator.cpp \ + /usr/include/stdc-predef.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/base/core/cpu_allocator.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/base/core/allocator.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor_types.h \ + /usr/include/c++/11/regex /usr/include/c++/11/algorithm \ + /usr/include/c++/11/utility \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++config.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/os_defines.h \ + /usr/include/features.h /usr/include/features-time64.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/cpu_defines.h \ + /usr/include/c++/11/bits/stl_relops.h \ + /usr/include/c++/11/bits/stl_pair.h /usr/include/c++/11/bits/move.h \ + /usr/include/c++/11/type_traits /usr/include/c++/11/initializer_list \ + /usr/include/c++/11/bits/stl_algobase.h \ + /usr/include/c++/11/bits/functexcept.h \ + /usr/include/c++/11/bits/exception_defines.h \ + /usr/include/c++/11/bits/cpp_type_traits.h \ + /usr/include/c++/11/ext/type_traits.h \ + /usr/include/c++/11/ext/numeric_traits.h \ + /usr/include/c++/11/bits/stl_iterator_base_types.h \ + /usr/include/c++/11/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/11/bits/concept_check.h \ + /usr/include/c++/11/debug/assertions.h \ + /usr/include/c++/11/bits/stl_iterator.h \ + /usr/include/c++/11/bits/ptr_traits.h /usr/include/c++/11/debug/debug.h \ + /usr/include/c++/11/bits/predefined_ops.h \ + /usr/include/c++/11/bits/stl_algo.h /usr/include/c++/11/cstdlib \ + /usr/include/stdlib.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h \ + /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/atomic_wide_counter.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/include/c++/11/bits/std_abs.h \ + /usr/include/c++/11/bits/algorithmfwd.h \ + /usr/include/c++/11/bits/stl_heap.h \ + /usr/include/c++/11/bits/stl_tempbuf.h \ + /usr/include/c++/11/bits/stl_construct.h /usr/include/c++/11/new \ + /usr/include/c++/11/bits/exception.h \ + /usr/include/c++/11/bits/uniform_int_dist.h /usr/include/c++/11/bitset \ + /usr/include/c++/11/string /usr/include/c++/11/bits/stringfwd.h \ + /usr/include/c++/11/bits/memoryfwd.h \ + /usr/include/c++/11/bits/char_traits.h \ + /usr/include/c++/11/bits/postypes.h /usr/include/c++/11/cwchar \ + /usr/include/wchar.h /usr/lib/gcc/x86_64-linux-gnu/11/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/wchar.h \ + /usr/include/x86_64-linux-gnu/bits/types/wint_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/wchar2.h /usr/include/c++/11/cstdint \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdint.h /usr/include/stdint.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-uintn.h \ + /usr/include/c++/11/bits/allocator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++allocator.h \ + /usr/include/c++/11/ext/new_allocator.h \ + /usr/include/c++/11/bits/localefwd.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++locale.h \ + /usr/include/c++/11/clocale /usr/include/locale.h \ + /usr/include/x86_64-linux-gnu/bits/locale.h /usr/include/c++/11/iosfwd \ + /usr/include/c++/11/cctype /usr/include/ctype.h \ + /usr/include/c++/11/bits/ostream_insert.h \ + /usr/include/c++/11/bits/cxxabi_forced.h \ + /usr/include/c++/11/bits/stl_function.h \ + /usr/include/c++/11/backward/binders.h \ + /usr/include/c++/11/bits/range_access.h \ + /usr/include/c++/11/bits/basic_string.h \ + /usr/include/c++/11/ext/atomicity.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr-default.h \ + /usr/include/pthread.h /usr/include/sched.h \ + /usr/include/x86_64-linux-gnu/bits/sched.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h \ + /usr/include/x86_64-linux-gnu/bits/cpu-set.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/timex.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h \ + /usr/include/x86_64-linux-gnu/bits/setjmp.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct___jmp_buf_tag.h \ + /usr/include/x86_64-linux-gnu/bits/pthread_stack_min-dynamic.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/atomic_word.h \ + /usr/include/x86_64-linux-gnu/sys/single_threaded.h \ + /usr/include/c++/11/ext/alloc_traits.h \ + /usr/include/c++/11/bits/alloc_traits.h \ + /usr/include/c++/11/ext/string_conversions.h /usr/include/c++/11/cstdio \ + /usr/include/stdio.h /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/c++/11/cerrno \ + /usr/include/errno.h /usr/include/x86_64-linux-gnu/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/bits/types/error_t.h \ + /usr/include/c++/11/bits/charconv.h \ + /usr/include/c++/11/bits/functional_hash.h \ + /usr/include/c++/11/bits/hash_bytes.h \ + /usr/include/c++/11/bits/basic_string.tcc /usr/include/c++/11/iterator \ + /usr/include/c++/11/bits/stream_iterator.h \ + /usr/include/c++/11/bits/streambuf_iterator.h \ + /usr/include/c++/11/streambuf /usr/include/c++/11/bits/ios_base.h \ + /usr/include/c++/11/bits/locale_classes.h \ + /usr/include/c++/11/bits/locale_classes.tcc \ + /usr/include/c++/11/system_error \ + /usr/include/x86_64-linux-gnu/c++/11/bits/error_constants.h \ + /usr/include/c++/11/stdexcept /usr/include/c++/11/exception \ + /usr/include/c++/11/bits/exception_ptr.h \ + /usr/include/c++/11/bits/cxxabi_init_exception.h \ + /usr/include/c++/11/typeinfo /usr/include/c++/11/bits/nested_exception.h \ + /usr/include/c++/11/bits/streambuf.tcc /usr/include/c++/11/locale \ + /usr/include/c++/11/bits/locale_facets.h /usr/include/c++/11/cwctype \ + /usr/include/wctype.h /usr/include/x86_64-linux-gnu/bits/wctype-wchar.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_base.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_inline.h \ + /usr/include/c++/11/bits/locale_facets.tcc \ + /usr/include/c++/11/bits/locale_facets_nonio.h /usr/include/c++/11/ctime \ + /usr/include/x86_64-linux-gnu/c++/11/bits/time_members.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/messages_members.h \ + /usr/include/libintl.h /usr/include/c++/11/bits/codecvt.h \ + /usr/include/c++/11/bits/locale_facets_nonio.tcc \ + /usr/include/c++/11/bits/locale_conv.h \ + /usr/include/c++/11/bits/unique_ptr.h /usr/include/c++/11/tuple \ + /usr/include/c++/11/array /usr/include/c++/11/bits/uses_allocator.h \ + /usr/include/c++/11/bits/invoke.h /usr/include/c++/11/memory \ + /usr/include/c++/11/bits/stl_uninitialized.h \ + /usr/include/c++/11/bits/stl_raw_storage_iter.h \ + /usr/include/c++/11/bits/align.h /usr/include/c++/11/bit \ + /usr/include/c++/11/bits/shared_ptr.h \ + /usr/include/c++/11/bits/shared_ptr_base.h \ + /usr/include/c++/11/bits/allocated_ptr.h \ + /usr/include/c++/11/bits/refwrap.h \ + /usr/include/c++/11/ext/aligned_buffer.h \ + /usr/include/c++/11/ext/concurrence.h \ + /usr/include/c++/11/bits/shared_ptr_atomic.h \ + /usr/include/c++/11/bits/atomic_base.h \ + /usr/include/c++/11/bits/atomic_lockfree_defines.h \ + /usr/include/c++/11/backward/auto_ptr.h /usr/include/c++/11/sstream \ + /usr/include/c++/11/istream /usr/include/c++/11/ios \ + /usr/include/c++/11/bits/basic_ios.h \ + /usr/include/c++/11/bits/basic_ios.tcc /usr/include/c++/11/ostream \ + /usr/include/c++/11/bits/ostream.tcc \ + /usr/include/c++/11/bits/istream.tcc \ + /usr/include/c++/11/bits/sstream.tcc /usr/include/c++/11/stack \ + /usr/include/c++/11/deque /usr/include/c++/11/bits/stl_deque.h \ + /usr/include/c++/11/bits/deque.tcc /usr/include/c++/11/bits/stl_stack.h \ + /usr/include/c++/11/vector /usr/include/c++/11/bits/stl_vector.h \ + /usr/include/c++/11/bits/stl_bvector.h \ + /usr/include/c++/11/bits/vector.tcc /usr/include/c++/11/map \ + /usr/include/c++/11/bits/stl_tree.h /usr/include/c++/11/bits/stl_map.h \ + /usr/include/c++/11/bits/stl_multimap.h \ + /usr/include/c++/11/bits/erase_if.h /usr/include/c++/11/cstring \ + /usr/include/string.h /usr/include/strings.h \ + /usr/include/x86_64-linux-gnu/bits/strings_fortified.h \ + /usr/include/x86_64-linux-gnu/bits/string_fortified.h \ + /usr/include/c++/11/bits/std_function.h \ + /usr/include/c++/11/bits/regex_constants.h \ + /usr/include/c++/11/bits/regex_error.h \ + /usr/include/c++/11/bits/regex_automaton.h \ + /usr/include/c++/11/bits/regex_automaton.tcc \ + /usr/include/c++/11/bits/regex_scanner.h \ + /usr/include/c++/11/bits/regex_scanner.tcc \ + /usr/include/c++/11/bits/regex_compiler.h \ + /usr/include/c++/11/bits/regex_compiler.tcc \ + /usr/include/c++/11/bits/regex.h /usr/include/c++/11/bits/regex.tcc \ + /usr/include/c++/11/bits/regex_executor.h \ + /usr/include/c++/11/bits/regex_executor.tcc /usr/include/c++/11/numeric \ + /usr/include/c++/11/bits/stl_numeric.h /usr/include/c++/11/complex \ + /usr/include/c++/11/cmath /usr/include/math.h \ + /usr/include/x86_64-linux-gnu/bits/math-vector.h \ + /usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h \ + /usr/include/x86_64-linux-gnu/bits/flt-eval-method.h \ + /usr/include/x86_64-linux-gnu/bits/fp-logb.h \ + /usr/include/x86_64-linux-gnu/bits/fp-fast.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-narrow.h \ + /usr/include/x86_64-linux-gnu/bits/iscanonical.h \ + /usr/include/c++/11/iomanip /usr/include/c++/11/iostream \ + /usr/include/c++/11/unordered_map /usr/include/c++/11/bits/hashtable.h \ + /usr/include/c++/11/bits/hashtable_policy.h \ + /usr/include/c++/11/bits/enable_special_members.h \ + /usr/include/c++/11/bits/unordered_map.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_device/types.h diff --git a/build/source/source_base/module_container/CMakeFiles/container.dir/base/core/refcount.cpp.o b/build/source/source_base/module_container/CMakeFiles/container.dir/base/core/refcount.cpp.o new file mode 100644 index 0000000000..c6f38eeb1e Binary files /dev/null and b/build/source/source_base/module_container/CMakeFiles/container.dir/base/core/refcount.cpp.o differ diff --git a/build/source/source_base/module_container/CMakeFiles/container.dir/base/core/refcount.cpp.o.d b/build/source/source_base/module_container/CMakeFiles/container.dir/base/core/refcount.cpp.o.d new file mode 100644 index 0000000000..84b518c533 --- /dev/null +++ b/build/source/source_base/module_container/CMakeFiles/container.dir/base/core/refcount.cpp.o.d @@ -0,0 +1,171 @@ +source/source_base/module_container/CMakeFiles/container.dir/base/core/refcount.cpp.o: \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/base/core/refcount.cpp \ + /usr/include/stdc-predef.h \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/base/core/refcount.h \ + /usr/include/c++/11/atomic /usr/include/c++/11/bits/atomic_base.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++config.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/os_defines.h \ + /usr/include/features.h /usr/include/features-time64.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/cpu_defines.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdint.h /usr/include/stdint.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/wchar.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-uintn.h \ + /usr/include/c++/11/bits/atomic_lockfree_defines.h \ + /usr/include/c++/11/bits/move.h /usr/include/c++/11/type_traits \ + /usr/include/c++/11/memory /usr/include/c++/11/bits/stl_algobase.h \ + /usr/include/c++/11/bits/functexcept.h \ + /usr/include/c++/11/bits/exception_defines.h \ + /usr/include/c++/11/bits/cpp_type_traits.h \ + /usr/include/c++/11/ext/type_traits.h \ + /usr/include/c++/11/ext/numeric_traits.h \ + /usr/include/c++/11/bits/stl_pair.h \ + /usr/include/c++/11/bits/stl_iterator_base_types.h \ + /usr/include/c++/11/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/11/bits/concept_check.h \ + /usr/include/c++/11/debug/assertions.h \ + /usr/include/c++/11/bits/stl_iterator.h \ + /usr/include/c++/11/bits/ptr_traits.h /usr/include/c++/11/debug/debug.h \ + /usr/include/c++/11/bits/predefined_ops.h \ + /usr/include/c++/11/bits/allocator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++allocator.h \ + /usr/include/c++/11/ext/new_allocator.h /usr/include/c++/11/new \ + /usr/include/c++/11/bits/exception.h \ + /usr/include/c++/11/bits/memoryfwd.h \ + /usr/include/c++/11/bits/stl_construct.h \ + /usr/include/c++/11/bits/stl_uninitialized.h \ + /usr/include/c++/11/ext/alloc_traits.h \ + /usr/include/c++/11/bits/alloc_traits.h \ + /usr/include/c++/11/bits/stl_tempbuf.h \ + /usr/include/c++/11/bits/stl_raw_storage_iter.h \ + /usr/include/c++/11/bits/align.h /usr/include/c++/11/bit \ + /usr/include/c++/11/bits/uses_allocator.h \ + /usr/include/c++/11/bits/unique_ptr.h /usr/include/c++/11/utility \ + /usr/include/c++/11/bits/stl_relops.h \ + /usr/include/c++/11/initializer_list /usr/include/c++/11/tuple \ + /usr/include/c++/11/array /usr/include/c++/11/bits/range_access.h \ + /usr/include/c++/11/bits/invoke.h \ + /usr/include/c++/11/bits/stl_function.h \ + /usr/include/c++/11/backward/binders.h \ + /usr/include/c++/11/bits/functional_hash.h \ + /usr/include/c++/11/bits/hash_bytes.h \ + /usr/include/c++/11/bits/shared_ptr.h /usr/include/c++/11/iosfwd \ + /usr/include/c++/11/bits/stringfwd.h /usr/include/c++/11/bits/postypes.h \ + /usr/include/c++/11/cwchar /usr/include/wchar.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/types/wint_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/wchar2.h \ + /usr/include/c++/11/bits/shared_ptr_base.h /usr/include/c++/11/typeinfo \ + /usr/include/c++/11/bits/allocated_ptr.h \ + /usr/include/c++/11/bits/refwrap.h \ + /usr/include/c++/11/ext/aligned_buffer.h \ + /usr/include/c++/11/ext/atomicity.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr-default.h \ + /usr/include/pthread.h /usr/include/sched.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/sched.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h \ + /usr/include/x86_64-linux-gnu/bits/cpu-set.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/timex.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/atomic_wide_counter.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h \ + /usr/include/x86_64-linux-gnu/bits/setjmp.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct___jmp_buf_tag.h \ + /usr/include/x86_64-linux-gnu/bits/pthread_stack_min-dynamic.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/atomic_word.h \ + /usr/include/x86_64-linux-gnu/sys/single_threaded.h \ + /usr/include/c++/11/ext/concurrence.h /usr/include/c++/11/exception \ + /usr/include/c++/11/bits/exception_ptr.h \ + /usr/include/c++/11/bits/cxxabi_init_exception.h \ + /usr/include/c++/11/bits/nested_exception.h \ + /usr/include/c++/11/bits/shared_ptr_atomic.h \ + /usr/include/c++/11/backward/auto_ptr.h /usr/include/c++/11/iostream \ + /usr/include/c++/11/ostream /usr/include/c++/11/ios \ + /usr/include/c++/11/bits/char_traits.h /usr/include/c++/11/cstdint \ + /usr/include/c++/11/bits/localefwd.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++locale.h \ + /usr/include/c++/11/clocale /usr/include/locale.h \ + /usr/include/x86_64-linux-gnu/bits/locale.h /usr/include/c++/11/cctype \ + /usr/include/ctype.h /usr/include/c++/11/bits/ios_base.h \ + /usr/include/c++/11/bits/locale_classes.h /usr/include/c++/11/string \ + /usr/include/c++/11/bits/ostream_insert.h \ + /usr/include/c++/11/bits/cxxabi_forced.h \ + /usr/include/c++/11/bits/basic_string.h \ + /usr/include/c++/11/ext/string_conversions.h /usr/include/c++/11/cstdlib \ + /usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/sys/types.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/include/c++/11/bits/std_abs.h /usr/include/c++/11/cstdio \ + /usr/include/stdio.h /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/c++/11/cerrno \ + /usr/include/errno.h /usr/include/x86_64-linux-gnu/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/bits/types/error_t.h \ + /usr/include/c++/11/bits/charconv.h \ + /usr/include/c++/11/bits/basic_string.tcc \ + /usr/include/c++/11/bits/locale_classes.tcc \ + /usr/include/c++/11/system_error \ + /usr/include/x86_64-linux-gnu/c++/11/bits/error_constants.h \ + /usr/include/c++/11/stdexcept /usr/include/c++/11/streambuf \ + /usr/include/c++/11/bits/streambuf.tcc \ + /usr/include/c++/11/bits/basic_ios.h \ + /usr/include/c++/11/bits/locale_facets.h /usr/include/c++/11/cwctype \ + /usr/include/wctype.h /usr/include/x86_64-linux-gnu/bits/wctype-wchar.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_base.h \ + /usr/include/c++/11/bits/streambuf_iterator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_inline.h \ + /usr/include/c++/11/bits/locale_facets.tcc \ + /usr/include/c++/11/bits/basic_ios.tcc \ + /usr/include/c++/11/bits/ostream.tcc /usr/include/c++/11/istream \ + /usr/include/c++/11/bits/istream.tcc \ + /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/base/core/refcount.h diff --git a/build/source/source_base/module_container/CMakeFiles/container.dir/build.make b/build/source/source_base/module_container/CMakeFiles/container.dir/build.make new file mode 100644 index 0000000000..2b0a727793 --- /dev/null +++ b/build/source/source_base/module_container/CMakeFiles/container.dir/build.make @@ -0,0 +1,303 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.27 + +# Delete rule output on recipe failure. +.DELETE_ON_ERROR: + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Disable VCS-based implicit rules. +% : %,v + +# Disable VCS-based implicit rules. +% : RCS/% + +# Disable VCS-based implicit rules. +% : RCS/%,v + +# Disable VCS-based implicit rules. +% : SCCS/s.% + +# Disable VCS-based implicit rules. +% : s.% + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Command-line flag to silence nested $(MAKE). +$(VERBOSE)MAKESILENT = -s + +#Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E rm -f + +# Escaping for special characters. +EQUALS = = + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/haozhihan/Documents/abacus-develop + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/haozhihan/Documents/abacus-develop/build + +# Include any dependencies generated for this target. +include source/source_base/module_container/CMakeFiles/container.dir/depend.make +# Include any dependencies generated by the compiler for this target. +include source/source_base/module_container/CMakeFiles/container.dir/compiler_depend.make + +# Include the progress variables for this target. +include source/source_base/module_container/CMakeFiles/container.dir/progress.make + +# Include the compile flags for this target's objects. +include source/source_base/module_container/CMakeFiles/container.dir/flags.make + +source/source_base/module_container/CMakeFiles/container.dir/base/core/refcount.cpp.o: source/source_base/module_container/CMakeFiles/container.dir/flags.make +source/source_base/module_container/CMakeFiles/container.dir/base/core/refcount.cpp.o: /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/base/core/refcount.cpp +source/source_base/module_container/CMakeFiles/container.dir/base/core/refcount.cpp.o: source/source_base/module_container/CMakeFiles/container.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green --progress-dir=/home/haozhihan/Documents/abacus-develop/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_1) "Building CXX object source/source_base/module_container/CMakeFiles/container.dir/base/core/refcount.cpp.o" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base/module_container && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT source/source_base/module_container/CMakeFiles/container.dir/base/core/refcount.cpp.o -MF CMakeFiles/container.dir/base/core/refcount.cpp.o.d -o CMakeFiles/container.dir/base/core/refcount.cpp.o -c /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/base/core/refcount.cpp + +source/source_base/module_container/CMakeFiles/container.dir/base/core/refcount.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Preprocessing CXX source to CMakeFiles/container.dir/base/core/refcount.cpp.i" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base/module_container && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/base/core/refcount.cpp > CMakeFiles/container.dir/base/core/refcount.cpp.i + +source/source_base/module_container/CMakeFiles/container.dir/base/core/refcount.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Compiling CXX source to assembly CMakeFiles/container.dir/base/core/refcount.cpp.s" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base/module_container && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/base/core/refcount.cpp -o CMakeFiles/container.dir/base/core/refcount.cpp.s + +source/source_base/module_container/CMakeFiles/container.dir/base/core/cpu_allocator.cpp.o: source/source_base/module_container/CMakeFiles/container.dir/flags.make +source/source_base/module_container/CMakeFiles/container.dir/base/core/cpu_allocator.cpp.o: /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/base/core/cpu_allocator.cpp +source/source_base/module_container/CMakeFiles/container.dir/base/core/cpu_allocator.cpp.o: source/source_base/module_container/CMakeFiles/container.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green --progress-dir=/home/haozhihan/Documents/abacus-develop/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_2) "Building CXX object source/source_base/module_container/CMakeFiles/container.dir/base/core/cpu_allocator.cpp.o" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base/module_container && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT source/source_base/module_container/CMakeFiles/container.dir/base/core/cpu_allocator.cpp.o -MF CMakeFiles/container.dir/base/core/cpu_allocator.cpp.o.d -o CMakeFiles/container.dir/base/core/cpu_allocator.cpp.o -c /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/base/core/cpu_allocator.cpp + +source/source_base/module_container/CMakeFiles/container.dir/base/core/cpu_allocator.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Preprocessing CXX source to CMakeFiles/container.dir/base/core/cpu_allocator.cpp.i" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base/module_container && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/base/core/cpu_allocator.cpp > CMakeFiles/container.dir/base/core/cpu_allocator.cpp.i + +source/source_base/module_container/CMakeFiles/container.dir/base/core/cpu_allocator.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Compiling CXX source to assembly CMakeFiles/container.dir/base/core/cpu_allocator.cpp.s" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base/module_container && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/base/core/cpu_allocator.cpp -o CMakeFiles/container.dir/base/core/cpu_allocator.cpp.s + +source/source_base/module_container/CMakeFiles/container.dir/ATen/ops/einsum_op.cpp.o: source/source_base/module_container/CMakeFiles/container.dir/flags.make +source/source_base/module_container/CMakeFiles/container.dir/ATen/ops/einsum_op.cpp.o: /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/ops/einsum_op.cpp +source/source_base/module_container/CMakeFiles/container.dir/ATen/ops/einsum_op.cpp.o: source/source_base/module_container/CMakeFiles/container.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green --progress-dir=/home/haozhihan/Documents/abacus-develop/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_3) "Building CXX object source/source_base/module_container/CMakeFiles/container.dir/ATen/ops/einsum_op.cpp.o" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base/module_container && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT source/source_base/module_container/CMakeFiles/container.dir/ATen/ops/einsum_op.cpp.o -MF CMakeFiles/container.dir/ATen/ops/einsum_op.cpp.o.d -o CMakeFiles/container.dir/ATen/ops/einsum_op.cpp.o -c /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/ops/einsum_op.cpp + +source/source_base/module_container/CMakeFiles/container.dir/ATen/ops/einsum_op.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Preprocessing CXX source to CMakeFiles/container.dir/ATen/ops/einsum_op.cpp.i" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base/module_container && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/ops/einsum_op.cpp > CMakeFiles/container.dir/ATen/ops/einsum_op.cpp.i + +source/source_base/module_container/CMakeFiles/container.dir/ATen/ops/einsum_op.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Compiling CXX source to assembly CMakeFiles/container.dir/ATen/ops/einsum_op.cpp.s" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base/module_container && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/ops/einsum_op.cpp -o CMakeFiles/container.dir/ATen/ops/einsum_op.cpp.s + +source/source_base/module_container/CMakeFiles/container.dir/ATen/ops/linalg_op.cpp.o: source/source_base/module_container/CMakeFiles/container.dir/flags.make +source/source_base/module_container/CMakeFiles/container.dir/ATen/ops/linalg_op.cpp.o: /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/ops/linalg_op.cpp +source/source_base/module_container/CMakeFiles/container.dir/ATen/ops/linalg_op.cpp.o: source/source_base/module_container/CMakeFiles/container.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green --progress-dir=/home/haozhihan/Documents/abacus-develop/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_4) "Building CXX object source/source_base/module_container/CMakeFiles/container.dir/ATen/ops/linalg_op.cpp.o" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base/module_container && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT source/source_base/module_container/CMakeFiles/container.dir/ATen/ops/linalg_op.cpp.o -MF CMakeFiles/container.dir/ATen/ops/linalg_op.cpp.o.d -o CMakeFiles/container.dir/ATen/ops/linalg_op.cpp.o -c /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/ops/linalg_op.cpp + +source/source_base/module_container/CMakeFiles/container.dir/ATen/ops/linalg_op.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Preprocessing CXX source to CMakeFiles/container.dir/ATen/ops/linalg_op.cpp.i" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base/module_container && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/ops/linalg_op.cpp > CMakeFiles/container.dir/ATen/ops/linalg_op.cpp.i + +source/source_base/module_container/CMakeFiles/container.dir/ATen/ops/linalg_op.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Compiling CXX source to assembly CMakeFiles/container.dir/ATen/ops/linalg_op.cpp.s" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base/module_container && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/ops/linalg_op.cpp -o CMakeFiles/container.dir/ATen/ops/linalg_op.cpp.s + +source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor.cpp.o: source/source_base/module_container/CMakeFiles/container.dir/flags.make +source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor.cpp.o: /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor.cpp +source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor.cpp.o: source/source_base/module_container/CMakeFiles/container.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green --progress-dir=/home/haozhihan/Documents/abacus-develop/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_5) "Building CXX object source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor.cpp.o" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base/module_container && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor.cpp.o -MF CMakeFiles/container.dir/ATen/core/tensor.cpp.o.d -o CMakeFiles/container.dir/ATen/core/tensor.cpp.o -c /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor.cpp + +source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Preprocessing CXX source to CMakeFiles/container.dir/ATen/core/tensor.cpp.i" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base/module_container && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor.cpp > CMakeFiles/container.dir/ATen/core/tensor.cpp.i + +source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Compiling CXX source to assembly CMakeFiles/container.dir/ATen/core/tensor.cpp.s" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base/module_container && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor.cpp -o CMakeFiles/container.dir/ATen/core/tensor.cpp.s + +source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor_buffer.cpp.o: source/source_base/module_container/CMakeFiles/container.dir/flags.make +source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor_buffer.cpp.o: /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor_buffer.cpp +source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor_buffer.cpp.o: source/source_base/module_container/CMakeFiles/container.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green --progress-dir=/home/haozhihan/Documents/abacus-develop/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_6) "Building CXX object source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor_buffer.cpp.o" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base/module_container && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor_buffer.cpp.o -MF CMakeFiles/container.dir/ATen/core/tensor_buffer.cpp.o.d -o CMakeFiles/container.dir/ATen/core/tensor_buffer.cpp.o -c /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor_buffer.cpp + +source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor_buffer.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Preprocessing CXX source to CMakeFiles/container.dir/ATen/core/tensor_buffer.cpp.i" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base/module_container && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor_buffer.cpp > CMakeFiles/container.dir/ATen/core/tensor_buffer.cpp.i + +source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor_buffer.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Compiling CXX source to assembly CMakeFiles/container.dir/ATen/core/tensor_buffer.cpp.s" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base/module_container && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor_buffer.cpp -o CMakeFiles/container.dir/ATen/core/tensor_buffer.cpp.s + +source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor_map.cpp.o: source/source_base/module_container/CMakeFiles/container.dir/flags.make +source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor_map.cpp.o: /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor_map.cpp +source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor_map.cpp.o: source/source_base/module_container/CMakeFiles/container.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green --progress-dir=/home/haozhihan/Documents/abacus-develop/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_7) "Building CXX object source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor_map.cpp.o" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base/module_container && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor_map.cpp.o -MF CMakeFiles/container.dir/ATen/core/tensor_map.cpp.o.d -o CMakeFiles/container.dir/ATen/core/tensor_map.cpp.o -c /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor_map.cpp + +source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor_map.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Preprocessing CXX source to CMakeFiles/container.dir/ATen/core/tensor_map.cpp.i" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base/module_container && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor_map.cpp > CMakeFiles/container.dir/ATen/core/tensor_map.cpp.i + +source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor_map.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Compiling CXX source to assembly CMakeFiles/container.dir/ATen/core/tensor_map.cpp.s" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base/module_container && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor_map.cpp -o CMakeFiles/container.dir/ATen/core/tensor_map.cpp.s + +source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor_shape.cpp.o: source/source_base/module_container/CMakeFiles/container.dir/flags.make +source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor_shape.cpp.o: /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor_shape.cpp +source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor_shape.cpp.o: source/source_base/module_container/CMakeFiles/container.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green --progress-dir=/home/haozhihan/Documents/abacus-develop/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_8) "Building CXX object source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor_shape.cpp.o" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base/module_container && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor_shape.cpp.o -MF CMakeFiles/container.dir/ATen/core/tensor_shape.cpp.o.d -o CMakeFiles/container.dir/ATen/core/tensor_shape.cpp.o -c /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor_shape.cpp + +source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor_shape.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Preprocessing CXX source to CMakeFiles/container.dir/ATen/core/tensor_shape.cpp.i" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base/module_container && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor_shape.cpp > CMakeFiles/container.dir/ATen/core/tensor_shape.cpp.i + +source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor_shape.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Compiling CXX source to assembly CMakeFiles/container.dir/ATen/core/tensor_shape.cpp.s" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base/module_container && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor_shape.cpp -o CMakeFiles/container.dir/ATen/core/tensor_shape.cpp.s + +source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor_types.cpp.o: source/source_base/module_container/CMakeFiles/container.dir/flags.make +source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor_types.cpp.o: /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor_types.cpp +source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor_types.cpp.o: source/source_base/module_container/CMakeFiles/container.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green --progress-dir=/home/haozhihan/Documents/abacus-develop/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_9) "Building CXX object source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor_types.cpp.o" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base/module_container && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor_types.cpp.o -MF CMakeFiles/container.dir/ATen/core/tensor_types.cpp.o.d -o CMakeFiles/container.dir/ATen/core/tensor_types.cpp.o -c /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor_types.cpp + +source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor_types.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Preprocessing CXX source to CMakeFiles/container.dir/ATen/core/tensor_types.cpp.i" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base/module_container && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor_types.cpp > CMakeFiles/container.dir/ATen/core/tensor_types.cpp.i + +source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor_types.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Compiling CXX source to assembly CMakeFiles/container.dir/ATen/core/tensor_types.cpp.s" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base/module_container && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/core/tensor_types.cpp -o CMakeFiles/container.dir/ATen/core/tensor_types.cpp.s + +source/source_base/module_container/CMakeFiles/container.dir/ATen/kernels/blas.cpp.o: source/source_base/module_container/CMakeFiles/container.dir/flags.make +source/source_base/module_container/CMakeFiles/container.dir/ATen/kernels/blas.cpp.o: /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/kernels/blas.cpp +source/source_base/module_container/CMakeFiles/container.dir/ATen/kernels/blas.cpp.o: source/source_base/module_container/CMakeFiles/container.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green --progress-dir=/home/haozhihan/Documents/abacus-develop/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_10) "Building CXX object source/source_base/module_container/CMakeFiles/container.dir/ATen/kernels/blas.cpp.o" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base/module_container && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT source/source_base/module_container/CMakeFiles/container.dir/ATen/kernels/blas.cpp.o -MF CMakeFiles/container.dir/ATen/kernels/blas.cpp.o.d -o CMakeFiles/container.dir/ATen/kernels/blas.cpp.o -c /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/kernels/blas.cpp + +source/source_base/module_container/CMakeFiles/container.dir/ATen/kernels/blas.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Preprocessing CXX source to CMakeFiles/container.dir/ATen/kernels/blas.cpp.i" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base/module_container && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/kernels/blas.cpp > CMakeFiles/container.dir/ATen/kernels/blas.cpp.i + +source/source_base/module_container/CMakeFiles/container.dir/ATen/kernels/blas.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Compiling CXX source to assembly CMakeFiles/container.dir/ATen/kernels/blas.cpp.s" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base/module_container && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/kernels/blas.cpp -o CMakeFiles/container.dir/ATen/kernels/blas.cpp.s + +source/source_base/module_container/CMakeFiles/container.dir/ATen/kernels/lapack.cpp.o: source/source_base/module_container/CMakeFiles/container.dir/flags.make +source/source_base/module_container/CMakeFiles/container.dir/ATen/kernels/lapack.cpp.o: /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/kernels/lapack.cpp +source/source_base/module_container/CMakeFiles/container.dir/ATen/kernels/lapack.cpp.o: source/source_base/module_container/CMakeFiles/container.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green --progress-dir=/home/haozhihan/Documents/abacus-develop/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_11) "Building CXX object source/source_base/module_container/CMakeFiles/container.dir/ATen/kernels/lapack.cpp.o" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base/module_container && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT source/source_base/module_container/CMakeFiles/container.dir/ATen/kernels/lapack.cpp.o -MF CMakeFiles/container.dir/ATen/kernels/lapack.cpp.o.d -o CMakeFiles/container.dir/ATen/kernels/lapack.cpp.o -c /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/kernels/lapack.cpp + +source/source_base/module_container/CMakeFiles/container.dir/ATen/kernels/lapack.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Preprocessing CXX source to CMakeFiles/container.dir/ATen/kernels/lapack.cpp.i" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base/module_container && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/kernels/lapack.cpp > CMakeFiles/container.dir/ATen/kernels/lapack.cpp.i + +source/source_base/module_container/CMakeFiles/container.dir/ATen/kernels/lapack.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Compiling CXX source to assembly CMakeFiles/container.dir/ATen/kernels/lapack.cpp.s" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base/module_container && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/kernels/lapack.cpp -o CMakeFiles/container.dir/ATen/kernels/lapack.cpp.s + +source/source_base/module_container/CMakeFiles/container.dir/ATen/kernels/linalg.cpp.o: source/source_base/module_container/CMakeFiles/container.dir/flags.make +source/source_base/module_container/CMakeFiles/container.dir/ATen/kernels/linalg.cpp.o: /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/kernels/linalg.cpp +source/source_base/module_container/CMakeFiles/container.dir/ATen/kernels/linalg.cpp.o: source/source_base/module_container/CMakeFiles/container.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green --progress-dir=/home/haozhihan/Documents/abacus-develop/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_12) "Building CXX object source/source_base/module_container/CMakeFiles/container.dir/ATen/kernels/linalg.cpp.o" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base/module_container && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT source/source_base/module_container/CMakeFiles/container.dir/ATen/kernels/linalg.cpp.o -MF CMakeFiles/container.dir/ATen/kernels/linalg.cpp.o.d -o CMakeFiles/container.dir/ATen/kernels/linalg.cpp.o -c /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/kernels/linalg.cpp + +source/source_base/module_container/CMakeFiles/container.dir/ATen/kernels/linalg.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Preprocessing CXX source to CMakeFiles/container.dir/ATen/kernels/linalg.cpp.i" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base/module_container && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/kernels/linalg.cpp > CMakeFiles/container.dir/ATen/kernels/linalg.cpp.i + +source/source_base/module_container/CMakeFiles/container.dir/ATen/kernels/linalg.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Compiling CXX source to assembly CMakeFiles/container.dir/ATen/kernels/linalg.cpp.s" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base/module_container && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/kernels/linalg.cpp -o CMakeFiles/container.dir/ATen/kernels/linalg.cpp.s + +source/source_base/module_container/CMakeFiles/container.dir/ATen/kernels/memory_impl.cpp.o: source/source_base/module_container/CMakeFiles/container.dir/flags.make +source/source_base/module_container/CMakeFiles/container.dir/ATen/kernels/memory_impl.cpp.o: /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/kernels/memory_impl.cpp +source/source_base/module_container/CMakeFiles/container.dir/ATen/kernels/memory_impl.cpp.o: source/source_base/module_container/CMakeFiles/container.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green --progress-dir=/home/haozhihan/Documents/abacus-develop/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_13) "Building CXX object source/source_base/module_container/CMakeFiles/container.dir/ATen/kernels/memory_impl.cpp.o" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base/module_container && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT source/source_base/module_container/CMakeFiles/container.dir/ATen/kernels/memory_impl.cpp.o -MF CMakeFiles/container.dir/ATen/kernels/memory_impl.cpp.o.d -o CMakeFiles/container.dir/ATen/kernels/memory_impl.cpp.o -c /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/kernels/memory_impl.cpp + +source/source_base/module_container/CMakeFiles/container.dir/ATen/kernels/memory_impl.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Preprocessing CXX source to CMakeFiles/container.dir/ATen/kernels/memory_impl.cpp.i" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base/module_container && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/kernels/memory_impl.cpp > CMakeFiles/container.dir/ATen/kernels/memory_impl.cpp.i + +source/source_base/module_container/CMakeFiles/container.dir/ATen/kernels/memory_impl.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Compiling CXX source to assembly CMakeFiles/container.dir/ATen/kernels/memory_impl.cpp.s" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base/module_container && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/ATen/kernels/memory_impl.cpp -o CMakeFiles/container.dir/ATen/kernels/memory_impl.cpp.s + +# Object files for target container +container_OBJECTS = \ +"CMakeFiles/container.dir/base/core/refcount.cpp.o" \ +"CMakeFiles/container.dir/base/core/cpu_allocator.cpp.o" \ +"CMakeFiles/container.dir/ATen/ops/einsum_op.cpp.o" \ +"CMakeFiles/container.dir/ATen/ops/linalg_op.cpp.o" \ +"CMakeFiles/container.dir/ATen/core/tensor.cpp.o" \ +"CMakeFiles/container.dir/ATen/core/tensor_buffer.cpp.o" \ +"CMakeFiles/container.dir/ATen/core/tensor_map.cpp.o" \ +"CMakeFiles/container.dir/ATen/core/tensor_shape.cpp.o" \ +"CMakeFiles/container.dir/ATen/core/tensor_types.cpp.o" \ +"CMakeFiles/container.dir/ATen/kernels/blas.cpp.o" \ +"CMakeFiles/container.dir/ATen/kernels/lapack.cpp.o" \ +"CMakeFiles/container.dir/ATen/kernels/linalg.cpp.o" \ +"CMakeFiles/container.dir/ATen/kernels/memory_impl.cpp.o" + +# External object files for target container +container_EXTERNAL_OBJECTS = + +source/source_base/module_container/libcontainer.a: source/source_base/module_container/CMakeFiles/container.dir/base/core/refcount.cpp.o +source/source_base/module_container/libcontainer.a: source/source_base/module_container/CMakeFiles/container.dir/base/core/cpu_allocator.cpp.o +source/source_base/module_container/libcontainer.a: source/source_base/module_container/CMakeFiles/container.dir/ATen/ops/einsum_op.cpp.o +source/source_base/module_container/libcontainer.a: source/source_base/module_container/CMakeFiles/container.dir/ATen/ops/linalg_op.cpp.o +source/source_base/module_container/libcontainer.a: source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor.cpp.o +source/source_base/module_container/libcontainer.a: source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor_buffer.cpp.o +source/source_base/module_container/libcontainer.a: source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor_map.cpp.o +source/source_base/module_container/libcontainer.a: source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor_shape.cpp.o +source/source_base/module_container/libcontainer.a: source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor_types.cpp.o +source/source_base/module_container/libcontainer.a: source/source_base/module_container/CMakeFiles/container.dir/ATen/kernels/blas.cpp.o +source/source_base/module_container/libcontainer.a: source/source_base/module_container/CMakeFiles/container.dir/ATen/kernels/lapack.cpp.o +source/source_base/module_container/libcontainer.a: source/source_base/module_container/CMakeFiles/container.dir/ATen/kernels/linalg.cpp.o +source/source_base/module_container/libcontainer.a: source/source_base/module_container/CMakeFiles/container.dir/ATen/kernels/memory_impl.cpp.o +source/source_base/module_container/libcontainer.a: source/source_base/module_container/CMakeFiles/container.dir/build.make +source/source_base/module_container/libcontainer.a: source/source_base/module_container/CMakeFiles/container.dir/link.txt + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green --bold --progress-dir=/home/haozhihan/Documents/abacus-develop/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_14) "Linking CXX static library libcontainer.a" + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base/module_container && $(CMAKE_COMMAND) -P CMakeFiles/container.dir/cmake_clean_target.cmake + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base/module_container && $(CMAKE_COMMAND) -E cmake_link_script CMakeFiles/container.dir/link.txt --verbose=$(VERBOSE) + +# Rule to build all files generated by this target. +source/source_base/module_container/CMakeFiles/container.dir/build: source/source_base/module_container/libcontainer.a +.PHONY : source/source_base/module_container/CMakeFiles/container.dir/build + +source/source_base/module_container/CMakeFiles/container.dir/clean: + cd /home/haozhihan/Documents/abacus-develop/build/source/source_base/module_container && $(CMAKE_COMMAND) -P CMakeFiles/container.dir/cmake_clean.cmake +.PHONY : source/source_base/module_container/CMakeFiles/container.dir/clean + +source/source_base/module_container/CMakeFiles/container.dir/depend: + cd /home/haozhihan/Documents/abacus-develop/build && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/haozhihan/Documents/abacus-develop /home/haozhihan/Documents/abacus-develop/source/source_base/module_container /home/haozhihan/Documents/abacus-develop/build /home/haozhihan/Documents/abacus-develop/build/source/source_base/module_container /home/haozhihan/Documents/abacus-develop/build/source/source_base/module_container/CMakeFiles/container.dir/DependInfo.cmake "--color=$(COLOR)" +.PHONY : source/source_base/module_container/CMakeFiles/container.dir/depend + diff --git a/build/source/source_base/module_container/CMakeFiles/container.dir/cmake_clean.cmake b/build/source/source_base/module_container/CMakeFiles/container.dir/cmake_clean.cmake new file mode 100644 index 0000000000..8178bd4608 --- /dev/null +++ b/build/source/source_base/module_container/CMakeFiles/container.dir/cmake_clean.cmake @@ -0,0 +1,35 @@ +file(REMOVE_RECURSE + "CMakeFiles/container.dir/ATen/core/tensor.cpp.o" + "CMakeFiles/container.dir/ATen/core/tensor.cpp.o.d" + "CMakeFiles/container.dir/ATen/core/tensor_buffer.cpp.o" + "CMakeFiles/container.dir/ATen/core/tensor_buffer.cpp.o.d" + "CMakeFiles/container.dir/ATen/core/tensor_map.cpp.o" + "CMakeFiles/container.dir/ATen/core/tensor_map.cpp.o.d" + "CMakeFiles/container.dir/ATen/core/tensor_shape.cpp.o" + "CMakeFiles/container.dir/ATen/core/tensor_shape.cpp.o.d" + "CMakeFiles/container.dir/ATen/core/tensor_types.cpp.o" + "CMakeFiles/container.dir/ATen/core/tensor_types.cpp.o.d" + "CMakeFiles/container.dir/ATen/kernels/blas.cpp.o" + "CMakeFiles/container.dir/ATen/kernels/blas.cpp.o.d" + "CMakeFiles/container.dir/ATen/kernels/lapack.cpp.o" + "CMakeFiles/container.dir/ATen/kernels/lapack.cpp.o.d" + "CMakeFiles/container.dir/ATen/kernels/linalg.cpp.o" + "CMakeFiles/container.dir/ATen/kernels/linalg.cpp.o.d" + "CMakeFiles/container.dir/ATen/kernels/memory_impl.cpp.o" + "CMakeFiles/container.dir/ATen/kernels/memory_impl.cpp.o.d" + "CMakeFiles/container.dir/ATen/ops/einsum_op.cpp.o" + "CMakeFiles/container.dir/ATen/ops/einsum_op.cpp.o.d" + "CMakeFiles/container.dir/ATen/ops/linalg_op.cpp.o" + "CMakeFiles/container.dir/ATen/ops/linalg_op.cpp.o.d" + "CMakeFiles/container.dir/base/core/cpu_allocator.cpp.o" + "CMakeFiles/container.dir/base/core/cpu_allocator.cpp.o.d" + "CMakeFiles/container.dir/base/core/refcount.cpp.o" + "CMakeFiles/container.dir/base/core/refcount.cpp.o.d" + "libcontainer.a" + "libcontainer.pdb" +) + +# Per-language clean rules from dependency scanning. +foreach(lang CXX) + include(CMakeFiles/container.dir/cmake_clean_${lang}.cmake OPTIONAL) +endforeach() diff --git a/build/source/source_base/module_container/CMakeFiles/container.dir/cmake_clean_target.cmake b/build/source/source_base/module_container/CMakeFiles/container.dir/cmake_clean_target.cmake new file mode 100644 index 0000000000..9e788b27b8 --- /dev/null +++ b/build/source/source_base/module_container/CMakeFiles/container.dir/cmake_clean_target.cmake @@ -0,0 +1,3 @@ +file(REMOVE_RECURSE + "libcontainer.a" +) diff --git a/build/source/source_base/module_container/CMakeFiles/container.dir/compiler_depend.make b/build/source/source_base/module_container/CMakeFiles/container.dir/compiler_depend.make new file mode 100644 index 0000000000..cf03df2755 --- /dev/null +++ b/build/source/source_base/module_container/CMakeFiles/container.dir/compiler_depend.make @@ -0,0 +1,2 @@ +# Empty compiler generated dependencies file for container. +# This may be replaced when dependencies are built. diff --git a/build/source/source_base/module_container/CMakeFiles/container.dir/compiler_depend.ts b/build/source/source_base/module_container/CMakeFiles/container.dir/compiler_depend.ts new file mode 100644 index 0000000000..89e8b21380 --- /dev/null +++ b/build/source/source_base/module_container/CMakeFiles/container.dir/compiler_depend.ts @@ -0,0 +1,2 @@ +# CMAKE generated file: DO NOT EDIT! +# Timestamp file for compiler generated dependencies management for container. diff --git a/build/source/source_base/module_container/CMakeFiles/container.dir/depend.make b/build/source/source_base/module_container/CMakeFiles/container.dir/depend.make new file mode 100644 index 0000000000..07f68992ad --- /dev/null +++ b/build/source/source_base/module_container/CMakeFiles/container.dir/depend.make @@ -0,0 +1,2 @@ +# Empty dependencies file for container. +# This may be replaced when dependencies are built. diff --git a/build/source/source_base/module_container/CMakeFiles/container.dir/flags.make b/build/source/source_base/module_container/CMakeFiles/container.dir/flags.make new file mode 100644 index 0000000000..3cf9bd6b6d --- /dev/null +++ b/build/source/source_base/module_container/CMakeFiles/container.dir/flags.make @@ -0,0 +1,10 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.27 + +# compile CXX with /usr/bin/c++ +CXX_DEFINES = -DCOMMIT_INFO -DMETIS -DUSE_CEREAL_SERIALIZATION -DUSE_NEW_TWO_CENTER -D__ELPA -D__FFTW3 -D__LCAO -D__MPI -D__SELINV + +CXX_INCLUDES = -I/home/haozhihan/Documents/abacus-develop/build -I/home/haozhihan/Documents/abacus-develop/source -I/home/haozhihan/Documents/abacus-develop/source/source_base/module_container -I/usr/lib/x86_64-linux-gnu/openmpi/include -I/usr/lib/x86_64-linux-gnu/openmpi/include/openmpi + +CXX_FLAGS = -fopenmp -std=gnu++11 -O3 -g + diff --git a/build/source/source_base/module_container/CMakeFiles/container.dir/link.txt b/build/source/source_base/module_container/CMakeFiles/container.dir/link.txt new file mode 100644 index 0000000000..786f532ec2 --- /dev/null +++ b/build/source/source_base/module_container/CMakeFiles/container.dir/link.txt @@ -0,0 +1,2 @@ +/usr/bin/ar qc libcontainer.a CMakeFiles/container.dir/base/core/refcount.cpp.o CMakeFiles/container.dir/base/core/cpu_allocator.cpp.o CMakeFiles/container.dir/ATen/ops/einsum_op.cpp.o CMakeFiles/container.dir/ATen/ops/linalg_op.cpp.o CMakeFiles/container.dir/ATen/core/tensor.cpp.o CMakeFiles/container.dir/ATen/core/tensor_buffer.cpp.o CMakeFiles/container.dir/ATen/core/tensor_map.cpp.o CMakeFiles/container.dir/ATen/core/tensor_shape.cpp.o CMakeFiles/container.dir/ATen/core/tensor_types.cpp.o CMakeFiles/container.dir/ATen/kernels/blas.cpp.o CMakeFiles/container.dir/ATen/kernels/lapack.cpp.o CMakeFiles/container.dir/ATen/kernels/linalg.cpp.o CMakeFiles/container.dir/ATen/kernels/memory_impl.cpp.o +/usr/bin/ranlib libcontainer.a diff --git a/build/source/source_base/module_container/CMakeFiles/container.dir/progress.make b/build/source/source_base/module_container/CMakeFiles/container.dir/progress.make new file mode 100644 index 0000000000..c80bc84379 --- /dev/null +++ b/build/source/source_base/module_container/CMakeFiles/container.dir/progress.make @@ -0,0 +1,15 @@ +CMAKE_PROGRESS_1 = +CMAKE_PROGRESS_2 = +CMAKE_PROGRESS_3 = +CMAKE_PROGRESS_4 = +CMAKE_PROGRESS_5 = 14 +CMAKE_PROGRESS_6 = +CMAKE_PROGRESS_7 = +CMAKE_PROGRESS_8 = +CMAKE_PROGRESS_9 = +CMAKE_PROGRESS_10 = +CMAKE_PROGRESS_11 = 15 +CMAKE_PROGRESS_12 = +CMAKE_PROGRESS_13 = +CMAKE_PROGRESS_14 = + diff --git a/build/source/source_base/module_container/CMakeFiles/progress.marks b/build/source/source_base/module_container/CMakeFiles/progress.marks new file mode 100644 index 0000000000..0cfbf08886 --- /dev/null +++ b/build/source/source_base/module_container/CMakeFiles/progress.marks @@ -0,0 +1 @@ +2 diff --git a/build/source/source_base/module_container/Makefile b/build/source/source_base/module_container/Makefile new file mode 100644 index 0000000000..3d889706de --- /dev/null +++ b/build/source/source_base/module_container/Makefile @@ -0,0 +1,555 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.27 + +# Default target executed when no arguments are given to make. +default_target: all +.PHONY : default_target + +# Allow only one "make -f Makefile2" at a time, but pass parallelism. +.NOTPARALLEL: + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Disable VCS-based implicit rules. +% : %,v + +# Disable VCS-based implicit rules. +% : RCS/% + +# Disable VCS-based implicit rules. +% : RCS/%,v + +# Disable VCS-based implicit rules. +% : SCCS/s.% + +# Disable VCS-based implicit rules. +% : s.% + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Command-line flag to silence nested $(MAKE). +$(VERBOSE)MAKESILENT = -s + +#Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E rm -f + +# Escaping for special characters. +EQUALS = = + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/haozhihan/Documents/abacus-develop + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/haozhihan/Documents/abacus-develop/build + +#============================================================================= +# Targets provided globally by CMake. + +# Special rule for the target edit_cache +edit_cache: + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "No interactive CMake dialog available..." + /usr/bin/cmake -E echo No\ interactive\ CMake\ dialog\ available. +.PHONY : edit_cache + +# Special rule for the target edit_cache +edit_cache/fast: edit_cache +.PHONY : edit_cache/fast + +# Special rule for the target rebuild_cache +rebuild_cache: + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Running CMake to regenerate build system..." + /usr/bin/cmake --regenerate-during-build -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) +.PHONY : rebuild_cache + +# Special rule for the target rebuild_cache +rebuild_cache/fast: rebuild_cache +.PHONY : rebuild_cache/fast + +# Special rule for the target list_install_components +list_install_components: + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Available install components are: \"Unspecified\"" +.PHONY : list_install_components + +# Special rule for the target list_install_components +list_install_components/fast: list_install_components +.PHONY : list_install_components/fast + +# Special rule for the target install +install: preinstall + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Install the project..." + /usr/bin/cmake -P cmake_install.cmake +.PHONY : install + +# Special rule for the target install +install/fast: preinstall/fast + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Install the project..." + /usr/bin/cmake -P cmake_install.cmake +.PHONY : install/fast + +# Special rule for the target install/local +install/local: preinstall + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing only the local directory..." + /usr/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake +.PHONY : install/local + +# Special rule for the target install/local +install/local/fast: preinstall/fast + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing only the local directory..." + /usr/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake +.PHONY : install/local/fast + +# Special rule for the target install/strip +install/strip: preinstall + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing the project stripped..." + /usr/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake +.PHONY : install/strip + +# Special rule for the target install/strip +install/strip/fast: preinstall/fast + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing the project stripped..." + /usr/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake +.PHONY : install/strip/fast + +# The main all target +all: cmake_check_build_system + cd /home/haozhihan/Documents/abacus-develop/build && $(CMAKE_COMMAND) -E cmake_progress_start /home/haozhihan/Documents/abacus-develop/build/CMakeFiles /home/haozhihan/Documents/abacus-develop/build/source/source_base/module_container//CMakeFiles/progress.marks + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 source/source_base/module_container/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/haozhihan/Documents/abacus-develop/build/CMakeFiles 0 +.PHONY : all + +# The main clean target +clean: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 source/source_base/module_container/clean +.PHONY : clean + +# The main clean target +clean/fast: clean +.PHONY : clean/fast + +# Prepare targets for installation. +preinstall: all + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 source/source_base/module_container/preinstall +.PHONY : preinstall + +# Prepare targets for installation. +preinstall/fast: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 source/source_base/module_container/preinstall +.PHONY : preinstall/fast + +# clear depends +depend: + cd /home/haozhihan/Documents/abacus-develop/build && $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 +.PHONY : depend + +# Convenience name for target. +source/source_base/module_container/CMakeFiles/container.dir/rule: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 source/source_base/module_container/CMakeFiles/container.dir/rule +.PHONY : source/source_base/module_container/CMakeFiles/container.dir/rule + +# Convenience name for target. +container: source/source_base/module_container/CMakeFiles/container.dir/rule +.PHONY : container + +# fast build rule for target. +container/fast: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/module_container/CMakeFiles/container.dir/build.make source/source_base/module_container/CMakeFiles/container.dir/build +.PHONY : container/fast + +ATen/core/tensor.o: ATen/core/tensor.cpp.o +.PHONY : ATen/core/tensor.o + +# target to build an object file +ATen/core/tensor.cpp.o: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/module_container/CMakeFiles/container.dir/build.make source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor.cpp.o +.PHONY : ATen/core/tensor.cpp.o + +ATen/core/tensor.i: ATen/core/tensor.cpp.i +.PHONY : ATen/core/tensor.i + +# target to preprocess a source file +ATen/core/tensor.cpp.i: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/module_container/CMakeFiles/container.dir/build.make source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor.cpp.i +.PHONY : ATen/core/tensor.cpp.i + +ATen/core/tensor.s: ATen/core/tensor.cpp.s +.PHONY : ATen/core/tensor.s + +# target to generate assembly for a file +ATen/core/tensor.cpp.s: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/module_container/CMakeFiles/container.dir/build.make source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor.cpp.s +.PHONY : ATen/core/tensor.cpp.s + +ATen/core/tensor_buffer.o: ATen/core/tensor_buffer.cpp.o +.PHONY : ATen/core/tensor_buffer.o + +# target to build an object file +ATen/core/tensor_buffer.cpp.o: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/module_container/CMakeFiles/container.dir/build.make source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor_buffer.cpp.o +.PHONY : ATen/core/tensor_buffer.cpp.o + +ATen/core/tensor_buffer.i: ATen/core/tensor_buffer.cpp.i +.PHONY : ATen/core/tensor_buffer.i + +# target to preprocess a source file +ATen/core/tensor_buffer.cpp.i: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/module_container/CMakeFiles/container.dir/build.make source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor_buffer.cpp.i +.PHONY : ATen/core/tensor_buffer.cpp.i + +ATen/core/tensor_buffer.s: ATen/core/tensor_buffer.cpp.s +.PHONY : ATen/core/tensor_buffer.s + +# target to generate assembly for a file +ATen/core/tensor_buffer.cpp.s: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/module_container/CMakeFiles/container.dir/build.make source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor_buffer.cpp.s +.PHONY : ATen/core/tensor_buffer.cpp.s + +ATen/core/tensor_map.o: ATen/core/tensor_map.cpp.o +.PHONY : ATen/core/tensor_map.o + +# target to build an object file +ATen/core/tensor_map.cpp.o: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/module_container/CMakeFiles/container.dir/build.make source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor_map.cpp.o +.PHONY : ATen/core/tensor_map.cpp.o + +ATen/core/tensor_map.i: ATen/core/tensor_map.cpp.i +.PHONY : ATen/core/tensor_map.i + +# target to preprocess a source file +ATen/core/tensor_map.cpp.i: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/module_container/CMakeFiles/container.dir/build.make source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor_map.cpp.i +.PHONY : ATen/core/tensor_map.cpp.i + +ATen/core/tensor_map.s: ATen/core/tensor_map.cpp.s +.PHONY : ATen/core/tensor_map.s + +# target to generate assembly for a file +ATen/core/tensor_map.cpp.s: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/module_container/CMakeFiles/container.dir/build.make source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor_map.cpp.s +.PHONY : ATen/core/tensor_map.cpp.s + +ATen/core/tensor_shape.o: ATen/core/tensor_shape.cpp.o +.PHONY : ATen/core/tensor_shape.o + +# target to build an object file +ATen/core/tensor_shape.cpp.o: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/module_container/CMakeFiles/container.dir/build.make source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor_shape.cpp.o +.PHONY : ATen/core/tensor_shape.cpp.o + +ATen/core/tensor_shape.i: ATen/core/tensor_shape.cpp.i +.PHONY : ATen/core/tensor_shape.i + +# target to preprocess a source file +ATen/core/tensor_shape.cpp.i: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/module_container/CMakeFiles/container.dir/build.make source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor_shape.cpp.i +.PHONY : ATen/core/tensor_shape.cpp.i + +ATen/core/tensor_shape.s: ATen/core/tensor_shape.cpp.s +.PHONY : ATen/core/tensor_shape.s + +# target to generate assembly for a file +ATen/core/tensor_shape.cpp.s: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/module_container/CMakeFiles/container.dir/build.make source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor_shape.cpp.s +.PHONY : ATen/core/tensor_shape.cpp.s + +ATen/core/tensor_types.o: ATen/core/tensor_types.cpp.o +.PHONY : ATen/core/tensor_types.o + +# target to build an object file +ATen/core/tensor_types.cpp.o: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/module_container/CMakeFiles/container.dir/build.make source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor_types.cpp.o +.PHONY : ATen/core/tensor_types.cpp.o + +ATen/core/tensor_types.i: ATen/core/tensor_types.cpp.i +.PHONY : ATen/core/tensor_types.i + +# target to preprocess a source file +ATen/core/tensor_types.cpp.i: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/module_container/CMakeFiles/container.dir/build.make source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor_types.cpp.i +.PHONY : ATen/core/tensor_types.cpp.i + +ATen/core/tensor_types.s: ATen/core/tensor_types.cpp.s +.PHONY : ATen/core/tensor_types.s + +# target to generate assembly for a file +ATen/core/tensor_types.cpp.s: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/module_container/CMakeFiles/container.dir/build.make source/source_base/module_container/CMakeFiles/container.dir/ATen/core/tensor_types.cpp.s +.PHONY : ATen/core/tensor_types.cpp.s + +ATen/kernels/blas.o: ATen/kernels/blas.cpp.o +.PHONY : ATen/kernels/blas.o + +# target to build an object file +ATen/kernels/blas.cpp.o: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/module_container/CMakeFiles/container.dir/build.make source/source_base/module_container/CMakeFiles/container.dir/ATen/kernels/blas.cpp.o +.PHONY : ATen/kernels/blas.cpp.o + +ATen/kernels/blas.i: ATen/kernels/blas.cpp.i +.PHONY : ATen/kernels/blas.i + +# target to preprocess a source file +ATen/kernels/blas.cpp.i: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/module_container/CMakeFiles/container.dir/build.make source/source_base/module_container/CMakeFiles/container.dir/ATen/kernels/blas.cpp.i +.PHONY : ATen/kernels/blas.cpp.i + +ATen/kernels/blas.s: ATen/kernels/blas.cpp.s +.PHONY : ATen/kernels/blas.s + +# target to generate assembly for a file +ATen/kernels/blas.cpp.s: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/module_container/CMakeFiles/container.dir/build.make source/source_base/module_container/CMakeFiles/container.dir/ATen/kernels/blas.cpp.s +.PHONY : ATen/kernels/blas.cpp.s + +ATen/kernels/lapack.o: ATen/kernels/lapack.cpp.o +.PHONY : ATen/kernels/lapack.o + +# target to build an object file +ATen/kernels/lapack.cpp.o: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/module_container/CMakeFiles/container.dir/build.make source/source_base/module_container/CMakeFiles/container.dir/ATen/kernels/lapack.cpp.o +.PHONY : ATen/kernels/lapack.cpp.o + +ATen/kernels/lapack.i: ATen/kernels/lapack.cpp.i +.PHONY : ATen/kernels/lapack.i + +# target to preprocess a source file +ATen/kernels/lapack.cpp.i: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/module_container/CMakeFiles/container.dir/build.make source/source_base/module_container/CMakeFiles/container.dir/ATen/kernels/lapack.cpp.i +.PHONY : ATen/kernels/lapack.cpp.i + +ATen/kernels/lapack.s: ATen/kernels/lapack.cpp.s +.PHONY : ATen/kernels/lapack.s + +# target to generate assembly for a file +ATen/kernels/lapack.cpp.s: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/module_container/CMakeFiles/container.dir/build.make source/source_base/module_container/CMakeFiles/container.dir/ATen/kernels/lapack.cpp.s +.PHONY : ATen/kernels/lapack.cpp.s + +ATen/kernels/linalg.o: ATen/kernels/linalg.cpp.o +.PHONY : ATen/kernels/linalg.o + +# target to build an object file +ATen/kernels/linalg.cpp.o: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/module_container/CMakeFiles/container.dir/build.make source/source_base/module_container/CMakeFiles/container.dir/ATen/kernels/linalg.cpp.o +.PHONY : ATen/kernels/linalg.cpp.o + +ATen/kernels/linalg.i: ATen/kernels/linalg.cpp.i +.PHONY : ATen/kernels/linalg.i + +# target to preprocess a source file +ATen/kernels/linalg.cpp.i: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/module_container/CMakeFiles/container.dir/build.make source/source_base/module_container/CMakeFiles/container.dir/ATen/kernels/linalg.cpp.i +.PHONY : ATen/kernels/linalg.cpp.i + +ATen/kernels/linalg.s: ATen/kernels/linalg.cpp.s +.PHONY : ATen/kernels/linalg.s + +# target to generate assembly for a file +ATen/kernels/linalg.cpp.s: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/module_container/CMakeFiles/container.dir/build.make source/source_base/module_container/CMakeFiles/container.dir/ATen/kernels/linalg.cpp.s +.PHONY : ATen/kernels/linalg.cpp.s + +ATen/kernels/memory_impl.o: ATen/kernels/memory_impl.cpp.o +.PHONY : ATen/kernels/memory_impl.o + +# target to build an object file +ATen/kernels/memory_impl.cpp.o: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/module_container/CMakeFiles/container.dir/build.make source/source_base/module_container/CMakeFiles/container.dir/ATen/kernels/memory_impl.cpp.o +.PHONY : ATen/kernels/memory_impl.cpp.o + +ATen/kernels/memory_impl.i: ATen/kernels/memory_impl.cpp.i +.PHONY : ATen/kernels/memory_impl.i + +# target to preprocess a source file +ATen/kernels/memory_impl.cpp.i: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/module_container/CMakeFiles/container.dir/build.make source/source_base/module_container/CMakeFiles/container.dir/ATen/kernels/memory_impl.cpp.i +.PHONY : ATen/kernels/memory_impl.cpp.i + +ATen/kernels/memory_impl.s: ATen/kernels/memory_impl.cpp.s +.PHONY : ATen/kernels/memory_impl.s + +# target to generate assembly for a file +ATen/kernels/memory_impl.cpp.s: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/module_container/CMakeFiles/container.dir/build.make source/source_base/module_container/CMakeFiles/container.dir/ATen/kernels/memory_impl.cpp.s +.PHONY : ATen/kernels/memory_impl.cpp.s + +ATen/ops/einsum_op.o: ATen/ops/einsum_op.cpp.o +.PHONY : ATen/ops/einsum_op.o + +# target to build an object file +ATen/ops/einsum_op.cpp.o: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/module_container/CMakeFiles/container.dir/build.make source/source_base/module_container/CMakeFiles/container.dir/ATen/ops/einsum_op.cpp.o +.PHONY : ATen/ops/einsum_op.cpp.o + +ATen/ops/einsum_op.i: ATen/ops/einsum_op.cpp.i +.PHONY : ATen/ops/einsum_op.i + +# target to preprocess a source file +ATen/ops/einsum_op.cpp.i: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/module_container/CMakeFiles/container.dir/build.make source/source_base/module_container/CMakeFiles/container.dir/ATen/ops/einsum_op.cpp.i +.PHONY : ATen/ops/einsum_op.cpp.i + +ATen/ops/einsum_op.s: ATen/ops/einsum_op.cpp.s +.PHONY : ATen/ops/einsum_op.s + +# target to generate assembly for a file +ATen/ops/einsum_op.cpp.s: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/module_container/CMakeFiles/container.dir/build.make source/source_base/module_container/CMakeFiles/container.dir/ATen/ops/einsum_op.cpp.s +.PHONY : ATen/ops/einsum_op.cpp.s + +ATen/ops/linalg_op.o: ATen/ops/linalg_op.cpp.o +.PHONY : ATen/ops/linalg_op.o + +# target to build an object file +ATen/ops/linalg_op.cpp.o: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/module_container/CMakeFiles/container.dir/build.make source/source_base/module_container/CMakeFiles/container.dir/ATen/ops/linalg_op.cpp.o +.PHONY : ATen/ops/linalg_op.cpp.o + +ATen/ops/linalg_op.i: ATen/ops/linalg_op.cpp.i +.PHONY : ATen/ops/linalg_op.i + +# target to preprocess a source file +ATen/ops/linalg_op.cpp.i: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/module_container/CMakeFiles/container.dir/build.make source/source_base/module_container/CMakeFiles/container.dir/ATen/ops/linalg_op.cpp.i +.PHONY : ATen/ops/linalg_op.cpp.i + +ATen/ops/linalg_op.s: ATen/ops/linalg_op.cpp.s +.PHONY : ATen/ops/linalg_op.s + +# target to generate assembly for a file +ATen/ops/linalg_op.cpp.s: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/module_container/CMakeFiles/container.dir/build.make source/source_base/module_container/CMakeFiles/container.dir/ATen/ops/linalg_op.cpp.s +.PHONY : ATen/ops/linalg_op.cpp.s + +base/core/cpu_allocator.o: base/core/cpu_allocator.cpp.o +.PHONY : base/core/cpu_allocator.o + +# target to build an object file +base/core/cpu_allocator.cpp.o: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/module_container/CMakeFiles/container.dir/build.make source/source_base/module_container/CMakeFiles/container.dir/base/core/cpu_allocator.cpp.o +.PHONY : base/core/cpu_allocator.cpp.o + +base/core/cpu_allocator.i: base/core/cpu_allocator.cpp.i +.PHONY : base/core/cpu_allocator.i + +# target to preprocess a source file +base/core/cpu_allocator.cpp.i: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/module_container/CMakeFiles/container.dir/build.make source/source_base/module_container/CMakeFiles/container.dir/base/core/cpu_allocator.cpp.i +.PHONY : base/core/cpu_allocator.cpp.i + +base/core/cpu_allocator.s: base/core/cpu_allocator.cpp.s +.PHONY : base/core/cpu_allocator.s + +# target to generate assembly for a file +base/core/cpu_allocator.cpp.s: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/module_container/CMakeFiles/container.dir/build.make source/source_base/module_container/CMakeFiles/container.dir/base/core/cpu_allocator.cpp.s +.PHONY : base/core/cpu_allocator.cpp.s + +base/core/refcount.o: base/core/refcount.cpp.o +.PHONY : base/core/refcount.o + +# target to build an object file +base/core/refcount.cpp.o: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/module_container/CMakeFiles/container.dir/build.make source/source_base/module_container/CMakeFiles/container.dir/base/core/refcount.cpp.o +.PHONY : base/core/refcount.cpp.o + +base/core/refcount.i: base/core/refcount.cpp.i +.PHONY : base/core/refcount.i + +# target to preprocess a source file +base/core/refcount.cpp.i: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/module_container/CMakeFiles/container.dir/build.make source/source_base/module_container/CMakeFiles/container.dir/base/core/refcount.cpp.i +.PHONY : base/core/refcount.cpp.i + +base/core/refcount.s: base/core/refcount.cpp.s +.PHONY : base/core/refcount.s + +# target to generate assembly for a file +base/core/refcount.cpp.s: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f source/source_base/module_container/CMakeFiles/container.dir/build.make source/source_base/module_container/CMakeFiles/container.dir/base/core/refcount.cpp.s +.PHONY : base/core/refcount.cpp.s + +# Help Target +help: + @echo "The following are some of the valid targets for this Makefile:" + @echo "... all (the default if no target is provided)" + @echo "... clean" + @echo "... depend" + @echo "... edit_cache" + @echo "... install" + @echo "... install/local" + @echo "... install/strip" + @echo "... list_install_components" + @echo "... rebuild_cache" + @echo "... container" + @echo "... ATen/core/tensor.o" + @echo "... ATen/core/tensor.i" + @echo "... ATen/core/tensor.s" + @echo "... ATen/core/tensor_buffer.o" + @echo "... ATen/core/tensor_buffer.i" + @echo "... ATen/core/tensor_buffer.s" + @echo "... ATen/core/tensor_map.o" + @echo "... ATen/core/tensor_map.i" + @echo "... ATen/core/tensor_map.s" + @echo "... ATen/core/tensor_shape.o" + @echo "... ATen/core/tensor_shape.i" + @echo "... ATen/core/tensor_shape.s" + @echo "... ATen/core/tensor_types.o" + @echo "... ATen/core/tensor_types.i" + @echo "... ATen/core/tensor_types.s" + @echo "... ATen/kernels/blas.o" + @echo "... ATen/kernels/blas.i" + @echo "... ATen/kernels/blas.s" + @echo "... ATen/kernels/lapack.o" + @echo "... ATen/kernels/lapack.i" + @echo "... ATen/kernels/lapack.s" + @echo "... ATen/kernels/linalg.o" + @echo "... ATen/kernels/linalg.i" + @echo "... ATen/kernels/linalg.s" + @echo "... ATen/kernels/memory_impl.o" + @echo "... ATen/kernels/memory_impl.i" + @echo "... ATen/kernels/memory_impl.s" + @echo "... ATen/ops/einsum_op.o" + @echo "... ATen/ops/einsum_op.i" + @echo "... ATen/ops/einsum_op.s" + @echo "... ATen/ops/linalg_op.o" + @echo "... ATen/ops/linalg_op.i" + @echo "... ATen/ops/linalg_op.s" + @echo "... base/core/cpu_allocator.o" + @echo "... base/core/cpu_allocator.i" + @echo "... base/core/cpu_allocator.s" + @echo "... base/core/refcount.o" + @echo "... base/core/refcount.i" + @echo "... base/core/refcount.s" +.PHONY : help + + + +#============================================================================= +# Special targets to cleanup operation of make. + +# Special rule to run CMake to check the build system integrity. +# No rule that depends on this can have commands that come from listfiles +# because they might be regenerated. +cmake_check_build_system: + cd /home/haozhihan/Documents/abacus-develop/build && $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 +.PHONY : cmake_check_build_system + diff --git a/build/source/source_base/module_container/base/core/CMakeFiles/CMakeDirectoryInformation.cmake b/build/source/source_base/module_container/base/core/CMakeFiles/CMakeDirectoryInformation.cmake new file mode 100644 index 0000000000..4f5306076f --- /dev/null +++ b/build/source/source_base/module_container/base/core/CMakeFiles/CMakeDirectoryInformation.cmake @@ -0,0 +1,16 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.27 + +# Relative path conversion top directories. +set(CMAKE_RELATIVE_PATH_TOP_SOURCE "/home/haozhihan/Documents/abacus-develop") +set(CMAKE_RELATIVE_PATH_TOP_BINARY "/home/haozhihan/Documents/abacus-develop/build") + +# Force unix paths in dependencies. +set(CMAKE_FORCE_UNIX_PATHS 1) + + +# The C and CXX include file regular expressions for this directory. +set(CMAKE_C_INCLUDE_REGEX_SCAN "^.*$") +set(CMAKE_C_INCLUDE_REGEX_COMPLAIN "^$") +set(CMAKE_CXX_INCLUDE_REGEX_SCAN ${CMAKE_C_INCLUDE_REGEX_SCAN}) +set(CMAKE_CXX_INCLUDE_REGEX_COMPLAIN ${CMAKE_C_INCLUDE_REGEX_COMPLAIN}) diff --git a/build/source/source_base/module_container/base/core/CMakeFiles/progress.marks b/build/source/source_base/module_container/base/core/CMakeFiles/progress.marks new file mode 100644 index 0000000000..573541ac97 --- /dev/null +++ b/build/source/source_base/module_container/base/core/CMakeFiles/progress.marks @@ -0,0 +1 @@ +0 diff --git a/build/source/source_base/module_container/base/core/Makefile b/build/source/source_base/module_container/base/core/Makefile new file mode 100644 index 0000000000..83d10579dc --- /dev/null +++ b/build/source/source_base/module_container/base/core/Makefile @@ -0,0 +1,189 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.27 + +# Default target executed when no arguments are given to make. +default_target: all +.PHONY : default_target + +# Allow only one "make -f Makefile2" at a time, but pass parallelism. +.NOTPARALLEL: + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Disable VCS-based implicit rules. +% : %,v + +# Disable VCS-based implicit rules. +% : RCS/% + +# Disable VCS-based implicit rules. +% : RCS/%,v + +# Disable VCS-based implicit rules. +% : SCCS/s.% + +# Disable VCS-based implicit rules. +% : s.% + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Command-line flag to silence nested $(MAKE). +$(VERBOSE)MAKESILENT = -s + +#Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E rm -f + +# Escaping for special characters. +EQUALS = = + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/haozhihan/Documents/abacus-develop + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/haozhihan/Documents/abacus-develop/build + +#============================================================================= +# Targets provided globally by CMake. + +# Special rule for the target edit_cache +edit_cache: + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "No interactive CMake dialog available..." + /usr/bin/cmake -E echo No\ interactive\ CMake\ dialog\ available. +.PHONY : edit_cache + +# Special rule for the target edit_cache +edit_cache/fast: edit_cache +.PHONY : edit_cache/fast + +# Special rule for the target rebuild_cache +rebuild_cache: + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Running CMake to regenerate build system..." + /usr/bin/cmake --regenerate-during-build -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) +.PHONY : rebuild_cache + +# Special rule for the target rebuild_cache +rebuild_cache/fast: rebuild_cache +.PHONY : rebuild_cache/fast + +# Special rule for the target list_install_components +list_install_components: + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Available install components are: \"Unspecified\"" +.PHONY : list_install_components + +# Special rule for the target list_install_components +list_install_components/fast: list_install_components +.PHONY : list_install_components/fast + +# Special rule for the target install +install: preinstall + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Install the project..." + /usr/bin/cmake -P cmake_install.cmake +.PHONY : install + +# Special rule for the target install +install/fast: preinstall/fast + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Install the project..." + /usr/bin/cmake -P cmake_install.cmake +.PHONY : install/fast + +# Special rule for the target install/local +install/local: preinstall + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing only the local directory..." + /usr/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake +.PHONY : install/local + +# Special rule for the target install/local +install/local/fast: preinstall/fast + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing only the local directory..." + /usr/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake +.PHONY : install/local/fast + +# Special rule for the target install/strip +install/strip: preinstall + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing the project stripped..." + /usr/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake +.PHONY : install/strip + +# Special rule for the target install/strip +install/strip/fast: preinstall/fast + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing the project stripped..." + /usr/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake +.PHONY : install/strip/fast + +# The main all target +all: cmake_check_build_system + cd /home/haozhihan/Documents/abacus-develop/build && $(CMAKE_COMMAND) -E cmake_progress_start /home/haozhihan/Documents/abacus-develop/build/CMakeFiles /home/haozhihan/Documents/abacus-develop/build/source/source_base/module_container/base/core//CMakeFiles/progress.marks + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 source/source_base/module_container/base/core/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/haozhihan/Documents/abacus-develop/build/CMakeFiles 0 +.PHONY : all + +# The main clean target +clean: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 source/source_base/module_container/base/core/clean +.PHONY : clean + +# The main clean target +clean/fast: clean +.PHONY : clean/fast + +# Prepare targets for installation. +preinstall: all + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 source/source_base/module_container/base/core/preinstall +.PHONY : preinstall + +# Prepare targets for installation. +preinstall/fast: + cd /home/haozhihan/Documents/abacus-develop/build && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 source/source_base/module_container/base/core/preinstall +.PHONY : preinstall/fast + +# clear depends +depend: + cd /home/haozhihan/Documents/abacus-develop/build && $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 +.PHONY : depend + +# Help Target +help: + @echo "The following are some of the valid targets for this Makefile:" + @echo "... all (the default if no target is provided)" + @echo "... clean" + @echo "... depend" + @echo "... edit_cache" + @echo "... install" + @echo "... install/local" + @echo "... install/strip" + @echo "... list_install_components" + @echo "... rebuild_cache" +.PHONY : help + + + +#============================================================================= +# Special targets to cleanup operation of make. + +# Special rule to run CMake to check the build system integrity. +# No rule that depends on this can have commands that come from listfiles +# because they might be regenerated. +cmake_check_build_system: + cd /home/haozhihan/Documents/abacus-develop/build && $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 +.PHONY : cmake_check_build_system + diff --git a/build/source/source_base/module_container/base/core/cmake_install.cmake b/build/source/source_base/module_container/base/core/cmake_install.cmake new file mode 100644 index 0000000000..8d45bda51b --- /dev/null +++ b/build/source/source_base/module_container/base/core/cmake_install.cmake @@ -0,0 +1,44 @@ +# Install script for directory: /home/haozhihan/Documents/abacus-develop/source/source_base/module_container/base/core + +# Set the install prefix +if(NOT DEFINED CMAKE_INSTALL_PREFIX) + set(CMAKE_INSTALL_PREFIX "/usr/local") +endif() +string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") + +# Set the install configuration name. +if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) + if(BUILD_TYPE) + string(REGEX REPLACE "^[^A-Za-z0-9_]+" "" + CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") + else() + set(CMAKE_INSTALL_CONFIG_NAME "") + endif() + message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") +endif() + +# Set the component getting installed. +if(NOT CMAKE_INSTALL_COMPONENT) + if(COMPONENT) + message(STATUS "Install component: \"${COMPONENT}\"") + set(CMAKE_INSTALL_COMPONENT "${COMPONENT}") + else() + set(CMAKE_INSTALL_COMPONENT) + endif() +endif() + +# Install shared libraries without execute permission? +if(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) + set(CMAKE_INSTALL_SO_NO_EXE "1") +endif() + +# Is this installation the result of a crosscompile? +if(NOT DEFINED CMAKE_CROSSCOMPILING) + set(CMAKE_CROSSCOMPILING "FALSE") +endif() + +# Set default install directory permissions. +if(NOT DEFINED CMAKE_OBJDUMP) + set(CMAKE_OBJDUMP "/usr/bin/objdump") +endif() + diff --git a/build/source/source_base/module_container/cmake_install.cmake b/build/source/source_base/module_container/cmake_install.cmake new file mode 100644 index 0000000000..f63bcb9ad1 --- /dev/null +++ b/build/source/source_base/module_container/cmake_install.cmake @@ -0,0 +1,64 @@ +# Install script for directory: /home/haozhihan/Documents/abacus-develop/source/source_base/module_container + +# Set the install prefix +if(NOT DEFINED CMAKE_INSTALL_PREFIX) + set(CMAKE_INSTALL_PREFIX "/usr/local") +endif() +string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") + +# Set the install configuration name. +if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) + if(BUILD_TYPE) + string(REGEX REPLACE "^[^A-Za-z0-9_]+" "" + CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") + else() + set(CMAKE_INSTALL_CONFIG_NAME "") + endif() + message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") +endif() + +# Set the component getting installed. +if(NOT CMAKE_INSTALL_COMPONENT) + if(COMPONENT) + message(STATUS "Install component: \"${COMPONENT}\"") + set(CMAKE_INSTALL_COMPONENT "${COMPONENT}") + else() + set(CMAKE_INSTALL_COMPONENT) + endif() +endif() + +# Install shared libraries without execute permission? +if(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) + set(CMAKE_INSTALL_SO_NO_EXE "1") +endif() + +# Is this installation the result of a crosscompile? +if(NOT DEFINED CMAKE_CROSSCOMPILING) + set(CMAKE_CROSSCOMPILING "FALSE") +endif() + +# Set default install directory permissions. +if(NOT DEFINED CMAKE_OBJDUMP) + set(CMAKE_OBJDUMP "/usr/bin/objdump") +endif() + +if(NOT CMAKE_INSTALL_LOCAL_ONLY) + # Include the install script for the subdirectory. + include("/home/haozhihan/Documents/abacus-develop/build/source/source_base/module_container/base/core/cmake_install.cmake") +endif() + +if(NOT CMAKE_INSTALL_LOCAL_ONLY) + # Include the install script for the subdirectory. + include("/home/haozhihan/Documents/abacus-develop/build/source/source_base/module_container/ATen/ops/cmake_install.cmake") +endif() + +if(NOT CMAKE_INSTALL_LOCAL_ONLY) + # Include the install script for the subdirectory. + include("/home/haozhihan/Documents/abacus-develop/build/source/source_base/module_container/ATen/core/cmake_install.cmake") +endif() + +if(NOT CMAKE_INSTALL_LOCAL_ONLY) + # Include the install script for the subdirectory. + include("/home/haozhihan/Documents/abacus-develop/build/source/source_base/module_container/ATen/kernels/cmake_install.cmake") +endif() + diff --git a/build/source/source_base/module_container/libcontainer.a b/build/source/source_base/module_container/libcontainer.a new file mode 100644 index 0000000000..3e64352b7f Binary files /dev/null and b/build/source/source_base/module_container/libcontainer.a differ diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index 916b0516bd..6b8acf305e 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -39,7 +39,7 @@ The source code of ABACUS is based on several modules. Under the ABACUS root dir For those who are interested in the source code, the following figure shows the structure of the source code. ```text -|-- module_base A basic module including +|-- source_base A basic module including | | (1) Mathematical library interface functions: BLAS, LAPACK, Scalapack; | | (2) Custom data classes: matrix, vector definitions and related functions; | | (3) Parallelization functions: MPI, OpenMP; @@ -183,7 +183,7 @@ pre-commit install ## Adding a unit test -We use [GoogleTest](https://github.com/google/googletest) as our test framework. Write your test under the corresponding module folder at `abacus-develop/tests`, then append the test to `tests/CMakeLists.txt`. If there are currently no unit tests provided for the module, do as follows. `module_base` provides a simple demonstration. +We use [GoogleTest](https://github.com/google/googletest) as our test framework. Write your test under the corresponding module folder at `abacus-develop/tests`, then append the test to `tests/CMakeLists.txt`. If there are currently no unit tests provided for the module, do as follows. `source_base` provides a simple demonstration. - Add a folder named `test` under the module. - Append the content below to `CMakeLists.txt` of the module: diff --git a/python/pyabacus/CMakeLists.txt b/python/pyabacus/CMakeLists.txt index 0de042e2db..cfe4df5e7e 100644 --- a/python/pyabacus/CMakeLists.txt +++ b/python/pyabacus/CMakeLists.txt @@ -12,7 +12,7 @@ find_package(pybind11 CONFIG REQUIRED) # set source path set(ABACUS_SOURCE_DIR "${PROJECT_SOURCE_DIR}/../../source") -set(BASE_PATH "${ABACUS_SOURCE_DIR}/module_base") +set(BASE_PATH "${ABACUS_SOURCE_DIR}/source_base") set(NAO_PATH "${ABACUS_SOURCE_DIR}/module_basis/module_nao") set(HSOLVER_PATH "${ABACUS_SOURCE_DIR}/source_hsolver") set(PSI_PATH "${ABACUS_SOURCE_DIR}/module_psi") @@ -69,14 +69,14 @@ endif() include_directories( ${BASE_PATH} ${ABACUS_SOURCE_DIR} - ${ABACUS_SOURCE_DIR}/module_base/module_container + ${ABACUS_SOURCE_DIR}/source_base/module_container ) # add basic libraries set(CMAKE_POSITION_INDEPENDENT_CODE ON) # add base set(BASE_BINARY_DIR "${PROJECT_SOURCE_DIR}/build/base") -add_subdirectory(${ABACUS_SOURCE_DIR}/module_base ${BASE_BINARY_DIR}) +add_subdirectory(${ABACUS_SOURCE_DIR}/source_base ${BASE_BINARY_DIR}) # add parameter set(PARAMETER_BINARY_DIR "${PROJECT_SOURCE_DIR}/build/parameter") add_subdirectory(${ABACUS_SOURCE_DIR}/module_parameter ${PARAMETER_BINARY_DIR}) diff --git a/python/pyabacus/CONTRIBUTING.md b/python/pyabacus/CONTRIBUTING.md index 202e7385ac..2806c59cd4 100644 --- a/python/pyabacus/CONTRIBUTING.md +++ b/python/pyabacus/CONTRIBUTING.md @@ -72,7 +72,7 @@ find_package(pybind11 CONFIG REQUIRED) ```cmake # Set source path set(ABACUS_SOURCE_DIR "${PROJECT_SOURCE_DIR}/../../source") -set(BASE_PATH "${ABACUS_SOURCE_DIR}/module_base") +set(BASE_PATH "${ABACUS_SOURCE_DIR}/source_base") set(NAO_PATH "${ABACUS_SOURCE_DIR}/module_basis/module_nao") set(HSOLVER_PATH "${ABACUS_SOURCE_DIR}/source_hsolver") set(PSI_PATH "${ABACUS_SOURCE_DIR}/module_psi") @@ -131,7 +131,7 @@ endif() include_directories( ${BASE_PATH} ${ABACUS_SOURCE_DIR} - ${ABACUS_SOURCE_DIR}/module_base/module_container + ${ABACUS_SOURCE_DIR}/source_base/module_container ) ``` - This section adds the necessary include directories for the project. @@ -141,7 +141,7 @@ include_directories( set(CMAKE_POSITION_INDEPENDENT_CODE ON) # Add base set(BASE_BINARY_DIR "${PROJECT_SOURCE_DIR}/build/base") -add_subdirectory(${ABACUS_SOURCE_DIR}/module_base ${BASE_BINARY_DIR}) +add_subdirectory(${ABACUS_SOURCE_DIR}/source_base ${BASE_BINARY_DIR}) # Add parameter set(PARAMETER_BINARY_DIR "${PROJECT_SOURCE_DIR}/build/parameter") add_subdirectory(${ABACUS_SOURCE_DIR}/module_parameter ${PARAMETER_BINARY_DIR}) diff --git a/python/pyabacus/examples/indexmap.py b/python/pyabacus/examples/indexmap.py index f9917919d8..9cfc798d58 100644 --- a/python/pyabacus/examples/indexmap.py +++ b/python/pyabacus/examples/indexmap.py @@ -60,7 +60,7 @@ def _index_map(ntype, natom, lmax, nzeta=None): 0, 1, -1, 2, -2, 3, -3, ..., l, -l - (see module_base/ylm.cpp and module_base/math_ylmreal.cpp + (see source_base/ylm.cpp and source_base/math_ylmreal.cpp for details) ''' diff --git a/python/pyabacus/src/ModuleBase/py_base_math.cpp b/python/pyabacus/src/ModuleBase/py_base_math.cpp index b9803c81cd..3b2c54ef63 100644 --- a/python/pyabacus/src/ModuleBase/py_base_math.cpp +++ b/python/pyabacus/src/ModuleBase/py_base_math.cpp @@ -1,9 +1,9 @@ #include #include -#include "module_base/math_sphbes.h" -#include "module_base/math_integral.h" -#include "module_base/spherical_bessel_transformer.h" +#include "source_base/math_sphbes.h" +#include "source_base/math_integral.h" +#include "source_base/spherical_bessel_transformer.h" namespace py = pybind11; using namespace pybind11::literals; diff --git a/python/pyabacus/src/ModuleNAO/CMakeLists.txt b/python/pyabacus/src/ModuleNAO/CMakeLists.txt index b9b7fe9935..d09448e454 100644 --- a/python/pyabacus/src/ModuleNAO/CMakeLists.txt +++ b/python/pyabacus/src/ModuleNAO/CMakeLists.txt @@ -13,12 +13,12 @@ list(APPEND _naos ${NAO_PATH}/two_center_integrator.cpp ${NAO_PATH}/two_center_table.cpp # dependency - ${ABACUS_SOURCE_DIR}/module_base/kernels/math_ylm_op.cpp - ${ABACUS_SOURCE_DIR}/module_base/kernels/math_kernel_op.cpp - ${ABACUS_SOURCE_DIR}/module_base/kernels/math_kernel_op_vec.cpp + ${ABACUS_SOURCE_DIR}/source_base/kernels/math_ylm_op.cpp + ${ABACUS_SOURCE_DIR}/source_base/kernels/math_kernel_op.cpp + ${ABACUS_SOURCE_DIR}/source_base/kernels/math_kernel_op_vec.cpp # ${ABACUS_SOURCE_DIR}/module_psi/kernels/psi_memory_op.cpp - ${ABACUS_SOURCE_DIR}/module_base/module_device/memory_op.cpp - ${ABACUS_SOURCE_DIR}/module_base/module_device/device.cpp + ${ABACUS_SOURCE_DIR}/source_base/module_device/memory_op.cpp + ${ABACUS_SOURCE_DIR}/source_base/module_device/device.cpp ) add_library(naopack SHARED ${_naos} diff --git a/python/pyabacus/src/ModuleNAO/py_m_nao.cpp b/python/pyabacus/src/ModuleNAO/py_m_nao.cpp index 92c5084d44..b832a42da6 100644 --- a/python/pyabacus/src/ModuleNAO/py_m_nao.cpp +++ b/python/pyabacus/src/ModuleNAO/py_m_nao.cpp @@ -2,7 +2,7 @@ #include #include -#include "module_base/vector3.h" +#include "source_base/vector3.h" #include "module_basis/module_nao/radial_collection.h" #include "module_basis/module_nao/two_center_integrator.h" diff --git a/python/pyabacus/src/hsolver/py_diago_cg.hpp b/python/pyabacus/src/hsolver/py_diago_cg.hpp index 95742ab62c..63a6cccc82 100644 --- a/python/pyabacus/src/hsolver/py_diago_cg.hpp +++ b/python/pyabacus/src/hsolver/py_diago_cg.hpp @@ -15,7 +15,7 @@ #include #include "source_hsolver/diago_cg.h" -#include "module_base/module_device/memory_op.h" +#include "source_base/module_device/memory_op.h" namespace py = pybind11; diff --git a/python/pyabacus/src/hsolver/py_hsolver.cpp b/python/pyabacus/src/hsolver/py_hsolver.cpp index 0ff9527357..c37ea43b4b 100644 --- a/python/pyabacus/src/hsolver/py_hsolver.cpp +++ b/python/pyabacus/src/hsolver/py_hsolver.cpp @@ -6,8 +6,8 @@ #include #include "source_hsolver/diago_dav_subspace.h" -#include "module_base/kernels/math_kernel_op.h" -#include "module_base/module_device/types.h" +#include "source_base/kernels/math_kernel_op.h" +#include "source_base/module_device/types.h" #include "./py_diago_dav_subspace.hpp" #include "./py_diago_david.hpp" diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt index 062e93bbe9..57289f0b1e 100644 --- a/source/CMakeLists.txt +++ b/source/CMakeLists.txt @@ -1,4 +1,4 @@ -add_subdirectory(module_base) +add_subdirectory(source_base) add_subdirectory(module_cell) add_subdirectory(module_psi) add_subdirectory(module_elecstate) @@ -42,17 +42,17 @@ list(APPEND device_srcs # module_psi/kernels/psi_memory_op.cpp # module_psi/kernels/device.cpp - module_base/module_device/device.cpp - module_base/module_device/memory_op.cpp - module_base/kernels/math_kernel_op.cpp - module_base/kernels/math_kernel_op_vec.cpp + source_base/module_device/device.cpp + source_base/module_device/memory_op.cpp + source_base/kernels/math_kernel_op.cpp + source_base/kernels/math_kernel_op_vec.cpp module_hamilt_pw/hamilt_pwdft/kernels/force_op.cpp module_hamilt_pw/hamilt_pwdft/kernels/stress_op.cpp module_hamilt_pw/hamilt_pwdft/kernels/onsite_op.cpp module_hamilt_pw/hamilt_pwdft/kernels/wf_op.cpp module_hamilt_pw/hamilt_pwdft/kernels/vnl_op.cpp - module_base/kernels/math_ylm_op.cpp + source_base/kernels/math_ylm_op.cpp module_hamilt_general/module_xc/kernels/xc_functional_op.cpp ) @@ -70,15 +70,15 @@ if(USE_CUDA) module_elecstate/kernels/cuda/elecstate_op.cu # module_psi/kernels/cuda/memory_op.cu - module_base/module_device/cuda/memory_op.cu + source_base/module_device/cuda/memory_op.cu module_hamilt_pw/hamilt_pwdft/kernels/cuda/force_op.cu module_hamilt_pw/hamilt_pwdft/kernels/cuda/stress_op.cu module_hamilt_pw/hamilt_pwdft/kernels/cuda/wf_op.cu module_hamilt_pw/hamilt_pwdft/kernels/cuda/vnl_op.cu - module_base/kernels/cuda/math_ylm_op.cu - module_base/kernels/cuda/math_kernel_op.cu - module_base/kernels/cuda/math_kernel_op_vec.cu + source_base/kernels/cuda/math_ylm_op.cu + source_base/kernels/cuda/math_kernel_op.cu + source_base/kernels/cuda/math_kernel_op_vec.cu module_hamilt_general/module_xc/kernels/cuda/xc_functional_op.cu ) endif() @@ -97,22 +97,22 @@ if(USE_ROCM) module_elecstate/kernels/rocm/elecstate_op.hip.cu # module_psi/kernels/rocm/memory_op.hip.cu - module_base/module_device/rocm/memory_op.hip.cu + source_base/module_device/rocm/memory_op.hip.cu module_hamilt_pw/hamilt_pwdft/kernels/rocm/force_op.hip.cu module_hamilt_pw/hamilt_pwdft/kernels/rocm/stress_op.hip.cu module_hamilt_pw/hamilt_pwdft/kernels/rocm/wf_op.hip.cu module_hamilt_pw/hamilt_pwdft/kernels/rocm/vnl_op.hip.cu - module_base/kernels/rocm/math_kernel_op.hip.cu - module_base/kernels/rocm/math_kernel_op_vec.hip.cu - module_base/kernels/rocm/math_ylm_op.hip.cu + source_base/kernels/rocm/math_kernel_op.hip.cu + source_base/kernels/rocm/math_kernel_op_vec.hip.cu + source_base/kernels/rocm/math_ylm_op.hip.cu module_hamilt_general/module_xc/kernels/rocm/xc_functional_op.hip.cu ) endif() if(USE_DSP) list(APPEND device_srcs - module_base/kernels/dsp/dsp_connector.cpp + source_base/kernels/dsp/dsp_connector.cpp ) endif() diff --git a/source/Makefile.Objects b/source/Makefile.Objects index d58f43f895..53d6bf018a 100644 --- a/source/Makefile.Objects +++ b/source/Makefile.Objects @@ -18,14 +18,14 @@ VPATH=./src_global:\ ./module_cell/module_neighbor:\ ./module_cell/module_symmetry:\ ./module_cell:\ -./module_base:\ -./module_base/kernels:\ -./module_base/module_container/base/core:\ -./module_base/module_container/ATen/core:\ -./module_base/module_container/ATen/kernels:\ -./module_base/module_container/ATen/ops:\ -./module_base/module_device:\ -./module_base/module_mixing:\ +./source_base:\ +./source_base/kernels:\ +./source_base/module_container/base/core:\ +./source_base/module_container/ATen/core:\ +./source_base/module_container/ATen/kernels:\ +./source_base/module_container/ATen/ops:\ +./source_base/module_device:\ +./source_base/module_mixing:\ ./module_md:\ ./module_basis/module_pw:\ ./module_basis/module_pw/module_fft:\ diff --git a/source/module_base/CMakeLists.txt b/source/module_base/CMakeLists.txt deleted file mode 100644 index be89ad8e26..0000000000 --- a/source/module_base/CMakeLists.txt +++ /dev/null @@ -1,93 +0,0 @@ -if (USE_ABACUS_LIBM) -list (APPEND LIBM_SRC - libm/branred.cpp - libm/cexp.cpp - libm/exp.cpp - libm/sincos.cpp -) -endif() -add_library( - base - OBJECT - assoc_laguerre.cpp - blas_connector_base.cpp - blas_connector_vector.cpp - blas_connector_matrix.cpp - clebsch_gordan_coeff.cpp - complexarray.cpp - complexmatrix.cpp - element_basis_index.cpp - export.cpp - inverse_matrix.cpp - gather_math_lib_info.cpp - global_file.cpp - global_function.cpp - global_function_ddotreal.cpp - global_variable.cpp - intarray.cpp - math_integral.cpp - math_lebedev_laikov.cpp - math_polyint.cpp - math_sphbes.cpp - math_erf_complex.cpp - math_ylmreal.cpp - math_bspline.cpp - math_chebyshev.cpp - mathzone_add1.cpp - matrix.cpp - matrix3.cpp - memory.cpp - mymath.cpp - opt_CG.cpp - opt_DCsrch.cpp - para_gemm.cpp - realarray.cpp - sph_bessel_recursive-d1.cpp - sph_bessel_recursive-d2.cpp - timer.cpp - tool_check.cpp - tool_quit.cpp - tool_title.cpp - ylm.cpp - abfs-vector3_order.cpp - parallel_common.cpp - parallel_global.cpp - parallel_comm.cpp - parallel_reduce.cpp - parallel_device.cpp - spherical_bessel_transformer.cpp - cubic_spline.cpp - parallel_2d.cpp - projgen.cpp - module_mixing/mixing_data.cpp - module_mixing/mixing.cpp - module_mixing/plain_mixing.cpp - module_mixing/pulay_mixing.cpp - module_mixing/broyden_mixing.cpp - ${LIBM_SRC} -) - -target_link_libraries(base PUBLIC container) -if (USE_DSP) - target_link_libraries(base PUBLIC ${MTBLAS_FFT_DIR}/libmtblas/lib/libmtblas.a) - target_link_libraries(base PUBLIC ${MTBLAS_FFT_DIR}/libmtblas/lib/libmtblasdev.a) -endif() -add_subdirectory(module_container) - -if(ENABLE_COVERAGE) - add_coverage(base) -endif() - -if(BUILD_TESTING) - if(ENABLE_MPI) #Zhang Xiaoyang: A temporary solution. Please classify the serial and parrallel tests later. 2024-7-8 - add_subdirectory(test) - add_subdirectory(test_parallel) - add_subdirectory(kernels/test) - add_subdirectory(module_mixing/test) - add_subdirectory(module_device/test) - add_subdirectory(grid/test) - if (USE_ABACUS_LIBM) - add_subdirectory(libm/test) - endif() - endif() -endif() diff --git a/source/module_base/abfs-vector3_order.cpp b/source/module_base/abfs-vector3_order.cpp deleted file mode 100644 index f2307a4618..0000000000 --- a/source/module_base/abfs-vector3_order.cpp +++ /dev/null @@ -1,36 +0,0 @@ -#include "abfs-vector3_order.h" - -template<> -bool operator< ( const Abfs::Vector3_Order &v1, const Abfs::Vector3_Order &v2 ) -{ - // threshold is used when v1 and v2 are approximately equal with double numerical error, - // but a strange bug occurs at LRI_CV::dVws. - // Peize Lin change at 2023.04.29 - if ( v1.x < v2.x ) return true; - else if ( v1.x > v2.x ) return false; - if ( v1.y < v2.y ) return true; - else if ( v1.y > v2.y ) return false; - if ( v1.z < v2.z ) return true; - else if ( v1.z > v2.z ) return false; - return false; - //constexpr double threshold = 1E-8; - //if ( v1.x < v2.x - threshold ) return true; - //else if ( v1.x > v2.x + threshold ) return false; - //if ( v1.y < v2.y - threshold ) return true; - //else if ( v1.y > v2.y + threshold ) return false; - //if ( v1.z < v2.z - threshold ) return true; - //else if ( v1.z > v2.z + threshold ) return false; - //return false; -} - -template<> -bool operator< ( const Abfs::Vector3_Order &v1, const Abfs::Vector3_Order &v2 ) -{ - if ( v1.x < v2.x ) return true; - else if ( v1.x > v2.x ) return false; - if ( v1.y < v2.y ) return true; - else if ( v1.y > v2.y ) return false; - if ( v1.z < v2.z ) return true; - else if ( v1.z > v2.z ) return false; - return false; -} \ No newline at end of file diff --git a/source/module_base/abfs-vector3_order.h b/source/module_base/abfs-vector3_order.h deleted file mode 100644 index e0f9442f99..0000000000 --- a/source/module_base/abfs-vector3_order.h +++ /dev/null @@ -1,73 +0,0 @@ -//========================================================== -// AUTHOR : Peize Lin -// DATE : 2017-01-10 -//========================================================== - -#ifndef ABFS_VECTOR3_ORDER_H -#define ABFS_VECTOR3_ORDER_H - -#include "module_ri/abfs.h" - -// mohan comment out 2021-02-06 -//#include -//#include - -template class Abfs::Vector3_Order: public ModuleBase::Vector3 -{ -public: - Vector3_Order(const ModuleBase::Vector3 &v):ModuleBase::Vector3(v){} - Vector3_Order(const T &x,const T &y,const T &z):ModuleBase::Vector3(x,y,z){} - Vector3_Order()=default; -}; - -template -bool operator< ( const Abfs::Vector3_Order &v1, const Abfs::Vector3_Order &v2 ); - -/* -template -bool operator> ( const Abfs::Vector3_Order &v1, const Abfs::Vector3_Order &v2 ) -{ - if( v1.x>v2.x ) return true; - else if ( v1.xv2.y ) return true; - else if ( v1.yv2.z ) return true; - else if ( v1.z -bool operator<= ( const Abfs::Vector3_Order &v1, const Abfs::Vector3_Order &v2 ) -{ - if( v1.xv2.x ) return false; - if( v1.yv2.y ) return false; - if( v1.zv2.z ) return false; - return true; -} - -template -bool operator>= ( const Abfs::Vector3_Order &v1, const Abfs::Vector3_Order &v2 ) -{ - if( v1.x>v2.x ) return true; - else if ( v1.xv2.y ) return true; - else if ( v1.yv2.z ) return true; - else if ( v1.z -Abfs::Vector3_Order operator% ( const Abfs::Vector3_Order &v1, const Abfs::Vector3_Order &v2 ) -{ - auto mod = [](const int i, const int n){ return (i%n+3*n/2)%n-n/2; }; // [-n/2,n/2] -// auto mod = [](const int i, const int n){ return (i%n+n)%n; }; // [0,n] - return Abfs::Vector3_Order{ mod(v1.x,v2.x), mod(v1.y,v2.y), mod(v1.z,v2.z) }; -} - -#endif // ABFS_VECTOR3_ORDER_H diff --git a/source/module_base/array_pool.h b/source/module_base/array_pool.h deleted file mode 100644 index 5fde2c4176..0000000000 --- a/source/module_base/array_pool.h +++ /dev/null @@ -1,89 +0,0 @@ -#ifndef ARRAY_POOL_H -#define ARRAY_POOL_H - - -namespace ModuleBase -{ - /** - * @brief Array_Pool is a class designed for dynamically allocating a two-dimensional array - * with all its elements contiguously arranged in memory. Compared to a two-dimensional vector, - * it offers better data locality because all elements are stored in a continuous block of memory. - * - * @tparam T - */ - template - class Array_Pool - { - public: - Array_Pool() = default; - Array_Pool(const int nr_in, const int nc_in); - Array_Pool(Array_Pool&& other); - Array_Pool& operator=(Array_Pool&& other); - ~Array_Pool(); - Array_Pool(const Array_Pool& other) = delete; - Array_Pool& operator=(const Array_Pool& other) = delete; - - T** get_ptr_2D() const { return this->ptr_2D; } - T* get_ptr_1D() const { return this->ptr_1D; } - int get_nr() const { return this->nr; } - int get_nc() const { return this->nc; } - T* operator[](const int ir) const { return this->ptr_2D[ir]; } - private: - T** ptr_2D = nullptr; - T* ptr_1D = nullptr; - int nr = 0; - int nc = 0; - }; - - template - Array_Pool::Array_Pool(const int nr_in, const int nc_in) // Attention: uninitialized - : nr(nr_in), - nc(nc_in) - { - this->ptr_1D = new T[nr * nc](); - this->ptr_2D = new T*[nr]; - for (int ir = 0; ir < nr; ++ir) - this->ptr_2D[ir] = &this->ptr_1D[ir * nc]; - } - - template - Array_Pool::~Array_Pool() - { - delete[] this->ptr_2D; - delete[] this->ptr_1D; - } - - template - Array_Pool::Array_Pool(Array_Pool&& other) - : ptr_2D(other.ptr_2D), - ptr_1D(other.ptr_1D), - nr(other.nr), - nc(other.nc) - { - other.ptr_2D = nullptr; - other.ptr_1D = nullptr; - other.nr = 0; - other.nc = 0; - } - - template - Array_Pool& Array_Pool::operator=(Array_Pool&& other) - { - if (this != &other) - { - delete[] this->ptr_2D; - delete[] this->ptr_1D; - this->ptr_2D = other.ptr_2D; - this->ptr_1D = other.ptr_1D; - this->nr = other.nr; - this->nc = other.nc; - other.ptr_2D = nullptr; - other.ptr_1D = nullptr; - other.nr = 0; - other.nc = 0; - } - return *this; - } - -} -#endif \ No newline at end of file diff --git a/source/module_base/assoc_laguerre.cpp b/source/module_base/assoc_laguerre.cpp deleted file mode 100644 index cdc3ef94d9..0000000000 --- a/source/module_base/assoc_laguerre.cpp +++ /dev/null @@ -1,137 +0,0 @@ -#include "module_base/assoc_laguerre.h" -#include "module_base/global_function.h" -//#include // use cmath the factorial function -#include -Assoc_Laguerre::Assoc_Laguerre() -{ -} - -Assoc_Laguerre::~Assoc_Laguerre() -{ -} - -void Assoc_Laguerre::generate(const int &n, const int &l, const double ns, double* const &s, double* L) -{ - for(int i = 0; i < ns; i++) - { - L[i] = this->value(n, l, s[i]); - } -} - -void Assoc_Laguerre::generate(const int &n, const int &l, std::vector &x, std::vector &y) -{ - for(int i = 0; i < x.size(); i++) - { - y[i] = this->value(n, l, x[i]); - } -} - -double Assoc_Laguerre::laguerre(const int &n, const double x) -{ - if(n == 0) - { - return 1; - } - else if(n == 1) - { - return -x + 1; - } - else if(n == 2) - { - return 0.5 * x * x - 2 * x + 1; - } - else if(n == 3) - { - return -x * x * x / 6.0 + 3.0 * x * x / 2.0 - 3.0 * x + 1; - } - else if(n >= 4) - { - double n_ = static_cast(n); - double first = (2*n_ - 1 - x)/n_ * Assoc_Laguerre::laguerre(n-1, x); - double second = (n_ - 1)/n_ * Assoc_Laguerre::laguerre(n-2, x); - return first - second; - } - else - { - ModuleBase::WARNING_QUIT("Assoc_Laguerre::laguerre", "n is out of range"); - return 0; - } -} - -double Assoc_Laguerre::associate_laguerre(const int &n, const double x, const int &a) -{ - // formula from https://en.wikipedia.org/wiki/Laguerre_polynomials - double n_ = static_cast(n); - double a_ = static_cast(a); - if(n == 0) - { - return 1; - } - else if(n == 1) - { - return -x + 1 + a_; - } - else if(n == 2) - { - return 0.5 * (x*x - 2*(a_+2)*x + (a_+1)*(a_+2)); - } - else if(n == 3) - { - return -x*x*x/6.0 + (a_+3)*x*x/2.0 - (a_+2)*(a_+3)*x/2.0 + (a_+1)*(a_+2)*(a_+3)/6.0; - } - else if(n >= 4) - { - double first = (2*n_ - 1 + a_ - x)/n_ * this->associate_laguerre(n-1, x, a); - double second = (n_ + a_ - 1)/n_ * this->associate_laguerre(n-2, x, a); - return first - second; - } - else - { - ModuleBase::WARNING_QUIT("Assoc_Laguerre::associate_laguerre", "n is out of range"); - return 0; - } -} - -int Assoc_Laguerre::factorial(const int &n) -{ - if(n == 0) - { - return 1; - } - else if(n > 0) - { - return n * this->factorial(n-1); - } - else - { - ModuleBase::WARNING_QUIT("Assoc_Laguerre::factorial", "n is out of range"); - return 0; - } -} - -double Assoc_Laguerre::value(const int &n, const int &l, const double &s) -{ - int k_ = 2*l + 1; - int n_ = n - l - 1; - if(k_ < 0) - { - ModuleBase::WARNING_QUIT("Assoc_Laguerre::value", "k is out of range"); - return 0; - } - if(n_ < 0) - { - ModuleBase::WARNING_QUIT("Assoc_Laguerre::value", "n is out of range"); - return 0; - } - double L = 0; - for(int iq = 0; iq <= n_; iq++) - { - L += std::pow(-s, iq) * - static_cast(this->factorial(n_ + k_)) / - static_cast(this->factorial(n_ - iq)) / - static_cast(this->factorial(k_ + iq)) / - static_cast(this->factorial(iq)); - } - //L = std::tr1::assoc_laguerre(n_, k_, s); // use standard library - return L; -} \ No newline at end of file diff --git a/source/module_base/assoc_laguerre.h b/source/module_base/assoc_laguerre.h deleted file mode 100644 index 6992c941a5..0000000000 --- a/source/module_base/assoc_laguerre.h +++ /dev/null @@ -1,47 +0,0 @@ -#ifndef ASSOC_LAGUEERRE_H -#define ASSOC_LAGUEERRE_H - -#include -#include - -class Assoc_Laguerre -{ - public: - Assoc_Laguerre(); - ~Assoc_Laguerre(); - /// @brief generate the associated Laguerre polynomial (overloaded for double*) - /// @param n principal quantum number - /// @param l orbital quantum number - /// @param ns number of x-coordinates - /// @param s x-coordinates - /// @param L y-coordinates - void generate(const int &n, const int &l, const double ns, double* const &s, double* L); - /// @brief generate the associated Laguerre polynomial (overloaded for std::vector) - /// @param n principal quantum number - /// @param l orbital quantum number - /// @param x x-coordinates in std::vector - /// @param y y-coordinates in std::vector - void generate(const int &n, const int &l, std::vector &x, std::vector &y); - /// @brief Laguerre polynomial - /// @param n degree of the polynomial - /// @param x radial coordinate - /// @return L_n(x) - double laguerre(const int &n, const double x); - /// @brief recursive relationship to find the associated Laguerre polynomial - /// @param n degree of the polynomial - /// @param x radial coordinate - /// @param a order of the polynomial - /// @return L^(a)_n(x) - double associate_laguerre(const int &n, const double x, const int &a); - /// @brief wrapper for associate_laguerre - /// @param n principal quantum number - /// @param l orbital quantum number - /// @param s radial coordinate - /// @return L^(2l+1)_(n-l-1)(s) - double value(const int &n, const int &l, const double &s); - /// @brief factorial function - /// @param n - /// @return n! - int factorial(const int &n); -}; -#endif // ASSOC_LAGUEERRE_H \ No newline at end of file diff --git a/source/module_base/atom_in.h b/source/module_base/atom_in.h deleted file mode 100644 index 5458a28fd7..0000000000 --- a/source/module_base/atom_in.h +++ /dev/null @@ -1,164 +0,0 @@ -#ifndef ATOM_IN_H -#define ATOM_IN_H - -#include -#include -#include -#include -#include - -class atom_in -{ - public: - atom_in(){}; - ~atom_in(){}; - std::map atom_Z - = {{"H", 1}, {"He", 2}, {"Li", 3}, {"Be", 4}, {"B", 5}, {"C", 6}, {"N", 7}, {"O", 8}, {"F", 9}, - {"Ne", 10}, {"Na", 11}, {"Mg", 12}, {"Al", 13}, {"Si", 14}, {"P", 15}, {"S", 16}, {"Cl", 17}, {"Ar", 18}, - {"K", 19}, {"Ca", 20}, {"Sc", 21}, {"Ti", 22}, {"V", 23}, {"Cr", 24}, {"Mn", 25}, {"Fe", 26}, {"Co", 27}, - {"Ni", 28}, {"Cu", 29}, {"Zn", 30}, {"Ga", 31}, {"Ge", 32}, {"As", 33}, {"Se", 34}, {"Br", 35}, {"Kr", 36}, - {"Rb", 37}, {"Sr", 38}, {"Y", 39}, {"Zr", 40}, {"Nb", 41}, {"Mo", 42}, {"Tc", 43}, {"Ru", 44}, {"Rh", 45}, - {"Pd", 46}, {"Ag", 47}, {"Cd", 48}, {"In", 49}, {"Sn", 50}, {"Sb", 51}, {"Te", 52}, {"I", 53}, {"Xe", 54}, - {"Cs", 55}, {"Ba", 56}, {"La", 57}, {"Ce", 58}, {"Pr", 59}, {"Nd", 60}, {"Pm", 61}, {"Sm", 62}, {"Eu", 63}, - {"Gd", 64}, {"Tb", 65}, {"Dy", 66}, {"Ho", 67}, {"Er", 68}, {"Tm", 69}, {"Yb", 70}, {"Lu", 71}, {"Hf", 72}, - {"Ta", 73}, {"W", 74}, {"Re", 75}, {"Os", 76}, {"Ir", 77}, {"Pt", 78}, {"Au", 79}, {"Hg", 80}, {"Tl", 81}, - {"Pb", 82}, {"Bi", 83}, {"Po", 84}, {"At", 85}, {"Rn", 86}, - {"Fr", 87}, {"Ra", 88}, {"Ac", 89}, {"Th", 90}, {"Pa", 91}, - {"U", 92}, {"Np", 93}, {"Pu", 94}, {"Am", 95}, {"Cm", 96}, - {"Bk", 97}, {"Cf", 98}, {"Es", 99}, {"Fm", 100}, {"Md", 101}, {"No", 102}, - {"Lr", 103}, {"Rf", 104}, {"Db", 105}, {"Sg", 106}, {"Bh", 107}, {"Hs", 108}, - {"Mt", 109}, {"Ds", 110}, {"Rg", 111}, {"Cn", 112}, {"Nh", 113}, {"Fl", 114}, - {"Mc", 115}, {"Lv", 116}, {"Ts", 117}, {"Og", 118}}; - - std::map atom_RCS - = {{"H", 0.603774}, {"He", 1.75472}, {"Li", 2.32075}, {"Be", 1.69811}, {"B", 1.54717}, {"C", 1.45283}, - {"N", 1.41509}, {"O", 1.37736}, {"F", 1.35849}, {"Ne", 1.33962}, {"Na", 2.90566}, {"Mg", 2.56604}, - {"Al", 2.22642}, {"Si", 2.09434}, {"P", 2}, {"S", 1.92453}, {"Cl", 1.86792}, {"Ar", 1.84906}, - {"K", 3.83019}, {"Ca", 3.28302}, {"Sc", 2.71698}, {"Ti", 2.49057}, {"V", 2.30189}, {"Cr", 2.22642}, - {"Mn", 2.20755}, {"Fe", 2.20755}, {"Co", 2.18868}, {"Ni", 2.16981}, {"Cu", 2.20755}, {"Zn", 2.35849}, - {"Ga", 2.37736}, {"Ge", 2.30189}, {"As", 2.26415}, {"Se", 2.18868}, {"Br", 2.15094}, {"Kr", 2.11321}, - {"Rb", 4.07547}, {"Sr", 3.60377}, {"Y", 3.0566}, {"Zr", 2.73585}, {"Nb", 2.5283}, {"Mo", 2.45283}, - {"Tc", 2.39623}, {"Ru", 2.35849}, {"Rh", 2.35849}, {"Pd", 2.41509}, {"Ag", 2.5283}, {"Cd", 2.79245}, - {"In", 2.71698}, {"Sn", 2.66038}, {"Sb", 2.64151}, {"Te", 2.56604}, {"I", 2.50943}, {"Xe", 2.4717}, - {"Cs", 4.43396}, {"Ba", 3.73585}, {"La", 3.18868}, {"Ce", 3.11321}, {"Pr", 3.11321}, {"Nd", 3.09434}, - {"Pm", 3.07547}, {"Sm", 3.0566}, {"Eu", 3.49057}, {"Gd", 3.03774}, {"Tb", 3}, {"Dy", 3}, - {"Ho", 2.98113}, {"Er", 2.96226}, {"Tm", 2.9434}, {"Yb", 3.28302}, {"Lu", 2.9434}, {"Hf", 2.71698}, - {"Ta", 2.5283}, {"W", 2.45283}, {"Re", 2.41509}, {"Os", 2.37736}, {"Ir", 2.39623}, {"Pt", 2.45283}, - {"Au", 2.5283}, {"Hg", 2.81132}, {"Tl", 2.79245}, {"Pb", 2.77358}, {"Bi", 2.75472}, {"Po", 2.75472}, - {"At", 2.73585}, {"Rn", 2.69811} }; - - std::map atom_symbol - = { {"H", "Hydrogen"}, {"He", "Helium"}, {"Li", "Lithium"}, {"Be", "Beryllium"}, {"B", "Boron"}, {"C", "Carbon"}, - {"N", "Nitrogen"}, {"O", "Oxygen"}, {"F", "Fluorine"}, {"Ne", "Neon"}, {"Na", "Sodium"}, {"Mg", "Magnesium"}, - {"Al", "Aluminum"}, {"Si", "Silicon"}, {"P", "Phosphorus"}, {"S", "Sulfur"}, {"Cl", "Chlorine"}, {"Ar", "Argon"}, - {"K", "Potassium"}, {"Ca", "Calcium"}, {"Sc", "Scandium"}, {"Ti", "Titanium"}, {"V", "Vanadium"}, {"Cr", "Chromium"}, - {"Mn", "Manganese"}, {"Fe", "Iron"}, {"Co", "Cobalt"}, {"Ni", "Nickel"}, {"Cu", "Copper"}, {"Zn", "Zinc"}, - {"Ga", "Gallium"}, {"Ge", "Germanium"}, {"As", "Arsenic"}, {"Se", "Selenium"}, {"Br", "Bromine"}, {"Kr", "Krypton"}, - {"Rb", "Rubidium"}, {"Sr", "Strontium"}, {"Y", "Yttrium"}, {"Zr", "Zirconium"}, {"Nb", "Niobium"}, {"Mo", "Molybdenum"}, - {"Tc", "Technetium"}, {"Ru", "Ruthenium"}, {"Rh", "Rhodium"}, {"Pd", "Palladium"}, {"Ag", "Silver"}, {"Cd", "Cadmium"}, - {"In", "Indium"}, {"Sn", "Tin"}, {"Sb", "Antimony"}, {"Te", "Tellurium"}, {"I", "Iodine"}, {"Xe", "Xenon"}, - {"Cs", "Cesium"}, {"Ba", "Barium"}, {"La", "Lanthanum"}, {"Ce", "Cerium"}, {"Pr", "Praseodymium"}, {"Nd", "Neodymium"}, - {"Pm", "Promethium"}, {"Sm", "Samarium"}, {"Eu", "Europium"}, {"Gd", "Gadolinium"}, {"Tb", "Terbium"}, {"Dy", "Dysprosium"}, - {"Ho", "Holmium"}, {"Er", "Erbium"}, {"Tm", "Thulium"}, {"Yb", "Ytterbium"}, {"Lu", "Lutetium"}, {"Hf", "Hafnium"}, - {"Ta", "Tantalum"}, {"W", "Tungsten"}, {"Re", "Rhenium"}, {"Os", "Osmium"}, {"Ir", "Iridium"}, {"Pt", "Platinum"}, - {"Au", "Gold"}, {"Hg", "Mercury"}, {"Tl", "Thallium"}, {"Pb", "Lead"}, {"Bi", "Bismuth"}, {"Po", "Polonium"}, - {"At", "Astatine"}, {"Rn", "Radon"}, {"Fr", "Francium"}, {"Ra", "Radium"}, {"Ac", "Actinium"}, {"Th", "Thorium"}, - {"Pa", "Protactinium"}, {"U", "Uranium"}, {"Np", "Neptunium"}, {"Pu", "Plutonium"}, {"Am", "Americium"}, {"Cm", "Curium"}, - {"Bk", "Berkelium"}, {"Cf", "Californium"}, {"Es", "Einsteinium"}, {"Fm", "Fermium"}, {"Md", "Mendelevium"}, {"No", "Nobelium"}, - {"Lr", "Lawrencium"}, {"Rf", "Rutherfordium"}, {"Db", "Dubnium"}, {"Sg", "Seaborgium"}, {"Bh", "Bohrium"}, {"Hs", "Hassium"}, - {"Mt", "Meitnerium"}, {"Ds", "Darmstadtium"}, {"Rg", "Roentgenium"}, {"Cn", "Copernicium"}, {"Nh", "Nihonium"}, {"Fl", "Flerovium"}, - {"Mc", "Moscovium"}, {"Lv", "Livermorium"}, {"Ts", "Tennessine"}, {"Og", "Oganesson"}}; - - std::map symbol_Z - = { {"Hydrogen", 1}, {"Helium", 2}, {"Lithium", 3}, {"Beryllium", 4}, {"Boron", 5}, {"Carbon", 6}, - {"Nitrogen", 7}, {"Oxygen", 8}, {"Fluorine", 9}, {"Neon", 10}, {"Sodium", 11}, {"Magnesium", 12}, - {"Aluminum", 13}, {"Silicon", 14}, {"Phosphorus", 15}, {"Sulfur", 16}, {"Chlorine", 17}, {"Argon", 18}, - {"Potassium", 19}, {"Calcium", 20}, {"Scandium", 21}, {"Titanium", 22}, {"Vanadium", 23}, {"Chromium", 24}, - {"Manganese", 25}, {"Iron", 26}, {"Cobalt", 27}, {"Nickel", 28}, {"Copper", 29}, {"Zinc", 30}, - {"Gallium", 31}, {"Germanium", 32}, {"Arsenic", 33}, {"Selenium", 34}, {"Bromine", 35}, {"Krypton", 36}, - {"Rubidium", 37}, {"Strontium", 38}, {"Yttrium", 39}, {"Zirconium", 40}, {"Niobium", 41}, {"Molybdenum", 42}, - {"Technetium", 43}, {"Ruthenium", 44}, {"Rhodium", 45}, {"Palladium", 46}, {"Silver", 47}, {"Cadmium", 48}, - {"Indium", 49}, {"Tin", 50}, {"Antimony", 51}, {"Tellurium", 52}, {"Iodine", 53}, {"Xenon", 54}, - {"Cesium", 55}, {"Barium", 56}, {"Lanthanum", 57}, {"Cerium", 58}, {"Praseodymium", 59}, {"Neodymium", 60}, - {"Promethium", 61}, {"Samarium", 62}, {"Europium", 63}, {"Gadolinium", 64}, {"Terbium", 65}, {"Dysprosium", 66}, - {"Holmium", 67}, {"Erbium", 68}, {"Thulium", 69}, {"Ytterbium", 70}, {"Lutetium", 71}, {"Hafnium", 72}, - {"Tantalum", 73}, {"Tungsten", 74}, {"Rhenium", 75}, {"Osmium", 76}, {"Iridium", 77}, {"Platinum", 78}, - {"Gold", 79}, {"Mercury", 80}, {"Thallium", 81}, {"Lead", 82}, {"Bismuth", 83}, {"Polonium", 84}, - {"Astatine", 85}, {"Radon", 86}, {"Francium", 87}, {"Radium", 88}, {"Actinium", 89}, {"Thorium", 90}, - {"Protactinium", 91}, {"Uranium", 92}, {"Neptunium", 93}, {"Plutonium", 94}, {"Americium", 95}, {"Curium", 96}, - {"Berkelium", 97}, {"Californium", 98}, {"Einsteinium", 99}, {"Fermium", 100}, {"Mendelevium", 101}, {"Nobelium", 102}, - {"Lawrencium", 103}, {"Rutherfordium", 104}, {"Dubnium", 105}, {"Seaborgium", 106}, {"Bohrium", 107}, {"Hassium", 108}, - {"Meitnerium", 109}, {"Darmstadtium", 110}, {"Roentgenium", 111}, {"Copernicium", 112}, {"Nihonium", 113}, {"Flerovium", 114}, - {"Moscovium", 115}, {"Livermorium", 116}, {"Tennessine", 117}, {"Oganesson", 118} - }; - std::map principle_quantum_number - = { - {"H", 1}, {"He", 1}, {"Li", 2}, {"Be", 2}, {"B", 2}, {"C", 2}, {"N", 2}, {"O", 2}, {"F", 2}, - {"Ne", 1}, {"Na", 2}, {"Mg", 3}, {"Al", 3}, {"Si", 3}, {"P", 3}, {"S", 3}, {"Cl", 3}, {"Ar", 2}, - {"K", 3}, {"Ca", 4}, {"Sc", 4}, {"Ti", 4}, {"V", 4}, {"Cr", 4}, {"Mn", 4}, {"Fe", 4}, {"Co", 4}, - {"Ni", 4}, {"Cu", 4}, {"Zn", 4}, {"Ga", 4}, {"Ge", 4}, {"As", 4}, {"Se", 4}, {"Br", 4}, {"Kr", 3}, - {"Rb", 4}, {"Sr", 5}, {"Y", 5}, {"Zr", 5}, {"Nb", 5}, {"Mo", 5}, {"Tc", 5}, {"Ru", 5}, {"Rh", 5}, - {"Pd", 5}, {"Ag", 5}, {"Cd", 5}, {"In", 5}, {"Sn", 5}, {"Sb", 5}, {"Te", 5}, {"I", 5}, {"Xe", 4}, - {"Cs", 5}, {"Ba", 6}, {"La", 6}, {"Ce", 6}, {"Pr", 6}, {"Nd", 6}, {"Pm", 6}, {"Sm", 6}, {"Eu", 6}, - {"Gd", 6}, {"Tb", 6}, {"Dy", 6}, {"Ho", 6}, {"Er", 6}, {"Tm", 6}, {"Yb", 6}, {"Lu", 6}, {"Hf", 6}, - {"Ta", 6}, {"W", 6}, {"Re", 6}, {"Os", 6}, {"Ir", 6}, {"Pt", 6}, {"Au", 6}, {"Hg", 6}, {"Tl", 6}, - {"Pb", 6}, {"Bi", 6}, {"Po", 6}, {"At", 6}, {"Rn", 6}, {"Fr", 7}, {"Ra", 7}, {"Ac", 7}, {"Th", 7}, - {"Pa", 7}, {"U", 7}, {"Np", 7}, {"Pu", 7}, {"Am", 7}, {"Cm", 7}, {"Bk", 7}, {"Cf", 7}, {"Es", 7}, - {"Fm", 7}, {"Md", 7}, {"No", 7}, {"Lr", 7}, {"Rf", 7}, {"Db", 7}, {"Sg", 7}, {"Bh", 7}, {"Hs", 7}, - {"Mt", 7}, {"Ds", 7}, {"Rg", 7}, {"Cn", 7}, {"Nh", 7}, {"Fl", 7}, {"Mc", 7}, {"Lv", 7}, {"Ts", 7}, - {"Og", 7} - }; - /// @brief ground state electron configuration, sequence of orbitals in key is in accord with the sequence of n then l - /// @note 1s2s2p3s3p 4s 3d4p5s 4d5p6s 4f5d6p7s 5f6d7p, from NIST periodic table, - /// @details see: https://www.nist.gov/system/files/documents/2019/12/10/nist_periodictable_july2019_crop.pdf - std::map> groundstate_electronconfiguration - = { - // 1s - {"H", {1}}, {"He", {2}}, // 1st period - // 1s 2s - {"Li", {2, 1}}, {"Be", {2, 2}}, // 2nd period - // 1s 2s 2p - {"B", {2, 2, 1}}, {"C", {2, 2, 2}}, {"N", {2, 2, 3}}, {"O", {2, 2, 4}}, {"F", {2, 2, 5}}, {"Ne", {2, 2, 6}}, // 2nd period - // 1s 2s 2p 3s 1s 2s 2p 3s - {"Na", {2, 2, 6, 1}}, {"Mg", {2, 2, 6, 2}}, // 3rd period - // 1s 2s 2p 3s 3p 1s 2s 2p 3s 3p 1s 2s 2p 3s 3p - {"Al", {2, 2, 6, 2, 1}}, {"Si", {2, 2, 6, 2, 2}}, {"P", {2, 2, 6, 2, 3}}, // 3rd period - {"S", {2, 2, 6, 2, 4}}, {"Cl", {2, 2, 6, 2, 5}}, {"Ar", {2, 2, 6, 2, 6}}, // 3rd period - // 1s 2s 2p 3s 3p 3d 4s 1s 2s 2p 3s 3p 3d 4s 1s 2s 2p 3s 3p 3d 4s - {"K", {2, 2, 6, 2, 6, 0, 1}}, {"Ca", {2, 2, 6, 2, 6, 0, 2}}, {"Sc", {2, 2, 6, 2, 6, 1, 2}}, // 4th period - {"Ti", {2, 2, 6, 2, 6, 2, 2}}, {"V", {2, 2, 6, 2, 6, 3, 2}}, {"Cr", {2, 2, 6, 2, 6, 4, 2}}, // 4th period - {"Mn", {2, 2, 6, 2, 6, 5, 2}}, {"Fe", {2, 2, 6, 2, 6, 6, 2}}, {"Co", {2, 2, 6, 2, 6, 7, 2}}, // 4th period - {"Ni", {2, 2, 6, 2, 6, 8, 2}}, {"Cu", {2, 2, 6, 2, 6, 10, 1}}, {"Zn", {2, 2, 6, 2, 6, 10, 2}}, // 4th period - // 1s 2s 2p 3s 3p 3d 4s 4p 1s 2s 2p 3s 3p 3d 4s 4p 1s 2s 2p 3s 3p 3d 4s 4p - {"Ga", {2, 2, 6, 2, 6, 10, 2, 1}}, {"Ge", {2, 2, 6, 2, 6, 10, 2, 2}}, {"As", {2, 2, 6, 2, 6, 10, 2, 3}}, // 4th period - {"Se", {2, 2, 6, 2, 6, 10, 2, 4}}, {"Br", {2, 2, 6, 2, 6, 10, 2, 5}}, {"Kr", {2, 2, 6, 2, 6, 10, 2, 6}}, // 4th period - // 1s 2s 2p 3s 3p 3d 4s 4p 4d 4f 5s 1s 2s 2p 3s 3p 3d 4s 4p 4d 4f 5s 1s 2s 2p 3s 3p 3d 4s 4p 4d 4f 5s - {"Rb", {2, 2, 6, 2, 6, 10, 2, 6, 0, 0, 1}}, {"Sr", {2, 2, 6, 2, 6, 10, 2, 6, 0, 0, 2}}, {"Y", {2, 2, 6, 2, 6, 10, 2, 6, 1, 0, 2}}, // 5th period - {"Zr", {2, 2, 6, 2, 6, 10, 2, 6, 2, 0, 2}}, {"Nb", {2, 2, 6, 2, 6, 10, 2, 6, 4, 0, 1}}, {"Mo", {2, 2, 6, 2, 6, 10, 2, 6, 5, 0, 1}}, // 5th period - {"Tc", {2, 2, 6, 2, 6, 10, 2, 6, 5, 0, 2}}, {"Ru", {2, 2, 6, 2, 6, 10, 2, 6, 7, 0, 1}}, {"Rh", {2, 2, 6, 2, 6, 10, 2, 6, 8, 0, 1}}, // 5th period - {"Pd", {2, 2, 6, 2, 6, 10, 2, 6, 10, 0, 0}}, {"Ag", {2, 2, 6, 2, 6, 10, 2, 6, 10, 0, 1}}, {"Cd", {2, 2, 6, 2, 6, 10, 2, 6, 10, 0, 2}}, // 5th period - // 1s 2s 2p 3s 3p 3d 4s 4p 4d 4f 5s 5p 1s 2s 2p 3s 3p 3d 4s 4p 4d 4f 5s 5p 1s 2s 2p 3s 3p 3d 4s 4p 4d 4f 5s 5p - {"In", {2, 2, 6, 2, 6, 10, 2, 6, 10, 0, 2, 1}}, {"Sn", {2, 2, 6, 2, 6, 10, 2, 6, 10, 0, 2, 2}}, {"Sb", {2, 2, 6, 2, 6, 10, 2, 6, 10, 0, 2, 3}}, // 6th period - {"Te", {2, 2, 6, 2, 6, 10, 2, 6, 10, 0, 2, 4}}, {"I", {2, 2, 6, 2, 6, 10, 2, 6, 10, 0, 2, 5}}, {"Xe", {2, 2, 6, 2, 6, 10, 2, 6, 10, 0, 2, 6}}, // 6th period - // 1s 2s 2p 3s 3p 3d 4s 4p 4d 4f 5s 5p 5d 5f 5g 6s 1s 2s 2p 3s 3p 3d 4s 4p 4d 4f 5s 5p 5d 5f 5g 6s - {"Cs", {2, 2, 6, 2, 6, 10, 2, 6, 10, 0, 2, 6, 0, 0, 0, 1}}, {"Ba", {2, 2, 6, 2, 6, 10, 2, 6, 10, 0, 2, 6, 0, 0, 0, 2}}, // 6th period - {"La", {2, 2, 6, 2, 6, 10, 2, 6, 10, 0, 2, 6, 1, 0, 0, 2}}, {"Ce", {2, 2, 6, 2, 6, 10, 2, 6, 10, 1, 2, 6, 1, 0, 0, 2}}, // 6th period - {"Pr", {2, 2, 6, 2, 6, 10, 2, 6, 10, 3, 2, 6, 0, 0, 0, 2}}, {"Nd", {2, 2, 6, 2, 6, 10, 2, 6, 10, 4, 2, 6, 0, 0, 0, 2}}, // 6th period - {"Pm", {2, 2, 6, 2, 6, 10, 2, 6, 10, 5, 2, 6, 0, 0, 0, 2}}, {"Sm", {2, 2, 6, 2, 6, 10, 2, 6, 10, 6, 2, 6, 0, 0, 0, 2}}, // 6th period - {"Eu", {2, 2, 6, 2, 6, 10, 2, 6, 10, 7, 2, 6, 0, 0, 0, 2}}, {"Gd", {2, 2, 6, 2, 6, 10, 2, 6, 10, 7, 2, 6, 1, 0, 0, 2}}, // 6th period - {"Tb", {2, 2, 6, 2, 6, 10, 2, 6, 10, 9, 2, 6, 0, 0, 0, 2}}, {"Dy", {2, 2, 6, 2, 6, 10, 2, 6, 10, 10, 2, 6, 0, 0, 0, 2}}, // 6th period - {"Ho", {2, 2, 6, 2, 6, 10, 2, 6, 10, 11, 2, 6, 0, 0, 0, 2}}, {"Er", {2, 2, 6, 2, 6, 10, 2, 6, 10, 12, 2, 6, 0, 0, 0, 2}}, // 6th period - {"Tm", {2, 2, 6, 2, 6, 10, 2, 6, 10, 13, 2, 6, 0, 0, 0, 2}}, {"Yb", {2, 2, 6, 2, 6, 10, 2, 6, 10, 14, 2, 6, 0, 0, 0, 2}}, // 6th period - {"Lu", {2, 2, 6, 2, 6, 10, 2, 6, 10, 14, 2, 6, 1, 0, 0, 2}}, {"Hf", {2, 2, 6, 2, 6, 10, 2, 6, 10, 14, 2, 6, 2, 0, 0, 2}}, // 6th period - {"Ta", {2, 2, 6, 2, 6, 10, 2, 6, 10, 14, 2, 6, 3, 0, 0, 2}}, {"W", {2, 2, 6, 2, 6, 10, 2, 6, 10, 14, 2, 6, 4, 0, 0, 2}}, // 6th period - {"Re", {2, 2, 6, 2, 6, 10, 2, 6, 10, 14, 2, 6, 5, 0, 0, 2}}, {"Os", {2, 2, 6, 2, 6, 10, 2, 6, 10, 14, 2, 6, 6, 0, 0, 2}}, // 6th period - {"Ir", {2, 2, 6, 2, 6, 10, 2, 6, 10, 14, 2, 6, 7, 0, 0, 2}}, {"Pt", {2, 2, 6, 2, 6, 10, 2, 6, 10, 14, 2, 6, 9, 0, 0, 1}}, // 6th period - {"Au", {2, 2, 6, 2, 6, 10, 2, 6, 10, 14, 2, 6, 10, 0, 0, 1}}, {"Hg", {2, 2, 6, 2, 6, 10, 2, 6, 10, 14, 2, 6, 10, 0, 0, 2}}, // 6th period - // 1s 2s 2p 3s 3p 3d 4s 4p 4d 4f 5s 5p 5d 5f 5g 6s 6p 1s 2s 2p 3s 3p 3d 4s 4p 4d 4f 5s 5p 5d 5f 5g 6s 6p - {"Tl", {2, 2, 6, 2, 6, 10, 2, 6, 10, 14, 2, 6, 10, 0, 0, 2, 1}}, {"Pb", {2, 2, 6, 2, 6, 10, 2, 6, 10, 14, 2, 6, 10, 0, 0, 2, 2}}, // 6th period - {"Bi", {2, 2, 6, 2, 6, 10, 2, 6, 10, 14, 2, 6, 10, 0, 0, 2, 3}}, {"Po", {2, 2, 6, 2, 6, 10, 2, 6, 10, 14, 2, 6, 10, 0, 0, 2, 4}}, // 6th period - {"At", {2, 2, 6, 2, 6, 10, 2, 6, 10, 14, 2, 6, 10, 0, 0, 2, 5}}, {"Rn", {2, 2, 6, 2, 6, 10, 2, 6, 10, 14, 2, 6, 10, 0, 0, 2, 6}} // 6th period - }; -}; - -#endif \ No newline at end of file diff --git a/source/module_base/blacs_connector.h b/source/module_base/blacs_connector.h deleted file mode 100644 index 61c67324e8..0000000000 --- a/source/module_base/blacs_connector.h +++ /dev/null @@ -1,131 +0,0 @@ -//------------------------------------>8====================================== -// Copyright (c) 2016, Yu Shen (shenyu@ustc.edu.cn) -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// * Neither the name of the nor the -// names of its contributors may be used to endorse or promote products -// derived from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT Yu Shen SHALL BE LIABLE FOR ANY -// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -//====================================8<---------------------------------------- -// blacs - // Initialization -#ifndef BLACS_CONNECTOR_H -#define BLACS_CONNECTOR_H - -#include - -extern "C" -{ - void Cblacs_pinfo(int *myid, int *nprocs); - void Cblacs_get(int icontxt, int what, int *val); - void Cblacs_gridmap(int* icontxt, int *usermap, int ldumap, int nprow, int npcol); - // Informational and Miscellaneous - void Cblacs_gridinfo(int icontxt, int* nprow, int *npcol, int *myprow, int *mypcol); - void Cblacs_gridinit(int* icontxt, char* layout, int nprow, int npcol); - void Cblacs_gridexit(int icontxt); - int Cblacs_pnum(int icontxt, int prow, int pcol); - void Cblacs_pcoord(int icontxt, int pnum, int *prow, int *pcol); - void Cblacs_exit(int icontxt); - - // broadcast (send/recv) - void Cigebs2d(int ConTxt, char *scope, char *top, int m, int n, int *A, int lda); - void Cigebr2d(int ConTxt, char *scope, char *top, int m, int n, int *A, int lda, int rsrc, int csrc); - - void Csgebs2d(int ConTxt, char *scope, char *top, int m, int n, float *A, int lda); - void Csgebr2d(int ConTxt, char *scope, char *top, int m, int n, float *A, int lda, int rsrc, int csrc); - - void Cdgebs2d(int ConTxt, char *scope, char *top, int m, int n, double *A, int lda); - void Cdgebr2d(int ConTxt, char *scope, char *top, int m, int n, double *A, int lda, int rsrc, int csrc); - - void Ccgebs2d(int ConTxt, char *scope, char *top, int m, int n, std::complex *A, int lda); - void Ccgebr2d(int ConTxt, char *scope, char *top, int m, int n, std::complex *A, int lda, int rsrc, int csrc); - - void Czgebs2d(int ConTxt, char *scope, char *top, int m, int n, std::complex *A, int lda); - void Czgebr2d(int ConTxt, char *scope, char *top, int m, int n, std::complex *A, int lda, int rsrc, int csrc); -} - -// unified interface for broadcast -template -void Cxgebs2d(int ConTxt, char *scope, char *top, int m, int n, T *A, int lda) -{ - static_assert( - std::is_same::value || - std::is_same::value || - std::is_same::value || - std::is_same>::value || - std::is_same>::value, - "Type not supported"); - - if (std::is_same::value) { - Cigebs2d(ConTxt, scope, top, m, n, reinterpret_cast(A), lda); - } - if (std::is_same::value) { - Csgebs2d(ConTxt, scope, top, m, n, reinterpret_cast(A), lda); - } - if (std::is_same::value) { - Cdgebs2d(ConTxt, scope, top, m, n, reinterpret_cast(A), lda); - } - if (std::is_same>::value) { - Ccgebs2d(ConTxt, scope, top, m, n, reinterpret_cast*>(A), lda); - } - if (std::is_same>::value) { - Czgebs2d(ConTxt, scope, top, m, n, reinterpret_cast*>(A), lda); - } -} - -template -void Cxgebr2d(int ConTxt, char *scope, char *top, int m, int n, T *A, int lda, int rsrc, int csrc) -{ - static_assert( - std::is_same::value || - std::is_same::value || - std::is_same::value || - std::is_same>::value || - std::is_same>::value, - "Type not supported"); - - if (std::is_same::value) { - Cigebr2d(ConTxt, scope, top, m, n, reinterpret_cast(A), lda, rsrc, csrc); - } - if (std::is_same::value) { - Csgebr2d(ConTxt, scope, top, m, n, reinterpret_cast(A), lda, rsrc, csrc); - } - if (std::is_same::value) { - Cdgebr2d(ConTxt, scope, top, m, n, reinterpret_cast(A), lda, rsrc, csrc); - } - if (std::is_same>::value) { - Ccgebr2d(ConTxt, scope, top, m, n, reinterpret_cast*>(A), lda, rsrc, csrc); - } - if (std::is_same>::value) { - Czgebr2d(ConTxt, scope, top, m, n, reinterpret_cast*>(A), lda, rsrc, csrc); - } -} - - -#ifdef __MPI -#include -extern "C" -{ - int Csys2blacs_handle(MPI_Comm SysCtxt); - MPI_Comm Cblacs2sys_handle(int BlacsCtxt); -} -#endif // __MPI - -#endif diff --git a/source/module_base/blas_connector.h b/source/module_base/blas_connector.h deleted file mode 100644 index 7e988fd1bb..0000000000 --- a/source/module_base/blas_connector.h +++ /dev/null @@ -1,440 +0,0 @@ -#ifndef BLAS_CONNECTOR_H -#define BLAS_CONNECTOR_H - -#include -#include "module_base/module_device/types.h" -#include "macros.h" - -// These still need to be linked in the header file -// Because quite a lot of code will directly use the original cblas kernels. - -extern "C" -{ - // level 1: std::vector-std::vector operations, O(n) data and O(n) work. - - // Peize Lin add ?scal 2016-08-04, to compute x=a*x - void sscal_(const int *N, const float *alpha, float *X, const int *incX); - void dscal_(const int *N, const double *alpha, double *X, const int *incX); - void cscal_(const int *N, const std::complex *alpha, std::complex *X, const int *incX); - void zscal_(const int *N, const std::complex *alpha, std::complex *X, const int *incX); - - // Peize Lin add ?axpy 2016-08-04, to compute y=a*x+y - void saxpy_(const int *N, const float *alpha, const float *X, const int *incX, float *Y, const int *incY); - void daxpy_(const int *N, const double *alpha, const double *X, const int *incX, double *Y, const int *incY); - void caxpy_(const int *N, const std::complex *alpha, const std::complex *X, const int *incX, std::complex *Y, const int *incY); - void zaxpy_(const int *N, const std::complex *alpha, const std::complex *X, const int *incX, std::complex *Y, const int *incY); - - void dcopy_(long const *n, const double *a, int const *incx, double *b, int const *incy); - void zcopy_(long const *n, const std::complex *a, int const *incx, std::complex *b, int const *incy); - - //reason for passing results as argument instead of returning it: - //see https://www.numbercrunch.de/blog/2014/07/lost-in-translation/ - // void zdotc_(std::complex *result, const int *n, const std::complex *zx, - // const int *incx, const std::complex *zy, const int *incy); - // Peize Lin add ?dot 2017-10-27, to compute d=x*y - float sdot_(const int *N, const float *X, const int *incX, const float *Y, const int *incY); - double ddot_(const int *N, const double *X, const int *incX, const double *Y, const int *incY); - - // Peize Lin add ?nrm2 2018-06-12, to compute out = ||x||_2 = \sqrt{ \sum_i x_i**2 } - float snrm2_( const int *n, const float *X, const int *incX ); - double dnrm2_( const int *n, const double *X, const int *incX ); - double dznrm2_( const int *n, const std::complex *X, const int *incX ); - - // symmetric rank-k update - void dsyrk_( - const char* uplo, - const char* trans, - const int* n, - const int* k, - const double* alpha, - const double* a, - const int* lda, - const double* beta, - double* c, - const int* ldc - ); - - // level 2: matrix-std::vector operations, O(n^2) data and O(n^2) work. - void sgemv_(const char*const transa, const int*const m, const int*const n, - const float*const alpha, const float*const a, const int*const lda, const float*const x, const int*const incx, - const float*const beta, float*const y, const int*const incy); - void dgemv_(const char*const transa, const int*const m, const int*const n, - const double*const alpha, const double*const a, const int*const lda, const double*const x, const int*const incx, - const double*const beta, double*const y, const int*const incy); - - void cgemv_(const char *trans, const int *m, const int *n, const std::complex *alpha, - const std::complex *a, const int *lda, const std::complex *x, const int *incx, - const std::complex *beta, std::complex *y, const int *incy); - - void zgemv_(const char *trans, const int *m, const int *n, const std::complex *alpha, - const std::complex *a, const int *lda, const std::complex *x, const int *incx, - const std::complex *beta, std::complex *y, const int *incy); - - void dsymv_(const char *uplo, const int *n, - const double *alpha, const double *a, const int *lda, - const double *x, const int *incx, - const double *beta, double *y, const int *incy); - - // A := alpha x * y.T + A - void dger_(const int* m, - const int* n, - const double* alpha, - const double* x, - const int* incx, - const double* y, - const int* incy, - double* a, - const int* lda); - void zgerc_(const int* m, - const int* n, - const std::complex* alpha, - const std::complex* x, - const int* incx, - const std::complex* y, - const int* incy, - std::complex* a, - const int* lda); - - // level 3: matrix-matrix operations, O(n^2) data and O(n^3) work. - - // Peize Lin add ?gemm 2017-10-27, to compute C = a * A.? * B.? + b * C - // A is general - void sgemm_(const char *transa, const char *transb, const int *m, const int *n, const int *k, - const float *alpha, const float *a, const int *lda, const float *b, const int *ldb, - const float *beta, float *c, const int *ldc); - void dgemm_(const char *transa, const char *transb, const int *m, const int *n, const int *k, - const double *alpha, const double *a, const int *lda, const double *b, const int *ldb, - const double *beta, double *c, const int *ldc); - void cgemm_(const char *transa, const char *transb, const int *m, const int *n, const int *k, - const std::complex *alpha, const std::complex *a, const int *lda, const std::complex *b, const int *ldb, - const std::complex *beta, std::complex *c, const int *ldc); - void zgemm_(const char *transa, const char *transb, const int *m, const int *n, const int *k, - const std::complex *alpha, const std::complex *a, const int *lda, const std::complex *b, const int *ldb, - const std::complex *beta, std::complex *c, const int *ldc); - - // A is symmetric. C = a * A.? * B.? + b * C - void ssymm_(const char *side, const char *uplo, const int *m, const int *n, - const float *alpha, const float *a, const int *lda, const float *b, const int *ldb, - const float *beta, float *c, const int *ldc); - void dsymm_(const char *side, const char *uplo, const int *m, const int *n, - const double *alpha, const double *a, const int *lda, const double *b, const int *ldb, - const double *beta, double *c, const int *ldc); - void csymm_(const char *side, const char *uplo, const int *m, const int *n, - const std::complex *alpha, const std::complex *a, const int *lda, const std::complex *b, const int *ldb, - const std::complex *beta, std::complex *c, const int *ldc); - void zsymm_(const char *side, const char *uplo, const int *m, const int *n, - const std::complex *alpha, const std::complex *a, const int *lda, const std::complex *b, const int *ldb, - const std::complex *beta, std::complex *c, const int *ldc); - - // A is hermitian. C = a * A.? * B.? + b * C - void chemm_(char *side, char *uplo, int *m, int *n,std::complex *alpha, - std::complex *a, int *lda, std::complex *b, int *ldb, std::complex *beta, std::complex *c, int *ldc); - void zhemm_(char *side, char *uplo, int *m, int *n,std::complex *alpha, - std::complex *a, int *lda, std::complex *b, int *ldb, std::complex *beta, std::complex *c, int *ldc); - - //solving triangular matrix with multiple right hand sides - void dtrsm_(char *side, char* uplo, char *transa, char *diag, int *m, int *n, - double* alpha, double* a, int *lda, double*b, int *ldb); - void ztrsm_(char *side, char* uplo, char *transa, char *diag, int *m, int *n, - std::complex* alpha, std::complex* a, int *lda, std::complex*b, int *ldb); - -} - -// Class BlasConnector provide the connector to fortran lapack routine. -// The entire function in this class are static and inline function. -// Usage example: BlasConnector::functionname(parameter list). -class BlasConnector -{ -public: - - // Peize Lin add 2016-08-04 - // y=a*x+y - static - void axpy( const int n, const float alpha, const float *X, const int incX, float *Y, const int incY, base_device::AbacusDevice_t device_type = base_device::AbacusDevice_t::CpuDevice); - - static - void axpy( const int n, const double alpha, const double *X, const int incX, double *Y, const int incY, base_device::AbacusDevice_t device_type = base_device::AbacusDevice_t::CpuDevice); - - static - void axpy( const int n, const std::complex alpha, const std::complex *X, const int incX, std::complex *Y, const int incY, base_device::AbacusDevice_t device_type = base_device::AbacusDevice_t::CpuDevice); - - static - void axpy( const int n, const std::complex alpha, const std::complex *X, const int incX, std::complex *Y, const int incY, base_device::AbacusDevice_t device_type = base_device::AbacusDevice_t::CpuDevice); - - - // Peize Lin add 2016-08-04 - // x=a*x - static - void scal( const int n, const float alpha, float *X, const int incX, base_device::AbacusDevice_t device_type = base_device::AbacusDevice_t::CpuDevice); - - static - void scal( const int n, const double alpha, double *X, const int incX, base_device::AbacusDevice_t device_type = base_device::AbacusDevice_t::CpuDevice); - - static - void scal( const int n, const std::complex alpha, std::complex *X, const int incX, base_device::AbacusDevice_t device_type = base_device::AbacusDevice_t::CpuDevice); - - static - void scal( const int n, const std::complex alpha, std::complex *X, const int incX, base_device::AbacusDevice_t device_type = base_device::AbacusDevice_t::CpuDevice); - - - // Peize Lin add 2017-10-27 - // d=x*y - static - float dot( const int n, const float*const X, const int incX, const float*const Y, const int incY, base_device::AbacusDevice_t device_type = base_device::AbacusDevice_t::CpuDevice); - - static - double dot( const int n, const double*const X, const int incX, const double*const Y, const int incY, base_device::AbacusDevice_t device_type = base_device::AbacusDevice_t::CpuDevice); - - // d=x*y - static - float dotu( const int n, const float*const X, const int incX, const float*const Y, const int incY, base_device::AbacusDevice_t device_type = base_device::AbacusDevice_t::CpuDevice); - - static - double dotu( const int n, const double*const X, const int incX, const double*const Y, const int incY, base_device::AbacusDevice_t device_type = base_device::AbacusDevice_t::CpuDevice); - - static - std::complex dotu( const int n, const std::complex*const X, const int incX, const std::complex*const Y, const int incY, base_device::AbacusDevice_t device_type = base_device::AbacusDevice_t::CpuDevice); - - static - std::complex dotu( const int n, const std::complex*const X, const int incX, const std::complex*const Y, const int incY, base_device::AbacusDevice_t device_type = base_device::AbacusDevice_t::CpuDevice); - - // d=x.conj()*y - static - float dotc( const int n, const float*const X, const int incX, const float*const Y, const int incY, base_device::AbacusDevice_t device_type = base_device::AbacusDevice_t::CpuDevice); - - static - double dotc( const int n, const double*const X, const int incX, const double*const Y, const int incY, base_device::AbacusDevice_t device_type = base_device::AbacusDevice_t::CpuDevice); - - static - std::complex dotc( const int n, const std::complex*const X, const int incX, const std::complex*const Y, const int incY, base_device::AbacusDevice_t device_type = base_device::AbacusDevice_t::CpuDevice); - - static - std::complex dotc( const int n, const std::complex*const X, const int incX, const std::complex*const Y, const int incY, base_device::AbacusDevice_t device_type = base_device::AbacusDevice_t::CpuDevice); - - // Peize Lin add 2017-10-27, fix bug trans 2019-01-17 - // C = a * A.? * B.? + b * C - // Row Major by default - static - void gemm(const char transa, const char transb, const int m, const int n, const int k, - const float alpha, const float *a, const int lda, const float *b, const int ldb, - const float beta, float *c, const int ldc, base_device::AbacusDevice_t device_type = base_device::AbacusDevice_t::CpuDevice); - - static - void gemm(const char transa, const char transb, const int m, const int n, const int k, - const double alpha, const double *a, const int lda, const double *b, const int ldb, - const double beta, double *c, const int ldc, base_device::AbacusDevice_t device_type = base_device::AbacusDevice_t::CpuDevice); - - static - void gemm(const char transa, const char transb, const int m, const int n, const int k, - const std::complex alpha, const std::complex *a, const int lda, const std::complex *b, const int ldb, - const std::complex beta, std::complex *c, const int ldc, base_device::AbacusDevice_t device_type = base_device::AbacusDevice_t::CpuDevice); - - static - void gemm(const char transa, const char transb, const int m, const int n, const int k, - const std::complex alpha, const std::complex *a, const int lda, const std::complex *b, const int ldb, - const std::complex beta, std::complex *c, const int ldc, base_device::AbacusDevice_t device_type = base_device::AbacusDevice_t::CpuDevice); - - // Col-Major if you need to use it - - static - void gemm_cm(const char transa, const char transb, const int m, const int n, const int k, - const float alpha, const float *a, const int lda, const float *b, const int ldb, - const float beta, float *c, const int ldc, base_device::AbacusDevice_t device_type = base_device::AbacusDevice_t::CpuDevice); - - static - void gemm_cm(const char transa, const char transb, const int m, const int n, const int k, - const double alpha, const double *a, const int lda, const double *b, const int ldb, - const double beta, double *c, const int ldc, base_device::AbacusDevice_t device_type = base_device::AbacusDevice_t::CpuDevice); - - static - void gemm_cm(const char transa, const char transb, const int m, const int n, const int k, - const std::complex alpha, const std::complex *a, const int lda, const std::complex *b, const int ldb, - const std::complex beta, std::complex *c, const int ldc, base_device::AbacusDevice_t device_type = base_device::AbacusDevice_t::CpuDevice); - - static - void gemm_cm(const char transa, const char transb, const int m, const int n, const int k, - const std::complex alpha, const std::complex *a, const int lda, const std::complex *b, const int ldb, - const std::complex beta, std::complex *c, const int ldc, base_device::AbacusDevice_t device_type = base_device::AbacusDevice_t::CpuDevice); - - // side=='L': C = a * A * B + b * C. - // side=='R': C = a * B * A + b * C. - // A == A^T - // Because you cannot pack symm or hemm into a row-major kernel by exchanging parameters, so only col-major functions are provided. - static - void symm_cm(const char side, const char uplo, const int m, const int n, - const float alpha, const float *a, const int lda, const float *b, const int ldb, - const float beta, float *c, const int ldc, base_device::AbacusDevice_t device_type = base_device::AbacusDevice_t::CpuDevice); - - static - void symm_cm(const char side, const char uplo, const int m, const int n, - const double alpha, const double *a, const int lda, const double *b, const int ldb, - const double beta, double *c, const int ldc, base_device::AbacusDevice_t device_type = base_device::AbacusDevice_t::CpuDevice); - - static - void symm_cm(const char side, const char uplo, const int m, const int n, - const std::complex alpha, const std::complex *a, const int lda, const std::complex *b, const int ldb, - const std::complex beta, std::complex *c, const int ldc, base_device::AbacusDevice_t device_type = base_device::AbacusDevice_t::CpuDevice); - - static - void symm_cm(const char side, const char uplo, const int m, const int n, - const std::complex alpha, const std::complex *a, const int lda, const std::complex *b, const int ldb, - const std::complex beta, std::complex *c, const int ldc, base_device::AbacusDevice_t device_type = base_device::AbacusDevice_t::CpuDevice); - - // side=='L': C = a * A * B + b * C. - // side=='R': C = a * B * A + b * C. - // A == A^H - static - void hemm_cm(const char side, const char uplo, const int m, const int n, - const float alpha, const float *a, const int lda, const float *b, const int ldb, - const float beta, float *c, const int ldc, base_device::AbacusDevice_t device_type = base_device::AbacusDevice_t::CpuDevice); - - static - void hemm_cm(const char side, const char uplo, const int m, const int n, - const double alpha, const double *a, const int lda, const double *b, const int ldb, - const double beta, double *c, const int ldc, base_device::AbacusDevice_t device_type = base_device::AbacusDevice_t::CpuDevice); - - static - void hemm_cm(char side, char uplo, int m, int n, - std::complex alpha, std::complex *a, int lda, std::complex *b, int ldb, - std::complex beta, std::complex *c, int ldc, base_device::AbacusDevice_t device_type = base_device::AbacusDevice_t::CpuDevice); - - static - void hemm_cm(char side, char uplo, int m, int n, - std::complex alpha, std::complex *a, int lda, std::complex *b, int ldb, - std::complex beta, std::complex *c, int ldc, base_device::AbacusDevice_t device_type = base_device::AbacusDevice_t::CpuDevice); - - // y = A*x + beta*y - static - void gemv(const char trans, const int m, const int n, - const float alpha, const float* A, const int lda, const float* X, const int incx, - const float beta, float* Y, const int incy, base_device::AbacusDevice_t device_type = base_device::AbacusDevice_t::CpuDevice); - - static - void gemv(const char trans, const int m, const int n, - const double alpha, const double* A, const int lda, const double* X, const int incx, - const double beta, double* Y, const int incy, base_device::AbacusDevice_t device_type = base_device::AbacusDevice_t::CpuDevice); - - static - void gemv(const char trans, const int m, const int n, - const std::complex alpha, const std::complex *A, const int lda, const std::complex *X, const int incx, - const std::complex beta, std::complex *Y, const int incy, base_device::AbacusDevice_t device_type = base_device::AbacusDevice_t::CpuDevice); - - static - void gemv(const char trans, const int m, const int n, - const std::complex alpha, const std::complex *A, const int lda, const std::complex *X, const int incx, - const std::complex beta, std::complex *Y, const int incy, base_device::AbacusDevice_t device_type = base_device::AbacusDevice_t::CpuDevice); - - // Peize Lin add 2018-06-12 - // out = ||x||_2 - static - float nrm2( const int n, const float *X, const int, base_device::AbacusDevice_t device_type = base_device::AbacusDevice_t::CpuDevice ); - - static - double nrm2( const int n, const double *X, const int incX, base_device::AbacusDevice_t device_type = base_device::AbacusDevice_t::CpuDevice ); - - static - double nrm2( const int n, const std::complex *X, const int incX, base_device::AbacusDevice_t device_type = base_device::AbacusDevice_t::CpuDevice ); - - - // copies a into b - static - void copy(const long n, const double *a, const int incx, double *b, const int incy, base_device::AbacusDevice_t device_type = base_device::AbacusDevice_t::CpuDevice); - - static - void copy(const long n, const std::complex *a, const int incx, std::complex *b, const int incy, base_device::AbacusDevice_t device_type = base_device::AbacusDevice_t::CpuDevice); - - // There is some other operators needed, so implemented manually here - template - static - void vector_mul_vector(const int& dim, T* result, const T* vector1, const T* vector2, base_device::AbacusDevice_t device_type = base_device::AbacusDevice_t::CpuDevice); - - template - static - void vector_div_vector(const int& dim, T* result, const T* vector1, const T* vector2, base_device::AbacusDevice_t device_type = base_device::AbacusDevice_t::CpuDevice); - - // y = alpha * x + beta * y - static - void vector_add_vector(const int& dim, float *result, const float *vector1, const float constant1, const float *vector2, const float constant2, base_device::AbacusDevice_t device_type = base_device::AbacusDevice_t::CpuDevice); - - static - void vector_add_vector(const int& dim, double *result, const double *vector1, const double constant1, const double *vector2, const double constant2, base_device::AbacusDevice_t device_type = base_device::AbacusDevice_t::CpuDevice); - - static - void vector_add_vector(const int& dim, std::complex *result, const std::complex *vector1, const float constant1, const std::complex *vector2, const float constant2, base_device::AbacusDevice_t device_type = base_device::AbacusDevice_t::CpuDevice); - - static - void vector_add_vector(const int& dim, std::complex *result, const std::complex *vector1, const double constant1, const std::complex *vector2, const double constant2, base_device::AbacusDevice_t device_type = base_device::AbacusDevice_t::CpuDevice); -}; - -#ifdef __CUDA - -#include -#include "cublas_v2.h" - -// If you want to use cublas, you need these functions to create and destroy the cublas/hipblas handle. -// You also need to use these functions to translate the transpose parameter into cublas/hipblas datatype. - -namespace BlasUtils{ - - static cublasHandle_t cublas_handle = nullptr; - - void createGpuBlasHandle(); // Create a cublas/hipblas handle. - - void destoryBLAShandle(); // Destroy the cublas/hipblas handle. Do this when the software is about to end. - - cublasOperation_t judge_trans(bool is_complex, const char& trans, const char* name); // Translate a normal transpose parameter to a cublas/hipblas type. - - cublasSideMode_t judge_side(const char& trans); // Translate a normal side parameter to a cublas/hipblas type. - - cublasFillMode_t judge_fill(const char& trans); // Translate a normal fill parameter to a cublas/hipblas type. - -} - -#endif - -// If GATHER_INFO is defined, the original function is replaced with a "i" suffix, -// preventing changes on the original code. -// The real function call is at gather_math_lib_info.cpp -#ifdef GATHER_INFO - -#define zgemm_ zgemm_i -void zgemm_i(const char *transa, - const char *transb, - const int *m, - const int *n, - const int *k, - const std::complex *alpha, - const std::complex *a, - const int *lda, - const std::complex *b, - const int *ldb, - const std::complex *beta, - std::complex *c, - const int *ldc); - -#define zaxpy_ zaxpy_i -void zaxpy_i(const int *N, - const std::complex *alpha, - const std::complex *X, - const int *incX, - std::complex *Y, - const int *incY); - -/* -#define zgemv_ zgemv_i - -void zgemv_i(const char *trans, - const int *m, - const int *n, - const std::complex *alpha, - const std::complex *a, - const int *lda, - const std::complex *x, - const int *incx, - const std::complex *beta, - std::complex *y, - const int *incy); -*/ - -#endif // GATHER_INFO -#endif // BLAS_CONNECTOR_H diff --git a/source/module_base/blas_connector_base.cpp b/source/module_base/blas_connector_base.cpp deleted file mode 100644 index 1d1a81db94..0000000000 --- a/source/module_base/blas_connector_base.cpp +++ /dev/null @@ -1,77 +0,0 @@ -#include "blas_connector.h" -#include "macros.h" - -#ifdef __CUDA -#include -#include -#include "cublas_v2.h" -#include "module_base/kernels/math_kernel_op.h" -#include "module_base/module_device/memory_op.h" - - -namespace BlasUtils{ - - void createGpuBlasHandle(){ - if (cublas_handle == nullptr) { - cublasErrcheck(cublasCreate(&cublas_handle)); - } - } - - void destoryBLAShandle(){ - if (cublas_handle != nullptr) { - cublasErrcheck(cublasDestroy(cublas_handle)); - cublas_handle = nullptr; - } - } - - - cublasOperation_t judge_trans(bool is_complex, const char& trans, const char* name) - { - if (trans == 'N') - { - return CUBLAS_OP_N; - } - else if(trans == 'T') - { - return CUBLAS_OP_T; - } - else if(is_complex && trans == 'C') - { - return CUBLAS_OP_C; - } - return CUBLAS_OP_N; - } - - cublasSideMode_t judge_side(const char& trans) - { - if (trans == 'L') - { - return CUBLAS_SIDE_LEFT; - } - else if (trans == 'R') - { - return CUBLAS_SIDE_RIGHT; - } - return CUBLAS_SIDE_LEFT; - } - - cublasFillMode_t judge_fill(const char& trans) - { - if (trans == 'F') - { - return CUBLAS_FILL_MODE_FULL; - } - else if (trans == 'U') - { - return CUBLAS_FILL_MODE_UPPER; - } - else if (trans == 'D') - { - return CUBLAS_FILL_MODE_LOWER; - } - return CUBLAS_FILL_MODE_FULL; - } - -} // namespace BlasUtils - -#endif \ No newline at end of file diff --git a/source/module_base/blas_connector_matrix.cpp b/source/module_base/blas_connector_matrix.cpp deleted file mode 100644 index 9beb7a7d59..0000000000 --- a/source/module_base/blas_connector_matrix.cpp +++ /dev/null @@ -1,575 +0,0 @@ -#include "blas_connector.h" -#include "macros.h" - -#ifdef __DSP -#include "module_base/kernels/dsp/dsp_connector.h" -#include "module_base/global_variable.h" -#endif - -#ifdef __CUDA -#include -#include -#include "cublas_v2.h" -#include "module_base/kernels/math_kernel_op.h" -#include "module_base/module_device/memory_op.h" -#endif - - -// C = a * A.? * B.? + b * C -// Row-Major part -void BlasConnector::gemm(const char transa, const char transb, const int m, const int n, const int k, - const float alpha, const float *a, const int lda, const float *b, const int ldb, - const float beta, float *c, const int ldc, base_device::AbacusDevice_t device_type) -{ - if (device_type == base_device::AbacusDevice_t::CpuDevice) { - sgemm_(&transb, &transa, &n, &m, &k, - &alpha, b, &ldb, a, &lda, - &beta, c, &ldc); - } -#ifdef __DSP - else if (device_type == base_device::AbacusDevice_t::DspDevice){ - mtfunc::sgemm_mth_(&transb, &transa, &n, &m, &k, - &alpha, b, &ldb, a, &lda, - &beta, c, &ldc, GlobalV::MY_RANK); - } -#endif -#ifdef __CUDA - else if (device_type == base_device::AbacusDevice_t::GpuDevice) { - cublasOperation_t cutransA = BlasUtils::judge_trans(false, transa, "gemm_op"); - cublasOperation_t cutransB = BlasUtils::judge_trans(false, transb, "gemm_op"); - cublasErrcheck(cublasSgemm(BlasUtils::cublas_handle, cutransA, cutransB, n, m, k, &alpha, b, ldb, a, lda, &beta, c, ldc)); - } -#endif - else { - throw std::invalid_argument("device_type = " + std::to_string(device_type) + " in " + std::string(__FILE__) + " line " + std::to_string(__LINE__)); - } -} - -void BlasConnector::gemm(const char transa, - const char transb, - const int m, - const int n, - const int k, - const double alpha, - const double* a, - const int lda, - const double* b, - const int ldb, - const double beta, - double* c, - const int ldc, - base_device::AbacusDevice_t device_type) -{ - if (device_type == base_device::AbacusDevice_t::CpuDevice) - { - dgemm_(&transb, &transa, &n, &m, &k, &alpha, b, &ldb, a, &lda, &beta, c, &ldc); - } -#ifdef __DSP - else if (device_type == base_device::AbacusDevice_t::DspDevice) - { - mtfunc::dgemm_mth_(&transb, &transa, &n, &m, &k, &alpha, b, &ldb, a, &lda, &beta, c, &ldc, GlobalV::MY_RANK); - } -#endif - else if (device_type == base_device::AbacusDevice_t::GpuDevice) - { -#ifdef __CUDA - cublasOperation_t cutransA = BlasUtils::judge_trans(false, transa, "gemm_op"); - cublasOperation_t cutransB = BlasUtils::judge_trans(false, transb, "gemm_op"); - cublasErrcheck( - cublasDgemm(BlasUtils::cublas_handle, cutransA, cutransB, n, m, k, &alpha, b, ldb, a, lda, &beta, c, ldc)); -#endif - } - else { - throw std::invalid_argument("device_type = " + std::to_string(device_type) + " in " + std::string(__FILE__) + " line " + std::to_string(__LINE__)); - } -} - -void BlasConnector::gemm(const char transa, - const char transb, - const int m, - const int n, - const int k, - const std::complex alpha, - const std::complex* a, - const int lda, - const std::complex* b, - const int ldb, - const std::complex beta, - std::complex* c, - const int ldc, - base_device::AbacusDevice_t device_type) -{ - if (device_type == base_device::AbacusDevice_t::CpuDevice) - { - cgemm_(&transb, &transa, &n, &m, &k, &alpha, b, &ldb, a, &lda, &beta, c, &ldc); - } -#ifdef __DSP - else if (device_type == base_device::AbacusDevice_t::DspDevice) - { - mtfunc::cgemm_mth_(&transb, &transa, &n, &m, &k, &alpha, b, &ldb, a, &lda, &beta, c, &ldc, GlobalV::MY_RANK); - } -#endif - else if (device_type == base_device::AbacusDevice_t::GpuDevice) - { -#ifdef __CUDA - cublasOperation_t cutransA = BlasUtils::judge_trans(false, transa, "gemm_op"); - cublasOperation_t cutransB = BlasUtils::judge_trans(false, transb, "gemm_op"); - cublasErrcheck(cublasCgemm(BlasUtils::cublas_handle, - cutransA, - cutransB, - n, - m, - k, - (float2*)&alpha, - (float2*)b, - ldb, - (float2*)a, - lda, - (float2*)&beta, - (float2*)c, - ldc)); -#endif - } - else { - throw std::invalid_argument("device_type = " + std::to_string(device_type) + " in " + std::string(__FILE__) + " line " + std::to_string(__LINE__)); - } -} - -void BlasConnector::gemm(const char transa, - const char transb, - const int m, - const int n, - const int k, - const std::complex alpha, - const std::complex* a, - const int lda, - const std::complex* b, - const int ldb, - const std::complex beta, - std::complex* c, - const int ldc, - base_device::AbacusDevice_t device_type) -{ - if (device_type == base_device::AbacusDevice_t::CpuDevice) - { - zgemm_(&transb, &transa, &n, &m, &k, &alpha, b, &ldb, a, &lda, &beta, c, &ldc); - } -#ifdef __DSP - else if (device_type == base_device::AbacusDevice_t::DspDevice) - { - mtfunc::zgemm_mth_(&transb, &transa, &n, &m, &k, &alpha, b, &ldb, a, &lda, &beta, c, &ldc, GlobalV::MY_RANK); - } -#endif - else if (device_type == base_device::AbacusDevice_t::GpuDevice) - { -#ifdef __CUDA - cublasOperation_t cutransA = BlasUtils::judge_trans(false, transa, "gemm_op"); - cublasOperation_t cutransB = BlasUtils::judge_trans(false, transb, "gemm_op"); - cublasErrcheck(cublasZgemm(BlasUtils::cublas_handle, - cutransA, - cutransB, - n, - m, - k, - (double2*)&alpha, - (double2*)b, - ldb, - (double2*)a, - lda, - (double2*)&beta, - (double2*)c, - ldc)); -#endif - } - else { - throw std::invalid_argument("device_type = " + std::to_string(device_type) + " in " + std::string(__FILE__) + " line " + std::to_string(__LINE__)); - } -} - -// Col-Major part -void BlasConnector::gemm_cm(const char transa, const char transb, const int m, const int n, const int k, - const float alpha, const float *a, const int lda, const float *b, const int ldb, - const float beta, float *c, const int ldc, base_device::AbacusDevice_t device_type) -{ - if (device_type == base_device::AbacusDevice_t::CpuDevice) { - sgemm_(&transa, &transb, &m, &n, &k, - &alpha, a, &lda, b, &ldb, - &beta, c, &ldc); - } -#ifdef __DSP - else if (device_type == base_device::AbacusDevice_t::DspDevice){ - mtfunc::sgemm_mth_(&transb, &transa, &m, &n, &k, - &alpha, a, &lda, b, &ldb, - &beta, c, &ldc, GlobalV::MY_RANK); - } -#endif -#ifdef __CUDA - else if (device_type == base_device::AbacusDevice_t::GpuDevice) { - cublasOperation_t cutransA = BlasUtils::judge_trans(false, transa, "gemm_op"); - cublasOperation_t cutransB = BlasUtils::judge_trans(false, transb, "gemm_op"); - cublasErrcheck(cublasSgemm(BlasUtils::cublas_handle, cutransA, cutransB, m, n, k, &alpha, a, lda, b, ldb, &beta, c, ldc)); - } -#endif - else { - throw std::invalid_argument("device_type = " + std::to_string(device_type) + " in " + std::string(__FILE__) + " line " + std::to_string(__LINE__)); - } -} - -void BlasConnector::gemm_cm(const char transa, - const char transb, - const int m, - const int n, - const int k, - const double alpha, - const double* a, - const int lda, - const double* b, - const int ldb, - const double beta, - double* c, - const int ldc, - base_device::AbacusDevice_t device_type) -{ - if (device_type == base_device::AbacusDevice_t::CpuDevice) - { - dgemm_(&transa, &transb, &m, &n, &k, &alpha, a, &lda, b, &ldb, &beta, c, &ldc); - } -#ifdef __DSP - else if (device_type == base_device::AbacusDevice_t::DspDevice) - { - mtfunc::dgemm_mth_(&transa, &transb, &m, &n, &k, &alpha, a, &lda, b, &ldb, &beta, c, &ldc, GlobalV::MY_RANK); - } -#endif -#ifdef __CUDA - else if (device_type == base_device::AbacusDevice_t::GpuDevice) - { - cublasOperation_t cutransA = BlasUtils::judge_trans(false, transa, "gemm_op"); - cublasOperation_t cutransB = BlasUtils::judge_trans(false, transb, "gemm_op"); - cublasErrcheck( - cublasDgemm(BlasUtils::cublas_handle, cutransA, cutransB, m, n, k, &alpha, a, lda, b, ldb, &beta, c, ldc)); - } -#endif - else { - throw std::invalid_argument("device_type = " + std::to_string(device_type) + " in " + std::string(__FILE__) + " line " + std::to_string(__LINE__)); - } -} - -void BlasConnector::gemm_cm(const char transa, - const char transb, - const int m, - const int n, - const int k, - const std::complex alpha, - const std::complex* a, - const int lda, - const std::complex* b, - const int ldb, - const std::complex beta, - std::complex* c, - const int ldc, - base_device::AbacusDevice_t device_type) -{ - if (device_type == base_device::AbacusDevice_t::CpuDevice) - { - cgemm_(&transa, &transb, &m, &n, &k, &alpha, a, &lda, b, &ldb, &beta, c, &ldc); - } -#ifdef __DSP - else if (device_type == base_device::AbacusDevice_t::DspDevice) - { - mtfunc::cgemm_mth_(&transa, &transb, &m, &n, &k, &alpha, a, &lda, b, &ldb, &beta, c, &ldc, GlobalV::MY_RANK); - } -#endif -#ifdef __CUDA - else if (device_type == base_device::AbacusDevice_t::GpuDevice) - { - cublasOperation_t cutransA = BlasUtils::judge_trans(false, transa, "gemm_op"); - cublasOperation_t cutransB = BlasUtils::judge_trans(false, transb, "gemm_op"); - cublasErrcheck(cublasCgemm(BlasUtils::cublas_handle, - cutransA, - cutransB, - m, - n, - k, - (float2*)&alpha, - (float2*)a, - lda, - (float2*)b, - ldb, - (float2*)&beta, - (float2*)c, - ldc)); - } -#endif - else { - throw std::invalid_argument("device_type = " + std::to_string(device_type) + " in " + std::string(__FILE__) + " line " + std::to_string(__LINE__)); - } -} - -void BlasConnector::gemm_cm(const char transa, - const char transb, - const int m, - const int n, - const int k, - const std::complex alpha, - const std::complex* a, - const int lda, - const std::complex* b, - const int ldb, - const std::complex beta, - std::complex* c, - const int ldc, - base_device::AbacusDevice_t device_type) -{ - if (device_type == base_device::AbacusDevice_t::CpuDevice) - { - zgemm_(&transa, &transb, &m, &n, &k, &alpha, a, &lda, b, &ldb, &beta, c, &ldc); - } -#ifdef __DSP - else if (device_type == base_device::AbacusDevice_t::DspDevice) - { - mtfunc::zgemm_mth_(&transa, &transb, &m, &n, &k, &alpha, a, &lda, b, &ldb, &beta, c, &ldc, GlobalV::MY_RANK); - } -#endif -#ifdef __CUDA - else if (device_type == base_device::AbacusDevice_t::GpuDevice) - { - cublasOperation_t cutransA = BlasUtils::judge_trans(false, transa, "gemm_op"); - cublasOperation_t cutransB = BlasUtils::judge_trans(false, transb, "gemm_op"); - cublasErrcheck(cublasZgemm(BlasUtils::cublas_handle, - cutransA, - cutransB, - m, - n, - k, - (double2*)&alpha, - (double2*)a, - lda, - (double2*)b, - ldb, - (double2*)&beta, - (double2*)c, - ldc)); - } -#endif - else { - throw std::invalid_argument("device_type = " + std::to_string(device_type) + " in " + std::string(__FILE__) + " line " + std::to_string(__LINE__)); - } -} - -// Symm and Hemm part. Only col-major is supported. - -void BlasConnector::symm_cm(const char side, const char uplo, const int m, const int n, - const float alpha, const float *a, const int lda, const float *b, const int ldb, - const float beta, float *c, const int ldc, base_device::AbacusDevice_t device_type) -{ - if (device_type == base_device::AbacusDevice_t::CpuDevice) { - ssymm_(&side, &uplo, &m, &n, - &alpha, a, &lda, b, &ldb, - &beta, c, &ldc); - } -#ifdef __CUDA - else if (device_type == base_device::AbacusDevice_t::GpuDevice) { - cublasSideMode_t sideMode = BlasUtils::judge_side(side); - cublasFillMode_t fillMode = BlasUtils::judge_fill(uplo); - cublasErrcheck(cublasSsymm(BlasUtils::cublas_handle, sideMode, fillMode, m, n, &alpha, a, lda, b, ldb, &beta, c, ldc)); - } -#endif - else { - throw std::invalid_argument("device_type = " + std::to_string(device_type) + " in " + std::string(__FILE__) + " line " + std::to_string(__LINE__)); - } -} - -void BlasConnector::symm_cm(const char side, const char uplo, const int m, const int n, - const double alpha, const double *a, const int lda, const double *b, const int ldb, - const double beta, double *c, const int ldc, base_device::AbacusDevice_t device_type) -{ - if (device_type == base_device::AbacusDevice_t::CpuDevice) { - dsymm_(&side, &uplo, &m, &n, - &alpha, a, &lda, b, &ldb, - &beta, c, &ldc); - } -#ifdef __CUDA - else if (device_type == base_device::AbacusDevice_t::GpuDevice) { - cublasSideMode_t sideMode = BlasUtils::judge_side(side); - cublasFillMode_t fillMode = BlasUtils::judge_fill(uplo); - cublasErrcheck(cublasDsymm(BlasUtils::cublas_handle, sideMode, fillMode, m, n, &alpha, a, lda, b, ldb, &beta, c, ldc)); - } -#endif - else { - throw std::invalid_argument("device_type = " + std::to_string(device_type) + " in " + std::string(__FILE__) + " line " + std::to_string(__LINE__)); - } -} - -void BlasConnector::symm_cm(const char side, const char uplo, const int m, const int n, - const std::complex alpha, const std::complex *a, const int lda, const std::complex *b, const int ldb, - const std::complex beta, std::complex *c, const int ldc, base_device::AbacusDevice_t device_type) -{ - if (device_type == base_device::AbacusDevice_t::CpuDevice) { - csymm_(&side, &uplo, &m, &n, - &alpha, a, &lda, b, &ldb, - &beta, c, &ldc); - } -#ifdef __CUDA - else if (device_type == base_device::AbacusDevice_t::GpuDevice) { - cublasSideMode_t sideMode = BlasUtils::judge_side(side); - cublasFillMode_t fillMode = BlasUtils::judge_fill(uplo); - cublasErrcheck(cublasCsymm(BlasUtils::cublas_handle, sideMode, fillMode, m, n, (float2*)&alpha, (float2*)a, lda, (float2*)b, ldb, (float2*)&beta, (float2*)c, ldc)); - } -#endif - else { - throw std::invalid_argument("device_type = " + std::to_string(device_type) + " in " + std::string(__FILE__) + " line " + std::to_string(__LINE__)); - } -} - -void BlasConnector::symm_cm(const char side, const char uplo, const int m, const int n, - const std::complex alpha, const std::complex *a, const int lda, const std::complex *b, const int ldb, - const std::complex beta, std::complex *c, const int ldc, base_device::AbacusDevice_t device_type) -{ - if (device_type == base_device::AbacusDevice_t::CpuDevice) { - zsymm_(&side, &uplo, &m, &n, - &alpha, a, &lda, b, &ldb, - &beta, c, &ldc); - } -#ifdef __CUDA - else if (device_type == base_device::AbacusDevice_t::GpuDevice) { - cublasSideMode_t sideMode = BlasUtils::judge_side(side); - cublasFillMode_t fillMode = BlasUtils::judge_fill(uplo); - cublasErrcheck(cublasZsymm(BlasUtils::cublas_handle, sideMode, fillMode, m, n, (double2*)&alpha, (double2*)a, lda, (double2*)b, ldb, (double2*)&beta, (double2*)c, ldc)); - } -#endif - else { - throw std::invalid_argument("device_type = " + std::to_string(device_type) + " in " + std::string(__FILE__) + " line " + std::to_string(__LINE__)); - } -} - -void BlasConnector::hemm_cm(const char side, const char uplo, const int m, const int n, - const float alpha, const float *a, const int lda, const float *b, const int ldb, - const float beta, float *c, const int ldc, base_device::AbacusDevice_t device_type) -{ - symm_cm(side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc, device_type); -} - -void BlasConnector::hemm_cm(const char side, const char uplo, const int m, const int n, - const double alpha, const double *a, const int lda, const double *b, const int ldb, - const double beta, double *c, const int ldc, base_device::AbacusDevice_t device_type) -{ - symm_cm(side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc, device_type); -} - -void BlasConnector::hemm_cm(char side, char uplo, int m, int n, - std::complex alpha, std::complex *a, int lda, std::complex *b, int ldb, - std::complex beta, std::complex *c, int ldc, base_device::AbacusDevice_t device_type) -{ - if (device_type == base_device::AbacusDevice_t::CpuDevice) { - chemm_(&side, &uplo, &m, &n, - &alpha, a, &lda, b, &ldb, - &beta, c, &ldc); - } -#ifdef __CUDA - else if (device_type == base_device::AbacusDevice_t::GpuDevice) { - cublasSideMode_t sideMode = BlasUtils::judge_side(side); - cublasFillMode_t fillMode = BlasUtils::judge_fill(uplo); - cublasErrcheck(cublasChemm(BlasUtils::cublas_handle, sideMode, fillMode, m, n, (float2*)&alpha, (float2*)a, lda, (float2*)b, ldb, (float2*)&beta, (float2*)c, ldc)); - } -#endif - else { - throw std::invalid_argument("device_type = " + std::to_string(device_type) + " in " + std::string(__FILE__) + " line " + std::to_string(__LINE__)); - } -} - -void BlasConnector::hemm_cm(char side, char uplo, int m, int n, - std::complex alpha, std::complex *a, int lda, std::complex *b, int ldb, - std::complex beta, std::complex *c, int ldc, base_device::AbacusDevice_t device_type) -{ - if (device_type == base_device::AbacusDevice_t::CpuDevice) { - zhemm_(&side, &uplo, &m, &n, - &alpha, a, &lda, b, &ldb, - &beta, c, &ldc); - } -#ifdef __CUDA - else if (device_type == base_device::AbacusDevice_t::GpuDevice) { - cublasSideMode_t sideMode = BlasUtils::judge_side(side); - cublasFillMode_t fillMode = BlasUtils::judge_fill(uplo); - cublasErrcheck(cublasZhemm(BlasUtils::cublas_handle, sideMode, fillMode, m, n, (double2*)&alpha, (double2*)a, lda, (double2*)b, ldb, (double2*)&beta, (double2*)c, ldc)); - } -#endif - else { - throw std::invalid_argument("device_type = " + std::to_string(device_type) + " in " + std::string(__FILE__) + " line " + std::to_string(__LINE__)); - } -} - -void BlasConnector::gemv(const char trans, const int m, const int n, - const float alpha, const float* A, const int lda, const float* X, const int incx, - const float beta, float* Y, const int incy, base_device::AbacusDevice_t device_type) -{ - if (device_type == base_device::AbacusDevice_t::CpuDevice) { - sgemv_(&trans, &m, &n, &alpha, A, &lda, X, &incx, &beta, Y, &incy); - } -#ifdef __CUDA - else if (device_type == base_device::AbacusDevice_t::GpuDevice) { - cublasOperation_t cutransA = BlasUtils::judge_trans(false, trans, "gemv_op"); - cublasErrcheck(cublasSgemv(BlasUtils::cublas_handle, cutransA, m, n, &alpha, A, lda, X, incx, &beta, Y, incy)); - } -#endif - else { - throw std::invalid_argument("device_type = " + std::to_string(device_type) + " in " + std::string(__FILE__) + " line " + std::to_string(__LINE__)); - } -} - -void BlasConnector::gemv(const char trans, const int m, const int n, - const double alpha, const double* A, const int lda, const double* X, const int incx, - const double beta, double* Y, const int incy, base_device::AbacusDevice_t device_type) -{ - if (device_type == base_device::AbacusDevice_t::CpuDevice) { - dgemv_(&trans, &m, &n, &alpha, A, &lda, X, &incx, &beta, Y, &incy); - } -#ifdef __CUDA - else if (device_type == base_device::AbacusDevice_t::GpuDevice) { - cublasOperation_t cutransA = BlasUtils::judge_trans(false, trans, "gemv_op"); - cublasErrcheck(cublasDgemv(BlasUtils::cublas_handle, cutransA, m, n, &alpha, A, lda, X, incx, &beta, Y, incy)); - } -#endif - else { - throw std::invalid_argument("device_type = " + std::to_string(device_type) + " in " + std::string(__FILE__) + " line " + std::to_string(__LINE__)); - } -} - -void BlasConnector::gemv(const char trans, const int m, const int n, - const std::complex alpha, const std::complex *A, const int lda, const std::complex *X, const int incx, - const std::complex beta, std::complex *Y, const int incy, base_device::AbacusDevice_t device_type) -{ - if (device_type == base_device::AbacusDevice_t::CpuDevice) { - cgemv_(&trans, &m, &n, &alpha, A, &lda, X, &incx, &beta, Y, &incy); - } -#ifdef __CUDA - else if (device_type == base_device::AbacusDevice_t::GpuDevice) { - cuFloatComplex alpha_cu = make_cuFloatComplex(alpha.real(), alpha.imag()); - cuFloatComplex beta_cu = make_cuFloatComplex(beta.real(), beta.imag()); - cublasOperation_t cutransA = BlasUtils::judge_trans(true, trans, "gemv_op"); - cublasErrcheck(cublasCgemv(BlasUtils::cublas_handle, cutransA, m, n, &alpha_cu, (cuFloatComplex*)A, lda, (cuFloatComplex*)X, incx, &beta_cu, (cuFloatComplex*)Y, incy)); - } -#endif - else { - throw std::invalid_argument("device_type = " + std::to_string(device_type) + " in " + std::string(__FILE__) + " line " + std::to_string(__LINE__)); - } -} - -void BlasConnector::gemv(const char trans, const int m, const int n, - const std::complex alpha, const std::complex *A, const int lda, const std::complex *X, const int incx, - const std::complex beta, std::complex *Y, const int incy, base_device::AbacusDevice_t device_type) -{ - if (device_type == base_device::AbacusDevice_t::CpuDevice) { - zgemv_(&trans, &m, &n, &alpha, A, &lda, X, &incx, &beta, Y, &incy); - } -#ifdef __CUDA - else if (device_type == base_device::AbacusDevice_t::GpuDevice) { - cuDoubleComplex alpha_cu = make_cuDoubleComplex(alpha.real(), alpha.imag()); - cuDoubleComplex beta_cu = make_cuDoubleComplex(beta.real(), beta.imag()); - cublasOperation_t cutransA = BlasUtils::judge_trans(true, trans, "gemv_op"); - cublasErrcheck(cublasZgemv(BlasUtils::cublas_handle, cutransA, m, n, &alpha_cu, (cuDoubleComplex*)A, lda, (cuDoubleComplex*)X, incx, &beta_cu, (cuDoubleComplex*)Y, incy)); - } -#endif - else { - throw std::invalid_argument("device_type = " + std::to_string(device_type) + " in " + std::string(__FILE__) + " line " + std::to_string(__LINE__)); - } -} \ No newline at end of file diff --git a/source/module_base/blas_connector_vector.cpp b/source/module_base/blas_connector_vector.cpp deleted file mode 100644 index e87394b652..0000000000 --- a/source/module_base/blas_connector_vector.cpp +++ /dev/null @@ -1,473 +0,0 @@ -#include "blas_connector.h" -#include "macros.h" - -#ifdef __DSP -#include "module_base/kernels/dsp/dsp_connector.h" -#include "module_base/global_variable.h" -#endif - -#ifdef __CUDA -#include -#include -#include "cublas_v2.h" -#include "module_base/kernels/math_kernel_op.h" -#include "module_base/module_device/memory_op.h" -#endif - - -void BlasConnector::axpy( const int n, const float alpha, const float *X, const int incX, float *Y, const int incY, base_device::AbacusDevice_t device_type) -{ - if (device_type == base_device::AbacusDevice_t::CpuDevice) { - saxpy_(&n, &alpha, X, &incX, Y, &incY); - } -#ifdef __CUDA - else if (device_type == base_device::AbacusDevice_t::GpuDevice) { - cublasErrcheck(cublasSaxpy(BlasUtils::cublas_handle, n, &alpha, X, incX, Y, incY)); - } -#endif - else { - throw std::invalid_argument("device_type = " + std::to_string(device_type) + " in " + std::string(__FILE__) + " line " + std::to_string(__LINE__)); - } -} - -void BlasConnector::axpy( const int n, const double alpha, const double *X, const int incX, double *Y, const int incY, base_device::AbacusDevice_t device_type) -{ - if (device_type == base_device::AbacusDevice_t::CpuDevice) { - daxpy_(&n, &alpha, X, &incX, Y, &incY); - } -#ifdef __CUDA - else if (device_type == base_device::AbacusDevice_t::GpuDevice) { - cublasErrcheck(cublasDaxpy(BlasUtils::cublas_handle, n, &alpha, X, incX, Y, incY)); - } -#endif - else { - throw std::invalid_argument("device_type = " + std::to_string(device_type) + " in " + std::string(__FILE__) + " line " + std::to_string(__LINE__)); - } -} - -void BlasConnector::axpy( const int n, const std::complex alpha, const std::complex *X, const int incX, std::complex *Y, const int incY, base_device::AbacusDevice_t device_type) -{ - if (device_type == base_device::AbacusDevice_t::CpuDevice) { - caxpy_(&n, &alpha, X, &incX, Y, &incY); - } -#ifdef __CUDA - else if (device_type == base_device::AbacusDevice_t::GpuDevice) { - cublasErrcheck(cublasCaxpy(BlasUtils::cublas_handle, n, (float2*)&alpha, (float2*)X, incX, (float2*)Y, incY)); - } -#endif - else { - throw std::invalid_argument("device_type = " + std::to_string(device_type) + " in " + std::string(__FILE__) + " line " + std::to_string(__LINE__)); - } -} - -void BlasConnector::axpy( const int n, const std::complex alpha, const std::complex *X, const int incX, std::complex *Y, const int incY, base_device::AbacusDevice_t device_type) -{ - if (device_type == base_device::AbacusDevice_t::CpuDevice) { - zaxpy_(&n, &alpha, X, &incX, Y, &incY); - } -#ifdef __CUDA - else if (device_type == base_device::AbacusDevice_t::GpuDevice) { - cublasErrcheck(cublasZaxpy(BlasUtils::cublas_handle, n, (double2*)&alpha, (double2*)X, incX, (double2*)Y, incY)); - } -#endif - else { - throw std::invalid_argument("device_type = " + std::to_string(device_type) + " in " + std::string(__FILE__) + " line " + std::to_string(__LINE__)); - } -} - - -// x=a*x -void BlasConnector::scal( const int n, const float alpha, float *X, const int incX, base_device::AbacusDevice_t device_type) -{ - if (device_type == base_device::AbacusDevice_t::CpuDevice) { - sscal_(&n, &alpha, X, &incX); - } -#ifdef __CUDA - else if (device_type == base_device::AbacusDevice_t::GpuDevice) { - cublasErrcheck(cublasSscal(BlasUtils::cublas_handle, n, &alpha, X, incX)); - } -#endif - else { - throw std::invalid_argument("device_type = " + std::to_string(device_type) + " in " + std::string(__FILE__) + " line " + std::to_string(__LINE__)); - } -} - -void BlasConnector::scal( const int n, const double alpha, double *X, const int incX, base_device::AbacusDevice_t device_type) -{ - if (device_type == base_device::AbacusDevice_t::CpuDevice) { - dscal_(&n, &alpha, X, &incX); - } -#ifdef __CUDA - else if (device_type == base_device::AbacusDevice_t::GpuDevice) { - cublasErrcheck(cublasDscal(BlasUtils::cublas_handle, n, &alpha, X, incX)); - } -#endif - else { - throw std::invalid_argument("device_type = " + std::to_string(device_type) + " in " + std::string(__FILE__) + " line " + std::to_string(__LINE__)); - } -} - -void BlasConnector::scal( const int n, const std::complex alpha, std::complex *X, const int incX, base_device::AbacusDevice_t device_type) -{ - if (device_type == base_device::AbacusDevice_t::CpuDevice) { - cscal_(&n, &alpha, X, &incX); - } -#ifdef __CUDA - else if (device_type == base_device::AbacusDevice_t::GpuDevice) { - cublasErrcheck(cublasCscal(BlasUtils::cublas_handle, n, (float2*)&alpha, (float2*)X, incX)); - } -#endif - else { - throw std::invalid_argument("device_type = " + std::to_string(device_type) + " in " + std::string(__FILE__) + " line " + std::to_string(__LINE__)); - } -} - -void BlasConnector::scal( const int n, const std::complex alpha, std::complex *X, const int incX, base_device::AbacusDevice_t device_type) -{ - if (device_type == base_device::AbacusDevice_t::CpuDevice) { - zscal_(&n, &alpha, X, &incX); - } -#ifdef __CUDA - else if (device_type == base_device::AbacusDevice_t::GpuDevice) { - cublasErrcheck(cublasZscal(BlasUtils::cublas_handle, n, (double2*)&alpha, (double2*)X, incX)); - } -#endif - else { - throw std::invalid_argument("device_type = " + std::to_string(device_type) + " in " + std::string(__FILE__) + " line " + std::to_string(__LINE__)); - } -} - - -// d=x*y -float BlasConnector::dot( const int n, const float*const X, const int incX, const float*const Y, const int incY, base_device::AbacusDevice_t device_type) -{ - if (device_type == base_device::AbacusDevice_t::CpuDevice) { - return sdot_(&n, X, &incX, Y, &incY); - } -#ifdef __CUDA - else if (device_type == base_device::AbacusDevice_t::GpuDevice){ - float result = 0.0; - cublasErrcheck(cublasSdot(BlasUtils::cublas_handle, n, X, incX, Y, incY, &result)); - return result; - } -#endif - else { - throw std::invalid_argument("device_type = " + std::to_string(device_type) + " in " + std::string(__FILE__) + " line " + std::to_string(__LINE__)); - } -} - -double BlasConnector::dot( const int n, const double*const X, const int incX, const double*const Y, const int incY, base_device::AbacusDevice_t device_type) -{ - if (device_type == base_device::AbacusDevice_t::CpuDevice) { - return ddot_(&n, X, &incX, Y, &incY); - } -#ifdef __CUDA - else if (device_type == base_device::AbacusDevice_t::GpuDevice){ - double result = 0.0; - cublasErrcheck(cublasDdot(BlasUtils::cublas_handle, n, X, incX, Y, incY, &result)); - return result; - } -#endif - else { - throw std::invalid_argument("device_type = " + std::to_string(device_type) + " in " + std::string(__FILE__) + " line " + std::to_string(__LINE__)); - } -} - -// d=x*y -float BlasConnector::dotu(const int n, const float*const X, const int incX, const float*const Y, const int incY, base_device::AbacusDevice_t device_type) -{ - return BlasConnector::dot(n, X, incX, Y, incY, device_type); -} - -double BlasConnector::dotu(const int n, const double*const X, const int incX, const double*const Y, const int incY, base_device::AbacusDevice_t device_type) -{ - return BlasConnector::dot(n, X, incX, Y, incY, device_type); -} - -std::complex BlasConnector::dotu(const int n, const std::complex*const X, const int incX, const std::complex*const Y, const int incY, base_device::AbacusDevice_t device_type) -{ - if (device_type == base_device::AbacusDevice_t::CpuDevice) { - const int incX2 = 2 * incX; - const int incY2 = 2 * incY; - const float*const x = reinterpret_cast(X); - const float*const y = reinterpret_cast(Y); - //Re(result)=Re(x)*Re(y)-Im(x)*Im(y) - //Im(result)=Re(x)*Im(y)+Im(x)*Re(y) - return std::complex( - BlasConnector::dot(n, x, incX2, y, incY2, device_type) - dot(n, x+1, incX2, y+1, incY2, device_type), - BlasConnector::dot(n, x, incX2, y+1, incY2, device_type) + dot(n, x+1, incX2, y, incY2, device_type)); - } - else { - throw std::invalid_argument("device_type = " + std::to_string(device_type) + " in " + std::string(__FILE__) + " line " + std::to_string(__LINE__)); - } -} - -std::complex BlasConnector::dotu(const int n, const std::complex*const X, const int incX, const std::complex*const Y, const int incY, base_device::AbacusDevice_t device_type) -{ - if (device_type == base_device::AbacusDevice_t::CpuDevice) { - const int incX2 = 2 * incX; - const int incY2 = 2 * incY; - const double*const x = reinterpret_cast(X); - const double*const y = reinterpret_cast(Y); - //Re(result)=Re(x)*Re(y)-Im(x)*Im(y) - //Im(result)=Re(x)*Im(y)+Im(x)*Re(y) - return std::complex( - BlasConnector::dot(n, x, incX2, y, incY2, device_type) - dot(n, x+1, incX2, y+1, incY2, device_type), - BlasConnector::dot(n, x, incX2, y+1, incY2, device_type) + dot(n, x+1, incX2, y, incY2, device_type)); - } - else { - throw std::invalid_argument("device_type = " + std::to_string(device_type) + " in " + std::string(__FILE__) + " line " + std::to_string(__LINE__)); - } -} - -// d = x.conj() * Vy -float BlasConnector::dotc(const int n, const float*const X, const int incX, const float*const Y, const int incY, base_device::AbacusDevice_t device_type) -{ - return BlasConnector::dot(n, X, incX, Y, incY, device_type); -} - -double BlasConnector::dotc(const int n, const double*const X, const int incX, const double*const Y, const int incY, base_device::AbacusDevice_t device_type) -{ - return BlasConnector::dot(n, X, incX, Y, incY, device_type); -} - -std::complex BlasConnector::dotc(const int n, const std::complex*const X, const int incX, const std::complex*const Y, const int incY, base_device::AbacusDevice_t device_type) -{ - if (device_type == base_device::AbacusDevice_t::CpuDevice) { - const int incX2 = 2 * incX; - const int incY2 = 2 * incY; - const float*const x = reinterpret_cast(X); - const float*const y = reinterpret_cast(Y); - // Re(result)=Re(X)*Re(Y)+Im(X)*Im(Y) - // Im(result)=Re(X)*Im(Y)-Im(X)*Re(Y) - return std::complex( - BlasConnector::dot(n, x, incX2, y, incY2, device_type) + dot(n, x+1, incX2, y+1, incY2, device_type), - BlasConnector::dot(n, x, incX2, y+1, incY2, device_type) - dot(n, x+1, incX2, y, incY2, device_type)); - } - else { - throw std::invalid_argument("device_type = " + std::to_string(device_type) + " in " + std::string(__FILE__) + " line " + std::to_string(__LINE__)); - } -} - -std::complex BlasConnector::dotc(const int n, const std::complex*const X, const int incX, const std::complex*const Y, const int incY, base_device::AbacusDevice_t device_type) -{ - if (device_type == base_device::AbacusDevice_t::CpuDevice) { - const int incX2 = 2 * incX; - const int incY2 = 2 * incY; - const double*const x = reinterpret_cast(X); - const double*const y = reinterpret_cast(Y); - // Re(result)=Re(X)*Re(Y)+Im(X)*Im(Y) - // Im(result)=Re(X)*Im(Y)-Im(X)*Re(Y) - return std::complex( - BlasConnector::dot(n, x, incX2, y, incY2, device_type) + dot(n, x+1, incX2, y+1, incY2, device_type), - BlasConnector::dot(n, x, incX2, y+1, incY2, device_type) - dot(n, x+1, incX2, y, incY2, device_type)); - } - else { - throw std::invalid_argument("device_type = " + std::to_string(device_type) + " in " + std::string(__FILE__) + " line " + std::to_string(__LINE__)); - } -} - -// out = ||x||_2 -float BlasConnector::nrm2( const int n, const float *X, const int incX, base_device::AbacusDevice_t device_type ) -{ - if (device_type == base_device::AbacusDevice_t::CpuDevice) { - return snrm2_( &n, X, &incX ); - } -#ifdef __CUDA - else if (device_type == base_device::AbacusDevice_t::GpuDevice){ - float result = 0.0; - cublasErrcheck(cublasSnrm2(BlasUtils::cublas_handle, n, X, incX, &result)); - return result; - } -#endif - else { - throw std::invalid_argument("device_type = " + std::to_string(device_type) + " in " + std::string(__FILE__) + " line " + std::to_string(__LINE__)); - } -} - - -double BlasConnector::nrm2( const int n, const double *X, const int incX, base_device::AbacusDevice_t device_type ) -{ - if (device_type == base_device::AbacusDevice_t::CpuDevice) { - return dnrm2_( &n, X, &incX ); - } -#ifdef __CUDA - else if (device_type == base_device::AbacusDevice_t::GpuDevice){ - double result = 0.0; - cublasErrcheck(cublasDnrm2(BlasUtils::cublas_handle, n, X, incX, &result)); - return result; - } -#endif - else { - throw std::invalid_argument("device_type = " + std::to_string(device_type) + " in " + std::string(__FILE__) + " line " + std::to_string(__LINE__)); - } -} - - -double BlasConnector::nrm2( const int n, const std::complex *X, const int incX, base_device::AbacusDevice_t device_type ) -{ - if (device_type == base_device::AbacusDevice_t::CpuDevice) { - return dznrm2_( &n, X, &incX ); - } -#ifdef __CUDA - else if (device_type == base_device::AbacusDevice_t::GpuDevice){ - double result = 0.0; - cublasErrcheck(cublasDznrm2(BlasUtils::cublas_handle, n, (double2*)X, incX, &result)); - return result; - } -#endif - else { - throw std::invalid_argument("device_type = " + std::to_string(device_type) + " in " + std::string(__FILE__) + " line " + std::to_string(__LINE__)); - } -} - -// copies a into b -void BlasConnector::copy(const long n, const double *a, const int incx, double *b, const int incy, base_device::AbacusDevice_t device_type) -{ - if (device_type == base_device::AbacusDevice_t::CpuDevice) { - dcopy_(&n, a, &incx, b, &incy); - } - else { - throw std::invalid_argument("device_type = " + std::to_string(device_type) + " in " + std::string(__FILE__) + " line " + std::to_string(__LINE__)); - } -} - -void BlasConnector::copy(const long n, const std::complex *a, const int incx, std::complex *b, const int incy, base_device::AbacusDevice_t device_type) -{ - if (device_type == base_device::AbacusDevice_t::CpuDevice) { - zcopy_(&n, a, &incx, b, &incy); - } - else { - throw std::invalid_argument("device_type = " + std::to_string(device_type) + " in " + std::string(__FILE__) + " line " + std::to_string(__LINE__)); - } -} - - -template -void vector_mul_vector(const int& dim, T* result, const T* vector1, const T* vector2, base_device::AbacusDevice_t device_type){ - using Real = typename GetTypeReal::type; - if (device_type == base_device::AbacusDevice_t::CpuDevice) { -#ifdef _OPENMP -#pragma omp parallel for schedule(static, 4096 / sizeof(Real)) -#endif - for (int i = 0; i < dim; i++) - { - result[i] = vector1[i] * vector2[i]; - } - } -#ifdef __CUDA - else if (device_type == base_device::AbacusDevice_t::GpuDevice) { - ModuleBase::vector_mul_vector_op()(dim, result, vector1, vector2); - } -#endif - else { - throw std::invalid_argument("device_type = " + std::to_string(device_type) + " in " + std::string(__FILE__) + " line " + std::to_string(__LINE__)); - } -} - - -template -void vector_div_vector(const int& dim, T* result, const T* vector1, const T* vector2, base_device::AbacusDevice_t device_type){ - using Real = typename GetTypeReal::type; - if (device_type == base_device::AbacusDevice_t::CpuDevice) { -#ifdef _OPENMP -#pragma omp parallel for schedule(static, 4096 / sizeof(Real)) -#endif - for (int i = 0; i < dim; i++) - { - result[i] = vector1[i] / vector2[i]; - } - } -#ifdef __CUDA - else if (device_type == base_device::AbacusDevice_t::GpuDevice) { - ModuleBase::vector_div_vector_op()(dim, result, vector1, vector2); - } -#endif - else { - throw std::invalid_argument("device_type = " + std::to_string(device_type) + " in " + std::string(__FILE__) + " line " + std::to_string(__LINE__)); - } -} - -void vector_add_vector(const int& dim, float *result, const float *vector1, const float constant1, const float *vector2, const float constant2, base_device::AbacusDevice_t device_type) -{ - if (device_type == base_device::CpuDevice){ -#ifdef _OPENMP -#pragma omp parallel for schedule(static, 8192 / sizeof(float)) -#endif - for (int i = 0; i < dim; i++) - { - result[i] = vector1[i] * constant1 + vector2[i] * constant2; - } - } -#ifdef __CUDA - else if (device_type == base_device::GpuDevice) { - ModuleBase::vector_add_vector_op()(dim, result, vector1, constant1, vector2, constant2); - } -#endif - else { - throw std::invalid_argument("device_type = " + std::to_string(device_type) + " in " + std::string(__FILE__) + " line " + std::to_string(__LINE__)); - } -} - -void vector_add_vector(const int& dim, double *result, const double *vector1, const double constant1, const double *vector2, const double constant2, base_device::AbacusDevice_t device_type) -{ - if (device_type == base_device::CpuDevice){ -#ifdef _OPENMP -#pragma omp parallel for schedule(static, 8192 / sizeof(double)) -#endif - for (int i = 0; i < dim; i++) - { - result[i] = vector1[i] * constant1 + vector2[i] * constant2; - } - } -#ifdef __CUDA - else if (device_type == base_device::GpuDevice) { - ModuleBase::vector_add_vector_op()(dim, result, vector1, constant1, vector2, constant2); - } -#endif - else { - throw std::invalid_argument("device_type = " + std::to_string(device_type) + " in " + std::string(__FILE__) + " line " + std::to_string(__LINE__)); - } -} - -void vector_add_vector(const int& dim, std::complex *result, const std::complex *vector1, const float constant1, const std::complex *vector2, const float constant2, base_device::AbacusDevice_t device_type) -{ - if (device_type == base_device::CpuDevice){ -#ifdef _OPENMP -#pragma omp parallel for schedule(static, 8192 / sizeof(std::complex)) -#endif - for (int i = 0; i < dim; i++) - { - result[i] = vector1[i] * constant1 + vector2[i] * constant2; - } - } -#ifdef __CUDA - else if (device_type == base_device::GpuDevice) { - ModuleBase::vector_add_vector_op, base_device::DEVICE_GPU>()(dim, result, vector1, constant1, vector2, constant2); - } -#endif - else { - throw std::invalid_argument("device_type = " + std::to_string(device_type) + " in " + std::string(__FILE__) + " line " + std::to_string(__LINE__)); - } -} - -void vector_add_vector(const int& dim, std::complex *result, const std::complex *vector1, const double constant1, const std::complex *vector2, const double constant2, base_device::AbacusDevice_t device_type) -{ - if (device_type == base_device::CpuDevice){ -#ifdef _OPENMP -#pragma omp parallel for schedule(static, 8192 / sizeof(std::complex)) -#endif - for (int i = 0; i < dim; i++) - { - result[i] = vector1[i] * constant1 + vector2[i] * constant2; - } - } -#ifdef __CUDA - else if (device_type == base_device::GpuDevice) { - ModuleBase::vector_add_vector_op, base_device::DEVICE_GPU>()(dim, result, vector1, constant1, vector2, constant2); - } -#endif - else { - throw std::invalid_argument("device_type = " + std::to_string(device_type) + " in " + std::string(__FILE__) + " line " + std::to_string(__LINE__)); - } -} \ No newline at end of file diff --git a/source/module_base/clebsch_gordan_coeff.cpp b/source/module_base/clebsch_gordan_coeff.cpp deleted file mode 100644 index 095fa7e792..0000000000 --- a/source/module_base/clebsch_gordan_coeff.cpp +++ /dev/null @@ -1,94 +0,0 @@ -#include "clebsch_gordan_coeff.h" - -#include "module_base/constants.h" -#include "module_base/inverse_matrix.h" -#include "module_base/math_ylmreal.h" - -namespace ModuleBase -{ - -Clebsch_Gordan::Clebsch_Gordan() -{ -} -Clebsch_Gordan::~Clebsch_Gordan() -{ -} - -void Clebsch_Gordan::clebsch_gordan(const int& lli, - ModuleBase::realArray& ap, - ModuleBase::IntArray& lpx, - ModuleBase::IntArray& lpl) -{ - if (lli < 0) - { - std::cout << "Clebsch_Gordan: lmaxkb + 1 < 0" << std::endl; - exit(1); - } - - const int llx = (2 * lli - 1) * (2 * lli - 1); - ModuleBase::Vector3* r = new ModuleBase::Vector3[llx]; - ModuleBase::matrix ylm(llx, llx); - ModuleBase::matrix mly(llx, llx); - - // generate an array of random vectors (uniform deviate on unitary sphere) - gen_rndm_r(llx, r); - - // generate the real spherical harmonics for the array: ylm(ir,lm) - ModuleBase::YlmReal::Ylm_Real(llx, llx, r, ylm); - - // store the inverse of ylm(ir,lm) in mly(lm,ir) - ModuleBase::Inverse_Matrix_Real(llx, ylm.c, mly.c); - - // for each li,lj compute ap(l,li,lj) and the indices, lpx and lpl - lpx.create(lli * lli, lli * lli); - lpl.create(lli * lli, lli * lli, llx); - ap.create(llx, lli * lli, lli * lli); - for (int li = 0; li < lli * lli; li++) - { - for (int lj = 0; lj < lli * lli; lj++) - { - lpx(li, lj) = 0; - for (int L = 0; L < llx; L++) - { - ap(L, li, lj) = compute_ap(L, li, lj, llx, ylm, mly); - if (std::abs(ap(L, li, lj)) > 1.0e-3) - { - lpl(li, lj, lpx(li, lj)) = L; - lpx(li, lj)++; - } - } - } - } - - delete[] r; -} - -void Clebsch_Gordan::gen_rndm_r(const int& llx, ModuleBase::Vector3* r) -{ - for (int i = 0; i < llx; i++) - { - double costheta = 2.0 * static_cast(std::rand()) / RAND_MAX - 1.0; - double sintheta = std::sqrt(1.0 - costheta * costheta); - double phi = ModuleBase::TWO_PI * static_cast(std::rand()) / RAND_MAX; - r[i].x = sintheta * std::cos(phi); - r[i].y = sintheta * std::sin(phi); - r[i].z = costheta; - } -} - -double Clebsch_Gordan::compute_ap(const int& L, - const int& li, - const int& lj, - const int& llx, - const ModuleBase::matrix& ylm, - const ModuleBase::matrix& mly) -{ - double compute_ap = 0.0; - for (int ir = 0; ir < llx; ir++) - { - compute_ap += mly(ir, L) * ylm(li, ir) * ylm(lj, ir); - } - return compute_ap; -} - -} // namespace ModuleBase \ No newline at end of file diff --git a/source/module_base/clebsch_gordan_coeff.h b/source/module_base/clebsch_gordan_coeff.h deleted file mode 100644 index 6f6633bc91..0000000000 --- a/source/module_base/clebsch_gordan_coeff.h +++ /dev/null @@ -1,69 +0,0 @@ -#ifndef CLEBSCH_GORDAN_H -#define CLEBSCH_GORDAN_H - -#include "module_base/intarray.h" -#include "module_base/matrix.h" -#include "module_base/realarray.h" -#include "module_base/vector3.h" - -namespace ModuleBase -{ - -class Clebsch_Gordan -{ - public: - Clebsch_Gordan(); - ~Clebsch_Gordan(); - - /** - * @brief computes Clebsch-Gordan coefficient - * - * this routine computes the coefficients of the expansion of the product - * of two real spherical harmonics into real spherical harmonics. - * - * Y_limi(r) * Y_ljmj(r) = \sum_LM ap(LM,limi,ljmj) Y_LM(r) - * - * The indices limi,ljmj and LM assume the order for real spherical - * harmonics given in routine ylmr2 - * - * @param lli [in] lmaxkb + 1: the maximum li considered - * @param ap [out] coefficients of the expansion - * @param lpx [out] for each input limi,ljmj is the number of LM in the sum - * @param lpl [out] for each input limi,ljmj points to the allowed LM - */ - static void clebsch_gordan(const int& lli, - ModuleBase::realArray& ap, - ModuleBase::IntArray& lpx, - ModuleBase::IntArray& lpl); - - private: - /** - * @brief generate random vector - * - * @param llx [in] the number of vectors - * @param r [out] an array of vectors - */ - static void gen_rndm_r(const int& llx, ModuleBase::Vector3* r); - - /** - * @brief store the inverse of ylm(ir,lm) in mly(lm,ir) - * - * @param L [in] angular momentum L - * @param li [in] angular momentum li - * @param lj [in] angular momentum lj - * @param llx [in] the number of vectors - * @param ylm [in] real spherical harmonics - * @param mly [in] the inverse of ylm(ir,lm) - * @return double the expansion coefficients - */ - static double compute_ap(const int& L, - const int& li, - const int& lj, - const int& llx, - const ModuleBase::matrix& ylm, - const ModuleBase::matrix& mly); -}; - -} // namespace ModuleBase - -#endif // CLEBSCH_GORDAN_H \ No newline at end of file diff --git a/source/module_base/complexarray.cpp b/source/module_base/complexarray.cpp deleted file mode 100644 index becb8e8448..0000000000 --- a/source/module_base/complexarray.cpp +++ /dev/null @@ -1,265 +0,0 @@ -#include -#include -#include -#include -#include -#include - -#include "complexarray.h" -#include "global_function.h" -namespace ModuleBase -{ -void complexArrayxAlloc(){ModuleBase::WARNING_QUIT("ComplexArray","Allocation error for complexArray");} - -ComplexArray::ComplexArray(const int bnd1, const int bnd2, const int bnd3, const int bnd4){ - bound1 = bnd1; - bound2 = bnd2; - bound3 = bnd3; - bound4 = bnd4; - init(this->getSize()); -} - -ComplexArray::~ComplexArray(){ - freemem(); -} -void ComplexArray::init(const int size){ - assert(size>=0); - if(size>0){ - ptr = new std::complex [size]; - assert(ptr != 0);} - else - {ptr = nullptr;} -} -void ComplexArray::freemem(){ - delete [] ptr; - ptr = nullptr; - bound1 = 0; - bound2 = 0; - bound3 = 0; - bound4 = 0; -} -void ComplexArray::create(const int bnd1, const int bnd2, const int bnd3, const int bnd4){ - delete [] ptr; - bound1 = bnd1; - bound2 = bnd2; - bound3 = bnd3; - bound4 = bnd4; - const int size = this->getSize(); - this->init(size); - this->zero_out(); -} -ComplexArray::ComplexArray(const ComplexArray &cd){ - this->freemem(); - const int size = cd.getSize(); - this->init(size); - for (int i = 0; i < size; i++) - ptr[i] = cd.ptr[i]; - this->bound1 = cd.bound1; - this->bound2 = cd.bound2; - this->bound3 = cd.bound3; - this->bound4 = cd.bound4; -} -ComplexArray::ComplexArray(ComplexArray &&cd){ - delete [] this->ptr; - this->ptr =cd.ptr; cd.ptr =nullptr; - this->bound1=cd.bound1; cd.bound1=0; - this->bound2=cd.bound2; cd.bound2=0; - this->bound3=cd.bound3; cd.bound3=0; - this->bound4=cd.bound4; cd.bound4=0; -} -ComplexArray& ComplexArray::operator=(ComplexArray &&cd){ - delete [] this->ptr; - this->ptr =cd.ptr; cd.ptr =nullptr; - this->bound1=cd.bound1; cd.bound1=0; - this->bound2=cd.bound2; cd.bound2=0; - this->bound3=cd.bound3; cd.bound3=0; - this->bound4=cd.bound4; cd.bound4=0; - return *this;} -ComplexArray &ComplexArray::operator=(const ComplexArray & cd){ - const int size = this->getSize(); - assert(size==cd.getSize()); - for (int i = 0; i < size; i++) - ptr[i] = cd.ptr[i]; - return *this;} -void ComplexArray::operator=(const std::complex < double> c){ - const int size = this->getSize(); - for (int i = 0; i < size; i++) - ptr[i] = c;} -ComplexArray ComplexArray::operator+(const ComplexArray &cd){ - const int size = this->getSize(); - assert(size==cd.getSize()); - ComplexArray cd2(*this); - for (int i = 0; i < size; i++) - cd2.ptr[i] += cd.ptr[i]; - return cd2;} -void ComplexArray::operator+=(const ComplexArray & cd){ - const int size = this->getSize(); - assert(size==cd.getSize()); - for (int i = 0; i < size; i++) - ptr[i] += cd.ptr[i]; -} -ComplexArray ComplexArray::operator-(const ComplexArray &cd){ - const int size = this->getSize(); - assert(size==cd.getSize()); - ComplexArray cd2(*this); - for (int i = 0; i < size; i++) - cd2.ptr[i] -= cd.ptr[i]; - return cd2;} -void ComplexArray::operator-=(const ComplexArray & cd){ - const int size = this->getSize(); - assert(size==cd.getSize()); - for (int i = 0; i < size; i++) - ptr[i] -= cd.ptr[i]; -} -void ComplexArray::operator*=(const ComplexArray & cd){ - const int size = this->getSize(); - assert(size==cd.getSize()); - for (int i = 0; i < size; i++) - ptr[i] *= cd.ptr[i]; -} -ComplexArray operator*(const double r, const ComplexArray &cd){ - ComplexArray cd2(cd); - const int size = cd.getSize(); - for (int i = 0; i < size; i++) - cd2.ptr[i] *= r; - return cd2;} -ComplexArray ComplexArray::operator*(const double r){ - ComplexArray cd2(*this); - const int size = this->getSize(); - for (int i = 0; i < size; i++) - cd2.ptr[i] *= r; - return cd2;} -ComplexArray operator*(const std::complex < double> c, const ComplexArray &cd){ - const int size = cd.getSize(); - ComplexArray cd2(cd.getSize()); - for (int i = 0; i < size; i++) - cd2.ptr[i] = c * cd.ptr[i]; - return cd2;} -ComplexArray ComplexArray::operator*(const std::complex < double> c){ - const int size = this->getSize(); - ComplexArray cd(size); - for (int i = 0; i < size; i++) - cd.ptr[i] = ptr[i] * c; - return cd;} -void ComplexArray::operator*=(const std::complex c){ - const int size = this->getSize(); - for (int i = 0; i < size; i++) - ptr[i] *= c; -} -void ComplexArray::operator*=(const double r){ - const int size = this->getSize(); - for (int i = 0; i < size; i++) - ptr[i] *= r; -} -bool ComplexArray::operator==(const ComplexArray &cd2)const{ - const int size1 = this->getSize(); - const int size2 = cd2.getSize(); - const int b11 = this->getBound1(); - const int b12 = this->getBound2(); - const int b13 = this->getBound3(); - const int b14 = this->getBound4(); - const int b21 = cd2.getBound1(); - const int b22 = cd2.getBound2(); - const int b23 = cd2.getBound3(); - const int b24 = cd2.getBound4(); - if (size1 != size2) {return false;} - if (b11 != b21) {return false;} - if (b12 != b22) {return false;} - if (b13 != b23) {return false;} - if (b14 != b24) {return false;} - for ( int i = 0;i ptr[i] != cd2.ptr[i]) {return false;} } - return true;} -bool ComplexArray::operator!=(const ComplexArray &cd2)const{ - const int size1 = this->getSize(); - const int size2 = cd2.getSize(); - const int b11 = this->getBound1(); - const int b12 = this->getBound2(); - const int b13 = this->getBound3(); - const int b14 = this->getBound4(); - const int b21 = cd2.getBound1(); - const int b22 = cd2.getBound2(); - const int b23 = cd2.getBound3(); - const int b24 = cd2.getBound4(); - if (size1 != size2) {return true;} - if (b11 != b21) {return true;} - if (b12 != b22) {return true;} - if (b13 != b23) {return true;} - if (b14 != b24) {return true;} - for ( int i = 0;i ptr[i] != cd2.ptr[i]) {return true;} } - return false;} -void ComplexArray::zero_out(void){ - const int size = this->getSize(); - for (int i = 0;i < size; i++) - ptr[i] = std::complex < double> (0.0, 0.0); -} -void ComplexArray::negate(void){ - const int size = this->getSize(); - for (int i = 0;i < size; i++){ - ptr[i] = -ptr[i];} -} -void ComplexArray::randomize(void){ - const int size = this->getSize(); - for (int i = 0;i < size; i++){ - ptr[i] = std::complex < double> (rand() / (RAND_MAX + 1.) - .5, - rand() / (RAND_MAX + 1.) - .5);} -} -double abs2(const ComplexArray &cd){ - double cdcd= 0.0; - const int size = cd.getSize(); - for (int i = 0; i < size; i++){ - const std::complex < double> c = cd.ptr[i]; - cdcd += c.real() * c.real() + c.imag() * c.imag();} - return cdcd;} -// void add_scale_abs2(const std::complex < double> &c, const ComplexArray & in, ComplexArray &out){ -// assert(in.getSize() == out.getSize()); -// const int size = in.getSize(); -// for (int i = 0; i < size; i++) -// out.ptr[i] += std::complex < double> (c.real() * 22, c.imag() * 22);} -std::complex dot(const ComplexArray &cd1, const ComplexArray &cd2){ - assert(cd1.getSize()==cd2.getSize()); - const int size = cd1.getSize(); - std::complex < double> dot12(0.0,0.0); - for (int i = 0; i < size; i++){ - dot12 += std::complex < double> - (cd1.ptr[i].real() * cd2.ptr[i].real() + - cd1.ptr[i].imag() * cd2.ptr[i].imag(), - cd1.ptr[i].real() * cd2.ptr[i].imag() - - cd1.ptr[i].imag() * cd2.ptr[i].real());} - return dot12;} -void scale_accumulate(double r, const ComplexArray &cd1, ComplexArray &cd2){ - assert(cd1.getSize()==cd2.getSize()); - const int size = cd1.getSize(); - for (int i = 0; i < size; i++) - cd2.ptr[i] += r * cd1.ptr[i]; -} -void scale_accumulate(const std::complex c, const ComplexArray &cd1, ComplexArray &cd2){ - assert(cd1.getSize()==cd2.getSize()); - const int size = cd1.getSize(); - for (int i = 0; i < size; i++) - cd2.ptr[i] += c * cd1.ptr[i]; -} -void scaled_sum(double r1, const ComplexArray &cd1,double r2, const ComplexArray &cd2,ComplexArray &cd3){ - assert(cd1.getSize()==cd2.getSize()); - assert(cd1.getSize()==cd3.getSize()); - const int size = cd1.getSize(); - for (int i = 0; i < size; i++) - cd3.ptr[i] = r1 * cd1.ptr[i] + r2 * cd2.ptr[i]; -} -void scaled_sum(std::complex < double> c1, const ComplexArray &cd1,std::complex < double> c2, const ComplexArray &cd2,ComplexArray &cd3){ - assert(cd1.getSize()==cd2.getSize()); - assert(cd1.getSize()==cd3.getSize()); - const int size = cd1.getSize(); - for (int i = 0; i < size; i++) - cd3.ptr[i] = c1 * cd1.ptr[i] + c2 * cd2.ptr[i];} -void point_mult(ComplexArray &in1, ComplexArray &in2, ComplexArray &out){ - assert(in1.getSize()==in2.getSize()); - assert(in1.getSize()==out.getSize()); - const int size = in1.getSize(); - for (int i = 0; i < size; i++){ - out.ptr[i] = std::complex < double> - (in1.ptr[i].real() * in2.ptr[i].real() - - in1.ptr[i].imag() * in2.ptr[i].imag(), - in1.ptr[i].real() * in2.ptr[i].imag() + - in1.ptr[i].imag() * in2.ptr[i].real());} -} -} diff --git a/source/module_base/complexarray.h b/source/module_base/complexarray.h deleted file mode 100644 index 9cddc9a27c..0000000000 --- a/source/module_base/complexarray.h +++ /dev/null @@ -1,156 +0,0 @@ -#ifndef COMPLEX_ARRAY_H -#define COMPLEX_ARRAY_H - -#include -#include -#include -#include -#include - -namespace ModuleBase -{ - -/// @brief A basic type of data for complex array -class ComplexArray -{ -public: - std::complex *ptr=nullptr; // data array - - ComplexArray(const int bnd1=0, const int bnd2=1, const int bnd3=1, const int bnd4=1); - - ~ComplexArray(); - - void freemem(); - - void create(const int bnd1=0, const int bnd2=1, const int bnd3=1, const int bnd4=1); - - ComplexArray(const ComplexArray &cd); - ComplexArray(ComplexArray &&cd); - - /**************************************************** - * OPERATOR FUNCTIONS - ***************************************************/ - ComplexArray& operator=(ComplexArray &&cd); - ComplexArray &operator=(const ComplexArray &cd); - /// Assignment of scalar: all entries set to c. - void operator=(std::complex c); - /// Add two ComplexArray - ComplexArray operator+(const ComplexArray &cd); - /// Accumulate sum of ComplexArray - void operator+=(const ComplexArray &cd); - /// Subtract two ComplexArray - ComplexArray operator-(const ComplexArray &cd); - /// Accumulate difference of arrays - void operator-=(const ComplexArray &cd); - /// Scale a ComplexArray by real r - ComplexArray operator*(const double r); - /// Scale a ComplexArray by a std::complex number c - ComplexArray operator*(const std::complex c); - /// Scale a ComplexArray by real number in place - void operator*=(const double r); - /// Scale a ComplexArray by std::complex c in place - void operator*=(const std::complex c); - /// accumulate pointwise multiply - void operator*=(const ComplexArray &cd); - /// Judge if two ComplexArray is equal - bool operator== (const ComplexArray &cd2)const; - /// Judge if two ComplexArray is not equal - bool operator!= (const ComplexArray &cd2)const; - - /// overloaded subscript operator for non-const std::complex Array const reference return creates an lvakue - std::complex &operator() - (const int ind1=0, const int ind2=0, const int ind3=0, const int ind4=0) - { - assert(ind1>=0); assert(ind1=0); assert(ind2=0); assert(ind3=0); assert(ind4 &operator()(int, int, int, int, int); - /// overloaded subscript operator for const std::complex Array const reference return creates an cvakue - const std::complex &operator() - (const int ind1=0, const int ind2=0, const int ind3=0, const int ind4=0) const - { - assert(ind1>=0); assert(ind1=0); assert(ind2=0); assert(ind3=0); assert(ind4 &operator()(int, int, int, int, int)const; - - /**************************************************** - * MEMBER FUNCTIONS - ***************************************************/ - /// set all elements to be {0.0,0.0} - void zero_out(void); - - /// Negates all the entries in the array - void negate(void); - - /// set all elements to a random number whose real/image is between [-0.5,0.5). - void randomize(void); - int getBound1()const{ return bound1; } - int getBound2()const{ return bound2; } - int getBound3()const{ return bound3; } - int getBound4()const{ return bound4; } - int getSize()const{ return bound1*bound2*bound3*bound4; } - -private: - int bound1, bound2, bound3, bound4; - void init(const int size); -}; -/// Scale a ComplexArray cd by real r -ComplexArray operator*(const double r, const ComplexArray &cd); -/// Scale a ComplexArray cd by std::complex number c -ComplexArray operator*(const std::complex c, const ComplexArray &cd); - -/// Sum of absolute squares of all elements in cd -double abs2(const ComplexArray &cd); - -// void add_scale_abs2(const std::complex &c, const ComplexArray & in, -// ComplexArray &out); - -/// Take "dot-product" of two ComplexArray: sum of cd1(conjugate)[i] * cd2[i] -std::complex dot(const ComplexArray &cd1, const ComplexArray &cd2); - -/// Does cd2 += r * cd1 -void scale_accumulate(double r, const ComplexArray &cd1, ComplexArray &cd2); - -/// Does cd2 += c * cd1 -void scale_accumulate(std::complex c, const ComplexArray &cd1, ComplexArray &cd2); - -/// Does cd3 = r1*cd1 + r2*cd2 -void scaled_sum(double r1, const ComplexArray &cd1, - double r2, const ComplexArray &cd2, - ComplexArray &cd3); - -/// Does cd3 = c1*cd1 + c2*cd2 -void scaled_sum(std::complex c1, const ComplexArray &cd1, - std::complex c2, const ComplexArray &cd2, - ComplexArray &cd3); - -/// out[i] = a1[i] * in2[i] -void point_mult(ComplexArray &a1, ComplexArray &in2, ComplexArray &out); - -/// set elements of u as zero which u is 1_d std::complex array -template -void zeros(std::complex *u, int n) -{ - if (n == 0 || u == 0) - { - std::cout << "\n error in zeros(),n or u = 0"; - return; - } - - for (int i = 0;i < n;i++) - { - u[i] = std::complex (0.0, 0.0); - } -} -} - -#endif // COMPLEX_ARRAY_H diff --git a/source/module_base/complexmatrix.cpp b/source/module_base/complexmatrix.cpp deleted file mode 100644 index f4f2806366..0000000000 --- a/source/module_base/complexmatrix.cpp +++ /dev/null @@ -1,457 +0,0 @@ -#include -#include -#include -#include -#include -#include "complexmatrix.h" - -#ifdef __NORMAL -#else -#include "blas_connector.h" -#endif - -namespace ModuleBase -{ -// constructor with sizes -ComplexMatrix::ComplexMatrix(const int nrows, const int ncols, const bool flag_zero) - :nr(nrows), - nc(ncols), - size(nrows*ncols), - c(nullptr) -{ - if( size ) - { - c = new std::complex[size]; - if(flag_zero) zero_out(); - } -} - -// zero out the ComplexMatrix -void ComplexMatrix::zero_out(void) -{ - for (int i=0; i(0.0,0.0); -} - -/* -void need_more_memory() -{ - std::cout << "\n Sorry to crash... but the running need more momory! Exit." << std::endl; - exit(0); -} -*/ - -// Copy constructor -ComplexMatrix::ComplexMatrix(const ComplexMatrix &m1) - :nr(m1.nr), - nc(m1.nc), - size(m1.size), - c(nullptr) -{ - if(size) - { - c = new std::complex[size]; - memcpy( c, m1.c, size*sizeof(std::complex) ); - } -} - -// Peize Lin add 2016-08-05 -ComplexMatrix::ComplexMatrix( ComplexMatrix && m1 ) - :nr(m1.nr), - nc(m1.nc), - size(m1.size), - c(m1.c) -{ - m1.nr = m1.nc = m1.size = 0; - m1.c = nullptr; -} - -// Peize Lin add 2017-03-29 -ComplexMatrix::ComplexMatrix(const matrix &m) - :nr(m.nr), - nc(m.nc), - size(m.nr*m.nc), - c(nullptr) -{ - if( size ) - { - c = new std::complex[size]; - for( int i=0; i[size_in]; - } - } - else - { - c = new std::complex[nr_in * nc_in]; - } - - nr = nr_in; - nc = nc_in; - size = nr*nc; - if(flag_zero) zero_out(); - } - else - { - if(c) delete[] c; - c = nullptr; - nr = nr_in; - nc = nc_in; - size = nr*nc; - } -} - -void ComplexMatrix::set_as_identity_matrix(void) -{ - for(int i=0; i(1.0, 0.0); - else c[nc * i + j] = std::complex(0.0, 0.0); - } - } - return; -} - -// Adding matrices, as a friend -ComplexMatrix operator+(const ComplexMatrix &m1, const ComplexMatrix &m2) -{ - assert(m1.nr == m2.nr); - assert(m2.nc == m2.nc); - - ComplexMatrix tm(m1); - tm+=m2; - return tm; -} - -// Subtracting matrices, as a friend -ComplexMatrix operator-(const ComplexMatrix &m1, const ComplexMatrix &m2) -{ - assert(m1.nr == m2.nr); - assert(m2.nc == m2.nc); - - ComplexMatrix tm(m1); - tm-=m2; - return tm; -} - -// Multiplying matrices, as a friend -// mprod = m1 * m2 -ComplexMatrix operator*(const ComplexMatrix &m1, const ComplexMatrix &m2) -{ - assert(m1.nc == m2.nr); - ComplexMatrix mprod(m1.nr, m2.nc); - -// mohan add 2021-04-05 -#ifdef __NORMAL - std::complex z; - for (int i = 0;i < m1.nr;i++) - { - for (int j = 0;j < m2.nc;j++) - { - z = std::complex(0,0); - for (int k = 0;k < m1.nc;k++) - { - z += m1(i, k) * m2(k, j); - } - mprod(i, j) = z; - } - } -#else - // Peize Lin accelerate 2017-10-27 - BlasConnector::gemm('N', 'N', m1.nr, m2.nc, m1.nc, - 1, m1.c, m1.nc, m2.c, m2.nc, - 0, mprod.c, mprod.nc); -#endif - - return mprod; -} - -// Scale a ComplexMatrix -ComplexMatrix operator*(const std::complex &c,const ComplexMatrix &m) -{ - ComplexMatrix sm(m); - for (int i=0 ;i &c) -{ - ComplexMatrix sm(m); - for (int i = 0;i < m.size;i++) sm.c[i] *= c; - return sm; -} - -ComplexMatrix operator*(const double &r,const ComplexMatrix &m) -{ - ComplexMatrix sm(m); - for(int i=0; icreate(m.nr, m.nc, false); - memcpy( c, m.c, size*sizeof(std::complex) ); - return *this; -} - -// Peize Lin add 2016-08-05 -ComplexMatrix& ComplexMatrix::operator=( ComplexMatrix && m ) -{ - nr = m.nr; nc = m.nc; size = m.size; - if(c) delete[] c; - c = m.c; - m.nr = m.nc = m.size = 0; - m.c = nullptr; - return *this; -} - -ComplexMatrix& ComplexMatrix::operator*=(const std::complex &s) -{ - for (int i = 0;i < this->size;i++) c[i] *= s; - return *this; -} - -// Accumulate to a ComplexMatrix in place -ComplexMatrix& ComplexMatrix::operator+=(const ComplexMatrix &m) -{ - for(int i=0; ic[i] += m.c[i]; - return *this; -} - -// decumulate to a ComplexMatrix in place -ComplexMatrix& ComplexMatrix::operator-=(const ComplexMatrix &m) -{ - for(int i=0; ic[i] -= m.c[i]; - return *this; -} - -// Peize Lin add 2017-03-29 -matrix ComplexMatrix::real() const -{ - matrix m(nr,nc,false); - for( int i=0; isize; ++i) m.c[i] = c[i].real(); - return m; -} - -// Returns trace of ComplexMatrix -std::complex trace(const ComplexMatrix &m) -{ - std::complex tr=std::complex(0,0); - assert(m.nr == m.nc); - for (int i=0; i &s, - const ComplexMatrix &min, - ComplexMatrix &mout) -{ - assert(min.nr == mout.nr); - assert(min.nc == mout.nc); - for (int j=0; j &s, - ComplexMatrix **min, - ComplexMatrix **mout) -{ - assert(nmat>=0); - for (int i=0; i &s1, - const ComplexMatrix &m1, - const std::complex &s2, - const ComplexMatrix &m2, - ComplexMatrix &mout) -{ - assert(m1.nr == m2.nr); - assert(m1.nr == mout.nr); - assert(m1.nc == m2.nc); - assert(m1.nc == mout.nc); - - for(int i=0; i &s1, - ComplexMatrix **m1, - const std::complex &s2, - ComplexMatrix **m2, - ComplexMatrix **mout) -{ - assert(nmat>0); - for(int i=0; i z; - for(int ic=0;ic z; - for(int ir=0;ir z; - - for (int i = 0;i < m.size;i++) - { - z = m.c[i]; - r += z.real() * z.real() + z.imag() * z.imag(); - } - return r; -} - -// Same for an array of matrices -double abs2(const int nmat, ComplexMatrix **m) -{ - double r = 0.0; - for (int i = 0;i < nmat;i++) - { - r += abs2(*m[i]); - } - return r; -} - -ComplexMatrix transpose(const ComplexMatrix &m, const bool &conjugate) -{ - ComplexMatrix tm(m.nc, m.nr, false); - if(conjugate) - for (int i = 0;i < m.nr;i++) - for (int j = 0;j < m.nc;j++) - tm(j, i) = conj ( m(i, j) ); - else - for (int i = 0;i < m.nr;i++) - for (int j = 0;j < m.nc;j++) - tm(j, i) = m(i, j); - return tm; -} - -ComplexMatrix conj(const ComplexMatrix &m) -{ - ComplexMatrix cm( m.nr, m.nc, false ); - for(int i=0; i!=m.size; ++i) - cm.c[i] = conj(m.c[i]); - return cm; -} - -// Peize Lin add 2021.09.08 -std::ostream & ComplexMatrix::print( std::ostream & os, const double threshold_abs, const double threshold_imag ) const -{ - for( int ir=0; ir!=this->nr; ++ir ) - { - for( int ic=0; ic!=this->nc; ++ic ) - { - const std::complex & data = (*this)(ir,ic); - if(std::abs(data)>threshold_abs) - { - if(std::abs(std::imag(data))>threshold_imag) - os<nr;i++) - { - for(int j=0;jnc;j++) - { - if(std::imag((*this)(i,j)) > tiny) - { - return 0; - } - } - } - return 1; -} - -} \ No newline at end of file diff --git a/source/module_base/complexmatrix.h b/source/module_base/complexmatrix.h deleted file mode 100644 index f594805223..0000000000 --- a/source/module_base/complexmatrix.h +++ /dev/null @@ -1,126 +0,0 @@ -#ifndef COMPLEXMATRIX_H -#define COMPLEXMATRIX_H - -#include - -#include "matrix.h" - -#ifdef _MCD_CHECK -#include "mcd.h" -#endif -namespace ModuleBase -{ -class ComplexMatrix -{ - -public: - - int nr=0; - int nc=0; - int size=0; - std::complex *c=nullptr; - - ComplexMatrix(): nr(0), nc(0), size(0), c(nullptr){} - ComplexMatrix(const int nrows,const int ncols,const bool flag_zero=true); // Peize Lin add flag_zero 2019-05-13 - ComplexMatrix(const ComplexMatrix &m1); - ComplexMatrix(ComplexMatrix && m1); // Peize Lin add 2016-08-05 - explicit ComplexMatrix(const matrix &m); // Peize Lin add 2017-03-29 - ~ComplexMatrix(); - - void create(const int nrow,const int ncol,const bool flag_zero=true); // Peize Lin add flag_zero 2019-05-13 - ComplexMatrix& operator=(const ComplexMatrix &m); - ComplexMatrix& operator=(ComplexMatrix && m); // Peize Lin add 2016-08-05 - - //============ - // Operators - //============ - std::complex &operator()(const int ir,const int ic) - { - assert(ir>=0); assert(ir=0); assert(ic &operator()(const int ir,const int ic)const - { - assert(ir>=0); assert(ir=0); assert(ic &s); - ComplexMatrix& operator+=(const ComplexMatrix &m); - ComplexMatrix& operator-=(const ComplexMatrix &m); - //return a matrix whose element is the real part of element of the ComplexMatrix. - matrix real() const; // Peize Lin add 2017-03-29 - - //================== - // member function: - //================== - //set all elements to be complex {0.0,0.0} - void zero_out(void); - //set to be a unit matrix, - void set_as_identity_matrix(void); - - std::ostream & print( std::ostream & os, const double threshold_abs=0.0, const double threshold_imag=0.0 ) const; // Peize Lin add 2021.09.08 - - // check if all the elements are real - bool checkreal(void); - - using type=std::complex; // Peiae Lin add 2022.08.08 for template -}; - -ComplexMatrix operator+(const ComplexMatrix &m1, const ComplexMatrix &m2); -ComplexMatrix operator-(const ComplexMatrix &m1, const ComplexMatrix &m2); -ComplexMatrix operator*(const ComplexMatrix &m1, const ComplexMatrix &m2); -ComplexMatrix operator*(const std::complex &s, const ComplexMatrix &m); -ComplexMatrix operator*(const ComplexMatrix &m, const std::complex &s); -ComplexMatrix operator*(const double &s, const ComplexMatrix &m); -ComplexMatrix operator*(const ComplexMatrix &m, const double &s); - -//calculate the trace -std::complex trace(const ComplexMatrix &m); - -//calculate the sum of the square of the modulus of the elements in ir row. -double abs2_row(const ComplexMatrix &m,const int ir); // mohan add 2008-7-1 - -//calculate the sum of the square of the modulus of the elements in ic-th column. -double abs2_column(const ComplexMatrix &m,const int ic); // mohan add 2008-7-1 - -// calculate the sum of the square of the modulus of all elements. -double abs2(const ComplexMatrix &m); - -// calculate the sum of the square of the modulus of all elements of an array of ComplexMatrix. -double abs2(const int nmat, ComplexMatrix **m); - -ComplexMatrix transpose(const ComplexMatrix &m, const bool &conjugate); -ComplexMatrix conj(const ComplexMatrix &m); // Peize Lin add 2019-05-13 - -//do mout += s*min -void scale_accumulate( - const std::complex &s, - const ComplexMatrix &min, - ComplexMatrix &mout); - -//do (*mout[i]) += s * (*min[i]); int i &s, - ComplexMatrix **min, - ComplexMatrix **mout); - -// Do mout = s1*m1 + s2*m2 -void scaled_sum( - const std::complex &s1, - const ComplexMatrix &m1, - const std::complex &s2, - const ComplexMatrix &m2, - ComplexMatrix &mout); - -// Do (*mout[i]) = s1 * (*m1[i]) + s2 * (*m2[i]) -void scaled_sum( - const int &nmat, - const std::complex &s1, - ComplexMatrix **m1, - const std::complex &s2, - ComplexMatrix **m2, - ComplexMatrix **mout); -} -#endif diff --git a/source/module_base/constants.h b/source/module_base/constants.h deleted file mode 100644 index 2b8623d1cd..0000000000 --- a/source/module_base/constants.h +++ /dev/null @@ -1,100 +0,0 @@ -#ifndef CONSTANT_H -#define CONSTANT_H -#include - -//========================================================== -// GLOBAL CONSTANTS -//========================================================== - -//========================================================== -// EXPLAIN : constants -// NAME : pi -// NAME : tpi (two pi) -// NAME : fpi (four pi) -// NAME : sqrtpi ( sqrt pi ) -// NAME : sqrtpm1 ( 1/sqrtpi ) -//========================================================== -namespace ModuleBase -{ -const double PI = 3.14159265358979323846; -const double PI_HALF = PI / 2.0; -const double TWO_PI = 2 * PI; -const double FOUR_PI = 4.0 * 3.14159265358979323846; -//const double SQRT_PI = 1.77245385090551602729; -//const double INVERSE_SQRT_PI = 1.0 / SQRT_PI; -const double INVERSE_FOUR_PI = 1.0/FOUR_PI; -const double SQRT_INVERSE_FOUR_PI = sqrt(INVERSE_FOUR_PI); -const double SQRT2 = 1.41421356237309504880; -//const double SQRT3 = 1.73205080756887729352; - -//========================================================== -// EXPLAIN : std::complex constants -//========================================================== -const std::complex ZERO(0.0, 0.0); -const std::complex ONE(1.0, 0.0); -const std::complex NEG_ONE(-1.0, 0.0); -const std::complex IMAG_UNIT(0.0,1.0); -const std::complex NEG_IMAG_UNIT(0.0,-1.0); - -//========================================================== -// EXPLAIN : physical constants -//========================================================== -const double K_BOLTZMAN_SI = 1.3806504e-23;// J K^-1 -const double K_BOLTZMAN_AU = 3.1667e-6;// Hartree K^-1 -const double Hartree_to_K = 3.1577464e5; // Hartree to K -//const double K_BOLTZMAN_RY = 6.3335e-6;// Rydberg K^-1; mohan add 2010-09-03 -//const double K_BOLTZMAN_EV = 8.6173e-5; // eV; mohan add 2010-09-03 -//const double K_BOLTZMAN_M1_AU = 315795.260;// Hartree^-1 K -//const double FACTEM = 315795.260;// 27.212d0*11605.d0 Hartree^-1 K - -//========================================================== -// EXPLAIN : physical constants define the Atomic Units -//========================================================== -const double BOHR_RADIUS_SI = 0.529177e-10; // m -//const double BOHR_RADIUS_CM = 0.529177e-8; // cm -const double BOHR_TO_A = 0.5291770; // angstrom -//const double ELECTRONMASS_SI = 9.10953e-31; // kg -//const double ELECTRONMASS_UMA = 5.4858e-4; // uma - -//========================================================== -// EXPLAIN : units conversion factors -//========================================================== -const double ELECTRONVOLT_SI = 1.6021892e-19; // J -//const double UMA_SI = 1.66057e-27; // Kg -const double ANGSTROM_AU = 1.8897270; // au -//const double AU_TO_OHMCMM1 = 46000.00; // (ohm cm)^-1 -//const double AU_KB = 294210.00; // Kbar -//const double KB_AU = 1.00 / 294210.00;// au -//const double AU_GPA = 29421.00; // GPa -//const double GPA_AU = 1.00 / 29421.00;// au -//const double SCMASS = 1822.890; // uma to au ( mass of a proton ) -//const double UMA_AU = 1822.890; // au -//const double AU_TERAHERTZ = 2.418e-5; // THz -//const double TERAHERTZ = 2.418e-5; // from au to THz -//const double AU_SEC = 2.4189e-17; // sec -const double AU_to_FS = 2.418884326505e-2; // from a.u. to fs -//const double rhothr = 1.0e-5; // tolerance -//const double gsmall = 1.0e-12; -const double e2 = 2.0; // the square of the electron charge -const double DEGSPIN = 2.0; // the number of spins per level -const double Hartree_to_eV = 27.211396;// slcbb // 27.21138344; // eV -const double Ry_to_eV = 13.605698; // 13.60569172; // conversion from Ry to eV -//const double eV_to_kelvin = 1.16044; // from ev to Kelvin -const double NA = 6.02214129e23; // mol -const double EMASS_SI = 9.1093826e-31; // mass of electron (kg) -const double AU_to_MASS = NA*EMASS_SI*1e3; // mass a.u. to g/mol - -const double HARTREE_SI = 4.35974394e-18; //J -const double RYDBERG_SI = HARTREE_SI/2.0; //J -//const double RY_TO_KELVIN = RYDBERG_SI / K_BOLTZMAN_SI; - -//const double AMCONV = 1.660538782e-27 / 9.10938215e-31 * 0.50; // mass conversion: a.m.u to a.u. (Ry) - -//const double uakbar = 147105.0; // pressure conversion from Ry/(a.u)^3 to K - -// zero up to a given accuracy -//const double epsr = 1.0e-6; -const double threshold_wg = 1.0e-10; -} - -#endif diff --git a/source/module_base/container_operator.h b/source/module_base/container_operator.h deleted file mode 100644 index ec1f3fbc23..0000000000 --- a/source/module_base/container_operator.h +++ /dev/null @@ -1,66 +0,0 @@ -#ifndef CONTAINER_OPERATOR_H -#define CONTAINER_OPERATOR_H - -#include -#include -#include - -template< typename T> -std::vector operator + ( const std::vector & x1, const std::vector & x2 ) -{ - assert(x1.size()==x2.size()); - std::vector x; - for(std::size_t i=0; i!=x1.size(); ++i ) - x.push_back(x1[i]+x2[i]); - return x; -} - -template< typename T> -std::vector operator - ( const std::vector & x1, const std::vector & x2 ) -{ - assert(x1.size()==x2.size()); - std::vector x; - for(std::size_t i=0; i!=x1.size(); ++i ) - x.push_back(x1[i]-x2[i]); - return x; -} - -template< typename T1, typename T2 > -std::map operator + ( const std::map & x1, const std::map & x2 ) -{ - assert(x1.size()==x2.size()); - std::map x; - for( const auto &x1i : x1 ) - x.insert(std::make_pair( x1i.first, x1i.second + x2.at(x1i.first) )); - return x; -} - -template< typename T1, typename T2 > -std::map operator - ( const std::map & x1, const std::map & x2 ) -{ - assert(x1.size()==x2.size()); - std::map x; - for( const auto &x1i : x1 ) - x.insert(std::make_pair( x1i.first, x1i.second - x2.at(x1i.first) )); - return x; -} - -template< typename T1, typename T2 > -std::vector operator * ( const T1 & x1, const std::vector & x2 ) -{ - std::vector x; - for(std::size_t i=0; i!=x2.size(); ++i ) - x.push_back(x1*x2[i]); - return x; -} - -template< typename T1, typename T21, typename T22 > -std::map operator * ( const T1 & x1, const std::map & x2 ) -{ - std::map x; - for( const auto & x2i : x2 ) - x.insert(std::make_pair( x2i.first, x1*x2i.second )); - return x; -} - -#endif // CONTAINER_OPERATOR_H diff --git a/source/module_base/cubic_spline.cpp b/source/module_base/cubic_spline.cpp deleted file mode 100644 index cfd9f57943..0000000000 --- a/source/module_base/cubic_spline.cpp +++ /dev/null @@ -1,566 +0,0 @@ -#include "cubic_spline.h" - -#include -#include -#include -#include -#include - -using ModuleBase::CubicSpline; - -extern "C" -{ - // solve a tridiagonal linear system - void dgtsv_(int* N, int* NRHS, double* DL, double* D, double* DU, double* B, int* LDB, int* INFO); -}; - - -CubicSpline::BoundaryCondition::BoundaryCondition(BoundaryType type) - : type(type) -{ - assert(type == BoundaryType::periodic || type == BoundaryType::not_a_knot); -} - - -CubicSpline::BoundaryCondition::BoundaryCondition(BoundaryType type, double val) - : type(type), val(val) -{ - assert(type == BoundaryType::first_deriv || type == BoundaryType::second_deriv); -} - - -CubicSpline::CubicSpline( - int n, - const double* x, - const double* y, - const BoundaryCondition& bc_start, - const BoundaryCondition& bc_end -): n_spline_(1), n_(n), xmin_(x[0]), xmax_(x[n - 1]), x_(x, x + n), y_(2 * n) -{ - std::copy(y, y + n, y_.begin()); - build(n, x, y, bc_start, bc_end, &y_[n]); -} - - -CubicSpline::CubicSpline( - int n, - double x0, - double dx, - const double* y, - const BoundaryCondition& bc_start, - const BoundaryCondition& bc_end -): n_spline_(1), n_(n), xmin_(x0), xmax_(x0 + (n - 1) * dx), dx_(dx), y_(2 * n) -{ - std::copy(y, y + n, y_.begin()); - build(n, dx, y, bc_start, bc_end, &y_[n]); -} - - -CubicSpline::CubicSpline(int n, const double* x) - : n_spline_(0), n_(n), xmin_(x[0]), xmax_(x[n - 1]), x_(x, x + n) -{ -} - - -CubicSpline::CubicSpline(int n, double x0, double dx) - : n_spline_(0), n_(n), xmin_(x0), xmax_(x0 + (n - 1) * dx), dx_(dx) -{ -} - - -void CubicSpline::add( - const double* y, - const BoundaryCondition& bc_start, - const BoundaryCondition& bc_end -) -{ - int offset = n_spline_ * 2 * n_; - y_.resize(offset + 2 * n_); - - std::copy(y, y + n_, &y_[offset]); - double* dy = &y_[offset + n_]; - if (x_.empty()) // evenly spaced knots - { - build(n_, dx_, y, bc_start, bc_end, dy); - } - else - { - build(n_, x_.data(), y, bc_start, bc_end, dy); - } - ++n_spline_; -} - - -void CubicSpline::eval( - int n_interp, - const double* x_interp, - double* y_interp, - double* dy_interp, - double* d2y_interp, - int i_spline -) const -{ - assert(0 <= i_spline && i_spline < n_spline_); - - const double* y = &y_[i_spline * 2 * n_]; - const double* dy = y + n_; - if (x_.empty()) // evenly spaced knots - { - eval(n_, xmin_, dx_, y, dy, n_interp, x_interp, y_interp, dy_interp, d2y_interp); - } - else - { - eval(n_, x_.data(), y, dy, n_interp, x_interp, y_interp, dy_interp, d2y_interp); - } -} - - -void CubicSpline::multi_eval( - int n_spline, - const int* i_spline, - double x_interp, - double* y_interp, - double* dy_interp, - double* d2y_interp -) const -{ - assert(std::all_of(i_spline, i_spline + n_spline, - [this](int i) { return 0 <= i && i < n_spline_; })); - _validate_eval(n_, {xmin_, dx_}, x_.empty() ? nullptr : x_.data(), - y_.data(), &y_[n_], 1, &x_interp); - - int p = 0; - double dx = 0.0, r = 0.0; - if (x_.empty()) // evenly spaced knots - { - p = _index(n_, xmin_, dx_, x_interp); - dx = dx_; - r = (x_interp - xmin_) / dx - p; - } - else - { - p = _index(n_, x_.data(), x_interp); - dx = x_[p + 1] - x_[p]; - r = (x_interp - x_[p]) / dx; - } - - const double r2 = r * r; - const double r3 = r2 * r; - double wy0 = 0.0, wy1 = 0.0, ws0 = 0.0, ws1 = 0.0; - int offset = 0; - - if (y_interp) - { - wy1 = 3.0 * r2 - 2.0 * r3; - wy0 = 1.0 - wy1; - ws0 = (r - 2.0 * r2 + r3) * dx; - ws1 = (r3 - r2) * dx; - for (int i = 0; i < n_spline; ++i) - { - offset = i_spline[i] * 2 * n_ + p; - y_interp[i] = wy0 * y_[offset] + wy1 * y_[offset + 1] - + ws0 * y_[offset + n_] + ws1 * y_[offset + n_ + 1]; - } - } - - if (dy_interp) - { - wy1 = 6.0 * (r - r2) / dx; // wy0 = -wy1 - ws0 = 3.0 * r2 - 4.0 * r + 1.0; - ws1 = 3.0 * r2 - 2.0 * r; - for (int i = 0; i < n_spline; ++i) - { - offset = i_spline[i] * 2 * n_ + p; - dy_interp[i] = wy1 * (y_[offset + 1] - y_[offset]) - + ws0 * y_[offset + n_] + ws1 * y_[offset + n_ + 1]; - } - } - - if (d2y_interp) - { - wy1 = (6.0 - 12.0 * r) / (dx * dx); // wy0 = -wy1 - ws0 = (6.0 * r - 4.0) / dx; - ws1 = (6.0 * r - 2.0) / dx; - for (int i = 0; i < n_spline; ++i) - { - offset = i_spline[i] * 2 * n_ + p; - d2y_interp[i] = wy1 * (y_[offset + 1] - y_[offset]) - + ws0 * y_[offset + n_] + ws1 * y_[offset + n_ + 1]; - } - } -} - - -void CubicSpline::multi_eval( - double x, - double* y, - double* dy, - double* d2y -) const -{ - std::vector i_spline(n_spline_); - std::iota(i_spline.begin(), i_spline.end(), 0); - multi_eval(i_spline.size(), i_spline.data(), x, y, dy, d2y); -} - - -void CubicSpline::build( - int n, - const double* x, - const double* y, - const BoundaryCondition& bc_start, - const BoundaryCondition& bc_end, - double* dy -) -{ - std::vector dx(n); - std::adjacent_difference(x, x + n, dx.begin()); - _build(n, &dx[1], y, bc_start, bc_end, dy); -} - - -void CubicSpline::build( - int n, - double dx, - const double* y, - const BoundaryCondition& bc_start, - const BoundaryCondition& bc_end, - double* dy -) -{ - std::vector dx_(n - 1, dx); - _build(n, dx_.data(), y, bc_start, bc_end, dy); -} - - -void CubicSpline::eval( - int n, - const double* x, - const double* y, - const double* dy, - int n_interp, - const double* x_interp, - double* y_interp, - double* dy_interp, - double* d2y_interp -) -{ - _validate_eval(n, {}, x, y, dy, n_interp, x_interp); - - // indices of the polynomial segments that contain x_interp - std::vector _ind(n_interp); - std::transform(x_interp, x_interp + n_interp, _ind.begin(), - [n, x](double x_i) { return _index(n, x, x_i); }); - - std::vector buffer(n_interp * 5); - double* _w = buffer.data(); - double* _c0 = _w + n_interp; - double* _c1 = _c0 + n_interp; - double* _c2 = _c1 + n_interp; - double* _c3 = _c2 + n_interp; - - for (int i = 0; i < n_interp; ++i) - { - int p = _ind[i]; - double dx = x[p + 1] - x[p]; - double inv_dx = 1.0 / dx; - double dd = (y[p + 1] - y[p]) * inv_dx; - _w[i] = x_interp[i] - x[p]; - _c0[i] = y[p]; - _c1[i] = dy[p]; - _c3[i] = (_c1[i] + dy[p + 1] - 2.0 * dd) * inv_dx * inv_dx; - _c2[i] = (dd - _c1[i]) * inv_dx - _c3[i] * dx; - } - - _cubic(n_interp, _w, _c0, _c1, _c2, _c3, y_interp, dy_interp, d2y_interp); -} - - -void CubicSpline::eval( - int n, - double x0, - double dx, - const double* y, - const double* dy, - int n_interp, - const double* x_interp, - double* y_interp, - double* dy_interp, - double* d2y_interp -) -{ - _validate_eval(n, {x0, dx}, nullptr, y, dy, n_interp, x_interp); - - // indices of the polynomial segments that contain x_interp - std::vector _ind(n_interp); - std::transform(x_interp, x_interp + n_interp, _ind.begin(), - [n, x0, dx](double x_i) { return _index(n, x0, dx, x_i); }); - - std::vector buffer(n_interp * 5); - double* _w = buffer.data(); - double* _c0 = _w + n_interp; - double* _c1 = _c0 + n_interp; - double* _c2 = _c1 + n_interp; - double* _c3 = _c2 + n_interp; - - double inv_dx = 1.0 / dx; - double inv_dx2 = inv_dx * inv_dx; - for (int i = 0; i < n_interp; ++i) - { - int p = _ind[i]; - double dd = (y[p + 1] - y[p]) * inv_dx; - _w[i] = x_interp[i] - x0 - p * dx; - _c0[i] = y[p]; - _c1[i] = dy[p]; - _c3[i] = (_c1[i] + dy[p + 1] - 2.0 * dd) * inv_dx2; - _c2[i] = (dd - _c1[i]) * inv_dx - _c3[i] * dx; - } - - _cubic(n_interp, _w, _c0, _c1, _c2, _c3, y_interp, dy_interp, d2y_interp); -} - - -void CubicSpline::_validate_build( - int n, - const double* dx, - const double* y, - const BoundaryCondition& bc_start, - const BoundaryCondition& bc_end -) -{ - assert(n > 1); - - // if periodic boundary condition is specified, it must be applied to both ends - assert((bc_start.type == BoundaryType::periodic) - == (bc_end.type == BoundaryType::periodic)); - - // y[0] must equal y[n-1] for periodic boundary condition - assert(bc_start.type != BoundaryType::periodic || y[0] == y[n - 1]); - - // not-a-knot boundary condition requires the existence of "internal" knot - // so n must be at least 3 - assert((bc_start.type != BoundaryType::not_a_knot && - bc_end.type != BoundaryType::not_a_knot) || n > 2); - - // knots must be strictly increasing - assert(std::all_of(dx, dx + n - 1, [](double d) { return d > 0.0; })); -} - - -void CubicSpline::_validate_eval( - int n, - const double (&u)[2], - const double* x, - const double* y, - const double* dy, - int n_interp, - const double* x_interp -) -{ - assert(n > 1 && y && dy); - assert((x && std::is_sorted(x, x + n, std::less_equal())) || u[1] > 0.0); - - assert((n_interp > 0 && x_interp) || n_interp == 0); - - double xmin = x ? x[0] : u[0]; - double xmax = x ? x[n - 1] : u[0] + (n - 1) * u[1]; - assert(std::all_of(x_interp, x_interp + n_interp, - [xmin, xmax](double x_i) { return xmin <= x_i && x_i <= xmax; })); -} - - -void CubicSpline::_build( - int n, - const double* dx, - const double* y, - const BoundaryCondition& bc_start, - const BoundaryCondition& bc_end, - double* dy -) -{ - _validate_build(n, dx, y, bc_start, bc_end); - - if (n == 2 && bc_start.type == BoundaryType::periodic) - { - dy[0] = dy[1] = 0.0; // the only possible solution: constant - } - else if (n == 3 && bc_start.type == BoundaryType::not_a_knot - && bc_end.type == BoundaryType::not_a_knot) - { - // in this case two conditions coincide - // simply build a parabola that passes through the three data points - double dd01 = (y[1] - y[0]) / dx[0]; // divided difference f[x0,x1] - double dd12 = (y[2] - y[1]) / dx[1]; // f[x1,x2] - double dd012 = (dd12 - dd01) / (dx[0] + dx[1]); // f[x0,x1,x2] - - dy[0] = dd01 - dd012 * dx[0]; - dy[1] = 2.0 * dd01 - dy[0]; - dy[2] = dd01 + dd012 * (dx[0] + 2.0 * dx[1]); - } - else - { - std::vector buffer(4 * n); - - double* dd = buffer.data(); // divided differences - std::adjacent_difference(y, y + n, dd); - dd += 1; // the first element computed by adjacent_difference is not a difference - std::transform(dd, dd + n - 1, dx, dd, std::divides()); - - // tridiagonal linear system (cyclic tridiagonal if periodic boundary condition) - double* d = buffer.data() + n; // main diagonal - double* l = buffer.data() + 2 * n; // subdiagonal - double* u = buffer.data() + 3 * n; // superdiagonal - - //*********************************************** - // common part of the tridiagonal linear system - //*********************************************** - std::copy(dx + 1, dx + n - 1, l); - std::copy(dx, dx + n - 2, u + 1); - - for (int i = 1; i != n - 1; ++i) - { - d[i] = 2.0 * (dx[i - 1] + dx[i]); - dy[i] = 3.0 * (dd[i - 1] * dx[i] + dd[i] * dx[i - 1]); - } - - //*********************************************** - // boundary-specific part - //*********************************************** - if (bc_start.type == BoundaryType::periodic) - { - // exclude s[n-1] and solve a a cyclic tridiagonal linear system of size n-1 - d[0] = 2.0 * (dx[n - 2] + dx[0]); - u[0] = dx[n - 2]; - l[n - 2] = dx[0]; - dy[0] = 3.0 * (dd[0] * dx[n - 2] + dd[n - 2] * dx[0]); - _solve_cyctri(n - 1, d, u, l, dy); - dy[n - 1] = dy[0]; - } - else - { - switch (bc_start.type) - { - case BoundaryType::first_deriv: - d[0] = 1.0 * dx[0]; - u[0] = 0.0; - dy[0] = bc_start.val * dx[0]; - break; - case BoundaryType::second_deriv: - d[0] = 2.0 * dx[0]; - u[0] = 1.0 * dx[0]; - dy[0] = (3.0 * dd[0] - 0.5 * bc_start.val * dx[0]) * dx[0]; - break; - default: // BoundaryCondition::not_a_knot - d[0] = dx[1]; - u[0] = dx[0] + dx[1]; - dy[0] = (dd[0] * dx[1] * (dx[0] + 2 * u[0]) + dd[1] * dx[0] * dx[0]) / u[0]; - } - - switch (bc_end.type) - { - case BoundaryType::first_deriv: - d[n - 1] = 1.0 * dx[n - 2]; - l[n - 2] = 0.0; - dy[n - 1] = bc_end.val * dx[n - 2]; - break; - case BoundaryType::second_deriv: - d[n - 1] = 2.0 * dx[n - 2]; - l[n - 2] = 1.0 * dx[n - 2]; - dy[n - 1] = (3.0 * dd[n - 2] + 0.5 * bc_end.val * dx[n - 2]) * dx[n - 2]; - break; - default: // BoundaryCondition::not_a_knot - d[n - 1] = dx[n - 3]; - l[n - 2] = dx[n - 3] + dx[n - 2]; - dy[n - 1] = (dd[n - 2] * dx[n - 3] * (dx[n - 2] + 2 * l[n - 2]) - + dd[n - 3] * dx[n - 2] * dx[n - 2]) / l[n - 2]; - } - - int nrhs = 1; - int ldb = n; - int info = 0; - dgtsv_(&n, &nrhs, l, d, u, dy, &ldb, &info); - } - } -} - - -void CubicSpline::_cubic( - int n, - const double* w, - const double* c0, - const double* c1, - const double* c2, - const double* c3, - double* y, - double* dy, - double* d2y -) -{ - if (y) - { - for (int i = 0; i < n; ++i) - { - y[i] = ((c3[i] * w[i] + c2[i]) * w[i] + c1[i]) * w[i] + c0[i]; - } - } - - if (dy) - { - for (int i = 0; i < n; ++i) - { - dy[i] = (3.0 * c3[i] * w[i] + 2.0 * c2[i]) * w[i] + c1[i]; - } - } - - if (d2y) - { - for (int i = 0; i < n; ++i) - { - d2y[i] = 6.0 * c3[i] * w[i] + 2.0 * c2[i]; - } - } -} - - -int CubicSpline::_index(int n, const double* knots, double x) -{ - int i = (std::upper_bound(knots, knots + n, x) - knots) - 1; - return i - (i == n - 1); -} - - -int CubicSpline::_index(int n, double x0, double dx, double x) -{ - int i = (x - x0) / dx; - return i - (i == n - 1); -} - - -void CubicSpline::_solve_cyctri(int n, double* d, double* u, double* l, double* b) -{ - // flexible non-zero parameters that can affect the condition number of the - // tridiagonal linear system - double alpha = 1.0; - double beta = -d[0] / u[n - 1]; - - std::vector bp(2 * n, 0.0); - std::copy(b, b + n, bp.begin()); - bp[n] = 1. / alpha; - bp[2 * n - 1] = 1. / beta; - - d[0] -= u[n - 1] * beta / alpha; - d[n - 1] -= l[n - 1] * alpha / beta; - - int nrhs = 2; - int info = 0; - int ldb = n; - dgtsv_(&n, &nrhs, l, d, u, bp.data(), &ldb, &info); - - double fac = (beta * u[n - 1] * bp[0] + alpha * l[n - 1] * bp[n - 1]) - / (1. + beta * u[n - 1] * bp[n] + alpha * l[n - 1] * bp[2 * n - 1]); - - std::transform(bp.begin(), bp.begin() + n, bp.begin() + n, b, - [fac](double yi, double zi) { return yi - fac * zi; }); -} - - diff --git a/source/module_base/cubic_spline.h b/source/module_base/cubic_spline.h deleted file mode 100644 index 4455b080e9..0000000000 --- a/source/module_base/cubic_spline.h +++ /dev/null @@ -1,611 +0,0 @@ -#ifndef CUBIC_SPLINE_INTERPOLATION_H_ -#define CUBIC_SPLINE_INTERPOLATION_H_ - -#include -#include - -namespace ModuleBase -{ - -/** - * @brief Cubic spline interplation. - * - * Interpolating a set of data points (x[i], y[i]) (i=0,...,n-1) by piecewise - * cubic polynomials - * - * p_i(x) = c0[i] + c1[i]*(x-x[i]) + c2[i]*(x-x[i])^2 + c3[i]*(x-x[i])^3 - * - * with continuous first and second derivatives. (p_i(x) is defined on the - * interval [x[i], x[i+1]]) - * - * There are two ways to use this class. The first way treats class objects as - * interpolants; the second way uses static member functions. - * - * Usage-1: object as interpolant - * - * //--------------------------------------------------------------------- - * // basic usage - * //--------------------------------------------------------------------- - * // build the interpolant object - * // n is the number of data points (x[i], y[i]) (i=0,...,n-1) - * CubicSpline cubspl(n, x, y); - * - * // evaluates the interpolant at multiple places (x_interp) - * // n_interp is the number of places to evaluate the interpolant - * cubspl.eval(n_interp, x_interp, y_interp); // values are returned in y_interp - * - * // evaluates both the values and first derivatives at x_interp - * cubspl.eval(n_interp, x_interp, y_interp, dy_interp); - * - * // evaluates the second derivative only - * cubspl.eval(n_interp, x_interp, nullptr, nullptr, d2y_interp); - * - * //--------------------------------------------------------------------- - * // evenly spaced knots - * //--------------------------------------------------------------------- - * // Interpolants with evenly spaced knots can be built by a different - * // constructor, which allows faster evaluation due to quicker index lookup. - * - * // build an interpolant with evenly spaced knots x[i] = x0 + i*dx - * CubicSpline cubspl(n, x0, dx, y); - * - * //--------------------------------------------------------------------- - * // boundary conditions - * //--------------------------------------------------------------------- - * // By default "not-a-knot" boundary condition is applied to both ends. - * // Other supported boundary conditions include first/second derivatives - * // and periodic boundary condition. - * - * // build an interpolant with f''(start) = 1.0 and f'(end) = 3.0 - * CubicSpline cubspl(n, x, y, - * {CubicSpline::BoundaryType::second_deriv, 1.0}, - * {CubicSpline::BoundaryType::first_deriv, 3.0}); - * - * // build an interpolant with periodic boundary condition - * CubicSpline cubspl(n, x, y, // y[0] must equal y[n-1] - * {CubicSpline::BoundaryType::periodic}, - * {CubicSpline::BoundaryType::periodic}); - * - * //--------------------------------------------------------------------- - * // multiple interpolants - * //--------------------------------------------------------------------- - * // Once an object is constructed, more interpolants that share the same - * // knots can be added. - * // Such interpolants can be evaluated simultaneously at a single place. - * - * // build an object with 5 interpolants - * CubicSpline cubspl5(n, x, y); - * cubspl5.reserve(5); // reduce memory reallocations & data copies - * cubspl5.add(y2); - * cubspl5.add(y3, {CubicSpline::BoundaryType::first_deriv, 1.0}, {}); - * cubspl5.add(y4, {}, {CubicSpline::BoundaryType::second_deriv, 2.0}); - * cubspl5.add(y5); - * - * // alternative, one may start with an empty object with knots only: - * // CubicSpline cubspl5(n, x); - * // cubspl5.reserve(5); - * // cubspl5.add(y); - * // cubspl5.add(y2); - * // ... - * - * // evaluates the five interpolants simultaneously at a single place - * cubspl5.multi_eval(x_interp, y_interp) - * - * // evaluate the first and third interpolants at a single place - * std::vector ind = {0, 2}; - * cubspl5.multi_eval(ind.size(), ind.data(), x_interp, y_interp) - * - * // evaluate the last interpolant (i_spline == 4) at multiple places - * cubspl5.eval(n_interp, x_interp, y_interp, nullptr, nullptr, 4) - * - * - * Usage-2: static member functions - * - * // step-1: computes the first-derivatives at knots - * // boundary conditions defaulted to "not-a-knot" - * CubicSpline::build(n, x, y, {}, {}, dy); - * - * // Various boundary conditions and evenly spaced knots are supported - * // in the same way as the interpolant object. - * - * // step-2: computes the interpolated values & derivatives - * CubicSpline::eval(n, x, y, dy, n_interp, x_interp, y_interp, dy_interp); - * - * // Simultaneous evaluation of multiple interpolants are not supported - * // for static functions. - * - */ -class CubicSpline -{ - //***************************************************************** - // boundary condition - //***************************************************************** - -public: - - /** - * @brief Types of cubic spline boundary conditions. - * - * Supported types include: - * - not_a_knot The first or last two pieces are the same polynomial, - * i.e., x[1] or x[n-2] is not a "knot". This does not - * rely on any prior knowledge of the original function - * and is the default option. - * - first_deriv user-defined first derivative - * - second_deriv user-defined second derivative - * - periodic the first and second derivatives at two ends are continuous. - * This condition requires that y[0] = y[n-1] and it must be - * applied to both ends - */ - enum class BoundaryType - { - not_a_knot, - first_deriv, - second_deriv, - periodic - }; - - - /** - * @brief Boundary condition for cubic spline interpolation. - * - * An object of this struct represents an actual boundary condition at one end, - * which contains a type and possibly a value (first/second_deriv only). - * - */ - struct BoundaryCondition - { - // for not_a_knot and periodic - BoundaryCondition(BoundaryType type = BoundaryType::not_a_knot); - - // for first/second_deriv - BoundaryCondition(BoundaryType type, double val); - - BoundaryType type; - double val = 0.0; - }; - - - //***************************************************************** - // interpolant object - //***************************************************************** - -public: - - CubicSpline() = delete; - CubicSpline(CubicSpline const&) = default; - CubicSpline(CubicSpline &&) = default; - - CubicSpline& operator=(CubicSpline const&) = default; - CubicSpline& operator=(CubicSpline &&) = default; - - ~CubicSpline() = default; - - - /** - * @brief Builds an interpolant object. - * - * Constructing a cubic spline interpolant from a set of data points - * (x[i], y[i]) (i=0,1,...,n-1) and boundary conditions. - * - * @param[in] n number of data points - * @param[in] x x coordinates of data points - * ("knots", must be strictly increasing) - * @param[in] y y coordinates of data points - * @param[in] bc_start boundary condition at start - * @param[in] bc_end boundary condition at end - * - */ - CubicSpline( - int n, - const double* x, - const double* y, - const BoundaryCondition& bc_start = {}, - const BoundaryCondition& bc_end = {} - ); - - - /** - * @brief Builds an interpolant object with evenly-spaced knots. - * - * Constructing a cubic spline interpolant from a set of data points - * (x0+i*dx, y[i]) (i=0,1,...,n-1) and boundary conditions. - * - * @param[in] n number of data points - * @param[in] x0 x coordinate of the first data point (first knot) - * @param[in] dx spacing between knots (must be positive) - * @param[in] y y coordinates of data points - * @param[in] bc_start boundary condition at start - * @param[in] bc_end boundary condition at end - * - */ - CubicSpline( - int n, - double x0, - double dx, - const double* y, - const BoundaryCondition& bc_start = {}, - const BoundaryCondition& bc_end = {} - ); - - - /** - * @brief Builds an empty object with specified knots only. - * - * An object of this class can hold multiple interpolants with the same knots. - * This constructor allows the user to initialize the object with knots only, - * so that interpolants can be added later. - * - * @param[in] n number of knots - * @param[in] x x coordinates of data points - * ("knots", must be strictly increasing) - * - */ - CubicSpline(int n, const double* x); - - /** - * @brief Builds an empty object with specified knots only. - * - * An object of this class can hold multiple interpolants with the same knots. - * This constructor allows the user to initialize the object with knots only, - * so that interpolants can be added later. - * - * @param[in] n number of knots - * @param[in] x0 x coordinate of the first data point (first knot) - * @param[in] dx spacing between knots (must be positive) - * - */ - CubicSpline(int n, double x0, double dx); - - /** - * @brief Adds an interpolant that shares the same knots. - * - * An object of this class can hold multiple interpolants with the same knots. - * Once constructed, more interpolants sharing the same knots can be added by - * this function. Multiple interpolants can be evaluated simultaneously at a - * single place by multi_eval. - * - * @param[in] y y coordinates of data points - * @param[in] bc_start boundary condition at start - * @param[in] bc_end boundary condition at end - * - */ - void add( - const double* y, - const BoundaryCondition& bc_start = {}, - const BoundaryCondition& bc_end = {} - ); - - - /** - * @brief Evaluates a single interpolant at multiple places. - * - * @param[in] n_interp number of places to evaluate the interpolant - * @param[in] x_interp places where an interpolant is evaluated - * (must be within the range of knots) - * @param[out] y_interp values at x_interp - * @param[out] dy_interp first derivatives at x_interp - * @param[out] d2y_interp second derivatives at x_interp - * @param[in] i_spline index of the interpolant to evaluate - * - * @note pass nullptr to any of the output would suppress the corresponding calculation - * - */ - void eval( - int n_interp, - const double* x_interp, - double* y_interp, - double* dy_interp = nullptr, - double* d2y_interp = nullptr, - int i_spline = 0 - ) const; - - - /** - * @brief Evaluates multiple interpolants at a single place. - * - * @param[in] n_spline number of interpolants to evaluate - * @param[in] i_spline indices of interpolants to evaluate - * @param[in] x_interp place where interpolants are evaluated - * (must be within the range of knots) - * @param[out] y_interp values at x_interp - * @param[out] dy_interp first derivatives at x_interp - * @param[out] d2y_interp second derivatives at x_interp - * - * @note pass nullptr to any of the output would suppress the corresponding calculation - * - */ - void multi_eval( - int n_spline, - const int* i_spline, - double x_interp, - double* y_interp, - double* dy_interp = nullptr, - double* d2y_interp = nullptr - ) const; - - - /** - * @brief Evaluates all interpolants at a single place. - * - * @param[in] x_interp place where interpolants are evaluated - * (must be within the range of knots) - * @param[out] y_interp values at x_interp - * @param[out] dy_interp first derivatives at x_interp - * @param[out] d2y_interp second derivatives at x_interp - * - * @note pass nullptr to any of the output would suppress the corresponding calculation - * - */ - void multi_eval( - double x_interp, - double* y_interp, - double* dy_interp = nullptr, - double* d2y_interp = nullptr - ) const; - - - /** - * @brief Reserves memory for holding more interpolants. - * - * By default this class does not reserve memory for multiple interpolants. - * Without reservation, whenever a new interpolant is added, memory has to - * be reallocated and old data copied, which could waste a lot of time if - * there's a large number of interpolants to add. - * - * This function help avoid repetitive memory reallocations and data copies - * by a one-shot reservation. - * - * @param[in] n_spline expected total number of interpolants - * - */ - void reserve(int n_spline) { y_.reserve(n_spline * n_ * 2); } - - - /// heap memory usage in bytes - size_t heap_usage() const { return (x_.capacity() + y_.capacity()) * sizeof(double); } - - /// first knot - double xmin() const { return xmin_; } - - /// last knot - double xmax() const { return xmax_; } - - /// number of interpolants held by this object - int n_spline() const { return n_spline_; } - - -private: - - /// number of cubic spline interpolants - int n_spline_ = 0; - - /// number of knots - int n_ = 0; - - /// first knot - double xmin_ = 0.0; - - /// last knot - double xmax_ = 0.0; - - /// spacing between knots (only used for evenly-spaced knots) - double dx_ = 0.0; - - /// knots of the spline polynomial (remains empty for evenly-spaced knots) - std::vector x_; - - /// values and first derivatives at knots - std::vector y_; - - - //***************************************************************** - // static functions - //***************************************************************** - -public: - - /** - * @brief Computes the first derivatives at knots for cubic spline - * interpolation. - * - * @param[in] n number of data points - * @param[in] x x coordinates of data points - * ("knots", must be strictly increasing) - * @param[in] y y coordinates of data points - * @param[in] bc_start boundary condition at start - * @param[in] bc_end boundary condition at end - * @param[out] dy first derivatives at knots - * - */ - static void build( - int n, - const double* x, - const double* y, - const BoundaryCondition& bc_start, - const BoundaryCondition& bc_end, - double* dy - ); - - - /** - * @brief Computes the first derivatives at evenly-spaced knots for - * cubic spline interpolation. - * - * @param[in] n number of data points - * @param[in] dx spacing between knots (must be positive) - * @param[in] y y coordinates of data points - * @param[in] bc_start boundary condition at start - * @param[in] bc_end boundary condition at end - * @param[out] dy first derivatives at knots - * - */ - static void build( - int n, - double dx, - const double* y, - const BoundaryCondition& bc_start, - const BoundaryCondition& bc_end, - double* dy - ); - - - /** - * @brief Evaluates a cubic spline polynomial at multiple places. - * - * @param[in] n number of knots - * @param[in] x knots (must be strictly increasing) - * @param[in] y values at knots - * @param[in] dy first derivatives at knots - * @param[in] n_interp number of places to evaluate the interpolant - * @param[in] x_interp places where the interpolant is evaluated - * (must be within the range of knots) - * @param[out] y_interp values at x_interp - * @param[out] dy_interp first derivatives at x_interp - * @param[out] d2y_interp second derivatives at x_interp - * - * @note pass nullptr to any of the output would suppress the corresponding calculation - * - */ - static void eval( - int n, - const double* x, - const double* y, - const double* dy, - int n_interp, - const double* x_interp, - double* y_interp, - double* dy_interp = nullptr, - double* d2y_interp = nullptr - ); - - - /** - * @brief Evaluates a cubic spline polynomial with evenly spaced knots. - * - * @param[in] n number of knots - * @param[in] x0 first knot - * @param[in] dx spacing between knots - * @param[in] y values at knots - * @param[in] dy first derivatives at knots - * @param[in] n_interp number of places to evaluate the interpolant - * @param[in] x_interp places where the interpolant is evaluated - * (must be within the range of knots) - * @param[out] y_interp values at x_interp - * @param[out] dy_interp first derivatives at x_interp - * @param[out] d2y_interp second derivatives at x_interp - * - * @note pass nullptr to any of the output would suppress the corresponding calculation - * - */ - static void eval( - int n, - double x0, - double dx, - const double* y, - const double* dy, - int n_interp, - const double* x_interp, - double* y_interp, - double* dy_interp = nullptr, - double* d2y_interp = nullptr - ); - - -private: - - /// Computational routine for building cubic spline interpolant - static void _build( - int n, - const double* dx, - const double* y, - const BoundaryCondition& bc_start, - const BoundaryCondition& bc_end, - double* dy - ); - - - /** - * @brief Segment index lookup. - * - * Given a strictly increasing array x and a target within the range of - * x, this function returns an index i such that x[i] <= target < x[i+1] - * if target != x[n-1], or n-2 if t == x[n-1]. - * - */ - static inline int _index(int n, const double* x, double target); - - - /// Segment index lookup (evenly spaced knots). - static inline int _index(int n, double x0, double dx, double target); - - - /// Evaluates a batch of cubic polynomials. - static inline void _cubic( - int n, - const double* w, - const double* c0, - const double* c1, - const double* c2, - const double* c3, - double* y, - double* dy, - double* d2y - ); - - - /// Asserts that the input arguments are valid for constructing a cubic spline. - static void _validate_build( - int n, - const double* dx, - const double* y, - const BoundaryCondition& bc_start, - const BoundaryCondition& bc_end - ); - - - /// Asserts that the input arguments are valid for interpolating a cubic spline. - static void _validate_eval( - int n, - const double (&u)[2], - const double* x, - const double* y, - const double* dy, - int n_interp, - const double* x_interp - ); - - - /** - * @brief Solves a cyclic tridiagonal linear system. - * - * A cyclic tridiagonal linear system A*x=b where b is a vector and - * - * -- -- - * | d[0] u[0] l[n-1] | - * | l[0] d[1] u[1] | - * A = | l[1] d[2] u[2] | - * | ... ... ... | - * | l[n-3] d[n-2] u[n-2] | - * | u[n-1] l[n-2] d[n-1] | - * -- -- - * - * is transformed to a tridiagonal linear system by the Sherman-Morrison - * formula, and then solved by dgtsv. - * - * @param[in] n size of the linear system - * @param[in] d main diagonal - * @param[in] u superdiagonal - * @param[in] l subdiagonal - * @param[in,out] b right hand side of the linear system; will be - * overwritten by the solution on finish. - * - * @note d, l, u are all overwritten in this function. - * - */ - static void _solve_cyctri(int n, double* d, double* u, double* l, double* b); -}; - -} // namespace ModuleBase - -#endif diff --git a/source/module_base/element_basis_index.cpp b/source/module_base/element_basis_index.cpp deleted file mode 100644 index 1130de59e3..0000000000 --- a/source/module_base/element_basis_index.cpp +++ /dev/null @@ -1,38 +0,0 @@ -//========================================================== -// AUTHOR : Peize Lin -// DATE : 2016-06-02 -//========================================================== - -#include "element_basis_index.h" -namespace ModuleBase -{ - -Element_Basis_Index::IndexLNM Element_Basis_Index::construct_index( const Range &range ) -{ - IndexLNM index; - index.resize( range.size() ); - for( size_t T=0; T!=range.size(); ++T ) - { - size_t count=0; - index[T].resize( range[T].size() ); - for( size_t L=0; L!=range[T].size(); ++L ) - { - index[T][L].resize( range[T][L].N ); - for( size_t N=0; N!=range[T][L].N; ++N ) - { - index[T][L][N].resize( range[T][L].M ); - for( size_t M=0; M!=range[T][L].M; ++M ) - { - index[T][L][N][M] = count; - ++count; - } - } - index[T][L].N = range[T][L].N; - index[T][L].M = range[T][L].M; - } - index[T].count_size = count; - } - return index; -} - -} \ No newline at end of file diff --git a/source/module_base/element_basis_index.h b/source/module_base/element_basis_index.h deleted file mode 100644 index 96918b8e03..0000000000 --- a/source/module_base/element_basis_index.h +++ /dev/null @@ -1,48 +0,0 @@ -//========================================================== -// AUTHOR : Peize Lin -// DATE : 2016-06-02 -//========================================================== - -#ifndef ELEMENT_BASIS_INDEX_H -#define ELEMENT_BASIS_INDEX_H - -#include -#include -namespace ModuleBase -{ - -class Element_Basis_Index -{ -private: - - struct NM - { - public: - size_t N; - size_t M; - }; - - class Index_TL: public std::vector> - { - public: - size_t N; - size_t M; - }; - - class Index_T: public std::vector - { - public: - size_t count_size; - }; - -public: - - typedef std::vector> Range; // range[T][L] - typedef std::vector IndexLNM; // index[T][L][N][M] - - static IndexLNM construct_index( const Range &range ); -}; - -} - -#endif \ No newline at end of file diff --git a/source/module_base/element_covalent_radius.h b/source/module_base/element_covalent_radius.h deleted file mode 100644 index 88f5afff3d..0000000000 --- a/source/module_base/element_covalent_radius.h +++ /dev/null @@ -1,138 +0,0 @@ -#ifndef ELEMENT_COVALENT_RADIUS -#define ELEMENT_COVALENT_RADIUS - -#include -#include - -//The covalent radius is from -//https://www.rsc.org/periodic-table/ -//unit in Angstrom - -namespace ModuleBase -{ - -const std::map CovalentRadius -= { -{"H" ,0.32}, //1 -{"He" ,0.37}, //2 -{"Li" ,1.30}, //3 -{"Be" ,0.99}, //4 -{"B" ,0.84}, //5 -{"C" ,0.75}, //6 -{"N" ,0.71}, //7 -{"O" ,0.64}, //8 -{"F" ,0.60}, //9 -{"Ne" ,0.62}, //10 -{"Na" ,1.60}, //11 -{"Mg" ,1.40}, //12 -{"Al" ,1.24}, //13 -{"Si" ,1.14}, //14 -{"P" ,1.09}, //15 -{"S" ,1.04}, //16 -{"Cl" ,1.00}, //17 -{"Ar" ,1.01}, //18 -{"K" ,2.00}, //19 -{"Ca" ,1.74}, //20 -{"Sc" ,1.59}, //21 -{"Ti" ,1.48}, //22 -{"V" ,1.44}, //23 -{"Cr" ,1.30}, //24 -{"Mn" ,1.29}, //25 -{"Fe" ,1.24}, //26 -{"Co" ,1.18}, //27 -{"Ni" ,1.17}, //28 -{"Cu" ,1.22}, //29 -{"Zn" ,1.20}, //30 -{"Ga" ,1.23}, //31 -{"Ge" ,1.20}, //32 -{"As" ,1.20}, //33 -{"Se" ,1.18}, //34 -{"Br" ,1.17}, //35 -{"Kr" ,1.16}, //36 -{"Rb" ,2.15}, //37 -{"Sr" ,1.90}, //38 -{"Y" ,1.76}, //39 -{"Zr" ,1.64}, //40 -{"Nb" ,1.56}, //41 -{"Mo" ,1.46}, //42 -{"Tc" ,1.38}, //43 -{"Ru" ,1.36}, //44 -{"Rh" ,1.34}, //45 -{"Pd" ,1.30}, //46 -{"Ag" ,1.36}, //47 -{"Cd" ,1.40}, //48 -{"In" ,1.42}, //49 -{"Sn" ,1.40}, //50 -{"Sb" ,1.40}, //51 -{"Te" ,1.37}, //52 -{"I" ,1.36}, //53 -{"Xe" ,1.36}, //54 -{"Cs" ,2.38}, //55 -{"Ba" ,2.06}, //56 -{"La" ,1.94}, //57 -{"Ce" ,1.84}, //58 -{"Pr" ,1.90}, //59 -{"Nd" ,1.88}, //60 -{"Pm" ,1.86}, //61 -{"Sm" ,1.85}, //62 -{"Eu" ,1.83}, //63 -{"Gd" ,1.82}, //64 -{"Tb" ,1.81}, //65 -{"Dy" ,1.80}, //66 -{"Ho" ,1.79}, //67 -{"Er" ,1.77}, //68 -{"Tm" ,1.77}, //69 -{"Yb" ,1.78}, //70 -{"Lu" ,1.74}, //71 -{"Hf" ,1.64}, //72 -{"Ta" ,1.58}, //73 -{"W" ,1.50}, //74 -{"Re" ,1.41}, //75 -{"Os" ,1.36}, //76 -{"Ir" ,1.32}, //77 -{"Pt" ,1.30}, //78 -{"Au" ,1.30}, //79 -{"Hg" ,1.32}, //80 -{"Tl" ,1.44}, //81 -{"Pb" ,1.45}, //82 -{"Bi" ,1.50}, //83 -{"Po" ,1.42}, //84 -{"At" ,1.48}, //85 -{"Rn" ,1.46}, //86 -{"Fr" ,2.42}, //87 -{"Ra" ,2.11}, //88 -{"Ac" ,2.01}, //89 -{"Th" ,1.90}, //90 -{"Pa" ,1.84}, //91 -{"U" ,1.83}, //92 -{"Np" ,1.80}, //93 -{"Pu" ,1.80}, //94 -{"Am" ,1.73}, //95 -{"Cm" ,1.68}, //96 -{"Bk" ,1.68}, //97 -{"Cf" ,1.68}, //98 -{"Es" ,1.65}, //99 -{"Fm" ,1.67}, //100 -{"Md" ,1.73}, //101 -{"No" ,1.76}, //102 -{"Lr" ,1.61}, //103 -{"Rf" ,1.57}, //104 -{"Db" ,1.49}, //105 -{"Sg" ,1.43}, //106 -{"Bh" ,1.41}, //107 -{"Hs" ,1.34}, //108 -{"Mt" ,1.29}, //109 -{"Ds" ,1.28}, //110 -{"Rg" ,1.21}, //111 -{"Cn" ,1.22}, //112 -{"Nh" ,1.36}, //113 -{"Fl" ,1.43}, //114 -{"Mc" ,1.62}, //115 -{"Lv" ,1.75}, //116 -{"Ts" ,1.65}, //117 -{"Og" ,1.57} //118 -}; - -} - -#endif diff --git a/source/module_base/element_elec_config.h b/source/module_base/element_elec_config.h deleted file mode 100644 index b293a9b666..0000000000 --- a/source/module_base/element_elec_config.h +++ /dev/null @@ -1,378 +0,0 @@ -#ifndef ELEMENT_ELEC_CONFIG -#define ELEMENT_ELEC_CONFIG - -#include -#include - -namespace ModuleBase -{ - -const std::map EleConfig -= { -{"H", "1s1"}, -{"He", "1s2"}, -{"Li", "[He] 2s1"}, -{"Be", "[He] 2s2"}, -{"B", "[He] 2s2 2p1"}, -{"C", "[He] 2s2 2p2"}, -{"N", "[He] 2s2 2p3"}, -{"O", "[He] 2s2 2p4"}, -{"F", "[He] 2s2 2p5"}, -{"Ne", "[He] 2s2 2p6"}, -{"Na", "[Ne] 3s1"}, -{"Mg", "[Ne] 3s2"}, -{"Al", "[Ne] 3s2 3p1"}, -{"Si", "[Ne] 3s2 3p2"}, -{"P", "[Ne] 3s2 3p3"}, -{"S", "[Ne] 3s2 3p4"}, -{"Cl", "[Ne] 3s2 3p5"}, -{"Ar", "[Ne] 3s2 3p6"}, -{"K", "[Ar] 4s1"}, -{"Ca", "[Ar] 4s2"}, -{"Sc", "[Ar] 3d1 4s2"}, -{"Ti", "[Ar] 3d2 4s2"}, -{"V", "[Ar] 3d3 4s2"}, -{"Cr", "[Ar] 3d5 4s1"}, -{"Mn", "[Ar] 3d5 4s2"}, -{"Fe", "[Ar] 3d6 4s2"}, -{"Co", "[Ar] 3d7 4s2"}, -{"Ni", "[Ar] 3d8 4s2"}, -{"Cu", "[Ar] 3d10 4s1"}, -{"Zn", "[Ar] 3d10 4s2"}, -{"Ga", "[Ar] 3d10 4s2 4p1"}, -{"Ge", "[Ar] 3d10 4s2 4p2"}, -{"As", "[Ar] 3d10 4s2 4p3"}, -{"Se", "[Ar] 3d10 4s2 4p4"}, -{"Br", "[Ar] 3d10 4s2 4p5"}, -{"Kr", "[Ar] 3d10 4s2 4p6"}, -{"Rb", "[Kr] 5s1"}, -{"Sr", "[Kr] 5s2"}, -{"Y", "[Kr] 4d1 5s2"}, -{"Zr", "[Kr] 4d2 5s2"}, -{"Nb", "[Kr] 4d4 5s1"}, -{"Mo", "[Kr] 4d5 5s1"}, -{"Tc", "[Kr] 4d5 5s2"}, -{"Ru", "[Kr] 4d7 5s1"}, -{"Rh", "[Kr] 4d8 5s1"}, -{"Pd", "[Kr] 4d10"}, -{"Ag", "[Kr] 4d10 5s1"}, -{"Cd", "[Kr] 4d10 5s2"}, -{"In", "[Kr] 4d10 5s2 5p1"}, -{"Sn", "[Kr] 4d10 5s2 5p2"}, -{"Sb", "[Kr] 4d10 5s2 5p3"}, -{"Te", "[Kr] 4d10 5s2 5p4"}, -{"I", "[Kr] 4d10 5s2 5p5"}, -{"Xe", "[Kr] 4d10 5s2 5p6"}, -{"Cs", "[Xe] 6s1"}, -{"Ba", "[Xe] 6s2"}, -{"La", "[Xe] 5d1 6s2"}, -{"Ce", "[Xe] 4f1 5d1 6s2"}, -{"Pr", "[Xe] 4f3 6s2"}, -{"Nd", "[Xe] 4f4 6s2"}, -{"Pm", "[Xe] 4f5 6s2"}, -{"Sm", "[Xe] 4f6 6s2"}, -{"Eu", "[Xe] 4f7 6s2"}, -{"Gd", "[Xe] 4f7 5d1 6s2"}, -{"Tb", "[Xe] 4f9 6s2"}, -{"Dy", "[Xe] 4f10 6s2"}, -{"Ho", "[Xe] 4f11 6s2"}, -{"Er", "[Xe] 4f12 6s2"}, -{"Tm", "[Xe] 4f13 6s2"}, -{"Yb", "[Xe] 4f14 6s2"}, -{"Lu", "[Xe] 4f14 5d1 6s2"}, -{"Hf", "[Xe] 4f14 5d2 6s2"}, -{"Ta", "[Xe] 4f14 5d3 6s2"}, -{"W", "[Xe] 4f14 5d4 6s2"}, -{"Re", "[Xe] 4f14 5d5 6s2"}, -{"Os", "[Xe] 4f14 5d6 6s2"}, -{"Ir", "[Xe] 4f14 5d7 6s2"}, -{"Pt", "[Xe] 4f14 5d9 6s1"}, -{"Au", "[Xe] 4f14 5d10 6s1"}, -{"Hg", "[Xe] 4f14 5d10 6s2"}, -{"Tl", "[Xe] 4f14 5d10 6s2 6p1"}, -{"Pb", "[Xe] 4f14 5d10 6s2 6p2"}, -{"Bi", "[Xe] 4f14 5d10 6s2 6p3"}, -{"Po", "[Xe] 4f14 5d10 6s2 6p4"}, -{"At", "[Xe] 4f14 5d10 6s2 6p5"}, -{"Rn", "[Xe] 4f14 5d10 6s2 6p6"}, -{"Fr", "[Rn] 7s1"}, -{"Ra", "[Rn] 7s2"}, -{"Ac", "[Rn] 6d1 7s2"}, -{"Th", "[Rn] 6d2 7s2"}, -{"Pa", "[Rn] 5f2 6d1 7s2"}, -{"U" , "[Rn] 5f3 6d1 7s2"}, -{"Np", "[Rn] 5f4 6d1 7s2"}, -{"Pu", "[Rn] 5f6 7s2"}, -{"Am", "[Rn] 5f7 7s2"}, -{"Cm", "[Rn] 5f7 6d1 7s2"}, -{"Bk", "[Rn] 5f9 7s2"}, -{"Cf", "[Rn] 5f10 7s2"}, -{"Es", "[Rn] 5f11 7s2"}, -{"Fm", "[Rn] 5f12 7s2"}, -{"Md", "[Rn] 5f13 7s2"}, -{"No", "[Rn] 5f14 7s2"}, -{"Lr", "[Rn] 5f14 7s2 7p1"}, -{"Rf", "[Rn] 5f14 6d2 7s2"}, -{"Db", "[Rn] 5f14 6d3 7s2"}, -{"Sg", "[Rn] 5f14 6d4 7s2"}, -{"Bh", "[Rn] 5f14 6d5 7s2"}, -{"Hs", "[Rn] 5f14 6d6 7s2"}, -{"Mt", "[Rn] 5f14 6d7 7s2"}, -{"Ds", "[Rn] 5f14 6d8 7s2"}, -{"Rg", "[Rn] 5f14 6d10 7s1"}, -{"Cn", "[Rn] 5f14 6d10 7s2"}, -{"Nh", "[Rn] 5f14 6d10 7s2 7p1"}, -{"Fl", "[Rn] 5f14 6d10 7s2 7p2"}, -{"Mc", "[Rn] 5f14 6d10 7s2 7p3"}, -{"Lv", "[Rn] 5f14 6d10 7s2 7p4"}, -{"Ts", "[Rn] 5f14 6d10 7s2 7p5"}, -{"Og", "[Rn] 5f14 6d10 7s2 7p6"} -}; - -const std::map MinZval -= { -{"H", 1}, -{"He", 2}, -{"Li", 1}, -{"Be", 2}, -{"B", 3}, -{"C", 4}, -{"N", 5}, -{"O", 6}, -{"F", 7}, -{"Ne", 8}, -{"Na", 1}, -{"Mg", 2}, -{"Al", 3}, -{"Si", 4}, -{"P", 5}, -{"S", 6}, -{"Cl", 7}, -{"Ar", 8}, -{"K", 1}, -{"Ca", 2}, -{"Sc", 3}, -{"Ti", 4}, -{"V", 5}, -{"Cr", 6}, -{"Mn", 7}, -{"Fe", 8}, -{"Co", 9}, -{"Ni", 10}, -{"Cu", 11}, -{"Zn", 12}, -{"Ga", 3}, -{"Ge", 4}, -{"As", 5}, -{"Se", 6}, -{"Br", 7}, -{"Kr", 8}, -{"Rb", 1}, -{"Sr", 2}, -{"Y", 3}, -{"Zr", 4}, -{"Nb", 5}, -{"Mo", 6}, -{"Tc", 7}, -{"Ru", 8}, -{"Rh", 9}, -{"Pd", 10}, -{"Ag", 11}, -{"Cd", 12}, -{"In", 3}, -{"Sn", 4}, -{"Sb", 5}, -{"Te", 6}, -{"I", 7}, -{"Xe", 8}, -{"Cs", 1}, -{"Ba", 2}, -{"La", 3}, -{"Ce", 4}, -{"Pr", 5}, -{"Nd", 6}, -{"Pm", 7}, -{"Sm", 8}, -{"Eu", 9}, -{"Gd", 10}, -{"Tb", 11}, -{"Dy", 12}, -{"Ho", 13}, -{"Er", 14}, -{"Tm", 15}, -{"Yb", 16}, -{"Lu", 17}, -{"Hf", 4}, -{"Ta", 5}, -{"W", 6}, -{"Re", 7}, -{"Os", 8}, -{"Ir", 9}, -{"Pt", 10}, -{"Au", 11}, -{"Hg", 12}, -{"Tl", 3}, -{"Pb", 4}, -{"Bi", 5}, -{"Po", 6}, -{"At", 7}, -{"Rn", 8}, -{"Fr", 1}, -{"Ra", 2}, -{"Ac", 3}, -{"Th", 4}, -{"Pa", 5}, -{"U" , 6}, -{"Np", 7}, -{"Pu", 8}, -{"Am", 9}, -{"Cm", 10}, -{"Bk", 11}, -{"Cf", 12}, -{"Es", 13}, -{"Fm", 14}, -{"Md", 15}, -{"No", 16}, -{"Lr", 17}, -{"Rf", 18}, -{"Db", 19}, -{"Sg", 20}, -{"Bh", 21}, -{"Hs", 22}, -{"Mt", 23}, -{"Ds", 24}, -{"Rg", 25}, -{"Cn", 26}, -{"Nh", 27}, -{"Fl", 28}, -{"Mc", 29}, -{"Lv", 30}, -{"Ts", 31}, -{"Og", 32} -}; - -const std::map IsTransMetal -= { -{"H", 0}, -{"He", 0}, -{"Li", 0}, -{"Be", 0}, -{"B", 0}, -{"C", 0}, -{"N", 0}, -{"O", 0}, -{"F", 0}, -{"Ne", 0}, -{"Na", 0}, -{"Mg", 0}, -{"Al", 0}, -{"Si", 0}, -{"P", 0}, -{"S", 0}, -{"Cl", 0}, -{"Ar", 0}, -{"K", 0}, -{"Ca", 0}, -{"Sc", 1}, -{"Ti", 1}, -{"V", 1}, -{"Cr", 1}, -{"Mn", 1}, -{"Fe", 1}, -{"Co", 1}, -{"Ni", 1}, -{"Cu", 1}, -{"Zn", 1}, -{"Ga", 0}, -{"Ge", 0}, -{"As", 0}, -{"Se", 0}, -{"Br", 0}, -{"Kr", 0}, -{"Rb", 0}, -{"Sr", 0}, -{"Y", 1}, -{"Zr", 1}, -{"Nb", 1}, -{"Mo", 1}, -{"Tc", 1}, -{"Ru", 1}, -{"Rh", 1}, -{"Pd", 1}, -{"Ag", 1}, -{"Cd", 1}, -{"In", 0}, -{"Sn", 0}, -{"Sb", 0}, -{"Te", 0}, -{"I", 0}, -{"Xe", 0}, -{"Cs", 0}, -{"Ba", 0}, -{"La", 1}, -{"Ce", 1}, -{"Pr", 1}, -{"Nd", 1}, -{"Pm", 1}, -{"Sm", 1}, -{"Eu", 1}, -{"Gd", 1}, -{"Tb", 1}, -{"Dy", 1}, -{"Ho", 1}, -{"Er", 1}, -{"Tm", 1}, -{"Yb", 1}, -{"Lu", 1}, -{"Hf", 1}, -{"Ta", 1}, -{"W", 1}, -{"Re", 1}, -{"Os", 1}, -{"Ir", 1}, -{"Pt", 1}, -{"Au", 1}, -{"Hg", 1}, -{"Tl", 0}, -{"Pb", 0}, -{"Bi", 0}, -{"Po", 0}, -{"At", 0}, -{"Rn", 0}, -{"Fr", 0}, -{"Ra", 0}, -{"Ac", 1}, -{"Th", 1}, -{"Pa", 1}, -{"U" , 1}, -{"Np", 1}, -{"Pu", 1}, -{"Am", 1}, -{"Cm", 1}, -{"Bk", 1}, -{"Cf", 1}, -{"Es", 1}, -{"Fm", 1}, -{"Md", 1}, -{"No", 1}, -{"Lr", 1}, -{"Rf", 1}, -{"Db", 1}, -{"Sg", 1}, -{"Bh", 1}, -{"Hs", 1}, -{"Mt", 1}, -{"Ds", 1}, -{"Rg", 1}, -{"Cn", 1}, -{"Nh", 0}, -{"Fl", 0}, -{"Mc", 0}, -{"Lv", 0}, -{"Ts", 0}, -{"Og", 0} -}; - -} - -#endif diff --git a/source/module_base/element_name.h b/source/module_base/element_name.h deleted file mode 100644 index 195c2a85f9..0000000000 --- a/source/module_base/element_name.h +++ /dev/null @@ -1,136 +0,0 @@ -//========================================================== -// AUTHOR: Peize Lin -// DATE : 2014-03-31 -//========================================================== - -#ifndef ELEMENT_NAME_H -#define ELEMENT_NAME_H -#include -#include -namespace ModuleBase -{ - -static const std::vector element_name = { -"H" , -"He" , -"Li" , -"Be" , -"B" , -"C" , -"N" , -"O" , -"F" , -"Ne" , -"Na" , -"Mg" , -"Al" , -"Si" , -"P" , -"S" , -"Cl" , -"Ar" , -"K" , -"Ca" , -"Sc" , -"Ti" , -"V" , -"Cr" , -"Mn" , -"Fe" , -"Co" , -"Ni" , -"Cu" , -"Zn" , -"Ga" , -"Ge" , -"As" , -"Se" , -"Br" , -"Kr" , -"Rb" , -"Sr" , -"Y" , -"Zr" , -"Nb" , -"Mo" , -"Tc" , -"Ru" , -"Rh" , -"Pd" , -"Ag" , -"Cd" , -"In" , -"Sn" , -"Sb" , -"Te" , -"I" , -"Xe" , -"Cs" , -"Ba" , -"La" , -"Ce" , -"Pr" , -"Nd" , -"Pm" , -"Sm" , -"Eu" , -"Gd" , -"Tb" , -"Dy" , -"Ho" , -"Er" , -"Tm" , -"Yb" , -"Lu" , -"Hf" , -"Ta" , -"W" , -"Re" , -"Os" , -"Ir" , -"Pt" , -"Au" , -"Hg" , -"Tl" , -"Pb" , -"Bi" , -"Po" , -"At" , -"Rn" , -"Fr" , -"Ra" , -"Ac" , -"Th" , -"Pa" , -"U" , -"Np" , -"Pu" , -"Am" , -"Cm" , -"Bk" , -"Cf" , -"Es" , -"Fm" , -"Md" , -"No" , -"Lr" , -"Rf" , -"Db" , -"Sg" , -"Bh" , -"Hs" , -"Mt" , -"Ds" , -"Rg" , -"Cn" , -"Nh" , -"Fl" , -"Mc" , -"Lv" , -"Ts" , -"Og" -}; - -} - -#endif diff --git a/source/module_base/export.cpp b/source/module_base/export.cpp deleted file mode 100644 index 413673a849..0000000000 --- a/source/module_base/export.cpp +++ /dev/null @@ -1,33 +0,0 @@ -// ============================================================================= -// C++ Header File -// Project: -// File: export.h -// Author: mohan -// Comment: -// Warning: -// Start time: 2008-9-3 -// Last modified: -// ============================================================================= - -#include "export.h" -/* -void ModuleBase::IF_MATCH(const std::string &name,const std::string &name2) -{ - if(name!=name2) - { - if(GlobalV::MY_RANK == 0) - { - std::cout<<"\n Can not match : "< -#include -#include -#include -#include -#include "global_variable.h" - -#ifdef __MPI -#include "mpi.h" -#endif -//these two function is not used yet!!!! -/*namespace ModuleBase -{ - -template -void ModuleBase::GlobalFunc::AUTO_SET(std::ofstream &ofs,const std::string &name,const T &a) -{ - ofs<<" AUTO_SET "< -void IF_MATCH(const T &a,const T &b) -{ - if(a!=b) - { - if(GlobalV::MY_RANK == 0) - { - std::cout<<"\n Can not match : "< -#include -#include -#include -#include -#include -#include "module_base/ndarray.h" -/** - * @brief - * - * In C++20, the std::format library is introduced. However, it is not supported under restriction of ABACUS development that not later than C++11. Plus in ABACUS the formatting-output demands is not quite general but more specific, therefore, a simple alternative is proposed here. - * To use: - * 1. Use the static function format() to format data like `FmtCore::format("%d", 1);` - * 2. Use the class FmtCore to format data like `FmtCore fmt("%d"); fmt.format(1);`. - * The first way is more flexible while the second way is more efficient. The format string can be reset by reset() function. If empty, the format string is empty, otherwise it will be updated. - */ -class FmtCore -{ -public: - FmtCore(const std::string& fmt): fmt_(fmt) {}; - ~FmtCore() {}; - /** - * @brief static function to format data - * - * @tparam Ts datatype of the data - * @param fmt format string - * @param args data to format - * @return std::string - */ - template - static inline std::string format(const char* fmt, const Ts&... args) - { - const int size = snprintf(nullptr, 0, fmt, FmtCore::filter(args)...) + 1; - std::string dst(size, ' '); - const int size_filled = snprintf(&dst[0], size, fmt, FmtCore::filter(args)...); - dst.resize(size_filled); - return dst; - } - /** - * @brief std::string overload of the varadic template function - * - * @param fmt - * @param arg - * @return std::string - */ - template - std::string format(const Ts&... args) { return FmtCore::format(fmt_.c_str(), args...); } - /** - * @brief reset the format string (std::string overloads) - * - * @param fmt - */ - void reset(const std::string& fmt = "") { fmt_ = fmt; } - /** - * @brief get the format string - * - * @return std::string - */ - const std::string& fmt() { return fmt_; } - /** - * Python-style string functions will be implemented here as toolbox - */ - /** - * @brief split a string with a delimiter, return uncollapse vector - * @param in string to split - * @param delim delimiter - * @return std::vector - */ - static std::vector split(const std::string& in, const std::string& delim) - { - std::vector dst; - std::string::size_type beg = 0, end; - while((end = in.find(delim, beg)) != std::string::npos) - { - dst.push_back(in.substr(beg, end - beg)); - beg = end + delim.size(); - } - dst.push_back(in.substr(beg)); - return dst; - } - /** - * @brief split a string with a delimiter, return only non-empty elements - * - * @param in string to split - * @return std::vector - */ - static std::vector split(const std::string& in) - { - std::vector dst; - std::string::size_type beg = 0, end = 0; - while((beg = in.find_first_not_of(" ", end)) != std::string::npos) - { - end = in.find_first_of(" ", beg); - dst.push_back(in.substr(beg, end - beg)); - } - return dst; - } - static bool startswith(const std::string& in, const std::string& prefix) - { - return (in.size() >= prefix.size()) && (in.substr(0, prefix.size()) == prefix); - } - static bool endswith(const std::string& in, const std::string& suffix) - { - return (in.size() >= suffix.size()) && (in.substr(in.size() - suffix.size()) == suffix); - } - static std::string strip(const std::string& in, const std::string& chars = " ") - { - std::string::size_type beg = in.find_first_not_of(chars); - return (beg == std::string::npos)? "": in.substr(beg, in.find_last_not_of(chars) - beg + 1); - } - static std::string center(const std::string& in, const size_t& width, const char& fillchar = ' ') - { - if (in.size() >= width) { - return in; - } - const size_t nwhitespaces = width - in.size(); - const size_t nleft = nwhitespaces / 2; - const size_t nright = nwhitespaces - nleft; - return std::string(nleft, fillchar) + in + std::string(nright, fillchar); - } - static std::string replace(const std::string& in, const std::string& old, const std::string& new_) - { - std::string dst = in; - std::string::size_type pos = dst.find(old); - while(pos != std::string::npos) - { - dst.replace(pos, old.size(), new_); - pos = dst.find(old, pos + new_.size()); - } - return dst; - } - static std::string join(const std::string& delim, const std::vector& src) - { - return (src.empty())? "": std::accumulate(src.begin() + 1, src.end(), src[0], - [&delim](const std::string& acc, const std::string& s) { return acc + delim + s; }); - } - - static std::string upper(const std::string& in) - { - std::string dst = in; - std::transform(dst.begin(), dst.end(), dst.begin(), ::toupper); - return dst; - } - - static std::string lower(const std::string& in) - { - std::string dst = in; - std::transform(dst.begin(), dst.end(), dst.begin(), ::tolower); - return dst; - } - -private: - std::string fmt_; - template - static typename std::enable_if::value, const char*>::type filter(const T& s) { return s.c_str(); } - template - static typename std::enable_if::value, const T&>::type filter(const T& s) { return s; } -}; - -class FmtTable -{ -public: - enum class Align{LEFT, RIGHT, CENTER}; -private: - typedef FmtCore core; - struct Alignments{ - Alignments(const Align& val = Align::RIGHT, const Align& title = Align::CENTER): val_(val), title_(title) {}; - Align val_, title_; // value and title alignments - } aligns_; - struct Frames{ - Frames(char up = '-', char mid = '-', char dw = '-', char l = ' ', char r = ' '): up_(up), mid_(mid), dw_(dw), l_(l), r_(r) {}; - char up_, mid_ , dw_, l_, r_; // up, middle, down, left, right frames. up: the frame above title, middle: the one between title and data - } frames_; // down: the frame below data, left: the frame at left, right: the frame at right - struct Delimiters{ - Delimiters(char h = '-', char v = ' '): h_(h), v_(v) {}; - char h_, v_; // horizontal and vertical delimiters - } delimiters_; -public: - /** - * @brief Construct a new Fmt Table object - * - * @param titles titles, its size should be the same as the number of columns - * @param nrows number of rows - * @param fmts format strings for each column, its size should be the same as the number of columns - * @param indent indent for each column, default is 0 - * @param aligns Alignments instance, for alignment of values and titles, e.g. {Align::LEFT, Align::RIGHT} for left alignment of values and right alignment of titles - * @param frames Frames instance, can be constructed with initializer_list like {'-', '-', '-', ' ', ' '}, for up, middle, down, left and right frames - * @param delimiters Delimiters instance, can be constructed with initializer_list like {'-', ' '}, for horizontal and vertical delimiters - */ - FmtTable(const std::vector& titles, - const size_t nrows, - const std::vector& fmts, - const size_t indent = 0, - const Alignments& aligns = {}, - const Frames& frames = {}, - const Delimiters& delimiters = {}): - titles_(titles), data_(nrows, titles.size()), // data - fmts_(fmts), indent_(indent), aligns_(aligns), frames_(frames), delimiters_(delimiters) // styles - { assert(titles.size() == fmts.size()||titles.size() == 0); }; - ~FmtTable() {}; - /** - * @brief import data from std::vector - * - * @tparam T datatype of the data - * @param src source data - * @return FmtTable& itself - */ - template - FmtTable& operator<<(const std::vector& src) - { - // create a copy of source data, then format - std::vector data(src.size()); - for(size_t i = 0UL; i < src.size(); i++) { data[i] = core::format(fmts_[j_].c_str(), src[i]); } - set_value(0, j_, 'v', data); - j_ = (j_ + 1) % titles_.size(); - return *this; - } - /** - * @brief Set the value object - * - * @tparam T datatype of the data - * @param i row index - * @param j col index - * @param value value to set - */ - template - void set_value(const size_t& i, const size_t& j, const T& value) { data_(i, j) = core::format(fmts_[j].c_str(), value); } - /** - * @brief adjust the width of each column - * - * @param col col to relax, organized as std::vector - * @param title title of the column - * @param vlyot value layout, can be Align::LEFT, Align::RIGHT, Align::CENTER - * @param tlyot title layout, can be Align::LEFT, Align::RIGHT, Align::CENTER - * @return std::vector newly relaxed column - */ - std::vector relax_col_width(const std::vector& col, - const std::string& title = "", - const Align valign = Align::RIGHT, // because enum type would be the smallest integral type, so it is safe to pass by value - const Align talign = Align::CENTER) - { - size_t max_width = title.size(); - for(const std::string& s : col) { max_width = std::max(max_width, s.size()); } - std::vector new_col(col.size() + 1); // the first is column title - for(size_t i = 0; i < col.size() + 1; i++) - { - new_col[i] = (i == 0)? FmtCore::strip(title): FmtCore::strip(col[i - 1]); - const size_t nwhitespaces = max_width - new_col[i].size(); - switch((i == 0)? talign: valign) - { - case Align::RIGHT: new_col[i] = std::string(nwhitespaces, ' ') + new_col[i]; break; - case Align::LEFT: new_col[i] += std::string(nwhitespaces, ' '); break; - case Align::CENTER: new_col[i] = FmtCore::center(new_col[i], max_width); break; - } - } - return new_col; - } - - /** - * @brief concatenate titles into a string - * - * @param titles titles to concatenate - * @return std::string - */ - std::string concat_title(const std::vector& titles) const - { - std::string dst = ""; - // first sum width of all titles - size_t width = std::accumulate(titles.begin(), titles.end(), 0, [](const size_t& acc, const std::string& s) { return acc + s.size(); }); - // add width of delimiters - width += titles.size() - 1; - // add width of left and right frames - width += 2; - dst += std::string(indent_, ' ') + std::string(width, frames_.up_) + "\n"; // first line: the upper frame - dst += std::string(indent_, ' ') + std::string(1, frames_.l_); // second line: the left frame + titles + right frame - for(size_t i = 0; i < titles.size(); i++) - { - dst += titles[i]; - if (i != titles.size() - 1) { - dst += delimiters_.v_; - } - } - dst += std::string(1, frames_.r_) + "\n"; - dst += std::string(indent_, ' ') + std::string(width, frames_.mid_) + "\n"; // third line: the middle frame - return dst; - } - /** - * @brief concatenate a row into a string - * - * @param row row to concatenate - * @param pos position, can be 't' for top, 'b' for bottom, 'n' for normal - * @return std::string - */ - std::string concat_row(const std::vector& row, const char& pos) const - { - std::string dst = ""; - // first sum width of all elements of the row - size_t width = std::accumulate(row.begin(), row.end(), 0, [](const size_t& acc, const std::string& s) { return acc + s.size(); }); - // for the delimiters - width += row.size() - 1; - // for the left and right frame - width += 2; - if (pos == 't') { // 't' for top - dst += std::string(indent_, ' ') + std::string(width, frames_.up_) + "\n"; - } - dst += std::string(indent_, ' ') + std::string(1, frames_.l_); - for(size_t i = 0; i < row.size(); i++) - { - dst += row[i]; - if (i != row.size() - 1) { - dst += delimiters_.v_; - } - } - dst += std::string(1, frames_.r_) + "\n"; - if (pos == 'b') { // 'b' for bottom - dst += std::string(indent_, ' ') + std::string(width, frames_.dw_) + "\n"; // the last line - } - return dst; - } - /** - * @brief to get the table as a string - * - * @return std::string - */ - std::string str() - { - std::string dst = ""; - const size_t nrows = data_.shape()[0]; - const size_t ncols = data_.shape()[1]; - // if not all titles are empty, then with_title boolean will be true - bool with_title = false; - for (auto& title: titles_) { - if (!title.empty()) { - with_title = true; - break; - } - } - // first to relax each column - for(size_t j = 0UL; j < ncols; j++) - { - std::vector col(nrows); - for (size_t i = 0UL; i < nrows; i++) { - col[i] = data_(i, j); - } - col = relax_col_width(col, titles_[j], aligns_.val_, aligns_.title_); - titles_[j] = col[0UL]; - std::vector col_new(col.begin() + 1, col.end()); - set_value(0UL, j, 'v', col_new); - } - // then print titles - if (with_title) { - dst += concat_title(titles_); - } - // then print contents - for(size_t i = 0UL; i < nrows; i++) - { - std::vector row(ncols); - for (size_t j = 0; j < ncols; j++) { - row[j] = data_(i, j); - } - dst += concat_row(row, ((i == 0UL)&&!with_title)? 't': (i == nrows - 1)? 'b': 'n'); - } - return dst; - } - void str(const std::string& s) {}; - // reuse - void iter_set(const size_t val) { j_ = val; } -private: - /** - * @brief Set the value object from std::vector - * - * @tparam T datatype of the data - * @param i row index - * @param j column index - * @param dir direction, if 'v' then vertical, if 'h' then horizontal - * @param src source data - */ - template - void set_value(const size_t& i, const size_t& j, const char& dir, const std::vector& src) - { - if (dir == 'v') { - for (size_t k = 0UL; k < src.size(); k++) { - data_(i + k, j) = src[k]; - } - } else if (dir == 'h') { - for (size_t k = 0UL; k < src.size(); k++) { - data_(j, i + k) = src[k]; - } - } - } - // iterator support indices - size_t j_ = 0; - - std::vector titles_; - NDArray data_; // data - std::vector fmts_; // format strings for each column - size_t indent_ = 0; // indent for each column -}; - -#endif \ No newline at end of file diff --git a/source/module_base/gather_math_lib_info.cpp b/source/module_base/gather_math_lib_info.cpp deleted file mode 100644 index ad1ed505f9..0000000000 --- a/source/module_base/gather_math_lib_info.cpp +++ /dev/null @@ -1,80 +0,0 @@ -// This file defines the math lib wrapper for output information before executing computations. - -/* -When INFO is defined in cmake configure, a macro of GATHER_INFO will be defined. -This macro will be used to output information before executing computations. -Results will output to OUT/math_info.log, see ModuleBase::Global_File::make_dir_out . -*/ - -#include -#undef GATHER_INFO -#include "module_base/blas_connector.h" -#include "module_base/lapack_connector.h" - -#include - -void zgemm_i(const char *transa, - const char *transb, - const int *m, - const int *n, - const int *k, - const std::complex *alpha, - const std::complex *a, - const int *lda, - const std::complex *b, - const int *ldb, - const std::complex *beta, - std::complex *c, - const int *ldc) -{ - GlobalV::ofs_info.unsetf(std::ios_base::floatfield); - GlobalV::ofs_info << "zgemm " << *transa << " " << *transb << " " << *m << " " << *n << " " - << *k << " " << *alpha << " " << *lda << " " << *ldb << " " << *beta << " " << *ldc << std::endl; - zgemm_(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc); -} - -void zaxpy_i(const int *N, - const std::complex *alpha, - const std::complex *X, - const int *incX, - std::complex *Y, - const int *incY) -{ - // std::cout << "zaxpy " << *N << std::endl; - // alpha is a coefficient - // incX, incY is always 1 - zaxpy_(N, alpha, X, incX, Y, incY); -} - -void zhegvx_i(const int *itype, - const char *jobz, - const char *range, - const char *uplo, - const int *n, - std::complex *a, - const int *lda, - std::complex *b, - const int *ldb, - const double *vl, - const double *vu, - const int *il, - const int *iu, - const double *abstol, - const int *m, - double *w, - std::complex *z, - const int *ldz, - std::complex *work, - const int *lwork, - double *rwork, - int *iwork, - int *ifail, - int *info) -{ - GlobalV::ofs_info.unsetf(std::ios_base::floatfield); - GlobalV::ofs_info << "zhegvx " << *itype << " " << *jobz << " " << *range << " " << *uplo - << " " << *n << " " << *lda << " " << *ldb << " " << *vl << " " << *vu << " " << *il << " " << *iu - << " " << *abstol << " " << *m << " " << *lwork << " " << *info << std::endl; - zhegvx_(itype, jobz, range, uplo, n, a, lda, b, ldb, vl, vu, il, iu, abstol, m, w, z, ldz, work, lwork, rwork, - iwork, ifail, info); -} diff --git a/source/module_base/global_file.cpp b/source/module_base/global_file.cpp deleted file mode 100644 index b5d7bcb8c5..0000000000 --- a/source/module_base/global_file.cpp +++ /dev/null @@ -1,314 +0,0 @@ -//========================================================== -// AUTHOR : mohan - -// DATE : 2008-11-10 -//========================================================== -#include "global_file.h" - -#ifdef __MPI -#include -#endif -#include -#include -#include "global_function.h" -#include "module_parameter/parameter.h" -#include "global_variable.h" -#include "module_base/parallel_common.h" -#include "module_base/parallel_reduce.h" - -//---------------------------------------------------------- -// EXPLAIN : Be Called in input.cpp -//---------------------------------------------------------- -namespace ModuleBase -{ -void ModuleBase::Global_File::make_dir_out( - const std::string &suffix, - const std::string &calculation, - const bool &out_dir, - const int rank, - const bool &restart, - const bool out_alllog) -{ -//---------------------------------------------------------- -// USE STL FUNCTION -// NAME : system -//---------------------------------------------------------- - -#ifdef __MPI - MPI_Barrier(MPI_COMM_WORLD); -#endif - int make_dir = 0; - // mohan update 2011-05-03 - std::string command0 = "test -d " + PARAM.globalv.global_out_dir + " || mkdir " + PARAM.globalv.global_out_dir; - - int times = 0; - while(times0) {break; -} - ++times; - } - -#ifdef __MPI - if(make_dir==0) - { - std::cout << " CAN NOT MAKE THE OUT DIR......." << std::endl; - ModuleBase::QUIT(); - } - MPI_Barrier(MPI_COMM_WORLD); -#endif - - if(calculation == "md") - { - int make_dir_stru = 0; - std::string command1 = "test -d " + PARAM.globalv.global_stru_dir + " || mkdir " + PARAM.globalv.global_stru_dir; - - times = 0; - while(times0) { break; -} - ++times; - } - -#ifdef __MPI - if(make_dir_stru==0) - { - std::cout << " CAN NOT MAKE THE STRU DIR......." << std::endl; - ModuleBase::QUIT(); - } - MPI_Barrier(MPI_COMM_WORLD); -#endif - } - - // make dir for HS matrix output in md calculation - if((out_dir) && calculation == "md") - { - int make_dir_matrix = 0; - std::string command1 = "test -d " + PARAM.globalv.global_matrix_dir + " || mkdir " + PARAM.globalv.global_matrix_dir; - - times = 0; - while(times0) { break; -} - ++times; - } - -#ifdef __MPI - if(make_dir_matrix==0) - { - std::cout << " CAN NOT MAKE THE MATRIX DIR......." << std::endl; - ModuleBase::QUIT(); - } - MPI_Barrier(MPI_COMM_WORLD); -#endif - } - - if(PARAM.inp.of_ml_gene_data == 1) - { - int make_dir_descrip = 0; - std::string command1 = "test -d " + PARAM.globalv.global_mlkedf_descriptor_dir + " || mkdir " + PARAM.globalv.global_mlkedf_descriptor_dir; - - times = 0; - while(times 0) - { - break; - } - ++times; - } - -#ifdef __MPI - if(make_dir_descrip == 0) - { - std::cout << " CAN NOT MAKE THE MLKEDF DESCRIPTOR DIR......." << std::endl; - ModuleBase::QUIT(); - } - MPI_Barrier(MPI_COMM_WORLD); -#endif - } - - // mohan add 2010-09-12 - if(out_alllog) - { - open_log(GlobalV::ofs_running, PARAM.globalv.log_file, calculation, restart); - #if defined(__CUDA) || defined(__ROCM) - open_log(GlobalV::ofs_device, "device" + std::to_string(rank) + ".log", calculation, restart); - #endif - } - else - { - if(rank==0) - { - open_log(GlobalV::ofs_running, PARAM.globalv.log_file, calculation, restart); - #if defined(__CUDA) || defined(__ROCM) - open_log(GlobalV::ofs_device, "device.log", calculation, restart); - #endif - } - } - - if(rank==0) - { - open_log(GlobalV::ofs_warning, "warning.log", calculation, restart); - } - -#ifdef GATHER_INFO - open_log(GlobalV::ofs_info, "math_info_" + std::to_string(rank) + ".log", calculation, restart); -#endif - - return; -} - -void ModuleBase::Global_File::make_dir_atom(const std::string &label) -{ -//---------------------------------------------------------- -// EXPLAIN : generate atom dir for each type of atom -//---------------------------------------------------------- - std::stringstream ss; - ss << PARAM.globalv.global_out_dir << label << "/"; - ModuleBase::GlobalFunc::MAKE_DIR(ss.str()); - return; -} - -void ModuleBase::Global_File::open_log(std::ofstream &ofs, const std::string &fn, const std::string &calculation, const bool &restart) -{ -//---------------------------------------------------------- -// USE GLOBAL VARIABLE : -// PARAM.globalv.global_out_dir : (default dir to store "*.log" file) -//---------------------------------------------------------- - std::stringstream ss; - ss << PARAM.globalv.global_out_dir << fn; - - if(calculation == "md" && restart) - { - ofs.open(ss.str(), std::ios::app); - } - else - { - ofs.open( ss.str() ); - } -// ofs << " WELCOME TO MESIA PROGRAM." << std::endl; -// ofs << " OPEN "< -#include -#include -#include -#include - -//========================================================== -// namespace : Global_File_Operation -//========================================================== -namespace ModuleBase -{ -namespace Global_File -{ - // called in input.cpp, after reading parameters. - void make_dir_out(const std::string &suffix, - const std::string &calculation, - const bool &out_dir, - const int rank, - const bool &restart, - const bool out_alllog = false); - - void make_dir_atom(const std::string &label); - void open_log ( std::ofstream &ofs, const std::string &fn, const std::string &calculation, const bool &restart); - void close_log( std::ofstream &ofs, const std::string &fn); - void close_all_log(const int rank, const bool out_alllog = false, const std::string& calculation = "md"); -} -} -#endif - diff --git a/source/module_base/global_function-func_each_2.h b/source/module_base/global_function-func_each_2.h deleted file mode 100644 index 034dcd915a..0000000000 --- a/source/module_base/global_function-func_each_2.h +++ /dev/null @@ -1,56 +0,0 @@ -// AUTHOR: Peize Lin -// Date: 2016-09-07 - -#ifndef FUNC_EACH_2_H -#define FUNC_EACH_2_H - -#include -#include -#include - -namespace ModuleBase -{ -namespace GlobalFunc -{ - -template -void FUNC_EACH_2( - Ti & tA, - const Ti & tB, - std::function< void( Ti&, const Ti&, T_tail... ) > func, - const T_tail&... t_tail ) -{ - func( tA, tB, t_tail... ); -} - - -template -void FUNC_EACH_2( - std::vector & tA, - const std::vector & tB, - std::function< void( Ti&, const Ti&, T_tail... ) > func, - const T_tail&... t_tail ) -{ - for( size_t i=0; i!=tA.size(); ++i ) - { - FUNC_EACH_2( tA[i], tB[i], func, t_tail... ); - } -} - - -template -void FUNC_EACH_2( - std::map & tA, - const std::map & tB, - std::function< void( Ti&, const Ti&, T_tail... ) > func, - const T_tail&... t_tail ) -{ - for( auto & ta : tA ) - { - FUNC_EACH_2( ta.second, tB.at(ta.first), func, t_tail... ); - } -} - -} -} -#endif // FUNC_EACH_2_H diff --git a/source/module_base/global_function.cpp b/source/module_base/global_function.cpp deleted file mode 100644 index 452408f88b..0000000000 --- a/source/module_base/global_function.cpp +++ /dev/null @@ -1,264 +0,0 @@ -//========================================================== -// AUTHOR : mohan -//========================================================== -#include "global_function.h" - -#include "module_base/parallel_common.h" -#include "global_file.h" - -//========================================================== -// USE FILE timer.h -// ONLY : output time after quit. -//========================================================== -#include "memory.h" -#include "timer.h" - -#include -#include -#include -namespace ModuleBase -{ -namespace GlobalFunc -{ - -void NOTE(const std::string &words) -{ - return; - if (GlobalV::ofs_running) - { - // GlobalV::ofs_running << " *********************************************************************************" - // << std::endl; - GlobalV::ofs_running << " !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" - << std::endl; - GlobalV::ofs_running << " " << words << std::endl; - GlobalV::ofs_running << " !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" - << std::endl; - } -} - -void NEW_PART(const std::string &words) -{ - GlobalV::ofs_running << "\n ><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><" << std::endl; - GlobalV::ofs_running << "\n " << words << std::endl; - GlobalV::ofs_running << "\n ><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><\n" << std::endl; - return; -} - -//========================================================== -// GLOBAL FUNCTION : -// NAME : OUT( output date for checking ) -//========================================================== -void OUT(std::ofstream &ofs, const std::string &name) -{ - ofs << "\n" << std::setw(18) << name << std::endl; - return; -} - -//========================================================== -// GLOBAL FUNCTION : -// NAME : MAKE_DIR( make dir ,using system function) -//========================================================== -void MAKE_DIR(const std::string &fn) -{ - // ModuleBase::TITLE("global_function","MAKE_DIR"); - if (GlobalV::MY_RANK == 0) - { - std::stringstream ss; - ss << " test -d " << fn << " || mkdir " << fn; - //---------------------------------------------------------- - // EXPLAIN : 'system' function return '0' if success - //---------------------------------------------------------- - if (system(ss.str().c_str())) - { - ModuleBase::WARNING_QUIT("MAKE_DIR", fn); - } - } - return; -} - -void DONE(std::ofstream &ofs, const std::string &description, const bool only_rank0) -{ - if (only_rank0) - { - if (GlobalV::MY_RANK == 0) - { - // ofs << " ---------------------------------------------------------------------------------\n"; - ofs << " DONE : " << description; - ofs << " Time : " << ModuleBase::timer::print_until_now() << " (SEC)"; - ofs << std::endl << std::endl; - // ofs << "\n ---------------------------------------------------------------------------------\n"; - } - } - else - { - // ofs << " ---------------------------------------------------------------------------------\n"; - ofs << " DONE : " << description; - ofs << " Time : " << ModuleBase::timer::print_until_now() << " (SEC)"; - ofs << std::endl << std::endl; - // ofs << "\n ---------------------------------------------------------------------------------\n"; - } - // std::cout << "\n---------------------------------------------------------------------------------\n"; - std::cout << " DONE(" << std::setw(10) << ModuleBase::timer::print_until_now() << " SEC) : " << description - << std::endl; - // std::cout << "\n---------------------------------------------------------------------------------\n"; - return; -} - - -bool SCAN_BEGIN(std::ifstream &ifs, - const std::string &TargetName, - const bool restart, - const bool ifwarn) -{ - std::string SearchName; - bool find = false; - if (restart) - { - ifs.clear(); - ifs.seekg(0); - } - ifs.rdstate(); - while (ifs.good()) - { - ifs >> SearchName; - if (SearchName == TargetName) - { - find = true; - break; - } - } - if (!find && ifwarn) - { - GlobalV::ofs_warning << " In SCAN_BEGIN, can't find: " << TargetName << " block." << std::endl; - } - return find; -} - - -bool SCAN_LINE_BEGIN(std::ifstream &ifs, - const std::string &TargetName, - const bool restart, - const bool ifwarn) -{ - bool find = false; - if (restart) - { - ifs.clear(); - ifs.seekg(0); - } - ifs.rdstate(); - - std::string line; - while (std::getline(ifs,line)) - { - //! obtain the first character, should not be # - size_t first_char_pos = line.find_first_not_of(" \t"); - if (first_char_pos != std::string::npos && line[first_char_pos] == '#') - { - continue; - } - - //! search in each line - std::istringstream iss(line); - std::string SearchName; - while (iss >> SearchName) - { - if (SearchName == TargetName) - { - find = true; - //std::cout << " search name = " << SearchName << std::endl; - return find; - } - } - } - - if (!find && ifwarn) - { - GlobalV::ofs_warning << " In SCAN_LINE_BEGIN, can't find: " << TargetName << " block." << std::endl; - } - return find; -} - -void SCAN_END(std::ifstream &ifs, const std::string &TargetName, const bool ifwarn) -{ - std::string SearchName; - ifs >> SearchName; - if (SearchName != TargetName && ifwarn) - { - GlobalV::ofs_warning << " In SCAN_END, can't find: " << TargetName << " block." << std::endl; - } - return; -} - -void BLOCK_HERE(const std::string &description) -{ - // return; - std::cout << "\n********************************************"; - std::cout << "\n Here is a Block, 1: go on 0: quit"; - std::cout << "\n " << description; - std::cout << "\n********************************************" << std::endl; - bool go_on = false; - if (GlobalV::MY_RANK == 0) - { - std::cin >> go_on; - } - -#ifdef __MPI - int swap = go_on; - if (GlobalV::MY_RANK == 0) - swap = go_on; - MPI_Bcast(&swap, 1, MPI_INT, 0, MPI_COMM_WORLD); - if (GlobalV::MY_RANK != 0) - go_on = static_cast(swap); -#endif - if (go_on) - { - return; - } - else - { - ModuleBase::QUIT(); - } -} - -void OUT_TIME(const std::string &name, time_t &start, time_t &end) -{ - double mini = difftime(end, start) / 60.0; - if (mini > 0.1) - { - if(GlobalV::ofs_warning) - { - GlobalV::ofs_warning << std::setprecision(2); - GlobalV::ofs_warning << " -------------------------------------------------------" << std::endl; - GlobalV::ofs_warning << " NAME < " << name << " > = " << std::endl; - GlobalV::ofs_warning << " -> " << ctime(&start) << " -> " << ctime(&end); - GlobalV::ofs_warning << " TIME = " << mini << " [Minutes]" << std::endl; - GlobalV::ofs_warning << " -------------------------------------------------------" << std::endl; - GlobalV::ofs_warning << std::setprecision(6); - } - } -} - -size_t MemAvailable() -{ - size_t mem_sum = 0; - int i = 0; - std::ifstream ifs("/proc/meminfo"); - while (ifs.good()) - { - std::string label, size, kB; - ifs >> label >> size >> kB; - if (label == "MemAvailable:") - return std::stol(size); - else if (label == "MemFree:" || label == "Buffers:" || label == "Cached:") - { - mem_sum += std::stol(size); - ++i; - } - if (i == 3) return mem_sum; - } - throw std::runtime_error("read /proc/meminfo error in " + TO_STRING(__FILE__) + " line " + TO_STRING(__LINE__)); -} - -} // namespace GlobalFunc -} // namespace ModuleBase diff --git a/source/module_base/global_function.h b/source/module_base/global_function.h deleted file mode 100644 index 0b388f5816..0000000000 --- a/source/module_base/global_function.h +++ /dev/null @@ -1,380 +0,0 @@ -#ifndef GLOBAL_FUNCTION_H -#define GLOBAL_FUNCTION_H - -#include "blas_connector.h" -#include "global_function-func_each_2.h" // Peize Lin add 2016-09-07 -#include "global_variable.h" -#include "tool_check.h" // mohan add 2021-05-08 -#include "tool_quit.h" // mohan add 2021-05-07 -#include "tool_title.h" // mohan add 2021-05-05 - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace ModuleBase -{ -namespace GlobalFunc -{ - -void NOTE(const std::string& words); -void NEW_PART(const std::string& words); - -//========================================================== -// GLOBAL FUNCTION : -// NAME : OUT( output date for checking ) -// NAME : OUT( output date into file "ofs") -// NAME : OUTP( output parameters ) -//========================================================== -void OUT(std::ofstream& ofs, const std::string& name); - -template -void OUT(std::ofstream& ofs, const std::string& name, const T& a) -{ - std::stringstream name2; - name2 << name; - ofs << " " << std::setw(40) << name2.str() << " = " << a << std::endl; - // ofs << " " << name << a << std::endl; - return; -} - -template -void OUT(std::ofstream& ofs, const std::string& name, const T& x, const T& y) -{ - ofs << " " << std::setw(40) << name << " = [ " << x << ", " << y << " ]" << std::endl; - // ofs << " " << name << a << std::endl; - return; -} - -template -void OUT(std::ofstream& ofs, const std::string& name, const T& x, const T& y, const T& z) -{ - ofs << " " << std::setw(40) << name << " = [ " << x << ", " << y << ", " << z << " ]" << std::endl; - return; -} - -// output parameters and explanations -template -void OUTP(std::ofstream& ofs, const std::string& name, const T& a, const std::string& explanation = "") -{ - ofs << std::setw(30) << name << " " << a << " #" << explanation << std::endl; -} - -template -void OUT(const std::string& name, const T& a) -{ - std::cout << " " << std::setw(40) << name << " = " << a << std::endl; - // std::cout << " " << name << a << std::endl; - return; -} - -void OUT_TIME(const std::string& name, time_t& start, time_t& end); - -//========================================================== -// GLOBAL FUNCTION : -// NAME : MAKE_DIR( make dir ,using system function) -//========================================================== -void MAKE_DIR(const std::string& file); - -//========================================================== -// GLOBAL FUNCTION : -// NAME : AUTO_SET( auto_set variables ) -//========================================================== -template -void AUTO_SET(const std::string& name, const T& a) -{ - GlobalV::ofs_warning << " AUTO_SET " << name << " to " << a << std::endl; - return; -} - -//========================================================== -// GLOBAL FUNCTION : -// NAME : DONE( ouput information(time) on screen and log) -// we can regard it as a milestone. -//========================================================== -void DONE(std::ofstream& ofs, const std::string& description, bool only_rank0 = false); - -//========================================================== -// GLOBAL FUNCTION : -// NAME : ZEROS -// set elements of u as zero which u is 1_d std::complex array -//========================================================== -template -inline void ZEROS(std::complex* u, const TI n) // Peize Lin change int to TI at 2020.03.03 -{ - assert(n >= 0); - for (TI i = 0; i < n; i++) - { - u[i] = std::complex(0.0, 0.0); - } - return; -} - -template -inline void ZEROS(T* u, const TI n) // Peize Lin change int to TI at 2020.03.03 -{ - assert(n >= 0); - for (TI i = 0; i < n; i++) - { - u[i] = 0; - } -} - -//========================================================== -// GLOBAL FUNCTION : -// NAME : TEST_LEVEL -// control the test_level -//========================================================== -void TEST_LEVEL(const std::string& name, bool disable); - -//========================================================== -// GLOBAL FUNCTION : -//========================================================== -template -static void READ_VALUE(std::ifstream& ifs, T& v) -{ - ifs >> v; - std::string line; - getline(ifs, line); - return; -} - -//------------------------------------------------------------- -//! The `SCAN_BEGIN` function efficiently searches -//! text files for specified keywords -//------------------------------------------------------------- -bool SCAN_BEGIN(std::ifstream& ifs, - const std::string& TargetName, - const bool restart = true, - const bool ifwarn = true); - -//------------------------------------------------------------- -// The `SCAN_LINE_BEGIN` function efficiently searches -// text files for specified keywords while ignoring comment -// lines and whitespace. It skips any line starting with '#' -//------------------------------------------------------------- -bool SCAN_LINE_BEGIN(std::ifstream& ifs, - const std::string& TargetName, - const bool restart = true, - const bool ifwarn = true); - -void SCAN_END(std::ifstream& ifs, const std::string& TargetName, const bool ifwarn = true); - -template -static inline void DCOPY(const T& a, T& b, const int& dim) -{ - for (int i = 0; i < dim; ++i) { - b[i] = a[i]; - } -} - -template -inline void DCOPY(const T* a, T* b, const int& dim) { - for (int i = 0; i < dim; ++i) { - b[i] = a[i]; - } -} - -template -inline void COPYARRAY(const T* a, T* b, const long dim); - -template <> -inline void COPYARRAY(const std::complex* a, std::complex* b, const long dim) -{ - const int one = 1; - zcopy_(&dim, a, &one, b, &one); -} - -template <> -inline void COPYARRAY(const double* a, double* b, const long dim) -{ - const int one = 1; - dcopy_(&dim, a, &one, b, &one); -} - -void BLOCK_HERE(const std::string& description); - -//========================================================== -// GLOBAL FUNCTION : -// NAME : VECTOR_TO_PTR -// change std::vector to pointer -// Peize Lin add 2016-02-25 -//========================================================== -template -static inline T* VECTOR_TO_PTR(std::vector& v) -{ - return &(v[0]); -} -template -static inline T* VECTOR_TO_PTR(std::valarray& v) -{ - return &(v[0]); -} - -template -static inline const T* VECTOR_TO_PTR(const std::vector& v) -{ - return &(v[0]); -} -template -static inline const T* VECTOR_TO_PTR(const std::valarray& v) -{ - return &(v[0]); -} - -//========================================================== -// GLOBAL FUNCTION : -// NAME : TO_STRING -// change number to std::string -// example: 233 -> "233" -// Peize Lin add 2016-07-18 -//========================================================== -template -std::string TO_STRING(const T& t, const int n=20) // n=20 since LDBL_EPSILON is 1E-16 or 1E-19 -{ - std::stringstream newstr; - newstr << std::setprecision(n) << t; - return newstr.str(); -} - -//========================================================== -// GLOBAL FUNCTION : -// NAME : MAP_EXIST -// find whether exists the std::map index -// if exist return the ptr called, else return nullptr -// example: map_exist(ms,i,j,k) -> try to find ms[i][j][k] -// Peize Lin add 2018-07-16 -//========================================================== -template -inline void* MAP_EXIST(T_map& ms, const T_key1& key1) -{ - auto ms1 = ms.find(key1); - if (ms1 == ms.end()) { - return nullptr; - } - return static_cast(&ms1->second); -} - -template -inline void* MAP_EXIST(T_map& ms, const T_key1& key1, const T_key_tail&... key_tail) -{ - auto ms1 = ms.find(key1); - if (ms1 == ms.end()) { - return nullptr; - } - return MAP_EXIST(ms1->second, key_tail...); -} - -template -inline const void* MAP_EXIST(const T_map& ms, const T_key1& key1) -{ - auto ms1 = ms.find(key1); - if (ms1 == ms.end()) { - return nullptr; - } - return static_cast(&ms1->second); -} - -template -inline const void* MAP_EXIST(const T_map& ms, const T_key1& key1, const T_key_tail&... key_tail) -{ - auto ms1 = ms.find(key1); - if (ms1 == ms.end()) { - return nullptr; - } - return MAP_EXIST(ms1->second, key_tail...); -} - -//========================================================== -// GLOBAL FUNCTION : -// NAME : MemAvailable -// read /proc/meminfo -// unit: kB -// Peize Lin add 2019-12-21 -//========================================================== -size_t MemAvailable(); - -//========================================================== -// GLOBAL FUNCTION : -// NAME : DELETE_MUL_PTR -// delete Multi-dimensional array pointer -// example: -// int*** v; -// DELETE_MUL_PTR(v,N1,N2); -// -> for(int i1=0; i1 -static inline void DELETE_MUL_PTR(T_element* v) -{ - delete[] v; - v = nullptr; -} -template -static inline void DELETE_MUL_PTR(T_element* v, const T_N_first N_first, const T_N_tail... N_tail) -{ - for (T_N_first i = 0; i < N_first; ++i) { - DELETE_MUL_PTR(v[i], N_tail...); - } - delete[] v; - v = nullptr; -} - -//========================================================== -// GLOBAL FUNCTION : -// NAME : FREE_MUL_PTR -// delete Multi-dimensional array pointer -// example: -// int*** v; -// DELETE_MUL_PTR(v,N1,N2); -// -> for(int i1=0; i1 -static inline void FREE_MUL_PTR(T_element* v) -{ - free(v); - v = nullptr; -} -template -static inline void FREE_MUL_PTR(T_element* v, const T_N_first N_first, const T_N_tail... N_tail) -{ - for (T_N_first i = 0; i < N_first; ++i) { - FREE_MUL_PTR(v[i], N_tail...); - } - free(v); - v = nullptr; -} - -template -T ddot_real(const int& dim, const std::complex* psi_L, const std::complex* psi_R, const bool reduce = true); - -//========================================================== -// GLOBAL FUNCTION : -// NAME : IS_COLUMN_MAJOR_KS_SOLVER -// check ks_solver requires column major or not -//========================================================== -static inline bool IS_COLUMN_MAJOR_KS_SOLVER(std::string ks_solver) -{ - return ks_solver == "genelpa" || ks_solver == "elpa" || ks_solver == "scalapack_gvx" || ks_solver == "cusolver" - || ks_solver == "cusolvermp" || ks_solver == "cg_in_lcao" || ks_solver == "pexsi" || ks_solver == "lapack"; -} - -} // namespace GlobalFunc -} // namespace ModuleBase - -#endif diff --git a/source/module_base/global_function_ddotreal.cpp b/source/module_base/global_function_ddotreal.cpp deleted file mode 100644 index 1a401191f5..0000000000 --- a/source/module_base/global_function_ddotreal.cpp +++ /dev/null @@ -1,45 +0,0 @@ -#include "blas_connector.h" -#include "global_function.h" -#include "module_base/parallel_reduce.h" - -namespace ModuleBase -{ -namespace GlobalFunc -{ - -template double ddot_real(const int& dim, - const std::complex* psi_L, - const std::complex* psi_R, - const bool reduce); -template float ddot_real(const int& dim, - const std::complex* psi_L, - const std::complex* psi_R, - const bool reduce); - -template -T ddot_real(const int& dim, const std::complex* psi_L, const std::complex* psi_R, const bool reduce) -{ - //<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< - // qianrui modify 2021-3-14 - // Note that ddot_(2*dim,a,1,b,1) = REAL( zdotc_(dim,a,1,b,1) ) - int dim2 = 2 * dim; - T *pL, *pR; - pL = (T*)psi_L; - pR = (T*)psi_R; - T result = BlasConnector::dot(dim2, pL, 1, pR, 1); - if (reduce) - Parallel_Reduce::reduce_pool(result); - return result; - //====================================================================== - /*std::complex result(0,0); - for (int i=0;i>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> -} - -} // namespace GlobalFunc -} // namespace ModuleBase \ No newline at end of file diff --git a/source/module_base/global_variable.cpp b/source/module_base/global_variable.cpp deleted file mode 100644 index 71f41c1b4b..0000000000 --- a/source/module_base/global_variable.cpp +++ /dev/null @@ -1,43 +0,0 @@ -//========================================================== -// AUTHOR : mohan -// DATE : 2008-11-07 -//========================================================== -#include "global_variable.h" - -#include -#include -#include -#include -#include -#include -namespace GlobalV -{ -//---------------------------------------------------------- -// EXPLAIN : Parallel information -//---------------------------------------------------------- - -int NPROC = 1; ///< global number of process -int KPAR = 1; ///< global number of pools -int MY_RANK = 0; ///< global index of process -int MY_POOL = 0; ///< global index of pool (count in pool) -int MY_BNDGROUP = 0; -int NPROC_IN_POOL = 1; ///< local number of process in a pool -int NPROC_IN_BNDGROUP = 1; -int RANK_IN_POOL = 0; ///< global index of pool (count in process), my_rank in each pool -int RANK_IN_BPGROUP = 0; -int DRANK = -1; ///< mohan add 2012-01-13, must be -1, so we can recognize who - ///< didn't in DIAG_WORLD -int DSIZE = KPAR; -int DCOLOR = -1; -int GRANK = MY_RANK; -int GSIZE = DSIZE; - -//---------------------------------------------------------- -// EXPLAIN : ofstream for output -//---------------------------------------------------------- -std::ofstream ofs_running; -std::ofstream ofs_warning; -std::ofstream ofs_info; // output math lib info -std::ofstream ofs_device; // output device info - -} // namespace GlobalV diff --git a/source/module_base/global_variable.h b/source/module_base/global_variable.h deleted file mode 100644 index 7014912457..0000000000 --- a/source/module_base/global_variable.h +++ /dev/null @@ -1,56 +0,0 @@ -//========================================================== -// AUTHOR : mohan -// DATE : 2008-11-07 -//========================================================== -#ifndef GLOBAL_VARIABLE_H -#define GLOBAL_VARIABLE_H - -#include -#include -#include -#include -#include - -namespace GlobalV -{ -//======================================================================== -// EXPLAIN : Parallel information -// GLOBAL VARIABLES : -// NAME : NPROC( global number of process ) -// NAME : KPAR( global number of pools ) -// NAME : MY_RANK( global index of process ) -// NAME : MY_POOL( global index of pool (count in pool)) -// NAME : NPROC_IN_POOL( local number of process in a pool.) -// NAME : RANK_IN_POOL( global index of pool (count in process), -// MY_RANK in each pool) -// NAME : DRANK( index of diag world) -// NAME : DSIZE( number of processors in diag world, only 1 DWORLD exist) -// NAME : DCOLOR( color of each group) -// NAME : GRANK( index of grid world) -// NAME : GSIZE( number of processors in each grid world) -//======================================================================== -extern int NPROC; -extern int KPAR; -extern int MY_RANK; -extern int MY_POOL; -extern int MY_BNDGROUP; -extern int NPROC_IN_POOL; -extern int NPROC_IN_BNDGROUP; -extern int RANK_IN_POOL; -extern int RANK_IN_BPGROUP; -extern int DRANK; -extern int DSIZE; -extern int DCOLOR; -extern int GRANK; -extern int GSIZE; - -//========================================================== -// NAME : ofs_running( contain information during runnnig) -// NAME : ofs_warning( contain warning information, including error) -//========================================================== -extern std::ofstream ofs_running; -extern std::ofstream ofs_warning; -extern std::ofstream ofs_info; -extern std::ofstream ofs_device; -} // namespace GlobalV -#endif diff --git a/source/module_base/gram_schmidt_orth-inl.h b/source/module_base/gram_schmidt_orth-inl.h deleted file mode 100644 index c3a7903194..0000000000 --- a/source/module_base/gram_schmidt_orth-inl.h +++ /dev/null @@ -1,107 +0,0 @@ -//========================================================== -// AUTHOR : Peize Lin -// DATE : 2016-08-03 -//========================================================== - -#ifndef GRAM_SCHMIDT_ORTH_INL_H -#define GRAM_SCHMIDT_ORTH_INL_H - -#include "gram_schmidt_orth.h" - -#include "mathzone.h" -#include "blas_connector.h" -#include "math_integral.h" // mohan add 2021-04-03 -namespace ModuleBase -{ - -template -Gram_Schmidt_Orth::Gram_Schmidt_Orth( const std::vector &rab_in, const Coordinate &coordinate_in ) - :rab(rab_in), - coordinate(coordinate_in) -{ - if( Coordinate::Sphere == coordinate ) - { - std::vector radial( rab.size() ); - radial[0] = 0; - for( int ir=1; ir!=radial.size(); ++ir ) - radial[ir] = radial[ir-1] + rab[ir-1]; - this->radial_2 = Mathzone::Pointwise_Product( radial, radial ); - } -} - -template -std::vector> Gram_Schmidt_Orth::cal_orth( - const std::vector> &func, - const Func_Type norm_threshold ) -{ - // Schmidt: hn to en - // e1 = h1 / ||h1|| - // gn = hn - \sum{i=1 to n-1}(hn,ei)ei - // en = gn / ||gn|| - - std::vector> func_new; - - for( size_t if1=0; if1!=func.size(); ++if1 ) - { - //use CGS2 algorithm to do twice orthogonalization - //DOI 10.1007/s00211-005-0615-4 - std::vector func_try = func[if1]; - for(int niter=0;niter<3;niter++) - { - std::vector func_tmp = func_try; - for( size_t if_minus=0; if_minus!=func_new.size(); ++if_minus ) - { - // (hn,ei) - const std::vector && mul_func = Mathzone::Pointwise_Product( func_tmp, func_new[if_minus] ); - const Func_Type in_product = cal_norm(mul_func); - - // hn - (hn,ei)ei - BlasConnector::axpy( mul_func.size(), -in_product, ModuleBase::GlobalFunc::VECTOR_TO_PTR(func_new[if_minus]), 1, ModuleBase::GlobalFunc::VECTOR_TO_PTR(func_try), 1); - } - } - - // ||gn|| - const std::vector && func_2 = Mathzone::Pointwise_Product( func_try, func_try ); - const Func_Type norm = sqrt(cal_norm(func_2)); - - // en = gn / ||gn|| - // if ||gn|| too small, filter out - if( norm >= norm_threshold ) - { - BlasConnector::scal( func_try.size(), 1.0/norm, ModuleBase::GlobalFunc::VECTOR_TO_PTR(func_try), 1 ); - func_new.push_back( func_try ); - } - } - return func_new; -} - -// cal ||f|| -template -Func_Type Gram_Schmidt_Orth::cal_norm( const std::vector &f ) -{ - Func_Type norm = 0.0; - switch( this->coordinate ) - { - case Coordinate::Cartesian: - { - Integral::Simpson_Integral( f.size(), ModuleBase::GlobalFunc::VECTOR_TO_PTR(f), ModuleBase::GlobalFunc::VECTOR_TO_PTR(rab), norm); - break; - } - case Coordinate::Sphere: - { - const std::vector &&tmp_func = Mathzone::Pointwise_Product( f, radial_2 ); - Integral::Simpson_Integral( f.size(), ModuleBase::GlobalFunc::VECTOR_TO_PTR(tmp_func), ModuleBase::GlobalFunc::VECTOR_TO_PTR(rab), norm); - break; - } - default: - { - throw std::invalid_argument("coordinate must be Cartesian or Sphere "+std::string(__FILE__)+" line "+std::to_string(__LINE__)); - break; - } - } - return norm; -} - -} - -#endif // GRAM_SCHMIDT_ORTH_INL_H diff --git a/source/module_base/gram_schmidt_orth.h b/source/module_base/gram_schmidt_orth.h deleted file mode 100644 index 897e3c7a98..0000000000 --- a/source/module_base/gram_schmidt_orth.h +++ /dev/null @@ -1,38 +0,0 @@ -//========================================================== -// AUTHOR : Peize Lin -// DATE : 2016-08-03 -//========================================================== - -#ifndef GRAM_SCHMIDT_ORTH_H -#define GRAM_SCHMIDT_ORTH_H - -#include -#include -namespace ModuleBase -{ - -template -class Gram_Schmidt_Orth -{ -public: - - enum class Coordinate { Cartesian, Sphere }; - - Gram_Schmidt_Orth( const std::vector &rab, const Coordinate &coordinate ); - - std::vector> cal_orth( - const std::vector> &func, - const Func_Type norm_threshold = std::numeric_limits::min() ); - -private: - - const Coordinate coordinate; - const std::vector &rab; - std::vector radial_2; - - Func_Type cal_norm( const std::vector &f ); - -}; - -} -#endif // GRAM_SCHMIDT_ORTH_H \ No newline at end of file diff --git a/source/module_base/grid/batch.cpp b/source/module_base/grid/batch.cpp deleted file mode 100644 index 832323e62a..0000000000 --- a/source/module_base/grid/batch.cpp +++ /dev/null @@ -1,123 +0,0 @@ -#include "module_base/grid/batch.h" - -#include -#include -#include - -#include "module_base/blas_connector.h" -#include "module_base/lapack_connector.h" - -namespace { - -/** - * @brief Divide a set of points into two subsets by the "MaxMin" algorithm. - * - * This function divides a given set of grid points by a cut plane - * {x|n^T*(x-c) = 0} where the normal vector n and the point c are - * determined by the "MaxMin" problem: - * - * max min sum_{i=1}^{m} [n^T * (r[idx[i]] - c)]^2 - * n c - * - * here r[j] = (grid[3*j], grid[3*j+1], grid[3*j+2]) is the position of - * the j-th point. - * - * It can be shown that the optimal c is the centroid of the points, and - * the optimal n is the eigenvector corresponding to the largest eigenvalue - * of the matrix R*R^T, where the i-th column of R is r[idx[i]] - c. - * - * @param[in] grid Coordinates of all grid points. - * grid[3*j], grid[3*j+1], grid[3*j+2] are the - * x, y, z coordinates of the j-th point. - * @param[in,out] idx Indices of the selected points within grid. - * On return, idx will be rearranged such that - * points belonging to the same subset have their - * indices placed together. - * @param[in] m Number of selected points (length of idx). - * - * @return The number of points in the first subset within idx. - * - */ -int _maxmin_divide(const double* grid, int* idx, int m) { - assert(m > 1); - if (m == 2) { - return 1; - } - - std::vector centroid(3, 0.0); - for (int i = 0; i < m; ++i) { - int j = idx[i]; - centroid[0] += grid[3*j ]; - centroid[1] += grid[3*j + 1]; - centroid[2] += grid[3*j + 2]; - } - centroid[0] /= m; - centroid[1] /= m; - centroid[2] /= m; - - // positions w.r.t. the centroid - std::vector R(3*m, 0.0); - for (int i = 0; i < m; ++i) { - int j = idx[i]; - R[3*i ] = grid[3*j ] - centroid[0]; - R[3*i + 1] = grid[3*j + 1] - centroid[1]; - R[3*i + 2] = grid[3*j + 2] - centroid[2]; - } - - // The normal vector of the cut plane is taken to be the eigenvector - // corresponding to the largest eigenvalue of the 3x3 matrix A = R*R^T. - std::vector A(9, 0.0); - int i3 = 3, i1 = 1; - double d0 = 0.0, d1 = 1.0; - dsyrk_("U", "N", &i3, &m, &d1, R.data(), &i3, &d0, A.data(), &i3); - - int info = 0, lwork = 102 /* determined by a work space query */; - std::vector e(3), work(lwork); - dsyev_("V", "U", &i3, A.data(), &i3, e.data(), work.data(), &lwork, &info); - double* n = A.data() + 6; // normal vector of the cut plane - - // Rearrange the indices to put points in each subset together by - // examining the signed distances of points to the cut plane (R^T*n). - std::vector dist(m); - dgemv_("T", &i3, &m, &d1, R.data(), &i3, n, &i1, &d0, dist.data(), &i1); - - int *head = idx; - std::reverse_iterator tail(idx + m), rend(idx); - auto is_negative = [&dist, &idx](int& j) { return dist[&j - idx] < 0; }; - while ( ( head = std::find_if(head, idx + m, is_negative) ) < - ( tail = std::find_if_not(tail, rend, is_negative) ).base() ) { - std::swap(*head, *tail); - std::swap(dist[head - idx], dist[tail.base() - idx - 1]); - ++head; - ++tail; - } - - return head - idx; -} - -} // end of anonymous namespace - - -std::vector Grid::Batch::maxmin( - const double* grid, - int* idx, - int m, - int m_thr -) { - if (m <= m_thr) { - return std::vector{0}; - } - - int m_left = _maxmin_divide(grid, idx, m); - - std::vector left = maxmin(grid, idx, m_left, m_thr); - std::vector right = maxmin(grid, idx + m_left, m - m_left, m_thr); - std::for_each(right.begin(), right.end(), - [m_left](int& x) { x += m_left; } - ); - - left.insert(left.end(), right.begin(), right.end()); - return left; -} - - diff --git a/source/module_base/grid/batch.h b/source/module_base/grid/batch.h deleted file mode 100644 index 8a6ef733e1..0000000000 --- a/source/module_base/grid/batch.h +++ /dev/null @@ -1,54 +0,0 @@ -#ifndef GRID_BATCH_H -#define GRID_BATCH_H - -#include - -namespace Grid { -namespace Batch { - -/** - * @brief Divide a set of points into batches by the "MaxMin" algorithm. - * - * This function recursively uses cut planes to divide grid points into - * two subsets using the "MaxMin" algorithm, until the number of points - * in each subset (batch) is no more than m_thr. - * - * @param[in] grid Coordinates of all grid points. - * grid[3*j], grid[3*j+1], grid[3*j+2] are - * the x, y, z coordinates of the j-th point. - * @param[in,out] idx Indices of the initial set within grid. - * On return, idx will be rearranged such - * that points belonging to the same batch - * have their indices placed together. - * @param[in] m Number of points in the initial set. - * (length of idx) - * @param[in] m_thr Size limit of a batch. - * - * @return Indices (for idx) of the first point in each batch. - * - * For example, given grid (illustrated by their indices) located as follows: - * - * 0 1 16 2 3 18 - * 4 5 17 6 7 - * - * - * 8 9 20 10 11 - * 12 13 19 14 15 - * - * a possible outcome with m_thr = 4 and idx(in) = {0, 1, 2, ..., 15} - * (idx may correspond to a subset of grid and does not have to be sorted, - * but it must not contain duplicates) is: - * - * idx(out): 0, 1, 4, 5, 8, 9, 12, 13, 2, 3, 6, 7, 10, 11, 14, 15 - * return : {0, 4, 8, 12} - * - * which means the selected set (labeled 0-15) is divided into 4 batches: - * {0, 1, 4, 5}, {8, 9, 12, 13}, {2, 3, 6, 7}, {10, 11, 14, 15}. - * - */ -std::vector maxmin(const double* grid, int* idx, int m, int m_thr); - -} // end of namespace Batch -} // end of namespace Grid - -#endif diff --git a/source/module_base/grid/delley.cpp b/source/module_base/grid/delley.cpp deleted file mode 100644 index c24aa6ffbb..0000000000 --- a/source/module_base/grid/delley.cpp +++ /dev/null @@ -1,377 +0,0 @@ -#include "module_base/grid/delley.h" - -#include -#include -#include -#include - -namespace { - -struct DelleyTable { - const int lmax_; - const int ngrid_; - const int ntype_[6]; - const std::vector data_; -}; - -// Delley's table from the original article -const std::vector delley_table = { - { - 17, 110, {1, 1, 0, 3, 1, 0}, - { - 0.00000000000000000, 0.00000000000000000, 0.0038282704949371616, - 0.57735026918962576, 0.57735026918962576, 0.0097937375124875125, - 0.18511563534473617, 0.18511563534473617, 0.0082117372831911110, - 0.39568947305594191, 0.39568947305594191, 0.0095954713360709628, - 0.69042104838229218, 0.21595729184584883, 0.0099428148911781033, - 0.47836902881215020, 0.00000000000000000, 0.0096949963616630283, - } - }, - { - 23, 194, {1, 1, 1, 4, 1, 1}, - { - 0.00000000000000000, 0.00000000000000000, 0.0017823404472446112, - 0.57735026918962576, 0.57735026918962576, 0.0055733831788487380, - 0.70710678118654752, 0.00000000000000000, 0.0057169059499771019, - 0.44469331787174373, 0.44469331787174373, 0.0055187714672736137, - 0.28924656275754386, 0.28924656275754386, 0.0051582377118053831, - 0.67129734426952263, 0.31419699418258608, 0.0056087040825879968, - 0.12993354476500669, 0.12993354476500669, 0.0041067770281693941, - 0.34577021976112827, 0.00000000000000000, 0.0050518460646148085, - 0.52511857244364202, 0.15904171053835295, 0.0055302489162330937, - } - }, - { - 29, 302, {1, 1, 0, 6, 2, 2}, - { - 0.00000000000000000, 0.00000000000000000, 0.0008545911725128148, - 0.57735026918962576, 0.57735026918962576, 0.0035991192850255715, - 0.70117664160895449, 0.12923867271051493, 0.0036500458076772554, - 0.65663294102196118, 0.37103417838482119, 0.0036048226014198817, - 0.47290541325810046, 0.47290541325810046, 0.0035767296617433671, - 0.35156403455701051, 0.35156403455701051, 0.0034497884243058833, - 0.22196452362941784, 0.22196452362941784, 0.0031089531224136753, - 0.09618308522614784, 0.09618308522614784, 0.0023521014136891644, - 0.57189558918789607, 0.00000000000000000, 0.0036008209322164603, - 0.26441528870606625, 0.00000000000000000, 0.0029823449631718039, - 0.54486773725807738, 0.25100347517704651, 0.0035715405542733871, - 0.41277240831685310, 0.12335485325833274, 0.0033923122050061702, - } - }, - { - 35, 434, {1, 1, 1, 7, 2, 4}, - { - 0.00000000000000000, 0.00000000000000000, 0.0005265897968224436, - 0.57735026918962576, 0.57735026918962576, 0.0025123174189273072, - 0.70710678118654752, 0.00000000000600000, 0.0025482199720026072, - 0.69093463075091106, 0.21264682470755207, 0.0025304038011863550, - 0.64566647074242561, 0.40771266489776951, 0.0025132671745975644, - 0.49143426377847465, 0.49143426377847465, 0.0025017251684029361, - 0.39272597633680022, 0.39272597633680022, 0.0024453734373129800, - 0.28612890103076384, 0.28612890103076384, 0.0023026947822274158, - 0.17748360546091578, 0.17748360546091578, 0.0020142790209185282, - 0.07568084367178018, 0.07568084367178018, 0.0014624956215946138, - 0.21027252285730696, 0.00000000000000000, 0.0019109512821795323, - 0.47159869115131592, 0.00000000000000000, 0.0024174423756389808, - 0.33443631453434549, 0.09921769636429237, 0.0022366077604378487, - 0.45023303825826254, 0.20548236964030437, 0.0024169300443247753, - 0.55501523610768072, 0.31042840351665415, 0.0024966440545530860, - 0.59051570489252711, 0.10680182607580483, 0.0025122368545634951, - } - }, - { - 41, 590, {1, 1, 0, 8, 4, 6}, - { - 0.00000000000000000, 0.00000000000000000, 0.0001009005753378758, - 0.57735026918962576, 0.57735026918962576, 0.0018514016873890461, - 0.70404760433146996, 0.09291900596883211, 0.0018686219518306975, - 0.68084561988024238, 0.26999719217017240, 0.0018648696345606001, - 0.63723669159418917, 0.43342680786054810, 0.0018497643975168892, - 0.50447558060926046, 0.50447558060926046, 0.0018450277740822388, - 0.42175447334398773, 0.42175447334398773, 0.0018164174988262214, - 0.33201962086729379, 0.33201962086729379, 0.0017449464690023229, - 0.23917494336556047, 0.23917494336556047, 0.0016278016126848035, - 0.14024070738935403, 0.14024070738935403, 0.0015576827519901693, - 0.09161634328605240, 0.00000000000000000, 0.0012680968886048433, - 0.20326292518419433, 0.00000000000000000, 0.0011183965414769017, - 0.39364042372978295, 0.00000000000000000, 0.0017287035120530033, - 0.61262355812929648, 0.00000000000000000, 0.0018551905629473527, - 0.28114771623428322, 0.08959875911893791, 0.0014697353123693616, - 0.38175470908581117, 0.17327600238498666, 0.0016819651914742022, - 0.47452376478986998, 0.26422260656245780, 0.0017876372876796954, - 0.56127905075920534, 0.35189965873835832, 0.0018400735685528423, - 0.50324791996964975, 0.08886791018186295, 0.0018072536817113700, - 0.59768324320748616, 0.18154345643517542, 0.0018527289739424312, - } - }, - { - 47, 770, {1, 1, 1, 9, 4, 9}, - { - 0.00000000000000000, 0.00000000000000000, 0.0011685335608691628, - 0.57735026918962576, 0.57735026918962576, 0.0014121215930643264, - 0.70710678118654752, 0.00000000000000000, 0.0014468645950992776, - 0.11441365123336336, 0.11441365123336336, 0.0010478418864629224, - 0.19944675708548970, 0.19944675708548970, 0.0012392547584848484, - 0.28401278368259530, 0.28401278368259530, 0.0013259295792415379, - 0.36646411416548296, 0.36646411416548296, 0.0013756097758625958, - 0.44356118052513995, 0.44356118052513995, 0.0013999348863558624, - 0.51435709575333968, 0.51435709575333968, 0.0014096221218822673, - 0.63052081196671812, 0.45264446462279973, 0.0014108746499638577, - 0.67164784337293865, 0.31269529735024947, 0.0014134887639034478, - 0.69812332010174177, 0.15889512220405632, 0.0014366946685816802, - 0.12047667931264991, 0.00000000000000000, 0.0010901543574180667, - 0.30940302315480606, 0.00000000000000000, 0.0001869137844803852, - 0.34884276430183016, 0.00000000000000000, 0.0011284267652336505, - 0.53224214285417946, 0.00000000000000000, 0.0013844558026568455, - 0.23249923409267532, 0.06616159933437003, 0.0011853923885095502, - 0.32477344409682044, 0.14568618765136356, 0.0012949021664637693, - 0.41056989039349425, 0.22832839132127622, 0.0013525857420363760, - 0.49213658085114203, 0.30714431901543855, 0.0013925025908786082, - 0.56548849812588755, 0.38271180625074657, 0.0014073257894372725, - 0.43713473693946563, 0.07970715187939190, 0.0013128954307755017, - 0.52320749473197761, 0.15892620239864833, 0.0013784632898490457, - 0.60283033994386521, 0.23667220253873893, 0.0014125450609821936, - 0.62037164721742807, 0.07982328826030880, 0.0014289835314095131, - } - }, - { - 53, 974, {1, 1, 0, 12, 4, 12}, - { - 0.00000000000000000, 0.00000000800000000, 0.0001438294190527431, - 0.57735026918962576, 0.57735026918962576, 0.0011257722882870041, - 0.04292963545341347, 0.04292963545341347, 0.0004948029341949241, - 0.10514268540864042, 0.10514268540864042, 0.0007357990109125470, - 0.17500248676230874, 0.17500248676230874, 0.0008889132771304384, - 0.24776533796502568, 0.24776533796502568, 0.0009888347838921435, - 0.32065671239559574, 0.32065671239559574, 0.0010532996817094706, - 0.39165207498499835, 0.39165207498499835, 0.0010927788070145785, - 0.45908258741876237, 0.45908258741876237, 0.0011143893940632272, - 0.52145638884158605, 0.52145638884158605, 0.0011237247880515553, - 0.62531702446541989, 0.46685890569574328, 0.0011252393252438136, - 0.66379267445231699, 0.34461365423743822, 0.0011261532718159050, - 0.69104103984983007, 0.21195415185018465, 0.0011302869311238408, - 0.70529070074577603, 0.07162440144995566, 0.0011349865343639549, - 0.12366867626579899, 0.00000000000000000, 0.0006823367927109931, - 0.29407771144683870, 0.00000000000000000, 0.0009454158160447096, - 0.46977538492076491, 0.00000000000000000, 0.0010744299753856791, - 0.63345632411395669, 0.00000000000000000, 0.0011293000865691317, - 0.20291287527775228, 0.05974048614181342, 0.0008436884500901954, - 0.46026219424840539, 0.13757604084736365, 0.0010752557204488846, - 0.50306739996620357, 0.33910165263362857, 0.0011085772368644620, - 0.28176064224421343, 0.12716751914398195, 0.0009566475323783357, - 0.43315612917201574, 0.26931207404135125, 0.0010806632507173907, - 0.62561673585808142, 0.14197864526019183, 0.0011267971311962946, - 0.37983952168591567, 0.06709284600738255, 0.0010225687153580612, - 0.55175054214235205, 0.07057738183256172, 0.0011089602677131075, - 0.60296191561591869, 0.27838884778821546, 0.0011227906534357658, - 0.35896063295890958, 0.19795789389174069, 0.0010324018471174598, - 0.53486664381354765, 0.20873070611032740, 0.0011072493822838539, - 0.56749975460743735, 0.40551221378728359, 0.0011217800485199721, - } - }, - { - 59, 1202, {1, 1, 1, 13, 4, 16}, - { - 0.00006000000000000, 0.00000000000000000, 0.0001105189233267572, - 0.57735026918962576, 0.57735026918962576, 0.0009133159786443561, - 0.70710678118654752, 0.00000000000000000, 0.0009205232738090741, - 0.03712636449657089, 0.03712636449657089, 0.0003690421898017899, - 0.09140060412262223, 0.09140060412262223, 0.0005603990928680660, - 0.15310778524699062, 0.15310778524699062, 0.0006865297629282609, - 0.21809288916606116, 0.21809288916606116, 0.0007720338551145630, - 0.28398745322001746, 0.28398745322001746, 0.0008301545958894795, - 0.34911776009637644, 0.34911776009637644, 0.0008686692550179628, - 0.41214314614443092, 0.41214314614443092, 0.0008927076285846890, - 0.47189936271491266, 0.47189936271491266, 0.0009060820238568219, - 0.52731454528423366, 0.52731454528423366, 0.0009119777254940867, - 0.62094753324440192, 0.47838093807695216, 0.0009128720138604181, - 0.65697227118572905, 0.36983086645942597, 0.0009130714935691735, - 0.68417883090701434, 0.25258395570071777, 0.0009152873784554116, - 0.70126043301236308, 0.12832618665972300, 0.0009187436274321654, - 0.10723822154781661, 0.00000000000000000, 0.0005176977312965694, - 0.25820689594969680, 0.00006000000000000, 0.0007331143682101417, - 0.41727529553067168, 0.00000000000000000, 0.0008463232836379928, - 0.57003669117925033, 0.00000000000000000, 0.0009031122694253992, - 0.17717740226153253, 0.05210639477011284, 0.0006485778453163257, - 0.24757164634262876, 0.11156409571564867, 0.0007435030910982369, - 0.31736152466119767, 0.17465516775786261, 0.0008101731497468018, - 0.38542911506692237, 0.23902784793817240, 0.0008556299257311812, - 0.45074225931570644, 0.30294669735289819, 0.0008850282341265444, - 0.51235184864198708, 0.36498322605976536, 0.0009022692938426915, - 0.56937024984684411, 0.42386447815223403, 0.0009105760258970126, - 0.33546162890664885, 0.05905888853235508, 0.0007998527891839054, - 0.40902684270853572, 0.12172350510959870, 0.0008483389574594331, - 0.47853206759224352, 0.18575051945473351, 0.0008811048182425720, - 0.54343035696939004, 0.24941121623622365, 0.0009010091677105086, - 0.60311616930963100, 0.31122759471496082, 0.0009107813579482705, - 0.49322211848512846, 0.06266250624154169, 0.0008803208679738260, - 0.56321230207620997, 0.12677748006842827, 0.0009021342299040653, - 0.62698055090243917, 0.19060182227792370, 0.0009131578003189435, - 0.63942796347491023, 0.06424549224220589, 0.0009158016174693465, - } - } -}; // end of the definition of "delley_table" - -// size of each group of points with octahedral symmetry -// 6: (1, 0, 0) x sign x permutation (vertices) -// 8: (sqrt(1/3), sqrt(1/3), sqrt(1/3)) x sign (face centers) -// 12: (sqrt(2)/2, sqrt(2)/2, 0) x sign x permutation (edge centers) -// 24a: (u, u, sqrt(1-2u^2)) x sign x permutation -// 24b: (u, 0, sqrt(1-u^2)) x sign x permutation -// 48: (u, v, sqrt(1-u^2-v^2)) x sign x permutation -const int group_size[] = {6, 8, 12, 24, 24, 48}; - -using Fill_t = std::function; - -// functors that fill the grid group-wise -const std::vector fill = { - // (1, 0, 0) x sign x permutation (vertices) - [](double* grid, double, double) { - for (int i = 0; i < 3; ++i) { - for (double one : {-1.0, 1.0}) { - grid[i] = one; - grid[(i+1)%3] = 0.0; - grid[(i+2)%3] = 0.0; - std::advance(grid, 3); - } - } - }, - - // (sqrt(1/3), sqrt(1/3), sqrt(1/3)) x sign (face centers) - [](double* grid, double, double) { - const double a = std::sqrt(3) / 3.0; - for (int xsign : {-1, 1}) { - for (int ysign : {-1, 1}) { - for (int zsign : {-1, 1}) { - grid[0] = xsign * a; - grid[1] = ysign * a; - grid[2] = zsign * a; - std::advance(grid, 3); - } - } - } - }, - - // (sqrt(2)/2, sqrt(2)/2, 0) x sign x permutation (edge centers) - [](double* grid, double, double) { - const double a = std::sqrt(2) / 2.0; - for (int i = 0; i < 3; ++i) { - for (int sign1 : {-1, 1}) { - for (int sign2 : {-1, 1}) { - grid[i] = 0; - grid[(i+1)%3] = sign1 * a; - grid[(i+2)%3] = sign2 * a; - std::advance(grid, 3); - } - } - } - }, - - // (u, u, sqrt(1-2u^2)) x sign x permutation - [](double* grid, double x, double y) { - double u = x == y ? x : std::sqrt(1.0 - x * x - y * y); - double v = std::sqrt(1.0 - 2.0 * u * u); - for (int i = 0; i < 3; ++i) { - for (int sign1 : {-1, 1}) { - for (int sign2 : {-1, 1}) { - for (int sign3 : {-1, 1}) { - grid[i] = sign1 * u; - grid[(i+1)%3] = sign2 * u; - grid[(i+2)%3] = sign3 * v; - std::advance(grid, 3); - } - } - } - } - }, - - // (u, 0, sqrt(1-u^2)) x sign x permutation - [](double* grid, double x, double y) { - double u = x > 0 ? x : y; - double v = std::sqrt(1.0 - u * u); - for (int i0 = 0; i0 < 3; ++i0) { - for (int iu0 : {1, 2}) { - for (int sign_u : {-1, 1}) { - for (int sign_v : {-1, 1}) { - grid[i0] = 0; - grid[(i0+iu0)%3] = sign_u * u; - grid[(i0-iu0+3)%3] = sign_v * v; - std::advance(grid, 3); - } - } - } - } - }, - - // (u, v, sqrt(1-u^2-v^2)) x sign x permutation - [](double* grid, double x, double y) { - double r = x; - double s = y; - double t = std::sqrt(1.0 - r * r - s * s); - for (int ir = 0; ir < 3; ++ir) { - for (int irs : {1, 2}) { - for (int sign_r : {-1, 1}) { - for (int sign_s : {-1, 1}) { - for (int sign_t : {-1, 1}) { - grid[ir] = sign_r * r; - grid[(ir+irs)%3] = sign_s * s; - grid[(ir-irs+3)%3] = sign_t * t; - std::advance(grid, 3); - } - } - } - } - } - }, -}; // end of the definition of "fill" - -const DelleyTable* _find_delley(int& lmax) { - // NOTE: this function assumes elements in "delley_table" are - // arranged such that their members "lmax_" are in ascending order. - auto tab = std::find_if(delley_table.begin(), delley_table.end(), - [lmax](const DelleyTable& t) { return t.lmax_ >= lmax; }); - return tab == delley_table.end() ? nullptr : (lmax = tab->lmax_, &(*tab)); -} - -void _delley(const DelleyTable* tab, double* grid, double* weight) { - assert(tab); - const double* ptr = &tab->data_[0]; - for (int itype = 0; itype < 6; ++itype) { - int stride = group_size[itype]; - for (int i = 0; i < tab->ntype_[itype]; ++i, ptr += 3, - grid += 3*stride, weight += stride) { - fill[itype](grid, ptr[0], ptr[1]); - std::fill(weight, weight + stride, ptr[2]); - } - } -} - -} // end of anonymous namespace - - -int Grid::Angular::ngrid_delley(int& lmax) { - auto tab = _find_delley(lmax); - return tab ? tab->ngrid_ : -1; -} - - -int Grid::Angular::delley(int& lmax, double* grid, double* weight) { - auto tab = _find_delley(lmax); - return tab ? _delley(tab, grid, weight), 0 : -1; -} - - -int Grid::Angular::delley( - int& lmax, - std::vector& grid, - std::vector& weight -) { - auto tab = _find_delley(lmax); - if (!tab) { - return -1; - } - grid.resize(3 * tab->ngrid_); - weight.resize(tab->ngrid_); - _delley(tab, grid.data(), weight.data()); - return 0; -} diff --git a/source/module_base/grid/delley.h b/source/module_base/grid/delley.h deleted file mode 100644 index 25f5fd35be..0000000000 --- a/source/module_base/grid/delley.h +++ /dev/null @@ -1,51 +0,0 @@ -#ifndef GRID_ANGULAR_DELLEY_H -#define GRID_ANGULAR_DELLEY_H - -#include - -namespace Grid { -namespace Angular { - -/** - * @brief Number of Delley's grid points for a certain order of accuracy. - * - * This function finds the minimum Delley's grid with an accuracy - * of order "lmax". On exit, lmax is set to the order of this grid, and - * its corresponding number of grid points is returned. If no such grid - * is available, lmax is left unchanged and the function will return -1. - * - * For example, if lmax = 20 on input, the function will return 194 and - * lmax will be set to 23. - * - */ -int ngrid_delley(int& lmax); - - -/** - * @brief Delley's quadrature grid and weights. - * - * This function retrieves the minimum Delley's grid with an accuray - * of order "lmax". On exit, lmax is set to the order of this grid, and - * the coordinates & weights are returned in "grid" & "weight". - * - * Coordinates are stored in the following order: - * - * x0, y0, z0, x1, y1, z1, x2, y2, z2, ... - * - * "grid" and "weight" must be pre-allocated to hold 3*ngrid(lmax) and - * ngrid(lmax) elements, respectively. The function will return 0 if - * successful, or -1 if the requested order cannot be fulfilled. - * - * Reference: - * Delley, B. (1996). High order integration schemes on the unit sphere. - * Journal of computational chemistry, 17(9), 1152-1155. - */ -int delley(int& lmax, double* grid, double* weight); - -// a handy wrapper doing the same as above -int delley(int& lmax, std::vector& grid, std::vector& weight); - -} // end of namespace Angular -} // end of namespace Grid - -#endif diff --git a/source/module_base/grid/partition.cpp b/source/module_base/grid/partition.cpp deleted file mode 100644 index 20ce3edb26..0000000000 --- a/source/module_base/grid/partition.cpp +++ /dev/null @@ -1,142 +0,0 @@ -#include "module_base/grid/partition.h" -#include "module_base/constants.h" - -#include -#include -#include -#include -#include -#include - -namespace Grid { -namespace Partition { - -const double stratmann_a = 0.64; - -double w_becke( - int nR0, - const double* drR, - const double* dRR, - int nR, - const int* iR, - int c -) { - assert(nR > 0 && nR0 >= nR); - std::vector P(nR, 1.0); - for (int i = 0; i < nR; ++i) { - int I = iR[i]; - for (int j = i + 1; j < nR; ++j) { - int J = iR[j]; - double mu = (drR[I] - drR[J]) / dRR[I*nR0 + J]; - double s = s_becke(mu); - P[I] *= s; - P[J] *= (1.0 - s); // s(-mu) = 1 - s(mu) - } - } - return P[c] / std::accumulate(P.begin(), P.end(), 0.0); -} - - -double s_becke(double mu) { - /* - * Becke's iterated polynomials (3rd order) - * - * s(mu) = 0.5 * (1 - p(p(p(mu)))) - * - * p(x) = 0.5 * x * (3 - x^2) - * - */ - double p = 0.5 * mu * (3.0 - mu*mu); - p = 0.5 * p * (3.0 - p*p); - p = 0.5 * p * (3.0 - p*p); - return 0.5 * (1.0 - p); -} - - -double w_stratmann( - int nR0, - const double* drR, - const double* dRR, - const double* drR_thr, - int nR, - int* iR, - int c -) { - assert(nR > 0 && nR0 >= nR); - int I = iR[c], J = 0; - - // If r falls within the exclusive zone of a center, return immediately. - for (int j = 0; j < nR; ++j) { - J = iR[j]; - if (drR[J] <= drR_thr[J]) { - return static_cast(I == J); - } - } - - // Even if the grid point does not fall within the exclusive zone of any - // center, the normalized weight could still be 0 or 1, and this can be - // figured out by examining the unnormalized weight alone. - - // Swap the grid center to the first position in iteration for convenience. - // Restore the original order before return. - std::swap(iR[0], iR[c]); - - std::vector P(nR); - for (int j = 1; j < nR; ++j) { - J = iR[j]; - double mu = (drR[I] - drR[J]) / dRR[I*nR0 + J]; - P[j] = s_stratmann(mu); - } - P[0] = std::accumulate(P.begin() + 1, P.end(), 1.0, - std::multiplies()); - - if (P[0] == 0.0 || P[0] == 1.0) { - std::swap(iR[0], iR[c]); // restore the original order - return P[0]; - } - - // If it passes all the screening above, all unnormalized weights - // have to be calculated in order to get the normalized weight. - - std::for_each(P.begin() + 1, P.end(), [](double& s) { s = 1.0 - s; }); - for (int i = 1; i < nR; ++i) { - I = iR[i]; - for (int j = i + 1; j < nR; ++j) { - J = iR[j]; - double mu = (drR[I] - drR[J]) / dRR[I*nR0 + J]; - double s = s_stratmann(mu); - P[i] *= s; - P[j] *= (1.0 - s); // s(-mu) = 1 - s(mu) - } - } - - std::swap(iR[0], iR[c]); // restore the original order - return P[0] / std::accumulate(P.begin(), P.end(), 0.0); -} - - -double s_stratmann(double mu) { - /* - * Stratmann's piecewise cell function - * - * s(mu) = 0.5 * (1 - g(mu/a)) - * - * / -1 x <= -1 - * | - * g(x) = | (35x - 35x^3 + 21x^5 - 5x^7) / 16 |x| < 1 - * | - * \ +1 x >= +1 - * - */ - double x = mu / stratmann_a; - double x2 = x * x; - double h = 0.0625 * x * (35 + x2 * (-35 + x2 * (21 - 5 * x2))); - - bool mid = std::abs(x) < 1; - double g = !mid * (1 - 2 * std::signbit(x)) + mid * h; - return 0.5 * (1.0 - g); -} - - -} // end of namespace Partition -} // end of namespace Grid diff --git a/source/module_base/grid/partition.h b/source/module_base/grid/partition.h deleted file mode 100644 index cc4879e3a0..0000000000 --- a/source/module_base/grid/partition.h +++ /dev/null @@ -1,84 +0,0 @@ -#ifndef GRID_PARTITION_H -#define GRID_PARTITION_H - -namespace Grid { -namespace Partition { - -enum class Type { - Becke, - Stratmann, -}; - -extern const double stratmann_a; - -/** - * @brief Becke's partition weight. - * - * This function computes the normalized Becke's partition weight - * for a grid point associated with a selected set of centers, given - * the grid point's distance to centers and inter-center distance. - * - * @param nR0 Total number of centers given by drR & dRR. - * @param drR Distance between the grid point and centers. - * @param dRR Distance between centers. dRR[I*nR0 + J] is the - * distance between center I and J. - * @param nR Number of centers involved in the weight calculation. - * nR <= nR0. Length of iR. - * @param iR Indices of centers involved. - * Each element is a distinctive index in [0, nR0). - * @param c iR[c] is the index of the center whom this grid point - * belongs to. - * - * Reference: - * Becke, A. D. (1988). - * A multicenter numerical integration scheme for polyatomic molecules. - * The Journal of chemical physics, 88(4), 2547-2553. - * - */ -double w_becke( - int nR0, - const double* drR, - const double* dRR, - int nR, - const int* iR, - int c -); - -// Becke's cell function (iterated polynomial) -double s_becke(double mu); - - -/** - * @brief Becke's partition weight with Stratmann's scheme. - * - * This function is similar to w_becke, but the cell function adopts - * the one proposed by Stratmann et al, which enables some screening. - * - * @see w_becke - * - * @param drR_thr Radius of exclusive zone of each center. - * - * Reference: - * Stratmann, R. E., Scuseria, G. E., & Frisch, M. J. (1996). - * Achieving linear scaling in exchange-correlation density functional - * quadratures. - * Chemical physics letters, 257(3-4), 213-223. - * - */ -double w_stratmann( - int nR0, - const double* drR, - const double* dRR, - const double* drR_thr, - int nR, - int* iR, - int c -); - -// Stratmann's piecewise cell function -double s_stratmann(double mu); - -} // end of namespace Partition -} // end of namespace Grid - -#endif diff --git a/source/module_base/grid/radial.cpp b/source/module_base/grid/radial.cpp deleted file mode 100644 index 6b34ec953d..0000000000 --- a/source/module_base/grid/radial.cpp +++ /dev/null @@ -1,64 +0,0 @@ -#include "module_base/grid/radial.h" - -#include - -namespace Grid { -namespace Radial { - -void baker(int nbase, double R, double* r, double* w, int mult) { - int n = (nbase+1) * mult - 1; - double r0 = -R / std::log((2.0 * nbase + 1.0) / ((nbase+1)*(nbase+1))); - for (int i = 1; i <= n; ++i) { - r[i-1] = -r0 * std::log(1.0 - static_cast(i)*i/((n+1)*(n+1))); - w[i-1] = 2.0 * i * r0 * r[i-1] * r[i-1] / ((n+1+i)*(n+1-i)); - } -} - - -void baker(int nbase, double R, std::vector& r, - std::vector& w, int mult) { - int n = (nbase+1) * mult - 1; - r.resize(n); - w.resize(n); - baker(nbase, R, r.data(), w.data(), mult); -} - - -void murray(int n, double R, double* r, double* w) { - for (int i = 1; i <= n; ++i) { - double x = static_cast(i) / (n + 1); - r[i-1] = std::pow(x / (1.0 - x), 2) * R; - w[i-1] = 2.0 / (n + 1) * std::pow(R, 3) * std::pow(x, 5) - / std::pow(1.0 - x, 7); - } -} - - -void treutler_m4(int n, double R, double* r, double* w, double alpha) { - const double pi = std::acos(-1.0); - const double inv_ln2 = 1.0 / std::log(2.0); - - for (int i = 1; i <= n; ++i) { - double x = std::cos(i * pi / (n + 1)); - double beta = std::sqrt((1.0 + x) / (1.0 - x)); - double gamma = std::log((1.0 - x) / 2.0); - double delta = std::pow(1.0 + x, alpha); - r[i-1] = -R * inv_ln2 * delta * gamma; - w[i-1] = pi / (n + 1) * std::pow(delta * R * inv_ln2, 3) - * gamma * gamma * (beta - alpha / beta * gamma); - } -} - - -void mura(int n, double R, double* r, double* w) { - for (int i = 1; i <= n; ++i) { - double x = static_cast(i) / (n + 1); - double alpha = 1.0 - x * x * x; - r[i-1] = -R * std::log(alpha); - w[i-1] = 3.0 * R * std::pow(x * r[i-1], 2) / ((n+1) * alpha); - } -} - - -} // end of namespace Radial -} // end of namespace Grid diff --git a/source/module_base/grid/radial.h b/source/module_base/grid/radial.h deleted file mode 100644 index b8378f5834..0000000000 --- a/source/module_base/grid/radial.h +++ /dev/null @@ -1,70 +0,0 @@ -#ifndef GRID_RADIAL_H -#define GRID_RADIAL_H - -#include - -namespace Grid { -namespace Radial { - -/** - * @brief Radial quadratures. - * - * This namespace contains functions that generate grids and weights - * for numerical integration - * - * / inf 2 - * | dr r g(r) ~ \sum_i w[i] g(r[i]) - * / 0 - * - */ - -/** - * Baker, J., Andzelm, J., Scheiner, A., & Delley, B. (1994). - * The effect of grid quality and weight derivatives in - * density functional calculations. - * The Journal of chemical physics, 101(10), 8894-8902. - * - * Zhang, I. Y., Ren, X., Rinke, P., Blum, V., & Scheffler, M. (2013). - * Numeric atom-centered-orbital basis sets with valence-correlation - * consistency from H to Ar. - * New Journal of Physics, 15(12), 123033. - * - * @note nbase is the number of points of the "base" grid, i.e., - * before applying the "radial multiplier" introduced by Zhang et al. - * The true number of grid points is (nbase+1) * mult - 1. - */ -void baker(int nbase, double R, double* r, double* w, int mult = 1); -void baker(int nbase, double R, std::vector& r, - std::vector& w, int mult = 1); - - -/** - * Murray, C. W., Handy, N. C., & Laming, G. J. (1993). - * Quadrature schemes for integrals of density functional theory. - * Molecular Physics, 78(4), 997-1014. - */ -void murray(int n, double R, double* r, double* w); - - -/** - * Treutler, O., & Ahlrichs, R. (1995). - * Efficient molecular numerical integration schemes. - * The Journal of Chemical Physics, 102(1), 346-354. - * - * @note M4 reduces to M3 at alpha = 0. - */ -void treutler_m4(int n, double R, double* r, double* w, double alpha = 0.6); - - -/** - * Mura, M. E., & Knowles, P. J. (1996). - * Improved radial grids for quadrature in molecular - * density‐functional calculations. - * The Journal of chemical physics, 104(24), 9848-9858. - */ -void mura(int n, double R, double* r, double* w); - -} // end of namespace Radial -} // end of namespace Grid - -#endif diff --git a/source/module_base/grid/test/CMakeLists.txt b/source/module_base/grid/test/CMakeLists.txt deleted file mode 100644 index 068feb9634..0000000000 --- a/source/module_base/grid/test/CMakeLists.txt +++ /dev/null @@ -1,29 +0,0 @@ -remove_definitions(-D__MPI) - -AddTest( - TARGET MODULE_BASE_GRID_test_delley - SOURCES test_delley.cpp - ../delley.cpp - ../../ylm.cpp -) - -AddTest( - TARGET MODULE_BASE_GRID_test_radial - SOURCES test_radial.cpp - ../radial.cpp -) - -AddTest( - TARGET MODULE_BASE_GRID_test_partition - SOURCES test_partition.cpp - ../partition.cpp - ../radial.cpp - ../delley.cpp -) - -AddTest( - TARGET MODULE_BASE_GRID_test_batch - SOURCES test_batch.cpp - ../batch.cpp - LIBS ${math_libs} -) diff --git a/source/module_base/grid/test/test_batch.cpp b/source/module_base/grid/test/test_batch.cpp deleted file mode 100644 index 74324bc47b..0000000000 --- a/source/module_base/grid/test/test_batch.cpp +++ /dev/null @@ -1,234 +0,0 @@ -#include "module_base/grid/batch.h" - -#include "gtest/gtest.h" -#include -#include -//#include - -#ifdef __MPI -#include -#endif - -using namespace Grid::Batch; - - -class BatchTest: public ::testing::Test -{ -protected: - - std::vector grid_; - std::vector idx_; - - // parameters for 8-octant clusters - const int n_batch_oct_ = 10; - const double width_oct_ = 1.0; - const double offset_x_ = 7.0; - const double offset_y_ = 8.0; - const double offset_z_ = 9.0; - // NOTE: These offsets should be different from each other as maxmin - // might fail for highly symmetric, well-separated clusters. - // Consider the case where the 8 clusters as a whole have octahedral - // symmetry. In this case, R*R^T must be proprotional to the identity, - // and eigenvalues are three-fold degenerate, because xy, yz and zx - // plane are equivalent in terms of the maxmin optimization problem. - // This means eigenvectors are arbitrary in this case. - - - // parameters for a random cluster - const int n_grid_rand_ = 1000; - const int n_batch_rand_ = 200; - const double width_rand_ = 10.0; - const double xc_ = 1.0; - const double yc_ = 1.0; - const double zc_ = 2.0; -}; - - -void gen_random( - int ngrid, - double xc, - double yc, - double zc, - double width, - std::vector& grid, - std::vector& idx -) { - - // Generates a set of points centered around (xc, yc, zc). - - std::random_device rd; - std::mt19937 gen(rd()); - std::uniform_real_distribution dis(-width, width); - - grid.resize(3 * ngrid); - for (int i = 0; i < ngrid; ++i) { - grid[3*i ] = xc + dis(gen); - grid[3*i + 1] = yc + dis(gen); - grid[3*i + 2] = zc + dis(gen); - } - - idx.resize(ngrid); - std::iota(idx.begin(), idx.end(), 0); - std::shuffle(idx.begin(), idx.end(), gen); -} - - -void gen_octant( - int n_each, - double offset_x, - double offset_y, - double offset_z, - double width, - std::vector& grid, - std::vector& idx -) { - - // Generates a set of points consisting of 8 well-separated, equal-sized - // clusters located in individual octants. - - std::random_device rd; - std::mt19937 gen(rd()); - std::uniform_real_distribution dis(-width, width); - - int ngrid = 8 * n_each; - grid.resize(3 * ngrid); - int I = 0; - for (int sign_x : {-1, 1}) { - for (int sign_y : {-1, 1}) { - for (int sign_z : {-1, 1}) { - for (int i = 0; i < n_each; ++i, ++I) { - grid[3*I ] = sign_x * offset_x + dis(gen); - grid[3*I + 1] = sign_y * offset_y + dis(gen); - grid[3*I + 2] = sign_z * offset_z + dis(gen); - } - } - } - } - - idx.resize(ngrid); - std::iota(idx.begin(), idx.end(), 0); - std::shuffle(idx.begin(), idx.end(), gen); -} - - -bool is_same_octant(int ngrid, const double* grid) { - if (ngrid == 0) { - return true; - } - const bool is_positive_x = grid[0] > 0; - const bool is_positive_y = grid[1] > 0; - const bool is_positive_z = grid[2] > 0; - const double* end = grid + 3 * ngrid; - for (; grid != end; grid += 3) { - if ( is_positive_x != (grid[0] > 0) || - is_positive_y != (grid[1] > 0) || - is_positive_z != (grid[2] > 0) ) { - return false; - } - } - return true; -} - - -bool good_batch_size( - const std::vector& idx, - const std::vector& delim, - int n_batch_thr -) { - // checks if the sizes of batches are within the specified limit - - bool flag = (delim[0] == 0); - - size_t i = 1; - while (flag && i < delim.size()) { - int sz_batch = delim[i] - delim[i-1]; - flag = flag && (sz_batch > 0) && (sz_batch <= n_batch_thr); - ++i; - } - - return flag && ( ((int)idx.size() - delim.back()) < n_batch_thr ); -} - - -TEST_F(BatchTest, MaxMinRandom) -{ - // This test verifies that the sizes of batches produced by maxmin - // do not exceed the specified limit. - - gen_random(n_grid_rand_, xc_, yc_, zc_, width_rand_, grid_, idx_); - - std::vector delim = - maxmin(grid_.data(), idx_.data(), idx_.size(), n_batch_rand_); - - EXPECT_TRUE(good_batch_size(idx_, delim, n_batch_rand_)); - - // write grid, idx & delim to file - //FILE* fp = fopen("grid.dat", "w"); - //for (size_t i = 0; i < grid_.size() / 3; ++i) { - // std::fprintf(fp, "% 12.6f % 12.6f % 12.6f\n", - // grid_[3*i], grid_[3*i + 1], grid_[3*i + 2]); - //} - //fclose(fp); - - //fp = fopen("idx.dat", "w"); - //for (size_t i = 0; i < idx_.size(); ++i) { - // std::fprintf(fp, "%d\n", idx_[i]); - //} - //fclose(fp); - - //fp = fopen("delim.dat", "w"); - //for (size_t i = 0; i < delim.size(); ++i) { - // std::fprintf(fp, "%d\n", delim[i]); - //} - //fclose(fp); -} - - -TEST_F(BatchTest, MaxMinOctant) -{ - // This test applies maxmin to a set of points consisting of 8 - // well-separated, equal-sized clusters located in individual octants. - // The resulting batches should be able to recover this structure. - - gen_octant(n_batch_oct_, offset_x_, offset_y_, offset_z_, width_oct_, - grid_, idx_); - - std::vector delim = - maxmin(grid_.data(), idx_.data(), idx_.size(), n_batch_oct_); - - EXPECT_EQ(delim.size(), 8); - - std::vector grid_batch(3 * n_batch_oct_); - for (int i = 0; i < 8; ++i) { - - EXPECT_EQ(delim[i], i * n_batch_oct_); - - // collect points within the present batch - for (int j = 0; j < n_batch_oct_; ++j) { - int ig = idx_[delim[i] + j]; - grid_batch[3*j ] = grid_[3*ig ]; - grid_batch[3*j + 1] = grid_[3*ig + 1]; - grid_batch[3*j + 2] = grid_[3*ig + 2]; - } - - // verify that points in a batch reside in the same octant - EXPECT_TRUE(is_same_octant(n_batch_oct_, grid_batch.data())); - } -} - - -int main(int argc, char** argv) -{ -#ifdef __MPI - MPI_Init(&argc, &argv); -#endif - - testing::InitGoogleTest(&argc, argv); - int result = RUN_ALL_TESTS(); - -#ifdef __MPI - MPI_Finalize(); -#endif - - return result; -} diff --git a/source/module_base/grid/test/test_delley.cpp b/source/module_base/grid/test/test_delley.cpp deleted file mode 100644 index 2aa9b38df0..0000000000 --- a/source/module_base/grid/test/test_delley.cpp +++ /dev/null @@ -1,138 +0,0 @@ -#include "module_base/grid/delley.h" -#include "module_base/ylm.h" - -#include "gtest/gtest.h" -#include -#ifdef __MPI -#include -#endif - -using namespace Grid::Angular; - -// mock the function to prevent unnecessary dependency -namespace ModuleBase { -void WARNING_QUIT(const std::string&, const std::string&) {} -} - -class DelleyTest: public ::testing::Test { -protected: - void randgen(int lmax, std::vector& coef); - const double tol = 1e-12; -}; - - -void DelleyTest::randgen(int lmax, std::vector& coef) { - coef.resize((lmax + 1) * (lmax + 1)); - - // fill coef with uniformly distributed random numbers - std::random_device rd; - std::mt19937 gen(rd()); - std::uniform_real_distribution dis(0.0, 1.0); - for (size_t i = 0; i < coef.size(); ++i) { - coef[i] = dis(gen); - } - - // normalize the coefficients - double fac = 0.0; - for (size_t i = 0; i < coef.size(); ++i) { - fac += coef[i] * coef[i]; - } - - fac = 1.0 / std::sqrt(fac); - for (size_t i = 0; i < coef.size(); ++i) { - coef[i] *= fac; - } -} - - -TEST_F(DelleyTest, NumGrid) { - int lmax = 5; - int ngrid = ngrid_delley(lmax); - EXPECT_EQ(lmax, 17); - EXPECT_EQ(ngrid, 110); - - lmax = 17; - ngrid = ngrid_delley(lmax); - EXPECT_EQ(lmax, 17); - EXPECT_EQ(ngrid, 110); - - lmax = 20; - ngrid = ngrid_delley(lmax); - EXPECT_EQ(lmax, 23); - EXPECT_EQ(ngrid, 194); - - lmax = 59; - ngrid = ngrid_delley(lmax); - EXPECT_EQ(lmax, 59); - EXPECT_EQ(ngrid, 1202); - - lmax = 60; - ngrid = ngrid_delley(lmax); - EXPECT_EQ(lmax, 60); - EXPECT_EQ(ngrid, -1); -} - - -TEST_F(DelleyTest, Accuracy) { - /* - * Given - * - * f = c[0]*Y00 + c[1]*Y10 + c[2]*Y11 + ..., - * - * where c[0], c[1], c[2], ... are some random numbers, the integration - * of |f|^2 on the unit sphere - * - * \int |f|^2 d\Omega = c[0]^2 + c[1]^2 + c[2]^2 + ... . - * - * This test verifies with the above integral that quadrature with - * Delley's grid is exact up to floating point errors. - * - */ - std::vector grid, weight, coef; - - for (int grid_lmax = 17; grid_lmax < 60; grid_lmax +=6) { - delley(grid_lmax, grid, weight); - int func_lmax = grid_lmax / 2; - randgen(func_lmax, coef); - - double val = 0.0; - std::vector ylm_real; - for (size_t i = 0; i < weight.size(); i++) { - ModuleBase::Ylm::sph_harm(func_lmax, - grid[3*i], grid[3*i+1], grid[3*i+2], ylm_real); - double tmp = 0.0; - for (size_t j = 0; j < coef.size(); ++j) { - tmp += coef[j] * ylm_real[j]; - } - val += weight[i] * tmp * tmp; - } - val *= 4.0 * std::acos(-1.0); - - double val_ref = 0.0; - for (size_t i = 0; i < coef.size(); ++i) { - val_ref += coef[i] * coef[i]; - } - - double abs_diff = std::abs(val - val_ref); - EXPECT_LT(abs_diff, tol); - //printf("order = %2i val_ref = %8.5f abs_diff = %8.5e\n", - // grid_lmax, val_ref, abs_diff); - } -} - - -int main(int argc, char** argv) -{ -#ifdef __MPI - MPI_Init(&argc, &argv); -#endif - - testing::InitGoogleTest(&argc, argv); - int result = RUN_ALL_TESTS(); - -#ifdef __MPI - MPI_Finalize(); -#endif - - return result; -} diff --git a/source/module_base/grid/test/test_partition.cpp b/source/module_base/grid/test/test_partition.cpp deleted file mode 100644 index 057f4c43da..0000000000 --- a/source/module_base/grid/test/test_partition.cpp +++ /dev/null @@ -1,295 +0,0 @@ -#include "module_base/grid/partition.h" -#include "module_base/grid/radial.h" -#include "module_base/grid/delley.h" -#include "module_base/constants.h" - -#include "gtest/gtest.h" -#include -#include -#include -#include -#include -#include - -#ifdef __MPI -#include -#endif - -using ModuleBase::PI; -using Vec3 = std::array; - -using iclock = std::chrono::high_resolution_clock; -iclock::time_point start; -std::chrono::duration dur; - -double norm(const Vec3& v) { - return std::sqrt(v[0]*v[0] + v[1]*v[1] + v[2]*v[2]); -} - -Vec3 operator-(const Vec3& v1, const Vec3& v2) { - return {v1[0] - v2[0], v1[1] - v2[1], v1[2] - v2[2]}; -} - -Vec3 operator+(const Vec3& v1, const Vec3& v2) { - return {v1[0] + v2[0], v1[1] + v2[1], v1[2] + v2[2]}; -} - -// |r|^n * exp(-a*|r|^2) -double func_core(const Vec3& r, double a, double n) { - double rabs = norm(r); - return std::pow(rabs, n) * std::exp(-a * rabs * rabs); -} - -// func_core integrated over all space -double ref_core(double a, double n) { - double p = 0.5 * (n + 3); - return 2.0 * PI * std::pow(a, -p) * std::tgamma(p); -} - -// the test function is a combination of several func_core -double func( - const Vec3& r, - const std::vector& R, - const std::vector& a, - const std::vector& n -) { - double val = 0.0; - for (size_t i = 0; i < R.size(); i++) { - val += func_core(r - R[i], a[i], n[i]); - } - return val; -} - -double ref(const std::vector& a, const std::vector& n) { - double val = 0.0; - for (size_t i = 0; i < a.size(); i++) { - val += ref_core(a[i], n[i]); - } - return val; -} - -// A Param object specifies a test function -struct Param { - std::vector R; - std::vector a; - std::vector n; -}; - -std::vector test_params = { - { - { - {0.0, 0.0, 0.0}, - {0.0, 0.0, 2.0}, - }, - {0.5, 2.0}, - {0, 0} - }, - { - { - {0.0, 0.0, 0.0}, - {0.0, 0.0, 2.0}, - {0.0, 3.0, 0.0}, - }, - {0.5, 2.0, 1.5}, - {1, 2, 0.5} - }, - { - { - {0.0, 0.0, 0.0}, - {0.0, 0.0, 3.0}, - {0.0, 3.0, 0.0}, - {9.0, 0.0, 0.0}, - }, - {1.0, 2.0, 1.5, 2.0}, - {2.5, 2, 0.5, 1} - }, - { - { - {0.0, 0.0, 0.0}, - {0.0, 0.0, 3.0}, - {0.0, 3.0, 0.0}, - {9.0, 0.0, 0.0}, - {1.0, 1.0, 1.0}, - {2.0, 2.0, 2.0}, - {3.0, 3.0, 3.0}, - {4.0, 4.0, 4.0}, - {5.0, 5.0, 5.0}, - {6.0, 6.0, 6.0}, - }, - {1.0, 2.0, 1.5, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0}, - {2.5, 2.0, 0.5, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0} - }, -}; - -std::vector dist_R_R(const std::vector& R) { - // tabulate dRR[I,J] = || R[I] - R[J] || - size_t nR = R.size(); - std::vector dRR(nR*nR, 0.0); - for (size_t I = 0; I < nR; I++) { - for (size_t J = I + 1; J < nR; J++) { - double d = norm(R[I] - R[J]); - dRR[I*nR + J] = d; - dRR[J*nR + I] = d; - } - } - return dRR; -} - -class PartitionTest: public ::testing::Test { -protected: - PartitionTest(); - - // grid & weight for one-center integration - std::vector r; - std::vector w; - - const double tol = 1e-5; -}; - -PartitionTest::PartitionTest() { - // angular grid & weight - std::vector r_ang, w_ang; - int lmax = 25; - Grid::Angular::delley(lmax, r_ang, w_ang); - - // radial grid & weight - std::vector r_rad, w_rad; - int nrad = 60; - int Rcut = 7.0; - int mult = 2; - Grid::Radial::baker(nrad, Rcut, r_rad, w_rad, mult); - - // complete grid & weight for one-center integration - size_t ngrid = w_rad.size() * w_ang.size(); - r.resize(3*ngrid); - w.resize(ngrid); - - size_t ir = 0; - for (size_t i = 0; i < w_rad.size(); i++) { - for (size_t j = 0; j < w_ang.size(); j++) { - r[3*ir] = r_rad[i] * r_ang[3*j]; - r[3*ir+1] = r_rad[i] * r_ang[3*j+1]; - r[3*ir+2] = r_rad[i] * r_ang[3*j+2]; - w[ir] = w_rad[i] * w_ang[j] * 4.0 * PI; - ++ir; - } - } -} - - -TEST_F(PartitionTest, Becke) { - dur = dur.zero(); - for (const Param& param : test_params) { - double val = 0.0; - double val_ref = ref(param.a, param.n); - - // tabulate || R[I] - R[J] || - std::vector dRR(dist_R_R(param.R)); - - // all centers are involved - size_t nR = param.R.size(); - std::vector iR(nR); - std::iota(iR.begin(), iR.end(), 0); - - std::random_device rd; - std::mt19937 g(rd()); - std::shuffle(iR.begin(), iR.end(), g); - - for (size_t I = 0; I < nR; ++I) { // for each center - for (size_t i = 0; i < w.size(); i++) { - Vec3 ri = Vec3{r[3*i], r[3*i+1], r[3*i+2]} + param.R[I]; - - // tabulate || r - R[J] || - std::vector drR(nR); - for (size_t J = 0; J < nR; ++J) { - drR[J] = norm(ri - param.R[J]); - } - - // partition weight for this grid point - start = iclock::now(); - double w_part = Grid::Partition::w_becke( - drR.size(), drR.data(), dRR.data(), - iR.size(), iR.data(), I - ); - dur += iclock::now() - start; - - val += w_part * w[i] * func(ri, param.R, param.a, param.n); - } - } - - EXPECT_NEAR(val, val_ref, tol); - } - printf("time elapsed = %8.3e seconds\n", dur.count()); -} - - -TEST_F(PartitionTest, Stratmann) { - dur = dur.zero(); - - for (const Param& param : test_params) { - double val = 0.0; - double val_ref = ref(param.a, param.n); - - // tabulate || R[I] - R[J] || - std::vector dRR(dist_R_R(param.R)); - - // all centers are involved - size_t nR = param.R.size(); - std::vector iR(nR); - std::iota(iR.begin(), iR.end(), 0); - - // radii of exclusive zone - std::vector drR_thr(nR); - for (size_t I = 0; I < nR; ++I) { - double dRRmin = 1e100; - for (size_t J = 0; J < nR; ++J) { - if (J != I) { - dRRmin = std::min(dRRmin, dRR[I*nR + J]); - } - } - drR_thr[I] = 0.5 * (1.0 - Grid::Partition::stratmann_a) * dRRmin; - } - - for (size_t I = 0; I < nR; ++I) { // for each center - for (size_t i = 0; i < w.size(); i++) { - Vec3 ri = Vec3{r[3*i], r[3*i+1], r[3*i+2]} + param.R[I]; - - // tabulate || r - R[J] || - std::vector drR(nR); - for (size_t J = 0; J < nR; ++J) { - drR[J] = norm(ri - param.R[J]); - } - - // partition weight for this grid point - start = iclock::now(); - double w_part = Grid::Partition::w_stratmann( - drR.size(), drR.data(), dRR.data(), drR_thr.data(), - iR.size(), iR.data(), I - ); - dur += iclock::now() - start; - - val += w_part * w[i] * func(ri, param.R, param.a, param.n); - } - } - - EXPECT_NEAR(val, val_ref, tol); - } - printf("time elapsed = %8.3e seconds\n", dur.count()); -} - - -int main(int argc, char** argv) -{ -#ifdef __MPI - MPI_Init(&argc, &argv); -#endif - - testing::InitGoogleTest(&argc, argv); - int result = RUN_ALL_TESTS(); - -#ifdef __MPI - MPI_Finalize(); -#endif - - return result; -} diff --git a/source/module_base/grid/test/test_radial.cpp b/source/module_base/grid/test/test_radial.cpp deleted file mode 100644 index 6cdd4c4841..0000000000 --- a/source/module_base/grid/test/test_radial.cpp +++ /dev/null @@ -1,136 +0,0 @@ -#include "module_base/grid/radial.h" - -#include "gtest/gtest.h" -#include -#include -#ifdef __MPI -#include -#endif - -using namespace Grid::Radial; -using Func_t = std::function; - -/** - * This test briefly checks various radial quadrature schemes by comparing - * their numerical results with analytical values on a few simple functions. - * - * The number of grid points and scaling factor are not carefully selected - * and the test is not exhaustive. It is just a sanity check. - * - */ - -const double pi = std::acos(-1.0); - -// test functions f(r) and their analytical integrals -// -// / inf 2 -// | dr r f(r) -// / 0 -// -std::vector> test_func_ref = { - { - [](double r) { - return std::exp(-0.3 * r * r) + std::exp(-3.0 * r * r); - }, - 0.25 * std::sqrt(pi) * (std::pow(0.3, -1.5) + std::pow(3.0, -1.5)) - }, - { - [](double r) { - return r * (std::exp(-0.3 * r * r) + std::exp(-3.0 * r * r)); - }, - 0.5 / (0.3 * 0.3) + 0.5 / (3.0 * 3.0) - }, - { - [](double r) { - return r * r * (std::exp(-0.3 * r * r) + std::exp(-3.0 * r * r)); - }, - 0.375 * std::sqrt(pi) * (std::pow(0.3, -2.5) + std::pow(3.0, -2.5)) - }, -}; - - -double quadrature(const Func_t& f, int n, double* r, double* w) { - double res = 0.0; - for (int i = 0; i < n; i++) { - res += w[i] * f(r[i]); - } - return res; -} - - -TEST(RadialTest, Baker) { - // R should be large enough to cover the range of the function. - // For mult = 1, R is the cutoff radius; for mult > 1, there - // are (mult - 1) grid points extend beyond R. - int nbase = 20; - int mult = 2; - double R = 7.0; - std::vector r, w; - baker(nbase, R, r, w, mult); - - EXPECT_EQ(r.size(), (nbase + 1) * mult - 1); - - for (auto& t : test_func_ref) { - double res = quadrature(t.first, r.size(), r.data(), w.data()); - EXPECT_NEAR(res, t.second, 1.0e-6); - } -} - - -TEST(RadialTest, Murray) { - int n = 40; - double R = 7.0; - std::vector r(n), w(n); - murray(n, R, r.data(), w.data()); - - for (auto& t : test_func_ref) { - double res = quadrature(t.first, r.size(), r.data(), w.data()); - EXPECT_NEAR(res, t.second, 1.0e-6); - } -} - - -TEST(RadialTest, Treutler) { - int n = 40; - double R = 7.0; - std::vector r(n), w(n); - - for (auto alpha : {0.0, 0.6, 1.0}) { - treutler_m4(n, R, r.data(), w.data(), alpha); - - for (auto& t : test_func_ref) { - double res = quadrature(t.first, r.size(), r.data(), w.data()); - EXPECT_NEAR(res, t.second, 1.0e-6); - } - } -} - - -TEST(RadialTest, Mura) { - int n = 40; - double R = 7.0; - std::vector r(n), w(n); - mura(n, R, r.data(), w.data()); - - for (auto& t : test_func_ref) { - double res = quadrature(t.first, r.size(), r.data(), w.data()); - EXPECT_NEAR(res, t.second, 1.0e-6); - } -} - - -int main(int argc, char** argv) -{ -#ifdef __MPI - MPI_Init(&argc, &argv); -#endif - - testing::InitGoogleTest(&argc, argv); - int result = RUN_ALL_TESTS(); - -#ifdef __MPI - MPI_Finalize(); -#endif - - return result; -} diff --git a/source/module_base/intarray.cpp b/source/module_base/intarray.cpp deleted file mode 100644 index a2e3dcce4d..0000000000 --- a/source/module_base/intarray.cpp +++ /dev/null @@ -1,169 +0,0 @@ -/******************************************* - * ESCP:Electro-Structure Calculate Package. - ********************************************/ -#include -#include "intarray.h" - -namespace ModuleBase -{ -int IntArray::arrayCount = 0; - -void IntArrayAlloc() -{ - std::cout << "\n Allocation error for IntArray " << std::endl; - exit(0); -} - -IntArray::IntArray(const int d1,const int d2) -{ - dim = 2; - bound1 = (d1 <= 0) ? 1 : d1; - bound2 = (d2 <= 0) ? 1 : d2; - bound3 = bound4 = bound5 = bound6 = 0; - size = bound1 * bound2; - ptr = new int[size];zero_out(); - assert( ptr != nullptr); - ++arrayCount; -} - -IntArray::IntArray(const int d1,const int d2,const int d3) -{ - dim = 3; - bound1 = (d1 <= 0) ? 1 : d1; - bound2 = (d2 <= 0) ? 1 : d2; - bound3 = (d3 <= 0) ? 1 : d3; - bound4 = bound5 = bound6 = 0; - //set_new_handler(IntArrayAlloc); - size = bound1 * bound2 * bound3 ; //* sizeof(float); - ptr = new int[size];zero_out(); - assert(ptr != nullptr); - ++arrayCount; -} - -IntArray::IntArray(const int d1,const int d2,const int d3,const int d4) -{ - dim = 4; - bound1 = (d1 <= 0) ? 1 : d1; - bound2 = (d2 <= 0) ? 1 : d2; - bound3 = (d3 <= 0) ? 1 : d3; - bound4 = (d4 <= 0) ? 1 : d4; - bound5 = bound6 = 0; - //set_new_handler(IntArrayAlloc); - size = bound1 * bound2 * bound3 * bound4 ; //* sizeof(float); - ptr = new int[size];zero_out(); - assert(ptr != nullptr); - ++arrayCount; -} - -IntArray::IntArray(const int d1,const int d2,const int d3, - const int d4,const int d5) -{ - dim = 5; - bound1 = (d1 <= 0) ? 1 : d1; - bound2 = (d2 <= 0) ? 1 : d2; - bound3 = (d3 <= 0) ? 1 : d3; - bound4 = (d4 <= 0) ? 1 : d4; - bound5 = (d5 <= 0) ? 1 : d5; - //set_new_handler(IntArrayAlloc); - size = bound1 * bound2 * bound3 * bound4 * bound5; - ptr = new int[size];zero_out(); - assert(ptr != nullptr); - ++arrayCount; -} - -IntArray::IntArray(const int d1,const int d2,const int d3, - const int d4,const int d5,const int d6) -{ - dim = 6; - bound1 = (d1 <= 0) ? 1 : d1; - bound2 = (d2 <= 0) ? 1 : d2; - bound3 = (d3 <= 0) ? 1 : d3; - bound4 = (d4 <= 0) ? 1 : d4; - bound5 = (d5 <= 0) ? 1 : d5; - bound6 = (d6 <= 0) ? 1 : d6; - //set_new_handler(IntArrayAlloc); - size = bound1 * bound2 * bound3 * bound4 * bound5 * bound6; - ptr = new int[size];zero_out(); - assert(ptr != nullptr); - ++arrayCount; -} - -//******************************** -// Destructor for class IntArray -//******************************** -IntArray ::~IntArray() -{ - freemem(); -} - -void IntArray::freemem() -{ - if(ptr!= nullptr) - { - delete [] ptr; - ptr = nullptr; - } -} - -void IntArray::create(const int d1,const int d2,const int d3,const int d4,const int d5,const int d6) -{ - size = d1 * d2 * d3 * d4 * d5 * d6;assert(size>0); - dim = 6; - bound1 = d1;bound2 = d2;bound3 = d3;bound4 = d4;bound5 = d5;bound6 = d6; - delete[] ptr; ptr = new int[size]; - assert(ptr != nullptr);zero_out(); -} - -void IntArray::create(const int d1,const int d2,const int d3,const int d4,const int d5) -{ - size = d1 * d2 * d3 * d4 * d5;assert(size>0); - dim = 5; - bound1 = d1;bound2 = d2;bound3 = d3;bound4 = d4;bound5 = d5; - delete[] ptr; ptr = new int[size]; - assert(ptr != nullptr);zero_out(); -} - -void IntArray::create(const int d1,const int d2,const int d3,const int d4) -{ - size = d1 * d2 * d3 * d4;assert(size>0); - dim = 4; - bound1 = d1;bound2 = d2;bound3 = d3;bound4 = d4; - delete[] ptr; ptr = new int[size]; - assert(ptr != nullptr);zero_out(); -} - -void IntArray::create(const int d1,const int d2,const int d3) -{ - size = d1 * d2 * d3;assert(size>0); - dim = 3; - bound1 = d1;bound2 = d2;bound3 = d3;bound4 = 1; - delete [] ptr;ptr = new int[size]; - assert(ptr != nullptr);zero_out(); -} - -void IntArray::create(const int d1, const int d2) -{ - size = d1 * d2;assert(size>0); - dim = 2; - bound1 = d1;bound2 = d2;bound3 = bound4 = 1; - delete[] ptr;ptr = new int[size]; - assert(ptr != nullptr );zero_out(); -} - -//**************************** -// zeroes out the whole array -//**************************** -void IntArray::zero_out() -{ - if (size <= 0) - { - return; - } - for (int i = 0;i < size; i++) - { - ptr[i] = 0; - } - return; -} - -} \ No newline at end of file diff --git a/source/module_base/intarray.h b/source/module_base/intarray.h deleted file mode 100644 index 96996b5b22..0000000000 --- a/source/module_base/intarray.h +++ /dev/null @@ -1,236 +0,0 @@ -/******************************************* - * ESCP:Electro-Structure Calculate Package. - ********************************************/ - -#ifndef INTARRAY_H -#define INTARRAY_H - -#include -#include -#include -#include - -namespace ModuleBase -{ -/** - * @brief Integer array - * - */ -class IntArray -{ - public: - int *ptr; - - /** - * @brief Construct a new Int Array object - * - * @param d1 The first dimension size - * @param d2 The second dimension size - */ - IntArray(const int d1 = 1, const int d2 = 1); - IntArray(const int d1, const int d2, const int d3); - IntArray(const int d1, const int d2, const int d3, const int d4); - IntArray(const int d1, const int d2, const int d3, const int d4, const int d5); - IntArray(const int d1, const int d2, const int d3, const int d4, const int d5, const int d6); - - ~IntArray(); - - /** - * @brief Create integer arrays - * - * @param[in] d1 - * @param[in] d2 - */ - void create(const int d1, const int d2); - void create(const int d1, const int d2, const int d3); - void create(const int d1, const int d2, const int d3, const int d4); - void create(const int d1, const int d2, const int d3, const int d4, const int d5); - void create(const int d1, const int d2, const int d3, const int d4, const int d5, const int d6); - - /** - * @brief Equal an IntArray to another one - * - * @param right - * @return const IntArray& - */ - const IntArray &operator=(const IntArray &right) - { - assert( this->size == right.size ); - for (int i = 0;i < size;i++) ptr[i] = right.ptr[i]; - return *this;// enables x = y = z; - }; - - /** - * @brief Equal all elements of an IntArray to an - * integer - * - * @param right - * @return const IntArray& - */ - const IntArray &operator=(const int &right) - { - for (int i = 0;i < size;i++) ptr[i] = right; - return *this;// enables x = y = z; - }; - - /** - * @brief Access elements by using operator "()" - * - * @param d1 - * @param d2 - * @return int& - */ - int &operator()(const int d1, const int d2) - { - assert( d1 < bound1 ); - assert( d2 < bound2 ); - return ptr[ d1 * bound2 + d2 ]; - }; - int &operator()(const int d1, const int d2, const int d3) - { - assert( d1 < bound1 ); - assert( d2 < bound2 ); - assert( d3 < bound3 ); - return ptr[ (d1 * bound2 + d2) * bound3 + d3 ]; - }; - int &operator()(const int d1, const int d2, const int d3, const int d4) - { - assert( d1 < bound1 ); - assert( d2 < bound2 ); - assert( d3 < bound3 ); - assert( d4 < bound4 ); - return ptr[ ((d1 * bound2 + d2) * bound3 + d3) * bound4 + d4 ]; - }; - int &operator()(const int d1, const int d2, const int d3, const int d4, const int d5) - { - assert( d1 < bound1 ); - assert( d2 < bound2 ); - assert( d3 < bound3 ); - assert( d4 < bound4 ); - assert( d5 < bound5 ); - return ptr[ (((d1 * bound2 + d2) * bound3 + d3) * bound4 + d4) * bound5 + d5 ]; - }; - int &operator()(const int d1, const int d2, const int d3, const int d4, const int d5, const int d6) - { - assert( d1 < bound1 ); - assert( d2 < bound2 ); - assert( d3 < bound3 ); - assert( d4 < bound4 ); - assert( d5 < bound5 ); - assert( d6 < bound6 ); - return ptr[ ((((d1 * bound2 + d2) * bound3 + d3) * bound4 + d4) * bound5 + d5) * bound6 + d6 ]; - }; - - /** - * @brief Access elements by using "()" through pointer - * without changing its elements - * - * @param d1 - * @param d2 - * @return const int& - */ - const int &operator()(const int d1, const int d2) const - { - assert( d1 < bound1 ); - assert( d2 < bound2 ); - return ptr[ d1 * bound2 + d2 ]; - }; - const int &operator()(const int d1, const int d2, const int d3) const - { - assert( d1 < bound1 ); - assert( d2 < bound2 ); - assert( d3 < bound3 ); - return ptr[ (d1 * bound2 + d2) * bound3 + d3 ]; - }; - const int &operator()(const int d1, const int d2, const int d3, const int d4) const - { - assert( d1 < bound1 ); - assert( d2 < bound2 ); - assert( d3 < bound3 ); - assert( d4 < bound4 ); - return ptr[ ((d1 * bound2 + d2) * bound3 + d3) * bound4 + d4 ]; - }; - const int &operator()(const int d1, const int d2, const int d3, const int d4, const int d5) const - { - assert( d1 < bound1 ); - assert( d2 < bound2 ); - assert( d3 < bound3 ); - assert( d4 < bound4 ); - assert( d5 < bound5 ); - return ptr[ (((d1 * bound2 + d2) * bound3 + d3) * bound4 + d4) * bound5 + d5 ]; - }; - const int &operator()(const int d1, const int d2, const int d3, const int d4, const int d5, const int d6) const - { - assert( d1 < bound1 ); - assert( d2 < bound2 ); - assert( d3 < bound3 ); - assert( d4 < bound4 ); - assert( d5 < bound5 ); - assert( d6 < bound6 ); - return ptr[ ((((d1 * bound2 + d2) * bound3 + d3) * bound4 + d4) * bound5 + d5) * bound6 + d6 ]; - }; - - /** - * @brief Set all elements of an IntArray to zero - * - */ - void zero_out(void); - - int getSize() const - { - return size; - } - int getDim() const - { - return dim; - } - int getBound1() const - { - return bound1; - } - int getBound2() const - { - return bound2; - } - int getBound3() const - { - return bound3; - } - int getBound4() const - { - return bound4; - } - int getBound5() const - { - return bound5; - } - int getBound6() const - { - return bound6; - } - - /** - * @brief Get the Array Count object - * - * @return int - */ - static int getArrayCount(void) - { - return arrayCount; - } - - private: - int size=0; - int dim=0; - int bound1=0; - int bound2=0; - int bound3=0; - int bound4=0; - int bound5=0; - int bound6=0; - static int arrayCount; - void freemem(); -}; -} // namespace ModuleBase - -#endif // IntArray class diff --git a/source/module_base/inverse_matrix.cpp b/source/module_base/inverse_matrix.cpp deleted file mode 100644 index 4e3128f378..0000000000 --- a/source/module_base/inverse_matrix.cpp +++ /dev/null @@ -1,109 +0,0 @@ -#include "inverse_matrix.h" -#include "tool_quit.h" -#include "lapack_connector.h" -#include "timer.h" -#include "complexmatrix.h" - -namespace ModuleBase -{ - -Inverse_Matrix_Complex::Inverse_Matrix_Complex() -{ - allocate=false; -} -Inverse_Matrix_Complex::~Inverse_Matrix_Complex() -{ - if(allocate) - { - delete[] e; //mohan fix bug 2012-04-02 - delete[] work2; - delete[] rwork; - allocate=false; - } -} - -void Inverse_Matrix_Complex::init(const int &dim_in) -{ -// GlobalV::ofs_running << " allocate=" << allocate << std::endl; - if(allocate) - { - delete[] e; //mohan fix bug 2012-04-02 - delete[] work2; - delete[] rwork; - allocate=false; - } - - this->dim = dim_in; - - assert(dim>0); - this->e = new double[dim]; - this->lwork = 2*dim; - - assert(lwork>0); - this->work2 = new std::complex[lwork]; - - assert(3*dim-2>0); - this->rwork = new double[3*dim-2]; - this->info = 0; - this->A.create(dim, dim); - this->EA.create(dim, dim); - - this->allocate = true; - - return; -} - - -void Inverse_Matrix_Complex::using_zheev( const ModuleBase::ComplexMatrix &Sin, ModuleBase::ComplexMatrix &Sout) -{ - ModuleBase::timer::tick("Inverse","using_zheev"); - this->A = Sin; - - LapackConnector::zheev('V', 'U', dim, this->A, dim, e, work2, lwork, rwork, &info); - - for(int i=0; iA(j,i) ) / e[i] ; - } - } - - Sout = this->A * this->EA; - ModuleBase::timer::tick("Inverse","using_zheev"); - return; -} - -void Inverse_Matrix_Real(const int dim, const double* in, double* out) -{ - int info = 0; - int lda = dim; - int lwork = 64 * dim; - int* ipiv = new int[dim]; - double* work = new double[lwork]; - - for (int i = 0; i < dim; i++) - { - for (int j = 0; j < dim; j++) - { - out[i * dim + j] = in[i * dim + j]; - } - } - - dgetrf_(&dim, &dim, out, &lda, ipiv, &info); - if (info != 0) - { - std::cout << "ERROR: LAPACK dgetrf error, info = " << info << std::endl; - exit(1); - } - dgetri_(&dim, out, &lda, ipiv, work, &lwork, &info); - if (info != 0) - { - std::cout << "ERROR: LAPACK dgetri error, info = " << info << std::endl; - exit(1); - } - - delete[] ipiv; - delete[] work; -} -} \ No newline at end of file diff --git a/source/module_base/inverse_matrix.h b/source/module_base/inverse_matrix.h deleted file mode 100644 index d49e109e15..0000000000 --- a/source/module_base/inverse_matrix.h +++ /dev/null @@ -1,44 +0,0 @@ -#ifndef INVERSE_MATRIX_H -#define INVERSE_MATRIX_H - -#include "global_function.h" -#include "global_variable.h" -#include "complexmatrix.h" -namespace ModuleBase -{ - -class Inverse_Matrix_Complex -{ - public: - - Inverse_Matrix_Complex(); - ~Inverse_Matrix_Complex(); - - ModuleBase::ComplexMatrix A; - - void using_zheev(const ModuleBase::ComplexMatrix &in, ModuleBase::ComplexMatrix &out); - void init( const int &dim_in); - - private: - int dim=0; - double *e=nullptr; - int lwork=0; - std::complex *work2=nullptr; - double* rwork=nullptr; - int info=0; - bool allocate=false; //mohan add 2012-04-02 - - ModuleBase::ComplexMatrix EA; -}; - -/** - * @brief computes the inverse of a dim*dim real matrix "in" using LAPACK routines - * "out" contains the inverse on output; "in" is unchanged - * - * @param dim [in] dimension of the matrix - * @param in [in] input matrix - * @param out [out] output matrix - */ -void Inverse_Matrix_Real(const int dim, const double* in, double* out); -} -#endif diff --git a/source/module_base/kernels/cuda/math_kernel_op.cu b/source/module_base/kernels/cuda/math_kernel_op.cu deleted file mode 100644 index 3a42767925..0000000000 --- a/source/module_base/kernels/cuda/math_kernel_op.cu +++ /dev/null @@ -1,447 +0,0 @@ -#include "module_base/module_device/memory_op.h" -#include "module_base/kernels/math_kernel_op.h" -#include "module_psi/psi.h" -#include "module_base/tool_quit.h" - -#include -#include -#include -#include -#include -namespace ModuleBase { -template -struct GetTypeThrust { - using type = T; -}; - -template <> -struct GetTypeThrust> { - using type = thrust::complex; /**< The return type specialization for std::complex. */ -}; - -template <> -struct GetTypeThrust> { - using type = thrust::complex; /**< The return type specialization for std::complex. */ -}; - -static cublasHandle_t cublas_handle = nullptr; - -void xdot_wrapper(const int &n, const float * x, const int &incx, const float * y, const int &incy, float &result) { - cublasErrcheck(cublasSdot(cublas_handle, n, x, incx, y, incy, &result)); -} - -void xdot_wrapper(const int &n, const double * x, const int &incx, const double * y, const int &incy, double &result) { - cublasErrcheck(cublasDdot(cublas_handle, n, x, incx, y, incy, &result)); -} - -void createGpuBlasHandle(){ - if (cublas_handle == nullptr) { - cublasErrcheck(cublasCreate(&cublas_handle)); - } -} - -void destoryBLAShandle(){ - if (cublas_handle != nullptr) { - cublasErrcheck(cublasDestroy(cublas_handle)); - cublas_handle = nullptr; - } -} - -// template -// __forceinline__ __device__ void warp_reduce(FPTYPE& val) { -// for (int offset = 16; offset > 0; offset >>= 1) -// val += __shfl_down_sync(full_mask, val, offset); -// } -template <> -void scal_op::operator()(const int& N, - const std::complex* alpha, - std::complex* X, - const int& incx) -{ - cublasErrcheck(cublasCscal(cublas_handle, N, (float2*)alpha, (float2*)X, incx)); -} - -template <> -void scal_op::operator()(const int& N, - const std::complex* alpha, - std::complex* X, - const int& incx) -{ - cublasErrcheck(cublasZscal(cublas_handle, N, (double2*)alpha, (double2*)X, incx)); -} - -template <> -void axpy_op::operator()(const int& N, - const double* alpha, - const double* X, - const int& incX, - double* Y, - const int& incY) -{ - cublasErrcheck(cublasDaxpy(cublas_handle, N, alpha, X, incX, Y, incY)); -} - -template <> -void axpy_op, base_device::DEVICE_GPU>::operator()(const int& N, - const std::complex* alpha, - const std::complex* X, - const int& incX, - std::complex* Y, - const int& incY) -{ - cublasErrcheck(cublasCaxpy(cublas_handle, N, (float2*)alpha, (float2*)X, incX, (float2*)Y, incY)); -} - -template <> -void axpy_op, base_device::DEVICE_GPU>::operator()(const int& N, - const std::complex* alpha, - const std::complex* X, - const int& incX, - std::complex* Y, - const int& incY) -{ - cublasErrcheck(cublasZaxpy(cublas_handle, N, (double2*)alpha, (double2*)X, incX, (double2*)Y, incY)); -} - - -template -__global__ void matrix_transpose_kernel( - const int row, - const int col, - const T* in, - T* out) -{ - int i = blockIdx.x * blockDim.x + threadIdx.x; - if (i < row) - { - for (int j = 0; j < col; j++) - { - out[j * row + i] = in[i * col + j]; - } - } -} - -template -__global__ void matrix_copy_kernel(const int n1, const int n2, const T* A, const int LDA, T* B, const int LDB) -{ - const int i = blockIdx.x * blockDim.x + threadIdx.x; - const int j = blockIdx.y * blockDim.y + threadIdx.y; - - if (i < n1 && j < n2) - { - B[i * LDB + j] = A[i * LDA + j]; - } -} - -cublasOperation_t judge_trans_op(bool is_complex, const char& trans, const char* name) -{ - if (trans == 'N') - { - return CUBLAS_OP_N; - } - else if(trans == 'T') - { - return CUBLAS_OP_T; - } - else if(is_complex && trans == 'C') - { - return CUBLAS_OP_C; - } - else - { - ModuleBase::WARNING_QUIT(name, std::string("Unknown trans type ") + trans + std::string(" !")); - } -} - -template <> -void gemv_op::operator()(const char& trans, - const int& m, - const int& n, - const double* alpha, - const double* A, - const int& lda, - const double* X, - const int& incx, - const double* beta, - double* Y, - const int& incy) -{ - cublasOperation_t cutrans = judge_trans_op(false, trans, "gemv_op"); - cublasErrcheck(cublasDgemv(cublas_handle, cutrans, m, n, alpha, A, lda, X, incx, beta, Y, incx)); -} - -template <> -void gemv_op, base_device::DEVICE_GPU>::operator()(const char& trans, - const int& m, - const int& n, - const std::complex* alpha_in, - const std::complex* A, - const int& lda, - const std::complex* X, - const int& incx, - const std::complex* beta_in, - std::complex* Y, - const int& incy) -{ - cublasOperation_t cutrans = judge_trans_op(true, trans, "gemv_op"); - cuFloatComplex alpha = make_cuFloatComplex(alpha_in->real(), alpha_in->imag()); - cuFloatComplex beta = make_cuFloatComplex(beta_in->real(), beta_in->imag()); - cublasErrcheck(cublasCgemv(cublas_handle, cutrans, m, n, &alpha, (cuFloatComplex*)A, lda, (cuFloatComplex*)X, incx, &beta, (cuFloatComplex*)Y, incx)); -} - -template <> -void gemv_op, base_device::DEVICE_GPU>::operator()(const char& trans, - const int& m, - const int& n, - const std::complex* alpha_in, - const std::complex* A, - const int& lda, - const std::complex* X, - const int& incx, - const std::complex* beta_in, - std::complex* Y, - const int& incy) -{ - cublasOperation_t cutrans = judge_trans_op(true, trans, "gemv_op"); - cuDoubleComplex alpha = make_cuDoubleComplex(alpha_in->real(), alpha_in->imag()); - cuDoubleComplex beta = make_cuDoubleComplex(beta_in->real(), beta_in->imag()); - // icpc and nvcc have some compatible problems - // We must use cuDoubleComplex instead of converting std::complex* to cuDoubleComplex* - cublasErrcheck(cublasZgemv(cublas_handle, cutrans, m, n, &alpha, (cuDoubleComplex*)A, lda, (cuDoubleComplex*)X, incx, &beta, (cuDoubleComplex*)Y, incx)); -} - -template <> -void gemm_op::operator()(const char& transa, - const char& transb, - const int& m, - const int& n, - const int& k, - const float* alpha, - const float* a, - const int& lda, - const float* b, - const int& ldb, - const float* beta, - float* c, - const int& ldc) -{ - cublasOperation_t cutransA = judge_trans_op(false, transa, "gemm_op"); - cublasOperation_t cutransB = judge_trans_op(false, transb, "gemm_op"); - cublasErrcheck(cublasSgemm(cublas_handle, cutransA, cutransB, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc)); -} - -template <> -void gemm_op::operator()(const char& transa, - const char& transb, - const int& m, - const int& n, - const int& k, - const double* alpha, - const double* a, - const int& lda, - const double* b, - const int& ldb, - const double* beta, - double* c, - const int& ldc) -{ - cublasOperation_t cutransA = judge_trans_op(false, transa, "gemm_op"); - cublasOperation_t cutransB = judge_trans_op(false, transb, "gemm_op"); - cublasErrcheck(cublasDgemm(cublas_handle, cutransA, cutransB, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc)); -} -template <> -void gemm_op, base_device::DEVICE_GPU>::operator()(const char& transa, - const char& transb, - const int& m, - const int& n, - const int& k, - const std::complex* alpha, - const std::complex* a, - const int& lda, - const std::complex* b, - const int& ldb, - const std::complex* beta, - std::complex* c, - const int& ldc) -{ - cublasOperation_t cutransA = judge_trans_op(true, transa, "gemm_op"); - cublasOperation_t cutransB = judge_trans_op(true, transb, "gemm_op"); - cublasErrcheck(cublasCgemm(cublas_handle, cutransA, cutransB, m, n ,k, (float2*)alpha, (float2*)a , lda, (float2*)b, ldb, (float2*)beta, (float2*)c, ldc)); -} - -template <> -void gemm_op, base_device::DEVICE_GPU>::operator()(const char& transa, - const char& transb, - const int& m, - const int& n, - const int& k, - const std::complex* alpha, - const std::complex* a, - const int& lda, - const std::complex* b, - const int& ldb, - const std::complex* beta, - std::complex* c, - const int& ldc) -{ - cublasOperation_t cutransA = judge_trans_op(true, transa, "gemm_op"); - cublasOperation_t cutransB = judge_trans_op(true, transb, "gemm_op"); - cublasErrcheck(cublasZgemm(cublas_handle, cutransA, cutransB, m, n ,k, (double2*)alpha, (double2*)a , lda, (double2*)b, ldb, (double2*)beta, (double2*)c, ldc)); -} - -template <> -void matrixTranspose_op::operator()(const int& row, - const int& col, - const double* input_matrix, - double* output_matrix) -{ - double* device_temp = nullptr; - base_device::memory::resize_memory_op()(device_temp, row * col); - - if (row == col) - { - double ONE = 1.0, ZERO = 0.0; - - // use 'geam' API todo transpose. - cublasErrcheck(cublasDgeam(cublas_handle, CUBLAS_OP_T, CUBLAS_OP_N, col, row, &ONE, input_matrix, col, &ZERO, input_matrix, col, device_temp, col)); - } - else - { - int thread = 1024; - int block = (row + col + thread - 1) / thread; - matrix_transpose_kernel <<>> (row, col, input_matrix, device_temp); - - cudaCheckOnDebug(); - } - - base_device::memory::synchronize_memory_op()( - output_matrix, - device_temp, - row * col); - - base_device::memory::delete_memory_op()(device_temp); -} - -template <> -void matrixTranspose_op, base_device::DEVICE_GPU>::operator()( - const int& row, - const int& col, - const std::complex* input_matrix, - std::complex* output_matrix) -{ - std::complex* device_temp = nullptr; - base_device::memory::resize_memory_op, base_device::DEVICE_GPU>()(device_temp, row * col); - - if (row == col) - { - double2 ONE, ZERO; - ONE.x = 1.0; - ONE.y = 0.0; - ZERO.x = ZERO.y = 0.0; - - // use 'geam' API todo transpose. - cublasErrcheck(cublasCgeam(cublas_handle, CUBLAS_OP_T, CUBLAS_OP_N, col, row, - reinterpret_cast(&ONE), (float2*)input_matrix, col, - reinterpret_cast(&ZERO), (float2*)input_matrix, col, (float2*)device_temp, col)); - } else - { - int thread = 1024; - int block = (row + col + thread - 1) / thread; - matrix_transpose_kernel> <<>> (row, col, (thrust::complex*)input_matrix, (thrust::complex*)device_temp); - - cudaCheckOnDebug(); - } - - base_device::memory::synchronize_memory_op, base_device::DEVICE_GPU, base_device::DEVICE_GPU>()( - output_matrix, - device_temp, - row * col); - - base_device::memory::delete_memory_op, base_device::DEVICE_GPU>()(device_temp); - - cudaCheckOnDebug(); - -} - -template <> -void matrixTranspose_op, base_device::DEVICE_GPU>::operator()( - const int& row, - const int& col, - const std::complex* input_matrix, - std::complex* output_matrix) -{ - std::complex* device_temp = nullptr; - base_device::memory::resize_memory_op, base_device::DEVICE_GPU>()(device_temp, row * col); - - if (row == col) - { - double2 ONE, ZERO; - ONE.x = 1.0; - ONE.y = 0.0; - ZERO.x = ZERO.y = 0.0; - - // use 'geam' API todo transpose. - cublasErrcheck(cublasZgeam(cublas_handle, CUBLAS_OP_T, CUBLAS_OP_N, col, row, &ONE, (double2*)input_matrix, col, &ZERO, (double2*)input_matrix, col, (double2*)device_temp, col)); - } else - { - int thread = 1024; - int block = (row + col + thread - 1) / thread; - matrix_transpose_kernel> <<>> (row, col, (thrust::complex*)input_matrix, (thrust::complex*)device_temp); - cudaCheckOnDebug(); - } - - base_device::memory::synchronize_memory_op, - base_device::DEVICE_GPU, - base_device::DEVICE_GPU>()(output_matrix, device_temp, row * col); - - base_device::memory::delete_memory_op, base_device::DEVICE_GPU>()(device_temp); -} - -template <> -void matrixCopy::operator()(const int& n1, - const int& n2, - const double* A, - const int& LDA, - double* B, - const int& LDB) -{ - const dim3 blockSize(16, 16); - const dim3 gridSize((n1 + blockSize.x - 1) / blockSize.x, (n2 + blockSize.y - 1) / blockSize.y); - matrix_copy_kernel <<>> (n1, n2, A, LDA, B, LDB); - cudaCheckOnDebug(); -} -template <> -void matrixCopy, base_device::DEVICE_GPU>::operator()(const int& n1, - const int& n2, - const std::complex* A, - const int& LDA, - std::complex* B, - const int& LDB) -{ - const dim3 blockSize(16, 16); - const dim3 gridSize((n1 + blockSize.x - 1) / blockSize.x, (n2 + blockSize.y - 1) / blockSize.y); - matrix_copy_kernel> <<>> (n1, n2, reinterpret_cast*>(A), LDA, reinterpret_cast*>(B), LDB); - cudaCheckOnDebug(); - -} -template <> -void matrixCopy, base_device::DEVICE_GPU>::operator()(const int& n1, - const int& n2, - const std::complex* A, - const int& LDA, - std::complex* B, - const int& LDB) -{ - const dim3 blockSize(16, 16); - const dim3 gridSize((n1 + blockSize.x - 1) / blockSize.x, (n2 + blockSize.y - 1) / blockSize.y); - matrix_copy_kernel> <<>> (n1, n2, reinterpret_cast*>(A), LDA, reinterpret_cast*>(B), LDB); - cudaCheckOnDebug(); -} - - -// Explicitly instantiate functors for the types of functor registered. - -template struct matrixCopy, base_device::DEVICE_GPU>; -template struct matrixCopy; -template struct matrixCopy, base_device::DEVICE_GPU>; -} // namespace ModuleBase diff --git a/source/module_base/kernels/cuda/math_kernel_op_vec.cu b/source/module_base/kernels/cuda/math_kernel_op_vec.cu deleted file mode 100644 index 182d4c54d9..0000000000 --- a/source/module_base/kernels/cuda/math_kernel_op_vec.cu +++ /dev/null @@ -1,391 +0,0 @@ -#include "module_base/kernels/math_kernel_op.h" - -#include -#include - -template <> -struct GetTypeReal> { - using type = float; /**< The return type specialization for std::complex. */ -}; -template <> -struct GetTypeReal> { - using type = double; /**< The return type specialization for std::complex. */ -}; -namespace ModuleBase -{ -const int thread_per_block = 256; -void xdot_wrapper(const int &n, const float * x, const int &incx, const float * y, const int &incy, float &result); -void xdot_wrapper(const int &n, const double * x, const int &incx, const double * y, const int &incy, double &result); - -// Define the CUDA kernel: -template -__global__ void vector_mul_real_kernel(const int size, - T* result, - const T* vector, - const typename GetTypeReal::type constant) -{ - int i = blockIdx.x * blockDim.x + threadIdx.x; - if (i < size) - { - result[i] = vector[i] * constant; - } -} - -template -__global__ void vector_mul_vector_kernel(const int size, - T* result, - const T* vector1, - const typename GetTypeReal::type* vector2, - const bool add) -{ - int i = blockIdx.x * blockDim.x + threadIdx.x; - if (i < size) - { - if (add) - { - result[i] += vector1[i] * vector2[i]; - } - else - { - result[i] = vector1[i] * vector2[i]; - } - } -} - -template -__global__ void vector_div_constant_kernel(const int size, - T* result, - const T* vector, - const typename GetTypeReal::type constant) -{ - int i = blockIdx.x * blockDim.x + threadIdx.x; - if (i < size) - { - result[i] = vector[i] / constant; - } -} - -template -__global__ void vector_div_vector_kernel(const int size, - T* result, - const T* vector1, - const typename GetTypeReal::type* vector2) -{ - int i = blockIdx.x * blockDim.x + threadIdx.x; - if (i < size) - { - result[i] = vector1[i] / vector2[i]; - } -} - -template -__global__ void constantvector_addORsub_constantVector_kernel(const int size, - T* result, - const T* vector1, - const Real constant1, - const T* vector2, - const Real constant2) -{ - int i = blockIdx.x * blockDim.x + threadIdx.x; - if (i < size) - { - result[i] = vector1[i] * constant1 + vector2[i] * constant2; - } -} - -// vector operator: result[i] = vector[i] * constant -template <> -void vector_mul_real_op::operator()(const int dim, - double* result, - const double* vector, - const double constant) -{ - // In small cases, 1024 threads per block will only utilize 17 blocks, much less than 40 - int thread = thread_per_block; - int block = (dim + thread - 1) / thread; - vector_mul_real_kernel<<>>(dim, result, vector, constant); - - cudaCheckOnDebug(); -} - -template -inline void vector_mul_real_wrapper(const int dim, - std::complex* result, - const std::complex* vector, - const FPTYPE constant) -{ - thrust::complex* result_tmp = reinterpret_cast*>(result); - const thrust::complex* vector_tmp = reinterpret_cast*>(vector); - - int thread = thread_per_block; - int block = (dim + thread - 1) / thread; - vector_mul_real_kernel><<>>(dim, result_tmp, vector_tmp, constant); - - cudaCheckOnDebug(); -} -template <> -void vector_mul_real_op, base_device::DEVICE_GPU>::operator()(const int dim, - std::complex* result, - const std::complex* vector, - const float constant) -{ - vector_mul_real_wrapper(dim, result, vector, constant); -} -template <> -void vector_mul_real_op, base_device::DEVICE_GPU>::operator()(const int dim, - std::complex* result, - const std::complex* vector, - const double constant) -{ - vector_mul_real_wrapper(dim, result, vector, constant); -} - -// vector operator: result[i] = vector[i] / constant -template <> -void vector_div_constant_op::operator()(const int& dim, - double* result, - const double* vector, - const double constant) -{ - // In small cases, 1024 threads per block will only utilize 17 blocks, much less than 40 - int thread = thread_per_block; - int block = (dim + thread - 1) / thread; - vector_div_constant_kernel<<>>(dim, result, vector, constant); - - cudaCheckOnDebug(); -} - -template -inline void vector_div_constant_wrapper(const int& dim, - std::complex* result, - const std::complex* vector, - const FPTYPE constant) -{ - thrust::complex* result_tmp = reinterpret_cast*>(result); - const thrust::complex* vector_tmp = reinterpret_cast*>(vector); - - int thread = thread_per_block; - int block = (dim + thread - 1) / thread; - vector_div_constant_kernel><<>>(dim, result_tmp, vector_tmp, constant); - - cudaCheckOnDebug(); -} - -template <> -void vector_div_constant_op, base_device::DEVICE_GPU>::operator()(const int& dim, - std::complex* result, - const std::complex* vector, - const float constant) -{ - vector_div_constant_wrapper(dim, result, vector, constant); -} - -template <> -void vector_div_constant_op, base_device::DEVICE_GPU>::operator()(const int& dim, - std::complex* result, - const std::complex* vector, - const double constant) -{ - vector_div_constant_wrapper(dim, result, vector, constant); -} - -// vector operator: result[i] = vector1[i](not complex) * vector2[i](not complex) -template <> -void vector_mul_vector_op::operator()(const int& dim, - double* result, - const double* vector1, - const double* vector2, - const bool& add) -{ - int thread = thread_per_block; - int block = (dim + thread - 1) / thread; - vector_mul_vector_kernel<<>>(dim, result, vector1, vector2, add); - - cudaCheckOnDebug(); -} -// vector operator: result[i] = vector1[i](complex) * vector2[i](not complex) -template -inline void vector_mul_vector_complex_wrapper(const int& dim, - std::complex* result, - const std::complex* vector1, - const FPTYPE* vector2, - const bool& add) -{ - thrust::complex* result_tmp = reinterpret_cast*>(result); - const thrust::complex* vector1_tmp = reinterpret_cast*>(vector1); - int thread = thread_per_block; - int block = (dim + thread - 1) / thread; - vector_mul_vector_kernel><<>>(dim, result_tmp, vector1_tmp, vector2, add); - - cudaCheckOnDebug(); -} -template <> -void vector_mul_vector_op, base_device::DEVICE_GPU>::operator()(const int& dim, - std::complex* result, - const std::complex* vector1, - const float* vector2, - const bool& add) -{ - vector_mul_vector_complex_wrapper(dim, result, vector1, vector2, add); -} -template <> -void vector_mul_vector_op, base_device::DEVICE_GPU>::operator()( - const int& dim, - std::complex* result, - const std::complex* vector1, - const double* vector2, - const bool& add) -{ - vector_mul_vector_complex_wrapper(dim, result, vector1, vector2, add); -} - -// vector operator: result[i] = vector1[i](not complex) / vector2[i](not complex) -template <> -void vector_div_vector_op::operator()(const int& dim, - double* result, - const double* vector1, - const double* vector2) -{ - int thread = thread_per_block; - int block = (dim + thread - 1) / thread; - vector_div_vector_kernel<<>>(dim, result, vector1, vector2); - - cudaCheckOnDebug(); -} -// vector operator: result[i] = vector1[i](complex) / vector2[i](not complex) -template -inline void vector_div_vector_complex_wrapper(const int& dim, - std::complex* result, - const std::complex* vector1, - const FPTYPE* vector2) -{ - thrust::complex* result_tmp = reinterpret_cast*>(result); - const thrust::complex* vector1_tmp = reinterpret_cast*>(vector1); - int thread = thread_per_block; - int block = (dim + thread - 1) / thread; - vector_div_vector_kernel><<>>(dim, result_tmp, vector1_tmp, vector2); - - cudaCheckOnDebug(); -} -template <> -void vector_div_vector_op, base_device::DEVICE_GPU>::operator()(const int& dim, - std::complex* result, - const std::complex* vector1, - const float* vector2) -{ - vector_div_vector_complex_wrapper(dim, result, vector1, vector2); -} -template <> -void vector_div_vector_op, base_device::DEVICE_GPU>::operator()( - const int& dim, - std::complex* result, - const std::complex* vector1, - const double* vector2) -{ - vector_div_vector_complex_wrapper(dim, result, vector1, vector2); -} - -// vector operator: result[i] = vector1[i] * constant1 + vector2[i] * constant2 -template -void vector_add_vector_op::operator()(const int& dim, - T* result, - const T* vector1, - const Real constant1, - const T* vector2, - const Real constant2) -{ - using Type = typename GetTypeThrust::type; - using Real = typename GetTypeReal::type; - - auto result_tmp = reinterpret_cast(result); - auto vector1_tmp = reinterpret_cast(vector1); - auto vector2_tmp = reinterpret_cast(vector2); - - int thread = thread_per_block; - int block = (dim + thread - 1) / thread; - constantvector_addORsub_constantVector_kernel - <<>>(dim, result_tmp, vector1_tmp, constant1, vector2_tmp, constant2); - - cudaCheckOnDebug(); -} - -template <> -double dot_real_op::operator()(const int& dim, - const double* psi_L, - const double* psi_R, - const bool reduce) -{ - double result = 0.0; - xdot_wrapper(dim, psi_L, 1, psi_R, 1, result); - if (reduce) - { - Parallel_Reduce::reduce_pool(result); - } - return result; -} -// for this implementation, please check -// https://thrust.github.io/doc/group__transformed__reductions_ga321192d85c5f510e52300ae762c7e995.html denghui modify -// 2022-10-03 Note that ddot_(2*dim,a,1,b,1) = REAL( zdotc_(dim,a,1,b,1) ) GPU specialization of actual computation. -template -inline FPTYPE dot_complex_wrapper(const int& dim, - const std::complex* psi_L, - const std::complex* psi_R, - const bool reduce) -{ - //<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< - // denghui modify 2022-10-07 - // Note that ddot_(2*dim,a,1,b,1) = REAL( zdotc_(dim,a,1,b,1) ) - const FPTYPE* pL = reinterpret_cast(psi_L); - const FPTYPE* pR = reinterpret_cast(psi_R); - FPTYPE result = 0.0; - xdot_wrapper(dim * 2, pL, 1, pR, 1, result); - if (reduce) - { - Parallel_Reduce::reduce_pool(result); - } - return result; -} - -template <> -float dot_real_op, base_device::DEVICE_GPU>::operator()(const int& dim, - const std::complex* psi_L, - const std::complex* psi_R, - const bool reduce) -{ - return dot_complex_wrapper(dim, psi_L, psi_R, reduce); -} -template <> -double dot_real_op, base_device::DEVICE_GPU>::operator()(const int& dim, - const std::complex* psi_L, - const std::complex* psi_R, - const bool reduce) -{ - return dot_complex_wrapper(dim, psi_L, psi_R, reduce); -} - -// Explicitly instantiate functors for the types of functor registered. -template struct vector_mul_real_op, base_device::DEVICE_GPU>; -template struct vector_mul_real_op; -template struct vector_mul_real_op, base_device::DEVICE_GPU>; - -template struct vector_div_constant_op, base_device::DEVICE_GPU>; -template struct vector_div_constant_op; -template struct vector_div_constant_op, base_device::DEVICE_GPU>; - -template struct vector_mul_vector_op; -template struct vector_mul_vector_op, base_device::DEVICE_GPU>; -template struct vector_mul_vector_op; -template struct vector_mul_vector_op, base_device::DEVICE_GPU>; -template struct vector_div_vector_op, base_device::DEVICE_GPU>; -template struct vector_div_vector_op; -template struct vector_div_vector_op, base_device::DEVICE_GPU>; - -template struct vector_add_vector_op; -template struct vector_add_vector_op, base_device::DEVICE_GPU>; -template struct vector_add_vector_op; -template struct vector_add_vector_op, base_device::DEVICE_GPU>; - -template struct dot_real_op, base_device::DEVICE_GPU>; -template struct dot_real_op; -template struct dot_real_op, base_device::DEVICE_GPU>; -} // namespace ModuleBase \ No newline at end of file diff --git a/source/module_base/kernels/cuda/math_ylm_op.cu b/source/module_base/kernels/cuda/math_ylm_op.cu deleted file mode 100644 index 390f22b93b..0000000000 --- a/source/module_base/kernels/cuda/math_ylm_op.cu +++ /dev/null @@ -1,157 +0,0 @@ -#include -#include "module_base/kernels/math_ylm_op.h" - -#include - -namespace ModuleBase { - -#define THREADS_PER_BLOCK 256 - -template -__device__ __inline__ -FPTYPE __fact(const int n) { - FPTYPE f = 1.0; - for (int i = n; i > 1; i--) { - f *= i; - } - return f; -} - -__device__ __inline__ -int __semi_fact(const int n) -{ - int semif = 1; - for (int i = n; i > 2; i -= 2) - { - semif *= i; - } - return semif; -} - -template -__global__ void cal_ylm_real( - const int ng, - const int lmax, - const FPTYPE SQRT2, - const FPTYPE PI, - const FPTYPE PI_HALF, - const FPTYPE FOUR_PI, - const FPTYPE SQRT_INVERSE_FOUR_PI, - const FPTYPE *g, - FPTYPE * p, - FPTYPE * ylm) -{ - int ig = blockIdx.x * blockDim.x + threadIdx.x; - if (ig >= ng) {return;} - - FPTYPE cost = 0.0, phi = 0.0; - //---------------------------------------------------------- - // EXPLAIN : if lmax = 1,only use Y00 , output result. - //---------------------------------------------------------- - if (lmax == 0) { - ylm[0 * ng + ig] = SQRT_INVERSE_FOUR_PI; - return; - } - //---------------------------------------------------------- - // LOCAL VARIABLES : - // NAME : cost = cos(theta),theta and phi are polar angles - // NAME : phi - //---------------------------------------------------------- - const FPTYPE gmod = sqrt(g[ig * 3 + 0] * g[ig * 3 + 0] + g[ig * 3 + 1] * g[ig * 3 + 1] + g[ig * 3 + 2] * g[ig * 3 + 2]); - cost = gmod < 1.0e-9 ? 0.0 : g[ig * 3 + 2] / gmod; - // beware the arc tan, it is defined modulo pi - if (g[ig * 3 + 0] > 1.0e-9) { - phi = atan(g[ig * 3 + 1] / g[ig * 3 + 0]); - } - else if (g[ig * 3 + 0] < -1.e-9) { - phi = atan(g[ig * 3 + 1] / g[ig * 3 + 0]) + PI; - } - else { - phi = PI_HALF * ((g[ig * 3 + 1] >= 0.0) ? 1.0 : -1.0); //HLX: modified on 10/13/2006 - } // end if - //========================================================== - // NAME : p(Legendre Polynomials) (0 <= m <= l) - //========================================================== - int lm = -1; - for (int l = 0; l <= lmax; l++) { - const FPTYPE c = sqrt((2 * l + 1) / FOUR_PI); - if (l == 0) { - p[0 * (lmax + 1) * ng + 0 * ng + ig] = 1.0; - } - else if (l == 1) { - p[0 * (lmax + 1) * ng + 1 * ng + ig] = cost; - FPTYPE var = (1.0 - cost * cost) > 0.0 ? (1.0 - cost * cost) : 0.0; - p[1 * (lmax + 1) * ng + 1 * ng + ig] = -sqrt(var); - } - else { - const int l1 = l - 1, - l2 = l - 2, - l3 = 2 * l - 1; - // recursion on l for P(:,l,m) - for (int m = 0; m <= l2; m++) { // do m = 0, l - 2//mohan modify 2007-10-13 - p[m * (lmax + 1) * ng + l * ng + ig] = - (cost * l3 * p[m * (lmax + 1) * ng + l1 * ng + ig] - - (l1 + m) * p[m * (lmax + 1) * ng + l2 * ng + ig]) / (l - m); - } // end do - p[l1 * (lmax + 1) * ng + l * ng + ig] = - cost * l3 * p[l1 * (lmax + 1) * ng + l1 * ng + ig]; - FPTYPE x2 = (1.0 - cost * cost) > 0.0 ? (1.0 - cost * cost) : 0.0; - p[l * (lmax + 1) * ng + l * ng + ig] = __semi_fact(l3) * pow(x2, static_cast(l) / 2.0);//mohan modify 2007-10-13 - if (l % 2 == 1) { - p[l * (lmax + 1) * ng + l * ng + ig] *= -1; - } - } // end if - - // Y_lm, m = 0 - ++lm; - ylm[lm * ng + ig] = c * p[0 * (lmax + 1) * ng + l * ng + ig]; - - for (int m = 1; m <= l; m++) { - // Y_lm, m > 0 - const FPTYPE same = - c * sqrt(__fact(l - m) / - __fact(l + m)) * SQRT2; - - ++lm; - ylm[lm * ng + ig] = same * p[m * (lmax + 1) * ng + l * ng + ig] * cos(m * phi); - - // Y_lm, m < 0 - ++lm; - ylm[lm * ng + ig] = same * p[m * (lmax + 1) * ng + l * ng + ig] * sin(m * phi); - } - }// end do -} - -template -void cal_ylm_real_op::operator()(const base_device::DEVICE_GPU* ctx, - const int& ng, - const int& lmax, - const FPTYPE& SQRT2, - const FPTYPE& PI, - const FPTYPE& PI_HALF, - const FPTYPE& FOUR_PI, - const FPTYPE& SQRT_INVERSE_FOUR_PI, - const FPTYPE* g, - FPTYPE* p, - FPTYPE* ylm) -{ - int block = (ng + THREADS_PER_BLOCK - 1) / THREADS_PER_BLOCK; - cal_ylm_real<<>>( - ng, - lmax, - SQRT2, - PI, - PI_HALF, - FOUR_PI, - SQRT_INVERSE_FOUR_PI, - g, - p, - ylm); - - cudaCheckOnDebug(); -} - -template struct cal_ylm_real_op; -template struct cal_ylm_real_op; - -} // namespace ModuleBase diff --git a/source/module_base/kernels/dsp/dsp_connector.cpp b/source/module_base/kernels/dsp/dsp_connector.cpp deleted file mode 100644 index a3c5f6d897..0000000000 --- a/source/module_base/kernels/dsp/dsp_connector.cpp +++ /dev/null @@ -1,335 +0,0 @@ -#include "dsp_connector.h" - -#include -#include - -extern "C" -{ -#define complex_double ignore_complex_double -#include // MTBLAS_TRANSPOSE etc -#undef complex_double -#include // gemm -} -namespace mtfunc -{ -void dspInitHandle(int id) -{ - mt_blas_init(id); - std::cout << " ** DSP inited on cluster " << id << " **" << std::endl; -} // Use this at the beginning of the program to start a dsp cluster - -void dspDestoryHandle(int id) -{ - hthread_dev_close(id); - std::cout << " ** DSP closed on cluster " << id << " **" << std::endl; -} // Close dsp cluster at the end - -MTBLAS_TRANSPOSE convertBLASTranspose(const char* blasTrans) -{ - switch (blasTrans[0]) - { - case 'N': - case 'n': - return MtblasNoTrans; - case 'T': - case 't': - return MtblasTrans; - case 'C': - case 'c': - return MtblasConjTrans; - default: - std::cout << "Invalid BLAS transpose parameter!! Use default instead." << std::endl; - return MtblasNoTrans; - } -} // Used to convert normal transpost char to mtblas transpose flag - -void* malloc_ht(size_t bytes, int cluster_id) -{ - // std::cout << "MALLOC " << cluster_id; - void* ptr = hthread_malloc((int)cluster_id, bytes, HT_MEM_RW); - // std::cout << ptr << " SUCCEED" << std::endl;; - return ptr; -} - -// Used to replace original malloc - -void free_ht(void* ptr) -{ - // std::cout << "FREE " << ptr; - hthread_free(ptr); - // std::cout << " FREE SUCCEED" << std::endl; -} - -// Used to replace original free - -void sgemm_mt_(const char* transa, - const char* transb, - const int* m, - const int* n, - const int* k, - const float* alpha, - const float* a, - const int* lda, - const float* b, - const int* ldb, - const float* beta, - float* c, - const int* ldc, - int cluster_id) -{ - mtblas_sgemm(MTBLAS_ORDER::MtblasColMajor, - convertBLASTranspose(transa), - convertBLASTranspose(transb), - *m, - *n, - *k, - *alpha, - a, - *lda, - b, - *ldb, - *beta, - c, - *ldc, - cluster_id); -} // zgemm that needn't malloc_ht or free_ht - -void dgemm_mt_(const char* transa, - const char* transb, - const int* m, - const int* n, - const int* k, - const double* alpha, - const double* a, - const int* lda, - const double* b, - const int* ldb, - const double* beta, - double* c, - const int* ldc, - int cluster_id) -{ - mtblas_dgemm(MTBLAS_ORDER::MtblasColMajor, - convertBLASTranspose(transa), - convertBLASTranspose(transb), - *m, - *n, - *k, - *alpha, - a, - *lda, - b, - *ldb, - *beta, - c, - *ldc, - cluster_id); -} // cgemm that needn't malloc_ht or free_ht - -void zgemm_mt_(const char* transa, - const char* transb, - const int* m, - const int* n, - const int* k, - const std::complex* alpha, - const std::complex* a, - const int* lda, - const std::complex* b, - const int* ldb, - const std::complex* beta, - std::complex* c, - const int* ldc, - int cluster_id) -{ - mtblas_zgemm(MTBLAS_ORDER::MtblasColMajor, - convertBLASTranspose(transa), - convertBLASTranspose(transb), - *m, - *n, - *k, - (const void*)alpha, - (const void*)a, - *lda, - (const void*)b, - *ldb, - (const void*)beta, - (void*)c, - *ldc, - cluster_id); -} // zgemm that needn't malloc_ht or free_ht - -void cgemm_mt_(const char* transa, - const char* transb, - const int* m, - const int* n, - const int* k, - const std::complex* alpha, - const std::complex* a, - const int* lda, - const std::complex* b, - const int* ldb, - const std::complex* beta, - std::complex* c, - const int* ldc, - int cluster_id) -{ - mtblas_cgemm(MTBLAS_ORDER::MtblasColMajor, - convertBLASTranspose(transa), - convertBLASTranspose(transb), - *m, - *n, - *k, - (const void*)alpha, - (const void*)a, - *lda, - (const void*)b, - *ldb, - (const void*)beta, - (void*)c, - *ldc, - cluster_id); -} // cgemm that needn't malloc_ht or free_ht - -// Used to replace original free - -void sgemm_mth_(const char* transa, - const char* transb, - const int* m, - const int* n, - const int* k, - const float* alpha, - const float* a, - const int* lda, - const float* b, - const int* ldb, - const float* beta, - float* c, - const int* ldc, - int cluster_id) -{ - mt_hthread_sgemm(MTBLAS_ORDER::MtblasColMajor, - convertBLASTranspose(transa), - convertBLASTranspose(transb), - *m, - *n, - *k, - *alpha, - a, - *lda, - b, - *ldb, - *beta, - c, - *ldc, - cluster_id); -} // zgemm that needn't malloc_ht or free_ht - -void dgemm_mth_(const char* transa, - const char* transb, - const int* m, - const int* n, - const int* k, - const double* alpha, - const double* a, - const int* lda, - const double* b, - const int* ldb, - const double* beta, - double* c, - const int* ldc, - int cluster_id) -{ - mt_hthread_dgemm(MTBLAS_ORDER::MtblasColMajor, - convertBLASTranspose(transa), - convertBLASTranspose(transb), - *m, - *n, - *k, - *alpha, - a, - *lda, - b, - *ldb, - *beta, - c, - *ldc, - cluster_id); -} // cgemm that needn't malloc_ht or free_ht - -void zgemm_mth_(const char* transa, - const char* transb, - const int* m, - const int* n, - const int* k, - const std::complex* alpha, - const std::complex* a, - const int* lda, - const std::complex* b, - const int* ldb, - const std::complex* beta, - std::complex* c, - const int* ldc, - int cluster_id) -{ - std::complex* alp = (std::complex*)malloc_ht(sizeof(std::complex), cluster_id); - *alp = *alpha; - std::complex* bet = (std::complex*)malloc_ht(sizeof(std::complex), cluster_id); - *bet = *beta; - mt_hthread_zgemm(MTBLAS_ORDER::MtblasColMajor, - convertBLASTranspose(transa), - convertBLASTranspose(transb), - *m, - *n, - *k, - alp, - a, - *lda, - b, - *ldb, - bet, - c, - *ldc, - cluster_id); - -} // zgemm that needn't malloc_ht or free_ht - -void cgemm_mth_(const char* transa, - const char* transb, - const int* m, - const int* n, - const int* k, - const std::complex* alpha, - const std::complex* a, - const int* lda, - const std::complex* b, - const int* ldb, - const std::complex* beta, - std::complex* c, - const int* ldc, - int cluster_id) -{ - std::complex* alp = (std::complex*)malloc_ht(sizeof(std::complex), cluster_id); - *alp = *alpha; - std::complex* bet = (std::complex*)malloc_ht(sizeof(std::complex), cluster_id); - *bet = *beta; - - mt_hthread_cgemm(MTBLAS_ORDER::MtblasColMajor, - convertBLASTranspose(transa), - convertBLASTranspose(transb), - *m, - *n, - *k, - (const void*)alp, - (const void*)a, - *lda, - (const void*)b, - *ldb, - (const void*)bet, - (void*)c, - *ldc, - cluster_id); - - free_ht(alp); - free_ht(bet); -} // cgemm that needn't malloc_ht or free_ht -} // namespace mtfunc \ No newline at end of file diff --git a/source/module_base/kernels/dsp/dsp_connector.h b/source/module_base/kernels/dsp/dsp_connector.h deleted file mode 100644 index ef7eb0bdc8..0000000000 --- a/source/module_base/kernels/dsp/dsp_connector.h +++ /dev/null @@ -1,181 +0,0 @@ -#ifndef DSP_CONNECTOR_H -#define DSP_CONNECTOR_H -#ifdef __DSP - -#include "module_base/module_device/device.h" -#include "module_base/module_device/memory_op.h" -#include "source_hsolver/diag_comm_info.h" - -namespace mtfunc -{ -// Base dsp functions -void dspInitHandle(int id); -void dspDestoryHandle(int id); -void* malloc_ht(size_t bytes, int cluster_id); -void free_ht(void* ptr); - -// mtblas functions - -void sgemm_mt_(const char* transa, - const char* transb, - const int* m, - const int* n, - const int* k, - const float* alpha, - const float* a, - const int* lda, - const float* b, - const int* ldb, - const float* beta, - float* c, - const int* ldc, - int cluster_id); - -void dgemm_mt_(const char* transa, - const char* transb, - const int* m, - const int* n, - const int* k, - const double* alpha, - const double* a, - const int* lda, - const double* b, - const int* ldb, - const double* beta, - double* c, - const int* ldc, - int cluster_id); - -void zgemm_mt_(const char* transa, - const char* transb, - const int* m, - const int* n, - const int* k, - const std::complex* alpha, - const std::complex* a, - const int* lda, - const std::complex* b, - const int* ldb, - const std::complex* beta, - std::complex* c, - const int* ldc, - int cluster_id); - -void cgemm_mt_(const char* transa, - const char* transb, - const int* m, - const int* n, - const int* k, - const std::complex* alpha, - const std::complex* a, - const int* lda, - const std::complex* b, - const int* ldb, - const std::complex* beta, - std::complex* c, - const int* ldc, - int cluster_id); - -void sgemm_mth_(const char* transa, - const char* transb, - const int* m, - const int* n, - const int* k, - const float* alpha, - const float* a, - const int* lda, - const float* b, - const int* ldb, - const float* beta, - float* c, - const int* ldc, - int cluster_id); - -void dgemm_mth_(const char* transa, - const char* transb, - const int* m, - const int* n, - const int* k, - const double* alpha, - const double* a, - const int* lda, - const double* b, - const int* ldb, - const double* beta, - double* c, - const int* ldc, - int cluster_id); - -void zgemm_mth_(const char* transa, - const char* transb, - const int* m, - const int* n, - const int* k, - const std::complex* alpha, - const std::complex* a, - const int* lda, - const std::complex* b, - const int* ldb, - const std::complex* beta, - std::complex* c, - const int* ldc, - int cluster_id); - -void cgemm_mth_(const char* transa, - const char* transb, - const int* m, - const int* n, - const int* k, - const std::complex* alpha, - const std::complex* a, - const int* lda, - const std::complex* b, - const int* ldb, - const std::complex* beta, - std::complex* c, - const int* ldc, - int cluster_id); - -// #define zgemm_ zgemm_mt - -// The next is dsp utils. It may be moved to other files if this file get too huge - -template -void dsp_dav_subspace_reduce(T* hcc, T* scc, int nbase, int nbase_x, int notconv, MPI_Comm diag_comm) -{ - - using syncmem_complex_op - = base_device::memory::synchronize_memory_op; - - auto* swap = new T[notconv * nbase_x]; - auto* target = new T[notconv * nbase_x]; - syncmem_complex_op()(swap, hcc + nbase * nbase_x, notconv * nbase_x); - if (base_device::get_current_precision(swap) == "single") - { - MPI_Reduce(swap, target, notconv * nbase_x, MPI_COMPLEX, MPI_SUM, 0, diag_comm); - } - else - { - MPI_Reduce(swap, target, notconv * nbase_x, MPI_DOUBLE_COMPLEX, MPI_SUM, 0, diag_comm); - } - - syncmem_complex_op()(hcc + nbase * nbase_x, target, notconv * nbase_x); - syncmem_complex_op()(swap, scc + nbase * nbase_x, notconv * nbase_x); - - if (base_device::get_current_precision(swap) == "single") - { - MPI_Reduce(swap, target, notconv * nbase_x, MPI_COMPLEX, MPI_SUM, 0, diag_comm); - } - else - { - MPI_Reduce(swap, target, notconv * nbase_x, MPI_DOUBLE_COMPLEX, MPI_SUM, 0, diag_comm); - } - - syncmem_complex_op()(scc + nbase * nbase_x, target, notconv * nbase_x); - delete[] swap; - delete[] target; -} -} // namespace mtfunc - -#endif -#endif \ No newline at end of file diff --git a/source/module_base/kernels/math_kernel_op.cpp b/source/module_base/kernels/math_kernel_op.cpp deleted file mode 100644 index 9c4ccdc42b..0000000000 --- a/source/module_base/kernels/math_kernel_op.cpp +++ /dev/null @@ -1,143 +0,0 @@ -#include "module_base/kernels/math_kernel_op.h" - -#include -#include - -namespace ModuleBase -{ - -template -struct gemv_op -{ - void operator()(const char& trans, - const int& m, - const int& n, - const T* alpha, - const T* A, - const int& lda, - const T* X, - const int& incx, - const T* beta, - T* Y, - const int& incy) - { - BlasConnector::gemv(trans, m, n, *alpha, A, lda, X, incx, *beta, Y, incy); - } -}; - -template -struct gemm_op -{ - void operator()(const char& transa, - const char& transb, - const int& m, - const int& n, - const int& k, - const T* alpha, - const T* a, - const int& lda, - const T* b, - const int& ldb, - const T* beta, - T* c, - const int& ldc) - { - BlasConnector::gemm(transb, transa, n, m, k, *alpha, b, ldb, a, lda, *beta, c, ldc); - } -}; - -#ifdef __DSP -template -struct gemm_op_mt -{ - void operator()(const char& transa, - const char& transb, - const int& m, - const int& n, - const int& k, - const T* alpha, - const T* a, - const int& lda, - const T* b, - const int& ldb, - const T* beta, - T* c, - const int& ldc) - { - BlasConnector::gemm(transb, transa, n, m, k, *alpha, b, ldb, a, lda, *beta, c, ldc, base_device::AbacusDevice_t::DspDevice); - } -}; -#endif - -template -struct matrixTranspose_op -{ - void operator()(const int& row, - const int& col, - const T* input_matrix, - T* output_matrix) - { - T* temp = nullptr; - base_device::memory::resize_memory_op()(temp, row * col, "MTransOp"); -#ifdef _OPENMP -#pragma omp parallel for collapse(2) schedule(static, 8192 / sizeof(T)) -#endif - for (int j = 0; j < col; j++) - { - for (int i = 0; i < row; i++) - { - temp[j * row + i] = input_matrix[i * col + j]; - } - } -#ifdef _OPENMP -#pragma omp parallel for schedule(static, 8192 / sizeof(T)) -#endif - for (int i = 0; i < row * col; i++) - { - output_matrix[i] = temp[i]; - } - base_device::memory::delete_memory_op()(temp); - } -}; - -template -struct matrixCopy -{ - void operator()(const int& n1, const int& n2, const T* A, const int& LDA, T* B, const int& LDB) - { -#ifdef _OPENMP -#pragma omp parallel for collapse(2) schedule(static, 8192 / sizeof(T)) -#endif - for (int i = 0; i < n1; i++) - { - for (int j = 0; j < n2; j++) - { - B[i * LDB + j] = A[i * LDA + j]; - } - } - } -}; - -template struct gemv_op, base_device::DEVICE_CPU>; -template struct gemv_op; -template struct gemm_op, base_device::DEVICE_CPU>; -template struct gemm_op; -template struct matrixTranspose_op, base_device::DEVICE_CPU>; -template struct matrixCopy, base_device::DEVICE_CPU>; - -template struct gemv_op, base_device::DEVICE_CPU>; -template struct gemv_op; -template struct gemm_op, base_device::DEVICE_CPU>; -template struct gemm_op; -template struct matrixTranspose_op, base_device::DEVICE_CPU>; -template struct matrixCopy; -template struct matrixCopy, base_device::DEVICE_CPU>; - -#ifdef __LCAO -template struct matrixTranspose_op; -#endif -#ifdef __DSP -template struct gemm_op_mt, base_device::DEVICE_CPU>; -template struct gemm_op_mt, base_device::DEVICE_CPU>; -#endif -} // namespace hsolver \ No newline at end of file diff --git a/source/module_base/kernels/math_kernel_op.h b/source/module_base/kernels/math_kernel_op.h deleted file mode 100644 index d26e96171c..0000000000 --- a/source/module_base/kernels/math_kernel_op.h +++ /dev/null @@ -1,423 +0,0 @@ -// TODO: This is a temperary location for these functions. -// And will be moved to a global module(module base) later. -#ifndef MODULE_HSOLVER_MATH_KERNEL_H -#define MODULE_HSOLVER_MATH_KERNEL_H - -#include "module_base/macros.h" - -#include "module_base/blas_connector.h" -#include "module_base/parallel_reduce.h" - -#include "module_base/module_device/memory_op.h" -#include "module_base/module_device/types.h" - -#if defined(__CUDA) || defined(__UT_USE_CUDA) -#include - -#include "cublas_v2.h" -#endif //__CUDA || __UT_USE_CUDA - -namespace ModuleBase { - -//--------------------------------------------------------------------------------- -//-----------------------------0. Tool Functions----------------------------------- -//--------------------------------------------------------------------------------- -inline std::complex set_real_tocomplex(const std::complex &x) { - return {x.real(), 0.0}; -} - -inline std::complex set_real_tocomplex(const std::complex &x) { - return {x.real(), 0.0}; -} - -inline double set_real_tocomplex(const double &x) { return x; } - -inline float set_real_tocomplex(const float &x) { return x; } - -inline std::complex get_conj(const std::complex &x) { - return {x.real(), -x.imag()}; -} - -inline std::complex get_conj(const std::complex &x) { - return {x.real(), -x.imag()}; -} - -inline double get_conj(const double &x) { return x; } - -inline float get_conj(const float &x) { return x; } - - -//--------------------------------------------------------------------------------- -//-----------------------------1. Vector Operations-------------------------------- -//--------------------------------------------------------------------------------- -template struct scal_op { - /// @brief x = alpha * x, where alpha and x are complex numbers - /// - /// Input Parameters - /// \param N : array size - /// \param alpha : input constant - /// \param X : input array - /// \param incx : computing strip of array X - /// - /// Output Parameters - /// \param X : output array - void operator()(const int &N, - const std::complex *alpha, std::complex *X, - const int &incx); -}; - -template struct vector_mul_real_op { - using Real = typename GetTypeReal::type; - /// @brief result[i] = vector[i] * constant, where vector is complex number and constant is real number。 - /// It is different from the scal_op, which is used to multiply a complex number by a complex number. - /// - /// Input Parameters - /// \param dim : array size - /// \param vector : input array - /// \param constant : input constant - /// - /// Output Parameters - /// \param result : output array - /// \note Use mulitple instead of divide. It is faster. - void operator()(const int dim, T* result, const T* vector, const Real constant); -}; - -// vector operator: result[i] = vector1[i](complex) * vector2[i](not complex) -template struct vector_mul_vector_op { - using Real = typename GetTypeReal::type; - /// @brief result[i] = vector1[i](complex) * vector2[i](not complex) - /// - /// Input Parameters - /// \param dim : array size - /// \param vector1 : input array A - /// \param vector2 : input array B - /// \param add : flag to control whether to add the result to the output array - /// - /// Output Parameters - /// \param result : output array - void operator()(const int& dim, T* result, const T* vector1, const Real* vector2, const bool& add = false); -}; - -// vector operator: result[i] = vector[i] / constant -template struct vector_div_constant_op { - using Real = typename GetTypeReal::type; - /// @brief result[i] = vector[i] / constant - /// - /// Input Parameters - /// \param dim : array size - /// \param vector : input array - /// \param constant : input constant - /// - /// Output Parameters - /// \param result : output array - void operator()(const int& dim, T* result, const T* vector, const Real constant); -}; - -// vector operator: result[i] = vector1[i](complex) / vector2[i](not complex) -template struct vector_div_vector_op { - using Real = typename GetTypeReal::type; - /// @brief result[i] = vector1[i](complex) / vector2[i](not complex) - /// - /// Input Parameters - /// \param dim : array size - /// \param vector1 : input array A - /// \param vector2 : input array B - /// - /// Output Parameters - /// \param result : output array - void operator()(const int &dim, T *result, const T *vector1, - const Real *vector2); -}; - -// compute Y = alpha * X + Y -template struct axpy_op { - /// @brief Y = alpha * X + Y - /// - /// Input Parameters - /// \param N : array size - /// \param alpha : input constant alpha - /// \param X : input array X - /// \param incX : computing strip of X - /// \param Y : computing strip of Y - /// \param incY : computing strip of Y - /// - /// Output Parameters - /// \param Y : output array Y - void operator()(const int &N, const T *alpha, const T *X, - const int &incX, T *Y, const int &incY); -}; - -// vector operator: result[i] = vector1[i] * constant1 + vector2[i] * constant2 -template -struct vector_add_vector_op { - using Real = typename GetTypeReal::type; - /// @brief result[i] = vector1[i] * constant1 + vector2[i] * constant2 - /// - /// Input Parameters - /// \param dim : array size - /// \param vector1 : input array A - /// \param constant1 : input constant a - /// \param vector2 : input array B - /// \param constant2 : input constant b - /// - /// Output Parameters - /// \param result : output array - void operator()(const int &dim, T *result, const T *vector1, - const Real constant1, const T *vector2, const Real constant2); -}; - -template struct dot_real_op { - using Real = typename GetTypeReal::type; - /// @brief dot_real_op computes the dot product of the given complex - /// arrays(treated as float arrays). And there's may have MPI communications - /// while enabling planewave parallization strategy. - /// - /// Input Parameters - /// \param dim : array size - /// \param psi_L : input array A - /// \param psi_R : input array B - /// \param reduce : flag to control whether to perform the MPI communications - /// - /// \return - /// FPTYPE : dot product result - Real operator()(const int &dim, const T *psi_L, - const T *psi_R, const bool reduce = true); -}; - - -//--------------------------------------------------------------------------------- -//-----------------------------2. Matrix Operations-------------------------------- -//--------------------------------------------------------------------------------- - -// compute y = alpha * op(A) * x + beta * y -template struct gemv_op { - /// @brief y = alpha * op(A) * x + beta * y - /// - /// Input Parameters - /// \param trans : whether to transpose A - /// \param m : first dimension of matrix - /// \param n : second dimension of matrix - /// \param alpha : input constant alpha - /// \param A : input matrix A - /// \param lda : leading dimention of A - /// \param X : input array X - /// \param incx : computing strip of X - /// \param beta : input constant beta - /// \param Y : input array Y - /// \param incy : computing strip of Y - /// - /// Output Parameters - /// \param Y : output array Y - void operator()(const char &trans, const int &m, - const int &n, const T *alpha, const T *A, const int &lda, - const T *X, const int &incx, const T *beta, T *Y, - const int &incy); -}; - -// compute C = alpha * op(A) * op(B) + beta * C -template struct gemm_op { - /// @brief C = alpha * op(A) * op(B) + beta * C - /// - /// Input Parameters - /// \param transa : whether to transpose matrix A - /// \param transb : whether to transpose matrix B - /// \param m : first dimension of matrix mulplication - /// \param n : second dimension of matrix mulplication - /// \param k : third dimension of matrix mulplication - /// \param alpha : input constant alpha - /// \param a : input matrix A - /// \param lda : leading dimention of A - /// \param b : input matrix B - /// \param ldb : leading dimention of A - /// \param beta : input constant beta - /// \param c : input matrix C - /// \param ldc : leading dimention of C - /// - /// Output Parameters - /// \param c : output matrix C - void operator()(const char &transa, const char &transb, - const int &m, const int &n, const int &k, const T *alpha, - const T *a, const int &lda, const T *b, const int &ldb, - const T *beta, T *c, const int &ldc); -}; - -#ifdef __DSP -// compute C = alpha * op(A) * op(B) + beta * C on DSP Hardware -template struct gemm_op_mt { - /// @brief C = alpha * op(A) * op(B) + beta * C - /// - /// Input Parameters - /// \param transa : whether to transpose matrix A - /// \param transb : whether to transpose matrix B - /// \param m : first dimension of matrix mulplication - /// \param n : second dimension of matrix mulplication - /// \param k : third dimension of matrix mulplication - /// \param alpha : input constant alpha - /// \param a : input matrix A - /// \param lda : leading dimention of A - /// \param b : input matrix B - /// \param ldb : leading dimention of A - /// \param beta : input constant beta - /// \param c : input matrix C - /// \param ldc : leading dimention of C - /// - /// Output Parameters - /// \param c : output matrix C - void operator()(const char &transa, const char &transb, - const int &m, const int &n, const int &k, const T *alpha, - const T *a, const int &lda, const T *b, const int &ldb, - const T *beta, T *c, const int &ldc); -}; -#endif - -template struct matrixTranspose_op { - /// @brief transpose the input matrix - /// - /// Input Parameters - /// \param row : first dimension of matrix - /// \param col : second dimension of matrix - /// \param input_matrix : input matrix - /// - /// Output Parameters - /// \param output_matrix : output matrix - void operator()(const int &row, const int &col, - const T *input_matrix, T *output_matrix); -}; - -template struct matrixCopy { - /// @brief copy matrix A to B, they can have different leading dimensions - /// - /// Input Parameters - /// \param n1 : first dimension of matrix - /// \param n2 : second dimension of matrix - /// \param A : input matrix A - /// \param LDA : leading dimension of A - /// \param LDB : leading dimension of B - /// - /// Output Parameters - /// \param B : output matrix B - void operator()(const int& n1, const int& n2, const T* A, const int& LDA, T* B, const int& LDB); -}; - -template -struct apply_eigenvalues_op { - using Real = typename GetTypeReal::type; - - void operator()(const Device *d, const int &nbase, const int &nbase_x, const int ¬conv, - T *result, const T *vectors, const Real *eigenvalues); -}; - -template -struct precondition_op { - using Real = typename GetTypeReal::type; - void operator()(const Device* d, - const int& dim, - T* psi_iter, - const int& nbase, - const int& notconv, - const Real* precondition, - const Real* eigenvalues); -}; - -template -struct normalize_op { - using Real = typename GetTypeReal::type; - void operator()(const Device* d, - const int& dim, - T* psi_iter, - const int& nbase, - const int& notconv, - Real* psi_norm = nullptr); -}; - -template -struct normalize_op { - using Real = typename GetTypeReal::type; - void operator()(const base_device::DEVICE_GPU* d, - const int& dim, - T* psi_iter, - const int& nbase, - const int& notconv, - Real* psi_norm); -}; - -#if __CUDA || __UT_USE_CUDA || __ROCM || __UT_USE_ROCM -// Partially specialize functor for base_device::GpuDevice. -template struct dot_real_op { - using Real = typename GetTypeReal::type; - Real operator()(const int &dim, - const T *psi_L, const T *psi_R, const bool reduce = true); -}; - -// vector operator: result[i] = vector[i] / constant -template -struct vector_mul_real_op -{ - using Real = typename GetTypeReal::type; - void operator()(const int dim, T* result, const T* vector, const Real constant); -}; - -// vector operator: result[i] = vector1[i](complex) * vector2[i](not complex) -template struct vector_mul_vector_op { - using Real = typename GetTypeReal::type; - void operator()(const int& dim, T* result, const T* vector1, const Real* vector2, const bool& add = false); -}; - -// vector operator: result[i] = vector[i] / constant -template struct vector_div_constant_op { - using Real = typename GetTypeReal::type; - void operator()(const int& dim, T* result, const T* vector, const Real constant); -}; - -// vector operator: result[i] = vector1[i](complex) / vector2[i](not complex) -template struct vector_div_vector_op { - using Real = typename GetTypeReal::type; - void operator()(const int &dim, T *result, - const T *vector1, const Real *vector2); -}; - -// vector operator: result[i] = vector1[i] * constant1 + vector2[i] * constant2 -template -struct vector_add_vector_op { - using Real = typename GetTypeReal::type; - void operator()(const int &dim, T *result, - const T *vector1, const Real constant1, const T *vector2, - const Real constant2); -}; - -template struct matrixCopy { - void operator()(const int& n1, - const int& n2, - const T* A, // input - const int& LDA, - T* B, // output - const int& LDB); -}; - -void createGpuBlasHandle(); -void destoryBLAShandle(); - -// vector operator: result[i] = -lambda[i] * vector[i] -template struct apply_eigenvalues_op { - using Real = typename GetTypeReal::type; - - void operator()(const base_device::DEVICE_GPU *d, const int &nbase, const int &nbase_x, const int ¬conv, - T *result, const T *vectors, const Real *eigenvalues); -}; - -template -struct precondition_op { - using Real = typename GetTypeReal::type; - void operator()(const base_device::DEVICE_GPU* d, - const int& dim, - T* psi_iter, - const int& nbase, - const int& notconv, - const Real* precondition, - const Real* eigenvalues); -}; - -#endif // __CUDA || __UT_USE_CUDA || __ROCM || __UT_USE_ROCM -} // namespace hsolver - -#endif // MODULE_HSOLVER_MATH_KERNEL_H \ No newline at end of file diff --git a/source/module_base/kernels/math_kernel_op_vec.cpp b/source/module_base/kernels/math_kernel_op_vec.cpp deleted file mode 100644 index 605f97ff19..0000000000 --- a/source/module_base/kernels/math_kernel_op_vec.cpp +++ /dev/null @@ -1,197 +0,0 @@ -#include "module_base/kernels/math_kernel_op.h" - -namespace ModuleBase -{ - -template -struct scal_op -{ - void operator()(const int& N, - const std::complex* alpha, - std::complex* X, - const int& incx) - { - BlasConnector::scal(N, *alpha, X, incx); - } -}; - -template -struct vector_mul_real_op -{ - using Real = typename GetTypeReal::type; - void operator()(const int dim, T* result, const T* vector, const Real constant) - { -#ifdef _OPENMP -#pragma omp parallel for schedule(static, 4096 / sizeof(Real)) -#endif - for (int i = 0; i < dim; i++) - { - result[i] = vector[i] * constant; - } - } -}; - -template -struct vector_mul_vector_op -{ - using Real = typename GetTypeReal::type; - void operator()(const int& dim, T* result, const T* vector1, const Real* vector2, const bool& add) - { - if (add) - { -#ifdef _OPENMP -#pragma omp parallel for schedule(static, 4096 / sizeof(Real)) -#endif - for (int i = 0; i < dim; i++) - { - result[i] += vector1[i] * vector2[i]; - } - } - else - { -#ifdef _OPENMP -#pragma omp parallel for schedule(static, 4096 / sizeof(Real)) -#endif - for (int i = 0; i < dim; i++) - { - result[i] = vector1[i] * vector2[i]; - } - } - } -}; - -template -struct vector_div_constant_op -{ - using Real = typename GetTypeReal::type; - void operator()(const int& dim, T* result, const T* vector, const Real constant) - { -#ifdef _OPENMP -#pragma omp parallel for schedule(static, 4096 / sizeof(Real)) -#endif - for (int i = 0; i < dim; i++) - { - result[i] = vector[i] / constant; - } - } -}; - -template -struct vector_div_vector_op -{ - using Real = typename GetTypeReal::type; - void operator()(const int& dim, T* result, const T* vector1, const Real* vector2) - { -#ifdef _OPENMP -#pragma omp parallel for schedule(static, 4096 / sizeof(Real)) -#endif - for (int i = 0; i < dim; i++) - { - result[i] = vector1[i] / vector2[i]; - } - } -}; - -template -struct axpy_op -{ - void operator()(const int& dim, - const T* alpha, - const T* X, - const int& incX, - T* Y, - const int& incY) - { - BlasConnector::axpy(dim, *alpha, X, incX, Y, incY); - } -}; - - -template -struct vector_add_vector_op -{ - using Real = typename GetTypeReal::type; - void operator()(const int& dim, - T* result, - const T* vector1, - const Real constant1, - const T* vector2, - const Real constant2) - { -#ifdef _OPENMP -#pragma omp parallel for schedule(static, 8192 / sizeof(T)) -#endif - for (int i = 0; i < dim; i++) - { - result[i] = vector1[i] * constant1 + vector2[i] * constant2; - } - } -}; - - - -template -struct dot_real_op -{ - FPTYPE operator()(const int& dim, const FPTYPE* psi_L, const FPTYPE* psi_R, const bool reduce) - { - FPTYPE result = BlasConnector::dot(dim, psi_L, 1, psi_R, 1); - if (reduce) - { - Parallel_Reduce::reduce_pool(result); - } - return result; - } -}; - -template -struct dot_real_op, base_device::DEVICE_CPU> -{ - FPTYPE operator()(const int& dim, - const std::complex* psi_L, - const std::complex* psi_R, - const bool reduce) - { - // Note that ddot_(2*dim,a,1,b,1) = REAL( zdotc_(dim,a,1,b,1) ) - const FPTYPE* pL = reinterpret_cast(psi_L); - const FPTYPE* pR = reinterpret_cast(psi_R); - FPTYPE result = BlasConnector::dot(2 * dim, pL, 1, pR, 1); - if (reduce) - { - Parallel_Reduce::reduce_pool(result); - } - return result; - } -}; - -template struct scal_op; -template struct scal_op; - -template struct vector_mul_real_op, base_device::DEVICE_CPU>; -template struct vector_mul_real_op; -template struct vector_mul_real_op, base_device::DEVICE_CPU>; - -template struct vector_mul_vector_op, base_device::DEVICE_CPU>; -template struct vector_mul_vector_op; -template struct vector_mul_vector_op, base_device::DEVICE_CPU>; - -template struct vector_div_constant_op, base_device::DEVICE_CPU>; -template struct vector_div_constant_op; -template struct vector_div_constant_op, base_device::DEVICE_CPU>; - -template struct vector_div_vector_op, base_device::DEVICE_CPU>; -template struct vector_div_vector_op; -template struct vector_div_vector_op, base_device::DEVICE_CPU>; - -template struct axpy_op, base_device::DEVICE_CPU>; -template struct axpy_op, base_device::DEVICE_CPU>; -template struct axpy_op; - -template struct vector_add_vector_op, base_device::DEVICE_CPU>; -template struct vector_add_vector_op; -template struct vector_add_vector_op, base_device::DEVICE_CPU>; - -template struct dot_real_op, base_device::DEVICE_CPU>; -template struct dot_real_op, base_device::DEVICE_CPU>; -template struct dot_real_op; -} // namespace ModuleBase diff --git a/source/module_base/kernels/math_ylm_op.cpp b/source/module_base/kernels/math_ylm_op.cpp deleted file mode 100644 index 0846801797..0000000000 --- a/source/module_base/kernels/math_ylm_op.cpp +++ /dev/null @@ -1,130 +0,0 @@ -#include "module_base/kernels/math_ylm_op.h" -#include "module_base/libm/libm.h" - -namespace ModuleBase { - -template -__inline__ -FPTYPE __fact(const int n) { - FPTYPE f = 1.0; - for (int i = n; i > 1; i--) { - f *= i; - } - return f; -} - -__inline__ -int __semi_fact(const int n) -{ - int semif = 1; - for (int i = n; i > 2; i -= 2) - { - semif *= i; - } - return semif; -} - -template -struct cal_ylm_real_op -{ - void operator()(const base_device::DEVICE_CPU* ctx, - const int& ng, - const int& lmax, - const FPTYPE& SQRT2, - const FPTYPE& PI, - const FPTYPE& PI_HALF, - const FPTYPE& FOUR_PI, - const FPTYPE& SQRT_INVERSE_FOUR_PI, - const FPTYPE* g, - FPTYPE* p, - FPTYPE* ylm) - { -#ifdef _OPENMP -#pragma omp parallel for -#endif - for (int ig = 0; ig < ng; ig++) { - //---------------------------------------------------------- - // EXPLAIN : if lmax = 1,only use Y00 , output result. - //---------------------------------------------------------- - if (lmax == 0) { - ylm[0 * ng + ig] = SQRT_INVERSE_FOUR_PI; - continue; - } - //---------------------------------------------------------- - // LOCAL VARIABLES : - // NAME : cost = cos(theta),theta and phi are polar angles - // NAME : phi - //---------------------------------------------------------- - const FPTYPE gmod = sqrt(g[ig * 3 + 0] * g[ig * 3 + 0] + g[ig * 3 + 1] * g[ig * 3 + 1] + g[ig * 3 + 2] * g[ig * 3 + 2]); - FPTYPE cost = gmod < 1.0e-9 ? 0.0 : g[ig * 3 + 2] / gmod; - FPTYPE phi; - // beware the arc tan, it is defined modulo pi - if (g[ig * 3 + 0] > 1.0e-9) { - phi = atan(g[ig * 3 + 1] / g[ig * 3 + 0]); - } - else if (g[ig * 3 + 0] < -1.e-9) { - phi = atan(g[ig * 3 + 1] / g[ig * 3 + 0]) + PI; - } - else { - phi = PI_HALF * ((g[ig * 3 + 1] >= 0.0) ? 1.0 : -1.0); //HLX: modified on 10/13/2006 - } // end if - //========================================================== - // NAME : p(Legendre Polynomials) (0 <= m <= l) - //========================================================== - int lm = -1; - for (int l = 0; l <= lmax; l++) { - const FPTYPE c = sqrt((2 * l + 1) / FOUR_PI); - if (l == 0) { - p[0 * (lmax + 1) * ng + 0 * ng + ig] = 1.0; - } - else if (l == 1) { - p[0 * (lmax + 1) * ng + 1 * ng + ig] = cost; - p[1 * (lmax + 1) * ng + 1 * ng + ig] = -sqrt(std::max(0.0, 1.0 - cost * cost)); - } - else { - const int l1 = l - 1, - l2 = l - 2, - l3 = 2 * l - 1; - // recursion on l for P(:,l,m) - for (int m = 0; m <= l2; m++) { // do m = 0, l - 2//mohan modify 2007-10-13 - p[m * (lmax + 1) * ng + l * ng + ig] = - (cost * l3 * p[m * (lmax + 1) * ng + l1 * ng + ig] - - (l1 + m) * p[m * (lmax + 1) * ng + l2 * ng + ig]) / (l - m); - } // end do - p[l1 * (lmax + 1) * ng + l * ng + ig] = - cost * l3 * p[l1 * (lmax + 1) * ng + l1 * ng + ig]; - FPTYPE x2 = std::max(0.0, 1.0 - cost * cost); - p[l * (lmax + 1) * ng + l * ng + ig] = __semi_fact(l3) * pow(x2, static_cast(l) / 2.0);//mohan modify 2007-10-13 - if (l % 2 == 1) { - p[l * (lmax + 1) * ng + l * ng + ig] *= -1; - } - } // end if - - // Y_lm, m = 0 - ++lm; - ylm[lm * ng + ig] = c * p[0 * (lmax + 1) * ng + l * ng + ig]; - - for (int m = 1; m <= l; m++) { - // Y_lm, m > 0 - const FPTYPE same = - c * sqrt(__fact(l - m) / - __fact(l + m)) * SQRT2; - FPTYPE sinp, cosp; - ModuleBase::libm::sincos(m * phi, &sinp, &cosp); - ++lm; - ylm[lm * ng + ig] = same * p[m * (lmax + 1) * ng + l * ng + ig] * cosp; - - // Y_lm, m < 0 - ++lm; - ylm[lm * ng + ig] = same * p[m * (lmax + 1) * ng + l * ng + ig] * sinp; - } - }// end do - } - } -}; - -template struct cal_ylm_real_op; -template struct cal_ylm_real_op; - -} // namespace ModuleBase - diff --git a/source/module_base/kernels/math_ylm_op.h b/source/module_base/kernels/math_ylm_op.h deleted file mode 100644 index a3c0ef205e..0000000000 --- a/source/module_base/kernels/math_ylm_op.h +++ /dev/null @@ -1,61 +0,0 @@ -#ifndef MODULE_BASE_MATH_MULTI_DEVICE_H -#define MODULE_BASE_MATH_MULTI_DEVICE_H - -#include "module_psi/psi.h" -#include - -namespace ModuleBase { - -template -struct cal_ylm_real_op { - /// @brief YLM_REAL::Real spherical harmonics ylm(G) up to l=lmax - /// Use Numerical recursive algorithm as given in Numerical Recipes - /// - /// Input Parameters - /// @param ctx - which device this function runs on - /// @param ng - number of problem size - /// @param lmax - determined by lmax2 - /// @param SQRT2 - ModuleBase::SQRT2 - /// @param PI - ModuleBase::PI - /// @param PI_HALF - ModuleBase::PI_HALF - /// @param FOUR_PI - ModuleBase::FOUR_PI, - /// @param SQRT_INVERSE_FOUR_PI - ModuleBase::SQRT_INVERSE_FOUR_PI, - /// @param g - input array with size npw * 3, wf.get_1qvec_cartesian - /// @param p - intermediate array - /// - /// Output Parameters - /// @param ylm - output array - void operator() ( - const Device *ctx, - const int &ng, - const int &lmax, - const FPTYPE &SQRT2, - const FPTYPE &PI, - const FPTYPE &PI_HALF, - const FPTYPE &FOUR_PI, - const FPTYPE &SQRT_INVERSE_FOUR_PI, - const FPTYPE *g, - FPTYPE * p, - FPTYPE * ylm); -}; - -#if __CUDA || __UT_USE_CUDA || __ROCM || __UT_USE_ROCM -template -struct cal_ylm_real_op -{ - void operator()(const base_device::DEVICE_GPU* ctx, - const int& ng, - const int& lmax, - const FPTYPE& SQRT2, - const FPTYPE& PI, - const FPTYPE& PI_HALF, - const FPTYPE& FOUR_PI, - const FPTYPE& SQRT_INVERSE_FOUR_PI, - const FPTYPE* g, - FPTYPE* p, - FPTYPE* ylm); -}; - -#endif // __CUDA || __UT_USE_CUDA || __ROCM || __UT_USE_ROCM -} // namespace ModuleBase -#endif //MODULE_BASE_MATH_MULTI_DEVICE_H \ No newline at end of file diff --git a/source/module_base/kernels/rocm/math_kernel_op.hip.cu b/source/module_base/kernels/rocm/math_kernel_op.hip.cu deleted file mode 100644 index 1211b76b6d..0000000000 --- a/source/module_base/kernels/rocm/math_kernel_op.hip.cu +++ /dev/null @@ -1,446 +0,0 @@ -#include "module_base/module_device/memory_op.h" -#include "module_base/kernels/math_kernel_op.h" -#include "module_psi/psi.h" -#include "module_base/tool_quit.h" - -#include -#include -#include -#include -template <> -struct GetTypeReal> { - using type = float; /**< The return type specialization for std::complex. */ -}; -template <> -struct GetTypeReal> { - using type = double; /**< The return type specialization for std::complex. */ -}; - -namespace ModuleBase { - -template -struct GetTypeThrust { - using type = T; -}; - -template <> -struct GetTypeThrust> { - using type = thrust::complex; /**< The return type specialization for std::complex. */ -}; - -template <> -struct GetTypeThrust> { - using type = thrust::complex; /**< The return type specialization for std::complex. */ -}; - -static hipblasHandle_t cublas_handle = nullptr; - -void xdot_wrapper(const int &n, const float * x, const int &incx, const float * y, const int &incy, float &result) { - hipblasErrcheck(hipblasSdot(cublas_handle, n, x, incx, y, incy, &result)); -} - -void xdot_wrapper(const int &n, const double * x, const int &incx, const double * y, const int &incy, double &result) { - hipblasErrcheck(hipblasDdot(cublas_handle, n, x, incx, y, incy, &result)); -} - -void createGpuBlasHandle(){ - if (cublas_handle == nullptr) { - hipblasErrcheck(hipblasCreate(&cublas_handle)); - } -} - -void destoryBLAShandle(){ - if (cublas_handle != nullptr) { - hipblasErrcheck(hipblasDestroy(cublas_handle)); - cublas_handle = nullptr; - } -} - -template <> -void scal_op::operator()(const int& N, - const std::complex* alpha, - std::complex* X, - const int& incx) -{ - hipblasErrcheck(hipblasCscal(cublas_handle, N, (hipblasComplex*)alpha, (hipblasComplex*)X, incx)); -} - -template <> -void scal_op::operator()(const int& N, - const std::complex* alpha, - std::complex* X, - const int& incx) -{ - hipblasErrcheck(hipblasZscal(cublas_handle, N, (hipblasDoubleComplex*)alpha, (hipblasDoubleComplex*)X, incx)); -} - -template <> -void axpy_op::operator()(const int& N, - const double* alpha, - const double* X, - const int& incX, - double* Y, - const int& incY) -{ - hipblasErrcheck(hipblasDaxpy(cublas_handle, N, alpha, X, incX, Y, incY)); -} - -template <> -void axpy_op, base_device::DEVICE_GPU>::operator()(const int& N, - const std::complex* alpha, - const std::complex* X, - const int& incX, - std::complex* Y, - const int& incY) -{ - hipblasErrcheck( - hipblasCaxpy(cublas_handle, N, (hipblasComplex*)alpha, (hipblasComplex*)X, incX, (hipblasComplex*)Y, incY)); -} - -template <> -void axpy_op, base_device::DEVICE_GPU>::operator()(const int& N, - const std::complex* alpha, - const std::complex* X, - const int& incX, - std::complex* Y, - const int& incY) -{ - hipblasErrcheck(hipblasZaxpy(cublas_handle, - N, - (hipblasDoubleComplex*)alpha, - (hipblasDoubleComplex*)X, - incX, - (hipblasDoubleComplex*)Y, - incY)); -} - -template -__launch_bounds__(1024) -__global__ void matrix_transpose_kernel( - const int row, - const int col, - const T* in, - T* out) -{ - int i = blockIdx.x * blockDim.x + threadIdx.x; - if (i < row) - { - for (int j = 0; j < col; j++) - { - out[j * row + i] = in[i * col + j]; - } - } -} - -template -__launch_bounds__(1024) __global__ - void matrix_copy_kernel(const int n1, const int n2, const T* A, const int LDA, T* B, const int LDB) -{ - const int i = blockIdx.x * blockDim.x + threadIdx.x; - const int j = blockIdx.y * blockDim.y + threadIdx.y; - - if (i < n1 && j < n2) - { - B[i * LDB + j] = A[i * LDA + j]; - } -} - -hipblasOperation_t judge_trans_op(bool is_complex, const char& trans, const char* name) -{ - if (trans == 'N') - { - return HIPBLAS_OP_N; - } - else if(trans == 'T') - { - return HIPBLAS_OP_T; - } - else if(is_complex && trans == 'C') - { - return HIPBLAS_OP_C; - } - else - { - ModuleBase::WARNING_QUIT(name, std::string("Unknown trans type ") + trans + std::string(" !")); - } -} - -template <> -void gemv_op::operator()(const char& trans, - const int& m, - const int& n, - const double* alpha, - const double* A, - const int& lda, - const double* X, - const int& incx, - const double* beta, - double* Y, - const int& incy) -{ - hipblasOperation_t cutrans = judge_trans_op(false, trans, "gemv_op"); - hipblasErrcheck(hipblasDgemv(cublas_handle, cutrans, m, n, alpha, A, lda, X, incx, beta, Y, incx)); -} - -template <> -void gemv_op, base_device::DEVICE_GPU>::operator()(const char& trans, - const int& m, - const int& n, - const std::complex* alpha, - const std::complex* A, - const int& lda, - const std::complex* X, - const int& incx, - const std::complex* beta, - std::complex* Y, - const int& incy) -{ - hipblasOperation_t cutrans = judge_trans_op(true, trans, "gemv_op"); - hipblasErrcheck(hipblasCgemv(cublas_handle, cutrans, m, n, (hipblasComplex*)alpha, (hipblasComplex*)A, lda, (hipblasComplex*)X, incx, (hipblasComplex*)beta, (hipblasComplex*)Y, incx)); -} - -template <> -void gemv_op, base_device::DEVICE_GPU>::operator()(const char& trans, - const int& m, - const int& n, - const std::complex* alpha, - const std::complex* A, - const int& lda, - const std::complex* X, - const int& incx, - const std::complex* beta, - std::complex* Y, - const int& incy) -{ - hipblasOperation_t cutrans = judge_trans_op(true, trans, "gemv_op"); - hipblasErrcheck(hipblasZgemv(cublas_handle, cutrans, m, n, (hipblasDoubleComplex*)alpha, (hipblasDoubleComplex*)A, lda, (hipblasDoubleComplex*)X, incx, (hipblasDoubleComplex*)beta, (hipblasDoubleComplex*)Y, incx)); -} - -template <> -void gemm_op::operator()(const char& transa, - const char& transb, - const int& m, - const int& n, - const int& k, - const float* alpha, - const float* a, - const int& lda, - const float* b, - const int& ldb, - const float* beta, - float* c, - const int& ldc) -{ - hipblasOperation_t cutransA = judge_trans_op(false, transa, "gemm_op"); - hipblasOperation_t cutransB = judge_trans_op(false, transb, "gemm_op"); - hipblasErrcheck(hipblasSgemm(cublas_handle, cutransA, cutransB, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc)); -} - -template <> -void gemm_op::operator()(const char& transa, - const char& transb, - const int& m, - const int& n, - const int& k, - const double* alpha, - const double* a, - const int& lda, - const double* b, - const int& ldb, - const double* beta, - double* c, - const int& ldc) -{ - hipblasOperation_t cutransA = judge_trans_op(false, transa, "gemm_op"); - hipblasOperation_t cutransB = judge_trans_op(false, transb, "gemm_op"); - hipblasErrcheck(hipblasDgemm(cublas_handle, cutransA, cutransB, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc)); -} - -template <> -void gemm_op, base_device::DEVICE_GPU>::operator()(const char& transa, - const char& transb, - const int& m, - const int& n, - const int& k, - const std::complex* alpha, - const std::complex* a, - const int& lda, - const std::complex* b, - const int& ldb, - const std::complex* beta, - std::complex* c, - const int& ldc) -{ - hipblasOperation_t cutransA = judge_trans_op(true, transa, "gemm_op"); - hipblasOperation_t cutransB = judge_trans_op(true, transb, "gemm_op"); - hipblasErrcheck(hipblasCgemm(cublas_handle, cutransA, cutransB, m, n ,k, (hipblasComplex*)alpha, (hipblasComplex*)a , lda, (hipblasComplex*)b, ldb, (hipblasComplex*)beta, (hipblasComplex*)c, ldc)); -} - -template <> -void gemm_op, base_device::DEVICE_GPU>::operator()(const char& transa, - const char& transb, - const int& m, - const int& n, - const int& k, - const std::complex* alpha, - const std::complex* a, - const int& lda, - const std::complex* b, - const int& ldb, - const std::complex* beta, - std::complex* c, - const int& ldc) -{ - hipblasOperation_t cutransA = judge_trans_op(true, transa, "gemm_op"); - hipblasOperation_t cutransB = judge_trans_op(true, transb, "gemm_op"); - hipblasErrcheck(hipblasZgemm(cublas_handle, cutransA, cutransB, m, n ,k, (hipblasDoubleComplex*)alpha, (hipblasDoubleComplex*)a , lda, (hipblasDoubleComplex*)b, ldb, (hipblasDoubleComplex*)beta, (hipblasDoubleComplex*)c, ldc)); -} - -template <> -void matrixTranspose_op::operator()(const int& row, - const int& col, - const double* input_matrix, - double* output_matrix) -{ - double* device_temp = nullptr; - base_device::memory::resize_memory_op()(device_temp, row * col); - - if (row == col) - { - double ONE = 1.0, ZERO = 0.0; - // use 'geam' API todo transpose. - hipblasErrcheck(hipblasDgeam(cublas_handle, HIPBLAS_OP_T, HIPBLAS_OP_N, col, row, &ONE, input_matrix, col, &ZERO, input_matrix, col, device_temp, col)); - } - else - { - int thread = 1024; - int block = (row + col + thread - 1) / thread; - hipLaunchKernelGGL(HIP_KERNEL_NAME(matrix_transpose_kernel), dim3(block), dim3(thread), 0, 0, row, col, input_matrix, device_temp); - hipCheckOnDebug(); - } - - base_device::memory::synchronize_memory_op()( - output_matrix, - device_temp, - row * col); - - base_device::memory::delete_memory_op()(device_temp); -} - -template <> -void matrixTranspose_op, base_device::DEVICE_GPU>::operator()( - const int& row, - const int& col, - const std::complex* input_matrix, - std::complex* output_matrix) -{ - std::complex* device_temp = nullptr; - base_device::memory::resize_memory_op, base_device::DEVICE_GPU>()(device_temp, row * col); - - if (row == col) - { - float2 ONE, ZERO; - ONE.x = 1.0; - ONE.y = 0.0; - ZERO.x = ZERO.y = 0.0; - - // use 'geam' API todo transpose. - hipblasErrcheck(hipblasCgeam(cublas_handle, HIPBLAS_OP_T, HIPBLAS_OP_N, col, row, - reinterpret_cast(&ONE), (hipblasComplex*)input_matrix, col, - reinterpret_cast(&ZERO), (hipblasComplex*)input_matrix, col, (hipblasComplex*)device_temp, col)); - } else - { - int thread = 1024; - int block = (row + col + thread - 1) / thread; - hipLaunchKernelGGL(HIP_KERNEL_NAME(matrix_transpose_kernel>), dim3(block), dim3(thread), 0, 0, row, col, (thrust::complex*)input_matrix, (thrust::complex*)device_temp); - hipCheckOnDebug(); - } - - base_device::memory::synchronize_memory_op, base_device::DEVICE_GPU, base_device::DEVICE_GPU>()( - output_matrix, - device_temp, - row * col); - - base_device::memory::delete_memory_op, base_device::DEVICE_GPU>()(device_temp); -} - -template <> -void matrixTranspose_op, base_device::DEVICE_GPU>::operator()( - const int& row, - const int& col, - const std::complex* input_matrix, - std::complex* output_matrix) -{ - std::complex* device_temp = nullptr; - base_device::memory::resize_memory_op, base_device::DEVICE_GPU>()(device_temp, row * col); - - if (row == col) - { - hipblasDoubleComplex ONE{1.0, 0.0}, ZERO{0.0, 0.0}; - // use 'geam' API todo transpose. - hipblasErrcheck(hipblasZgeam(cublas_handle, HIPBLAS_OP_T, HIPBLAS_OP_N, col, row, &ONE, (hipblasDoubleComplex*)input_matrix, col, &ZERO, (hipblasDoubleComplex*)input_matrix, col, (hipblasDoubleComplex*)device_temp, col)); - } else - { - int thread = 1024; - int block = (row + col + thread - 1) / thread; - hipLaunchKernelGGL(HIP_KERNEL_NAME(matrix_transpose_kernel>), dim3(block), dim3(thread), 0, 0, row, col, (thrust::complex*)input_matrix, (thrust::complex*)device_temp); - hipCheckOnDebug(); - } - - base_device::memory::synchronize_memory_op, - base_device::DEVICE_GPU, - base_device::DEVICE_GPU>()(output_matrix, device_temp, row * col); - - base_device::memory::delete_memory_op, base_device::DEVICE_GPU>()(device_temp); -} - -template <> -void matrixCopy::operator()(const int& n1, - const int& n2, - const double* A, - const int& LDA, - double* B, - const int& LDB) -{ - const dim3 blockSize(16, 16); - const dim3 gridSize((n1 + blockSize.x - 1) / blockSize.x, (n2 + blockSize.y - 1) / blockSize.y); - - hipLaunchKernelGGL(HIP_KERNEL_NAME(matrix_copy_kernel), gridSize, blockSize, 0, 0, n1, n2, A, LDA, B, LDB); - hipCheckOnDebug(); -} -template <> -void matrixCopy, base_device::DEVICE_GPU>::operator()(const int& n1, - const int& n2, - const std::complex* A, - const int& LDA, - std::complex* B, - const int& LDB) -{ - const dim3 blockSize(16, 16); - const dim3 gridSize((n1 + blockSize.x - 1) / blockSize.x, (n2 + blockSize.y - 1) / blockSize.y); - - hipLaunchKernelGGL(HIP_KERNEL_NAME(matrix_copy_kernel>), gridSize, blockSize, 0, 0, n1, n2, reinterpret_cast*>(A), LDA, reinterpret_cast*>(B), LDB); - hipCheckOnDebug(); -} -template <> -void matrixCopy, base_device::DEVICE_GPU>::operator()(const int& n1, - const int& n2, - const std::complex* A, - const int& LDA, - std::complex* B, - const int& LDB) -{ - const dim3 blockSize(16, 16); - const dim3 gridSize((n1 + blockSize.x - 1) / blockSize.x, (n2 + blockSize.y - 1) / blockSize.y); - - hipLaunchKernelGGL(HIP_KERNEL_NAME(matrix_copy_kernel>), gridSize, blockSize, 0, 0, n1, n2, reinterpret_cast*>(A), LDA, reinterpret_cast*>(B), LDB); - hipCheckOnDebug(); -} - - - -// Explicitly instantiate functors for the types of functor registered. -template struct matrixCopy; -template struct matrixCopy, base_device::DEVICE_GPU>; -template struct matrixCopy, base_device::DEVICE_GPU>; -} // namespace ModuleBase diff --git a/source/module_base/kernels/rocm/math_kernel_op_vec.hip.cu b/source/module_base/kernels/rocm/math_kernel_op_vec.hip.cu deleted file mode 100644 index 9e05160c54..0000000000 --- a/source/module_base/kernels/rocm/math_kernel_op_vec.hip.cu +++ /dev/null @@ -1,456 +0,0 @@ -#include "module_base/kernels/math_kernel_op.h" - -#include -#include -template <> -struct GetTypeReal> { - using type = float; /**< The return type specialization for std::complex. */ -}; -template <> -struct GetTypeReal> { - using type = double; /**< The return type specialization for std::complex. */ -}; -namespace ModuleBase -{ -void xdot_wrapper(const int &n, const float * x, const int &incx, const float * y, const int &incy, float &result); -void xdot_wrapper(const int &n, const double * x, const int &incx, const double * y, const int &incy, double &result); - -// Define the CUDA kernel: -template -__launch_bounds__(1024) __global__ void vector_mul_real_kernel(const int size, - T* result, - const T* vector, - const typename GetTypeReal::type constant) -{ - int i = blockIdx.x * blockDim.x + threadIdx.x; - if (i < size) - { - result[i] = vector[i] * constant; - } -} - -template -__launch_bounds__(1024) __global__ void vector_mul_vector_kernel(const int size, - T* result, - const T* vector1, - const typename GetTypeReal::type* vector2, - const bool add) -{ - int i = blockIdx.x * blockDim.x + threadIdx.x; - if (i < size) - { - if (add) - { - result[i] += vector1[i] * vector2[i]; - } - else - { - result[i] = vector1[i] * vector2[i]; - } - } -} - -template -__launch_bounds__(1024) __global__ void vector_div_constant_kernel(const int size, - T* result, - const T* vector, - const typename GetTypeReal::type constant) -{ - int i = blockIdx.x * blockDim.x + threadIdx.x; - if (i < size) - { - result[i] = vector[i] / constant; - } -} - -template -__launch_bounds__(1024) __global__ void vector_div_vector_kernel(const int size, - T* result, - const T* vector1, - const typename GetTypeReal::type* vector2) -{ - int i = blockIdx.x * blockDim.x + threadIdx.x; - if (i < size) - { - result[i] = vector1[i] / vector2[i]; - } -} - -template -__launch_bounds__(1024) __global__ void constantvector_addORsub_constantVector_kernel(const int size, - T* result, - const T* vector1, - const Real constant1, - const T* vector2, - const Real constant2) -{ - int i = blockIdx.x * blockDim.x + threadIdx.x; - if (i < size) - { - result[i] = vector1[i] * constant1 + vector2[i] * constant2; - } -} - -// vector operator: result[i] = vector[i] * constant -template <> -void vector_mul_real_op::operator()(const int dim, - double* result, - const double* vector, - const double constant) -{ - int thread = 1024; - int block = (dim + thread - 1) / thread; - hipLaunchKernelGGL(HIP_KERNEL_NAME(vector_mul_real_kernel), - dim3(block), - dim3(thread), - 0, - 0, - dim, - result, - vector, - constant); - - hipCheckOnDebug(); -} -template -inline void vector_mul_real_wrapper(const int dim, - std::complex* result, - const std::complex* vector, - const FPTYPE constant) -{ - thrust::complex* result_tmp = reinterpret_cast*>(result); - const thrust::complex* vector_tmp = reinterpret_cast*>(vector); - int thread = 1024; - int block = (dim + thread - 1) / thread; - hipLaunchKernelGGL(HIP_KERNEL_NAME(vector_mul_real_kernel>), - dim3(block), - dim3(thread), - 0, - 0, - dim, - result_tmp, - vector_tmp, - constant); - - hipCheckOnDebug(); -} -template <> -void vector_mul_real_op, base_device::DEVICE_GPU>::operator()(const int dim, - std::complex* result, - const std::complex* vector, - const float constant) -{ - vector_mul_real_wrapper(dim, result, vector, constant); - - hipCheckOnDebug(); -} -template <> -void vector_mul_real_op, base_device::DEVICE_GPU>::operator()(const int dim, - std::complex* result, - const std::complex* vector, - const double constant) -{ - vector_mul_real_wrapper(dim, result, vector, constant); - - hipCheckOnDebug(); -} - -// vector operator: result[i] = vector[i] / constant -template <> -void vector_div_constant_op::operator()(const int& dim, - double* result, - const double* vector, - const double constant) -{ - int thread = 1024; - int block = (dim + thread - 1) / thread; - hipLaunchKernelGGL(HIP_KERNEL_NAME(vector_div_constant_kernel), - dim3(block), - dim3(thread), - 0, - 0, - dim, - result, - vector, - constant); - - hipCheckOnDebug(); -} - -template -inline void vector_div_constant_wrapper(const int& dim, - std::complex* result, - const std::complex* vector, - const FPTYPE constant) -{ - thrust::complex* result_tmp = reinterpret_cast*>(result); - const thrust::complex* vector_tmp = reinterpret_cast*>(vector); - int thread = 1024; - int block = (dim + thread - 1) / thread; - hipLaunchKernelGGL(HIP_KERNEL_NAME(vector_div_constant_kernel>), - dim3(block), - dim3(thread), - 0, - 0, - dim, - result_tmp, - vector_tmp, - constant); - - hipCheckOnDebug(); -} - -template <> -void vector_div_constant_op, base_device::DEVICE_GPU>::operator()(const int& dim, - std::complex* result, - const std::complex* vector, - const float constant) -{ - vector_div_constant_wrapper(dim, result, vector, constant); -} - -template <> -void vector_div_constant_op, base_device::DEVICE_GPU>::operator()(const int& dim, - std::complex* result, - const std::complex* vector, - const double constant) -{ - vector_div_constant_wrapper(dim, result, vector, constant); -} - -// vector operator: result[i] = vector1[i](not complex) * vector2[i](not complex) -template <> -void vector_mul_vector_op::operator()(const int& dim, - double* result, - const double* vector1, - const double* vector2, - const bool& add) -{ - int thread = 1024; - int block = (dim + thread - 1) / thread; - hipLaunchKernelGGL(HIP_KERNEL_NAME(vector_mul_vector_kernel), - dim3(block), - dim3(thread), - 0, - 0, - dim, - result, - vector1, - vector2, - add); - - hipCheckOnDebug(); -} - -// vector operator: result[i] = vector1[i](complex) * vector2[i](not complex) -template -inline void vector_mul_vector_complex_wrapper(const int& dim, - std::complex* result, - const std::complex* vector1, - const FPTYPE* vector2, - const bool& add) -{ - thrust::complex* result_tmp = reinterpret_cast*>(result); - const thrust::complex* vector1_tmp = reinterpret_cast*>(vector1); - int thread = 1024; - int block = (dim + thread - 1) / thread; - hipLaunchKernelGGL(HIP_KERNEL_NAME(vector_mul_vector_kernel>), - dim3(block), - dim3(thread), - 0, - 0, - dim, - result_tmp, - vector1_tmp, - vector2, - add); - - hipCheckOnDebug(); -} -template <> -void vector_mul_vector_op, base_device::DEVICE_GPU>::operator()(const int& dim, - std::complex* result, - const std::complex* vector1, - const float* vector2, - const bool& add) -{ - vector_mul_vector_complex_wrapper(dim, result, vector1, vector2, add); -} -template <> -void vector_mul_vector_op, base_device::DEVICE_GPU>::operator()( - const int& dim, - std::complex* result, - const std::complex* vector1, - const double* vector2, - const bool& add) -{ - vector_mul_vector_complex_wrapper(dim, result, vector1, vector2, add); -} - -// vector operator: result[i] = vector1[i](complex) / vector2[i](not complex) -template <> -void vector_div_vector_op::operator()(const int& dim, - double* result, - const double* vector1, - const double* vector2) -{ - int thread = 1024; - int block = (dim + thread - 1) / thread; - hipLaunchKernelGGL(HIP_KERNEL_NAME(vector_div_vector_kernel), - dim3(block), - dim3(thread), - 0, - 0, - dim, - result, - vector1, - vector2); - - hipCheckOnDebug(); -} -// vector operator: result[i] = vector1[i](complex) / vector2[i](not complex) -template -inline void vector_div_vector_op_complex_wrapper(const int& dim, - std::complex* result, - const std::complex* vector1, - const FPTYPE* vector2) -{ - thrust::complex* result_tmp = reinterpret_cast*>(result); - const thrust::complex* vector1_tmp = reinterpret_cast*>(vector1); - int thread = 1024; - int block = (dim + thread - 1) / thread; - hipLaunchKernelGGL(HIP_KERNEL_NAME(vector_div_vector_kernel>), - dim3(block), - dim3(thread), - 0, - 0, - dim, - result_tmp, - vector1_tmp, - vector2); - - hipCheckOnDebug(); -} -template <> -void vector_div_vector_op, base_device::DEVICE_GPU>::operator()(const int& dim, - std::complex* result, - const std::complex* vector1, - const float* vector2) -{ - vector_div_vector_op_complex_wrapper(dim, result, vector1, vector2); -} -template <> -void vector_div_vector_op, base_device::DEVICE_GPU>::operator()( - const int& dim, - std::complex* result, - const std::complex* vector1, - const double* vector2) -{ - vector_div_vector_op_complex_wrapper(dim, result, vector1, vector2); -} - -// vector operator: result[i] = vector1[i] * constant1 + vector2[i] * constant2 -template -void vector_add_vector_op::operator()(const int& dim, - T* result, - const T* vector1, - const Real constant1, - const T* vector2, - const Real constant2) -{ - using Type = typename GetTypeThrust::type; - using Real = typename GetTypeReal::type; - - auto result_tmp = reinterpret_cast(result); - auto vector1_tmp = reinterpret_cast(vector1); - auto vector2_tmp = reinterpret_cast(vector2); - - int thread = 1024; - int block = (dim + thread - 1) / thread; - constantvector_addORsub_constantVector_kernel - <<>>(dim, result_tmp, vector1_tmp, constant1, vector2_tmp, constant2); - - hipCheckOnDebug(); -} - -template <> -double dot_real_op::operator()(const int& dim, - const double* psi_L, - const double* psi_R, - const bool reduce) -{ - double result = 0.0; - xdot_wrapper(dim, psi_L, 1, psi_R, 1, result); - if (reduce) - { - Parallel_Reduce::reduce_pool(result); - } - return result; -} - -// for this implementation, please check -// https://thrust.github.io/doc/group__transformed__reductions_ga321192d85c5f510e52300ae762c7e995.html denghui modify -// 2022-10-03 Note that ddot_(2*dim,a,1, b,1) = REAL( zdotc_(dim,a,1,b,1) ) GPU specialization of actual -// computation. -template -inline FPTYPE dot_complex_wrapper(const int& dim, - const std::complex* psi_L, - const std::complex* psi_R, - const bool reduce) -{ - //<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< - // denghui modify 2022-10-07 - // Note that ddot_(2*dim,a,1,b,1) = REAL( zdotc_(dim,a,1,b,1) ) - const FPTYPE* pL = reinterpret_cast(psi_L); - const FPTYPE* pR = reinterpret_cast(psi_R); - FPTYPE result = 0.0; - xdot_wrapper(dim * 2, pL, 1, pR, 1, result); - if (reduce) - { - Parallel_Reduce::reduce_pool(result); - } - return result; -} -template <> -float dot_real_op, base_device::DEVICE_GPU>::operator()(const int& dim, - const std::complex* psi_L, - const std::complex* psi_R, - const bool reduce) -{ - return dot_complex_wrapper(dim, psi_L, psi_R, reduce); -} -template <> -double dot_real_op, base_device::DEVICE_GPU>::operator()(const int& dim, - const std::complex* psi_L, - const std::complex* psi_R, - const bool reduce) -{ - return dot_complex_wrapper(dim, psi_L, psi_R, reduce); -} - -// Explicitly instantiate functors for the types of functor registered. -template struct vector_mul_real_op, base_device::DEVICE_GPU>; -template struct vector_mul_real_op; -template struct vector_mul_real_op, base_device::DEVICE_GPU>; - -template struct vector_div_constant_op, base_device::DEVICE_GPU>; -template struct vector_div_constant_op; -template struct vector_div_constant_op, base_device::DEVICE_GPU>; - -template struct vector_mul_vector_op; -template struct vector_mul_vector_op, base_device::DEVICE_GPU>; -template struct vector_mul_vector_op; -template struct vector_mul_vector_op, base_device::DEVICE_GPU>; -template struct vector_div_vector_op, base_device::DEVICE_GPU>; -template struct vector_div_vector_op; -template struct vector_div_vector_op, base_device::DEVICE_GPU>; - -template struct vector_add_vector_op; -template struct vector_add_vector_op, base_device::DEVICE_GPU>; -template struct vector_add_vector_op; -template struct vector_add_vector_op, base_device::DEVICE_GPU>; - -template struct dot_real_op, base_device::DEVICE_GPU>; -template struct dot_real_op; -template struct dot_real_op, base_device::DEVICE_GPU>; -} // namespace ModuleBase \ No newline at end of file diff --git a/source/module_base/kernels/rocm/math_ylm_op.hip.cu b/source/module_base/kernels/rocm/math_ylm_op.hip.cu deleted file mode 100644 index 8cfdac4a39..0000000000 --- a/source/module_base/kernels/rocm/math_ylm_op.hip.cu +++ /dev/null @@ -1,157 +0,0 @@ -#include "module_base/kernels/math_ylm_op.h" - -#include -#include - -namespace ModuleBase { - -#define THREADS_PER_BLOCK 256 - -template -__device__ __inline__ -FPTYPE __fact(const int n) { - FPTYPE f = 1.0; - for (int i = n; i > 1; i--) { - f *= i; - } - return f; -} - -__device__ __inline__ -int __semi_fact(const int n) -{ - int semif = 1; - for (int i = n; i > 2; i -= 2) - { - semif *= i; - } - return semif; -} - -template -__global__ void cal_ylm_real( - const int ng, - const int lmax, - const FPTYPE SQRT2, - const FPTYPE PI, - const FPTYPE PI_HALF, - const FPTYPE FOUR_PI, - const FPTYPE SQRT_INVERSE_FOUR_PI, - const FPTYPE *g, - FPTYPE * p, - FPTYPE * ylm) -{ - int ig = blockIdx.x * blockDim.x + threadIdx.x; - if (ig >= ng) {return;} - - FPTYPE cost = 0.0, phi = 0.0; - //---------------------------------------------------------- - // EXPLAIN : if lmax = 1,only use Y00 , output result. - //---------------------------------------------------------- - if (lmax == 0) { - ylm[0 * ng + ig] = SQRT_INVERSE_FOUR_PI; - return; - } - //---------------------------------------------------------- - // LOCAL VARIABLES : - // NAME : cost = cos(theta),theta and phi are polar angles - // NAME : phi - //---------------------------------------------------------- - const FPTYPE gmod = sqrt(g[ig * 3 + 0] * g[ig * 3 + 0] + g[ig * 3 + 1] * g[ig * 3 + 1] + g[ig * 3 + 2] * g[ig * 3 + 2]); - cost = gmod < 1.0e-9 ? 0.0 : g[ig * 3 + 2] / gmod; - // beware the arc tan, it is defined modulo pi - if (g[ig * 3 + 0] > 1.0e-9) { - phi = atan(g[ig * 3 + 1] / g[ig * 3 + 0]); - } - else if (g[ig * 3 + 0] < -1.e-9) { - phi = atan(g[ig * 3 + 1] / g[ig * 3 + 0]) + PI; - } - else { - phi = PI_HALF * ((g[ig * 3 + 1] >= 0.0) ? 1.0 : -1.0); //HLX: modified on 10/13/2006 - } // end if - //========================================================== - // NAME : p(Legendre Polynomials) (0 <= m <= l) - //========================================================== - int lm = -1; - for (int l = 0; l <= lmax; l++) { - const FPTYPE c = sqrt((2 * l + 1) / FOUR_PI); - if (l == 0) { - p[0 * (lmax + 1) * ng + 0 * ng + ig] = 1.0; - } - else if (l == 1) { - p[0 * (lmax + 1) * ng + 1 * ng + ig] = cost; - FPTYPE var = (1.0 - cost * cost) > 0.0 ? (1.0 - cost * cost) : 0.0; - p[1 * (lmax + 1) * ng + 1 * ng + ig] = -sqrt(var); - } - else { - const int l1 = l - 1, - l2 = l - 2, - l3 = 2 * l - 1; - // recursion on l for P(:,l,m) - for (int m = 0; m <= l2; m++) { // do m = 0, l - 2//mohan modify 2007-10-13 - p[m * (lmax + 1) * ng + l * ng + ig] = - (cost * l3 * p[m * (lmax + 1) * ng + l1 * ng + ig] - - (l1 + m) * p[m * (lmax + 1) * ng + l2 * ng + ig]) / (l - m); - } // end do - p[l1 * (lmax + 1) * ng + l * ng + ig] = - cost * l3 * p[l1 * (lmax + 1) * ng + l1 * ng + ig]; - FPTYPE x2 = (1.0 - cost * cost) > 0.0 ? (1.0 - cost * cost) : 0.0; - p[l * (lmax + 1) * ng + l * ng + ig] = __semi_fact(l3) * pow(x2, static_cast(l) / 2.0);//mohan modify 2007-10-13 - if (l % 2 == 1) { - p[l * (lmax + 1) * ng + l * ng + ig] *= -1; - } - } // end if - - // Y_lm, m = 0 - ++lm; - ylm[lm * ng + ig] = c * p[0 * (lmax + 1) * ng + l * ng + ig]; - - for (int m = 1; m <= l; m++) { - // Y_lm, m > 0 - const FPTYPE same = - c * sqrt(__fact(l - m) / - __fact(l + m)) * SQRT2; - - ++lm; - ylm[lm * ng + ig] = same * p[m * (lmax + 1) * ng + l * ng + ig] * cos(m * phi); - - // Y_lm, m < 0 - ++lm; - ylm[lm * ng + ig] = same * p[m * (lmax + 1) * ng + l * ng + ig] * sin(m * phi); - } - }// end do -} - -template -void cal_ylm_real_op::operator()(const base_device::DEVICE_GPU* ctx, - const int& ng, - const int& lmax, - const FPTYPE& SQRT2, - const FPTYPE& PI, - const FPTYPE& PI_HALF, - const FPTYPE& FOUR_PI, - const FPTYPE& SQRT_INVERSE_FOUR_PI, - const FPTYPE* g, - FPTYPE* p, - FPTYPE* ylm) -{ - int block = (ng + THREADS_PER_BLOCK - 1) / THREADS_PER_BLOCK; - hipLaunchKernelGGL(HIP_KERNEL_NAME(cal_ylm_real), dim3(block), dim3(THREADS_PER_BLOCK), 0, 0, - ng, - lmax, - SQRT2, - PI, - PI_HALF, - FOUR_PI, - SQRT_INVERSE_FOUR_PI, - g, - p, - ylm); - - hipCheckOnDebug(); -} - -template struct cal_ylm_real_op; -template struct cal_ylm_real_op; - -} // namespace ModuleBase diff --git a/source/module_base/kernels/test/CMakeLists.txt b/source/module_base/kernels/test/CMakeLists.txt deleted file mode 100644 index fc5b49a33a..0000000000 --- a/source/module_base/kernels/test/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -remove_definitions(-D__MPI) - -AddTest( - TARGET MODULE_BASE_KERNELS_Unittests - LIBS parameter ${math_libs} base device - SOURCES math_ylm_op_test.cpp math_kernel_test.cpp -) diff --git a/source/module_base/kernels/test/math_kernel_test.cpp b/source/module_base/kernels/test/math_kernel_test.cpp deleted file mode 100644 index 38a7b6f9d9..0000000000 --- a/source/module_base/kernels/test/math_kernel_test.cpp +++ /dev/null @@ -1,730 +0,0 @@ -#include "module_base/blas_connector.h" -#include "module_base/constants.h" -#include "module_base/module_device/memory_op.h" -#include "module_base/kernels/math_kernel_op.h" - -#include -#include -#include - -class TestModuleHsolverMathKernel : public ::testing::Test -{ - protected: - // xx = tf.random.uniform([100], minval=-4, maxval=4, dtype = tf.float64) - std::vector> psi_L = {{-0.65412617, -0.74208893}, - {-2.21731157, 0.42540039}, - {3.36373004, -2.51647562}, - {-2.985111, -0.53251562}, - {0.37908265, 0.81605825}, - {1.66281318, 2.71761869}, - {2.2010268, 0.65498149}, - {1.51153638, 0.71501482}, - {0.53546578, 1.4564317}, - {-2.36701143, 1.23009056}, - {3.41302551, -2.3175205}, - {-0.27628221, -1.35701656}}; - - std::vector> psi_R = {{-1.67837557e-01, -1.70017454e-01}, - {-2.92128115e-02, 2.82765887e-01}, - {-8.71641062e-02, -1.15934278e-01}, - {3.36269232e+00, -1.44692661e-02}, - {-3.81342874e-03, -1.58276988e-01}, - {2.33504238e-01, -1.93195840e-03}, - {2.45520665e-01, 6.46854620e-01}, - {1.58255340e+00, 2.70915699e+00}, - {-1.66142311e-01, 6.27839507e-02}, - {2.17077193e+00, 4.87104731e-01}, - {1.41257916e+00, 5.45282609e-01}, - {-1.29333636e-01, -5.04228492e-03}}; - - const int dim = psi_L.size(); - - const double expected_result = -5.0016151713691288; - - const base_device::DEVICE_CPU* cpu_ctx = {}; - const base_device::DEVICE_GPU* gpu_ctx = {}; - - void SetUp() override - { - } - void TearDown() override - { - } - - using zdot_real_cpu_op = ModuleBase::dot_real_op, base_device::DEVICE_CPU>; - using zdot_real_gpu_op = ModuleBase::dot_real_op, base_device::DEVICE_GPU>; - - using resize_memory_op = base_device::memory::resize_memory_op, base_device::DEVICE_GPU>; - using delete_memory_op = base_device::memory::delete_memory_op, base_device::DEVICE_GPU>; - // from CPU to GPU - using synchronize_memory_op = base_device::memory:: - synchronize_memory_op, base_device::DEVICE_GPU, base_device::DEVICE_CPU>; - - // form GPU to CPU by haozhihan - using synchronize_memory_op_gpu = base_device::memory:: - synchronize_memory_op, base_device::DEVICE_CPU, base_device::DEVICE_GPU>; - - // about double operator by haozhihan - using resize_memory_op_double = base_device::memory::resize_memory_op; - using delete_memory_op_double = base_device::memory::delete_memory_op; - using synchronize_memory_op_double - = base_device::memory::synchronize_memory_op; - - // haozhihan add - // cpu operator - using vector_mul_real_op_cpu = ModuleBase::vector_mul_real_op, base_device::DEVICE_CPU>; - using vector_mul_vector_op_cpu = ModuleBase::vector_mul_vector_op, base_device::DEVICE_CPU>; - using vector_div_vector_op_cpu = ModuleBase::vector_div_vector_op, base_device::DEVICE_CPU>; - using vector_add_vector_op_cpu - = ModuleBase::vector_add_vector_op, base_device::DEVICE_CPU>; - using axpy_op_cpu = ModuleBase::axpy_op, base_device::DEVICE_CPU>; - using scal_op_cpu = ModuleBase::scal_op; - using gemv_op_cpu = ModuleBase::gemv_op, base_device::DEVICE_CPU>; - // gpu operator - using vector_mul_real_op_gpu = ModuleBase::vector_mul_real_op, base_device::DEVICE_GPU>; - using vector_mul_vector_op_gpu = ModuleBase::vector_mul_vector_op, base_device::DEVICE_GPU>; - using vector_div_vector_op_gpu = ModuleBase::vector_div_vector_op, base_device::DEVICE_GPU>; - using vector_add_vector_op_gpu - = ModuleBase::vector_add_vector_op, base_device::DEVICE_GPU>; - using axpy_op_gpu = ModuleBase::axpy_op, base_device::DEVICE_GPU>; - using scal_op_gpu = ModuleBase::scal_op; - using gemv_op_gpu = ModuleBase::gemv_op, base_device::DEVICE_GPU>; - - // haozhihan add - std::vector> L = {{-0.65412617, -0.74208893}, - {-2.21731157, 0.42540039}, - {3.36373004, -2.51647562}, - {-2.985111, -0.53251562}, - {0.37908265, 0.81605825}, - {1.66281318, 2.71761869}, - {2.2010268, 0.65498149}, - {1.51153638, 0.71501482}, - {0.53546578, 1.4564317}, - {-2.36701143, 1.23009056}, - {3.41302551, -2.3175205}, - {-0.27628221, -1.35701656}}; - - std::vector> R = {{-1.67837557e-01, -1.70017454e-01}, - {-2.92128115e-02, 2.82765887e-01}, - {-8.71641062e-02, -1.15934278e-01}, - {3.36269232e+00, -1.44692661e-02}, - {-3.81342874e-03, -1.58276988e-01}, - {2.33504238e-01, -1.93195840e-03}, - {2.45520665e-01, 6.46854620e-01}, - {1.58255340e+00, 2.70915699e+00}, - {-1.66142311e-01, 6.27839507e-02}, - {2.17077193e+00, 4.87104731e-01}, - {1.41257916e+00, 5.45282609e-01}, - {-1.29333636e-01, -5.04228492e-03}}; - - // (1) for test vector_mul_real_op - const std::vector> input = L; - const double constant = 5.5; - const std::vector> output_vector_mul_real_op = {{-0.11893203, -0.13492526}, - {-0.40314756, 0.07734553}, - {0.61158728, -0.45754102}, - {-0.54274745, -0.09682102}, - {0.06892412, 0.14837423}, - {0.30232967, 0.49411249}, - {0.40018669, 0.11908754}, - {0.27482480, 0.13000269}, - {0.09735741, 0.26480576}, - {-0.43036571, 0.22365283}, - {0.62055009, -0.42136736}, - {-0.05023313, -0.24673028}}; - - // (2) for test vector_mul_vector_op & vector_div_vector_op - const std::vector input_double = { - -0.65412617, - -0.74208893, - -2.21731157, - 0.42540039, - 3.36373004, - -2.51647562, - -2.985111, - -0.53251562, - 0.37908265, - 0.81605825, - 1.66281318, - 2.71761869, - }; - const std::vector> output_vector_mul_vector_op = {{0.42788105, 0.48541979}, - {1.64544237, -0.31568492}, - {-7.45843754, 5.57981051}, - {-1.26986738, -0.22653235}, - {1.27513170, 2.74499965}, - {-4.18442883, -6.83882118}, - {-6.57030931, -1.95519245}, - {-0.80491673, -0.38075656}, - {0.20298579, 0.55210799}, - {-1.93161921, 1.00382555}, - {5.67522380, -3.85360363}, - {-0.75082970, -3.68785357}}; - - const std::vector> output_vector_div_vector_op = {{1.00000000, 1.13447369}, - {2.98793242, -0.57324718}, - {-1.51703084, 1.13492197}, - {-7.01717974, -1.25179862}, - {0.11269711, 0.24260516}, - {-0.66077063, -1.07993047}, - {-0.73733499, -0.21941613}, - {-2.83848271, -1.34271145}, - {1.41253043, 3.84198987}, - {-2.90054225, 1.50735632}, - {2.05256102, -1.39373474}, - {-0.10166335, -0.49934031}}; - - // (3) for test vector_add_vector_op - const double constant1 = 6.6; - const double constant2 = 4.4; - const std::vector> input1 = L; - const std::vector> input2 = R; - const std::vector> output_vector_add_vector_op - = {{-5.05571797, -5.64586374}, - {-14.76279273, 4.05181248}, - {21.81709620, -17.11884992}, - {-4.90588639, -3.57826786}, - {2.48516640, 4.68956570}, - {12.00198564, 17.92778274}, - {15.60706781, 7.16903816}, - {16.93937507, 16.63938857}, - {2.80304798, 9.88869860}, - {-6.07087895, 10.26185851}, - {28.74131667, -12.89639182}, - {-2.39253058, -8.97849535}}; - - // (4) for test axpy_op (compute Y = alpha * X + Y ) - const std::complex alpha_axpy{-1.5, -2.5}; - const std::vector> X_axpy = L; - std::vector> Y_axpy = R; - - const std::vector> output_axpy_op = {{-1.04187063, 2.57843137}, - {4.36025552, 5.18794423}, - {-11.42394822, -4.75054595}, - {6.50906977, 8.24708166}, - {1.46770822, -2.33007099}, - {4.53333119, -8.23539294}, - {-1.41856581, -5.83818462}, - {1.10278588, -2.14220619}, - {2.67173827, -3.46052805}, - {8.79651547, 4.55949747}, - {-9.50076036, -4.51100042}, - {-3.10745172, 2.72118808}}; - - // (5) for test scal_op (x = alpha * x) - const std::complex alpha_scal{-1.5, -2.5}; - std::vector> X_scal = L; - - const std::vector> output_scal_op = {{-0.87403307, 2.74844882}, - {4.38946833, 4.90517834}, - {-11.33678411, -4.63461167}, - {3.14637745, 8.26155093}, - {1.47152165, -2.17179400}, - {4.29982696, -8.23346099}, - {-1.66408648, -6.48503924}, - {-0.47976752, -4.85136318}, - {2.83788058, -3.52331200}, - {6.62574354, 4.07239273}, - {-10.91333952, -5.05628302}, - {-2.97811808, 2.72623036}}; - - // (6) for test gemv_op ( y = alpha * op(A) * x + beta * y ) - const std::vector> A_gemv = {// 2 * 3 - {-0.87403307, 2.74844882}, - {4.38946833, 4.90517834}, - {-11.33678411, -4.63461167}, - {3.14637745, 8.26155093}, - {1.47152165, -2.17179400}, - {4.29982696, -8.23346099}}; - - const std::vector> X_gemv = {// 2 * 1 - {-0.87403307, 2.74844882}, - {4.38946833, 4.90517834}}; - - std::vector> Y_gemv = {// 3 * 1 - {1.47152165, -2.17179400}, - {4.29982696, -8.23346099}, - {3.14637745, 8.26155093}}; - - std::vector> Y_test_gemv = {// 3 * 1 - {1.47152165, -2.17179400}, - {4.29982696, -8.23346099}, - {3.14637745, 8.26155093}}; -}; - -// template -// FPTYPE zdot_real(const int &dim, const std::complex* psi_L, const std::complex* psi_R, const -// base_device::AbacusDevice_t device = base_device::CpuDevice, const bool reduce = true); -TEST_F(TestModuleHsolverMathKernel, zdot_real_op_cpu) -{ - double result = zdot_real_cpu_op()(dim, psi_L.data(), psi_R.data(), false); - EXPECT_LT(fabs(result - expected_result), 1e-12); -} - -TEST_F(TestModuleHsolverMathKernel, vector_mul_real_op_cpu) -{ - std::vector> output(input.size()); - vector_mul_real_op_cpu()(dim, output.data(), input.data(), 1.0 / constant); - for (int i = 0; i < input.size(); i++) - { - EXPECT_LT(fabs(output[i].imag() - output_vector_mul_real_op[i].imag()), 1e-8); - EXPECT_LT(fabs(output[i].real() - output_vector_mul_real_op[i].real()), 1e-8); - } -} - -TEST_F(TestModuleHsolverMathKernel, vector_mul_vector_op_cpu) -{ - std::vector> output(input.size()); - vector_mul_vector_op_cpu()(dim, output.data(), input.data(), input_double.data()); - for (int i = 0; i < input.size(); i++) - { - EXPECT_LT(fabs(output[i].imag() - output_vector_mul_vector_op[i].imag()), 1e-8); - EXPECT_LT(fabs(output[i].real() - output_vector_mul_vector_op[i].real()), 1e-8); - } -} - -TEST_F(TestModuleHsolverMathKernel, vector_div_vector_op_cpu) -{ - std::vector> output(input.size()); - vector_div_vector_op_cpu()(dim, output.data(), input.data(), input_double.data()); - for (int i = 0; i < input.size(); i++) - { - EXPECT_LT(fabs(output[i].imag() - output_vector_div_vector_op[i].imag()), 1e-8); - EXPECT_LT(fabs(output[i].real() - output_vector_div_vector_op[i].real()), 1e-8); - } -} - -TEST_F(TestModuleHsolverMathKernel, vector_add_vector_op_cpu) -{ - std::vector> output(input.size()); - vector_add_vector_op_cpu()(dim, - output.data(), - input1.data(), - constant1, - input2.data(), - constant2); - for (int i = 0; i < input.size(); i++) - { - EXPECT_LT(fabs(output[i].imag() - output_vector_add_vector_op[i].imag()), 1e-8); - EXPECT_LT(fabs(output[i].real() - output_vector_add_vector_op[i].real()), 1e-8); - } -} - -TEST_F(TestModuleHsolverMathKernel, axpy_op_cpu) -{ - axpy_op_cpu()(dim, &alpha_axpy, X_axpy.data(), 1, Y_axpy.data(), 1); - for (int i = 0; i < input.size(); i++) - { - EXPECT_LT(fabs(Y_axpy[i].imag() - output_axpy_op[i].imag()), 1e-8); - EXPECT_LT(fabs(Y_axpy[i].real() - output_axpy_op[i].real()), 1e-8); - } -} - -TEST_F(TestModuleHsolverMathKernel, scal_op_cpu) -{ - scal_op_cpu()(dim, &alpha_scal, X_scal.data(), 1); - for (int i = 0; i < input.size(); i++) - { - EXPECT_LT(fabs(X_scal[i].imag() - output_scal_op[i].imag()), 1e-8); - EXPECT_LT(fabs(X_scal[i].real() - output_scal_op[i].real()), 1e-8); - } -} - -TEST_F(TestModuleHsolverMathKernel, gemv_op_cpu) -{ - gemv_op_cpu()('C', - 2, - 3, - &ModuleBase::ONE, - A_gemv.data(), - 2, - X_gemv.data(), - 1, - &ModuleBase::ONE, - Y_gemv.data(), - 1); - char trans = 'C'; - int inc = 1; - int row = 2; - int col = 3; - zgemv_(&trans, - &row, - &col, - &ModuleBase::ONE, - A_gemv.data(), - &row, - X_gemv.data(), - &inc, - &ModuleBase::ONE, - Y_test_gemv.data(), - &inc); - for (int i = 0; i < Y_gemv.size(); i++) - { - EXPECT_LT(fabs(Y_gemv[i].imag() - Y_test_gemv[i].imag()), 1e-12); - EXPECT_LT(fabs(Y_gemv[i].real() - Y_test_gemv[i].real()), 1e-12); - } -} - -#if __UT_USE_CUDA || __UT_USE_ROCM -TEST_F(TestModuleHsolverMathKernel, zdot_real_op_gpu) -{ - std::complex*psi_L_dev = NULL, *psi_R_dev = NULL; - resize_memory_op()(psi_L_dev, psi_L.size()); - resize_memory_op()(psi_R_dev, psi_R.size()); - synchronize_memory_op()(psi_L_dev, psi_L.data(), psi_L.size()); - synchronize_memory_op()(psi_R_dev, psi_R.data(), psi_R.size()); - ModuleBase::createGpuBlasHandle(); - double result = zdot_real_gpu_op()(dim, psi_L_dev, psi_R_dev, false); - ModuleBase::destoryBLAShandle(); - EXPECT_LT(fabs(result - expected_result), 1e-12); - delete_memory_op()(psi_L_dev); - delete_memory_op()(psi_R_dev); -} - -TEST_F(TestModuleHsolverMathKernel, vector_mul_real_op_gpu) -{ - // in CPU - std::vector> output(input.size()); - // in GPU - std::complex* input_dev = NULL; - std::complex* output_dev = NULL; - resize_memory_op()(input_dev, input.size()); - resize_memory_op()(output_dev, input.size()); - // syn the input data in CPU to GPU - synchronize_memory_op()(input_dev, input.data(), input.size()); - // run - vector_mul_real_op_gpu()(dim, output_dev, input_dev, 1.0 / constant); - // syn the output data in GPU to CPU - synchronize_memory_op_gpu()(output.data(), output_dev, output.size()); - - for (int i = 0; i < input.size(); i++) - { - EXPECT_LT(fabs(output[i].imag() - output_vector_mul_real_op[i].imag()), 1e-8); - EXPECT_LT(fabs(output[i].real() - output_vector_mul_real_op[i].real()), 1e-8); - } - delete_memory_op()(input_dev); - delete_memory_op()(output_dev); -} - -TEST_F(TestModuleHsolverMathKernel, vector_mul_vector_op_gpu) -{ - // in CPU - std::vector> output(input.size()); - - // in GPU - std::complex* input_dev = NULL; - double* input_double_dev = NULL; - std::complex* output_dev = NULL; - - // resize memory for values - resize_memory_op()(input_dev, input.size()); - resize_memory_op_double()(input_double_dev, input.size()); - resize_memory_op()(output_dev, input.size()); - - // syn the input data in CPU to GPU - synchronize_memory_op()(input_dev, input.data(), input.size()); - synchronize_memory_op_double()(input_double_dev, input_double.data(), input.size()); - - // run - vector_mul_vector_op_gpu()(dim, output_dev, input_dev, input_double_dev); - - // syn the output data in GPU to CPU - synchronize_memory_op_gpu()(output.data(), output_dev, output.size()); - - for (int i = 0; i < input.size(); i++) - { - EXPECT_LT(fabs(output[i].imag() - output_vector_mul_vector_op[i].imag()), 1e-8); - EXPECT_LT(fabs(output[i].real() - output_vector_mul_vector_op[i].real()), 1e-8); - } - - delete_memory_op()(input_dev); - delete_memory_op_double()(input_double_dev); - delete_memory_op()(output_dev); -} - -TEST_F(TestModuleHsolverMathKernel, vector_div_vector_op_gpu) -{ - // in CPU - std::vector> output(input.size()); - - // in GPU - std::complex* input_dev = NULL; - double* input_double_dev = NULL; - std::complex* output_dev = NULL; - - // resize memory for values in GPU - resize_memory_op()(input_dev, input.size()); - resize_memory_op_double()(input_double_dev, input.size()); - resize_memory_op()(output_dev, input.size()); - - // syn the input data in CPU to GPU - synchronize_memory_op()(input_dev, input.data(), input.size()); - synchronize_memory_op_double()(input_double_dev, input_double.data(), input.size()); - - // run - vector_div_vector_op_gpu()(dim, output_dev, input_dev, input_double_dev); - - // syn the output data in GPU to CPU - synchronize_memory_op_gpu()(output.data(), output_dev, output.size()); - - for (int i = 0; i < input.size(); i++) - { - EXPECT_LT(fabs(output[i].imag() - output_vector_div_vector_op[i].imag()), 1e-8); - EXPECT_LT(fabs(output[i].real() - output_vector_div_vector_op[i].real()), 1e-8); - } - - delete_memory_op()(input_dev); - delete_memory_op_double()(input_double_dev); - delete_memory_op()(output_dev); -} - -TEST_F(TestModuleHsolverMathKernel, vector_add_vector_op_gpu) -{ - // in CPU - std::vector> output(input.size()); - - // in GPU - std::complex* input1_dev = NULL; - std::complex* input2_dev = NULL; - std::complex* output_dev = NULL; - - // resize memory for values in GPU - resize_memory_op()(input1_dev, input.size()); - resize_memory_op()(input2_dev, input.size()); - resize_memory_op()(output_dev, input.size()); - - // syn the input data in CPU to GPU - synchronize_memory_op()(input1_dev, input1.data(), input.size()); - synchronize_memory_op()(input2_dev, input2.data(), input.size()); - - // run - vector_add_vector_op_gpu()(dim, - output_dev, - input1_dev, - constant1, - input2_dev, - constant2); - - // syn the output data in GPU to CPU - synchronize_memory_op_gpu()(output.data(), output_dev, output.size()); - - for (int i = 0; i < input.size(); i++) - { - EXPECT_LT(fabs(output[i].imag() - output_vector_add_vector_op[i].imag()), 1e-8); - EXPECT_LT(fabs(output[i].real() - output_vector_add_vector_op[i].real()), 1e-8); - } - - delete_memory_op()(input1_dev); - delete_memory_op()(input2_dev); - delete_memory_op()(output_dev); -} - -TEST_F(TestModuleHsolverMathKernel, axpy_op_gpu) -{ - // in GPU - std::complex* X_axpy_dev = NULL; - std::complex* Y_axpy_dev = NULL; - - // resize memory for values in GPU - resize_memory_op()(X_axpy_dev, X_axpy.size()); - resize_memory_op()(Y_axpy_dev, Y_axpy.size()); - - // syn the input data in CPU to GPU - synchronize_memory_op()(X_axpy_dev, X_axpy.data(), X_axpy.size()); - synchronize_memory_op()(Y_axpy_dev, Y_axpy.data(), Y_axpy.size()); - - // run - ModuleBase::createGpuBlasHandle(); - axpy_op_gpu()(dim, &alpha_axpy, X_axpy_dev, 1, Y_axpy_dev, 1); - ModuleBase::destoryBLAShandle(); - - // syn the output data in GPU to CPU - synchronize_memory_op_gpu()(Y_axpy.data(), Y_axpy_dev, Y_axpy.size()); - - for (int i = 0; i < input.size(); i++) - { - EXPECT_LT(fabs(Y_axpy[i].imag() - output_axpy_op[i].imag()), 1e-8); - EXPECT_LT(fabs(Y_axpy[i].real() - output_axpy_op[i].real()), 1e-8); - } - - delete_memory_op()(X_axpy_dev); - delete_memory_op()(Y_axpy_dev); -} - -TEST_F(TestModuleHsolverMathKernel, scal_op_gpu) -{ - // in GPU - std::complex* X_scal_dev = NULL; - - // resize memory for values in GPU - resize_memory_op()(X_scal_dev, X_scal.size()); - - // syn the input data in CPU to GPU - synchronize_memory_op()(X_scal_dev, X_scal.data(), X_scal.size()); - - // run - ModuleBase::createGpuBlasHandle(); - scal_op_gpu()(dim, &alpha_scal, X_scal_dev, 1); - ModuleBase::destoryBLAShandle(); - - // syn the output data in GPU to CPU - synchronize_memory_op_gpu()(X_scal.data(), X_scal_dev, X_scal.size()); - - for (int i = 0; i < input.size(); i++) - { - EXPECT_LT(fabs(X_scal[i].imag() - output_scal_op[i].imag()), 1e-8); - EXPECT_LT(fabs(X_scal[i].real() - output_scal_op[i].real()), 1e-8); - } - delete_memory_op()(X_scal_dev); -} - -TEST_F(TestModuleHsolverMathKernel, gemv_op_gpu) -{ - // in GPU - std::complex* A_gemv_dev = NULL; - std::complex* X_gemv_dev = NULL; - std::complex* Y_gemv_dev = NULL; - - // resize memory for values in GPU - resize_memory_op()(A_gemv_dev, A_gemv.size()); - resize_memory_op()(X_gemv_dev, X_gemv.size()); - resize_memory_op()(Y_gemv_dev, Y_gemv.size()); - - // syn the input data in CPU to GPU - synchronize_memory_op()(A_gemv_dev, A_gemv.data(), A_gemv.size()); - synchronize_memory_op()(X_gemv_dev, X_gemv.data(), X_gemv.size()); - synchronize_memory_op()(Y_gemv_dev, Y_gemv.data(), Y_gemv.size()); - - // run - ModuleBase::createGpuBlasHandle(); - gemv_op_gpu()('C', 2, 3, &ModuleBase::ONE, A_gemv_dev, 2, X_gemv_dev, 1, &ModuleBase::ONE, Y_gemv_dev, 1); - ModuleBase::destoryBLAShandle(); - // syn the output data in GPU to CPU - synchronize_memory_op_gpu()(Y_gemv.data(), Y_gemv_dev, Y_gemv.size()); - - // cal right answer: Y_test_gemv - char trans = 'C'; - int inc = 1; - int row = 2; - int col = 3; - zgemv_(&trans, - &row, - &col, - &ModuleBase::ONE, - A_gemv.data(), - &row, - X_gemv.data(), - &inc, - &ModuleBase::ONE, - Y_test_gemv.data(), - &inc); - - for (int i = 0; i < Y_gemv.size(); i++) - { - EXPECT_LT(fabs(Y_gemv[i].imag() - Y_test_gemv[i].imag()), 1e-12); - EXPECT_LT(fabs(Y_gemv[i].real() - Y_test_gemv[i].real()), 1e-12); - } - - delete_memory_op()(A_gemv_dev); - delete_memory_op()(X_gemv_dev); - delete_memory_op()(Y_gemv_dev); -} - -TEST_F(TestModuleHsolverMathKernel, matrixCopy_op_gpu) -{ - // const std::vector > expect_result = { - // {-0.11893203,-0.13492526}, {-0.40314756, 0.07734553}, {0.06892412, 0.14837423}, {0.0, 0.0}, - // {0.61158728, -0.45754102}, {-0.54274745,-0.09682102}, {0.30232967, 0.49411249}, {0.0, 0.0} - // }; - - const std::vector> A = {{-0.11893203, -0.13492526}, - {-0.40314756, 0.07734553}, - {0.06892412, 0.14837423}, - {0.61158728, -0.45754102}, - {-0.54274745, -0.09682102}, - {0.30232967, 0.49411249}}; - - const std::vector> B(8); - - int n = 2; - int LDA = 3; - int LDB = 4; - - std::complex* device_A = nullptr; - base_device::memory::resize_memory_op, base_device::DEVICE_GPU>()(device_A, A.size()); - base_device::memory:: - synchronize_memory_op, base_device::DEVICE_GPU, base_device::DEVICE_CPU>()(device_A, - A.data(), - A.size()); - - std::complex* device_B = nullptr; - base_device::memory::resize_memory_op, base_device::DEVICE_GPU>()(device_B, B.size()); - base_device::memory:: - synchronize_memory_op, base_device::DEVICE_GPU, base_device::DEVICE_CPU>()(device_B, - B.data(), - B.size()); - - // run - ModuleBase::matrixCopy, base_device::DEVICE_GPU>()(n, LDA, device_A, LDA, device_B, LDB); - - std::vector> B_gpu2cpu(8); - base_device::memory::synchronize_memory_op, - base_device::DEVICE_CPU, - base_device::DEVICE_GPU>()(B_gpu2cpu.data(), device_B, B_gpu2cpu.size()); - - std::vector> B_cpu(8); - ModuleBase::matrixCopy, base_device::DEVICE_CPU>()(n, LDA, A.data(), LDA, B_cpu.data(), LDB); - - // for (int i = 0; i < 4; i++) - // { - // for (int j = 0; j < 2; j++) - // { - // std::cout << B_gpu2cpu[i * 2 + j]; - // } - // std::cout << std::endl; - // } - // std::cout << std::endl; - - // for (int i = 0; i < 4; i++) - // { - // for (int j = 0; j < 2; j++) - // { - // std::cout << B_cpu[i * 2 + j]; - // } - // std::cout << std::endl; - // } - - for (int i = 0; i < B_cpu.size(); i++) - { - EXPECT_LT(fabs(B_gpu2cpu[i].imag() - B_cpu[i].imag()), 1e-12); - EXPECT_LT(fabs(B_gpu2cpu[i].real() - B_cpu[i].real()), 1e-12); - } - - delete_memory_op()(device_A); - delete_memory_op()(device_B); -} - -#endif // __UT_USE_CUDA || __UT_USE_ROCM - -/* -#if __UT_USE_ROCM -TEST_F(TestGelu, gelu_gpu_rocm) -{ - std::vector gelu(nloc, 0.0); - - double * gelu_dev = NULL, * xx_dev = NULL; - deepmd::malloc_device_memory_sync(gelu_dev, gelu); - deepmd::malloc_device_memory_sync(xx_dev, xx); - deepmd::gelu_gpu_rocm (gelu_dev, xx_dev, nloc); - deepmd::memcpy_device_to_host(gelu_dev, gelu); - deepmd::delete_device_memory(gelu_dev); - deepmd::delete_device_memory(xx_dev); - - EXPECT_EQ(gelu.size(), nloc); - EXPECT_EQ(gelu.size(), expected_gelu.size()); - for (int jj = 0; jj < gelu.size(); ++jj){ - EXPECT_LT(fabs(gelu[jj] - expected_gelu[jj]) , 1e-5); - } -} -#endif // TENSORFLOW_USE_ROCM -*/ \ No newline at end of file diff --git a/source/module_base/kernels/test/math_ylm_op_test.cpp b/source/module_base/kernels/test/math_ylm_op_test.cpp deleted file mode 100644 index 5da30d8111..0000000000 --- a/source/module_base/kernels/test/math_ylm_op_test.cpp +++ /dev/null @@ -1,340 +0,0 @@ -#include "module_base/kernels/math_ylm_op.h" - -#include "module_base/module_device/memory_op.h" - -#include -#include -#include - -class TestModuleBaseMathMultiDevice : public ::testing::Test -{ -protected: - // xx = tf.random.uniform([100], minval=-4, maxval=4, dtype = tf.float64) - - const base_device::DEVICE_CPU* cpu_ctx = {}; - const base_device::DEVICE_GPU* gpu_ctx = {}; - - int ng = 59, lmax = 1; - - double SQRT2 = 1.4142135623730951, PI = 3.1415926535897931, PI_HALF = 1.5707963267948966, - FOUR_PI = 12.566370614359172, SQRT_INVERSE_FOUR_PI = 0.28209479177387814; - - std::vector g - = {2, -2, -2, 1, -1, -1, 0, 0, 0, -1, 1, 1, -2, 2, 2, 2, -2, 0, 1, -1, 1, 0, 0, 2, -1, 1, - 3, 2, -2, 2, 1, -1, 3, -1, 1, -3, -2, 2, -2, 1, -1, -3, 0, 0, -2, -1, 1, -1, -2, 2, 0, 2, - 0, -2, 1, 1, -1, 0, 2, 0, -1, 3, 1, 3, -1, -1, 2, 0, 0, 1, 1, 1, 0, 2, 2, 3, -1, 1, - 2, 0, 2, 1, 1, 3, 1, 1, -3, 0, 2, -2, -1, 3, -1, 2, 2, -2, 1, 3, -1, 3, 1, -1, 2, 2, - 0, 1, 3, 1, 3, 1, 1, 2, 2, 2, -1, -3, 1, -2, -2, 2, -2, -2, -2, -3, -1, -1, -1, -3, -1, -2, - -2, 0, -3, -1, 1, 1, -3, -1, 0, -2, 0, -1, -1, 1, -2, 0, 2, 1, -3, 1, 0, -2, 2, -1, -1, 3, - -1, -1, -3, -2, 0, -2, -3, 1, -1, 0, -2, -2, -1, -1, -1, -2, 0, 0, -3, 1, 1}; - std::vector expected_ylm = {0.282095, - 0.282095, - 0.282095, - 0.282095, - 0.282095, - 0.282095, - 0.282095, - 0.282095, - 0.282095, - 0.282095, - 0.282095, - 0.282095, - 0.282095, - 0.282095, - 0.282095, - 0.282095, - 0.282095, - 0.282095, - 0.282095, - 0.282095, - 0.282095, - 0.282095, - 0.282095, - 0.282095, - 0.282095, - 0.282095, - 0.282095, - 0.282095, - 0.282095, - 0.282095, - 0.282095, - 0.282095, - 0.282095, - 0.282095, - 0.282095, - 0.282095, - 0.282095, - 0.282095, - 0.282095, - 0.282095, - 0.282095, - 0.282095, - 0.282095, - 0.282095, - 0.282095, - 0.282095, - 0.282095, - 0.282095, - 0.282095, - 0.282095, - 0.282095, - 0.282095, - 0.282095, - 0.282095, - 0.282095, - 0.282095, - 0.282095, - 0.282095, - 0.282095, - -0.282095, - -0.282095, - 0, - 0.282095, - 0.282095, - 0, - 0.282095, - 0.488603, - 0.441958, - 0.282095, - 0.441958, - -0.441958, - -0.282095, - -0.441958, - -0.488603, - -0.282095, - 0, - -0.345494, - -0.282095, - 0, - 0.147319, - -0.147319, - 0, - 0.282095, - 0.345494, - 0.147319, - 0.345494, - 0.441958, - -0.441958, - -0.345494, - -0.147319, - -0.282095, - -0.147319, - -0.147319, - 0, - 0.147319, - 0.147319, - 0.282095, - 0.147319, - 0.282095, - -0.282095, - -0.147319, - -0.147319, - 0, - 0.147319, - -0.147319, - 0, - 0.282095, - 0.345494, - 0.147319, - 0.345494, - 0.441958, - -0.441958, - -0.345494, - -0.147319, - -0.345494, - -0.282095, - 0, - 0.147319, - -0.282095, - -0.282095, - -2.99183e-17, - 0.282095, - 0.282095, - -0.345494, - -0.282095, - -0, - 0.147319, - -0.282095, - -0.147319, - 0.147319, - 0.282095, - -0.147319, - -0, - 0.282095, - 0.345494, - -0.345494, - -0.282095, - -2.99183e-17, - 0.147319, - -0.441958, - -0.488603, - -0.282095, - -2.11554e-17, - -0.441958, - -0.345494, - -0.147319, - -0.147319, - -2.11554e-17, - 0.147319, - -0.282095, - -0.147319, - -0.441958, - -0.345494, - -0.147319, - -0.441958, - -0.282095, - 0.147319, - 0.282095, - 0.282095, - 0.441958, - 0.147319, - 0.345494, - 0.441958, - -0.147319, - -2.99183e-17, - 0.282095, - 0.345494, - -0.147319, - -2.11554e-17, - 0.147319, - 0.147319, - 0.345494, - 0.441958, - -2.11554e-17, - 0.282095, - 0.488603, - 0.441958, - 0.282095, - 0.282095, - -0.488603, - -0.282095, - -0.282095, - 0.345494, - 0.282095, - -0, - -0.147319, - 0.282095, - 0.147319, - -0.147319, - -0.282095, - 0.147319, - -0, - -0.282095, - -0.345494, - -0, - -0.282095, - -0.488603, - -0.441958, - 0.147319, - -0, - -0.282095, - -0.345494, - 0.147319, - -0, - -0.147319, - -0.147319, - -0.345494, - -0.441958, - -0.282095, - -0.441958, - -0.147319, - -0.345494, - -0.441958, - -0.147319, - -0.282095, - 0.441958, - 0.282095, - 0.282095, - 0.147319, - 0.441958, - 0.345494, - 0.147319, - 0.441958, - 0.488603, - 0.282095, - -4.23108e-17, - 0.441958, - 0.345494, - 0.147319, - 0.147319, - -4.23108e-17, - -0.147319, - 0.345494, - 0.282095, - -5.98366e-17, - -0.147319}; - - using delmem_var_op = base_device::memory::delete_memory_op; - using resmem_var_op = base_device::memory::resize_memory_op; - using syncmem_var_h2d_op - = base_device::memory::synchronize_memory_op; - using syncmem_var_d2h_op - = base_device::memory::synchronize_memory_op; - - void SetUp() override - { - } - void TearDown() override { - } -}; - -TEST_F(TestModuleBaseMathMultiDevice, cal_ylm_real_op_cpu) -{ - std::vector p((lmax + 1) * (lmax + 1) * ng, 0.0); - std::vector ylm(expected_ylm.size(), 0.0); - ModuleBase::cal_ylm_real_op()(cpu_ctx, - ng, - lmax, - SQRT2, - PI, - PI_HALF, - FOUR_PI, - SQRT_INVERSE_FOUR_PI, - g.data(), - p.data(), - ylm.data()); - - for (int ii = 0; ii < ylm.size(); ii++) { - EXPECT_LT(fabs(ylm[ii] - expected_ylm[ii]), 6e-5); - } -} - -#if __CUDA || __UT_USE_CUDA || __ROCM || __UT_USE_ROCM -TEST_F(TestModuleBaseMathMultiDevice, cal_ylm_real_op_gpu) -{ - std::vector p((lmax + 1) * (lmax + 1) * ng, 0.0); - std::vector ylm(expected_ylm.size(), 0.0); - double * d_ylm = nullptr, * d_g = nullptr, * d_p = nullptr; - - resmem_var_op()(d_g, g.size()); - resmem_var_op()(d_p, p.size()); - resmem_var_op()(d_ylm, ylm.size()); - - syncmem_var_h2d_op()(d_g, g.data(), g.size()); - syncmem_var_h2d_op()(d_p, p.data(), p.size()); - syncmem_var_h2d_op()(d_ylm, ylm.data(), ylm.size()); - - ModuleBase::cal_ylm_real_op()(gpu_ctx, - ng, - lmax, - SQRT2, - PI, - PI_HALF, - FOUR_PI, - SQRT_INVERSE_FOUR_PI, - d_g, - d_p, - d_ylm); - - syncmem_var_d2h_op()(ylm.data(), d_ylm, ylm.size()); - - for (int ii = 0; ii < ylm.size(); ii++) { - EXPECT_LT(fabs(ylm[ii] - expected_ylm[ii]), 6e-5); - } - - delmem_var_op()(d_g); - delmem_var_op()(d_p); - delmem_var_op()(d_ylm); -} - -#endif // __CUDA || __UT_USE_CUDA || __ROCM || __UT_USE_ROCM \ No newline at end of file diff --git a/source/module_base/lapack_connector.h b/source/module_base/lapack_connector.h deleted file mode 100644 index 29018d4db4..0000000000 --- a/source/module_base/lapack_connector.h +++ /dev/null @@ -1,471 +0,0 @@ -#ifndef LAPACKCONNECTOR_HPP -#define LAPACKCONNECTOR_HPP - -#include -#include -#include -#include -#include "matrix.h" -#include "complexmatrix.h" -#include "global_function.h" - -//Naming convention of lapack subroutines : ammxxx, where -//"a" specifies the data type: -// - d stands for double -// - z stands for complex double -//"mm" specifies the type of matrix, for example: -// - he stands for hermitian -// - sy stands for symmetric -//"xxx" specifies the type of problem, for example: -// - gv stands for generalized eigenvalue - -extern "C" -{ -// solve the generalized eigenproblem Ax=eBx, where A is Hermitian and complex couble - // zhegv_ & zhegvd_ returns all eigenvalues while zhegvx_ returns selected ones - void dsygvd_(const int* itype, const char* jobz, const char* uplo, const int* n, - double* a, const int* lda, - const double* b, const int* ldb, double* w, - double* work, int* lwork, - int* iwork, int* liwork, int* info); - - void chegvd_(const int* itype, const char* jobz, const char* uplo, const int* n, - std::complex* a, const int* lda, - const std::complex* b, const int* ldb, float* w, - std::complex* work, int* lwork, float* rwork, int* lrwork, - int* iwork, int* liwork, int* info); - - void zhegvd_(const int* itype, const char* jobz, const char* uplo, const int* n, - std::complex* a, const int* lda, - const std::complex* b, const int* ldb, double* w, - std::complex* work, int* lwork, double* rwork, int* lrwork, - int* iwork, int* liwork, int* info); - - void dsyevx_(const char* jobz, const char* range, const char* uplo, const int* n, - double* a, const int* lda, - const double* vl, const double* vu, const int* il, const int* iu, const double* abstol, - const int* m, double* w, double* z, const int* ldz, - double* work, const int* lwork, double* rwork, int* iwork, int* ifail, int* info); - - void cheevx_(const char* jobz, const char* range, const char* uplo, const int* n, - std::complex *a, const int* lda, - const float* vl, const float* vu, const int* il, const int* iu, const float* abstol, - const int* m, float* w, std::complex *z, const int *ldz, - std::complex *work, const int* lwork, float* rwork, int* iwork, int* ifail, int* info); - - void zheevx_(const char* jobz, const char* range, const char* uplo, const int* n, - std::complex *a, const int* lda, - const double* vl, const double* vu, const int* il, const int* iu, const double* abstol, - const int* m, double* w, std::complex *z, const int *ldz, - std::complex *work, const int* lwork, double* rwork, int* iwork, int* ifail, int* info); - - - void dsygvx_(const int* itype, const char* jobz, const char* range, const char* uplo, - const int* n, double* A, const int* lda, double* B, const int* ldb, - const double* vl, const double* vu, const int* il, const int* iu, - const double* abstol, const int* m, double* w, double* Z, const int* ldz, - double* work, const int* lwork, int* iwork, int* ifail, int* info); - - void chegvx_(const int* itype,const char* jobz,const char* range,const char* uplo, - const int* n,std::complex *a,const int* lda,std::complex *b, - const int* ldb,const float* vl,const float* vu,const int* il, - const int* iu,const float* abstol,const int* m,float* w, - std::complex *z,const int *ldz,std::complex *work,const int* lwork, - float* rwork,int* iwork,int* ifail,int* info); - - void zhegvx_(const int* itype,const char* jobz,const char* range,const char* uplo, - const int* n,std::complex *a,const int* lda,std::complex *b, - const int* ldb,const double* vl,const double* vu,const int* il, - const int* iu,const double* abstol,const int* m,double* w, - std::complex *z,const int *ldz,std::complex *work,const int* lwork, - double* rwork,int* iwork,int* ifail,int* info); - - void zhegv_(const int* itype,const char* jobz,const char* uplo,const int* n, - std::complex* a,const int* lda,std::complex* b,const int* ldb, - double* w,std::complex* work,int* lwork,double* rwork,int* info); - void chegv_(const int* itype,const char* jobz,const char* uplo,const int* n, - std::complex* a,const int* lda,std::complex* b,const int* ldb, - float* w,std::complex* work,int* lwork,float* rwork,int* info); - void dsygv_(const int* itype, const char* jobz,const char* uplo, const int* n, - double* a,const int* lda,double* b,const int* ldb, - double* w,double* work,int* lwork,int* info); - - // solve the eigenproblem Ax=ex, where A is Hermitian and complex couble - // zheev_ returns all eigenvalues while zheevx_ returns selected ones - void zheev_(const char* jobz,const char* uplo,const int* n,std::complex *a, - const int* lda,double* w,std::complex* work,const int* lwork, - double* rwork,int* info); - void cheev_(const char* jobz,const char* uplo,const int* n,std::complex *a, - const int* lda,float* w,std::complex* work,const int* lwork, - float* rwork,int* info); - void dsyev_(const char* jobz,const char* uplo,const int* n,double *a, - const int* lda,double* w,double* work,const int* lwork, int* info); - - // solve the eigenproblem Ax=ex, where A is a general matrix - void dgeev_(const char* jobvl, const char* jobvr, const int* n, double* a, const int* lda, - double* wr, double* wi, double* vl, const int* ldvl, double* vr, const int* ldvr, - double* work, const int* lwork, int* info); - void zgeev_(const char* jobvl, const char* jobvr, const int* n, std::complex* a, const int* lda, - std::complex* w, std::complex* vl, const int* ldvl, std::complex* vr, const int* ldvr, - std::complex* work, const int* lwork, double* rwork, int* info); - // liuyu add 2023-10-03 - // dgetri and dgetrf computes the inverse of a n*n real matrix - void dgetri_(const int* n, double* a, const int* lda, const int* ipiv, double* work, const int* lwork, int* info); - void dgetrf_(const int* m, const int* n, double* a, const int* lda, int* ipiv, int* info); - - // dsytrf_ computes the Bunch-Kaufman factorization of a double precision - // symmetric matrix, while dsytri takes its output to perform martrix inversion - void dsytrf_(const char* uplo, const int* n, double * a, const int* lda, - int *ipiv,double *work, const int* lwork ,int *info); - void dsytri_(const char* uplo,const int* n,double *a, const int *lda, - int *ipiv, double * work,int *info); - // Peize Lin add dsptrf and dsptri 2016-06-21, to compute inverse real symmetry indefinit matrix. - // dpotrf computes the Cholesky factorization of a real symmetric positive definite matrix - // while dpotri taks its output to perform matrix inversion - void spotrf_(const char*const uplo, const int*const n, float*const A, const int*const lda, int*const info); - void dpotrf_(const char*const uplo, const int*const n, double*const A, const int*const lda, int*const info); - void cpotrf_(const char*const uplo, const int*const n, std::complex*const A, const int*const lda, int*const info); - void zpotrf_(const char*const uplo, const int*const n, std::complex*const A, const int*const lda, int*const info); - void spotri_(const char*const uplo, const int*const n, float*const A, const int*const lda, int*const info); - void dpotri_(const char*const uplo, const int*const n, double*const A, const int*const lda, int*const info); - void cpotri_(const char*const uplo, const int*const n, std::complex*const A, const int*const lda, int*const info); - void zpotri_(const char*const uplo, const int*const n, std::complex*const A, const int*const lda, int*const info); - - // zgetrf computes the LU factorization of a general matrix - // while zgetri takes its output to perform matrix inversion - void zgetrf_(const int* m, const int *n, std::complex *A, const int *lda, int *ipiv, int* info); - void zgetri_(const int* n, std::complex* A, const int* lda, const int* ipiv, std::complex* work, const int* lwork, int* info); - - // if trans=='N': C = alpha * A * A.H + beta * C - // if trans=='C': C = alpha * A.H * A + beta * C - void zherk_(const char *uplo, const char *trans, const int *n, const int *k, - const double *alpha, const std::complex *A, const int *lda, - const double *beta, std::complex *C, const int *ldc); - void cherk_(const char* uplo, const char* trans, const int* n, const int* k, - const float* alpha, const std::complex* A, const int* lda, - const float* beta, std::complex* C, const int* ldc); - - // computes all eigenvalues of a symmetric tridiagonal matrix - // using the Pal-Walker-Kahan variant of the QL or QR algorithm. - void dsterf_(int *n, double *d, double *e, int *info); - // computes the eigenvectors of a real symmetric tridiagonal - // matrix T corresponding to specified eigenvalues - void dstein_(int *n, double* d, double *e, int *m, double *w, - int* block, int* isplit, double* z, int *lda, double *work, - int* iwork, int* ifail, int *info); - // computes the eigenvectors of a complex symmetric tridiagonal - // matrix T corresponding to specified eigenvalues - void zstein_(int *n, double* d, double *e, int *m, double *w, - int* block, int* isplit, std::complex* z, int *lda, double *work, - int* iwork, int* ifail, int *info); - - // computes the Cholesky factorization of a symmetric - // positive definite matrix A. - void dpotf2_(char *uplo, int *n, double *a, int *lda, int *info); - void zpotf2_(char *uplo,int *n,std::complex *a, int *lda, int *info); - - // reduces a symmetric definite generalized eigenproblem to standard form - // using the factorization results obtained from spotrf - void dsygs2_(int *itype, char *uplo, int *n, double *a, int *lda, double *b, int *ldb, int *info); - void zhegs2_(int *itype, char *uplo, int *n, std::complex *a, int *lda, std::complex *b, int *ldb, int *info); - - // copies a into b - void dlacpy_(char *uplo, int *m, int *n, double* a, int *lda, double *b, int *ldb); - void zlacpy_(char *uplo, int *m, int *n, std::complex* a, int *lda, std::complex *b, int *ldb); - - // generates a real elementary reflector H of order n, such that - // H * ( alpha ) = ( beta ), H is unitary. - // ( x ) ( 0 ) - void dlarfg_(int *n, double *alpha, double *x, int *incx, double *tau); - void zlarfg_(int *n, std::complex *alpha, std::complex *x, int *incx, std::complex *tau); - - // solve a tridiagonal linear system - void dgtsv_(int* N, int* NRHS, double* DL, double* D, double* DU, double* B, int* LDB, int* INFO); - - // solve Ax = b - void dsysv_(const char* uplo, const int* n, const int* m, double * a, const int* lda, - int *ipiv, double * b, const int* ldb, double *work, const int* lwork ,int *info); -} - -#ifdef GATHER_INFO -#define zhegvx_ zhegvx_i -void zhegvx_i(const int* itype, - const char* jobz, - const char* range, - const char* uplo, - const int* n, - std::complex* a, - const int* lda, - std::complex* b, - const int* ldb, - const double* vl, - const double* vu, - const int* il, - const int* iu, - const double* abstol, - const int* m, - double* w, - std::complex* z, - const int* ldz, - std::complex* work, - const int* lwork, - double* rwork, - int* iwork, - int* ifail, - int* info); -#endif // GATHER_INFO - -// Class LapackConnector provide the connector to fortran lapack routine. -// The entire function in this class are static and inline function. -// Usage example: LapackConnector::functionname(parameter list). -class LapackConnector -{ -private: - // Transpose the std::complex matrix to the fortran-form real-std::complex array. - static inline - std::complex* transpose(const ModuleBase::ComplexMatrix& a, const int n, const int lda) - { - std::complex* aux = new std::complex[lda*n]; - for (int i = 0; i < n; ++i) - { - for (int j = 0; j < lda; ++j) - { - aux[i*lda+j] = a(j,i); // aux[i*lda+j] means aux[i][j] in semantic, not in syntax! - } - } - return aux; - } - - static inline - std::complex* transpose(const std::complex* a, const int n, const int lda, const int nbase_x) - { - std::complex* aux = new std::complex[lda*n]; - for (int i = 0; i < n; ++i) - { - for (int j = 0; j < lda; ++j) - { - aux[j * n + i] = a[i * nbase_x + j]; - } - } - return aux; - } - - static inline - std::complex* transpose(const std::complex* a, const int n, const int lda, const int nbase_x) - { - std::complex* aux = new std::complex[lda*n]; - for (int i = 0; i < n; ++i) - { - for (int j = 0; j < lda; ++j) - { - aux[j * n + i] = a[i * nbase_x + j]; - } - } - return aux; - } - - // Transpose the fortran-form real-std::complex array to the std::complex matrix. - static inline - void transpose(const std::complex* aux, ModuleBase::ComplexMatrix& a, const int n, const int lda) - { - for (int i = 0; i < n; ++i) - { - for (int j = 0; j < lda; ++j) - { - a(j, i) = aux[i*lda+j]; // aux[i*lda+j] means aux[i][j] in semantic, not in syntax! - } - } - } - - // Transpose the fortran-form real-std::complex array to the std::complex matrix. - static inline - void transpose(const std::complex* aux, std::complex* a, const int n, const int lda, const int nbase_x) - { - for (int i = 0; i < n; ++i) - { - for (int j = 0; j < lda; ++j) - { - a[j * nbase_x + i] = aux[i * lda + j]; // aux[i*lda+j] means aux[i][j] in semantic, not in syntax! - } - } - } - - // Transpose the fortran-form real-std::complex array to the std::complex matrix. - static inline - void transpose(const std::complex* aux, std::complex* a, const int n, const int lda, const int nbase_x) - { - for (int i = 0; i < n; ++i) - { - for (int j = 0; j < lda; ++j) - { - a[j * nbase_x + i] = aux[i * lda + j]; // aux[i*lda+j] means aux[i][j] in semantic, not in syntax! - } - } - } - - // Peize Lin add 2015-12-27 - static inline - char change_uplo(const char &uplo) - { - switch(uplo) - { - case 'U': return 'L'; - case 'L': return 'U'; - default: throw std::invalid_argument("uplo must be 'U' or 'L'"); - } - } - - // Peize Lin add 2019-04-14 - static inline - char change_trans_NC(const char &trans) - { - switch(trans) - { - case 'N': return 'C'; - case 'C': return 'N'; - default: throw std::invalid_argument("trans must be 'N' or 'C'"); - } - } - -public: - // wrap function of fortran lapack routine zheev. - static inline - void zheev( const char jobz, - const char uplo, - const int n, - ModuleBase::ComplexMatrix& a, - const int lda, - double* w, - std::complex< double >* work, - const int lwork, - double* rwork, - int *info ) - { // Transpose the std::complex matrix to the fortran-form real-std::complex array. - std::complex *aux = LapackConnector::transpose(a, n, lda); - // call the fortran routine - zheev_(&jobz, &uplo, &n, aux, &lda, w, work, &lwork, rwork, info); - // Transpose the fortran-form real-std::complex array to the std::complex matrix. - LapackConnector::transpose(aux, a, n, lda); - // free the memory. - delete[] aux; - } - - static inline - void zgetrf(int m, int n, ModuleBase::ComplexMatrix &a, const int lda, int *ipiv, int *info) - { - std::complex *aux = LapackConnector::transpose(a, n, lda); - zgetrf_( &m, &n, aux, &lda, ipiv, info); - LapackConnector::transpose(aux, a, n, lda); - delete[] aux; - return; - } - static inline - void zgetri(int n, ModuleBase::ComplexMatrix &a, int lda, int *ipiv, std::complex * work, int lwork, int *info) - { - std::complex *aux = LapackConnector::transpose(a, n, lda); - zgetri_( &n, aux, &lda, ipiv, work, &lwork, info); - LapackConnector::transpose(aux, a, n, lda); - delete[] aux; - return; - } - - // Peize Lin add 2016-07-09 - static inline - void potrf( const char &uplo, const int &n, float*const A, const int &lda, int &info ) - { - const char uplo_changed = change_uplo(uplo); - spotrf_( &uplo_changed, &n, A, &lda, &info ); - } - static inline - void potrf( const char &uplo, const int &n, double*const A, const int &lda, int &info ) - { - const char uplo_changed = change_uplo(uplo); - dpotrf_( &uplo_changed, &n, A, &lda, &info ); - } - static inline - void potrf( const char &uplo, const int &n, std::complex*const A, const int &lda, int &info ) - { - const char uplo_changed = change_uplo(uplo); - cpotrf_( &uplo_changed, &n, A, &lda, &info ); - } - static inline - void potrf( const char &uplo, const int &n, std::complex*const A, const int &lda, int &info ) - { - const char uplo_changed = change_uplo(uplo); - zpotrf_( &uplo_changed, &n, A, &lda, &info ); - } - - - // Peize Lin add 2016-07-09 - static inline - void potri( const char &uplo, const int &n, float*const A, const int &lda, int &info ) - { - const char uplo_changed = change_uplo(uplo); - spotri_( &uplo_changed, &n, A, &lda, &info); - } - static inline - void potri( const char &uplo, const int &n, double*const A, const int &lda, int &info ) - { - const char uplo_changed = change_uplo(uplo); - dpotri_( &uplo_changed, &n, A, &lda, &info); - } - static inline - void potri( const char &uplo, const int &n, std::complex*const A, const int &lda, int &info ) - { - const char uplo_changed = change_uplo(uplo); - cpotri_( &uplo_changed, &n, A, &lda, &info); - } - static inline - void potri( const char &uplo, const int &n, std::complex*const A, const int &lda, int &info ) - { - const char uplo_changed = change_uplo(uplo); - zpotri_( &uplo_changed, &n, A, &lda, &info); - } - - // Peize Lin add 2016-07-09 - static inline - void potrf( const char &uplo, const int &n, ModuleBase::matrix &A, const int &lda, int &info ) - { - potrf( uplo, n, A.c, lda, info ); - } - static inline - void potrf( const char &uplo, const int &n, ModuleBase::ComplexMatrix &A, const int &lda, int &info ) - { - potrf( uplo, n, A.c, lda, info ); - } - - // Peize Lin add 2016-07-09 - static inline - void potri( const char &uplo, const int &n, ModuleBase::matrix &A, const int &lda, int &info ) - { - potri( uplo, n, A.c, lda, info); - } - static inline - void potri( const char &uplo, const int &n, ModuleBase::ComplexMatrix &A, const int &lda, int &info ) - { - potri( uplo, n, A.c, lda, info); - } - - // Peize Lin add 2019-04-14 - // if trans=='N': C = a * A * A.H + b * C - // if trans=='C': C = a * A.H * A + b * C - static inline - void herk(const char uplo, const char trans, const int n, const int k, - const double alpha, const std::complex *A, const int lda, - const double beta, std::complex *C, const int ldc) - { - const char uplo_changed = change_uplo(uplo); - const char trans_changed = change_trans_NC(trans); - zherk_(&uplo_changed, &trans_changed, &n, &k, &alpha, A, &lda, &beta, C, &ldc); - } - static inline - void herk(const char uplo, const char trans, const int n, const int k, - const float alpha, const std::complex* A, const int lda, - const float beta, std::complex* C, const int ldc) - { - const char uplo_changed = change_uplo(uplo); - const char trans_changed = change_trans_NC(trans); - cherk_(&uplo_changed, &trans_changed, &n, &k, &alpha, A, &lda, &beta, C, &ldc); - } -}; -#endif // LAPACKCONNECTOR_HPP diff --git a/source/module_base/lapack_wrapper.h b/source/module_base/lapack_wrapper.h deleted file mode 100644 index acccdc0454..0000000000 --- a/source/module_base/lapack_wrapper.h +++ /dev/null @@ -1,484 +0,0 @@ -#ifndef LAPACK_HPP -#define LAPACK_HPP -#include -extern "C" -{ - // ================================================================================= - // gvd: - void dsygvd_(const int* itype, const char* jobz, const char* uplo, const int* n, - double* a, const int* lda, - const double* b, const int* ldb, double* w, - double* work, int* lwork, - int* iwork, int* liwork, int* info); - - void chegvd_(const int* itype, const char* jobz, const char* uplo, const int* n, - std::complex* a, const int* lda, - const std::complex* b, const int* ldb, float* w, - std::complex* work, int* lwork, float* rwork, int* lrwork, - int* iwork, int* liwork, int* info); - - void zhegvd_(const int* itype, const char* jobz, const char* uplo, const int* n, - std::complex* a, const int* lda, - const std::complex* b, const int* ldb, double* w, - std::complex* work, int* lwork, double* rwork, int* lrwork, - int* iwork, int* liwork, int* info); - // ================================================================================= - - // ================================================================================= - // evx - void dsyevx_(const char* jobz, const char* range, const char* uplo, const int* n, - double* a, const int* lda, - const double* vl, const double* vu, const int* il, const int* iu, const double* abstol, - const int* m, double* w, double* z, const int* ldz, - double* work, const int* lwork, double* rwork, int* iwork, int* ifail, int* info); - - void cheevx_(const char* jobz, const char* range, const char* uplo, const int* n, - std::complex *a, const int* lda, - const float* vl, const float* vu, const int* il, const int* iu, const float* abstol, - const int* m, float* w, std::complex *z, const int *ldz, - std::complex *work, const int* lwork, float* rwork, int* iwork, int* ifail, int* info); - - void zheevx_(const char* jobz, const char* range, const char* uplo, const int* n, - std::complex *a, const int* lda, - const double* vl, const double* vu, const int* il, const int* iu, const double* abstol, - const int* m, double* w, std::complex *z, const int *ldz, - std::complex *work, const int* lwork, double* rwork, int* iwork, int* ifail, int* info); - // ================================================================================= - - - // ================================================================================= - // gvx - void dsygvx_(const int* itype, const char* jobz, const char* range, const char* uplo, - const int* n, double* A, const int* lda, double* B, const int* ldb, - const double* vl, const double* vu, const int* il, const int* iu, - const double* abstol, const int* m, double* w, double* Z, const int* ldz, - double* work, const int* lwork, int* iwork, int* ifail, int* info); - - void chegvx_(const int* itype,const char* jobz,const char* range,const char* uplo, - const int* n,std::complex *a,const int* lda,std::complex *b, - const int* ldb,const float* vl,const float* vu,const int* il, - const int* iu,const float* abstol,const int* m,float* w, - std::complex *z,const int *ldz,std::complex *work,const int* lwork, - float* rwork,int* iwork,int* ifail,int* info); - - void zhegvx_(const int* itype,const char* jobz,const char* range,const char* uplo, - const int* n,std::complex *a,const int* lda,std::complex *b, - const int* ldb,const double* vl,const double* vu,const int* il, - const int* iu,const double* abstol,const int* m,double* w, - std::complex *z,const int *ldz,std::complex *work,const int* lwork, - double* rwork,int* iwork,int* ifail,int* info); - // ================================================================================= - - // ================================================================================= - // gv - void zhegv_(const int* itype,const char* jobz,const char* uplo,const int* n, - std::complex* a,const int* lda,std::complex* b,const int* ldb, - double* w,std::complex* work,int* lwork,double* rwork,int* info); - void chegv_(const int* itype,const char* jobz,const char* uplo,const int* n, - std::complex* a,const int* lda,std::complex* b,const int* ldb, - float* w,std::complex* work,int* lwork,float* rwork,int* info); - void dsygv_(const int* itype, const char* jobz,const char* uplo, const int* n, - double* a,const int* lda,double* b,const int* ldb, - double* w,double* work,int* lwork,int* info); - // ================================================================================= - -} - -class LapackWrapper -{ - private: - public: - // wrap function of fortran lapack routine zhegvd. (pointer version) - static inline void xhegvd(const int itype, - const char jobz, - const char uplo, - const int n, - double* a, - const int lda, - const double* b, - const int ldb, - double* w, - double* work, - int lwork, - double* rwork, - int lrwork, - int* iwork, - int liwork, - int& info) - { - // call the fortran routine - dsygvd_(&itype, &jobz, &uplo, &n, a, &lda, b, &ldb, w, work, &lwork, iwork, &liwork, &info); - } - - // wrap function of fortran lapack routine zhegvd. (pointer version) - static inline void xhegvd(const int itype, - const char jobz, - const char uplo, - const int n, - std::complex* a, - const int lda, - const std::complex* b, - const int ldb, - float* w, - std::complex* work, - int lwork, - float* rwork, - int lrwork, - int* iwork, - int liwork, - int& info) - { - // call the fortran routine - chegvd_(&itype, &jobz, &uplo, &n, a, &lda, b, &ldb, w, work, &lwork, rwork, &lrwork, iwork, &liwork, &info); - } - - // wrap function of fortran lapack routine zhegvd. - static inline void xhegvd(const int itype, - const char jobz, - const char uplo, - const int n, - std::complex* a, - const int lda, - const std::complex* b, - const int ldb, - double* w, - std::complex* work, - int lwork, - double* rwork, - int lrwork, - int* iwork, - int liwork, - int& info) - { - // call the fortran routine - zhegvd_(&itype, &jobz, &uplo, &n, a, &lda, b, &ldb, w, work, &lwork, rwork, &lrwork, iwork, &liwork, &info); - } - - // wrap function of fortran lapack routine dsyevx. - static inline void xheevx(const int itype, - const char jobz, - const char range, - const char uplo, - const int n, - double* a, - const int lda, - const double vl, - const double vu, - const int il, - const int iu, - const double abstol, - const int m, - double* w, - double* z, - const int ldz, - double* work, - const int lwork, - double* rwork, - int* iwork, - int* ifail, - int& info) - { - dsyevx_(&jobz, - &range, - &uplo, - &n, - a, - &lda, - &vl, - &vu, - &il, - &iu, - &abstol, - &m, - w, - z, - &ldz, - work, - &lwork, - rwork, - iwork, - ifail, - &info); - } - - // wrap function of fortran lapack routine cheevx. - static inline void xheevx(const int itype, - const char jobz, - const char range, - const char uplo, - const int n, - std::complex* a, - const int lda, - const float vl, - const float vu, - const int il, - const int iu, - const float abstol, - const int m, - float* w, - std::complex* z, - const int ldz, - std::complex* work, - const int lwork, - float* rwork, - int* iwork, - int* ifail, - int& info) - { - cheevx_(&jobz, - &range, - &uplo, - &n, - a, - &lda, - &vl, - &vu, - &il, - &iu, - &abstol, - &m, - w, - z, - &ldz, - work, - &lwork, - rwork, - iwork, - ifail, - &info); - } - - // wrap function of fortran lapack routine zheevx. - static inline void xheevx(const int itype, - const char jobz, - const char range, - const char uplo, - const int n, - std::complex* a, - const int lda, - const double vl, - const double vu, - const int il, - const int iu, - const double abstol, - const int m, - double* w, - std::complex* z, - const int ldz, - std::complex* work, - const int lwork, - double* rwork, - int* iwork, - int* ifail, - int& info) - { - zheevx_(&jobz, - &range, - &uplo, - &n, - a, - &lda, - &vl, - &vu, - &il, - &iu, - &abstol, - &m, - w, - z, - &ldz, - work, - &lwork, - rwork, - iwork, - ifail, - &info); - } - - // wrap function of fortran lapack routine xhegvx ( pointer version ). - static inline void xhegvx(const int itype, - const char jobz, - const char range, - const char uplo, - const int n, - std::complex* a, - const int lda, - std::complex* b, - const int ldb, - const float vl, - const float vu, - const int il, - const int iu, - const float abstol, - const int m, - float* w, - std::complex* z, - const int ldz, - std::complex* work, - const int lwork, - float* rwork, - int* iwork, - int* ifail, - int& info) - { - chegvx_(&itype, - &jobz, - &range, - &uplo, - &n, - a, - &lda, - b, - &ldb, - &vl, - &vu, - &il, - &iu, - &abstol, - &m, - w, - z, - &ldz, - work, - &lwork, - rwork, - iwork, - ifail, - &info); - } - - // wrap function of fortran lapack routine xhegvx ( pointer version ). - static inline void xhegvx(const int itype, - const char jobz, - const char range, - const char uplo, - const int n, - std::complex* a, - const int lda, - std::complex* b, - const int ldb, - const double vl, - const double vu, - const int il, - const int iu, - const double abstol, - const int m, - double* w, - std::complex* z, - const int ldz, - std::complex* work, - const int lwork, - double* rwork, - int* iwork, - int* ifail, - int& info) - { - zhegvx_(&itype, - &jobz, - &range, - &uplo, - &n, - a, - &lda, - b, - &ldb, - &vl, - &vu, - &il, - &iu, - &abstol, - &m, - w, - z, - &ldz, - work, - &lwork, - rwork, - iwork, - ifail, - &info); - } - // wrap function of fortran lapack routine xhegvx ( pointer version ). - static inline void xhegvx(const int itype, - const char jobz, - const char range, - const char uplo, - const int n, - double* a, - const int lda, - double* b, - const int ldb, - const double vl, - const double vu, - const int il, - const int iu, - const double abstol, - const int m, - double* w, - double* z, - const int ldz, - double* work, - const int lwork, - double* rwork, - int* iwork, - int* ifail, - int& info) - { - dsygvx_(&itype, &jobz, &range, &uplo, &n, a, &lda, b, &ldb, &vl, - &vu, &il, &iu, &abstol, &m, w, z, &ldz, work, &lwork, iwork, ifail, &info); - } - - // wrap function of fortran lapack routine xhegvx ( pointer version ). - static inline void xhegv(const int itype, - const char jobz, - const char uplo, - const int n, - double* a, - const int lda, - double* b, - const int ldb, - double* w, - double* work, - int lwork, - double* rwork, - int& info) - { - // TODO - } - - // wrap function of fortran lapack routine xhegvx ( pointer version ). - static inline void xhegv(const int itype, - const char jobz, - const char uplo, - const int n, - std::complex* a, - const int lda, - std::complex* b, - const int ldb, - float* w, - std::complex* work, - int lwork, - float* rwork, - int& info) - { - // TODO - } - // wrap function of fortran lapack routine xhegvx ( pointer version ). - static inline void xhegv(const int itype, - const char jobz, - const char uplo, - const int n, - std::complex* a, - const int lda, - std::complex* b, - const int ldb, - double* w, - std::complex* work, - int lwork, - double* rwork, - int& info) - { - zhegv_(&itype, &jobz, &uplo, &n, a, &lda, b, &ldb, w, work, &lwork, rwork, &info); - } -}; -#endif // LAPACK_HPP \ No newline at end of file diff --git a/source/module_base/libm/LICENCE b/source/module_base/libm/LICENCE deleted file mode 100644 index 4362b49151..0000000000 --- a/source/module_base/libm/LICENCE +++ /dev/null @@ -1,502 +0,0 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 - - Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence - the version number 2.1.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Lesser General Public License, applies to some -specially designated software packages--typically libraries--of the -Free Software Foundation and other authors who decide to use it. You -can use it too, but we suggest you first think carefully about whether -this license or the ordinary General Public License is the better -strategy to use in any particular case, based on the explanations below. - - When we speak of free software, we are referring to freedom of use, -not price. Our General Public Licenses are designed to make sure that -you have the freedom to distribute copies of free software (and charge -for this service if you wish); that you receive source code or can get -it if you want it; that you can change the software and use pieces of -it in new free programs; and that you are informed that you can do -these things. - - To protect your rights, we need to make restrictions that forbid -distributors to deny you these rights or to ask you to surrender these -rights. These restrictions translate to certain responsibilities for -you if you distribute copies of the library or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link other code with the library, you must provide -complete object files to the recipients, so that they can relink them -with the library after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - We protect your rights with a two-step method: (1) we copyright the -library, and (2) we offer you this license, which gives you legal -permission to copy, distribute and/or modify the library. - - To protect each distributor, we want to make it very clear that -there is no warranty for the free library. Also, if the library is -modified by someone else and passed on, the recipients should know -that what they have is not the original version, so that the original -author's reputation will not be affected by problems that might be -introduced by others. - - Finally, software patents pose a constant threat to the existence of -any free program. We wish to make sure that a company cannot -effectively restrict the users of a free program by obtaining a -restrictive license from a patent holder. Therefore, we insist that -any patent license obtained for a version of the library must be -consistent with the full freedom of use specified in this license. - - Most GNU software, including some libraries, is covered by the -ordinary GNU General Public License. This license, the GNU Lesser -General Public License, applies to certain designated libraries, and -is quite different from the ordinary General Public License. We use -this license for certain libraries in order to permit linking those -libraries into non-free programs. - - When a program is linked with a library, whether statically or using -a shared library, the combination of the two is legally speaking a -combined work, a derivative of the original library. The ordinary -General Public License therefore permits such linking only if the -entire combination fits its criteria of freedom. The Lesser General -Public License permits more lax criteria for linking other code with -the library. - - We call this license the "Lesser" General Public License because it -does Less to protect the user's freedom than the ordinary General -Public License. It also provides other free software developers Less -of an advantage over competing non-free programs. These disadvantages -are the reason we use the ordinary General Public License for many -libraries. However, the Lesser license provides advantages in certain -special circumstances. - - For example, on rare occasions, there may be a special need to -encourage the widest possible use of a certain library, so that it becomes -a de-facto standard. To achieve this, non-free programs must be -allowed to use the library. A more frequent case is that a free -library does the same job as widely used non-free libraries. In this -case, there is little to gain by limiting the free library to free -software only, so we use the Lesser General Public License. - - In other cases, permission to use a particular library in non-free -programs enables a greater number of people to use a large body of -free software. For example, permission to use the GNU C Library in -non-free programs enables many more people to use the whole GNU -operating system, as well as its variant, the GNU/Linux operating -system. - - Although the Lesser General Public License is Less protective of the -users' freedom, it does ensure that the user of a program that is -linked with the Library has the freedom and the wherewithal to run -that program using a modified version of the Library. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, whereas the latter must -be combined with the library in order to run. - - GNU LESSER GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library or other -program which contains a notice placed by the copyright holder or -other authorized party saying it may be distributed under the terms of -this Lesser General Public License (also called "this License"). -Each licensee is addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also combine or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (1) uses at run time a - copy of the library already present on the user's computer system, - rather than copying library functions into the executable, and (2) - will operate properly with a modified version of the library, if - the user installs one, as long as the modified version is - interface-compatible with the version that the work was made with. - - c) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - d) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - e) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the materials to be distributed need not include anything that is -normally distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties with -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License may add -an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus -excluded. In such case, this License incorporates the limitation as if -written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Lesser General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Libraries - - If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms of the -ordinary General Public License). - - To apply these terms, attach the following notices to the library. It is -safest to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least the -"copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - -Also add information on how to contact you by electronic and paper mail. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the library, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - library `Frob' (a library for tweaking knobs) written by James Random Hacker. - - , 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it! diff --git a/source/module_base/libm/README.md b/source/module_base/libm/README.md deleted file mode 100644 index 3b485187d8..0000000000 --- a/source/module_base/libm/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# Math fucntions source code - -These math functions is ported form glibc-2.36/math (https://github.com/bminor/glibc/tree/release/2.36/master/math) - -The new version of sin/cos/exp implementation is much faster than glibc-2.27. - -In order to avoid the performance impact of different versions of glibc installed on systems and different versions of math functions provided by compilers, we choose to migrate these source codes. diff --git a/source/module_base/libm/branred.cpp b/source/module_base/libm/branred.cpp deleted file mode 100644 index ef9bd0e485..0000000000 --- a/source/module_base/libm/branred.cpp +++ /dev/null @@ -1,180 +0,0 @@ -//========================================================== -// AUTHOR : alcanderian@gmail.com -// DATE : 2023-01-06 -//========================================================== - -#include -#include - -namespace ModuleBase -{ -namespace libm -{ - -typedef int int4; -typedef union { unsigned int u[2]; int4 i[2]; double x; double d; } mynumber; - -#define max(x, y) (((y) > (x)) ? (y) : (x)) -#define min(x, y) (((y) < (x)) ? (y) : (x)) - -#if (__BYTE_ORDER == __BIG_ENDIAN) - -#define HIGH_HALF 0 -#define LOW_HALF 1 - -static const mynumber - -/**/ t576 = {{0x63f00000, 0x00000000}}, /* 2 ^ 576 */ -/**/ tm600 = {{0x1a700000, 0x00000000}}, /* 2 ^- 600 */ -/**/ tm24 = {{0x3e700000, 0x00000000}}, /* 2 ^- 24 */ -/**/ big = {{0x43380000, 0x00000000}}, /* 6755399441055744 */ -/**/ big1 = {{0x43580000, 0x00000000}}, /* 27021597764222976 */ -/**/ hp0 = {{0x3FF921FB, 0x54442D18}} ,/* 1.5707963267948966 */ -/**/ hp1 = {{0x3C91A626, 0x33145C07}} ,/* 6.123233995736766e-17 */ -/**/ mp1 = {{0x3FF921FB, 0x58000000}}, /* 1.5707963407039642 */ -/**/ mp2 = {{0xBE4DDE97, 0x40000000}}; /*-1.3909067675399456e-08 */ - -#endif - -#if (__BYTE_ORDER == __LITTLE_ENDIAN) - -#define HIGH_HALF 1 -#define LOW_HALF 0 - -static const mynumber - -/**/ t576 = {{0x00000000, 0x63f00000}}, /* 2 ^ 576 */ -/**/ tm600 = {{0x00000000, 0x1a700000}}, /* 2 ^- 600 */ -/**/ tm24 = {{0x00000000, 0x3e700000}}, /* 2 ^- 24 */ -/**/ big = {{0x00000000, 0x43380000}}, /* 6755399441055744 */ -/**/ big1 = {{0x00000000, 0x43580000}}, /* 27021597764222976 */ -/**/ hp0 = {{0x54442D18, 0x3FF921FB}}, /* 1.5707963267948966 */ -/**/ hp1 = {{0x33145C07, 0x3C91A626}}, /* 6.123233995736766e-17 */ -/**/ mp1 = {{0x58000000, 0x3FF921FB}}, /* 1.5707963407039642 */ -/**/ mp2 = {{0x40000000, 0xBE4DDE97}}; /*-1.3909067675399456e-08 */ - -#endif - -static const double toverp[75] = { /* 2/ PI base 24*/ - 10680707.0, 7228996.0, 1387004.0, 2578385.0, 16069853.0, - 12639074.0, 9804092.0, 4427841.0, 16666979.0, 11263675.0, - 12935607.0, 2387514.0, 4345298.0, 14681673.0, 3074569.0, - 13734428.0, 16653803.0, 1880361.0, 10960616.0, 8533493.0, - 3062596.0, 8710556.0, 7349940.0, 6258241.0, 3772886.0, - 3769171.0, 3798172.0, 8675211.0, 12450088.0, 3874808.0, - 9961438.0, 366607.0, 15675153.0, 9132554.0, 7151469.0, - 3571407.0, 2607881.0, 12013382.0, 4155038.0, 6285869.0, - 7677882.0, 13102053.0, 15825725.0, 473591.0, 9065106.0, - 15363067.0, 6271263.0, 9264392.0, 5636912.0, 4652155.0, - 7056368.0, 13614112.0, 10155062.0, 1944035.0, 9527646.0, - 15080200.0, 6658437.0, 6231200.0, 6832269.0, 16767104.0, - 5075751.0, 3212806.0, 1398474.0, 7579849.0, 6349435.0, - 12618859.0, 4703257.0, 12806093.0, 14477321.0, 2786137.0, - 12875403.0, 9837734.0, 14528324.0, 13719321.0, 343717.0 }; - -/* CN = 1+2**27 = '41a0000002000000' IEEE double format. Use it to split a - double for better accuracy. */ -#define CN 134217729.0 -static const double split = CN; /* 2^27 + 1 */ - -/*******************************************************************/ -/* Routine branred() performs range reduction of a double number */ -/* x into Double length number a+aa,such that */ -/* x=n*pi/2+(a+aa), abs(a+aa)>20)&2047; - k = (k-450)/24; - if (k<0) - k=0; - gor.x = t576.x; - gor.i[HIGH_HALF] -= ((k*24)<<20); - for (i=0;i<6;i++) - { r[i] = x1*toverp[k+i]*gor.x; gor.x *= tm24.x; } - for (i=0;i<3;i++) { - s=(r[i]+big.x)-big.x; - sum+=s; - r[i]-=s; - } - t=0; - for (i=0;i<6;i++) - t+=r[5-i]; - bb=(((((r[0]-t)+r[1])+r[2])+r[3])+r[4])+r[5]; - s=(t+big.x)-big.x; - sum+=s; - t-=s; - b=t+bb; - bb=(t-b)+bb; - s=(sum+big1.x)-big1.x; - sum-=s; - b1=b; - bb1=bb; - sum1=sum; - sum=0; - - u.x = x2; - k = (u.i[HIGH_HALF]>>20)&2047; - k = (k-450)/24; - if (k<0) - k=0; - gor.x = t576.x; - gor.i[HIGH_HALF] -= ((k*24)<<20); - for (i=0;i<6;i++) - { r[i] = x2*toverp[k+i]*gor.x; gor.x *= tm24.x; } - for (i=0;i<3;i++) { - s=(r[i]+big.x)-big.x; - sum+=s; - r[i]-=s; - } - t=0; - for (i=0;i<6;i++) - t+=r[5-i]; - bb=(((((r[0]-t)+r[1])+r[2])+r[3])+r[4])+r[5]; - s=(t+big.x)-big.x; - sum+=s; - t-=s; - b=t+bb; - bb=(t-b)+bb; - s=(sum+big1.x)-big1.x; - sum-=s; - - b2=b; - bb2=bb; - sum2=sum; - - sum=sum1+sum2; - b=b1+b2; - bb = (fabs(b1)>fabs(b2))? (b1-b)+b2 : (b2-b)+b1; - if (b > 0.5) - {b-=1.0; sum+=1.0;} - else if (b < -0.5) - {b+=1.0; sum-=1.0;} - s=b+(bb+bb1+bb2); - t=((b-s)+bb)+(bb1+bb2); - b=s*split; - t1=b-(b-s); - t2=s-t1; - b=s*hp0.x; - bb=(((t1*mp1.x-b)+t1*mp2.x)+t2*mp1.x)+(t2*mp2.x+s*hp1.x+t*hp0.x); - s=b+bb; - t=(b-s)+bb; - *a=s; - *aa=t; - return ((int) sum)&3; /* return quater of unit circle */ -} - -}; -}; diff --git a/source/module_base/libm/cexp.cpp b/source/module_base/libm/cexp.cpp deleted file mode 100644 index 1677fd7dcd..0000000000 --- a/source/module_base/libm/cexp.cpp +++ /dev/null @@ -1,154 +0,0 @@ -//========================================================== -// AUTHOR : alcanderian@gmail.com -// DATE : 2023-01-06 -//========================================================== - -#include -#include -#include -#include -#include - -namespace ModuleBase -{ -namespace libm -{ - -template void __msincos (FLOAT x, FLOAT *s, FLOAT *c); -template FLOAT __mexp (FLOAT x); -template FLOAT __mhugeval (); - -void __sincos (double x, double *sinx, double *cosx); -double __exp (double x); - -template<> inline double __mexp (double x) { return __exp (x); } -template<> inline void __msincos (double x, double *s, double *c) { __sincos (x, s, c); } -template<> inline double __mhugeval () { return HUGE_VAL; } - -template -inline std::complex -__cexp_impl (const std::complex &x) -{ - std::complex retval; - int rcls = fpclassify (x.real()); - int icls = fpclassify (x.imag()); - - if (rcls >= FP_ZERO) - { - /* Real part is finite. */ - if (icls >= FP_ZERO) - { - - /* Imaginary part is finite. */ - const int t = (int) ((std::numeric_limits::max_exponent - 1) * (FLOAT)(M_LN2)); - FLOAT sinix, cosix; - - if ((fabs (x.imag()) > std::numeric_limits::min())) - { - __msincos (x.imag(), &sinix, &cosix); - } - else - { - sinix = x.imag(); - cosix = 1; - } - - std::complex __x = x; - if (__x.real() > t) - { - FLOAT exp_t = __mexp ((FLOAT)t); - __x -= std::complex(t, 0); - sinix *= exp_t; - cosix *= exp_t; - if (__x.real() > t) - { - __x -= std::complex(t, 0); - sinix *= exp_t; - cosix *= exp_t; - } - } - if (__x.real() > t) - { - /* Overflow (original real part of x > 3t). */ - retval.real(std::numeric_limits::max() * cosix); - retval.imag(std::numeric_limits::max() * sinix); - } - else - { - FLOAT exp_val = __mexp (__x.real()); - retval.real(exp_val * cosix); - retval.imag(exp_val * sinix); - } - } - else - { - /* If the imaginary part is +-inf or NaN and the real part - is not +-inf the result is NaN + iNaN. */ - retval.real(std::numeric_limits::quiet_NaN()); - retval.imag(std::numeric_limits::quiet_NaN()); - } - } - else if (rcls == FP_INFINITE) - { - /* Real part is infinite. */ - if (icls >= FP_ZERO) - { - /* Imaginary part is finite. */ - FLOAT value = signbit (x.real()) ? 0 : __mhugeval(); - - if (icls == FP_ZERO) - { - /* Imaginary part is 0.0. */ - retval.real(value); - retval.imag(x.imag()); - } - else - { - FLOAT sinix, cosix; - - if ((fabs (x.imag()) > std::numeric_limits::min())) - { - __msincos (x.imag(), &sinix, &cosix); - } - else - { - sinix = x.imag(); - cosix = 1; - } - - retval.real(copysign (value, cosix)); - retval.imag(copysign (value, sinix)); - } - } - else if (signbit (x.real()) == 0) - { - retval.real(__mhugeval()); - retval.imag(x.imag() - x.imag()); - } - else - { - retval.real(0); - retval.imag(copysign (0, x.imag())); - } - } - else - { - /* If the real part is NaN the result is NaN + iNaN unless the - imaginary part is zero. */ - retval.real(std::numeric_limits::quiet_NaN()); - if (icls == FP_ZERO) - retval.imag(x.imag()); - else - { - retval.imag(std::numeric_limits::quiet_NaN()); - } - } - - return retval; -} - -std::complex -__cexp (const std::complex &x) { return __cexp_impl(x); } - -}; -}; diff --git a/source/module_base/libm/exp.cpp b/source/module_base/libm/exp.cpp deleted file mode 100644 index 8eaaf03b39..0000000000 --- a/source/module_base/libm/exp.cpp +++ /dev/null @@ -1,372 +0,0 @@ -//========================================================== -// AUTHOR : alcanderian@gmail.com -// DATE : 2023-01-06 -//========================================================== - -#include -#include -#include - -namespace ModuleBase -{ -namespace libm -{ - -typedef int int4; -typedef union { unsigned int u[2]; int4 i[2]; double x; double d; } mynumber; - -#define max(x, y) (((y) > (x)) ? (y) : (x)) -#define min(x, y) (((y) < (x)) ? (y) : (x)) - -#define EXP_TABLE_BITS 7 -#define EXP_POLY_ORDER 5 -#define EXP2_POLY_ORDER 5 -#define N (1 << EXP_TABLE_BITS) - -struct exp_data -{ - double invln2N; - double shift; - double negln2hiN; - double negln2loN; - double poly[4]; /* Last four coefficients. */ - double exp2_shift; - double exp2_poly[EXP2_POLY_ORDER]; - uint64_t tab[2*(1 << EXP_TABLE_BITS)]; -}; - -const exp_data __exp_data = { -// N/ln2 -1.4426950408889634 * N, -// Used for rounding when !TOINT_INTRINSICS -6755399441055744, -// -ln2/N --0.005415212348111709, --1.2864023111638346e-14, - -// exp polynomial coefficients. -{ -// abs error: 1.555*2^-66 -// ulp error: 0.509 (0.511 without fma) -// if |x| < ln2/256+eps -// abs error if |x| < ln2/128: 1.7145*2^-56 -0.49999999999996786, -0.16666666666665886, -0.0416666808410674, -0.008333335853059549, -}, -6755399441055744 / N, -// exp2 polynomial coefficients. -{ -// abs error: 1.2195*2^-65 -// ulp error: 0.507 (0.511 without fma) -// if |x| < 1/256 -// abs error if |x| < 1/128: 1.9941*2^-56 -0.6931471805599453, -0.24022650695909065, -0.0555041086686087, -0.009618131975721055, -0.0013332074570119598, -}, -// 2^(k/N) ~= H[k]*(1 + T[k]) for int k in [0,N) -// tab[2*k] = asuint64(T[k]) -// tab[2*k+1] = asuint64(H[k]) - (k << 52)/N -{ -0x0, 0x3ff0000000000000, -0x3c9b3b4f1a88bf6e, 0x3feff63da9fb3335, -0xbc7160139cd8dc5d, 0x3fefec9a3e778061, -0xbc905e7a108766d1, 0x3fefe315e86e7f85, -0x3c8cd2523567f613, 0x3fefd9b0d3158574, -0xbc8bce8023f98efa, 0x3fefd06b29ddf6de, -0x3c60f74e61e6c861, 0x3fefc74518759bc8, -0x3c90a3e45b33d399, 0x3fefbe3ecac6f383, -0x3c979aa65d837b6d, 0x3fefb5586cf9890f, -0x3c8eb51a92fdeffc, 0x3fefac922b7247f7, -0x3c3ebe3d702f9cd1, 0x3fefa3ec32d3d1a2, -0xbc6a033489906e0b, 0x3fef9b66affed31b, -0xbc9556522a2fbd0e, 0x3fef9301d0125b51, -0xbc5080ef8c4eea55, 0x3fef8abdc06c31cc, -0xbc91c923b9d5f416, 0x3fef829aaea92de0, -0x3c80d3e3e95c55af, 0x3fef7a98c8a58e51, -0xbc801b15eaa59348, 0x3fef72b83c7d517b, -0xbc8f1ff055de323d, 0x3fef6af9388c8dea, -0x3c8b898c3f1353bf, 0x3fef635beb6fcb75, -0xbc96d99c7611eb26, 0x3fef5be084045cd4, -0x3c9aecf73e3a2f60, 0x3fef54873168b9aa, -0xbc8fe782cb86389d, 0x3fef4d5022fcd91d, -0x3c8a6f4144a6c38d, 0x3fef463b88628cd6, -0x3c807a05b0e4047d, 0x3fef3f49917ddc96, -0x3c968efde3a8a894, 0x3fef387a6e756238, -0x3c875e18f274487d, 0x3fef31ce4fb2a63f, -0x3c80472b981fe7f2, 0x3fef2b4565e27cdd, -0xbc96b87b3f71085e, 0x3fef24dfe1f56381, -0x3c82f7e16d09ab31, 0x3fef1e9df51fdee1, -0xbc3d219b1a6fbffa, 0x3fef187fd0dad990, -0x3c8b3782720c0ab4, 0x3fef1285a6e4030b, -0x3c6e149289cecb8f, 0x3fef0cafa93e2f56, -0x3c834d754db0abb6, 0x3fef06fe0a31b715, -0x3c864201e2ac744c, 0x3fef0170fc4cd831, -0x3c8fdd395dd3f84a, 0x3feefc08b26416ff, -0xbc86a3803b8e5b04, 0x3feef6c55f929ff1, -0xbc924aedcc4b5068, 0x3feef1a7373aa9cb, -0xbc9907f81b512d8e, 0x3feeecae6d05d866, -0xbc71d1e83e9436d2, 0x3feee7db34e59ff7, -0xbc991919b3ce1b15, 0x3feee32dc313a8e5, -0x3c859f48a72a4c6d, 0x3feedea64c123422, -0xbc9312607a28698a, 0x3feeda4504ac801c, -0xbc58a78f4817895b, 0x3feed60a21f72e2a, -0xbc7c2c9b67499a1b, 0x3feed1f5d950a897, -0x3c4363ed60c2ac11, 0x3feece086061892d, -0x3c9666093b0664ef, 0x3feeca41ed1d0057, -0x3c6ecce1daa10379, 0x3feec6a2b5c13cd0, -0x3c93ff8e3f0f1230, 0x3feec32af0d7d3de, -0x3c7690cebb7aafb0, 0x3feebfdad5362a27, -0x3c931dbdeb54e077, 0x3feebcb299fddd0d, -0xbc8f94340071a38e, 0x3feeb9b2769d2ca7, -0xbc87deccdc93a349, 0x3feeb6daa2cf6642, -0xbc78dec6bd0f385f, 0x3feeb42b569d4f82, -0xbc861246ec7b5cf6, 0x3feeb1a4ca5d920f, -0x3c93350518fdd78e, 0x3feeaf4736b527da, -0x3c7b98b72f8a9b05, 0x3feead12d497c7fd, -0x3c9063e1e21c5409, 0x3feeab07dd485429, -0x3c34c7855019c6ea, 0x3feea9268a5946b7, -0x3c9432e62b64c035, 0x3feea76f15ad2148, -0xbc8ce44a6199769f, 0x3feea5e1b976dc09, -0xbc8c33c53bef4da8, 0x3feea47eb03a5585, -0xbc845378892be9ae, 0x3feea34634ccc320, -0xbc93cedd78565858, 0x3feea23882552225, -0x3c5710aa807e1964, 0x3feea155d44ca973, -0xbc93b3efbf5e2228, 0x3feea09e667f3bcd, -0xbc6a12ad8734b982, 0x3feea012750bdabf, -0xbc6367efb86da9ee, 0x3fee9fb23c651a2f, -0xbc80dc3d54e08851, 0x3fee9f7df9519484, -0xbc781f647e5a3ecf, 0x3fee9f75e8ec5f74, -0xbc86ee4ac08b7db0, 0x3fee9f9a48a58174, -0xbc8619321e55e68a, 0x3fee9feb564267c9, -0x3c909ccb5e09d4d3, 0x3feea0694fde5d3f, -0xbc7b32dcb94da51d, 0x3feea11473eb0187, -0x3c94ecfd5467c06b, 0x3feea1ed0130c132, -0x3c65ebe1abd66c55, 0x3feea2f336cf4e62, -0xbc88a1c52fb3cf42, 0x3feea427543e1a12, -0xbc9369b6f13b3734, 0x3feea589994cce13, -0xbc805e843a19ff1e, 0x3feea71a4623c7ad, -0xbc94d450d872576e, 0x3feea8d99b4492ed, -0x3c90ad675b0e8a00, 0x3feeaac7d98a6699, -0x3c8db72fc1f0eab4, 0x3feeace5422aa0db, -0xbc65b6609cc5e7ff, 0x3feeaf3216b5448c, -0x3c7bf68359f35f44, 0x3feeb1ae99157736, -0xbc93091fa71e3d83, 0x3feeb45b0b91ffc6, -0xbc5da9b88b6c1e29, 0x3feeb737b0cdc5e5, -0xbc6c23f97c90b959, 0x3feeba44cbc8520f, -0xbc92434322f4f9aa, 0x3feebd829fde4e50, -0xbc85ca6cd7668e4b, 0x3feec0f170ca07ba, -0x3c71affc2b91ce27, 0x3feec49182a3f090, -0x3c6dd235e10a73bb, 0x3feec86319e32323, -0xbc87c50422622263, 0x3feecc667b5de565, -0x3c8b1c86e3e231d5, 0x3feed09bec4a2d33, -0xbc91bbd1d3bcbb15, 0x3feed503b23e255d, -0x3c90cc319cee31d2, 0x3feed99e1330b358, -0x3c8469846e735ab3, 0x3feede6b5579fdbf, -0xbc82dfcd978e9db4, 0x3feee36bbfd3f37a, -0x3c8c1a7792cb3387, 0x3feee89f995ad3ad, -0xbc907b8f4ad1d9fa, 0x3feeee07298db666, -0xbc55c3d956dcaeba, 0x3feef3a2b84f15fb, -0xbc90a40e3da6f640, 0x3feef9728de5593a, -0xbc68d6f438ad9334, 0x3feeff76f2fb5e47, -0xbc91eee26b588a35, 0x3fef05b030a1064a, -0x3c74ffd70a5fddcd, 0x3fef0c1e904bc1d2, -0xbc91bdfbfa9298ac, 0x3fef12c25bd71e09, -0x3c736eae30af0cb3, 0x3fef199bdd85529c, -0x3c8ee3325c9ffd94, 0x3fef20ab5fffd07a, -0x3c84e08fd10959ac, 0x3fef27f12e57d14b, -0x3c63cdaf384e1a67, 0x3fef2f6d9406e7b5, -0x3c676b2c6c921968, 0x3fef3720dcef9069, -0xbc808a1883ccb5d2, 0x3fef3f0b555dc3fa, -0xbc8fad5d3ffffa6f, 0x3fef472d4a07897c, -0xbc900dae3875a949, 0x3fef4f87080d89f2, -0x3c74a385a63d07a7, 0x3fef5818dcfba487, -0xbc82919e2040220f, 0x3fef60e316c98398, -0x3c8e5a50d5c192ac, 0x3fef69e603db3285, -0x3c843a59ac016b4b, 0x3fef7321f301b460, -0xbc82d52107b43e1f, 0x3fef7c97337b9b5f, -0xbc892ab93b470dc9, 0x3fef864614f5a129, -0x3c74b604603a88d3, 0x3fef902ee78b3ff6, -0x3c83c5ec519d7271, 0x3fef9a51fbc74c83, -0xbc8ff7128fd391f0, 0x3fefa4afa2a490da, -0xbc8dae98e223747d, 0x3fefaf482d8e67f1, -0x3c8ec3bc41aa2008, 0x3fefba1bee615a27, -0x3c842b94c3a9eb32, 0x3fefc52b376bba97, -0x3c8a64a931d185ee, 0x3fefd0765b6e4540, -0xbc8e37bae43be3ed, 0x3fefdbfdad9cbe14, -0x3c77893b4d91cd9d, 0x3fefe7c1819e90d8, -0x3c5305c14160cc89, 0x3feff3c22b8f71f1, -}, -}; - -#ifndef WANT_ROUNDING -/* Correct special case results in non-nearest rounding modes. */ -# define WANT_ROUNDING 1 -#endif - -static inline uint64_t -asuint64 (double f) -{ - union - { - double f; - uint64_t i; - } u = {f}; - return u.i; -} - -static inline double -asdouble (uint64_t i) -{ - union - { - uint64_t i; - double f; - } u = {i}; - return u.f; -} - -#define InvLn2N __exp_data.invln2N -#define NegLn2hiN __exp_data.negln2hiN -#define NegLn2loN __exp_data.negln2loN -#define Shift __exp_data.shift -#define T __exp_data.tab -#define C2 __exp_data.poly[5 - EXP_POLY_ORDER] -#define C3 __exp_data.poly[6 - EXP_POLY_ORDER] -#define C4 __exp_data.poly[7 - EXP_POLY_ORDER] -#define C5 __exp_data.poly[8 - EXP_POLY_ORDER] - -/* Handle cases that may overflow or underflow when computing the result that - is scale*(1+TMP) without intermediate rounding. The bit representation of - scale is in SBITS, however it has a computed exponent that may have - overflown into the sign bit so that needs to be adjusted before using it as - a double. (int32_t)KI is the k used in the argument reduction and exponent - adjustment of scale, positive k here means the result may overflow and - negative k means the result may underflow. */ -static inline double -specialcase (double_t tmp, uint64_t sbits, uint64_t ki) -{ - double_t scale, y; - - if ((ki & 0x80000000) == 0) - { - /* k > 0, the exponent of scale might have overflowed by <= 460. */ - sbits -= 1009ull << 52; - scale = asdouble (sbits); - y = 5.486124068793689e+303 * (scale + scale * tmp); - return y; - } - /* k < 0, need special care in the subnormal range. */ - sbits += 1022ull << 52; - scale = asdouble (sbits); - y = scale + scale * tmp; - if (y < 1.0) - { - /* Round y to the right precision before scaling it into the subnormal - range to avoid double rounding that can cause 0.5+E/2 ulp error where - E is the worst-case ulp error outside the subnormal range. So this - is only useful if the goal is better than 1 ulp worst-case error. */ - double_t hi, lo; - lo = scale - y + scale * tmp; - hi = 1.0 + y; - lo = 1.0 - hi + y + lo; - y = hi + lo - 1.0; - /* Avoid -0.0 with downward rounding. */ - if (WANT_ROUNDING && y == 0.0) - y = 0.0; - } - y = 2.2250738585072014e-308 * y; - return y; -} - -/* Top 12 bits of a double (sign and exponent bits). */ -static inline uint32_t -top12 (double x) -{ - return asuint64 (x) >> 52; -} - -static inline double -xflow (uint32_t sign, double y) -{ - y = (sign ? -y : y) * y; - return y; -} - -static inline double -__math_uflow (uint32_t sign) -{ - return xflow (sign, 1.2882297539194267e-231); -} - -static inline double -__math_oflow (uint32_t sign) -{ - return xflow (sign, 3.105036184601418e+231); -} - -double -__exp (double x) -{ - uint32_t abstop; - uint64_t ki, idx, top, sbits; - /* double_t for better performance on targets with FLT_EVAL_METHOD==2. */ - double_t kd, z, r, r2, scale, tail, tmp; - - abstop = top12 (x) & 0x7ff; - if ((abstop - top12 (5.551115123125783e-17) - >= top12 (512.0) - top12 (5.551115123125783e-17))) - { - if (abstop - top12 (5.551115123125783e-17) >= 0x80000000) - /* Avoid spurious underflow for tiny x. */ - /* Note: 0 is common input. */ - return WANT_ROUNDING ? 1.0 + x : 1.0; - if (abstop >= top12 (1024.0)) - { - if (asuint64 (x) == asuint64 (-INFINITY)) - return 0.0; - if (abstop >= top12 (INFINITY)) - return 1.0 + x; - if (asuint64 (x) >> 63) - return __math_uflow (0); - else - return __math_oflow (0); - } - /* Large x is special cased below. */ - abstop = 0; - } - - /* exp(x) = 2^(k/N) * exp(r), with exp(r) in [2^(-1/2N),2^(1/2N)]. */ - /* x = ln2/N*k + r, with int k and r in [-ln2/2N, ln2/2N]. */ - z = InvLn2N * x; - /* z - kd is in [-1, 1] in non-nearest rounding modes. */ - kd = z + Shift; - ki = asuint64 (kd); - kd -= Shift; - r = x + kd * NegLn2hiN + kd * NegLn2loN; - /* 2^(k/N) ~= scale * (1 + tail). */ - idx = 2 * (ki % N); - top = ki << (52 - EXP_TABLE_BITS); - tail = asdouble (T[idx]); - /* This is only a valid scale when -1023*N < k < 1024*N. */ - sbits = T[idx + 1] + top; - /* exp(x) = 2^(k/N) * exp(r) ~= scale + scale * (tail + exp(r) - 1). */ - /* Evaluation is optimized assuming superscalar pipelined execution. */ - r2 = r * r; - /* Without fma the worst case error is 0.25/N ulp larger. */ - /* Worst case error is less than 0.5+1.11/N+(abs poly error * 2^53) ulp. */ - tmp = tail + r + r2 * (C2 + r * C3) + r2 * r2 * (C4 + r * C5); - if (abstop == 0) - return specialcase (tmp, sbits, ki); - scale = asdouble (sbits); - /* Note: tmp == 0 or |tmp| > 2^-65 and scale > 2^-739, so there - is no spurious underflow here even without fma. */ - return scale + scale * tmp; -} - -}; -}; diff --git a/source/module_base/libm/libm.h b/source/module_base/libm/libm.h deleted file mode 100644 index 13bf65de5c..0000000000 --- a/source/module_base/libm/libm.h +++ /dev/null @@ -1,62 +0,0 @@ -//========================================================== -// AUTHOR : alcanderian@gmail.com -// DATE : 2023-01-06 -//========================================================== - -#ifndef MODULE_BASE_ABAUCS_LIBM_H -#define MODULE_BASE_ABAUCS_LIBM_H - -#include -#include - -namespace ModuleBase -{ -namespace libm -{ - -#ifdef USE_ABACUS_LIBM - -double __exp (double x); -double __cos (double x); -double __sin (double x); -void __sincos (double x, double *sinx, double *cosx); -std::complex __cexp (const std::complex &x); - -#else - -inline double __exp (double x) { return std::exp(x); }; -inline double __cos (double x) { return std::cos(x); }; -inline double __sin (double x) { return std::sin(x); }; -inline void __sincos (double x, double *sinx, double *cosx) { sincos(x, sinx, cosx); }; -inline std::complex __cexp (const std::complex &x) { return std::exp(x); } - -#endif - -inline float __expf (float x) { return std::exp(x); }; -inline float __cosf (float x) { return std::cos(x); }; -inline float __sinf (float x) { return std::sin(x); }; -inline void __sincosf (float x, float *sinx, float *cosx) { sincosf(x, sinx, cosx); }; -inline std::complex __cexpf (const std::complex &x) { return std::exp(x); } - -template Tp exp(Tp x); -template Tp cos(Tp x); -template Tp sin(Tp x); -template void sincos(Tp x, Tp *s, Tp *c); -template std::complex exp(const std::complex &x); - -template<> inline double exp(double x) { return __exp(x); } -template<> inline double cos(double x) { return __cos(x); } -template<> inline double sin(double x) { return __sin(x); } -template<> inline void sincos(double x, double *s, double *c) { __sincos(x, s, c); } -template<> inline std::complex exp(const std::complex &x) { return __cexp(x); } - -template<> inline float exp(float x) { return __expf(x); } -template<> inline float cos(float x) { return __cosf(x); } -template<> inline float sin(float x) { return __sinf(x); } -template<> inline void sincos(float x, float *s, float *c) { __sincosf(x, s, c); } -template<> inline std::complex exp(const std::complex &x) { return __cexpf(x); } - -}; -}; - -#endif diff --git a/source/module_base/libm/sincos.cpp b/source/module_base/libm/sincos.cpp deleted file mode 100644 index 6252f84842..0000000000 --- a/source/module_base/libm/sincos.cpp +++ /dev/null @@ -1,1262 +0,0 @@ -//========================================================== -// AUTHOR : alcanderian@gmail.com -// DATE : 2023-01-06 -//========================================================== - -#include -#include - -namespace ModuleBase -{ -namespace libm -{ - -int -__branred(double x, double *a, double *aa); - -typedef int int4; -typedef union { unsigned int u[2]; int4 i[2]; double x; double d; } mynumber; - -#define max(x, y) (((y) > (x)) ? (y) : (x)) -#define min(x, y) (((y) < (x)) ? (y) : (x)) - -#if (__BYTE_ORDER == __BIG_ENDIAN) - -#define HIGH_HALF 0 -#define LOW_HALF 1 - -static const union {unsigned int u[880]; int4 i[880]; double x[440];} __sincostab = { .u = { -/**/ 0x00000000, 0x00000000, -/**/ 0x00000000, 0x00000000, -/**/ 0x3FF00000, 0x00000000, -/**/ 0x00000000, 0x00000000, -/**/ 0x3F7FFFEA, 0xAAAEEEEF, -/**/ 0xBC1E45E2, 0xEC67B77C, -/**/ 0x3FEFFFC0, 0x00155552, -/**/ 0x3C8F4A01, 0xA0196DAE, -/**/ 0x3F8FFFAA, 0xAAEEEED5, -/**/ 0xBC02AB63, 0x9A9F0777, -/**/ 0x3FEFFF00, 0x0155549F, -/**/ 0x3C828A28, 0xA03A5EF3, -/**/ 0x3F97FF70, 0x01033255, -/**/ 0x3BFEFE2B, 0x51527336, -/**/ 0x3FEFFDC0, 0x06BFF7E6, -/**/ 0x3C8AE6DA, 0xE86977BD, -/**/ 0x3F9FFEAA, 0xAEEEE86F, -/**/ 0xBC3CD406, 0xFB224AE2, -/**/ 0x3FEFFC00, 0x155527D3, -/**/ 0xBC83B544, 0x92D89B5B, -/**/ 0x3FA3FEB2, 0xB12D45D5, -/**/ 0x3C34EC54, 0x203D1C11, -/**/ 0x3FEFF9C0, 0x3414A7BA, -/**/ 0x3C6991F4, 0xBE6C59BF, -/**/ 0x3FA7FDC0, 0x1032FBA9, -/**/ 0xBC4599BD, 0xF46E997A, -/**/ 0x3FEFF700, 0x6BFDF99F, -/**/ 0xBC78B3B5, 0x60648D5F, -/**/ 0x3FABFC6D, 0x78586DAC, -/**/ 0x3C18E4FD, 0x03DBF236, -/**/ 0x3FEFF3C0, 0xC8103A31, -/**/ 0x3C74856D, 0xBDDC0E66, -/**/ 0x3FAFFAAA, 0xEEED4EDB, -/**/ 0xBC42D16D, 0x32684B69, -/**/ 0x3FEFF001, 0x5549F4D3, -/**/ 0x3C832838, 0x7B99426F, -/**/ 0x3FB1FC34, 0x3D808BEF, -/**/ 0xBC5F3D32, 0xE6F3BE4F, -/**/ 0x3FEFEBC2, 0x22A8EF9F, -/**/ 0x3C579349, 0x34F54C77, -/**/ 0x3FB3FACB, 0x12D1755B, -/**/ 0xBC592191, 0x5299468C, -/**/ 0x3FEFE703, 0x4129EF6F, -/**/ 0xBC6CBF43, 0x37C96F97, -/**/ 0x3FB5F911, 0xFD10B737, -/**/ 0xBC50184F, 0x02BE9102, -/**/ 0x3FEFE1C4, 0xC3C873EB, -/**/ 0xBC35A9C9, 0x057C4A02, -/**/ 0x3FB7F701, 0x032550E4, -/**/ 0x3C3AFC2D, 0x1800501A, -/**/ 0x3FEFDC06, 0xBF7E6B9B, -/**/ 0x3C831902, 0xB535F8DB, -/**/ 0x3FB9F490, 0x2D55D1F9, -/**/ 0x3C52696D, 0x7EAC1DC1, -/**/ 0x3FEFD5C9, 0x4B43E000, -/**/ 0xBC62E768, 0xCB4F92F9, -/**/ 0x3FBBF1B7, 0x8568391D, -/**/ 0x3C5E9184, 0x1DEA4CC8, -/**/ 0x3FEFCF0C, 0x800E99B1, -/**/ 0x3C6EA3D7, 0x86D186AC, -/**/ 0x3FBDEE6F, 0x16C1CCE6, -/**/ 0xBC450F8E, 0x2FB71673, -/**/ 0x3FEFC7D0, 0x78D1BC88, -/**/ 0x3C8075D2, 0x447DB685, -/**/ 0x3FBFEAAE, 0xEE86EE36, -/**/ 0xBC4AFCB2, 0xBCC6F03B, -/**/ 0x3FEFC015, 0x527D5BD3, -/**/ 0x3C8B68F3, 0x5094EFB8, -/**/ 0x3FC0F337, 0x8DDD71D1, -/**/ 0x3C6D8468, 0x724F0F9E, -/**/ 0x3FEFB7DB, 0x2BFE0695, -/**/ 0x3C821DAD, 0xF4F65AB1, -/**/ 0x3FC1F0D3, 0xD7AFCEAF, -/**/ 0xBC66EF95, 0x099769A5, -/**/ 0x3FEFAF22, 0x263C4BD3, -/**/ 0xBC552ACE, 0x133A2769, -/**/ 0x3FC2EE28, 0x5E4AB88F, -/**/ 0xBC6E4D0F, 0x05DEE058, -/**/ 0x3FEFA5EA, 0x641C36F2, -/**/ 0x3C404DA6, 0xED17CC7C, -/**/ 0x3FC3EB31, 0x2C5D66CB, -/**/ 0x3C647D66, 0x6B66CB91, -/**/ 0x3FEF9C34, 0x0A7CC428, -/**/ 0x3C8C5B6B, 0x063B7462, -/**/ 0x3FC4E7EA, 0x4DC5F27B, -/**/ 0x3C5949DB, 0x2AC072FC, -/**/ 0x3FEF91FF, 0x40374D01, -/**/ 0xBC67D03F, 0x4D3A9E4C, -/**/ 0x3FC5E44F, 0xCFA126F3, -/**/ 0xBC66F443, 0x063F89B6, -/**/ 0x3FEF874C, 0x2E1EECF6, -/**/ 0xBC8C6514, 0xE1332B16, -/**/ 0x3FC6E05D, 0xC05A4D4C, -/**/ 0xBBD32C5C, 0x8B81C940, -/**/ 0x3FEF7C1A, 0xFEFFDE24, -/**/ 0xBC78F55B, 0xC47540B1, -/**/ 0x3FC7DC10, 0x2FBAF2B5, -/**/ 0x3C45AB50, 0xE23C97C3, -/**/ 0x3FEF706B, 0xDF9ECE1C, -/**/ 0xBC8698C8, 0x0C36DCB4, -/**/ 0x3FC8D763, 0x2EFAA944, -/**/ 0xBC620FA2, 0x62CBB953, -/**/ 0x3FEF643E, 0xFEB82ACD, -/**/ 0x3C76B00A, 0xC1FE28AC, -/**/ 0x3FC9D252, 0xD0CEC312, -/**/ 0x3C59C43D, 0x80B1137D, -/**/ 0x3FEF5794, 0x8CFF6797, -/**/ 0x3C6E3A0D, 0x3E03B1D5, -/**/ 0x3FCACCDB, 0x297A0765, -/**/ 0xBC59883B, 0x57D6CDEB, -/**/ 0x3FEF4A6C, 0xBD1E3A79, -/**/ 0x3C813DF0, 0xEDAEBB57, -/**/ 0x3FCBC6F8, 0x4EDC6199, -/**/ 0x3C69C1A5, 0x6A7B0CAB, -/**/ 0x3FEF3CC7, 0xC3B3D16E, -/**/ 0xBC621A3A, 0xD28A3494, -/**/ 0x3FCCC0A6, 0x588289A3, -/**/ 0xBC6868D0, 0x9BC87C6B, -/**/ 0x3FEF2EA5, 0xD753FFED, -/**/ 0x3C8CC421, 0x5F56D583, -/**/ 0x3FCDB9E1, 0x5FB5A5D0, -/**/ 0xBC632E20, 0xD6CC6FC2, -/**/ 0x3FEF2007, 0x3086649F, -/**/ 0x3C7B9404, 0x16C1984B, -/**/ 0x3FCEB2A5, 0x7F8AE5A3, -/**/ 0xBC60BE06, 0xAF572CEB, -/**/ 0x3FEF10EC, 0x09C5873B, -/**/ 0x3C8D9072, 0x762C1283, -/**/ 0x3FCFAAEE, 0xD4F31577, -/**/ 0xBC615D88, 0x508E32B8, -/**/ 0x3FEF0154, 0x9F7DEEA1, -/**/ 0x3C8D3C1E, 0x99E5CAFD, -/**/ 0x3FD0515C, 0xBF65155C, -/**/ 0xBC79B8C2, 0x9DFD8EC8, -/**/ 0x3FEEF141, 0x300D2F26, -/**/ 0xBC82AA1B, 0x08DED372, -/**/ 0x3FD0CD00, 0xCEF36436, -/**/ 0xBC79FB0A, 0x0C93E2B5, -/**/ 0x3FEEE0B1, 0xFBC0F11C, -/**/ 0xBC4BFD23, 0x80BBC3B1, -/**/ 0x3FD14861, 0xAA94DDEB, -/**/ 0xBC6BE881, 0xB5B615A4, -/**/ 0x3FEECFA7, 0x44D5EFA1, -/**/ 0xBC556D0A, 0x4AF541D0, -/**/ 0x3FD1C37D, 0x64C6B876, -/**/ 0x3C746076, 0xFE0DCFF5, -/**/ 0x3FEEBE21, 0x4F76EFA8, -/**/ 0xBC802F9F, 0x12BA543E, -/**/ 0x3FD23E52, 0x111AAF36, -/**/ 0xBC74F080, 0x334EFF18, -/**/ 0x3FEEAC20, 0x61BBAF4F, -/**/ 0x3C62C1D5, 0x3E94658D, -/**/ 0x3FD2B8DD, 0xC43EB49F, -/**/ 0x3C615538, 0x99F2D807, -/**/ 0x3FEE99A4, 0xC3A7CD83, -/**/ 0xBC82264B, 0x1BC53CE8, -/**/ 0x3FD3331E, 0x94049F87, -/**/ 0x3C7E0CB6, 0xB40C302C, -/**/ 0x3FEE86AE, 0xBF29A9ED, -/**/ 0x3C89397A, 0xFDBB58A7, -/**/ 0x3FD3AD12, 0x9769D3D8, -/**/ 0x3C003D55, 0x04878398, -/**/ 0x3FEE733E, 0xA0193D40, -/**/ 0xBC86428B, 0x3546CE13, -/**/ 0x3FD426B7, 0xE69EE697, -/**/ 0xBC7F09C7, 0x5705C59F, -/**/ 0x3FEE5F54, 0xB436E9D0, -/**/ 0x3C87EB0F, 0xD02FC8BC, -/**/ 0x3FD4A00C, 0x9B0F3D20, -/**/ 0x3C7823BA, 0x6BB08EAD, -/**/ 0x3FEE4AF1, 0x4B2A449C, -/**/ 0xBC868CA0, 0x2E8A6833, -/**/ 0x3FD5190E, 0xCF68A77A, -/**/ 0x3C7B3571, 0x55EEF0F3, -/**/ 0x3FEE3614, 0xB680D6A5, -/**/ 0xBC727793, 0xAA015237, -/**/ 0x3FD591BC, 0x9FA2F597, -/**/ 0x3C67C74B, 0xAC3FE0CB, -/**/ 0x3FEE20BF, 0x49ACD6C1, -/**/ 0xBC5660AE, 0xC7EF636C, -/**/ 0x3FD60A14, 0x29078775, -/**/ 0x3C5B1FD8, 0x0BA89133, -/**/ 0x3FEE0AF1, 0x5A03DBCE, -/**/ 0x3C5FE8E7, 0x02771AE6, -/**/ 0x3FD68213, 0x8A38D7F7, -/**/ 0xBC7D8892, 0x02444AAD, -/**/ 0x3FEDF4AB, 0x3EBD875E, -/**/ 0xBC8E2D8A, 0x7E6736C4, -/**/ 0x3FD6F9B8, 0xE33A0255, -/**/ 0x3C742BC1, 0x4EE9DA0D, -/**/ 0x3FEDDDED, 0x50F228D6, -/**/ 0xBC6E80C8, 0xD42BA2BF, -/**/ 0x3FD77102, 0x55764214, -/**/ 0xBC66EAD7, 0x314BB6CE, -/**/ 0x3FEDC6B7, 0xEB995912, -/**/ 0x3C54B364, 0x776DCD35, -/**/ 0x3FD7E7EE, 0x03C86D4E, -/**/ 0xBC7B63BC, 0xDABF5AF2, -/**/ 0x3FEDAF0B, 0x6B888E83, -/**/ 0x3C8A249E, 0x2B5E5CEA, -/**/ 0x3FD85E7A, 0x12826949, -/**/ 0x3C78A40E, 0x9B5FACE0, -/**/ 0x3FED96E8, 0x2F71A9DC, -/**/ 0x3C8FF61B, 0xD5D2039D, -/**/ 0x3FD8D4A4, 0xA774992F, -/**/ 0x3C744A02, 0xEA766326, -/**/ 0x3FED7E4E, 0x97E17B4A, -/**/ 0xBC63B770, 0x352BED94, -/**/ 0x3FD94A6B, 0xE9F546C5, -/**/ 0xBC769CE1, 0x3E683F58, -/**/ 0x3FED653F, 0x073E4040, -/**/ 0xBC876236, 0x434BEC37, -/**/ 0x3FD9BFCE, 0x02E80510, -/**/ 0x3C709E39, 0xA320B0A4, -/**/ 0x3FED4BB9, 0xE1C619E0, -/**/ 0x3C8F34BB, 0x77858F61, -/**/ 0x3FDA34C9, 0x1CC50CCA, -/**/ 0xBC5A310E, 0x3B50CECD, -/**/ 0x3FED31BF, 0x8D8D7C06, -/**/ 0x3C7E60DD, 0x3089CBDD, -/**/ 0x3FDAA95B, 0x63A09277, -/**/ 0xBC66293E, 0xB13C0381, -/**/ 0x3FED1750, 0x727D94F0, -/**/ 0x3C80D52B, 0x1EC1A48E, -/**/ 0x3FDB1D83, 0x05321617, -/**/ 0xBC7AE242, 0xCB99F519, -/**/ 0x3FECFC6C, 0xFA52AD9F, -/**/ 0x3C88B5B5, 0x508F2A0D, -/**/ 0x3FDB913E, 0x30DBAC43, -/**/ 0xBC7E38AD, 0x2F6C3FF1, -/**/ 0x3FECE115, 0x909A82E5, -/**/ 0x3C81F139, 0xBB31109A, -/**/ 0x3FDC048B, 0x17B140A3, -/**/ 0x3C619FE6, 0x757E9FA7, -/**/ 0x3FECC54A, 0xA2B2972E, -/**/ 0x3C64EE16, 0x2BA83A98, -/**/ 0x3FDC7767, 0xEC7FD19E, -/**/ 0xBC5EB14D, 0x1A3D5826, -/**/ 0x3FECA90C, 0x9FC67D0B, -/**/ 0xBC646A81, 0x485E3462, -/**/ 0x3FDCE9D2, 0xE3D4A51F, -/**/ 0xBC62FC8A, 0x12DAE298, -/**/ 0x3FEC8C5B, 0xF8CE1A84, -/**/ 0x3C7AB3D1, 0xA1590123, -/**/ 0x3FDD5BCA, 0x34047661, -/**/ 0x3C728A44, 0xA75FC29C, -/**/ 0x3FEC6F39, 0x208BE53B, -/**/ 0xBC8741DB, 0xFBAADB42, -/**/ 0x3FDDCD4C, 0x15329C9A, -/**/ 0x3C70D4C6, 0xE171FD9A, -/**/ 0x3FEC51A4, 0x8B8B175E, -/**/ 0xBC61BBB4, 0x3B9AA880, -/**/ 0x3FDE3E56, 0xC1582A69, -/**/ 0xBC50A482, 0x1099F88F, -/**/ 0x3FEC339E, 0xB01DDD81, -/**/ 0xBC8CAAF5, 0xEE82C5C0, -/**/ 0x3FDEAEE8, 0x744B05F0, -/**/ 0xBC5789B4, 0x3C9B027D, -/**/ 0x3FEC1528, 0x065B7D50, -/**/ 0xBC889211, 0x1312E828, -/**/ 0x3FDF1EFF, 0x6BC4F97B, -/**/ 0x3C717212, 0xF8A7525C, -/**/ 0x3FEBF641, 0x081E7536, -/**/ 0x3C8B7BD7, 0x1628A9A1, -/**/ 0x3FDF8E99, 0xE76ABC97, -/**/ 0x3C59D950, 0xAF2D00A3, -/**/ 0x3FEBD6EA, 0x310294F5, -/**/ 0x3C731BBC, 0xC88C109D, -/**/ 0x3FDFFDB6, 0x28D2F57A, -/**/ 0x3C6F4A99, 0x2E905B6A, -/**/ 0x3FEBB723, 0xFE630F32, -/**/ 0x3C772BD2, 0x452D0A39, -/**/ 0x3FE03629, 0x39C69955, -/**/ 0xBC82D8CD, 0x78397B01, -/**/ 0x3FEB96EE, 0xEF58840E, -/**/ 0x3C545A3C, 0xC78FADE0, -/**/ 0x3FE06D36, 0x86946E5B, -/**/ 0x3C83F5AE, 0x4538FF1B, -/**/ 0x3FEB764B, 0x84B704C2, -/**/ 0xBC8F5848, 0xC21B389B, -/**/ 0x3FE0A402, 0x1E9E1001, -/**/ 0xBC86F643, 0xA13914F6, -/**/ 0x3FEB553A, 0x410C104E, -/**/ 0x3C58FF79, 0x47027A16, -/**/ 0x3FE0DA8B, 0x26B5672E, -/**/ 0xBC8A58DE, 0xF0BEE909, -/**/ 0x3FEB33BB, 0xA89C8948, -/**/ 0x3C8EA6A5, 0x1D1F6CA9, -/**/ 0x3FE110D0, 0xC4B69C3B, -/**/ 0x3C8D9189, 0x98809981, -/**/ 0x3FEB11D0, 0x4162A4C6, -/**/ 0x3C71DD56, 0x1EFBC0C2, -/**/ 0x3FE146D2, 0x1F8B7F82, -/**/ 0x3C7BF953, 0x5E2739A8, -/**/ 0x3FEAEF78, 0x930BD275, -/**/ 0xBC7F8362, 0x79746F94, -/**/ 0x3FE17C8E, 0x5F2EEDB0, -/**/ 0x3C635E57, 0x102E2488, -/**/ 0x3FEACCB5, 0x26F69DE5, -/**/ 0x3C88FB6A, 0x8DD6B6CC, -/**/ 0x3FE1B204, 0xACB02FDD, -/**/ 0xBC5F190C, 0x70CBB5FF, -/**/ 0x3FEAA986, 0x88308913, -/**/ 0xBC0B83D6, 0x07CD5070, -/**/ 0x3FE1E734, 0x3236574C, -/**/ 0x3C722A3F, 0xA4F41D5A, -/**/ 0x3FEA85ED, 0x4373E02D, -/**/ 0x3C69BE06, 0x385EC792, -/**/ 0x3FE21C1C, 0x1B0394CF, -/**/ 0x3C5E5B32, 0x4B23AA31, -/**/ 0x3FEA61E9, 0xE72586AF, -/**/ 0x3C858330, 0xE2FD453F, -/**/ 0x3FE250BB, 0x93788BBB, -/**/ 0x3C7EA3D0, 0x2457BCCE, -/**/ 0x3FEA3D7D, 0x0352BDCF, -/**/ 0xBC868DBA, 0xECA19669, -/**/ 0x3FE28511, 0xC917A067, -/**/ 0xBC801DF1, 0xD9A16B70, -/**/ 0x3FEA18A7, 0x29AEE445, -/**/ 0x3C395E25, 0x736C0358, -/**/ 0x3FE2B91D, 0xEA88421E, -/**/ 0xBC8FA371, 0xDB216AB0, -/**/ 0x3FE9F368, 0xED912F85, -/**/ 0xBC81D200, 0xC5791606, -/**/ 0x3FE2ECDF, 0x279A3082, -/**/ 0x3C8D3557, 0xE0E7E37E, -/**/ 0x3FE9CDC2, 0xE3F25E5C, -/**/ 0x3C83F991, 0x12993F62, -/**/ 0x3FE32054, 0xB148BC4F, -/**/ 0x3C8F6B42, 0x095A135B, -/**/ 0x3FE9A7B5, 0xA36A6514, -/**/ 0x3C8722CF, 0xCC9FA7A9, -/**/ 0x3FE3537D, 0xB9BE0367, -/**/ 0x3C6B327E, 0x7AF040F0, -/**/ 0x3FE98141, 0xC42E1310, -/**/ 0x3C8D1FF8, 0x0488F08D, -/**/ 0x3FE38659, 0x7456282B, -/**/ 0xBC710FAD, 0xA93B07A8, -/**/ 0x3FE95A67, 0xE00CB1FD, -/**/ 0xBC80BEFD, 0xA21F862D, -/**/ 0x3FE3B8E7, 0x15A2840A, -/**/ 0xBC797653, 0xA7D2F07B, -/**/ 0x3FE93328, 0x926D9E92, -/**/ 0xBC8BB770, 0x03600CDA, -/**/ 0x3FE3EB25, 0xD36CD53A, -/**/ 0xBC5BE570, 0xE1570FC0, -/**/ 0x3FE90B84, 0x784DDAF7, -/**/ 0xBC70FEB1, 0x0AB93B87, -/**/ 0x3FE41D14, 0xE4BA6790, -/**/ 0x3C84608F, 0xD287ECF5, -/**/ 0x3FE8E37C, 0x303D9AD1, -/**/ 0xBC6463A4, 0xB53D4BF8, -/**/ 0x3FE44EB3, 0x81CF386B, -/**/ 0xBC83ED6C, 0x1E6A5505, -/**/ 0x3FE8BB10, 0x5A5DC900, -/**/ 0x3C8863E0, 0x3E9474C1, -/**/ 0x3FE48000, 0xE431159F, -/**/ 0xBC8B194A, 0x7463ED10, -/**/ 0x3FE89241, 0x985D871F, -/**/ 0x3C8C48D9, 0xC413ED84, -/**/ 0x3FE4B0FC, 0x46AAB761, -/**/ 0x3C20DA05, 0x738CC59A, -/**/ 0x3FE86910, 0x8D77A6C6, -/**/ 0x3C7338FF, 0xE2BFE9DD, -/**/ 0x3FE4E1A4, 0xE54ED51B, -/**/ 0xBC8A492F, 0x89B7C76A, -/**/ 0x3FE83F7D, 0xDE701CA0, -/**/ 0xBC4152CF, 0x609BC6E8, -/**/ 0x3FE511F9, 0xFD7B351C, -/**/ 0xBC85C0E8, 0x61C48831, -/**/ 0x3FE8158A, 0x31916D5D, -/**/ 0xBC6DE8B9, 0x0B8228DE, -/**/ 0x3FE541FA, 0xCDDBB724, -/**/ 0x3C7232C2, 0x8520D391, -/**/ 0x3FE7EB36, 0x2EAA1488, -/**/ 0x3C5A1D65, 0xA4A5959F, -/**/ 0x3FE571A6, 0x966D59B3, -/**/ 0x3C5C843B, 0x4D0FB198, -/**/ 0x3FE7C082, 0x7F09E54F, -/**/ 0xBC6C73D6, 0xD72AEE68, -/**/ 0x3FE5A0FC, 0x98813A12, -/**/ 0xBC8D82E2, 0xB7D4227B, -/**/ 0x3FE7956F, 0xCD7F6543, -/**/ 0xBC8AB276, 0xE9D45AE4, -/**/ 0x3FE5CFFC, 0x16BF8F0D, -/**/ 0x3C896CB3, 0x70EB578A, -/**/ 0x3FE769FE, 0xC655211F, -/**/ 0xBC6827D5, 0xCF8C68C5, -/**/ 0x3FE5FEA4, 0x552A9E57, -/**/ 0x3C80B6CE, 0xF7EE20B7, -/**/ 0x3FE73E30, 0x174EFBA1, -/**/ 0xBC65D3AE, 0x3D94AD5F, -/**/ 0x3FE62CF4, 0x9921AC79, -/**/ 0xBC8EDD98, 0x55B6241A, -/**/ 0x3FE71204, 0x6FA77678, -/**/ 0x3C8425B0, 0xA5029C81, -/**/ 0x3FE65AEC, 0x2963E755, -/**/ 0x3C8126F9, 0x6B71053C, -/**/ 0x3FE6E57C, 0x800CF55E, -/**/ 0x3C860286, 0xDEDBD0A6, -/**/ 0x3FE6888A, 0x4E134B2F, -/**/ 0xBC86B7D3, 0x7644D5E6, -/**/ 0x3FE6B898, 0xFA9EFB5D, -/**/ 0x3C715AC7, 0x86CCF4B2, -/**/ 0x3FE6B5CE, 0x50B7821A, -/**/ 0xBC65D515, 0x8F702E0F, -/**/ 0x3FE68B5A, 0x92EB6253, -/**/ 0xBC89A91A, 0xD985F89C, -/**/ 0x3FE6E2B7, 0x7C40BDE1, -/**/ 0xBC70E729, 0x857FAD53, -/**/ 0x3FE65DC1, 0xFDEB8CBA, -/**/ 0xBC597C1B, 0x47337C77, -/**/ 0x3FE70F45, 0x1D0A8C40, -/**/ 0x3C697EDE, 0x3885770D, -/**/ 0x3FE62FCF, 0xF20191C7, -/**/ 0x3C6D9143, 0x895756EF, -/**/ 0x3FE73B76, 0x80DEA578, -/**/ 0xBC722483, 0x06DC12A2, -/**/ 0x3FE60185, 0x26F563DF, -/**/ 0x3C846CA5, 0xE0E432D0, -/**/ 0x3FE7674A, 0xF6F7B524, -/**/ 0x3C7E9D3F, 0x94AC84A8, -/**/ 0x3FE5D2E2, 0x55F1F17A, -/**/ 0x3C803141, 0x04C8892B, -/**/ 0x3FE792C1, 0xD0041D52, -/**/ 0xBC8ABF05, 0xEEB354EB, -/**/ 0x3FE5A3E8, 0x39824077, -/**/ 0x3C8428AA, 0x2759BE62, -/**/ 0x3FE7BDDA, 0x5E28B3C2, -/**/ 0x3C4AD119, 0x7CCD0393, -/**/ 0x3FE57497, 0x8D8E83F2, -/**/ 0x3C8F4714, 0xAF282D23, -/**/ 0x3FE7E893, 0xF5037959, -/**/ 0x3C80EEFB, 0xAA650C4C, -/**/ 0x3FE544F1, 0x0F592CA5, -/**/ 0xBC8E7AE8, 0xE6C7A62F, -/**/ 0x3FE812ED, 0xE9AE4BA4, -/**/ 0xBC87830A, 0xDF402DDA, -/**/ 0x3FE514F5, 0x7D7BF3DA, -/**/ 0x3C747A10, 0x8073C259 } }; - -#endif - -#if (__BYTE_ORDER == __LITTLE_ENDIAN) - -#define HIGH_HALF 1 -#define LOW_HALF 0 - -static const union {unsigned int u[880]; int4 i[880]; double x[440];} __sincostab = { .u = { -/**/ 0x00000000, 0x00000000, -/**/ 0x00000000, 0x00000000, -/**/ 0x00000000, 0x3FF00000, -/**/ 0x00000000, 0x00000000, -/**/ 0xAAAEEEEF, 0x3F7FFFEA, -/**/ 0xEC67B77C, 0xBC1E45E2, -/**/ 0x00155552, 0x3FEFFFC0, -/**/ 0xA0196DAE, 0x3C8F4A01, -/**/ 0xAAEEEED5, 0x3F8FFFAA, -/**/ 0x9A9F0777, 0xBC02AB63, -/**/ 0x0155549F, 0x3FEFFF00, -/**/ 0xA03A5EF3, 0x3C828A28, -/**/ 0x01033255, 0x3F97FF70, -/**/ 0x51527336, 0x3BFEFE2B, -/**/ 0x06BFF7E6, 0x3FEFFDC0, -/**/ 0xE86977BD, 0x3C8AE6DA, -/**/ 0xAEEEE86F, 0x3F9FFEAA, -/**/ 0xFB224AE2, 0xBC3CD406, -/**/ 0x155527D3, 0x3FEFFC00, -/**/ 0x92D89B5B, 0xBC83B544, -/**/ 0xB12D45D5, 0x3FA3FEB2, -/**/ 0x203D1C11, 0x3C34EC54, -/**/ 0x3414A7BA, 0x3FEFF9C0, -/**/ 0xBE6C59BF, 0x3C6991F4, -/**/ 0x1032FBA9, 0x3FA7FDC0, -/**/ 0xF46E997A, 0xBC4599BD, -/**/ 0x6BFDF99F, 0x3FEFF700, -/**/ 0x60648D5F, 0xBC78B3B5, -/**/ 0x78586DAC, 0x3FABFC6D, -/**/ 0x03DBF236, 0x3C18E4FD, -/**/ 0xC8103A31, 0x3FEFF3C0, -/**/ 0xBDDC0E66, 0x3C74856D, -/**/ 0xEEED4EDB, 0x3FAFFAAA, -/**/ 0x32684B69, 0xBC42D16D, -/**/ 0x5549F4D3, 0x3FEFF001, -/**/ 0x7B99426F, 0x3C832838, -/**/ 0x3D808BEF, 0x3FB1FC34, -/**/ 0xE6F3BE4F, 0xBC5F3D32, -/**/ 0x22A8EF9F, 0x3FEFEBC2, -/**/ 0x34F54C77, 0x3C579349, -/**/ 0x12D1755B, 0x3FB3FACB, -/**/ 0x5299468C, 0xBC592191, -/**/ 0x4129EF6F, 0x3FEFE703, -/**/ 0x37C96F97, 0xBC6CBF43, -/**/ 0xFD10B737, 0x3FB5F911, -/**/ 0x02BE9102, 0xBC50184F, -/**/ 0xC3C873EB, 0x3FEFE1C4, -/**/ 0x057C4A02, 0xBC35A9C9, -/**/ 0x032550E4, 0x3FB7F701, -/**/ 0x1800501A, 0x3C3AFC2D, -/**/ 0xBF7E6B9B, 0x3FEFDC06, -/**/ 0xB535F8DB, 0x3C831902, -/**/ 0x2D55D1F9, 0x3FB9F490, -/**/ 0x7EAC1DC1, 0x3C52696D, -/**/ 0x4B43E000, 0x3FEFD5C9, -/**/ 0xCB4F92F9, 0xBC62E768, -/**/ 0x8568391D, 0x3FBBF1B7, -/**/ 0x1DEA4CC8, 0x3C5E9184, -/**/ 0x800E99B1, 0x3FEFCF0C, -/**/ 0x86D186AC, 0x3C6EA3D7, -/**/ 0x16C1CCE6, 0x3FBDEE6F, -/**/ 0x2FB71673, 0xBC450F8E, -/**/ 0x78D1BC88, 0x3FEFC7D0, -/**/ 0x447DB685, 0x3C8075D2, -/**/ 0xEE86EE36, 0x3FBFEAAE, -/**/ 0xBCC6F03B, 0xBC4AFCB2, -/**/ 0x527D5BD3, 0x3FEFC015, -/**/ 0x5094EFB8, 0x3C8B68F3, -/**/ 0x8DDD71D1, 0x3FC0F337, -/**/ 0x724F0F9E, 0x3C6D8468, -/**/ 0x2BFE0695, 0x3FEFB7DB, -/**/ 0xF4F65AB1, 0x3C821DAD, -/**/ 0xD7AFCEAF, 0x3FC1F0D3, -/**/ 0x099769A5, 0xBC66EF95, -/**/ 0x263C4BD3, 0x3FEFAF22, -/**/ 0x133A2769, 0xBC552ACE, -/**/ 0x5E4AB88F, 0x3FC2EE28, -/**/ 0x05DEE058, 0xBC6E4D0F, -/**/ 0x641C36F2, 0x3FEFA5EA, -/**/ 0xED17CC7C, 0x3C404DA6, -/**/ 0x2C5D66CB, 0x3FC3EB31, -/**/ 0x6B66CB91, 0x3C647D66, -/**/ 0x0A7CC428, 0x3FEF9C34, -/**/ 0x063B7462, 0x3C8C5B6B, -/**/ 0x4DC5F27B, 0x3FC4E7EA, -/**/ 0x2AC072FC, 0x3C5949DB, -/**/ 0x40374D01, 0x3FEF91FF, -/**/ 0x4D3A9E4C, 0xBC67D03F, -/**/ 0xCFA126F3, 0x3FC5E44F, -/**/ 0x063F89B6, 0xBC66F443, -/**/ 0x2E1EECF6, 0x3FEF874C, -/**/ 0xE1332B16, 0xBC8C6514, -/**/ 0xC05A4D4C, 0x3FC6E05D, -/**/ 0x8B81C940, 0xBBD32C5C, -/**/ 0xFEFFDE24, 0x3FEF7C1A, -/**/ 0xC47540B1, 0xBC78F55B, -/**/ 0x2FBAF2B5, 0x3FC7DC10, -/**/ 0xE23C97C3, 0x3C45AB50, -/**/ 0xDF9ECE1C, 0x3FEF706B, -/**/ 0x0C36DCB4, 0xBC8698C8, -/**/ 0x2EFAA944, 0x3FC8D763, -/**/ 0x62CBB953, 0xBC620FA2, -/**/ 0xFEB82ACD, 0x3FEF643E, -/**/ 0xC1FE28AC, 0x3C76B00A, -/**/ 0xD0CEC312, 0x3FC9D252, -/**/ 0x80B1137D, 0x3C59C43D, -/**/ 0x8CFF6797, 0x3FEF5794, -/**/ 0x3E03B1D5, 0x3C6E3A0D, -/**/ 0x297A0765, 0x3FCACCDB, -/**/ 0x57D6CDEB, 0xBC59883B, -/**/ 0xBD1E3A79, 0x3FEF4A6C, -/**/ 0xEDAEBB57, 0x3C813DF0, -/**/ 0x4EDC6199, 0x3FCBC6F8, -/**/ 0x6A7B0CAB, 0x3C69C1A5, -/**/ 0xC3B3D16E, 0x3FEF3CC7, -/**/ 0xD28A3494, 0xBC621A3A, -/**/ 0x588289A3, 0x3FCCC0A6, -/**/ 0x9BC87C6B, 0xBC6868D0, -/**/ 0xD753FFED, 0x3FEF2EA5, -/**/ 0x5F56D583, 0x3C8CC421, -/**/ 0x5FB5A5D0, 0x3FCDB9E1, -/**/ 0xD6CC6FC2, 0xBC632E20, -/**/ 0x3086649F, 0x3FEF2007, -/**/ 0x16C1984B, 0x3C7B9404, -/**/ 0x7F8AE5A3, 0x3FCEB2A5, -/**/ 0xAF572CEB, 0xBC60BE06, -/**/ 0x09C5873B, 0x3FEF10EC, -/**/ 0x762C1283, 0x3C8D9072, -/**/ 0xD4F31577, 0x3FCFAAEE, -/**/ 0x508E32B8, 0xBC615D88, -/**/ 0x9F7DEEA1, 0x3FEF0154, -/**/ 0x99E5CAFD, 0x3C8D3C1E, -/**/ 0xBF65155C, 0x3FD0515C, -/**/ 0x9DFD8EC8, 0xBC79B8C2, -/**/ 0x300D2F26, 0x3FEEF141, -/**/ 0x08DED372, 0xBC82AA1B, -/**/ 0xCEF36436, 0x3FD0CD00, -/**/ 0x0C93E2B5, 0xBC79FB0A, -/**/ 0xFBC0F11C, 0x3FEEE0B1, -/**/ 0x80BBC3B1, 0xBC4BFD23, -/**/ 0xAA94DDEB, 0x3FD14861, -/**/ 0xB5B615A4, 0xBC6BE881, -/**/ 0x44D5EFA1, 0x3FEECFA7, -/**/ 0x4AF541D0, 0xBC556D0A, -/**/ 0x64C6B876, 0x3FD1C37D, -/**/ 0xFE0DCFF5, 0x3C746076, -/**/ 0x4F76EFA8, 0x3FEEBE21, -/**/ 0x12BA543E, 0xBC802F9F, -/**/ 0x111AAF36, 0x3FD23E52, -/**/ 0x334EFF18, 0xBC74F080, -/**/ 0x61BBAF4F, 0x3FEEAC20, -/**/ 0x3E94658D, 0x3C62C1D5, -/**/ 0xC43EB49F, 0x3FD2B8DD, -/**/ 0x99F2D807, 0x3C615538, -/**/ 0xC3A7CD83, 0x3FEE99A4, -/**/ 0x1BC53CE8, 0xBC82264B, -/**/ 0x94049F87, 0x3FD3331E, -/**/ 0xB40C302C, 0x3C7E0CB6, -/**/ 0xBF29A9ED, 0x3FEE86AE, -/**/ 0xFDBB58A7, 0x3C89397A, -/**/ 0x9769D3D8, 0x3FD3AD12, -/**/ 0x04878398, 0x3C003D55, -/**/ 0xA0193D40, 0x3FEE733E, -/**/ 0x3546CE13, 0xBC86428B, -/**/ 0xE69EE697, 0x3FD426B7, -/**/ 0x5705C59F, 0xBC7F09C7, -/**/ 0xB436E9D0, 0x3FEE5F54, -/**/ 0xD02FC8BC, 0x3C87EB0F, -/**/ 0x9B0F3D20, 0x3FD4A00C, -/**/ 0x6BB08EAD, 0x3C7823BA, -/**/ 0x4B2A449C, 0x3FEE4AF1, -/**/ 0x2E8A6833, 0xBC868CA0, -/**/ 0xCF68A77A, 0x3FD5190E, -/**/ 0x55EEF0F3, 0x3C7B3571, -/**/ 0xB680D6A5, 0x3FEE3614, -/**/ 0xAA015237, 0xBC727793, -/**/ 0x9FA2F597, 0x3FD591BC, -/**/ 0xAC3FE0CB, 0x3C67C74B, -/**/ 0x49ACD6C1, 0x3FEE20BF, -/**/ 0xC7EF636C, 0xBC5660AE, -/**/ 0x29078775, 0x3FD60A14, -/**/ 0x0BA89133, 0x3C5B1FD8, -/**/ 0x5A03DBCE, 0x3FEE0AF1, -/**/ 0x02771AE6, 0x3C5FE8E7, -/**/ 0x8A38D7F7, 0x3FD68213, -/**/ 0x02444AAD, 0xBC7D8892, -/**/ 0x3EBD875E, 0x3FEDF4AB, -/**/ 0x7E6736C4, 0xBC8E2D8A, -/**/ 0xE33A0255, 0x3FD6F9B8, -/**/ 0x4EE9DA0D, 0x3C742BC1, -/**/ 0x50F228D6, 0x3FEDDDED, -/**/ 0xD42BA2BF, 0xBC6E80C8, -/**/ 0x55764214, 0x3FD77102, -/**/ 0x314BB6CE, 0xBC66EAD7, -/**/ 0xEB995912, 0x3FEDC6B7, -/**/ 0x776DCD35, 0x3C54B364, -/**/ 0x03C86D4E, 0x3FD7E7EE, -/**/ 0xDABF5AF2, 0xBC7B63BC, -/**/ 0x6B888E83, 0x3FEDAF0B, -/**/ 0x2B5E5CEA, 0x3C8A249E, -/**/ 0x12826949, 0x3FD85E7A, -/**/ 0x9B5FACE0, 0x3C78A40E, -/**/ 0x2F71A9DC, 0x3FED96E8, -/**/ 0xD5D2039D, 0x3C8FF61B, -/**/ 0xA774992F, 0x3FD8D4A4, -/**/ 0xEA766326, 0x3C744A02, -/**/ 0x97E17B4A, 0x3FED7E4E, -/**/ 0x352BED94, 0xBC63B770, -/**/ 0xE9F546C5, 0x3FD94A6B, -/**/ 0x3E683F58, 0xBC769CE1, -/**/ 0x073E4040, 0x3FED653F, -/**/ 0x434BEC37, 0xBC876236, -/**/ 0x02E80510, 0x3FD9BFCE, -/**/ 0xA320B0A4, 0x3C709E39, -/**/ 0xE1C619E0, 0x3FED4BB9, -/**/ 0x77858F61, 0x3C8F34BB, -/**/ 0x1CC50CCA, 0x3FDA34C9, -/**/ 0x3B50CECD, 0xBC5A310E, -/**/ 0x8D8D7C06, 0x3FED31BF, -/**/ 0x3089CBDD, 0x3C7E60DD, -/**/ 0x63A09277, 0x3FDAA95B, -/**/ 0xB13C0381, 0xBC66293E, -/**/ 0x727D94F0, 0x3FED1750, -/**/ 0x1EC1A48E, 0x3C80D52B, -/**/ 0x05321617, 0x3FDB1D83, -/**/ 0xCB99F519, 0xBC7AE242, -/**/ 0xFA52AD9F, 0x3FECFC6C, -/**/ 0x508F2A0D, 0x3C88B5B5, -/**/ 0x30DBAC43, 0x3FDB913E, -/**/ 0x2F6C3FF1, 0xBC7E38AD, -/**/ 0x909A82E5, 0x3FECE115, -/**/ 0xBB31109A, 0x3C81F139, -/**/ 0x17B140A3, 0x3FDC048B, -/**/ 0x757E9FA7, 0x3C619FE6, -/**/ 0xA2B2972E, 0x3FECC54A, -/**/ 0x2BA83A98, 0x3C64EE16, -/**/ 0xEC7FD19E, 0x3FDC7767, -/**/ 0x1A3D5826, 0xBC5EB14D, -/**/ 0x9FC67D0B, 0x3FECA90C, -/**/ 0x485E3462, 0xBC646A81, -/**/ 0xE3D4A51F, 0x3FDCE9D2, -/**/ 0x12DAE298, 0xBC62FC8A, -/**/ 0xF8CE1A84, 0x3FEC8C5B, -/**/ 0xA1590123, 0x3C7AB3D1, -/**/ 0x34047661, 0x3FDD5BCA, -/**/ 0xA75FC29C, 0x3C728A44, -/**/ 0x208BE53B, 0x3FEC6F39, -/**/ 0xFBAADB42, 0xBC8741DB, -/**/ 0x15329C9A, 0x3FDDCD4C, -/**/ 0xE171FD9A, 0x3C70D4C6, -/**/ 0x8B8B175E, 0x3FEC51A4, -/**/ 0x3B9AA880, 0xBC61BBB4, -/**/ 0xC1582A69, 0x3FDE3E56, -/**/ 0x1099F88F, 0xBC50A482, -/**/ 0xB01DDD81, 0x3FEC339E, -/**/ 0xEE82C5C0, 0xBC8CAAF5, -/**/ 0x744B05F0, 0x3FDEAEE8, -/**/ 0x3C9B027D, 0xBC5789B4, -/**/ 0x065B7D50, 0x3FEC1528, -/**/ 0x1312E828, 0xBC889211, -/**/ 0x6BC4F97B, 0x3FDF1EFF, -/**/ 0xF8A7525C, 0x3C717212, -/**/ 0x081E7536, 0x3FEBF641, -/**/ 0x1628A9A1, 0x3C8B7BD7, -/**/ 0xE76ABC97, 0x3FDF8E99, -/**/ 0xAF2D00A3, 0x3C59D950, -/**/ 0x310294F5, 0x3FEBD6EA, -/**/ 0xC88C109D, 0x3C731BBC, -/**/ 0x28D2F57A, 0x3FDFFDB6, -/**/ 0x2E905B6A, 0x3C6F4A99, -/**/ 0xFE630F32, 0x3FEBB723, -/**/ 0x452D0A39, 0x3C772BD2, -/**/ 0x39C69955, 0x3FE03629, -/**/ 0x78397B01, 0xBC82D8CD, -/**/ 0xEF58840E, 0x3FEB96EE, -/**/ 0xC78FADE0, 0x3C545A3C, -/**/ 0x86946E5B, 0x3FE06D36, -/**/ 0x4538FF1B, 0x3C83F5AE, -/**/ 0x84B704C2, 0x3FEB764B, -/**/ 0xC21B389B, 0xBC8F5848, -/**/ 0x1E9E1001, 0x3FE0A402, -/**/ 0xA13914F6, 0xBC86F643, -/**/ 0x410C104E, 0x3FEB553A, -/**/ 0x47027A16, 0x3C58FF79, -/**/ 0x26B5672E, 0x3FE0DA8B, -/**/ 0xF0BEE909, 0xBC8A58DE, -/**/ 0xA89C8948, 0x3FEB33BB, -/**/ 0x1D1F6CA9, 0x3C8EA6A5, -/**/ 0xC4B69C3B, 0x3FE110D0, -/**/ 0x98809981, 0x3C8D9189, -/**/ 0x4162A4C6, 0x3FEB11D0, -/**/ 0x1EFBC0C2, 0x3C71DD56, -/**/ 0x1F8B7F82, 0x3FE146D2, -/**/ 0x5E2739A8, 0x3C7BF953, -/**/ 0x930BD275, 0x3FEAEF78, -/**/ 0x79746F94, 0xBC7F8362, -/**/ 0x5F2EEDB0, 0x3FE17C8E, -/**/ 0x102E2488, 0x3C635E57, -/**/ 0x26F69DE5, 0x3FEACCB5, -/**/ 0x8DD6B6CC, 0x3C88FB6A, -/**/ 0xACB02FDD, 0x3FE1B204, -/**/ 0x70CBB5FF, 0xBC5F190C, -/**/ 0x88308913, 0x3FEAA986, -/**/ 0x07CD5070, 0xBC0B83D6, -/**/ 0x3236574C, 0x3FE1E734, -/**/ 0xA4F41D5A, 0x3C722A3F, -/**/ 0x4373E02D, 0x3FEA85ED, -/**/ 0x385EC792, 0x3C69BE06, -/**/ 0x1B0394CF, 0x3FE21C1C, -/**/ 0x4B23AA31, 0x3C5E5B32, -/**/ 0xE72586AF, 0x3FEA61E9, -/**/ 0xE2FD453F, 0x3C858330, -/**/ 0x93788BBB, 0x3FE250BB, -/**/ 0x2457BCCE, 0x3C7EA3D0, -/**/ 0x0352BDCF, 0x3FEA3D7D, -/**/ 0xECA19669, 0xBC868DBA, -/**/ 0xC917A067, 0x3FE28511, -/**/ 0xD9A16B70, 0xBC801DF1, -/**/ 0x29AEE445, 0x3FEA18A7, -/**/ 0x736C0358, 0x3C395E25, -/**/ 0xEA88421E, 0x3FE2B91D, -/**/ 0xDB216AB0, 0xBC8FA371, -/**/ 0xED912F85, 0x3FE9F368, -/**/ 0xC5791606, 0xBC81D200, -/**/ 0x279A3082, 0x3FE2ECDF, -/**/ 0xE0E7E37E, 0x3C8D3557, -/**/ 0xE3F25E5C, 0x3FE9CDC2, -/**/ 0x12993F62, 0x3C83F991, -/**/ 0xB148BC4F, 0x3FE32054, -/**/ 0x095A135B, 0x3C8F6B42, -/**/ 0xA36A6514, 0x3FE9A7B5, -/**/ 0xCC9FA7A9, 0x3C8722CF, -/**/ 0xB9BE0367, 0x3FE3537D, -/**/ 0x7AF040F0, 0x3C6B327E, -/**/ 0xC42E1310, 0x3FE98141, -/**/ 0x0488F08D, 0x3C8D1FF8, -/**/ 0x7456282B, 0x3FE38659, -/**/ 0xA93B07A8, 0xBC710FAD, -/**/ 0xE00CB1FD, 0x3FE95A67, -/**/ 0xA21F862D, 0xBC80BEFD, -/**/ 0x15A2840A, 0x3FE3B8E7, -/**/ 0xA7D2F07B, 0xBC797653, -/**/ 0x926D9E92, 0x3FE93328, -/**/ 0x03600CDA, 0xBC8BB770, -/**/ 0xD36CD53A, 0x3FE3EB25, -/**/ 0xE1570FC0, 0xBC5BE570, -/**/ 0x784DDAF7, 0x3FE90B84, -/**/ 0x0AB93B87, 0xBC70FEB1, -/**/ 0xE4BA6790, 0x3FE41D14, -/**/ 0xD287ECF5, 0x3C84608F, -/**/ 0x303D9AD1, 0x3FE8E37C, -/**/ 0xB53D4BF8, 0xBC6463A4, -/**/ 0x81CF386B, 0x3FE44EB3, -/**/ 0x1E6A5505, 0xBC83ED6C, -/**/ 0x5A5DC900, 0x3FE8BB10, -/**/ 0x3E9474C1, 0x3C8863E0, -/**/ 0xE431159F, 0x3FE48000, -/**/ 0x7463ED10, 0xBC8B194A, -/**/ 0x985D871F, 0x3FE89241, -/**/ 0xC413ED84, 0x3C8C48D9, -/**/ 0x46AAB761, 0x3FE4B0FC, -/**/ 0x738CC59A, 0x3C20DA05, -/**/ 0x8D77A6C6, 0x3FE86910, -/**/ 0xE2BFE9DD, 0x3C7338FF, -/**/ 0xE54ED51B, 0x3FE4E1A4, -/**/ 0x89B7C76A, 0xBC8A492F, -/**/ 0xDE701CA0, 0x3FE83F7D, -/**/ 0x609BC6E8, 0xBC4152CF, -/**/ 0xFD7B351C, 0x3FE511F9, -/**/ 0x61C48831, 0xBC85C0E8, -/**/ 0x31916D5D, 0x3FE8158A, -/**/ 0x0B8228DE, 0xBC6DE8B9, -/**/ 0xCDDBB724, 0x3FE541FA, -/**/ 0x8520D391, 0x3C7232C2, -/**/ 0x2EAA1488, 0x3FE7EB36, -/**/ 0xA4A5959F, 0x3C5A1D65, -/**/ 0x966D59B3, 0x3FE571A6, -/**/ 0x4D0FB198, 0x3C5C843B, -/**/ 0x7F09E54F, 0x3FE7C082, -/**/ 0xD72AEE68, 0xBC6C73D6, -/**/ 0x98813A12, 0x3FE5A0FC, -/**/ 0xB7D4227B, 0xBC8D82E2, -/**/ 0xCD7F6543, 0x3FE7956F, -/**/ 0xE9D45AE4, 0xBC8AB276, -/**/ 0x16BF8F0D, 0x3FE5CFFC, -/**/ 0x70EB578A, 0x3C896CB3, -/**/ 0xC655211F, 0x3FE769FE, -/**/ 0xCF8C68C5, 0xBC6827D5, -/**/ 0x552A9E57, 0x3FE5FEA4, -/**/ 0xF7EE20B7, 0x3C80B6CE, -/**/ 0x174EFBA1, 0x3FE73E30, -/**/ 0x3D94AD5F, 0xBC65D3AE, -/**/ 0x9921AC79, 0x3FE62CF4, -/**/ 0x55B6241A, 0xBC8EDD98, -/**/ 0x6FA77678, 0x3FE71204, -/**/ 0xA5029C81, 0x3C8425B0, -/**/ 0x2963E755, 0x3FE65AEC, -/**/ 0x6B71053C, 0x3C8126F9, -/**/ 0x800CF55E, 0x3FE6E57C, -/**/ 0xDEDBD0A6, 0x3C860286, -/**/ 0x4E134B2F, 0x3FE6888A, -/**/ 0x7644D5E6, 0xBC86B7D3, -/**/ 0xFA9EFB5D, 0x3FE6B898, -/**/ 0x86CCF4B2, 0x3C715AC7, -/**/ 0x50B7821A, 0x3FE6B5CE, -/**/ 0x8F702E0F, 0xBC65D515, -/**/ 0x92EB6253, 0x3FE68B5A, -/**/ 0xD985F89C, 0xBC89A91A, -/**/ 0x7C40BDE1, 0x3FE6E2B7, -/**/ 0x857FAD53, 0xBC70E729, -/**/ 0xFDEB8CBA, 0x3FE65DC1, -/**/ 0x47337C77, 0xBC597C1B, -/**/ 0x1D0A8C40, 0x3FE70F45, -/**/ 0x3885770D, 0x3C697EDE, -/**/ 0xF20191C7, 0x3FE62FCF, -/**/ 0x895756EF, 0x3C6D9143, -/**/ 0x80DEA578, 0x3FE73B76, -/**/ 0x06DC12A2, 0xBC722483, -/**/ 0x26F563DF, 0x3FE60185, -/**/ 0xE0E432D0, 0x3C846CA5, -/**/ 0xF6F7B524, 0x3FE7674A, -/**/ 0x94AC84A8, 0x3C7E9D3F, -/**/ 0x55F1F17A, 0x3FE5D2E2, -/**/ 0x04C8892B, 0x3C803141, -/**/ 0xD0041D52, 0x3FE792C1, -/**/ 0xEEB354EB, 0xBC8ABF05, -/**/ 0x39824077, 0x3FE5A3E8, -/**/ 0x2759BE62, 0x3C8428AA, -/**/ 0x5E28B3C2, 0x3FE7BDDA, -/**/ 0x7CCD0393, 0x3C4AD119, -/**/ 0x8D8E83F2, 0x3FE57497, -/**/ 0xAF282D23, 0x3C8F4714, -/**/ 0xF5037959, 0x3FE7E893, -/**/ 0xAA650C4C, 0x3C80EEFB, -/**/ 0x0F592CA5, 0x3FE544F1, -/**/ 0xE6C7A62F, 0xBC8E7AE8, -/**/ 0xE9AE4BA4, 0x3FE812ED, -/**/ 0xDF402DDA, 0xBC87830A, -/**/ 0x7D7BF3DA, 0x3FE514F5, -/**/ 0x8073C259, 0x3C747A10 } }; - -#endif - -static const double s1 = /* -0x1.5555555555555p-3; */ -0.16666666666666666 ; -static const double s2 = /* 0x1.1111111110ECEp-7; */ 0.0083333333333323288 ; -static const double s3 = /* -0x1.A01A019DB08B8p-13; */ -0.00019841269834414642 ; -static const double s4 = /* 0x1.71DE27B9A7ED9p-19; */ 2.755729806860771e-06 ; -static const double s5 = /* -0x1.ADDFFC2FCDF59p-26; */ -2.5022014848318398e-08 ; -static const double aa = /* -0x1.5558000000000p-3; */ -0.1666717529296875 ; -static const double bb = /* 0x1.5555555556E24p-18; */ 5.0862630208387126e-06 ; -static const double big = /* 0x1.8000000000000p45; */ 52776558133248 ; -static const double hp0 = /* 0x1.921FB54442D18p0; */ 1.5707963267948966 ; -static const double hp1 = /* 0x1.1A62633145C07p-54; */ 6.123233995736766e-17 ; -static const double mp1 = /* 0x1.921FB58000000p0; */ 1.5707963407039642 ; -static const double mp2 = /* -0x1.DDE973C000000p-27; */ -1.3909067564377153e-08 ; -static const double mp3 = /* -0x1.CB3B399D747F2p-55; */ -4.9789962505147994e-17 ; -static const double pp3 = /* -0x1.CB3B398000000p-55; */ -4.9789962314799099e-17 ; -static const double pp4 = /* -0x1.d747f23e32ed7p-83; */ -1.9034889620193266e-25 ; -static const double hpinv = /* 0x1.45F306DC9C883p-1; */ 0.63661977236758138 ; -static const double toint = /* 0x1.8000000000000p52; */ 6755399441055744 ; - -/* Helper macros to compute sin of the input values. */ -#define POLYNOMIAL2(xx) ((((s5 * (xx) + s4) * (xx) + s3) * (xx) + s2) * (xx)) - -#define POLYNOMIAL(xx) (POLYNOMIAL2 (xx) + s1) - -/* The computed polynomial is a variation of the Taylor series expansion for - sin(x): - - x - x^3/3! + x^5/5! - x^7/7! + x^9/9! - dx*x^2/2 + dx - - The constants s1, s2, s3, etc. are pre-computed values of 1/3!, 1/5! and so - on. The result is returned to LHS. */ -#define TAYLOR_SIN(xx, x, dx) \ -({ \ - double t = ((POLYNOMIAL (xx) * (x) - 0.5 * (dx)) * (xx) + (dx)); \ - double res = (x) + t; \ - res; \ -}) - -#define SINCOS_TABLE_LOOKUP(u, sn, ssn, cs, ccs) \ -({ \ - int4 k = u.i[LOW_HALF] << 2; \ - sn = __sincostab.x[k]; \ - ssn = __sincostab.x[k + 1]; \ - cs = __sincostab.x[k + 2]; \ - ccs = __sincostab.x[k + 3]; \ -}) - -static const double - sn3 = -1.66666666666664880952546298448555E-01, - sn5 = 8.33333214285722277379541354343671E-03, - cs2 = 4.99999999999999999999950396842453E-01, - cs4 = -4.16666666666664434524222570944589E-02, - cs6 = 1.38888874007937613028114285595617E-03; - -int __branred (double x, double *a, double *aa); - -/* Given a number partitioned into X and DX, this function computes the cosine - of the number by combining the sin and cos of X (as computed by a variation - of the Taylor series) with the values looked up from the sin/cos table to - get the result. */ -static __always_inline double -do_cos (double x, double dx) -{ - mynumber u; - - if (x < 0) - dx = -dx; - - u.x = big + fabs (x); - x = fabs (x) - (u.x - big) + dx; - - double xx, s, sn, ssn, c, cs, ccs, cor; - xx = x * x; - s = x + x * xx * (sn3 + xx * sn5); - c = xx * (cs2 + xx * (cs4 + xx * cs6)); - SINCOS_TABLE_LOOKUP (u, sn, ssn, cs, ccs); - cor = (ccs - s * ssn - cs * c) - sn * s; - return cs + cor; -} - -/* Given a number partitioned into X and DX, this function computes the sine of - the number by combining the sin and cos of X (as computed by a variation of - the Taylor series) with the values looked up from the sin/cos table to get - the result. */ -static __always_inline double -do_sin (double x, double dx) -{ - double xold = x; - /* Max ULP is 0.501 if |x| < 0.126, otherwise ULP is 0.518. */ - if (fabs (x) < 0.126) - return TAYLOR_SIN (x * x, x, dx); - - mynumber u; - - if (x <= 0) - dx = -dx; - u.x = big + fabs (x); - x = fabs (x) - (u.x - big); - - double xx, s, sn, ssn, c, cs, ccs, cor; - xx = x * x; - s = x + (dx + x * xx * (sn3 + xx * sn5)); - c = x * dx + xx * (cs2 + xx * (cs4 + xx * cs6)); - SINCOS_TABLE_LOOKUP (u, sn, ssn, cs, ccs); - cor = (ssn + s * ccs - sn * c) + cs * s; - return copysign (sn + cor, xold); -} - -/* Reduce range of x to within PI/2 with abs (x) < 105414350. The high part - is written to *a, the low part to *da. Range reduction is accurate to 136 - bits so that when x is large and *a very close to zero, all 53 bits of *a - are correct. */ -static __always_inline int4 -reduce_sincos (double x, double *a, double *da) -{ - mynumber v; - - double t = (x * hpinv + toint); - double xn = t - toint; - v.x = t; - double y = (x - xn * mp1) - xn * mp2; - int4 n = v.i[LOW_HALF] & 3; - - double b, db, t1, t2; - t1 = xn * pp3; - t2 = y - t1; - db = (y - t2) - t1; - - t1 = xn * pp4; - b = t2 - t1; - db += (t2 - b) - t1; - - *a = b; - *da = db; - return n; -} - -/* Compute sin or cos (A + DA) for the given quadrant N. */ -static __always_inline double -do_sincos (double a, double da, int4 n) -{ - double retval; - - if (n & 1) - /* Max ULP is 0.513. */ - retval = do_cos (a, da); - else - /* Max ULP is 0.501 if xx < 0.01588, otherwise ULP is 0.518. */ - retval = do_sin (a, da); - - return (n & 2) ? -retval : retval; -} - - -/*******************************************************************/ -/* An ultimate sin routine. Given an IEEE double machine number x */ -/* it computes the rounded value of sin(x). */ -/*******************************************************************/ -double -__sin (double x) -{ - double t, a, da; - mynumber u; - int4 k, m, n; - double retval = 0; - - u.x = x; - m = u.i[HIGH_HALF]; - k = 0x7fffffff & m; /* no sign */ - if (k < 0x3e500000) /* if x->0 =>sin(x)=x */ - { - retval = x; - } -/*--------------------------- 2^-26<|x|< 0.855469---------------------- */ - else if (k < 0x3feb6000) - { - /* Max ULP is 0.548. */ - retval = do_sin (x, 0); - } /* else if (k < 0x3feb6000) */ - -/*----------------------- 0.855469 <|x|<2.426265 ----------------------*/ - else if (k < 0x400368fd) - { - t = hp0 - fabs (x); - /* Max ULP is 0.51. */ - retval = copysign (do_cos (t, hp1), x); - } /* else if (k < 0x400368fd) */ - -/*-------------------------- 2.426265<|x|< 105414350 ----------------------*/ - else if (k < 0x419921FB) - { - n = reduce_sincos (x, &a, &da); - retval = do_sincos (a, da, n); - } /* else if (k < 0x419921FB ) */ - -/* --------------------105414350 <|x| <2^1024------------------------------*/ - else if (k < 0x7ff00000) - { - n = __branred (x, &a, &da); - retval = do_sincos (a, da, n); - } -/*--------------------- |x| > 2^1024 ----------------------------------*/ - else - { - if (k == 0x7ff00000 && u.i[LOW_HALF] == 0) - retval = x / x; - } - - return retval; -} - - -/*******************************************************************/ -/* An ultimate cos routine. Given an IEEE double machine number x */ -/* it computes the rounded value of cos(x). */ -/*******************************************************************/ - -double -__cos (double x) -{ - double y, a, da; - mynumber u; - int4 k, m, n; - - double retval = 0; - - u.x = x; - m = u.i[HIGH_HALF]; - k = 0x7fffffff & m; - - /* |x|<2^-27 => cos(x)=1 */ - if (k < 0x3e400000) - retval = 1.0; - - else if (k < 0x3feb6000) - { /* 2^-27 < |x| < 0.855469 */ - /* Max ULP is 0.51. */ - retval = do_cos (x, 0); - } /* else if (k < 0x3feb6000) */ - - else if (k < 0x400368fd) - { /* 0.855469 <|x|<2.426265 */ ; - y = hp0 - fabs (x); - a = y + hp1; - da = (y - a) + hp1; - /* Max ULP is 0.501 if xx < 0.01588 or 0.518 otherwise. - Range reduction uses 106 bits here which is sufficient. */ - retval = do_sin (a, da); - } /* else if (k < 0x400368fd) */ - - else if (k < 0x419921FB) - { /* 2.426265<|x|< 105414350 */ - n = reduce_sincos (x, &a, &da); - retval = do_sincos (a, da, n + 1); - } /* else if (k < 0x419921FB ) */ - - /* 105414350 <|x| <2^1024 */ - else if (k < 0x7ff00000) - { - n = __branred (x, &a, &da); - retval = do_sincos (a, da, n + 1); - } - - else - { - if (k == 0x7ff00000 && u.i[LOW_HALF] == 0) - retval = x / x; /* |x| > 2^1024 */ - } - - return retval; -} - - -void -__sincos (double x, double *sinx, double *cosx) -{ - mynumber u; - int k = 0; - - u.x = x; - k = u.i[HIGH_HALF] & 0x7fffffff; - - if (k < 0x400368fd) - { - double a, da, y; - /* |x| < 2^-27 => cos (x) = 1, sin (x) = x. */ - if (k < 0x3e400000) - { - if (k < 0x3e500000) - *sinx = x; - *cosx = 1.0; - return; - } - /* |x| < 0.855469. */ - else if (k < 0x3feb6000) - { - *sinx = do_sin (x, 0); - *cosx = do_cos (x, 0); - return; - } - - /* |x| < 2.426265. */ - y = hp0 - fabs (x); - a = y + hp1; - da = (y - a) + hp1; - *sinx = copysign (do_cos (a, da), x); - *cosx = do_sin (a, da); - return; - } - /* |x| < 2^1024. */ - if (k < 0x7ff00000) - { - double a = 0.0, da = 0.0, xx = 0.0; - unsigned int n = 0; - - /* If |x| < 105414350 use simple range reduction. */ - n = k < 0x419921FB ? reduce_sincos (x, &a, &da) : __branred (x, &a, &da); - n = n & 3; - - if (n == 1 || n == 2) - { - a = -a; - da = -da; - } - - if (n & 1) - { - double *temp = cosx; - cosx = sinx; - sinx = temp; - } - - *sinx = do_sin (a, da); - xx = do_cos (a, da); - *cosx = (n & 2) ? -xx : xx; - return; - } - - *sinx = *cosx = x / x; -} - -}; -}; diff --git a/source/module_base/libm/test/CMakeLists.txt b/source/module_base/libm/test/CMakeLists.txt deleted file mode 100644 index 70e9172d55..0000000000 --- a/source/module_base/libm/test/CMakeLists.txt +++ /dev/null @@ -1,11 +0,0 @@ -remove_definitions(-D__MPI) - -AddTest( - TARGET MODULE_BASE_LIBM_UTs - SOURCES libm_test.cpp - ../branred.cpp - ../cexp.cpp - ../exp.cpp - ../sincos.cpp -) - diff --git a/source/module_base/libm/test/libm_test.cpp b/source/module_base/libm/test/libm_test.cpp deleted file mode 100644 index 70ac62aa6a..0000000000 --- a/source/module_base/libm/test/libm_test.cpp +++ /dev/null @@ -1,220 +0,0 @@ -#include -#include -#include -#include -#include - -#include "gtest/gtest.h" -#include "../libm.h" - -#define MY_EXPECT_DOUBLE_EQ(ds1, ds2) \ -do { \ - if (std::isnan(ds1) && std::isnan(ds2) && \ - std::signbit(ds1) == std::signbit(ds2)) \ - EXPECT_EQ(1, 1); \ - else EXPECT_DOUBLE_EQ(ds1, ds2); \ -} while (0) - -#define MY_EXPECT_COMPLEX_DOUBLE_EQ(ds1, ds2) \ - MY_EXPECT_DOUBLE_EQ(ds1.real(), ds2.real()); \ - MY_EXPECT_DOUBLE_EQ(ds1.imag(), ds2.imag()); \ - -TEST(base_libm, sincos_random) -{ - int len = 50000; - std::vector da(len); - std::vector ds1(len*2); - std::vector ds2(len*2); - - std::uniform_real_distribution rnd(-50000, 50000); - std::default_random_engine eng; - - for (int i = 0; i < len; ++i) { - da[i] = rnd(eng); - } - - for (int i = 0; i < len; ++i) { - sincos(da[i], &ds1[i * 2 + 0], &ds1[i * 2 + 1]); - ModuleBase::libm::sincos(da[i], &ds2[i * 2 + 0], &ds2[i * 2 + 1]); - } - - for (int i = 0; i < len * 2; i++) { - MY_EXPECT_DOUBLE_EQ(ds1[i], ds2[i]); - } -} - -TEST(base_libm, sincos_spec) -{ - - double da[] = { - -0.0, +0.0, - -INFINITY, +INFINITY, - -NAN, +NAN, - -DBL_MIN, +DBL_MIN, - -DBL_MAX, +DBL_MAX, - -DBL_MIN * DBL_MIN, +DBL_MIN * DBL_MIN, - -DBL_MAX * DBL_MAX, +DBL_MAX * DBL_MAX, - -DBL_MAX / M_PI}; - - const int len = sizeof(da) / sizeof(double); - std::vector ds1(len*2); - std::vector ds2(len*2); - - for (int i = 0; i < len; ++i) { - sincos(da[i], &ds1[i * 2 + 0], &ds1[i * 2 + 1]); - ModuleBase::libm::sincos(da[i], &ds2[i * 2 + 0], &ds2[i * 2 + 1]); - } - - for (int i = 0; i < len * 2; i++) { - MY_EXPECT_DOUBLE_EQ(ds1[i], ds2[i]); - } -} - -#define SINGLE_PARAM_FLOAT64_MATH_RANDOM_TEST_TEMPLATE(TNAME, FNAME, LENGTH, LOW, HIGH) \ -TEST(base_libm, TNAME) { \ - int len = (LENGTH); \ - std::vector da(len); \ - std::vector ds1(len); \ - std::vector ds2(len); \ - std::uniform_real_distribution rnd(LOW, HIGH); \ - std::default_random_engine eng; \ - for (int i = 0; i < len; ++i) \ - da[i] = rnd(eng); \ - for (int i = 0; i < len; ++i) { \ - ds1[i] = std::FNAME(da[i]); \ - ds2[i] = ModuleBase::libm::FNAME(da[i]); \ - } \ - for (int i = 0; i < len; i++) \ - MY_EXPECT_DOUBLE_EQ(ds1[i], ds2[i]); \ -} \ - -SINGLE_PARAM_FLOAT64_MATH_RANDOM_TEST_TEMPLATE(exp_random, exp, 50000, -1000, 1000) -SINGLE_PARAM_FLOAT64_MATH_RANDOM_TEST_TEMPLATE(sin_random, sin, 50000, -50000, 50000) -SINGLE_PARAM_FLOAT64_MATH_RANDOM_TEST_TEMPLATE(cos_random, cos, 50000, -50000, 50000) -SINGLE_PARAM_FLOAT64_MATH_RANDOM_TEST_TEMPLATE(sin_random2, sin, 100000, -DBL_MAX / M_PI, DBL_MAX / M_PI) -SINGLE_PARAM_FLOAT64_MATH_RANDOM_TEST_TEMPLATE(cos_random2, cos, 100000, -DBL_MAX / M_PI, DBL_MAX / M_PI) - -#define SINGLE_PARAM_FLOAT64_MATH_SPEC_TEST_TEMPLATE(TNAME, FNAME, VALUE) \ -TEST(base_libm, TNAME) { \ - double ds1 = std::FNAME(VALUE); \ - double ds2 = ModuleBase::libm::FNAME(VALUE); \ - MY_EXPECT_DOUBLE_EQ(ds1, ds2); \ -} \ - -#define SINGLE_PARAM_FLOAT64_MATH_CORNER_TEST_TEMPLATE(FNAME) \ -SINGLE_PARAM_FLOAT64_MATH_SPEC_TEST_TEMPLATE(FNAME ## _nz, FNAME, -0.0); \ -SINGLE_PARAM_FLOAT64_MATH_SPEC_TEST_TEMPLATE(FNAME ## _pz, FNAME, +0.0); \ -SINGLE_PARAM_FLOAT64_MATH_SPEC_TEST_TEMPLATE(FNAME ## _ninf, FNAME, -INFINITY); \ -SINGLE_PARAM_FLOAT64_MATH_SPEC_TEST_TEMPLATE(FNAME ## _pinf, FNAME, +INFINITY); \ -SINGLE_PARAM_FLOAT64_MATH_SPEC_TEST_TEMPLATE(FNAME ## _nnan, FNAME, -NAN); \ -SINGLE_PARAM_FLOAT64_MATH_SPEC_TEST_TEMPLATE(FNAME ## _pnan, FNAME, +NAN); \ -SINGLE_PARAM_FLOAT64_MATH_SPEC_TEST_TEMPLATE(FNAME ## _nmin, FNAME, -DBL_MIN); \ -SINGLE_PARAM_FLOAT64_MATH_SPEC_TEST_TEMPLATE(FNAME ## _nmax, FNAME, -DBL_MAX); \ -SINGLE_PARAM_FLOAT64_MATH_SPEC_TEST_TEMPLATE(FNAME ## _pmin, FNAME, +DBL_MIN); \ -SINGLE_PARAM_FLOAT64_MATH_SPEC_TEST_TEMPLATE(FNAME ## _pmax, FNAME, +DBL_MAX); \ -SINGLE_PARAM_FLOAT64_MATH_SPEC_TEST_TEMPLATE(FNAME ## _nmin2, FNAME, -DBL_MIN * DBL_MIN);\ -SINGLE_PARAM_FLOAT64_MATH_SPEC_TEST_TEMPLATE(FNAME ## _nmax2, FNAME, -DBL_MAX * DBL_MAX);\ -SINGLE_PARAM_FLOAT64_MATH_SPEC_TEST_TEMPLATE(FNAME ## _pmin2, FNAME, +DBL_MIN * DBL_MIN);\ -SINGLE_PARAM_FLOAT64_MATH_SPEC_TEST_TEMPLATE(FNAME ## _pmax2, FNAME, +DBL_MAX * DBL_MAX);\ -SINGLE_PARAM_FLOAT64_MATH_SPEC_TEST_TEMPLATE(FNAME ## _nlarge, FNAME, -DBL_MAX / M_PI);\ -SINGLE_PARAM_FLOAT64_MATH_SPEC_TEST_TEMPLATE(FNAME ## _plarge, FNAME, +DBL_MAX / M_PI);\ -SINGLE_PARAM_FLOAT64_MATH_SPEC_TEST_TEMPLATE(FNAME ## _nlarge2, FNAME, -105414350.0 * 2.0);\ -SINGLE_PARAM_FLOAT64_MATH_SPEC_TEST_TEMPLATE(FNAME ## _plarge2, FNAME, +105414350.0 * 2.0);\ - -SINGLE_PARAM_FLOAT64_MATH_CORNER_TEST_TEMPLATE(sin) -SINGLE_PARAM_FLOAT64_MATH_CORNER_TEST_TEMPLATE(cos) -SINGLE_PARAM_FLOAT64_MATH_CORNER_TEST_TEMPLATE(exp) - -TEST(base_libm, cexp_random) -{ - int len = 50000; - std::vector> da(len); - std::vector> ds1(len); - std::vector> ds2(len); - - std::uniform_real_distribution rnd(-1000, 1000); - std::default_random_engine eng; - - for (int i = 0; i < len; ++i) { - da[i] = std::complex(rnd(eng), rnd(eng)); - } - - for (int i = 0; i < len; ++i) { - ds1[i] = std::exp(da[i]); - ds2[i] = ModuleBase::libm::exp(da[i]); - } - - for (int i = 0; i < len; i++) { - MY_EXPECT_COMPLEX_DOUBLE_EQ(ds1[i], ds2[i]); - } -} - -TEST(base_libm, cexp_spec) -{ - std::vector> da = { - {+INFINITY, +0.0}, // 1 - {+INFINITY, -0.0}, - {-INFINITY, +0.0}, - {-INFINITY, -0.0}, - {+INFINITY, 2.0}, // 5 - {+INFINITY, 4.0}, - {-INFINITY, 2.0}, - {-INFINITY, 4.0}, - {+0.0, +INFINITY}, - {-0.0, +INFINITY}, // 10 - {+0.0, -INFINITY}, - {-0.0, -INFINITY}, - {+100.0, +INFINITY}, - {-100.0, +INFINITY}, - {+100.0, -INFINITY}, // 15 - {-100.0, -INFINITY}, - {+INFINITY, +INFINITY}, - {-INFINITY, +INFINITY}, - {+INFINITY, -INFINITY}, - {-INFINITY, -INFINITY}, // 20 - {+INFINITY, NAN}, - {-INFINITY, NAN}, - {+0.0, NAN}, - {+1.0, NAN}, - {NAN, +0.0}, // 25 - {NAN, -0.0}, - {NAN, +1.0}, - {NAN, +INFINITY}, - {NAN, NAN}, - {+0.0, -DBL_MIN * DBL_MIN}, // 30 - {+0.0, +DBL_MAX * DBL_MAX}, - {+0.0, -DBL_MIN * DBL_MIN}, - {+0.0, +DBL_MAX * DBL_MAX}, - {+INFINITY, -DBL_MIN * DBL_MIN}, - {+INFINITY, +DBL_MAX * DBL_MAX}, // 35 - {+INFINITY, -DBL_MIN * DBL_MIN}, - {+INFINITY, +DBL_MAX * DBL_MAX}, - {+0.0, -DBL_MIN}, - {+0.0, +DBL_MAX}, - {+0.0, -DBL_MIN}, // 40 - {+0.0, +DBL_MAX}, - {+INFINITY, -DBL_MIN}, - {+INFINITY, +DBL_MAX}, - {+INFINITY, -DBL_MIN}, - {+INFINITY, +DBL_MAX}, // 45 - {+DBL_MAX, +0.0}, - {-DBL_MAX, +0.0}, - {+DBL_MAX / M_PI, +0.0}, - {-DBL_MAX / M_PI, +0.0}, - {+DBL_MIN, +0.0}, // 50 - {-DBL_MIN, +0.0}, - }; - - int len = da.size(); - std::vector> ds1(len); - std::vector> ds2(len); - - for (int i = 0; i < len; ++i) { - ds1[i] = std::exp(da[i]); - ds2[i] = ModuleBase::libm::exp(da[i]); - } - - for (int i = 0; i < len; i++) { - MY_EXPECT_COMPLEX_DOUBLE_EQ(ds1[i], ds2[i]); - } -} diff --git a/source/module_base/macros.h b/source/module_base/macros.h deleted file mode 100644 index 5fa9502072..0000000000 --- a/source/module_base/macros.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef MODULE_BASE_MACROS_H -#define MODULE_BASE_MACROS_H - -#include - -template -struct GetTypeReal { - using type = T; /**< The return type based on the input type. */ -}; - -/** - * @brief Specialization of GetTypeReal for std::complex. - * - * This specialization sets the return type to be float when the input type is std::complex. - */ -template <> -struct GetTypeReal> { - using type = float; /**< The return type specialization for std::complex. */ -}; - -/** - * @brief Specialization of GetTypeReal for std::complex. - * - * This specialization sets the return type to be double when the input type is std::complex. - */ -template <> -struct GetTypeReal> { - using type = double; /**< The return type specialization for std::complex. */ -}; - -#endif \ No newline at end of file diff --git a/source/module_base/main.cpp b/source/module_base/main.cpp deleted file mode 100644 index 9a32f11d28..0000000000 --- a/source/module_base/main.cpp +++ /dev/null @@ -1,64 +0,0 @@ -#include -#include -#include -#include - - -void calculate(); - -int main(int argc, char **argv) -{ - - std::cout << "Hello, this is the 'base' module of ABACUS." << std::endl; - - std::cout << "The module searchs for the neighboring atoms for a given atomic position" << std::endl; - - std::cout << "Right now, the module is still empty, soon we will have more tests." << std::endl; - - calculate(); - - return 0; -} - - -void calculate() -{ - std::ofstream ofs("log.txt"); - -// ooo.set_orb_tables(); - - ofs.close(); - - std::cout << "--------------------" << std::endl; - std::cout << " Have a great day! " << std::endl; - std::cout << "--------------------" << std::endl; - -/* - time_t time_start = std::time(NULL); - -// ModuleBase::timer::start(); - - //---------------------------------------------------------- - // main program for doing electronic structure calculations - //---------------------------------------------------------- -// Driver DD; -// DD.init(); - - time_t time_finish= std::time(NULL); - - // print out information before ABACUS ends - std::cout << "\n START Time : " << ctime(&time_start); - std::cout << " FINISH Time : " << ctime(&time_finish); - std::cout << " TOTAL Time : " << difftime(time_finish, time_start) << std::endl; - - double total_time = difftime(time_finish, time_start); - int hour = total_time / 3600; - int mins = ( total_time - 3600 * hour ) / 60; - int secs = total_time - 3600 * hour - 60 * mins ; - std::cout << " Total Time : " << hour << " h " - << mins << " mins " - << secs << " secs "<< std::endl; -*/ - - return; -} diff --git a/source/module_base/math_bspline.cpp b/source/module_base/math_bspline.cpp deleted file mode 100644 index 1fb477ec19..0000000000 --- a/source/module_base/math_bspline.cpp +++ /dev/null @@ -1,60 +0,0 @@ -#include "math_bspline.h" - -#include - -#include - -namespace ModuleBase -{ - Bspline::Bspline() - { - bezier = nullptr; - norder = 0; - xi = 0; - Dx = 1.0; - } - Bspline::~Bspline() - { - delete[] bezier; - } - - void Bspline::init(int norderin, double Dxin, double xiin) - { - this->xi = xiin; - this->Dx = Dxin; - this->norder = norderin; - assert(Dx > 0); - //norder must be a positive even number. - assert(norder > 0); - assert(norder % 2 == 0); - delete[] bezier; bezier = new double [this->norder+1]; - for(int i = 0 ; i < norder+1 ; ++i) - { - bezier[i] = 0; - } - } - - double Bspline::bezier_ele(int n) - { - return this->bezier[n]; - } - - void Bspline::getbspline(double x) - { - bezier[0] = 1.0; - for(int k = 1 ; k <= norder ; ++k) - { - //for n>=1 - for(int n = k; n >= 1; --n ) - { - this->bezier[n] = ((x + n*this->Dx - this->xi)*this->bezier[n] + - (this->xi + (k-n+1)*Dx - x)*this->bezier[n-1])/(k*this->Dx); - } - - //for n = 0 - this->bezier[0] = (x - this->xi)*this->bezier[0] / (k*this->Dx); - } - } -} - - diff --git a/source/module_base/math_bspline.h b/source/module_base/math_bspline.h deleted file mode 100644 index 5973f04a1c..0000000000 --- a/source/module_base/math_bspline.h +++ /dev/null @@ -1,57 +0,0 @@ -#ifndef MATH_BSPLINE_H -#define MATH_BSPLINE_H - -namespace ModuleBase -{ - -/** - * @brief A class to treat Cardinal B-spline interpolation. - * - * @author qianrui created 2021-09-14 - * @details see: J. Chem. Phys. 103, 8577 (1995). - * Math: - * Only uniform nodes are considered: xm-x[m-1]=Dx(>= 0) for control node: X={x0,x1,...,xm}; - * Any function p(x) can be written by - * p(x)=\sum_i{ci*M_ik(x)} (k->infinity), - * where M_ik is the i-th k-order Cardinal B-spline base function - * and ci is undetermined coefficient. - * M_i0 = H(x-xi)-H(x-x[i+1]), H(x): step function - * x-xi x[i+k+1]-x - * M_ik(x)= ---------*M_i(k-1)(x)+ ----------------*M_[i+1][k-1](x) ( xi <= x <= x[i+1] ) - * x[i+k]-xi x[i+k+1]-x[i+1] - * For uniform nodes: M_[i+1]k(x+Dx)=M_ik(x) - * If we define Bk[n] stores M_ik(x+n*Dx) for x in (xi,xi+Dx): - * x+n*Dx-xi xi+(k-n+1)*Dx-x - * Bk[n] = -----------*B(k-1)[n] + -----------------*B(k-1)[n-1] - * k*Dx k*Dx - * USAGE: - * ModuleBase::Bspline bp; - * bp.init(10,0.7,2); //Dx = 0.7, xi = 2 - * bp.getbslpine(0.5); //x = 0.5 - * cout<= 0 - double Dx; // Dx: the interval of control node - double xi; // xi: the starting point - double *bezier; // bezier[n] = Bk[n] - - public: - Bspline(); - ~Bspline(); - - void init(int norderin, double Dxin, double xiin); - - // Get the result of i-th bezier base functions for different input x+xi+n*Dx. - // x should be in [0,Dx] - // n-th result is stored in bezier[n]; - void getbspline(double x); - - // get the element of bezier - double bezier_ele(int n); -}; -} // namespace ModuleBase -#endif diff --git a/source/module_base/math_chebyshev.cpp b/source/module_base/math_chebyshev.cpp deleted file mode 100644 index 60bb560f05..0000000000 --- a/source/module_base/math_chebyshev.cpp +++ /dev/null @@ -1,775 +0,0 @@ -#include "math_chebyshev.h" - -#include "blas_connector.h" -#include "constants.h" -#include "global_function.h" -#include "module_base/module_container/ATen/kernels/blas.h" -#include "tool_quit.h" - -#include - -namespace ModuleBase -{ - -FFTW::FFTW(const int norder2_in) -{ - ccoef = (fftw_complex*)fftw_malloc(sizeof(fftw_complex) * norder2_in); - dcoef = (double*)fftw_malloc(sizeof(double) * norder2_in); - coef_plan = fftw_plan_dft_r2c_1d(norder2_in, dcoef, ccoef, FFTW_ESTIMATE); -} -FFTW::~FFTW() -{ - fftw_destroy_plan(coef_plan); - fftw_free(ccoef); - fftw_free(dcoef); -} -void FFTW::execute_fftw() -{ - fftw_execute(this->coef_plan); -} - -#ifdef __ENABLE_FLOAT_FFTW -FFTW::FFTW(const int norder2_in) -{ - ccoef = (fftwf_complex*)fftw_malloc(sizeof(fftwf_complex) * norder2_in); - dcoef = (float*)fftw_malloc(sizeof(float) * norder2_in); - coef_plan = fftwf_plan_dft_r2c_1d(norder2_in, dcoef, ccoef, FFTW_ESTIMATE); -} -FFTW::~FFTW() -{ - fftwf_destroy_plan(coef_plan); - fftw_free(ccoef); - fftw_free(dcoef); -} -void FFTW::execute_fftw() -{ - fftwf_execute(this->coef_plan); -} -#endif - -// A number to control the number of grids in C_n integration -#define EXTEND 16 - -template -Chebyshev::Chebyshev(const int norder_in) : fftw(2 * EXTEND * norder_in) -{ - this->norder = norder_in; - norder2 = 2 * norder * EXTEND; - if (this->norder < 1) - { - ModuleBase::WARNING_QUIT("Chebyshev", "The Chebyshev expansion order should be at least 1!"); - } - coefr_cpu = new REAL[norder]; - coefc_cpu = new std::complex[norder]; - if (base_device::get_device_type(this->ctx) == base_device::GpuDevice) - { - resmem_var_op()(this->coef_real, norder); - resmem_complex_op()(this->coef_complex, norder); - } - else - { - coef_real = coefr_cpu; - coef_complex = coefc_cpu; - } - polytrace = new REAL[norder]; - - // ndmin = ndmax = ndmax_in; - getcoef_complex = false; - getcoef_real = false; -} - -template -Chebyshev::~Chebyshev() -{ - delete[] polytrace; - if (base_device::get_device_type(this->ctx) == base_device::GpuDevice) - { - delmem_var_op()(this->coef_real); - delmem_complex_op()(this->coef_complex); - } - else - { - coef_real = nullptr; - coef_complex = nullptr; - } - - delete[] coefr_cpu; - delete[] coefc_cpu; -} - -template -void Chebyshev::getpolyval(const REAL x, REAL* polyval, const int N) -{ - polyval[0] = 1; - polyval[1] = x; - for (int i = 2; i < N; ++i) - { - polyval[i] = 2 * x * polyval[i - 1] - polyval[i - 2]; - } -} -template -inline REAL Chebyshev::recurs(const REAL x, const REAL Tn, REAL const Tn_1) -{ - return 2 * x * Tn - Tn_1; -} - -template -REAL Chebyshev::ddot_real(const std::complex* psi_L, - const std::complex* psi_R, - const int N, - const int LDA, - const int m) -{ - REAL result = 0; - const base_device::DEVICE_CPU* cpu_ctx = {}; - if (N == LDA || m == 1) - { - int dim2 = 2 * N * m; - REAL *pL, *pR; - pL = (REAL*)psi_L; - pR = (REAL*)psi_R; - REAL* dot_device = nullptr; - resmem_var_op()(dot_device, 1); - container::kernels::blas_dot()(dim2, pL, 1, pR, 1, dot_device); - syncmem_var_d2h_op()(&result, dot_device, 1); - delmem_var_op()(dot_device); - } - else - { - REAL *pL, *pR; - pL = (REAL*)psi_L; - pR = (REAL*)psi_R; - REAL* dot_device = nullptr; - resmem_var_op()(dot_device, 1); - for (int i = 0; i < m; ++i) - { - int dim2 = 2 * N; - container::kernels::blas_dot()(dim2, pL, 1, pR, 1, dot_device); - REAL result_temp = 0; - syncmem_var_d2h_op()(&result_temp, dot_device, 1); - result += result_temp; - pL += 2 * LDA; - pR += 2 * LDA; - } - delmem_var_op()(dot_device); - } - return result; -} - -template -void Chebyshev::calcoef_real(std::function fun) -{ - std::complex* pcoef = (std::complex*)this->fftw.ccoef; - - // three point = 2/3 M + 1/3 T; - //----------------------------------------------- - //(M)iddle point integral method part - //----------------------------------------------- - for (int i = 0; i < norder2; ++i) - { - this->fftw.dcoef[i] = fun((REAL)cos((i + 0.5) * ModuleBase::TWO_PI / norder2)); - } - - // this->fftw.dcoef --FFT--> fftw.pcoef - this->fftw.execute_fftw(); - - for (int i = 0; i < norder; ++i) - { - REAL phi = i * ModuleBase::PI / norder2; - if (i == 0) - { - coefr_cpu[i] = (cos(phi) * pcoef[i].real() + sin(phi) * pcoef[i].imag()) / norder2 * 2 / 3; - } - else - { - coefr_cpu[i] = (cos(phi) * pcoef[i].real() + sin(phi) * pcoef[i].imag()) / norder2 * 4 / 3; - } - } - - //----------------------------------------------- - //(T)rapezoid integral method part - //----------------------------------------------- - for (int i = 0; i < norder2; ++i) - { - this->fftw.dcoef[i] = fun(cos(i * ModuleBase::TWO_PI / norder2)); - } - - // this->fftw.dcoef --FFT--> fftw.pcoef - this->fftw.execute_fftw(); - - for (int i = 0; i < norder; ++i) - { - if (i == 0) - { - coefr_cpu[i] += real(pcoef[i]) / norder2 * 1 / 3; - } - else - { - coefr_cpu[i] += real(pcoef[i]) / norder2 * 2 / 3; - } - } - - if (base_device::get_device_type(this->ctx) == base_device::GpuDevice) - { - syncmem_var_h2d_op()(coef_real, coefr_cpu, norder); - } - - getcoef_real = true; - return; -} - -template -void Chebyshev::calcoef_complex(std::function(std::complex)> fun) -{ - std::complex* pcoef = (std::complex*)this->fftw.ccoef; - - // three point = 2/3 M + 1/3 T; - //----------------------------------------------- - //(M)iddle point integral method part - //----------------------------------------------- - for (int i = 0; i < norder2; ++i) - { - this->fftw.dcoef[i] = fun(cos((i + 0.5) * ModuleBase::TWO_PI / norder2)).real(); - } - this->fftw.execute_fftw(); - for (int i = 0; i < norder; ++i) - { - REAL phi = i * ModuleBase::PI / norder2; - if (i == 0) - { - coefc_cpu[i].real((cos(phi) * pcoef[i].real() + sin(phi) * pcoef[i].imag()) / norder2 * 2 / 3); - } - else - { - coefc_cpu[i].real((cos(phi) * pcoef[i].real() + sin(phi) * pcoef[i].imag()) / norder2 * 4 / 3); - } - } - - for (int i = 0; i < norder2; ++i) - { - this->fftw.dcoef[i] = fun(cos((i + 0.5) * ModuleBase::TWO_PI / norder2)).imag(); - } - this->fftw.execute_fftw(); - for (int i = 0; i < norder; ++i) - { - REAL phi = i * ModuleBase::PI / norder2; - if (i == 0) - { - coefc_cpu[i].imag((cos(phi) * pcoef[i].real() + sin(phi) * pcoef[i].imag()) / norder2 * 2 / 3); - } - else - { - coefc_cpu[i].imag((cos(phi) * pcoef[i].real() + sin(phi) * pcoef[i].imag()) / norder2 * 4 / 3); - } - } - - //----------------------------------------------- - //(T)rapezoid integral method part - //----------------------------------------------- - for (int i = 0; i < norder2; ++i) - { - this->fftw.dcoef[i] = fun(cos(i * ModuleBase::TWO_PI / norder2)).real(); - } - this->fftw.execute_fftw(); - for (int i = 0; i < norder; ++i) - { - if (i == 0) - { - coefc_cpu[i].real(real(coefc_cpu[i]) + real(pcoef[i]) / norder2 * 1 / 3); - } - else - { - coefc_cpu[i].real(real(coefc_cpu[i]) + real(pcoef[i]) / norder2 * 2 / 3); - } - } - - for (int i = 0; i < norder2; ++i) - { - this->fftw.dcoef[i] = fun(cos(i * ModuleBase::TWO_PI / norder2)).imag(); - } - this->fftw.execute_fftw(); - for (int i = 0; i < norder; ++i) - { - if (i == 0) - { - coefc_cpu[i].imag(imag(coefc_cpu[i]) + real(pcoef[i]) / norder2 * 1 / 3); - } - else - { - coefc_cpu[i].imag(imag(coefc_cpu[i]) + real(pcoef[i]) / norder2 * 2 / 3); - } - } - if (base_device::get_device_type(this->ctx) == base_device::GpuDevice) - { - syncmem_complex_h2d_op()(coef_complex, coefc_cpu, norder); - } - - getcoef_complex = true; - return; -} - -template -void Chebyshev::calcoef_pair(std::function fun1, std::function fun2) -{ - std::complex* pcoef = (std::complex*)this->fftw.ccoef; - - // three point = 2/3 M + 1/3 T; - //----------------------------------------------- - //(M)iddle point integral method part - //----------------------------------------------- - for (int i = 0; i < norder2; ++i) - { - this->fftw.dcoef[i] = fun1(cos((i + 0.5) * ModuleBase::TWO_PI / norder2)); - } - this->fftw.execute_fftw(); - for (int i = 0; i < norder; ++i) - { - REAL phi = i * ModuleBase::PI / norder2; - if (i == 0) - { - coefc_cpu[i].real((cos(phi) * pcoef[i].real() + sin(phi) * pcoef[i].imag()) / norder2 * 2 / 3); - } - else - { - coefc_cpu[i].real((cos(phi) * pcoef[i].real() + sin(phi) * pcoef[i].imag()) / norder2 * 4 / 3); - } - } - - for (int i = 0; i < norder2; ++i) - { - this->fftw.dcoef[i] = fun2(cos((i + 0.5) * ModuleBase::TWO_PI / norder2)); - } - this->fftw.execute_fftw(); - for (int i = 0; i < norder; ++i) - { - REAL phi = i * ModuleBase::PI / norder2; - if (i == 0) - { - coefc_cpu[i].imag((cos(phi) * pcoef[i].real() + sin(phi) * pcoef[i].imag()) / norder2 * 2 / 3); - } - else - { - coefc_cpu[i].imag((cos(phi) * pcoef[i].real() + sin(phi) * pcoef[i].imag()) / norder2 * 4 / 3); - } - } - - //----------------------------------------------- - //(T)rapezoid integral method part - //----------------------------------------------- - for (int i = 0; i < norder2; ++i) - { - this->fftw.dcoef[i] = fun1(cos(i * ModuleBase::TWO_PI / norder2)); - } - this->fftw.execute_fftw(); - for (int i = 0; i < norder; ++i) - { - if (i == 0) - { - coefc_cpu[i].real(real(coefc_cpu[i]) + real(pcoef[i]) / norder2 * 1 / 3); - } - else - { - coefc_cpu[i].real(real(coefc_cpu[i]) + real(pcoef[i]) / norder2 * 2 / 3); - } - } - - for (int i = 0; i < norder2; ++i) - { - this->fftw.dcoef[i] = fun2(cos(i * ModuleBase::TWO_PI / norder2)); - } - this->fftw.execute_fftw(); - for (int i = 0; i < norder; ++i) - { - if (i == 0) - { - coefc_cpu[i].imag(imag(coefc_cpu[i]) + real(pcoef[i]) / norder2 * 1 / 3); - } - else - { - coefc_cpu[i].imag(imag(coefc_cpu[i]) + real(pcoef[i]) / norder2 * 2 / 3); - } - } - - if (base_device::get_device_type(this->ctx) == base_device::GpuDevice) - { - syncmem_complex_h2d_op()(coef_complex, coefc_cpu, norder); - } - - getcoef_complex = true; - return; -} - -template -void Chebyshev::calfinalvec_real( - std::function*, std::complex*, const int)> funA, - std::complex* wavein, - std::complex* waveout, - const int N, - const int LDA, - const int m) -{ - if (!getcoef_real) - { - ModuleBase::WARNING_QUIT("Chebyshev", "Please calculate coef_real first!"); - } - - std::complex* arraynp1 = nullptr; - std::complex* arrayn = nullptr; - std::complex* arrayn_1 = nullptr; - assert(N >= 0 && LDA >= N); - int ndmxt; - if (m == 1) - { - ndmxt = N * m; - } - else - { - ndmxt = LDA * m; - } - - resmem_complex_op()(arraynp1, ndmxt); - resmem_complex_op()(arrayn, ndmxt); - resmem_complex_op()(arrayn_1, ndmxt); - - memcpy_complex_op()(arrayn_1, wavein, ndmxt); - // ModuleBase::GlobalFunc::DCOPY(wavein, arrayn_1, ndmxt); - - funA(arrayn_1, arrayn, m); - - // 0- & 1-st order - setmem_complex_op()(waveout, 0, ndmxt); - std::complex coef0 = std::complex(coefr_cpu[0], 0); - container::kernels::blas_axpy, ct_Device>()(ndmxt, &coef0, arrayn_1, 1, waveout, 1); - std::complex coef1 = std::complex(coefr_cpu[1], 0); - container::kernels::blas_axpy, ct_Device>()(ndmxt, &coef1, arrayn, 1, waveout, 1); - // for (int i = 0; i < ndmxt; ++i) - // { - // waveout[i] = coef_real[0] * arrayn_1[i] + coef_real[1] * arrayn[i]; - // } - - // more than 1-st orders - for (int ior = 2; ior < norder; ++ior) - { - recurs_complex(funA, arraynp1, arrayn, arrayn_1, N, LDA, m); - std::complex coefior = std::complex(coefr_cpu[ior], 0); - container::kernels::blas_axpy, ct_Device>()(ndmxt, &coefior, arraynp1, 1, waveout, 1); - // for (int i = 0; i < ndmxt; ++i) - // { - // waveout[i] += coef_real[ior] * arraynp1[i]; - // } - std::complex* tem = arrayn_1; - arrayn_1 = arrayn; - arrayn = arraynp1; - arraynp1 = tem; - } - delmem_complex_op()(arraynp1); - delmem_complex_op()(arrayn); - delmem_complex_op()(arrayn_1); - return; -} - -template -void Chebyshev::calfinalvec_complex( - std::function*, std::complex*, const int)> funA, - std::complex* wavein, - std::complex* waveout, - const int N, - const int LDA, - const int m) -{ - if (!getcoef_complex) - { - ModuleBase::WARNING_QUIT("Chebyshev", "Please calculate coef_complex first!"); - } - - std::complex* arraynp1 = nullptr; - std::complex* arrayn = nullptr; - std::complex* arrayn_1 = nullptr; - assert(N >= 0 && LDA >= N); - int ndmxt; - if (m == 1) - { - ndmxt = N * m; - } - else - { - ndmxt = LDA * m; - } - - resmem_complex_op()(arraynp1, ndmxt); - resmem_complex_op()(arrayn, ndmxt); - resmem_complex_op()(arrayn_1, ndmxt); - - memcpy_complex_op()(arrayn_1, wavein, ndmxt); - - funA(arrayn_1, arrayn, m); - - // 0- & 1-st order - setmem_complex_op()(waveout, 0, ndmxt); - container::kernels::blas_axpy, ct_Device>()(ndmxt, &coefc_cpu[0], arrayn_1, 1, waveout, 1); - container::kernels::blas_axpy, ct_Device>()(ndmxt, &coefc_cpu[1], arrayn, 1, waveout, 1); - // for (int i = 0; i < ndmxt; ++i) - // { - // waveout[i] = coef_complex[0] * arrayn_1[i] + coef_complex[1] * arrayn[i]; - // } - - // more than 1-st orders - for (int ior = 2; ior < norder; ++ior) - { - recurs_complex(funA, arraynp1, arrayn, arrayn_1, N, LDA, m); - container::kernels::blas_axpy, ct_Device>()(ndmxt, &coefc_cpu[ior], arraynp1, 1, waveout, 1); - // for (int i = 0; i < ndmxt; ++i) - // { - // waveout[i] += coef_complex[ior] * arraynp1[i]; - // } - std::complex* tem = arrayn_1; - arrayn_1 = arrayn; - arrayn = arraynp1; - arraynp1 = tem; - } - delmem_complex_op()(arraynp1); - delmem_complex_op()(arrayn); - delmem_complex_op()(arrayn_1); - return; -} - -template -void Chebyshev::calpolyvec_complex( - std::function*, std::complex*, const int)> funA, - std::complex* wavein, - std::complex* polywaveout, - const int N, - const int LDA, - const int m) -{ - - assert(N >= 0 && LDA >= N); - const int ndmxt = LDA * m; - - std::complex* arraynp1 = polywaveout + 2 * ndmxt; - std::complex* arrayn = polywaveout + ndmxt; - std::complex* arrayn_1 = polywaveout; - - std::complex*tmpin = wavein, *tmpout = arrayn_1; - for (int i = 0; i < m; ++i) - { - memcpy_complex_op()(tmpout, tmpin, N); - // ModuleBase::GlobalFunc::DCOPY(tmpin, tmpout, N); - tmpin += LDA; - tmpout += LDA; - } - - // 1-st order - funA(arrayn_1, arrayn, m); - - // more than 1-st orders - for (int ior = 2; ior < norder; ++ior) - { - recurs_complex(funA, arraynp1, arrayn, arrayn_1, N, LDA, m); - arrayn_1 += ndmxt; - arrayn += ndmxt; - arraynp1 += ndmxt; - } - return; -} - -template -void Chebyshev::tracepolyA( - std::function* in, std::complex* out, const int)> funA, - std::complex* wavein, - const int N, - const int LDA, - const int m) -{ - std::complex* arraynp1 = nullptr; - std::complex* arrayn = nullptr; - std::complex* arrayn_1 = nullptr; - assert(N >= 0 && LDA >= N); - int ndmxt; - if (m == 1) - { - ndmxt = N * m; - } - else - { - ndmxt = LDA * m; - } - - resmem_complex_op()(arraynp1, ndmxt); - resmem_complex_op()(arrayn, ndmxt); - resmem_complex_op()(arrayn_1, ndmxt); - - memcpy_complex_op()(arrayn_1, wavein, ndmxt); - // ModuleBase::GlobalFunc::DCOPY(wavein, arrayn_1, ndmxt); - - funA(arrayn_1, arrayn, m); - - polytrace[0] = this->ddot_real(wavein, wavein, N, LDA, m); - polytrace[1] = this->ddot_real(wavein, arrayn, N, LDA, m); - - // more than 1-st orders - for (int ior = 2; ior < norder; ++ior) - { - recurs_complex(funA, arraynp1, arrayn, arrayn_1, N, LDA, m); - polytrace[ior] = this->ddot_real(wavein, arraynp1, N, LDA, m); - std::complex* tem = arrayn_1; - arrayn_1 = arrayn; - arrayn = arraynp1; - arraynp1 = tem; - } - - delmem_complex_op()(arraynp1); - delmem_complex_op()(arrayn); - delmem_complex_op()(arrayn_1); - return; -} - -template -void Chebyshev::recurs_complex( - std::function* in, std::complex* out, const int)> funA, - std::complex* arraynp1, - std::complex* arrayn, - std::complex* arrayn_1, - const int N, - const int LDA, - const int m) -{ - funA(arrayn, arraynp1, m); - const std::complex two = 2.0; - const std::complex invone = -1.0; - for (int ib = 0; ib < m; ++ib) - { - container::kernels::blas_scal, ct_Device>()(N, &two, arraynp1 + ib * LDA, 1); - container::kernels::blas_axpy, ct_Device>()(N, - &invone, - arrayn_1 + ib * LDA, - 1, - arraynp1 + ib * LDA, - 1); - - // for (int i = 0; i < N; ++i) - // { - // arraynp1[i + ib * LDA] = REAL(2.0) * arraynp1[i + ib * LDA] - arrayn_1[i + ib * LDA]; - // } - } -} - -template -bool Chebyshev::checkconverge( - std::function* in, std::complex* out, const int)> funA, - std::complex* wavein, - const int N, - const int LDA, - REAL& tmax, - REAL& tmin, - REAL stept) -{ - bool converge = true; - std::complex* arraynp1 = nullptr; - std::complex* arrayn = nullptr; - std::complex* arrayn_1 = nullptr; - - resmem_complex_op()(arraynp1, LDA); - resmem_complex_op()(arrayn, LDA); - resmem_complex_op()(arrayn_1, LDA); - - memcpy_complex_op()(arrayn_1, wavein, N); - // ModuleBase::GlobalFunc::DCOPY(wavein, arrayn_1, N); - - if (tmin == tmax) - { - tmax += stept; - } - - funA(arrayn_1, arrayn, 1); - REAL sum1, sum2; - REAL t; - if (base_device::get_device_type(this->ctx) == base_device::GpuDevice) - { - sum1 = this->ddot_real(arrayn_1, arrayn_1, N); - sum2 = this->ddot_real(arrayn_1, arrayn, N); - } - else - { -#ifdef __MPI - sum1 = ModuleBase::GlobalFunc::ddot_real(N, arrayn_1, arrayn_1); - sum2 = ModuleBase::GlobalFunc::ddot_real(N, arrayn_1, arrayn); -#else - sum1 = this->ddot_real(arrayn_1, arrayn_1, N); - sum2 = this->ddot_real(arrayn_1, arrayn, N); -#endif - } - t = sum2 / sum1 * (tmax - tmin) / 2 + (tmax + tmin) / 2; - if (t < tmin || tmin == 0) - { - converge = false; - tmin = t - stept; - } - if (t > tmax) - { - converge = false; - tmax = t + stept; - } - - for (int ior = 2; ior < norder; ++ior) - { - funA(arrayn, arraynp1, 1); - if (base_device::get_device_type(this->ctx) == base_device::GpuDevice) - { - sum1 = this->ddot_real(arrayn, arrayn, N); - sum2 = this->ddot_real(arrayn, arraynp1, N); - } - else - { -#ifdef __MPI - sum1 = ModuleBase::GlobalFunc::ddot_real(N, arrayn, arrayn); - sum2 = ModuleBase::GlobalFunc::ddot_real(N, arrayn, arraynp1); -#else - sum1 = this->ddot_real(arrayn, arrayn, N); - sum2 = this->ddot_real(arrayn, arraynp1, N); -#endif - } - t = sum2 / sum1 * (tmax - tmin) / 2 + (tmax + tmin) / 2; - if (t < tmin) - { - converge = false; - tmin = t - stept; - } - else if (t > tmax) - { - converge = false; - tmax = t + stept; - } - std::complex two = 2.0; - std::complex invone = -1.0; - container::kernels::blas_scal, ct_Device>()(N, &two, arraynp1, 1); - container::kernels::blas_axpy, ct_Device>()(N, &invone, arrayn_1, 1, arraynp1, 1); - // for (int i = 0; i < N; ++i) - // { - // arraynp1[i] = REAL(2.0) * arraynp1[i] - arrayn_1[i]; - // } - std::complex* tem = arrayn_1; - arrayn_1 = arrayn; - arrayn = arraynp1; - arraynp1 = tem; - } - - delmem_complex_op()(arraynp1); - delmem_complex_op()(arrayn); - delmem_complex_op()(arrayn_1); - return converge; -} - -// we only have two examples: double and float. -template class Chebyshev; -#ifdef __ENABLE_FLOAT_FFTW -template class Chebyshev; -#endif -#if ((defined __CUDA) || (defined __ROCM)) -template class Chebyshev; -#ifdef __ENABLE_FLOAT_FFTW -template class Chebyshev; -#endif -#endif - -} // namespace ModuleBase diff --git a/source/module_base/math_chebyshev.h b/source/module_base/math_chebyshev.h deleted file mode 100644 index 122f2021e9..0000000000 --- a/source/module_base/math_chebyshev.h +++ /dev/null @@ -1,272 +0,0 @@ -#ifndef STO_CHEBYCHEV_H -#define STO_CHEBYCHEV_H -#include "fftw3.h" -#include "module_base/module_device/device.h" -#include "module_base/module_device/memory_op.h" -#include "module_base/module_container/ATen/core/tensor_types.h" - -#include -#include - -namespace ModuleBase -{ -// template class for fftw -template -class FFTW; - -/** - * @brief A class to treat the Chebyshev expansion. - * - * @author qianrui on 2022-05-18 - * @details - * Math: - * I. - * Chebyshev polynomial: - * T_0(x) = 1; - * T_1(x) = x; - * T_2(x) = 2x^2 -1; - * T_3(x) = 4x^3-3x; - * T_{n+2}(x) = 2xT_{n+1}(x) - T_n(x) - * - * II. - * Any analytical function f(x) can be expanded by Chebyshev polynomial: - * f(x) = \sum_{n=0}^{norder-1} C_n[f]*T_n(x) (|x| < 1), - * where C_n[f] = \frac{2-\delta_{n0}}{\pi} \int_0^\pi f(cos(\theta))cos(n\theta) d\theta - * Here C_n can be calculate with FFT. - * - * III. - * Any functions of linear Operator or matrix f(\hat{A}) or f(A) can also be expanded as well: - * f(A) = \sum_{n=0}^{norder-1} C_n[f]*T_n(A) (|all eigenvalues of A| < 1). - * f(A)v = \sum_{n=0}^{norder-1} C_n[f]*T_n(A)v, where v is column vector - * = \sum_{n=0}^{norder-1} C_n[f]*v_n, where v_n = T_n(A)v, v_0 = v - * v_{n+2} = 2Av_{n+1} - v_n - * - * IV. - * v^+f(A)v = \sum_{n=0}^{norder-1} C_n[f]*v^+v_n = \sum_{n=0}^{norder-1} C_n[f] * w_n, - * where w_n = v^+ * v_n = v^+ * T_n(A) * v - * - * USAGE: - * Chebyshev che(10); // constructe a chebyshev expansion of 10 orders (n=0,1,...,9) - * 1. che.calcoef_real(cos) // calculate C_n[f], where f is a.cos - * for(int i=0;i<10;++i) cout<, where f is occ.fd and H is hamilt.hpsi - * - * che.calcoef_complex(expi) - * che.calfinalvec_complex(hpsi, psi_in, psi_out, npw, npwx, nbands); - * //calculate exp(iH)|psi_i> - * - * 3. che.tracepolyA(hpsi, psi_in, npw, npwx, nbands) - * //calculate \sum_i^{nbands} - * - * 4. che.calcoef_complex(expi); //calculate C_n[exp(ix)] - * che.getpolyval(PI/4, T, norder); //get T_n(pi/4) - * std::complex sum(0,0); - * for(int i = 0; i < norder ; ++i) - * { - * sum += che.coef_complex[i]*T[i]; //sum = exp(i*pi/4) = \sum_n C_n[exp(ix)]*T_n(pi/4) - * } - * - * 5. che.recurs_complex(hpsi, vp1, v, vm1, npw) - * //calculate vp1: |vp1> = 2 H|v> - |vm1>; - * - */ -template -class Chebyshev -{ - - public: - // constructor and deconstructor - Chebyshev(const int norder); - ~Chebyshev(); - - public: - // I. - // Calculate coefficients C_n[f], where f is a function of real number - void calcoef_real(std::function fun); - - // Calculate coefficients C_n[g], where g is a function of complex number - void calcoef_complex(std::function(std::complex)> fun); - - // Calculate coefficients C_n[g], where g is a general complex function g(x)=(g1(x), g2(x)) - // e.g. exp(ix)=(cos(x),sin(x)) - void calcoef_pair(std::function fun1, std::function fun2); - - // II. - // Calculate the final vector f(A)v = \sum_{n=0}^{norder-1} C_n[f]*v_n - // Here funA(in, out) means the map v -> Av : funA(v, Av) - // Here m represents we treat m vectors at the same time: f(A)[v1,...,vm] and funA(in,out,m) means [v1,...,vm] -> - // A[v1,...,vm] N is dimension of vector, and LDA is the distance between the first number of v_n and v_{n+1}. LDA - // >= max(1, N). It is the same as the BLAS lib. calfinalvec_real uses C_n[f], where f is a function of real number - // and A is a real Operator. - void calfinalvec_real(std::function funA, - REAL* wavein, - REAL* waveout, - const int N, - const int LDA = 1, - const int m = 1); // do not define yet - - // calfinalvec_real uses C_n[f], where f is a function of real number and A is a complex Operator. - void calfinalvec_real(std::function*, std::complex*, const int)> funA, - std::complex* wavein, - std::complex* waveout, - const int N, - const int LDA = 1, - const int m = 1); - - // calfinalvec_complex uses C_n[g], where g is a function of complex number and A is a complex Operator. - void calfinalvec_complex(std::function*, std::complex*, const int)> funA, - std::complex* wavein, - std::complex* waveout, - const int N, - const int LDA = 1, - const int m = 1); - - // III. - // \sum_i v_i^+f(A)v_i = \sum_{i,n=0}^{norder-1} C_n[f]*v_i^+v_{i,n} = \sum_{n=0}^{norder-1} C_n[f] * w_n - // calculate the sum of diagonal elements (Trace) of T_n(A) in v-represent: w_n = \sum_i v_i^+ * T_n(A) * v_i - // i = 1,2,...m - void tracepolyA(std::function* in, std::complex* out, const int)> funA, - std::complex* wavein, - const int N, - const int LDA = 1, - const int m = 1); - - // get T_n(x) - void getpolyval(REAL x, REAL* polyval, const int N); - - // get each order of vector: {T_0(A)v, T_1(A)v, ..., T_n(A)v} - // Note: use it carefully, it will cost a lot of memory! - // calpolyvec_real: f(x) = \sum_n C_n*T_n(x), f is a real function - void calpolyvec_real(std::function funA, - REAL* wavein, - REAL* waveout, - const int N, - const int LDA = 1, - const int m = 1); // do not define yet - - // calpolyvec_complex: f(x) = \sum_n C_n*T_n(x), f is a complex function - void calpolyvec_complex(std::function* in, std::complex* out, const int)> funA, - std::complex* wavein, - std::complex* waveout, - const int N, - const int LDA = 1, - const int m = 1); - - // IV. - // recurs fomula: v_{n+1} = 2Av_n - v_{n-1} - // get v_{n+1} from v_n and v_{n-1} - // recurs_complex: A is a real operator - void recurs_real(std::function funA, - REAL* arraynp1, - REAL* arrayn, - REAL* arrayn_1, - const int N, - const int LDA = 1, - const int m = 1); - - // recurs_complex: A is a complex operator - void recurs_complex(std::function* in, std::complex* out, const int)> funA, - std::complex* arraynp1, - std::complex* arrayn, - std::complex* arrayn_1, - const int N, - const int LDA = 1, - const int m = 1); - - // return 2xTn-Tn_1 - REAL recurs(const REAL x, const REAL Tn, const REAL Tn_1); - - // V. - // auxiliary function - // Abs of all eigenvalues of A should be less than 1. - // Thus \hat(a) = \frac{(A - (tmax+tmin)/2)}{(tmax-tmin)/2} - // tmax >= all eigenvalues; tmin <= all eigenvalues - // Here we check if the trial number tmax(tmin) is the upper(lower) bound of eigenvalues and return it. - bool checkconverge(std::function* in, std::complex* out, const int)> funA, - std::complex* wavein, - const int N, - const int LDA, - REAL& tmax, // trial number for upper bound - REAL& tmin, // trial number for lower bound - REAL stept); // tmax = max() + stept, tmin = min() - stept - - public: - // Members: - int norder; // order of Chebyshev expansion - int norder2; // 2 * norder * EXTEND - - REAL* coef_real = nullptr; //[Device] expansion coefficient of each order - std::complex* coef_complex = nullptr; //[Device] expansion coefficient of each order - REAL* coefr_cpu = nullptr; //[CPU] expansion coefficient of each order - std::complex* coefc_cpu = nullptr; //[CPU] expansion coefficient of each order - - FFTW fftw; // use for fftw - REAL* polytrace; //[CPU] w_n = \sum_i v^+ * T_n(A) * v, only - - bool getcoef_real; // coef_real has been calculated - bool getcoef_complex; // coef_complex has been calculated - - public: - // SI. - // calculate dot product - REAL ddot_real(const std::complex* psi_L, - const std::complex* psi_R, - const int N, - const int LDA = 1, - const int m = 1); - - private: - Device* ctx = {}; - base_device::DEVICE_CPU* cpu_ctx = {}; - using ct_Device = typename container::PsiToContainer::type; - using resmem_complex_op = base_device::memory::resize_memory_op, Device>; - using resmem_var_op = base_device::memory::resize_memory_op; - using delmem_complex_op = base_device::memory::delete_memory_op, Device>; - using delmem_var_op = base_device::memory::delete_memory_op; - using syncmem_var_h2d_op = base_device::memory::synchronize_memory_op; - using syncmem_var_d2h_op = base_device::memory::synchronize_memory_op; - using syncmem_complex_h2d_op = base_device::memory::synchronize_memory_op, Device, base_device::DEVICE_CPU>; - using syncmem_complex_d2h_op = base_device::memory::synchronize_memory_op, base_device::DEVICE_CPU, Device>; - using memcpy_var_op = base_device::memory::synchronize_memory_op; - using memcpy_complex_op = base_device::memory::synchronize_memory_op, Device, Device>; - using setmem_complex_op = base_device::memory::set_memory_op, Device>; -}; - -template <> -class FFTW -{ - public: - FFTW(const int norder2_in); - ~FFTW(); - void execute_fftw(); - double* dcoef; //[norder2] - fftw_complex* ccoef; - fftw_plan coef_plan; -}; - -#ifdef __ENABLE_FLOAT_FFTW -template <> -class FFTW -{ - public: - FFTW(const int norder2_in); - ~FFTW(); - void execute_fftw(); - float* dcoef; //[norder2] - fftwf_complex* ccoef; - fftwf_plan coef_plan; -}; -#endif - -} // namespace ModuleBase - -#endif diff --git a/source/module_base/math_erf_complex.cpp b/source/module_base/math_erf_complex.cpp deleted file mode 100644 index 18709c4866..0000000000 --- a/source/module_base/math_erf_complex.cpp +++ /dev/null @@ -1,1971 +0,0 @@ -#include "math_erf_complex.h" - -#include "constants.h" - -#include -#include -#define Inf std::numeric_limits::infinity() -#define NaN std::numeric_limits::quiet_NaN() - -namespace ModuleBase -{ - -ErrorFunc::ErrorFunc() -{ -} -ErrorFunc::~ErrorFunc() -{ -} - -std::complex ErrorFunc::scaled_w(std::complex z, double relerr) -{ - if (std::real(z) == 0.0) - return std::complex(erfcx(std::imag(z)), std::real(z)); - else if (std::imag(z) == 0.0) - return std::complex(std::exp(-std::real(z) * std::real(z)), scaled_w_im(std::real(z))); - - double a, a2, c; - if (relerr <= DBL_EPSILON) - { - relerr = DBL_EPSILON; - a = 0.518321480430085929872; // pi / sqrt(-log(eps*0.5)) - c = 0.329973702884629072537; // (2/pi) * a; - a2 = 0.268657157075235951582; // a^2 - } - else - { - if (relerr > 0.1) - relerr = 0.1; // not sensible to compute < 1 digit - a = ModuleBase::PI / std::sqrt(-std::log(relerr * 0.5)); - c = (2 / ModuleBase::PI) * a; - a2 = a * a; - } - const double x = std::fabs(std::real(z)); - const double y = std::imag(z), ya = std::fabs(y); - std::complex ret = 0.; // return value - double sum1 = 0, sum2 = 0, sum3 = 0, sum4 = 0, sum5 = 0; - if (ya > 7 || (x > 6 && (ya > 0.1 || (x > 8 && ya > 1e-10) || x > 28))) - { - - const double ispi = 1 / std::sqrt(ModuleBase::PI); // 1 / sqrt(pi) - double xs = y < 0 ? -std::real(z) : std::real(z); // compute for -z if y < 0 - if (x + ya > 4000) - { // nu <= 2 - if (x + ya > 1e7) - { // nu == 1, w(z) = i/sqrt(pi) / z - // scale to avoid overflow - if (x > ya) - { - double yax = ya / xs; - double denom = ispi / (xs + yax * ya); - ret = std::complex(denom * yax, denom); - } - else if (std::isinf(ya)) - return ((std::isnan(x) || y < 0) ? std::complex(NaN, NaN) : std::complex(0, 0)); - else - { - double xya = xs / ya; - double denom = ispi / (xya * xs + ya); - ret = std::complex(denom, denom * xya); - } - } - else - { // nu == 2, w(z) = i/sqrt(pi) * z / (z*z - 0.5) - double dr = xs * xs - ya * ya - 0.5, di = 2 * xs * ya; - double denom = ispi / (dr * dr + di * di); - ret = std::complex(denom * (xs * di - ya * dr), denom * (xs * dr + ya * di)); - } - } - else - { // compute nu(z) estimate and do general continued fraction - const double c0 = 3.9, c1 = 11.398, c2 = 0.08254, c3 = 0.1421, c4 = 0.2023; // fit - double nu = std::floor(c0 + c1 / (c2 * x + c3 * ya + c4)); - double wr = xs, wi = ya; - for (nu = 0.5 * (nu - 1); nu > 0.4; nu -= 0.5) - { - // w <- z - nu/w: - double denom = nu / (wr * wr + wi * wi); - wr = xs - wr * denom; - wi = ya + wi * denom; - } - { // w(z) = i/sqrt(pi) / w: - double denom = ispi / (wr * wr + wi * wi); - ret = std::complex(denom * wi, denom * wr); - } - } - if (y < 0) - { - // use w(z) = 2.0*exp(-z*z) - w(-z), - // but be careful of overflow in exp(-z*z) - // = exp(-(xs*xs-ya*ya) -2*i*xs*ya) - return 2.0 * std::exp(std::complex((ya - xs) * (xs + ya), 2 * xs * y)) - ret; - } - else - return ret; - } - else if (x < 10) - { - double prod2ax = 1, prodm2ax = 1; - double expx2; - - if (std::isnan(y)) - return std::complex(y, y); - - if (relerr == DBL_EPSILON) - { // use precomputed exp(-a2*(n*n)) table - if (x < 5e-4) - { // compute sum4 and sum5 together as sum5-sum4 - const double x2 = x * x; - expx2 = 1 - x2 * (1 - 0.5 * x2); // exp(-x*x) via Taylor - // compute exp(2*a*x) and exp(-2*a*x) via Taylor, to double precision - const double ax2 = 1.036642960860171859744 * x; // 2*a*x - const double exp2ax = 1 + ax2 * (1 + ax2 * (0.5 + 0.166666666666666666667 * ax2)); - const double expm2ax = 1 - ax2 * (1 - ax2 * (0.5 - 0.166666666666666666667 * ax2)); - for (int n = 1; 1; ++n) - { - const double coef = expa2n2[n - 1] * expx2 / (a2 * (n * n) + y * y); - prod2ax *= exp2ax; - prodm2ax *= expm2ax; - sum1 += coef; - sum2 += coef * prodm2ax; - sum3 += coef * prod2ax; - - // really = sum5 - sum4 - sum5 += coef * (2 * a) * n * std::sinh((2 * a) * n * x); - - // test convergence via sum3 - if (coef * prod2ax < relerr * sum3) - break; - } - } - else - { // x > 5e-4, compute sum4 and sum5 separately - expx2 = std::exp(-x * x); - const double exp2ax = std::exp((2 * a) * x), expm2ax = 1 / exp2ax; - for (int n = 1; 1; ++n) - { - const double coef = expa2n2[n - 1] * expx2 / (a2 * (n * n) + y * y); - prod2ax *= exp2ax; - prodm2ax *= expm2ax; - sum1 += coef; - sum2 += coef * prodm2ax; - sum4 += (coef * prodm2ax) * (a * n); - sum3 += coef * prod2ax; - sum5 += (coef * prod2ax) * (a * n); - // test convergence via sum5, since this sum has the slowest decay - if ((coef * prod2ax) * (a * n) < relerr * sum5) - break; - } - } - } - else - { // relerr != DBL_EPSILON, compute exp(-a2*(n*n)) on the fly - const double exp2ax = std::exp((2 * a) * x), expm2ax = 1 / exp2ax; - if (x < 5e-4) - { // compute sum4 and sum5 together as sum5-sum4 - const double x2 = x * x; - expx2 = 1 - x2 * (1 - 0.5 * x2); // exp(-x*x) via Taylor - for (int n = 1; 1; ++n) - { - const double coef = exp(-a2 * (n * n)) * expx2 / (a2 * (n * n) + y * y); - prod2ax *= exp2ax; - prodm2ax *= expm2ax; - sum1 += coef; - sum2 += coef * prodm2ax; - sum3 += coef * prod2ax; - - // really = sum5 - sum4 - sum5 += coef * (2 * a) * n * std::sinh((2 * a) * n * x); - - // test convergence via sum3 - if (coef * prod2ax < relerr * sum3) - break; - } - } - else - { // x > 5e-4, compute sum4 and sum5 separately - expx2 = std::exp(-x * x); - for (int n = 1; 1; ++n) - { - const double coef = std::exp(-a2 * (n * n)) * expx2 / (a2 * (n * n) + y * y); - prod2ax *= exp2ax; - prodm2ax *= expm2ax; - sum1 += coef; - sum2 += coef * prodm2ax; - sum4 += (coef * prodm2ax) * (a * n); - sum3 += coef * prod2ax; - sum5 += (coef * prod2ax) * (a * n); - // test convergence via sum5, since this sum has the slowest decay - if ((coef * prod2ax) * (a * n) < relerr * sum5) - break; - } - } - } - const double expx2erfcxy = // avoid spurious overflow for large negative y - y > -6 // for y < -6, erfcx(y) = 2*exp(y*y) to double precision - ? expx2 * erfcx(y) - : 2 * std::exp(y * y - x * x); - if (y > 5) - { // imaginary terms cancel - const double sinxy = std::sin(x * y); - ret = (expx2erfcxy - c * y * sum1) * cos(2 * x * y) + (c * x * expx2) * sinxy * sinc(x * y, sinxy); - } - else - { - double xs = std::real(z); - const double sinxy = std::sin(xs * y); - const double sin2xy = std::sin(2 * xs * y), cos2xy = std::cos(2 * xs * y); - const double coef1 = expx2erfcxy - c * y * sum1; - const double coef2 = c * xs * expx2; - ret = std::complex(coef1 * cos2xy + coef2 * sinxy * sinc(xs * y, sinxy), - coef2 * sinc(2 * xs * y, sin2xy) - coef1 * sin2xy); - } - } - else - { // x large: only sum3 & sum5 contribute (see above note) - if (std::isnan(x)) - return std::complex(x, x); - if (std::isnan(y)) - return std::complex(y, y); - - ret = std::exp(-x * x); // |y| < 1e-10, so we only need exp(-x*x) term - // (round instead of ceil as in original paper; note that x/a > 1 here) - double n0 = std::floor(x / a + 0.5); // sum in both directions, starting at n0 - double dx = a * n0 - x; - sum3 = std::exp(-dx * dx) / (a2 * (n0 * n0) + y * y); - sum5 = a * n0 * sum3; - double exp1 = std::exp(4 * a * dx), exp1dn = 1; - int dn; - for (dn = 1; n0 - dn > 0; ++dn) - { // loop over n0-dn and n0+dn terms - double np = n0 + dn, nm = n0 - dn; - double tp = exp(-(a * dn + dx) * (a * dn + dx)); - double tm = tp * (exp1dn *= exp1); // trick to get tm from tp - tp /= (a2 * (np * np) + y * y); - tm /= (a2 * (nm * nm) + y * y); - sum3 += tp + tm; - sum5 += a * (np * tp + nm * tm); - if (a * (np * tp + nm * tm) < relerr * sum5) - return ret - + std::complex((0.5 * c) * y * (sum2 + sum3), - (0.5 * c) * copysign(sum5 - sum4, std::real(z))); - ; - } - while (1) - { // loop over n0+dn terms only (since n0-dn <= 0) - double np = n0 + dn++; - double tp = std::exp(-(a * dn + dx) * (a * dn + dx)) / (a2 * (np * np) + y * y); - sum3 += tp; - sum5 += a * np * tp; - if (a * np * tp < relerr * sum5) - return ret - + std::complex((0.5 * c) * y * (sum2 + sum3), - (0.5 * c) * copysign(sum5 - sum4, std::real(z))); - ; - } - } - return ret + std::complex((0.5 * c) * y * (sum2 + sum3), (0.5 * c) * copysign(sum5 - sum4, std::real(z))); - ; -} - -double ErrorFunc::scaled_w_im(double x) -{ - if (x >= 0) - { - if (x > 45) - { // continued-fraction expansion is faster - const double ispi = 0.56418958354775628694807945156; // 1 / sqrt(pi) - if (x > 5e7) // 1-term expansion, important to avoid overflow - return ispi / x; - /* 5-term expansion (rely on compiler for CSE), simplified from: - ispi / (x-0.5/(x-1/(x-1.5/(x-2/x)))) */ - return ispi * ((x * x) * (x * x - 4.5) + 2) / (x * ((x * x) * (x * x - 5) + 3.75)); - } - return w_im_y100(100 / (1 + x), x); - } - else - { // = -FADDEEVA(w_im)(-x) - if (x < -45) - { // continued-fraction expansion is faster - const double ispi = 0.56418958354775628694807945156; // 1 / sqrt(pi) - if (x < -5e7) // 1-term expansion, important to avoid overflow - return ispi / x; - /* 5-term expansion (rely on compiler for CSE), simplified from: - ispi / (x-0.5/(x-1/(x-1.5/(x-2/x)))) */ - return ispi * ((x * x) * (x * x - 4.5) + 2) / (x * ((x * x) * (x * x - 5) + 3.75)); - } - return -w_im_y100(100 / (1 - x), -x); - } -} - -std::complex ErrorFunc::erf(std::complex z, double relerr) -{ - double x = std::real(z), y = std::imag(z); - - if (y == 0) - return std::complex(std::erf(x), - y); // preserve sign of 0 - if (x == 0) // handle separately for speed & handling of y = Inf or NaN - return std::complex(x, // preserve sign of 0 - y * y > 720 ? (y > 0 ? Inf : -Inf) : std::exp(y * y) * scaled_w_im(y)); - - double mRe_z2 = (y - x) * (x + y); // Re(-z^2), being careful of overflow - double mIm_z2 = -2 * x * y; // Im(-z^2) - if (mRe_z2 < -750) // underflow - return (x >= 0 ? 1.0 : -1.0); - - // Use Taylor series for small |z|, to avoid cancellation inaccuracy - // erf(z) = 2/sqrt(pi) * z * (1 - z^2/3 + z^4/10 - z^6/42 + z^8/216 + ...) - auto taylor = [&]() -> std::complex { - std::complex mz2 = std::complex(mRe_z2, mIm_z2); // -z^2 - return z - * (1.1283791670955125739 - + mz2 - * (0.37612638903183752464 - + mz2 - * (0.11283791670955125739 - + mz2 * (0.026866170645131251760 + mz2 * 0.0052239776254421878422)))); - }; - - /* for small |x| and small |xy|, - use Taylor series to avoid cancellation inaccuracy: - erf(x+iy) = erf(iy) - + 2*exp(y^2)/sqrt(pi) * - [ x * (1 - x^2 * (1+2y^2)/3 + x^4 * (3+12y^2+4y^4)/30 + ... - - i * x^2 * y * (1 - x^2 * (3+2y^2)/6 + ...) ] - where: - erf(iy) = exp(y^2) * Im[w(y)] - */ - auto taylor_erfi = [&]() -> std::complex { - double x2 = x * x, y2 = y * y; - double expy2 = std::exp(y2); - return std::complex( - expy2 * x - * (1.1283791670955125739 - x2 * (0.37612638903183752464 + 0.75225277806367504925 * y2) - + x2 * x2 * (0.11283791670955125739 + y2 * (0.45135166683820502956 + 0.15045055561273500986 * y2))), - expy2 - * (scaled_w_im(y) - - x2 * y * (1.1283791670955125739 - x2 * (0.56418958354775628695 + 0.37612638903183752464 * y2)))); - }; - - /* Handle positive and negative x via different formulas, - using the mirror symmetries of w, to avoid overflow/underflow - problems from multiplying exponentially large and small quantities. */ - if (x >= 0) - { - if (x < 8e-2) - { - if (std::fabs(y) < 1e-2) - return taylor(); - else if (std::fabs(mIm_z2) < 5e-3 && x < 5e-3) - return taylor_erfi(); - } - /* don't use complex exp function, since that will produce spurious NaN - values when multiplying w in an overflow situation. */ - return 1.0 - - std::exp(mRe_z2) - * (std::complex(std::cos(mIm_z2), std::sin(mIm_z2)) - * scaled_w(std::complex(-y, x), relerr)); - } - else - { // x < 0 - if (x > -8e-2) - { // duplicate from above to avoid fabs(x) call - if (std::fabs(y) < 1e-2) - return taylor(); - else if (std::fabs(mIm_z2) < 5e-3 && x > -5e-3) - return taylor_erfi(); - } - else if (std::isnan(x)) - return std::complex(NaN, y == 0 ? 0 : NaN); - /* don't use complex exp function, since that will produce spurious NaN - values when multiplying w in an overflow situation. */ - return std::exp(mRe_z2) - * (std::complex(std::cos(mIm_z2), std::sin(mIm_z2)) - * scaled_w(std::complex(y, -x), relerr)) - - 1.0; - } -} - -// erfi(x) = -i erf(ix) -double ErrorFunc::erfi(double x) -{ - return x * x > 720 ? (x > 0 ? Inf : -Inf) : std::exp(x * x) * scaled_w_im(x); -} - -// erfi(z) = -i erf(iz) -std::complex ErrorFunc::erfi(std::complex z, double relerr) -{ - std::complex e = erf(std::complex(-std::imag(z), std::real(z)), relerr); - return std::complex(std::imag(e), -std::real(e)); -} - -double ErrorFunc::erfcx(double x) // exp(z^2) erfc(z) -{ - return std::exp(x * x) * std::erfc(x); -} - -std::complex ErrorFunc::erfcx(std::complex z, double relerr) // exp(z^2) erfc(z) -{ - return scaled_w(std::complex(-std::imag(z), std::real(z)), relerr); -} - -// erfc(z) = 1 - erf(z) -std::complex ErrorFunc::erfc(std::complex z, double relerr) -{ - double x = std::real(z), y = std::imag(z); - - if (x == 0.) - return std::complex(1, - /* handle y -> Inf limit manually, since - exp(y^2) -> Inf but Im[w(y)] -> 0, so - IEEE will give us a NaN when it should be Inf */ - y * y > 720 ? (y > 0 ? -Inf : Inf) : -std::exp(y * y) * scaled_w_im(y)); - if (y == 0.) - { - if (x * x > 750) // underflow - return std::complex(x >= 0 ? 0.0 : 2.0, - -y); // preserve sign of 0 - return std::complex(x >= 0 ? std::exp(-x * x) * erfcx(x) : 2. - std::exp(-x * x) * erfcx(-x), - -y); // preserve sign of zero - } - - double mRe_z2 = (y - x) * (x + y); // Re(-z^2), being careful of overflow - double mIm_z2 = -2 * x * y; // Im(-z^2) - if (mRe_z2 < -750) // underflow - return (x >= 0 ? 0.0 : 2.0); - - if (x >= 0) - return std::exp(std::complex(mRe_z2, mIm_z2)) * scaled_w(std::complex(-y, x), relerr); - else - return 2.0 - std::exp(std::complex(mRe_z2, mIm_z2)) * scaled_w(std::complex(y, -x), relerr); -} - -double ErrorFunc::w_im_y100(double y100, double x) -{ - switch ((int)y100) - { - case 0: { - double t = 2 * y100 - 1; - return 0.28351593328822191546e-2 - + (0.28494783221378400759e-2 - + (0.14427470563276734183e-4 - + (0.10939723080231588129e-6 - + (0.92474307943275042045e-9 - + (0.89128907666450075245e-11 + 0.92974121935111111110e-13 * t) * t) - * t) - * t) - * t) - * t; - } - case 1: { - double t = 2 * y100 - 3; - return 0.85927161243940350562e-2 - + (0.29085312941641339862e-2 - + (0.15106783707725582090e-4 - + (0.11716709978531327367e-6 - + (0.10197387816021040024e-8 - + (0.10122678863073360769e-10 + 0.10917479678400000000e-12 * t) * t) - * t) - * t) - * t) - * t; - } - case 2: { - double t = 2 * y100 - 5; - return 0.14471159831187703054e-1 - + (0.29703978970263836210e-2 - + (0.15835096760173030976e-4 - + (0.12574803383199211596e-6 - + (0.11278672159518415848e-8 - + (0.11547462300333495797e-10 + 0.12894535335111111111e-12 * t) * t) - * t) - * t) - * t) - * t; - } - case 3: { - double t = 2 * y100 - 7; - return 0.20476320420324610618e-1 - + (0.30352843012898665856e-2 - + (0.16617609387003727409e-4 - + (0.13525429711163116103e-6 - + (0.12515095552507169013e-8 - + (0.13235687543603382345e-10 + 0.15326595042666666667e-12 * t) * t) - * t) - * t) - * t) - * t; - } - case 4: { - double t = 2 * y100 - 9; - return 0.26614461952489004566e-1 - + (0.31034189276234947088e-2 - + (0.17460268109986214274e-4 - + (0.14582130824485709573e-6 - + (0.13935959083809746345e-8 - + (0.15249438072998932900e-10 + 0.18344741882133333333e-12 * t) * t) - * t) - * t) - * t) - * t; - } - case 5: { - double t = 2 * y100 - 11; - return 0.32892330248093586215e-1 - + (0.31750557067975068584e-2 - + (0.18369907582308672632e-4 - + (0.15761063702089457882e-6 - + (0.15577638230480894382e-8 - + (0.17663868462699097951e-10 - + (0.22126732680711111111e-12 + 0.30273474177737853668e-14 * t) * t) - * t) - * t) - * t) - * t) - * t; - } - case 6: { - double t = 2 * y100 - 13; - return 0.39317207681134336024e-1 - + (0.32504779701937539333e-2 - + (0.19354426046513400534e-4 - + (0.17081646971321290539e-6 - + (0.17485733959327106250e-8 - + (0.20593687304921961410e-10 - + (0.26917401949155555556e-12 + 0.38562123837725712270e-14 * t) * t) - * t) - * t) - * t) - * t) - * t; - } - case 7: { - double t = 2 * y100 - 15; - return 0.45896976511367738235e-1 - + (0.33300031273110976165e-2 - + (0.20423005398039037313e-4 - + (0.18567412470376467303e-6 - + (0.19718038363586588213e-8 - + (0.24175006536781219807e-10 - + (0.33059982791466666666e-12 + 0.49756574284439426165e-14 * t) * t) - * t) - * t) - * t) - * t) - * t; - } - case 8: { - double t = 2 * y100 - 17; - return 0.52640192524848962855e-1 - + (0.34139883358846720806e-2 - + (0.21586390240603337337e-4 - + (0.20247136501568904646e-6 - + (0.22348696948197102935e-8 - + (0.28597516301950162548e-10 - + (0.41045502119111111110e-12 + 0.65151614515238361946e-14 * t) * t) - * t) - * t) - * t) - * t) - * t; - } - case 9: { - double t = 2 * y100 - 19; - return 0.59556171228656770456e-1 - + (0.35028374386648914444e-2 - + (0.22857246150998562824e-4 - + (0.22156372146525190679e-6 - + (0.25474171590893813583e-8 - + (0.34122390890697400584e-10 - + (0.51593189879111111110e-12 + 0.86775076853908006938e-14 * t) * t) - * t) - * t) - * t) - * t) - * t; - } - case 10: { - double t = 2 * y100 - 21; - return 0.66655089485108212551e-1 - + (0.35970095381271285568e-2 - + (0.24250626164318672928e-4 - + (0.24339561521785040536e-6 - + (0.29221990406518411415e-8 - + (0.41117013527967776467e-10 - + (0.65786450716444444445e-12 + 0.11791885745450623331e-13 * t) * t) - * t) - * t) - * t) - * t) - * t; - } - case 11: { - double t = 2 * y100 - 23; - return 0.73948106345519174661e-1 - + (0.36970297216569341748e-2 - + (0.25784588137312868792e-4 - + (0.26853012002366752770e-6 - + (0.33763958861206729592e-8 - + (0.50111549981376976397e-10 - + (0.85313857496888888890e-12 + 0.16417079927706899860e-13 * t) * t) - * t) - * t) - * t) - * t) - * t; - } - case 12: { - double t = 2 * y100 - 25; - return 0.81447508065002963203e-1 - + (0.38035026606492705117e-2 - + (0.27481027572231851896e-4 - + (0.29769200731832331364e-6 - + (0.39336816287457655076e-8 - + (0.61895471132038157624e-10 - + (0.11292303213511111111e-11 + 0.23558532213703884304e-13 * t) * t) - * t) - * t) - * t) - * t) - * t; - } - case 13: { - double t = 2 * y100 - 27; - return 0.89166884027582716628e-1 - + (0.39171301322438946014e-2 - + (0.29366827260422311668e-4 - + (0.33183204390350724895e-6 - + (0.46276006281647330524e-8 - + (0.77692631378169813324e-10 - + (0.15335153258844444444e-11 + 0.35183103415916026911e-13 * t) * t) - * t) - * t) - * t) - * t) - * t; - } - case 14: { - double t = 2 * y100 - 29; - return 0.97121342888032322019e-1 - + (0.40387340353207909514e-2 - + (0.31475490395950776930e-4 - + (0.37222714227125135042e-6 - + (0.55074373178613809996e-8 - + (0.99509175283990337944e-10 - + (0.21552645758222222222e-11 + 0.55728651431872687605e-13 * t) * t) - * t) - * t) - * t) - * t) - * t; - } - case 15: { - double t = 2 * y100 - 31; - return 0.10532778218603311137e0 - + (0.41692873614065380607e-2 - + (0.33849549774889456984e-4 - + (0.42064596193692630143e-6 - + (0.66494579697622432987e-8 - + (0.13094103581931802337e-9 - + (0.31896187409777777778e-11 + 0.97271974184476560742e-13 * t) * t) - * t) - * t) - * t) - * t) - * t; - } - case 16: { - double t = 2 * y100 - 33; - return 0.11380523107427108222e0 - + (0.43099572287871821013e-2 - + (0.36544324341565929930e-4 - + (0.47965044028581857764e-6 - + (0.81819034238463698796e-8 - + (0.17934133239549647357e-9 - + (0.50956666166186293627e-11 - + (0.18850487318190638010e-12 + 0.79697813173519853340e-14 * t) * t) - * t) - * t) - * t) - * t) - * t) - * t; - } - case 17: { - double t = 2 * y100 - 35; - return 0.12257529703447467345e0 - + (0.44621675710026986366e-2 - + (0.39634304721292440285e-4 - + (0.55321553769873381819e-6 - + (0.10343619428848520870e-7 - + (0.26033830170470368088e-9 - + (0.87743837749108025357e-11 - + (0.34427092430230063401e-12 + 0.10205506615709843189e-13 * t) * t) - * t) - * t) - * t) - * t) - * t) - * t; - } - case 18: { - double t = 2 * y100 - 37; - return 0.13166276955656699478e0 - + (0.46276970481783001803e-2 - + (0.43225026380496399310e-4 - + (0.64799164020016902656e-6 - + (0.13580082794704641782e-7 - + (0.39839800853954313927e-9 - + (0.14431142411840000000e-10 + 0.42193457308830027541e-12 * t) * t) - * t) - * t) - * t) - * t) - * t; - } - case 19: { - double t = 2 * y100 - 39; - return 0.14109647869803356475e0 - + (0.48088424418545347758e-2 - + (0.47474504753352150205e-4 - + (0.77509866468724360352e-6 - + (0.18536851570794291724e-7 - + (0.60146623257887570439e-9 - + (0.18533978397305276318e-10 - + (0.41033845938901048380e-13 - 0.46160680279304825485e-13 * t) * t) - * t) - * t) - * t) - * t) - * t) - * t; - } - case 20: { - double t = 2 * y100 - 41; - return 0.15091057940548936603e0 - + (0.50086864672004685703e-2 - + (0.52622482832192230762e-4 - + (0.95034664722040355212e-6 - + (0.25614261331144718769e-7 - + (0.80183196716888606252e-9 - + (0.12282524750534352272e-10 - + (-0.10531774117332273617e-11 - 0.86157181395039646412e-13 * t) * t) - * t) - * t) - * t) - * t) - * t) - * t; - } - case 21: { - double t = 2 * y100 - 43; - return 0.16114648116017010770e0 - + (0.52314661581655369795e-2 - + (0.59005534545908331315e-4 - + (0.11885518333915387760e-5 - + (0.33975801443239949256e-7 - + (0.82111547144080388610e-9 - + (-0.12357674017312854138e-10 - + (-0.24355112256914479176e-11 - 0.75155506863572930844e-13 * t) * t) - * t) - * t) - * t) - * t) - * t) - * t; - } - case 22: { - double t = 2 * y100 - 45; - return 0.17185551279680451144e0 - + (0.54829002967599420860e-2 - + (0.67013226658738082118e-4 - + (0.14897400671425088807e-5 - + (0.40690283917126153701e-7 - + (0.44060872913473778318e-9 - + (-0.52641873433280000000e-10 - 0.30940587864543343124e-11 * t) * t) - * t) - * t) - * t) - * t) - * t; - } - case 23: { - double t = 2 * y100 - 47; - return 0.18310194559815257381e0 - + (0.57701559375966953174e-2 - + (0.76948789401735193483e-4 - + (0.18227569842290822512e-5 - + (0.41092208344387212276e-7 - + (-0.44009499965694442143e-9 - + (-0.92195414685628803451e-10 - + (-0.22657389705721753299e-11 + 0.10004784908106839254e-12 * t) * t) - * t) - * t) - * t) - * t) - * t) - * t; - } - case 24: { - double t = 2 * y100 - 49; - return 0.19496527191546630345e0 - + (0.61010853144364724856e-2 - + (0.88812881056342004864e-4 - + (0.21180686746360261031e-5 - + (0.30652145555130049203e-7 - + (-0.16841328574105890409e-8 - + (-0.11008129460612823934e-9 - + (-0.12180794204544515779e-12 + 0.15703325634590334097e-12 * t) * t) - * t) - * t) - * t) - * t) - * t) - * t; - } - case 25: { - double t = 2 * y100 - 51; - return 0.20754006813966575720e0 - + (0.64825787724922073908e-2 - + (0.10209599627522311893e-3 - + (0.22785233392557600468e-5 - + (0.73495224449907568402e-8 - + (-0.29442705974150112783e-8 - + (-0.94082603434315016546e-10 - + (0.23609990400179321267e-11 + 0.14141908654269023788e-12 * t) * t) - * t) - * t) - * t) - * t) - * t) - * t; - } - case 26: { - double t = 2 * y100 - 53; - return 0.22093185554845172146e0 - + (0.69182878150187964499e-2 - + (0.11568723331156335712e-3 - + (0.22060577946323627739e-5 - + (-0.26929730679360840096e-7 - + (-0.38176506152362058013e-8 - + (-0.47399503861054459243e-10 - + (0.40953700187172127264e-11 + 0.69157730376118511127e-13 * t) * t) - * t) - * t) - * t) - * t) - * t) - * t; - } - case 27: { - double t = 2 * y100 - 55; - return 0.23524827304057813918e0 - + (0.74063350762008734520e-2 - + (0.12796333874615790348e-3 - + (0.18327267316171054273e-5 - + (-0.66742910737957100098e-7 - + (-0.40204740975496797870e-8 - + (0.14515984139495745330e-10 - + (0.44921608954536047975e-11 - 0.18583341338983776219e-13 * t) * t) - * t) - * t) - * t) - * t) - * t) - * t; - } - case 28: { - double t = 2 * y100 - 57; - return 0.25058626331812744775e0 - + (0.79377285151602061328e-2 - + (0.13704268650417478346e-3 - + (0.11427511739544695861e-5 - + (-0.10485442447768377485e-6 - + (-0.34850364756499369763e-8 - + (0.72656453829502179208e-10 - + (0.36195460197779299406e-11 - 0.84882136022200714710e-13 * t) * t) - * t) - * t) - * t) - * t) - * t) - * t; - } - case 29: { - double t = 2 * y100 - 59; - return 0.26701724900280689785e0 - + (0.84959936119625864274e-2 - + (0.14112359443938883232e-3 - + (0.17800427288596909634e-6 - + (-0.13443492107643109071e-6 - + (-0.23512456315677680293e-8 - + (0.11245846264695936769e-9 - + (0.19850501334649565404e-11 - 0.11284666134635050832e-12 * t) * t) - * t) - * t) - * t) - * t) - * t) - * t; - } - case 30: { - double t = 2 * y100 - 61; - return 0.28457293586253654144e0 - + (0.90581563892650431899e-2 - + (0.13880520331140646738e-3 - + (-0.97262302362522896157e-6 - + (-0.15077100040254187366e-6 - + (-0.88574317464577116689e-9 - + (0.12760311125637474581e-9 - + (0.20155151018282695055e-12 - 0.10514169375181734921e-12 * t) * t) - * t) - * t) - * t) - * t) - * t) - * t; - } - case 31: { - double t = 2 * y100 - 63; - return 0.30323425595617385705e0 - + (0.95968346790597422934e-2 - + (0.12931067776725883939e-3 - + (-0.21938741702795543986e-5 - + (-0.15202888584907373963e-6 - + (0.61788350541116331411e-9 - + (0.11957835742791248256e-9 - + (-0.12598179834007710908e-11 - 0.75151817129574614194e-13 * t) * t) - * t) - * t) - * t) - * t) - * t) - * t; - } - case 32: { - double t = 2 * y100 - 65; - return 0.32292521181517384379e0 - + (0.10082957727001199408e-1 - + (0.11257589426154962226e-3 - + (-0.33670890319327881129e-5 - + (-0.13910529040004008158e-6 - + (0.19170714373047512945e-8 - + (0.94840222377720494290e-10 - + (-0.21650018351795353201e-11 - 0.37875211678024922689e-13 * t) * t) - * t) - * t) - * t) - * t) - * t) - * t; - } - case 33: { - double t = 2 * y100 - 67; - return 0.34351233557911753862e0 - + (0.10488575435572745309e-1 - + (0.89209444197248726614e-4 - + (-0.43893459576483345364e-5 - + (-0.11488595830450424419e-6 - + (0.28599494117122464806e-8 - + (0.61537542799857777779e-10 - 0.24935749227658002212e-11 * t) * t) - * t) - * t) - * t) - * t) - * t; - } - case 34: { - double t = 2 * y100 - 69; - return 0.36480946642143669093e0 - + (0.10789304203431861366e-1 - + (0.60357993745283076834e-4 - + (-0.51855862174130669389e-5 - + (-0.83291664087289801313e-7 - + (0.33898011178582671546e-8 - + (0.27082948188277716482e-10 - + (-0.23603379397408694974e-11 + 0.19328087692252869842e-13 * t) * t) - * t) - * t) - * t) - * t) - * t) - * t; - } - case 35: { - double t = 2 * y100 - 71; - return 0.38658679935694939199e0 - + (0.10966119158288804999e-1 - + (0.27521612041849561426e-4 - + (-0.57132774537670953638e-5 - + (-0.48404772799207914899e-7 - + (0.35268354132474570493e-8 - + (-0.32383477652514618094e-11 - + (-0.19334202915190442501e-11 + 0.32333189861286460270e-13 * t) * t) - * t) - * t) - * t) - * t) - * t) - * t; - } - case 36: { - double t = 2 * y100 - 73; - return 0.40858275583808707870e0 - + (0.11006378016848466550e-1 - + (-0.76396376685213286033e-5 - + (-0.59609835484245791439e-5 - + (-0.13834610033859313213e-7 - + (0.33406952974861448790e-8 - + (-0.26474915974296612559e-10 - + (-0.13750229270354351983e-11 + 0.36169366979417390637e-13 * t) * t) - * t) - * t) - * t) - * t) - * t) - * t; - } - case 37: { - double t = 2 * y100 - 75; - return 0.43051714914006682977e0 - + (0.10904106549500816155e-1 - + (-0.43477527256787216909e-4 - + (-0.59429739547798343948e-5 - + (0.17639200194091885949e-7 - + (0.29235991689639918688e-8 - + (-0.41718791216277812879e-10 - + (-0.81023337739508049606e-12 + 0.33618915934461994428e-13 * t) * t) - * t) - * t) - * t) - * t) - * t) - * t; - } - case 38: { - double t = 2 * y100 - 77; - return 0.45210428135559607406e0 - + (0.10659670756384400554e-1 - + (-0.78488639913256978087e-4 - + (-0.56919860886214735936e-5 - + (0.44181850467477733407e-7 - + (0.23694306174312688151e-8 - + (-0.49492621596685443247e-10 - + (-0.31827275712126287222e-12 + 0.27494438742721623654e-13 * t) * t) - * t) - * t) - * t) - * t) - * t) - * t; - } - case 39: { - double t = 2 * y100 - 79; - return 0.47306491195005224077e0 - + (0.10279006119745977570e-1 - + (-0.11140268171830478306e-3 - + (-0.52518035247451432069e-5 - + (0.64846898158889479518e-7 - + (0.17603624837787337662e-8 - + (-0.51129481592926104316e-10 - + (0.62674584974141049511e-13 + 0.20055478560829935356e-13 * t) * t) - * t) - * t) - * t) - * t) - * t) - * t; - } - case 40: { - double t = 2 * y100 - 81; - return 0.49313638965719857647e0 - + (0.97725799114772017662e-2 - + (-0.14122854267291533334e-3 - + (-0.46707252568834951907e-5 - + (0.79421347979319449524e-7 - + (0.11603027184324708643e-8 - + (-0.48269605844397175946e-10 - + (0.32477251431748571219e-12 + 0.12831052634143527985e-13 * t) * t) - * t) - * t) - * t) - * t) - * t) - * t; - } - case 41: { - double t = 2 * y100 - 83; - return 0.51208057433416004042e0 - + (0.91542422354009224951e-2 - + (-0.16726530230228647275e-3 - + (-0.39964621752527649409e-5 - + (0.88232252903213171454e-7 - + (0.61343113364949928501e-9 - + (-0.42516755603130443051e-10 - + (0.47910437172240209262e-12 + 0.66784341874437478953e-14 * t) * t) - * t) - * t) - * t) - * t) - * t) - * t; - } - case 42: { - double t = 2 * y100 - 85; - return 0.52968945458607484524e0 - + (0.84400880445116786088e-2 - + (-0.18908729783854258774e-3 - + (-0.32725905467782951931e-5 - + (0.91956190588652090659e-7 - + (0.14593989152420122909e-9 - + (-0.35239490687644444445e-10 + 0.54613829888448694898e-12 * t) * t) - * t) - * t) - * t) - * t) - * t; - } - case 43: { - double t = 2 * y100 - 87; - return 0.54578857454330070965e0 - + (0.76474155195880295311e-2 - + (-0.20651230590808213884e-3 - + (-0.25364339140543131706e-5 - + (0.91455367999510681979e-7 - + (-0.23061359005297528898e-9 - + (-0.27512928625244444444e-10 + 0.54895806008493285579e-12 * t) * t) - * t) - * t) - * t) - * t) - * t; - } - case 44: { - double t = 2 * y100 - 89; - return 0.56023851910298493910e0 - + (0.67938321739997196804e-2 - + (-0.21956066613331411760e-3 - + (-0.18181127670443266395e-5 - + (0.87650335075416845987e-7 - + (-0.51548062050366615977e-9 - + (-0.20068462174044444444e-10 + 0.50912654909758187264e-12 * t) * t) - * t) - * t) - * t) - * t) - * t; - } - case 45: { - double t = 2 * y100 - 91; - return 0.57293478057455721150e0 - + (0.58965321010394044087e-2 - + (-0.22841145229276575597e-3 - + (-0.11404605562013443659e-5 - + (0.81430290992322326296e-7 - + (-0.71512447242755357629e-9 - + (-0.13372664928000000000e-10 + 0.44461498336689298148e-12 * t) * t) - * t) - * t) - * t) - * t) - * t; - } - case 46: { - double t = 2 * y100 - 93; - return 0.58380635448407827360e0 - + (0.49717469530842831182e-2 - + (-0.23336001540009645365e-3 - + (-0.51952064448608850822e-6 - + (0.73596577815411080511e-7 - + (-0.84020916763091566035e-9 - + (-0.76700972702222222221e-11 + 0.36914462807972467044e-12 * t) * t) - * t) - * t) - * t) - * t) - * t; - } - case 47: { - double t = 2 * y100 - 95; - return 0.59281340237769489597e0 - + (0.40343592069379730568e-2 - + (-0.23477963738658326185e-3 - + (0.34615944987790224234e-7 - + (0.64832803248395814574e-7 - + (-0.90329163587627007971e-9 - + (-0.30421940400000000000e-11 + 0.29237386653743536669e-12 * t) * t) - * t) - * t) - * t) - * t) - * t; - } - case 48: { - double t = 2 * y100 - 97; - return 0.59994428743114271918e0 - + (0.30976579788271744329e-2 - + (-0.23308875765700082835e-3 - + (0.51681681023846925160e-6 - + (0.55694594264948268169e-7 - + (-0.91719117313243464652e-9 - + (0.53982743680000000000e-12 + 0.22050829296187771142e-12 * t) * t) - * t) - * t) - * t) - * t) - * t; - } - case 49: { - double t = 2 * y100 - 99; - return 0.60521224471819875444e0 - + (0.21732138012345456060e-2 - + (-0.22872428969625997456e-3 - + (0.92588959922653404233e-6 - + (0.46612665806531930684e-7 - + (-0.89393722514414153351e-9 - + (0.31718550353777777778e-11 + 0.15705458816080549117e-12 * t) * t) - * t) - * t) - * t) - * t) - * t; - } - case 50: { - double t = 2 * y100 - 101; - return 0.60865189969791123620e0 - + (0.12708480848877451719e-2 - + (-0.22212090111534847166e-3 - + (0.12636236031532793467e-5 - + (0.37904037100232937574e-7 - + (-0.84417089968101223519e-9 - + (0.49843180828444444445e-11 + 0.10355439441049048273e-12 * t) * t) - * t) - * t) - * t) - * t) - * t; - } - case 51: { - double t = 2 * y100 - 103; - return 0.61031580103499200191e0 - + (0.39867436055861038223e-3 - + (-0.21369573439579869291e-3 - + (0.15339402129026183670e-5 - + (0.29787479206646594442e-7 - + (-0.77687792914228632974e-9 - + (0.61192452741333333334e-11 + 0.60216691829459295780e-13 * t) * t) - * t) - * t) - * t) - * t) - * t; - } - case 52: { - double t = 2 * y100 - 105; - return 0.61027109047879835868e0 - + (-0.43680904508059878254e-3 - + (-0.20383783788303894442e-3 - + (0.17421743090883439959e-5 - + (0.22400425572175715576e-7 - + (-0.69934719320045128997e-9 - + (0.67152759655111111110e-11 + 0.26419960042578359995e-13 * t) * t) - * t) - * t) - * t) - * t) - * t; - } - case 53: { - double t = 2 * y100 - 107; - return 0.60859639489217430521e0 - + (-0.12305921390962936873e-2 - + (-0.19290150253894682629e-3 - + (0.18944904654478310128e-5 - + (0.15815530398618149110e-7 - + (-0.61726850580964876070e-9 + 0.68987888999111111110e-11 * t) * t) - * t) - * t) - * t) - * t; - } - case 54: { - double t = 2 * y100 - 109; - return 0.60537899426486075181e0 - + (-0.19790062241395705751e-2 - + (-0.18120271393047062253e-3 - + (0.19974264162313241405e-5 - + (0.10055795094298172492e-7 - + (-0.53491997919318263593e-9 - + (0.67794550295111111110e-11 - 0.17059208095741511603e-13 * t) * t) - * t) - * t) - * t) - * t) - * t; - } - case 55: { - double t = 2 * y100 - 111; - return 0.60071229457904110537e0 - + (-0.26795676776166354354e-2 - + (-0.16901799553627508781e-3 - + (0.20575498324332621581e-5 - + (0.51077165074461745053e-8 - + (-0.45536079828057221858e-9 - + (0.64488005516444444445e-11 - 0.29311677573152766338e-13 * t) * t) - * t) - * t) - * t) - * t) - * t; - } - case 56: { - double t = 2 * y100 - 113; - return 0.59469361520112714738e0 - + (-0.33308208190600993470e-2 - + (-0.15658501295912405679e-3 - + (0.20812116912895417272e-5 - + (0.93227468760614182021e-9 - + (-0.38066673740116080415e-9 - + (0.59806790359111111110e-11 - 0.36887077278950440597e-13 * t) * t) - * t) - * t) - * t) - * t) - * t; - } - case 57: { - double t = 2 * y100 - 115; - return 0.58742228631775388268e0 - + (-0.39321858196059227251e-2 - + (-0.14410441141450122535e-3 - + (0.20743790018404020716e-5 - + (-0.25261903811221913762e-8 - + (-0.31212416519526924318e-9 - + (0.54328422462222222221e-11 - 0.40864152484979815972e-13 * t) * t) - * t) - * t) - * t) - * t) - * t; - } - case 58: { - double t = 2 * y100 - 117; - return 0.57899804200033018447e0 - + (-0.44838157005618913447e-2 - + (-0.13174245966501437965e-3 - + (0.20425306888294362674e-5 - + (-0.53330296023875447782e-8 - + (-0.25041289435539821014e-9 - + (0.48490437205333333334e-11 - 0.42162206939169045177e-13 * t) * t) - * t) - * t) - * t) - * t) - * t; - } - case 59: { - double t = 2 * y100 - 119; - return 0.56951968796931245974e0 - + (-0.49864649488074868952e-2 - + (-0.11963416583477567125e-3 - + (0.19906021780991036425e-5 - + (-0.75580140299436494248e-8 - + (-0.19576060961919820491e-9 - + (0.42613011928888888890e-11 - 0.41539443304115604377e-13 * t) * t) - * t) - * t) - * t) - * t) - * t; - } - case 60: { - double t = 2 * y100 - 121; - return 0.55908401930063918964e0 - + (-0.54413711036826877753e-2 - + (-0.10788661102511914628e-3 - + (0.19229663322982839331e-5 - + (-0.92714731195118129616e-8 - + (-0.14807038677197394186e-9 - + (0.36920870298666666666e-11 - 0.39603726688419162617e-13 * t) * t) - * t) - * t) - * t) - * t) - * t; - } - case 61: { - double t = 2 * y100 - 123; - return 0.54778496152925675315e0 - + (-0.58501497933213396670e-2 - + (-0.96582314317855227421e-4 - + (0.18434405235069270228e-5 - + (-0.10541580254317078711e-7 - + (-0.10702303407788943498e-9 - + (0.31563175582222222222e-11 - 0.36829748079110481422e-13 * t) * t) - * t) - * t) - * t) - * t) - * t; - } - case 62: { - double t = 2 * y100 - 125; - return 0.53571290831682823999e0 - + (-0.62147030670760791791e-2 - + (-0.85782497917111760790e-4 - + (0.17553116363443470478e-5 - + (-0.11432547349815541084e-7 - + (-0.72157091369041330520e-10 - + (0.26630811607111111111e-11 - 0.33578660425893164084e-13 * t) * t) - * t) - * t) - * t) - * t) - * t; - } - case 63: { - double t = 2 * y100 - 127; - return 0.52295422962048434978e0 - + (-0.65371404367776320720e-2 - + (-0.75530164941473343780e-4 - + (0.16613725797181276790e-5 - + (-0.12003521296598910761e-7 - + (-0.42929753689181106171e-10 - + (0.22170894940444444444e-11 - 0.30117697501065110505e-13 * t) * t) - * t) - * t) - * t) - * t) - * t; - } - case 64: { - double t = 2 * y100 - 129; - return 0.50959092577577886140e0 - + (-0.68197117603118591766e-2 - + (-0.65852936198953623307e-4 - + (0.15639654113906716939e-5 - + (-0.12308007991056524902e-7 - + (-0.18761997536910939570e-10 - + (0.18198628922666666667e-11 - 0.26638355362285200932e-13 * t) * t) - * t) - * t) - * t) - * t) - * t; - } - case 65: { - double t = 2 * y100 - 131; - return 0.49570040481823167970e0 - + (-0.70647509397614398066e-2 - + (-0.56765617728962588218e-4 - + (0.14650274449141448497e-5 - + (-0.12393681471984051132e-7 - + (0.92904351801168955424e-12 - + (0.14706755960177777778e-11 - 0.23272455351266325318e-13 * t) * t) - * t) - * t) - * t) - * t) - * t; - } - case 66: { - double t = 2 * y100 - 133; - return 0.48135536250935238066e0 - + (-0.72746293327402359783e-2 - + (-0.48272489495730030780e-4 - + (0.13661377309113939689e-5 - + (-0.12302464447599382189e-7 - + (0.16707760028737074907e-10 - + (0.11672928324444444444e-11 - 0.20105801424709924499e-13 * t) * t) - * t) - * t) - * t) - * t) - * t; - } - case 67: { - double t = 2 * y100 - 135; - return 0.46662374675511439448e0 - + (-0.74517177649528487002e-2 - + (-0.40369318744279128718e-4 - + (0.12685621118898535407e-5 - + (-0.12070791463315156250e-7 - + (0.29105507892605823871e-10 - + (0.90653314645333333334e-12 - 0.17189503312102982646e-13 * t) * t) - * t) - * t) - * t) - * t) - * t; - } - case 68: { - double t = 2 * y100 - 137; - return 0.45156879030168268778e0 - + (-0.75983560650033817497e-2 - + (-0.33045110380705139759e-4 - + (0.11732956732035040896e-5 - + (-0.11729986947158201869e-7 - + (0.38611905704166441308e-10 - + (0.68468768305777777779e-12 - 0.14549134330396754575e-13 * t) * t) - * t) - * t) - * t) - * t) - * t; - } - case 69: { - double t = 2 * y100 - 139; - return 0.43624909769330896904e0 - + (-0.77168291040309554679e-2 - + (-0.26283612321339907756e-4 - + (0.10811018836893550820e-5 - + (-0.11306707563739851552e-7 - + (0.45670446788529607380e-10 - + (0.49782492549333333334e-12 - 0.12191983967561779442e-13 * t) * t) - * t) - * t) - * t) - * t) - * t; - } - case 70: { - double t = 2 * y100 - 141; - return 0.42071877443548481181e0 - + (-0.78093484015052730097e-2 - + (-0.20064596897224934705e-4 - + (0.99254806680671890766e-6 - + (-0.10823412088884741451e-7 - + (0.50677203326904716247e-10 - + (0.34200547594666666666e-12 - 0.10112698698356194618e-13 * t) * t) - * t) - * t) - * t) - * t) - * t; - } - case 71: { - double t = 2 * y100 - 143; - return 0.40502758809710844280e0 - + (-0.78780384460872937555e-2 - + (-0.14364940764532853112e-4 - + (0.90803709228265217384e-6 - + (-0.10298832847014466907e-7 - + (0.53981671221969478551e-10 - + (0.21342751381333333333e-12 - 0.82975901848387729274e-14 * t) * t) - * t) - * t) - * t) - * t) - * t; - } - case 72: { - double t = 2 * y100 - 145; - return 0.38922115269731446690e0 - + (-0.79249269708242064120e-2 - + (-0.91595258799106970453e-5 - + (0.82783535102217576495e-6 - + (-0.97484311059617744437e-8 - + (0.55889029041660225629e-10 - + (0.10851981336888888889e-12 - 0.67278553237853459757e-14 * t) * t) - * t) - * t) - * t) - * t) - * t; - } - case 73: { - double t = 2 * y100 - 147; - return 0.37334112915460307335e0 - + (-0.79519385109223148791e-2 - + (-0.44219833548840469752e-5 - + (0.75209719038240314732e-6 - + (-0.91848251458553190451e-8 - + (0.56663266668051433844e-10 - + (0.23995894257777777778e-13 - 0.53819475285389344313e-14 * t) * t) - * t) - * t) - * t) - * t) - * t; - } - case 74: { - double t = 2 * y100 - 149; - return 0.35742543583374223085e0 - + (-0.79608906571527956177e-2 - + (-0.12530071050975781198e-6 - + (0.68088605744900552505e-6 - + (-0.86181844090844164075e-8 - + (0.56530784203816176153e-10 - + (-0.43120012248888888890e-13 - 0.42372603392496813810e-14 * t) * t) - * t) - * t) - * t) - * t) - * t; - } - case 75: { - double t = 2 * y100 - 151; - return 0.34150846431979618536e0 - + (-0.79534924968773806029e-2 - + (0.37576885610891515813e-5 - + (0.61419263633090524326e-6 - + (-0.80565865409945960125e-8 - + (0.55684175248749269411e-10 - + (-0.95486860764444444445e-13 - 0.32712946432984510595e-14 * t) * t) - * t) - * t) - * t) - * t) - * t; - } - case 76: { - double t = 2 * y100 - 153; - return 0.32562129649136346824e0 - + (-0.79313448067948884309e-2 - + (0.72539159933545300034e-5 - + (0.55195028297415503083e-6 - + (-0.75063365335570475258e-8 - + (0.54281686749699595941e-10 - 0.13545424295111111111e-12 * t) * t) - * t) - * t) - * t) - * t; - } - case 77: { - double t = 2 * y100 - 155; - return 0.30979191977078391864e0 - + (-0.78959416264207333695e-2 - + (0.10389774377677210794e-4 - + (0.49404804463196316464e-6 - + (-0.69722488229411164685e-8 - + (0.52469254655951393842e-10 - 0.16507860650666666667e-12 * t) * t) - * t) - * t) - * t) - * t; - } - case 78: { - double t = 2 * y100 - 157; - return 0.29404543811214459904e0 - + (-0.78486728990364155356e-2 - + (0.13190885683106990459e-4 - + (0.44034158861387909694e-6 - + (-0.64578942561562616481e-8 - + (0.50354306498006928984e-10 - 0.18614473550222222222e-12 * t) * t) - * t) - * t) - * t) - * t; - } - case 79: { - double t = 2 * y100 - 159; - return 0.27840427686253660515e0 - + (-0.77908279176252742013e-2 - + (0.15681928798708548349e-4 - + (0.39066226205099807573e-6 - + (-0.59658144820660420814e-8 - + (0.48030086420373141763e-10 - 0.20018995173333333333e-12 * t) * t) - * t) - * t) - * t) - * t; - } - case 80: { - double t = 2 * y100 - 161; - return 0.26288838011163800908e0 - + (-0.77235993576119469018e-2 - + (0.17886516796198660969e-4 - + (0.34482457073472497720e-6 - + (-0.54977066551955420066e-8 - + (0.45572749379147269213e-10 - 0.20852924954666666667e-12 * t) * t) - * t) - * t) - * t) - * t; - } - case 81: { - double t = 2 * y100 - 163; - return 0.24751539954181029717e0 - + (-0.76480877165290370975e-2 - + (0.19827114835033977049e-4 - + (0.30263228619976332110e-6 - + (-0.50545814570120129947e-8 - + (0.43043879374212005966e-10 - 0.21228012028444444444e-12 * t) * t) - * t) - * t) - * t) - * t; - } - case 82: { - double t = 2 * y100 - 165; - return 0.23230087411688914593e0 - + (-0.75653060136384041587e-2 - + (0.21524991113020016415e-4 - + (0.26388338542539382413e-6 - + (-0.46368974069671446622e-8 - + (0.40492715758206515307e-10 - 0.21238627815111111111e-12 * t) * t) - * t) - * t) - * t) - * t; - } - case 83: { - double t = 2 * y100 - 167; - return 0.21725840021297341931e0 - + (-0.74761846305979730439e-2 - + (0.23000194404129495243e-4 - + (0.22837400135642906796e-6 - + (-0.42446743058417541277e-8 - + (0.37958104071765923728e-10 - 0.20963978568888888889e-12 * t) * t) - * t) - * t) - * t) - * t; - } - case 84: { - double t = 2 * y100 - 169; - return 0.20239979200788191491e0 - + (-0.73815761980493466516e-2 - + (0.24271552727631854013e-4 - + (0.19590154043390012843e-6 - + (-0.38775884642456551753e-8 - + (0.35470192372162901168e-10 - 0.20470131678222222222e-12 * t) * t) - * t) - * t) - * t) - * t; - } - case 85: { - double t = 2 * y100 - 171; - return 0.18773523211558098962e0 - + (-0.72822604530339834448e-2 - + (0.25356688567841293697e-4 - + (0.16626710297744290016e-6 - + (-0.35350521468015310830e-8 - + (0.33051896213898864306e-10 - 0.19811844544000000000e-12 * t) * t) - * t) - * t) - * t) - * t; - } - case 86: { - double t = 2 * y100 - 173; - return 0.17327341258479649442e0 - + (-0.71789490089142761950e-2 - + (0.26272046822383820476e-4 - + (0.13927732375657362345e-6 - + (-0.32162794266956859603e-8 - + (0.30720156036105652035e-10 - 0.19034196304000000000e-12 * t) * t) - * t) - * t) - * t) - * t; - } - case 87: { - double t = 2 * y100 - 175; - return 0.15902166648328672043e0 - + (-0.70722899934245504034e-2 - + (0.27032932310132226025e-4 - + (0.11474573347816568279e-6 - + (-0.29203404091754665063e-8 - + (0.28487010262547971859e-10 - 0.18174029063111111111e-12 * t) * t) - * t) - * t) - * t) - * t; - } - case 88: { - double t = 2 * y100 - 177; - return 0.14498609036610283865e0 - + (-0.69628725220045029273e-2 - + (0.27653554229160596221e-4 - + (0.92493727167393036470e-7 - + (-0.26462055548683583849e-8 - + (0.26360506250989943739e-10 - 0.17261211260444444444e-12 * t) * t) - * t) - * t) - * t) - * t; - } - case 89: { - double t = 2 * y100 - 179; - return 0.13117165798208050667e0 - + (-0.68512309830281084723e-2 - + (0.28147075431133863774e-4 - + (0.72351212437979583441e-7 - + (-0.23927816200314358570e-8 - + (0.24345469651209833155e-10 - 0.16319736960000000000e-12 * t) * t) - * t) - * t) - * t) - * t; - } - case 90: { - double t = 2 * y100 - 181; - return 0.11758232561160626306e0 - + (-0.67378491192463392927e-2 - + (0.28525664781722907847e-4 - + (0.54156999310046790024e-7 - + (-0.21589405340123827823e-8 - + (0.22444150951727334619e-10 - 0.15368675584000000000e-12 * t) * t) - * t) - * t) - * t) - * t; - } - case 91: { - double t = 2 * y100 - 183; - return 0.10422112945361673560e0 - + (-0.66231638959845581564e-2 - + (0.28800551216363918088e-4 - + (0.37758983397952149613e-7 - + (-0.19435423557038933431e-8 - + (0.20656766125421362458e-10 - 0.14422990012444444444e-12 * t) * t) - * t) - * t) - * t) - * t; - } - case 92: { - double t = 2 * y100 - 185; - return 0.91090275493541084785e-1 - + (-0.65075691516115160062e-2 - + (0.28982078385527224867e-4 - + (0.23014165807643012781e-7 - + (-0.17454532910249875958e-8 - + (0.18981946442680092373e-10 - 0.13494234691555555556e-12 * t) * t) - * t) - * t) - * t) - * t; - } - case 93: { - double t = 2 * y100 - 187; - return 0.78191222288771379358e-1 - + (-0.63914190297303976434e-2 - + (0.29079759021299682675e-4 - + (0.97885458059415717014e-8 - + (-0.15635596116134296819e-8 - + (0.17417110744051331974e-10 - 0.12591151763555555556e-12 * t) * t) - * t) - * t) - * t) - * t; - } - case 94: { - double t = 2 * y100 - 189; - return 0.65524757106147402224e-1 - + (-0.62750311956082444159e-2 - + (0.29102328354323449795e-4 - + (-0.20430838882727954582e-8 - + (-0.13967781903855367270e-8 - + (0.15958771833747057569e-10 - 0.11720175765333333333e-12 * t) * t) - * t) - * t) - * t) - * t; - } - case 95: { - double t = 2 * y100 - 191; - return 0.53091065838453612773e-1 - + (-0.61586898417077043662e-2 - + (0.29057796072960100710e-4 - + (-0.12597414620517987536e-7 - + (-0.12440642607426861943e-8 - + (0.14602787128447932137e-10 - 0.10885859114666666667e-12 * t) * t) - * t) - * t) - * t) - * t; - } - case 96: { - double t = 2 * y100 - 193; - return 0.40889797115352738582e-1 - + (-0.60426484889413678200e-2 - + (0.28953496450191694606e-4 - + (-0.21982952021823718400e-7 - + (-0.11044169117553026211e-8 - + (0.13344562332430552171e-10 - 0.10091231402844444444e-12 * t) * t) - * t) - * t) - * t) - * t; - } - case 97: - case 98: - case 99: - case 100: { // use Taylor expansion for small x (|x| <= 0.0309...) - // (2/sqrt(pi)) * (x - 2/3 x^3 + 4/15 x^5 - 8/105 x^7 + 16/945 x^9) - double x2 = x * x; - return x - * (1.1283791670955125739 - - x2 - * (0.75225277806367504925 - - x2 - * (0.30090111122547001970 - - x2 * (0.085971746064420005629 - x2 * 0.016931216931216931217)))); - } - } - /* Since 0 <= y100 < 101, this is only reached if x is NaN, - in which case we should return NaN. */ - return NaN; -} - -// precomputed table of expa2n2[n-1] = exp(-a2*n*n) -const std::vector ErrorFunc::expa2n2 = { - 7.64405281671221563e-01, - 3.41424527166548425e-01, - 8.91072646929412548e-02, - 1.35887299055460086e-02, - 1.21085455253437481e-03, - 6.30452613933449404e-05, - 1.91805156577114683e-06, - 3.40969447714832381e-08, - 3.54175089099469393e-10, - 2.14965079583260682e-12, - 7.62368911833724354e-15, - 1.57982797110681093e-17, - 1.91294189103582677e-20, - 1.35344656764205340e-23, - 5.59535712428588720e-27, - 1.35164257972401769e-30, - 1.90784582843501167e-34, - 1.57351920291442930e-38, - 7.58312432328032845e-43, - 2.13536275438697082e-47, - 3.51352063787195769e-52, - 3.37800830266396920e-57, - 1.89769439468301000e-62, - 6.22929926072668851e-68, - 1.19481172006938722e-73, - 1.33908181133005953e-79, - 8.76924303483223939e-86, - 3.35555576166254986e-92, - 7.50264110688173024e-99, - 9.80192200745410268e-106, - 7.48265412822268959e-113, - 3.33770122566809425e-120, - 8.69934598159861140e-128, - 1.32486951484088852e-135, - 1.17898144201315253e-143, - 6.13039120236180012e-152, - 1.86258785950822098e-160, - 3.30668408201432783e-169, - 3.43017280887946235e-178, - 2.07915397775808219e-187, - 7.36384545323984966e-197, - 1.52394760394085741e-206, - 1.84281935046532100e-216, - 1.30209553802992923e-226, - 5.37588903521080531e-237, - 1.29689584599763145e-247, - 1.82813078022866562e-258, - 1.50576355348684241e-269, - 7.24692320799294194e-281, - 2.03797051314726829e-292, - 3.34880215927873807e-304, - 0.0 // underflow (also prevents reads past array end, below) -}; - -} // namespace ModuleBase diff --git a/source/module_base/math_erf_complex.h b/source/module_base/math_erf_complex.h deleted file mode 100644 index eb6c48300e..0000000000 --- a/source/module_base/math_erf_complex.h +++ /dev/null @@ -1,55 +0,0 @@ -#ifndef MATH_ERF_COMPLEX_H -#define MATH_ERF_COMPLEX_H - -#include -#include - -namespace ModuleBase -{ - -class ErrorFunc -{ - public: - ErrorFunc(); - ~ErrorFunc(); - - /** - * @brief A class of the error function of complex arguments based on Faddeeva algorithm. - * More information please refer to http://ab-initio.mit.edu/Faddeeva - * - * @author jiyy on 2025-05-18 - */ - - // compute w(z) = exp(-z^2) erfc(-iz) [ Faddeeva / scaled complex error func ] - static std::complex scaled_w(std::complex z, double relerr); - static double scaled_w_im(double x); // special-case code for Im[w(x)] of real x - - // compute erfcx(z) = exp(z^2) erfc(z) - static std::complex erfcx(std::complex z, double relerr = 0); - static double erfcx(double x); // special case for real x - - // compute erf(z), the error function of complex arguments - static std::complex erf(std::complex z, double relerr = 0); - - // compute erfi(z) = -i erf(iz), the imaginary error function - static std::complex erfi(std::complex z, double relerr = 0); - static double erfi(double x); // special case for real x - - // compute erfc(z) = 1 - erf(z), the complementary error function - static std::complex erfc(std::complex z, double relerr = 0); - - private: - static double w_im_y100(double y100, double x); - static inline double sinc(double x, double sinx) - { - return fabs(x) < 1e-4 ? 1 - (0.1666666666666666666667) * x * x : sinx / x; - } - static inline double copysign(double x, double y) - { - return x < 0 != y < 0 ? -x : x; - } - static const std::vector expa2n2; -}; -} // namespace ModuleBase - -#endif // MATH_ERF_H diff --git a/source/module_base/math_integral.cpp b/source/module_base/math_integral.cpp deleted file mode 100644 index 0dd8434bc3..0000000000 --- a/source/module_base/math_integral.cpp +++ /dev/null @@ -1,454 +0,0 @@ -#include "math_integral.h" -#include // use size_t -#include -#include -#include -#include -#include "constants.h" - -namespace ModuleBase -{ - -Integral::Integral(){} - -Integral::~Integral(){} - - -// Peize Lin accelerate 2017-10-02 -/* -void Integral::Simpson_Integral -( - const int mesh, - const double *func, - const double *rab, - double &asum -) -{ - // simpson's rule integration. On input: - // mesh = mhe number of grid points (should be odd) - // func(i)= function to be integrated - // rab(i) = r(i) * dr(i)/di * di - // For the logarithmic grid not including r=0 : - // r(i) = r_0*exp((i-1)*dx) ==> rab(i)=r(i)*dx - // For the logarithmic grid including r=0 : - // r(i) = a(exp((i-1)*dx)-1) ==> rab(i)=(r(i)+a)*dx - // Output in asum = \sum_i c_i f(i)*rab(i) = \int_0^\infty f(r) dr - // where c_i are alternativaly 2/3, 4/3 except c_1 = c_mesh = 1/3 - - // simpson's rule integrator for function stored on the - // radial logarithmic mesh - // routine assumes that mesh is an odd number so run check - if (mesh % 2 == 0) - { - std::cout << "\n error in subroutine simpson "; - std::cout << "\n routine assumes mesh is odd but mesh = " - << mesh << std::endl; - return; - } - - asum = 0.00; - const double r12 = 1.00 / 12.00; - double f3 = func [0] * rab [0] * r12; - for (int i = 1;i < mesh;i += 2) - { - const double f1 = f3; - const double f2 = func [i] * rab [i] * r12; - f3 = func [i + 1] * rab [i + 1] * r12; - asum += 4.00 * f1 + 16.00 * f2 + 4.00 * f3; - } - return; -}// end subroutine simpson -*/ - - -// Peize Lin accelerate 2017-10-02 -void Integral::Simpson_Integral -( - const int mesh, - const double * const func, - const double * const rab, - double &asum -) -{ - /* simpson's rule integration. On input: - ! mesh = mhe number of grid points (should be odd) - ! func(i)= function to be integrated - ! rab(i) = r(i) * dr(i)/di * di - ! For the logarithmic grid not including r=0 : - ! r(i) = r_0*exp((i-1)*dx) ==> rab(i)=r(i)*dx - ! For the logarithmic grid including r=0 : - ! r(i) = a(exp((i-1)*dx)-1) ==> rab(i)=(r(i)+a)*dx - ! Output in asum = \sum_i c_i f(i)*rab(i) = \int_0^\infty f(r) dr - ! where c_i are alternativaly 2/3, 4/3 except c_1 = c_mesh = 1/3 - */ - // simpson's rule integrator for function stored on the - // radial logarithmic mesh - // routine assumes that mesh is an odd number so run check - assert(mesh&1); - - asum = 0.00; - const size_t end = mesh-2; - for( size_t i=1; i!=end; i+=2 ) - { - const double f1 = func[i]*rab[i]; - asum += f1 + f1 + func[i+1]*rab[i+1]; - } - const double f1 = func[mesh-2]*rab[mesh-2]; - asum += f1+f1; - asum += asum; - asum += func[0]*rab[0] + func[mesh-1]*rab[mesh-1]; - asum /= 3.0; - return; -}// end subroutine simpson - - -// Peize Lin accelerate 2017-10-02 -void Integral::Simpson_Integral -( - const int mesh, - const double * const func, - const double dr, - double &asum -) -{ - /* simpson's rule integration. On input: - ! mesh = mhe number of grid points (should be odd) - ! func(i)= function to be integrated - ! rab(i) = r(i) * dr(i)/di * di - ! For the logarithmic grid not including r=0 : - ! r(i) = r_0*exp((i-1)*dx) ==> rab(i)=r(i)*dx - ! For the logarithmic grid including r=0 : - ! r(i) = a(exp((i-1)*dx)-1) ==> rab(i)=(r(i)+a)*dx - ! Output in asum = \sum_i c_i f(i)*rab(i) = \int_0^\infty f(r) dr - ! where c_i are alternativaly 2/3, 4/3 except c_1 = c_mesh = 1/3 - */ - // simpson's rule integrator for function stored on the - // radial logarithmic mesh - // routine assumes that mesh is an odd number so run check - assert(mesh&1); - - asum = 0.00; - const size_t end = mesh-2; - for(size_t i=1; i!=end; i+=2 ) - { - const double f1 = func[i]; - asum += f1 + f1 + func[i+1]; - } - const double f1 = func[mesh-2]; - asum += f1+f1; - asum += asum; - asum += func[0] + func[mesh-1]; - asum *= dr/3.0; - return; -}// end subroutine simpson - - -// Peize Lin add 2016-02-14 -void Integral::Simpson_Integral_0toall -( - const int mesh, - const double * const func, - const double * const rab, - double * const asum -) -{ - // asum(r) = \int_{r'=0}^{r} dr' f(r') - - const double r2=1.00/2.00, r3=1.00/3.00; - asum[0] = 0.00; - double f3 = func [0] * rab [0]; - for( int i=1; i0; i-=2) - { - const double f3 = f1; - if( i+3==mesh ) - { - const double f4 = func[mesh-1] * rab[mesh-1]; - asum[mesh-2] = r2*(f3 + f4); - } - const double f2 = func[i] * rab[i] ; - f1 = func[i-1] * rab[i-1] ; - asum[i-1] = asum[i+1] + r3*( f1 + 4.00*f2 + f3 ); - asum[i] = asum[i-1] - r2*( f1 + f2); - } - return; -}*/ - - -// Peize Lin add 2016-06-11 -// a little lower -void Integral::Simpson_Integral_alltoinf -( - const int mesh, - const double * const func, - const double * const rab, - double * const asum -) -{ - Integral::Simpson_Integral_0toall( mesh, func, rab, asum ); - - const double asum_all = asum[mesh-1]; - for (int i = 0;i < mesh; ++i) - { - asum[i] = asum_all - asum[i]; - } - return; -} - -double Integral::simpson(const int n, const double* const f, const double dx) -{ - assert(n >= 2); - if (n == 4) - { // Simpson's 3/8 rule - return 3.0 * dx / 8 * (f[0] + 3.0 * f[1] + 3.0 * f[2] + f[3]); - } - - if (n == 2) - { - return 0.5 * dx * (f[0] + f[1]); - } - - if (n % 2 == 1) - { // composite Simpson's 1/3 rule - double sum = 0.0; - for (int i = 1; i != n-2; i += 2) - { - sum += 2.0 * f[i] + f[i+1]; - } - sum += 2.0 * f[n-2]; - sum *= 2.0; - sum += f[0] + f[n-1]; - return sum * dx / 3.0; - } - else - { // composite Simpson's 1/3 rule for the first n-4 intervals plus Simpson's 3/8 rule for the last 3 intervals - return simpson(n-3, f, dx) + simpson(4, &f[n-4], dx); - } -} - -double Integral::simpson(const int n, const double* const f, const double* const h) -{ - // Simpson's rule for irregularly-spaced grid - // The treatment for even number of grid points is the same as that of the regularly-spaced grid case. - assert( n >= 2 ); - assert( std::all_of(h, h+(n-1), [](double x){return x > 0.0;}) ); - - if (n == 4) - { - double w = h[0] + h[1] + h[2]; - return w / 12.0 * ( 2.0 + ((h[1]+h[2])/h[0]-1.0) * (h[2]/(h[0]+h[1])-1.0) ) * f[0] - + std::pow(w,3) / 12.0 * (h[0]+h[1]-h[2]) / (h[0]*h[1]*(h[1]+h[2])) * f[1] - + std::pow(w,3) / 12.0 * (h[2]+h[1]-h[0]) / (h[2]*h[1]*(h[1]+h[0])) * f[2] - + w / 12.0 * ( 2.0 + ((h[1]+h[0])/h[2]-1.0) * (h[0]/(h[2]+h[1])-1.0) ) * f[3]; - } - - if (n == 2) - { - return 0.5 * h[0] * (f[0] + f[1]); - } - - if (n % 2 == 1) - { - double sum = 0.0; - for (int i = 0; i < n/2; ++i) - { - double hrp = h[2*i+1] / h[2*i]; - double hrm = h[2*i] / h[2*i+1]; - sum += (h[2*i+1] + h[2*i]) / 6.0 * ( (2.0-hrp)*f[2*i] + (2.0+hrp+hrm)*f[2*i+1] + (2.0-hrm) * f[2*i+2]); - } - return sum; - } - else - { - return simpson(n-3, f, h) + simpson(4, &f[n-4], &h[n-4]); - } -} - -void Integral::Gauss_Legendre_grid_and_weight(const int n, double *x, double *weights) -{ - assert( n >= 1 ); - - double z = 0.0; - double z1 = 0.0; - double p1 = 1.0; - double p2 = 0.0; - double p3 = 0.0; - double pp = 0.0; - - int half_grid_num = static_cast((n+1)/2); - for(int i = 1; i <= half_grid_num; i++) - { - z = cos(ModuleBase::PI * (i - 0.25) / (n + 0.5)); - - while(true) - { - p1 = 1.0; - p2 = 0.0; - - for(int j = 1; j <= n; j++) - { - p3 = p2; - p2 = p1; - p1 = ((2.0 * j - 1.0) * z * p2 - (j - 1.0) * p3) / j; - } - - pp = n * (p2 - z * p1) / (1.0 - z*z); - z1 = z; - z = z1 - p1 / pp; - - if (std::abs(z - z1) < 1e-13) break; - } - - x[i-1] = -z; - x[n-i] = z; - weights[i-1] = 2.0 / ((1.0 - z * z) * pp * pp); - weights[n-i] = weights[i-1]; - } - -} - -void Integral::Gauss_Legendre_grid_and_weight(const double xmin, const double xmax, const int n, double *x, double *weights) -{ - assert( n >= 1 ); - - double xl = (xmax - xmin) * 0.5; - double xmean = (xmax + xmin) * 0.5; - - double z = 0.0; - double z1 = 0.0; - double p1 = 1.0; - double p2 = 0.0; - double p3 = 0.0; - double pp = 0.0; - - int half_grid_num = static_cast((n+1)/2); - for(int i = 1; i <= half_grid_num; i++) - { - z = cos(ModuleBase::PI * (i - 0.25) / (n + 0.5)); - - while(true) - { - p1 = 1.0; - p2 = 0.0; - - for(int j = 1; j <= n; j++) - { - p3 = p2; - p2 = p1; - p1 = ((2.0 * j - 1.0) * z * p2 - (j - 1.0) * p3) / j; - } - - pp = n * (p2 - z * p1) / (1.0 - z*z); - z1 = z; - z = z1 - p1 / pp; - - if (std::abs(z - z1) < 1e-13) break; - } - - x[i-1] = xmean - xl * z; - x[n-i] = xmean + xl * z; - weights[i-1] = 2.0 * xl / ((1.0 - z * z) * pp * pp); - weights[n-i] = weights[i-1]; - } - -} - -const double Integral::Lebedev_Laikov_grid110_x[110] = { - 1.000000000000000, -1.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.577350269189626, -0.577350269189626, - 0.577350269189626, -0.577350269189626, 0.577350269189626, -0.577350269189626, 0.577350269189626, -0.577350269189626, 0.185115635344736, -0.185115635344736, - 0.185115635344736, -0.185115635344736, 0.185115635344736, -0.185115635344736, 0.185115635344736, -0.185115635344736, 0.185115635344736, -0.185115635344736, - 0.185115635344736, -0.185115635344736, 0.185115635344736, -0.185115635344736, 0.185115635344736, -0.185115635344736, 0.965124035086594, -0.965124035086594, - 0.965124035086594, -0.965124035086594, 0.965124035086594, -0.965124035086594, 0.965124035086594, -0.965124035086594, 0.690421048382292, -0.690421048382292, - 0.690421048382292, -0.690421048382292, 0.690421048382292, -0.690421048382292, 0.690421048382292, -0.690421048382292, 0.690421048382292, -0.690421048382292, - 0.690421048382292, -0.690421048382292, 0.690421048382292, -0.690421048382292, 0.690421048382292, -0.690421048382292, 0.215957291845848, -0.215957291845848, - 0.215957291845848, -0.215957291845848, 0.215957291845848, -0.215957291845848, 0.215957291845848, -0.215957291845848, 0.395689473055942, -0.395689473055942, - 0.395689473055942, -0.395689473055942, 0.395689473055942, -0.395689473055942, 0.395689473055942, -0.395689473055942, 0.395689473055942, -0.395689473055942, - 0.395689473055942, -0.395689473055942, 0.395689473055942, -0.395689473055942, 0.395689473055942, -0.395689473055942, 0.828769981252592, -0.828769981252592, - 0.828769981252592, -0.828769981252592, 0.828769981252592, -0.828769981252592, 0.828769981252592, -0.828769981252592, 0.478369028812150, -0.478369028812150, - 0.478369028812150, -0.478369028812150, 0.878158910604066, -0.878158910604066, 0.878158910604066, -0.878158910604066, 0.478369028812150, -0.478369028812150, - 0.478369028812150, -0.478369028812150, 0.878158910604066, -0.878158910604066, 0.878158910604066, -0.878158910604066, 0.000000000000000, 0.000000000000000, - 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000 -}; - -const double Integral::Lebedev_Laikov_grid110_y[110] = { - 0.000000000000000, 0.000000000000000, 1.000000000000000, -1.000000000000000, 0.000000000000000, 0.000000000000000, 0.577350269189626, 0.577350269189626, - -0.577350269189626, -0.577350269189626, 0.577350269189626, 0.577350269189626, -0.577350269189626, -0.577350269189626, 0.185115635344736, 0.185115635344736, - -0.185115635344736, -0.185115635344736, 0.185115635344736, 0.185115635344736, -0.185115635344736, -0.185115635344736, 0.965124035086594, 0.965124035086594, - -0.965124035086594, -0.965124035086594, 0.965124035086594, 0.965124035086594, -0.965124035086594, -0.965124035086594, 0.185115635344736, 0.185115635344736, - -0.185115635344736, -0.185115635344736, 0.185115635344736, 0.185115635344736, -0.185115635344736, -0.185115635344736, 0.690421048382292, 0.690421048382292, - -0.690421048382292, -0.690421048382292, 0.690421048382292, 0.690421048382292, -0.690421048382292, -0.690421048382292, 0.215957291845848, 0.215957291845848, - -0.215957291845848, -0.215957291845848, 0.215957291845848, 0.215957291845848, -0.215957291845848, -0.215957291845848, 0.690421048382292, 0.690421048382292, - -0.690421048382292, -0.690421048382292, 0.690421048382292, 0.690421048382292, -0.690421048382292, -0.690421048382292, 0.395689473055942, 0.395689473055942, - -0.395689473055942, -0.395689473055942, 0.395689473055942, 0.395689473055942, -0.395689473055942, -0.395689473055942, 0.828769981252592, 0.828769981252592, - -0.828769981252592, -0.828769981252592, 0.828769981252592, 0.828769981252592, -0.828769981252592, -0.828769981252592, 0.395689473055942, 0.395689473055942, - -0.395689473055942, -0.395689473055942, 0.395689473055942, 0.395689473055942, -0.395689473055942, -0.395689473055942, 0.878158910604066, 0.878158910604066, - -0.878158910604066, -0.878158910604066, 0.478369028812150, 0.478369028812150, -0.478369028812150, -0.478369028812150, 0.000000000000000, 0.000000000000000, - 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.478369028812150, -0.478369028812150, - 0.478369028812150, -0.478369028812150, 0.878158910604066, -0.878158910604066, 0.878158910604066, -0.878158910604066 -}; - -const double Integral::Lebedev_Laikov_grid110_z[110] = { - 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 1.000000000000000, -1.000000000000000, 0.577350269189626, 0.577350269189626, - 0.577350269189626, 0.577350269189626, -0.577350269189626, -0.577350269189626, -0.577350269189626, -0.577350269189626, 0.965124035086594, 0.965124035086594, - 0.965124035086594, 0.965124035086594, -0.965124035086594, -0.965124035086594, -0.965124035086594, -0.965124035086594, 0.185115635344736, 0.185115635344736, - 0.185115635344736, 0.185115635344736, -0.185115635344736, -0.185115635344736, -0.185115635344736, -0.185115635344736, 0.185115635344736, 0.185115635344736, - 0.185115635344736, 0.185115635344736, -0.185115635344736, -0.185115635344736, -0.185115635344736, -0.185115635344736, 0.215957291845848, 0.215957291845848, - 0.215957291845848, 0.215957291845848, -0.215957291845848, -0.215957291845848, -0.215957291845848, -0.215957291845848, 0.690421048382292, 0.690421048382292, - 0.690421048382292, 0.690421048382292, -0.690421048382292, -0.690421048382292, -0.690421048382292, -0.690421048382292, 0.690421048382292, 0.690421048382292, - 0.690421048382292, 0.690421048382292, -0.690421048382292, -0.690421048382292, -0.690421048382292, -0.690421048382292, 0.828769981252592, 0.828769981252592, - 0.828769981252592, 0.828769981252592, -0.828769981252592, -0.828769981252592, -0.828769981252592, -0.828769981252592, 0.395689473055942, 0.395689473055942, - 0.395689473055942, 0.395689473055942, -0.395689473055942, -0.395689473055942, -0.395689473055942, -0.395689473055942, 0.395689473055942, 0.395689473055942, - 0.395689473055942, 0.395689473055942, -0.395689473055942, -0.395689473055942, -0.395689473055942, -0.395689473055942, 0.000000000000000, 0.000000000000000, - 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.878158910604066, 0.878158910604066, - -0.878158910604066, -0.878158910604066, 0.478369028812150, 0.478369028812150, -0.478369028812150, -0.478369028812150, 0.878158910604066, 0.878158910604066, - -0.878158910604066, -0.878158910604066, 0.478369028812150, 0.478369028812150, -0.478369028812150, -0.478369028812150 -}; - -const double Integral::Lebedev_Laikov_grid110_w[110] = { - 0.048107465851397, 0.048107465851397, 0.048107465851397, 0.048107465851397, 0.048107465851397, 0.048107465851397, 0.123071735281670, 0.123071735281670, - 0.123071735281670, 0.123071735281670, 0.123071735281670, 0.123071735281670, 0.123071735281670, 0.123071735281670, 0.103191734088330, 0.103191734088330, - 0.103191734088330, 0.103191734088330, 0.103191734088330, 0.103191734088330, 0.103191734088330, 0.103191734088330, 0.103191734088330, 0.103191734088330, - 0.103191734088330, 0.103191734088330, 0.103191734088330, 0.103191734088330, 0.103191734088330, 0.103191734088330, 0.103191734088330, 0.103191734088330, - 0.103191734088330, 0.103191734088330, 0.103191734088330, 0.103191734088330, 0.103191734088330, 0.103191734088330, 0.124945096872513, 0.124945096872513, - 0.124945096872513, 0.124945096872513, 0.124945096872513, 0.124945096872513, 0.124945096872513, 0.124945096872513, 0.124945096872513, 0.124945096872513, - 0.124945096872513, 0.124945096872513, 0.124945096872513, 0.124945096872513, 0.124945096872513, 0.124945096872513, 0.124945096872513, 0.124945096872513, - 0.124945096872513, 0.124945096872513, 0.124945096872513, 0.124945096872513, 0.124945096872513, 0.124945096872513, 0.120580249028528, 0.120580249028528, - 0.120580249028528, 0.120580249028528, 0.120580249028528, 0.120580249028528, 0.120580249028528, 0.120580249028528, 0.120580249028528, 0.120580249028528, - 0.120580249028528, 0.120580249028528, 0.120580249028528, 0.120580249028528, 0.120580249028528, 0.120580249028528, 0.120580249028528, 0.120580249028528, - 0.120580249028528, 0.120580249028528, 0.120580249028528, 0.120580249028528, 0.120580249028528, 0.120580249028528, 0.121830917385521, 0.121830917385521, - 0.121830917385521, 0.121830917385521, 0.121830917385521, 0.121830917385521, 0.121830917385521, 0.121830917385521, 0.121830917385521, 0.121830917385521, - 0.121830917385521, 0.121830917385521, 0.121830917385521, 0.121830917385521, 0.121830917385521, 0.121830917385521, 0.121830917385521, 0.121830917385521, - 0.121830917385521, 0.121830917385521, 0.121830917385521, 0.121830917385521, 0.121830917385521, 0.121830917385521 -}; -} diff --git a/source/module_base/math_integral.h b/source/module_base/math_integral.h deleted file mode 100644 index 4e32889e5f..0000000000 --- a/source/module_base/math_integral.h +++ /dev/null @@ -1,124 +0,0 @@ -#ifndef MATH_INTEGRAL_H -#define MATH_INTEGRAL_H - -// mohan add 2021-04-03 -namespace ModuleBase -{ - -class Integral -{ - - public: - - Integral(); - ~Integral(); - - /** - * @brief simpson integral. - * - * @param mesh [in] number of grid points (should be odd) - * @param func [in] function to be integrated - * @param rab [in] a list of interval - * @param asum [out] the final integral value - * @author Peize Lin - * @date 2017-10-02 - */ - static void Simpson_Integral - ( - const int mesh, - const double * const func, - const double * const rab, - double &asum - ); - - /** - * @brief simpson integral. - * - * @param mesh [in] number of grid points (should be odd) - * @param func [in] function to be integrated - * @param dr [in] interval - * @param asum [out] the final integral value - * @author Peize Lin - * @date 2017-10-02 - */ - static void Simpson_Integral - ( - const int mesh, - const double * const func, - const double dr, - double &asum - ); - - /** - * @brief simpson integral. - * - * - * @param mesh [in] number of grid points - * @param func [in] function to be integrated - * @param rab [in] a list of interval - * @param asum [out] a list of integral value. asum[i] = integral from 0 to i. The max index of asum is an even (mesh-1 or mesh). - * @author Peize Lin - * @date 2016-02-14 - */ - static void Simpson_Integral_0toall - ( - const int mesh, - const double * const func, - const double * const rab, - double * const asum - ); - - /** - * @brief simpson integral. - * - * @param mesh [in] number of grid points - * @param func [in] function to be integrated - * @param rab [in] r(i) * dr(i)/di * di or (b-a)/2n - * @param asum [out] a list of integral value. sum[i] = integral from i to mesh-1. - * @author Peize Lin - * @date 2016-02-14 - */ - static void Simpson_Integral_alltoinf - ( - const int mesh, - const double * const func, - const double * const rab, - double * const asum - ); - - //! Numerical integration on an evenly-spaced grid using Simpson's rule - static double simpson(const int n, //!< number of grid points - const double* const f, //!< function values at grid points - const double dx //!< grid spacing - ); - - //! Numerical integration on an irregularly-spaced grid using Simpson's rule - static double simpson(const int n, //!< number of grid points - const double* const f, //!< function values at grid points - const double* const h //!< grid spacing of length n-1, must be positive - ); - - // Grid points and weights used to generate Gauss_Legendre integrals. Returns x in [-1, 1], the integration area is -1, 1. - // https://en.wikipedia.org/wiki/Gauss%E2%80%93Legendre_quadrature - // \int_{-1}^{1} f(x) dx \approx \sum_{i = 1}^{n} w_{i} f(x_{i}) - // n is the number of sample points used, - // w_{i} are quadrature weights - // x_{i} are the roots of the n-th Legendre polynomial. - static void Gauss_Legendre_grid_and_weight(const int n, double *x, double *weights); - - // Grid points and weights used to generate Gauss_Legendre integrals. Returns x in [xmin, xmax], the integration area is at xmin, xmax. - // \int_{-1}^{1} f(x) dx \approx \sum_{i = 1}^{n} w_{i} f(x_{i}) - // xl = (xmax - xmin) / 2 - // xmean = (xmax + xmin) / 2 - // \int_{xmin}^{xmax} f(x) dx = xl \int_{-1}^{1} f(xl * t + xmean) dt - static void Gauss_Legendre_grid_and_weight(const double xmin, const double xmax, const int n, double *x, double *weights); - - // Grid points and weights used to generate Gauss_Legendre integrals. can be generated with function Lebedev_laikov_grid in math_lebedev_laikov.cpp - static const double Lebedev_Laikov_grid110_x[110]; - static const double Lebedev_Laikov_grid110_y[110]; - static const double Lebedev_Laikov_grid110_z[110]; - static const double Lebedev_Laikov_grid110_w[110]; -}; - -} -#endif diff --git a/source/module_base/math_lebedev_laikov.cpp b/source/module_base/math_lebedev_laikov.cpp deleted file mode 100644 index 52f71dffdf..0000000000 --- a/source/module_base/math_lebedev_laikov.cpp +++ /dev/null @@ -1,5401 +0,0 @@ -#include "math_lebedev_laikov.h" -#include -#include "constants.h" -#include -#include -#include - -namespace ModuleBase -{ - -Lebedev_laikov_grid::Lebedev_laikov_grid(int degree) -{ - auto it = allowed_degree.find(degree); - if (it == allowed_degree.end()) - { - std::cerr << "In the Lebedev_laikov_grid class, the degree = " << degree << " is not within the allowed range." - << std::endl; - assert(false); - } - - this->degree = degree; - grid_coor = new ModuleBase::Vector3[degree]; - weight = new double[degree]; -} - -Lebedev_laikov_grid::~Lebedev_laikov_grid() -{ - if (grid_coor) - { - delete[] grid_coor; - grid_coor = nullptr; - } - - if (weight) - { - delete[] weight; - weight = nullptr; - } -} - -void Lebedev_laikov_grid::print_grid_and_weight(std::string filename) -{ - std::stringstream ss; - ss << filename << "_degree" << degree; - std::ofstream ofs(ss.str().c_str()); - ofs << "# grid: x y z weight" << std::endl; - for (int i = 0; i < degree; i++) - { - ofs << std::setw(20) << std::setprecision(15) << std::fixed << grid_coor[i].x; - ofs << std::setw(20) << std::setprecision(15) << std::fixed << grid_coor[i].y; - ofs << std::setw(20) << std::setprecision(15) << std::fixed << grid_coor[i].z; - ofs << std::setw(20) << std::setprecision(15) << std::fixed << weight[i] << std::endl; - } - - ofs.close(); -} - -void Lebedev_laikov_grid::generate_grid_points() -{ - int start = 0; - double a = 0.0; - double b = 0.0; - double c = 0.0; - double v = 0.0; - - switch (degree) - { - case 6: - - v = 0.1666666666666667E+0; - start = getLebedevReccurencePoints(1, start, a, b, v); - - break; - - case 14: - - v = 0.6666666666666667E-1; - start = getLebedevReccurencePoints(1, start, a, b, v); - v = 0.7500000000000000E-1; - start = getLebedevReccurencePoints(3, start, a, b, v); - - break; - - case 26: - - v = 0.4761904761904762E-1; - start = getLebedevReccurencePoints(1, start, a, b, v); - v = 0.3809523809523810E-1; - start = getLebedevReccurencePoints(2, start, a, b, v); - v = 0.3214285714285714E-1; - start = getLebedevReccurencePoints(3, start, a, b, v); - - break; - - case 38: - - v = 0.9523809523809524E-2; - start = getLebedevReccurencePoints(1, start, a, b, v); - v = 0.3214285714285714E-1; - start = getLebedevReccurencePoints(3, start, a, b, v); - a = 0.4597008433809831E+0; - v = 0.2857142857142857E-1; - start = getLebedevReccurencePoints(5, start, a, b, v); - - break; - - case 50: - - v = 0.1269841269841270E-1; - start = getLebedevReccurencePoints(1, start, a, b, v); - v = 0.2257495590828924E-1; - start = getLebedevReccurencePoints(2, start, a, b, v); - v = 0.2109375000000000E-1; - start = getLebedevReccurencePoints(3, start, a, b, v); - a = 0.3015113445777636E+0; - v = 0.2017333553791887E-1; - start = getLebedevReccurencePoints(4, start, a, b, v); - - break; - - case 74: - - v = 0.5130671797338464E-3; - start = getLebedevReccurencePoints(1, start, a, b, v); - v = 0.1660406956574204E-1; - start = getLebedevReccurencePoints(2, start, a, b, v); - v = -0.2958603896103896E-1; - start = getLebedevReccurencePoints(3, start, a, b, v); - a = 0.4803844614152614E+0; - v = 0.2657620708215946E-1; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.3207726489807764E+0; - v = 0.1652217099371571E-1; - start = getLebedevReccurencePoints(5, start, a, b, v); - - break; - - case 86: - - v = 0.1154401154401154E-1; - start = getLebedevReccurencePoints(1, start, a, b, v); - v = 0.1194390908585628E-1; - start = getLebedevReccurencePoints(3, start, a, b, v); - a = 0.3696028464541502E+0; - v = 0.1111055571060340E-1; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6943540066026664E+0; - v = 0.1187650129453714E-1; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.3742430390903412E+0; - v = 0.1181230374690448E-1; - start = getLebedevReccurencePoints(5, start, a, b, v); - - break; - - case 110: - - v = 0.3828270494937162E-2; - start = getLebedevReccurencePoints(1, start, a, b, v); - v = 0.9793737512487512E-2; - start = getLebedevReccurencePoints(3, start, a, b, v); - a = 0.1851156353447362E+0; - v = 0.8211737283191111E-2; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6904210483822922E+0; - v = 0.9942814891178103E-2; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.3956894730559419E+0; - v = 0.9595471336070963E-2; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.4783690288121502E+0; - v = 0.9694996361663028E-2; - start = getLebedevReccurencePoints(5, start, a, b, v); - - break; - - case 146: - - v = 0.5996313688621381E-3; - start = getLebedevReccurencePoints(1, start, a, b, v); - v = 0.7372999718620756E-2; - start = getLebedevReccurencePoints(2, start, a, b, v); - v = 0.7210515360144488E-2; - start = getLebedevReccurencePoints(3, start, a, b, v); - a = 0.6764410400114264E+0; - v = 0.7116355493117555E-2; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.4174961227965453E+0; - v = 0.6753829486314477E-2; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.1574676672039082E+0; - v = 0.7574394159054034E-2; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.1403553811713183E+0; - b = 0.4493328323269557E+0; - v = 0.6991087353303262E-2; - start = getLebedevReccurencePoints(6, start, a, b, v); - - break; - - case 170: - - v = 0.5544842902037365E-2; - start = getLebedevReccurencePoints(1, start, a, b, v); - v = 0.6071332770670752E-2; - start = getLebedevReccurencePoints(2, start, a, b, v); - v = 0.6383674773515093E-2; - start = getLebedevReccurencePoints(3, start, a, b, v); - a = 0.2551252621114134E+0; - v = 0.5183387587747790E-2; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6743601460362766E+0; - v = 0.6317929009813725E-2; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.4318910696719410E+0; - v = 0.6201670006589077E-2; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.2613931360335988E+0; - v = 0.5477143385137348E-2; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.4990453161796037E+0; - b = 0.1446630744325115E+0; - v = 0.5968383987681156E-2; - start = getLebedevReccurencePoints(6, start, a, b, v); - - break; - - case 194: - - v = 0.1782340447244611E-2; - start = getLebedevReccurencePoints(1, start, a, b, v); - v = 0.5716905949977102E-2; - start = getLebedevReccurencePoints(2, start, a, b, v); - v = 0.5573383178848738E-2; - start = getLebedevReccurencePoints(3, start, a, b, v); - a = 0.6712973442695226E+0; - v = 0.5608704082587997E-2; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.2892465627575439E+0; - v = 0.5158237711805383E-2; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.4446933178717437E+0; - v = 0.5518771467273614E-2; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.1299335447650067E+0; - v = 0.4106777028169394E-2; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.3457702197611283E+0; - v = 0.5051846064614808E-2; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.1590417105383530E+0; - b = 0.8360360154824589E+0; - v = 0.5530248916233094E-2; - start = getLebedevReccurencePoints(6, start, a, b, v); - - break; - - case 230: - - v = -0.5522639919727325E-1; - start = getLebedevReccurencePoints(1, start, a, b, v); - v = 0.4450274607445226E-2; - start = getLebedevReccurencePoints(3, start, a, b, v); - a = 0.4492044687397611E+0; - v = 0.4496841067921404E-2; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.2520419490210201E+0; - v = 0.5049153450478750E-2; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6981906658447242E+0; - v = 0.3976408018051883E-2; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6587405243460960E+0; - v = 0.4401400650381014E-2; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.4038544050097660E-1; - v = 0.1724544350544401E-1; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.5823842309715585E+0; - v = 0.4231083095357343E-2; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.3545877390518688E+0; - v = 0.5198069864064399E-2; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.2272181808998187E+0; - b = 0.4864661535886647E+0; - v = 0.4695720972568883E-2; - start = getLebedevReccurencePoints(6, start, a, b, v); - - break; - - case 266: - - v = -0.1313769127326952E-2; - start = getLebedevReccurencePoints(1, start, a, b, v); - v = -0.2522728704859336E-2; - start = getLebedevReccurencePoints(2, start, a, b, v); - v = 0.4186853881700583E-2; - start = getLebedevReccurencePoints(3, start, a, b, v); - a = 0.7039373391585475E+0; - v = 0.5315167977810885E-2; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.1012526248572414E+0; - v = 0.4047142377086219E-2; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.4647448726420539E+0; - v = 0.4112482394406990E-2; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.3277420654971629E+0; - v = 0.3595584899758782E-2; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6620338663699974E+0; - v = 0.4256131351428158E-2; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.8506508083520399E+0; - v = 0.4229582700647240E-2; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.3233484542692899E+0; - b = 0.1153112011009701E+0; - v = 0.4080914225780505E-2; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.2314790158712601E+0; - b = 0.5244939240922365E+0; - v = 0.4071467593830964E-2; - start = getLebedevReccurencePoints(6, start, a, b, v); - - break; - - case 302: - - v = 0.8545911725128148E-3; - start = getLebedevReccurencePoints(1, start, a, b, v); - v = 0.3599119285025571E-2; - start = getLebedevReccurencePoints(3, start, a, b, v); - a = 0.3515640345570105E+0; - v = 0.3449788424305883E-2; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6566329410219612E+0; - v = 0.3604822601419882E-2; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.4729054132581005E+0; - v = 0.3576729661743367E-2; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.9618308522614784E-1; - v = 0.2352101413689164E-2; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.2219645236294178E+0; - v = 0.3108953122413675E-2; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.7011766416089545E+0; - v = 0.3650045807677255E-2; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.2644152887060663E+0; - v = 0.2982344963171804E-2; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.5718955891878961E+0; - v = 0.3600820932216460E-2; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.2510034751770465E+0; - b = 0.8000727494073952E+0; - v = 0.3571540554273387E-2; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.1233548532583327E+0; - b = 0.4127724083168531E+0; - v = 0.3392312205006170E-2; - start = getLebedevReccurencePoints(6, start, a, b, v); - - break; - - case 350: - - v = 0.3006796749453936E-2; - start = getLebedevReccurencePoints(1, start, a, b, v); - v = 0.3050627745650771E-2; - start = getLebedevReccurencePoints(3, start, a, b, v); - a = 0.7068965463912316E+0; - v = 0.1621104600288991E-2; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.4794682625712025E+0; - v = 0.3005701484901752E-2; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.1927533154878019E+0; - v = 0.2990992529653774E-2; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6930357961327123E+0; - v = 0.2982170644107595E-2; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.3608302115520091E+0; - v = 0.2721564237310992E-2; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6498486161496169E+0; - v = 0.3033513795811141E-2; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.1932945013230339E+0; - v = 0.3007949555218533E-2; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.3800494919899303E+0; - v = 0.2881964603055307E-2; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.2899558825499574E+0; - b = 0.7934537856582316E+0; - v = 0.2958357626535696E-2; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.9684121455103957E-1; - b = 0.8280801506686862E+0; - v = 0.3036020026407088E-2; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.1833434647041659E+0; - b = 0.9074658265305127E+0; - v = 0.2832187403926303E-2; - start = getLebedevReccurencePoints(6, start, a, b, v); - - break; - - case 434: - - v = 0.5265897968224436E-3; - start = getLebedevReccurencePoints(1, start, a, b, v); - v = 0.2548219972002607E-2; - start = getLebedevReccurencePoints(2, start, a, b, v); - v = 0.2512317418927307E-2; - start = getLebedevReccurencePoints(3, start, a, b, v); - a = 0.6909346307509111E+0; - v = 0.2530403801186355E-2; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.1774836054609158E+0; - v = 0.2014279020918528E-2; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.4914342637784746E+0; - v = 0.2501725168402936E-2; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6456664707424256E+0; - v = 0.2513267174597564E-2; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.2861289010307638E+0; - v = 0.2302694782227416E-2; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.7568084367178018E-1; - v = 0.1462495621594614E-2; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.3927259763368002E+0; - v = 0.2445373437312980E-2; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.8818132877794288E+0; - v = 0.2417442375638981E-2; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.9776428111182649E+0; - v = 0.1910951282179532E-2; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.2054823696403044E+0; - b = 0.8689460322872412E+0; - v = 0.2416930044324775E-2; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5905157048925271E+0; - b = 0.7999278543857286E+0; - v = 0.2512236854563495E-2; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5550152361076807E+0; - b = 0.7717462626915901E+0; - v = 0.2496644054553086E-2; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.9371809858553722E+0; - b = 0.3344363145343455E+0; - v = 0.2236607760437849E-2; - start = getLebedevReccurencePoints(6, start, a, b, v); - - break; - - case 590: - - v = 0.3095121295306187E-3; - start = getLebedevReccurencePoints(1, start, a, b, v); - v = 0.1852379698597489E-2; - start = getLebedevReccurencePoints(3, start, a, b, v); - a = 0.7040954938227469E+0; - v = 0.1871790639277744E-2; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6807744066455243E+0; - v = 0.1858812585438317E-2; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6372546939258752E+0; - v = 0.1852028828296213E-2; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.5044419707800358E+0; - v = 0.1846715956151242E-2; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.4215761784010967E+0; - v = 0.1818471778162769E-2; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.3317920736472123E+0; - v = 0.1749564657281154E-2; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.2384736701421887E+0; - v = 0.1617210647254411E-2; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.1459036449157763E+0; - v = 0.1384737234851692E-2; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6095034115507196E-1; - v = 0.9764331165051050E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6116843442009876E+0; - v = 0.1857161196774078E-2; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.3964755348199858E+0; - v = 0.1705153996395864E-2; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.1724782009907724E+0; - v = 0.1300321685886048E-2; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.5610263808622060E+0; - b = 0.3518280927733519E+0; - v = 0.1842866472905286E-2; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4742392842551980E+0; - b = 0.2634716655937950E+0; - v = 0.1802658934377451E-2; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5984126497885380E+0; - b = 0.1816640840360209E+0; - v = 0.1849830560443660E-2; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3791035407695563E+0; - b = 0.1720795225656878E+0; - v = 0.1713904507106709E-2; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.2778673190586244E+0; - b = 0.8213021581932511E-1; - v = 0.1555213603396808E-2; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5033564271075117E+0; - b = 0.8999205842074875E-1; - v = 0.1802239128008525E-2; - start = getLebedevReccurencePoints(6, start, a, b, v); - - break; - - case 770: - - v = 0.2192942088181184E-3; - start = getLebedevReccurencePoints(1, start, a, b, v); - v = 0.1436433617319080E-2; - start = getLebedevReccurencePoints(2, start, a, b, v); - v = 0.1421940344335877E-2; - start = getLebedevReccurencePoints(3, start, a, b, v); - a = 0.5087204410502360E-1; - v = 0.6798123511050502E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.1228198790178831E+0; - v = 0.9913184235294912E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.2026890814408786E+0; - v = 0.1180207833238949E-2; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.2847745156464294E+0; - v = 0.1296599602080921E-2; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.3656719078978026E+0; - v = 0.1365871427428316E-2; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.4428264886713469E+0; - v = 0.1402988604775325E-2; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.5140619627249735E+0; - v = 0.1418645563595609E-2; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6306401219166803E+0; - v = 0.1421376741851662E-2; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6716883332022612E+0; - v = 0.1423996475490962E-2; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6979792685336881E+0; - v = 0.1431554042178567E-2; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.1446865674195309E+0; - v = 0.9254401499865368E-3; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.3390263475411216E+0; - v = 0.1250239995053509E-2; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.5335804651263506E+0; - v = 0.1394365843329230E-2; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.6944024393349413E-1; - b = 0.2355187894242326E+0; - v = 0.1127089094671749E-2; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.2269004109529460E+0; - b = 0.4102182474045730E+0; - v = 0.1345753760910670E-2; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.8025574607775339E-1; - b = 0.6214302417481605E+0; - v = 0.1424957283316783E-2; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.1467999527896572E+0; - b = 0.3245284345717394E+0; - v = 0.1261523341237750E-2; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.1571507769824727E+0; - b = 0.5224482189696630E+0; - v = 0.1392547106052696E-2; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.2365702993157246E+0; - b = 0.6017546634089558E+0; - v = 0.1418761677877656E-2; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.7714815866765732E-1; - b = 0.4346575516141163E+0; - v = 0.1338366684479554E-2; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3062936666210730E+0; - b = 0.4908826589037616E+0; - v = 0.1393700862676131E-2; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3822477379524787E+0; - b = 0.5648768149099500E+0; - v = 0.1415914757466932E-2; - start = getLebedevReccurencePoints(6, start, a, b, v); - - break; - - case 974: - - v = 0.1438294190527431E-3; - start = getLebedevReccurencePoints(1, start, a, b, v); - v = 0.1125772288287004E-2; - start = getLebedevReccurencePoints(3, start, a, b, v); - a = 0.4292963545341347E-1; - v = 0.4948029341949241E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.1051426854086404E+0; - v = 0.7357990109125470E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.1750024867623087E+0; - v = 0.8889132771304384E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.2477653379650257E+0; - v = 0.9888347838921435E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.3206567123955957E+0; - v = 0.1053299681709471E-2; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.3916520749849983E+0; - v = 0.1092778807014578E-2; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.4590825874187624E+0; - v = 0.1114389394063227E-2; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.5214563888415861E+0; - v = 0.1123724788051555E-2; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6253170244654199E+0; - v = 0.1125239325243814E-2; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6637926744523170E+0; - v = 0.1126153271815905E-2; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6910410398498301E+0; - v = 0.1130286931123841E-2; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.7052907007457760E+0; - v = 0.1134986534363955E-2; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.1236686762657990E+0; - v = 0.6823367927109931E-3; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.2940777114468387E+0; - v = 0.9454158160447096E-3; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.4697753849207649E+0; - v = 0.1074429975385679E-2; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.6334563241139567E+0; - v = 0.1129300086569132E-2; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.5974048614181342E-1; - b = 0.2029128752777523E+0; - v = 0.8436884500901954E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.1375760408473636E+0; - b = 0.4602621942484054E+0; - v = 0.1075255720448885E-2; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3391016526336286E+0; - b = 0.5030673999662036E+0; - v = 0.1108577236864462E-2; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.1271675191439820E+0; - b = 0.2817606422442134E+0; - v = 0.9566475323783357E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.2693120740413512E+0; - b = 0.4331561291720157E+0; - v = 0.1080663250717391E-2; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.1419786452601918E+0; - b = 0.6256167358580814E+0; - v = 0.1126797131196295E-2; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6709284600738255E-1; - b = 0.3798395216859157E+0; - v = 0.1022568715358061E-2; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.7057738183256172E-1; - b = 0.5517505421423520E+0; - v = 0.1108960267713108E-2; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.2783888477882155E+0; - b = 0.6029619156159187E+0; - v = 0.1122790653435766E-2; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.1979578938917407E+0; - b = 0.3589606329589096E+0; - v = 0.1032401847117460E-2; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.2087307061103274E+0; - b = 0.5348666438135476E+0; - v = 0.1107249382283854E-2; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4055122137872836E+0; - b = 0.5674997546074373E+0; - v = 0.1121780048519972E-2; - start = getLebedevReccurencePoints(6, start, a, b, v); - - break; - - case 1202: - - v = 0.1105189233267572E-3; - start = getLebedevReccurencePoints(1, start, a, b, v); - v = 0.9205232738090741E-3; - start = getLebedevReccurencePoints(2, start, a, b, v); - v = 0.9133159786443561E-3; - start = getLebedevReccurencePoints(3, start, a, b, v); - a = 0.3712636449657089E-1; - v = 0.3690421898017899E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.9140060412262223E-1; - v = 0.5603990928680660E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.1531077852469906E+0; - v = 0.6865297629282609E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.2180928891660612E+0; - v = 0.7720338551145630E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.2839874532200175E+0; - v = 0.8301545958894795E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.3491177600963764E+0; - v = 0.8686692550179628E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.4121431461444309E+0; - v = 0.8927076285846890E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.4718993627149127E+0; - v = 0.9060820238568219E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.5273145452842337E+0; - v = 0.9119777254940867E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6209475332444019E+0; - v = 0.9128720138604181E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6569722711857291E+0; - v = 0.9130714935691735E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6841788309070143E+0; - v = 0.9152873784554116E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.7012604330123631E+0; - v = 0.9187436274321654E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.1072382215478166E+0; - v = 0.5176977312965694E-3; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.2582068959496968E+0; - v = 0.7331143682101417E-3; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.4172752955306717E+0; - v = 0.8463232836379928E-3; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.5700366911792503E+0; - v = 0.9031122694253992E-3; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.9827986018263947E+0; - b = 0.1771774022615325E+0; - v = 0.6485778453163257E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.9624249230326228E+0; - b = 0.2475716463426288E+0; - v = 0.7435030910982369E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.9402007994128811E+0; - b = 0.3354616289066489E+0; - v = 0.7998527891839054E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.9320822040143202E+0; - b = 0.3173615246611977E+0; - v = 0.8101731497468018E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.9043674199393299E+0; - b = 0.4090268427085357E+0; - v = 0.8483389574594331E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.8912407560074747E+0; - b = 0.3854291150669224E+0; - v = 0.8556299257311812E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.8676435628462708E+0; - b = 0.4932221184851285E+0; - v = 0.8803208679738260E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.8581979986041619E+0; - b = 0.4785320675922435E+0; - v = 0.8811048182425720E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.8396753624049856E+0; - b = 0.4507422593157064E+0; - v = 0.8850282341265444E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.8165288564022188E+0; - b = 0.5632123020762100E+0; - v = 0.9021342299040653E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.8015469370783529E+0; - b = 0.5434303569693900E+0; - v = 0.9010091677105086E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.7773563069070351E+0; - b = 0.5123518486419871E+0; - v = 0.9022692938426915E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.7661621213900394E+0; - b = 0.6394279634749102E+0; - v = 0.9158016174693465E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.7553584143533510E+0; - b = 0.6269805509024392E+0; - v = 0.9131578003189435E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.7344305757559503E+0; - b = 0.6031161693096310E+0; - v = 0.9107813579482705E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.7043837184021765E+0; - b = 0.5693702498468441E+0; - v = 0.9105760258970126E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - - break; - - case 1454: - - v = 0.7777160743261247E-4; - start = getLebedevReccurencePoints(1, start, a, b, v); - v = 0.7557646413004701E-3; - start = getLebedevReccurencePoints(3, start, a, b, v); - a = 0.3229290663413854E-1; - v = 0.2841633806090617E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.8036733271462222E-1; - v = 0.4374419127053555E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.1354289960531653E+0; - v = 0.5417174740872172E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.1938963861114426E+0; - v = 0.6148000891358593E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.2537343715011275E+0; - v = 0.6664394485800705E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.3135251434752570E+0; - v = 0.7025039356923220E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.3721558339375338E+0; - v = 0.7268511789249627E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.4286809575195696E+0; - v = 0.7422637534208629E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.4822510128282994E+0; - v = 0.7509545035841214E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.5320679333566263E+0; - v = 0.7548535057718401E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6172998195394274E+0; - v = 0.7554088969774001E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6510679849127481E+0; - v = 0.7553147174442808E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6777315251687360E+0; - v = 0.7564767653292297E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6963109410648741E+0; - v = 0.7587991808518730E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.7058935009831749E+0; - v = 0.7608261832033027E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.9955546194091857E+0; - v = 0.4021680447874916E-3; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.9734115901794209E+0; - v = 0.5804871793945964E-3; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.9275693732388626E+0; - v = 0.6792151955945159E-3; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.8568022422795103E+0; - v = 0.7336741211286294E-3; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.7623495553719372E+0; - v = 0.7581866300989608E-3; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.5707522908892223E+0; - b = 0.4387028039889501E+0; - v = 0.7538257859800743E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5196463388403083E+0; - b = 0.3858908414762617E+0; - v = 0.7483517247053123E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4646337531215351E+0; - b = 0.3301937372343854E+0; - v = 0.7371763661112059E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4063901697557691E+0; - b = 0.2725423573563777E+0; - v = 0.7183448895756934E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3456329466643087E+0; - b = 0.2139510237495250E+0; - v = 0.6895815529822191E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.2831395121050332E+0; - b = 0.1555922309786647E+0; - v = 0.6480105801792886E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.2197682022925330E+0; - b = 0.9892878979686097E-1; - v = 0.5897558896594636E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.1564696098650355E+0; - b = 0.4598642910675510E-1; - v = 0.5095708849247346E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6027356673721295E+0; - b = 0.3376625140173426E+0; - v = 0.7536906428909755E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5496032320255096E+0; - b = 0.2822301309727988E+0; - v = 0.7472505965575118E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4921707755234567E+0; - b = 0.2248632342592540E+0; - v = 0.7343017132279698E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4309422998598483E+0; - b = 0.1666224723456479E+0; - v = 0.7130871582177445E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3664108182313672E+0; - b = 0.1086964901822169E+0; - v = 0.6817022032112776E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.2990189057758436E+0; - b = 0.5251989784120085E-1; - v = 0.6380941145604121E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6268724013144998E+0; - b = 0.2297523657550023E+0; - v = 0.7550381377920310E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5707324144834607E+0; - b = 0.1723080607093800E+0; - v = 0.7478646640144802E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5096360901960365E+0; - b = 0.1140238465390513E+0; - v = 0.7335918720601220E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4438729938312456E+0; - b = 0.5611522095882537E-1; - v = 0.7110120527658118E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6419978471082389E+0; - b = 0.1164174423140873E+0; - v = 0.7571363978689501E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5817218061802611E+0; - b = 0.5797589531445219E-1; - v = 0.7489908329079234E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - - break; - - case 1730: - - v = 0.6309049437420976E-4; - start = getLebedevReccurencePoints(1, start, a, b, v); - v = 0.6398287705571748E-3; - start = getLebedevReccurencePoints(2, start, a, b, v); - v = 0.6357185073530720E-3; - start = getLebedevReccurencePoints(3, start, a, b, v); - a = 0.2860923126194662E-1; - v = 0.2221207162188168E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.7142556767711522E-1; - v = 0.3475784022286848E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.1209199540995559E+0; - v = 0.4350742443589804E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.1738673106594379E+0; - v = 0.4978569136522127E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.2284645438467734E+0; - v = 0.5435036221998053E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.2834807671701512E+0; - v = 0.5765913388219542E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.3379680145467339E+0; - v = 0.6001200359226003E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.3911355454819537E+0; - v = 0.6162178172717512E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.4422860353001403E+0; - v = 0.6265218152438485E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.4907781568726057E+0; - v = 0.6323987160974212E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.5360006153211468E+0; - v = 0.6350767851540569E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6142105973596603E+0; - v = 0.6354362775297107E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6459300387977504E+0; - v = 0.6352302462706235E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6718056125089225E+0; - v = 0.6358117881417972E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6910888533186254E+0; - v = 0.6373101590310117E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.7030467416823252E+0; - v = 0.6390428961368665E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.8354951166354646E-1; - v = 0.3186913449946576E-3; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.2050143009099486E+0; - v = 0.4678028558591711E-3; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.3370208290706637E+0; - v = 0.5538829697598626E-3; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.4689051484233963E+0; - v = 0.6044475907190476E-3; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.5939400424557334E+0; - v = 0.6313575103509012E-3; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.1394983311832261E+0; - b = 0.4097581162050343E-1; - v = 0.4078626431855630E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.1967999180485014E+0; - b = 0.8851987391293348E-1; - v = 0.4759933057812725E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.2546183732548967E+0; - b = 0.1397680182969819E+0; - v = 0.5268151186413440E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3121281074713875E+0; - b = 0.1929452542226526E+0; - v = 0.5643048560507316E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3685981078502492E+0; - b = 0.2467898337061562E+0; - v = 0.5914501076613073E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4233760321547856E+0; - b = 0.3003104124785409E+0; - v = 0.6104561257874195E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4758671236059246E+0; - b = 0.3526684328175033E+0; - v = 0.6230252860707806E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5255178579796463E+0; - b = 0.4031134861145713E+0; - v = 0.6305618761760796E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5718025633734589E+0; - b = 0.4509426448342351E+0; - v = 0.6343092767597889E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.2686927772723415E+0; - b = 0.4711322502423248E-1; - v = 0.5176268945737826E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3306006819904809E+0; - b = 0.9784487303942695E-1; - v = 0.5564840313313692E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3904906850594983E+0; - b = 0.1505395810025273E+0; - v = 0.5856426671038980E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4479957951904390E+0; - b = 0.2039728156296050E+0; - v = 0.6066386925777091E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5027076848919780E+0; - b = 0.2571529941121107E+0; - v = 0.6208824962234458E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5542087392260217E+0; - b = 0.3092191375815670E+0; - v = 0.6296314297822907E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6020850887375187E+0; - b = 0.3593807506130276E+0; - v = 0.6340423756791859E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4019851409179594E+0; - b = 0.5063389934378671E-1; - v = 0.5829627677107342E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4635614567449800E+0; - b = 0.1032422269160612E+0; - v = 0.6048693376081110E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5215860931591575E+0; - b = 0.1566322094006254E+0; - v = 0.6202362317732461E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5758202499099271E+0; - b = 0.2098082827491099E+0; - v = 0.6299005328403779E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6259893683876795E+0; - b = 0.2618824114553391E+0; - v = 0.6347722390609353E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5313795124811891E+0; - b = 0.5263245019338556E-1; - v = 0.6203778981238834E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5893317955931995E+0; - b = 0.1061059730982005E+0; - v = 0.6308414671239979E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6426246321215801E+0; - b = 0.1594171564034221E+0; - v = 0.6362706466959498E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6511904367376113E+0; - b = 0.5354789536565540E-1; - v = 0.6375414170333233E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - - break; - - case 2030: - - v = 0.4656031899197431E-4; - start = getLebedevReccurencePoints(1, start, a, b, v); - v = 0.5421549195295507E-3; - start = getLebedevReccurencePoints(3, start, a, b, v); - a = 0.2540835336814348E-1; - v = 0.1778522133346553E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6399322800504915E-1; - v = 0.2811325405682796E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.1088269469804125E+0; - v = 0.3548896312631459E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.1570670798818287E+0; - v = 0.4090310897173364E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.2071163932282514E+0; - v = 0.4493286134169965E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.2578914044450844E+0; - v = 0.4793728447962723E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.3085687558169623E+0; - v = 0.5015415319164265E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.3584719706267024E+0; - v = 0.5175127372677937E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.4070135594428709E+0; - v = 0.5285522262081019E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.4536618626222638E+0; - v = 0.5356832703713962E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.4979195686463577E+0; - v = 0.5397914736175170E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.5393075111126999E+0; - v = 0.5416899441599930E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6115617676843916E+0; - v = 0.5419308476889938E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6414308435160159E+0; - v = 0.5416936902030596E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6664099412721607E+0; - v = 0.5419544338703164E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6859161771214913E+0; - v = 0.5428983656630975E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6993625593503890E+0; - v = 0.5442286500098193E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.7062393387719380E+0; - v = 0.5452250345057301E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.7479028168349763E-1; - v = 0.2568002497728530E-3; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.1848951153969366E+0; - v = 0.3827211700292145E-3; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.3059529066581305E+0; - v = 0.4579491561917824E-3; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.4285556101021362E+0; - v = 0.5042003969083574E-3; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.5468758653496526E+0; - v = 0.5312708889976025E-3; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.6565821978343439E+0; - v = 0.5438401790747117E-3; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.1253901572367117E+0; - b = 0.3681917226439641E-1; - v = 0.3316041873197344E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.1775721510383941E+0; - b = 0.7982487607213301E-1; - v = 0.3899113567153771E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.2305693358216114E+0; - b = 0.1264640966592335E+0; - v = 0.4343343327201309E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.2836502845992063E+0; - b = 0.1751585683418957E+0; - v = 0.4679415262318919E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3361794746232590E+0; - b = 0.2247995907632670E+0; - v = 0.4930847981631031E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3875979172264824E+0; - b = 0.2745299257422246E+0; - v = 0.5115031867540091E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4374019316999074E+0; - b = 0.3236373482441118E+0; - v = 0.5245217148457367E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4851275843340022E+0; - b = 0.3714967859436741E+0; - v = 0.5332041499895321E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5303391803806868E+0; - b = 0.4175353646321745E+0; - v = 0.5384583126021542E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5726197380596287E+0; - b = 0.4612084406355461E+0; - v = 0.5411067210798852E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.2431520732564863E+0; - b = 0.4258040133043952E-1; - v = 0.4259797391468714E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3002096800895869E+0; - b = 0.8869424306722721E-1; - v = 0.4604931368460021E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3558554457457432E+0; - b = 0.1368811706510655E+0; - v = 0.4871814878255202E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4097782537048887E+0; - b = 0.1860739985015033E+0; - v = 0.5072242910074885E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4616337666067458E+0; - b = 0.2354235077395853E+0; - v = 0.5217069845235350E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5110707008417874E+0; - b = 0.2842074921347011E+0; - v = 0.5315785966280310E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5577415286163795E+0; - b = 0.3317784414984102E+0; - v = 0.5376833708758905E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6013060431366950E+0; - b = 0.3775299002040700E+0; - v = 0.5408032092069521E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3661596767261781E+0; - b = 0.4599367887164592E-1; - v = 0.4842744917904866E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4237633153506581E+0; - b = 0.9404893773654421E-1; - v = 0.5048926076188130E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4786328454658452E+0; - b = 0.1431377109091971E+0; - v = 0.5202607980478373E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5305702076789774E+0; - b = 0.1924186388843570E+0; - v = 0.5309932388325743E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5793436224231788E+0; - b = 0.2411590944775190E+0; - v = 0.5377419770895208E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6247069017094747E+0; - b = 0.2886871491583605E+0; - v = 0.5411696331677717E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4874315552535204E+0; - b = 0.4804978774953206E-1; - v = 0.5197996293282420E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5427337322059053E+0; - b = 0.9716857199366665E-1; - v = 0.5311120836622945E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5943493747246700E+0; - b = 0.1465205839795055E+0; - v = 0.5384309319956951E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6421314033564943E+0; - b = 0.1953579449803574E+0; - v = 0.5421859504051886E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6020628374713980E+0; - b = 0.4916375015738108E-1; - v = 0.5390948355046314E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6529222529856881E+0; - b = 0.9861621540127005E-1; - v = 0.5433312705027845E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - - break; - - case 2354: - - v = 0.3922616270665292E-4; - start = getLebedevReccurencePoints(1, start, a, b, v); - v = 0.4703831750854424E-3; - start = getLebedevReccurencePoints(2, start, a, b, v); - v = 0.4678202801282136E-3; - start = getLebedevReccurencePoints(3, start, a, b, v); - a = 0.2290024646530589E-1; - v = 0.1437832228979900E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.5779086652271284E-1; - v = 0.2303572493577644E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.9863103576375984E-1; - v = 0.2933110752447454E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.1428155792982185E+0; - v = 0.3402905998359838E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.1888978116601463E+0; - v = 0.3759138466870372E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.2359091682970210E+0; - v = 0.4030638447899798E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.2831228833706171E+0; - v = 0.4236591432242211E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.3299495857966693E+0; - v = 0.4390522656946746E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.3758840802660796E+0; - v = 0.4502523466626247E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.4204751831009480E+0; - v = 0.4580577727783541E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.4633068518751051E+0; - v = 0.4631391616615899E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.5039849474507313E+0; - v = 0.4660928953698676E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.5421265793440747E+0; - v = 0.4674751807936953E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6092660230557310E+0; - v = 0.4676414903932920E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6374654204984869E+0; - v = 0.4674086492347870E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6615136472609892E+0; - v = 0.4674928539483207E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6809487285958127E+0; - v = 0.4680748979686447E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6952980021665196E+0; - v = 0.4690449806389040E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.7041245497695400E+0; - v = 0.4699877075860818E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6744033088306065E-1; - v = 0.2099942281069176E-3; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.1678684485334166E+0; - v = 0.3172269150712804E-3; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.2793559049539613E+0; - v = 0.3832051358546523E-3; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.3935264218057639E+0; - v = 0.4252193818146985E-3; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.5052629268232558E+0; - v = 0.4513807963755000E-3; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.6107905315437531E+0; - v = 0.4657797469114178E-3; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.1135081039843524E+0; - b = 0.3331954884662588E-1; - v = 0.2733362800522836E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.1612866626099378E+0; - b = 0.7247167465436538E-1; - v = 0.3235485368463559E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.2100786550168205E+0; - b = 0.1151539110849745E+0; - v = 0.3624908726013453E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.2592282009459942E+0; - b = 0.1599491097143677E+0; - v = 0.3925540070712828E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3081740561320203E+0; - b = 0.2058699956028027E+0; - v = 0.4156129781116235E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3564289781578164E+0; - b = 0.2521624953502911E+0; - v = 0.4330644984623263E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4035587288240703E+0; - b = 0.2982090785797674E+0; - v = 0.4459677725921312E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4491671196373903E+0; - b = 0.3434762087235733E+0; - v = 0.4551593004456795E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4928854782917489E+0; - b = 0.3874831357203437E+0; - v = 0.4613341462749918E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5343646791958988E+0; - b = 0.4297814821746926E+0; - v = 0.4651019618269806E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5732683216530990E+0; - b = 0.4699402260943537E+0; - v = 0.4670249536100625E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.2214131583218986E+0; - b = 0.3873602040643895E-1; - v = 0.3549555576441708E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.2741796504750071E+0; - b = 0.8089496256902013E-1; - v = 0.3856108245249010E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3259797439149485E+0; - b = 0.1251732177620872E+0; - v = 0.4098622845756882E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3765441148826891E+0; - b = 0.1706260286403185E+0; - v = 0.4286328604268950E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4255773574530558E+0; - b = 0.2165115147300408E+0; - v = 0.4427802198993945E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4727795117058430E+0; - b = 0.2622089812225259E+0; - v = 0.4530473511488561E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5178546895819012E+0; - b = 0.3071721431296201E+0; - v = 0.4600805475703138E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5605141192097460E+0; - b = 0.3508998998801138E+0; - v = 0.4644599059958017E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6004763319352512E+0; - b = 0.3929160876166931E+0; - v = 0.4667274455712508E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3352842634946949E+0; - b = 0.4202563457288019E-1; - v = 0.4069360518020356E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3891971629814670E+0; - b = 0.8614309758870850E-1; - v = 0.4260442819919195E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4409875565542281E+0; - b = 0.1314500879380001E+0; - v = 0.4408678508029063E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4904893058592484E+0; - b = 0.1772189657383859E+0; - v = 0.4518748115548597E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5375056138769549E+0; - b = 0.2228277110050294E+0; - v = 0.4595564875375116E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5818255708669969E+0; - b = 0.2677179935014386E+0; - v = 0.4643988774315846E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6232334858144959E+0; - b = 0.3113675035544165E+0; - v = 0.4668827491646946E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4489485354492058E+0; - b = 0.4409162378368174E-1; - v = 0.4400541823741973E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5015136875933150E+0; - b = 0.8939009917748489E-1; - v = 0.4514512890193797E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5511300550512623E+0; - b = 0.1351806029383365E+0; - v = 0.4596198627347549E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5976720409858000E+0; - b = 0.1808370355053196E+0; - v = 0.4648659016801781E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6409956378989354E+0; - b = 0.2257852192301602E+0; - v = 0.4675502017157673E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5581222330827514E+0; - b = 0.4532173421637160E-1; - v = 0.4598494476455523E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6074705984161695E+0; - b = 0.9117488031840314E-1; - v = 0.4654916955152048E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6532272537379033E+0; - b = 0.1369294213140155E+0; - v = 0.4684709779505137E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6594761494500487E+0; - b = 0.4589901487275583E-1; - v = 0.4691445539106986E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - - break; - - case 2702: - - v = 0.2998675149888161E-4; - start = getLebedevReccurencePoints(1, start, a, b, v); - v = 0.4077860529495355E-3; - start = getLebedevReccurencePoints(3, start, a, b, v); - a = 0.2065562538818703E-1; - v = 0.1185349192520667E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.5250918173022379E-1; - v = 0.1913408643425751E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.8993480082038376E-1; - v = 0.2452886577209897E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.1306023924436019E+0; - v = 0.2862408183288702E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.1732060388531418E+0; - v = 0.3178032258257357E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.2168727084820249E+0; - v = 0.3422945667633690E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.2609528309173586E+0; - v = 0.3612790520235922E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.3049252927938952E+0; - v = 0.3758638229818521E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.3483484138084404E+0; - v = 0.3868711798859953E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.3908321549106406E+0; - v = 0.3949429933189938E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.4320210071894814E+0; - v = 0.4006068107541156E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.4715824795890053E+0; - v = 0.4043192149672723E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.5091984794078453E+0; - v = 0.4064947495808078E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.5445580145650803E+0; - v = 0.4075245619813152E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6072575796841768E+0; - v = 0.4076423540893566E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6339484505755803E+0; - v = 0.4074280862251555E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6570718257486958E+0; - v = 0.4074163756012244E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6762557330090709E+0; - v = 0.4077647795071246E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6911161696923790E+0; - v = 0.4084517552782530E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.7012841911659961E+0; - v = 0.4092468459224052E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.7064559272410020E+0; - v = 0.4097872687240906E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6123554989894765E-1; - v = 0.1738986811745028E-3; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.1533070348312393E+0; - v = 0.2659616045280191E-3; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.2563902605244206E+0; - v = 0.3240596008171533E-3; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.3629346991663361E+0; - v = 0.3621195964432943E-3; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.4683949968987538E+0; - v = 0.3868838330760539E-3; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.5694479240657952E+0; - v = 0.4018911532693111E-3; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.6634465430993955E+0; - v = 0.4089929432983252E-3; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.1033958573552305E+0; - b = 0.3034544009063584E-1; - v = 0.2279907527706409E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.1473521412414395E+0; - b = 0.6618803044247135E-1; - v = 0.2715205490578897E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.1924552158705967E+0; - b = 0.1054431128987715E+0; - v = 0.3057917896703976E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.2381094362890328E+0; - b = 0.1468263551238858E+0; - v = 0.3326913052452555E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.2838121707936760E+0; - b = 0.1894486108187886E+0; - v = 0.3537334711890037E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3291323133373415E+0; - b = 0.2326374238761579E+0; - v = 0.3700567500783129E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3736896978741460E+0; - b = 0.2758485808485768E+0; - v = 0.3825245372589122E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4171406040760013E+0; - b = 0.3186179331996921E+0; - v = 0.3918125171518296E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4591677985256915E+0; - b = 0.3605329796303794E+0; - v = 0.3984720419937579E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4994733831718418E+0; - b = 0.4012147253586509E+0; - v = 0.4029746003338211E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5377731830445096E+0; - b = 0.4403050025570692E+0; - v = 0.4057428632156627E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5737917830001331E+0; - b = 0.4774565904277483E+0; - v = 0.4071719274114857E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.2027323586271389E+0; - b = 0.3544122504976147E-1; - v = 0.2990236950664119E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.2516942375187273E+0; - b = 0.7418304388646328E-1; - v = 0.3262951734212878E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3000227995257181E+0; - b = 0.1150502745727186E+0; - v = 0.3482634608242413E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3474806691046342E+0; - b = 0.1571963371209364E+0; - v = 0.3656596681700892E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3938103180359209E+0; - b = 0.1999631877247100E+0; - v = 0.3791740467794218E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4387519590455703E+0; - b = 0.2428073457846535E+0; - v = 0.3894034450156905E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4820503960077787E+0; - b = 0.2852575132906155E+0; - v = 0.3968600245508371E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5234573778475101E+0; - b = 0.3268884208674639E+0; - v = 0.4019931351420050E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5627318647235282E+0; - b = 0.3673033321675939E+0; - v = 0.4052108801278599E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5996390607156954E+0; - b = 0.4061211551830290E+0; - v = 0.4068978613940934E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3084780753791947E+0; - b = 0.3860125523100059E-1; - v = 0.3454275351319704E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3589988275920223E+0; - b = 0.7928938987104867E-1; - v = 0.3629963537007920E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4078628415881973E+0; - b = 0.1212614643030087E+0; - v = 0.3770187233889873E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4549287258889735E+0; - b = 0.1638770827382693E+0; - v = 0.3878608613694378E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5000278512957279E+0; - b = 0.2065965798260176E+0; - v = 0.3959065270221274E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5429785044928199E+0; - b = 0.2489436378852235E+0; - v = 0.4015286975463570E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5835939850491711E+0; - b = 0.2904811368946891E+0; - v = 0.4050866785614717E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6216870353444856E+0; - b = 0.3307941957666609E+0; - v = 0.4069320185051913E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4151104662709091E+0; - b = 0.4064829146052554E-1; - v = 0.3760120964062763E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4649804275009218E+0; - b = 0.8258424547294755E-1; - v = 0.3870969564418064E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5124695757009662E+0; - b = 0.1251841962027289E+0; - v = 0.3955287790534055E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5574711100606224E+0; - b = 0.1679107505976331E+0; - v = 0.4015361911302668E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5998597333287227E+0; - b = 0.2102805057358715E+0; - v = 0.4053836986719548E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6395007148516600E+0; - b = 0.2518418087774107E+0; - v = 0.4073578673299117E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5188456224746252E+0; - b = 0.4194321676077518E-1; - v = 0.3954628379231406E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5664190707942778E+0; - b = 0.8457661551921499E-1; - v = 0.4017645508847530E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6110464353283153E+0; - b = 0.1273652932519396E+0; - v = 0.4059030348651293E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6526430302051563E+0; - b = 0.1698173239076354E+0; - v = 0.4080565809484880E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6167551880377548E+0; - b = 0.4266398851548864E-1; - v = 0.4063018753664651E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6607195418355383E+0; - b = 0.8551925814238349E-1; - v = 0.4087191292799671E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - - break; - - case 3074: - - v = 0.2599095953754734E-4; - start = getLebedevReccurencePoints(1, start, a, b, v); - v = 0.3603134089687541E-3; - start = getLebedevReccurencePoints(2, start, a, b, v); - v = 0.3586067974412447E-3; - start = getLebedevReccurencePoints(3, start, a, b, v); - a = 0.1886108518723392E-1; - v = 0.9831528474385880E-4; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.4800217244625303E-1; - v = 0.1605023107954450E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.8244922058397242E-1; - v = 0.2072200131464099E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.1200408362484023E+0; - v = 0.2431297618814187E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.1595773530809965E+0; - v = 0.2711819064496707E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.2002635973434064E+0; - v = 0.2932762038321116E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.2415127590139982E+0; - v = 0.3107032514197368E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.2828584158458477E+0; - v = 0.3243808058921213E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.3239091015338138E+0; - v = 0.3349899091374030E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.3643225097962194E+0; - v = 0.3430580688505218E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.4037897083691802E+0; - v = 0.3490124109290343E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.4420247515194127E+0; - v = 0.3532148948561955E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.4787572538464938E+0; - v = 0.3559862669062833E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.5137265251275234E+0; - v = 0.3576224317551411E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.5466764056654611E+0; - v = 0.3584050533086076E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6054859420813535E+0; - v = 0.3584903581373224E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6308106701764562E+0; - v = 0.3582991879040586E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6530369230179584E+0; - v = 0.3582371187963125E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6718609524611158E+0; - v = 0.3584353631122350E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6869676499894013E+0; - v = 0.3589120166517785E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6980467077240748E+0; - v = 0.3595445704531601E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.7048241721250522E+0; - v = 0.3600943557111074E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.5591105222058232E-1; - v = 0.1456447096742039E-3; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.1407384078513916E+0; - v = 0.2252370188283782E-3; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.2364035438976309E+0; - v = 0.2766135443474897E-3; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.3360602737818170E+0; - v = 0.3110729491500851E-3; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.4356292630054665E+0; - v = 0.3342506712303391E-3; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.5321569415256174E+0; - v = 0.3491981834026860E-3; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.6232956305040554E+0; - v = 0.3576003604348932E-3; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.9469870086838469E-1; - b = 0.2778748387309470E-1; - v = 0.1921921305788564E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.1353170300568141E+0; - b = 0.6076569878628364E-1; - v = 0.2301458216495632E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.1771679481726077E+0; - b = 0.9703072762711040E-1; - v = 0.2604248549522893E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.2197066664231751E+0; - b = 0.1354112458524762E+0; - v = 0.2845275425870697E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.2624783557374927E+0; - b = 0.1750996479744100E+0; - v = 0.3036870897974840E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3050969521214442E+0; - b = 0.2154896907449802E+0; - v = 0.3188414832298066E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3472252637196021E+0; - b = 0.2560954625740152E+0; - v = 0.3307046414722089E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3885610219026360E+0; - b = 0.2965070050624096E+0; - v = 0.3398330969031360E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4288273776062765E+0; - b = 0.3363641488734497E+0; - v = 0.3466757899705373E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4677662471302948E+0; - b = 0.3753400029836788E+0; - v = 0.3516095923230054E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5051333589553359E+0; - b = 0.4131297522144286E+0; - v = 0.3549645184048486E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5406942145810492E+0; - b = 0.4494423776081795E+0; - v = 0.3570415969441392E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5742204122576457E+0; - b = 0.4839938958841502E+0; - v = 0.3581251798496118E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.1865407027225188E+0; - b = 0.3259144851070796E-1; - v = 0.2543491329913348E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.2321186453689432E+0; - b = 0.6835679505297343E-1; - v = 0.2786711051330776E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.2773159142523882E+0; - b = 0.1062284864451989E+0; - v = 0.2985552361083679E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3219200192237254E+0; - b = 0.1454404409323047E+0; - v = 0.3145867929154039E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3657032593944029E+0; - b = 0.1854018282582510E+0; - v = 0.3273290662067609E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4084376778363622E+0; - b = 0.2256297412014750E+0; - v = 0.3372705511943501E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4499004945751427E+0; - b = 0.2657104425000896E+0; - v = 0.3448274437851510E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4898758141326335E+0; - b = 0.3052755487631557E+0; - v = 0.3503592783048583E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5281547442266309E+0; - b = 0.3439863920645423E+0; - v = 0.3541854792663162E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5645346989813992E+0; - b = 0.3815229456121914E+0; - v = 0.3565995517909428E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5988181252159848E+0; - b = 0.4175752420966734E+0; - v = 0.3578802078302898E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.2850425424471603E+0; - b = 0.3562149509862536E-1; - v = 0.2958644592860982E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3324619433027876E+0; - b = 0.7330318886871096E-1; - v = 0.3119548129116835E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3785848333076282E+0; - b = 0.1123226296008472E+0; - v = 0.3250745225005984E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4232891028562115E+0; - b = 0.1521084193337708E+0; - v = 0.3355153415935208E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4664287050829722E+0; - b = 0.1921844459223610E+0; - v = 0.3435847568549328E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5078458493735726E+0; - b = 0.2321360989678303E+0; - v = 0.3495786831622488E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5473779816204180E+0; - b = 0.2715886486360520E+0; - v = 0.3537767805534621E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5848617133811376E+0; - b = 0.3101924707571355E+0; - v = 0.3564459815421428E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6201348281584888E+0; - b = 0.3476121052890973E+0; - v = 0.3578464061225468E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3852191185387871E+0; - b = 0.3763224880035108E-1; - v = 0.3239748762836212E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4325025061073423E+0; - b = 0.7659581935637135E-1; - v = 0.3345491784174287E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4778486229734490E+0; - b = 0.1163381306083900E+0; - v = 0.3429126177301782E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5211663693009000E+0; - b = 0.1563890598752899E+0; - v = 0.3492420343097421E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5623469504853703E+0; - b = 0.1963320810149200E+0; - v = 0.3537399050235257E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6012718188659246E+0; - b = 0.2357847407258738E+0; - v = 0.3566209152659172E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6378179206390117E+0; - b = 0.2743846121244060E+0; - v = 0.3581084321919782E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4836936460214534E+0; - b = 0.3895902610739024E-1; - v = 0.3426522117591512E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5293792562683797E+0; - b = 0.7871246819312640E-1; - v = 0.3491848770121379E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5726281253100033E+0; - b = 0.1187963808202981E+0; - v = 0.3539318235231476E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6133658776169068E+0; - b = 0.1587914708061787E+0; - v = 0.3570231438458694E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6515085491865307E+0; - b = 0.1983058575227646E+0; - v = 0.3586207335051714E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5778692716064976E+0; - b = 0.3977209689791542E-1; - v = 0.3541196205164025E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6207904288086192E+0; - b = 0.7990157592981152E-1; - v = 0.3574296911573953E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6608688171046802E+0; - b = 0.1199671308754309E+0; - v = 0.3591993279818963E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6656263089489130E+0; - b = 0.4015955957805969E-1; - v = 0.3595855034661997E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - - break; - - case 3470: - - v = 0.2040382730826330E-4; - start = getLebedevReccurencePoints(1, start, a, b, v); - v = 0.3178149703889544E-3; - start = getLebedevReccurencePoints(3, start, a, b, v); - a = 0.1721420832906233E-1; - v = 0.8288115128076110E-4; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.4408875374981770E-1; - v = 0.1360883192522954E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.7594680813878681E-1; - v = 0.1766854454542662E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.1108335359204799E+0; - v = 0.2083153161230153E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.1476517054388567E+0; - v = 0.2333279544657158E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.1856731870860615E+0; - v = 0.2532809539930247E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.2243634099428821E+0; - v = 0.2692472184211158E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.2633006881662727E+0; - v = 0.2819949946811885E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.3021340904916283E+0; - v = 0.2920953593973030E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.3405594048030089E+0; - v = 0.2999889782948352E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.3783044434007372E+0; - v = 0.3060292120496902E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.4151194767407910E+0; - v = 0.3105109167522192E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.4507705766443257E+0; - v = 0.3136902387550312E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.4850346056573187E+0; - v = 0.3157984652454632E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.5176950817792470E+0; - v = 0.3170516518425422E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.5485384240820989E+0; - v = 0.3176568425633755E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6039117238943308E+0; - v = 0.3177198411207062E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6279956655573113E+0; - v = 0.3175519492394733E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6493636169568952E+0; - v = 0.3174654952634756E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6677644117704504E+0; - v = 0.3175676415467654E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6829368572115624E+0; - v = 0.3178923417835410E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6946195818184121E+0; - v = 0.3183788287531909E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.7025711542057026E+0; - v = 0.3188755151918807E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.7066004767140119E+0; - v = 0.3191916889313849E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.5132537689946062E-1; - v = 0.1231779611744508E-3; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.1297994661331225E+0; - v = 0.1924661373839880E-3; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.2188852049401307E+0; - v = 0.2380881867403424E-3; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.3123174824903457E+0; - v = 0.2693100663037885E-3; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.4064037620738195E+0; - v = 0.2908673382834366E-3; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.4984958396944782E+0; - v = 0.3053914619381535E-3; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.5864975046021365E+0; - v = 0.3143916684147777E-3; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.6686711634580175E+0; - v = 0.3187042244055363E-3; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.8715738780835950E-1; - b = 0.2557175233367578E-1; - v = 0.1635219535869790E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.1248383123134007E+0; - b = 0.5604823383376681E-1; - v = 0.1968109917696070E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.1638062693383378E+0; - b = 0.8968568601900765E-1; - v = 0.2236754342249974E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.2035586203373176E+0; - b = 0.1254086651976279E+0; - v = 0.2453186687017181E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.2436798975293774E+0; - b = 0.1624780150162012E+0; - v = 0.2627551791580541E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.2838207507773806E+0; - b = 0.2003422342683208E+0; - v = 0.2767654860152220E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3236787502217692E+0; - b = 0.2385628026255263E+0; - v = 0.2879467027765895E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3629849554840691E+0; - b = 0.2767731148783578E+0; - v = 0.2967639918918702E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4014948081992087E+0; - b = 0.3146542308245309E+0; - v = 0.3035900684660351E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4389818379260225E+0; - b = 0.3519196415895088E+0; - v = 0.3087338237298308E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4752331143674377E+0; - b = 0.3883050984023654E+0; - v = 0.3124608838860167E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5100457318374018E+0; - b = 0.4235613423908649E+0; - v = 0.3150084294226743E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5432238388954868E+0; - b = 0.4574484717196220E+0; - v = 0.3165958398598402E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5745758685072442E+0; - b = 0.4897311639255524E+0; - v = 0.3174320440957372E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.1723981437592809E+0; - b = 0.3010630597881105E-1; - v = 0.2182188909812599E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.2149553257844597E+0; - b = 0.6326031554204694E-1; - v = 0.2399727933921445E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.2573256081247422E+0; - b = 0.9848566980258631E-1; - v = 0.2579796133514652E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.2993163751238106E+0; - b = 0.1350835952384266E+0; - v = 0.2727114052623535E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3407238005148000E+0; - b = 0.1725184055442181E+0; - v = 0.2846327656281355E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3813454978483264E+0; - b = 0.2103559279730725E+0; - v = 0.2941491102051334E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4209848104423343E+0; - b = 0.2482278774554860E+0; - v = 0.3016049492136107E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4594519699996300E+0; - b = 0.2858099509982883E+0; - v = 0.3072949726175648E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4965640166185930E+0; - b = 0.3228075659915428E+0; - v = 0.3114768142886460E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5321441655571562E+0; - b = 0.3589459907204151E+0; - v = 0.3143823673666223E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5660208438582166E+0; - b = 0.3939630088864310E+0; - v = 0.3162269764661535E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5980264315964364E+0; - b = 0.4276029922949089E+0; - v = 0.3172164663759821E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.2644215852350733E+0; - b = 0.3300939429072552E-1; - v = 0.2554575398967435E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3090113743443063E+0; - b = 0.6803887650078501E-1; - v = 0.2701704069135677E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3525871079197808E+0; - b = 0.1044326136206709E+0; - v = 0.2823693413468940E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3950418005354029E+0; - b = 0.1416751597517679E+0; - v = 0.2922898463214289E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4362475663430163E+0; - b = 0.1793408610504821E+0; - v = 0.3001829062162428E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4760661812145854E+0; - b = 0.2170630750175722E+0; - v = 0.3062890864542953E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5143551042512103E+0; - b = 0.2545145157815807E+0; - v = 0.3108328279264746E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5509709026935597E+0; - b = 0.2913940101706601E+0; - v = 0.3140243146201245E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5857711030329428E+0; - b = 0.3274169910910705E+0; - v = 0.3160638030977130E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6186149917404392E+0; - b = 0.3623081329317265E+0; - v = 0.3171462882206275E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3586894569557064E+0; - b = 0.3497354386450040E-1; - v = 0.2812388416031796E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4035266610019441E+0; - b = 0.7129736739757095E-1; - v = 0.2912137500288045E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4467775312332510E+0; - b = 0.1084758620193165E+0; - v = 0.2993241256502206E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4883638346608543E+0; - b = 0.1460915689241772E+0; - v = 0.3057101738983822E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5281908348434601E+0; - b = 0.1837790832369980E+0; - v = 0.3105319326251432E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5661542687149311E+0; - b = 0.2212075390874021E+0; - v = 0.3139565514428167E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6021450102031452E+0; - b = 0.2580682841160985E+0; - v = 0.3161543006806366E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6360520783610050E+0; - b = 0.2940656362094121E+0; - v = 0.3172985960613294E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4521611065087196E+0; - b = 0.3631055365867002E-1; - v = 0.2989400336901431E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4959365651560963E+0; - b = 0.7348318468484350E-1; - v = 0.3054555883947677E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5376815804038283E+0; - b = 0.1111087643812648E+0; - v = 0.3104764960807702E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5773314480243768E+0; - b = 0.1488226085145408E+0; - v = 0.3141015825977616E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6148113245575056E+0; - b = 0.1862892274135151E+0; - v = 0.3164520621159896E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6500407462842380E+0; - b = 0.2231909701714456E+0; - v = 0.3176652305912204E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5425151448707213E+0; - b = 0.3718201306118944E-1; - v = 0.3105097161023939E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5841860556907931E+0; - b = 0.7483616335067346E-1; - v = 0.3143014117890550E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6234632186851500E+0; - b = 0.1125990834266120E+0; - v = 0.3168172866287200E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6602934551848843E+0; - b = 0.1501303813157619E+0; - v = 0.3181401865570968E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6278573968375105E+0; - b = 0.3767559930245720E-1; - v = 0.3170663659156037E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6665611711264577E+0; - b = 0.7548443301360158E-1; - v = 0.3185447944625510E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - - break; - - case 3890: - - v = 0.1807395252196920E-4; - start = getLebedevReccurencePoints(1, start, a, b, v); - v = 0.2848008782238827E-3; - start = getLebedevReccurencePoints(2, start, a, b, v); - v = 0.2836065837530581E-3; - start = getLebedevReccurencePoints(3, start, a, b, v); - a = 0.1587876419858352E-1; - v = 0.7013149266673816E-4; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.4069193593751206E-1; - v = 0.1162798021956766E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.7025888115257997E-1; - v = 0.1518728583972105E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.1027495450028704E+0; - v = 0.1798796108216934E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.1371457730893426E+0; - v = 0.2022593385972785E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.1727758532671953E+0; - v = 0.2203093105575464E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.2091492038929037E+0; - v = 0.2349294234299855E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.2458813281751915E+0; - v = 0.2467682058747003E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.2826545859450066E+0; - v = 0.2563092683572224E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.3191957291799622E+0; - v = 0.2639253896763318E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.3552621469299578E+0; - v = 0.2699137479265108E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.3906329503406230E+0; - v = 0.2745196420166739E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.4251028614093031E+0; - v = 0.2779529197397593E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.4584777520111870E+0; - v = 0.2803996086684265E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.4905711358710193E+0; - v = 0.2820302356715842E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.5212011669847385E+0; - v = 0.2830056747491068E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.5501878488737995E+0; - v = 0.2834808950776839E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6025037877479342E+0; - v = 0.2835282339078929E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6254572689549016E+0; - v = 0.2833819267065800E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6460107179528248E+0; - v = 0.2832858336906784E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6639541138154251E+0; - v = 0.2833268235451244E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6790688515667495E+0; - v = 0.2835432677029253E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6911338580371512E+0; - v = 0.2839091722743049E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6999385956126490E+0; - v = 0.2843308178875841E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.7053037748656896E+0; - v = 0.2846703550533846E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.4732224387180115E-1; - v = 0.1051193406971900E-3; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.1202100529326803E+0; - v = 0.1657871838796974E-3; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.2034304820664855E+0; - v = 0.2064648113714232E-3; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.2912285643573002E+0; - v = 0.2347942745819741E-3; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.3802361792726768E+0; - v = 0.2547775326597726E-3; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.4680598511056146E+0; - v = 0.2686876684847025E-3; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.5528151052155599E+0; - v = 0.2778665755515867E-3; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.6329386307803041E+0; - v = 0.2830996616782929E-3; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.8056516651369069E-1; - b = 0.2363454684003124E-1; - v = 0.1403063340168372E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.1156476077139389E+0; - b = 0.5191291632545936E-1; - v = 0.1696504125939477E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.1520473382760421E+0; - b = 0.8322715736994519E-1; - v = 0.1935787242745390E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.1892986699745931E+0; - b = 0.1165855667993712E+0; - v = 0.2130614510521968E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.2270194446777792E+0; - b = 0.1513077167409504E+0; - v = 0.2289381265931048E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.2648908185093273E+0; - b = 0.1868882025807859E+0; - v = 0.2418630292816186E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3026389259574136E+0; - b = 0.2229277629776224E+0; - v = 0.2523400495631193E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3400220296151384E+0; - b = 0.2590951840746235E+0; - v = 0.2607623973449605E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3768217953335510E+0; - b = 0.2951047291750847E+0; - v = 0.2674441032689209E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4128372900921884E+0; - b = 0.3307019714169930E+0; - v = 0.2726432360343356E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4478807131815630E+0; - b = 0.3656544101087634E+0; - v = 0.2765787685924545E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4817742034089257E+0; - b = 0.3997448951939695E+0; - v = 0.2794428690642224E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5143472814653344E+0; - b = 0.4327667110812024E+0; - v = 0.2814099002062895E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5454346213905650E+0; - b = 0.4645196123532293E+0; - v = 0.2826429531578994E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5748739313170252E+0; - b = 0.4948063555703345E+0; - v = 0.2832983542550884E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.1599598738286342E+0; - b = 0.2792357590048985E-1; - v = 0.1886695565284976E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.1998097412500951E+0; - b = 0.5877141038139065E-1; - v = 0.2081867882748234E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.2396228952566202E+0; - b = 0.9164573914691377E-1; - v = 0.2245148680600796E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.2792228341097746E+0; - b = 0.1259049641962687E+0; - v = 0.2380370491511872E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3184251107546741E+0; - b = 0.1610594823400863E+0; - v = 0.2491398041852455E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3570481164426244E+0; - b = 0.1967151653460898E+0; - v = 0.2581632405881230E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3949164710492144E+0; - b = 0.2325404606175168E+0; - v = 0.2653965506227417E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4318617293970503E+0; - b = 0.2682461141151439E+0; - v = 0.2710857216747087E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4677221009931678E+0; - b = 0.3035720116011973E+0; - v = 0.2754434093903659E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5023417939270955E+0; - b = 0.3382781859197439E+0; - v = 0.2786579932519380E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5355701836636128E+0; - b = 0.3721383065625942E+0; - v = 0.2809011080679474E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5672608451328771E+0; - b = 0.4049346360466055E+0; - v = 0.2823336184560987E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5972704202540162E+0; - b = 0.4364538098633802E+0; - v = 0.2831101175806309E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.2461687022333596E+0; - b = 0.3070423166833368E-1; - v = 0.2221679970354546E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.2881774566286831E+0; - b = 0.6338034669281885E-1; - v = 0.2356185734270703E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3293963604116978E+0; - b = 0.9742862487067941E-1; - v = 0.2469228344805590E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3697303822241377E+0; - b = 0.1323799532282290E+0; - v = 0.2562726348642046E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4090663023135127E+0; - b = 0.1678497018129336E+0; - v = 0.2638756726753028E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4472819355411712E+0; - b = 0.2035095105326114E+0; - v = 0.2699311157390862E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4842513377231437E+0; - b = 0.2390692566672091E+0; - v = 0.2746233268403837E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5198477629962928E+0; - b = 0.2742649818076149E+0; - v = 0.2781225674454771E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5539453011883145E+0; - b = 0.3088503806580094E+0; - v = 0.2805881254045684E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5864196762401251E+0; - b = 0.3425904245906614E+0; - v = 0.2821719877004913E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6171484466668390E+0; - b = 0.3752562294789468E+0; - v = 0.2830222502333124E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3350337830565727E+0; - b = 0.3261589934634747E-1; - v = 0.2457995956744870E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3775773224758284E+0; - b = 0.6658438928081572E-1; - v = 0.2551474407503706E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4188155229848973E+0; - b = 0.1014565797157954E+0; - v = 0.2629065335195311E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4586805892009344E+0; - b = 0.1368573320843822E+0; - v = 0.2691900449925075E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4970895714224235E+0; - b = 0.1724614851951608E+0; - v = 0.2741275485754276E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5339505133960747E+0; - b = 0.2079779381416412E+0; - v = 0.2778530970122595E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5691665792531440E+0; - b = 0.2431385788322288E+0; - v = 0.2805010567646741E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6026387682680377E+0; - b = 0.2776901883049853E+0; - v = 0.2822055834031040E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6342676150163307E+0; - b = 0.3113881356386632E+0; - v = 0.2831016901243473E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4237951119537067E+0; - b = 0.3394877848664351E-1; - v = 0.2624474901131803E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4656918683234929E+0; - b = 0.6880219556291447E-1; - v = 0.2688034163039377E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5058857069185980E+0; - b = 0.1041946859721635E+0; - v = 0.2738932751287636E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5443204666713996E+0; - b = 0.1398039738736393E+0; - v = 0.2777944791242523E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5809298813759742E+0; - b = 0.1753373381196155E+0; - v = 0.2806011661660987E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6156416039447128E+0; - b = 0.2105215793514010E+0; - v = 0.2824181456597460E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6483801351066604E+0; - b = 0.2450953312157051E+0; - v = 0.2833585216577828E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5103616577251688E+0; - b = 0.3485560643800719E-1; - v = 0.2738165236962878E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5506738792580681E+0; - b = 0.7026308631512033E-1; - v = 0.2778365208203180E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5889573040995292E+0; - b = 0.1059035061296403E+0; - v = 0.2807852940418966E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6251641589516930E+0; - b = 0.1414823925236026E+0; - v = 0.2827245949674705E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6592414921570178E+0; - b = 0.1767207908214530E+0; - v = 0.2837342344829828E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5930314017533384E+0; - b = 0.3542189339561672E-1; - v = 0.2809233907610981E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6309812253390175E+0; - b = 0.7109574040369549E-1; - v = 0.2829930809742694E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6666296011353230E+0; - b = 0.1067259792282730E+0; - v = 0.2841097874111479E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6703715271049922E+0; - b = 0.3569455268820809E-1; - v = 0.2843455206008783E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - - break; - - case 4334: - - v = 0.1449063022537883E-4; - start = getLebedevReccurencePoints(1, start, a, b, v); - v = 0.2546377329828424E-3; - start = getLebedevReccurencePoints(3, start, a, b, v); - a = 0.1462896151831013E-1; - v = 0.6018432961087496E-4; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.3769840812493139E-1; - v = 0.1002286583263673E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6524701904096891E-1; - v = 0.1315222931028093E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.9560543416134648E-1; - v = 0.1564213746876724E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.1278335898929198E+0; - v = 0.1765118841507736E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.1613096104466031E+0; - v = 0.1928737099311080E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.1955806225745371E+0; - v = 0.2062658534263270E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.2302935218498028E+0; - v = 0.2172395445953787E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.2651584344113027E+0; - v = 0.2262076188876047E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.2999276825183209E+0; - v = 0.2334885699462397E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.3343828669718798E+0; - v = 0.2393355273179203E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.3683265013750518E+0; - v = 0.2439559200468863E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.4015763206518108E+0; - v = 0.2475251866060002E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.4339612026399770E+0; - v = 0.2501965558158773E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.4653180651114582E+0; - v = 0.2521081407925925E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.4954893331080803E+0; - v = 0.2533881002388081E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.5243207068924930E+0; - v = 0.2541582900848261E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.5516590479041704E+0; - v = 0.2545365737525860E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6012371927804176E+0; - v = 0.2545726993066799E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6231574466449819E+0; - v = 0.2544456197465555E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6429416514181271E+0; - v = 0.2543481596881064E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6604124272943595E+0; - v = 0.2543506451429194E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6753851470408250E+0; - v = 0.2544905675493763E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6876717970626160E+0; - v = 0.2547611407344429E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6970895061319234E+0; - v = 0.2551060375448869E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.7034746912553310E+0; - v = 0.2554291933816039E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.7067017217542295E+0; - v = 0.2556255710686343E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.4382223501131123E-1; - v = 0.9041339695118195E-4; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.1117474077400006E+0; - v = 0.1438426330079022E-3; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.1897153252911440E+0; - v = 0.1802523089820518E-3; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.2724023009910331E+0; - v = 0.2060052290565496E-3; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.3567163308709902E+0; - v = 0.2245002248967466E-3; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.4404784483028087E+0; - v = 0.2377059847731150E-3; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.5219833154161411E+0; - v = 0.2468118955882525E-3; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.5998179868977553E+0; - v = 0.2525410872966528E-3; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.6727803154548222E+0; - v = 0.2553101409933397E-3; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.7476563943166086E-1; - b = 0.2193168509461185E-1; - v = 0.1212879733668632E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.1075341482001416E+0; - b = 0.4826419281533887E-1; - v = 0.1472872881270931E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.1416344885203259E+0; - b = 0.7751191883575742E-1; - v = 0.1686846601010828E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.1766325315388586E+0; - b = 0.1087558139247680E+0; - v = 0.1862698414660208E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.2121744174481514E+0; - b = 0.1413661374253096E+0; - v = 0.2007430956991861E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.2479669443408145E+0; - b = 0.1748768214258880E+0; - v = 0.2126568125394796E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.2837600452294113E+0; - b = 0.2089216406612073E+0; - v = 0.2224394603372113E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3193344933193984E+0; - b = 0.2431987685545972E+0; - v = 0.2304264522673135E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3544935442438745E+0; - b = 0.2774497054377770E+0; - v = 0.2368854288424087E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3890571932288154E+0; - b = 0.3114460356156915E+0; - v = 0.2420352089461772E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4228581214259090E+0; - b = 0.3449806851913012E+0; - v = 0.2460597113081295E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4557387211304052E+0; - b = 0.3778618641248256E+0; - v = 0.2491181912257687E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4875487950541643E+0; - b = 0.4099086391698978E+0; - v = 0.2513528194205857E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5181436529962997E+0; - b = 0.4409474925853973E+0; - v = 0.2528943096693220E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5473824095600661E+0; - b = 0.4708094517711291E+0; - v = 0.2538660368488136E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5751263398976174E+0; - b = 0.4993275140354637E+0; - v = 0.2543868648299022E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.1489515746840028E+0; - b = 0.2599381993267017E-1; - v = 0.1642595537825183E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.1863656444351767E+0; - b = 0.5479286532462190E-1; - v = 0.1818246659849308E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.2238602880356348E+0; - b = 0.8556763251425254E-1; - v = 0.1966565649492420E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.2612723375728160E+0; - b = 0.1177257802267011E+0; - v = 0.2090677905657991E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.2984332990206190E+0; - b = 0.1508168456192700E+0; - v = 0.2193820409510504E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3351786584663333E+0; - b = 0.1844801892177727E+0; - v = 0.2278870827661928E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3713505522209120E+0; - b = 0.2184145236087598E+0; - v = 0.2348283192282090E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4067981098954663E+0; - b = 0.2523590641486229E+0; - v = 0.2404139755581477E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4413769993687534E+0; - b = 0.2860812976901373E+0; - v = 0.2448227407760734E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4749487182516394E+0; - b = 0.3193686757808996E+0; - v = 0.2482110455592573E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5073798105075426E+0; - b = 0.3520226949547602E+0; - v = 0.2507192397774103E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5385410448878654E+0; - b = 0.3838544395667890E+0; - v = 0.2524765968534880E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5683065353670530E+0; - b = 0.4146810037640963E+0; - v = 0.2536052388539425E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5965527620663510E+0; - b = 0.4443224094681121E+0; - v = 0.2542230588033068E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.2299227700856157E+0; - b = 0.2865757664057584E-1; - v = 0.1944817013047896E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.2695752998553267E+0; - b = 0.5923421684485993E-1; - v = 0.2067862362746635E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3086178716611389E+0; - b = 0.9117817776057715E-1; - v = 0.2172440734649114E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3469649871659077E+0; - b = 0.1240593814082605E+0; - v = 0.2260125991723423E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3845153566319655E+0; - b = 0.1575272058259175E+0; - v = 0.2332655008689523E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4211600033403215E+0; - b = 0.1912845163525413E+0; - v = 0.2391699681532458E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4567867834329882E+0; - b = 0.2250710177858171E+0; - v = 0.2438801528273928E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4912829319232061E+0; - b = 0.2586521303440910E+0; - v = 0.2475370504260665E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5245364793303812E+0; - b = 0.2918112242865407E+0; - v = 0.2502707235640574E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5564369788915756E+0; - b = 0.3243439239067890E+0; - v = 0.2522031701054241E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5868757697775287E+0; - b = 0.3560536787835351E+0; - v = 0.2534511269978784E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6157458853519617E+0; - b = 0.3867480821242581E+0; - v = 0.2541284914955151E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3138461110672113E+0; - b = 0.3051374637507278E-1; - v = 0.2161509250688394E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3542495872050569E+0; - b = 0.6237111233730755E-1; - v = 0.2248778513437852E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3935751553120181E+0; - b = 0.9516223952401907E-1; - v = 0.2322388803404617E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4317634668111147E+0; - b = 0.1285467341508517E+0; - v = 0.2383265471001355E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4687413842250821E+0; - b = 0.1622318931656033E+0; - v = 0.2432476675019525E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5044274237060283E+0; - b = 0.1959581153836453E+0; - v = 0.2471122223750674E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5387354077925727E+0; - b = 0.2294888081183837E+0; - v = 0.2500291752486870E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5715768898356105E+0; - b = 0.2626031152713945E+0; - v = 0.2521055942764682E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6028627200136111E+0; - b = 0.2950904075286713E+0; - v = 0.2534472785575503E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6325039812653463E+0; - b = 0.3267458451113286E+0; - v = 0.2541599713080121E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3981986708423407E+0; - b = 0.3183291458749821E-1; - v = 0.2317380975862936E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4382791182133300E+0; - b = 0.6459548193880908E-1; - v = 0.2378550733719775E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4769233057218166E+0; - b = 0.9795757037087952E-1; - v = 0.2428884456739118E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5140823911194238E+0; - b = 0.1316307235126655E+0; - v = 0.2469002655757292E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5496977833862983E+0; - b = 0.1653556486358704E+0; - v = 0.2499657574265851E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5837047306512727E+0; - b = 0.1988931724126510E+0; - v = 0.2521676168486082E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6160349566926879E+0; - b = 0.2320174581438950E+0; - v = 0.2535935662645334E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6466185353209440E+0; - b = 0.2645106562168662E+0; - v = 0.2543356743363214E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4810835158795404E+0; - b = 0.3275917807743992E-1; - v = 0.2427353285201535E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5199925041324341E+0; - b = 0.6612546183967181E-1; - v = 0.2468258039744386E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5571717692207494E+0; - b = 0.9981498331474143E-1; - v = 0.2500060956440310E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5925789250836378E+0; - b = 0.1335687001410374E+0; - v = 0.2523238365420979E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6261658523859670E+0; - b = 0.1671444402896463E+0; - v = 0.2538399260252846E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6578811126669331E+0; - b = 0.2003106382156076E+0; - v = 0.2546255927268069E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5609624612998100E+0; - b = 0.3337500940231335E-1; - v = 0.2500583360048449E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5979959659984670E+0; - b = 0.6708750335901803E-1; - v = 0.2524777638260203E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6330523711054002E+0; - b = 0.1008792126424850E+0; - v = 0.2540951193860656E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6660960998103972E+0; - b = 0.1345050343171794E+0; - v = 0.2549524085027472E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6365384364585819E+0; - b = 0.3372799460737052E-1; - v = 0.2542569507009158E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6710994302899275E+0; - b = 0.6755249309678028E-1; - v = 0.2552114127580376E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - - break; - - case 4802: - - v = 0.9687521879420705E-4; - start = getLebedevReccurencePoints(1, start, a, b, v); - v = 0.2307897895367918E-3; - start = getLebedevReccurencePoints(2, start, a, b, v); - v = 0.2297310852498558E-3; - start = getLebedevReccurencePoints(3, start, a, b, v); - a = 0.2335728608887064E-1; - v = 0.7386265944001919E-4; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.4352987836550653E-1; - v = 0.8257977698542210E-4; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6439200521088801E-1; - v = 0.9706044762057630E-4; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.9003943631993181E-1; - v = 0.1302393847117003E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.1196706615548473E+0; - v = 0.1541957004600968E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.1511715412838134E+0; - v = 0.1704459770092199E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.1835982828503801E+0; - v = 0.1827374890942906E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.2165081259155405E+0; - v = 0.1926360817436107E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.2496208720417563E+0; - v = 0.2008010239494833E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.2827200673567900E+0; - v = 0.2075635983209175E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.3156190823994346E+0; - v = 0.2131306638690909E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.3481476793749115E+0; - v = 0.2176562329937335E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.3801466086947226E+0; - v = 0.2212682262991018E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.4114652119634011E+0; - v = 0.2240799515668565E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.4419598786519751E+0; - v = 0.2261959816187525E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.4714925949329543E+0; - v = 0.2277156368808855E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.4999293972879466E+0; - v = 0.2287351772128336E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.5271387221431248E+0; - v = 0.2293490814084085E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.5529896780837761E+0; - v = 0.2296505312376273E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6000856099481712E+0; - v = 0.2296793832318756E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6210562192785175E+0; - v = 0.2295785443842974E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6401165879934240E+0; - v = 0.2295017931529102E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6571144029244334E+0; - v = 0.2295059638184868E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6718910821718863E+0; - v = 0.2296232343237362E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6842845591099010E+0; - v = 0.2298530178740771E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6941353476269816E+0; - v = 0.2301579790280501E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.7012965242212991E+0; - v = 0.2304690404996513E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.7056471428242644E+0; - v = 0.2307027995907102E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.4595557643585895E-1; - v = 0.9312274696671092E-4; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.1049316742435023E+0; - v = 0.1199919385876926E-3; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.1773548879549274E+0; - v = 0.1598039138877690E-3; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.2559071411236127E+0; - v = 0.1822253763574900E-3; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.3358156837985898E+0; - v = 0.1988579593655040E-3; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.4155835743763893E+0; - v = 0.2112620102533307E-3; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.4937894296167472E+0; - v = 0.2201594887699007E-3; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.5691569694793316E+0; - v = 0.2261622590895036E-3; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.6405840854894251E+0; - v = 0.2296458453435705E-3; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.7345133894143348E-1; - b = 0.2177844081486067E-1; - v = 0.1006006990267000E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.1009859834044931E+0; - b = 0.4590362185775188E-1; - v = 0.1227676689635876E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.1324289619748758E+0; - b = 0.7255063095690877E-1; - v = 0.1467864280270117E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.1654272109607127E+0; - b = 0.1017825451960684E+0; - v = 0.1644178912101232E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.1990767186776461E+0; - b = 0.1325652320980364E+0; - v = 0.1777664890718961E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.2330125945523278E+0; - b = 0.1642765374496765E+0; - v = 0.1884825664516690E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.2670080611108287E+0; - b = 0.1965360374337889E+0; - v = 0.1973269246453848E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3008753376294316E+0; - b = 0.2290726770542238E+0; - v = 0.2046767775855328E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3344475596167860E+0; - b = 0.2616645495370823E+0; - v = 0.2107600125918040E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3675709724070786E+0; - b = 0.2941150728843141E+0; - v = 0.2157416362266829E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4001000887587812E+0; - b = 0.3262440400919066E+0; - v = 0.2197557816920721E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4318956350436028E+0; - b = 0.3578835350611916E+0; - v = 0.2229192611835437E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4628239056795531E+0; - b = 0.3888751854043678E+0; - v = 0.2253385110212775E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4927563229773636E+0; - b = 0.4190678003222840E+0; - v = 0.2271137107548774E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5215687136707969E+0; - b = 0.4483151836883852E+0; - v = 0.2283414092917525E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5491402346984905E+0; - b = 0.4764740676087880E+0; - v = 0.2291161673130077E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5753520160126075E+0; - b = 0.5034021310998277E+0; - v = 0.2295313908576598E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.1388326356417754E+0; - b = 0.2435436510372806E-1; - v = 0.1438204721359031E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.1743686900537244E+0; - b = 0.5118897057342652E-1; - v = 0.1607738025495257E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.2099737037950268E+0; - b = 0.8014695048539634E-1; - v = 0.1741483853528379E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.2454492590908548E+0; - b = 0.1105117874155699E+0; - v = 0.1851918467519151E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.2807219257864278E+0; - b = 0.1417950531570966E+0; - v = 0.1944628638070613E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3156842271975842E+0; - b = 0.1736604945719597E+0; - v = 0.2022495446275152E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3502090945177752E+0; - b = 0.2058466324693981E+0; - v = 0.2087462382438514E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3841684849519686E+0; - b = 0.2381284261195919E+0; - v = 0.2141074754818308E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4174372367906016E+0; - b = 0.2703031270422569E+0; - v = 0.2184640913748162E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4498926465011892E+0; - b = 0.3021845683091309E+0; - v = 0.2219309165220329E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4814146229807701E+0; - b = 0.3335993355165720E+0; - v = 0.2246123118340624E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5118863625734701E+0; - b = 0.3643833735518232E+0; - v = 0.2266062766915125E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5411947455119144E+0; - b = 0.3943789541958179E+0; - v = 0.2280072952230796E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5692301500357246E+0; - b = 0.4234320144403542E+0; - v = 0.2289082025202583E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5958857204139576E+0; - b = 0.4513897947419260E+0; - v = 0.2294012695120025E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.2156270284785766E+0; - b = 0.2681225755444491E-1; - v = 0.1722434488736947E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.2532385054909710E+0; - b = 0.5557495747805614E-1; - v = 0.1830237421455091E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.2902564617771537E+0; - b = 0.8569368062950249E-1; - v = 0.1923855349997633E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3266979823143256E+0; - b = 0.1167367450324135E+0; - v = 0.2004067861936271E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3625039627493614E+0; - b = 0.1483861994003304E+0; - v = 0.2071817297354263E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3975838937548699E+0; - b = 0.1803821503011405E+0; - v = 0.2128250834102103E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4318396099009774E+0; - b = 0.2124962965666424E+0; - v = 0.2174513719440102E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4651706555732742E+0; - b = 0.2445221837805913E+0; - v = 0.2211661839150214E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4974752649620969E+0; - b = 0.2762701224322987E+0; - v = 0.2240665257813102E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5286517579627517E+0; - b = 0.3075627775211328E+0; - v = 0.2262439516632620E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5586001195731895E+0; - b = 0.3382311089826877E+0; - v = 0.2277874557231869E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5872229902021319E+0; - b = 0.3681108834741399E+0; - v = 0.2287854314454994E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6144258616235123E+0; - b = 0.3970397446872839E+0; - v = 0.2293268499615575E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.2951676508064861E+0; - b = 0.2867499538750441E-1; - v = 0.1912628201529828E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3335085485472725E+0; - b = 0.5867879341903510E-1; - v = 0.1992499672238701E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3709561760636381E+0; - b = 0.8961099205022284E-1; - v = 0.2061275533454027E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4074722861667498E+0; - b = 0.1211627927626297E+0; - v = 0.2119318215968572E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4429923648839117E+0; - b = 0.1530748903554898E+0; - v = 0.2167416581882652E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4774428052721736E+0; - b = 0.1851176436721877E+0; - v = 0.2206430730516600E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5107446539535904E+0; - b = 0.2170829107658179E+0; - v = 0.2237186938699523E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5428151370542935E+0; - b = 0.2487786689026271E+0; - v = 0.2260480075032884E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5735699292556964E+0; - b = 0.2800239952795016E+0; - v = 0.2277098884558542E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6029253794562866E+0; - b = 0.3106445702878119E+0; - v = 0.2287845715109671E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6307998987073145E+0; - b = 0.3404689500841194E+0; - v = 0.2293547268236294E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3752652273692719E+0; - b = 0.2997145098184479E-1; - v = 0.2056073839852528E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4135383879344028E+0; - b = 0.6086725898678011E-1; - v = 0.2114235865831876E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4506113885153907E+0; - b = 0.9238849548435643E-1; - v = 0.2163175629770551E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4864401554606072E+0; - b = 0.1242786603851851E+0; - v = 0.2203392158111650E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5209708076611709E+0; - b = 0.1563086731483386E+0; - v = 0.2235473176847839E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5541422135830122E+0; - b = 0.1882696509388506E+0; - v = 0.2260024141501235E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5858880915113817E+0; - b = 0.2199672979126059E+0; - v = 0.2277675929329182E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6161399390603444E+0; - b = 0.2512165482924867E+0; - v = 0.2289102112284834E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6448296482255090E+0; - b = 0.2818368701871888E+0; - v = 0.2295027954625118E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4544796274917948E+0; - b = 0.3088970405060312E-1; - v = 0.2161281589879992E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4919389072146628E+0; - b = 0.6240947677636835E-1; - v = 0.2201980477395102E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5279313026985183E+0; - b = 0.9430706144280313E-1; - v = 0.2234952066593166E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5624169925571135E+0; - b = 0.1263547818770374E+0; - v = 0.2260540098520838E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5953484627093287E+0; - b = 0.1583430788822594E+0; - v = 0.2279157981899988E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6266730715339185E+0; - b = 0.1900748462555988E+0; - v = 0.2291296918565571E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6563363204278871E+0; - b = 0.2213599519592567E+0; - v = 0.2297533752536649E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5314574716585696E+0; - b = 0.3152508811515374E-1; - v = 0.2234927356465995E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5674614932298185E+0; - b = 0.6343865291465561E-1; - v = 0.2261288012985219E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6017706004970264E+0; - b = 0.9551503504223951E-1; - v = 0.2280818160923688E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6343471270264178E+0; - b = 0.1275440099801196E+0; - v = 0.2293773295180159E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6651494599127802E+0; - b = 0.1593252037671960E+0; - v = 0.2300528767338634E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6050184986005704E+0; - b = 0.3192538338496105E-1; - v = 0.2281893855065666E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6390163550880400E+0; - b = 0.6402824353962306E-1; - v = 0.2295720444840727E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6711199107088448E+0; - b = 0.9609805077002909E-1; - v = 0.2303227649026753E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6741354429572275E+0; - b = 0.3211853196273233E-1; - v = 0.2304831913227114E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - - break; - - case 5294: - - v = 0.9080510764308163E-4; - start = getLebedevReccurencePoints(1, start, a, b, v); - v = 0.2084824361987793E-3; - start = getLebedevReccurencePoints(3, start, a, b, v); - a = 0.2303261686261450E-1; - v = 0.5011105657239616E-4; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.3757208620162394E-1; - v = 0.5942520409683854E-4; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.5821912033821852E-1; - v = 0.9564394826109721E-4; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.8403127529194872E-1; - v = 0.1185530657126338E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.1122927798060578E+0; - v = 0.1364510114230331E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.1420125319192987E+0; - v = 0.1505828825605415E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.1726396437341978E+0; - v = 0.1619298749867023E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.2038170058115696E+0; - v = 0.1712450504267789E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.2352849892876508E+0; - v = 0.1789891098164999E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.2668363354312461E+0; - v = 0.1854474955629795E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.2982941279900452E+0; - v = 0.1908148636673661E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.3295002922087076E+0; - v = 0.1952377405281833E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.3603094918363593E+0; - v = 0.1988349254282232E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.3905857895173920E+0; - v = 0.2017079807160050E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.4202005758160837E+0; - v = 0.2039473082709094E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.4490310061597227E+0; - v = 0.2056360279288953E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.4769586160311491E+0; - v = 0.2068525823066865E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.5038679887049750E+0; - v = 0.2076724877534488E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.5296454286519961E+0; - v = 0.2081694278237885E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.5541776207164850E+0; - v = 0.2084157631219326E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.5990467321921213E+0; - v = 0.2084381531128593E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6191467096294587E+0; - v = 0.2083476277129307E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6375251212901849E+0; - v = 0.2082686194459732E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6540514381131168E+0; - v = 0.2082475686112415E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6685899064391510E+0; - v = 0.2083139860289915E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6810013009681648E+0; - v = 0.2084745561831237E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6911469578730340E+0; - v = 0.2087091313375890E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6988956915141736E+0; - v = 0.2089718413297697E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.7041335794868720E+0; - v = 0.2092003303479793E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.7067754398018567E+0; - v = 0.2093336148263241E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.3840368707853623E-1; - v = 0.7591708117365267E-4; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.9835485954117399E-1; - v = 0.1083383968169186E-3; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.1665774947612998E+0; - v = 0.1403019395292510E-3; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.2405702335362910E+0; - v = 0.1615970179286436E-3; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.3165270770189046E+0; - v = 0.1771144187504911E-3; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.3927386145645443E+0; - v = 0.1887760022988168E-3; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.4678825918374656E+0; - v = 0.1973474670768214E-3; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.5408022024266935E+0; - v = 0.2033787661234659E-3; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.6104967445752438E+0; - v = 0.2072343626517331E-3; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.6760910702685738E+0; - v = 0.2091177834226918E-3; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.6655644120217392E-1; - b = 0.1936508874588424E-1; - v = 0.9316684484675566E-4; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.9446246161270182E-1; - b = 0.4252442002115869E-1; - v = 0.1116193688682976E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.1242651925452509E+0; - b = 0.6806529315354374E-1; - v = 0.1298623551559414E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.1553438064846751E+0; - b = 0.9560957491205369E-1; - v = 0.1450236832456426E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.1871137110542670E+0; - b = 0.1245931657452888E+0; - v = 0.1572719958149914E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.2192612628836257E+0; - b = 0.1545385828778978E+0; - v = 0.1673234785867195E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.2515682807206955E+0; - b = 0.1851004249723368E+0; - v = 0.1756860118725188E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.2838535866287290E+0; - b = 0.2160182608272384E+0; - v = 0.1826776290439367E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3159578817528521E+0; - b = 0.2470799012277111E+0; - v = 0.1885116347992865E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3477370882791392E+0; - b = 0.2781014208986402E+0; - v = 0.1933457860170574E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3790576960890540E+0; - b = 0.3089172523515731E+0; - v = 0.1973060671902064E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4097938317810200E+0; - b = 0.3393750055472244E+0; - v = 0.2004987099616311E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4398256572859637E+0; - b = 0.3693322470987730E+0; - v = 0.2030170909281499E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4690384114718480E+0; - b = 0.3986541005609877E+0; - v = 0.2049461460119080E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4973216048301053E+0; - b = 0.4272112491408562E+0; - v = 0.2063653565200186E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5245681526132446E+0; - b = 0.4548781735309936E+0; - v = 0.2073507927381027E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5506733911803888E+0; - b = 0.4815315355023251E+0; - v = 0.2079764593256122E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5755339829522475E+0; - b = 0.5070486445801855E+0; - v = 0.2083150534968778E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.1305472386056362E+0; - b = 0.2284970375722366E-1; - v = 0.1262715121590664E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.1637327908216477E+0; - b = 0.4812254338288384E-1; - v = 0.1414386128545972E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.1972734634149637E+0; - b = 0.7531734457511935E-1; - v = 0.1538740401313898E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.2308694653110130E+0; - b = 0.1039043639882017E+0; - v = 0.1642434942331432E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.2643899218338160E+0; - b = 0.1334526587117626E+0; - v = 0.1729790609237496E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.2977171599622171E+0; - b = 0.1636414868936382E+0; - v = 0.1803505190260828E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3307293903032310E+0; - b = 0.1942195406166568E+0; - v = 0.1865475350079657E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3633069198219073E+0; - b = 0.2249752879943753E+0; - v = 0.1917182669679069E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3953346955922727E+0; - b = 0.2557218821820032E+0; - v = 0.1959851709034382E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4267018394184914E+0; - b = 0.2862897925213193E+0; - v = 0.1994529548117882E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4573009622571704E+0; - b = 0.3165224536636518E+0; - v = 0.2022138911146548E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4870279559856109E+0; - b = 0.3462730221636496E+0; - v = 0.2043518024208592E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5157819581450322E+0; - b = 0.3754016870282835E+0; - v = 0.2059450313018110E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5434651666465393E+0; - b = 0.4037733784993613E+0; - v = 0.2070685715318472E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5699823887764627E+0; - b = 0.4312557784139123E+0; - v = 0.2077955310694373E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5952403350947741E+0; - b = 0.4577175367122110E+0; - v = 0.2081980387824712E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.2025152599210369E+0; - b = 0.2520253617719557E-1; - v = 0.1521318610377956E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.2381066653274425E+0; - b = 0.5223254506119000E-1; - v = 0.1622772720185755E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.2732823383651612E+0; - b = 0.8060669688588620E-1; - v = 0.1710498139420709E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3080137692611118E+0; - b = 0.1099335754081255E+0; - v = 0.1785911149448736E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3422405614587601E+0; - b = 0.1399120955959857E+0; - v = 0.1850125313687736E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3758808773890420E+0; - b = 0.1702977801651705E+0; - v = 0.1904229703933298E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4088458383438932E+0; - b = 0.2008799256601680E+0; - v = 0.1949259956121987E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4410450550841152E+0; - b = 0.2314703052180836E+0; - v = 0.1986161545363960E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4723879420561312E+0; - b = 0.2618972111375892E+0; - v = 0.2015790585641370E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5027843561874343E+0; - b = 0.2920013195600270E+0; - v = 0.2038934198707418E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5321453674452458E+0; - b = 0.3216322555190551E+0; - v = 0.2056334060538251E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5603839113834030E+0; - b = 0.3506456615934198E+0; - v = 0.2068705959462289E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5874150706875146E+0; - b = 0.3789007181306267E+0; - v = 0.2076753906106002E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6131559381660038E+0; - b = 0.4062580170572782E+0; - v = 0.2081179391734803E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.2778497016394506E+0; - b = 0.2696271276876226E-1; - v = 0.1700345216228943E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3143733562261912E+0; - b = 0.5523469316960465E-1; - v = 0.1774906779990410E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3501485810261827E+0; - b = 0.8445193201626464E-1; - v = 0.1839659377002642E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3851430322303653E+0; - b = 0.1143263119336083E+0; - v = 0.1894987462975169E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4193013979470415E+0; - b = 0.1446177898344475E+0; - v = 0.1941548809452595E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4525585960458567E+0; - b = 0.1751165438438091E+0; - v = 0.1980078427252384E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4848447779622947E+0; - b = 0.2056338306745660E+0; - v = 0.2011296284744488E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5160871208276894E+0; - b = 0.2359965487229226E+0; - v = 0.2035888456966776E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5462112185696926E+0; - b = 0.2660430223139146E+0; - v = 0.2054516325352142E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5751425068101757E+0; - b = 0.2956193664498032E+0; - v = 0.2067831033092635E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6028073872853596E+0; - b = 0.3245763905312779E+0; - v = 0.2076485320284876E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6291338275278409E+0; - b = 0.3527670026206972E+0; - v = 0.2081141439525255E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3541797528439391E+0; - b = 0.2823853479435550E-1; - v = 0.1834383015469222E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3908234972074657E+0; - b = 0.5741296374713106E-1; - v = 0.1889540591777677E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4264408450107590E+0; - b = 0.8724646633650199E-1; - v = 0.1936677023597375E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4609949666553286E+0; - b = 0.1175034422915616E+0; - v = 0.1976176495066504E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4944389496536006E+0; - b = 0.1479755652628428E+0; - v = 0.2008536004560983E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5267194884346086E+0; - b = 0.1784740659484352E+0; - v = 0.2034280351712291E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5577787810220990E+0; - b = 0.2088245700431244E+0; - v = 0.2053944466027758E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5875563763536670E+0; - b = 0.2388628136570763E+0; - v = 0.2068077642882360E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6159910016391269E+0; - b = 0.2684308928769185E+0; - v = 0.2077250949661599E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6430219602956268E+0; - b = 0.2973740761960252E+0; - v = 0.2082062440705320E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4300647036213646E+0; - b = 0.2916399920493977E-1; - v = 0.1934374486546626E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4661486308935531E+0; - b = 0.5898803024755659E-1; - v = 0.1974107010484300E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5009658555287261E+0; - b = 0.8924162698525409E-1; - v = 0.2007129290388658E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5344824270447704E+0; - b = 0.1197185199637321E+0; - v = 0.2033736947471293E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5666575997416371E+0; - b = 0.1502300756161382E+0; - v = 0.2054287125902493E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5974457471404752E+0; - b = 0.1806004191913564E+0; - v = 0.2069184936818894E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6267984444116886E+0; - b = 0.2106621764786252E+0; - v = 0.2078883689808782E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6546664713575417E+0; - b = 0.2402526932671914E+0; - v = 0.2083886366116359E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5042711004437253E+0; - b = 0.2982529203607657E-1; - v = 0.2006593275470817E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5392127456774380E+0; - b = 0.6008728062339922E-1; - v = 0.2033728426135397E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5726819437668618E+0; - b = 0.9058227674571398E-1; - v = 0.2055008781377608E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6046469254207278E+0; - b = 0.1211219235803400E+0; - v = 0.2070651783518502E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6350716157434952E+0; - b = 0.1515286404791580E+0; - v = 0.2080953335094320E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6639177679185454E+0; - b = 0.1816314681255552E+0; - v = 0.2086284998988521E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5757276040972253E+0; - b = 0.3026991752575440E-1; - v = 0.2055549387644668E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6090265823139755E+0; - b = 0.6078402297870770E-1; - v = 0.2071871850267654E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6406735344387661E+0; - b = 0.9135459984176636E-1; - v = 0.2082856600431965E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6706397927793709E+0; - b = 0.1218024155966590E+0; - v = 0.2088705858819358E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6435019674426665E+0; - b = 0.3052608357660639E-1; - v = 0.2083995867536322E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6747218676375681E+0; - b = 0.6112185773983089E-1; - v = 0.2090509712889637E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - - break; - - case 5810: - - v = 0.9735347946175486E-5; - start = getLebedevReccurencePoints(1, start, a, b, v); - v = 0.1907581241803167E-3; - start = getLebedevReccurencePoints(2, start, a, b, v); - v = 0.1901059546737578E-3; - start = getLebedevReccurencePoints(3, start, a, b, v); - a = 0.1182361662400277E-1; - v = 0.3926424538919212E-4; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.3062145009138958E-1; - v = 0.6667905467294382E-4; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.5329794036834243E-1; - v = 0.8868891315019135E-4; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.7848165532862220E-1; - v = 0.1066306000958872E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.1054038157636201E+0; - v = 0.1214506743336128E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.1335577797766211E+0; - v = 0.1338054681640871E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.1625769955502252E+0; - v = 0.1441677023628504E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.1921787193412792E+0; - v = 0.1528880200826557E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.2221340534690548E+0; - v = 0.1602330623773609E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.2522504912791132E+0; - v = 0.1664102653445244E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.2823610860679697E+0; - v = 0.1715845854011323E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.3123173966267560E+0; - v = 0.1758901000133069E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.3419847036953789E+0; - v = 0.1794382485256736E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.3712386456999758E+0; - v = 0.1823238106757407E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.3999627649876828E+0; - v = 0.1846293252959976E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.4280466458648093E+0; - v = 0.1864284079323098E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.4553844360185711E+0; - v = 0.1877882694626914E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.4818736094437834E+0; - v = 0.1887716321852025E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.5074138709260629E+0; - v = 0.1894381638175673E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.5319061304570707E+0; - v = 0.1898454899533629E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.5552514978677286E+0; - v = 0.1900497929577815E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.5981009025246183E+0; - v = 0.1900671501924092E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6173990192228116E+0; - v = 0.1899837555533510E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6351365239411131E+0; - v = 0.1899014113156229E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6512010228227200E+0; - v = 0.1898581257705106E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6654758363948120E+0; - v = 0.1898804756095753E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6778410414853370E+0; - v = 0.1899793610426402E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6881760887484110E+0; - v = 0.1901464554844117E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.6963645267094598E+0; - v = 0.1903533246259542E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.7023010617153579E+0; - v = 0.1905556158463228E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.7059004636628753E+0; - v = 0.1907037155663528E-3; - start = getLebedevReccurencePoints(4, start, a, b, v); - a = 0.3552470312472575E-1; - v = 0.5992997844249967E-4; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.9151176620841283E-1; - v = 0.9749059382456978E-4; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.1566197930068980E+0; - v = 0.1241680804599158E-3; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.2265467599271907E+0; - v = 0.1437626154299360E-3; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.2988242318581361E+0; - v = 0.1584200054793902E-3; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.3717482419703886E+0; - v = 0.1694436550982744E-3; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.4440094491758889E+0; - v = 0.1776617014018108E-3; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.5145337096756642E+0; - v = 0.1836132434440077E-3; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.5824053672860230E+0; - v = 0.1876494727075983E-3; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.6468283961043370E+0; - v = 0.1899906535336482E-3; - start = getLebedevReccurencePoints(5, start, a, b, v); - a = 0.6095964259104373E-1; - b = 0.1787828275342931E-1; - v = 0.8143252820767350E-4; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.8811962270959388E-1; - b = 0.3953888740792096E-1; - v = 0.9998859890887728E-4; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.1165936722428831E+0; - b = 0.6378121797722990E-1; - v = 0.1156199403068359E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.1460232857031785E+0; - b = 0.8985890813745037E-1; - v = 0.1287632092635513E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.1761197110181755E+0; - b = 0.1172606510576162E+0; - v = 0.1398378643365139E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.2066471190463718E+0; - b = 0.1456102876970995E+0; - v = 0.1491876468417391E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.2374076026328152E+0; - b = 0.1746153823011775E+0; - v = 0.1570855679175456E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.2682305474337051E+0; - b = 0.2040383070295584E+0; - v = 0.1637483948103775E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.2989653312142369E+0; - b = 0.2336788634003698E+0; - v = 0.1693500566632843E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3294762752772209E+0; - b = 0.2633632752654219E+0; - v = 0.1740322769393633E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3596390887276086E+0; - b = 0.2929369098051601E+0; - v = 0.1779126637278296E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3893383046398812E+0; - b = 0.3222592785275512E+0; - v = 0.1810908108835412E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4184653789358347E+0; - b = 0.3512004791195743E+0; - v = 0.1836529132600190E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4469172319076166E+0; - b = 0.3796385677684537E+0; - v = 0.1856752841777379E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4745950813276976E+0; - b = 0.4074575378263879E+0; - v = 0.1872270566606832E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5014034601410262E+0; - b = 0.4345456906027828E+0; - v = 0.1883722645591307E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5272493404551239E+0; - b = 0.4607942515205134E+0; - v = 0.1891714324525297E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5520413051846366E+0; - b = 0.4860961284181720E+0; - v = 0.1896827480450146E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5756887237503077E+0; - b = 0.5103447395342790E+0; - v = 0.1899628417059528E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.1225039430588352E+0; - b = 0.2136455922655793E-1; - v = 0.1123301829001669E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.1539113217321372E+0; - b = 0.4520926166137188E-1; - v = 0.1253698826711277E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.1856213098637712E+0; - b = 0.7086468177864818E-1; - v = 0.1366266117678531E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.2174998728035131E+0; - b = 0.9785239488772918E-1; - v = 0.1462736856106918E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.2494128336938330E+0; - b = 0.1258106396267210E+0; - v = 0.1545076466685412E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.2812321562143480E+0; - b = 0.1544529125047001E+0; - v = 0.1615096280814007E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3128372276456111E+0; - b = 0.1835433512202753E+0; - v = 0.1674366639741759E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3441145160177973E+0; - b = 0.2128813258619585E+0; - v = 0.1724225002437900E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3749567714853510E+0; - b = 0.2422913734880829E+0; - v = 0.1765810822987288E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4052621732015610E+0; - b = 0.2716163748391453E+0; - v = 0.1800104126010751E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4349335453522385E+0; - b = 0.3007127671240280E+0; - v = 0.1827960437331284E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4638776641524965E+0; - b = 0.3294470677216479E+0; - v = 0.1850140300716308E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4920046410462687E+0; - b = 0.3576932543699155E+0; - v = 0.1867333507394938E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5192273554861704E+0; - b = 0.3853307059757764E+0; - v = 0.1880178688638289E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5454609081136522E+0; - b = 0.4122425044452694E+0; - v = 0.1889278925654758E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5706220661424140E+0; - b = 0.4383139587781027E+0; - v = 0.1895213832507346E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5946286755181518E+0; - b = 0.4634312536300553E+0; - v = 0.1898548277397420E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.1905370790924295E+0; - b = 0.2371311537781979E-1; - v = 0.1349105935937341E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.2242518717748009E+0; - b = 0.4917878059254806E-1; - v = 0.1444060068369326E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.2577190808025936E+0; - b = 0.7595498960495142E-1; - v = 0.1526797390930008E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.2908724534927187E+0; - b = 0.1036991083191100E+0; - v = 0.1598208771406474E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3236354020056219E+0; - b = 0.1321348584450234E+0; - v = 0.1659354368615331E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3559267359304543E+0; - b = 0.1610316571314789E+0; - v = 0.1711279910946440E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3876637123676956E+0; - b = 0.1901912080395707E+0; - v = 0.1754952725601440E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4187636705218842E+0; - b = 0.2194384950137950E+0; - v = 0.1791247850802529E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4491449019883107E+0; - b = 0.2486155334763858E+0; - v = 0.1820954300877716E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4787270932425445E+0; - b = 0.2775768931812335E+0; - v = 0.1844788524548449E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5074315153055574E+0; - b = 0.3061863786591120E+0; - v = 0.1863409481706220E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5351810507738336E+0; - b = 0.3343144718152556E+0; - v = 0.1877433008795068E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5619001025975381E+0; - b = 0.3618362729028427E+0; - v = 0.1887444543705232E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5875144035268046E+0; - b = 0.3886297583620408E+0; - v = 0.1894009829375006E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6119507308734495E+0; - b = 0.4145742277792031E+0; - v = 0.1897683345035198E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.2619733870119463E+0; - b = 0.2540047186389353E-1; - v = 0.1517327037467653E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.2968149743237949E+0; - b = 0.5208107018543989E-1; - v = 0.1587740557483543E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3310451504860488E+0; - b = 0.7971828470885599E-1; - v = 0.1649093382274097E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3646215567376676E+0; - b = 0.1080465999177927E+0; - v = 0.1701915216193265E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3974916785279360E+0; - b = 0.1368413849366629E+0; - v = 0.1746847753144065E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4295967403772029E+0; - b = 0.1659073184763559E+0; - v = 0.1784555512007570E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4608742854473447E+0; - b = 0.1950703730454614E+0; - v = 0.1815687562112174E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4912598858949903E+0; - b = 0.2241721144376724E+0; - v = 0.1840864370663302E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5206882758945558E+0; - b = 0.2530655255406489E+0; - v = 0.1860676785390006E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5490940914019819E+0; - b = 0.2816118409731066E+0; - v = 0.1875690583743703E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5764123302025542E+0; - b = 0.3096780504593238E+0; - v = 0.1886453236347225E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6025786004213506E+0; - b = 0.3371348366394987E+0; - v = 0.1893501123329645E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6275291964794956E+0; - b = 0.3638547827694396E+0; - v = 0.1897366184519868E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3348189479861771E+0; - b = 0.2664841935537443E-1; - v = 0.1643908815152736E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.3699515545855295E+0; - b = 0.5424000066843495E-1; - v = 0.1696300350907768E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4042003071474669E+0; - b = 0.8251992715430854E-1; - v = 0.1741553103844483E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4375320100182624E+0; - b = 0.1112695182483710E+0; - v = 0.1780015282386092E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4699054490335947E+0; - b = 0.1402964116467816E+0; - v = 0.1812116787077125E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5012739879431952E+0; - b = 0.1694275117584291E+0; - v = 0.1838323158085421E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5315874883754966E+0; - b = 0.1985038235312689E+0; - v = 0.1859113119837737E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5607937109622117E+0; - b = 0.2273765660020893E+0; - v = 0.1874969220221698E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5888393223495521E+0; - b = 0.2559041492849764E+0; - v = 0.1886375612681076E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6156705979160163E+0; - b = 0.2839497251976899E+0; - v = 0.1893819575809276E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6412338809078123E+0; - b = 0.3113791060500690E+0; - v = 0.1897794748256767E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4076051259257167E+0; - b = 0.2757792290858463E-1; - v = 0.1738963926584846E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4423788125791520E+0; - b = 0.5584136834984293E-1; - v = 0.1777442359873466E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4760480917328258E+0; - b = 0.8457772087727143E-1; - v = 0.1810010815068719E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5085838725946297E+0; - b = 0.1135975846359248E+0; - v = 0.1836920318248129E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5399513637391218E+0; - b = 0.1427286904765053E+0; - v = 0.1858489473214328E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5701118433636380E+0; - b = 0.1718112740057635E+0; - v = 0.1875079342496592E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5990240530606021E+0; - b = 0.2006944855985351E+0; - v = 0.1887080239102310E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6266452685139695E+0; - b = 0.2292335090598907E+0; - v = 0.1894905752176822E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6529320971415942E+0; - b = 0.2572871512353714E+0; - v = 0.1898991061200695E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.4791583834610126E+0; - b = 0.2826094197735932E-1; - v = 0.1809065016458791E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5130373952796940E+0; - b = 0.5699871359683649E-1; - v = 0.1836297121596799E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5456252429628476E+0; - b = 0.8602712528554394E-1; - v = 0.1858426916241869E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5768956329682385E+0; - b = 0.1151748137221281E+0; - v = 0.1875654101134641E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6068186944699046E+0; - b = 0.1442811654136362E+0; - v = 0.1888240751833503E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6353622248024907E+0; - b = 0.1731930321657680E+0; - v = 0.1896497383866979E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6624927035731797E+0; - b = 0.2017619958756061E+0; - v = 0.1900775530219121E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5484933508028488E+0; - b = 0.2874219755907391E-1; - v = 0.1858525041478814E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.5810207682142106E+0; - b = 0.5778312123713695E-1; - v = 0.1876248690077947E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6120955197181352E+0; - b = 0.8695262371439526E-1; - v = 0.1889404439064607E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6416944284294319E+0; - b = 0.1160893767057166E+0; - v = 0.1898168539265290E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6697926391731260E+0; - b = 0.1450378826743251E+0; - v = 0.1902779940661772E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6147594390585488E+0; - b = 0.2904957622341456E-1; - v = 0.1890125641731815E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6455390026356783E+0; - b = 0.5823809152617197E-1; - v = 0.1899434637795751E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6747258588365477E+0; - b = 0.8740384899884715E-1; - v = 0.1904520856831751E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - a = 0.6772135750395347E+0; - b = 0.2919946135808105E-1; - v = 0.1905534498734563E-3; - start = getLebedevReccurencePoints(6, start, a, b, v); - - break; - } -} - -int Lebedev_laikov_grid::getLebedevReccurencePoints(int type, int start, double a, double b, double v) -{ - double pi = ModuleBase::PI; - double c = 0.0; - - switch (type) - { - case 1: - a = 1.0; - - grid_coor[start].x = a; - grid_coor[start].y = 0.0; - grid_coor[start].z = 0.0; - weight[start] = 4.0 * pi * v; - - grid_coor[start + 1].x = -a; - grid_coor[start + 1].y = 0.0; - grid_coor[start + 1].z = 0.0; - weight[start + 1] = 4.0 * pi * v; - - grid_coor[start + 2].x = 0.0; - grid_coor[start + 2].y = a; - grid_coor[start + 2].z = 0.0; - weight[start + 2] = 4.0 * pi * v; - - grid_coor[start + 3].x = 0.0; - grid_coor[start + 3].y = -a; - grid_coor[start + 3].z = 0.0; - weight[start + 3] = 4.0 * pi * v; - - grid_coor[start + 4].x = 0.0; - grid_coor[start + 4].y = 0.0; - grid_coor[start + 4].z = a; - weight[start + 4] = 4.0 * pi * v; - - grid_coor[start + 5].x = 0.0; - grid_coor[start + 5].y = 0.0; - grid_coor[start + 5].z = -a; - weight[start + 5] = 4.0 * pi * v; - - start = start + 6; - - break; - - case 2: - a = std::sqrt(0.5); - - grid_coor[start].x = 0.0; - grid_coor[start].y = a; - grid_coor[start].z = a; - weight[start] = 4.0 * pi * v; - - grid_coor[start + 1].x = 0.0; - grid_coor[start + 1].y = -a; - grid_coor[start + 1].z = a; - weight[start + 1] = 4.0 * pi * v; - - grid_coor[start + 2].x = 0.0; - grid_coor[start + 2].y = a; - grid_coor[start + 2].z = -a; - weight[start + 2] = 4.0 * pi * v; - - grid_coor[start + 3].x = 0.0; - grid_coor[start + 3].y = -a; - grid_coor[start + 3].z = -a; - weight[start + 3] = 4.0 * pi * v; - - grid_coor[start + 4].x = a; - grid_coor[start + 4].y = 0.0; - grid_coor[start + 4].z = a; - weight[start + 4] = 4.0 * pi * v; - - grid_coor[start + 5].x = a; - grid_coor[start + 5].y = 0.0; - grid_coor[start + 5].z = -a; - weight[start + 5] = 4.0 * pi * v; - - grid_coor[start + 6].x = -a; - grid_coor[start + 6].y = 0.0; - grid_coor[start + 6].z = a; - weight[start + 6] = 4.0 * pi * v; - - grid_coor[start + 7].x = -a; - grid_coor[start + 7].y = 0.0; - grid_coor[start + 7].z = -a; - weight[start + 7] = 4.0 * pi * v; - - grid_coor[start + 8].x = a; - grid_coor[start + 8].y = a; - grid_coor[start + 8].z = 0.0; - weight[start + 8] = 4.0 * pi * v; - - grid_coor[start + 9].x = -a; - grid_coor[start + 9].y = a; - grid_coor[start + 9].z = 0.0; - weight[start + 9] = 4.0 * pi * v; - - grid_coor[start + 10].x = a; - grid_coor[start + 10].y = -a; - grid_coor[start + 10].z = 0.0; - weight[start + 10] = 4.0 * pi * v; - - grid_coor[start + 11].x = -a; - grid_coor[start + 11].y = -a; - grid_coor[start + 11].z = 0.0; - weight[start + 11] = 4.0 * pi * v; - - start = start + 12; - - break; - - case 3: - a = sqrt(1.0 / 3.0); - - grid_coor[start].x = a; - grid_coor[start].y = a; - grid_coor[start].z = a; - weight[start] = 4.0 * pi * v; - - grid_coor[start + 1].x = -a; - grid_coor[start + 1].y = a; - grid_coor[start + 1].z = a; - weight[start + 1] = 4.0 * pi * v; - - grid_coor[start + 2].x = a; - grid_coor[start + 2].y = -a; - grid_coor[start + 2].z = a; - weight[start + 2] = 4.0 * pi * v; - - grid_coor[start + 3].x = a; - grid_coor[start + 3].y = a; - grid_coor[start + 3].z = -a; - weight[start + 3] = 4.0 * pi * v; - - grid_coor[start + 4].x = -a; - grid_coor[start + 4].y = -a; - grid_coor[start + 4].z = a; - weight[start + 4] = 4.0 * pi * v; - - grid_coor[start + 5].x = a; - grid_coor[start + 5].y = -a; - grid_coor[start + 5].z = -a; - weight[start + 5] = 4.0 * pi * v; - - grid_coor[start + 6].x = -a; - grid_coor[start + 6].y = a; - grid_coor[start + 6].z = -a; - weight[start + 6] = 4.0 * pi * v; - - grid_coor[start + 7].x = -a; - grid_coor[start + 7].y = -a; - grid_coor[start + 7].z = -a; - weight[start + 7] = 4.0 * pi * v; - - start = start + 8; - - break; - - case 4: - /* In this case a is inputed */ - b = sqrt(1.0 - 2.0 * a * a); - - grid_coor[start].x = a; - grid_coor[start].y = a; - grid_coor[start].z = b; - weight[start] = 4.0 * pi * v; - - grid_coor[start + 1].x = -a; - grid_coor[start + 1].y = a; - grid_coor[start + 1].z = b; - weight[start + 1] = 4.0 * pi * v; - - grid_coor[start + 2].x = a; - grid_coor[start + 2].y = -a; - grid_coor[start + 2].z = b; - weight[start + 2] = 4.0 * pi * v; - - grid_coor[start + 3].x = a; - grid_coor[start + 3].y = a; - grid_coor[start + 3].z = -b; - weight[start + 3] = 4.0 * pi * v; - - grid_coor[start + 4].x = -a; - grid_coor[start + 4].y = -a; - grid_coor[start + 4].z = b; - weight[start + 4] = 4.0 * pi * v; - - grid_coor[start + 5].x = -a; - grid_coor[start + 5].y = a; - grid_coor[start + 5].z = -b; - weight[start + 5] = 4.0 * pi * v; - - grid_coor[start + 6].x = a; - grid_coor[start + 6].y = -a; - grid_coor[start + 6].z = -b; - weight[start + 6] = 4.0 * pi * v; - - grid_coor[start + 7].x = -a; - grid_coor[start + 7].y = -a; - grid_coor[start + 7].z = -b; - weight[start + 7] = 4.0 * pi * v; - - grid_coor[start + 8].x = -a; - grid_coor[start + 8].y = b; - grid_coor[start + 8].z = a; - weight[start + 8] = 4.0 * pi * v; - - grid_coor[start + 9].x = a; - grid_coor[start + 9].y = -b; - grid_coor[start + 9].z = a; - weight[start + 9] = 4.0 * pi * v; - - grid_coor[start + 10].x = a; - grid_coor[start + 10].y = b; - grid_coor[start + 10].z = -a; - weight[start + 10] = 4.0 * pi * v; - - grid_coor[start + 11].x = -a; - grid_coor[start + 11].y = -b; - grid_coor[start + 11].z = a; - weight[start + 11] = 4.0 * pi * v; - - grid_coor[start + 12].x = -a; - grid_coor[start + 12].y = b; - grid_coor[start + 12].z = -a; - weight[start + 12] = 4.0 * pi * v; - - grid_coor[start + 13].x = a; - grid_coor[start + 13].y = -b; - grid_coor[start + 13].z = -a; - weight[start + 13] = 4.0 * pi * v; - - grid_coor[start + 14].x = -a; - grid_coor[start + 14].y = -b; - grid_coor[start + 14].z = -a; - weight[start + 14] = 4.0 * pi * v; - - grid_coor[start + 15].x = a; - grid_coor[start + 15].y = b; - grid_coor[start + 15].z = a; - weight[start + 15] = 4.0 * pi * v; - - grid_coor[start + 16].x = b; - grid_coor[start + 16].y = a; - grid_coor[start + 16].z = a; - weight[start + 16] = 4.0 * pi * v; - - grid_coor[start + 17].x = -b; - grid_coor[start + 17].y = a; - grid_coor[start + 17].z = a; - weight[start + 17] = 4.0 * pi * v; - - grid_coor[start + 18].x = b; - grid_coor[start + 18].y = -a; - grid_coor[start + 18].z = a; - weight[start + 18] = 4.0 * pi * v; - - grid_coor[start + 19].x = b; - grid_coor[start + 19].y = a; - grid_coor[start + 19].z = -a; - weight[start + 19] = 4.0 * pi * v; - - grid_coor[start + 20].x = -b; - grid_coor[start + 20].y = -a; - grid_coor[start + 20].z = a; - weight[start + 20] = 4.0 * pi * v; - - grid_coor[start + 21].x = -b; - grid_coor[start + 21].y = a; - grid_coor[start + 21].z = -a; - weight[start + 21] = 4.0 * pi * v; - - grid_coor[start + 22].x = b; - grid_coor[start + 22].y = -a; - grid_coor[start + 22].z = -a; - weight[start + 22] = 4.0 * pi * v; - - grid_coor[start + 23].x = -b; - grid_coor[start + 23].y = -a; - grid_coor[start + 23].z = -a; - weight[start + 23] = 4.0 * pi * v; - - start = start + 24; - - break; - - case 5: - /* a is inputed in this case as well*/ - b = sqrt(1 - a * a); - - grid_coor[start].x = a; - grid_coor[start].y = b; - grid_coor[start].z = 0.0; - weight[start] = 4.0 * pi * v; - - grid_coor[start + 1].x = -a; - grid_coor[start + 1].y = b; - grid_coor[start + 1].z = 0.0; - weight[start + 1] = 4.0 * pi * v; - - grid_coor[start + 2].x = a; - grid_coor[start + 2].y = -b; - grid_coor[start + 2].z = 0.0; - weight[start + 2] = 4.0 * pi * v; - - grid_coor[start + 3].x = -a; - grid_coor[start + 3].y = -b; - grid_coor[start + 3].z = 0.0; - weight[start + 3] = 4.0 * pi * v; - - grid_coor[start + 4].x = b; - grid_coor[start + 4].y = a; - grid_coor[start + 4].z = 0.0; - weight[start + 4] = 4.0 * pi * v; - - grid_coor[start + 5].x = -b; - grid_coor[start + 5].y = a; - grid_coor[start + 5].z = 0.0; - weight[start + 5] = 4.0 * pi * v; - - grid_coor[start + 6].x = b; - grid_coor[start + 6].y = -a; - grid_coor[start + 6].z = 0.0; - weight[start + 6] = 4.0 * pi * v; - - grid_coor[start + 7].x = -b; - grid_coor[start + 7].y = -a; - grid_coor[start + 7].z = 0.0; - weight[start + 7] = 4.0 * pi * v; - - grid_coor[start + 8].x = a; - grid_coor[start + 8].y = 0.0; - grid_coor[start + 8].z = b; - weight[start + 8] = 4.0 * pi * v; - - grid_coor[start + 9].x = -a; - grid_coor[start + 9].y = 0.0; - grid_coor[start + 9].z = b; - weight[start + 9] = 4.0 * pi * v; - - grid_coor[start + 10].x = a; - grid_coor[start + 10].y = 0.0; - grid_coor[start + 10].z = -b; - weight[start + 10] = 4.0 * pi * v; - - grid_coor[start + 11].x = -a; - grid_coor[start + 11].y = 0.0; - grid_coor[start + 11].z = -b; - weight[start + 11] = 4.0 * pi * v; - - grid_coor[start + 12].x = b; - grid_coor[start + 12].y = 0.0; - grid_coor[start + 12].z = a; - weight[start + 12] = 4.0 * pi * v; - - grid_coor[start + 13].x = -b; - grid_coor[start + 13].y = 0.0; - grid_coor[start + 13].z = a; - weight[start + 13] = 4.0 * pi * v; - - grid_coor[start + 14].x = b; - grid_coor[start + 14].y = 0.0; - grid_coor[start + 14].z = -a; - weight[start + 14] = 4.0 * pi * v; - - grid_coor[start + 15].x = -b; - grid_coor[start + 15].y = 0.0; - grid_coor[start + 15].z = -a; - weight[start + 15] = 4.0 * pi * v; - - grid_coor[start + 16].x = 0.0; - grid_coor[start + 16].y = a; - grid_coor[start + 16].z = b; - weight[start + 16] = 4.0 * pi * v; - - grid_coor[start + 17].x = 0.0; - grid_coor[start + 17].y = -a; - grid_coor[start + 17].z = b; - weight[start + 17] = 4.0 * pi * v; - - grid_coor[start + 18].x = 0.0; - grid_coor[start + 18].y = a; - grid_coor[start + 18].z = -b; - weight[start + 18] = 4.0 * pi * v; - - grid_coor[start + 19].x = 0.0; - grid_coor[start + 19].y = -a; - grid_coor[start + 19].z = -b; - weight[start + 19] = 4.0 * pi * v; - - grid_coor[start + 20].x = 0.0; - grid_coor[start + 20].y = b; - grid_coor[start + 20].z = a; - weight[start + 20] = 4.0 * pi * v; - - grid_coor[start + 21].x = 0.0; - grid_coor[start + 21].y = -b; - grid_coor[start + 21].z = a; - weight[start + 21] = 4.0 * pi * v; - - grid_coor[start + 22].x = 0.0; - grid_coor[start + 22].y = b; - grid_coor[start + 22].z = -a; - weight[start + 22] = 4.0 * pi * v; - - grid_coor[start + 23].x = 0.0; - grid_coor[start + 23].y = -b; - grid_coor[start + 23].z = -a; - weight[start + 23] = 4.0 * pi * v; - - start = start + 24; - - break; - - case 6: - /* both a and b are inputed in this case */ - c = sqrt(1.0 - a * a - b * b); - - grid_coor[start].x = a; - grid_coor[start].y = b; - grid_coor[start].z = c; - weight[start] = 4.0 * pi * v; - - grid_coor[start + 1].x = -a; - grid_coor[start + 1].y = b; - grid_coor[start + 1].z = c; - weight[start + 1] = 4.0 * pi * v; - - grid_coor[start + 2].x = a; - grid_coor[start + 2].y = -b; - grid_coor[start + 2].z = c; - weight[start + 2] = 4.0 * pi * v; - - grid_coor[start + 3].x = a; - grid_coor[start + 3].y = b; - grid_coor[start + 3].z = -c; - weight[start + 3] = 4.0 * pi * v; - - grid_coor[start + 4].x = -a; - grid_coor[start + 4].y = -b; - grid_coor[start + 4].z = c; - weight[start + 4] = 4.0 * pi * v; - - grid_coor[start + 5].x = a; - grid_coor[start + 5].y = -b; - grid_coor[start + 5].z = -c; - weight[start + 5] = 4.0 * pi * v; - - grid_coor[start + 6].x = -a; - grid_coor[start + 6].y = b; - grid_coor[start + 6].z = -c; - weight[start + 6] = 4.0 * pi * v; - - grid_coor[start + 7].x = -a; - grid_coor[start + 7].y = -b; - grid_coor[start + 7].z = -c; - weight[start + 7] = 4.0 * pi * v; - - grid_coor[start + 8].x = b; - grid_coor[start + 8].y = a; - grid_coor[start + 8].z = c; - weight[start + 8] = 4.0 * pi * v; - - grid_coor[start + 9].x = -b; - grid_coor[start + 9].y = a; - grid_coor[start + 9].z = c; - weight[start + 9] = 4.0 * pi * v; - - grid_coor[start + 10].x = b; - grid_coor[start + 10].y = -a; - grid_coor[start + 10].z = c; - weight[start + 10] = 4.0 * pi * v; - - grid_coor[start + 11].x = b; - grid_coor[start + 11].y = a; - grid_coor[start + 11].z = -c; - weight[start + 11] = 4.0 * pi * v; - - grid_coor[start + 12].x = -b; - grid_coor[start + 12].y = -a; - grid_coor[start + 12].z = c; - weight[start + 12] = 4.0 * pi * v; - - grid_coor[start + 13].x = b; - grid_coor[start + 13].y = -a; - grid_coor[start + 13].z = -c; - weight[start + 13] = 4.0 * pi * v; - - grid_coor[start + 14].x = -b; - grid_coor[start + 14].y = a; - grid_coor[start + 14].z = -c; - weight[start + 14] = 4.0 * pi * v; - - grid_coor[start + 15].x = -b; - grid_coor[start + 15].y = -a; - grid_coor[start + 15].z = -c; - weight[start + 15] = 4.0 * pi * v; - - grid_coor[start + 16].x = c; - grid_coor[start + 16].y = a; - grid_coor[start + 16].z = b; - weight[start + 16] = 4.0 * pi * v; - - grid_coor[start + 17].x = -c; - grid_coor[start + 17].y = a; - grid_coor[start + 17].z = b; - weight[start + 17] = 4.0 * pi * v; - - grid_coor[start + 18].x = c; - grid_coor[start + 18].y = -a; - grid_coor[start + 18].z = b; - weight[start + 18] = 4.0 * pi * v; - - grid_coor[start + 19].x = c; - grid_coor[start + 19].y = a; - grid_coor[start + 19].z = -b; - weight[start + 19] = 4.0 * pi * v; - - grid_coor[start + 20].x = -c; - grid_coor[start + 20].y = -a; - grid_coor[start + 20].z = b; - weight[start + 20] = 4.0 * pi * v; - - grid_coor[start + 21].x = c; - grid_coor[start + 21].y = -a; - grid_coor[start + 21].z = -b; - weight[start + 21] = 4.0 * pi * v; - - grid_coor[start + 22].x = -c; - grid_coor[start + 22].y = a; - grid_coor[start + 22].z = -b; - weight[start + 22] = 4.0 * pi * v; - - grid_coor[start + 23].x = -c; - grid_coor[start + 23].y = -a; - grid_coor[start + 23].z = -b; - weight[start + 23] = 4.0 * pi * v; - - grid_coor[start + 24].x = c; - grid_coor[start + 24].y = b; - grid_coor[start + 24].z = a; - weight[start + 24] = 4.0 * pi * v; - - grid_coor[start + 25].x = -c; - grid_coor[start + 25].y = b; - grid_coor[start + 25].z = a; - weight[start + 25] = 4.0 * pi * v; - - grid_coor[start + 26].x = c; - grid_coor[start + 26].y = -b; - grid_coor[start + 26].z = a; - weight[start + 26] = 4.0 * pi * v; - - grid_coor[start + 27].x = c; - grid_coor[start + 27].y = b; - grid_coor[start + 27].z = -a; - weight[start + 27] = 4.0 * pi * v; - - grid_coor[start + 28].x = -c; - grid_coor[start + 28].y = -b; - grid_coor[start + 28].z = a; - weight[start + 28] = 4.0 * pi * v; - - grid_coor[start + 29].x = c; - grid_coor[start + 29].y = -b; - grid_coor[start + 29].z = -a; - weight[start + 29] = 4.0 * pi * v; - - grid_coor[start + 30].x = -c; - grid_coor[start + 30].y = b; - grid_coor[start + 30].z = -a; - weight[start + 30] = 4.0 * pi * v; - - grid_coor[start + 31].x = -c; - grid_coor[start + 31].y = -b; - grid_coor[start + 31].z = -a; - weight[start + 31] = 4.0 * pi * v; - - grid_coor[start + 32].x = a; - grid_coor[start + 32].y = c; - grid_coor[start + 32].z = b; - weight[start + 32] = 4.0 * pi * v; - - grid_coor[start + 33].x = -a; - grid_coor[start + 33].y = c; - grid_coor[start + 33].z = b; - weight[start + 33] = 4.0 * pi * v; - - grid_coor[start + 34].x = a; - grid_coor[start + 34].y = -c; - grid_coor[start + 34].z = b; - weight[start + 34] = 4.0 * pi * v; - - grid_coor[start + 35].x = a; - grid_coor[start + 35].y = c; - grid_coor[start + 35].z = -b; - weight[start + 35] = 4.0 * pi * v; - - grid_coor[start + 36].x = -a; - grid_coor[start + 36].y = -c; - grid_coor[start + 36].z = b; - weight[start + 36] = 4.0 * pi * v; - - grid_coor[start + 37].x = a; - grid_coor[start + 37].y = -c; - grid_coor[start + 37].z = -b; - weight[start + 37] = 4.0 * pi * v; - - grid_coor[start + 38].x = -a; - grid_coor[start + 38].y = c; - grid_coor[start + 38].z = -b; - weight[start + 38] = 4.0 * pi * v; - - grid_coor[start + 39].x = -a; - grid_coor[start + 39].y = -c; - grid_coor[start + 39].z = -b; - weight[start + 39] = 4.0 * pi * v; - - grid_coor[start + 40].x = b; - grid_coor[start + 40].y = c; - grid_coor[start + 40].z = a; - weight[start + 40] = 4.0 * pi * v; - - grid_coor[start + 41].x = -b; - grid_coor[start + 41].y = c; - grid_coor[start + 41].z = a; - weight[start + 41] = 4.0 * pi * v; - - grid_coor[start + 42].x = b; - grid_coor[start + 42].y = -c; - grid_coor[start + 42].z = a; - weight[start + 42] = 4.0 * pi * v; - - grid_coor[start + 43].x = b; - grid_coor[start + 43].y = c; - grid_coor[start + 43].z = -a; - weight[start + 43] = 4.0 * pi * v; - - grid_coor[start + 44].x = -b; - grid_coor[start + 44].y = -c; - grid_coor[start + 44].z = a; - weight[start + 44] = 4.0 * pi * v; - - grid_coor[start + 45].x = b; - grid_coor[start + 45].y = -c; - grid_coor[start + 45].z = -a; - weight[start + 45] = 4.0 * pi * v; - - grid_coor[start + 46].x = -b; - grid_coor[start + 46].y = c; - grid_coor[start + 46].z = -a; - weight[start + 46] = 4.0 * pi * v; - - grid_coor[start + 47].x = -b; - grid_coor[start + 47].y = -c; - grid_coor[start + 47].z = -a; - weight[start + 47] = 4.0 * pi * v; - - start = start + 48; - - break; - } - - return start; -} - -} // namespace ModuleBase \ No newline at end of file diff --git a/source/module_base/math_lebedev_laikov.h b/source/module_base/math_lebedev_laikov.h deleted file mode 100644 index e13ef92949..0000000000 --- a/source/module_base/math_lebedev_laikov.h +++ /dev/null @@ -1,52 +0,0 @@ -#ifndef MATH_LEBEDEV_LAIKOV_H -#define MATH_LEBEDEV_LAIKOV_H - -#include "vector3.h" -#include -#include - -namespace ModuleBase -{ - -class Lebedev_laikov_grid -{ -public: - Lebedev_laikov_grid(int degree); - ~Lebedev_laikov_grid(); - - - void generate_grid_points(); - - const ModuleBase::Vector3* get_grid_coor() const - { - return grid_coor; - }; - - const double* get_weight() const - { - return weight; - }; - - void print_grid_and_weight(std::string filename); - - // degree: can only take the following values - // degree = { 6, 14, 26, 38, 50, 74, 86, 110, 146, 170, 194, 230, 266, 302, 350, 434, 590, 770, 974, - // 1202, 1454, 1730, 2030, 2354, 2702, 3074, 3470, 3890, 4334, 4802, 5294, 5810}; - int degree = 6; - -private: - int getLebedevReccurencePoints(int type, int start, double a, double b, double v); - - std::set allowed_degree = { - 6, 14, 26, 38, 50, 74, 86, 110, 146, 170, 194, 230, 266, - 302, 350, 434, 590, 770, 974, 1202, 1454, 1730, 2030, - 2354, 2702, 3074, 3470, 3890, 4334, 4802, 5294, 5810 - }; - - ModuleBase::Vector3 *grid_coor = nullptr; - double* weight = nullptr; -}; - -} - -#endif \ No newline at end of file diff --git a/source/module_base/math_polyint.cpp b/source/module_base/math_polyint.cpp deleted file mode 100644 index c6cc71bdef..0000000000 --- a/source/module_base/math_polyint.cpp +++ /dev/null @@ -1,239 +0,0 @@ -#include "math_polyint.h" -#include "timer.h" -namespace ModuleBase -{ - -void PolyInt::Polynomial_Interpolation -( - const ModuleBase::realArray &table, - const int &dim1, - const int &dim2, - ModuleBase::realArray &y, - const int &dim_y, - const int &table_length, - const double &table_interval, - const double &x // input value -) -{ - ModuleBase::timer::tick("PolyInt","Poly_Interpo_1"); - assert(table_interval>0.0); - const double position = x / table_interval; - const int iq = static_cast(position); - if(iq>=table_length-4) - { - std::cout << "\n x = " << x; - std::cout << "\n iq = " << iq << " table_length = " << table_length << std::endl; - } - assert(iq < table_length-4); - - const double x0 = position - static_cast(iq); - const double x1 = 1.0 - x0; - const double x2 = 2.0 - x0; - const double x3 = 3.0 - x0; - y(dim1, dim2, dim_y)= - table(dim1, dim2, iq) * x1 * x2 * x3 / 6.0 + - table(dim1, dim2, iq+1) * x0 * x2 * x3 / 2.0 - - table(dim1, dim2, iq+2) * x1 * x0 * x3 / 2.0 + - table(dim1, dim2, iq+3) * x1 * x2 * x0 / 6.0 ; - - ModuleBase::timer::tick("PolyInt","Poly_Interpo_1"); - return; -} - -double PolyInt::Polynomial_Interpolation -( - const ModuleBase::realArray &table, - const int &dim1, - const int &dim2, - const int &table_length, - const double &table_interval, - const double &x // input value -) -{ -// ModuleBase::timer::tick("PolyInt","Poly_Interpo_2"); - assert(table_interval>0.0); - const double position = x / table_interval; - const int iq = static_cast(position); - - if (iq > table_length - 4) - { - std::cout << "\n x = " << x; - std::cout << "\n table_interval = " << table_interval; - std::cout << "\n iq=" << iq << " table_length = " << table_length << std::endl; - std::cout << "\n Not enough space allocated for radial FFT." << std::endl; - std::cout << " It is due to the rapid change of the size of cell:" << std::endl; - std::cout << " Try reseting a larger cell_factor parameter in INPUT" << std::endl; // LiuXh add 20180619 - std::cout << " Or try reseting a smaller relax_scale_force parameter in INPUT\n" << std::endl; - exit(0); - } - - const double x0 = position - static_cast(iq); - const double x1 = 1.0 - x0; - const double x2 = 2.0 - x0; - const double x3 = 3.0 - x0; - const double y= - table(dim1, dim2, iq) * x1 * x2 * x3 / 6.0 + - table(dim1, dim2, iq+1) * x0 * x2 * x3 / 2.0 - - table(dim1, dim2, iq+2) * x1 * x0 * x3 / 2.0 + - table(dim1, dim2, iq+3) * x1 * x2 * x0 / 6.0 ; - -// ModuleBase::timer::tick("PolyInt","Poly_Interpo_2"); - return y; -} - -double PolyInt::Polynomial_Interpolation // pengfei Li 2018-3-23 -( - const ModuleBase::realArray &table, - const int &dim1, - const int &dim2, - const int &dim3, - const int &table_length, - const double &table_interval, - const double &x // input value -) -{ -// ModuleBase::timer::tick("PolyInt","Poly_Interpo_3"); - assert(table_interval>0.0); - const double position = x / table_interval; - const int iq = static_cast(position); - - if(iq>table_length-4) - { - std::cout << "\n x = " << x; - std::cout << "\n table_interval = " << table_interval; - std::cout << "\n iq=" << iq << " table_length = " << table_length << std::endl; - } - assert(iq < table_length-4); - const double x0 = position - static_cast(iq); - const double x1 = 1.0 - x0; - const double x2 = 2.0 - x0; - const double x3 = 3.0 - x0; - const double y= - table(dim1, dim2, dim3, iq) * x1 * x2 * x3 / 6.0 + - table(dim1, dim2, dim3, iq+1) * x0 * x2 * x3 / 2.0 - - table(dim1, dim2, dim3, iq+2) * x1 * x0 * x3 / 2.0 + - table(dim1, dim2, dim3, iq+3) * x1 * x2 * x0 / 6.0 ; - -// ModuleBase::timer::tick("PolyInt","Poly_Interpo_3"); - return y; -} - -double PolyInt::Polynomial_Interpolation -( - const double *table, - const int &table_length, - const double &table_interval, - const double &x // input value -) -{ -// assert(table_interval>0); - const double position = x / table_interval; - const int iq = static_cast(position); -// if(iq >= table_length-4) -// std::cout << "\n iq = " << iq << " table_length = " << table_length; - - if(iq > table_length-4) - { - return 0.0; - } -// assert(iq < table_length-4); - const double x0 = position - static_cast(iq); - const double x1 = 1.0 - x0; - const double x2 = 2.0 - x0; - const double x3 = 3.0 - x0; - - /* - const double y= - table[iq] * x1 * x2 * x3 / 6.0 + - table[iq+1] * x0 * x2 * x3 / 2.0 - - table[iq+2] * x1 * x0 * x3 / 2.0 + - table[iq+3] * x1 * x2 * x0 / 6.0 ; - */ - - return x1*x2*(table[iq]*x3+table[iq+3]*x0)/6.0 - + x0*x3*(table[iq+1]*x2-table[iq+2]*x1)/2.0; -} - -double PolyInt::Polynomial_Interpolation_xy -( - const double *xpoint, - const double *ypoint, - const int table_length, - const double &x // input value -) -{ - int position = -1; - - if (x < xpoint[0]) - { - return ypoint[0]; - } - // ModuleBase::timer::tick("PolyInt","Poly_Inter_xy"); - - for (int ik = 0; ik < table_length; ik++) - { - if (x < xpoint[ik]) - { - break; - } - else - { - position ++; - } - } - - assert(position >= 0); - assert(position <= table_length-1); - - if (position + 6 < table_length) - { - double dx1, dx2, dx3, dx4, dx5, dx6; - dx1 = x - xpoint[position]; - dx2 = x - xpoint[position+1]; - dx3 = x - xpoint[position+2]; - dx4 = x - xpoint[position+3]; - dx5 = x - xpoint[position+4]; - dx6 = x - xpoint[position+5]; - - - double x12, x13, x14, x15, x16, x23, x24, x25, x26, x34, x35, x36, x45, x46, x56; - x12 = xpoint[position] - xpoint[position+1]; - x13 = xpoint[position] - xpoint[position+2]; - x14 = xpoint[position] - xpoint[position+3]; - x15 = xpoint[position] - xpoint[position+4]; - x16 = xpoint[position] - xpoint[position+5]; - - - x23 = xpoint[position+1] - xpoint[position+2]; - x24 = xpoint[position+1] - xpoint[position+3]; - x25 = xpoint[position+1] - xpoint[position+4]; - x26 = xpoint[position+1] - xpoint[position+5]; - - x34 = xpoint[position+2] - xpoint[position+3]; - x35 = xpoint[position+2] - xpoint[position+4]; - x36 = xpoint[position+2] - xpoint[position+5]; - - x45 = xpoint[position+3] - xpoint[position+4]; - x46 = xpoint[position+3] - xpoint[position+5]; - - x56 = xpoint[position+4] - xpoint[position+5]; - - double part1, part2, part3, part4, part5, part6; - part1 = dx2 * dx3 * dx4 * dx5 * dx6 / x12 / x13 / x14 / x15 / x16 * ypoint[position]; - part2 = dx1 * dx3 * dx4 * dx5 * dx6 / (-x12) / x23 / x24 / x25 / x26 * ypoint[position+1]; - part3 = dx1 * dx2 * dx4 * dx5 * dx6 / (-x13) / (-x23) / x34 / x35 / x36 * ypoint[position+2]; - part4 = dx1 * dx2 * dx3 * dx5 * dx6 / (-x14) / (-x24) / (-x34) / x45 / x46 * ypoint[position+3]; - part5 = dx1 * dx2 * dx3 * dx4 * dx6 / (-x15) / (-x25) / (-x35) / (-x45) / x56 * ypoint[position+4]; - part6 = dx1 * dx2 * dx3 * dx4 * dx5 / (-x16) / (-x26) / (-x36) / (-x46) / (-x56) * ypoint[position+5]; - - // ModuleBase::timer::tick("PolyInt","Poly_Inter_xy"); - return part1 + part2 + part3 + part4 + part5 + part6; - } - else - { - // ModuleBase::timer::tick("PolyInt","Poly_Inter_xy"); - return ypoint[position]; - } -} - -} diff --git a/source/module_base/math_polyint.h b/source/module_base/math_polyint.h deleted file mode 100644 index b15f50678c..0000000000 --- a/source/module_base/math_polyint.h +++ /dev/null @@ -1,128 +0,0 @@ -#ifndef MATH_POLYINT_H -#define MATH_POLYINT_H - -#include "realarray.h" - -namespace ModuleBase -{ - -// mohan add 2021-05-07 -class PolyInt -{ - - public: - - PolyInt(); - ~PolyInt(); - - //======================================================== - // Polynomial_Interpolation - //======================================================== - - /** - * @brief Lagrange interpolation - * - * @param table [in] three dimension matrix, the data in 3rd dimension is used to do prediction - * @param dim1 [in] index of 1st dimension of table/y - * @param dim2 [in] index of 2nd dimension of table/y - * @param y [out] three dimension matrix to store the predicted value - * @param dim_y [in] index of 3rd dimension of y to store predicted value - * @param table_length [in] length of 3rd dimension of table - * @param table_interval [in] interval of 3rd dimension of table - * @param x [in] the position in 3rd dimension to be predicted - */ - static void Polynomial_Interpolation - ( - const ModuleBase::realArray &table, - const int &dim1, - const int &dim2, - ModuleBase::realArray &y, - const int &dim_y, - const int &table_length, - const double &table_interval, - const double &x - ); - - /** - * @brief Lagrange interpolation - * - * @param table [in] three dimension matrix, the data in 3rd dimension is used to do prediction - * @param dim1 [in] index of 1st dimension of table - * @param dim2 [in] index of 2nd dimension of table - * @param table_length [in] length of 3rd dimension of table - * @param table_interval [in] interval of 3rd dimension of table - * @param x [in] the position in 3rd dimension to be predicted - * @return double the predicted value - */ - static double Polynomial_Interpolation - ( - const ModuleBase::realArray &table, - const int &dim1, - const int &dim2, - const int &table_length, - const double &table_interval, - const double &x - ); - - /** - * @brief Lagrange interpolation - * - * @param table [in] four dimension matrix, the data in 4th dimension is used to do prediction - * @param dim1 [in] index of 1st dimension of table - * @param dim2 [in] index of 2nd dimension of table - * @param dim3 [in] index of 3rd dimension of table - * @param table_length [in] length of 4th dimension of table - * @param table_interval [in] interval of 4th dimension of table - * @param x [in] the position in 4th dimension to be predicted - * @return double the predicted value - * @author pengfei Li - * @date 2018-3-23 - */ - static double Polynomial_Interpolation - ( - const ModuleBase::realArray &table, - const int &dim1, - const int &dim2, - const int &dim3, - const int &table_length, - const double &table_interval, - const double &x - ); - - /** - * @brief Lagrange interpolation - * - * @param table [in] the data used to do prediction - * @param table_length [in] length of table - * @param table_interval [in] interval of table - * @param x [in] the position to be predicted - * @return double the predicted value - */ - static double Polynomial_Interpolation - ( - const double *table, - const int &table_length, - const double &table_interval, - const double &x - ); - - /** - * @brief Lagrange interpolation - * - * @param xpoint [in] array of postion - * @param ypoint [in] array of data to do prediction - * @param table_length [in] length of xpoint - * @param x [in] position to be predicted - * @return double predicted value - */ - static double Polynomial_Interpolation_xy - ( - const double *xpoint, - const double *ypoint, - const int table_length, - const double &x - ); - -}; -} -#endif diff --git a/source/module_base/math_sphbes.cpp b/source/module_base/math_sphbes.cpp deleted file mode 100644 index 43b65073de..0000000000 --- a/source/module_base/math_sphbes.cpp +++ /dev/null @@ -1,930 +0,0 @@ -#include "math_sphbes.h" -#include "constants.h" -#include -#include - -#include - -namespace ModuleBase -{ - -Sphbes::Sphbes(){} -Sphbes::~Sphbes(){} - -void Sphbes::BESSJY(double x, double xnu, double *rj, double *ry, double *rjp, double *ryp) -{ - const int XMIN = 2.0; - const double FPMIN = 1.0e-30; - const double EPS = 1.0e-10; - const int MAXIT = 10000; - - // May need some annotations to each variable - int i = 0, isign = 0, l = 0, nl = 0; - double a = 0.0; - double b = 0.0, br = 0.0, bi = 0.0; - double c = 0.0, cr = 0.0, ci = 0.0; - double d = 0.0; - double del = 0.0, del1 = 0.0; - double den = 0.0, di = 0.0, dlr = 0.0, dli = 0.0, dr = 0.0; - double e = 0.0, f = 0.0; - double fact = 0.0, fact2 = 0.0, fact3 = 0.0; - double ff = 0.0; - double gam = 0.0, gam1 = 0.0, gam2 = 0.0, gammi = 0.0, gampl = 0.0; - double h = 0.0; - double p = 0.0, pimu = 0.0, pimu2 = 0.0; - double q = 0.0, r = 0.0; - double rjl = 0.0, rjl1 = 0.0, rjmu = 0.0, rjp1 = 0.0, rjpl = 0.0, rjtemp = 0.0; - double ry1 = 0.0, rymu = 0.0, rymup = 0.0, rytemp = 0.0; - double sum = 0.0, sum1 = 0.0; - double temp = 0.0, w = 0.0; - double x2 = 0.0, xi = 0.0, xi2 = 0.0; - - if (x <= 0.0 || xnu < 0.0) - { - std::cout << "Sphbes::BESSJY, bad arguments" << std::endl; - //ModuleBase::WARNING_QUIT("Sphbes::BESSJY","bad arguments"); - exit(0); // mohan add 2021-05-06 - } - - - nl = (x < XMIN ? (int)(xnu + 0.5) : IMAX(0, (int)(xnu - x + 1.5))); - const double xmu = xnu - nl; - const double xmu2 = xmu * xmu; - xi = 1.0 / x; - xi2 = 2.0 * xi; - w = xi2 / ModuleBase::PI; - isign = 1; - h = xnu * xi; - - if (h < FPMIN) - { - h = FPMIN; - } - - b = xi2 * xnu; - - d = 0.0; - - c = h; - - for (i = 1;i <= MAXIT;i++) - { - b += xi2; - d = b - d; - - if (std::fabs(d) < FPMIN) d = FPMIN; - - c = b - 1.0 / c; - - if (std::fabs(c) < FPMIN) c = FPMIN; - - d = 1.0 / d; - - del = c * d; - - h = del * h; - - if (d < 0.0) isign = -isign; - - if (std::fabs(del - 1.0) < EPS) break; - } - - if (i > MAXIT) - { - std::cout << "x too large in bessjy; try asymptotic expansion" << std::endl; - } - - rjl = isign * FPMIN; - - rjpl = h * rjl; - - rjl1 = rjl; - - rjp1 = rjpl; - - fact = xnu * xi; - - for (l = nl;l >= 1;l--) - { - rjtemp = fact * rjl + rjpl; - fact -= xi; - rjpl = fact * rjtemp - rjl; - rjl = rjtemp; - } - - if (rjl == 0.0) - { - rjl = EPS; - } - - f = rjpl / rjl; - - if (x < XMIN) - { - x2 = 0.5 * x; - pimu = ModuleBase::PI * xmu; - fact = (std::fabs(pimu) < EPS ? 1.0 : pimu / std::sin(pimu)); - d = -log(x2); - e = xmu * d; - fact2 = (std::fabs(e) < EPS ? 1.0 : std::sinh(e) / e); - // call BESCHB - BESCHB(xmu, &gam1, &gam2, &gampl, &gammi); - ff = 2.0 / ModuleBase::PI * fact * (gam1 * std::cosh(e) + gam2 * fact2 * d); - e = std::exp(e); - p = e / (gampl * ModuleBase::PI); - q = 1.0 / (e * ModuleBase::PI * gammi); - pimu2 = 0.5 * pimu; - fact3 = (std::fabs(pimu2) < EPS ? 1.0 : std::sin(pimu2) / pimu2); - r = ModuleBase::PI * pimu2 * fact3 * fact3; - c = 1.0; - d = -x2 * x2; - sum = ff + r * q; - sum1 = p; - - for (i = 1;i <= MAXIT;i++) - { - ff = (i * ff + p + q) / (i * i - xmu2); - c *= (d / i); - p /= (i - xmu); - q /= (i + xmu); - del = c * (ff + r * q); - sum += del; - del1 = c * p - i * del; - sum1 += del1; - - if (std::fabs(del) < (1.0 + std::fabs(sum))*EPS) break; - } - - if (i > MAXIT) std::cout << "bessy series failed to converge"; - - rymu = -sum; - - ry1 = -sum1 * xi2; - - rymup = xmu * xi * rymu - ry1; - - rjmu = w / (rymup - f * rymu); - } - - else - { - a = 0.25 - xmu2; - p = -0.5 * xi; - q = 1.0; - br = 2.0 * x; - bi = 2.0; - fact = a * xi / (p * p + q * q); - cr = br + q * fact; - ci = bi + p * fact; - den = br * br + bi * bi; - dr = br / den; - di = -bi / den; - dlr = cr * dr - ci * di; - dli = cr * di + ci * dr; - temp = p * dlr - q * dli; - q = p * dli + q * dlr; - p = temp; - - for (i = 2;i <= MAXIT;i++) - { - a += 2 * (i - 1); - bi += 2.0; - dr = a * dr + br; - di = a * di + bi; - - if (std::fabs(dr) + std::fabs(di) < FPMIN) dr = FPMIN; - - fact = a / (cr * cr + ci * ci); - - cr = br + cr * fact; - - ci = bi - ci * fact; - - if (std::fabs(cr) + std::fabs(ci) < FPMIN) cr = FPMIN; - - den = dr * dr + di * di; - - dr /= den; - - di /= -den; - - dlr = cr * dr - ci * di; - - dli = cr * di + ci * dr; - - temp = p * dlr - q * dli; - - q = p * dli + q * dlr; - - p = temp; - - if (std::fabs(dlr - 1.0) + std::fabs(dli) < EPS) break; - } - - if (i > MAXIT) std::cout << "cf2 failed in bessjy"; - - gam = (p - f) / q; - - rjmu = std::sqrt(w / ((p - f) * gam + q)); - - if (rjl >=0 ) rjmu = std::fabs(rjmu); - else rjmu = -std::fabs(rjmu); - - rymu = rjmu * gam; - - rymup = rymu * (p + q / gam); - - ry1 = xmu * xi * rymu - rymup; - } - - fact = rjmu / rjl; - - *rj = rjl1 * fact; - *rjp = rjp1 * fact; - - for (i = 1;i <= nl;i++) - { - rytemp = (xmu + i) * xi2 * ry1 - rymu; - rymu = ry1; - ry1 = rytemp; - } - - *ry = rymu; - - *ryp = xnu * xi * rymu - ry1; -} - - -int Sphbes::IMAX(int a, int b) -{ - if (a > b) return a; - else return b; -} - - -void Sphbes::BESCHB(double x, double *gam1, double *gam2, double *gampl, double *gammi) -{ - const int NUSE1 = 7; - const int NUSE2 = 8; - double xx = 0; - static double c1[] = { -1.142022680371168e0, 6.5165112670737e-3, - 3.087090173086e-4, -3.4706269649e-6, - 6.9437664e-9, 3.67795e-11, -1.356e-13 - }; - static double c2[] = { 1.843740587300905e0, -7.68528408447867e-2, - 1.2719271366546e-3, -4.9717367042e-6, -3.31261198e-8, - 2.423096e-10, -1.702e-13, -1.49e-15 - }; - xx = 8.0 * x * x - 1.0; //Multiply x by 2 to make range be .1 to 1,and then apply transformation for evaluating even Chebyshev series. - *gam1 = CHEBEV(-1.0, 1.0, c1, NUSE1, xx); - *gam2 = CHEBEV(-1.0, 1.0, c2, NUSE2, xx); - *gampl = *gam2 - x * (*gam1); - *gammi = *gam2 + x * (*gam1); -} - -double Sphbes::CHEBEV(double a, double b, double c[], int m, double x) -{ - double d = 0.0; - double dd = 0.0; - double sv = 0.0; - double y = 0.0; - double y2 = 0.0; - int j=0; - - if ((x - a)*(x - b) > 0.0) - { - std::cout << "x not in range in routine chebev" << std::endl; - } - - y2 = 2.0 * (y = (2.0 * x - a - b) / (b - a)); - - for (j = m - 1;j >= 1;j--) - { - sv = d; - d = y2 * d - dd + c[j]; - dd = sv; - } - - return y*d - dd + 0.5*c[0]; -} - - -double Sphbes::Spherical_Bessel_7(const int n, const double &x) -{ - if (x==0) - { - if (n!=0) return 0; - if (n==0) return 1; - } - double order = 0.0, rj = 0.0, rjp = 0.0, ry = 0.0, ryp = 0.0; - - if (n < 0 || x <= 0.0) - { - std::cout << "Spherical_Bessel_7, bad arguments in sphbes" << std::endl; - //ModuleBase::WARNING_QUIT("Sphbes::Spherical_Bessel_7","bad arguments in sphbes"); - exit(0); - } - - order = n + 0.5; - - // call BESSSJY - BESSJY(x, order, &rj, &ry, &rjp, &ryp); - - const double RTPIO2=1.2533141; - - const double factor = RTPIO2 / std::sqrt(x); - - return factor*rj; -} - - -void Sphbes::Spherical_Bessel_Roots -( - const int &num, - const int &l, - const double &epsilon, - double* eigenvalue, - const double &rcut -) -{ - //ModuleBase::TITLE("Sphbes","Spherical_Bessel_Roots"); - if (num<=0) - { - std::cout << "Spherical_Bessel_Roots, num<=0" << std::endl; - //ModuleBase::WARNING_QUIT("Sphbes::Spherical_Bessel_Roots","num<=0"); - exit(0); - } - if (rcut<=0.0) - { - std::cout << "Spherical_Bessel_Roots, rcut<=0" << std::endl; - //ModuleBase::WARNING_QUIT("Sphbes::Spherical_Bessel_Roots","rcut<=0.0"); - exit(0); - } - - double min = 0.0; - double max = 2*ModuleBase::PI + (num + (l+0.5)/2 + 0.75)*ModuleBase::PI/2 + - std::sqrt((num + (l+0.5)/2+0.75)*(num + (l+0.5)/2+0.75)*ModuleBase::PI*ModuleBase::PI/4-(l+0.5)*(l+0.5)/2); - - // magic number !! - // guess : only need to > 1 - const int msh = 10 * num; -// std::cout<<"\n msh = "<(msh); -// std::cout<<"\n delta = "< epsilon) - { - // if not enough accurate, divide again. - const double delta2 = (x_2 - x_1)/(grid-1); - for (int j=0;j=7) - { - for (int ir=0; ir 1.0e-8) - { - ir0 = 0;//mohan modify 2007-10-13 - } - else - { - if (l == -1) - { - std::cout << "\n sph_bes, j_{-1}(0) ?//?"; - } - else if (l == 0) - { - jl [0] = 1.0;//mohan modify 2007-10-13 - } - else - { - jl [0] = 0.0;//mohan modify 2007-10-13 - } - ir0 = 1;//mohan modify 2007-10-13 - } - if (l == - 1) - { - for (ir = ir0;ir < msh; ir++) - { - x1 = q * r[ir]; - jl [ir] = std::cos(x1) / x1; - } - } - else if (l == 0) - { - for (ir = ir0;ir < msh;ir++) - { - x1 = q * r[ir]; - jl [ir] = std::sin(x1) / x1; - } - } - else if (l == 1) - { - for (ir = ir0;ir < msh;ir++) - { - x1 = q * r[ir]; - const double sinx = std::sin(x1); - const double cosx = std::cos(x1); - jl [ir] = (sinx / x1 - cosx) / x1; - } - } - else if (l == 2) - { - for (ir = ir0;ir < msh;ir++) - { - const double x1 = q * r[ir]; - const double sinx = std::sin(x1); - const double cosx = std::cos(x1); - jl [ir] = ((3.0 / x1 - x1) * sinx - - 3.0 * cosx) / (x1 * x1); - } - } - else if (l == 3) - { - for (ir = ir0;ir < msh;ir++) - { - x1 = q * r[ir]; - jl [ir] = (std::sin(x1) * (15.0 / x1 - 6.0 * x1) + - std::cos(x1) * (x1 * x1 - 15.0)) / std::pow(x1, 3);//mohan modify 2007-10-13 - } - } - else if (l == 4) - { - for (ir = ir0;ir < msh;ir++) - { - const double x1 = q * r[ir]; - const double x2 = x1 * x1; - const double x3 = x1 * x2; - const double x4 = x1 * x3; - const double x5 = x1 * x4; - jl [ir] = (std::sin(x1) * (105.0 - 45.0 * x2 + x4) + - std::cos(x1) * (10.0 * x3 - 105.0 * x1)) / x5; // mohan modify 2007-10-13 - } - } - else if (l == 5) - { - for (ir = ir0;ir < msh;ir++) - { - x1 = q * r[ir]; - - if (x1 < 0.14) - { - jl[ir] = 0;//mohan add 2007-10-15 - } - else - { - double cx1 = std::cos(x1); - double sx1 = std::sin(x1); - jl [ir] = (-cx1 - - (945.0 * cx1) / std::pow(x1, 4) + - (105.0 * cx1) / (x1 * x1) + - (945.0 * sx1) / std::pow(x1, 5) - - (420.0 * sx1) / std::pow(x1, 3) + - (15.0 * sx1) / x1) / x1; - - } - } - } - else if (l == 6) - { - for (ir = ir0;ir < msh;ir++) - { - x1 = q * r[ir]; - - if (x1 < 0.29) - { - jl[ir] = 0;//mohan add 2007-10-15 - } - else - { - double cx1 = std::cos(x1); - double sx1 = std::sin(x1); - jl [ir] = ((-10395.0 * cx1) / std::pow(x1, 5) + - (1260.0 * cx1) / std::pow(x1, 3) - - (21.0 * cx1) / x1 - sx1 + - (10395.0 * sx1) / std::pow(x1, 6) - - (4725.0 * sx1) / std::pow(x1, 4) + - (210.0 * sx1) / (x1 * x1)) / x1; - } - } - }//mohan modify 2007-11-20 reduce cos , sin , q*r[ir] times; - else - { - std::cout << "\n error in sph_bes, l out of {-1 ... 6},l = " << l ; - exit(0); - } - } - - return; -} - - -void Sphbes::Spherical_Bessel -( - const int &msh, //number of grid points - const double *r,//radial grid - const double &q, // - const int &l, //angular momentum - double *sj, //jl(1:msh) = j_l(q*r(i)),spherical bessel function - double *sjp -) -{ - - //calculate jlx first - Spherical_Bessel (msh, r, q, l, sj); - - for (int ir = 0; ir < msh; ir++) - { - sjp[ir] = 1.0; - } - return; -} - -void Sphbes::dSpherical_Bessel_dx -( - const int &msh, // number of grid points - const double *r, // radial grid - const double &q, // wave std::vector - const int &l, // angular momentum - double *djl // jl(1:msh) = j_l(q*r(i)),spherical bessel function -) -{ - if (l < 0 ) - { - std::cout << "We temporarily only calculate derivative of l >= 0." << std::endl; - exit(0); - } - - double djl0 = 0; - if(l == 1) - { - djl0 = 1.0/3.0; - } - - if(l == 0 ) - { - for (int ir = 0;ir < msh; ir++) - { - double x1 = q * r[ir]; - if(x1 < 1e-8) - { - djl[ir] = djl0; - } - else - { - djl[ir] = (x1 * std::cos(x1) - std::sin(x1)) / (x1*x1); - } - - } - } - else - { - double *jl = new double [msh]; - Spherical_Bessel (msh, r, q, l-1, jl); - Spherical_Bessel (msh, r, q, l, djl); - for (int ir = 0;ir < msh; ir++) - { - double x1 = q * r[ir]; - if(x1 < 1e-8) - { - djl[ir] = djl0; - } - else - { - djl[ir] = jl[ir] - double(l+1)/x1 * djl[ir]; - } - } - delete[] jl; - } - return; -} - -double Sphbes::_sphbesj_ascending_recurrence(int l, double x) { - - // should be used when x > l && l > 0 - - double invx = 1.0 / x; - double j0 = std::sin(x) * invx; - double j1 = ( j0 - std::cos(x) ) * invx; - - double jl = 0.0; - for (int i = 2; i <= l; ++i) { - jl = (2*i-1) * invx * j1 - j0; - j0 = j1; - j1 = jl; - } - - return j1; // at the end of the loop j1 == jl -} - -double Sphbes::_sphbesj_series(int l, double x) { - - // should be used when x < l - - // the absolute ratio between the k-th and (k-1)-th terms is x^2 / k / (4l+4k+2) (k >= 1) - // terms are guaranteed to be monotonically decreasing from the beginning for x < sqrt(4l+6). - // terms are guaranteed to be monotonically decreasing from the (l/4)-th term for x < l - - double jl = 0.0; - constexpr double eps = 1e-17; // series terminate when the k-th term is less than eps * jl - - // zeroth order term: x^l / (2l+1)!! - int k = 0; - double kth_term = 1.0; - for (int i = 1; i <= l; ++i) { - kth_term *= x / (2 * i + 1); - } - - double x_sqr_half = 0.5 * x * x; - do { - jl += kth_term; - k += 1; - kth_term *= -x_sqr_half / ( k * (2*(l+k)+1) ); - } while ( std::abs(kth_term) > std::abs(eps * jl) ); - - return jl; -} - -double Sphbes::sphbesj(const int l, const double x) -{ - assert( l >= 0 ); - assert( x >= 0 ); - - // j_l(0) - if ( x == 0 ) - { - return l ? 0.0 : 1.0; - } - - if ( x < l ) - { - return _sphbesj_series(l, x); - } - else - { - double invx = 1.0 / x; - switch (l) - { - case 0: - return std::sin(x) * invx; - case 1: - return ( std::sin(x) * invx - std::cos(x) ) * invx; - // NOTE: the following explicit expressions are not necessarily faster than ascending recurrence, - // but we keep them just in case we need them in the future. - //case 2: - // return ( (3.0 * invx - x) * std::sin(x) - 3.0 * std::cos(x) ) * (invx * invx); - //case 3: - // return ( std::sin(x) * (15.0 * invx - 6.0 * x) + std::cos(x) * (x * x - 15.0) ) * std::pow(invx, 3); - //case 4: - // return ( std::sin(x) * (std::pow(x,3) - 45.0 * x + 105.0 * invx) - // + std::cos(x) * (10.0 * x * x - 105.0) ) * std::pow(invx, 4); - //case 5: - // return ( std::sin(x) * (15.0 * std::pow(x,3) - 420.0 * x + 945.0 * invx) - // + std::cos(x) * (-std::pow(x, 4) + 105.0 * x * x - 945.0) ) * std::pow(invx, 5); - //case 6: - // return ( std::sin(x) * (-std::pow(x, 5) + 210.0 * std::pow(x, 3) - 4725.0 * x + 10395.0 * invx) - // + std::cos(x) * (-21.0 * std::pow(x, 4) + 1260.0 * x * x - 10395.0) ) * std::pow(invx, 6); - default: - return _sphbesj_ascending_recurrence(l, x); - } - } -} - -double Sphbes::dsphbesj(const int l, const double x) -{ - assert( l >= 0 ); - assert( x >= 0 ); - return l == 0 ? -sphbesj(1, x) : ( l * sphbesj(l - 1, x) - (l + 1) * sphbesj(l + 1, x) ) / (2 * l + 1); -} - -void Sphbes::sphbesj(const int n, - const double* const r, - const double q, - const int l, - double* const jl) -{ - for (int i = 0; i != n; ++i) - { - jl[i] = Sphbes::sphbesj(l, q * r[i]); - } -} - -void Sphbes::dsphbesj(const int n, - const double* const r, - const double q, - const int l, - double* const djl) -{ - for (int i = 0; i != n; ++i) - { - djl[i] = Sphbes::dsphbesj(l, q * r[i]); - } -} - -void Sphbes::sphbes_zeros(const int l, const int n, double* const zeros, const bool return_all) -{ - assert( n > 0 ); - assert( l >= 0 ); - - // The zeros of j_l and j_{l-1} are interlaced; - // So do the zeros of j_l and j_{l-2}. - // This property enables us to use bracketing method recursively - // to find all zeros of j_l from the zeros of j_0. - - // If return_all is true, zeros of j_0, j_1, ..., j_l will all be returned - // such that zeros[l*n+i] is the i-th zero of j_l. As such, it is required - // that the array "zeros" has a size of (l+1)*n. - // - // If return_all is false, only the zeros of j_l will be returned - // and "zeros" is merely required to have a size of n. - // Note that in this case the bracketing method can be applied with a stride - // of 2 instead of 1: - // j_0 --> j_1 --> j_3 --> j_5 --> ... --> j_l (odd l) - // j_0 --> j_2 --> j_4 --> j_6 --> ... --> j_l (even l) - - // Every recursion step reduces the number of zeros by 1. - // If return_all is true, one needs to start with n+l zeros of j_0 - // to ensure n zeros of j_l; otherwise with a stride of 2 one only - // needs to start with n+(l+1)/2 zeros of j_0 - int nz = n + ( return_all ? l : (l+1)/2 ); - double* buffer = new double[nz]; - - // zeros of j_0 = sin(x)/x is just n*pi - double PI = std::acos(-1.0); - for (int i = 0; i < nz; i++) - { - buffer[i] = (i+1) * PI; - } - - int ll = 0; // active l - auto jl = [&ll] (double x) { return sphbesj(ll, x); }; - int stride = 0; - std::function copy_if_needed; - int offset = 0; // keeps track of the position in zeros for next copy (used when return_all == true) - if (return_all) - { - copy_if_needed = [&](){ std::copy(buffer, buffer + n, zeros + offset); offset += n; }; - stride = 1; - ll = 1; - } - else - { - copy_if_needed = [](){}; - stride = 2; - ll = 2 - l % 2; - } - - for (; ll <= l; ll += stride, --nz) - { - copy_if_needed(); - for (int i = 0; i < nz-1; i++) - { - buffer[i] = illinois(jl, buffer[i], buffer[i+1], 1e-15, 50); - } - } - - std::copy(buffer, buffer + n, zeros + offset); - delete[] buffer; -} - -double Sphbes::illinois(std::function func, double x0, double x1, const double tol, const int max_iter) -{ - assert(tol > 0.0 && max_iter > 0); - - double f0 = func(x0); - double f1 = func(x1); - assert(f0 * f1 <= 0); - - if (std::abs(f0) < std::abs(f1)) { - std::swap(x0, x1); - std::swap(f0, f1); - } - - int iter = 0; - double x = 0.0, f = 0.0; - while (++iter <= max_iter && std::abs(f1) > tol) - { - // regula falsi - x = (x0 * f1 - x1 * f0) / (f1 - f0); - f = func(x); - - // Illinois anti-stalling variant - if (f * f1 < 0) - { - x0 = x1; - f0 = f1; - } - else - { - f0 *= 0.5; - } - x1 = x; - f1 = f; - } - - if (iter > max_iter) - { - std::cout << "Maximum number of iterations reached in illinois." << std::endl; - } - - return x1; -} - -} diff --git a/source/module_base/math_sphbes.h b/source/module_base/math_sphbes.h deleted file mode 100644 index 7aa9c78a48..0000000000 --- a/source/module_base/math_sphbes.h +++ /dev/null @@ -1,170 +0,0 @@ -#ifndef MATH_SPHBES_H -#define MATH_SPHBES_H - -#include - -//======================================================== -// Spherical Bessel functions, mohan 2021-05-06 -//======================================================== -namespace ModuleBase -{ - -class Sphbes -{ - public: - - Sphbes(); - ~Sphbes(); - - /** - * @brief spherical bessel jl(qr) - * - * @param msh [in] number of grid points - * @param r [in] radial grid - * @param q [in] k_radial - * @param l [in] angular momentum - * @param jl [out] jl spherical bessel function - */ - static void Spherical_Bessel - ( - const int &msh, - const double *r, - const double &q, - const int &l, - double *jl - ); - - /** - * @brief derivative of spherical bessel djl(qr)/d(qr) - * - * @param msh [in] number of grid points - * @param r [in] radial grid - * @param q [in] k_radial - * @param l [in] angular momentum - * @param jl [out] jl spherical bessel function - */ - static void dSpherical_Bessel_dx - ( - const int &msh, - const double *r, - const double &q, - const int &l, - double *jl - ); - - /** - * @brief spherical bessel - * - * @param msh [in] number of grid points - * @param r [in] radial grid - * @param q [in] k_radial - * @param l [in] angular momentum - * @param jl [out] jl spherical bessel function - * @param sjp [out] sjp[i] is assigned to be 1.0. i < msh. - */ - static void Spherical_Bessel - ( - const int &msh, - const double *r, - const double &q, - const int &l, - double *sj, - double *sjp - ); - - /** - * @brief return num eigenvalues of spherical bessel function - * - * @param num [in] the number of eigenvalues - * @param l [in] angular number - * @param epsilon [in] the accuracy - * @param eigenvalue [out] the calculated eigenvalues - * @param rcut [in] the cutoff the radial function - */ - static void Spherical_Bessel_Roots - ( - const int &num, - const int &l, - const double &epsilon, - double* eigenvalue, - const double &rcut - ); - - //! spherical Bessel function of the first kind - /*! - * This function computes j_l(x) by series expansion for x < l - * and by ascending recurrence for x >= l. - * */ - static double sphbesj(const int l, //!< [in] order - const double x //!< [in] argument - ); - - //! derivative of spherical Bessel function - static double dsphbesj(const int l, //!< [in] order - const double x //!< [in] argument - ); - - //! computes the values of l-th order spherical Bessel function at q*r[ir] - static void sphbesj(const int n, //!< [in] number of r grid points - const double* const r, //!< [in] r grid - const double q, //!< [in] wave vector - const int l, //!< [in] order of the spherical Bessel function - double* const jl //!< [out] results - ); - - //! computes the derivative of l-th order spherical Bessel function at q*r[ir] - static void dsphbesj(const int n, //!< [in] number of r grid points - const double* const r, //!< [in] r grid - const double q, //!< [in] wave vector - const int l, //!< [in] order of the spherical Bessel function - double* const djl //!< [out] results - ); - - /** - * @brief Zeros of spherical Bessel functions. - * - * This function computes the first n positive zeros of the l-th order - * spherical Bessel function of the first kind. - * - * @param[in] l (maximum) order of the spherical Bessel function - * @param[in] n number of zeros to be computed (for each j_l if return_all is true) - * @param[out] zeros on exit, contains the positive zeros. - * @param[in] return_all if true, return all zeros from j_0 to j_l such that zeros[l*n+i] - * is the i-th zero of j_l. If false, return only the first n zeros of j_l. - * - * @note The size of array "zeros" must be at least (l+1)*n if return_all is true, and n otherwise. - */ - static void sphbes_zeros(const int l, - const int n, - double* const zeros, - bool return_all = false - ); - -private: - - static double Spherical_Bessel_7(const int n, const double &x); - - // Peize Lin change double to void 2019-05-01 - static void BESSJY(double x, double xnu, double *rj, double *ry, double *rjp, double *ryp); - - static void BESCHB(double x, double *gam1, double *gam2, double *gampl, double *gammi); - - static double CHEBEV(double a, double b, double c[], int m, double x); - - static int IMAX(int a, int b); - - // utility functions for sphbesj - static double _sphbesj_ascending_recurrence(int l, double x); - static double _sphbesj_series(int l, double x); - - // Regula falsi with Illinois anti-stalling variation - static double illinois(std::function func, - double x0, - double x1, - const double tol = 1e-12, - const int max_iter = 50); -}; - -} - -#endif diff --git a/source/module_base/math_ylmreal.cpp b/source/module_base/math_ylmreal.cpp deleted file mode 100644 index 69c79dc089..0000000000 --- a/source/module_base/math_ylmreal.cpp +++ /dev/null @@ -1,721 +0,0 @@ -#include "math_ylmreal.h" - -#include "constants.h" -#include "module_base/kernels/math_ylm_op.h" -#include "module_base/libm/libm.h" -#include "module_base/module_device/memory_op.h" -#include "module_base/array_pool.h" -#include "realarray.h" -#include "timer.h" -#include "tool_quit.h" -#include "ylm.h" - -#include -#include - -namespace ModuleBase -{ - -YlmReal::YlmReal(){} -YlmReal::~YlmReal(){} - -void YlmReal::rlylm -( - const int lmax, - const double& x, - const double& y, - const double& z, // g_cartesian_vec(x,y,z) - double* rly // output -) -{ - ModuleBase::timer::tick("YlmReal","rlylm"); - - assert(lmax >= 0); - - //get xy_dependence - assert(lmax <= 19); - - double Am[20]; - double Bm[20]; - - // mohan add 2021-05-07 - for(int i=0; i<20; ++i) - { - Am[i]=0.0; - Bm[i]=0.0; - } - - //ZEROS(Am, 20); - //ZEROS(Bm, 20); - - double x2, x3, x4, x5; - double y2, y3, y4, y5; - - x2 = x * x; - x3 = x2 * x; - x4 = x3 * x; - x5 = x4 * x; - - y2 = y * y; - y3 = y2 * y; - y4 = y3 * y; - y5 = y4 * y; - - //x-y dependence - //Am - //Bm - for(int im = 0; im < lmax+1; im++) - { - if(im == 0) - { - Am[0] = 1.0; - Bm[0] = 0.0; - } - else if(im == 1) - { - Am[1] = x; - Bm[1] = y; - } - else if(im == 2) - { - Am[2] = x2- y2; - Bm[2] = 2.0 * x * y; - } - else if(im == 3) - { - Am[3] = x3 - 3.0 * x * y2; - Bm[3] = 3.0 * x2 * y - y3; - } - else if(im == 4) - { - Am[4] = x4 - 6.0 * x2 * y2 + y4; - Bm[4] = 4.0 * (x3 * y - x * y3); - } - else if(im == 5) - { - Am[5] = x5 - 10.0 * x3 * y2 + 5.0 * x * y4; - Bm[5] = 5.0 * x4 * y - 10.0 * x2 * y3 + y5; - } - else - { - for(int ip = 0; ip <= im; ip++) - { - double aux = Fact(im) / Fact(ip) / Fact(im - ip); - Am[im] += aux * pow(x, ip) * pow(y, im-ip) * cos( (im-ip) * ModuleBase::PI / 2.0 ); - Bm[im] += aux * pow(x, ip) * pow(y, im-ip) * sin( (im-ip) * ModuleBase::PI / 2.0 ); - } - } - } - - //z dependence - double zdep[20][20]; - - for(int il = 0; il < 20; il++) - { - for(int jl=0; jl < 20; jl++) - { - zdep[il][jl]=0.0; // mohan add 2021-05-07 - } -// ZEROS(zdep[il], 20); - } - - double z2 = z * z; - double z3 = z2 * z; - double z4 = z3 * z; - //double z5 = z4 * z; - - double r = sqrt(x*x + y*y + z*z); - double r2 = r * r; - double r3 = r2 * r; - double r4 = r3 * r; - - for(int il = 0; il < lmax + 1; il++) - { - if(il == 0) - { - zdep[0][0] = 1.0; - } - else if(il == 1) - { - zdep[1][0] = z; - zdep[1][1] = 1.0; - } - else if(il == 2) - { - zdep[2][0] = 0.5 * (3.0 * z2 - r2); - zdep[2][1] = sqrt(3.0) * z; - zdep[2][2] = sqrt(3.0) * 0.5; - } - else if(il == 3) - { - zdep[3][0] = 2.5 * z3 - 1.5 * z * r2; - zdep[3][1] = 0.25 * sqrt(6.0) * (5.0 * z2 - r2); - zdep[3][2] = 0.5 * sqrt(15.0) * z; - zdep[3][3] = 0.25 * sqrt(10.0); - } - else if(il == 4) - { - zdep[4][0] = 0.125 * (35.0 * z4 - 30.0 * r2 * z2 + 3.0 * r4); - zdep[4][1] = sqrt(10.0) * 0.25 * z * (7.0 * z2 - 3.0 * r2); - zdep[4][2] = sqrt(5.0) * 0.25 * (7.0 * z2 - r2); - zdep[4][3] = sqrt(70.0) * 0.25 * z; - zdep[4][4] = sqrt(35.0) * 0.125; - } - else if(il == 5) - { - zdep[5][0] = 0.125 * z *( 63.0 * z4 - 70.0 * z2 * r2 + 15.0 * r4); - zdep[5][1] = 0.125 * sqrt(15.0) * (21.0 * z4 - 14.0 * z2 * r2 + r4); - zdep[5][2] = 0.25 * sqrt(105.0) * z * (3.0 * z2 - r2); - zdep[5][3] = 0.0625 * sqrt(70.0) * (9.0 * z2 - r2); - zdep[5][4] = 0.375 * sqrt(35.0) * z; - zdep[5][5] = 0.1875 * sqrt(14.0); - } - else - { - for(int im = 0; im <= il; im++) - { - int kmax = static_cast( (il - im) / 2 ); - for(int ik = 0; ik <= kmax; ik++) - { - int twok = 2 * ik; - - double gamma; - double aux0, aux1, aux2, aux3; - - aux0 = pow(-1.0, ik) * pow(2.0, -il); - aux1 = Fact(il) / Fact(ik) / Fact(il-ik); - aux2 = Fact(2*il - twok) / Fact(il) / Fact(il - twok); - aux3 = Fact(il - twok) / Fact(il - twok - im); - - gamma = aux0 * aux1 * aux2 * aux3; - - assert(il - twok - im >= 0); - zdep[il][im] += pow(r, twok) * pow(z, il-twok-im) * gamma; - } - - if(im >= 1) - { - zdep[il][im] *= sqrt(2 * Fact(il - im) / Fact(il + im)); - - } - } - } - } - - //calc - int ic = 0; - - //special case for r=0 - double rpi = r; - const double tiny = 1.0E-10; - if (rpi < tiny) rpi += tiny; - - for(int il = 0; il <= lmax; il++) - { - double fac = sqrt( (2.0 * il + 1.0) / ModuleBase::FOUR_PI ); - - double rl = pow(rpi, il); - - //m=0 - rly[ic] = Am[0] * zdep[il][0] * fac / rl; - - ic++; - - //m ! = 0 - for(int im = 1; im <= il; im++) - { - //m>0 - rly[ic] = Am[im] * zdep[il][im] * pow(-1.0, im) * fac / rl; - - ic++; - - //m<0 - rly[ic] = Bm[im] * zdep[il][im] * pow(-1.0, im) * fac / rl; - - ic++; - } - } - - ModuleBase::timer::tick("YlmReal","rlylm"); - return; -} - - -void YlmReal::Ylm_Real2 -( - const int lmax2, // lmax2 = (lmax+1)^2 - const int ng, // - const ModuleBase::Vector3 *g, // g_cartesian_vec(x,y,z) - matrix &ylm // output -) -{ - if (ng<1 || lmax2<1) - { - ModuleBase::WARNING("YLM_REAL","ng<1 or lmax2<1"); - return; - } - -//---------------------------------------------------------- -// EXPLAIN : find out lmax -//---------------------------------------------------------- - bool out_of_range = true; - int lmax = 0; - for (int l= 0; l< 30; l++) - { - if ((l+1)*(l+1) == lmax2) - { - lmax = l; - out_of_range = false; - break; - } - } - if (out_of_range) - { - ModuleBase::WARNING_QUIT("YLM_REAL","l>30 or l<0"); - } - -//---------------------------------------------------------- -// Start CALC -//---------------------------------------------------------- - std::vector rly(lmax2); - - for (int ig = 0; ig < ng; ig++) - { - rlylm (lmax, g[ig].x, g[ig].y, g[ig].z, rly.data()); - - for (int lm = 0; lm < lmax2; lm++) - { - ylm (lm, ig) = rly[lm]; - } - } - - return; -} - -//========================================================== -// MEMBER FUNCTION : -// NAME : YLM_REAL(Real spherical harmonics ylm(G) up to l=lmax -// Use Numerical recursive algorithm as given in Numerical Recipes -//========================================================== -// from ylmr2.f90 - -template -void YlmReal::Ylm_Real(Device * ctx, const int lmax2, const int ng, const FPTYPE *g, FPTYPE * ylm) -{ - using resmem_var_op = base_device::memory::resize_memory_op; - using delmem_var_op = base_device::memory::delete_memory_op; - using cal_ylm_real_op = ModuleBase::cal_ylm_real_op; - - if (ng < 1 || lmax2 < 1) { - ModuleBase::WARNING("YLM_REAL","ng<1 or lmax2<1"); - return; - } - -//---------------------------------------------------------- -// EXPLAIN : find out lmax -//---------------------------------------------------------- - bool out_of_range = true; - int lmax = 0; - for (int l = 0; l < 30; l++) { - if ((l + 1) * (l + 1) == lmax2) { - lmax = l; - out_of_range = false; - break; - } - } - if (out_of_range) { - ModuleBase::WARNING_QUIT("YLM_REAL","l>30 or l<0"); - } - FPTYPE * p = nullptr, * phi = nullptr, * cost = nullptr; - resmem_var_op()(p, (lmax + 1) * (lmax + 1) * ng, "YlmReal::Ylm_Real"); - - cal_ylm_real_op()( - ctx, - ng, - lmax, - ModuleBase::SQRT2, - ModuleBase::PI, - ModuleBase::PI_HALF, - ModuleBase::FOUR_PI, - ModuleBase::SQRT_INVERSE_FOUR_PI, - g, - p, - ylm); - - delmem_var_op()(p); - delmem_var_op()(phi); - delmem_var_op()(cost); -} // end subroutine ylmr2 - -//========================================================== -// MEMBER FUNCTION : -// NAME : YLM_REAL(Real spherical harmonics ylm(G) up to l=lmax -// Use Numerical recursive algorithm as given in Numerical Recipes -//========================================================== -// from ylmr2.f90 -void YlmReal::Ylm_Real -( - const int lmax2, // lmax2 = (lmax+1)^2 - const int ng, // - const ModuleBase::Vector3 *g, // g_cartesian_vec(x,y,z) - matrix &ylm // output -) -{ - - if (ng<1 || lmax2<1) - { - ModuleBase::WARNING("YLM_REAL","ng<1 or lmax2<1"); - return; - } - -//---------------------------------------------------------- -// EXPLAIN : find out lmax -//---------------------------------------------------------- - bool out_of_range = true; - int lmax = 0; - for (int l= 0; l< 30; l++) - { - if ((l+1)*(l+1) == lmax2) - { - lmax = l; - out_of_range = false; - break; - } - } - if (out_of_range) - { - ModuleBase::WARNING_QUIT("YLM_REAL","l>30 or l<0"); - } - -//---------------------------------------------------------- -// EXPLAIN : if lmax = 1,only use Y00 , output result. -//---------------------------------------------------------- - if (lmax == 0) - { -#ifdef _OPENMP -#pragma omp parallel for -#endif - for (int i=0;i cost(ng); - std::vector phi(ng); - -#ifdef _OPENMP -#pragma omp parallel for -#endif - for (int ig = 0;ig < ng;ig++) - { - const double gmod = g[ig].norm(); - if (gmod < 1.0e-9) - { - cost[ig] = 0.0; - } - else - { - cost[ig] = g[ig].z / gmod; - }// endif - - // beware the arc tan, it is defined modulo pi - if (g[ig].x > 1.0e-9) - { - phi[ig] = atan(g[ig].y / g[ig].x); - } - else if (g[ig].x < -1.e-9) - { - phi[ig] = atan(g[ig].y / g[ig].x) + ModuleBase::PI; - } - else - { - phi[ig] = ModuleBase::PI_HALF * ((g[ig].y >= 0.0) ? 1.0 : -1.0); //HLX: modified on 10/13/2006 - } // end if - } // enddo - -//========================================================== -// NAME : p(Legendre Polynomials) (0 <= m <= l) -//========================================================== - ModuleBase::realArray p(lmax+1,lmax+1,ng); - int lm = -1; - for (int l=0; l<=lmax; l++) - { - const double c = sqrt((2*l+1) / ModuleBase::FOUR_PI); - if (l == 0) - { -#ifdef _OPENMP -#pragma omp parallel for -#endif - for (int i=0;i(l) / 2.0) ;//mohan modify 2007-10-13 - if (l%2 == 1) - { - p(l, l, i) = -p(l, l, i); - } - } - } // end if - - // Y_lm, m = 0 - ++lm; -#ifdef _OPENMP -#pragma omp parallel for -#endif - for (int i=0;i 0 - const double same = c * sqrt - ( - static_cast(Fact(l - m)) / - static_cast(Fact(l + m)) - ) - *ModuleBase::SQRT2; - - ++lm; -#ifdef _OPENMP -#pragma omp parallel for -#endif - for (int i=0;i *g, - matrix &ylm, - matrix &dylmx, - matrix &dylmy, - matrix &dylmz - ) -{ - ModuleBase::Ylm::set_coefficients(); - const int lmax = int(sqrt( double(lmax2) ) + 0.1) - 1; - std::vector tmpylm((lmax2+1) * (lmax2+1)); - Array_Pool tmpgylm((lmax2+1) * (lmax2+1), 3); - - for (int ig = 0;ig < ng;ig++) - { - ModuleBase::Vector3 gg = g[ig]; - double gmod = gg.norm(); - if (gmod < 1.0e-9) - { - for(int lm = 0 ; lm < lmax2 ; ++lm) - { - if(lm == 0) - ylm(lm,ig) = ModuleBase::SQRT_INVERSE_FOUR_PI; - else - ylm(lm,ig) = 0; - dylmx(lm,ig) = dylmy(lm,ig) = dylmz(lm,ig) = 0; - } - } - else - { - Ylm::grad_rl_sph_harm(lmax2, gg.x, gg.y, gg.z, tmpylm.data(),tmpgylm.get_ptr_2D()); - int lm = 0; - for(int il = 0 ; il <= lmax ; ++il) - { - for(int im = 0; im < 2*il+1; ++im, ++lm) - { - double rlylm = tmpylm[lm]; - ylm(lm,ig) = rlylm / pow(gmod,il); - dylmx(lm,ig) = ( tmpgylm[lm][0] - il*rlylm * gg.x / pow(gmod,2) )/pow(gmod,il); - dylmy(lm,ig) = ( tmpgylm[lm][1] - il*rlylm * gg.y / pow(gmod,2) )/pow(gmod,il); - dylmz(lm,ig) = ( tmpgylm[lm][2] - il*rlylm * gg.z / pow(gmod,2) )/pow(gmod,il); - } - } - - } - } - return; -} - - -//========================================================== -// MEMBER FUNCTION : -// NAME : Fact ( n! ) -// NAME : Semi_Fact ( n!! ) -//========================================================== -long double YlmReal::Fact(const int n) -{ - long double f = 1; - for (int i=n; i>1; i--) - { - f *= i; - } - return f; -} - -int YlmReal::Semi_Fact(const int n) -{ - int semif = 1; - for (int i=n; i>2; i -= 2) - { - semif *= i; - } - return semif; -} - -template void YlmReal::Ylm_Real(base_device::DEVICE_CPU*, - int, - int, - const float*, - float*); -template void YlmReal::Ylm_Real(base_device::DEVICE_CPU*, - int, - int, - const double*, - double*); -#if ((defined __CUDA) || (defined __ROCM)) -template void YlmReal::Ylm_Real(base_device::DEVICE_GPU*, - int, - int, - const float*, - float*); -template void YlmReal::Ylm_Real(base_device::DEVICE_GPU*, - int, - int, - const double*, - double*); -#endif -} // namespace ModuleBase diff --git a/source/module_base/math_ylmreal.h b/source/module_base/math_ylmreal.h deleted file mode 100644 index 9643196a21..0000000000 --- a/source/module_base/math_ylmreal.h +++ /dev/null @@ -1,107 +0,0 @@ -#ifndef MATH_YLMREAL_H -#define MATH_YLMREAL_H - -#include "vector3.h" -#include "matrix.h" - -namespace ModuleBase -{ - -class YlmReal -{ - public: - - YlmReal(); - ~YlmReal(); - - /** - * @brief spherical harmonic function (real form) an array of vectors - * - * @param lmax2 [in] lmax2 = (lmax + 1)^2 ; lmax = angular quantum number - * @param ng [in] the number of vectors - * @param g [in] an array of vectors - * @param ylm [out] Ylm; column index represent vector, row index represent Y00, Y10, Y11, Y1-1, Y20,Y21,Y2-1,Y22.Y2-2,...; - */ - static void Ylm_Real - ( - const int lmax2, - const int ng, - const ModuleBase::Vector3 *g, - matrix &ylm - ); - - /** - * @brief spherical harmonic function (real form) an array - * - * @param lmax2 [in] lmax2 = (lmax + 1)^2 ; lmax = angular quantum number - * @param ng [in] the number of vectors - * @param g [in] an array of vectors - * @param ylm [out] Ylm; column index represent vector, row index represent Y00, Y10, Y11, Y1-1, Y20,Y21,Y2-1,Y22.Y2-2,...; - */ - template - static void Ylm_Real(Device * ctx, const int lmax2, const int ng, const FPTYPE *g, FPTYPE * ylm); - - /** - * @brief gradient of spherical harmonic function (real form) an array of vectors - * - * @param lmax2 [in] lmax2 = (lmax + 1)^2 ; lmax = angular quantum number - * @param ng [in] the number of vectors - * @param g [in] an array of vectors - * @param ylm [out] Ylm; column index represent vector, row index represent Y00, Y10, Y11, Y1-1, Y20,Y21,Y2-1,Y22.Y2-2,...; - * @param dylmx/dylmy/dylmz [out] \nabla Ylm; column index represent vector, row index represent dY00/dxyz, dY10/dxyz,...; - */ - static void grad_Ylm_Real - ( - const int lmax2, - const int ng, - const ModuleBase::Vector3 *g, - matrix &ylm, - matrix &dylmx, - matrix &dylmy, - matrix &dylmz - ); - - /** - * @brief spherical harmonic function (Herglotz generating form) of an array of vectors - * - * @param lmax2 [in] lmax2 = (lmax + 1)^2 ; lmax = angular quantum number - * @param ng [in] the number of vectors - * @param g [in] an array of vectors - * @param ylm [out] Ylm; column index represent vector, row index represent Y00, Y10, Y11, Y1-1, Y20,Y21,Y2-1,Y22.Y2-2,...; - */ - static void Ylm_Real2 - ( - const int lmax2, - const int ng, - const ModuleBase::Vector3 *g, - matrix &ylm - ); - - /** - * @brief spherical harmonic function (Herglotz generating form) of a vector - * - * @param lmax [in] maximum angular quantum number - * @param x [in] x part of the vector - * @param y [in] y part of the vector - * @param z [in] z part of the vector - * @param rly [in] Ylm, Y00, Y10, Y11, Y1-1, Y20,Y21,Y2-1,Y22.Y2-2,... - */ - static void rlylm - ( - const int lmax, - const double& x, - const double& y, - const double& z, - double* rly - ); - - private: - - static long double Fact(const int n); - static int Semi_Fact(const int n); - -}; - -} - -#endif diff --git a/source/module_base/mathzone.h b/source/module_base/mathzone.h deleted file mode 100644 index 80239d58a1..0000000000 --- a/source/module_base/mathzone.h +++ /dev/null @@ -1,179 +0,0 @@ -#ifndef MATHZONE_H -#define MATHZONE_H - -#include "global_function.h" -#include "matrix3.h" -#include "vector3.h" -#include "realarray.h" - -#include -#include -#include -#include -#include -namespace ModuleBase -{ - -/** - * @brief atomic coordinates conversion functions - * - */ -class Mathzone -{ - public: - Mathzone(); - ~Mathzone(); - - public: - /** - * @brief Pointwise product of two vectors with same size - * - * @tparam Type - * @param[in] f1 - * @param[in] f2 - * @return std::vector - * @author Peize Lin (2016-08-03) - */ - template - static std::vector Pointwise_Product(const std::vector &f1, const std::vector &f2) - { - assert(f1.size() == f2.size()); - std::vector f(f1.size()); - for (int ir = 0; ir != f.size(); ++ir) - f[ir] = f1[ir] * f2[ir]; - return f; - } - - /** - * @brief change direct coordinate (dx,dy,dz) to - * Cartesian coordinate (cx,cy,cz), (dx,dy,dz) = (cx,cy,cz) * R - * - * @param[in] dx Direct coordinats - * @param[in] dy - * @param[in] dz - * @param[in] R11 Lattice vector matrix R_ij: i_row, j_column - * @param[in] R12 - * @param[in] R13 - * @param[in] R21 - * @param[in] R22 - * @param[in] R23 - * @param[in] R31 - * @param[in] R32 - * @param[in] R33 - * @param[out] cx Cartesian coordinats - * @param[out] cy - * @param[out] cz - */ - static inline void Direct_to_Cartesian(const double &dx, - const double &dy, - const double &dz, - const double &R11, - const double &R12, - const double &R13, - const double &R21, - const double &R22, - const double &R23, - const double &R31, - const double &R32, - const double &R33, - double &cx, - double &cy, - double &cz) - { - ModuleBase::Matrix3 lattice_vector; - ModuleBase::Vector3 direct_vec, cartesian_vec; - lattice_vector.e11 = R11; - lattice_vector.e12 = R12; - lattice_vector.e13 = R13; - lattice_vector.e21 = R21; - lattice_vector.e22 = R22; - lattice_vector.e23 = R23; - lattice_vector.e31 = R31; - lattice_vector.e32 = R32; - lattice_vector.e33 = R33; - - direct_vec.x = dx; - direct_vec.y = dy; - direct_vec.z = dz; - - cartesian_vec = direct_vec * lattice_vector; - cx = cartesian_vec.x; - cy = cartesian_vec.y; - cz = cartesian_vec.z; - return; - } - - /** - * @brief Change Cartesian coordinate (cx,cy,cz) to - * direct coordinate (dx,dy,dz), (cx,cy,cz) = (dx,dy,dz) * R^(-1) - * - * @param[in] cx Cartesian coordinats - * @param[in] cy - * @param[in] cz - * @param[in] R11 Lattice vector matrix R_ij: i_row, j_column - * @param[in] R12 - * @param[in] R13 - * @param[in] R21 - * @param[in] R22 - * @param[in] R23 - * @param[in] R31 - * @param[in] R32 - * @param[in] R33 - * @param[out] dx Direct coordinats - * @param[out] dy - * @param[out] dz - */ - static inline void Cartesian_to_Direct(const double &cx, - const double &cy, - const double &cz, - const double &R11, - const double &R12, - const double &R13, - const double &R21, - const double &R22, - const double &R23, - const double &R31, - const double &R32, - const double &R33, - double &dx, - double &dy, - double &dz) - { - ModuleBase::Matrix3 lattice_vector, inv_lat; - lattice_vector.e11 = R11; - lattice_vector.e12 = R12; - lattice_vector.e13 = R13; - lattice_vector.e21 = R21; - lattice_vector.e22 = R22; - lattice_vector.e23 = R23; - lattice_vector.e31 = R31; - lattice_vector.e32 = R32; - lattice_vector.e33 = R33; - - inv_lat = lattice_vector.Inverse(); - - ModuleBase::Vector3 direct_vec, cartesian_vec; - cartesian_vec.x = cx; - cartesian_vec.y = cy; - cartesian_vec.z = cz; - direct_vec = cartesian_vec * inv_lat; - dx = direct_vec.x; - dy = direct_vec.y; - dz = direct_vec.z; - return; - } - - template - static ModuleBase::Vector3 latvec_projection(const std::array,3> &latvec) - { - ModuleBase::Vector3 proj; - proj.x = std::abs( latvec[0] * (latvec[1] ^ latvec[2]).normalize() ); - proj.y = std::abs( latvec[1] * (latvec[2] ^ latvec[0]).normalize() ); - proj.z = std::abs( latvec[2] * (latvec[0] ^ latvec[1]).normalize() ); - return proj; - } -}; - -} // namespace ModuleBase - -#endif diff --git a/source/module_base/mathzone_add1.cpp b/source/module_base/mathzone_add1.cpp deleted file mode 100644 index de9f9508b3..0000000000 --- a/source/module_base/mathzone_add1.cpp +++ /dev/null @@ -1,415 +0,0 @@ -#include "mathzone_add1.h" -#include "timer.h" -#include "mathzone.h" -#include "global_variable.h" -#include "constants.h" -#include "global_function.h" -#include "math_sphbes.h" - -#if defined __FFTW2 -#include "fftw.h" -#elif defined __FFTW3 -#include "fftw3.h" // mohan update 2021-05-06 -#define c_re(c) ((c)[0]) -#define c_im(c) ((c)[1]) -#else -#include -//#include "fftw3-mpi_mkl.h" -#define c_re(c) ((c)[0]) -#define c_im(c) ((c)[1]) -#endif -typedef fftw_complex FFTW_COMPLEX; - -//#include -#ifdef _OPENMP -#include -#endif - -namespace ModuleBase -{ - -double** Mathzone_Add1::c_ln_c = nullptr; -double** Mathzone_Add1::c_ln_s = nullptr; - -Mathzone_Add1::Mathzone_Add1() -{} - -Mathzone_Add1::~Mathzone_Add1() -{} - - -double Mathzone_Add1::factorial (const int& l) -{ - if (l == 0 || l == 1) return 1.0; - else return l*factorial(l-1); -} - -double Mathzone_Add1::dualfac (const int& l) -{ - if (l == -1 || l == 0) return 1.0; - else return l * dualfac (l-2); -} - - -void Mathzone_Add1::SplineD2 // modified by pengfei 13-8-8 add second derivative as a condition -( - const double *rad, - const double *rad_f, - const int& mesh, - const double &yp1, // if yp1 > ypmax, consider the second derivative - const double &ypn, - double* y2 -) -{ - ModuleBase::timer::tick("Mathzone_Add1","SplineD2"); - - double dx1, dx2, dy1, dy2, p, qn, sig, un; - double *u; - - u = new double[mesh-1]; - const double ypmax = 99999.00; - - if (yp1 > ypmax) - { - y2[0] = 0.0; - u[0] = 0.0; - } - else - { - y2[0] = -0.5; - - dx1 = rad[1] - rad[0]; - dy1 = rad_f[1] - rad_f[0]; - - u[0] = ( 3.0 / dx1 ) * (dy1 / dx1 - yp1); - } - - for(int i = 1; i < mesh-1 ; i++) - { - dx1 = rad[i] - rad[i-1]; - dx2 = rad[i+1] - rad[i-1]; - dy1 = rad_f[i+1] - rad_f[i]; - dy2 = rad_f[i] - rad_f[i-1]; - - sig = dx1 / dx2; - - p = sig * y2[i-1] + 2.0; - y2[i] = (sig - 1.0) / p; - - u[i] = dy1 / (dx2 - dx1) - dy2 / dx1; - u[i] = (6.0 * u[i] / dx2 - sig * u[i-1]) / p; - } - - if (ypn > ypmax) - { - qn = un = 0.0; - } - else - { - dx1 = rad[mesh-1] - rad[mesh-2]; - dy1 = rad_f[mesh-1] - rad_f[mesh-2]; - - qn = 0.5; - un = 3.0 / dx1 * (ypn - dy1 / dx1); - } - - y2[mesh-1] = (un - qn * u[mesh-2]) / (qn * y2[mesh-2] + 1.0); - - for(int i = mesh-2; i >= 0; i--) - { - y2[i] = y2[i] * y2[i+1] + u[i]; - } - - delete[] u; - - ModuleBase::timer::tick("Mathzone_Add1","SplineD2"); -} - -// Peize Lin add openmp 2019-12-13 -void Mathzone_Add1::Cubic_Spline_Interpolation -( - const double * const rad, - const double * const rad_f, - const double * const y2, - const int& mesh, - const double * const r, - const int& rsize, - double * const y, - double * const dy -) -{ - ModuleBase::timer::tick("Mathzone","cubic_spline"); - -#ifdef _OPENMP - #pragma omp parallel for schedule(static) -#endif - for(int m = 0; m < rsize ; m++) - { - int klo = 0; - int khi = mesh-1; - while (khi - klo > 1) - { - const int k = (khi + klo) / 2 ; - if(rad[k] > r[m]) khi = k; - else klo = k; - } - - const double h = rad[khi] - rad[klo]; - if(h == 0.0) - { - std::cout << "Cubic_Spline_Interpolation, h == 0.0 so that cannot be divided" << std::endl; - //ModuleBase::WARNING_QUIT("Cubic_Spline_Interpolation","h == 0.0 so that cannot be divided"); - exit(0); - } - - const double a = (rad[khi] - r[m]) / h; - const double b = (r[m] - rad[klo]) / h; - - const double dy_tmp = (rad_f[khi] - rad_f[klo]) / h - - (3.0 * a * a - 1.0) / 6.0 * h * y2[klo] + - ( 3.0 * b * b - 1.0) / 6.0 * h * y2[khi]; - dy[m] = dy_tmp; - const double y_tmp = a * rad_f[klo] + b * rad_f[khi] + ((a*a*a - a) * y2[klo] + (b*b*b - b) * y2[khi]) * (h*h) / 6.0; - y[m] = y_tmp; - //const double ddy_tmp = a * y2[klo] + b * y2 [khi]; - //ddy[m] = ddy_tmp; - } - - ModuleBase::timer::tick("Mathzone","cubic_spline"); -} - -/// Interpolation for Numerical Orbitals -double Mathzone_Add1::Uni_RadialF -( - const double* old_phi, - const int& msh, - const double& dr, - const double& newr -) -{ - double h1 = 0.0, h2 = 0.0, h3 = 0.0, f1 = 0.0, f2 = 0.0, f3 = 0.0, f4 = 0.0; - double g1 = 0.0, g2 = 0.0, x1 = 0.0, x2 = 0.0, y1 = 0.0, y2 = 0.0, f = 0.0; - double result = 0.0; - double rmax = (msh-1) * dr; - - if (newr < 0.0) - { - throw std::runtime_error("newr should >= 0. "+std::string(__FILE__)+" line "+std::to_string(__LINE__)); - - } - else if ( rmax <= newr ) - { - f = 0.0; - } - else - { - // the old position. - const int m = static_cast (newr / dr) + 1; - - // Spline like interpolation - if (m == 1) - { - h2 = dr; - h3 = dr; - - f2 = old_phi[m-1]; - f3 = old_phi[m]; - f4 = old_phi[m+1]; - - h1 = -(h2+h3); - f1 = f4; - } - else if (m == (msh-1)) - { - h1 = dr; - h2 = dr; - - f1 = old_phi[m-2]; - f2 = old_phi[m-1]; - f3 = old_phi[m]; - - h3 = -(h1+h2); - f4 = f1; - } - else - { - h1 = dr; - h2 = dr; - h3 = dr; - - f1 = old_phi[m-2]; - f2 = old_phi[m-1]; - f3 = old_phi[m]; - f4 = old_phi[m+1]; - } - - // Calculate the value at newr - - g1 = ((f3-f2)*h1/h2 + (f2-f1)*h2/h1)/(h1+h2); - g2 = ((f4-f3)*h2/h3 + (f3-f2)*h3/h2)/(h2+h3); - - x1 = newr - (m-1)*dr; - x2 = newr - m*dr; - y1 = x1/h2; - y2 = x2/h2; - - f = y2*y2*(3.0*f2 + h2*g1 + (2.0*f2 + h2*g1)*y2) - + y1*y1*(3.0*f3 - h2*g2 - (2.0*f3 - h2*g2)*y1); - } - result = f; - - return result; -} - -void Mathzone_Add1::Uni_Deriv_Phi -( - const double *radf, - const int &mesh, - const double &dr, - const int &nd, - double *phind -) -{ - ModuleBase::timer::tick("Mathzone_Add1", "Uni_Deriv_Phi"); - int FFT_NR = 2*mesh-1; // FFT_NR = 16019 - // std::cout << "\n mesh=" << mesh << ", radf[8010]=" << radf[8010] << ", radf[8009]=" << radf[8009] ; - // mesh=8010, radf[8010]=4.396478951532926e-01, radf[8009]=0.000000000000000e+00 - - fftw_complex *fft_phir = new fftw_complex[FFT_NR]; - fftw_complex *fft_phik = new fftw_complex[FFT_NR]; - fftw_complex *fft_ndphik = new fftw_complex[FFT_NR]; - fftw_complex *fft_ndphir = new fftw_complex[FFT_NR]; - fftw_plan p1; - fftw_plan p2; - - ////CAREFUL: POINT 0 is OF GOOD IMPORTANCE - //for (int ir = 0; ir < FFT_NR/2; ++ir) - //{ - //fft_phir[ir].re = radf[ir]; - //fft_phir[ir].im = 0.0; - //} - - //for (int ir = FFT_NR/2; ir < FFT_NR; ++ir) - //{ - //int jr = FFT_NR - ir; - //fft_phir[ir].re = radf[jr]; - //fft_phir[ir].im = 0.0; - //} - // - // second call: different value at [8010]; FFT_NR = 16019, FFT_NR/2=8009 :: - // CAREFUL: POINT 0 is OF GOOD IMPORTANCE - for (int ir = 0; ir < FFT_NR/2; ++ir) // ik = 0 1 ... 8008 - { - c_re(fft_phir[ir]) = radf[ir]; - c_im(fft_phir[ir]) = 0.0; - } - - for (int ir = FFT_NR/2; ir < FFT_NR; ++ir) // ir = 8009 8010 ... 16018 - { - //int jr = FFT_NR - ir ; // jr = 8010 8009 ... 1 - int jr = FFT_NR - ir -1 ; // -> 8009 8008 ... 0 - c_re(fft_phir[ir]) = radf[jr]; - c_im(fft_phir[ir]) = 0.0; - } - - // FFTW -#if defined __FFTW3 - //std::cout << "\n Call FFTW3 "; - p1 = fftw_plan_dft_1d(FFT_NR, fft_phir, fft_phik, FFTW_FORWARD, FFTW_ESTIMATE); - fftw_execute(p1); - //fftw_destroy_plan(p1); -#elif defined __FFTW2 - //std::cout << "\n Call FFTW2 "; - p1 = fftw_create_plan(FFT_NR, FFTW_FORWARD, FFTW_ESTIMATE); - fftw_one(p1, fft_phir, fft_phik); - //fftw_destroy_plan(p1); -#endif - - - double dk_uniform = ModuleBase::TWO_PI / FFT_NR / dr; - - //for (int ik = 0; ik < FFT_NR/2; ik++) - //{ - //double kp = ik * dk_uniform; - //fft_ndphik[ik].re = pow(kp, nd) * fft_phik[ik].re; - //fft_ndphik[ik].im = 0.0; - //} - - //for (int ik = FFT_NR/2; ik < FFT_NR; ik++) - //{ - //double kp = -(FFT_NR - ik)* dk_uniform; - //fft_ndphik[ik].re = pow(kp, nd) * fft_phik[ik].re; - //fft_ndphik[ik].im = 0.0; - //} - - for (int ik = 0; ik < FFT_NR/2; ik++) // ik = 0 1 ... 8008 - { - double kp = ik * dk_uniform; - c_re(fft_ndphik[ik]) = pow(kp, nd) * c_re(fft_phik[ik]); - c_im(fft_ndphik[ik]) = 0.0; - } - for (int ik = FFT_NR/2; ik < FFT_NR; ik++) // ik = 8009 8010 ... 16018 - { - //double kp = -(FFT_NR - ik )* dk_uniform; //(...) = 8010 8009 ... 1 - double kp = -(FFT_NR - ik -1)* dk_uniform; //(...) -> 8009 8008 ... 0 - c_re(fft_ndphik[ik]) = pow(kp, nd) * c_re(fft_phik[ik]); - c_im(fft_ndphik[ik]) = 0.0; - } - -#if defined __FFTW3 - p2 = fftw_plan_dft_1d(FFT_NR, fft_ndphik, fft_ndphir, FFTW_BACKWARD, FFTW_ESTIMATE); - fftw_execute(p2); - //fftw_destroy_plan(p2); -#elif defined __FFTW2 - p2 = fftw_create_plan(FFT_NR, FFTW_BACKWARD, FFTW_ESTIMATE); - fftw_one(p2, fft_ndphik, fft_ndphir); - //fftw_destroy_plan(p2); -#endif - - bool is_re = true; - double fac = 0.0; - if (nd % 4 == 0) - { - is_re = true; - fac = 1.0; - } - else if (nd % 4 == 1) - { - is_re = false; - fac = -1.0; - } - else if (nd % 4 == 2) - { - is_re = true; - fac = -1.0; - } - else - { - is_re = false; - fac = 1.0; - } - - for (int ir = 0; ir < mesh; ir++) - { - if (is_re) - { - phind[ir] = fac * c_re(fft_ndphir[ir]) / FFT_NR; - } - else - { - phind[ir] = fac * c_im(fft_ndphir[ir]) / FFT_NR; - } - } - - fftw_destroy_plan (p1); - fftw_destroy_plan (p2); - - delete [] fft_phir; - delete [] fft_phik; - delete [] fft_ndphik; - delete [] fft_ndphir; - - ModuleBase::timer::tick("Mathzone_Add1", "Uni_Deriv_Phi"); -} - -} diff --git a/source/module_base/mathzone_add1.h b/source/module_base/mathzone_add1.h deleted file mode 100644 index 2af3576a69..0000000000 --- a/source/module_base/mathzone_add1.h +++ /dev/null @@ -1,84 +0,0 @@ -#ifndef MATHZONE_ADD1_H -#define MATHZONE_ADD1_H - -#include -#include - -namespace ModuleBase -{ - -/************************************************************************ -LiaoChen add @ 2010/03/09 to add efficient functions in LCAO calculation -************************************************************************/ -// Only used in module_basis/module_ao -class Mathzone_Add1 -{ - public: - Mathzone_Add1(); - ~Mathzone_Add1(); - - static double dualfac(const int& l); - static double factorial(const int& l); - /** - * @brief calculate second derivatives for cubic - * spline interpolation - * - * @param[in] rad x before interpolation - * @param[in] rad_f f(x) before interpolation - * @param[in] mesh number of x before interpolation - * @param[in] yp1 f'(0) boundary condition - * @param[in] ypn f'(n) boundary condition - * @param[out] y2 f''(x) - */ - static void SplineD2(const double* rad, - const double* rad_f, - const int& mesh, - const double& yp1, - const double& ypn, - double* y2); - - /** - * @brief cubic spline interpolation - * - * @param[in] rad x before interpolation - * @param[in] rad_f f(x) before inpterpolation - * @param[in] y2 f''(x) before interpolation - * @param[in] mesh number of x before interpolation - * @param[in] r x after interpolation - * @param[in] rsize number of x after interpolation - * @param[out] y f(x) after interpolation - * @param[out] dy f'(x) after interpolation - * @param[out] ddy f''(x) after interpolation - */ - static void Cubic_Spline_Interpolation(const double* const rad, - const double* const rad_f, - const double* const y2, - const int& mesh, - const double* const r, - const int& rsize, - double* const y, - double* const dy); - - /** - * @brief "spline like interpolation" of a uniform - * funcation of r - * - * @param[in] rad_f f(x) before interpolation - * @param[in] msh number of x known - * @param[in] dr uniform distance of x - * @param R f(R) is to be calculated - * @return double f(R) - */ - static double Uni_RadialF(const double* rad_f, const int& msh, const double& dr, const double& R); - - static void Uni_Deriv_Phi(const double* radf, const int& mesh, const double& dr, const int& nd, double* phind); - - private: - const static int sph_lmax = 20; - static double** c_ln_c; - static double** c_ln_s; -}; - -} // namespace ModuleBase - -#endif diff --git a/source/module_base/matrix-inl.h b/source/module_base/matrix-inl.h deleted file mode 100644 index 6fab28ee54..0000000000 --- a/source/module_base/matrix-inl.h +++ /dev/null @@ -1,81 +0,0 @@ -#ifndef MATRIX_INL_H -#define MATRIX_INL_H - -#include "matrix.h" -#include - -// test -#include -namespace ModuleBase -{ - -inline matrix::matrix( const int nrows, const int ncols, const bool flag_zero ) - :nr(nrows), nc(ncols), c(nullptr) -{ -std::cout<<__FILE__<<__LINE__<zero_out(); - } -} - -inline matrix::matrix( const matrix &m_in ) -{ -std::cout<<__FILE__<<__LINE__<create( m_in.nr, m_in.nc, false ); -std::cout<<__FILE__<<__LINE__<=0); assert(ir=0); assert(ic=0); assert(ir=0); assert(ic -#include -#include -#include -#include -#include -#include -#include -#include - -#include "matrix.h" -#include "global_function.h" - -#ifdef __NORMAL -#else -#include "blas_connector.h" -#endif - -//********************************************************* -// The init() function is the main initialization routine. -// Sets up sizes and allocates memory for matrix class. -// All constructors call init() -// ******************************************************** - -//int matrix::mCount = 0; -namespace ModuleBase -{ - -void matrixAlloc(){ModuleBase::WARNING_QUIT("matrix","Allocation error for Matrix");} - -/*create a matrix with nrows*ncols size */ -matrix::matrix( const int nrows, const int ncols, const bool flag_zero ) - :nr(nrows), - nc(ncols), - c(nullptr) -{ - if( nr && nc ) - { - auto handler_old = std::set_new_handler(matrixAlloc); - c = new double[nr*nc]; - std::set_new_handler(handler_old); - if(flag_zero) this->zero_out(); - } -} - -matrix::matrix( const matrix &m_in ) - :nr(m_in.nr), - nc(m_in.nc), - c(nullptr) -{ - if( nr && nc ) - { - auto handler_old = std::set_new_handler(matrixAlloc); - c = new double[nr*nc]; - std::set_new_handler(handler_old); - memcpy( c, m_in.c, nr*nc*sizeof(double) ); - } -} - -// Peize Lin add 2016-08-05 -matrix::matrix( matrix && m_in ) - :nr(m_in.nr), - nc(m_in.nc) -{ - c = m_in.c; - m_in.nr = m_in.nc = 0; - m_in.c = nullptr; -} - -// Peize Lin change 2018-07-02 -matrix& matrix::operator=( const matrix & m_in ) -{ - this->create( m_in.nr, m_in.nc, false ); - memcpy( c, m_in.c, nr*nc*sizeof(double) ); - return *this; -} - -// Peize Lin add 2016-08-05 -matrix& matrix::operator=( matrix && m_in ) -{ - nr = m_in.nr; nc = m_in.nc; - if(c) delete[] c; - c = m_in.c; - m_in.nr = m_in.nc = 0; - m_in.c = nullptr; - return *this; -} - -/* -double & matrix::operator()(const int ir,const int ic) -{ - assert(ir>=0); assert(ir=0); assert(ic=0); assert(ir=0); assert(ic ev_upper) ev_upper = b[i]; -// } -// delete[] a; -// delete[] b; -// } - -// Peize Lin add 2017-05-27 -void matrix::reshape( const int nr_new, const int nc_new, const bool flag_zero ) -{ - assert( nr*nc == nr_new*nc_new ); - nr=nr_new; - nc=nc_new; - - if(flag_zero) this-> zero_out(); -} - -double trace_on(const matrix &A, const matrix &B) -{ - assert(A.nr == B.nc); - assert(A.nc == B.nr); - - double tr = 0.0; - for (int i = 0; i < A.nr; ++i) - for (int k = 0; k < A.nc; ++k) - tr += A(i,k) * B(k, i); - return tr; -} - -double mdot(const matrix &A, const matrix &B) -{ - assert (A.nr == B.nr); - assert (A.nc == B.nc); - const int size = A.nr * A.nc; - - double sum = 0.0; - for (int i = 0; i < size; ++i) - sum += A.c[i] * B.c[i]; - return sum; -} - -/* -// Peize Lin add 2016-09-08 -std::ostream & operator<<( std::ostream & os, const matrix & m ) -{ - for( int ir=0; ir!=m.nr; ++ir ) - { - for( int ic=0; ic!=m.nc; ++ic ) - { - if(std::abs(m(ir,ic))>1E-10) - os<nr; ++ir ) - { - for( int ic=0; ic!=this->nc; ++ic ) - { - if(std::abs((*this)(ir,ic))>threshold) - os<<(*this)(ir,ic)<<"\t"; - else - os<<0<<"\t"; - } - os<::min(); - const int size = nr * nc; - for( int i=0; i::max(); - const int size = nr * nc; - for( int i=0; i -#include - -#include// test - -namespace ModuleBase -{ - -class matrix -{ - /* data */ -public: - - int nr=0; - int nc=0; /* Number of rows and columns */ - double *c=nullptr; /* Holds the data */ - - /* Constructors and destructor */ - matrix(): nr(0), nc(0), c(nullptr){} - matrix( const int nrows, const int ncols, const bool flag_zero=true ); // Peize Lin add flag_zero 2018-07-02 - matrix( const matrix &m1 ); /* copy constructor */ - matrix( matrix && m1 ); // Peize Lin add 2016-08-05 - ~matrix(); - - void create( const int nrow, const int ncol, const bool flag_zero=true ); // Peize Lin add flag_zero 2018-07-02 - matrix& operator=(const matrix &m1); // Peize Lin change 2018-03-12 - matrix& operator=( matrix && m1 ); // Peize Lin add 2016-08-05 - - double &operator()(const int ir,const int ic) - { - assert(ir>=0); assert(ir=0); assert(ic=0); assert(ir=0); assert(icDet(); - - if(d == 0)d = 1; - - return Matrix3((e22*e33 - e23*e32) / d, - -(e12*e33 - e13*e32) / d, - (e12*e23 - e13*e22) / d, - -(e21*e33 - e23*e31) / d, - (e11*e33 - e13*e31) / d, - -(e11*e23 - e13*e21) / d, - (e21*e32 - e22*e31) / d, - -(e11*e32 - e12*e31) / d, - (e11*e22 - e12*e21) / d); -} - -Matrix3& Matrix3::operator = (const Matrix3 &m) -{ - e11 = m.e11;e12 = m.e12;e13 = m.e13; - e21 = m.e21;e22 = m.e22;e23 = m.e23; - e31 = m.e31;e32 = m.e32;e33 = m.e33; - return *this; -} - -Matrix3& Matrix3::operator +=(const Matrix3 &m) -{ - e11 += m.e11;e12 += m.e12;e13 += m.e13; - e21 += m.e21;e22 += m.e22;e23 += m.e23; - e31 += m.e31;e32 += m.e32;e33 += m.e33; - return *this; -} - -Matrix3& Matrix3::operator -=(const Matrix3 &m) -{ - e11 -= m.e11;e12 -= m.e12;e13 -= m.e13; - e21 -= m.e21;e22 -= m.e22;e23 -= m.e23; - e31 -= m.e31;e32 -= m.e32;e33 -= m.e33; - return *this; -} - -Matrix3& Matrix3::operator *=(const double &s) -{ - e11 *= s;e12 *= s;e13 *= s; - e21 *= s;e22 *= s;e23 *= s; - e31 *= s;e32 *= s;e33 *= s; - return *this; -} - -Matrix3& Matrix3::operator /=(const double &s) -{ - e11 /= s;e12 /= s;e13 /= s; - e21 /= s;e22 /= s;e23 /= s; - e31 /= s;e32 /= s;e33 /= s; - return *this; -} - -//m1+m2 -Matrix3 operator +(const Matrix3 &m1, const Matrix3 &m2) -{ - return Matrix3(m1.e11 + m2.e11, - m1.e12 + m2.e12, - m1.e13 + m2.e13, - m1.e21 + m2.e21, - m1.e22 + m2.e22, - m1.e23 + m2.e23, - m1.e31 + m2.e31, - m1.e32 + m2.e32, - m1.e33 + m2.e33); -} - -//m1-m2 -Matrix3 operator -(const Matrix3 &m1, const Matrix3 &m2) -{ - return Matrix3(m1.e11 - m2.e11, // Zujian Dai fix bug 2019-01-21 - m1.e12 - m2.e12, - m1.e13 - m2.e13, - m1.e21 - m2.e21, - m1.e22 - m2.e22, - m1.e23 - m2.e23, - m1.e31 - m2.e31, - m1.e32 - m2.e32, - m1.e33 - m2.e33); -} - -//m/s -Matrix3 operator /(const Matrix3 &m, const double &s) -{ - return Matrix3(m.e11 / s, m.e12 / s, m.e13 / s, - m.e21 / s, m.e22 / s, m.e23 / s, - m.e31 / s, m.e32 / s, m.e33 / s); -} - -//m1*m2 -Matrix3 operator *(const Matrix3 &m1, const Matrix3 &m2) -{ - return Matrix3(m1.e11*m2.e11 + m1.e12*m2.e21 + m1.e13*m2.e31, - m1.e11*m2.e12 + m1.e12*m2.e22 + m1.e13*m2.e32, - m1.e11*m2.e13 + m1.e12*m2.e23 + m1.e13*m2.e33, - m1.e21*m2.e11 + m1.e22*m2.e21 + m1.e23*m2.e31, - m1.e21*m2.e12 + m1.e22*m2.e22 + m1.e23*m2.e32, - m1.e21*m2.e13 + m1.e22*m2.e23 + m1.e23*m2.e33, - m1.e31*m2.e11 + m1.e32*m2.e21 + m1.e33*m2.e31, - m1.e31*m2.e12 + m1.e32*m2.e22 + m1.e33*m2.e32, - m1.e31*m2.e13 + m1.e32*m2.e23 + m1.e33*m2.e33); -} - -//m*s -Matrix3 operator *(const Matrix3 &m,const double &s) -{ - return Matrix3(m.e11*s, m.e12*s, m.e13*s, - m.e21*s, m.e22*s, m.e23*s, - m.e31*s, m.e32*s, m.e33*s); -} - -//s*m -Matrix3 operator *(const double &s, const Matrix3 &m) -{ - return Matrix3(m.e11*s, m.e12*s, m.e13*s, - m.e21*s, m.e22*s, m.e23*s, - m.e31*s, m.e32*s, m.e33*s); -} - -// whether m1==m2 -bool operator==(const Matrix3 &m1, const Matrix3 &m2) -{ - if(m1.e11 == m2.e11 && - m1.e12 == m2.e12 && - m1.e13 == m2.e13 && - m1.e21 == m2.e21 && - m1.e22 == m2.e22 && - m1.e23 == m2.e23 && - m1.e31 == m2.e31 && - m1.e32 == m2.e32 && - m1.e33 == m2.e33) - { - return true; - } - return false; -} - -//whether m1 != m2 -bool operator!=(const Matrix3 &m1, const Matrix3 &m2) -{ - return !(m1 == m2); //!= defined in terms of operator == -} - - -void Matrix3::print(void)const -{ - std::cout << e11 << std::setw(15) << e12 << std::setw(15) << e13 << std::endl ; - std::cout << e21 << std::setw(15) << e22 << std::setw(15) << e23 << std::endl ; - std::cout << e31 << std::setw(15) << e32 << std::setw(15) << e33 << std::endl ; - return; -} - -ModuleBase::matrix Matrix3::to_matrix(void)const // Peize Lin add 2021.03.09 -{ - ModuleBase::matrix m(3,3); - m(0,0)=e11; m(0,1)=e12; m(0,2)=e13; - m(1,0)=e21; m(1,1)=e22; m(1,2)=e23; - m(2,0)=e31; m(2,1)=e32; m(2,2)=e33; - return m; -} - -} \ No newline at end of file diff --git a/source/module_base/matrix3.h b/source/module_base/matrix3.h deleted file mode 100644 index cfd0897271..0000000000 --- a/source/module_base/matrix3.h +++ /dev/null @@ -1,277 +0,0 @@ -#ifndef MatriX3_H -#define MatriX3_H - -#ifdef _MCD_CHECK -#include "mcd.h" -#endif - -#include "matrix.h" -#include "vector3.h" - -namespace ModuleBase -{ - -/** - * @brief 3x3 matrix and related mathamatical operations - * - */ -class Matrix3 -{ - - public: - /** - * @brief element e_ij: i_row, j_column - * - */ - double e11, e12, e13, e21, e22, e23, e31, e32, e33; - - /** - * @brief Construct a new Matrix 3 object - * to Identity matrix - * - */ - Matrix3() - { - Identity(); - } - - /** - * @brief Construct a new Matrix 3 object - * - * @param r11 element r_ij: i_row, j_column - * @param r12 - * @param r13 - * @param r21 - * @param r22 - * @param r23 - * @param r31 - * @param r32 - * @param r33 - */ - Matrix3(const double &r11, - const double &r12, - const double &r13, - const double &r21, - const double &r22, - const double &r23, - const double &r31, - const double &r32, - const double &r33); - - /** - * @brief Set a 3x3 matrix to identity matrix - * - */ - void Identity(void); - - /** - * @brief Set all elements of a 3x3 matrix to zero - * - */ - void Zero(void); - - /** - * @brief Calculate the determinant of a 3x3 matrix - * - * @return double - */ - double Det(void) const; - - /** - * @brief Transpose a 3x3 matrix - * - * @return Matrix3 - */ - Matrix3 Transpose(void) const; - - /** - * @brief Inverse a 3x3 matrix - * - * @return Matrix3 - */ - Matrix3 Inverse(void) const; - - /** - * @brief Overload operator "=" for 3x3 matrices - * For example, assign mb = ma - * - * @param m - * @return Matrix3& - */ - Matrix3 &operator=(const Matrix3 &m); - - /** - * @brief Overload operator "+=" for 3x3 matrices - * For example, mb += ma - * - * @param m - * @return Matrix3& - */ - Matrix3 &operator+=(const Matrix3 &m); - - /** - * @brief Overload operator "-=" for 3x3 matrices - * For example, mb -= ma - * - * @param m - * @return Matrix3& - */ - Matrix3 &operator-=(const Matrix3 &m); - - /** - * @brief Overload operator "*=" for 3x3 matrix and - * a scalar - * For example, mb *= 3.0 - * - * @param s The scalar - * @return Matrix3& - */ - Matrix3 &operator*=(const double &s); - - /** - * @brief Overload operator "/=" for 3x3 matrix and - * a scalar - * For example, mb /= 3.0 - * - * @param s The scalar - * @return Matrix3& - */ - Matrix3 &operator/=(const double &s); - - /** - * @brief Print a 3x3 matrix on screening - * - */ - void print(void) const; - - /** - * @brief Change the form of a 3x3 matrix from that of - * class Matrix3 to that of class matrix - * - * @return ModuleBase::matrix - */ - ModuleBase::matrix to_matrix(void) const; -}; - -/** - * @brief Overload operator "+" for two 3x3 matrices m1 and m2 - * i.e. m1+m2 - * - * @param m1 - * @param m2 - * @return Matrix3 - */ -Matrix3 operator+(const Matrix3 &m1, const Matrix3 &m2); - -/** - * @brief Overload operator "-" for two 3x3 matrices m1 and m2, - * i.e. m1-m2 - * - * @param m1 - * @param m2 - * @return Matrix3 - */ -Matrix3 operator-(const Matrix3 &m1, const Matrix3 &m2); - -/** - * @brief Overload operator "/" for a (Matrix3)/(scalar) - * i.e. m/s - * - * @param m The 3x3 matrix - * @param s The scalar - * @return Matrix3 - */ -Matrix3 operator/(const Matrix3 &m, const double &s); - -/** - * @brief Overload operator "*" for two 3x3 matrices m1 and m2 - * i.e. m1*m2 - * - * @param m1 - * @param m2 - * @return Matrix3 - */ -Matrix3 operator*(const Matrix3 &m1, const Matrix3 &m2); - -/** - * @brief Overload operator "*" for (Matrix3)*(scalar) - * i.e. m*s - * - * @param m The 3x3 matrix - * @param s The scalar - * @return Matrix3 - */ -Matrix3 operator*(const Matrix3 &m, const double &s); - -/** - * @brief Overload operator "*" for (scalar)*(Matrix3) - * i.e. s*m - * - * @param s The scalar - * @param m The 3x3 matrix - * @return Matrix3 - */ -Matrix3 operator*(const double &s, const Matrix3 &m); - -/** - * @brief Overload operator "*" for (Matrix3)*(Vector3) - * - * @tparam T - * @param m The 3x3 matrix - * @param u The vector with 3 elements - * @return ModuleBase::Vector3 - * @author Peize Lin - */ -template ModuleBase::Vector3 operator*(const Matrix3 &m, const ModuleBase::Vector3 &u); - -/** - * @brief Overload operator "*" for (Vector3)*(Matrix3) - * - * @tparam T - * @param u The vector with 3 elements - * @param m The 3x3 matrix - * @return ModuleBase::Vector3 - */ -template ModuleBase::Vector3 operator*(const ModuleBase::Vector3 &u, const Matrix3 &m); - -/** - * @brief Overload operator "==" to assert - * the equality between two 3x3 matrices - * - * @param m1 - * @param m2 - * @return true: if two matrices equal each other - * @return false: if they do not equal - */ -bool operator==(const Matrix3 &m1, const Matrix3 &m2); - -/** - * @brief Overload operator "!=" to assert - * the inequality between two 3x3 matrices - * - * @param m1 - * @param m2 - * @return true: if two matrices are inequal - * @return false: if they equal - */ -bool operator!=(const Matrix3 &m1, const Matrix3 &m2); // whethor m1 != m2 - -// m*u -template ModuleBase::Vector3 operator*(const Matrix3 &m, const ModuleBase::Vector3 &u) -{ - return ModuleBase::Vector3(m.e11 * u.x + m.e12 * u.y + m.e13 * u.z, - m.e21 * u.x + m.e22 * u.y + m.e23 * u.z, - m.e31 * u.x + m.e32 * u.y + m.e33 * u.z); -} - -// u*m -template ModuleBase::Vector3 operator*(const ModuleBase::Vector3 &u, const Matrix3 &m) -{ - return ModuleBase::Vector3(u.x * m.e11 + u.y * m.e21 + u.z * m.e31, - u.x * m.e12 + u.y * m.e22 + u.z * m.e32, - u.x * m.e13 + u.y * m.e23 + u.z * m.e33); -} - -} // namespace ModuleBase - -#endif // MATRIX3_H diff --git a/source/module_base/matrix_wrapper.h b/source/module_base/matrix_wrapper.h deleted file mode 100644 index 30951bca1f..0000000000 --- a/source/module_base/matrix_wrapper.h +++ /dev/null @@ -1,92 +0,0 @@ -//========================================================== -// AUTHOR : Peize Lin -// DATE : 2018-07-31 -//========================================================== - -#ifndef MATRIX_WRAPPER_TIANHE2 - -#ifndef MATRIX_WRAPPER_H -#define MATRIX_WRAPPER_H - -#include "matrix.h" -#include - -// !!! Attention: c is very dangerous, may be changed by other class, -// e.g. changed the value, size!=nr*nc, deleted -namespace ModuleBase -{ - -class Matrix_Wrapper -{ -public: - int nr; - int nc; - double *c; - bool flag_delete_c; - - Matrix_Wrapper(): nr(0), nc(0), c(nullptr), flag_delete_c(false){} - Matrix_Wrapper( const matrix &m ): nr(m.nr), nc(m.nc), c(m.c), flag_delete_c(false){} - inline void create( const int nr_in, const int nc_in, const bool flag_zero ); - inline matrix to_matrix(); - ~Matrix_Wrapper(){ if(flag_delete_c) delete[]c; } - Matrix_Wrapper( const Matrix_Wrapper &m )=delete; - Matrix_Wrapper( Matrix_Wrapper &m )=delete; - inline Matrix_Wrapper( Matrix_Wrapper &&m ); - inline Matrix_Wrapper&operator=( const Matrix_Wrapper&m ); - inline Matrix_Wrapper&operator=( Matrix_Wrapper&&m ); -}; - - -inline void Matrix_Wrapper::create( const int nr_in, const int nc_in, const bool flag_zero ) -{ - nr = nr_in; nc = nc_in; - if(flag_delete_c) - delete[] c; - c = new double[nr*nc]; - flag_delete_c = true; - if(flag_zero) - memset( c, 0, sizeof(double)*nr*nc ); -} - -inline matrix Matrix_Wrapper::to_matrix() -{ - assert( flag_delete_c==true ); - flag_delete_c = false; - matrix m; - m.nr = nr; m.nc = nc; - m.c = c; - return m; -} - -inline Matrix_Wrapper::Matrix_Wrapper( Matrix_Wrapper &&m ) - :nr(m.nr), - nc(m.nc), - c(m.c), - flag_delete_c(m.flag_delete_c) -{ - m.nr = m.nc = 0; - m.c = nullptr; - m.flag_delete_c = false; -} - -inline Matrix_Wrapper& Matrix_Wrapper::operator=( const Matrix_Wrapper&m ) -{ - assert( !m.flag_delete_c ); - nr = m.nr; nc = m.nc; c = m.c; flag_delete_c = m.flag_delete_c; - return *this; -} - -inline Matrix_Wrapper& Matrix_Wrapper::operator=( Matrix_Wrapper&&m ) -{ - nr = m.nr; nc = m.nc; c = m.c; flag_delete_c = m.flag_delete_c; - m.nr = 0; m.nc = 0; m.c = nullptr; m.flag_delete_c = false; - return *this; -} - -} - -#endif - -#else -#include "matrix_wrapper_tianhe2.h" -#endif diff --git a/source/module_base/matrix_wrapper_tianhe2.h b/source/module_base/matrix_wrapper_tianhe2.h deleted file mode 100644 index 455b60e773..0000000000 --- a/source/module_base/matrix_wrapper_tianhe2.h +++ /dev/null @@ -1,55 +0,0 @@ -//========================================================== -// AUTHOR : Peize Lin -// DATE : 2018-07-31 -//========================================================== - -#ifndef MATRIX_WRAPPER_H -#define MATRIX_WRAPPER_H - -#include "matrix.h" -#include -namespace ModuleBase -{ - -// !!! Attention: c is very dangerous, may point to somewhere deleted - -class Matrix_Wrapper -{ -public: - double *c; - int nr; - int nc; - - Matrix_Wrapper(): nr(0), nc(0), c(nullptr){} - Matrix_Wrapper( const matrix &m ): nr(m.nr), nc(m.nc), c(m.c){} - inline void create( const int nr_in, const int nc_in, const bool flag_zero ); - inline matrix to_matrix(); - Matrix_Wrapper( const Matrix_Wrapper &m ): nr(m.nr), nc(m.nc), c(m.c){} - Matrix_Wrapper( Matrix_Wrapper &m ): nr(m.nr), nc(m.nc), c(m.c){} - Matrix_Wrapper( Matrix_Wrapper &&m ): nr(m.nr), nc(m.nc), c(m.c){} - inline Matrix_Wrapper&operator=( const Matrix_Wrapper&m ){ nr=m.nr; nc=m.nc; c=m.c; return *this; }; - inline Matrix_Wrapper&operator=( Matrix_Wrapper&m ){ nr=m.nr; nc=m.nc; c=m.c; return *this; }; - inline Matrix_Wrapper&operator=( Matrix_Wrapper&&m ){ nr=m.nr; nc=m.nc; c=m.c; return *this; }; -}; - - -inline void Matrix_Wrapper::create( const int nr_in, const int nc_in, const bool flag_zero ) -{ - nr = nr_in; nc = nc_in; - c = new double[nr*nc]; - if(flag_zero) - memset( c, 0, sizeof(double)*nr*nc ); -} - -inline matrix Matrix_Wrapper::to_matrix() -{ - matrix m; - m.nr = nr; m.nc = nc; - m.c = c; - nr = nc = 0; - c = nullptr; - return m; -} - -} -#endif diff --git a/source/module_base/mcd.c b/source/module_base/mcd.c deleted file mode 100644 index 2af353b717..0000000000 --- a/source/module_base/mcd.c +++ /dev/null @@ -1,884 +0,0 @@ -#define MCD_VERBOSE -#define MCD_FASTFREE - -/* - * Softpixel MemCheckDeluxe v1.2.2 - * 2003 cwright - */ - -/* Copyright (C) 2002, 2003 Softpixel (http://softpixel.com/) - * This file is covered by a BSD-Style License, available in - * the LICENSE file in the root directory of this package, as well as at - * http://prj.softpixel.com/licenses/#bsd - */ - -#ifndef _MCD_GONE //if mcd is gone, don't do anything - -#ifdef _MCD_CHECK -#undef _MCD_CHECK //don't want trace allocations in this file =) -#endif - -#include -#ifndef __USE_GNU -#define __USE_GNU // activate strndup in GNU headers -#endif - -#include -#include -#include -//#include // fixes the vscanf warnings, - // but kills the va_* macros... - -#define MCD_C_FILE_BUILD //flag some stuff in mcd.h -#include "mcd.h" - -#ifdef WIN32 - #include -#else - #include - #include -#endif - -#define CHUNK_MAGIC 0x1337C0DE - -#ifndef MCD_FASTFREE -#define TOP_TO_BOTTOM 0x00 //search like old style -#define BOTTOM_TO_TOP 0xff //search from LastChunk up - -#define TRACK_LENGTH 5 //how many previous biases to use -#endif - -/* Number of bytes to add to each allocation to check for padding */ -//#define OVERFLOW_PAD 4 // unimplimented - -/* all allocations are accounted for with 'chunnks' */ -typedef struct ChunkS -{ -#ifdef MCD_FASTFREE - int magic; //help make sure the chunk is really a chunk -#endif - int size; //size of allocation in bytes - int line; //line it was alocated on -#ifdef WIN32 - LONGLONG id; // 64bit allocation ID -#else - long long id; // 64bit allocation ID -#endif - char *function; //creating function - char *file; //file function is in - void *ptr; //pointer to allocation - struct ChunkS *next, //next chunk (null if nonw) - *prev; //previous chunk (null if nonw) -}Chunk; -/*note: *ptr+SOC is actually the allocation. with fastfree, ptr points to -the chunk itself, and SOC adds the offset where the actual data is */ - - -/* MemoryChunks stores the first entry to the allocation -chunks. Lastchunk stores the last one, to save list traversals. */ - -Chunk *MemoryChunks=NULL,*LastChunk=NULL; - -/* - smallest = smallest allocation - largest = largest allocation - current = amount currently allocated (for peak tracking) -*/ -int smallest=0,largest=0,maximum=0,current=0; - -/* - totalAlloc = total allocations - totalFree = total frees - peakAlloc = maximum number of outstanging allocations - totalOverflow = number of pointers that were overflowed - (unimplimented) -*/ -int totalAlloc=0, totalFree=0, peakAlloc=0, totalOverflow=0; - -/* Our log files (Null causes default behaviour) */ -FILE *RealTimeLog=NULL; -FILE *MemStatLog=NULL; - -//return realtimelog if it's set, otherwise stderr -#define RTL (RealTimeLog?RealTimeLog:stderr) - -/* SOC (SizeOf Chunk) is used in verbose mode to print correct pointers */ -#ifdef MCD_FASTFREE -#define SOC sizeof(Chunk) //fastfree pointer offset -#else -#define SOC 0 //no fastfree implies raw pointers (no offset) -#endif - -/* idbase is the id variable. each new allocation increments it. - to keep it useful, it is defined to be as long as possible - (64 bits) to keep it from wrapping (unless your program does - a _lot_ of allocating :) - */ -#ifdef WIN32 -LONGLONG idbase=0; -#else -long long idbase=0; -#endif - -/* chunklock is our simple lock variable to keep the chunk list thread-safe */ -char chunkLock=0; - -/* TrackBias is used to record the weight of the previous locations - TrackPos keeps our current position. each free increments - and wraps TrackPos. -*/ -#ifndef MCD_FASTFREE -unsigned int TrackBias[TRACK_LENGTH]={0x7f}; //start in middle -int TrackPos=0; -#endif - -/* Here, *p is the raw pointer. we stick our chunk pointer there for easy lookups */ -void addChunk(void*p,int size,char*fun,char*file,int line) -{ -#ifdef MCD_FASTFREE - Chunk *c=(Chunk*)p; //extra space for chunk is accounted for -#else //not FASTFREE - Chunk *c=(Chunk*)malloc(sizeof(Chunk)); -#endif - while(chunkLock) -#ifdef WIN32 - Sleep(1); -#else - usleep(1); -#endif - ++chunkLock; - #ifdef MCD_FASTFREE - c->magic=CHUNK_MAGIC; - #endif - c->size=size; - c->line=line; - c->function=fun; - c->file=file; - c->ptr=p; - c->next=NULL; - c->prev=NULL; - c->id=idbase++; - -//overflow padding checks (incomplete) -// pad=p+size; -// for(po=0;pomaximum) - maximum=current; - if(size>largest) - largest=size; - if(sizepeakAlloc) - peakAlloc=totalAlloc-totalFree; - - if(!MemoryChunks) //first chunk - { - MemoryChunks=c; - LastChunk=c; - } - else //new chunk - { - c->prev=LastChunk; - LastChunk->next=c; - LastChunk=c; - } - --chunkLock; - return; -} - -/* here, *p is the pointer, adjusted to be the chunk*/ -int delChunk(void*p/*,char*fun,char*file,int line*/) -{ - Chunk *s; -#ifndef MCD_FASTFREE - unsigned int bias,i; - int depth=0; -#endif - //should be handled in MCD_free now - //if(!p) - // return 0; // null pointer. list walker would crash - - while(chunkLock) -#ifdef WIN32 - Sleep(1); -#else - usleep(1); -#endif - ++chunkLock; //0wn the list - -#ifdef MCD_FASTFREE - - s=(Chunk*)p; - if(s->magic!=CHUNK_MAGIC) - { - /*freeing illegal pointer, or wrote out of bounds*/ - fprintf(RTL,"** Magic is [%x], which is wrong...[ptr:%x]\n",s->magic,(int)p); - fprintf(RTL,"** Either some buffer overflowed, or this is a bad pointer\n"); - fprintf(RTL,"** I'm just going to free it and see what happens... might segfault.\n"); - fflush(RTL); - /*because this is broken, we're not really sure what to do - with it... so, we opt to just free it*/ - --chunkLock; - return 1; - } - //pointer is to previous chunk, so use that as a basis, plus some pointer acrobatics - - if(s->prev==NULL) //first chunk - { - if(MemoryChunks->next) //next chunk gets promoted to MemoryChunks - { - current-=MemoryChunks->size; - //prev=MemoryChunks; - MemoryChunks=MemoryChunks->next; - MemoryChunks->prev=NULL; - } - else //only chunk left (empty list) - { - current-=MemoryChunks->size; - MemoryChunks=NULL; - LastChunk=NULL; - } - } - else if(s->next==NULL) //not first, is it last? - { - current-=s->size; - LastChunk=s->prev; - LastChunk->next=NULL; //last - } - else //must be in the middle somewhere... - { - - s->prev->next=s->next; - s->next->prev=s->prev; - current-=s->size; - } - ++totalFree; -#else //not FASTFREE - //non fastfree version. here, we expect the chunk to be freed upon exit. - - for(bias=0,i=0;iptr==p) - { - current-=s->size; - - if(s==MemoryChunks) //first in list - { - MemoryChunks=MemoryChunks->next; //set next as first - free(s); - if(MemoryChunks) //if there is a next, set prev to none - MemoryChunks->prev=NULL; - --chunkLock; - ++totalFree; - return 0; - } - else if(s==LastChunk) //last guy... - { - LastChunk=LastChunk->prev; - free(s); - if(LastChunk) //LastChunk could be first as well (no next), dont assume anything. - LastChunk->next=NULL; - --chunkLock; - ++totalFree; - return 0; - } - else // somewhere in the middle... - { - // s should have a next and first (handled by previous cases) - s->prev->next=s->next; - s->next->prev=s->prev; - free(s); - --chunkLock; - ++totalFree; - return 0; - } - } - else - { - if(bias==BOTTOM_TO_TOP) - s=s->prev; - else - s=s->next; - } - } - //hmm, didnt find it in the list, must be foreign or error... - #ifdef MCD_VERBOSE - --chunkLock; - fprintf(RTL,"** Pointer [%08X] wasn't in list...\n",(int)p); - fprintf(RTL,"** Either it came from an external library, or it's a bad pointer\n"); - fprintf(RTL,"** I'm just going to free it and see. might segfault\n"); - fflush(RTL); //mohan - #endif - //return 1; //error goes unnoticed for now -#endif //fastfree - --chunkLock; - return 0; -} - -/* (FastFree) because we use fake pointers, we must add sizeof(Chunk) to all of - them for proper pointer hiding. -*/ - -#ifndef WIN32 -inline //inline to make it a bit snappier -#endif -void phex(FILE*f, //print our 64bit id in a generic way -#ifdef WIN32 - LONGLONG v -#else - long long v -#endif -) -{ - int i; - char t[16]={'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'}; - for(i=0;i<64;i+=4) - { - fprintf(f,"%c",t[(v>>(60-i))&0xf]); - } - fprintf(f,"]\n"); - fflush(f); - return; -} - -void *MCD_malloc(int size,char*fun,char*file,int line) -{ -#ifdef MCD_FASTFREE - void*p=malloc(size+sizeof(Chunk)); -#else //not FASTFREE - void*p=malloc(size); -#endif - -#ifdef MCD_VERBOSE - fprintf(RTL,"malloc\t[%X][%i bytes]\tfrom %s:%s, line %i [id ", - (int)p+SOC,size,file,fun,line); - phex(RTL,idbase); -#endif - addChunk(p,size,fun,file,line); - - return p -#ifdef MCD_FASTFREE - +sizeof(Chunk) -#endif - ; -} - - -void *MCD_calloc(int size,char*fun,char*file,int line) -{ -#ifdef MCD_FASTFREE - void*p=calloc(size+sizeof(Chunk),1); -#else - void*p=calloc(size,1); -#endif -#ifdef MCD_VERBOSE - fprintf(RTL,"calloc\t[%X][%i bytes]\tfrom %s:%s, line %i [id ", - (int)p+SOC,size,file,fun,line); - phex(RTL,idbase); -#endif - - addChunk(p,size,fun,file,line); - return p -#ifdef MCD_FASTFREE - +sizeof(Chunk) -#endif - ; -} - -/* instead of really reallocing, we just allocate a new area, and copy - this shouldn't matter, but there may be a better way */ -void *MCD_realloc(void *p,int size,char*fun,char*file,int line) -{ -#ifdef MCD_FASTFREE - Chunk *New,*Old; - - void*n=malloc(size+sizeof(Chunk)); - New=(Chunk*)n; - Old=(Chunk*)p-sizeof(Chunk); - - if(Old->size==size) //no change?? - return p; - - if(size>Old->size) //allocated more room, just copy old stuff - memcpy(n,p-sizeof(Chunk),Old->size+sizeof(Chunk)); - else //allocated less room (truncate) - memcpy(n,p-sizeof(Chunk),Old->size+sizeof(Chunk)); - - -#ifdef MCD_VERBOSE - fprintf(RTL,"realloc\t[%X]->[%X][%i bytes]\tfrom %s:%s, line %i [id ", - (int)p+SOC,(int)n+SOC,size,file,fun,line); - phex(RTL,idbase); -#endif - - delChunk(p/*,fun,file,line*/); - free(p-sizeof(Chunk)); - addChunk(n,size,fun,file,line); - return n+sizeof(Chunk); -#else //non-fastfree - void*n=realloc(p,size); -#ifdef MCD_VERBOSE - fprintf(RTL,"realloc [%X]->[%X][%ib] from %s:%s, line %i [id ", - (int)p+SOC,(int)n+SOC,size,file,fun,line); - phex(RTL,idbase); -#endif - delChunk(p/*,fun,file,line*/); - addChunk(n,size,fun,file,line); - return n; -#endif -} - -// getcwd isn't implimented in fastfree yet -#ifndef MCD_FASTFREE -#ifndef WIN32 //win32's getcwd doesn't allocate anyway -char *MCD_getcwd(char *p,int size, char*fun,char*file,int line) -{ - int olderrno,wsize=256; - char *tmp=NULL; - - //according to man page: - // if p is null, size bytes are allocated - // if p is null and size is zero, strlen(wd) bytes are allocated - - if(p!=NULL) //ok, do nothing - { - return getcwd(p,size); - } - else // ok, interesting stuff - { - if(!size) //alloc as big as needed - { - while(tmp==NULL) - { - tmp=(char*)malloc(wsize); - olderrno=errno; - if(getcwd(tmp,0)==NULL) - { //too small, let's try again - wsize*=2; - free(tmp); - } - errno=olderrno; //restore old errno, just in case - } - p=(char*)malloc(strlen(tmp)+1); - memcpy(p,tmp,strlen(tmp)+1); - free(tmp); - addChunk(p, strlen(tmp)+1, file, fun, line); - } - else //alloc size bytes - { - // TODO: see if failure condition here still allocs p - p=(char*)malloc(size); - addChunk(p, size, file, fun, line); - getcwd(p,size); - } - return p; - } -} -#endif //win32 -#endif //fastfree - -/*(in fastfree) can't make this simple due to pointer stuffing :( */ - -#ifdef __GNUC__ -char *MCD_strdup(const char*s,char*fun,char*file,int line) -#else -char *MCD_strdup(char*s,char*fun,char*file,int line) -#endif -{ - char *n; - -#ifdef MCD_FASTFREE - n=(char*)malloc(sizeof(char)*strlen(s)+1+sizeof(Chunk)); - memcpy(n+sizeof(Chunk),s,strlen(s)); -#else //non-fastfree - n=strdup(s); //unpointer'd version -#endif -#ifdef MCD_VERBOSE - fprintf(RTL,"strdup\t[%X][%ib]\t\tfrom %s:%s, line %i [id ", - (int)n+SOC,(int)strlen(s),file,fun,line); - phex(RTL,idbase); -#endif - addChunk(n,strlen(s)+1,fun,file,line); - return n -#ifdef MCD_FASTFREE - +sizeof(Chunk) -#endif - ; -} - -#ifndef WIN32 //win32 lacks strndup completely -#ifdef __GNUC__ -char *MCD_strndup(const char*s, int z,char*fun,char*file,int line) -#else -char *MCD_strndup(char*s, int z,char*fun,char*file,int line) -#endif -{ - char *n; - int size; - if((signed)strlen(s)>z) - size=z; - else - size=strlen(s); -#ifdef MCD_FASTFREE - n=(char*)malloc(sizeof(char)*size+1+sizeof(Chunk)); - memcpy(n+sizeof(Chunk),s,size); -#else //non-fastfree - n=(char*)strndup(s,z); //unpointer'd version -#endif -#ifdef MCD_VERBOSE - fprintf(RTL,"strndup\t[%X][%ib]\t\tfrom %s:%s, line %i [id ", - (int)n+SOC,(int)size,file,fun,line); - phex(RTL,idbase); -#endif - addChunk(n,size+1,fun,file,line); - return n -#ifdef MCD_FASTFREE - +sizeof(Chunk) -#endif - ; -} - -/* asprintf/vasprintf based on a patch from Stephen Lee */ -#ifdef _GNU_SOURCE - -int MCD_asprintf(char **ptr,const char *fmt,char *fun, char*file, int line,...) -{ - int retval; - va_list argptr; -#ifdef MCD_FASTFREE - void *fc; -#endif - - va_start(argptr,line); - if((retval=vasprintf(ptr, fmt, argptr))<0) - { - #ifdef MCD_VERBOSE - fprintf(RTL,"asprintf failure %s:%s, line %i [id ", - file,fun,line); - #endif - return retval; - } - va_end(argptr); - -#ifdef MCD_FASTFREE - fc=malloc(sizeof(Ghunk)+retval+1); //make string+chunk - memcpy(fc+sizeof(Chunk),ptr,retval); //hack in string - free(ptr); //clean up string - ptr=fc+sizeof(Chunk); //hack pointer - addChunk(fc,retval+1,fun,file,line); -#else //non-fastfree - addChunk(*ptr, retval+1, fun, file, line); -#endif - #ifdef MCD_VERBOSE - fprintf(RTL,"asprintf\t[%X][%ib]\t\tfrom %s:%s, line %i [id ", - (int)*ptr+SOC,retval+1,file,fun,line); - phex(RTL,idbase); - #endif - return retval; -} - -int MCD_vasprintf(char **ptr,const char *fmt,va_list argptr,char *fun, char*file, int line) -{ - int retval; -#ifdef MCD_FASTFREE - void *fc; -#endif - - if((retval=vasprintf(ptr, fmt, argptr))<0) - { - #ifdef MCD_VERBOSE - fprintf(RTL,"vasprintf failure %s:%s, line %i [id ", - file,fun,line); - #endif - return retval; - } -#ifdef MCD_FASTFREE - fc=malloc(sizeof(Chunk)+retval+1); - memcpy(fc+sizeof(Chunk),ptr,retval); - free(ptr); - ptr=fc+sizeof(Chunk); - addChunk(fc,retval+1,fun,file,line); -#else //non-fastfree - addChunk(*ptr, retval+1, fun, file, line); -#endif - #ifdef MCD_VERBOSE - fprintf(RTL,"vasprintf\t[%X][%ib]\t\tfrom %s:%s, line %i [id ", - (int)*ptr+SOC,retval+1,file,fun,line); - phex(RTL,idbase); - #endif - return retval; -} - -#endif // _GNU_SOURCE -#endif // WIN32 - -/* scanf family patch provided by Stephen Lee */ -void scan_args(const char*fmt,va_list argptr,char*fun,char*file,int line); - -#ifndef __cplusplus // c++ doesn't seem to compile when vscanf etc are implicit -#ifndef WIN32 //win32 doesn't link vscanf stuff nicely -int MCD_scanf(const char *fmt,char*fun,char*file,int line,...) -{ - int retval; - va_list argptr; - - va_start(argptr,line); - if((retval=vscanf(fmt,argptr))<1) { - /* no args, so let's return */ - va_end(argptr); - return retval; - } - va_end(argptr); - va_start(argptr,line); - scan_args(fmt,argptr,fun,file,line); - va_end(argptr); - return retval; -} - -int MCD_fscanf(FILE *stream,const char *fmt,char*fun,char*file,int line,...) -{ - int retval; - va_list argptr; - - va_start(argptr,line); - if((retval=vfscanf(stream,fmt,argptr))<1) { - /* no args, so let's return */ - va_end(argptr); - return retval; - } - va_end(argptr); - va_start(argptr,line); - scan_args(fmt,argptr,fun,file,line); - va_end(argptr); - return retval; -} - -int MCD_sscanf(const char *str,const char *fmt,char*fun,char*file,int line,...) -{ - int retval; - va_list argptr; - - va_start(argptr,line); - if((retval=vsscanf(str,fmt,argptr))<1) { - /* no args, so let's return */ - va_end(argptr); - return retval; - } - va_end(argptr); - va_start(argptr,line); - scan_args(fmt,argptr,fun,file,line); - va_end(argptr); - return retval; -} -#endif //Win32 link -#endif //__cplusplus (implicit blah blah) - -/* scanf etc helper function */ -void scan_args(const char *fmt,va_list argptr,char*fun,char*file,int line) -{ - char **ptr; - void *dummy; // clear up the unused warning - - for(;*fmt;fmt++) { - if(*fmt!='%') - continue; - switch(*(++fmt)) { - case 'a': /* malloc'd string */ - ptr=(char **)va_arg(argptr,char *); - addChunk(*ptr,strlen(*ptr)+1,fun,file,line); - break; - case '%': - break; - default: /* next arg */ - dummy=va_arg(argptr,void *); - break; - } - } - return; -} - -void MCD_free(void *p,char*fun,char*file,int line) -{ - //quiet the unused argument warnings when MCD_VERBOSE isn't defined -#ifndef MCD_VERBOSE - void *dummy=&fun; - dummy=&file; - dummy=(char*)&line; -#endif //MCD_VERBOSE - - if(!p) - { -#ifdef MCD_VERBOSE - fprintf(RTL,"** Call to free with NULL argument in %s:%s, line %i\n", - file,fun,line); -#endif //mcd_verbose - /* If they want native free(null), do it */ - /* in case free(null) does something bad, */ - /* rather than let them think it's ok */ - /* Must be enabled, off by default. */ - #ifdef MCD_FREE_NULL - free(p); //native free(null) for same behaviour - #endif - return; //we do nothing - } -#ifdef MCD_VERBOSE - fprintf(RTL,"free\t[%X]\t\tfrom %s:%s, line %i\n", - (int)p,file,fun,line); -#endif - //should find id, but that's delchunk's job... - -#ifdef MCD_FASTFREE - // if delChunk returns something, it means the pointer is crazy - if(!delChunk(p-sizeof(Chunk)/*,file,fun,line*/)) - free(p-sizeof(Chunk)); - else - { - fprintf(RTL,"** Bad or Foreign pointer [%08X] from %s:%s line %i\n", - (int)p,file,fun,line); - fflush(RTL); - free(p); //assume it's just a foreign pointer (could die) - } -#else //not fastfree - - delChunk(p); //return value here doesn't matter, but 1 is still 'error' - // error behaviour is simply the same (free and see) - free(p); -#endif - return; -} - -void showMemStats() -{ - Chunk*c=MemoryChunks; - int total=0; - - FILE *o; - - if(MemStatLog) - o=MemStatLog; - else - o=stdout; - - fprintf(o,"Memory Stats:\n"); - while(c) - { - fprintf(o,"%12i bytes allocated in [%s:%s], line %7i [%08X][id ", - c->size,c->function,c->file,c->line,(int)c->ptr+SOC); - phex(o,c->id); - total+=c->size; - c=c->next; - fflush(o); - } - fprintf(o,"\t\tTotal unfreed bytes: %12i\n",total); - //fprintf(o,"\t\tOverflows[approx.]: %12i\n",totalOverflow); - fprintf(o,"\t\tPeak memory usage: %12i\n",maximum); - fprintf(o,"\t\tLargest allocation: %12i\n",largest); - fprintf(o,"\t\tSmallest allocation: %12i\n",smallest); - fprintf(o,"\t\tTotal Allocations: %12i\n",totalAlloc); - fprintf(o,"\t\tTotal Frees: %12i\n",totalFree); - fprintf(o,"\t\tPeak Allocations: %12i\n",peakAlloc); - fprintf(o,"\n"); - return; -} - -void _MCD_RealTimeLog(FILE*f) -{ - RealTimeLog=f; - return; -} - -void _MCD_MemStatLog(FILE*f) -{ - MemStatLog=f; - return; -} - -#ifdef __cplusplus - -char *_MCD_LastSetFile,*_MCD_LastSetFun; -int _MCD_LastSetLine; - - -/*void* operator new (unsigned int size,char *file, char*fun) -{ - return MCD_malloc(size,file,fun,5); -} - -void* operator new[] (unsigned int size,char*file, char*fun) -{ - return MCD_malloc(size,file,fun,5); -}*/ - - -/*void* operator new (size_t size, char* file, char*fun, int line) -{ - return MCD_malloc(size, file, fun, line); -} - -void* operator new[] (size_t size, char* file, char* fun, int line) -{ - return MCD_malloc(size, file, fun, line); -} - -void operator delete(void* buffer, char*file, char*fun, int line) -{ - MCD_free(buffer, file, fun, line); - -void operator delete[] (void* buffer, char*file, char*fun, int line) -{ - MCD_free(buffer, file, fun, line); - -}*/ - -/* -void* operator new (size_t size) -{ - return MCD_malloc(size, __FILE__, __FUNCTION__, __LINE__); -} - -void* operator new[] (size_t size) -{ - return MCD_malloc(size, __FILE__, __FUNCTION__, __LINE__); -} - -void operator delete(void* buffer) -{ - MCD_free(buffer, __FILE__, __FUNCTION__, __LINE__); -} - -void operator delete[](void* buffer) -{ - MCD_free(buffer, __FILE__, __FUNCTION__, __LINE__); -}*/ -#endif // __cplusplus - -#endif //_MCD_GONE diff --git a/source/module_base/mcd.h b/source/module_base/mcd.h deleted file mode 100644 index ee53c2a5ee..0000000000 --- a/source/module_base/mcd.h +++ /dev/null @@ -1,285 +0,0 @@ -/* - * Softpixel MemCheckDeluxe v1.2.2 - * 2003 cwright - */ - -/* Copyright (C) 2002, 2003 Softpixel (http://softpixel.com/) - * This file is covered by a BSD-Style License, available in - * the LICENSE file in the root directory of this package, as well as at - * http://prj.softpixel.com/licenses/#bsd - */ - - -#ifndef MCD_H -#define MCD_H - -#include //for file redirection - -#define MCD_VERSION 0x010201 - -#ifdef __cplusplus -extern "C" { -#endif - -#ifndef _MCD_GONE - -#ifdef _MCD_CHECK - -#include - -#ifdef WIN32 - #define __FUNCTION__ __FILE__ -#endif - -#ifndef MCD_QUIET - #ifndef WIN32 - #warning - Building with memory checking. - #warning expect lower performance. - - #endif -#endif - -//warn about redefinitions (sometimes these can be #defined) - -#ifdef malloc -#undef malloc - #ifndef WIN32 - #warning ------ Redefining malloc() ------ - #endif -#endif - -#ifdef calloc -#undef calloc - #ifndef WIN32 - #warning ------ Redefining calloc() ------ - #endif -#endif - -#ifdef realloc -#undef realloc - #ifndef WIN32 - #warning ------ Redefining realloc() ------ - #endif -#endif - -#ifdef free -#undef free - #ifndef WIN32 - #warning ------ Redefining free() ------ - #endif -#endif - -#ifdef strdup -#undef strdup - #ifndef WIN32 - #warning ------- Redefining strdup() -------- - #endif -#endif - -#ifdef strndup -#undef strndup - #ifndef WIN32 - #warning ------- Redefining strndup() ------- - #endif -#endif - -#ifdef asprintf -#undef asprintf - #ifndef WIN32 - #warning ------ Redefining asprintf() ------ - #endif -#endif - -#ifdef vasprintf -#undef vasprintf - #ifndef WIN32 - #warning ------ Redefining vasprintf() ------ - #endif -#endif - -#ifdef scanf -#undef scanf - #ifndef WIN32 - #warning ------ Redefining scanf() ------ - #endif -#endif - -#ifdef fscanf -#undef fscanf - #ifndef WIN32 - #warning ------ Redefining fscanf() ------ - #endif -#endif - -#ifdef sscanf -#undef sscanf - #ifndef WIN32 - #warning ------ Redefining sscanf() ------ - #endif -#endif - -#ifdef getcwd -#undef getcwd - #ifndef WIN32 - #warning ------ Redefining getcwd() ------ - #endif -#endif - -#define strdup(p) MCD_strdup(p,__FUNCTION__,__FILE__,__LINE__) -#ifndef WIN32 //no strndup in win32 -#define strndup(p,n) MCD_strndup(p,n,__FUNCTION__,__FILE__,__LINE__) -#endif -#define malloc(size) MCD_malloc(size,__FUNCTION__,__FILE__,__LINE__) -#define calloc(n,s) MCD_calloc(s*n,__FUNCTION__,__FILE__,__LINE__) -#define realloc(p,s) MCD_realloc(p,s,__FUNCTION__,__FILE__,__LINE__) - -#ifdef _GNU_SOURCE -#define asprintf(p,f,args...) MCD_asprintf(p,f,__FUNCTION__,__FILE__,__LINE__, ## args) -#define vasprintf(p,f,ap) MCD_vasprintf(p,f,ap,__FUNCTION__,__FILE__,__LINE__) -#endif - -#ifndef WIN32 -/* windows doesn't like variable arguments in #define's */ -#ifndef MCD_FASTFREE //fastfree isnt supported here yet -#define scanf(f,args...) MCD_scanf(f,__FUNCTION__,__FILE__,__LINE__, ## args) -#define fscanf(s,f,args...) MCD_fscanf(s,f,__FUNCTION__,__FILE__,__LINE__, ## args) -#define sscanf(s,f,args...) MCD_sscanf(s,f,__FUNCTION__,__FILE__,__LINE__, ## args) -#define getcwd(p,s) MCD_getcwd(p,s,__FUNCTION__,__FILE__,__LINE__) -#endif //fastfree -#endif //win32 - -#define free(p) MCD_free(p,__FUNCTION__,__FILE__,__LINE__) - -#endif // _MCD_CHECK - - -/* !!! These are called by the defines only. Do NOT use directly. !!! */ -void *MCD_malloc(int size, char*, char*, int); -void *MCD_calloc(int size, char*, char*, int); -void *MCD_realloc(void *p, int size, char*, char*, int); -char *MCD_getcwd (char *p, int size, char*, char*, int); -#ifdef __GNUC__ -char *MCD_strdup (const char*s, char*, char*, int); -char *MCD_strndup(const char*s, int n, char*, char*, int); -#else -char *MCD_strdup (char*s, char*, char*, int); -char *MCD_strndup(char*s, int n, char*, char*, int); -#endif -int MCD_scanf (const char *fmt, char*fun, char*file, int line,...); -int MCD_fscanf(FILE *stream,const char *fmt,char*fun,char*file,int line,...); -int MCD_sscanf(const char *str,const char *fmt,char*fun,char*file,int line,...); -// Private MCD function, no need to be in public namespace -//void scan_args(const char*fmt,va_list argptr,char*fun,char*file,int line); -#ifdef _GNU_SOURCE -int MCD_asprintf(char **ptr, const char*fmt,char*,char*,int,...); -int MCD_vasprintf(char **ptr, const char*fmt,va_list argptr,char*,char*,int); -#endif // _GNU_SOURCE - -void MCD_free(void *p,char*,char*,int); - -/* --- call this for memory stats --- */ -void showMemStats(void); - -/* --- to send realtime stats somewhere other than stderr, - put an opened fp in here --- */ -void _MCD_RealTimeLog(FILE*); - -/* --- to send showMemStats() somewhere other than stdout, - put an opened fp in here --- */ -void _MCD_MemStatLog(FILE*); - -#else //MCD is gone - -/* define functions so source will compile without modification */ -#define showMemStats() -#define _MCD_RealTimeLog(x) -#define _MCD_MemStatLog(x) - -#endif //_MCD_GONE - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#ifndef _MCD_GONE // check again, outside of extern "C" mode -#ifdef __cplusplus /* Some C++ new/delete operator overloading */ - -#ifndef WIN32 - #warning C++ Extentions Enabled -#endif - -#ifdef new - #undef new -#endif - -#ifdef delete - #undef delete -#endif - -extern char *_MCD_LastSetFile,*_MCD_LastSetFun; -extern int _MCD_LastSetLine; - -inline void setFileFunLineState(char*file,char*fun,int line) -{ - _MCD_LastSetLine=line; - _MCD_LastSetFile=file; - _MCD_LastSetFun=fun; -} - -inline void* operator new (unsigned int size,char *file, -char*fun,int line) -{ - return MCD_malloc(size,file,fun,line); -} - -inline void* operator new[] (unsigned int size,char*file, -char*fun,int line) -{ - return MCD_malloc(size,file,fun,line); -} - -// currently, passing args to delete operator is not working at all... -#ifndef WIN32 //win32 doesn't like default params to delete -inline void operator delete (void * buf,char*file=__FILE__, -#ifdef WIN32 -char*fun=__FILE__,int line=__LINE__) -#else -char*fun=__FUNCTION__,int line=__LINE__) -#endif -{ - MCD_free(buf,_MCD_LastSetFile,_MCD_LastSetFun,_MCD_LastSetLine); -} -// ...so we have these here for the day they work, which isn't today. -inline void operator delete[] (void * buf,char*file=__FILE__, -#ifdef WIN32 -char*fun=__FILE__,int line=__LINE__) -#else -char*fun=__FUNCTION__,int line=__LINE__) -#endif -{ - MCD_free(buf,_MCD_LastSetFile,_MCD_LastSetFun,_MCD_LastSetLine); -} -#endif // win32 default delete params - -inline void operator delete (void * buf) -{ - MCD_free(buf,0,0,0); -} - -inline void operator delete[] (void * buf) -{ - MCD_free(buf,0,0,0); -} - -#ifdef WIN32 -#define new new(__FILE__,__FILE__,__LINE__) -#else -#define new new(__FILE__,__FUNCTION__,__LINE__) -#endif -//#define delete setFileFunLineState(__FILE__,__FUNCTION__,__LINE__);delete -//#define delete delete(__FILE__,__FUNCTION__,__LINE__) - -#endif // __cplusplus -#endif // _MCD_GONE - - -#endif // MCD_H diff --git a/source/module_base/memory.cpp b/source/module_base/memory.cpp deleted file mode 100644 index 3f8fe287af..0000000000 --- a/source/module_base/memory.cpp +++ /dev/null @@ -1,502 +0,0 @@ -//========================================================== -// AUTHOR : mohan -// DATE : 2008-11-18 -//========================================================== -#include -#include "memory.h" -#include "global_variable.h" -#include "module_base/parallel_reduce.h" - -namespace ModuleBase -{ -// 8 bit = 1 Byte -// 1024 Byte = 1 KB -// 1024 KB = 1 MB -// 1024 MB = 1 GB -double Memory::total = 0.0; -int Memory::complex_matrix_memory = 2*sizeof(double); // 16 byte -int Memory::double_memory = sizeof(double); // 8 byte -int Memory::int_memory = sizeof(int); // 4.0 Byte -int Memory::bool_memory = sizeof(bool); // 1.0 Byte -int Memory::float_memory = sizeof(float); // 4.0 Byte -int Memory::short_memory = sizeof(short); // 2.0 Byte - -int Memory::n_memory = 1000; -int Memory::n_now = 0; -bool Memory::init_flag = false; - -#if defined(__CUDA) || defined(__ROCM) - -double Memory::total_gpu = 0.0; -int Memory::n_now_gpu = 0; -bool Memory::init_flag_gpu = false; - -std::string *Memory::name_gpu; -std::string *Memory::class_name_gpu; -double *Memory::consume_gpu; - -#endif - - -std::string *Memory::name; -std::string *Memory::class_name; -double *Memory::consume; - -Memory::Memory() -{ -} - -Memory::~Memory() -{ -} - -double Memory::calculate_mem(const long &n_in,const std::string &type) -{ - double n = static_cast(n_in); - double mem = 0.0; - - double factor = 1.0/1024.0/1024.0; - double complex_matrix_mem = complex_matrix_memory * factor; - double double_mem = double_memory * factor; - double int_mem = int_memory * factor; - double bool_mem = bool_memory * factor; - double float_mem = float_memory * factor; - double short_mem = short_memory * factor; - - if(type=="ModuleBase::ComplexMatrix" || type=="complexmatrix" || type=="cdouble") - { - mem = complex_matrix_mem; - } - else if(type=="real" || type=="double") - { - mem = double_mem; - } - else if(type=="int") - { - mem = int_mem; - } - else if(type=="bool") - { - mem = bool_mem; - } - else if(type=="short") - { - mem = short_mem; - } - else if(type=="float") - { - mem = float_mem; - } - else if(type=="AtomLink") - { - mem = int_mem * 2 + double_mem * 3; - } - else if(type=="ModuleBase::Vector3") - { - mem = 3 * double_mem; - } - else - { - std::cout<<"not this type in memory storage : "<= n_memory) - { - std::cout<<" Error! Too many memories required."; - return 0.0; - } - - consume[find] = Memory::calculate_mem(n_in,type); - - if(consume[find] > 5) - { - print(find); - } - return consume[find]; -} - -void Memory::record -( - const std::string &name_in, - const size_t &n_in, - const bool accumulate -) -{ - if(!Memory::init_flag) - { - name = new std::string[n_memory]; - class_name = new std::string[n_memory]; - consume = new double[n_memory]; - for(int i=0;i= n_memory) - { - std::cout<<" Error! Too many memories has been recorded."; - return; - } - - const double factor = 1.0/1024.0/1024.0; - double size_mb = n_in * factor; - - if(accumulate) - { - consume[find] += size_mb; - Memory::total += size_mb; - } - else - { - if(consume[find] < size_mb) - { - Memory::total += size_mb - consume[find]; - consume[find] = size_mb; - if(consume[find] > 5) - { - print(find); - } - } - } - - return; -} - -#if defined(__CUDA) || defined(__ROCM) - -double Memory::record_gpu -( - const std::string &class_name_in, - const std::string &name_in, - const long &n_in, - const std::string &type, - const bool accumulate -) -{ - if(!Memory::init_flag_gpu) - { - name_gpu = new std::string[n_memory]; - class_name_gpu = new std::string[n_memory]; - consume_gpu = new double[n_memory]; - for(int i=0;i= n_memory) - { - std::cout<<" Error! Too many gpu memories required."; - return 0.0; - } - - consume_gpu[find] = Memory::calculate_mem(n_in,type); - - if(consume_gpu[find] > 5) - { - print(find); - } - return consume_gpu[find]; -} - -void Memory::record_gpu -( - const std::string &name_in, - const size_t &n_in, - const bool accumulate -) -{ - if(!Memory::init_flag_gpu) - { - name_gpu = new std::string[n_memory]; - class_name_gpu = new std::string[n_memory]; - consume_gpu = new double[n_memory]; - for(int i=0;i= n_memory) - { - std::cout<<" Error! Too many gpu memories has been recorded."; - return; - } - - const double factor = 1.0/1024.0/1024.0; - double size_mb = n_in * factor; - - if(accumulate) - { - consume_gpu[find] += size_mb; - Memory::total_gpu += size_mb; - } - else - { - if(consume_gpu[find] < size_mb) - { - Memory::total_gpu += size_mb - consume_gpu[find]; - consume_gpu[find] = size_mb; - if(consume_gpu[find] > 5) - { - print(find); - } - } - } - return; -} - -#endif - -void Memory::print(const int find) -{ - GlobalV::ofs_running <<"\n Warning_Memory_Consuming allocated: " - <<" "<0); - - bool *print_flag = new bool[n_memory]; - - for(int i=0; i0); - - bool *print_flag_gpu = new bool[n_memory]; - - for(int i=0; i -#include - -namespace ModuleBase -{ - -/** - * @brief Record memory consumption during computation. - * @author Mohan - * @note 8 bit = 1 Byte; 1024 Byte = 1 KB; - * 1024 KB = 1 MB; 1024 MB = 1 GB - * - */ -class Memory -{ - public: - Memory(); - ~Memory(); - - /** - * @brief Record memory consumed during computation - * - * @param class_name The name of a class - * @param name The name of a quantity - * @param n The number of the quantity - * @param type The type of data - * @param accumulate Useless, always set false - * @return double - */ - static double record(const std::string &class_name, - const std::string &name, - const long &n, - const std::string &type, - const bool accumulate = false); - - /** - * @brief Record memory consumed during computation - * - * @param name The name of a quantity - * @param n The number of the quantity - * @param accumulate Useless, always set false - */ - static void record( - const std::string &name_in, - const size_t &n_in, - const bool accumulate = false - ); - -#if defined(__CUDA) || defined(__ROCM) - - /** - * @brief Record memory consumed on gpu during computation - * - * @param class_name The name of a class - * @param name The name of a quantity - * @param n The number of the quantity - * @param type The type of data - * @param accumulate Useless, always set false - * @return double - */ - static double record_gpu(const std::string &class_name, - const std::string &name, - const long &n, - const std::string &type, - const bool accumulate = false); - - /** - * @brief Record memory consumed on gpu during computation - * - * @param name The name of a quantity - * @param n The number of the quantity - * @param accumulate Useless, always set false - */ - static void record_gpu( - const std::string &name_in, - const size_t &n_in, - const bool accumulate = false - ); - -#endif - - static double &get_total(void) - { - return total; - } - - static void finish(std::ofstream &ofs); - - /** - * @brief Print memory consumed (> 1 MB) in a file - * - * @param ofs The output file stream for print out memory records - */ - static void print_all(std::ofstream &ofs); - - static void print(const int find_in); - - /** - * @brief Calculate memory requirements for various - * types of data - * - * @param n The number of a type of data - * @param type The type of data - * @return double - */ - static double calculate_mem(const long &n, const std::string &type); - - private: - static double total; - static std::string *name; - static std::string *class_name; - static double *consume; - static int n_memory; - static int n_now; - static bool init_flag; - -#if defined(__CUDA) || defined(__ROCM) - static double total_gpu; - static std::string *name_gpu; - static std::string *class_name_gpu; - static double *consume_gpu; - static int n_now_gpu; - static bool init_flag_gpu; -#endif - - static int complex_matrix_memory; //(16 Byte) - static int double_memory; //(8 Byte) - static int int_memory; //(4 Byte) - static int bool_memory; - static int short_memory; //(2 Byte) - static int float_memory; //(4 Byte) -}; - -} // namespace ModuleBase - -#endif diff --git a/source/module_base/module_container/ATen/core/CMakeLists.txt b/source/module_base/module_container/ATen/core/CMakeLists.txt deleted file mode 100644 index 7396b17dac..0000000000 --- a/source/module_base/module_container/ATen/core/CMakeLists.txt +++ /dev/null @@ -1,2 +0,0 @@ -file(GLOB ATen_CORE_SRCS "*.cpp") -set(ATen_CPU_SRCS ${ATen_CPU_SRCS} ${ATen_CORE_SRCS} PARENT_SCOPE) \ No newline at end of file diff --git a/source/module_base/module_container/ATen/core/tensor.cpp b/source/module_base/module_container/ATen/core/tensor.cpp deleted file mode 100644 index 92babb361c..0000000000 --- a/source/module_base/module_container/ATen/core/tensor.cpp +++ /dev/null @@ -1,410 +0,0 @@ -#include -#include -#include -#include -#if defined(__CUDA) || defined(__ROCM) -#include -#endif // __CUDA || __ROCM -namespace container { - -Tensor::Tensor() : Tensor(DataType::DT_FLOAT) {} - -Tensor::Tensor(DataType data_type) : Tensor(data_type, TensorShape({1})) {} - -// Constructor that creates a tensor with the given data type and shape using the default allocator. -Tensor::Tensor(DataType data_type, const TensorShape& shape) - : Tensor(GetAllocator(DeviceType::CpuDevice), data_type, DeviceType::CpuDevice, shape) {} - -// Construct a new Tensor object with the given data type and shape. -Tensor::Tensor(DataType data_type, DeviceType device, const TensorShape& shape) - : Tensor(GetAllocator(device), data_type, device, shape) {} - -Tensor::Tensor(base::core::Allocator* a, DataType data_type, DeviceType device, const TensorShape& shape) - : data_type_(data_type), - device_(device), - shape_(shape), - buffer_(new TensorBuffer(a, shape_.NumElements() * SizeOfType(data_type_))) {} - -// Construct a new Tensor object by copying another Tensor. -Tensor::Tensor(const Tensor& other) - : data_type_(other.data_type_), - shape_(other.shape_), - device_(other.device_), - buffer_(new TensorBuffer(GetAllocator(device_), shape_.NumElements() * SizeOfType(data_type_))) -{ - TEMPLATE_ALL_2(data_type_, device_, - kernels::synchronize_memory()( - this->data(), other.data(), this->NumElements())) -} - -// Construct a new Tensor object by moving another Tensor. -Tensor::Tensor(Tensor&& other) noexcept - : data_type_(other.data_type_), - device_(other.device_), - shape_(other.shape_), - buffer_(other.buffer_) -{ - // Reset the other object. - other.buffer_ = nullptr; -} - -// Destructor that frees the memory allocated by the tensor. -// Note: If you have a class with virtual functions, it requires a virtual destructor. -// However, Our subclass TensorMap, etc., do not own resources. -// So, we do not need to declare a virtual destructor here. -Tensor::~Tensor() { - if (buffer_) { buffer_->unref(); -} -} - -// Get the data type of the tensor. -DataType Tensor::data_type() const { return data_type_; } - -// Get the device type of the tensor. -DeviceType Tensor::device_type() const { return device_; } - -// Get the shape of the tensor. -const TensorShape& Tensor::shape() const { return shape_; } - -// Get the total number of elements in the tensor. -int64_t Tensor::NumElements() const { return shape_.NumElements(); } - -// Get a pointer to the data buffer of the tensor. -void* Tensor::data() const { return buffer_->data(); } - -// Get the TensorBuffer object that holds the data of the tensor. -const TensorBuffer& Tensor::buffer() const { return *buffer_; } - -// Get the Allocator object according to the given device type. -base::core::Allocator* Tensor::GetAllocator(DeviceType device) { - base::core::Allocator * allocator; - if (device == DeviceType::CpuDevice) { - allocator = new base::core::CPUAllocator(); - } -#if defined(__CUDA) || defined(__ROCM) - else if (device == DeviceType::GpuDevice) { - allocator = new base::core::GPUAllocator(); - } -#endif // __CUDA || __ROCM - else { - std::cerr << "Tensor device type " << device << " does not match requested type." << std::endl; - exit(EXIT_FAILURE); - } - return allocator; -} - -// Set the tensor to zero -void Tensor::zero() { - TEMPLATE_ALL_2(this->data_type_, this->device_, - kernels::set_memory()(this->data(), 0, this->NumElements())) -} - -// Reshape the current tensor -void Tensor::reshape(TensorShape shape) { - // check the -1 dimension - int64_t num = 1; - int auto_shape = 0, dim_count = -1, dim_idx = -1; - - for (auto dim : shape.dims()) { - dim_count++; - if (dim < 1 && dim != -1) { - throw std::invalid_argument("Invalid shape, dim of tensor must >= 1 or equal to -1(auto shape)."); - } - if (dim == -1) { - auto_shape++; - dim_idx = dim_count; - } - num *= dim; - } - // more than one -1 dimension. - if (auto_shape > 1) { - throw std::invalid_argument("Invalid shape, there can be only one -1 dim in TensorShape object."); - } - // auto reshape - if (auto_shape == 1) { - int dim_ = static_cast(this->NumElements() / (-num)); - if (dim_ < 1 || -dim_ * num != this->NumElements()) { - throw std::invalid_argument("Invalid shape, total number of elements does not match!"); - } - shape.set_dim_size(dim_idx, dim_); - } - else { - if (num != this->NumElements()) { - throw std::invalid_argument("Invalid shape, total number of elements does not match!"); - } - } - this->shape_ = shape; -} - -Tensor Tensor::shaped(const TensorShape& shape) const { - Tensor output; - REQUIRES_OK(output.CopyFrom(*this, this->shape()), "Invalid shaped operation.") - output.reshape(shape); - return std::move(output); -} - -// Slice the current tensor object. -Tensor Tensor::slice(const std::vector &start, const std::vector &size) const { - // check the ndim of input shape - if (start.size() > 3 || size.size() > 3) { - throw std::invalid_argument("TensorSlice: The slice method only supports tensor ranks that are less than or equal to 2."); - } - // check the dimension size - if (start.size() != shape_.ndim() || size.size() != shape_.ndim()) { - throw std::invalid_argument("TensorSlice: start and size vectors must have same length as number of dimensions"); - } - - // check the boundary - for (int i = 0; i < start.size(); i++) { - if (start[i] < 0 || start[i] >= shape_.dim_size(i)) { - throw std::invalid_argument("TensorSlice: start index is out of bounds"); - } - if (size[i] < 0 || start[i] + size[i] > shape_.dim_size(i)) { - throw std::invalid_argument("TensorSlice: size is out of bounds"); - } - } - - // set the output shape of the current tensor. - TensorShape output_shape = shape_; - for (int i = 0; i < start.size(); i++) { - output_shape.set_dim_size(i, size[i]); - } - Tensor output(this->data_type_, this->device_, output_shape); - - // TODO: implement the data copy. - // copy the data from the input tensor to the output tensor - unsigned int ndim = shape_.ndim(); - if (ndim == 1) { - TEMPLATE_ALL_2(this->data_type_, this->device_, - kernels::synchronize_memory()( - output.data(), this->data() + start[0], size[0])) - } - else if (ndim == 2) { - for (int i = 0; i < size[0]; i++) { - int offset = static_cast((start[0] + i) * shape_.dim_size(1) + start[1]); - int offset_out = i * size[1]; - TEMPLATE_ALL_2(this->data_type_, this->device_, - kernels::synchronize_memory()( - output.data() + offset_out, this->data() + offset, size[1])) - } - } - else if (ndim == 3) { - for (int i = 0; i < size[0]; i++) { - for (int j = 0; j < size[1]; j++) { - int offset = static_cast((i + start[0]) * shape_.dim_size(1) * shape_.dim_size(2) + - (j + start[1]) * shape_.dim_size(2) + start[2]); - int offset_out = i * size[1] * size[2] + j * size[2]; - TEMPLATE_ALL_2(this->data_type_, this->device_, - kernels::synchronize_memory()( - output.data() + offset_out, this->data() + offset, size[1])) - } - } - } - return std::move(output); -} - -// Resize tensor object with the given tensor_shape -void Tensor::resize(const TensorShape& new_shape) { - if (shape_ == new_shape) { - return; - } - REQUIRES_OK(buffer_->OwnsMemory() || this->NumElements() == 0, - "Cannot resize a tensor that mapped from a given data buffer") - if (buffer_ && buffer_->GetAllocatedBytes() < new_shape.NumElements() * SizeOfType(data_type_)) { - buffer_->unref(); - this->buffer_ = new TensorBuffer(GetAllocator(device_), new_shape.NumElements() * SizeOfType(data_type_)); - } - shape_ = new_shape; -} - -Tensor& Tensor::operator=(const Tensor& other) { - if (this == &other) { - return *this; - } - this->device_ = other.device_; - this->data_type_ = other.data_type_; - this->shape_ = other.shape_; - if (buffer_) { buffer_->unref(); -} - - this->buffer_ = new TensorBuffer(GetAllocator(device_), shape_.NumElements() * SizeOfType(data_type_)); - - TEMPLATE_ALL_2(this->data_type_, this->device_, - kernels::synchronize_memory()( - this->data(), other.data(), this->NumElements())) - return *this; -} - -Tensor& Tensor::operator=(Tensor&& other) noexcept { - if (this == &other) { - return *this; - } - this->device_ = other.device_; - this->data_type_ = other.data_type_; - this->shape_ = other.shape_; - - if (buffer_) { buffer_->unref(); // Release current resource -} - this->buffer_ = other.buffer_; - other.buffer_ = nullptr; // Reset the other TensorBuffer. - return *this; -} - -bool Tensor::operator==(const Tensor& other) const { - if (this->data_type_ != other.data_type_ || - this->device_ != other.device_ || - this->shape_ != other.shape_) - { - return false; - } - bool result = false; - if (this->device_ != DeviceType::CpuDevice) { - Tensor tmpA = this->to_device(); - Tensor tmpB = other.to_device(); - TEMPLATE_ALL_2(tmpA.data_type(), tmpA.device_type(), - result = std::equal(tmpA.data(), tmpA.data() + tmpA.NumElements(), tmpB.data(), element_compare::type)>)) - return result; - } - TEMPLATE_ALL_2(this->data_type_, this->device_, - result = std::equal(this->data(), this->data() + this->NumElements(), other.data(), element_compare::type)>)) - return result; -} - -bool Tensor::CopyFrom(const Tensor& other) { - CopyFromInternal(other, other.shape()); - return true; -} - -bool Tensor::CopyFrom(const Tensor& other, const TensorShape& shape) { - if (other.NumElements() == shape.NumElements()) { - CopyFromInternal(other, shape); - return true; - } - return false; -} - -bool Tensor::AllocateFrom(const Tensor& other, const TensorShape& shape) { - data_type_ = other.data_type_; - device_ = other.device_; - shape_ = shape; - if (buffer_) { buffer_->unref(); -} - buffer_ = new TensorBuffer(GetAllocator(device_), shape_.NumElements() * SizeOfType(data_type_)); - return true; -} - -void Tensor::sync(const Tensor& rhs) { - REQUIRES_OK(this->data_type_ == rhs.data_type_ - && this->device_ == rhs.device_) - - if (this->shape_ == rhs.shape_) { - TEMPLATE_ALL_2(data_type_, device_, - kernels::synchronize_memory()( - this->data(), rhs.data(), this->NumElements())) - } - else { - TEMPLATE_ALL_2(data_type_, device_, - kernels::synchronize_memory_stride()( - this->data(), rhs.data(), this->shape().dims(), rhs.shape().dims())) - } -} - -Tensor Tensor::operator[](const int& index) const { - REQUIRES_OK( - index >= 0 && index < shape_.dim_size(0), - "Tensor index is out of bounds.") - - TensorShape output_shape = this->shape_; - output_shape.remove_dim(0); - if (output_shape.ndim() == 0) { - // If the output shape is empty, we need to add a dimension of size 1 - output_shape.add_dim(1); - } - auto data_ = reinterpret_cast(this->data()) + index * shape_.strides()[0] * SizeOfType(this->data_type_); - - return TensorMap(data_, this->data_type_, this->device_, output_shape); -} - -// Overloaded operator<< for the Tensor class. -std::ostream& operator<<(std::ostream& os, const Tensor& tensor) { - std::ios::fmtflags flag(os.flags()); - std::streamsize precision = os.precision(); // save the current precision - const int64_t num_elements = tensor.NumElements(); - const DataType data_type = tensor.data_type(); - const DeviceType device_type = tensor.device_type(); - const TensorShape& shape = tensor.shape(); - - // Copy the data from device to host for output - auto * data_ = tensor.data(); -#if __CUDA || __ROCM - if (device_type != DeviceType::CpuDevice) { - data_ = malloc(num_elements * Tensor::SizeOfType(data_type)); - // Copy data to a specified device - TEMPLATE_ALL_2(data_type, device_type, - kernels::synchronize_memory()( - reinterpret_cast(data_), tensor.data(), num_elements)) - } -#endif - - os << "Tensor("; - os << "shape=["; - for (int i = 0; i < shape.ndim(); ++i) { - os << shape.dim_size(i); - if (i < shape.ndim() - 1) { - os << ","; - } - } - os << "], data_type=" << data_type; - os << ", device_type=" << device_type; - os << ", owns_memory=" << tensor.buffer().OwnsMemory(); - os << ", buffer=\narray("; - switch (data_type) { - case DataType::DT_FLOAT: { - const auto* data = static_cast(data_); - _internal_output(os, data, shape, num_elements); - break; - } - case DataType::DT_DOUBLE: { - const auto* data = static_cast(data_); - _internal_output(os, data, shape, num_elements); - break; - } - case DataType::DT_INT: { - const auto* data = static_cast(data_); - _internal_output(os, data, shape, num_elements); - break; - } - case DataType::DT_INT64: { - const auto* data = static_cast(data_); - _internal_output(os, data, shape, num_elements); - break; - } - case DataType::DT_COMPLEX: { - const auto* data = static_cast*>(data_); - _internal_output(os, data, shape, num_elements); - break; - } - case DataType::DT_COMPLEX_DOUBLE: { - const auto* data = static_cast*>(data_); - _internal_output(os, data, shape, num_elements); - break; - } - default: - os << "unknown"; - break; - } - os << "))\n"; - -#if __CUDA || __ROCM - // delete the temporary data - if (device_type != DeviceType::CpuDevice) { - free(data_); - } -#endif - // restore the os settings - os.flags(flag); - os.precision(precision); // restore the precision - return os; -} - -} // namespace container diff --git a/source/module_base/module_container/ATen/core/tensor.h b/source/module_base/module_container/ATen/core/tensor.h deleted file mode 100644 index 3faf820dbd..0000000000 --- a/source/module_base/module_container/ATen/core/tensor.h +++ /dev/null @@ -1,625 +0,0 @@ -#ifndef ATEN_CORE_TENSOR_H_ -#define ATEN_CORE_TENSOR_H_ - -#include -#include -#include -#include -#include - -#include - -#include - -// TODO: -// 1. add log system -// 2. add exception system -// 3. refact cmake system, use cmake parant scope to construct the libraries - -namespace ct = container; - -namespace container { - -/** - * @brief A multi-dimensional array of elements of a single data type. - * - * This class represents a Tensor, which is a fundamental concept in container. - * A Tensor has a data type, shape, and memory buffer that stores the actual data. - * - * This class is not thread-safe and should not be accessed by multiple threads - * concurrently. - */ -class Tensor { - public: - - /** - * @brief Creates a 1-dimentional, 0-element float tensor. - * - * This constructor creates a new Tensor object. It can be used to initialize a tensor with - * default values or to create an empty tensor. - */ - Tensor(); - - /** - * @brief Explicit constructor for the Tensor class. - * - * This constructor creates a new Tensor object with the specified data type. - * The constructor is marked as explicit, which means it requires an explicit - * call and cannot be used for implicit type conversions. - * - * @param data_type The data type of the tensor elements. - */ - explicit Tensor(DataType data_type); - - /** - * @brief Constructor that creates a tensor with the given data type and shape using the default allocator. - * - * @param data_type The data type of the tensor. - * @param shape The shape of the tensor. - */ - Tensor(DataType data_type, const TensorShape& shape); - - /** - * @brief Construct a new Tensor object with the given data type, shape and device type. - * - * The memory for the tensor is allocated according to the given device type. - * - * @param data_type The data type of the tensor. - * @param shape The shape of the tensor. - * @param device The data type of the tensor. - */ - Tensor(DataType data_type, DeviceType device, const TensorShape& shape); - - Tensor(base::core::Allocator* a, DataType data_type, DeviceType device, const TensorShape& shape); - - /** - * @brief Construct a new Tensor object by copying another Tensor. - * - * This constructor performs a deep copy of the data buffer of the other tensor. - * - * @param other The tensor to copy from. - */ - Tensor(const Tensor& other); - - /** - * @brief Move constructor for the Tensor class. - * - * This constructor is used to move the contents and ownership of another Tensor object - * into the newly created object using move semantics. The source Tensor's resources will be - * taken over, and the source object will be left in a valid but unspecified state. - * - * @param other The rvalue reference to the source Tensor object to be moved. - */ - Tensor(Tensor&& other) noexcept; - - ~Tensor(); - /** - * @brief Constructor for the Tensor class using an initializer list of values. - * - * This constructor creates a Tensor object with the specified data type and device type, - * using the values provided in the initializer list. The Tensor's shape is automatically - * determined based on the size of the initializer list. - * - * @tparam T The data type of the elements in the initializer list. - * @param values The initializer list containing the values to populate the Tensor with. - * @param device The device type where the Tensor will be allocated (default is CPU). - */ - template - Tensor(std::initializer_list values, DeviceType device = DeviceType::CpuDevice) : - Tensor(DataTypeToEnum::value, device, TensorShape({static_cast(values.size())})) { - TEMPLATE_ALL_2(this->data_type_, this->device_, - kernels::synchronize_memory()( - this->data(), values.begin(), this->NumElements())) - } - - /** - * @brief Get the data type of the tensor. - * - * @return The data type of the tensor. - */ - DataType data_type() const; - - /** - * @brief Get the data type of the tensor. - * - * @return The data type of the tensor. - */ - DeviceType device_type() const; - - /** - * @brief Get the shape of the tensor. - * - * @return The shape of the tensor. - */ - const TensorShape& shape() const; - - /** - * @brief Get the total number of elements in the tensor. - * - * @return The total number of elements in the tensor. - */ - int64_t NumElements() const; - - /** - * @brief Get a pointer to the data buffer of the tensor. - * - * @return A void pointer to the data buffer of the tensor. - */ - void* data() const; - - /** - * @brief Get a typed pointer to the data buffer of the tensor. - * - * @tparam T The data type of the pointer to return. - * - * @return A typed pointer to the data buffer of the tensor. - * - * @note The template parameter `T` must match the data type of the tensor. If `T` - * does not match the data type of the tensor, the behavior is undefined. - * - * @note This function returns a pointer to the first element in the data buffer - * of the tensor. If the tensor is empty, the behavior is undefined. - */ - template - T* data() const { - if ((std::is_same::value && data_type_ != DataType::DT_FLOAT) || - (std::is_same::value && data_type_ != DataType::DT_INT) || - (std::is_same::value && data_type_ != DataType::DT_INT64) || - (std::is_same::value && data_type_ != DataType::DT_DOUBLE) || - (std::is_same>::value && data_type_ != DataType::DT_COMPLEX) || - (std::is_same>::value && data_type_ != DataType::DT_COMPLEX_DOUBLE)) - { - std::cerr << "Tensor data type does not match requested type." << std::endl; - exit(EXIT_FAILURE); - } - return buffer_->base(); - } - - /** - * @brief Returns the size of a single element for a given data type. - * - * @param data_type The data type. - * - * @return The size of a single element. - * - * @note This function is not thread-safe. - * @note If an unsupported data type is passed in, an error message will be printed and the program will exit. - * @note This function returns the size in bytes of a single element of the given data type. - * If an unsupported data type is provided, the function outputs an error message and exits the program. - * Supported data types: - * DT_FLOAT: 4 bytes - * DT_INT32: 4 bytes - * DT_DOUBLE: 8 bytes - * DT_COMPLEX: 8 bytes (2 floats) - * DT_COMPLEX_DOUBLE: 16 bytes (2 doubles) - */ - static size_t SizeOfType(DataType data_type) { - switch (data_type) { - case DataType::DT_FLOAT: - return sizeof(float); - case DataType::DT_INT: - return sizeof(int32_t); - case DataType::DT_INT64: - return sizeof(int64_t); - case DataType::DT_DOUBLE: - return sizeof(double); - case DataType::DT_COMPLEX: - return sizeof(std::complex); - case DataType::DT_COMPLEX_DOUBLE: - return sizeof(std::complex); - default: - std::cerr << "Unsupported data type!" << std::endl; - exit(EXIT_FAILURE); - } - } - - /** - * @brief Get the TensorBuffer object that holds the data of the tensor. - * - * @return The TensorBuffer object that holds the data of the tensor. - */ - const TensorBuffer& buffer() const; - - /** - * @brief Method to transform data from a given tensor object to the output tensor with a given device type - * - * @tparam DEVICE The device type of the returned tensor. - * - * @return Tensor A tensor object with data transformed to the output tensor - */ - template - Tensor to_device() const { - if (this->device_ == DeviceTypeToEnum::value) { - return *this; - } - // Create output tensor on device - Tensor output(this->data_type_, DeviceTypeToEnum::value, this->shape_); - - // Copy data to a specified device - // TODO: move the memory operator into the tensor_buff class. - TEMPLATE_ALL_2(this->data_type_, this->device_, - kernels::synchronize_memory()( - output.data(), this->data(), this->NumElements())) - - return output; - } - - /** - * @brief Copies data from a given device to the current tensor object. - * - * This function is designed to copy a given number of elements from a device-specific memory location - * to the memory associated with this object. It ensures that the size of the data being copied does not exceed - * the size of the destination tensor. - * - * @tparam DEVICE The device type from which the data will be copied. - * @tparam T The data type of the elements being copied. - * - * @param data Pointer to the data array in the device memory that needs to be copied. - * @param num_elements The number of elements to copy. - * - * @pre The number of elements to copy (`num_elements`) must be less than or equal to the number of elements - * in the destination tensor (`this->shape_.num_elements()`). If this condition is not met, the function - * will trigger an error through `REQUIRES_OK`. - * - * @note The function uses a template specialization `TEMPLATE_CZ_2` to handle the copying of memory - * based on the data type `T` and the device type `DEVICE`. It utilizes the `kernels::cast_memory` - * method to perform the actual memory copy operation. - */ - template - void copy_from_device(const T* data, int64_t num_elements = -1) { - if (num_elements == -1) { - num_elements = this->NumElements(); - } - REQUIRES_OK(this->shape_.NumElements() >= num_elements, - "The number of elements of the input data must match the number of elements of the tensor.") - - TEMPLATE_CZ_2(this->data_type_, this->device_, - kernels::cast_memory()( - this->data(), data, num_elements)) - } - - /** - * @brief Method to transform data from a given tensor object to the output tensor with a given data type - * - * @tparam T The data type of the returned tensor. - * - * @return Tensor A tensor object with data transformed to the output tensor - */ - template - Tensor cast() const { - // Create output tensor on device - Tensor output(DataTypeToEnum::value, this->device_, this->shape_); - - // TODO: error handle of cast memory - // TODO: move the memory operator into the tensor_buff class. - // Copy data to a specified device - TEMPLATE_CZ_2(this->data_type_, this->device_, - kernels::cast_memory()( - output.data(), this->data(), this->NumElements())) - - return output; - } - - /** - * @brief Set all elements in current tensor object to zero. - */ - void zero(); - - /** - * @brief Set all elements in current tensor object to zero. - * - * @param shape The new shape of the tensor. - * - * @note There can be one -1 dimension in the input shape, indicates the auto reshape. - */ - void reshape(TensorShape shape); - - /** - * @brief Set all elements in current tensor object to zero. - * - * @param shape The new shape of the tensor. - * - * @note There can be one -1 dimension in the input shape, indicates the auto reshape. - */ - Tensor shaped(const TensorShape& shape) const; - - /** - * @brief Return a new Tensor slice starting at the specified indices with the given size. - * - * @param start A vector of integers representing the starting indices of the slice. - * @param size A vector of integers representing the size of the slice along each dimension. - * - * @return A new Tensor slice. - * - * @note Currently, this method only supports tensors with a ndim of less than or equal to 3. - */ - Tensor slice(const std::vector& start, const std::vector& size) const; - - /** - * @brief Resize the tensor to the new shape. - * - * The tensor will be resized to the new shape, and its data buffer will be reallocated - * if necessary. If the new shape has a different number of elements than the current - * shape, the data buffer will be reallocated. If the new shape has the same number of - * elements as the current shape, the data buffer will not be reallocated, but the - * shape of the tensor will be updated. - * - * @param new_shape The new shape of the tensor. - * - * @note This method will automatically zero the resized tensor object. - */ - void resize(const TensorShape& new_shape); - - /** - * @brief Get the Allocator object according to the given device type. - * - * @param device The device type. - * - * @return The related Allocator class pointer. - */ - // TODO: Delete this function, and use a singleton allocator class. - static base::core::Allocator* GetAllocator(DeviceType device); - - /** - * @brief Get the element at the specified indices. - * - * @param indices A vector of integers representing the indices of the element. - * - * @return The element at the specified indices. - * - * @note The number of indices must match the number of dimensions of the tensor. - * If the indices are out of bounds, the behavior is undefined. - */ - template - T& get_value(Indices... indices) const { - if (sizeof...(Indices) != shape_.ndim()) { - throw std::invalid_argument("Incorrect number of indices."); - } - - // Calculate the linear index corresponding to the given indices - size_t linearIndex = calculateLinearIndex(indices...); - - // Access the element at the calculated linear index - return *reinterpret_cast(data() + linearIndex); - } - - /** - * @brief Get the pointer to the specified row. - * - * @param row The row index. - * - * @return The pointer to the specified row. - * - * @note This function assumes the tensor is treated as a matrix, where each row - * is a contiguous block of memory. - * If the row index is out of bounds, the behavior is undefined. - */ - template - T* inner_most_ptr(const int &index) const { - if (shape_.ndim() > 2) { - throw std::invalid_argument("Invalid call, inner_most_ptr only support tensor rank <= 2!"); - } - if (index > shape_.dim_size(static_cast(shape_.ndim() - 2))) { - throw std::invalid_argument("Invalid index, index of the inner-most must less than the inner-most shape size!"); - } - if (shape_.ndim() == 1) { - return data() + index; - } - return data() + index * shape_.dim_size(static_cast(shape_.ndim()) - 1); - } - - - /** - * @brief Equality comparison operator for tensors. - * - * Compares the current tensor with another tensor for equality. Returns true if the data type, - * device type, and shape of the two tensors match, and the data elements are equal. - * - * @param other The tensor to compare with. - * @return True if the tensors are equal, otherwise false. - */ - bool operator==(const Tensor& other) const; - - /** - * @brief Assignment operator overload for the Tensor class. - * - * This operator is used to assign the values of another Tensor object to the current object. - * It performs a deep copy of the data from the source Tensor to the destination Tensor. - * - * @param other The source Tensor object whose values will be assigned. - * @return A reference to the current Tensor object after the assignment. - */ - Tensor& operator=(const Tensor& other); - - /** - * @brief Move assignment operator overload for the Tensor class. - * - * This operator is used to move the contents and ownership of another Tensor object - * into the current object using move semantics. The source Tensor's resources will be - * taken over, and the source object will be left in a valid but unspecified state. - * - * @param other The rvalue reference to the source Tensor object to be moved. - * @return A reference to the current Tensor object after the move assignment. - * @note This function is declared as noexcept, indicating that it does not throw exceptions. - */ - Tensor& operator=(Tensor&& other) noexcept; - - /** - * @brief Copy the data from another tensor into this tensor. - * - * This function copies the data from another tensor into the current tensor. - * The underlying storage of the current tensor will be shared with the source tensor. - * - * @param other The source Tensor from which data will be copied. - * @return Returns true if the copy was successful, false otherwise. - * @note The current tensor will share the same underlying storage as the source tensor. - */ - bool CopyFrom(const Tensor& other); - - /** - * @brief Copy the data from another tensor into this tensor while reshaping it. - * - * This function copies the data from another tensor into the current tensor, and also reshapes - * the current tensor to match the specified shape. The underlying storage of the current tensor - * will be shared with the source tensor. - * - * @param other The source Tensor from which data will be copied. - * @param shape The desired TensorShape for the current tensor after reshaping. - * @return Returns true if the copy and reshaping were successful, false otherwise. - * @note The current tensor will share the same underlying storage as the source tensor. - * @note The function returns true if the number of elements in `other.shape()` matches the - * number of elements in the given `shape`. - */ - bool CopyFrom(const Tensor& other, const TensorShape& shape); - - /** - * @brief Copies data from another Tensor with memory allocation and specified shape. - * - * This function copies data from another Tensor while also allocating memory for the current Tensor - * based on the given shape. The data type and device of the current Tensor are set to match those - * of the source Tensor. The previous memory buffer, if any, is deallocated. - * - * @param other The source Tensor from which data will be copied. - * @param shape The TensorShape specifying the shape of the newly allocated memory. - * @return Returns true if the copy and allocation were successful, false otherwise. - */ - bool AllocateFrom(const Tensor& other, const TensorShape& shape); - - /** - * @brief Accessor function for a multi-dimensional tensor. - * - * This function provides read-only access to the data of a tensor with a specific rank. - * It performs checks to ensure that the rank of the tensor matches the rank of the accessor. - * - * @tparam T The data type of the elements. - * @tparam N The number of dimensions. - * - * @return A TensorAccessor object for accessing the tensor's data. - */ - template - TensorAccessor accessor() const& { - // Check if the tensor's rank is greater than 0 - static_assert(N > 0, - "Accessor is used to access the data of a tensor with rank > 0, for scalars use *data()"); - // Check if the rank of the tensor matches the rank of the accessor - REQUIRES_OK(this->shape_.ndim() == N, - "The rank of the tensor must match the rank of the accessor.") - // Create and return a TensorAccessor object - return TensorAccessor(this->data(), this->shape_.dims().data(), this->shape_.strides().data()); - } - template - TensorAccessor accessor() && = delete; - - /** - * @brief Synchronize the current Tensor with another Tensor. - * - * This function ensures that the current Tensor's data is synchronized with another Tensor. - * - * @param rhs The Tensor to synchronize with. - */ - void sync(const Tensor& rhs); - - /** - * @brief Access a sub-Tensor based on an index. - * - * This operator allows you to access a sub-Tensor based on the provided index. - * - * @param index The index to access. Should be within valid bounds. - * @return A sub-Tensor with the specified index. - */ - Tensor operator[] (const int& index) const; - - explicit operator bool() const { - return this->NumElements() > 0; - } - - template - void set_value(T value) { - TEMPLATE_ALL_2(this->data_type_, this->device_, - kernels::set_memory()(this->data(), value, this->NumElements())) - } - -protected: - - /** - * @brief The data type of the tensor. - */ - DataType data_type_; - - /** - * @brief The device type of the tensor. - */ - DeviceType device_; - - /** - * @brief The shape of the tensor. - */ - TensorShape shape_; - - /** - * @brief The TensorBuffer object that holds the data of the tensor. - */ - TensorBuffer* buffer_{}; - - /** - * @brief Calculates the linear index corresponding to the given indices. - * - * @tparam Indices The types of the indices. - * @param indices The indices to calculate the linear index from. - * - * @return The calculated linear index. - * - * @note This function assumes that the provided indices are valid and within the bounds of the tensor's shape. - * It calculates the linear index by iterating over the dimensions of the tensor in reverse order and - * multiplying each index by the corresponding stride. - */ - template - size_t calculateLinearIndex(Indices... indices) const { - size_t stride = 1; - size_t linearIndex = 0; - size_t indexArray[] = { static_cast(indices)... }; - - for (int ii = static_cast(shape_.ndim()) - 1; ii >= 0; --ii) { - linearIndex += indexArray[ii] * stride; - stride *= shape_.dim_size(ii); - } - return linearIndex; - } - - // This function is used to copy data and properties from another Tensor instance, 'other', into the current Tensor instance. - // The 'shape' parameter specifies the new shape for the current Tensor. - inline void CopyFromInternal(const Tensor& other, const TensorShape& shape) { - // Copy the data type and device from the 'other' Tensor. - data_type_ = other.data_type_; - device_ = other.device_; - // Set the shape of the current Tensor to the provided 'shape'. - shape_ = shape; - // Check if the buffer of the current Tensor is different from the buffer of the 'other' Tensor. - if (buffer_ != other.buffer_) { - // If the current Tensor has a buffer, decrease its reference count. - // Note this could indicate a deleted of current buffer_ - if (buffer_) buffer_->unref(); - // Assign the buffer of the 'other' Tensor to the current Tensor's buffer. - buffer_ = other.buffer_; - // Increase the reference count of the buffer to indicate shared ownership. - if (buffer_) buffer_->ref(); - } - } - -}; - -/** - * @brief Overloaded operator<< for the Tensor class. - * - * Prints the data of the Tensor object to the given output stream. - * - * @param os The output stream to write to. - * @param tensor The Tensor object to print. - * - * @return The output stream. - */ -std::ostream& operator<<(std::ostream& os, const Tensor& tensor); - -} // namespace container - -#endif // ATEN_CORE_TENSOR_H_ diff --git a/source/module_base/module_container/ATen/core/tensor_accessor.h b/source/module_base/module_container/ATen/core/tensor_accessor.h deleted file mode 100644 index 40edf98c31..0000000000 --- a/source/module_base/module_container/ATen/core/tensor_accessor.h +++ /dev/null @@ -1,104 +0,0 @@ -#ifndef ATEN_CORE_TENSOR_ACCESSOR_H_ -#define ATEN_CORE_TENSOR_ACCESSOR_H_ - -#include // Include the header file to define size_t -#include -#include -#include - -namespace container { - -template -struct DefaultPtrTraits { - using PtrType = T*; -}; - -#if defined(__CUDACC__) || defined(__HIPCC__) -template -struct RestrictPtrTraits { - using PtrType = T* __restrict__; -}; -#endif - -template class PtrTraits = DefaultPtrTraits> -class TensorAccessorBase { - public: - - using PtrType = typename PtrTraits::PtrType; - - AT_HOST_DEVICE TensorAccessorBase( - PtrType data, - const index_t* sizes, - const index_t* strides) - : data_(data), sizes_(sizes), strides_(strides) {} - - AT_HOST int_array_ref sizes() const { - return {sizes_, N}; - } - - AT_HOST int_array_ref strides() const { - return {strides_, N}; - } - - AT_HOST_DEVICE index_t stride(index_t idx) const { - return strides_[idx]; - } - - AT_HOST_DEVICE index_t size(index_t idx) const { - return sizes_[idx]; - } - - AT_HOST_DEVICE PtrType data() { - return data_; - } - - AT_HOST_DEVICE const PtrType data() const { - return data_; - } - - protected: - T* data_; - const index_t* sizes_; - const index_t* strides_; -}; - -template class PtrTraits = DefaultPtrTraits> -class TensorAccessor : public TensorAccessorBase { - public: - using PtrType = typename PtrTraits::PtrType; - - AT_HOST_DEVICE TensorAccessor(PtrType data, const index_t* sizes, const index_t* strides) - : TensorAccessorBase(data, sizes, strides) {} - - AT_HOST_DEVICE TensorAccessor operator[](index_t idx) { - return TensorAccessor(this->data_ + idx * this->strides_[0], this->sizes_ + 1, this->strides_ + 1); - } - - AT_HOST_DEVICE const TensorAccessor operator[](index_t idx) const { - return TensorAccessor(this->data_ + idx * this->strides_[0], this->sizes_ + 1, this->strides_ + 1); - } -}; - -template class PtrTraits> -class TensorAccessor : public TensorAccessorBase { - public: - using PtrType = typename PtrTraits::PtrType; - AT_HOST_DEVICE TensorAccessor(T* data, const index_t* sizes, const index_t* strides) - : TensorAccessorBase(data, sizes, strides) {} - - AT_HOST_DEVICE T& operator[](index_t idx) { - return this->data_[idx * this->strides_[0]]; - } - - AT_HOST_DEVICE const T& operator[](index_t idx) const { - return this->data_[idx * this->strides_[0]]; - } -}; - - -} // namespace container - -#endif // ATEN_CORE_TENSOR_ACCESSOR_H_ \ No newline at end of file diff --git a/source/module_base/module_container/ATen/core/tensor_buffer.cpp b/source/module_base/module_container/ATen/core/tensor_buffer.cpp deleted file mode 100644 index d840e57d43..0000000000 --- a/source/module_base/module_container/ATen/core/tensor_buffer.cpp +++ /dev/null @@ -1,134 +0,0 @@ -#include - -#include -#include - -#if defined(__CUDA) || defined(__ROCM) -#include -#endif - -namespace container { - -// Construct a new TensorBuffer object. -TensorBuffer::TensorBuffer(base::core::Allocator* alloc, void* data_ptr) : alloc_(alloc), data_(data_ptr), owns_memory_(true) {} - -// Construct a new TensorBuffer object. -// Note, this is a reference TensorBuffer, does not own memory itself. -TensorBuffer::TensorBuffer(void* data_ptr) : alloc_(), data_(data_ptr), owns_memory_(false) {} - -// Class members are initialized in the order of their declaration, -// rather than the order they appear in the initialization list! -TensorBuffer::TensorBuffer(base::core::Allocator* alloc, size_t size) { - alloc_ = alloc; - if (size > 0) { - data_ = alloc_->allocate(size); - owns_memory_ = true; - allocated_bytes_ = size; - } -} - -// Move constructor. -TensorBuffer::TensorBuffer(TensorBuffer&& other) noexcept - : alloc_(other.alloc_), - data_(other.data_), - owns_memory_(other.owns_memory_), - allocated_bytes_(other.allocated_bytes_) -{ - // Reset the other TensorBuffer. - other.data_ = nullptr; - other.owns_memory_ = false; - other.allocated_bytes_ = 0; -} - -// Destroy the TensorBuffer object. -TensorBuffer::~TensorBuffer() { - if (this->OwnsMemory() && data_ != nullptr) { - alloc_->free(data_); - } - if (alloc_ != nullptr) { - delete alloc_; - } -} - -// Get the raw data pointer. -void* TensorBuffer::data() const { return data_; } - -// Get the total number of bytes allocated for the buffer. -// This method returns the total number of bytes allocated for the buffer by the allocator -// associated with the TensorBuffer. If the buffer is not yet allocated, the function returns 0. -size_t TensorBuffer::GetAllocatedBytes() const { - return allocated_bytes_; -} - -// Get the root TensorBuffer object. -// If this TensorBuffer is a sub-buffer of another TensorBuffer, returns that -// TensorBuffer. Otherwise, returns this. -TensorBuffer* TensorBuffer::root_buffer() { return this; } // Implementation goes here. - -// Get the Allocator object used in this class. -base::core::Allocator* TensorBuffer::allocator() const { - return alloc_; -} - -// Check whether this TensorBuffer owns the underlying memory. -bool TensorBuffer::OwnsMemory() const { return this->owns_memory_; } - -// Get the type of device used by the TensorBuffer. -DeviceType TensorBuffer::GetDeviceType() const { - if (alloc_ != nullptr) { - return alloc_->GetDeviceType(); - } - return DeviceType::UnKnown; -} - -void TensorBuffer::resize(size_t size) { - // Allocate a new buffer. - void* new_data = this->alloc_->allocate(size); - - // Free the old buffer. - if (this->OwnsMemory()) { - this->alloc_->free(data_); - } - - // Update the internal state. - this->data_ = new_data; - this->owns_memory_ = true; -} - -TensorBuffer& TensorBuffer::operator=(const TensorBuffer& other) { - if (this->OwnsMemory()) { - this->alloc_->free(data_); - } - - delete this->alloc_; - if (other.GetDeviceType() == DeviceType::CpuDevice) { - this->alloc_ = new base::core::CPUAllocator(); - } - #if defined(__CUDA) || defined(__ROCM) - else if (other.GetDeviceType() == DeviceType::GpuDevice) { - this->alloc_ = new base::core::GPUAllocator(); - } - #endif // __CUDA || __ROCM - - - this->data_ = this->alloc_->allocate(other.GetAllocatedBytes()); - this->owns_memory_ = true; - return *this; -} - -TensorBuffer& TensorBuffer::operator=(TensorBuffer&& other) noexcept { - if (this->OwnsMemory()) { - this->alloc_->free(data_); - } - delete this->alloc_; - this->alloc_ = other.alloc_; - this->data_ = other.data_; - this->owns_memory_ = other.owns_memory_; - - // Reset the other TensorBuffer. - other.data_ = nullptr; - other.owns_memory_ = false; - return *this; -} - -} // namespace container diff --git a/source/module_base/module_container/ATen/core/tensor_buffer.h b/source/module_base/module_container/ATen/core/tensor_buffer.h deleted file mode 100644 index 52b393901d..0000000000 --- a/source/module_base/module_container/ATen/core/tensor_buffer.h +++ /dev/null @@ -1,147 +0,0 @@ -#ifndef ATEN_CORE_TENSOR_BUFFER_H_ -#define ATEN_CORE_TENSOR_BUFFER_H_ - -#include -#include -#include - -namespace container { - -/** - * @brief Interface to access the raw ref-counted data buffer. - */ -class TensorBuffer : public base::core::counted_base { - public: - /** - * @brief Construct a new TensorBuffer object. - * - * @param alloc Pointer to the allocator to use for memory allocation. - * @param data_ptr Pointer to the underlying data buffer. - */ - TensorBuffer(base::core::Allocator* alloc, void* data_ptr); - - TensorBuffer(base::core::Allocator* alloc, size_t size); - - /** - * @brief Construct a new TensorBuffer object. - * - * This is a reference TensorBuffer, does not owns memory itself. - * - * @param data_ptr Pointer to the given data buffer. - */ - explicit TensorBuffer(void* data_ptr); - - /** - * @brief Move constructor for the TensorBuffer class. - * - * This constructor is used to move the contents and ownership of another TensorBuffer object - * into the newly created object using move semantics. The source TensorBuffer's resources will be - * taken over, and the source object will be left in a valid but unspecified state. - * - * @param other The rvalue reference to the source TensorBuffer object to be moved. - * @note This function is declared as noexcept, indicating that it does not throw exceptions. - */ - TensorBuffer(TensorBuffer&& other) noexcept; - - /** - * @brief Destroy the TensorBuffer object. - */ - ~TensorBuffer(); - - /** - * @brief Get the raw data pointer. - * - * @return void* Pointer to the underlying data buffer. - */ - void* data() const; - - /** - * @brief resize the tensor buffer - */ - void resize(size_t size); - - /** - * @brief Get the size of the buffer. - * - * @return size_t The size of the buffer in bytes. - */ - size_t GetAllocatedBytes() const; - - /** - * @brief Get the root TensorBuffer object. - * - * If this TensorBuffer is a sub-buffer of another TensorBuffer, returns that - * TensorBuffer. Otherwise, returns this. - * - * @return TensorBuffer* Pointer to the root TensorBuffer object. - */ - TensorBuffer* root_buffer(); - - /** - * @brief Get the Allocator object used in this class. - * - * @return Allocator* Pointer to the Allocator object. - */ - base::core::Allocator* allocator() const; - - /** - * @brief Reinterpret the buffer as an array of type T. - * - * @tparam T The type to reinterpret the buffer as. - * @return T* Pointer to the underlying buffer reinterpreted as type T. - */ - template - T* base() const { - return reinterpret_cast(data()); - } - - /** - * @brief Check whether this TensorBuffer owns the underlying memory. - * - * @return true If the TensorBuffer owns the underlying memory. - * @return false If the TensorBuffer does not own the underlying memory. - */ - virtual bool OwnsMemory() const; - - /** - * @brief Get the type of device used by the TensorBuffer. - * - * @return MemoryType The type of memory used by the TensorBuffer. - */ - DeviceType GetDeviceType() const; - - /** - * @brief Assignment operator overload for the TensorBuffer class. - * - * This operator is used to assign the values of another TensorBuffer object to the current object. - * It performs a deep copy of the data from the source TensorBuffer to the destination TensorBuffer. - * - * @param other The source TensorBuffer object whose values will be assigned. - * @return A reference to the current TensorBuffer object after the assignment. - */ - TensorBuffer& operator=(const TensorBuffer& other); - - /** - * @brief Move assignment operator overload for the TensorBuffer class. - * - * This operator is used to move the contents and ownership of another TensorBuffer object - * into the current object using move semantics. The source TensorBuffer's resources will be - * taken over, and the source object will be left in a valid but unspecified state. - * - * @param other The rvalue reference to the source TensorBuffer object to be moved. - * @return A reference to the current TensorBuffer object after the move assignment. - * @note This function is declared as noexcept, indicating that it does not throw exceptions. - */ - TensorBuffer& operator=(TensorBuffer&& other) noexcept; - - - private: - base::core::Allocator* alloc_ = nullptr; ///< Pointer to the allocator used for memory allocation. - void *data_ = nullptr; ///< Pointer to the underlying data buffer. - bool owns_memory_ = false; ///< Bool to indicate whether this tensor owns it's memory. - int64_t allocated_bytes_ = 0; ///< The number of bytes allocated for this buffer. -}; - -} // namespace container - -#endif // ATEN_CORE_TENSOR_BUFFER_H_ diff --git a/source/module_base/module_container/ATen/core/tensor_map.cpp b/source/module_base/module_container/ATen/core/tensor_map.cpp deleted file mode 100644 index d169f9add6..0000000000 --- a/source/module_base/module_container/ATen/core/tensor_map.cpp +++ /dev/null @@ -1,42 +0,0 @@ -#include - -namespace container { -// Constructor that creates a tensor with the given data pointer, data type, device type and shape. -TensorMap::TensorMap(void *data, DataType data_type, DeviceType device, const TensorShape &shape) - : Tensor(data_type, device, {}) -{ - this->shape_ = shape; - if(this->buffer_ != nullptr) - { - this->buffer_->unref(); - } - this->buffer_ = new TensorBuffer(data); -} - -TensorMap::TensorMap(void* data, const Tensor& other, const TensorShape &shape) - : Tensor(other.data_type(), other.device_type(), {}) -{ - this->shape_ = shape; - if(this->buffer_ != nullptr) - { - this->buffer_->unref(); - } - this->buffer_ = new TensorBuffer(data); -} - -TensorMap::TensorMap(void *data, const Tensor& other) - : Tensor(other.data_type(), other.device_type(), {}) -{ - this->shape_ = other.shape(); - if(this->buffer_ != nullptr) - { - this->buffer_->unref(); - } - this->buffer_ = new TensorBuffer(data); -} - -//void TensorMap::resize(const TensorShape &new_shape) { -// throw std::logic_error("TensorMap object does not support the resize method."); -//} - -} // namespace container \ No newline at end of file diff --git a/source/module_base/module_container/ATen/core/tensor_map.h b/source/module_base/module_container/ATen/core/tensor_map.h deleted file mode 100644 index 724c0afd51..0000000000 --- a/source/module_base/module_container/ATen/core/tensor_map.h +++ /dev/null @@ -1,65 +0,0 @@ -#ifndef ATEN_CORE_TENSOR_MAP_H_ -#define ATEN_CORE_TENSOR_MAP_H_ - -#include - -#include - -namespace container { - -/** - * @brief A multi-dimensional reference array of elements of a single data type. - * - * This class represents a Tensor, which is a fundamental concept in container. - * A Tensor has a data type, shape, and memory buffer that stores the actual data. - * - * This class is not thread-safe and should not be accessed by multiple threads - * concurrently. - */ - class TensorMap : public Tensor { - public: - - /** - * @brief Constructor that map the given data pointer to a tensor object with the given - * data type, device type and shape. - * - * This tensor does not own memory. - * - * @param data The data pointer. - * @param data_type The data type of the tensor. - * @param device The data type of the tensor. - * @param shape The shape of the tensor. - */ - TensorMap(void *data, DataType data_type, DeviceType device, const TensorShape &shape); - - /** - * @brief Constructs a TensorMap from the provided data, with the specified shape. - * - * This constructor creates a TensorMap that references the data pointed to by the - * 'data' parameter, and associates it with the given Tensor 'other' and TensorShape 'shape'. - * The TensorMap allows access to the data with the specified shape without owning the data. - * - * @param data A pointer to the data to be referenced by the TensorMap. - * @param other The Tensor object to be associated with the TensorMap. - * @param shape The shape of the data referenced by the TensorMap. - */ - TensorMap(void *data, const Tensor& other, const TensorShape& shape); - - /** - * @brief Constructs a TensorMap from the provided data, using the shape of the provided Tensor. - * - * This constructor creates a TensorMap that references the data pointed to by the 'data' parameter, - * and associates it with the given Tensor 'other'. The shape of the data is determined by the shape - * of the 'other' Tensor. The TensorMap allows access to the data with the shape of 'other' without - * owning the data. - * - * @param data A pointer to the data to be referenced by the TensorMap. - * @param other The Tensor object to be associated with the TensorMap, which defines the shape. - */ - TensorMap(void *data, const Tensor& other); - -}; - -} // namespace container - -#endif // ATEN_CORE_TENSOR_MAP_H_ diff --git a/source/module_base/module_container/ATen/core/tensor_shape.cpp b/source/module_base/module_container/ATen/core/tensor_shape.cpp deleted file mode 100644 index 313da1b834..0000000000 --- a/source/module_base/module_container/ATen/core/tensor_shape.cpp +++ /dev/null @@ -1,116 +0,0 @@ -#include - -namespace container { -/** - * @brief Namespace containing constants for default constructor - */ -namespace { - /** - * @brief Default size of a dimension - */ - constexpr int kDefaultDimSize = 0; -} // namespace - -// Default constructor for TensorShape class -// Initializes TensorShape with default dimensions -TensorShape::TensorShape() : dims_(kDefaultDimSize), strides_(1) {} - -// Constructor for TensorShape class -TensorShape::TensorShape(std::initializer_list dims) : dims_(dims), strides_(std::move(get_strides_(dims))) {} - -// Constructor for TensorShape class -TensorShape::TensorShape(const std::vector& dims) : dims_(dims), strides_(std::move(get_strides_(dims))) {} - -// Copy constructor for TensorShape class -TensorShape::TensorShape(const TensorShape& other) { - dims_ = other.dims(); - strides_ = std::move(get_strides_(dims_)); -} - -// Get size of a specific dimension in the tensor -int64_t TensorShape::dim_size(int dim) const { - return dims_[dim]; -} - -// Get all dimension sizes in the tensor -const std::vector& TensorShape::dims() const { - return dims_; -} - -// Get all dimension strides in the tensor -const std::vector& TensorShape::strides() const { - return strides_; -} - -// Get ndim of the tensor, i.e., number of dimensions -unsigned int TensorShape::ndim() const { - return dims_.size(); -} - -// Returns the total number of elements in the shape. -int64_t TensorShape::NumElements() const { - int64_t num_elements = 1; - for (int i = 0; i < this->ndim(); ++i) { - num_elements *= dims_[i]; - } - return this->ndim() ? num_elements : 0; -} - -// Modify size of a specific dimension in the tensor -void TensorShape::set_dim_size(int dim, int64_t size) { - dims_[dim] = size; - strides_ = std::move(get_strides_(dims_)); -} - -// Add a new dimension to the tensor -void TensorShape::add_dim(int64_t size) { - dims_.push_back(size); - strides_ = std::move(get_strides_(dims_)); -} - -// Remove a dimension from the tensor -void TensorShape::remove_dim(int dim) { - if (dim < 0 && dim >= dims_.size()) { - throw std::runtime_error("Invalid axis to remove."); - } - dims_.erase(dims_.begin() + dim); - strides_ = std::move(get_strides_(dims_)); -} - -// Overload the == operator to compare two TensorShape objects -bool TensorShape::operator==(const TensorShape& other) const { - return dims_ == other.dims_; -} - -// Overload the != operator to compare two TensorShape objects -bool TensorShape::operator!=(const TensorShape& other) const { - return dims_ != other.dims_; -} - -std::vector TensorShape::get_strides_(const std::vector& dim) { - std::vector strides{}; - if (dim.empty()) { - return strides; - } - strides.resize(dim.size()); - strides.back() = 1; - for (int ii = dim.size() - 2; ii >= 0; ii--) { - strides[ii] = strides[ii + 1] * dim[ii + 1]; - } - return strides; -} - -// Overload the << operator to print the tensor shape -std::ostream& operator<<(std::ostream& os, const TensorShape& shape) { - os << "["; - for (int i = 0; i < shape.ndim(); ++i) { - os << shape.dims()[i]; - if (i < shape.ndim() - 1) { - os << ","; - } - } - os << "]"; - return os; -} - -} // namespace container \ No newline at end of file diff --git a/source/module_base/module_container/ATen/core/tensor_shape.h b/source/module_base/module_container/ATen/core/tensor_shape.h deleted file mode 100644 index 9085beb7e5..0000000000 --- a/source/module_base/module_container/ATen/core/tensor_shape.h +++ /dev/null @@ -1,126 +0,0 @@ -#ifndef ATEN_CORE_TENSOR_SHAPE_H_ -#define ATEN_CORE_TENSOR_SHAPE_H_ - -#include -#include -#include - -namespace container { - -/** - * @brief A class for representing the shape of a tensor. - */ -class TensorShape { -public: - /** - * @brief Default constructor. - */ - TensorShape(); - - /** - * @brief Constructor with an initializer list of integers. - * @param dims An initializer list of integers representing the dimensions of the tensor. - */ - TensorShape(std::initializer_list dims); - - /** - * @brief Constructor with a vector of integers. - * @param dims A vector of integers representing the dimensions of the tensor. - */ - TensorShape(const std::vector& dims); - - /** - * @brief Copy constructor. - * @param other The TensorShape object to be copied. - */ - TensorShape(const TensorShape& other); - - /** - * @brief Get the size of a dimension in the tensor. - * @param dim The index of the dimension. - * @return The size of the specified dimension. - */ - int64_t dim_size(int dim) const; - - /** - * @brief Get all dimension sizes in the tensor. - * @return A const reference to the vector of dimension sizes. - */ - const std::vector& dims() const; - - const std::vector& strides() const; - - /** - * @brief Get the ndim of the tensor. - * @return The number of dimensions in the tensor. - */ - unsigned int ndim() const; - - /** - * @brief Modify the size of a dimension in the tensor. - * @param dim The index of the dimension to be modified. - * @param size The new size of the dimension. - */ - void set_dim_size(int dim, int64_t size); - - /** - * @brief Add a new dimension to the tensor. - * @param size The size of the new dimension. - */ - void add_dim(int64_t size); - - /** - * @brief Remove a dimension from the tensor. - * @param dim The index of the dimension to be removed. - */ - void remove_dim(int dim); - - /** - * @brief Returns the total number of elements in the shape. - * - * @return int64_t The number of elements. - */ - int64_t NumElements() const; - - /** - * @brief Overload the == operator to compare two TensorShape objects. - * @param other The other TensorShape object to be compared. - * @return True if the two objects have the same dimensions, false otherwise. - */ - bool operator==(const TensorShape& other) const; - - /** - * @brief Overload the != operator to compare two TensorShape objects. - * @param other The other TensorShape object to be compared. - * @return True if the two objects have different dimensions, false otherwise. - */ - bool operator!=(const TensorShape& other) const; - -private: - std::vector dims_ = {}; // Save dimension sizes of the tensor - // Note: strides are not always equals to the dimension sizes. - // The strides specifies the number of elements to step in each dimension when traversing a tensor. - // There could be some sparse region in the tensor, and the strides will be larger than the dimension sizes. - // For example, given a 2D tensor with shape [3, 4], - // and the strides could be [6, 1] if the actual data is stored in a 1D array with size 18 [3, 6]. - // The strides could also be [12, 3] if the actual data is stored in a 1D array with size 36 [3, 12]. - // strides can only be modified by the TensorMap object. - std::vector strides_ = {}; // Save dimension strides of the tensor - - /** - * @brief Compute the strides of the tensor. - */ - std::vector get_strides_(const std::vector& dim); -}; - -/** - * @brief Overload the << operator to print TensorShape objects. - * @param os The output stream to which the tensor shape is printed. - * @param shape The TensorShape object to be printed. - * @return A reference to the output stream. - */ -std::ostream& operator<<(std::ostream& os, const TensorShape& shape); - -} // container - -#endif // ATEN_CORE_TENSOR_SHAPE_H_ diff --git a/source/module_base/module_container/ATen/core/tensor_types.cpp b/source/module_base/module_container/ATen/core/tensor_types.cpp deleted file mode 100644 index a57519c91f..0000000000 --- a/source/module_base/module_container/ATen/core/tensor_types.cpp +++ /dev/null @@ -1,53 +0,0 @@ -#include - -namespace container { - -// Overloaded operator<< for the Tensor class. -// Prints the data type of the enum type DataType. -std::ostream& operator<<(std::ostream& os, const DataType& data_type) { - switch (data_type) { - case DataType::DT_FLOAT: - os << "float"; - break; - case DataType::DT_DOUBLE: - os << "float64"; - break; - case DataType::DT_INT: - os << "int32"; - break; - case DataType::DT_INT64: - os << "int64"; - break; - case DataType::DT_COMPLEX: - os << "complex"; - break; - case DataType::DT_COMPLEX_DOUBLE: - os << "complex"; - break; - default: - os << "unknown"; - break; - } - return os; -} - -// Overloaded operator<< for the Tensor class. -// Prints the memory type of the enum type DeviceType. -std::ostream& operator<<(std::ostream& os, const DeviceType& device_type) { - switch (device_type) { - case DeviceType::CpuDevice: - os << "cpu"; - break; - #if __CUDA || __ROCM - case DeviceType::GpuDevice: - os << "gpu"; - break; - #endif - default: - os << "unknown"; - break; - } - return os; -} - -} // namespace container \ No newline at end of file diff --git a/source/module_base/module_container/ATen/core/tensor_types.h b/source/module_base/module_container/ATen/core/tensor_types.h deleted file mode 100644 index b60080f2ba..0000000000 --- a/source/module_base/module_container/ATen/core/tensor_types.h +++ /dev/null @@ -1,260 +0,0 @@ -/** - * @file tensor_types.h - * @brief This file contains the definition of the DataType enum class. - */ -#ifndef ATEN_CORE_TENSOR_TYPES_H_ -#define ATEN_CORE_TENSOR_TYPES_H_ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "module_base/module_device/types.h" - -#if defined(__CUDACC__) -#include -#elif defined(__HIPCC__) -#include -#endif // defined(__CUDACC__) || defined(__HIPCC__) - -namespace container { - -template -static inline bool element_compare(T& a, T& b) { - if (Accuracy <= 4) { - return (a == b) || (std::norm(a - b) < 1e-7); - } - else if (Accuracy <= 8) { - return (a == b) || (std::norm(a - b) < 1e-15); - } - else { - return (a == b); - } -} - -/** -@brief Enumeration of data types for tensors. -The DataType enum lists the supported data types for tensors. Each data type -is identified by a unique value. The DT_INVALID value is reserved for invalid -data types. -*/ -enum class DataType { - DT_INVALID = 0, ///< Invalid data type */ - DT_FLOAT = 1, ///< Single-precision floating point */ - DT_DOUBLE = 2, ///< Double-precision floating point */ - DT_INT = 3, ///< 32-bit integer */ - DT_INT64 = 4, ///< 64-bit integer */ - DT_COMPLEX = 5, ///< 32-bit complex */ - DT_COMPLEX_DOUBLE = 6, /**< 64-bit complex */ -// ... other data types -}; - -/** - *@struct DEVICE_CPU, DEVICE_GPU - *@brief A tag type for identifying CPU and GPU devices. -*/ -struct DEVICE_CPU; -struct DEVICE_GPU; - -struct DEVICE_CPU {}; -struct DEVICE_GPU {}; -/** - * @brief The type of memory used by an allocator. - */ -enum class DeviceType { - UnKnown = 0, ///< Memory type is unknown. - CpuDevice = 1, ///< Memory type is CPU. - GpuDevice = 2, ///< Memory type is GPU(CUDA or ROCm). -}; - -/** - * @brief Template struct to determine the return type based on the input type. - * - * This struct defines a template class that is used to determine the appropriate return type - * based on the input type. By default, the return type is the same as the input type. - * - * @tparam T The input type for which the return type needs to be determined. - */ -template -struct GetTypeReal { - using type = T; /**< The return type based on the input type. */ -}; - -/** - * @brief Specialization of GetTypeReal for std::complex. - * - * This specialization sets the return type to be float when the input type is std::complex. - */ -template <> -struct GetTypeReal> { - using type = float; /**< The return type specialization for std::complex. */ -}; - -/** - * @brief Specialization of GetTypeReal for std::complex. - * - * This specialization sets the return type to be double when the input type is std::complex. - */ -template <> -struct GetTypeReal> { - using type = double; /**< The return type specialization for std::complex. */ -}; - -template -struct PsiToContainer { - using type = T; /**< The return type based on the input type. */ -}; - -template <> -struct PsiToContainer -{ - using type = container::DEVICE_CPU; /**< The return type specialization for std::complex. */ -}; - -template <> -struct PsiToContainer -{ - using type = container::DEVICE_GPU; /**< The return type specialization for std::complex. */ -}; - -template -struct ContainerToPsi { - using type = T; /**< The return type based on the input type. */ -}; - -template <> -struct ContainerToPsi { - using type = base_device::DEVICE_CPU; /**< The return type specialization for std::complex. */ -}; - -template <> -struct ContainerToPsi { - using type = base_device::DEVICE_GPU; /**< The return type specialization for std::complex. */ -}; - - -/** - * @brief Template struct for mapping a Device Type to its corresponding enum value. - * - * @param T The DataType to map to its enum value. - * - * @return The enumeration value corresponding to the data type. - * This method uses template specialization to map each supported data type to its - * corresponding enumeration value. If the template argument T is not a supported - * data type, this method will cause a compile-time error. - * Example usage: - * DataTypeToEnum::value; // Returns DataType::DT_FLOAT - */ -template -struct DeviceTypeToEnum { - static constexpr DeviceType value = {}; -}; -// Specializations of DeviceTypeToEnum for supported devices. -template <> -struct DeviceTypeToEnum { - static constexpr DeviceType value = DeviceType::CpuDevice; -}; -template <> -struct DeviceTypeToEnum { - static constexpr DeviceType value = DeviceType::GpuDevice; -}; -template <> -struct DeviceTypeToEnum -{ - static constexpr DeviceType value = DeviceType::CpuDevice; -}; -template <> -struct DeviceTypeToEnum -{ - static constexpr DeviceType value = DeviceType::GpuDevice; -}; - -/** - * @brief Template struct for mapping a DataType to its corresponding enum value. - * - * @param T The DataType to map to its enum value. - * - * @return The enumeration value corresponding to the data type. - * This method uses template specialization to map each supported data type to its - * corresponding enumeration value. If the template argument T is not a supported - * data type, this method will cause a compile-time error. - * Example usage: - * DataTypeToEnum::value; // Returns DataType::DT_FLOAT - */ -template -struct DataTypeToEnum { - static constexpr DataType value = {}; -}; -// Specializations of DataTypeToEnum for supported types. -template <> -struct DataTypeToEnum { - static constexpr DataType value = DataType::DT_INT; -}; -template <> -struct DataTypeToEnum { - static constexpr DataType value = DataType::DT_FLOAT; -}; -template <> -struct DataTypeToEnum { - static constexpr DataType value = DataType::DT_DOUBLE; -}; -template <> -struct DataTypeToEnum { - static constexpr DataType value = DataType::DT_INT64; -}; -template <> -struct DataTypeToEnum> { - static constexpr DataType value = DataType::DT_COMPLEX; -}; -template <> -struct DataTypeToEnum> { - static constexpr DataType value = DataType::DT_COMPLEX_DOUBLE; -}; - -#if defined(__CUDACC__) || defined(__HIPCC__) -template <> -struct DataTypeToEnum> { - static constexpr DataType value = DataType::DT_COMPLEX; -}; - -template <> -struct DataTypeToEnum> { - static constexpr DataType value = DataType::DT_COMPLEX_DOUBLE; -}; -#endif // defined(__CUDACC__) || defined(__HIPCC__) - -/** - * @brief Overloaded operator<< for the Tensor class. - * - * Prints the data type of the enum type DataType. - * - * @param os The output stream to write to. - * @param tensor The Tensor object to print. - * - * @return The output stream. - */ -std::ostream& operator<<(std::ostream& os, const DataType& data_type); - -/** - * @brief Overloaded operator<< for the Tensor class. - * - * Prints the memory type of the enum type MemoryType. - * - * @param os The output stream to write to. - * @param tensor The Tensor object to print. - * - * @return The output stream. - */ -std::ostream& operator<<(std::ostream& os, const DeviceType& memory_type); - -} // namespace container -#endif // ATEN_CORE_TENSOR_TYPES_H_ \ No newline at end of file diff --git a/source/module_base/module_container/ATen/core/tensor_utils.h b/source/module_base/module_container/ATen/core/tensor_utils.h deleted file mode 100644 index 115ddfedb7..0000000000 --- a/source/module_base/module_container/ATen/core/tensor_utils.h +++ /dev/null @@ -1,287 +0,0 @@ -#ifndef ATEN_CORE_TENSOR_UTILS_H_ -#define ATEN_CORE_TENSOR_UTILS_H_ - -#include -#include - -namespace container { - -/** - * - * @brief Removes trailing zeros from a string. - * - * This function removes any trailing zeros from a given string. - * - * @param str The string to remove trailing zeros from. - * - * @return A string without trailing zeros. - */ -__inline__ -std::string removeTrailingZeros(std::string str) { - int i = static_cast(str.length()) - 1; - while (i >= 0 && str[i] == '0') { - i--; - } - if (i == -1) { - return "0"; - } - return str.substr(0, i + 1); -} - -/** - * - * @brief Calculates the length of the longest integer and fractional part of an array of numbers. - * - * This function takes an array of numbers and determines the length of the longest integer and fractional part. - * - * @tparam T The type of the array. - * - * @param arr The array of numbers. - * @param size The size of the array. - * @param integer_count The length of the longest integer part. - * @param fraction_count The length of the longest fractional part. - * - * @return The total length of the longest integer and fractional part. - */ - -template -__inline__ -int _get_digit_places( - const T* arr, - int size, - int& integer_count, - int& fraction_count) -{ - integer_count = 0; - fraction_count = 0; - - for (int i = 0; i < size; i++) { - int digits = 0; - if (arr[i] < 0) { - digits = log10(-arr[i]) + 1; - if (digits + 1 > integer_count) { - integer_count = digits + 1; - } - } - else { - digits = log10(arr[i]) + 1; - if (digits > integer_count) { - integer_count = digits; - } - } - - T fraction = arr[i] - std::floor(arr[i]); - if (fraction == 0) { - continue; - } - std::string str = removeTrailingZeros(std::to_string(fraction)); - digits = str.length() - str.find('.'); - if (digits > fraction_count) { - fraction_count = digits; - } - } - - return integer_count + fraction_count; -} - -/** - * - * @brief Overloaded function to calculate the length of the longest integer and fractional part of an array of complex numbers. - * - * This function is an overloaded version of _get_digit_places for an array of complex numbers. - * - * @tparam T The type of the array. - * - * @param arr The array of numbers. - * @param size The size of the array. - * @param integer_count The length of the longest integer part. - * @param fraction_count The length of the longest fractional part. - * - * @return The total length of the longest integer and fractional part. - */ -template -__inline__ -int _get_digit_places( - const std::complex* arr, - int size, - int& integer_count, - int& fraction_count) -{ - return _get_digit_places(reinterpret_cast(arr), size * 2, integer_count, fraction_count); -} - -/** - * - * @brief Output wrapper for a data value with given formatting parameters. - * - * @tparam T The type of data to output. - * - * @param os The output stream to write the data to. - * @param data The data value to output. - * @param digit_width The minimum width for the output. - * @param fraction_count The number of digits to display after the decimal point. - */ -template -__inline__ -void _output_wrapper( - std::ostream& os, - const T data, - const int& digit_width, - const int& fraction_count) -{ - os << std::setw(digit_width) \ - << std::setprecision(fraction_count) << std::fixed << data; -} - -/** - * - * @brief Output wrapper for a complex data value with given formatting parameters. - * - * @tparam T The type of data to output. - * - * @param os The output stream to write the data to. - * @param data The data value to output. - * @param digit_width The minimum width for the output. - * @param fraction_count The number of digits to display after the decimal point. - */ -template -__inline__ -void _output_wrapper( - std::ostream& os, - const std::complex data, - const int& digit_width, - const int& fraction_count) -{ - // Write the real and imaginary parts of the complex value to the output stream - // with the specified formatting. - os << "{"; - os << std::setw(digit_width) \ - << std::setprecision(fraction_count) << std::fixed - << data.real(); - os << ", "; - os << std::setw(digit_width) \ - << std::setprecision(fraction_count) << std::fixed - << data.imag(); - os << "}"; -} - -/** - * - * @brief Output wrapper for an integer data value with given formatting parameters. - * - * @param os The output stream to write the data to. - * @param data The data value to output. - * @param digit_width The minimum width for the output. - * @param fraction_count The number of digits to display after the decimal point. - */ -template <> -__inline__ -void _output_wrapper( - std::ostream& os, - const int data, - const int& digit_width, - const int& fraction_count) -{ - os << std::setw(digit_width - 1) \ - << std::setprecision(fraction_count) << std::fixed << data; -} - -/** - * - * @brief Outputs tensor data to a given output stream. - * - * This function outputs tensor data to the specified output stream. It determines the format of the tensor - * data and prints it accordingly. The format is determined based on the number of dimensions of the tensor. - * - * @tparam T The data type of the tensor. - * - * @param os The output stream to which the tensor data is to be printed. - * @param data A pointer to the tensor data. - * @param shape The shape of the tensor. - * @param num_elements The total number of elements in the tensor. -*/ -template -__inline__ -void _internal_output( - std::ostream& os, - const T * data, - const TensorShape& shape, - const int64_t& num_elements) -{ - int integer_count = 0, fraction_count = 0; - int digit_width = _get_digit_places(data, num_elements, integer_count, fraction_count) + 1; - if (shape.ndim() == 1) { - os << "["; - for (int i = 0; i < num_elements; ++i) { - _output_wrapper(os, data[i], digit_width, fraction_count); - if (i != num_elements - 1) { - os << ","; - } - } - os << "]"; - } - else if (shape.ndim() == 2) { - os << "["; - for (int i = 0; i < shape.dim_size(0); ++i) { - if (i != 0) os << " "; - os << "["; - for (int j = 0; j < shape.dim_size(1); ++j) { - _output_wrapper(os, data[i * shape.dim_size(1) + j], digit_width, fraction_count); - if (j != shape.dim_size(1) - 1) { - os << ", "; - } - } - os << "]"; - if (i != shape.dim_size(0) - 1) os << ",\n"; - } - os << "]"; - } - else if (shape.ndim() == 3) { - os << "["; - for (int i = 0; i < shape.dim_size(0); ++i) { - if (i != 0) os << " "; - os << "["; - for (int j = 0; j < shape.dim_size(1); ++j) { - if (j != 0) os << " "; - os << "["; - for (int k = 0; k < shape.dim_size(2); ++k) { - _output_wrapper(os, data[i * shape.dim_size(1) * shape.dim_size(2) + j * shape.dim_size(2) + k], digit_width, fraction_count); - if (k != shape.dim_size(2) - 1) { - os << ", "; - } - } - os << "]"; - if (j != shape.dim_size(1) - 1) os << ",\n"; - } - os << "]"; - if (i != shape.dim_size(0) - 1) os << ",\n\n"; - } - os << "]"; - } - else { - for (int64_t i = 0; i < num_elements; ++i) { - _output_wrapper(os, data[i], 0, 0); - if (i < num_elements - 1) { - os << ", "; - } - } - } -} - -template -T extract(const container::Tensor& tensor) { - if (tensor.device_type() == DeviceType::CpuDevice) { - return reinterpret_cast(tensor.data())[0]; - } - else { - T result = 0; - TEMPLATE_ALL_2(tensor.data_type(), tensor.device_type(), - kernels::synchronize_memory()( - &result, reinterpret_cast(tensor.data()), 1)) - return result; - } -} - -} // namespace container - -#endif // ATEN_CORE_TENSOR_UTILS_H_ \ No newline at end of file diff --git a/source/module_base/module_container/ATen/kernels/CMakeLists.txt b/source/module_base/module_container/ATen/kernels/CMakeLists.txt deleted file mode 100644 index 92f7a9fccc..0000000000 --- a/source/module_base/module_container/ATen/kernels/CMakeLists.txt +++ /dev/null @@ -1,19 +0,0 @@ -file(GLOB ATen_KERNELS_SRCS "*.cpp") - -if(USE_CUDA) - file(GLOB ATen_KERNELS_CUDA_SRCS "cuda/*.cu") - set(ATen_CUDA_SRCS ${ATen_CUDA_SRCS} ${ATen_KERNELS_CUDA_SRCS} PARENT_SCOPE) -endif() - -if(USE_ROCM) - file(GLOB ATen_KERNELS_ROCM_SRCS "rocm/*.hip.cu") - set(ATen_ROCM_SRCS ${ATen_ROCM_SRCS} ${ATen_KERNELS_ROCM_SRCS} PARENT_SCOPE) -endif() - -set(ATen_CPU_SRCS ${ATen_CPU_SRCS} ${ATen_KERNELS_SRCS} PARENT_SCOPE) - -if(BUILD_TESTING) - if(ENABLE_MPI) - add_subdirectory(test) - endif() -endif() \ No newline at end of file diff --git a/source/module_base/module_container/ATen/kernels/blas.cpp b/source/module_base/module_container/ATen/kernels/blas.cpp deleted file mode 100644 index eb192a7c9e..0000000000 --- a/source/module_base/module_container/ATen/kernels/blas.cpp +++ /dev/null @@ -1,224 +0,0 @@ -#include - -namespace container { -namespace kernels { - -template -struct blas_dot { - void operator()( - const int& n, - const T* x, - const int& incx, - const T* y, - const int& incy, - T* result) - { - *result = BlasConnector::dot(n, x, incx, y, incy); - } -}; - -template -struct blas_scal { - void operator()( - const int& n, - const T* alpha, - T* x, - const int& incx) - { - BlasConnector::scal(n, *alpha, x, incx); - } -}; - -template -struct blas_axpy { - void operator()( - const int& n, - const T* alpha, - const T* x, - const int& incx, - T* y, - const int& incy) - { - BlasConnector::axpy(n, *alpha, x, incx, y, incy); - } -}; - -template -struct blas_gemv { - void operator()( - const char& trans, - const int& m, - const int& n, - const T* alpha, - const T* A, - const int& lda, - const T* x, - const int& incx, - const T* beta, - T* y, - const int& incy) - { - BlasConnector::gemv(trans, m, n, *alpha, A, lda, x, incx, *beta, y, incy); - } -}; - -template -struct blas_gemv_batched { - void operator()( - const char& trans, - const int& m, - const int& n, - const T* alpha, - T** A, - const int& lda, - T** x, - const int& incx, - const T* beta, - T** y, - const int& incy, - const int& batch_size) - { - BlasConnector::gemv_batched(trans, m, n, *alpha, A, lda, x, incx, *beta, y, incy, batch_size); - } -}; - - -template -struct blas_gemv_batched_strided { - void operator()( - const char& trans, - const int& m, - const int& n, - const T* alpha, - const T* A, - const int& lda, - const int64_t& stride_a, - const T* x, - const int& incx, - const int64_t& stride_x, - const T* beta, - T* y, - const int& incy, - const int64_t& stride_y, - const int& batch_size) - { - BlasConnector::gemv_batched_strided(trans, m, n, *alpha, A, lda, stride_a, x, incx, stride_x, *beta, y, incy, stride_y, batch_size); - } -}; - -template -struct blas_gemm { - void operator()( - const char& transa, - const char& transb, - const int& m, - const int& n, - const int& k, - const T* alpha, - const T* A, - const int& lda, - const T* B, - const int& ldb, - const T* beta, - T* C, - const int& ldc) - { - BlasConnector::gemm(transa, transb, m, n, k, *alpha, A, lda, B, ldb, *beta, C, ldc); - } -}; - -template -struct blas_gemm_batched { - void operator()( - const char& transa, - const char& transb, - const int& m, - const int& n, - const int& k, - const T* alpha, - T** A, - const int& lda, - T** B, - const int& ldb, - const T* beta, - T** C, - const int& ldc, - const int& batch_size) - { - BlasConnector::gemm_batched(transa, transb, m, n, k, *alpha, A, lda, B, ldb, *beta, C, ldc, batch_size); - } -}; - -template -struct blas_gemm_batched_strided { - void operator()( - const char& transa, - const char& transb, - const int& m, - const int& n, - const int& k, - const T* alpha, - const T* A, - const int& lda, - const int& stride_a, - const T* B, - const int& ldb, - const int& stride_b, - const T* beta, - T* C, - const int& ldc, - const int& stride_c, - const int& batch_size) - { - BlasConnector::gemm_batched_strided(transa, transb, m, n, k, *alpha, A, lda, stride_a, B, ldb, stride_b, *beta, C, ldc, stride_c, batch_size); - } -}; - -// Explicitly instantiate functors for the types of functor registered. -template struct blas_dot; -template struct blas_dot; -template struct blas_dot, DEVICE_CPU>; -template struct blas_dot, DEVICE_CPU>; - -template struct blas_scal; -template struct blas_scal; -template struct blas_scal, DEVICE_CPU>; -template struct blas_scal, DEVICE_CPU>; - -template struct blas_axpy; -template struct blas_axpy; -template struct blas_axpy, DEVICE_CPU>; -template struct blas_axpy, DEVICE_CPU>; - -template struct blas_gemv; -template struct blas_gemv; -template struct blas_gemv, DEVICE_CPU>; -template struct blas_gemv, DEVICE_CPU>; - -template struct blas_gemv_batched; -template struct blas_gemv_batched; -template struct blas_gemv_batched, DEVICE_CPU>; -template struct blas_gemv_batched, DEVICE_CPU>; - -template struct blas_gemv_batched_strided; -template struct blas_gemv_batched_strided; -template struct blas_gemv_batched_strided, DEVICE_CPU>; -template struct blas_gemv_batched_strided, DEVICE_CPU>; - -template struct blas_gemm; -template struct blas_gemm; -template struct blas_gemm, DEVICE_CPU>; -template struct blas_gemm, DEVICE_CPU>; - -template struct blas_gemm_batched; -template struct blas_gemm_batched; -template struct blas_gemm_batched, DEVICE_CPU>; -template struct blas_gemm_batched, DEVICE_CPU>; - -template struct blas_gemm_batched_strided; -template struct blas_gemm_batched_strided; -template struct blas_gemm_batched_strided, DEVICE_CPU>; -template struct blas_gemm_batched_strided, DEVICE_CPU>; - -} // namespace kernels -} // namespace container \ No newline at end of file diff --git a/source/module_base/module_container/ATen/kernels/blas.h b/source/module_base/module_container/ATen/kernels/blas.h deleted file mode 100644 index 201021199c..0000000000 --- a/source/module_base/module_container/ATen/kernels/blas.h +++ /dev/null @@ -1,171 +0,0 @@ -#ifndef ATEN_KERNELS_BLAS_H_ -#define ATEN_KERNELS_BLAS_H_ - -#include -#include - -#include - -namespace container { -namespace kernels { - -template -struct blas_dot { - void operator()( - const int& n, - const T* x, - const int& incx, - const T* y, - const int& incy, - T* result); -}; - - -template -struct blas_scal { - void operator()( - const int& n, - const T* alpha, - T* x, - const int& incx); -}; - - -template -struct blas_axpy { - void operator()( - const int& n, - const T* alpha, - const T* x, - const int& incx, - T* y, - const int& incy); -}; - - -template -struct blas_gemv { - void operator()( - const char& trans, - const int& m, - const int& n, - const T* alpha, - const T* A, - const int& lda, - const T* x, - const int& incx, - const T* beta, - T* y, - const int& incy); -}; - - -template -struct blas_gemv_batched { - void operator()( - const char& trans, - const int& m, - const int& n, - const T* alpha, - T** A, - const int& lda, - T** x, - const int& incx, - const T* beta, - T** y, - const int& incy, - const int& batch_size); -}; - - -template -struct blas_gemv_batched_strided { - void operator()( - const char& trans, - const int& m, - const int& n, - const T* alpha, - const T* A, - const int& lda, - const int64_t& stride_a, - const T* x, - const int& incx, - const int64_t& stride_x, - const T* beta, - T* y, - const int& incy, - const int64_t& stride_y, - const int& batch_size); -}; - - -template -struct blas_gemm { - void operator()( - const char& transa, - const char& transb, - const int& m, - const int& n, - const int& k, - const T* alpha, - const T* A, - const int& lda, - const T* B, - const int& ldb, - const T* beta, - T* C, - const int& ldc); -}; - - -template -struct blas_gemm_batched { - void operator()( - const char& transa, - const char& transb, - const int& m, - const int& n, - const int& k, - const T* alpha, - T** A, - const int& lda, - T** B, - const int& ldb, - const T* beta, - T** C, - const int& ldc, - const int& batch_size); -}; - - -template -struct blas_gemm_batched_strided { - void operator()( - const char& transa, - const char& transb, - const int& m, - const int& n, - const int& k, - const T* alpha, - const T* A, - const int& lda, - const int& stride_a, - const T* B, - const int& ldb, - const int& stride_b, - const T* beta, - T* C, - const int& ldc, - const int& stride_c, - const int& batch_size); -}; - -#if __CUDA || __ROCM -void createGpuBlasHandle(); // create blas handle -void destroyGpuBlasHandle(); // destory blas handle -#endif // __CUDA || __UT_USE_CUDA - -} // namespace kernels -} // namespace container - -#endif // ATEN_KERNELS_BLAS_H_ \ No newline at end of file diff --git a/source/module_base/module_container/ATen/kernels/cuda/blas.cu b/source/module_base/module_container/ATen/kernels/cuda/blas.cu deleted file mode 100644 index 8d4b5ea227..0000000000 --- a/source/module_base/module_container/ATen/kernels/cuda/blas.cu +++ /dev/null @@ -1,245 +0,0 @@ -#include -#include - -#include -#include - -namespace container { -namespace kernels { - -static cublasHandle_t cublas_handle = nullptr; - -void createGpuBlasHandle() { - if (cublas_handle == nullptr) { - cublasErrcheck(cublasCreate(&cublas_handle)); - } -} - -void destroyGpuBlasHandle() { - if (cublas_handle != nullptr) { - cublasErrcheck(cublasDestroy(cublas_handle)); - cublas_handle = nullptr; - } -} - - -template -struct blas_dot { - void operator()( - const int& n, - const T* x, - const int& incx, - const T* y, - const int& incy, - T* result) - { - cuBlasConnector::dot(cublas_handle, n, x, incx, y, incy, result); - } -}; - -template -struct blas_scal { - void operator()( - const int& n, - const T* alpha, - T* x, - const int& incx) - { - cuBlasConnector::scal(cublas_handle, n, *alpha, x, incx); - } -}; - -template -struct blas_axpy { - void operator()( - const int& n, - const T* alpha, - const T* x, - const int& incx, - T* y, - const int& incy) - { - cuBlasConnector::axpy(cublas_handle, n, *alpha, x, incx, y, incy); - } -}; - -template -struct blas_gemv { - void operator()( - const char& trans, - const int& m, - const int& n, - const T* alpha, - const T* A, - const int& lda, - const T* x, - const int& incx, - const T* beta, - T* y, - const int& incy) - { - cuBlasConnector::gemv(cublas_handle, trans, m, n, *alpha, A, lda, x, incx, *beta, y, incy); - } -}; - - -template -struct blas_gemv_batched { - void operator()( - const char& trans, - const int& m, - const int& n, - const T* alpha, - T** A, - const int& lda, - T** x, - const int& incx, - const T* beta, - T** y, - const int& incy, - const int& batch_size) - { - cuBlasConnector::gemv_batched(cublas_handle, trans, m, n, *alpha, A, lda, x, incx, *beta, y, incy, batch_size); - } -}; - - -template -struct blas_gemv_batched_strided { - void operator()( - const char& trans, - const int& m, - const int& n, - const T* alpha, - const T* A, - const int& lda, - const int64_t& stride_a, - const T* x, - const int& incx, - const int64_t& stride_x, - const T* beta, - T* y, - const int& incy, - const int64_t& stride_y, - const int& batch_size) - { - cuBlasConnector::gemv_batched_strided(cublas_handle, trans, m, n, *alpha, A, lda, stride_a, x, incx, stride_x, *beta, y, incy, stride_y, batch_size); - } -}; - -template -struct blas_gemm { - void operator()( - const char& transa, - const char& transb, - const int& m, - const int& n, - const int& k, - const T* alpha, - const T* A, - const int& lda, - const T* B, - const int& ldb, - const T* beta, - T* C, - const int& ldc) - { - cuBlasConnector::gemm(cublas_handle, transa, transb, m, n, k, *alpha, A, lda, B, ldb, *beta, C, ldc); - } -}; - -template -struct blas_gemm_batched { - void operator()( - const char& transa, - const char& transb, - const int& m, - const int& n, - const int& k, - const T* alpha, - T** A, - const int& lda, - T** B, - const int& ldb, - const T* beta, - T** C, - const int& ldc, - const int& batch_size) - { - cuBlasConnector::gemm_batched(cublas_handle, transa, transb, m, n, k, *alpha, A, lda, B, ldb, *beta, C, ldc, batch_size); - } -}; - -template -struct blas_gemm_batched_strided { - void operator()( - const char& transa, - const char& transb, - const int& m, - const int& n, - const int& k, - const T* alpha, - const T* A, - const int& lda, - const int& stride_a, - const T* B, - const int& ldb, - const int& stride_b, - const T* beta, - T* C, - const int& ldc, - const int& stride_c, - const int& batch_size) - { - cuBlasConnector::gemm_batched_strided(cublas_handle, transa, transb, m, n, k, *alpha, A, lda, stride_a, B, ldb, stride_b, *beta, C, ldc, stride_c, batch_size); - } -}; - -// Explicitly instantiate functors for the types of functor registered. -template struct blas_dot; -template struct blas_dot; -template struct blas_dot , DEVICE_GPU>; -template struct blas_dot, DEVICE_GPU>; - -template struct blas_scal; -template struct blas_scal; -template struct blas_scal , DEVICE_GPU>; -template struct blas_scal, DEVICE_GPU>; - -template struct blas_axpy; -template struct blas_axpy; -template struct blas_axpy , DEVICE_GPU>; -template struct blas_axpy, DEVICE_GPU>; - -template struct blas_gemv; -template struct blas_gemv; -template struct blas_gemv, DEVICE_GPU>; -template struct blas_gemv, DEVICE_GPU>; - -template struct blas_gemv_batched; -template struct blas_gemv_batched; -template struct blas_gemv_batched, DEVICE_GPU>; -template struct blas_gemv_batched, DEVICE_GPU>; - -template struct blas_gemv_batched_strided; -template struct blas_gemv_batched_strided; -template struct blas_gemv_batched_strided, DEVICE_GPU>; -template struct blas_gemv_batched_strided, DEVICE_GPU>; - -template struct blas_gemm; -template struct blas_gemm; -template struct blas_gemm, DEVICE_GPU>; -template struct blas_gemm, DEVICE_GPU>; - -template struct blas_gemm_batched; -template struct blas_gemm_batched; -template struct blas_gemm_batched, DEVICE_GPU>; -template struct blas_gemm_batched, DEVICE_GPU>; - -template struct blas_gemm_batched_strided; -template struct blas_gemm_batched_strided; -template struct blas_gemm_batched_strided, DEVICE_GPU>; -template struct blas_gemm_batched_strided, DEVICE_GPU>; - -} // namespace kernels -} // namespace container \ No newline at end of file diff --git a/source/module_base/module_container/ATen/kernels/cuda/lapack.cu b/source/module_base/module_container/ATen/kernels/cuda/lapack.cu deleted file mode 100644 index 6300df953f..0000000000 --- a/source/module_base/module_container/ATen/kernels/cuda/lapack.cu +++ /dev/null @@ -1,204 +0,0 @@ -#include -#include - -#include -#include -#include -#include - -namespace container { -namespace kernels { - - -static cusolverDnHandle_t cusolver_handle = nullptr; - -void createGpuSolverHandle() { - if (cusolver_handle == nullptr) { - cusolverErrcheck(cusolverDnCreate(&cusolver_handle)); - } -} - -void destroyGpuSolverHandle() { - if (cusolver_handle != nullptr) { - cusolverErrcheck(cusolverDnDestroy(cusolver_handle)); - cusolver_handle = nullptr; - } -} - -template -__global__ void set_matrix_kernel( - const char uplo, - T* A, - const int dim) -{ - int bid = blockIdx.x; - int tid = threadIdx.x; - - for (int ii = tid; ii < bid + 1; ii += THREADS_PER_BLOCK) { - if (uplo == 'L') { - A[ii * dim + bid + 1] = static_cast(0); - } - else { - A[(bid + 1) * dim + ii] = static_cast(0); - } - } -} - -template -struct set_matrix { - using Type = typename GetTypeThrust::type; - void operator() ( - const char& uplo, - T* A, - const int& dim) - { - set_matrix_kernel<<>>( - uplo, reinterpret_cast(A), dim); - - cudaCheckOnDebug(); - } -}; - -template -struct lapack_trtri { - void operator()( - const char& uplo, - const char& diag, - const int& dim, - T* Mat, - const int& lda) - { - // TODO: trtri is not implemented in this method yet - // Cause the trtri in cuSolver is not stable for ABACUS! - //cuSolverConnector::trtri(cusolver_handle, uplo, diag, dim, Mat, lda); - cuSolverConnector::potri(cusolver_handle, uplo, diag, dim, Mat, lda); - } -}; - -template -struct lapack_potrf { - void operator()( - const char& uplo, - const int& dim, - T* Mat, - const int& lda) - { - cuSolverConnector::potrf(cusolver_handle, uplo, dim, Mat, dim); - } -}; - -template -struct lapack_dnevd { - using Real = typename GetTypeReal::type; - void operator()( - const char& jobz, - const char& uplo, - T* Mat, - const int& dim, - Real* eigen_val) - { - cuSolverConnector::dnevd(cusolver_handle, jobz, uplo, dim, Mat, dim, eigen_val); - } -}; - -template -struct lapack_dngvd { - using Real = typename GetTypeReal::type; - void operator()( - const int& itype, - const char& jobz, - const char& uplo, - T* Mat_A, - T* Mat_B, - const int& dim, - Real* eigen_val) - { - cuSolverConnector::dngvd(cusolver_handle, itype, jobz, uplo, dim, Mat_A, dim, Mat_B, dim, eigen_val); - } -}; - -template -struct lapack_getrf { - void operator()( - const int& m, - const int& n, - T* Mat, - const int& lda, - int* ipiv) - { - cuSolverConnector::getrf(cusolver_handle, m, n, Mat, lda, ipiv); - } -}; - -template -struct lapack_getri { - void operator()( - const int& n, - T* Mat, - const int& lda, - const int* ipiv, - T* work, - const int& lwork) - { - throw std::runtime_error("cuSOLVER does not provide LU-based matrix inversion interface (getri). To compute the inverse on GPU, use getrs instead."); - } -}; - -template -struct lapack_getrs { - void operator()( - const char& trans, - const int& n, - const int& nrhs, - T* A, - const int& lda, - const int* ipiv, - T* B, - const int& ldb) - { - cuSolverConnector::getrs(cusolver_handle, trans, n, nrhs, A, lda, ipiv, B, ldb); - } -}; - -template struct set_matrix; -template struct set_matrix; -template struct set_matrix, DEVICE_GPU>; -template struct set_matrix, DEVICE_GPU>; - -template struct lapack_trtri; -template struct lapack_trtri; -template struct lapack_trtri, DEVICE_GPU>; -template struct lapack_trtri, DEVICE_GPU>; - -template struct lapack_potrf; -template struct lapack_potrf; -template struct lapack_potrf, DEVICE_GPU>; -template struct lapack_potrf, DEVICE_GPU>; - -template struct lapack_dnevd; -template struct lapack_dnevd; -template struct lapack_dnevd, DEVICE_GPU>; -template struct lapack_dnevd, DEVICE_GPU>; - -template struct lapack_dngvd; -template struct lapack_dngvd; -template struct lapack_dngvd, DEVICE_GPU>; -template struct lapack_dngvd, DEVICE_GPU>; - -template struct lapack_getrf; -template struct lapack_getrf; -template struct lapack_getrf, DEVICE_GPU>; -template struct lapack_getrf, DEVICE_GPU>; - -template struct lapack_getri; -template struct lapack_getri; -template struct lapack_getri, DEVICE_GPU>; -template struct lapack_getri, DEVICE_GPU>; - -template struct lapack_getrs; -template struct lapack_getrs; -template struct lapack_getrs, DEVICE_GPU>; -template struct lapack_getrs, DEVICE_GPU>; - -} // namespace kernels -} // namespace container \ No newline at end of file diff --git a/source/module_base/module_container/ATen/kernels/cuda/linalg.cu b/source/module_base/module_container/ATen/kernels/cuda/linalg.cu deleted file mode 100644 index 04c465cfdc..0000000000 --- a/source/module_base/module_container/ATen/kernels/cuda/linalg.cu +++ /dev/null @@ -1,495 +0,0 @@ -#include -#include -#include -#include - -#include -#include - -namespace container { -namespace kernels { - -template -__device__ static inline -T conj(T& in) { - return in; -} - -template -__device__ static inline -thrust::complex conj(thrust::complex& in) { - return thrust::conj(in); -} - -template -__global__ void do_add_kernel( - const int num_element, - const T alpha, - const T* x, - const T beta, - const T* y, - T* z) -{ - // Perform add operation for the specified range [begin, end) in the output Tensor. - for (int o_idx = threadIdx.x; o_idx < num_element; o_idx += blockDim.x) { - // Assign the sum of the input Tensor elements at index 'o_idx' to the output Tensor element at index 'o_idx'. - z[o_idx] = alpha * x[o_idx] + beta * y[o_idx]; - } -} - -template -__global__ void do_mul_kernel( - const int num_element, - const T alpha, - const T* x, - T* y) -{ - for (int o_idx = threadIdx.x; o_idx < num_element; o_idx += blockDim.x) { - // Assign the sum of the input Tensor elements at index 'o_idx' to the output Tensor element at index 'o_idx'. - y[o_idx] = alpha * x[o_idx]; - } -} - -template -__global__ void do_mul_kernel( - const int num_element, - const T alpha, - const T* x, - const T* y, - T* z) -{ - for (int o_idx = threadIdx.x; o_idx < num_element; o_idx += blockDim.x) { - // Assign the sum of the input Tensor elements at index 'o_idx' to the output Tensor element at index 'o_idx'. - z[o_idx] = alpha * x[o_idx] * y[o_idx]; - } -} - -template -__global__ void do_div_kernel( - const int num_element, - const T alpha, - const T* x, - const T* y, - T* z) -{ - for (int o_idx = threadIdx.x; o_idx < num_element; o_idx += blockDim.x) { - // Assign the sum of the input Tensor elements at index 'o_idx' to the output Tensor element at index 'o_idx'. - z[o_idx] = alpha * x[o_idx] / y[o_idx]; - } -} - -template -__global__ void do_fma_kernel( - const int num_element, - const T alpha, - const T* x, - const T* y, - const T beta, - const T* z, - T* out) -{ - for (int o_idx = threadIdx.x; o_idx < num_element; o_idx += blockDim.x) { - // Assign the sum of the input Tensor elements at index 'o_idx' to the output Tensor element at index 'o_idx'. - out[o_idx] = alpha * x[o_idx] * y[o_idx] + beta * z[o_idx]; - } -} - -template -__global__ void do_transpose_kernel( - int ndim, - int64_t num_elements, - const T* p, - const int* perm, - const int64_t* in_strides, - const int64_t* out_strides, - T* q) -{ - for (int64_t o_idx = 0; o_idx < num_elements; o_idx++) { - int64_t i_idx = 0; // Initialize the index for the input Tensor element. - int64_t current_o_idx = o_idx; // Calculate the index for the output Tensor element. - - // Iterate over each dimension of the output Tensor. - for (int ii = 0; ii < ndim; ++ii) { - // Calculate the ratio of the current output Tensor index 'current_o_idx' in the current dimension. - const int64_t ratio = current_o_idx / out_strides[ii]; - // Update the output Tensor index 'current_o_idx' by removing the offset in the current dimension. - current_o_idx -= ratio * out_strides[ii]; - // Calculate the offset for the corresponding index position in the input Tensor and accumulate it in 'i_idx'. - i_idx += ratio * in_strides[perm[ii]]; - } - // Check if conjugation is needed. - if (Conjugate) { - // Assign the conjugate value of the input Tensor element at index 'i_idx' to the output Tensor element at index 'o_idx'. - q[o_idx] = kernels::conj(p[i_idx]); - } else { - // Assign the input Tensor element at index 'i_idx' to the output Tensor element at index 'o_idx'. - q[o_idx] = p[i_idx]; - } - } -} - -template -__global__ void do_stride_kernel( - int ndim, - int64_t size, - const T* p, - const int64_t* stride, - const int64_t* in_strides, - const int64_t* out_strides, - T* q) -{ - // Perform stride operation for the specified range [begin, end) in the output Tensor. - for (int64_t o_idx = threadIdx.x; o_idx < size; o_idx += blockDim.x) { - int64_t i_idx = 0; // Initialize the index for the input Tensor element. - int64_t current_o_idx = o_idx; // Calculate the index for the output Tensor element. - // Iterate over each dimension of the output Tensor. - for (int ii = 0; ii < ndim; ++ii) { - // Calculate the index in the current dimension. - // It is natural to view a tensor as a multi-dimentional array. - const int64_t current_dim_idx = current_o_idx / out_strides[ii]; - // Update the output Tensor index 'current_o_idx' by removing the offset in the current dimension. - current_o_idx -= current_dim_idx * out_strides[ii]; - // Calculate the offset for the corresponding index position in the input Tensor and accumulate it in 'i_idx'. - i_idx += current_dim_idx * stride[ii] * in_strides[ii]; - } - // Assign the input Tensor element at index 'i_idx' to the output Tensor element at index 'o_idx'. - q[o_idx] = p[i_idx]; - } -} - -template -__global__ void do_inflate_kernel( - int ndim, - int64_t size, - const T* p, - const int64_t* stride, - const int64_t* in_strides, - const int64_t* out_strides, - T* q) -{ - // Perform stride operation for the specified range [begin, end) in the output Tensor. - for (int64_t o_idx = threadIdx.x; o_idx < size; o_idx += blockDim.x) { - int64_t i_idx = 0; // Initialize the index for the input Tensor element. - int64_t current_o_idx = o_idx; // Calculate the index for the output Tensor element. - bool valid = true; - // Iterate over each dimension of the output Tensor. - for (int ii = 0; ii < ndim; ++ii) { - // Calculte the ratio of the current output Tensor index 'current_o_idx' in the current dimension. - const int64_t current_dim_idx = current_o_idx / out_strides[ii]; - // Update the output Tensor index 'current_o_idx' by removing the offset in the current dimension. - current_o_idx -= current_dim_idx * out_strides[ii]; - // Calculate the offset for the corresponding index position in the input Tensor and accumulate it in 'i_idx'. - if (current_dim_idx % stride[ii] == 0) { - i_idx += (current_dim_idx / stride[ii]) * in_strides[ii]; - } - else { - valid = false; - break; - } - } - // Assign the input Tensor element at index 'i_idx' to the output Tensor element at index 'o_idx'. - q[o_idx] = p[i_idx] * static_cast(valid ? 1.0 : 0.0); - } -} - -template -__global__ void do_reduce_kernel( - int64_t size, - int64_t inner_most_dim, - const T* p, - T* q) -{ - for (int64_t o_idx = threadIdx.x; o_idx < size; o_idx += blockDim.x) { - T sum = 0; - for (int64_t i_idx = o_idx * inner_most_dim; i_idx < inner_most_dim + o_idx * inner_most_dim; i_idx++) { - sum += p[i_idx]; - } - q[o_idx] = sum; - } -} - -template -static std::vector compute_stride(const std::vector& shape) { - int ndims = shape.size(); - std::vector strides(ndims); - T stride = 1; - - auto it = shape.end(); // Start from the last element - for (int ii = ndims - 1; ii >= 0; ii--) { - it--; - strides[ii] = stride; - stride *= static_cast(*it); - } - return std::move(strides); -} - -template -void add::operator()(const int& num_element, const T& alpha, const T* x, const T& beta, const T* y, T* z) { - using Type = typename GetTypeThrust::type; - auto alpha_ = *reinterpret_cast(&alpha); - auto beta_ = *reinterpret_cast(&beta); - const int block = (num_element + THREADS_PER_BLOCK - 1) / THREADS_PER_BLOCK; - do_add_kernel<<>> ( - num_element, alpha_, reinterpret_cast(x), - beta_, reinterpret_cast(y), reinterpret_cast(z)); - - cudaCheckOnDebug(); -} - -template -void mul::operator()(const int& num_element, const T& alpha, const T* x, T* y) { - using Type = typename GetTypeThrust::type; - auto alpha_ = *reinterpret_cast(&alpha); - const int block = (num_element + THREADS_PER_BLOCK - 1) / THREADS_PER_BLOCK; - do_mul_kernel<<>> ( - num_element, alpha_, - reinterpret_cast(x), reinterpret_cast(y)); - - cudaCheckOnDebug(); -} - -template -void mul::operator()(const int& num_element, const T& alpha, const T* x, const T* y, T* z) { - using Type = typename GetTypeThrust::type; - auto alpha_ = *reinterpret_cast(&alpha); - const int block = (num_element + THREADS_PER_BLOCK - 1) / THREADS_PER_BLOCK; - do_mul_kernel<<>> ( - num_element, alpha_, - reinterpret_cast(x), reinterpret_cast(y), reinterpret_cast(z)); - - cudaCheckOnDebug(); -} - -template -void div::operator()(const int& num_element, const T& alpha, const T* x, const T* y, T* z) { - using Type = typename GetTypeThrust::type; - auto alpha_ = *reinterpret_cast(&alpha); - const int block = (num_element + THREADS_PER_BLOCK - 1) / THREADS_PER_BLOCK; - do_div_kernel<<>> ( - num_element, alpha_, reinterpret_cast(x), reinterpret_cast(y), reinterpret_cast(z)); - - cudaCheckOnDebug(); -} - -template -void fma::operator()(const int& num_element, const T& alpha, const T* x, const T* y, const T& beta, const T* z, T* out) { - using Type = typename GetTypeThrust::type; - auto alpha_ = *reinterpret_cast(&alpha); - auto beta_ = *reinterpret_cast(&beta); - const int block = (num_element + THREADS_PER_BLOCK - 1) / THREADS_PER_BLOCK; - do_fma_kernel<<>> ( - num_element, alpha_, reinterpret_cast(x), reinterpret_cast(y), - beta_, reinterpret_cast(z), reinterpret_cast(out)); - - cudaCheckOnDebug(); -} - -template -void transpose::operator()( - const std::vector &perm, - const std::vector &p_shape, - const std::vector &q_shape, - const T *p, - T *q) -{ - using Type = typename GetTypeThrust::type; - - REQUIRES_OK(p_shape.size() == q_shape.size(), - "transpose: p and q must have the same number of dimensions"); - const int ndim = static_cast(p_shape.size()); - auto in_strides = compute_stride(p_shape); - auto out_strides = compute_stride(q_shape); - - int num_elements = 1; - for (int ii = 0; ii < ndim; ++ii) { - num_elements *= static_cast(q_shape[ii]); - } - num_elements = ndim ? num_elements : 0; - - Tensor t_perm(DataType::DT_INT, DeviceType::GpuDevice, {ndim}); - Tensor t_in_strides(DataType::DT_INT64, DeviceType::GpuDevice, {ndim}); - Tensor t_out_strides(DataType::DT_INT64, DeviceType::GpuDevice, {ndim}); - - kernels::synchronize_memory()( - t_perm.data(), perm.data(), perm.size()); - kernels::synchronize_memory()( - t_in_strides.data(), in_strides.data(), in_strides.size()); - kernels::synchronize_memory()( - t_out_strides.data(), out_strides.data(), out_strides.size()); - - const Type* p_ = reinterpret_cast(p); - Type* q_ = reinterpret_cast((q)); - - const int block = (num_elements + THREADS_PER_BLOCK - 1) / THREADS_PER_BLOCK; - do_transpose_kernel<<>> ( - ndim, num_elements, p_, t_perm.data(), - t_in_strides.data(), t_out_strides.data(), q_); - - cudaCheckOnDebug(); -} - -template -void stride::operator()( - const std::vector &stride, - const std::vector &p_shape, - const std::vector &q_shape, - const T *p, - T *q) -{ - using Type = typename GetTypeThrust::type; - - REQUIRES_OK(p_shape.size() == q_shape.size(), - "transpose: p and q must have the same number of dimensions"); - const int ndim = static_cast(p_shape.size()); - auto in_strides = compute_stride(p_shape); - auto out_strides = compute_stride(q_shape); - - int num_elements = 1; - for (int ii = 0; ii < ndim; ++ii) { - num_elements *= static_cast(q_shape[ii]); - } - num_elements = ndim ? num_elements : 0; - - Tensor t_stride(DataType::DT_INT64, DeviceType::GpuDevice, {ndim}); - Tensor t_in_strides(DataType::DT_INT64, DeviceType::GpuDevice, {ndim}); - Tensor t_out_strides(DataType::DT_INT64, DeviceType::GpuDevice, {ndim}); - - kernels::synchronize_memory()( - t_stride.data(), stride.data(), stride.size()); - kernels::synchronize_memory()( - t_in_strides.data(), in_strides.data(), in_strides.size()); - kernels::synchronize_memory()( - t_out_strides.data(), out_strides.data(), out_strides.size()); - - const Type* p_ = reinterpret_cast(p); - Type* q_ = reinterpret_cast((q)); - - const int block = (num_elements + THREADS_PER_BLOCK - 1) / THREADS_PER_BLOCK; - do_stride_kernel<<>> ( - ndim, num_elements, p_, t_stride.data(), t_in_strides.data(), t_out_strides.data(), q_); - - cudaCheckOnDebug(); -} - - -template -void inflate::operator()( - const std::vector &inflate, - const std::vector &p_shape, - const std::vector &q_shape, - const T *p, - T *q) -{ - using Type = typename GetTypeThrust::type; - - REQUIRES_OK(p_shape.size() == q_shape.size(), - "transpose: p and q must have the same number of dimensions"); - const int ndim = static_cast(p_shape.size()); - auto in_strides = compute_stride(p_shape); - auto out_strides = compute_stride(q_shape); - - int num_elements = 1; - for (int ii = 0; ii < ndim; ++ii) { - num_elements *= static_cast(q_shape[ii]); - } - num_elements = ndim ? num_elements : 0; - - Tensor t_stride(DataType::DT_INT64, DeviceType::GpuDevice, {ndim}); - Tensor t_in_strides(DataType::DT_INT64, DeviceType::GpuDevice, {ndim}); - Tensor t_out_strides(DataType::DT_INT64, DeviceType::GpuDevice, {ndim}); - - kernels::synchronize_memory()( - t_stride.data(), inflate.data(), inflate.size()); - kernels::synchronize_memory()( - t_in_strides.data(), in_strides.data(), in_strides.size()); - kernels::synchronize_memory()( - t_out_strides.data(), out_strides.data(), out_strides.size()); - - const Type* p_ = reinterpret_cast(p); - Type* q_ = reinterpret_cast((q)); - - const int block = (num_elements + THREADS_PER_BLOCK - 1) / THREADS_PER_BLOCK; - do_inflate_kernel<<>> ( - ndim, num_elements, p_, t_stride.data(), t_in_strides.data(), t_out_strides.data(), q_); - - cudaCheckOnDebug(); -} - - -template -void reduce::operator()( - const int64_t &num_element, - const int64_t &inner_most_dim, - const T *p, - T *q) -{ - using Type = typename GetTypeThrust::type; - - const Type* p_ = reinterpret_cast(p); - Type* q_ = reinterpret_cast((q)); - - const int block = (static_cast(num_element) + THREADS_PER_BLOCK - 1) / THREADS_PER_BLOCK; - do_reduce_kernel<<>> ( - num_element, inner_most_dim, p_, q_); - - cudaCheckOnDebug(); -} - -template struct add; -template struct add; -template struct add; -template struct add; -template struct add, DEVICE_GPU>; -template struct add, DEVICE_GPU>; - -template struct mul; -template struct mul; -template struct mul; -template struct mul; -template struct mul, DEVICE_GPU>; -template struct mul, DEVICE_GPU>; - -template struct div; -template struct div; -template struct div; -template struct div; -template struct div, DEVICE_GPU>; -template struct div, DEVICE_GPU>; - -template struct fma; -template struct fma; -template struct fma; -template struct fma; -template struct fma, DEVICE_GPU>; -template struct fma, DEVICE_GPU>; - -template struct transpose; -template struct transpose; -template struct transpose; -template struct transpose; -template struct transpose, DEVICE_GPU>; -template struct transpose, DEVICE_GPU>; - -template struct stride; -template struct stride; -template struct stride; -template struct stride; -template struct stride, DEVICE_GPU>; -template struct stride, DEVICE_GPU>; - -template struct inflate; -template struct inflate; -template struct inflate; -template struct inflate; -template struct inflate, DEVICE_GPU>; -template struct inflate, DEVICE_GPU>; - -template struct reduce; -template struct reduce; -template struct reduce; -template struct reduce; -template struct reduce, DEVICE_GPU>; -template struct reduce, DEVICE_GPU>; - -} // namespace kernels -} // namespace container \ No newline at end of file diff --git a/source/module_base/module_container/ATen/kernels/cuda/memory.cu b/source/module_base/module_container/ATen/kernels/cuda/memory.cu deleted file mode 100644 index c858984be4..0000000000 --- a/source/module_base/module_container/ATen/kernels/cuda/memory.cu +++ /dev/null @@ -1,223 +0,0 @@ -#include -#include - -#include -#include - -namespace container { -namespace kernels { - -template -__global__ void do_set_memory( - T* out, - const T var, - const size_t size) -{ - unsigned int idx = blockIdx.x * blockDim.x + threadIdx.x; - if(idx >= size) {return;} - out[idx] = var; -} - -template -__global__ void do_cast_memory( - T_out* out, - const T_in* in, - const int size) -{ - unsigned int idx = blockIdx.x * blockDim.x + threadIdx.x; - if(idx >= size) {return;} - out[idx] = static_cast(in[idx]); -} - -template -__global__ void do_cast_memory( - std::complex* out, - const std::complex* in, - const int size) -{ - unsigned int idx = blockIdx.x * blockDim.x + threadIdx.x; - if(idx >= size) {return;} - auto* _out = reinterpret_cast*>(out); - const auto* _in = reinterpret_cast*>(in); - _out[idx] = static_cast>(_in[idx]); -} - -template -void resize_memory::operator()( - T*& arr, - const size_t& size, - const char* record_in) -{ - if (arr != nullptr) { - delete_memory()(arr); - } - cudaErrcheck(cudaMalloc((void **)&arr, sizeof(T) * size)); -} - -template -void set_memory::operator()( - T* arr, - const T& var, - const size_t& size) -{ - const int block = static_cast((size + THREADS_PER_BLOCK - 1) / THREADS_PER_BLOCK); - do_set_memory<<>>(arr, var, size); - cudaCheckOnDebug(); -} - -template -struct synchronize_memory { - void operator()( - T *arr_out, - const T *arr_in, - const size_t& size) - { - cudaErrcheck(cudaMemcpy(arr_out, arr_in, sizeof(T) * size, cudaMemcpyDeviceToHost)); - } -}; - -template -struct synchronize_memory { - void operator()( - T *arr_out, - const T *arr_in, - const size_t& size) - { - cudaErrcheck(cudaMemcpy(arr_out, arr_in, sizeof(T) * size, cudaMemcpyHostToDevice)); - } -}; - -template -struct synchronize_memory { - void operator()( - T *arr_out, - const T *arr_in, - const size_t& size) - { - cudaErrcheck(cudaMemcpy(arr_out, arr_in, sizeof(T) * size, cudaMemcpyHostToDevice)); - } -}; - - -template -struct cast_memory { - void operator()( - T_out* arr_out, - const T_in* arr_in, - const size_t& size) - { - const int block = static_cast((size + THREADS_PER_BLOCK - 1) / THREADS_PER_BLOCK); - do_cast_memory<<>>(arr_out, arr_in, size); - cudaCheckOnDebug(); - } -}; - - -template -struct cast_memory { - void operator()( - T_out* arr_out, - const T_in* arr_in, - const size_t& size) - { - T_in * arr = nullptr; - cudaErrcheck(cudaMalloc((void **)&arr, sizeof(T_in) * size)); - cudaErrcheck(cudaMemcpy(arr, arr_in, sizeof(T_in) * size, cudaMemcpyHostToDevice)); - const int block = static_cast((size + THREADS_PER_BLOCK - 1) / THREADS_PER_BLOCK); - do_cast_memory<<>>(arr_out, arr, size); - cudaCheckOnDebug(); - cudaErrcheck(cudaFree(arr)); - } -}; - - -template -struct cast_memory { - void operator()( - T_out* arr_out, - const T_in* arr_in, - const size_t& size) - { - auto * arr = (T_in*) malloc(sizeof(T_in) * size); - cudaErrcheck(cudaMemcpy(arr, arr_in, sizeof(T_in) * size, cudaMemcpyDeviceToHost)); - for (int ii = 0; ii < size; ii++) { - arr_out[ii] = static_cast(arr[ii]); - } - free(arr); - } -}; - -template -void delete_memory::operator() ( - T* arr) -{ - cudaErrcheck(cudaFree(arr)); -} - -template struct resize_memory; -template struct resize_memory; -template struct resize_memory; -template struct resize_memory; -template struct resize_memory, container::DEVICE_GPU>; -template struct resize_memory, container::DEVICE_GPU>; - -template struct set_memory; -template struct set_memory; -template struct set_memory; -template struct set_memory; -template struct set_memory, container::DEVICE_GPU>; -template struct set_memory, container::DEVICE_GPU>; - -template struct synchronize_memory; -template struct synchronize_memory; -template struct synchronize_memory; -template struct synchronize_memory; -template struct synchronize_memory; -template struct synchronize_memory; -template struct synchronize_memory; -template struct synchronize_memory; -template struct synchronize_memory; -template struct synchronize_memory; -template struct synchronize_memory; -template struct synchronize_memory; -template struct synchronize_memory, container::DEVICE_CPU, container::DEVICE_GPU>; -template struct synchronize_memory, container::DEVICE_GPU, container::DEVICE_CPU>; -template struct synchronize_memory, container::DEVICE_GPU, container::DEVICE_GPU>; -template struct synchronize_memory, container::DEVICE_CPU, container::DEVICE_GPU>; -template struct synchronize_memory, container::DEVICE_GPU, container::DEVICE_CPU>; -template struct synchronize_memory, container::DEVICE_GPU, container::DEVICE_GPU>; - -template struct cast_memory; -template struct cast_memory; -template struct cast_memory; -template struct cast_memory; -template struct cast_memory, std::complex, container::DEVICE_GPU, container::DEVICE_GPU>; -template struct cast_memory, std::complex, container::DEVICE_GPU, container::DEVICE_GPU>; -template struct cast_memory, std::complex, container::DEVICE_GPU, container::DEVICE_GPU>; -template struct cast_memory, std::complex, container::DEVICE_GPU, container::DEVICE_GPU>; -template struct cast_memory; -template struct cast_memory; -template struct cast_memory; -template struct cast_memory; -template struct cast_memory, std::complex, container::DEVICE_GPU, container::DEVICE_CPU>; -template struct cast_memory, std::complex, container::DEVICE_GPU, container::DEVICE_CPU>; -template struct cast_memory, std::complex, container::DEVICE_GPU, container::DEVICE_CPU>; -template struct cast_memory, std::complex, container::DEVICE_GPU, container::DEVICE_CPU>; -template struct cast_memory; -template struct cast_memory; -template struct cast_memory; -template struct cast_memory; -template struct cast_memory, std::complex, container::DEVICE_CPU, container::DEVICE_GPU>; -template struct cast_memory, std::complex, container::DEVICE_CPU, container::DEVICE_GPU>; -template struct cast_memory, std::complex, container::DEVICE_CPU, container::DEVICE_GPU>; -template struct cast_memory, std::complex, container::DEVICE_CPU, container::DEVICE_GPU>; - -template struct delete_memory; -template struct delete_memory; -template struct delete_memory; -template struct delete_memory; -template struct delete_memory, container::DEVICE_GPU>; -template struct delete_memory, container::DEVICE_GPU>; - -} // namespace kernels -} // namespace container \ No newline at end of file diff --git a/source/module_base/module_container/ATen/kernels/lapack.cpp b/source/module_base/module_container/ATen/kernels/lapack.cpp deleted file mode 100644 index 2369306309..0000000000 --- a/source/module_base/module_container/ATen/kernels/lapack.cpp +++ /dev/null @@ -1,223 +0,0 @@ -#include - -#include - -namespace container { -namespace kernels { - -template -struct set_matrix { - void operator() ( - const char& uplo, - T* A, - const int& dim) - { - if (uplo == 'L') { - for (int ii = 0; ii < dim; ii++) { - for (int jj = ii + 1; jj < dim; jj++) { - A[ii * dim + jj] = 0; - } - } - } - else if (uplo == 'U') { - for (int ii = 0; ii < dim; ii++) { - for (int jj = 0; jj < ii; jj++) { - A[ii * dim + jj] = 0; - } - } - } - } -}; - -template -struct lapack_trtri { - void operator()( - const char& uplo, - const char& diag, - const int& dim, - T* Mat, - const int& lda) - { - int info = 0; - lapackConnector::trtri(uplo, diag, dim, Mat, lda, info); - if (info != 0) { - throw std::runtime_error("potrf failed with info = " + std::to_string(info)); - } - } -}; - -template -struct lapack_potrf { - void operator()( - const char& uplo, - const int& dim, - T* Mat, - const int& lda) - { - int info = 0; - lapackConnector::potrf(uplo, dim, Mat, dim, info); - if (info != 0) { - throw std::runtime_error("potrf failed with info = " + std::to_string(info)); - } - } -}; - -template -struct lapack_dnevd { - using Real = typename GetTypeReal::type; - void operator()( - const char& jobz, - const char& uplo, - T* Mat, - const int& dim, - Real* eigen_val) - { - int info = 0; - int lwork = std::max(2 * dim + dim * dim, 1 + 6 * dim + 2 * dim * dim); - Tensor work(DataTypeToEnum::value, DeviceType::CpuDevice, {lwork}); - work.zero(); - - int lrwork = 1 + 5 * dim + 2 * dim * dim; - Tensor rwork(DataTypeToEnum::value, DeviceType::CpuDevice, {lrwork}); - rwork.zero(); - - int liwork = 3 + 5 * dim; - Tensor iwork(DataTypeToEnum::value, DeviceType::CpuDevice, {liwork}); - iwork.zero(); - - lapackConnector::dnevd(jobz, uplo, dim, Mat, dim, eigen_val, work.data(), lwork, rwork.data(), lrwork, iwork.data(), liwork, info); - if (info != 0) { - throw std::runtime_error("dnevd failed with info = " + std::to_string(info)); - } - } -}; - -template -struct lapack_dngvd { - using Real = typename GetTypeReal::type; - void operator()( - const int& itype, - const char& jobz, - const char& uplo, - T* Mat_A, - T* Mat_B, - const int& dim, - Real* eigen_val) - { - int info = 0; - int lwork = std::max(2 * dim + dim * dim, 1 + 6 * dim + 2 * dim * dim); - Tensor work(DataTypeToEnum::value, DeviceType::CpuDevice, {lwork}); - work.zero(); - - int lrwork = 1 + 5 * dim + 2 * dim * dim; - Tensor rwork(DataTypeToEnum::value, DeviceType::CpuDevice, {lrwork}); - rwork.zero(); - - int liwork = 3 + 5 * dim; - Tensor iwork(DataType::DT_INT, DeviceType::CpuDevice, {liwork}); - iwork.zero(); - - lapackConnector::dngvd(itype, jobz, uplo, dim, Mat_A, dim, Mat_B, dim, eigen_val, work.data(), lwork, rwork.data(), lrwork, iwork.data(), liwork, info); - if (info != 0) { - throw std::runtime_error("dngvd failed with info = " + std::to_string(info)); - } - } -}; - -template -struct lapack_getrf { - void operator()( - const int& m, - const int& n, - T* Mat, - const int& lda, - int* ipiv) - { - int info = 0; - lapackConnector::getrf(m, n, Mat, lda, ipiv, info); - if (info != 0) { - throw std::runtime_error("getrf failed with info = " + std::to_string(info)); - } - } -}; - -template -struct lapack_getri { - void operator()( - const int& n, - T* Mat, - const int& lda, - const int* ipiv, - T* work, - const int& lwork) - { - int info = 0; - lapackConnector::getri(n, Mat, lda, ipiv, work, lwork, info); - if (info != 0) { - throw std::runtime_error("getri failed with info = " + std::to_string(info)); - } - } -}; - -template -struct lapack_getrs { - void operator()( - const char& trans, - const int& n, - const int& nrhs, - T* A, - const int& lda, - const int* ipiv, - T* B, - const int& ldb) - { - int info = 0; - lapackConnector::getrs(trans, n, nrhs, A, lda, ipiv, B, ldb, info); - if (info != 0) { - throw std::runtime_error("getrs failed with info = " + std::to_string(info)); - } - } -}; - -template struct set_matrix; -template struct set_matrix; -template struct set_matrix, DEVICE_CPU>; -template struct set_matrix, DEVICE_CPU>; - -template struct lapack_potrf; -template struct lapack_potrf; -template struct lapack_potrf, DEVICE_CPU>; -template struct lapack_potrf, DEVICE_CPU>; - -template struct lapack_trtri; -template struct lapack_trtri; -template struct lapack_trtri, DEVICE_CPU>; -template struct lapack_trtri, DEVICE_CPU>; - -template struct lapack_dnevd; -template struct lapack_dnevd; -template struct lapack_dnevd, DEVICE_CPU>; -template struct lapack_dnevd, DEVICE_CPU>; - -template struct lapack_dngvd; -template struct lapack_dngvd; -template struct lapack_dngvd, DEVICE_CPU>; -template struct lapack_dngvd, DEVICE_CPU>; - -template struct lapack_getrf; -template struct lapack_getrf; -template struct lapack_getrf, DEVICE_CPU>; -template struct lapack_getrf, DEVICE_CPU>; - -template struct lapack_getri; -template struct lapack_getri; -template struct lapack_getri, DEVICE_CPU>; -template struct lapack_getri, DEVICE_CPU>; - -template struct lapack_getrs; -template struct lapack_getrs; -template struct lapack_getrs, DEVICE_CPU>; -template struct lapack_getrs, DEVICE_CPU>; - -} // namespace kernels -} // namespace container \ No newline at end of file diff --git a/source/module_base/module_container/ATen/kernels/lapack.h b/source/module_base/module_container/ATen/kernels/lapack.h deleted file mode 100644 index cf164dec10..0000000000 --- a/source/module_base/module_container/ATen/kernels/lapack.h +++ /dev/null @@ -1,113 +0,0 @@ -#ifndef ATEN_KERNELS_LAPACK_H_ -#define ATEN_KERNELS_LAPACK_H_ - -#include -#include - -#include - -namespace container { -namespace kernels { - - -template -struct set_matrix { - void operator() ( - const char& uplo, - T* A, - const int& dim); -}; - - -template -struct lapack_trtri { - void operator()( - const char& uplo, - const char& diag, - const int& dim, - T* Mat, - const int& lda); -}; - - -template -struct lapack_potrf { - void operator()( - const char& uplo, - const int& dim, - T* Mat, - const int& lda); -}; - - -template -struct lapack_dnevd { - using Real = typename GetTypeReal::type; - void operator()( - const char& jobz, - const char& uplo, - T* Mat, - const int& dim, - Real* eigen_val); -}; - - -template -struct lapack_dngvd { - using Real = typename GetTypeReal::type; - void operator()( - const int& itype, - const char& jobz, - const char& uplo, - T* Mat_A, - T* Mat_B, - const int& dim, - Real* eigen_val); -}; - - -template -struct lapack_getrf { - void operator()( - const int& m, - const int& n, - T* Mat, - const int& lda, - int* ipiv); -}; - - -template -struct lapack_getri { - void operator()( - const int& n, - T* Mat, - const int& lda, - const int* ipiv, - T* work, - const int& lwork); -}; - -template -struct lapack_getrs { - void operator()( - const char& trans, - const int& n, - const int& nrhs, - T* A, - const int& lda, - const int* ipiv, - T* B, - const int& ldb); -}; - -#if defined(__CUDA) || defined(__ROCM) -// TODO: Use C++ singleton to manage the GPU handles -void createGpuSolverHandle(); // create cusolver handle -void destroyGpuSolverHandle(); // destroy cusolver handle -#endif - -} // namespace container -} // namespace kernels - -#endif // ATEN_KERNELS_LAPACK_H_ \ No newline at end of file diff --git a/source/module_base/module_container/ATen/kernels/linalg.cpp b/source/module_base/module_container/ATen/kernels/linalg.cpp deleted file mode 100644 index e78ed9b4a5..0000000000 --- a/source/module_base/module_container/ATen/kernels/linalg.cpp +++ /dev/null @@ -1,289 +0,0 @@ -#include - -namespace container { -namespace kernels { - -template -static inline T conj(T& in) { - return in; -} - -template -static inline std::complex conj(std::complex& in) { - return std::conj(in); -} - -template -static std::vector ComputeStride(const std::vector& shape) { - int ndims = shape.size(); - std::vector strides(ndims); - T stride = 1; - - auto it = shape.end(); // Start from the last element - for (int ii = ndims - 1; ii >= 0; ii--) { - it--; - strides[ii] = stride; - stride *= static_cast(*it); - } - return std::move(strides); -} - -template -void add::operator()(const int& num_element, const T& alpha, const T* x, const T& beta, const T* y, T* z) { - // Define a lambda expression 'add_fn' to implement add operation. - // Perform add operation for the specified range [begin, end) in the output Tensor. - for (int o_idx = 0; o_idx < num_element; o_idx++) { - // Assign the sum of the input Tensor elements at index 'o_idx' to the output Tensor element at index 'o_idx'. - z[o_idx] = alpha * x[o_idx] + beta * y[o_idx]; - } -} - -template -void mul::operator()(const int& num_element, const T& alpha, const T* x, T* y) { - // Define a lambda expression 'mul_fn' to implement mul operation. - // Perform mul operation for the specified range [begin, end) in the output Tensor. - for (int o_idx = 0; o_idx < num_element; o_idx++) { - // Assign the product of the input Tensor elements at index 'o_idx' to the output Tensor element at index 'o_idx'. - y[o_idx] = alpha * x[o_idx]; - } -} - -template -void mul::operator()(const int& num_element, const T& alpha, const T* x, const T* y, T* z) { - // Define a lambda expression 'mul_fn' to implement mul operation. - // Perform mul operation for the specified range [begin, end) in the output Tensor. - for (int o_idx = 0; o_idx < num_element; o_idx++) { - // Assign the product of the input Tensor elements at index 'o_idx' to the output Tensor element at index 'o_idx'. - z[o_idx] = alpha * x[o_idx] * y[o_idx]; - } -} - -template -void div::operator()(const int& num_element, const T& alpha, const T* x, const T* y, T* z) { - // Define a lambda expression 'div_fn' to implement div operation. - // Perform div operation for the specified range [begin, end) in the output Tensor. - for (int o_idx = 0; o_idx < num_element; o_idx++) { - // Assign the quotient of the input Tensor elements at index 'o_idx' to the output Tensor element at index 'o_idx'. - z[o_idx] = alpha * x[o_idx] / y[o_idx]; - } -} - -template -void fma::operator()(const int& num_element, const T& alpha, const T* x, const T* y, const T& beta, const T* z, T* out) { - // Define a lambda expression 'fma_fn' to implement fma operation. - // Perform fma operation for the specified range [begin, end) in the output Tensor. - for (int o_idx = 0; o_idx < num_element; o_idx++) { - // Assign the sum of the product of the input Tensor elements at index 'o_idx' and the corresponding coefficients to the output Tensor element at index 'o_idx'. - out[o_idx] = alpha * x[o_idx] * y[o_idx] + beta * z[o_idx]; - } -} - -template -void transpose::operator()( - const std::vector &perm, - const std::vector &p_shape, - const std::vector &q_shape, - const T *p, - T *q) -{ - REQUIRES_OK(p_shape.size() == q_shape.size(), - "transpose: p and q must have the same number of dimensions"); - const int ndim = static_cast(p_shape.size()); - auto in_strides = ComputeStride(p_shape); - auto out_strides = ComputeStride(q_shape); - - int64_t num_elements = 1; - for (int ii = 0; ii < ndim; ++ii) { - num_elements *= q_shape[ii]; - } - num_elements = ndim ? num_elements : 0; - // Define a lambda expression 'transpose_fn' to implement transpose operation. - // Perform transpose operation for the specified range [begin, end) in the output Tensor. - for (int64_t o_idx = 0; o_idx < num_elements; o_idx++) { - int64_t i_idx = 0; // Initialize the index for the input Tensor element. - int64_t t = o_idx; // Calculate the index for the output Tensor element. - - // Iterate over each dimension of the output Tensor. - for (int ii = 0; ii < ndim; ++ii) { - // Calculate the ratio of the current output Tensor index 't' in the current dimension. - const int64_t ratio = t / out_strides[ii]; - // Update the output Tensor index 't' by removing the offset in the current dimension. - t -= ratio * out_strides[ii]; - // Calculate the offset for the corresponding index position in the input Tensor and accumulate it in 'i_idx'. - i_idx += ratio * in_strides[perm[ii]]; - } - // Check if conjugation is needed. - if (Conjugate) { - // Assign the conjugate value of the input Tensor element at index 'i_idx' to the output Tensor element at index 'o_idx'. - q[o_idx] = kernels::conj(p[i_idx]); - } else { - // Assign the input Tensor element at index 'i_idx' to the output Tensor element at index 'o_idx'. - q[o_idx] = p[i_idx]; - } - } -} - - -template -void stride::operator()( - const std::vector &stride, - const std::vector &p_shape, - const std::vector &q_shape, - const T *p, - T *q) -{ - REQUIRES_OK(p_shape.size() == q_shape.size() , - "stride: p and q must match the number of dimensions"); - const int ndim = static_cast(p_shape.size()); - auto in_strides = ComputeStride(p_shape); - auto out_strides = ComputeStride(q_shape); - - int64_t num_elements = 1; - for (int ii = 0; ii < ndim; ++ii) { - num_elements *= q_shape[ii]; - } - num_elements = ndim ? num_elements : 0; - // Define a lambda expression 'stride_fn' to implement stride operation. - // Perform stride operation for the specified range [begin, end) in the output Tensor. - // Perform stride operation for the specified range [begin, end) in the output Tensor. - for (int64_t o_idx = 0; o_idx < num_elements; o_idx++) { - int64_t i_idx = 0; // Initialize the index for the input Tensor element. - int64_t current_o_idx = o_idx; // Calculate the index for the output Tensor element. - // Iterate over each dimension of the output Tensor. - for (int ii = 0; ii < ndim; ++ii) { - // Calculate the index in the current dimension. - // It is natural to view a tensor as a multi-dimentional array. - const int64_t current_dim_idx = current_o_idx / out_strides[ii]; - // Update the output Tensor index 'current_o_idx' by removing the offset in the current dimension. - current_o_idx -= current_dim_idx * out_strides[ii]; - // Calculate the offset for the corresponding index position in the input Tensor and accumulate it in 'i_idx'. - i_idx += (current_dim_idx * stride[ii]) * in_strides[ii]; - } - // Assign the input Tensor element at index 'i_idx' to the output Tensor element at index 'o_idx'. - q[o_idx] = p[i_idx]; - } -} - - -template -void inflate::operator()( - const std::vector &inflate, - const std::vector &p_shape, - const std::vector &q_shape, - const T *p, - T *q) -{ - REQUIRES_OK(p_shape.size() == q_shape.size(), - "transpose: p and q must have the same number of dimensions"); - const int ndim = static_cast(p_shape.size()); - auto in_strides = ComputeStride(p_shape); - auto out_strides = ComputeStride(q_shape); - - int64_t num_elements = 1; - for (int ii = 0; ii < ndim; ++ii) { - num_elements *= q_shape[ii]; - } - num_elements = ndim ? num_elements : 0; - // Define a lambda expression 'inflate_fn' to implement inflate operation. - // Perform inflate operation for the specified range [begin, end) in the output Tensor. - for (int64_t o_idx = 0; o_idx < num_elements; o_idx++) { - int64_t i_idx = 0; // Initialize the index for the input Tensor element. - int64_t current_o_idx = o_idx; // Calculate the index for the output Tensor element. - bool valid = true; - // Iterate over each dimension of the output Tensor. - for (int ii = 0; ii < ndim; ++ii) { - // Calculte the ratio of the current output Tensor index 'current_o_idx' in the current dimension. - const int64_t current_dim_idx = current_o_idx / out_strides[ii]; - // Update the output Tensor index 'current_o_idx' by removing the offset in the current dimension. - current_o_idx -= current_dim_idx * out_strides[ii]; - // Calculate the offset for the corresponding index position in the input Tensor and accumulate it in 'i_idx'. - if (current_dim_idx % inflate[ii] == 0) { - i_idx += (current_dim_idx / inflate[ii]) * in_strides[ii]; - } - else { - valid = false; - break; - } - } - // Assign the input Tensor element at index 'i_idx' to the output Tensor element at index 'o_idx'. - q[o_idx] = p[i_idx] * static_cast(valid ? 1.0 : 0.0); - } -} - - -template -void reduce::operator()( - const int64_t &num_element, - const int64_t &inner_most_dim, - const T *p, - T *q) -{ - // It's just so simple to implement the reduce operation. - for (int64_t o_idx = 0; o_idx < num_element; o_idx++) { - T sum = 0; - for (int64_t i_idx = o_idx * inner_most_dim; i_idx < inner_most_dim + o_idx * inner_most_dim; i_idx++) { - sum += p[i_idx]; - } - q[o_idx] = sum; - } -} - - -template struct add; -template struct add; -template struct add; -template struct add; -template struct add, DEVICE_CPU>; -template struct add, DEVICE_CPU>; - -template struct mul; -template struct mul; -template struct mul; -template struct mul; -template struct mul, DEVICE_CPU>; -template struct mul, DEVICE_CPU>; - -template struct div; -template struct div; -template struct div; -template struct div; -template struct div, DEVICE_CPU>; -template struct div, DEVICE_CPU>; - -template struct fma; -template struct fma; -template struct fma; -template struct fma; -template struct fma, DEVICE_CPU>; -template struct fma, DEVICE_CPU>; - -template struct transpose; -template struct transpose; -template struct transpose; -template struct transpose; -template struct transpose, DEVICE_CPU>; -template struct transpose, DEVICE_CPU>; - -template struct stride; -template struct stride; -template struct stride; -template struct stride; -template struct stride, DEVICE_CPU>; -template struct stride, DEVICE_CPU>; - -template struct inflate; -template struct inflate; -template struct inflate; -template struct inflate; -template struct inflate, DEVICE_CPU>; -template struct inflate, DEVICE_CPU>; - -template struct reduce; -template struct reduce; -template struct reduce; -template struct reduce; -template struct reduce, DEVICE_CPU>; -template struct reduce, DEVICE_CPU>; - -} // namespace kernels -} // namespace container \ No newline at end of file diff --git a/source/module_base/module_container/ATen/kernels/linalg.h b/source/module_base/module_container/ATen/kernels/linalg.h deleted file mode 100644 index 985d1958e1..0000000000 --- a/source/module_base/module_container/ATen/kernels/linalg.h +++ /dev/null @@ -1,108 +0,0 @@ -#ifndef ATEN_KERNELS_LINALG_H_ -#define ATEN_KERNELS_LINALG_H_ - -#include - -#include - -namespace container { -namespace kernels { - -template -struct add { - // z = alpha * x + beta * y - void operator()( - const int& num_element, - const T& alpha, - const T* x, - const T& beta, - const T* y, - T* z); -}; - -template -struct mul { - void operator()( - const int& num_element, - const T& alpha, - const T* x, - T* y); - // z = alpha * x * y - void operator()( - const int& num_element, - const T& alpha, - const T* x, - const T* y, - T* z); -}; - -template -struct div { - // z = alpha * x / y - void operator()( - const int& num_element, - const T& alpha, - const T* x, - const T* y, - T* z); -}; - -template -struct fma { - // out = alpha * x * y + beta * z - void operator()( - const int& num_element, - const T& alpha, - const T* x, - const T* y, - const T& beta, - const T* z, - T* out); -}; - -template -struct transpose { - void operator()( - const std::vector& perm, - const std::vector& p_shape, - const std::vector& q_shape, - const T* p, - T* q); -}; - - -template -struct stride { - void operator()( - const std::vector& stride, - const std::vector& p_shape, - const std::vector& q_shape, - const T* p, - T* q); -}; - -template -struct inflate { - void operator()( - const std::vector& inflate, - const std::vector& p_shape, - const std::vector& q_shape, - const T* p, - T* q); -}; - - -template -struct reduce { - void operator()( - const int64_t& num_element, - const int64_t& inner_most_dim, - const T* p, - T* q); -}; - - -} // namespace op -} // namespace container - -#endif // ATEN_KERNELS_LINALG_H_ \ No newline at end of file diff --git a/source/module_base/module_container/ATen/kernels/memory.h b/source/module_base/module_container/ATen/kernels/memory.h deleted file mode 100644 index da079d7a8c..0000000000 --- a/source/module_base/module_container/ATen/kernels/memory.h +++ /dev/null @@ -1,150 +0,0 @@ -#ifndef ATEN_KERNELS_MEMORY_H_ -#define ATEN_KERNELS_MEMORY_H_ - -#include -#include - -#include -#include - -namespace container { -namespace kernels { - -/** - * @brief A functor to resize memory allocation. - * @tparam T Floating-point type of the allocated memory. - * @tparam Device Device type where the memory will be allocated. - */ -template -struct resize_memory { - /** - * @brief Resize memory allocation. - * - * @param dev Device where the memory will be allocated. - * @param arr Pointer to the allocated memory. - * @param size New size of the allocated memory. - * @param record_in Optional message to record the resize operation. - */ - void operator()(T*& arr, const size_t& size, const char* record_in = nullptr); -}; - -/** - * @brief A functor to set memory to a constant value. - * @tparam T Floating-point type of the memory. - * @tparam Device Device type where the memory is allocated. - */ -template -struct set_memory { - /** - * @brief Set memory to a constant value. - * - * @param arr Pointer to the memory. - * @param var Constant value to set. - * @param size Size of the memory to set. - */ - void operator()(T* arr, const T& var, const size_t& size); -}; - -/** - * @brief Synchronizes memory between devices. - * - * This class synchronizes memory between two different devices. - * - * @tparam T The type of data in the arrays. - * @tparam Device_out The output device. - * @tparam Device_in The input device. - */ -template -struct synchronize_memory { - /** - * @brief Synchronizes memory between devices. - * - * This method synchronizes memory between two different devices. - * - * @param dev_out The output device. - * @param dev_in The input device. - * @param arr_out The output array. - * @param arr_in The input array. - * @param size The size of the array. - */ - void operator()( - T* arr_out, - const T* arr_in, - const size_t& size); -}; - -template -struct synchronize_memory_stride { - void operator()( - T* arr_out, - const T* arr_in, - const std::vector& out_size, - const std::vector& in_size) - { - REQUIRES_OK(in_size.size() == out_size.size() && in_size.size() <= 2); - if (in_size.size() == 1) { - synchronize_memory()(arr_out, arr_in, in_size[0]); - } - else { - for (int64_t ii = 0; ii < out_size[0]; ii++) { - synchronize_memory()(arr_out + ii * out_size[1], arr_in + ii * in_size[1], in_size[1]); - } - } - } -}; - -/** - * @brief Casts memory between devices. - * - * This class casts memory between two different devices. - * - * @tparam T_out The output data type. - * @tparam T_in The input data type. - * @tparam Device_out The output device. - * @tparam Device_in The input device. - */ -template -struct cast_memory { - /** - * @brief Casts memory between devices. - * - * This method casts memory between two different devices. - * - * @param dev_out The output device. - * @param dev_in The input device. - * @param arr_out The output array. - * @param arr_in The input array. - * @param size The size of the array. - */ - void operator()( - T_out* arr_out, - const T_in* arr_in, - const size_t& size); -}; - - -/** - * @brief Deletes memory on a device. - * - * This class deletes memory on a device. - * - * @tparam T The type of data in the array. - * @tparam Device The device. - */ -template -struct delete_memory { - /** - * @brief Deletes memory on a device. - * - * This method deletes memory on a device. - * - * @param dev The device. - * @param arr The array to be deleted. - */ - void operator()(T* arr); -}; - -} // namespace kernels -} // namespace container - -#endif // ATEN_KERNELS_MEMORY_H_ \ No newline at end of file diff --git a/source/module_base/module_container/ATen/kernels/memory_impl.cpp b/source/module_base/module_container/ATen/kernels/memory_impl.cpp deleted file mode 100644 index e48c89be00..0000000000 --- a/source/module_base/module_container/ATen/kernels/memory_impl.cpp +++ /dev/null @@ -1,210 +0,0 @@ -#include -#include -#include - -#include - -namespace container { -namespace kernels { - -template -struct resize_memory { - void operator()(T*& arr, const size_t& size, const char* /*record_in*/) { - if (arr != nullptr) { - free(arr); - } - arr = (T*) malloc(sizeof(T) * size); - } -}; - -template -struct set_memory { - void operator()(T* arr, const T& var, const size_t& size) { - for (size_t ii = 0; ii < size; ii++) { - arr[ii] = var; - } - } -}; - -template -struct synchronize_memory { - void operator()( - T* arr_out, - const T* arr_in, - const size_t& size) - { - memcpy(arr_out, arr_in, sizeof(T) * size); - } -}; - -template -struct cast_memory { - void operator()( - T_out* arr_out, - const T_in* arr_in, - const size_t& size) - { - for (int ii = 0; ii < size; ii++) { - arr_out[ii] = static_cast(arr_in[ii]); - } - } -}; - -template -struct delete_memory { - void operator()(T* arr) { - free(arr); - } -}; - -template struct resize_memory; -template struct resize_memory; -template struct resize_memory; -template struct resize_memory; -template struct resize_memory, DEVICE_CPU>; -template struct resize_memory, DEVICE_CPU>; - -template struct set_memory; -template struct set_memory; -template struct set_memory; -template struct set_memory; -template struct set_memory, DEVICE_CPU>; -template struct set_memory, DEVICE_CPU>; - -template struct synchronize_memory; -template struct synchronize_memory; -template struct synchronize_memory; -template struct synchronize_memory; -template struct synchronize_memory, DEVICE_CPU, DEVICE_CPU>; -template struct synchronize_memory, DEVICE_CPU, DEVICE_CPU>; - -template struct cast_memory; -template struct cast_memory; -template struct cast_memory; -template struct cast_memory; -template struct cast_memory, std::complex, DEVICE_CPU, DEVICE_CPU>; -template struct cast_memory, std::complex, DEVICE_CPU, DEVICE_CPU>; -template struct cast_memory, std::complex, DEVICE_CPU, DEVICE_CPU>; -template struct cast_memory, std::complex, DEVICE_CPU, DEVICE_CPU>; - -template struct delete_memory; -template struct delete_memory; -template struct delete_memory; -template struct delete_memory; -template struct delete_memory, DEVICE_CPU>; -template struct delete_memory, DEVICE_CPU>; - -#if !(defined(__CUDA) || defined(__ROCM)) -template -struct resize_memory { - void operator()(T*& arr, const size_t& size, const char* record_in = nullptr) {} -}; - -template -struct set_memory { - void operator()(T* arr, const int var, const size_t& size) {} -}; - -template -struct synchronize_memory { - void operator()(T* arr_out, const T* arr_in, const size_t& size) {} -}; - -template -struct synchronize_memory { - void operator()(T* arr_out, const T* arr_in, const size_t& size) {} -}; - -template -struct synchronize_memory { - void operator()(T* arr_out, const T* arr_in, const size_t& size) {} -}; - -template -struct cast_memory { - void operator()(T_out* arr_out, const T_in* arr_in, const size_t& size) {} -}; - -template -struct cast_memory { - void operator()(T_out* arr_out, const T_in* arr_in, const size_t& size) {} -}; - -template -struct cast_memory { - void operator()(T_out* arr_out, const T_in* arr_in, const size_t& size) {} -}; - -template -struct delete_memory { - void operator()(T* arr) {} -}; - -template struct resize_memory; -template struct resize_memory; -template struct resize_memory; -template struct resize_memory; -template struct resize_memory, DEVICE_GPU>; -template struct resize_memory, DEVICE_GPU>; - -template struct set_memory; -template struct set_memory; -template struct set_memory; -template struct set_memory; -template struct set_memory, DEVICE_GPU>; -template struct set_memory, DEVICE_GPU>; - -template struct synchronize_memory; -template struct synchronize_memory; -template struct synchronize_memory; -template struct synchronize_memory; -template struct synchronize_memory; -template struct synchronize_memory; -template struct synchronize_memory; -template struct synchronize_memory; -template struct synchronize_memory; -template struct synchronize_memory; -template struct synchronize_memory; -template struct synchronize_memory; -template struct synchronize_memory, DEVICE_CPU, DEVICE_GPU>; -template struct synchronize_memory, DEVICE_GPU, DEVICE_CPU>; -template struct synchronize_memory, DEVICE_GPU, DEVICE_GPU>; -template struct synchronize_memory, DEVICE_CPU, DEVICE_GPU>; -template struct synchronize_memory, DEVICE_GPU, DEVICE_CPU>; -template struct synchronize_memory, DEVICE_GPU, DEVICE_GPU>; - -template struct cast_memory; -template struct cast_memory; -template struct cast_memory; -template struct cast_memory; -template struct cast_memory, std::complex, container::DEVICE_GPU, container::DEVICE_GPU>; -template struct cast_memory, std::complex, container::DEVICE_GPU, container::DEVICE_GPU>; -template struct cast_memory, std::complex, container::DEVICE_GPU, container::DEVICE_GPU>; -template struct cast_memory, std::complex, container::DEVICE_GPU, container::DEVICE_GPU>; -template struct cast_memory; -template struct cast_memory; -template struct cast_memory; -template struct cast_memory; -template struct cast_memory, std::complex, container::DEVICE_GPU, container::DEVICE_CPU>; -template struct cast_memory, std::complex, container::DEVICE_GPU, container::DEVICE_CPU>; -template struct cast_memory, std::complex, container::DEVICE_GPU, container::DEVICE_CPU>; -template struct cast_memory, std::complex, container::DEVICE_GPU, container::DEVICE_CPU>; -template struct cast_memory; -template struct cast_memory; -template struct cast_memory; -template struct cast_memory; -template struct cast_memory, std::complex, container::DEVICE_CPU, container::DEVICE_GPU>; -template struct cast_memory, std::complex, container::DEVICE_CPU, container::DEVICE_GPU>; -template struct cast_memory, std::complex, container::DEVICE_CPU, container::DEVICE_GPU>; -template struct cast_memory, std::complex, container::DEVICE_CPU, container::DEVICE_GPU>; - -template struct delete_memory; -template struct delete_memory; -template struct delete_memory; -template struct delete_memory; -template struct delete_memory, DEVICE_GPU>; -template struct delete_memory, DEVICE_GPU>; -#endif - -} // namespace kernels -} // namespace container \ No newline at end of file diff --git a/source/module_base/module_container/ATen/kernels/rocm/blas.hip.cu b/source/module_base/module_container/ATen/kernels/rocm/blas.hip.cu deleted file mode 100644 index 5ad275460c..0000000000 --- a/source/module_base/module_container/ATen/kernels/rocm/blas.hip.cu +++ /dev/null @@ -1,245 +0,0 @@ -#include -#include - -#include -#include - -namespace container { -namespace kernels { - -static hipblasHandle_t hipblas_handle = nullptr; - -void createGpuBlasHandle() { - if (hipblas_handle == nullptr) { - hipblasErrcheck(hipblasCreate(&hipblas_handle)); - } -} - -void destroyGpuBlasHandle() { - if (hipblas_handle != nullptr) { - hipblasErrcheck(hipblasDestroy(hipblas_handle)); - hipblas_handle = nullptr; - } -} - - -template -struct blas_dot { - void operator()( - const int& n, - const T* x, - const int& incx, - const T* y, - const int& incy, - T* result) - { - hipBlasConnector::dot(hipblas_handle, n, x, incx, y, incy, result); - } -}; - -template -struct blas_scal { - void operator()( - const int& n, - const T* alpha, - T* x, - const int& incx) - { - hipBlasConnector::scal(hipblas_handle, n, *alpha, x, incx); - } -}; - -template -struct blas_axpy { - void operator()( - const int& n, - const T* alpha, - const T* x, - const int& incx, - T* y, - const int& incy) - { - hipBlasConnector::axpy(hipblas_handle, n, *alpha, x, incx, y, incy); - } -}; - -template -struct blas_gemv { - void operator()( - const char& trans, - const int& m, - const int& n, - const T* alpha, - const T* A, - const int& lda, - const T* x, - const int& incx, - const T* beta, - T* y, - const int& incy) - { - hipBlasConnector::gemv(hipblas_handle, trans, m, n, *alpha, A, lda, x, incx, *beta, y, incy); - } -}; - - -template -struct blas_gemv_batched { - void operator()( - const char& trans, - const int& m, - const int& n, - const T* alpha, - T** A, - const int& lda, - T** x, - const int& incx, - const T* beta, - T** y, - const int& incy, - const int& batch_size) - { - hipBlasConnector::gemv_batched(hipblas_handle, trans, m, n, *alpha, A, lda, x, incx, *beta, y, incy, batch_size); - } -}; - - -template -struct blas_gemv_batched_strided { - void operator()( - const char& trans, - const int& m, - const int& n, - const T* alpha, - const T* A, - const int& lda, - const int64_t& stride_a, - const T* x, - const int& incx, - const int64_t& stride_x, - const T* beta, - T* y, - const int& incy, - const int64_t& stride_y, - const int& batch_size) - { - hipBlasConnector::gemv_batched_strided(hipblas_handle, trans, m, n, *alpha, A, lda, stride_a, x, incx, stride_x, *beta, y, incy, stride_y, batch_size); - } -}; - -template -struct blas_gemm { - void operator()( - const char& transa, - const char& transb, - const int& m, - const int& n, - const int& k, - const T* alpha, - const T* A, - const int& lda, - const T* B, - const int& ldb, - const T* beta, - T* C, - const int& ldc) - { - hipBlasConnector::gemm(hipblas_handle, transa, transb, m, n, k, *alpha, A, lda, B, ldb, *beta, C, ldc); - } -}; - -template -struct blas_gemm_batched { - void operator()( - const char& transa, - const char& transb, - const int& m, - const int& n, - const int& k, - const T* alpha, - T** A, - const int& lda, - T** B, - const int& ldb, - const T* beta, - T** C, - const int& ldc, - const int& batch_size) - { - hipBlasConnector::gemm_batched(hipblas_handle, transa, transb, m, n, k, *alpha, A, lda, B, ldb, *beta, C, ldc, batch_size); - } -}; - -template -struct blas_gemm_batched_strided { - void operator()( - const char& transa, - const char& transb, - const int& m, - const int& n, - const int& k, - const T* alpha, - const T* A, - const int& lda, - const int& stride_a, - const T* B, - const int& ldb, - const int& stride_b, - const T* beta, - T* C, - const int& ldc, - const int& stride_c, - const int& batch_size) - { - hipBlasConnector::gemm_batched_strided(hipblas_handle, transa, transb, m, n, k, *alpha, A, lda, stride_a, B, ldb, stride_b, *beta, C, ldc, stride_c, batch_size); - } -}; - -// Explicitly instantiate functors for the types of functor registered. -template struct blas_dot; -template struct blas_dot; -template struct blas_dot , DEVICE_GPU>; -template struct blas_dot, DEVICE_GPU>; - -template struct blas_scal; -template struct blas_scal; -template struct blas_scal , DEVICE_GPU>; -template struct blas_scal, DEVICE_GPU>; - -template struct blas_axpy; -template struct blas_axpy; -template struct blas_axpy , DEVICE_GPU>; -template struct blas_axpy, DEVICE_GPU>; - -template struct blas_gemv; -template struct blas_gemv; -template struct blas_gemv, DEVICE_GPU>; -template struct blas_gemv, DEVICE_GPU>; - -template struct blas_gemv_batched; -template struct blas_gemv_batched; -template struct blas_gemv_batched, DEVICE_GPU>; -template struct blas_gemv_batched, DEVICE_GPU>; - -template struct blas_gemv_batched_strided; -template struct blas_gemv_batched_strided; -template struct blas_gemv_batched_strided, DEVICE_GPU>; -template struct blas_gemv_batched_strided, DEVICE_GPU>; - -template struct blas_gemm; -template struct blas_gemm; -template struct blas_gemm, DEVICE_GPU>; -template struct blas_gemm, DEVICE_GPU>; - -template struct blas_gemm_batched; -template struct blas_gemm_batched; -template struct blas_gemm_batched, DEVICE_GPU>; -template struct blas_gemm_batched, DEVICE_GPU>; - -template struct blas_gemm_batched_strided; -template struct blas_gemm_batched_strided; -template struct blas_gemm_batched_strided, DEVICE_GPU>; -template struct blas_gemm_batched_strided, DEVICE_GPU>; - -} // namespace kernels -} // namespace container \ No newline at end of file diff --git a/source/module_base/module_container/ATen/kernels/rocm/lapack.hip.cu b/source/module_base/module_container/ATen/kernels/rocm/lapack.hip.cu deleted file mode 100644 index cc0a77cb4c..0000000000 --- a/source/module_base/module_container/ATen/kernels/rocm/lapack.hip.cu +++ /dev/null @@ -1,159 +0,0 @@ -#include -#include -#include - -#include -#include -#include - -namespace container { -namespace kernels { - - -static hipsolverHandle_t hipsolver_handle = nullptr; - -void createGpuSolverHandle() { - if (hipsolver_handle == nullptr) { - hipsolverErrcheck(hipsolverCreate(&hipsolver_handle)); - } -} - -void destroyGpuSolverHandle() { - if (hipsolver_handle != nullptr) { - hipsolverErrcheck(hipsolverDestroy(hipsolver_handle)); - hipsolver_handle = nullptr; - } -} - -template -__global__ void set_matrix_kernel( - const char uplo, - T* A, - const int dim) -{ - int bid = blockIdx.x; - int tid = threadIdx.x; - - for (int ii = tid; ii < bid + 1; ii += THREADS_PER_BLOCK) { - if (uplo == 'L') { - A[ii * dim + bid + 1] = static_cast(0); - } - else { - A[(bid + 1) * dim + ii] = static_cast(0); - } - } -} - -template -struct set_matrix { - using Type = typename GetTypeThrust::type; - void operator() ( - const char& uplo, - T* A, - const int& dim) - { - set_matrix_kernel<<>>( - uplo, reinterpret_cast(A), dim); - } -}; - -template -struct lapack_trtri { - void operator()( - const char& uplo, - const char& diag, - const int& dim, - T* Mat, - const int& lda) - { - // TODO: trtri is not implemented in this method yet - // Cause the trtri in cuSolver is not stable for ABACUS! - // hipSolverConnector::trtri(hipsolver_handle, uplo, diag, dim, Mat, lda); - // hipSolverConnector::potri(hipsolver_handle, uplo, diag, dim, Mat, lda); - std::vector H_Mat(dim * dim, static_cast(0.0)); - hipMemcpy(H_Mat.data(), Mat, sizeof(T) * H_Mat.size(), hipMemcpyDeviceToHost); - lapack_trtri()(uplo, diag, dim, H_Mat.data(), lda); - hipMemcpy(Mat, H_Mat.data(), sizeof(T) * H_Mat.size(), hipMemcpyHostToDevice); - } -}; - -template -struct lapack_potrf { - void operator()( - const char& uplo, - const int& dim, - T* Mat, - const int& lda) - { - // hipSolverConnector::potrf(hipsolver_handle, uplo, dim, Mat, dim); - std::vector H_Mat(dim * dim, static_cast(0.0)); - hipMemcpy(H_Mat.data(), Mat, sizeof(T) * H_Mat.size(), hipMemcpyDeviceToHost); - lapack_potrf()(uplo, dim, H_Mat.data(), lda); - hipMemcpy(Mat, H_Mat.data(), sizeof(T) * H_Mat.size(), hipMemcpyHostToDevice); - } -}; - -template -struct lapack_dnevd { - using Real = typename GetTypeReal::type; - void operator()( - const char& jobz, - const char& uplo, - T* Mat, - const int& dim, - Real* eigen_val) - { - // hipSolverConnector::dnevd(hipsolver_handle, jobz, uplo, dim, Mat, dim, eigen_val); - std::vector H_Mat(dim * dim, static_cast(0.0)); - std::vector H_eigen_val(dim, static_cast(0.0)); - hipMemcpy(H_Mat.data(), Mat, sizeof(T) * H_Mat.size(), hipMemcpyDeviceToHost); - hipMemcpy(H_eigen_val.data(), eigen_val, sizeof(Real) * H_eigen_val.size(), hipMemcpyDeviceToHost); - lapack_dnevd()(jobz, uplo, H_Mat.data(), dim, H_eigen_val.data()); - hipMemcpy(Mat, H_Mat.data(), sizeof(T) * H_Mat.size(), hipMemcpyHostToDevice); - hipMemcpy(eigen_val, H_eigen_val.data(), sizeof(Real) * H_eigen_val.size(), hipMemcpyHostToDevice); - } -}; - -template -struct lapack_dngvd { - using Real = typename GetTypeReal::type; - void operator()( - const int& itype, - const char& jobz, - const char& uplo, - T* Mat_A, - T* Mat_B, - const int& dim, - Real* eigen_val) - { - hipSolverConnector::dngvd(hipsolver_handle, itype, jobz, uplo, dim, Mat_A, dim, Mat_B, dim, eigen_val); - } -}; - -template struct set_matrix; -template struct set_matrix; -template struct set_matrix, DEVICE_GPU>; -template struct set_matrix, DEVICE_GPU>; - -template struct lapack_trtri; -template struct lapack_trtri; -template struct lapack_trtri, DEVICE_GPU>; -template struct lapack_trtri, DEVICE_GPU>; - -template struct lapack_potrf; -template struct lapack_potrf; -template struct lapack_potrf, DEVICE_GPU>; -template struct lapack_potrf, DEVICE_GPU>; - -template struct lapack_dnevd; -template struct lapack_dnevd; -template struct lapack_dnevd, DEVICE_GPU>; -template struct lapack_dnevd, DEVICE_GPU>; - -template struct lapack_dngvd; -template struct lapack_dngvd; -template struct lapack_dngvd, DEVICE_GPU>; -template struct lapack_dngvd, DEVICE_GPU>; - -} // namespace kernels -} // namespace container \ No newline at end of file diff --git a/source/module_base/module_container/ATen/kernels/rocm/linalg.hip.cu b/source/module_base/module_container/ATen/kernels/rocm/linalg.hip.cu deleted file mode 100644 index ef43a5408c..0000000000 --- a/source/module_base/module_container/ATen/kernels/rocm/linalg.hip.cu +++ /dev/null @@ -1,475 +0,0 @@ -#include -#include -#include -#include - -#include -#include - -namespace container { -namespace kernels { - -template -__device__ static inline -T conj(T& in) { - return in; -} - -template -__device__ static inline -thrust::complex conj(thrust::complex& in) { - return thrust::conj(in); -} - -template -__global__ void do_add_kernel( - const int num_element, - const T alpha, - const T* x, - const T beta, - const T* y, - T* z) -{ - // Perform add operation for the specified range [begin, end) in the output Tensor. - for (int o_idx = threadIdx.x; o_idx < num_element; o_idx += blockDim.x) { - // Assign the sum of the input Tensor elements at index 'o_idx' to the output Tensor element at index 'o_idx'. - z[o_idx] = alpha * x[o_idx] + beta * y[o_idx]; - } -} - -template -__global__ void do_mul_kernel( - const int num_element, - const T alpha, - const T* x, - T* y) -{ - for (int o_idx = threadIdx.x; o_idx < num_element; o_idx += blockDim.x) { - // Assign the sum of the input Tensor elements at index 'o_idx' to the output Tensor element at index 'o_idx'. - y[o_idx] = alpha * x[o_idx]; - } -} - -template -__global__ void do_mul_kernel( - const int num_element, - const T alpha, - const T* x, - const T* y, - T* z) -{ - for (int o_idx = threadIdx.x; o_idx < num_element; o_idx += blockDim.x) { - // Assign the sum of the input Tensor elements at index 'o_idx' to the output Tensor element at index 'o_idx'. - z[o_idx] = alpha * x[o_idx] * y[o_idx]; - } -} - -template -__global__ void do_div_kernel( - const int num_element, - const T alpha, - const T* x, - const T* y, - T* z) -{ - for (int o_idx = threadIdx.x; o_idx < num_element; o_idx += blockDim.x) { - // Assign the sum of the input Tensor elements at index 'o_idx' to the output Tensor element at index 'o_idx'. - z[o_idx] = alpha * x[o_idx] / y[o_idx]; - } -} - -template -__global__ void do_fma_kernel( - const int num_element, - const T alpha, - const T* x, - const T* y, - const T beta, - const T* z, - T* out) -{ - for (int o_idx = threadIdx.x; o_idx < num_element; o_idx += blockDim.x) { - // Assign the sum of the input Tensor elements at index 'o_idx' to the output Tensor element at index 'o_idx'. - out[o_idx] = alpha * x[o_idx] * y[o_idx] + beta * z[o_idx]; - } -} - -template -__global__ void do_transpose_kernel( - int ndim, - int64_t num_elements, - const T* p, - const int* perm, - const int64_t* in_strides, - const int64_t* out_strides, - T* q) -{ - for (int64_t o_idx = 0; o_idx < num_elements; o_idx++) { - int64_t i_idx = 0; // Initialize the index for the input Tensor element. - int64_t current_o_idx = o_idx; // Calculate the index for the output Tensor element. - - // Iterate over each dimension of the output Tensor. - for (int ii = 0; ii < ndim; ++ii) { - // Calculate the ratio of the current output Tensor index 'current_o_idx' in the current dimension. - const int64_t ratio = current_o_idx / out_strides[ii]; - // Update the output Tensor index 'current_o_idx' by removing the offset in the current dimension. - current_o_idx -= ratio * out_strides[ii]; - // Calculate the offset for the corresponding index position in the input Tensor and accumulate it in 'i_idx'. - i_idx += ratio * in_strides[perm[ii]]; - } - // Check if conjugation is needed. - if (Conjugate) { - // Assign the conjugate value of the input Tensor element at index 'i_idx' to the output Tensor element at index 'o_idx'. - q[o_idx] = kernels::conj(p[i_idx]); - } else { - // Assign the input Tensor element at index 'i_idx' to the output Tensor element at index 'o_idx'. - q[o_idx] = p[i_idx]; - } - } -} - -template -__global__ void do_stride_kernel( - int ndim, - int64_t size, - const T* p, - const int64_t* stride, - const int64_t* in_strides, - const int64_t* out_strides, - T* q) -{ - // Perform stride operation for the specified range [begin, end) in the output Tensor. - for (int64_t o_idx = threadIdx.x; o_idx < size; o_idx += blockDim.x) { - int64_t i_idx = 0; // Initialize the index for the input Tensor element. - int64_t current_o_idx = o_idx; // Calculate the index for the output Tensor element. - // Iterate over each dimension of the output Tensor. - for (int ii = 0; ii < ndim; ++ii) { - // Calculate the index in the current dimension. - // It is natural to view a tensor as a multi-dimentional array. - const int64_t current_dim_idx = current_o_idx / out_strides[ii]; - // Update the output Tensor index 'current_o_idx' by removing the offset in the current dimension. - current_o_idx -= current_dim_idx * out_strides[ii]; - // Calculate the offset for the corresponding index position in the input Tensor and accumulate it in 'i_idx'. - i_idx += current_dim_idx * stride[ii] * in_strides[ii]; - } - // Assign the input Tensor element at index 'i_idx' to the output Tensor element at index 'o_idx'. - q[o_idx] = p[i_idx]; - } -} - -template -__global__ void do_inflate_kernel( - int ndim, - int64_t size, - const T* p, - const int64_t* stride, - const int64_t* in_strides, - const int64_t* out_strides, - T* q) -{ - // Perform stride operation for the specified range [begin, end) in the output Tensor. - for (int64_t o_idx = threadIdx.x; o_idx < size; o_idx += blockDim.x) { - int64_t i_idx = 0; // Initialize the index for the input Tensor element. - int64_t current_o_idx = o_idx; // Calculate the index for the output Tensor element. - bool valid = true; - // Iterate over each dimension of the output Tensor. - for (int ii = 0; ii < ndim; ++ii) { - // Calculte the ratio of the current output Tensor index 'current_o_idx' in the current dimension. - const int64_t current_dim_idx = current_o_idx / out_strides[ii]; - // Update the output Tensor index 'current_o_idx' by removing the offset in the current dimension. - current_o_idx -= current_dim_idx * out_strides[ii]; - // Calculate the offset for the corresponding index position in the input Tensor and accumulate it in 'i_idx'. - if (current_dim_idx % stride[ii] == 0) { - i_idx += (current_dim_idx / stride[ii]) * in_strides[ii]; - } - else { - valid = false; - break; - } - } - // Assign the input Tensor element at index 'i_idx' to the output Tensor element at index 'o_idx'. - q[o_idx] = p[i_idx] * static_cast(valid ? 1.0 : 0.0); - } -} - -template -__global__ void do_reduce_kernel( - int64_t size, - int64_t inner_most_dim, - const T* p, - T* q) -{ - for (int64_t o_idx = threadIdx.x; o_idx < size; o_idx += blockDim.x) { - T sum = 0; - for (int64_t i_idx = o_idx * inner_most_dim; i_idx < inner_most_dim + o_idx * inner_most_dim; i_idx++) { - sum += p[i_idx]; - } - q[o_idx] = sum; - } -} - -template -static std::vector compute_stride(const std::vector& shape) { - int ndims = shape.size(); - std::vector strides(ndims); - T stride = 1; - - auto it = shape.end(); // Start from the last element - for (int ii = ndims - 1; ii >= 0; ii--) { - it--; - strides[ii] = stride; - stride *= static_cast(*it); - } - return std::move(strides); -} - -template -void add::operator()(const int& num_element, const T& alpha, const T* x, const T& beta, const T* y, T* z) { - using Type = typename GetTypeThrust::type; - auto alpha_ = *reinterpret_cast(&alpha); - auto beta_ = *reinterpret_cast(&beta); - const int block = (num_element + THREADS_PER_BLOCK - 1) / THREADS_PER_BLOCK; - do_add_kernel<<>> ( - num_element, alpha_, reinterpret_cast(x), - beta_, reinterpret_cast(y), reinterpret_cast(z)); -} - -template -void mul::operator()(const int& num_element, const T& alpha, const T* x, T* y) { - using Type = typename GetTypeThrust::type; - auto alpha_ = *reinterpret_cast(&alpha); - const int block = (num_element + THREADS_PER_BLOCK - 1) / THREADS_PER_BLOCK; - do_mul_kernel<<>> ( - num_element, alpha_, - reinterpret_cast(x), reinterpret_cast(y)); -} - -template -void mul::operator()(const int& num_element, const T& alpha, const T* x, const T* y, T* z) { - using Type = typename GetTypeThrust::type; - auto alpha_ = *reinterpret_cast(&alpha); - const int block = (num_element + THREADS_PER_BLOCK - 1) / THREADS_PER_BLOCK; - do_mul_kernel<<>> ( - num_element, alpha_, - reinterpret_cast(x), reinterpret_cast(y), reinterpret_cast(z)); -} - -template -void div::operator()(const int& num_element, const T& alpha, const T* x, const T* y, T* z) { - using Type = typename GetTypeThrust::type; - auto alpha_ = *reinterpret_cast(&alpha); - const int block = (num_element + THREADS_PER_BLOCK - 1) / THREADS_PER_BLOCK; - do_div_kernel<<>> ( - num_element, alpha_, reinterpret_cast(x), reinterpret_cast(y), reinterpret_cast(z)); -} - -template -void fma::operator()(const int& num_element, const T& alpha, const T* x, const T* y, const T& beta, const T* z, T* out) { - using Type = typename GetTypeThrust::type; - auto alpha_ = *reinterpret_cast(&alpha); - auto beta_ = *reinterpret_cast(&beta); - const int block = (num_element + THREADS_PER_BLOCK - 1) / THREADS_PER_BLOCK; - do_fma_kernel<<>> ( - num_element, alpha_, reinterpret_cast(x), reinterpret_cast(y), - beta_, reinterpret_cast(z), reinterpret_cast(out)); -} - -template -void transpose::operator()( - const std::vector &perm, - const std::vector &p_shape, - const std::vector &q_shape, - const T *p, - T *q) -{ - using Type = typename GetTypeThrust::type; - - REQUIRES_OK(p_shape.size() == q_shape.size(), - "transpose: p and q must have the same number of dimensions"); - const int ndim = static_cast(p_shape.size()); - auto in_strides = compute_stride(p_shape); - auto out_strides = compute_stride(q_shape); - - int num_elements = 1; - for (int ii = 0; ii < ndim; ++ii) { - num_elements *= static_cast(q_shape[ii]); - } - num_elements = ndim ? num_elements : 0; - - Tensor t_perm(DataType::DT_INT, DeviceType::GpuDevice, {ndim}); - Tensor t_in_strides(DataType::DT_INT64, DeviceType::GpuDevice, {ndim}); - Tensor t_out_strides(DataType::DT_INT64, DeviceType::GpuDevice, {ndim}); - - kernels::synchronize_memory()( - t_perm.data(), perm.data(), perm.size()); - kernels::synchronize_memory()( - t_in_strides.data(), in_strides.data(), in_strides.size()); - kernels::synchronize_memory()( - t_out_strides.data(), out_strides.data(), out_strides.size()); - - const Type* p_ = reinterpret_cast(p); - Type* q_ = reinterpret_cast((q)); - - const int block = (num_elements + THREADS_PER_BLOCK - 1) / THREADS_PER_BLOCK; - do_transpose_kernel<<>> ( - ndim, num_elements, p_, t_perm.data(), - t_in_strides.data(), t_out_strides.data(), q_); -} - -template -void stride::operator()( - const std::vector &stride, - const std::vector &p_shape, - const std::vector &q_shape, - const T *p, - T *q) -{ - using Type = typename GetTypeThrust::type; - - REQUIRES_OK(p_shape.size() == q_shape.size(), - "transpose: p and q must have the same number of dimensions"); - const int ndim = static_cast(p_shape.size()); - auto in_strides = compute_stride(p_shape); - auto out_strides = compute_stride(q_shape); - - int num_elements = 1; - for (int ii = 0; ii < ndim; ++ii) { - num_elements *= static_cast(q_shape[ii]); - } - num_elements = ndim ? num_elements : 0; - - Tensor t_stride(DataType::DT_INT64, DeviceType::GpuDevice, {ndim}); - Tensor t_in_strides(DataType::DT_INT64, DeviceType::GpuDevice, {ndim}); - Tensor t_out_strides(DataType::DT_INT64, DeviceType::GpuDevice, {ndim}); - - kernels::synchronize_memory()( - t_stride.data(), stride.data(), stride.size()); - kernels::synchronize_memory()( - t_in_strides.data(), in_strides.data(), in_strides.size()); - kernels::synchronize_memory()( - t_out_strides.data(), out_strides.data(), out_strides.size()); - - const Type* p_ = reinterpret_cast(p); - Type* q_ = reinterpret_cast((q)); - - const int block = (num_elements + THREADS_PER_BLOCK - 1) / THREADS_PER_BLOCK; - do_stride_kernel<<>> ( - ndim, num_elements, p_, t_stride.data(), t_in_strides.data(), t_out_strides.data(), q_); -} - -template -void inflate::operator()( - const std::vector &inflate, - const std::vector &p_shape, - const std::vector &q_shape, - const T *p, - T *q) -{ - using Type = typename GetTypeThrust::type; - - REQUIRES_OK(p_shape.size() == q_shape.size(), - "transpose: p and q must have the same number of dimensions"); - const int ndim = static_cast(p_shape.size()); - auto in_strides = compute_stride(p_shape); - auto out_strides = compute_stride(q_shape); - - int num_elements = 1; - for (int ii = 0; ii < ndim; ++ii) { - num_elements *= static_cast(q_shape[ii]); - } - num_elements = ndim ? num_elements : 0; - - Tensor t_stride(DataType::DT_INT64, DeviceType::GpuDevice, {ndim}); - Tensor t_in_strides(DataType::DT_INT64, DeviceType::GpuDevice, {ndim}); - Tensor t_out_strides(DataType::DT_INT64, DeviceType::GpuDevice, {ndim}); - - kernels::synchronize_memory()( - t_stride.data(), inflate.data(), inflate.size()); - kernels::synchronize_memory()( - t_in_strides.data(), in_strides.data(), in_strides.size()); - kernels::synchronize_memory()( - t_out_strides.data(), out_strides.data(), out_strides.size()); - - const Type* p_ = reinterpret_cast(p); - Type* q_ = reinterpret_cast((q)); - - const int block = (num_elements + THREADS_PER_BLOCK - 1) / THREADS_PER_BLOCK; - do_inflate_kernel<<>> ( - ndim, num_elements, p_, t_stride.data(), t_in_strides.data(), t_out_strides.data(), q_); -} - -template -void reduce::operator()( - const int64_t &num_element, - const int64_t &inner_most_dim, - const T *p, - T *q) -{ - using Type = typename GetTypeThrust::type; - - const Type* p_ = reinterpret_cast(p); - Type* q_ = reinterpret_cast((q)); - - const int block = (static_cast(num_element) + THREADS_PER_BLOCK - 1) / THREADS_PER_BLOCK; - do_reduce_kernel<<>> ( - num_element, inner_most_dim, p_, q_); -} - -template struct add; -template struct add; -template struct add; -template struct add; -template struct add, DEVICE_GPU>; -template struct add, DEVICE_GPU>; - -template struct mul; -template struct mul; -template struct mul; -template struct mul; -template struct mul, DEVICE_GPU>; -template struct mul, DEVICE_GPU>; - -template struct div; -template struct div; -template struct div; -template struct div; -template struct div, DEVICE_GPU>; -template struct div, DEVICE_GPU>; - -template struct fma; -template struct fma; -template struct fma; -template struct fma; -template struct fma, DEVICE_GPU>; -template struct fma, DEVICE_GPU>; - -template struct transpose; -template struct transpose; -template struct transpose; -template struct transpose; -template struct transpose, DEVICE_GPU>; -template struct transpose, DEVICE_GPU>; - -template struct stride; -template struct stride; -template struct stride; -template struct stride; -template struct stride, DEVICE_GPU>; -template struct stride, DEVICE_GPU>; - -template struct inflate; -template struct inflate; -template struct inflate; -template struct inflate; -template struct inflate, DEVICE_GPU>; -template struct inflate, DEVICE_GPU>; - -template struct reduce; -template struct reduce; -template struct reduce; -template struct reduce; -template struct reduce, DEVICE_GPU>; -template struct reduce, DEVICE_GPU>; - -} // namespace kernels -} // namespace container \ No newline at end of file diff --git a/source/module_base/module_container/ATen/kernels/rocm/memory.hip.cu b/source/module_base/module_container/ATen/kernels/rocm/memory.hip.cu deleted file mode 100644 index b45a7cfd56..0000000000 --- a/source/module_base/module_container/ATen/kernels/rocm/memory.hip.cu +++ /dev/null @@ -1,219 +0,0 @@ -#include -#include - -#include -#include - -namespace container { -namespace kernels { - -template -__global__ void do_set_memory( - T* out, - const T var, - const size_t size) -{ - int idx = blockIdx.x * blockDim.x + threadIdx.x; - if(idx >= size) {return;} - out[idx] = var; -} - -template -__global__ void do_cast_memory( - T_out* out, - const T_in* in, - const int size) -{ - unsigned int idx = blockIdx.x * blockDim.x + threadIdx.x; - if(idx >= size) {return;} - out[idx] = static_cast(in[idx]); -} - -template -__global__ void do_cast_memory( - std::complex* out, - const std::complex* in, - const int size) -{ - unsigned int idx = blockIdx.x * blockDim.x + threadIdx.x; - if(idx >= size) {return;} - auto* _out = reinterpret_cast*>(out); - const auto* _in = reinterpret_cast*>(in); - _out[idx] = static_cast>(_in[idx]); -} - -template -void resize_memory::operator()( - T*& arr, - const size_t& size, - const char* record_in) -{ - if (arr != nullptr) { - delete_memory()(arr); - } - hipMalloc((void **)&arr, sizeof(T) * size); -} - -template -void set_memory::operator()( - T* arr, - const T& var, - const size_t& size) -{ - const int block = (size + THREADS_PER_BLOCK - 1) / THREADS_PER_BLOCK; - do_set_memory<<>>(arr, var, size); -} - -template -struct synchronize_memory { - void operator()( - T *arr_out, - const T *arr_in, - const size_t& size) - { - hipMemcpy(arr_out, arr_in, sizeof(T) * size, hipMemcpyDeviceToHost); - } -}; - -template -struct synchronize_memory { - void operator()( - T *arr_out, - const T *arr_in, - const size_t& size) - { - hipMemcpy(arr_out, arr_in, sizeof(T) * size, hipMemcpyHostToDevice); - } -}; - -template -struct synchronize_memory { - void operator()( - T *arr_out, - const T *arr_in, - const size_t& size) - { - hipMemcpy(arr_out, arr_in, sizeof(T) * size, hipMemcpyDeviceToDevice); - } -}; - -template -struct cast_memory { - void operator()( - T_out* arr_out, - const T_in* arr_in, - const size_t& size) - { - const int block = static_cast((size + THREADS_PER_BLOCK - 1) / THREADS_PER_BLOCK); - do_cast_memory<<>>(arr_out, arr_in, size); - } -}; - - -template -struct cast_memory { - void operator()( - T_out* arr_out, - const T_in* arr_in, - const size_t& size) - { - T_in * arr = nullptr; - hipMalloc((void **)&arr, sizeof(T_in) * size); - hipMemcpy(arr, arr_in, sizeof(T_in) * size, hipMemcpyHostToDevice); - const int block = static_cast((size + THREADS_PER_BLOCK - 1) / THREADS_PER_BLOCK); - do_cast_memory<<>>(arr_out, arr, size); - hipFree(arr); - } -}; - - -template -struct cast_memory { - void operator()( - T_out* arr_out, - const T_in* arr_in, - const size_t& size) - { - auto * arr = (T_in*) malloc(sizeof(T_in) * size); - hipMemcpy(arr, arr_in, sizeof(T_in) * size, hipMemcpyDeviceToHost); - for (int ii = 0; ii < size; ii++) { - arr_out[ii] = static_cast(arr[ii]); - } - free(arr); - } -}; - -template -void delete_memory::operator() ( - T* arr) -{ - hipFree(arr); -} - -template struct resize_memory; -template struct resize_memory; -template struct resize_memory; -template struct resize_memory; -template struct resize_memory, container::DEVICE_GPU>; -template struct resize_memory, container::DEVICE_GPU>; - -template struct set_memory; -template struct set_memory; -template struct set_memory; -template struct set_memory; -template struct set_memory, container::DEVICE_GPU>; -template struct set_memory, container::DEVICE_GPU>; - -template struct synchronize_memory; -template struct synchronize_memory; -template struct synchronize_memory; -template struct synchronize_memory; -template struct synchronize_memory; -template struct synchronize_memory; -template struct synchronize_memory; -template struct synchronize_memory; -template struct synchronize_memory; -template struct synchronize_memory; -template struct synchronize_memory; -template struct synchronize_memory; -template struct synchronize_memory, container::DEVICE_CPU, container::DEVICE_GPU>; -template struct synchronize_memory, container::DEVICE_GPU, container::DEVICE_CPU>; -template struct synchronize_memory, container::DEVICE_GPU, container::DEVICE_GPU>; -template struct synchronize_memory, container::DEVICE_CPU, container::DEVICE_GPU>; -template struct synchronize_memory, container::DEVICE_GPU, container::DEVICE_CPU>; -template struct synchronize_memory, container::DEVICE_GPU, container::DEVICE_GPU>; - -template struct cast_memory; -template struct cast_memory; -template struct cast_memory; -template struct cast_memory; -template struct cast_memory, std::complex, container::DEVICE_GPU, container::DEVICE_GPU>; -template struct cast_memory, std::complex, container::DEVICE_GPU, container::DEVICE_GPU>; -template struct cast_memory, std::complex, container::DEVICE_GPU, container::DEVICE_GPU>; -template struct cast_memory, std::complex, container::DEVICE_GPU, container::DEVICE_GPU>; -template struct cast_memory; -template struct cast_memory; -template struct cast_memory; -template struct cast_memory; -template struct cast_memory, std::complex, container::DEVICE_GPU, container::DEVICE_CPU>; -template struct cast_memory, std::complex, container::DEVICE_GPU, container::DEVICE_CPU>; -template struct cast_memory, std::complex, container::DEVICE_GPU, container::DEVICE_CPU>; -template struct cast_memory, std::complex, container::DEVICE_GPU, container::DEVICE_CPU>; -template struct cast_memory; -template struct cast_memory; -template struct cast_memory; -template struct cast_memory; -template struct cast_memory, std::complex, container::DEVICE_CPU, container::DEVICE_GPU>; -template struct cast_memory, std::complex, container::DEVICE_CPU, container::DEVICE_GPU>; -template struct cast_memory, std::complex, container::DEVICE_CPU, container::DEVICE_GPU>; -template struct cast_memory, std::complex, container::DEVICE_CPU, container::DEVICE_GPU>; - -template struct delete_memory; -template struct delete_memory; -template struct delete_memory; -template struct delete_memory; -template struct delete_memory, container::DEVICE_GPU>; -template struct delete_memory, container::DEVICE_GPU>; - -} // end of namespace kernels -} // end of namespace container \ No newline at end of file diff --git a/source/module_base/module_container/ATen/kernels/test/CMakeLists.txt b/source/module_base/module_container/ATen/kernels/test/CMakeLists.txt deleted file mode 100644 index 2e07d84e6a..0000000000 --- a/source/module_base/module_container/ATen/kernels/test/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -AddTest( - TARGET container_kernels_uts - LIBS parameter ${math_libs} - SOURCES blas_test.cpp lapack_test.cpp - memory_test.cpp linalg_test.cpp -) - -target_link_libraries(container_kernels_uts container base device) \ No newline at end of file diff --git a/source/module_base/module_container/ATen/kernels/test/blas_test.cpp b/source/module_base/module_container/ATen/kernels/test/blas_test.cpp deleted file mode 100644 index a01ef8beb9..0000000000 --- a/source/module_base/module_container/ATen/kernels/test/blas_test.cpp +++ /dev/null @@ -1,325 +0,0 @@ -#include - -#include -#include -#include - -namespace container { -namespace kernels { - -template -class BlasTest : public testing::Test { -public: - BlasTest() { - base::utils::init_blas_handle(); - } - ~BlasTest() override { - base::utils::delete_blas_handle(); - } -}; - -TYPED_TEST_SUITE(BlasTest, base::utils::Types); - -TYPED_TEST(BlasTest, Dot) { - using Type = typename std::tuple_element<0, decltype(TypeParam())>::type; - using Device = typename std::tuple_element<1, decltype(TypeParam())>::type; - - blas_dot dotCalculator; - - const int n = 3; - const Tensor x = std::move(Tensor({static_cast(1.0), static_cast(2.0), static_cast(3.0)}).to_device()); - const Tensor y = std::move(Tensor({static_cast(4.0), static_cast(5.0), static_cast(6.0)}).to_device()); - - Type result = {}; - dotCalculator(n, x.data(), 1, y.data(), 1, &result); - const Type expected = static_cast(32.0); - - EXPECT_EQ(result, expected); -} - -TYPED_TEST(BlasTest, Scal) { - using Type = typename std::tuple_element<0, decltype(TypeParam())>::type; - using Device = typename std::tuple_element<1, decltype(TypeParam())>::type; - - blas_scal scalCalculator; - - const int n = 3; - const Type alpha = static_cast(2.0); - Tensor x = std::move(Tensor({static_cast(1.0), static_cast(2.0), static_cast(3.0)}).to_device()); - - scalCalculator(n, &alpha, x.data(), 1); - const Tensor expected = std::move(Tensor({static_cast(2.0), static_cast(4.0), static_cast(6.0)}).to_device()); - - EXPECT_EQ(x, expected); -} - - -TYPED_TEST(BlasTest, Axpy) { - using Type = typename std::tuple_element<0, decltype(TypeParam())>::type; - using Device = typename std::tuple_element<1, decltype(TypeParam())>::type; - - blas_axpy axpyCalculator; - - const int n = 3; - const Type alpha = static_cast(2.0); - const Tensor x = std::move(Tensor({static_cast(1.0), static_cast(2.0), static_cast(3.0)}).to_device()); - Tensor y = std::move(Tensor({static_cast(4.0), static_cast(5.0), static_cast(6.0)}).to_device()); - - axpyCalculator(n, &alpha, x.data(), 1, y.data(), 1); - const Tensor expected = std::move(Tensor({static_cast(6.0), static_cast(9.0), static_cast(12.0)}).to_device()); - - EXPECT_EQ(y, expected); -} - - -TYPED_TEST(BlasTest, Gemv) { - using Type = typename std::tuple_element<0, decltype(TypeParam())>::type; - using Device = typename std::tuple_element<1, decltype(TypeParam())>::type; - - blas_gemv gemvCalculator; - - const char trans = 'N'; - const int m = 3; - const int n = 2; - const Type alpha = static_cast(2.0); - const Type beta = static_cast(3.0); - const Tensor A = std::move(Tensor({static_cast(1.0), static_cast(2.0), static_cast(3.0), - static_cast(4.0), static_cast(5.0), static_cast(6.0)}).to_device()); - const Tensor x = std::move(Tensor({static_cast(1.0), static_cast(2.0)}).to_device()); - Tensor y = std::move(Tensor({static_cast(1.0), static_cast(2.0), static_cast(3.0)}).to_device()); - - gemvCalculator(trans, m, n, &alpha, A.data(), m, x.data(), 1, &beta, y.data(), 1); - const Tensor expected = std::move(Tensor({static_cast(21.0), static_cast(30.0), static_cast(39.0)}).to_device()); - - EXPECT_EQ(y, expected); -} - - -TYPED_TEST(BlasTest, GemvBatched) { - using Type = typename std::tuple_element<0, decltype(TypeParam())>::type; - using Device = typename std::tuple_element<1, decltype(TypeParam())>::type; - - blas_gemv gemvCalculator; - blas_gemv_batched gemvBatchedCalculator; - - const char trans = 'N'; - const int m = 3; - const int n = 2; - const int batch_size = 2; - const Type alpha = static_cast(2.0); - const Type beta = static_cast(3.0); - - std::vector A = {}; - std::vector x = {}; - std::vector y = {}; - - const Tensor _A = std::move(Tensor({ - static_cast(1.0), static_cast(2.0), - static_cast(3.0), static_cast(4.0), - static_cast(5.0), static_cast(6.0), - - static_cast(7.0), static_cast(8.0), - static_cast(9.0), static_cast(10.0), - static_cast(11.0),static_cast(12.0)}).to_device()); - - A.push_back(_A.data()); - A.push_back(_A.data() + m * n); - - const Tensor _x = std::move(Tensor({static_cast(1.0), static_cast(2.0)}).to_device()); - x.push_back(_x.data()); - x.push_back(_x.data()); - - Tensor _y1 = std::move(Tensor({static_cast(4.0), static_cast(5.0), static_cast(6.0), - static_cast(7.0), static_cast(8.0), static_cast(9.0)}).to_device()); - Tensor _y2 = _y1; - y.push_back(_y1.data()); - y.push_back(_y1.data() + m); - - gemvBatchedCalculator(trans, m, n, &alpha, A.data(), m, x.data(), 1, &beta, y.data(), 1, batch_size); - - for (int ii = 0; ii < batch_size; ++ii) { - gemvCalculator(trans, m, n, &alpha, A[ii], m, x[ii], 1, &beta, _y2.data() + ii * m, 1); - } - - EXPECT_EQ(_y1, _y2); -} - - -TYPED_TEST(BlasTest, GemvBatchedStrided) { - using Type = typename std::tuple_element<0, decltype(TypeParam())>::type; - using Device = typename std::tuple_element<1, decltype(TypeParam())>::type; - - blas_gemv gemvCalculator; - blas_gemv_batched_strided gemvBatchedStridedCalculator; - - const char trans = 'N'; - const int m = 3; - const int n = 2; - const int batch_size = 2; - const Type alpha = static_cast(2.0); - const Type beta = static_cast(3.0); - - std::vector A = {}; - std::vector x = {}; - std::vector y = {}; - - const Tensor _A = std::move(Tensor({ - static_cast(1.0), static_cast(2.0), - static_cast(3.0), static_cast(4.0), - static_cast(5.0), static_cast(6.0), - - static_cast(7.0), static_cast(8.0), - static_cast(9.0), static_cast(10.0), - static_cast(11.0),static_cast(12.0)}).to_device()); - - A.push_back(_A.data()); - A.push_back(_A.data() + m * n); - - const Tensor _x = std::move(Tensor({static_cast(1.0), static_cast(2.0)}).to_device()); - x.push_back(_x.data()); - x.push_back(_x.data()); - - Tensor _y1 = std::move(Tensor({static_cast(4.0), static_cast(5.0), static_cast(6.0), - static_cast(7.0), static_cast(8.0), static_cast(9.0)}).to_device()); - Tensor _y2 = _y1; - y.push_back(_y1.data()); - y.push_back(_y1.data() + m); - - gemvBatchedStridedCalculator(trans, m, n, &alpha, A[0], m, m * n, x[0], 1, 0, &beta, y[0], 1, m, batch_size); - - for (int ii = 0; ii < batch_size; ++ii) { - gemvCalculator(trans, m, n, &alpha, A[ii], m, x[ii], 1, &beta, _y2.data() + ii * m, 1); - } - EXPECT_EQ(_y1, _y2); -} - - -TYPED_TEST(BlasTest, Gemm) { - using Type = typename std::tuple_element<0, decltype(TypeParam())>::type; - using Device = typename std::tuple_element<1, decltype(TypeParam())>::type; - - blas_gemm gemmCalculator; - - const char trans = 'N'; - const int m = 3; - const int n = 2; - const Type alpha = static_cast(2.0); - const Type beta = static_cast(3.0); - const Tensor A = std::move(Tensor({static_cast(1.0), static_cast(2.0), static_cast(3.0), - static_cast(4.0), static_cast(5.0), static_cast(6.0)}).to_device()); - const Tensor x = std::move(Tensor({static_cast(1.0), static_cast(2.0)}).to_device()); - Tensor y = std::move(Tensor({static_cast(1.0), static_cast(2.0), static_cast(3.0)}).to_device()); - - gemmCalculator(trans, trans, m, 1, n, &alpha, A.data(), m, x.data(), n, &beta, y.data(), m); - const Tensor expected = std::move(Tensor({static_cast(21.0), static_cast(30.0), static_cast(39.0)}).to_device()); - - EXPECT_EQ(y, expected); -} - - -TYPED_TEST(BlasTest, GemmBatched) { - using Type = typename std::tuple_element<0, decltype(TypeParam())>::type; - using Device = typename std::tuple_element<1, decltype(TypeParam())>::type; - - blas_gemv_batched gemvBatchedCalculator; - blas_gemm_batched gemmBatchedCalculator; - - const char trans = 'N'; - const int m = 3; - const int n = 2; - const int batch_size = 2; - const Type alpha = static_cast(2.0); - const Type beta = static_cast(3.0); - - std::vector A = {}; - std::vector x = {}; - std::vector y1 = {}; - std::vector y2 = {}; - - const Tensor _A = std::move(Tensor({ - static_cast(1.0), static_cast(2.0), - static_cast(3.0), static_cast(4.0), - static_cast(5.0), static_cast(6.0), - - static_cast(7.0), static_cast(8.0), - static_cast(9.0), static_cast(10.0), - static_cast(11.0),static_cast(12.0)}).to_device()); - - A.push_back(_A.data()); - A.push_back(_A.data() + m * n); - - const Tensor _x = std::move(Tensor({static_cast(1.0), static_cast(2.0)}).to_device()); - x.push_back(_x.data()); - x.push_back(_x.data()); - - Tensor _y1 = std::move(Tensor({static_cast(4.0), static_cast(5.0), static_cast(6.0), - static_cast(7.0), static_cast(8.0), static_cast(9.0)}).to_device()); - Tensor _y2 = _y1; - y1.push_back(_y1.data()); - y1.push_back(_y1.data() + m); - y2.push_back(_y2.data()); - y2.push_back(_y2.data() + m); - - gemvBatchedCalculator(trans, m, n, &alpha, A.data(), m, x.data(), 1, &beta, y1.data(), 1, batch_size); - gemmBatchedCalculator(trans, trans, m, 1, n, &alpha, A.data(), m, x.data(), n, &beta, y2.data(), m, batch_size); - - EXPECT_EQ(_y1, _y2); -} - - -TYPED_TEST(BlasTest, GemmBatchedStrided) { - using Type = typename std::tuple_element<0, decltype(TypeParam())>::type; - using Device = typename std::tuple_element<1, decltype(TypeParam())>::type; - - blas_gemv_batched_strided gemvBatchedStridedCalculator; - blas_gemm_batched_strided gemmBatchedStridedCalculator; - - const char trans = 'N'; - const int m = 3; - const int n = 2; - const int batch_size = 2; - const Type alpha = static_cast(2.0); - const Type beta = static_cast(3.0); - - std::vector A = {}; - std::vector x = {}; - std::vector y1 = {}; - std::vector y2 = {}; - - const Tensor _A = std::move(Tensor({ - static_cast(1.0), static_cast(2.0), - static_cast(3.0), static_cast(4.0), - static_cast(5.0), static_cast(6.0), - - static_cast(7.0), static_cast(8.0), - static_cast(9.0), static_cast(10.0), - static_cast(11.0),static_cast(12.0)}).to_device()); - - A.push_back(_A.data()); - A.push_back(_A.data() + m * n); - - const Tensor _x = std::move(Tensor({static_cast(1.0), static_cast(2.0)}).to_device()); - x.push_back(_x.data()); - x.push_back(_x.data()); - - Tensor _y1 = std::move(Tensor({static_cast(4.0), static_cast(5.0), static_cast(6.0), - static_cast(7.0), static_cast(8.0), static_cast(9.0)}).to_device()); - Tensor _y2 = _y1; - y1.push_back(_y1.data()); - y1.push_back(_y1.data() + m); - y2.push_back(_y2.data()); - y2.push_back(_y2.data() + m); - - gemvBatchedStridedCalculator(trans, m, n, &alpha, A[0], m, m * n, x[0], 1, 0, &beta, y1[0], 1, m, batch_size); - gemmBatchedStridedCalculator(trans, trans, m, 1, n, &alpha, A[0], m, m * n, x[0], n, 0, &beta, y2[0], m, m, batch_size); - - EXPECT_EQ(_y1, _y2); -} - -} // namespace op -} // namespace container - -int main(int argc, char** argv) { - ::testing::InitGoogleTest(&argc, argv); - return RUN_ALL_TESTS(); -} diff --git a/source/module_base/module_container/ATen/kernels/test/lapack_test.cpp b/source/module_base/module_container/ATen/kernels/test/lapack_test.cpp deleted file mode 100644 index f9998c018c..0000000000 --- a/source/module_base/module_container/ATen/kernels/test/lapack_test.cpp +++ /dev/null @@ -1,193 +0,0 @@ -#include - -#include -#include -#include - -namespace container { -namespace kernels { - -template -class LapackTest : public testing::Test { -public: - LapackTest() { - base::utils::init_blas_handle(); - base::utils::init_cusolver_handle(); - } - ~LapackTest() override { - base::utils::delete_blas_handle(); - base::utils::delete_cusolver_handle(); - } -}; - -TYPED_TEST_SUITE(LapackTest, base::utils::Types); - -TYPED_TEST(LapackTest, Trtri) { - using Type = typename std::tuple_element<0, decltype(TypeParam())>::type; - using Device = DEVICE_CPU; - - blas_gemm gemmCalculator; - lapack_trtri trtriCalculator; - - const int dim = 3; - Tensor A = std::move(Tensor({static_cast(1.0), static_cast(2.0), static_cast(3.0), - static_cast(0.0), static_cast(4.0), static_cast(5.0), - static_cast(0.0), static_cast(0.0), static_cast(6.0)}).to_device()); - - Tensor I = std::move(Tensor({static_cast(1.0), static_cast(0.0), static_cast(0.0), - static_cast(0.0), static_cast(1.0), static_cast(0.0), - static_cast(0.0), static_cast(0.0), static_cast(1.0)}).to_device()); - Tensor B = A; - Tensor C = B; - C.zero(); - - const char trans = 'N'; - const int m = 3; - const int n = 3; - const int k = 3; - const Type alpha = static_cast(1.0); - const Type beta = static_cast(0.0); - // Note all blas and lapack operators within container are column major! - // For this reason, we should employ 'L' instead of 'U' in the subsequent line. - trtriCalculator('L', 'N', dim, B.data(), dim); - gemmCalculator(trans, trans, m, n, k, &alpha, B.data(), k, A.data(), n, &beta, C.data(), n); - - EXPECT_EQ(C, I); -} - -TYPED_TEST(LapackTest, Potrf) { - - return; - using Type = typename std::tuple_element<0, decltype(TypeParam())>::type; - using Device = typename std::tuple_element<1, decltype(TypeParam())>::type; - - blas_gemm gemmCalculator; - lapack_potrf potrfCalculator; - set_matrix setMatrixCalculator; - - const int dim = 3; - Tensor A = std::move(Tensor({static_cast(4.0), static_cast(1.0), static_cast(2.0), - static_cast(1.0), static_cast(5.0), static_cast(3.0), - static_cast(2.0), static_cast(3.0), static_cast(6.0)}).to_device()); - - Tensor B = A; - Tensor C = B; - C.zero(); - - const char transa = 'N'; - const char transb = 'C'; - const int m = 3; - const int n = 3; - const int k = 3; - const Type alpha = static_cast(1.0); - const Type beta = static_cast(0.0); - // Note all blas and lapack operators within container are column major! - // For this reason, we should employ 'L' instead of 'U' in the subsequent line. - potrfCalculator('L', dim, B.data(), dim); - // Keep the upper triangle of B - setMatrixCalculator('U', B.data(), dim); - // A = U**T * U - gemmCalculator(transa, transb, m, n, k, &alpha, B.to_device().data(), k, B.to_device().data(), n, &beta, C.to_device().data(), n); - - EXPECT_EQ(A, C); -} - -TYPED_TEST(LapackTest, dnevd) { - using Type = typename std::tuple_element<0, decltype(TypeParam())>::type; - using Real = typename GetTypeReal::type; - using Device = typename std::tuple_element<1, decltype(TypeParam())>::type; - - blas_gemm gemmCalculator; - blas_axpy axpyCalculator; - lapack_dnevd dnevdCalculator; - - const int dim = 3; - Tensor A = std::move(Tensor({static_cast(4.0), static_cast(1.0), static_cast(1.0), - static_cast(1.0), static_cast(5.0), static_cast(3.0), - static_cast(1.0), static_cast(3.0), static_cast(6.0)}).to_device()); - - Tensor E = std::move(Tensor({static_cast(0.0), static_cast(0.0), static_cast(0.0)}).to_device()); - Tensor B = A; - Tensor expected_C1 = A; - Tensor expected_C2 = A; - expected_C1.zero(); - expected_C2.zero(); - - const char trans = 'N'; - const int m = 3; - const int n = 3; - const int k = 3; - const Type alpha = static_cast(1.0); - const Type beta = static_cast(0.0); - // Note all blas and lapack operators within container are column major! - // For this reason, we should employ 'L' instead of 'U' in the subsequent line. - dnevdCalculator('V', 'U', B.data(), dim, E.data()); - - E = E.to_device(); - const Tensor Alpha = std::move(Tensor({ - static_cast(E.data()[0]), - static_cast(E.data()[1]), - static_cast(E.data()[2])})); - - // Check the eigenvalues and eigenvectors - // A * x = lambda * x - gemmCalculator(trans, trans, m, n, k, &alpha, A.data(), m, B.data(), k, &beta, expected_C1.data(), m); - for (int ii = 0; ii < dim; ii++) { - axpyCalculator(dim, Alpha.data() + ii, B.data() + ii * dim, 1, expected_C2.data() + ii * dim, 1); - } - EXPECT_EQ(expected_C1, expected_C2); -} - - -TYPED_TEST(LapackTest, dngvd) { - using Type = typename std::tuple_element<0, decltype(TypeParam())>::type; - using Real = typename GetTypeReal::type; - using Device = typename std::tuple_element<1, decltype(TypeParam())>::type; - - blas_gemm gemmCalculator; - blas_axpy axpyCalculator; - lapack_dngvd dngvdCalculator; - - const int dim = 3; - Tensor A = std::move(Tensor({static_cast(4.0), static_cast(1.0), static_cast(1.0), - static_cast(1.0), static_cast(5.0), static_cast(3.0), - static_cast(1.0), static_cast(3.0), static_cast(6.0)}).to_device()); - - Tensor I = std::move(Tensor({static_cast(1.0), static_cast(0.0), static_cast(0.0), - static_cast(0.0), static_cast(1.0), static_cast(0.0), - static_cast(0.0), static_cast(0.0), static_cast(1.0)}).to_device()); - - Tensor E = std::move(Tensor({static_cast(0.0), static_cast(0.0), static_cast(0.0)}).to_device()); - Tensor B = A; - Tensor expected_C1 = A; - Tensor expected_C2 = A; - expected_C1.zero(); - expected_C2.zero(); - - const char trans = 'N'; - const int m = 3; - const int n = 3; - const int k = 3; - const Type alpha = static_cast(1.0); - const Type beta = static_cast(0.0); - // Note al(), I.data(), dim, E.data()); - - E = E.to_device(); - const Tensor Alpha = std::move(Tensor({ - static_cast(E.data()[0]), - static_cast(E.data()[1]), - static_cast(E.data()[2])})); - - // Check the eigenvalues and eigenvectors - // A * x = lambda * x - gemmCalculator(trans, trans, m, n, k, &alpha, A.data(), m, B.data(), k, &beta, expected_C1.data(), m); - for (int ii = 0; ii < dim; ii++) { - axpyCalculator(dim, Alpha.data() + ii, B.data() + ii * dim, 1, expected_C2.data() + ii * dim, 1); - } - EXPECT_EQ(expected_C1, expected_C2); -} - -} // namespace op -} // namespace container diff --git a/source/module_base/module_container/ATen/kernels/test/linalg_test.cpp b/source/module_base/module_container/ATen/kernels/test/linalg_test.cpp deleted file mode 100644 index 8b0afe634f..0000000000 --- a/source/module_base/module_container/ATen/kernels/test/linalg_test.cpp +++ /dev/null @@ -1,207 +0,0 @@ -#include - -#include -#include -#include - -namespace container { -namespace kernels { - -template -class LinalgTest : public testing::Test { -public: - LinalgTest() = default; - - ~LinalgTest() override = default; -}; - -TYPED_TEST_SUITE(LinalgTest, base::utils::Types); - -TYPED_TEST(LinalgTest, Add) { - using Type = typename std::tuple_element<0, decltype(TypeParam())>::type; - using Device = typename std::tuple_element<1, decltype(TypeParam())>::type; - - Tensor A = std::move( - Tensor({static_cast(1.0), static_cast(2.0), static_cast(3.0), - static_cast(4.0), static_cast(5.0), static_cast(6.0), - static_cast(7.0), static_cast(8.0), static_cast(9.0)}).to_device()); - Tensor B = std::move( - Tensor({static_cast(1.0), static_cast(2.0), static_cast(3.0), - static_cast(4.0), static_cast(5.0), static_cast(6.0), - static_cast(7.0), static_cast(8.0), static_cast(9.0)}).to_device()); - - Tensor expected = std::move( - Tensor({static_cast(3.0), static_cast(6.0), static_cast(9.0), - static_cast(12.0), static_cast(15.0), static_cast(18.0), - static_cast(21.0), static_cast(24.0), static_cast(27.0)}).to_device()); - Tensor result = Tensor(expected.data_type(), expected.device_type(), expected.shape()); - kernels::add()( - A.NumElements(), static_cast(2.0), A.data(), static_cast(1.0), B.data(), result.data()); - EXPECT_EQ(result, expected); -} - -TYPED_TEST(LinalgTest, Mul) { - using Type = typename std::tuple_element<0, decltype(TypeParam())>::type; - using Device = typename std::tuple_element<1, decltype(TypeParam())>::type; - - Tensor A = std::move( - Tensor({static_cast(1.0), static_cast(2.0), static_cast(3.0), - static_cast(4.0), static_cast(5.0), static_cast(6.0), - static_cast(7.0), static_cast(8.0), static_cast(9.0)}).to_device()); - Tensor B = std::move( - Tensor({static_cast(1.0), static_cast(2.0), static_cast(3.0), - static_cast(4.0), static_cast(5.0), static_cast(6.0), - static_cast(7.0), static_cast(8.0), static_cast(9.0)}).to_device()); - - Tensor expected = std::move( - Tensor({static_cast(1.0), static_cast(4.0), static_cast(9.0), - static_cast(16.0), static_cast(25.0), static_cast(36.0), - static_cast(49.0), static_cast(64.0), static_cast(81.0)}).to_device()); - Tensor result = Tensor(expected.data_type(), expected.device_type(), expected.shape()); - kernels::mul()( - A.NumElements(), static_cast(1.0), A.data(), B.data(), result.data()); - EXPECT_EQ(result, expected); -} - -TYPED_TEST(LinalgTest, Div) { - using Type = typename std::tuple_element<0, decltype(TypeParam())>::type; - using Device = typename std::tuple_element<1, decltype(TypeParam())>::type; - - Tensor A = std::move( - Tensor({static_cast(1.0), static_cast(2.0), static_cast(3.0), - static_cast(4.0), static_cast(5.0), static_cast(6.0), - static_cast(7.0), static_cast(8.0), static_cast(9.0)}).to_device()); - Tensor B = std::move( - Tensor({static_cast(1.0), static_cast(2.0), static_cast(3.0), - static_cast(4.0), static_cast(5.0), static_cast(6.0), - static_cast(7.0), static_cast(8.0), static_cast(9.0)}).to_device()); - - Tensor expected = std::move( - Tensor({static_cast(1.0), static_cast(1.0), static_cast(1.0), - static_cast(1.0), static_cast(1.0), static_cast(1.0), - static_cast(1.0), static_cast(1.0), static_cast(1.0)}).to_device()); - - Tensor result = Tensor(expected.data_type(), expected.device_type(), expected.shape()); - kernels::div()( - A.NumElements(), static_cast(1.0), A.data(), B.data(), result.data()); - EXPECT_EQ(result, expected); -} - -TYPED_TEST(LinalgTest, Fma) { - using Type = typename std::tuple_element<0, decltype(TypeParam())>::type; - using Device = typename std::tuple_element<1, decltype(TypeParam())>::type; - - Tensor A = std::move( - Tensor({static_cast(1.0), static_cast(2.0), static_cast(3.0), - static_cast(4.0), static_cast(5.0), static_cast(6.0), - static_cast(7.0), static_cast(8.0), static_cast(9.0)}).to_device()); - Tensor B = std::move( - Tensor({static_cast(1.0), static_cast(2.0), static_cast(3.0), - static_cast(4.0), static_cast(5.0), static_cast(6.0), - static_cast(7.0), static_cast(8.0), static_cast(9.0)}).to_device()); - Tensor C = std::move( - Tensor({static_cast(1.0), static_cast(2.0), static_cast(3.0), - static_cast(4.0), static_cast(5.0), static_cast(6.0), - static_cast(7.0), static_cast(8.0), static_cast(9.0)}).to_device()); - - Tensor expected = std::move( - Tensor({static_cast(5.0), static_cast(14.0), static_cast(27.0), - static_cast(44.0), static_cast(65.0), static_cast(90.0), - static_cast(119.0), static_cast(152.0), static_cast(189.0)}).to_device()); - - Tensor result = Tensor(expected.data_type(), expected.device_type(), expected.shape()); - kernels::fma()( - A.NumElements(), static_cast(2.0), A.data(), B.data(), static_cast(3.0), C.data(), result.data()); - EXPECT_EQ(result, expected); -} - -TYPED_TEST(LinalgTest, Transpose) { - using Type = typename std::tuple_element<0, decltype(TypeParam())>::type; - using Device = typename std::tuple_element<1, decltype(TypeParam())>::type; - - Tensor A = std::move( - Tensor({static_cast(1.0), static_cast(2.0), static_cast(3.0), - static_cast(4.0), static_cast(5.0), static_cast(6.0), - static_cast(7.0), static_cast(8.0), static_cast(9.0)}).to_device()); - A.reshape({3, 3}); - Tensor A_transpose = A; - Tensor expected = std::move( - Tensor({static_cast(1.0), static_cast(4.0), static_cast(7.0), - static_cast(2.0), static_cast(5.0), static_cast(8.0), - static_cast(3.0), static_cast(6.0), static_cast(9.0)}).to_device()); - expected.reshape({3, 3}); - std::vector perm = {1, 0}; - - kernels::transpose()( - perm, A.shape().dims(), A_transpose.shape().dims(), A.data(), A_transpose.data()); - EXPECT_EQ(A_transpose, expected); -} - - -TYPED_TEST(LinalgTest, Stride) { - using Type = typename std::tuple_element<0, decltype(TypeParam())>::type; - using Device = typename std::tuple_element<1, decltype(TypeParam())>::type; - - Tensor A = std::move( - Tensor({static_cast(1.0), static_cast(2.0), static_cast(3.0), - static_cast(4.0), static_cast(5.0), static_cast(6.0), - static_cast(7.0), static_cast(8.0), static_cast(9.0)}).to_device()); - A.reshape({-1}); - Tensor expected = std::move( - Tensor({static_cast(1.0), static_cast(5.0), static_cast(9.0)}).to_device()); - expected.reshape({-1}); - Tensor A_stride = expected; - A_stride.zero(); - std::vector stride = {4}; - - kernels::stride()( - stride, A.shape().dims(), A_stride.shape().dims(), A.data(), A_stride.data()); - EXPECT_EQ(A_stride, expected); -} - - -TYPED_TEST(LinalgTest, Inflate) { - using Type = typename std::tuple_element<0, decltype(TypeParam())>::type; - using Device = typename std::tuple_element<1, decltype(TypeParam())>::type; - - Tensor expected = std::move( - Tensor({static_cast(1.0), static_cast(0.0), static_cast(0.0), - static_cast(0.0), static_cast(5.0), static_cast(0.0), - static_cast(0.0), static_cast(0.0), static_cast(9.0)}).to_device()); - expected.reshape({-1}); - Tensor A = std::move( - Tensor({static_cast(1.0), static_cast(5.0), static_cast(9.0)}).to_device()); - A.reshape({-1}); - Tensor A_inflate = expected; - A_inflate.zero(); - std::vector inflate = {4}; - - kernels::inflate()( - inflate, A.shape().dims(), A_inflate.shape().dims(), A.data(), A_inflate.data()); - EXPECT_EQ(A_inflate, expected); -} - - -TYPED_TEST(LinalgTest, Reduce) { - using Type = typename std::tuple_element<0, decltype(TypeParam())>::type; - using Device = typename std::tuple_element<1, decltype(TypeParam())>::type; - - Tensor A = std::move( - Tensor({static_cast(1.0), static_cast(2.0), static_cast(3.0), - static_cast(4.0), static_cast(5.0), static_cast(6.0), - static_cast(7.0), static_cast(8.0), static_cast(9.0)}).to_device()); - A.reshape({3, 3}); - Tensor expected = std::move( - Tensor({static_cast(6.0), static_cast(15.0), static_cast(24.0)}).to_device()); - expected.reshape({-1}); - Tensor A_reduce = expected; - A_reduce.zero(); - int64_t inner_most_dim = 3; - - kernels::reduce()( - A_reduce.NumElements(), inner_most_dim, A.data(), A_reduce.data()); - EXPECT_EQ(A_reduce, expected); -} - -} // namespace kernels -} // namespace container \ No newline at end of file diff --git a/source/module_base/module_container/ATen/kernels/test/memory_test.cpp b/source/module_base/module_container/ATen/kernels/test/memory_test.cpp deleted file mode 100644 index e8943ae610..0000000000 --- a/source/module_base/module_container/ATen/kernels/test/memory_test.cpp +++ /dev/null @@ -1,76 +0,0 @@ -#include - -#include -#include -#include -#include - -namespace container { -namespace kernels { - -template -class MemoryTest : public testing::Test { -public: - MemoryTest() = default; - ~MemoryTest() override = default; -}; - -TYPED_TEST_SUITE(MemoryTest, base::utils::Types); - -TYPED_TEST(MemoryTest, ResizeAndSynchronizeMemory) { - using Type = typename std::tuple_element<0, decltype(TypeParam())>::type; - using Device = typename std::tuple_element<1, decltype(TypeParam())>::type; - - kernels::resize_memory resizeMemory; - kernels::synchronize_memory syncMemoryDeviceToHost; - kernels::synchronize_memory syncMemoryHostToDevice; - - Tensor A = std::move(Tensor({static_cast(1.0), static_cast(2.0), static_cast(3.0)}).to_device()); - - Type* d_B = nullptr; - resizeMemory(d_B, 3, "B"); - Tensor B = std::move(TensorMap(d_B, A.data_type(), A.device_type(), {3})); - B.zero(); - - syncMemoryDeviceToHost(B.data(), A.data(), 3); - EXPECT_EQ(A, B); - - A.zero(); - syncMemoryHostToDevice(A.data(), B.data(), 3); - EXPECT_EQ(A, B); -} - -TYPED_TEST(MemoryTest, SetMemory) { - using Type = typename std::tuple_element<0, decltype(TypeParam())>::type; - using Device = typename std::tuple_element<1, decltype(TypeParam())>::type; - - kernels::set_memory setMemory; - - Tensor A = std::move(Tensor({static_cast(1.0), static_cast(2.0), static_cast(3.0)}).to_device()); - Tensor B = A; - - A.zero(); - setMemory(B.data(), 0, 3); - EXPECT_EQ(A, B); -} - -TYPED_TEST(MemoryTest, CastAndDeleteMemory) { - using Type = std::complex::type>::type>; - using Device = typename std::tuple_element<1, decltype(TypeParam())>::type; - - kernels::delete_memory, DEVICE_CPU> deleteMemory; - kernels::cast_memory, Type, DEVICE_CPU, Device> castMemory_H2D_D2S; - - Tensor A = std::move(Tensor({static_cast(1.0), static_cast(2.0), static_cast(3.0)}).to_device()); - Tensor B = A.to_device().cast>(); - - auto * d_A = (std::complex*)malloc(sizeof(std::complex) * 3); - castMemory_H2D_D2S(d_A, A.data(), 3); - Tensor C = std::move(TensorMap(d_A, B.data_type(), B.device_type(), {3})); - - EXPECT_EQ(B, C); - deleteMemory(d_A); -} - -} // namespace op -} // namespace container diff --git a/source/module_base/module_container/ATen/ops/CMakeLists.txt b/source/module_base/module_container/ATen/ops/CMakeLists.txt deleted file mode 100644 index a468f6f428..0000000000 --- a/source/module_base/module_container/ATen/ops/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -file(GLOB ATen_OPS_SRCS "*.cpp") - -set(ATen_CPU_SRCS ${ATen_CPU_SRCS} ${ATen_OPS_SRCS} PARENT_SCOPE) - -if(BUILD_TESTING) - if(ENABLE_MPI) - add_subdirectory(test) - endif() -endif() \ No newline at end of file diff --git a/source/module_base/module_container/ATen/ops/einsum_op.cpp b/source/module_base/module_container/ATen/ops/einsum_op.cpp deleted file mode 100644 index 40440db940..0000000000 --- a/source/module_base/module_container/ATen/ops/einsum_op.cpp +++ /dev/null @@ -1,1048 +0,0 @@ -#include - -#include -#include - -#include -#include -#include - -namespace container { -namespace einsum_utils { - -struct BCast { - public: - - bool valid = true; - bool requires_broadcast = false; - - int64_t x_batch_size = 1; // input a batch size - int64_t y_batch_size = 1; // input b batch size - int64_t z_batch_size = 1; // output c batch size - - std::vector x_batch_shape = {}; // input a shape - std::vector y_batch_shape = {}; // input b shape - std::vector z_batch_shape = {}; // output c shape - - std::vector x_bcast_shape = {}; // input a bcast shape - std::vector y_bcast_shape = {}; // input b bcast shape - - static void reverse(std::vector& vec) { - std::reverse(vec.begin(), vec.end()); - } -}; - -// Do some initialization work for bcast dimensions -static BCast prepare_bcast( - const std::vector& x_, - const std::vector& y_) -{ - const std::vector x(x_.begin(), x_.end() - 2); - const std::vector y(y_.begin(), y_.end() - 2); - - // Safely multiplies dimensions taking into account symbolic shapes. - auto mul_dims = [](int64_t dim1, int64_t dim2) -> int64_t { - if (dim1 != 0 && dim2 != 0 && (dim1 < 0 || dim2 < 0)) { - return -1; - } - return dim1 * dim2; - }; - - BCast bcast = {}; - bool all_equal = x == y; - size_t lagest_batch_rank = std::max(x.size(), y.size()); - - // calculate the all_equal and lagest_rank - // There can be at most two operands, so we can use a 2 for loop size - if (all_equal) { - bcast.requires_broadcast = false; - // Fast path for common case of identical shapes. - int64_t batch_size = 1; - const int rank = x.size(); - for (int ii = 0; ii < rank; ++ii) { - bcast.z_batch_shape.resize(rank); - for (int ii = 0; ii < x.size(); ii++) { - bcast.z_batch_shape[ii] = x[ii]; - batch_size = mul_dims(batch_size, x[ii]); - } - } - bcast.x_bcast_shape.push_back(1); - bcast.y_bcast_shape.push_back(1); - bcast.x_batch_shape.push_back(batch_size); - bcast.y_batch_shape.push_back(batch_size); - bcast.z_batch_size = batch_size; - bcast.x_batch_size = TensorShape(bcast.x_batch_shape).NumElements(); - bcast.y_batch_size = TensorShape(bcast.y_batch_shape).NumElements(); - return std::move(bcast); - } - - std::vector inv_x = x; - std::vector inv_y = y; - BCast::reverse(inv_x); - BCast::reverse(inv_y); - - // 1-extend and align all vectors. - inv_x.resize(lagest_batch_rank, 1); - inv_y.resize(lagest_batch_rank, 1); - - // going through each dimension starting from the inner-most - // dimension, compares dimension of x and y. They are compatible if - // they are equal or either is 1. - - // indices of j-th component of each input. - int64_t output_dim = -1; - bool x_prev_is_one = false, y_prev_is_one = false; - bool x_current_is_one = false, y_current_is_one = false; - bool output_dim_set = false, none_is_one = true, set_one = false; - for (int ii = 0; ii < lagest_batch_rank; ii++) { - // Pre condition setting - output_dim = -1; - output_dim_set = false; - none_is_one = true; - if (inv_x[ii] == 1) { - none_is_one = false; - x_current_is_one = true; - } - else { - x_current_is_one = false; - output_dim = inv_x[ii]; - output_dim_set = true; - } - if (inv_x[ii] == 1) { - none_is_one = false; - y_current_is_one = true; - } - else { - y_current_is_one = false; - if (!output_dim_set || output_dim == inv_y[ii]) { - output_dim = inv_y[ii]; - output_dim_set = true; - } - else { - bcast.valid = false; - return std::move(bcast); - } - } - bcast.z_batch_shape.push_back(output_dim_set ? output_dim : 1); - bcast.z_batch_size = mul_dims(bcast.z_batch_size, bcast.z_batch_shape.back()); - - // All dimensions are 1 - if (!output_dim_set) { - // This will skip updating the previous state to the current one. We'll - // explain why this is safe below. - // Consider the previous state P, current state C and the next state N. - // In the case where N also is all ones (N == C), we'll do the same - // optimization here (push back one dimensions if we need to), which is - // safe and is expected. - // - // When N != C, we'll continue as usual. However, we might trigger the - // next block if N == P (because we didn't update the previous state). - // We trigger the next block if `fewer_dims_optimization` is true. - // This means that we did not modify and broadcast / reshapes in this - // block (we skipped updating, since the one dimensions can be ignored). - // In essence, we only need to check whether the previous non-one state is - // equal to the current non-one state. - continue; - } - else if (x_current_is_one == x_prev_is_one && y_current_is_one == y_prev_is_one && set_one) { - // fewer_dims_optimization - // If the previous state is the same as the current state, we can skip - // broadcasting / reshaping. This is because we can ignore dimensions of - // size 1. This is safe because we know that the previous state is not - // all ones (otherwise we would have continued in the previous block). - - // It is a run of the same broadcasting case as last time. - // We can reshape the input so that fewer dimensions - // are involved in the intermediate computation. - bcast.x_batch_shape.back() = mul_dims(bcast.x_batch_shape.back(), inv_x[ii]); - bcast.y_batch_shape.back() = mul_dims(bcast.y_batch_shape.back(), inv_y[ii]); - - bcast.x_bcast_shape.back() = mul_dims(bcast.x_bcast_shape.back(), x_current_is_one ? output_dim : 1); - bcast.y_bcast_shape.back() = mul_dims(bcast.y_bcast_shape.back(), y_current_is_one ? output_dim : 1); - } - else { - bcast.x_batch_shape.push_back(inv_x[ii]); - bcast.y_batch_shape.push_back(inv_y[ii]); - - bcast.x_bcast_shape.push_back(x_current_is_one ? output_dim : 1); - bcast.y_bcast_shape.push_back(y_current_is_one ? output_dim : 1); - } - set_one = true; - x_prev_is_one = x_current_is_one; - y_prev_is_one = y_current_is_one; - } - if (bcast.x_batch_shape.empty()) { - bcast.x_batch_shape.push_back(1); - bcast.x_bcast_shape.push_back(1); - } - if (bcast.y_batch_shape.empty()) { - bcast.y_batch_shape.push_back(1); - bcast.y_bcast_shape.push_back(1); - } - - // Do something about batches - BCast::reverse(bcast.x_batch_shape); - BCast::reverse(bcast.x_bcast_shape); - BCast::reverse(bcast.y_batch_shape); - BCast::reverse(bcast.y_bcast_shape); - BCast::reverse(bcast.z_batch_shape); - - // Init batch_sizes - bcast.x_batch_size = TensorShape(bcast.x_batch_shape).NumElements(); - bcast.y_batch_size = TensorShape(bcast.y_batch_shape).NumElements(); - return std::move(bcast); -} - -static inline int64_t IPow(int64_t base, int64_t exponent) { - int64_t result = 1; - for (int64_t ii = 0; ii < exponent; ++ii) { - result *= base; - } - return result; -} - -// Returns a reshaped input Tensor. The underlying buffer is not copied. -// Note: This method will not allocate memory for output tensor, -// intead use the reference of the input buffer. -static inline bool CopyFrom(const Tensor& input, const TensorShape& shape, Tensor* output) { - return output->CopyFrom(input, shape); -} - -// Note: This method will allocate memory with the given shape for output tensor, -// also keep the data_type, device_type consistant with the input tensor. -static inline bool CopyFromWithAllocate(const Tensor& input, const TensorShape& shape, Tensor* output) { - return output->AllocateFrom(input, shape); -} - -// Reshapes a Tensor of shape [b0,b1...bk,N,M] to [prod(b0,b1...bk),N,M]. -static bool ReshapeToRank3(Tensor& input, int batch_size, Tensor& output) -{ - const int rank = input.shape().ndim(); - TensorShape output_shape = {batch_size, input.shape().dim_size(rank - 2), - input.shape().dim_size(rank - 1)}; - return CopyFrom(input, output_shape, &output); -} - -template -static inline bool all_of( - const std::vector& vec, - const std::function& predicate) -{ - for (const auto& element : vec) { - if (!predicate(element)) { - return false; - } - } - return true; -} - -// If there are repeated labels in either the input or output, then this -// strides the input (e.g. iii->i) or inflates it (e.g. i->iii), respectively. -static bool StrideOrInflateOperand( - Tensor& input, - const std::vector& labels, - const std::vector& label_counts, - const bool should_inflate, - Tensor& output) // output is the result of stride or inflate -{ - // Return early if there are no repeated indices. - if (all_of(label_counts, [](int var) {return var <= 1;})) { - return CopyFrom(input, input.shape(), &output); - } - - // We reshape so that each repeated label is compressed to one dimension. - // E.g. For iiij -> ij, The shape [3, 3, 3, 5] would be compressed to [27, - // 5]. Striding appropriately (in this case with strides 14 (=1+3+9) and 1) - // recovers the generalized diagonal of shape [3, 5]. - TensorShape reshape = {}; - TensorShape strides = {}; - // Strided and inflated shapes correspond to input and output shapes, - // respectively, should_inflate is true (vice-versa if should_inflate is - // false). E.g. they are [3, 5] and [3, 3, 3, 5] in the above example. - std::vector strided_shape = {}; - std::vector inflated_shape = {}; - for (int label : labels) { - const int count = label_counts[label]; - const int current_axis = static_cast( - should_inflate ? strided_shape.size() : inflated_shape.size()); - const int64_t dim = input.shape().dim_size(current_axis); - strided_shape.push_back(dim); - inflated_shape.insert(inflated_shape.end(), count, dim); - const int64_t reshape_dim = IPow(dim, count); - reshape.add_dim(reshape_dim); - // While taking the d-diagonal in a rank k Tensor, we take d - // equally-spaced elements including the first and last element. Then, (k - // - 1) * stride = d^k - 1, or, stride = (d^k - 1)/(d - 1). - const int64_t stride = - (dim > 1 && count > 1) ? (reshape_dim - 1) / (dim - 1) : 1; - strides.add_dim(stride); - } - - TensorShape output_shape = - TensorShape(should_inflate ? inflated_shape : strided_shape); - // Also allocate memory for the output tensor with the given shape. - CopyFromWithAllocate(input, output_shape, &output); - - if (should_inflate) { - Tensor output_reshaped = output.shaped(reshape); - op::inflate_op()(input.shaped(strided_shape), strides.dims(), output_reshaped); - } - else { - op::stride_op()(input.shaped(reshape), strides.dims(), output); - } - - return true; -} - -// Permutes the labels according to the given permutation. -static void PermuteLabels( - const std::vector& permutation, - std::vector& labels) -{ - auto num_labels = labels.size(); - std::vector permuted_labels(num_labels, 0); - for (int ii = 0; ii < num_labels; ii++) { - permuted_labels[ii] = labels[permutation[ii]]; - } - labels.swap(permuted_labels); -} - -// Returns whether transposing would be a no-op; whether input has rank < 2 or -// the permutation is the identity permutation. -static bool ShouldTranspose( - const TensorShape& input_shape, - const std::vector& permutation) -{ - if (input_shape.ndim() < 2) return false; - for (int ii = 0; ii < permutation.size(); ++ii) { - if (permutation[ii] != ii) return true; - } - return false; -} - -// Transpose the input given a permutation. Returns a reference to the input -// if transposing is not necessary. -static bool TransposeOperand( - const Tensor& input, - const std::vector& permutation, - Tensor& output) -{ - if (!ShouldTranspose(input.shape(), permutation)) { - return CopyFrom(input, input.shape(), &output); - } - TensorShape transposed_shape; - for (int ii = 0; ii < input.shape().ndim(); ++ii) { - transposed_shape.add_dim(input.shape().dim_size(permutation[ii])); - } - // For empty Tensors, just change the shape. E.g. we may need to transpose - // from shape [1, 0, 5] to [5, 1, 0]. - if (input.NumElements() == 0) { - return CopyFrom(input, input.shape(), &output); - } - - // Note: Allocate memory for the output tensor first. - CopyFromWithAllocate(input, transposed_shape, &output); - // Then transpose the input tensor. - op::transpose_op()(input, permutation, output); - - return true; -} - -// Returns true if the input dimensions are already sorted in the order -// [broadcasting, batch, contract, free, reduce]. Used to implement an optimization to avoid -// an extra transpose and instead uses (conj_x and conj_y) in BatchMatMul. -static bool ShouldSwapFreeAndContract( - const std::vector& labels, - const std::vector& label_types) -{ - // Check that ordering is according to dimension type, with the role of - // free and contract dimensions swapped. - std::array remap = {0, 1, 3, 2, 4}; - for (int ii = 0; ii < labels.size() - 1; ii++) { - const int dimtype_a = remap[label_types[labels[ii]]]; - const int dimtype_b = remap[label_types[labels[ii + 1]]]; - if (dimtype_a > dimtype_b || (dimtype_a == dimtype_b && labels[ii] > labels[ii + 1])) { - return false; - } - } - return true; -} - -// Insert new (unnamed) broadcasting labels at the location of ellipsis. -static void InsertBroadcastLabels( - int num_bcast_labels, - int num_named_labels, - int ellipsis_idx, - std::vector& labels, - std::vector& label_counts) -{ - labels.erase(labels.begin() + ellipsis_idx); - labels.insert(labels.begin() + ellipsis_idx, num_bcast_labels, 0); - - // Does the padding ellipsis overlap with any named labels? - // Insert new labels at the location of ellipsis. - // Now I understand finally! - // Start from the num_named_labels, and insert num_bcast_labels - // These broadcasting labels are not overlapped with the named labels - std::iota(labels.begin() + ellipsis_idx, - labels.begin() + ellipsis_idx + num_bcast_labels, - num_named_labels); - - label_counts.resize(num_named_labels + num_bcast_labels, 1); -} - -// Returns the EinsumDimensionType given whether the corresponding label is -// present in exactly one input subscript (is_unique) and whether it is absent -// from the output subscripts (is_removed). Does not handle broadcasting -// dimensions. -static EinsumDimensionType GetDimensionType(bool is_removed, bool is_unique) -{ - if (!is_removed && !is_unique) - return kBatch; - else if (!is_removed && is_unique) - return kFree; - else if (is_removed && !is_unique) - return kContract; - else // is_removed && is_unique - return kReduce; -} - -// Maps the character labels to consecutive integers. -static void MapToLabels(const std::string& subscript, std::vector& labels, - std::unordered_map& label_mapping) -{ - for (int ii = 0; ii < subscript.size(); ii++) { - const char label_char = subscript[ii]; - if (label_char == '.') { - // Ellipsis is a special case. - if (subscript[ii + 1] != '.' || subscript[ii + 2] != '.') { - throw std::invalid_argument("Invalid ellipsis in subscript: " + subscript); - } - labels.push_back(kEllipsisLabel); - ii += 2; // Skip next 2 characters as well. - continue; - } - // Check that the label is a valid character. - // Don't worry about the ellipsis character as it is handled above. - if (label_mapping.find(label_char) == label_mapping.end()) { - const int next_label = label_mapping.size(); - label_mapping[label_char] = next_label; - } - // Map the label to an integer. - const int mapped_label = label_mapping[label_char]; - labels.push_back(mapped_label); - } - // Check the number of ellipsis. - if (std::count(labels.begin(), labels.end(), kEllipsisLabel) > 1) { - throw std::invalid_argument("More than one ellipsis in subscript: " + subscript); - } -} - -/// Check the validation of the input equations -bool ValidateEinsumEquation( - const std::string& equation, - std::vector& input_subscripts, - std::string& output_subscript) -{ - // Part 1: Check the equation's validation - if (equation.empty()) { - throw std::invalid_argument("Empty einsum equation"); - } - - // Part 2: Remove the white space in the equation - std::string equation_no_space; - for (const char c : equation) { - if (c != ' ') { - equation_no_space.push_back(c); - } - } - - // Part 3: Check the "->" flag - std::vector inputs_and_output_subscripts; - auto delimiter_pos = equation_no_space.find("->"); - if (delimiter_pos == std::string::npos) { - throw std::invalid_argument("No '->' in einsum equation: " + equation_no_space); - } - else if (equation_no_space.find("->", delimiter_pos + 1) != std::string::npos) { - throw std::invalid_argument("Expecting exactly one '->' in einsum equation: " + equation_no_space); - } - inputs_and_output_subscripts.push_back(equation_no_space.substr(0, delimiter_pos)); - inputs_and_output_subscripts.push_back(equation_no_space.substr(delimiter_pos + 2)); - - output_subscript = std::move(inputs_and_output_subscripts[1]); - - // Part 4: Address the comma in the input subscripts - auto comma_pos = inputs_and_output_subscripts[0].find(','); - while (comma_pos != std::string::npos) { - input_subscripts.push_back(inputs_and_output_subscripts[0].substr(0, comma_pos)); - inputs_and_output_subscripts[0] = inputs_and_output_subscripts[0].substr(comma_pos + 1); - comma_pos = inputs_and_output_subscripts[0].find(','); - } - input_subscripts.push_back(inputs_and_output_subscripts[0]); - - if (input_subscripts.size() != 1 && input_subscripts.size() != 2) { - throw std::invalid_argument("Expecting 1 or 2 input subscripts in equation '" + equation_no_space + - "' but got: " + std::to_string(input_subscripts.size())); - } - - // Part 5: Check the characters in the equation - std::regex pattern("[^a-zA-Z\\.]+"); - if (input_subscripts.size() == 2) { - if (std::regex_search(input_subscripts[0] + input_subscripts[1] + output_subscript, pattern)) { - throw std::invalid_argument("Invalid character in einsum equation: " + equation); - } - } - else if (input_subscripts.size() == 1) { - if (std::regex_search(input_subscripts[0] + output_subscript, pattern)) { - throw std::invalid_argument("Invalid character in einsum equation: " + equation); - } - } - else { - throw std::invalid_argument("Invalid einsum equation: " + equation); - } - return true; -} - -// Preprocessing for the input equation expr -bool ParseEinsumEquation( - const std::string& equation, - std::vector& label_types, - std::vector>& input_labels, - std::vector& output_labels, - std::vector>& input_label_counts, - std::vector& output_label_counts, - std::vector& input_has_ellipsis, - bool& output_has_ellipsis) -{ - // Check the equation's validation - std::vector input_str; - std::string output_str; - if (!ValidateEinsumEquation(equation, input_str, output_str)) { - return false; - } - std::unordered_map label_mapping; - int num_inputs = input_str.size(); - input_labels.resize(num_inputs); - - // Map from single characters to integer labels. - // Labels that are identical in the output equation and distinct input equations are assigned the same integer mapping. - for (int ii = 0; ii < num_inputs; ii++) { - MapToLabels(input_str[ii], input_labels[ii], label_mapping); - } - MapToLabels(output_str, output_labels, label_mapping); - - // Compute counts for input and output labels. - int num_labels = label_mapping.size(); - input_label_counts.resize(num_inputs); - input_has_ellipsis.resize(num_inputs); - for (int ii = 0; ii < num_inputs; ii++) { - input_label_counts[ii].resize(num_labels, 0); - input_has_ellipsis[ii] = false; - for (const int label : input_labels[ii]) { - if (label != kEllipsisLabel) { - input_label_counts[ii][label] += 1; - } else { - input_has_ellipsis[ii] = true; - } - } - } - output_label_counts.resize(num_labels, 0); - output_has_ellipsis = false; - for (const int label : output_labels) { - if (label != kEllipsisLabel) { - output_label_counts[label] += 1; - } else { - output_has_ellipsis = true; - } - } - - // Map each label to a unique EinsumDimensionType. - label_types.resize(num_labels); - for (int label = 0; label < num_labels; label++) { - // if (label == kEllipsisLabel) continue; Not necessary here. - bool removed = output_label_counts[label] == 0; - bool unique = num_inputs == 1 || input_label_counts[0][label] == 0 || - input_label_counts[1][label] == 0; - label_types[label] = GetDimensionType(removed, unique); - } - return true; -} - -// Records the dimension size for the given label. Checks that the dimension -bool RecordLabelToDimension(const int label, const int axis, const Tensor& input, - std::unordered_map& label_to_dim_sizes) { - const int64_t input_dim = input.shape().dim_size(axis); - auto& label_dim = label_to_dim_sizes[label]; - if (label_dim != 0 && label_dim != input_dim) { - throw std::invalid_argument( - "Expected dimension " + std::to_string(label_to_dim_sizes[label]) + " at axis " + - std::to_string(axis) + " of the input shaped " + - " but got dimension " + std::to_string(input_dim)); - } - label_to_dim_sizes[label] = input_dim; - return true; -} - -// Validate input dimensions and populate unnamed labels and their label counts. -// Also populate the mapping from named labels to their dimension sizes. -bool ProcessDimensions( - const std::vector& inputs, - std::vector& label_types, - std::vector>& input_labels, - std::vector& output_labels, - std::vector>& input_label_counts, - std::vector& output_label_counts, - const std::vector& input_has_ellipsis, - const bool output_has_ellipsis, - std::unordered_map& label_to_dim_sizes) -{ - const int num_inputs = inputs.size(); - const int num_labels = label_types.size(); - int max_bcast_dims = 0; - // Check that the number of dimensions match for each label. - for (int ii = 0; ii < num_inputs; ii++) { - const Tensor& input = *inputs[ii]; - const int num_dims = input.shape().ndim(); - const std::vector& labels = input_labels[ii]; - const std::vector& label_counts = input_label_counts[ii]; - bool has_ellipsis = input_has_ellipsis[ii]; - // We infer the number of broadcasting dimensions by taking the maximum rank - // among the broadcasting subshapes of the input. - if (!has_ellipsis) { - // If there is no ellipsis, the number of dimensions must match the number - if (num_dims != labels.size()) { - throw std::invalid_argument( - "Input " + std::to_string(ii) + " has " + std::to_string(num_dims) + - " dimensions but got" + std::to_string(num_labels) + " labels"); - } - for (int label_idx = 0; label_idx < labels.size(); label_idx++) { - const int label = labels[label_idx]; - // if (label == kEllipsisLabel) continue; - // Double counting of labels is allowed. No need to check. - // if (label_counts[label] > 1) { - // throw std::invalid_argument( - // "Label " + std::to_string(label) + " appears more than once in input " + - // std::to_string(ii)); - // } - RecordLabelToDimension(label, label_idx, input, label_to_dim_sizes); - } - continue; - } - - // Input has an ellipsis. - // There are two cases: - // 1. The ellipsis shadows at least one label: num_dims >= labels.size(). - // 2. The ellipsis shadows no labels: num_dims == labels.size() - 1. - // In both cases, num_dims >= labels.size() - 1. - if (num_dims < labels.size() - 1) { - throw std::invalid_argument( - "Input " + std::to_string(ii) + " has " + std::to_string(num_dims) + - " dimensions but " + std::to_string(num_labels) + " labels"); - } - int ellipsis_idx = -1; - // Number of shadowed labels = num_dims - (labels.size() - 1). - const int num_bcast_labels = num_dims - labels.size() + 1; - for (int label_idx = 0; label_idx < labels.size(); label_idx++) { - const int label = labels[label_idx]; - // Find the ellipsis axis. - if (label == kEllipsisLabel) { - ellipsis_idx = label_idx; - continue; - } - // Current label is not an ellipsis. - // There are two cases: - // 1. The ellipsis axis is not found yet: axis = label_idx. - // 2. The ellipsis axis is found: axis = label_idx - 1 + num_bcast_labels. - const int axis = label_idx + (ellipsis_idx == -1 ? 0 : num_bcast_labels - 1); - RecordLabelToDimension(label, axis, input, label_to_dim_sizes); - } - // Found an ellipsis. Replace it with the appropriate number of broadcasting - // labels. - if (ellipsis_idx != -1) { - InsertBroadcastLabels(num_bcast_labels, num_labels, ellipsis_idx, input_labels[ii], - input_label_counts[ii]); - max_bcast_dims = std::max(max_bcast_dims, num_bcast_labels); - } - } - if (!input_has_ellipsis[0] - && (input_has_ellipsis.size() == 1 || !input_has_ellipsis[1]) - && !output_has_ellipsis) - { - return true; - } - // Insert broadcasting labels into the output labels. - auto it = std::find(output_labels.begin(), output_labels.end(), kEllipsisLabel); - if (it != output_labels.end()) { - const int ellipsis_idx = it - output_labels.begin(); - InsertBroadcastLabels(max_bcast_dims, num_labels, ellipsis_idx, - output_labels, output_label_counts); - } else if (max_bcast_dims > 0) { - throw std::invalid_argument( - "Output has no ellipsis but input has ellipsis. Cannot insert broadcasting labels."); - } - // Polupate EinsumDimensionType for the new broadcasting labels. - label_types.resize(num_labels + max_bcast_dims, EinsumDimensionType::kBroadcasting); - return true; -} - - -bool ReduceOperand( - const Tensor& input, - const std::vector& label_types, - std::vector& labels, - const std::vector& label_counts, - std::vector& free_labels, - int& swap_free_and_contract, - Tensor& output) -{ - // Find the permutation to transpose the input dimensions in the order of - // EinsumDimensionType; i.e. batch, free, contract and reduce dimensions. - // This makes it more convenient to invoke Reduce/Contract operations. - std::vector permutation(input.shape().ndim(), 0); - std::iota(permutation.begin(), permutation.end(), 0); - - Tensor input_transposed; - // Check if we can avoid the transpose. We need to flip the conj_x (or conj_y) - // flag during BatchMatMul. This is an extra optimization not necessary for - // correctness. - if(ShouldSwapFreeAndContract(labels, label_types)) { - swap_free_and_contract = 1; - } - else { - std::sort(permutation.begin(), permutation.end(), [&](int ii, int jj) { - int label_ii = labels[ii]; - int label_jj = labels[jj]; - return std::tie(label_types[label_ii], label_ii) < - std::tie(label_types[label_jj], label_jj); - }); - } - - // Transpose the input so that EinsumDimensionTypes are in order. - TransposeOperand(input, permutation, input_transposed); - // Permutes labels - PermuteLabels(permutation, labels); - - // Take the generalized diagonal for dimensions with repeated axis labels. - // This is necessary for the Reduce/Contract operations. - Tensor input_deduped; - labels.erase(std::unique(labels.begin(), labels.end()), labels.end()); - - - StrideOrInflateOperand(input_transposed, labels, label_counts, false, input_deduped); - - // Reshape denotes the rank-5 shape [broadcast, batch, free, contract, - // reduce] where we've compacted the dimensions of each EinsumDimensionType. - std::array reshape = {1, 1, 1, 1, 1}; - // The output shape is [batch shape] + [free size, contract size] - // That is, the batch shape is preserved (for broadcasting while - // contracting) while the free dims and contract dims are compressed to one - // dimension each. - TensorShape output_shape; - for (int label_idx = 0; label_idx < labels.size(); label_idx++) { - const int label = labels[label_idx]; - int64_t dim = input_deduped.shape().dim_size(label_idx); - if (label_types[label] == EinsumDimensionType::kBroadcasting || - label_types[label] == EinsumDimensionType::kBatch) { - output_shape.add_dim(dim); - } - else if (label_types[label] == EinsumDimensionType::kFree) { - free_labels.push_back(label); - } - // All together, the reshape is [broadcast, batch, free, contract, reduce] - reshape[label_types[label]] *= dim; - } - - if (swap_free_and_contract) { - std::swap(reshape[EinsumDimensionType::kFree], reshape[EinsumDimensionType::kContract]); - } - output_shape.add_dim(reshape[EinsumDimensionType::kFree]); - output_shape.add_dim(reshape[EinsumDimensionType::kContract]); - - - if (reshape[EinsumDimensionType::kReduce] == - 1) { // No need to actually reduce. - return CopyFrom(input_deduped, output_shape, &output); - } - - // This command will actually allocate memory for the output tensor - CopyFromWithAllocate(input_deduped, output_shape, &output); - Tensor output_shaped = output.shaped({-1}); - - op::reduce_op()( - input_deduped.shaped({-1, reshape[EinsumDimensionType::kReduce]}), - reshape[EinsumDimensionType::kReduce], output_shaped); - - return true; -} - -template -static void DoContract( - const Tensor& in_x, - const Tensor& in_y, - const EinsumOption& option, - const bool& trans_x, - const bool& trans_y, - const einsum_utils::BCast& bcast, - Tensor& out_z) -{ - const T alpha = static_cast(option.alpha); - const T beta = static_cast(option.beta); - const int m = in_x.shape().dim_size(option.conj_x || trans_x ? 2 : 1); - const int k = in_x.shape().dim_size(option.conj_x || trans_x ? 1 : 2); - const int n = in_y.shape().dim_size(option.conj_y || trans_y ? 1 : 2); - - const int64_t batch_size = bcast.z_batch_size; - - std::vector x_device_memory_ptrs = {}; x_device_memory_ptrs.reserve(batch_size); - std::vector y_device_memory_ptrs = {}; y_device_memory_ptrs.reserve(batch_size); - std::vector z_device_memory_ptrs = {}; z_device_memory_ptrs.reserve(batch_size); - - auto* x_base_ptr = in_x.data(); - auto* y_base_ptr = in_y.data(); - auto* z_base_ptr = out_z.data(); - - int64_t x_stride = 0; - int64_t y_stride = 0; - int64_t z_stride = 0; - - bool is_full_broadcast = - std::min(bcast.x_batch_size, bcast.y_batch_size) == 1; - - bool use_strided_batched = - (!bcast.requires_broadcast || is_full_broadcast) && batch_size > 1; - - if (use_strided_batched) { - x_stride = bcast.x_batch_size != 1 ? m * k : 0; - y_stride = bcast.y_batch_size != 1 ? k * n : 0; - z_stride = m * n; - - x_device_memory_ptrs.push_back(x_base_ptr); - y_device_memory_ptrs.push_back(y_base_ptr); - z_device_memory_ptrs.push_back(z_base_ptr); - } - else if (!bcast.requires_broadcast) { - for (int ii = 0; ii < batch_size; ii++) { - x_device_memory_ptrs.push_back(x_base_ptr + ii * m * k); - y_device_memory_ptrs.push_back(y_base_ptr + ii * k * n); - z_device_memory_ptrs.push_back(z_base_ptr + ii * m * n); - } - } - else { - std::vector x_device_memory = {}; - std::vector y_device_memory = {}; - for (int ii = 0; ii < bcast.x_batch_size; ii++) { - x_device_memory.push_back(x_base_ptr + ii * m * k); - } - for (int ii = 0; ii < bcast.y_batch_size; ii++) { - y_device_memory.push_back(y_base_ptr + ii * k * n); - } - for (int ii = 0; ii < bcast.z_batch_size; ii++) { - x_device_memory_ptrs.push_back(x_device_memory[bcast.x_batch_shape[ii]]); - y_device_memory_ptrs.push_back(y_device_memory[bcast.y_batch_shape[ii]]); - z_device_memory_ptrs.push_back(z_base_ptr + ii * m * n); - } - } - - // Do GEMM operations finally! - // where A, B and C are assumed to be in column major. - // We want the output to be in row-major, so we can compute - // C' = B' x A', where ' stands for transpose (not adjoint). - if (batch_size == 1) { - // Dot product - if (m == 1 && n == 1 && option.conj_x != true && option.conj_y != true) { - // Dot product - // TODO: implement the Conjugate version of Dot product. - kernels::blas_dot()(k, x_device_memory_ptrs[0], 1, y_device_memory_ptrs[0], 1, z_device_memory_ptrs[0]); - } - // Gemv - else if (n == 1 && option.conj_x != true) { - // This is a matrix*vector multiply so use GEMV to compute A * x. - // Here we are multiplying in the natural order, so we have to flip - // the transposition flag to compensate for the tensor being stored - // row-major. Since GEMV doesn't provide a way to just conjugate an - // argument, we have to defer those cases to GEMM below. - kernels::blas_gemv()( - trans_x ? 'N' : 'T', - trans_x ? m : k, - trans_x ? k : m, - &alpha, - x_device_memory_ptrs[0], trans_x ? m : k, - y_device_memory_ptrs[0], 1, - &beta, - z_device_memory_ptrs[0], 1); - } - // Gemm - else { - // Call the column-major Blas library - kernels::blas_gemm()( - option.conj_y ? 'C' : trans_y ? 'T' : 'N', - option.conj_x ? 'C' : trans_x ? 'T' : 'N', - n, m, k, - &alpha, - y_device_memory_ptrs[0], option.conj_y || trans_y ? k : n, - x_device_memory_ptrs[0], option.conj_x || trans_x ? m : k, - &beta, - z_device_memory_ptrs[0], n); - } - return; - } - else if (use_strided_batched) { - kernels::blas_gemm_batched_strided()( - option.conj_y ? 'C' : trans_y ? 'T' : 'N', - option.conj_x ? 'C' : trans_x ? 'T' : 'N', - n, m, k, - &alpha, - y_device_memory_ptrs[0], option.conj_y || trans_y ? k : n, y_stride, - x_device_memory_ptrs[0], option.conj_x || trans_x ? m : k, x_stride, - &beta, - z_device_memory_ptrs[0], n, z_stride, - batch_size); - } - else { - kernels::blas_gemm_batched()( - option.conj_y ? 'C' : trans_y ? 'T' : 'N', - option.conj_x ? 'C' : trans_x ? 'T' : 'N', - n, m, k, - &alpha, - y_device_memory_ptrs.data(), option.conj_y || trans_y ? k : n, - x_device_memory_ptrs.data(), option.conj_x || trans_x ? m : k, - &beta, - z_device_memory_ptrs.data(), n, - batch_size); - } -} - -// Contracts the inputs along the last axis (or the second last if the -// corresponding value of swap_free_and_contract is true). The batch -// dimensions are broadcast to the output shape. -bool ContractOperands( - std::vector& inputs, - const std::vector& swap_free_and_contract, - const EinsumOption& option, - Tensor& output) -{ - if (inputs.size() == 1) { - return CopyFrom(inputs[0], inputs[0].shape(), &output); - } - BCast bcast = prepare_bcast(inputs[0].shape().dims(), inputs[1].shape().dims()); - - if (bcast.valid == false) { - throw std::invalid_argument("Invalid broadcast shape"); - } - Tensor lhs, rhs; - ReshapeToRank3(inputs[0], bcast.x_batch_size, lhs); - ReshapeToRank3(inputs[1], bcast.y_batch_size, rhs); - - TensorShape output_shape = bcast.z_batch_shape; - for (int ii = 0; ii < inputs.size(); ii++) { - const int64_t free_axis = - inputs[ii].shape().ndim() - (swap_free_and_contract[ii] ? 1 : 2); - output_shape.add_dim(inputs[ii].shape().dim_size(free_axis)); - } - bool trans_x = swap_free_and_contract[0]; - bool trans_y = !swap_free_and_contract[1]; - - if (option.out != nullptr) { - if (output_shape.NumElements() != option.out->NumElements()) { - throw std::invalid_argument("Invalid option: output shape mismatch the requested shape"); - } - CopyFrom(*option.out, output_shape, &output); - } - else { - CopyFromWithAllocate(inputs[0], output_shape, &output); - } - if (lhs.NumElements() == 0 || rhs.NumElements() == 0) { - output.zero(); - return true; - } - - Tensor output_reshaped; - ReshapeToRank3(output, bcast.z_batch_size, output_reshaped); - - TEMPLATE_BLAS_2(output_reshaped.data_type(), output_reshaped.device_type(), - einsum_utils::DoContract(lhs, rhs, option, trans_x, trans_y, bcast, output_reshaped)) - - return true; -} - -void ProcessOutput( - const Tensor& input, - const std::vector& label_types, - const std::vector>& free_labels, - std::unordered_map& label_to_dim_sizes, - const std::vector& output_labels, - const std::vector& output_label_counts, - Tensor& output) -{ - TensorShape result_shape = input.shape(); - result_shape.remove_dim(result_shape.ndim() - 1); - result_shape.remove_dim(result_shape.ndim() - 1); - - int num_labels = label_types.size(); - std::vector result_labels = {}; - // All batch dimensions should be present in the contracted result. First - // the broadcasting dimensions, then the named batch dimensions. - for (int label = 0; label < num_labels; ++label) { - if (label_types[label] == EinsumDimensionType::kBroadcasting || label_types[label] == EinsumDimensionType::kBatch) { - result_labels.push_back(label); - } - } - - for (int ii = 0; ii < free_labels.size(); ii++) { - for (int label : free_labels[ii]) { - result_labels.push_back(label); - result_shape.add_dim(label_to_dim_sizes[label]); - } - } - - // If the output is a zero dimensional scalar, use a 1 dimention vector instead. - // TODO: Use a scalar constructor in Tensor Object. - if (result_shape.ndim() == 0 && input.NumElements() == 1) { - result_shape.add_dim(1); - } - // Reshape the contraction (or reduction) result to its expanded shape: - // [(broadcasted) batch shape] + [free shape 0] + [free shape 1]. - Tensor contraction_output; - CopyFrom(input, result_shape, &contraction_output); - - // Inflate the output if necessary. (E.g. for the equation 'i->iii' which - // may arise while computing gradient of a regular Einsum). - Tensor output_inflated; - StrideOrInflateOperand(contraction_output, - result_labels, output_label_counts, true /* should_inflate */, output_inflated); - - if (output_inflated.shape().ndim() > contraction_output.shape().ndim()) { - // We inflated the output. Modify result labels accordingly. - std::vector inflated_labels = {}; - for (int label : result_labels) { - inflated_labels.insert(inflated_labels.end(), output_label_counts[label], label); - } - result_labels.swap(inflated_labels); - } - - // Find the permutation to map the result labels to the output labels. Note - // that both the result and the final output may have the repeated labels, - // in which case the permutation preserves the left-to-right ordering. - // E.g. if result labels are [0, 0, 1] and output is [0, l, 0] then the - // permutation should be [0, 2, 1]. We also use the fact that repeated - // labels in the result are adjacent to each other. - std::vector output_permutation(output_labels.size()); - std::vector label_to_position(num_labels, -1); - - for (int ii = 0; ii < result_labels.size(); ii++) { - // Remember the position of only the leftmost result label. - if (label_to_position[result_labels[ii]] == -1) { - label_to_position[result_labels[ii]] = ii; - } - } - for (int ii = 0; ii < output_labels.size(); ii++) { - output_permutation[ii] = label_to_position[output_labels[ii]]; - // We have found the leftmost occurrence. The next one would be adjacent. - label_to_position[output_labels[ii]] += 1; - } - - TransposeOperand(output_inflated, output_permutation, output); -} - -} // namespace utils -} // namespace container diff --git a/source/module_base/module_container/ATen/ops/einsum_op.h b/source/module_base/module_container/ATen/ops/einsum_op.h deleted file mode 100644 index 6850f0445c..0000000000 --- a/source/module_base/module_container/ATen/ops/einsum_op.h +++ /dev/null @@ -1,225 +0,0 @@ -#ifndef ATEN_KERNELS_EINSUM_OP_H_ -#define ATEN_KERNELS_EINSUM_OP_H_ - -#include -#include - -namespace container { - -struct EinsumOption { - bool conj_x = false; - bool conj_y = false; - float alpha = 1.0; - float beta = 0.0; - Tensor* out = nullptr; - - EinsumOption(bool conj_x_ = false, bool conj_y_ = false, float alpha_ = 1.0, float beta_ = 0.0, Tensor* out_ = nullptr) - : conj_x(conj_x_), conj_y(conj_y_), alpha(alpha_), beta(beta_), out(out_) {} -}; - -namespace einsum_utils { -struct BCast; - -// Dummy axis label used to denote an ellipsis in an input or output subscript. -constexpr int kEllipsisLabel = -1; - -// Each dimension is categorized into exactly one of five types based on -// whether its corresponding label is present in the input and/or the output -// subscripts. -enum EinsumDimensionType { - // Batch dimensions are those present in two inputs as well as the output. - // They are part of the batch dimensions during Tensor contraction. Such - // dimensions may be broadcasting dimensions (those mapping to ellipsis) - // or explicit batch dimensions corresponding to named axis labels. - kBroadcasting = 0, - kBatch = 1, - // Free dimensions are present in exactly one of the inputs, and also the - // output. These are non-contracted axes in the Tensor contraction. - kFree = 2, - // Contract dimensions are present in two inputs, but not the output. These - // dimensions are contracted in Tensor contraction. - kContract = 3, - // Reduce dimensions are present in exactly one input; and not in the output - // and are summed over prior to Tensor contraction. - kReduce = 4, -}; - -// Parses and validates an einsum equation in explicit form. -bool ValidateEinsumEquation( - const std::string& equation, - std::vector& input_subscripts, - std::string& output_subscript); - -// Parses and validates the equation and the input shapes. Single character -// labels are integerized, and we populate input and output label subscripts -// and corresponding counts. Also create the mapping from (named) labels to -// their EinsumDimensionType. -bool ParseEinsumEquation( - const std::string& equation, - std::vector& label_types, - std::vector>& input_labels, - std::vector& output_labels, - std::vector>& input_label_counts, - std::vector& output_label_counts, - std::vector& input_has_ellipsis, - bool& output_has_ellipsis); - -bool ProcessDimensions( - const std::vector& inputs, - std::vector& label_types, - std::vector>& input_labels, - std::vector& output_labels, - std::vector>& input_label_counts, - std::vector& output_label_counts, - const std::vector& input_has_ellipsis, - const bool output_has_ellipsis, - std::unordered_map& label_to_dim_sizes); - -// This function records the mapping of a label to its corresponding dimension for a specific axis in the input tensor. -// It also validates that the label and dimension mapping is consistent with previous recordings, ensuring that the -// same label is not mapped to different dimensions along different axes. -bool RecordLabelToDimension( - const int label, - const int axis, - const Tensor& input, - std::unordered_map& label_to_dim_sizes); - -bool ReduceOperand( - const Tensor& input, - const std::vector& label_types, - std::vector& labels, - const std::vector& label_counts, - std::vector& free_labels, - int& swap_free_and_contract, - Tensor& output); - -/** - * @brief A function to perform contraction operation on multiple Tensors. - * - * This functor applies a contraction operation on multiple input Tensors and computes the result. - * The contraction operation combines the input Tensors based on a specific contraction pattern to produce - * a single output Tensor. The contraction pattern is defined by the `swap_free_and_contract` vector, which - * specifies whether each input Tensor should be contracted or simply copied to the output. - * - */ -bool ContractOperands( - std::vector& inputs, - const std::vector& swap_free_and_contract, - const EinsumOption& option, - Tensor& output); - -void ProcessOutput( - const Tensor& input, - const std::vector& label_types, - const std::vector>& free_labels, - std::unordered_map& label_to_dim_sizes, - const std::vector& output_labels, - const std::vector& output_label_counts, - Tensor& output); - -} // namespace einsum_utils - -namespace op { - -// TODO: implement this method this week! -// piapia pat face - -/** - * - * @brief Computes the Einstein summation convention on the given tensors - * based on the expression passed as a string. - * - * @tparam Tensors Variadic template parameter pack for the input tensors. - * - * @param equation The Einstein summation convention expression. - * @param tensors The input tensors for the summation operation. - * @return The resulting tensor after applying the Einstein summation convention on the input tensors. - * - * @throws std::invalid_argument if the expression or the input tensors are invalid. - * @throws std::runtime_error if an error occurs while performing the summation operation. - */ -template -typename std::enable_if::type, Tensor>::value, Tensor>::type - einsum_impl(const std::string& equation, const EinsumOption& option, const Tensors&... tensors) -{ - // Check the input dimension - constexpr int num_inputs = sizeof...(Tensors); - if (num_inputs > 2) { - throw std::invalid_argument("Einstein notation only support two or less tensors!"); - } - const std::vector inputs{reinterpret_cast(&tensors)...}; - // Init the input and output labels - std::vector> input_labels = {}; - std::vector output_labels = {}; - std::vector label_types = {}; - std::vector> input_label_counts = {}; - std::vector output_label_counts = {}; - std::vector input_has_ellipsis = {}; - bool output_has_ellipsis = {}; - - einsum_utils::ParseEinsumEquation( - equation, label_types, - input_labels, output_labels, - input_label_counts, output_label_counts, - input_has_ellipsis, output_has_ellipsis); - - if (input_labels.size() != num_inputs) { - throw std::runtime_error("The number of input tensors does not match the number of input labels!"); - } - - std::unordered_map label_to_dim_sizes = {}; - - einsum_utils::ProcessDimensions( - inputs, label_types, - input_labels, output_labels, - input_label_counts, output_label_counts, - input_has_ellipsis, output_has_ellipsis, - label_to_dim_sizes); - - std::vector> free_labels(num_inputs); - std::vector swap_free_and_contract(num_inputs); - std::vector inputs_reduced(num_inputs, Tensor(DataType::DT_FLOAT, {})); - - for (int ii = 0; ii < num_inputs; ++ii) { - einsum_utils::ReduceOperand( - *inputs[ii], label_types, - input_labels[ii], input_label_counts[ii], - free_labels[ii], swap_free_and_contract[ii], - inputs_reduced[ii]); - } - - // After reduction, the inputs should be reshaped to Tensors suitable for - // contraction. If num_inputs is 1, the reduced input is simply forwarded to - // the output. - Tensor contraction_output_reshaped; - einsum_utils::ContractOperands( - inputs_reduced, swap_free_and_contract, - option, contraction_output_reshaped); - - Tensor output; - // Copy the batch labels from the contraction output. Recover the batch - // shape, which may have been broadcasted. - einsum_utils::ProcessOutput( - contraction_output_reshaped, label_types, - free_labels, label_to_dim_sizes, - output_labels, output_label_counts, - output); - - return std::move(output); -} - -// Make the conj params only works for the matmul equations. -inline static Tensor einsum(const std::string& equation, const Tensor& A) { - const EinsumOption& option = {}; - return std::move(op::einsum_impl(equation, option, A)); -} - -inline static Tensor einsum(const std::string& equation, const Tensor& A, const Tensor& B, const EinsumOption& option = {}) { - return std::move(op::einsum_impl(equation, option, A, B)); -} - -} // namespace op -} // namespace container - -#endif // ATEN_KERNELS_EINSUM_OP_H_ \ No newline at end of file diff --git a/source/module_base/module_container/ATen/ops/linalg_op.cpp b/source/module_base/module_container/ATen/ops/linalg_op.cpp deleted file mode 100644 index e647bbbe89..0000000000 --- a/source/module_base/module_container/ATen/ops/linalg_op.cpp +++ /dev/null @@ -1,242 +0,0 @@ -#include - -#include -#include - -#include - -namespace container { -namespace op { - -void add_op::operator()(const Tensor &x, const Tensor &y, Tensor &z) { - // check the shape - REQUIRES_OK(x.shape() == y.shape() && x.shape() == z.shape(), - "add: the shape of the two input Tensors must be the same") - REQUIRES_OK(x.data_type() == y.data_type() && x.data_type() == z.data_type(), - "add: the data type of the two input Tensors must be the same") - REQUIRES_OK(x.device_type() == y.device_type() && x.device_type() == z.device_type(), - "add: the device type of the two input Tensors must be the same") - // allocate memory for the result - TEMPLATE_ALL_LAMBDA_2(x.data_type(), x.device_type(), [&](){ - T_ alpha = static_cast(1); - T_ beta = static_cast(1); - kernels::add()( - x.NumElements(), alpha, x.data(), beta, y.data(), z.data()); - }) -} - -template -void add_op::operator()(const T& alpha, const Tensor &x, const T& beta, const Tensor &y, Tensor &z) { - // check the shape - REQUIRES_OK(x.shape() == y.shape() && x.shape() == z.shape(), - "add: the shape of the two input Tensors must be the same") - REQUIRES_OK(x.data_type() == y.data_type() && x.data_type() == z.data_type(), - "add: the data type of the two input Tensors must be the same") - REQUIRES_OK(x.device_type() == y.device_type() && x.device_type() == z.device_type(), - "add: the device type of the two input Tensors must be the same") - // allocate memory for the result - TEMPLATE_ALL_LAMBDA_2(x.data_type(), x.device_type(), [&](){ - kernels::add()( - x.NumElements(), alpha, x.data(), beta, y.data(), z.data()); - }) -} - -void mul_op::operator()(const container::Tensor &x, const container::Tensor &y, container::Tensor &z) { - // check the shape - REQUIRES_OK(x.shape() == y.shape() && x.shape() == z.shape(), - "mul: the shape of the two input Tensors must be the same") - REQUIRES_OK(x.data_type() == y.data_type() && x.data_type() == z.data_type(), - "mul: the data type of the two input Tensors must be the same") - REQUIRES_OK(x.device_type() == y.device_type() && x.device_type() == z.device_type(), - "mul: the device type of the two input Tensors must be the same") - // allocate memory for the result - TEMPLATE_ALL_LAMBDA_2(x.data_type(), x.device_type(), [&](){ - T_ alpha = static_cast(1); - kernels::mul()( - x.NumElements(), alpha, x.data(), y.data(), z.data()); - }) -} - -template -void mul_op::operator()(const T& alpha, const container::Tensor &x, container::Tensor &y) { - // check the shape - REQUIRES_OK(x.shape() == y.shape(), - "mul: the shape of the two input Tensors must be the same") - REQUIRES_OK(x.data_type() == y.data_type(), - "mul: the data type of the two input Tensors must be the same") - REQUIRES_OK(x.device_type() == y.device_type(), - "mul: the device type of the two input Tensors must be the same") - // allocate memory for the result - TEMPLATE_ALL_LAMBDA_2(x.data_type(), x.device_type(), [&](){ - kernels::mul()( - x.NumElements(), alpha, x.data(), y.data()); - }) -} - -void div_op::operator()(const container::Tensor &x, const container::Tensor &y, container::Tensor &z) { -// check the shape - REQUIRES_OK(x.shape() == y.shape() && x.shape() == z.shape(), - "div: the shape of the two input Tensors must be the same") - REQUIRES_OK(x.data_type() == y.data_type() && x.data_type() == z.data_type(), - "div: the data type of the two input Tensors must be the same") - REQUIRES_OK(x.device_type() == y.device_type() && x.device_type() == z.device_type(), - "div: the device type of the two input Tensors must be the same") - // allocate memory for the result - TEMPLATE_ALL_LAMBDA_2(x.data_type(), x.device_type(), [&](){ - T_ alpha = static_cast(1); - kernels::div()( - x.NumElements(), alpha, x.data(), y.data(), z.data()); - }) -} - - -template -void transpose_op::operator()( - const Tensor& input, - const std::vector& perm, - Tensor& output) -{ - TEMPLATE_ALL_2(input.data_type(), input.device_type(), - kernels::transpose()( - perm, input.shape().dims(), output.shape().dims(), input.data(), output.data())) -} - - -void stride_op::operator()( - const Tensor& input, - const std::vector& stride, - Tensor& output) -{ - TEMPLATE_ALL_2(input.data_type(), input.device_type(), - kernels::stride()( - stride, input.shape().dims(), output.shape().dims(), input.data(), output.data())) -} - - -void inflate_op::operator()( - const Tensor& input, - const std::vector& inflate, - Tensor& output) -{ - TEMPLATE_ALL_2(input.data_type(), input.device_type(), - kernels::inflate()( - inflate, input.shape().dims(), output.shape().dims(), input.data(), output.data())) -} - - -void reduce_op::operator()( - const Tensor &input, - const int64_t &inner_most_dim, - Tensor &output) -{ - TEMPLATE_ALL_2(input.data_type(), input.device_type(), - kernels::reduce()( - output.NumElements(), inner_most_dim, input.data(), output.data())) -} - -template struct transpose_op; - -template void add_op::operator()(const float&, const container::Tensor&, const float&, const container::Tensor&, container::Tensor&); -template void add_op::operator()(const double&, const container::Tensor&, const double&, const container::Tensor&, container::Tensor&); -template void add_op::operator() >(const std::complex&, const container::Tensor&, const std::complex&, const container::Tensor&, container::Tensor&); -template void add_op::operator()>(const std::complex&, const container::Tensor&, const std::complex&, const container::Tensor&, container::Tensor&); - -template void mul_op::operator()(const float&, const container::Tensor&, container::Tensor&); -template void mul_op::operator()(const double&, const container::Tensor&, container::Tensor&); -template void mul_op::operator() >(const std::complex&, const container::Tensor&, container::Tensor&); -template void mul_op::operator()>(const std::complex&, const container::Tensor&, container::Tensor&); - -} // namespace kernels -} // namespace container - -ct::Tensor operator+(const ct::Tensor& self, const ct::Tensor& other) { - // check the shape - REQUIRES_OK(self.shape() == other.shape(), - "add: the shape of the two input Tensors must be the same") - // allocate memory for the result - ct::Tensor result = ct::Tensor(self.data_type(), self.device_type(), self.shape()); - ct::op::add_op()(self, other, result); - return result; -} - -ct::Tensor operator-(const ct::Tensor& self, const ct::Tensor& other) { - // check the shape - REQUIRES_OK(self.shape() == other.shape(), - "add: the shape of the two input Tensors must be the same") - REQUIRES_OK(self.data_type() == other.data_type(), - "add: the data type of the two input Tensors must be the same") - REQUIRES_OK(self.device_type() == other.device_type(), - "add: the device type of the two input Tensors must be the same") - ct::Tensor result = ct::Tensor(self.data_type(), self.device_type(), self.shape()); - // allocate memory for the result - TEMPLATE_ALL_LAMBDA_2(self.data_type(), self.device_type(), [&](){ - T_ alpha = static_cast(1.0); - T_ beta = static_cast(-1.0); - ct::kernels::add()( - self.NumElements(), alpha, self.data(), beta, other.data(), result.data()); - }) - return result; -} - -ct::Tensor operator*(const ct::Tensor& self, const ct::Tensor& other) { - // check the shape - REQUIRES_OK(self.shape() == other.shape(), - "mul: the shape of the two input Tensors must be the same") - // allocate memory for the result - ct::Tensor result = ct::Tensor(self.data_type(), self.device_type(), self.shape()); - ct::op::mul_op()(self, other, result); - return result; -} - -ct::Tensor operator/(const ct::Tensor& self, const ct::Tensor& other) { - // check the shape - REQUIRES_OK(self.shape() == other.shape(), - "div: the shape of the two input Tensors must be the same") - // allocate memory for the result - ct::Tensor result = ct::Tensor(self.data_type(), self.device_type(), self.shape()); - ct::op::div_op()(self, other, result); - return result; -} - -ct::Tensor& operator+=(ct::Tensor& self, const ct::Tensor& other) { - // check the shape - REQUIRES_OK(self.shape() == other.shape(), - "add: the shape of the two input Tensors must be the same") - ct::op::add_op()(self, other, self); - return self; -} - -ct::Tensor& operator-=(ct::Tensor& self, const ct::Tensor& other) { - // check the shape - REQUIRES_OK(self.shape() == other.shape(), - "add: the shape of the two input Tensors must be the same") - REQUIRES_OK(self.data_type() == other.data_type(), - "add: the data type of the two input Tensors must be the same") - REQUIRES_OK(self.device_type() == other.device_type(), - "add: the device type of the two input Tensors must be the same") - // allocate memory for the result - TEMPLATE_ALL_LAMBDA_2(self.data_type(), self.device_type(), [&](){ - T_ alpha = static_cast(1.0); - T_ beta = static_cast(-1.0); - ct::kernels::add()( - self.NumElements(), alpha, self.data(), beta, other.data(), self.data()); - }) - - return self; -} - -ct::Tensor& operator*=(ct::Tensor& self, const ct::Tensor& other) { - // check the shape - REQUIRES_OK(self.shape() == other.shape(), - "mul: the shape of the two input Tensors must be the same") - ct::op::mul_op()(self, other, self); - return self; -} - -ct::Tensor& operator/=(ct::Tensor& self, const ct::Tensor& other) { - // check the shape - REQUIRES_OK(self.shape() == other.shape(), - "div: the shape of the two input Tensors must be the same") - ct::op::div_op()(self, other, self); - return self; -} \ No newline at end of file diff --git a/source/module_base/module_container/ATen/ops/linalg_op.h b/source/module_base/module_container/ATen/ops/linalg_op.h deleted file mode 100644 index f397fc3229..0000000000 --- a/source/module_base/module_container/ATen/ops/linalg_op.h +++ /dev/null @@ -1,164 +0,0 @@ -#ifndef ATEN_OPS_LINALG_H_ -#define ATEN_OPS_LINALG_H_ - -#include - -#include - -namespace container { -namespace op { - -/** - * @brief A functor to perform add operation on a Tensor. - * - * This functor adds two Tensors element-wise, resulting in a new Tensor with the same - * shape as the input Tensors. - */ -struct add_op { - /** - * @brief Perform add operation on the input Tensors. - * - * This function adds two Tensors element-wise, resulting in a new Tensor with the same - * shape as the input Tensors. - * - * @param x The first input Tensor. - * @param y The second input Tensor. - * @param z The output Tensor that will hold the result of the add operation. - * It must have the same shape as the input Tensors. - */ - void operator()( - const Tensor& x, - const Tensor& y, - Tensor& z); - - template - void operator()( - const T& alpha, - const Tensor& x, - const T& beta, - const Tensor& y, - Tensor& z); -}; - -struct mul_op { - // z = x * y - void operator()( - const Tensor& x, - const Tensor& y, - Tensor& z); - - // y = alpha * x - template - void operator()( - const T& alpha, - const Tensor& x, - Tensor& y); -}; - -struct div_op { - // z = x / y - void operator()( - const Tensor& x, - const Tensor& y, - Tensor& z); -}; - -template -struct transpose_op { - /** - * @brief Perform the transpose operation on the input tensor. - * - * @param input The input tensor to be transposed. - * @param permutation A vector representing the desired permutation of the - * dimensions. The elements of the vector indicate the new - * order of the dimensions, and the size of the vector must - * be equal to the rank of the input tensor. - * @param output The output tensor that will store the result of the transpose - * operation. The output tensor should be pre-allocated and have - * the correct shape for the transpose result. - * - * @return True if the transpose operation is successful; otherwise, false. - * - * @note The size and shape of the output tensor must match the new dimensions - * specified by the permutation vector. If the permutation is not valid or - * the output tensor is not pre-allocated with the correct shape, the - * function will return false. - */ - void operator()( - const Tensor& input, - const std::vector& permutation, - Tensor& output); -}; - -/** - * @brief A functor to perform stride operation on a Tensor. - * - * This functor applies a stride operation on the input Tensor, resulting in a new - * Tensor with data elements selected based on the specified stride. The stride - * specifies how elements are skipped in each dimension during the selection process. - * - * @tparam T The data type of the Tensor. - * @tparam Device The execution device (e.g., CPU or GPU). - */ -struct stride_op { - /** - * @brief Perform stride operation on the input Tensor. - * - * This function applies the stride operation on the input Tensor, generating a new - * Tensor with data elements selected based on the specified stride. - * - * @param input The input Tensor on which the stride operation is performed. - * @param stride The stride specification, represented as a TensorShape. - * The stride specifies how elements are skipped in each dimension during - * the selection process. - * @param output The output Tensor that will hold the result of the stride operation. - * It must have the appropriate size to store the selected elements. - */ - void operator()( - const Tensor& input, - const std::vector& stride, - Tensor& output); -}; - -/** - * @brief A functor for inflating a tensor. - * - * This struct defines a functor that can be used to inflate a tensor using the specified stride. - */ -struct inflate_op { - /** - * @brief Inflate the input tensor. - * - * This function inflates the input tensor using the given stride and stores the result in the output tensor. - * - * @param input The input tensor to be inflated. - * @param stride The stride to use for inflation. - * @param output The output tensor where the inflated data will be stored. - */ - void operator()( - const Tensor& input, - const std::vector& stride, - Tensor& output); -}; - - -struct reduce_op { - void operator()( - const Tensor& input, - const int64_t& inner_most_dim, - Tensor& output); -}; - -} // namespace op -} // namespace container - -ct::Tensor operator+(const ct::Tensor& self, const ct::Tensor& other); -ct::Tensor operator-(const ct::Tensor& self, const ct::Tensor& other); -ct::Tensor operator*(const ct::Tensor& self, const ct::Tensor& other); -ct::Tensor operator/(const ct::Tensor& self, const ct::Tensor& other); -ct::Tensor& operator+=(ct::Tensor& self, const ct::Tensor& other); -ct::Tensor& operator-=(ct::Tensor& self, const ct::Tensor& other); -ct::Tensor& operator*=(ct::Tensor& self, const ct::Tensor& other); -ct::Tensor& operator/=(ct::Tensor& self, const ct::Tensor& other); - -#endif // ATEN_OPS_LINALG_H_ \ No newline at end of file diff --git a/source/module_base/module_container/ATen/ops/test/CMakeLists.txt b/source/module_base/module_container/ATen/ops/test/CMakeLists.txt deleted file mode 100644 index 0cc2c090ca..0000000000 --- a/source/module_base/module_container/ATen/ops/test/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -AddTest( - TARGET container_ops_uts - LIBS parameter ${math_libs} - SOURCES einsum_op_test.cpp linalg_op_test.cpp ../../kernels/lapack.cpp -) - -target_link_libraries(container_ops_uts container base device) \ No newline at end of file diff --git a/source/module_base/module_container/ATen/ops/test/einsum_op_test.cpp b/source/module_base/module_container/ATen/ops/test/einsum_op_test.cpp deleted file mode 100644 index efec0072f0..0000000000 --- a/source/module_base/module_container/ATen/ops/test/einsum_op_test.cpp +++ /dev/null @@ -1,363 +0,0 @@ -#include - -#include -#include -#include - - -namespace container { -namespace op { - -template -class EinsumOpTest : public testing::Test { -public: - EinsumOpTest() { - base::utils::init_blas_handle(); - base::utils::init_cusolver_handle(); - } - ~EinsumOpTest() override { - base::utils::delete_blas_handle(); - base::utils::delete_cusolver_handle(); - } -}; - -TYPED_TEST_SUITE(EinsumOpTest, base::utils::Types); - -TYPED_TEST(EinsumOpTest, Transform) { - using Type = typename std::tuple_element<0, decltype(TypeParam())>::type; - using Device = typename std::tuple_element<1, decltype(TypeParam())>::type; - - const int dim = 3; - Tensor A = std::move(Tensor({static_cast(1.0), static_cast(2.0), static_cast(3.0), - static_cast(0.0), static_cast(4.0), static_cast(5.0), - static_cast(0.0), static_cast(0.0), static_cast(6.0)}).to_device()); - A.reshape({-1, dim}); - Tensor expected = std::move(Tensor( - {static_cast(1.0), static_cast(0.0), static_cast(0.0), - static_cast(2.0), static_cast(4.0), static_cast(0.0), - static_cast(3.0), static_cast(5.0), static_cast(6.0)}).to_device()); - expected.reshape({-1, dim}); - // const Tensor expected = std::move(Tensor({static_cast(21.0)}).to_device()); - - Tensor A_transformed = op::einsum("ij->ji", A); - EXPECT_EQ(A_transformed, expected); -} - -TYPED_TEST(EinsumOpTest, Reduce) { - using Type = typename std::tuple_element<0, decltype(TypeParam())>::type; - using Device = typename std::tuple_element<1, decltype(TypeParam())>::type; - - const int dim = 3; - Tensor A = std::move(Tensor({static_cast(1.0), static_cast(2.0), static_cast(3.0), - static_cast(0.0), static_cast(4.0), static_cast(5.0), - static_cast(0.0), static_cast(0.0), static_cast(6.0)}).to_device()); - A.reshape({-1, dim}); - Tensor expected_1 = std::move(Tensor( - {static_cast(6.0), static_cast(9.0), static_cast(6.0)}).to_device()); - Tensor expected_2 = std::move(Tensor( - {static_cast(1.0), static_cast(6.0), static_cast(14.0)}).to_device()); - // const Tensor expected = std::move(Tensor({static_cast(21.0)}).to_device()); - - // Case 1: Normal reduction - Tensor A_reduced = op::einsum("ij->i", A); - EXPECT_EQ(A_reduced, expected_1); - - // Case 2: Transpose reduction - A_reduced = op::einsum("ij->j", A); - EXPECT_EQ(A_reduced, expected_2); - - // Case 3: All reduction - A_reduced = op::einsum("ij->", A); - EXPECT_EQ(A_reduced, Tensor({static_cast(21.0)}).to_device()); -} - -TYPED_TEST(EinsumOpTest, Stride) { - using Type = typename std::tuple_element<0, decltype(TypeParam())>::type; - using Device = typename std::tuple_element<1, decltype(TypeParam())>::type; - - const int dim = 3; - Tensor A = std::move(Tensor({static_cast(1.0), static_cast(2.0), static_cast(3.0), - static_cast(0.0), static_cast(4.0), static_cast(5.0), - static_cast(0.0), static_cast(0.0), static_cast(6.0)}).to_device()); - A.reshape({-1, dim}); - Tensor expected = std::move(Tensor( - {static_cast(1.0), static_cast(4.0), static_cast(6.0)}).to_device()); - - Tensor A_strided = op::einsum("ii->i", A); - EXPECT_EQ(A_strided, expected); -} - -TYPED_TEST(EinsumOpTest, Inflate) { - using Type = typename std::tuple_element<0, decltype(TypeParam())>::type; - using Device = typename std::tuple_element<1, decltype(TypeParam())>::type; - - const int dim = 3; - Tensor A = std::move(Tensor({static_cast(1.0), static_cast(4.0), static_cast(6.0)}).to_device()); - Tensor expected = std::move(Tensor( - {static_cast(1.0), static_cast(0.0), static_cast(0.0), - static_cast(0.0), static_cast(4.0), static_cast(0.0), - static_cast(0.0), static_cast(0.0), static_cast(6.0)}).to_device()); - expected.reshape({-1, dim}); - - Tensor A_inflated = op::einsum("i->ii", A); - EXPECT_EQ(A_inflated, expected); -} - -TYPED_TEST(EinsumOpTest, ContractDot) { - using Type = typename std::tuple_element<0, decltype(TypeParam())>::type; - using Device = typename std::tuple_element<1, decltype(TypeParam())>::type; - - const int n = 4; - const Tensor x = std::move(Tensor({static_cast(1.0), static_cast(2.0), static_cast(3.0), static_cast(4.0)}).to_device()); - const Tensor y = std::move(Tensor({static_cast(4.0), static_cast(3.0), static_cast(2.0), static_cast(1.0)}).to_device()); - - const Tensor expected = std::move(Tensor({static_cast(20.0)}).to_device()); - - Tensor z = op::einsum("i,i->", x, y); - EXPECT_EQ(z, expected); -} - -TYPED_TEST(EinsumOpTest, ContractGemv) { - using Type = typename std::tuple_element<0, decltype(TypeParam())>::type; - using Device = typename std::tuple_element<1, decltype(TypeParam())>::type; - - const int m = 2, n = 4; - Tensor A = std::move(Tensor({static_cast(1.0), static_cast(2.0), static_cast(3.0), static_cast(4.0), - static_cast(5.0), static_cast(6.0), static_cast(7.0), static_cast(8.0)}).to_device()); - A.reshape({m, n}); - const Tensor x1 = std::move(Tensor( - {static_cast(4.0), static_cast(3.0), static_cast(2.0), static_cast(1.0)}).to_device()); - const Tensor x2 = std::move(Tensor( - {static_cast(1.0), static_cast(2.0)}).to_device()); - - const Tensor expected_1 = std::move(Tensor( - {static_cast(20.0),static_cast(60.0)}).to_device()); - const Tensor expected_2 = std::move(Tensor( - {static_cast(11.0),static_cast(14.0),static_cast(17.0), static_cast(20.0)}).to_device()); - - Tensor y = op::einsum("ij,j->i", A, x1); - EXPECT_EQ(y, expected_1); - y = op::einsum("ij,i->j", A, x2); - EXPECT_EQ(y, expected_2); -} - -TYPED_TEST(EinsumOpTest, ContractGemm) { - using Type = typename std::tuple_element<0, decltype(TypeParam())>::type; - using Device = typename std::tuple_element<1, decltype(TypeParam())>::type; - - const int m = 2, k = 4, n = 2; - Tensor A = std::move(Tensor({static_cast(1.0), static_cast(2.0), static_cast(3.0), static_cast(4.0), - static_cast(5.0), static_cast(6.0), static_cast(7.0), static_cast(8.0)}).to_device()); - A.reshape({m, k}); - Tensor B = std::move(Tensor({static_cast(1.0), static_cast(2.0), - static_cast(3.0), static_cast(4.0), - static_cast(5.0), static_cast(6.0), - static_cast(7.0), static_cast(8.0)}).to_device()); - B.reshape({k, n}); - Tensor expected_1 = std::move(Tensor( - {static_cast(50.0), static_cast(60.0), - static_cast(114.0),static_cast(140.0)}).to_device()); - expected_1.reshape({m, n}); - Tensor expected_2 = std::move(Tensor( - {static_cast(11.0), static_cast(23.0), static_cast(35.0), static_cast(47.0), - static_cast(14.0), static_cast(30.0), static_cast(46.0), static_cast(62.0), - static_cast(17.0), static_cast(37.0), static_cast(57.0), static_cast(77.0), - static_cast(20.0), static_cast(44.0), static_cast(68.0), static_cast(92.0)}).to_device()); - expected_2.reshape({k, k}); - - Tensor C = op::einsum("ij,jk->ik", A, B); - EXPECT_EQ(C, expected_1); - C = op::einsum("ij,ki->jk", A, B); - EXPECT_EQ(C, expected_2); -} - -TYPED_TEST(EinsumOpTest, TransformEllipsis) { - using Type = typename std::tuple_element<0, decltype(TypeParam())>::type; - using Device = typename std::tuple_element<1, decltype(TypeParam())>::type; - - const int dim = 3; - Tensor A = std::move(Tensor({static_cast(1.0), static_cast(2.0), static_cast(3.0), - static_cast(0.0), static_cast(4.0), static_cast(5.0), - static_cast(0.0), static_cast(0.0), static_cast(6.0), - static_cast(1.0), static_cast(2.0), static_cast(3.0), - static_cast(0.0), static_cast(4.0), static_cast(5.0), - static_cast(0.0), static_cast(0.0), static_cast(6.0)}).to_device()); - A.reshape({-1, dim, dim}); - Tensor expected = std::move(Tensor( - {static_cast(1.0), static_cast(0.0), static_cast(0.0), - static_cast(2.0), static_cast(4.0), static_cast(0.0), - static_cast(3.0), static_cast(5.0), static_cast(6.0), - static_cast(1.0), static_cast(0.0), static_cast(0.0), - static_cast(2.0), static_cast(4.0), static_cast(0.0), - static_cast(3.0), static_cast(5.0), static_cast(6.0)}).to_device()); - expected.reshape({-1, dim, dim}); - Tensor expected_ellipsis = std::move(Tensor( - {static_cast(1.0), static_cast(1.0), - static_cast(0.0), static_cast(0.0), - static_cast(0.0), static_cast(0.0), - static_cast(2.0), static_cast(2.0), - static_cast(4.0), static_cast(4.0), - static_cast(0.0), static_cast(0.0), - static_cast(3.0), static_cast(3.0), - static_cast(5.0), static_cast(5.0), - static_cast(6.0), static_cast(6.0)}).to_device()); - expected_ellipsis.reshape({dim, dim, -1}); - - Tensor A_transformed = op::einsum("ijk->ikj", A); - EXPECT_EQ(A_transformed, expected); - Tensor A_transformed_ellipsis = op::einsum("...ij->...ji", A); - EXPECT_EQ(A_transformed_ellipsis, expected); - A_transformed_ellipsis = op::einsum("i...j->j...i", A); - EXPECT_EQ(A_transformed_ellipsis, expected_ellipsis); -} - -TYPED_TEST(EinsumOpTest, ReduceEllipsis) { - using Type = typename std::tuple_element<0, decltype(TypeParam())>::type; - using Device = typename std::tuple_element<1, decltype(TypeParam())>::type; - - const int dim = 3; - Tensor A = std::move(Tensor({static_cast(1.0), static_cast(2.0), static_cast(3.0), - static_cast(0.0), static_cast(4.0), static_cast(5.0), - static_cast(0.0), static_cast(0.0), static_cast(6.0), - static_cast(7.0), static_cast(8.0), static_cast(9.0), - static_cast(0.0), static_cast(10.0),static_cast(11.0), - static_cast(0.0), static_cast(0.0), static_cast(12.0)}).to_device()); - A.reshape({-1, dim, dim}); - Tensor expected_1 = std::move(Tensor( - {static_cast(6.0), static_cast(9.0), static_cast(6.0), - static_cast(24.0),static_cast(21.0),static_cast(12.0)}).to_device()); - expected_1.reshape({-1, dim}); - Tensor expected_2 = std::move(Tensor( - {static_cast(1.0), static_cast(6.0), static_cast(14.0), - static_cast(7.0), static_cast(18.0),static_cast(32.0)}).to_device()); - expected_2.reshape({-1, dim}); - - // Case 1: Normal reduction - Tensor A_reduced = op::einsum("ijk->ij", A); - EXPECT_EQ(A_reduced, expected_1); - Tensor A_reduced_ellipsis = op::einsum("...i->...", A); - EXPECT_EQ(A_reduced_ellipsis, expected_1); - - // Case 2: Transpose reduction - A_reduced = op::einsum("ijk->ik", A); - EXPECT_EQ(A_reduced, expected_2); - A_reduced_ellipsis = op::einsum("...jk->...k", A); - EXPECT_EQ(A_reduced_ellipsis, expected_2); - - // Case 3: All reduction - A_reduced = op::einsum("ijk->", A); - EXPECT_EQ(A_reduced, Tensor({static_cast(78.0)}).to_device()); - // Not available - // A_reduced = op::einsum("...->", A); -} - -TYPED_TEST(EinsumOpTest, StrideEllipsis) { - using Type = typename std::tuple_element<0, decltype(TypeParam())>::type; - using Device = typename std::tuple_element<1, decltype(TypeParam())>::type; - - const int dim = 3; - Tensor A = std::move(Tensor({static_cast(1.0), static_cast(2.0), static_cast(3.0), - static_cast(0.0), static_cast(4.0), static_cast(5.0), - static_cast(0.0), static_cast(0.0), static_cast(6.0), - static_cast(7.0), static_cast(8.0), static_cast(9.0), - static_cast(0.0), static_cast(10.0),static_cast(11.0), - static_cast(0.0), static_cast(0.0), static_cast(12.0), - static_cast(13.0),static_cast(14.0),static_cast(15.0), - static_cast(0.0), static_cast(16.0),static_cast(17.0), - static_cast(0.0), static_cast(0.0), static_cast(18.0)}).to_device()); - A.reshape({-1, dim, dim}); - Tensor expected_1 = std::move(Tensor( - {static_cast(1.0), static_cast(4.0), static_cast(6.0), - static_cast(7.0), static_cast(10.0),static_cast(12.0), - static_cast(13.0),static_cast(16.0),static_cast(18.0)}).to_device()); - expected_1.reshape({-1, dim}); - Tensor expected_2 = std::move(Tensor( - {static_cast(1.0), static_cast(2.0), static_cast(3.0), - static_cast(0.0), static_cast(10.0),static_cast(11.0), - static_cast(0.0), static_cast(0.0), static_cast(18.0)}).to_device()); - expected_2.reshape({-1, dim}); - - // Case 1: - Tensor A_strided = op::einsum("ijj->ij", A); - EXPECT_EQ(A_strided, expected_1); - Tensor A_strided_ellipsis = op::einsum("...jj->...j", A); - EXPECT_EQ(A_strided_ellipsis, expected_1); - - // Case 2: - A_strided = op::einsum("iij->ij", A); - EXPECT_EQ(A_strided, expected_2); - A_strided_ellipsis = op::einsum("ii...->i...", A); - EXPECT_EQ(A_strided_ellipsis, expected_2); - A_strided_ellipsis = op::einsum("iij...->ij...", A); - EXPECT_EQ(A_strided_ellipsis, expected_2); - A_strided_ellipsis = op::einsum("...iij->ij...", A); - EXPECT_EQ(A_strided_ellipsis, expected_2); -} - -TYPED_TEST(EinsumOpTest, InflateEllipsis) { - using Type = typename std::tuple_element<0, decltype(TypeParam())>::type; - using Device = typename std::tuple_element<1, decltype(TypeParam())>::type; - - const int dim = 3; - Tensor A = std::move(Tensor({static_cast(1.0), static_cast(4.0), static_cast(6.0)}).to_device()); - Tensor expected = std::move(Tensor( - {static_cast(1.0), static_cast(0.0), static_cast(0.0), - static_cast(0.0), static_cast(0.0), static_cast(0.0), - static_cast(0.0), static_cast(0.0), static_cast(0.0), - static_cast(0.0), static_cast(0.0), static_cast(0.0), - static_cast(0.0), static_cast(4.0), static_cast(0.0), - static_cast(0.0), static_cast(0.0), static_cast(0.0), - static_cast(0.0), static_cast(0.0), static_cast(0.0), - static_cast(0.0), static_cast(0.0), static_cast(0.0), - static_cast(0.0), static_cast(0.0), static_cast(6.0)}).to_device()); - expected.reshape({-1, dim, dim}); - - Tensor A_inflated = op::einsum("i->iii", A); - EXPECT_EQ(A_inflated, expected); - Tensor A_inflated_ellipsis = op::einsum("...i->...iii", A); - EXPECT_EQ(A_inflated_ellipsis, expected); -} - -TYPED_TEST(EinsumOpTest, ContractGemmEllipsis) { - using Type = typename std::tuple_element<0, decltype(TypeParam())>::type; - using Device = typename std::tuple_element<1, decltype(TypeParam())>::type; - - const int m = 2, k = 4, n = 2, batch_size = 2; - Tensor A = std::move(Tensor({static_cast(1.0), static_cast(2.0), static_cast(3.0), static_cast(4.0), - static_cast(5.0), static_cast(6.0), static_cast(7.0), static_cast(8.0), - static_cast(1.0), static_cast(2.0), static_cast(3.0), static_cast(4.0), - static_cast(5.0), static_cast(6.0), static_cast(7.0), static_cast(8.0)}).to_device()); - A.reshape({batch_size, m, k}); - Tensor B = std::move(Tensor({static_cast(1.0), static_cast(2.0), - static_cast(3.0), static_cast(4.0), - static_cast(5.0), static_cast(6.0), - static_cast(7.0), static_cast(8.0)}).to_device()); - B.reshape({k, n}); - Tensor expected = std::move(Tensor( - {static_cast(50.0), static_cast(60.0), - static_cast(114.0),static_cast(140.0), - static_cast(50.0), static_cast(60.0), - static_cast(114.0),static_cast(140.0)}).to_device()); - expected.reshape({batch_size, m, n}); - - Tensor C = op::einsum("ijk,...kl->i...jl", A, B); - EXPECT_EQ(C, expected); - - B = std::move(Tensor({ static_cast(1.0), static_cast(2.0), - static_cast(3.0), static_cast(4.0), - static_cast(5.0), static_cast(6.0), - static_cast(7.0), static_cast(8.0), - static_cast(1.0), static_cast(2.0), - static_cast(3.0), static_cast(4.0), - static_cast(5.0), static_cast(6.0), - static_cast(7.0), static_cast(8.0)}).to_device()); - - B.reshape({batch_size, k, n}); - C = op::einsum("ijk,ikl->ijl", A, B); - EXPECT_EQ(C, expected); - C = op::einsum("...jk,...kl->...jl", A, B); - EXPECT_EQ(C, expected); -} - -} // namespace op -} // namespace container diff --git a/source/module_base/module_container/ATen/ops/test/linalg_op_test.cpp b/source/module_base/module_container/ATen/ops/test/linalg_op_test.cpp deleted file mode 100644 index 610daec816..0000000000 --- a/source/module_base/module_container/ATen/ops/test/linalg_op_test.cpp +++ /dev/null @@ -1,275 +0,0 @@ -#include - -#include -#include -#include - -namespace container { -namespace op { - -template -class LinalgOpTest : public testing::Test { -public: - LinalgOpTest() = default; - ~LinalgOpTest() override = default; -}; - -TYPED_TEST_SUITE(LinalgOpTest, base::utils::Types); - -TYPED_TEST(LinalgOpTest, Add) { - using Type = typename std::tuple_element<0, decltype(TypeParam())>::type; - using Device = typename std::tuple_element<1, decltype(TypeParam())>::type; - - op::add_op addCalculator; - - Tensor A = std::move(Tensor({static_cast(1.0), static_cast(2.0), static_cast(3.0), - static_cast(0.0), static_cast(4.0), static_cast(5.0), - static_cast(0.0), static_cast(0.0), static_cast(6.0)}).to_device()); - Tensor B = std::move(Tensor({static_cast(1.0), static_cast(2.0), static_cast(3.0), - static_cast(0.0), static_cast(4.0), static_cast(5.0), - static_cast(0.0), static_cast(0.0), static_cast(6.0)}).to_device()); - Tensor C = A; - C.zero(); - - Tensor expected = std::move(Tensor( - {static_cast(2.0), static_cast(4.0), static_cast(6.0), - static_cast(0.0), static_cast(8.0), static_cast(10.0), - static_cast(0.0), static_cast(0.0), static_cast(12.0)}).to_device()); - addCalculator(A, B, C); - EXPECT_EQ(C, expected); - - C.zero(); - C = A + B; - EXPECT_EQ(C, expected); - - A += B; - EXPECT_EQ(A, expected); - - C.zero(); - C = expected - B; - C -= B; - expected.zero(); - EXPECT_EQ(C, expected); -} - -TYPED_TEST(LinalgOpTest, Sub) { - using Type = typename std::tuple_element<0, decltype(TypeParam())>::type; - using Device = typename std::tuple_element<1, decltype(TypeParam())>::type; - - op::add_op addCalculator; - - Tensor A = std::move(Tensor({static_cast(1.0), static_cast(2.0), static_cast(3.0), - static_cast(0.0), static_cast(4.0), static_cast(5.0), - static_cast(0.0), static_cast(0.0), static_cast(6.0)}).to_device()); - Tensor B = std::move(Tensor({static_cast(1.0), static_cast(2.0), static_cast(3.0), - static_cast(0.0), static_cast(4.0), static_cast(5.0), - static_cast(0.0), static_cast(0.0), static_cast(6.0)}).to_device()); - Tensor C = A; - C.zero(); - - Tensor expected = std::move(Tensor( - {static_cast(2.0), static_cast(4.0), static_cast(6.0), - static_cast(0.0), static_cast(8.0), static_cast(10.0), - static_cast(0.0), static_cast(0.0), static_cast(12.0)}).to_device()); - - C = expected - B; - C -= B; - expected.zero(); - EXPECT_EQ(C, expected); -} - -TYPED_TEST(LinalgOpTest, AddScalar) { - using Type = typename std::tuple_element<0, decltype(TypeParam())>::type; - using Device = typename std::tuple_element<1, decltype(TypeParam())>::type; - - op::add_op addCalculator; - - Tensor A = std::move(Tensor({static_cast(1.0), static_cast(2.0), static_cast(3.0), - static_cast(0.0), static_cast(4.0), static_cast(5.0), - static_cast(0.0), static_cast(0.0), static_cast(6.0)}).to_device()); - Tensor B = std::move(Tensor({static_cast(1.0), static_cast(2.0), static_cast(3.0), - static_cast(0.0), static_cast(4.0), static_cast(5.0), - static_cast(0.0), static_cast(0.0), static_cast(6.0)}).to_device()); - Tensor C = A; - C.zero(); - - Tensor expected = std::move(Tensor({static_cast(-1.0), static_cast(-2.0), static_cast(-3.0), - static_cast(0.0), static_cast(-4.0), static_cast(-5.0), - static_cast(0.0), static_cast(0.0), static_cast(-6.0)}).to_device()); - - auto alpha = static_cast(2.0); - auto beta = static_cast(-3.0); - - addCalculator(alpha, A, beta, B, C); - EXPECT_EQ(C, expected); -} - -TYPED_TEST(LinalgOpTest, Mul) { - using Type = typename std::tuple_element<0, decltype(TypeParam())>::type; - using Device = typename std::tuple_element<1, decltype(TypeParam())>::type; - - op::mul_op mulCalculator; - - Tensor A = std::move(Tensor({static_cast(1.0), static_cast(2.0), static_cast(3.0), - static_cast(0.0), static_cast(4.0), static_cast(5.0), - static_cast(0.0), static_cast(0.0), static_cast(6.0)}).to_device()); - - Tensor B = std::move(Tensor({static_cast(1.0), static_cast(2.0), static_cast(3.0), - static_cast(0.0), static_cast(4.0), static_cast(5.0), - static_cast(0.0), static_cast(0.0), static_cast(6.0)}).to_device()); - Tensor C = A; - C.zero(); - Tensor expected = std::move(Tensor({ - static_cast(1.0), static_cast(4.0), static_cast(9.0), - static_cast(0.0), static_cast(16.0),static_cast(25.0), - static_cast(0.0), static_cast(0.0), static_cast(36.0)}).to_device()); - - mulCalculator(A, B, C); - EXPECT_EQ(C, expected); - - C.zero(); - C = A * B; - EXPECT_EQ(C, expected); - - A *= B; - EXPECT_EQ(A, expected); -} - -TYPED_TEST(LinalgOpTest, MulScalar) { - using Type = typename std::tuple_element<0, decltype(TypeParam())>::type; - using Device = typename std::tuple_element<1, decltype(TypeParam())>::type; - - op::mul_op mulCalculator; - - Tensor A = std::move(Tensor({static_cast(1.0), static_cast(2.0), static_cast(3.0), - static_cast(0.0), static_cast(4.0), static_cast(5.0), - static_cast(0.0), static_cast(0.0), static_cast(6.0)}).to_device()); - - Tensor C = A; - C.zero(); - Tensor expected = std::move(Tensor({ - static_cast(2.0), static_cast(4.0), static_cast(6.0), - static_cast(0.0), static_cast(8.0),static_cast(10.0), - static_cast(0.0), static_cast(0.0), static_cast(12.0)}).to_device()); - - auto alpha = static_cast(2.0); - mulCalculator(alpha, A, C); - EXPECT_EQ(C, expected); -} - -TYPED_TEST(LinalgOpTest, Div) { - using Type = typename std::tuple_element<0, decltype(TypeParam())>::type; - using Device = typename std::tuple_element<1, decltype(TypeParam())>::type; - - op::div_op divCalculator; - - Tensor A = std::move(Tensor({static_cast(2.0), static_cast(4.0), static_cast(6.0), - static_cast(0.0), static_cast(8.0), static_cast(10.0), - static_cast(0.0), static_cast(0.0), static_cast(12.0)}).to_device()); - - Tensor B = std::move(Tensor({static_cast(1.0), static_cast(2.0), static_cast(3.0), - static_cast(1.0), static_cast(4.0), static_cast(5.0), - static_cast(1.0), static_cast(1.0), static_cast(6.0)}).to_device()); - Tensor C = A; - C.zero(); - Tensor expected = std::move(Tensor({ - static_cast(2.0), static_cast(2.0), static_cast(2.0), - static_cast(0.0), static_cast(2.0), static_cast(2.0), - static_cast(0.0), static_cast(0.0), static_cast(2.0)}).to_device()); - - divCalculator(A, B, C); - EXPECT_EQ(C, expected); - - C.zero(); - C = A / B; - EXPECT_EQ(C, expected); - - A /= B; - EXPECT_EQ(A, expected); -} - -TYPED_TEST(LinalgOpTest, Transpose) { - using Type = typename std::tuple_element<0, decltype(TypeParam())>::type; - using Device = typename std::tuple_element<1, decltype(TypeParam())>::type; - - op::transpose_op transposeCalculator; - - const int dim = 3; - Tensor A = std::move(Tensor({static_cast(1.0), static_cast(2.0), static_cast(3.0), - static_cast(0.0), static_cast(4.0), static_cast(5.0), - static_cast(0.0), static_cast(0.0), static_cast(6.0)}).to_device()); - A.reshape({-1, 3}); - Tensor A_transpose = A; - A_transpose.zero(); - - Tensor expected = std::move(Tensor({static_cast(1.0), static_cast(0.0), static_cast(0.0), - static_cast(2.0), static_cast(4.0), static_cast(0.0), - static_cast(3.0), static_cast(5.0), static_cast(6.0)}).to_device()); - expected.reshape({-1, 3}); - - transposeCalculator(A, {1, 0}, A_transpose); - - EXPECT_EQ(A_transpose, expected); -} - -TYPED_TEST(LinalgOpTest, Stride) { - using Type = typename std::tuple_element<0, decltype(TypeParam())>::type; - using Device = typename std::tuple_element<1, decltype(TypeParam())>::type; - - op::stride_op strideCalculator; - - Tensor A = std::move(Tensor({static_cast(1.0), static_cast(2.0), static_cast(3.0), - static_cast(0.0), static_cast(4.0), static_cast(5.0), - static_cast(0.0), static_cast(0.0), static_cast(6.0)}).to_device()); - - Tensor expected = std::move(Tensor({static_cast(1.0), static_cast(4.0), static_cast(6.0)}).to_device()); - Tensor A_stride = expected; - A_stride.zero(); - - strideCalculator(A, {4}, A_stride); - - EXPECT_EQ(A_stride, expected); -} - -TYPED_TEST(LinalgOpTest, Inflate) { - using Type = typename std::tuple_element<0, decltype(TypeParam())>::type; - using Device = typename std::tuple_element<1, decltype(TypeParam())>::type; - - op::inflate_op inflateCalculator; - - Tensor A = std::move(Tensor({static_cast(1.0), static_cast(0.0), static_cast(0.0), - static_cast(0.0), static_cast(4.0), static_cast(0.0), - static_cast(0.0), static_cast(0.0), static_cast(6.0)}).to_device()); - Tensor A_inflate = A; - A_inflate.zero(); - Tensor expected = std::move(Tensor({static_cast(1.0), static_cast(4.0), static_cast(6.0)}).to_device()); - - - inflateCalculator(expected, {4}, A_inflate); - - EXPECT_EQ(A, A_inflate); -} - -TYPED_TEST(LinalgOpTest, Reduce) { - using Type = typename std::tuple_element<0, decltype(TypeParam())>::type; - using Device = typename std::tuple_element<1, decltype(TypeParam())>::type; - - op::reduce_op reduceCalculator; - - Tensor A = std::move(Tensor({static_cast(1.0), static_cast(2.0), static_cast(3.0), - static_cast(0.0), static_cast(4.0), static_cast(5.0), - static_cast(0.0), static_cast(0.0), static_cast(6.0)}).to_device()); - A.reshape({-1, 3}); - - Tensor expected = std::move( - Tensor({static_cast(6.0), static_cast(9.0), static_cast(6.0)}).to_device()); - Tensor A_reduce = expected; - A_reduce.zero(); - - reduceCalculator(A, 3, A_reduce); - - EXPECT_EQ(A_reduce, expected); -} - -} // namespace op -} // namespace container diff --git a/source/module_base/module_container/ATen/tensor.h b/source/module_base/module_container/ATen/tensor.h deleted file mode 100644 index 05482ba1e6..0000000000 --- a/source/module_base/module_container/ATen/tensor.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef ATEN_TENSOR_H_ -#define ATEN_TENSOR_H_ - -#include - -#endif // ATEN_TENSOR_H_ \ No newline at end of file diff --git a/source/module_base/module_container/CMakeLists.txt b/source/module_base/module_container/CMakeLists.txt deleted file mode 100644 index 80a8dce5fc..0000000000 --- a/source/module_base/module_container/CMakeLists.txt +++ /dev/null @@ -1,35 +0,0 @@ -# FetchContent_MakeAvailable was not added until CMake 3.14 -cmake_minimum_required(VERSION 3.14) - -set(ATen_CPU_SRCS) -set(ATen_CUDA_SRCS) -set(ATen_ROCM_SRCS) -set(ATen_CPU_DEPENDENCY_LIBS) -set(ATen_CUDA_DEPENDENCY_LIBS) -set(ATen_ROCM_DEPENDENCY_LIBS) - -add_subdirectory(base/core) - -add_subdirectory(ATen/ops) -add_subdirectory(ATen/core) -add_subdirectory(ATen/kernels) - -if(USE_ROCM) - hip_add_library(container_rocm STATIC ${ATen_ROCM_SRCS}) - set(ATen_ROCM_DEPENDENCY_LIBS container_rocm) -endif() - -add_library(container STATIC ${ATen_CPU_SRCS} ${ATen_CUDA_SRCS}) - -target_link_libraries(container PUBLIC - ${ATen_CPU_DEPENDENCY_LIBS} ${ATen_CUDA_DEPENDENCY_LIBS} ${ATen_ROCM_DEPENDENCY_LIBS}) - -if(ENABLE_COVERAGE) - add_coverage(container) -endif() - -if(BUILD_TESTING) - if(ENABLE_MPI) - add_subdirectory(test) - endif() -endif() diff --git a/source/module_base/module_container/base/core/CMakeLists.txt b/source/module_base/module_container/base/core/CMakeLists.txt deleted file mode 100644 index 42119b2ffc..0000000000 --- a/source/module_base/module_container/base/core/CMakeLists.txt +++ /dev/null @@ -1,12 +0,0 @@ -set(BASE_CORE_CPU_SRCS - base/core/refcount.cpp - base/core/cpu_allocator.cpp -) - -if (USE_CUDA OR USE_ROCM) - list(APPEND BASE_CORE_CPU_SRCS - base/core/gpu_allocator.cpp - ) -endif() - -set(ATen_CPU_SRCS ${ATen_CPU_SRCS} ${BASE_CORE_CPU_SRCS} PARENT_SCOPE) \ No newline at end of file diff --git a/source/module_base/module_container/base/core/allocator.h b/source/module_base/module_container/base/core/allocator.h deleted file mode 100644 index 76c14d8b6b..0000000000 --- a/source/module_base/module_container/base/core/allocator.h +++ /dev/null @@ -1,74 +0,0 @@ -#ifndef BASE_CORE_ALLOCATOR_H_ -#define BASE_CORE_ALLOCATOR_H_ - -#include - -namespace base { -namespace core { -/** - * @brief An abstract base class for memory allocators. - * - * This class defines an interface for memory allocators. Subclasses of this class - * can provide different implementations of memory allocation/deallocation strategies. - * - * All memory allocated by an Allocator must be freed using the same allocator that - * allocated it. - */ -class Allocator { - public: - /** - * @brief Allocate a block of memory with the given size and default alignment. - * - * @param size The size of the memory block to allocate. - * - * @return A pointer to the allocated memory block, or nullptr if the allocation fails. - */ - virtual void* allocate(size_t size) = 0; - - /** - * @brief Allocate a block of memory with the given size and alignment. - * - * @param size The size of the memory block to allocate. - * @param alignment The alignment of the memory block to allocate. - * - * @return A pointer to the allocated memory block, or nullptr if the allocation fails. - */ - virtual void* allocate(size_t size, size_t alignment) = 0; - - /** - * @brief Free a block of memory that was previously allocated by this allocator. - * - * @param ptr A pointer to the memory block to free. - */ - virtual void free(void* ptr) = 0; - - /** - * @brief Get the allocated size of a given pointer. - * - * @param ptr The pointer to get the allocated size of. - * @return size_t The size of the allocated block of memory, in bytes. - */ - virtual size_t AllocatedSize(void* ptr) { - return allocated_size_; - } - - /** - * @brief Get the type of memory used by the TensorBuffer. - * - * @return MemoryType The type of memory used by the TensorBuffer. - */ - virtual container::DeviceType GetDeviceType() = 0; - - virtual ~Allocator() = default; - - protected: - /** - * @brief The total number of bytes allocated by this allocator. - */ - size_t allocated_size_ = 0; -}; - -} // namespace core -} // namespace base - -#endif // BASE_CORE_ALLOCATOR_H_ diff --git a/source/module_base/module_container/base/core/bfc_allocator.h b/source/module_base/module_container/base/core/bfc_allocator.h deleted file mode 100644 index 661a097529..0000000000 --- a/source/module_base/module_container/base/core/bfc_allocator.h +++ /dev/null @@ -1,137 +0,0 @@ -#ifndef BASE_CORE_BFC_ALLOCATOR_H_ -#define BASE_CORE_BFC_ALLOCATOR_H_ - -#include - -namespace base { -namespace core { -/** - * @brief An allocator that allocates memory on a GPU device. - * - * This class provides an implementation of the Allocator interface that allocates memory - * on a GPU device using CUDA APIs. - */ -class BFCAllocator : public Allocator { -public: - - struct Options { - bool allow_growth = true; - double fragment_fraction = 0.0; - }; - - BFCAllocator(std::unique_ptr sub_alloc, const size_t& total_memory, const Options& options = Options()); - - ~BFCAllocator(); - /** - * @brief Allocate a block of memory with the given size and default alignment on GPU. - * - * @param size The size of the memory block to allocate. - * - * @return A pointer to the allocated memory block, or nullptr if the allocation fails. - */ - void* allocate(size_t size) override; - - /** - * @brief Allocate a block of memory with the given size and alignment on GPU. - * - * @param size The size of the memory block to allocate. - * @param alignment The alignment of the memory block to allocate. - * - * @return A pointer to the allocated memory block, or nullptr if the allocation fails. - */ - void* allocate(size_t size, size_t alignment) override; - - /** - * @brief Free a block of GPU memory that was previously allocated by this allocator. - * - * @param ptr A pointer to the memory block to free. - */ - void free(void* ptr) override; - - /** - * @brief Get the type of memory used by the TensorBuffer. - * - * @return MemoryType The type of memory used by the TensorBuffer. - */ - DeviceType GetDeviceType() override; - - private: - - // The sub allocator to use for extending the BFC's memory pool. - std::unique_ptr sub_alloc_; - - struct bin; - mutable std::mutex mtx_; - - // A chunk_handle is an index into the chunks_ vector in BFCAllocator - // kInvalidChunkHandle means an invalid chunk index. - typedef size_t chunk_handle_t; - static constexpr chunk_handle_t kInvalidChunkHandle = UINT64_MAX; - - typedef int bin_index_t; - static constexpr int kInvalidBinNum = -1; - // The following means that the largest bin'd chunk size is 256 << 21 = 512MB. - static constexpr int kNumBins = 21; - - struct chunk { - // The size of the chunk in bytes. - size_t size = 0; - // The bin index of the chunk. - bin_index_t bin_index = kInvalidBinNum; - // We sometimes give chunks that are larger than needed to reduce - // fragmentation. requested_size keeps track of what the client - // actually wanted so we can understand whether our splitting - // strategy is efficient. - size_t requested_size = 0; - // allocation_id is set to -1 when the chunk is not in use. It is assigned a - // value greater than zero before the chunk is returned from - // AllocateRaw, and this value is unique among values assigned by - // the parent allocator. - int64_t allocation_id = -1; - // pointer to granted subbuffer. - void* ptr = nullptr; - chunk_handle_t next_chunk_handle = kInvalidChunkHandle; - // The handle of the previous chunk in the bin. - chunk_handle_t prev_chunk_handle = kInvalidChunkHandle; - // Whether the chunk is allocated. - bool allocated() const { return allocation_id > 0; } - }; - - struct bin { - // The size of the chunks in this bin. - size_t bin_size = 0; - // The number of chunks in this bin. - size_t num_chunks = 0; - // The handle of the first chunk in the bin. - chunk_handle_t first_chunk_handle = kInvalidChunkHandle; - // The handle of the last chunk in the bin. - chunk_handle_t last_chunk_handle = kInvalidChunkHandle; - - class chunk_comparator { - public: - explicit chunk_comparator(BFCAllocator* allocator) : allocator_(allocator) {} - // Sort first by size and then use pointer address as a tie breaker. - bool operator()(const chunk_handle_t ha, - const chunk_handle_t hb) const { - const chunk* a = allocator_->chunk_from_handle(ha); - const chunk* b = allocator_->chunk_from_handle(hb); - if (a->size != b->size) { - return a->size < b->size; - } - return a->ptr < b->ptr; - } - - private: - BFCAllocator* allocator_; // The parent allocator - }; - - using free_chunk_set_t = std::set; - }; - - -}; - -} // namespace core -} // namespace base - -#endif // BASE_CORE_BFC_ALLOCATOR_H_ diff --git a/source/module_base/module_container/base/core/cpu_allocator.cpp b/source/module_base/module_container/base/core/cpu_allocator.cpp deleted file mode 100644 index 2027402430..0000000000 --- a/source/module_base/module_container/base/core/cpu_allocator.cpp +++ /dev/null @@ -1,34 +0,0 @@ -#include - -namespace base { -namespace core { - -// Allocate a block of CPU memory with the given size and default alignment. -void *CPUAllocator::allocate(size_t size) { - this->allocated_size_ = size; - return ::operator new(size); -} - -// Allocate a block of CPU memory with the given size and alignment. -void *CPUAllocator::allocate(size_t size, size_t alignment) { - this->allocated_size_ = size; - void *ptr = nullptr; - if (posix_memalign(&ptr, alignment, size) != 0) { - ptr = nullptr; - } - return ptr; -} - -// Free a block of CPU memory that was previously allocated by this allocator. -void CPUAllocator::free(void *ptr) { - this->allocated_size_ = 0; - ::operator delete(ptr); -} - -// Get the type of device used by the TensorBuffer. -container::DeviceType CPUAllocator::GetDeviceType() { - return container::DeviceType::CpuDevice; -} - -} // namespace core -} // namespace base diff --git a/source/module_base/module_container/base/core/cpu_allocator.h b/source/module_base/module_container/base/core/cpu_allocator.h deleted file mode 100644 index 020234a563..0000000000 --- a/source/module_base/module_container/base/core/cpu_allocator.h +++ /dev/null @@ -1,57 +0,0 @@ -#ifndef BASE_CORE_CPU_ALLOCATOR_H_ -#define BASE_CORE_CPU_ALLOCATOR_H_ - -#include - -namespace base { -namespace core { - -/** - * @brief An Allocator subclass for CPU memory. - * - * This class provides an implementation of the Allocator interface for CPU memory. It - * uses the standard library functions std::malloc, std::free, and std::aligned_alloc - * to allocate and deallocate memory blocks. - */ -class CPUAllocator : public Allocator { -public: - - /** - * @brief Allocate a block of CPU memory with the given size and default alignment. - * - * @param size The size of the memory block to allocate. - * - * @return A pointer to the allocated memory block, or nullptr if the allocation fails. - */ - void *allocate(size_t size) override; - - /** - * @brief Allocate a block of CPU memory with the given size and alignment. - * - * @param size The size of the memory block to allocate. - * @param alignment The alignment of the memory block to allocate. - * - * @return A pointer to the allocated memory block, or nullptr if the allocation fails. - */ - void *allocate(size_t size, size_t alignment) override; - - /** - * @brief Free a block of CPU memory that was previously allocated by this allocator. - * - * @param ptr A pointer to the memory block to free. - */ - void free(void *ptr) override; - - /** - * @brief Get the type of device used by the TensorBuffer. - * - * @return MemoryType The type of memory used by the TensorBuffer. - */ - container::DeviceType GetDeviceType() override; - -}; - -} // namespace core -} // namespace base - -#endif // BASE_CORE_CPU_ALLOCATOR_H_ diff --git a/source/module_base/module_container/base/core/gpu_allocator.cpp b/source/module_base/module_container/base/core/gpu_allocator.cpp deleted file mode 100644 index cf38684bcd..0000000000 --- a/source/module_base/module_container/base/core/gpu_allocator.cpp +++ /dev/null @@ -1,53 +0,0 @@ -#include - -#if defined(__CUDA) -#include // for CUDA APIs -#define device_malloc cudaMalloc -#define device_free cudaFree -#define device_result_t cudaError_t -#define device_success cudaSuccess -#elif defined(__ROCM) -#include // for ROCm APIs -#define device_malloc hipMalloc -#define device_free hipFree -#define device_result_t hipError_t -#define device_success hipSuccess -#endif - -namespace base { -namespace core { -// Allocate a block of memory with the given size and default alignment on GPU. -void *GPUAllocator::allocate(size_t size) { - void *ptr; - device_result_t result = device_malloc(&ptr, size); - if (result != device_success) { - return nullptr; - } - this->allocated_size_ = size; - return ptr; -} - -// Allocate a block of CPU memory with the given size and alignment. -void *GPUAllocator::allocate(size_t size, size_t alignment) { - void *ptr; - device_result_t result = device_malloc(&ptr, size); - if (result != device_success) { - return nullptr; - } - this->allocated_size_ = size; - return ptr; -} - -// Free a block of CPU memory that was previously allocated by this allocator. -void GPUAllocator::free(void *ptr) { - device_free(ptr); - this->allocated_size_ = 0; -} - -// Get the type of device used by the TensorBuffer. -container::DeviceType GPUAllocator::GetDeviceType() { - return container::DeviceType::GpuDevice; -} - -} // namespace core -} // namespace base diff --git a/source/module_base/module_container/base/core/gpu_allocator.h b/source/module_base/module_container/base/core/gpu_allocator.h deleted file mode 100644 index 446f57d0ce..0000000000 --- a/source/module_base/module_container/base/core/gpu_allocator.h +++ /dev/null @@ -1,53 +0,0 @@ -#ifndef BASE_CORE_GPU_ALLOCATOR_H_ -#define BASE_CORE_GPU_ALLOCATOR_H_ - -#include - -namespace base { -namespace core { -/** - * @brief An allocator that allocates memory on a GPU device. - * - * This class provides an implementation of the Allocator interface that allocates memory - * on a GPU device using CUDA APIs. - */ -class GPUAllocator : public Allocator { -public: - /** - * @brief Allocate a block of memory with the given size and default alignment on GPU. - * - * @param size The size of the memory block to allocate. - * - * @return A pointer to the allocated memory block, or nullptr if the allocation fails. - */ - void *allocate(size_t size) override; - - /** - * @brief Allocate a block of memory with the given size and alignment on GPU. - * - * @param size The size of the memory block to allocate. - * @param alignment The alignment of the memory block to allocate. - * - * @return A pointer to the allocated memory block, or nullptr if the allocation fails. - */ - void *allocate(size_t size, size_t alignment) override; - - /** - * @brief Free a block of GPU memory that was previously allocated by this allocator. - * - * @param ptr A pointer to the memory block to free. - */ - void free(void *ptr) override; - - /** - * @brief Get the type of memory used by the TensorBuffer. - * - * @return MemoryType The type of memory used by the TensorBuffer. - */ - container::DeviceType GetDeviceType() override; -}; - -} // namespace base -} // namespace core - -#endif // BASE_CORE_GPU_ALLOCATOR_H_ diff --git a/source/module_base/module_container/base/core/refcount.cpp b/source/module_base/module_container/base/core/refcount.cpp deleted file mode 100644 index 98d9e352b6..0000000000 --- a/source/module_base/module_container/base/core/refcount.cpp +++ /dev/null @@ -1,30 +0,0 @@ -#include -#include "refcount.h" - -namespace base { -namespace core { - -counted_base::counted_base() : ref_(1) {} - -void counted_base::ref() const { - ref_.fetch_add(1, std::memory_order_relaxed); -} - -bool counted_base::unref() const { - if (ref_.fetch_sub(1, std::memory_order_acq_rel) == 1) { - delete this; - return true; - } - return false; -} - -int_fast32_t counted_base::ref_count() const { - return ref_.load(std::memory_order_acquire); -} - -bool counted_base::ref_count_is_one() const { - return ref_count() == 1; -} - -} // namespace core -} // namespace base \ No newline at end of file diff --git a/source/module_base/module_container/base/core/refcount.h b/source/module_base/module_container/base/core/refcount.h deleted file mode 100644 index 14abafcf35..0000000000 --- a/source/module_base/module_container/base/core/refcount.h +++ /dev/null @@ -1,120 +0,0 @@ -#ifndef BASE_CORE_REFCOUNT_H_ -#define BASE_CORE_REFCOUNT_H_ - -#include -#include -#include - -namespace base { -namespace core { - -/** - * @brief The base class for reference-counted objects. - */ -class counted_base { - public: - /** - * @brief Default constructor. Initializes the reference count to one. - */ - counted_base(); - - /** - * @brief Increases the reference count by one. - */ - void ref() const; - - /** - * @brief Decreases the reference count by one. - * @return True if the object is deleted, otherwise false. - */ - bool unref() const; - - /** - * @brief Gets the current reference count. - * @return The current reference count. - */ - int_fast32_t ref_count() const; - - /** - * @brief Checks if the reference count is one. - * @return True if the reference count is one, otherwise false. - */ - bool ref_count_is_one() const; - - protected: - /** - * @brief Virtual destructor. - * @details The destructor is protected to prevent the explicit initialization of the base class. - */ - virtual ~counted_base() {} - - private: - mutable std::atomic_int_fast32_t ref_; - counted_base(const counted_base&) = delete; - void operator=(const counted_base&) = delete; -}; - -/** - * @brief A deleter functor for creating std::unique_ptr that unrefs objects. - */ -struct ref_count_deleter { - /** - * @brief Calls unref on the object. - * @param o Pointer to the object. - */ - void operator()(const counted_base* o) const { - o->unref(); - } -}; - -/** - * @brief A smart pointer that holds a reference-counted object and releases it on destruction. - * @tparam T Type of the object. - */ -template -class ref_count_ptr; - -/** - * @brief Adds a new reference to a counted_base pointer. - * @tparam T Type of the object. - * @param ptr Pointer to the object. - * @return A smart pointer holding the reference to the object. - */ -template -std::unique_ptr get_new_ref(T* ptr) { - static_assert(std::is_base_of::value, - "T must be derived from counted_base"); - - if (ptr == nullptr) { - return std::unique_ptr(); - } - ptr->ref(); - return std::unique_ptr(ptr); -} - -/** - * @brief A smart pointer that unrefs the owned object on destruction. - * @tparam T Type of the object. - */ -template -class ref_count_ptr : public std::unique_ptr { - public: - using std::unique_ptr::unique_ptr; - - /** - * @brief Adds a new reference to the owned object. - * @return A smart pointer holding the reference to the object. - */ - std::unique_ptr get_new_ref() const { - if (this->get() == nullptr) { - return std::unique_ptr(); - } - this->get()->ref(); - return std::unique_ptr(this->get()); - } -}; - -} // namespace core -} // namespace base - -#endif // BASE_CORE_REFCOUNT_H_ \ No newline at end of file diff --git a/source/module_base/module_container/base/macros/cuda.h b/source/module_base/module_container/base/macros/cuda.h deleted file mode 100644 index ac5ced387a..0000000000 --- a/source/module_base/module_container/base/macros/cuda.h +++ /dev/null @@ -1,229 +0,0 @@ -#ifndef BASE_MACROS_CUDA_H_ -#define BASE_MACROS_CUDA_H_ - -#include -#include -#include -#include - -#define THREADS_PER_BLOCK 256 - -template -struct GetTypeThrust -{ - using type = T; -}; - -template <> -struct GetTypeThrust> -{ - using type = thrust::complex; /**< The return type specialization for std::complex. */ -}; - -template <> -struct GetTypeThrust> -{ - using type = thrust::complex; /**< The return type specialization for std::complex. */ -}; - -static inline cublasOperation_t GetCublasOperation(const char& trans) -{ - cublasOperation_t cutrans = {}; - if (trans == 'N') - { - cutrans = CUBLAS_OP_N; - } - else if (trans == 'T') - { - cutrans = CUBLAS_OP_T; - } - else if (trans == 'C') - { - cutrans = CUBLAS_OP_C; - } - return cutrans; -} - -template -struct GetTypeCuda -{ - static constexpr cudaDataType cuda_data_type = cudaDataType::CUDA_R_32F; -}; -// Specializations of DataTypeToEnum for supported types. -template <> -struct GetTypeCuda -{ - static constexpr cudaDataType cuda_data_type = cudaDataType::CUDA_R_32I; -}; -template <> -struct GetTypeCuda -{ - static constexpr cudaDataType cuda_data_type = cudaDataType::CUDA_R_32F; -}; -template <> -struct GetTypeCuda -{ - static constexpr cudaDataType cuda_data_type = cudaDataType::CUDA_R_64F; -}; -template <> -struct GetTypeCuda -{ - static constexpr cudaDataType cuda_data_type = cudaDataType::CUDA_R_64I; -}; -template <> -struct GetTypeCuda> -{ - static constexpr cudaDataType cuda_data_type = cudaDataType::CUDA_C_32F; -}; -template <> -struct GetTypeCuda> -{ - static constexpr cudaDataType cuda_data_type = cudaDataType::CUDA_C_64F; -}; - -static inline cublasFillMode_t cublas_fill_mode(const char& uplo) -{ - if (uplo == 'U' || uplo == 'u') - return CUBLAS_FILL_MODE_UPPER; - else if (uplo == 'L' || uplo == 'l') - return CUBLAS_FILL_MODE_LOWER; - else - throw std::runtime_error("cublas_fill_mode: unknown uplo"); -} - -static inline cublasDiagType_t cublas_diag_type(const char& diag) -{ - if (diag == 'U' || diag == 'u') - return CUBLAS_DIAG_UNIT; - else if (diag == 'N' || diag == 'n') - return CUBLAS_DIAG_NON_UNIT; - else - throw std::runtime_error("cublas_diag_type: unknown diag"); -} - -static inline cusolverEigMode_t cublas_eig_mode(const char& jobz) -{ - if (jobz == 'N' || jobz == 'n') - return CUSOLVER_EIG_MODE_NOVECTOR; - else if (jobz == 'V' || jobz == 'v') - return CUSOLVER_EIG_MODE_VECTOR; - else - throw std::runtime_error("cublas_eig_mode: unknown diag"); -} - -static inline cusolverEigType_t cublas_eig_type(const int& itype) -{ - if (itype == 1) - return CUSOLVER_EIG_TYPE_1; - else if (itype == 2) - return CUSOLVER_EIG_TYPE_2; - else - throw std::runtime_error("cublas_eig_mode: unknown diag"); -} - -// cuSOLVER API errors -static const char* cusolverGetErrorEnum(cusolverStatus_t error) -{ - switch (error) - { - case CUSOLVER_STATUS_SUCCESS: - return "CUSOLVER_STATUS_SUCCESS"; - case CUSOLVER_STATUS_NOT_INITIALIZED: - return "CUSOLVER_STATUS_NOT_INITIALIZED"; - case CUSOLVER_STATUS_ALLOC_FAILED: - return "CUSOLVER_STATUS_ALLOC_FAILED"; - case CUSOLVER_STATUS_INVALID_VALUE: - return "CUSOLVER_STATUS_INVALID_VALUE"; - case CUSOLVER_STATUS_ARCH_MISMATCH: - return "CUSOLVER_STATUS_ARCH_MISMATCH"; - case CUSOLVER_STATUS_MAPPING_ERROR: - return "CUSOLVER_STATUS_MAPPING_ERROR"; - case CUSOLVER_STATUS_EXECUTION_FAILED: - return "CUSOLVER_STATUS_EXECUTION_FAILED"; - case CUSOLVER_STATUS_INTERNAL_ERROR: - return "CUSOLVER_STATUS_INTERNAL_ERROR"; - case CUSOLVER_STATUS_MATRIX_TYPE_NOT_SUPPORTED: - return "CUSOLVER_STATUS_MATRIX_TYPE_NOT_SUPPORTED"; - case CUSOLVER_STATUS_NOT_SUPPORTED: - return "CUSOLVER_STATUS_NOT_SUPPORTED "; - case CUSOLVER_STATUS_ZERO_PIVOT: - return "CUSOLVER_STATUS_ZERO_PIVOT"; - case CUSOLVER_STATUS_INVALID_LICENSE: - return "CUSOLVER_STATUS_INVALID_LICENSE"; - default: - return "Unknown cusolverStatus_t message"; - } -} - -inline void cusolverAssert(cusolverStatus_t code, const char* file, int line) -{ - if (code != CUSOLVER_STATUS_SUCCESS) - { - fprintf(stderr, " Unexpected cuSOLVER Error: %s %s %d\n", cusolverGetErrorEnum(code), file, line); - exit(code); - } -} - -// cuSOLVER API errors -static const char* cublasGetErrorEnum(cublasStatus_t error) -{ - switch (error) - { - case CUBLAS_STATUS_SUCCESS: - return "CUBLAS_STATUS_SUCCESS"; - case CUBLAS_STATUS_NOT_INITIALIZED: - return "CUBLAS_STATUS_NOT_INITIALIZED"; - case CUBLAS_STATUS_ALLOC_FAILED: - return "CUBLAS_STATUS_ALLOC_FAILED"; - case CUBLAS_STATUS_INVALID_VALUE: - return "CUBLAS_STATUS_INVALID_VALUE"; - case CUBLAS_STATUS_ARCH_MISMATCH: - return "CUBLAS_STATUS_ARCH_MISMATCH"; - case CUBLAS_STATUS_MAPPING_ERROR: - return "CUBLAS_STATUS_MAPPING_ERROR"; - case CUBLAS_STATUS_EXECUTION_FAILED: - return "CUBLAS_STATUS_EXECUTION_FAILED"; - case CUBLAS_STATUS_INTERNAL_ERROR: - return "CUBLAS_STATUS_INTERNAL_ERROR"; - default: - return "Unknown"; - } -} - -inline void cublasAssert(cublasStatus_t res, const char* file, int line) -{ - if (res != CUBLAS_STATUS_SUCCESS) - { - fprintf(stderr, " Unexpected cuBLAS Error: %s %s %d\n", cublasGetErrorEnum(res), file, line); - exit(res); - } -} - -#define cusolverErrcheck(res) \ - { \ - cusolverAssert((res), __FILE__, __LINE__); \ - } - -#define cublasErrcheck(res) \ - { \ - cublasAssert((res), __FILE__, __LINE__); \ - } - -// CUDA API errors -#define cudaErrcheck(res) \ - { \ - if (res != cudaSuccess) \ - { \ - fprintf(stderr, " Unexpected Device Error %s:%d: %s, %s\n", __FILE__, __LINE__, cudaGetErrorName(res), \ - cudaGetErrorString(res)); \ - exit(res); \ - } \ - } - -#ifdef __DEBUG -#define cudaCheckOnDebug() cudaErrcheck(cudaDeviceSynchronize()) -#else -#define cudaCheckOnDebug() -#endif - -#endif // BASE_MACROS_CUDA_H_ \ No newline at end of file diff --git a/source/module_base/module_container/base/macros/macros.h b/source/module_base/module_container/base/macros/macros.h deleted file mode 100644 index 645c6aee89..0000000000 --- a/source/module_base/module_container/base/macros/macros.h +++ /dev/null @@ -1,240 +0,0 @@ -#ifndef BASE_MACROS_MACROS_H_ -#define BASE_MACROS_MACROS_H_ - -#include -#include - -#if __CUDA -#include -#elif __ROCM -#include -#endif - -#include - -#define DISALLOW_COPY_AND_ASSIGN(TypeName) \ - TypeName(const TypeName&) = delete; \ - void operator=(const TypeName&) = delete - -#define DISALLOW_MOVE_AND_ASSIGN(TypeName) \ - TypeName(TypeName&&) = delete; \ - void operator=(TypeName&&) = delete - -#define DISALLOW_COPY_MOVE_AND_ASSIGN(TypeName) \ - DISALLOW_COPY_AND_ASSIGN(TypeName); \ - DISALLOW_MOVE_AND_ASSIGN(TypeName) - -#define DISALLOW_IMPLICIT_CONSTRUCTORS(TypeName) \ - TypeName() = delete; \ - DISALLOW_COPY_MOVE_AND_ASSIGN(TypeName) - -#define MAX_SIZE_T UINT64_MAX - -#if defined(__CUDACC__) || defined(__HIPCC__) -#define AT_HOST __host__ -#define AT_DEVICE __device__ -#define AT_HOST_DEVICE __host__ __device__ -#else -#define AT_HOST -#define AT_DEVICE -#define AT_HOST_DEVICE -#endif // defined(__CUDACC__) || defined(__HIPCC__) - -#if defined(__GNUC__) || defined(__ICL) || defined(__clang__) -#define PREDICT_TRUE(expr) (__builtin_expect(static_cast(expr), 1)) -#define PREDICT_FALSE(expr) (__builtin_expect(static_cast(expr), 0)) -#else -#define PREDICT_TRUE(expr) (expr) -#define PREDICT_FALSE(expr) (expr) -#endif - -#define CHECK_MSG(expr, ...) \ - (::base::utils::check_msg_impl( \ - "Expected " #expr \ - " to be true, but got false. " \ - __VA_ARGS__ " " \ - "(Could this error message be improved? If so, " \ - "please report an enhancement request to Container)" \ - )) - -#define REQUIRES_OK(expr, ...) \ - if(PREDICT_FALSE(!(expr))) { \ - ::base::utils::check_exit_impl( \ - __func__, \ - __FILE__, \ - static_cast(__LINE__), \ - CHECK_MSG(expr, ##__VA_ARGS__)); \ - } - -// The macro TEMPLATE_1() expands to a switch statement conditioned on -// TYPE_ENUM. Each case expands the STMTS after a typedef for T. -#define SINGLE_ARG(...) __VA_ARGS__ - -#define CASE_2(TYPE, DEVICE, STMTS) \ - case (int(ct::DataTypeToEnum::value) * 10 + \ - int(ct::DeviceTypeToEnum::value)): { \ - typedef TYPE T_; \ - typedef DEVICE DEVICE_; \ - STMTS; \ - break; \ - } - -#define CASE_LAMBDA_2(TYPE, DEVICE, FUNC) \ - case (int(ct::DataTypeToEnum::value) * 10 + \ - int(ct::DeviceTypeToEnum::value)): { \ - typedef TYPE T_; \ - typedef DEVICE DEVICE_; \ - FUNC(); \ - break; \ - } - -#define CASES_ALL_WITH_DEFAULT_2(TYPE_ENUM, DEVICE_ENUM, STMTS, DEFAULT) \ - switch (int(TYPE_ENUM) * 10 + int(DEVICE_ENUM)) { \ - CASE_2(float, ct::DEVICE_CPU, SINGLE_ARG(STMTS)) \ - CASE_2(double, ct::DEVICE_CPU, SINGLE_ARG(STMTS)) \ - CASE_2(int, ct::DEVICE_CPU, SINGLE_ARG(STMTS)) \ - CASE_2(int64_t, ct::DEVICE_CPU, SINGLE_ARG(STMTS)) \ - CASE_2(std::complex, ct::DEVICE_CPU, SINGLE_ARG(STMTS)) \ - CASE_2(std::complex, ct::DEVICE_CPU, SINGLE_ARG(STMTS)) \ - default: \ - DEFAULT; \ - break; \ - } - -#define CASES_ALL_LAMBDA_WITH_DEFAULT_2(TYPE_ENUM, DEVICE_ENUM, FUNC, DEFAULT) \ - switch (int(TYPE_ENUM) * 10 + int(DEVICE_ENUM)) { \ - CASE_LAMBDA_2(float, ct::DEVICE_CPU, FUNC) \ - CASE_LAMBDA_2(double, ct::DEVICE_CPU, FUNC) \ - CASE_LAMBDA_2(int, ct::DEVICE_CPU, FUNC) \ - CASE_LAMBDA_2(int64_t, ct::DEVICE_CPU, FUNC) \ - CASE_LAMBDA_2(std::complex, ct::DEVICE_CPU, FUNC) \ - CASE_LAMBDA_2(std::complex, ct::DEVICE_CPU, FUNC) \ - default: \ - DEFAULT; \ - break; \ - } - -#define CASES_BLAS_WITH_DEFAULT_2(TYPE_ENUM, DEVICE_ENUM, STMTS, DEFAULT) \ - switch (int(TYPE_ENUM) * 10 + int(DEVICE_ENUM)) { \ - CASE_2(float, ct::DEVICE_CPU, SINGLE_ARG(STMTS)) \ - CASE_2(double, ct::DEVICE_CPU, SINGLE_ARG(STMTS)) \ - CASE_2(std::complex, ct::DEVICE_CPU, SINGLE_ARG(STMTS)) \ - CASE_2(std::complex, ct::DEVICE_CPU, SINGLE_ARG(STMTS)) \ - default: \ - DEFAULT; \ - break; \ - } - -#define CASES_ALL_WITH_DEFAULT_2_GPU(TYPE_ENUM, DEVICE_ENUM, STMTS, DEFAULT) \ - switch (int(TYPE_ENUM) * 10 + int(DEVICE_ENUM)) { \ - CASE_2(float, ct::DEVICE_CPU, SINGLE_ARG(STMTS)) \ - CASE_2(float, ct::DEVICE_GPU, SINGLE_ARG(STMTS)) \ - CASE_2(double, ct::DEVICE_CPU, SINGLE_ARG(STMTS)) \ - CASE_2(double, ct::DEVICE_GPU, SINGLE_ARG(STMTS)) \ - CASE_2(int, ct::DEVICE_CPU, SINGLE_ARG(STMTS)) \ - CASE_2(int, ct::DEVICE_GPU, SINGLE_ARG(STMTS)) \ - CASE_2(int64_t, ct::DEVICE_CPU, SINGLE_ARG(STMTS)) \ - CASE_2(int64_t, ct::DEVICE_GPU, SINGLE_ARG(STMTS)) \ - CASE_2(std::complex, ct::DEVICE_CPU, SINGLE_ARG(STMTS)) \ - CASE_2(std::complex, ct::DEVICE_GPU, SINGLE_ARG(STMTS)) \ - CASE_2(std::complex, ct::DEVICE_CPU, SINGLE_ARG(STMTS)) \ - CASE_2(std::complex, ct::DEVICE_GPU, SINGLE_ARG(STMTS)) \ - default: \ - DEFAULT; \ - break; \ - } - -#define CASES_ALL_LAMBDA_WITH_DEFAULT_2_GPU(TYPE_ENUM, DEVICE_ENUM, FUNC, DEFAULT) \ - switch (int(TYPE_ENUM) * 10 + int(DEVICE_ENUM)) { \ - CASE_LAMBDA_2(float, ct::DEVICE_CPU, FUNC) \ - CASE_LAMBDA_2(float, ct::DEVICE_GPU, FUNC) \ - CASE_LAMBDA_2(double, ct::DEVICE_CPU, FUNC) \ - CASE_LAMBDA_2(double, ct::DEVICE_GPU, FUNC) \ - CASE_LAMBDA_2(int, ct::DEVICE_CPU, FUNC) \ - CASE_LAMBDA_2(int, ct::DEVICE_GPU, FUNC) \ - CASE_LAMBDA_2(int64_t, ct::DEVICE_CPU, FUNC) \ - CASE_LAMBDA_2(int64_t, ct::DEVICE_GPU, FUNC) \ - CASE_LAMBDA_2(std::complex, ct::DEVICE_CPU, FUNC) \ - CASE_LAMBDA_2(std::complex, ct::DEVICE_GPU, FUNC) \ - CASE_LAMBDA_2(std::complex, ct::DEVICE_CPU, FUNC) \ - CASE_LAMBDA_2(std::complex, ct::DEVICE_GPU, FUNC) \ - default: \ - DEFAULT; \ - break; \ - } - -#define CASES_BLAS_WITH_DEFAULT_2_GPU(TYPE_ENUM, DEVICE_ENUM, STMTS, DEFAULT) \ - switch (int(TYPE_ENUM) * 10 + int(DEVICE_ENUM)) { \ - CASE_2(float, ct::DEVICE_CPU, SINGLE_ARG(STMTS)) \ - CASE_2(float, ct::DEVICE_GPU, SINGLE_ARG(STMTS)) \ - CASE_2(double, ct::DEVICE_CPU, SINGLE_ARG(STMTS)) \ - CASE_2(double, ct::DEVICE_GPU, SINGLE_ARG(STMTS)) \ - CASE_2(std::complex, ct::DEVICE_CPU, SINGLE_ARG(STMTS)) \ - CASE_2(std::complex, ct::DEVICE_GPU, SINGLE_ARG(STMTS)) \ - CASE_2(std::complex, ct::DEVICE_CPU, SINGLE_ARG(STMTS)) \ - CASE_2(std::complex, ct::DEVICE_GPU, SINGLE_ARG(STMTS)) \ - default: \ - DEFAULT; \ - break; \ - } - -#define CASES_CZ_WITH_DEFAULT_2(TYPE_ENUM, DEVICE_ENUM, STMTS, DEFAULT) \ - switch (int(TYPE_ENUM) * 10 + int(DEVICE_ENUM)) { \ - CASE_2(std::complex, ct::DEVICE_CPU, SINGLE_ARG(STMTS)) \ - CASE_2(std::complex, ct::DEVICE_GPU, SINGLE_ARG(STMTS)) \ - CASE_2(std::complex, ct::DEVICE_CPU, SINGLE_ARG(STMTS)) \ - CASE_2(std::complex, ct::DEVICE_GPU, SINGLE_ARG(STMTS)) \ - default: \ - DEFAULT; \ - break; \ - } - - -#if __CUDA || __ROCM -#define TEMPLATE_ALL_LAMBDA_2(TYPE_ENUM, DEVICE_ENUM, ...) \ -CASES_ALL_LAMBDA_WITH_DEFAULT_2_GPU(TYPE_ENUM, DEVICE_ENUM, (__VA_ARGS__), \ - std::cerr << "Unexpected type: " << TYPE_ENUM; exit(EXIT_FAILURE)); - -#define TEMPLATE_ALL_2(TYPE_ENUM, DEVICE_ENUM, ...) \ -CASES_ALL_WITH_DEFAULT_2_GPU(TYPE_ENUM, DEVICE_ENUM, (__VA_ARGS__), \ - std::cerr << "Unexpected type: " << TYPE_ENUM; exit(EXIT_FAILURE)); - -#define TEMPLATE_BLAS_2(TYPE_ENUM, DEVICE_ENUM, ...) \ -CASES_BLAS_WITH_DEFAULT_2_GPU(TYPE_ENUM, DEVICE_ENUM, (__VA_ARGS__), \ - std::cerr << "Unexpected type: " << TYPE_ENUM; exit(EXIT_FAILURE)); - -#define TEMPLATE_ALL_CALC_2(TYPE_ENUM, DEVICE_ENUM, ...) \ -CASES_ALL_CALC_WITH_DEFAULT_2_GPU(TYPE_ENUM, DEVICE_ENUM, (__VA_ARGS__), \ - std::cerr << "Unexpected type: " << TYPE_ENUM; exit(EXIT_FAILURE)); -#else -#define TEMPLATE_ALL_LAMBDA_2(TYPE_ENUM, DEVICE_ENUM, ...) \ -CASES_ALL_LAMBDA_WITH_DEFAULT_2(TYPE_ENUM, DEVICE_ENUM, (__VA_ARGS__), \ - std::cerr << "Unexpected type: " << TYPE_ENUM; exit(EXIT_FAILURE)); - -#define TEMPLATE_ALL_2(TYPE_ENUM, DEVICE_ENUM, ...) \ -CASES_ALL_WITH_DEFAULT_2(TYPE_ENUM, DEVICE_ENUM, (__VA_ARGS__), \ - std::cerr << "Unexpected type: " << TYPE_ENUM; exit(EXIT_FAILURE)); - -#define TEMPLATE_BLAS_2(TYPE_ENUM, DEVICE_ENUM, ...) \ -CASES_BLAS_WITH_DEFAULT_2(TYPE_ENUM, DEVICE_ENUM, (__VA_ARGS__), \ - std::cerr << "Unexpected type: " << TYPE_ENUM; exit(EXIT_FAILURE)); - -#define TEMPLATE_ALL_CALC_2(TYPE_ENUM, DEVICE_ENUM, ...) \ -CASES_ALL_WITH_DEFAULT_2(TYPE_ENUM, DEVICE_ENUM, (__VA_ARGS__), \ - std::cerr << "Unexpected type: " << TYPE_ENUM; exit(EXIT_FAILURE)); -#endif - -#define TEMPLATE_CZ_2(TYPE_ENUM, DEVICE_ENUM, ...) \ -CASES_CZ_WITH_DEFAULT_2(TYPE_ENUM, DEVICE_ENUM, (__VA_ARGS__), \ - std::cerr << "Unexpected type: " << TYPE_ENUM; exit(EXIT_FAILURE)); - - -#if defined(_MSC_VER) -#define AT_ALWAYS_INLINE __forceinline -#elif __has_attribute(always_inline) || defined(__GNUC__) -#define AT_ALWAYS_INLINE __attribute__((__always_inline__)) inline -#else -#define AT_ALWAYS_INLINE inline -#endif - -#endif // BASE_MACROS_MACROS_H_ \ No newline at end of file diff --git a/source/module_base/module_container/base/macros/rocm.h b/source/module_base/module_container/base/macros/rocm.h deleted file mode 100644 index af015b2c40..0000000000 --- a/source/module_base/module_container/base/macros/rocm.h +++ /dev/null @@ -1,249 +0,0 @@ -#ifndef BASE_MACROS_ROCM_H_ -#define BASE_MACROS_ROCM_H_ - -#include -#include -#include -#include - -#if defined(__HCC__) || defined(__HIP__) -#include -#endif // defined(__HCC__) || defined(__HIP__) - -#define THREADS_PER_BLOCK 256 - -#if defined(__HCC__) || defined(__HIP__) -template -struct GetTypeThrust -{ - using type = T; -}; - -template <> -struct GetTypeThrust> -{ - using type = thrust::complex; /**< The return type specialization for std::complex. */ -}; - -template <> -struct GetTypeThrust> -{ - using type = thrust::complex; /**< The return type specialization for std::complex. */ -}; -#endif // defined(__HCC__) || defined(__HIP__) - -static inline hipblasOperation_t GetHipblasOperation(const char& trans) -{ - hipblasOperation_t hip_trans = {}; - if (trans == 'N') - { - hip_trans = HIPBLAS_OP_N; - } - else if (trans == 'T') - { - hip_trans = HIPBLAS_OP_T; - } - else if (trans == 'C') - { - hip_trans = HIPBLAS_OP_C; - } - else - { - // Handle invalid input or provide a default behavior. - hip_trans = HIPBLAS_OP_N; - } - return hip_trans; -} - -template -struct GetTypeRocm -{ - static constexpr hipDataType hip_data_type = HIP_R_32F; -}; - -// Specializations of GetTypeRocm for supported types. -template <> -struct GetTypeRocm -{ - static constexpr hipDataType hip_data_type = HIP_R_32F; -}; -template <> -struct GetTypeRocm -{ - static constexpr hipDataType hip_data_type = HIP_R_32F; -}; -template <> -struct GetTypeRocm -{ - static constexpr hipDataType hip_data_type = HIP_R_64F; -}; -template <> -struct GetTypeRocm -{ - static constexpr hipDataType hip_data_type = HIP_R_64F; -}; -template <> -struct GetTypeRocm> -{ - static constexpr hipDataType hip_data_type = HIP_C_32F; -}; -template <> -struct GetTypeRocm> -{ - static constexpr hipDataType hip_data_type = HIP_C_64F; -}; - -static inline hipblasFillMode_t hipblas_fill_mode(const char& uplo) -{ - if (uplo == 'U' || uplo == 'u') - return HIPBLAS_FILL_MODE_UPPER; - else if (uplo == 'L' || uplo == 'l') - return HIPBLAS_FILL_MODE_LOWER; - else - throw std::runtime_error("hipblas_fill_mode: unknown uplo"); -} - -static inline hipblasDiagType_t hipblas_diag_type(const char& diag) -{ - if (diag == 'U' || diag == 'u') - return HIPBLAS_DIAG_UNIT; - else if (diag == 'N' || diag == 'n') - return HIPBLAS_DIAG_NON_UNIT; - else - throw std::runtime_error("hipblas_diag_type: unknown diag"); -} - -static inline hipsolverEigMode_t hipblas_eig_mode(const char& jobz) -{ - if (jobz == 'N' || jobz == 'n') - return HIPSOLVER_EIG_MODE_NOVECTOR; - else if (jobz == 'V' || jobz == 'v') - return HIPSOLVER_EIG_MODE_VECTOR; - else - throw std::runtime_error("hipblas_eig_mode: unknown diag"); -} - -static inline hipsolverEigType_t hipblas_eig_type(const int& itype) -{ - if (itype == 1) - return HIPSOLVER_EIG_TYPE_1; - else if (itype == 2) - return HIPSOLVER_EIG_TYPE_2; - else - throw std::runtime_error("hipblas_eig_mode: unknown diag"); -} - -static inline hipsolverFillMode_t hipsolver_fill_mode(const char& uplo) -{ - if (uplo == 'U' || uplo == 'u') - return HIPSOLVER_FILL_MODE_UPPER; - else if (uplo == 'L' || uplo == 'l') - return HIPSOLVER_FILL_MODE_LOWER; - else - throw std::runtime_error("hipsolver_fill_mode: unknown uplo"); -} - -// hipSOLVER API errors -static const char* hipsolverGetErrorEnum(hipsolverStatus_t error) -{ - switch (error) - { - case HIPSOLVER_STATUS_SUCCESS: - return "HIPSOLVER_STATUS_SUCCESS"; - case HIPSOLVER_STATUS_NOT_INITIALIZED: - return "HIPSOLVER_STATUS_NOT_INITIALIZED"; - case HIPSOLVER_STATUS_ALLOC_FAILED: - return "HIPSOLVER_STATUS_ALLOC_FAILED"; - case HIPSOLVER_STATUS_INVALID_VALUE: - return "HIPSOLVER_STATUS_INVALID_VALUE"; - case HIPSOLVER_STATUS_ARCH_MISMATCH: - return "HIPSOLVER_STATUS_ARCH_MISMATCH"; - case HIPSOLVER_STATUS_MAPPING_ERROR: - return "HIPSOLVER_STATUS_MAPPING_ERROR"; - case HIPSOLVER_STATUS_EXECUTION_FAILED: - return "HIPSOLVER_STATUS_EXECUTION_FAILED"; - case HIPSOLVER_STATUS_INTERNAL_ERROR: - return "HIPSOLVER_STATUS_INTERNAL_ERROR"; - case HIPSOLVER_STATUS_NOT_SUPPORTED: - return "HIPSOLVER_STATUS_NOT_SUPPORTED "; - case HIPSOLVER_STATUS_INVALID_ENUM: - return "HIPSOLVER_STATUS_INVALID_ENUM"; - default: - return "Unknown hipsolverStatus_t message"; - } -} - -inline void hipsolverAssert(hipsolverStatus_t code, const char* file, int line, bool abort = true) -{ - if (code != HIPSOLVER_STATUS_SUCCESS) - { - fprintf(stderr, "hipSOLVER Assert: %s %s %d\n", hipsolverGetErrorEnum(code), file, line); - if (abort) - exit(code); - } -} - -// hipSOLVER API errors -static const char* hipblasGetErrorEnum(hipblasStatus_t error) -{ - switch (error) - { - case HIPBLAS_STATUS_SUCCESS: - return "HIPBLAS_STATUS_SUCCESS"; - case HIPBLAS_STATUS_NOT_INITIALIZED: - return "HIPBLAS_STATUS_NOT_INITIALIZED"; - case HIPBLAS_STATUS_ALLOC_FAILED: - return "HIPBLAS_STATUS_ALLOC_FAILED"; - case HIPBLAS_STATUS_INVALID_VALUE: - return "HIPBLAS_STATUS_INVALID_VALUE"; - case HIPBLAS_STATUS_ARCH_MISMATCH: - return "HIPBLAS_STATUS_ARCH_MISMATCH"; - case HIPBLAS_STATUS_MAPPING_ERROR: - return "HIPBLAS_STATUS_MAPPING_ERROR"; - case HIPBLAS_STATUS_EXECUTION_FAILED: - return "HIPBLAS_STATUS_EXECUTION_FAILED"; - case HIPBLAS_STATUS_INTERNAL_ERROR: - return "HIPBLAS_STATUS_INTERNAL_ERROR"; - default: - return "Unknown"; - } -} - -inline void hipblasAssert(hipblasStatus_t code, const char* file, int line, bool abort = true) -{ - if (code != HIPBLAS_STATUS_SUCCESS) - { - fprintf(stderr, "Unexpected hipBLAS Error: %s %s %d\n", hipblasGetErrorEnum(code), file, line); - if (abort) - exit(code); - } -} - -#define hipsolverErrcheck(res) \ - { \ - hipsolverAssert((res), __FILE__, __LINE__); \ - } - -#define hipblasErrcheck(res) \ - { \ - hipblasAssert((res), __FILE__, __LINE__); \ - } - -// ROCM API errors -#define hipErrcheck(res) \ - { \ - if (res != hipSuccess) \ - { \ - fprintf(stderr, " Unexpected Device Error %s:%d: %s, %s\n", __FILE__, __LINE__, hipGetErrorName(res), \ - hipGetErrorString(res)); \ - exit(res); \ - } \ - } - -#ifdef __DEBUG -#define hipCheckOnDebug() hipErrcheck(hipDeviceSynchronize()) -#else -#define hipCheckOnDebug() -#endif - -#endif // BASE_MACROS_ROCM_H_ \ No newline at end of file diff --git a/source/module_base/module_container/base/third_party/blas.h b/source/module_base/module_container/base/third_party/blas.h deleted file mode 100644 index 5c73032e05..0000000000 --- a/source/module_base/module_container/base/third_party/blas.h +++ /dev/null @@ -1,355 +0,0 @@ -#ifndef BASE_THIRD_PARTY_BLAS_H_ -#define BASE_THIRD_PARTY_BLAS_H_ - -#include - -#if defined(__CUDA) -#include -#elif defined(__ROCM) -#include -#endif - -extern "C" -{ -// level 1: std::vector-std::vector operations, O(n) data and O(n) work. - -// Peize Lin add ?scal 2016-08-04, to compute x=a*x -void sscal_(const int *N, const float *alpha, float *x, const int *incx); -void dscal_(const int *N, const double *alpha, double *x, const int *incx); -void cscal_(const int *N, const std::complex *alpha, std::complex *x, const int *incx); -void zscal_(const int *N, const std::complex *alpha, std::complex *x, const int *incx); - -// Peize Lin add ?axpy 2016-08-04, to compute y=a*x+y -void saxpy_(const int *N, const float *alpha, const float *x, const int *incx, float *y, const int *incy); -void daxpy_(const int *N, const double *alpha, const double *x, const int *incx, double *y, const int *incy); -void caxpy_(const int *N, const std::complex *alpha, const std::complex *x, const int *incx, std::complex *y, const int *incy); -void zaxpy_(const int *N, const std::complex *alpha, const std::complex *x, const int *incx, std::complex *y, const int *incy); - -void dcopy_(long const *n, const double *a, int const *incx, double *b, int const *incy); -void zcopy_(long const *n, const std::complex *a, int const *incx, std::complex *b, int const *incy); - -//reason for passing results as argument instead of returning it: -//see https://www.numbercrunch.de/blog/2014/07/lost-in-translation/ -void cdotc_(const int *n, const std::complex *zx, const int *incx, - const std::complex *zy, const int *incy, std::complex *result); -void zdotc_(const int *n, const std::complex *zx, const int *incx, - const std::complex *zy, const int *incy, std::complex *result); -// Peize Lin add ?dot 2017-10-27, to compute d=x*y -float sdot_(const int *N, const float *x, const int *incx, const float *y, const int *incy); -double ddot_(const int *N, const double *x, const int *incx, const double *y, const int *incy); - -// Peize Lin add ?nrm2 2018-06-12, to compute out = ||x||_2 = \sqrt{ \sum_i x_i**2 } -float snrm2_( const int *n, const float *x, const int *incx ); -double dnrm2_( const int *n, const double *x, const int *incx ); -double dznrm2_( const int *n, const std::complex *x, const int *incx ); - -// level 2: matrix-std::vector operations, O(n^2) data and O(n^2) work. -void sgemv_(const char*const transa, const int*const m, const int*const n, - const float*const alpha, const float*const a, const int*const lda, const float*const x, const int*const incx, - const float*const eta, float*const y, const int*const incy); -void dgemv_(const char*const transa, const int*const m, const int*const n, - const double*const alpha, const double*const a, const int*const lda, const double*const x, const int*const incx, - const double*const beta, double*const y, const int*const incy); - -void cgemv_(const char *trans, const int *m, const int *n, const std::complex *alpha, - const std::complex *a, const int *lda, const std::complex *x, const int *incx, - const std::complex *beta, std::complex *y, const int *incy); - -void zgemv_(const char *trans, const int *m, const int *n, const std::complex *alpha, - const std::complex *a, const int *lda, const std::complex *x, const int *incx, - const std::complex *beta, std::complex *y, const int *incy); - -void dsymv_(const char *uplo, const int *n, - const double *alpha, const double *a, const int *lda, - const double *x, const int *incx, - const double *beta, double *y, const int *incy); - -// A := alpha x * y.T + A -void dger_(const int* m, - const int* n, - const double* alpha, - const double* x, - const int* incx, - const double* y, - const int* incy, - double* a, - const int* lda); -void zgerc_(const int* m, - const int* n, - const std::complex* alpha, - const std::complex* x, - const int* incx, - const std::complex* y, - const int* incy, - std::complex* a, - const int* lda); - -// level 3: matrix-matrix operations, O(n^2) data and O(n^3) work. - -// Peize Lin add ?gemm 2017-10-27, to compute C = a * A.? * B.? + b * C -// A is general -void sgemm_(const char *transa, const char *transb, const int *m, const int *n, const int *k, - const float *alpha, const float *a, const int *lda, const float *b, const int *ldb, - const float *beta, float *c, const int *ldc); -void dgemm_(const char *transa, const char *transb, const int *m, const int *n, const int *k, - const double *alpha, const double *a, const int *lda, const double *b, const int *ldb, - const double *beta, double *c, const int *ldc); -void cgemm_(const char *transa, const char *transb, const int *m, const int *n, const int *k, - const std::complex *alpha, const std::complex *a, const int *lda, const std::complex *b, const int *ldb, - const std::complex *beta, std::complex *c, const int *ldc); -void zgemm_(const char *transa, const char *transb, const int *m, const int *n, const int *k, - const std::complex *alpha, const std::complex *a, const int *lda, const std::complex *b, const int *ldb, - const std::complex *beta, std::complex *c, const int *ldc); - - -//a is symmetric -void dsymm_(const char *side, const char *uplo, const int *m, const int *n, - const double *alpha, const double *a, const int *lda, const double *b, const int *ldb, - const double *beta, double *c, const int *ldc); -//a is hermitian -void zhemm_(char *side, char *uplo, int *m, int *n,std::complex *alpha, - std::complex *a, int *lda, std::complex *b, int *ldb, std::complex *beta, std::complex *c, int *ldc); - -//solving triangular matrix with multiple right hand sides -void dtrsm_(char *side, char* uplo, char *transa, char *diag, int *m, int *n, - double* alpha, double* a, int *lda, double*b, int *ldb); -void ztrsm_(char *side, char* uplo, char *transa, char *diag, int *m, int *n, - std::complex* alpha, std::complex* a, int *lda, std::complex*b, int *ldb); - -} - -namespace container { - -// Class BlasConnector provide the connector to fortran lapack routine. -// The entire function in this class are static and inline function. -// Usage example: BlasConnector::functionname(parameter list). -namespace BlasConnector { - -static inline -void axpy( const int& n, const float& alpha, const float *x, const int& incx, float *y, const int& incy) -{ - saxpy_(&n, &alpha, x, &incx, y, &incy); -} -static inline -void axpy( const int& n, const double& alpha, const double *x, const int& incx, double *y, const int& incy) -{ - daxpy_(&n, &alpha, x, &incx, y, &incy); -} -static inline -void axpy( const int& n, const std::complex& alpha, const std::complex *x, const int& incx, std::complex *y, const int& incy) -{ - caxpy_(&n, &alpha, x, &incx, y, &incy); -} -static inline -void axpy( const int& n, const std::complex& alpha, const std::complex *x, const int& incx, std::complex *y, const int& incy) -{ - zaxpy_(&n, &alpha, x, &incx, y, &incy); -} - -// Peize Lin add 2016-08-04 -// x=a*x -static inline -void scal( const int& n, const float& alpha, float *x, const int& incx) -{ - sscal_(&n, &alpha, x, &incx); -} -static inline -void scal( const int& n, const double& alpha, double *x, const int& incx) -{ - dscal_(&n, &alpha, x, &incx); -} -static inline -void scal( const int& n, const std::complex& alpha, std::complex *x, const int& incx) -{ - cscal_(&n, &alpha, x, &incx); -} -static inline -void scal( const int& n, const std::complex& alpha, std::complex *x, const int& incx) -{ - zscal_(&n, &alpha, x, &incx); -} - -// Peize Lin add 2017-10-27 -// d=x*y -static inline -float dot( const int& n, const float *x, const int& incx, const float *y, const int& incy) -{ - return sdot_(&n, x, &incx, y, &incy); -} -static inline -double dot( const int& n, const double *x, const int& incx, const double *y, const int& incy) -{ - return ddot_(&n, x, &incx, y, &incy); -} -// Denghui Lu add 2023-8-01 -static inline -std::complex dot(const int& n, const std::complex *x, const int& incx, const std::complex *y, const int& incy) -{ - std::complex result = {0, 0}; - // cdotc_(&n, x, &incx, y, &incy, &result); - for (int ii = 0; ii < n; ii++) { - result += std::conj(x[ii * incx]) * y[ii * incy]; - } - return result; -} -static inline -std::complex dot(const int& n, const std::complex *x, const int& incx, const std::complex *y, const int& incy) -{ - std::complex result = {0, 0}; - // zdotc_(&n, x, &incx, y, &incy, &result); - for (int ii = 0; ii < n; ii++) { - result += std::conj(x[ii * incx]) * y[ii * incy]; - } - return result; -} - -// Peize Lin add 2017-10-27, fix bug trans 2019-01-17 -// C = a * A.? * B.? + b * C -static inline -void gemm(const char& transa, const char& transb, const int& m, const int& n, const int& k, - const float& alpha, const float* A, const int& lda, const float* B, const int& ldb, - const float& beta, float* C, const int& ldc) -{ - sgemm_(&transa, &transb, &m, &n, &k, - &alpha, A, &lda, B, &ldb, - &beta, C, &ldc); -} -static inline -void gemm(const char& transa, const char& transb, const int& m, const int& n, const int& k, - const double& alpha, const double* A, const int& lda, const double* B, const int& ldb, - const double& beta, double* C, const int& ldc) -{ - dgemm_(&transa, &transb, &m, &n, &k, - &alpha, A, &lda, B, &ldb, - &beta, C, &ldc); -} -static inline -void gemm(const char& transa, const char& transb, const int& m, const int& n, const int& k, - const std::complex& alpha, const std::complex* A, const int& lda, const std::complex* B, const int& ldb, - const std::complex& beta, std::complex* C, const int& ldc) -{ - cgemm_(&transa, &transb, &m, &n, &k, - &alpha, A, &lda, B, &ldb, - &beta, C, &ldc); -} -static inline -void gemm(const char& transa, const char& transb, const int& m, const int& n, const int& k, - const std::complex& alpha, const std::complex* A, const int& lda, const std::complex* B, const int& ldb, - const std::complex& beta, std::complex* C, const int& ldc) -{ - zgemm_(&transa, &transb, &m, &n, &k, - &alpha, A, &lda, B, &ldb, - &beta, C, &ldc); -} - -template -static inline -void gemm_batched(const char& transa, const char& transb, const int& m, const int& n, const int& k, - const T& alpha, T** A, const int& lda, T** B, const int& ldb, - const T& beta, T** C, const int& ldc, const int& batch_size) -{ - for (int ii = 0; ii < batch_size; ++ii) { - // Call the single GEMV for each pair of matrix A[ii] and vector x[ii] - BlasConnector::gemm(transa, transb, m, n, k, alpha, A[ii], lda, B[ii], ldb, beta, C[ii], ldc); - } -} - -template -static inline -void gemm_batched_strided(const char& transa, const char& transb, const int& m, const int& n, const int& k, - const T& alpha, const T* A, const int& lda, const int& stride_a, const T* B, const int& ldb, const int& stride_b, - const T& beta, T* C, const int& ldc, const int& stride_c, const int& batch_size) -{ - for (int ii = 0; ii < batch_size; ii++) { - // Call the single GEMV for each pair of matrix A[ii] and vector x[ii] - BlasConnector::gemm(transa, transb, m, n, k, alpha, A + ii * stride_a, lda, B + ii * stride_b, ldb, beta, C + ii * stride_c, ldc); - } -} - -static inline -void gemv(const char& trans, const int& m, const int& n, - const float& alpha, const float *A, const int& lda, const float *x, const int& incx, - const float& beta, float *y, const int& incy) -{ - sgemv_(&trans, &m, &n, &alpha, A, &lda, x, &incx, &beta, y, &incy); -} -static inline -void gemv(const char& trans, const int& m, const int& n, - const double& alpha, const double *A, const int& lda, const double *x, const int& incx, - const double& beta, double *y, const int& incy) -{ - dgemv_(&trans, &m, &n, &alpha, A, &lda, x, &incx, &beta, y, &incy); -} -static inline -void gemv(const char& trans, const int& m, const int& n, - const std::complex& alpha, const std::complex *A, const int& lda, const std::complex *x, const int& incx, - const std::complex& beta, std::complex *y, const int& incy) -{ - cgemv_(&trans, &m, &n, &alpha, A, &lda, x, &incx, &beta, y, &incy); -} -static inline -void gemv(const char& trans, const int& m, const int& n, - const std::complex& alpha, const std::complex *A, const int& lda, const std::complex *x, const int& incx, - const std::complex& beta, std::complex *y, const int& incy) -{ - zgemv_(&trans, &m, &n, &alpha, A, &lda, x, &incx, &beta, y, &incy); -} - -template -static inline -void gemv_batched(const char& trans, const int& m, const int& n, - const T& alpha, T** A, const int& lda, T** x, const int& incx, - const T& beta, T** y, const int& incy, const int& batch_size) -{ - for (int ii = 0; ii < batch_size; ++ii) { - // Call the single GEMV for each pair of matrix A[ii] and vector x[ii] - BlasConnector::gemv(trans, m, n, alpha, A[ii], lda, x[ii], incy, beta, y[ii], incy); - } -} - -template -static inline -void gemv_batched_strided(const char& transa, const int& m, const int& n, - const T& alpha, const T* A, const int& lda, const int& stride_a, const T* x, const int& incx, const int& stride_x, - const T& beta, T* y, const int& incy, const int& stride_y, const int& batch_size) -{ - for (int ii = 0; ii < batch_size; ii++) { - // Call the single GEMV for each pair of matrix A[ii] and vector x[ii] - BlasConnector::gemv(transa, m, n, alpha, A + ii * stride_a, lda, x + ii * stride_x, incx, beta, y + ii * stride_y, incy); - } -} - -// Peize Lin add 2018-06-12 -// out = ||x||_2 -static inline -float nrm2( const int n, const float *x, const int incx ) -{ - return snrm2_( &n, x, &incx ); -} -static inline -double nrm2( const int n, const double *x, const int incx ) -{ - return dnrm2_( &n, x, &incx ); -} -static inline -double nrm2( const int n, const std::complex *x, const int incx ) -{ - return dznrm2_( &n, x, &incx ); -} - -// copies a into b -static inline -void copy(const long n, const double *a, const int incx, double *b, const int incy) -{ - dcopy_(&n, a, &incx, b, &incy); -} -static inline -void copy(const long n, const std::complex *a, const int incx, std::complex *b, const int incy) -{ - zcopy_(&n, a, &incx, b, &incy); -} - -} // namespace BlasConnector -} // namespace container - -#endif // BASE_THIRD_PARTY_BLAS_H_ diff --git a/source/module_base/module_container/base/third_party/cublas.h b/source/module_base/module_container/base/third_party/cublas.h deleted file mode 100644 index 34cd7484d1..0000000000 --- a/source/module_base/module_container/base/third_party/cublas.h +++ /dev/null @@ -1,321 +0,0 @@ -#ifndef BASE_THIRD_PARTY_CUBLAS_H_ -#define BASE_THIRD_PARTY_CUBLAS_H_ - -#include -#include -#include - -namespace container { -namespace cuBlasConnector { - -static inline -void dot(cublasHandle_t& handle, const int& n, const float *x, const int& incx, const float *y, const int& incy, float* result) -{ - cublasErrcheck(cublasSdot(handle, n, x, incx, y, incy, result)); -} -static inline -void dot(cublasHandle_t& handle, const int& n, const double *x, const int& incx, const double *y, const int& incy, double* result) -{ - cublasErrcheck(cublasDdot(handle, n, x, incx, y, incy, result)); -} -static inline -void dot(cublasHandle_t& handle, const int& n, const std::complex *x, const int& incx, const std::complex *y, const int& incy, std::complex* result) -{ - cublasErrcheck(cublasCdotc(handle, n, reinterpret_cast(x), incx, reinterpret_cast(y), incy, reinterpret_cast(result))); -} -static inline -void dot(cublasHandle_t& handle, const int& n, const std::complex *x, const int& incx, const std::complex *y, const int& incy, std::complex* result) -{ - cublasErrcheck(cublasZdotc(handle, n, reinterpret_cast(x), incx, reinterpret_cast(y), incy, reinterpret_cast(result))); -} - -static inline -void axpy(cublasHandle_t& handle, const int& n, const float& alpha, const float *x, const int& incx, float *y, const int& incy) -{ - cublasErrcheck(cublasSaxpy(handle, n, &alpha, x, incx, y, incy)); -} -static inline -void axpy(cublasHandle_t& handle, const int& n, const double& alpha, const double *x, const int& incx, double *y, const int& incy) -{ - cublasErrcheck(cublasDaxpy(handle, n, &alpha, x, incx, y, incy)); -} -static inline -void axpy(cublasHandle_t& handle, const int& n, const std::complex& alpha, const std::complex *x, const int& incx, std::complex *y, const int& incy) -{ - cublasErrcheck(cublasCaxpy(handle, n, reinterpret_cast(&alpha), reinterpret_cast(x), incx, reinterpret_cast(y), incy)); -} -static inline -void axpy(cublasHandle_t& handle, const int& n, const std::complex& alpha, const std::complex *x, const int& incx, std::complex *y, const int& incy) -{ - cublasErrcheck(cublasZaxpy(handle, n, reinterpret_cast(&alpha), reinterpret_cast(x), incx, reinterpret_cast(y), incy)); -} - -static inline -void scal(cublasHandle_t& handle, const int& n, const float& alpha, float *x, const int& incx) -{ - cublasErrcheck(cublasSscal(handle, n, &alpha, x, incx)); -} -static inline -void scal(cublasHandle_t& handle, const int& n, const double& alpha, double *x, const int& incx) -{ - cublasErrcheck(cublasDscal(handle, n, &alpha, x, incx)); -} -static inline -void scal(cublasHandle_t& handle, const int& n, const std::complex& alpha, std::complex *x, const int& incx) -{ - cublasErrcheck(cublasCscal(handle, n, reinterpret_cast(&alpha), reinterpret_cast(x), incx)); -} -static inline -void scal(cublasHandle_t& handle, const int& n, const std::complex& alpha, std::complex *x, const int& incx) -{ - cublasErrcheck(cublasZscal(handle, n, reinterpret_cast(&alpha), reinterpret_cast(x), incx)); -} - -static inline -void gemv(cublasHandle_t& handle, const char& trans, const int& m, const int& n, - const float& alpha, const float *A, const int& lda, const float *x, const int& incx, - const float& beta, float *y, const int& incy) -{ - cublasErrcheck(cublasSgemv(handle, GetCublasOperation(trans), m, n, &alpha, A, lda, x, incx, &beta, y, incy)); -} -static inline -void gemv(cublasHandle_t& handle, const char& trans, const int& m, const int& n, - const double& alpha, const double *A, const int& lda, const double *x, const int& incx, - const double& beta, double *y, const int& incy) -{ - cublasErrcheck(cublasDgemv(handle, GetCublasOperation(trans), m, n, &alpha, A, lda, x, incx, &beta, y, incy)); -} -static inline -void gemv(cublasHandle_t& handle, const char& trans, const int& m, const int& n, - const std::complex& alpha, const std::complex *A, const int& lda, const std::complex *x, const int& incx, - const std::complex& beta, std::complex *y, const int& incy) -{ - cublasErrcheck(cublasCgemv(handle, GetCublasOperation(trans), m, n, reinterpret_cast(&alpha), - reinterpret_cast(A), lda, reinterpret_cast(x), incx, reinterpret_cast(&beta), reinterpret_cast(y), incy)); -} -static inline -void gemv(cublasHandle_t& handle, const char& trans, const int& m, const int& n, - const std::complex& alpha, const std::complex *A, const int& lda, const std::complex *x, const int& incx, - const std::complex& beta, std::complex *y, const int& incy) -{ - cublasErrcheck(cublasZgemv(handle, GetCublasOperation(trans), m, n, reinterpret_cast(&alpha), - reinterpret_cast(A), lda, reinterpret_cast(x), incx, reinterpret_cast(&beta), reinterpret_cast(y), incy)); -} - -template -static inline -void gemv_batched(cublasHandle_t& handle, const char& trans, const int& m, const int& n, - const T& alpha, T** A, const int& lda, T** x, const int& incx, - const T& beta, T** y, const int& incy, const int& batch_size) -{ - for (int ii = 0; ii < batch_size; ++ii) { - // Call the single GEMV for each pair of matrix A[ii] and vector x[ii] - cuBlasConnector::gemv(handle, trans, m, n, alpha, A[ii], lda, x[ii], incy, beta, y[ii], incy); - } -} - -template -static inline -void gemv_batched_strided(cublasHandle_t& handle, const char& transa, const int& m, const int& n, - const T& alpha, const T* A, const int& lda, const int& stride_a, const T* x, const int& incx, const int& stride_x, - const T& beta, T* y, const int& incy, const int& stride_y, const int& batch_size) -{ - for (int ii = 0; ii < batch_size; ii++) { - // Call the single GEMV for each pair of matrix A[ii] and vector x[ii] - cuBlasConnector::gemv(handle, transa, m, n, alpha, A + ii * stride_a, lda, x + ii * stride_x, incx, beta, y + ii * stride_y, incy); - } -} - -static inline -void gemm(cublasHandle_t& handle, const char& transa, const char& transb, const int& m, const int& n, const int& k, - const float& alpha, const float* A, const int& lda, const float* B, const int& ldb, - const float& beta, float* C, const int& ldc) -{ - cublasErrcheck(cublasSgemm(handle, GetCublasOperation(transa), GetCublasOperation(transb), - m, n, k, &alpha, A, lda, B, ldb, &beta, C, ldc)); -} -static inline -void gemm(cublasHandle_t& handle, const char& transa, const char& transb, const int& m, const int& n, const int& k, - const double& alpha, const double* A, const int& lda, const double* B, const int& ldb, - const double& beta, double* C, const int& ldc) -{ - cublasErrcheck(cublasDgemm(handle, GetCublasOperation(transa), GetCublasOperation(transb), - m, n, k, &alpha, A, lda, B, ldb, &beta, C, ldc)); -} -static inline -void gemm(cublasHandle_t& handle, const char& transa, const char& transb, const int& m, const int& n, const int& k, - const std::complex& alpha, const std::complex* A, const int& lda, const std::complex* B, const int& ldb, - const std::complex& beta, std::complex* C, const int& ldc) -{ - cublasErrcheck(cublasCgemm(handle, GetCublasOperation(transa), GetCublasOperation(transb), - m, n, k, - reinterpret_cast(&alpha), - reinterpret_cast(A), lda, - reinterpret_cast(B), ldb, - reinterpret_cast(&beta), - reinterpret_cast(C), ldc)); -} -static inline -void gemm(cublasHandle_t& handle, const char& transa, const char& transb, const int& m, const int& n, const int& k, - const std::complex& alpha, const std::complex* A, const int& lda, const std::complex* B, const int& ldb, - const std::complex& beta, std::complex* C, const int& ldc) -{ - cublasErrcheck(cublasZgemm(handle, GetCublasOperation(transa), GetCublasOperation(transb), - m, n, k, - reinterpret_cast(&alpha), - reinterpret_cast(A), lda, - reinterpret_cast(B), ldb, - reinterpret_cast(&beta), - reinterpret_cast(C), ldc)); -} - -template -static inline -T** allocate_(T** in, const int& batch_size) -{ - T** out = nullptr; - cudaErrcheck(cudaMalloc(reinterpret_cast(&out), sizeof(T*) * batch_size)); - cudaErrcheck(cudaMemcpy(out, in, sizeof(T*) * batch_size, cudaMemcpyHostToDevice)); - return out; -} - -static inline -void gemm_batched(cublasHandle_t& handle, const char& transa, const char& transb, const int& m, const int& n, const int& k, - const float& alpha, float** A, const int& lda, float** B, const int& ldb, - const float& beta, float** C, const int& ldc, const int& batch_size) -{ - float** d_A = allocate_(A, batch_size); - float** d_B = allocate_(B, batch_size); - float** d_C = allocate_(C, batch_size); - cublasErrcheck(cublasSgemmBatched(handle, GetCublasOperation(transa), GetCublasOperation(transb), - m, n, k, &alpha, d_A, lda, d_B, ldb, &beta, d_C, ldc, batch_size)); - cudaErrcheck(cudaFree(d_A)); - cudaErrcheck(cudaFree(d_B)); - cudaErrcheck(cudaFree(d_C)); -} -static inline -void gemm_batched(cublasHandle_t& handle, const char& transa, const char& transb, const int& m, const int& n, const int& k, - const double& alpha, double** A, const int& lda, double** B, const int& ldb, - const double& beta, double** C, const int& ldc, const int& batch_size) -{ - double** d_A = allocate_(A, batch_size); - double** d_B = allocate_(B, batch_size); - double** d_C = allocate_(C, batch_size); - cublasErrcheck(cublasDgemmBatched(handle, GetCublasOperation(transa), GetCublasOperation(transb), - m, n, k, &alpha, d_A, lda, d_B, ldb, &beta, d_C, ldc, batch_size)); - cudaErrcheck(cudaFree(d_A)); - cudaErrcheck(cudaFree(d_B)); - cudaErrcheck(cudaFree(d_C)); -} -static inline -void gemm_batched(cublasHandle_t& handle, const char& transa, const char& transb, const int& m, const int& n, const int& k, - const std::complex& alpha, std::complex** A, const int& lda, std::complex** B, const int& ldb, - const std::complex& beta, std::complex** C, const int& ldc, const int& batch_size) -{ - std::complex** d_A = allocate_(A, batch_size); - std::complex** d_B = allocate_(B, batch_size); - std::complex** d_C = allocate_(C, batch_size); - cublasErrcheck(cublasCgemmBatched(handle, GetCublasOperation(transa), GetCublasOperation(transb), - m, n, k, - reinterpret_cast(&alpha), - reinterpret_cast(d_A), lda, - reinterpret_cast(d_B), ldb, - reinterpret_cast(&beta), - reinterpret_cast(d_C), ldc, batch_size)); - cudaErrcheck(cudaFree(d_A)); - cudaErrcheck(cudaFree(d_B)); - cudaErrcheck(cudaFree(d_C)); -} -static inline -void gemm_batched(cublasHandle_t& handle, const char& transa, const char& transb, const int& m, const int& n, const int& k, - const std::complex& alpha, std::complex** A, const int& lda, std::complex** B, const int& ldb, - const std::complex& beta, std::complex** C, const int& ldc, const int& batch_size) -{ - std::complex** d_A = allocate_(A, batch_size); - std::complex** d_B = allocate_(B, batch_size); - std::complex** d_C = allocate_(C, batch_size); - cublasErrcheck(cublasZgemmBatched(handle, GetCublasOperation(transa), GetCublasOperation(transb), - m, n, k, - reinterpret_cast(&alpha), - reinterpret_cast(d_A), lda, - reinterpret_cast(d_B), ldb, - reinterpret_cast(&beta), - reinterpret_cast(d_C), ldc, batch_size)); - cudaErrcheck(cudaFree(d_A)); - cudaErrcheck(cudaFree(d_B)); - cudaErrcheck(cudaFree(d_C)); -} - -static inline -void gemm_batched_strided(cublasHandle_t& handle, const char& transa, const char& transb, const int& m, const int& n, const int& k, - const float& alpha, const float* A, const int& lda, const int& stride_a, const float* B, const int& ldb, const int& stride_b, - const float& beta, float* C, const int& ldc, const int& stride_c, const int& batch_size) -{ - cublasErrcheck(cublasSgemmStridedBatched( - handle, - GetCublasOperation(transa), - GetCublasOperation(transb), - m, n, k, - &alpha, - A, lda, stride_a, - B, ldb, stride_b, - &beta, - C, ldc, stride_c, - batch_size)); -} -static inline -void gemm_batched_strided(cublasHandle_t& handle, const char& transa, const char& transb, const int& m, const int& n, const int& k, - const double& alpha, const double* A, const int& lda, const int& stride_a, const double* B, const int& ldb, const int& stride_b, - const double& beta, double* C, const int& ldc, const int& stride_c, const int& batch_size) -{ - cublasErrcheck(cublasDgemmStridedBatched( - handle, - GetCublasOperation(transa), - GetCublasOperation(transb), - m, n, k, - &alpha, - A, lda, stride_a, - B, ldb, stride_b, - &beta, - C, ldc, stride_c, - batch_size)); -} -static inline -void gemm_batched_strided(cublasHandle_t& handle, const char& transa, const char& transb, const int& m, const int& n, const int& k, - const std::complex& alpha, const std::complex* A, const int& lda, const int& stride_a, const std::complex* B, const int& ldb, const int& stride_b, - const std::complex& beta, std::complex* C, const int& ldc, const int& stride_c, const int& batch_size) -{ - cublasErrcheck(cublasCgemmStridedBatched( - handle, - GetCublasOperation(transa), - GetCublasOperation(transb), - m, n, k, - reinterpret_cast(&alpha), - reinterpret_cast(A), lda, stride_a, - reinterpret_cast(B), ldb, stride_b, - reinterpret_cast(&beta), - reinterpret_cast(C), ldc, stride_c, - batch_size)); -} -static inline -void gemm_batched_strided(cublasHandle_t& handle, const char& transa, const char& transb, const int& m, const int& n, const int& k, - const std::complex& alpha, const std::complex* A, const int& lda, const int& stride_a, const std::complex* B, const int& ldb, const int& stride_b, - const std::complex& beta, std::complex* C, const int& ldc, const int& stride_c, const int& batch_size) -{ - cublasErrcheck(cublasZgemmStridedBatched( - handle, - GetCublasOperation(transa), - GetCublasOperation(transb), - m, n, k, - reinterpret_cast(&alpha), - reinterpret_cast(A), lda, stride_a, - reinterpret_cast(B), ldb, stride_b, - reinterpret_cast(&beta), - reinterpret_cast(C), ldc, stride_c, - batch_size)); -} - -} // namespace cuBlasConnector -} // namespace container - -#endif // BASE_THIRD_PARTY_CUBLAS_H_ \ No newline at end of file diff --git a/source/module_base/module_container/base/third_party/cusolver.h b/source/module_base/module_container/base/third_party/cusolver.h deleted file mode 100644 index defd60a121..0000000000 --- a/source/module_base/module_container/base/third_party/cusolver.h +++ /dev/null @@ -1,519 +0,0 @@ -#ifndef BASE_THIRD_PARTY_CUSOLVER_H_ -#define BASE_THIRD_PARTY_CUSOLVER_H_ - -#include -#include -#include - -namespace container { -namespace cuSolverConnector { - -template -static inline -void trtri (cusolverDnHandle_t& cusolver_handle, const char& uplo, const char& diag, const int& n, T* A, const int& lda) -{ - size_t d_lwork = 0, h_lwork = 0; - using Type = typename GetTypeThrust::type; - cusolverErrcheck(cusolverDnXtrtri_bufferSize(cusolver_handle, cublas_fill_mode(uplo), cublas_diag_type(diag), n, GetTypeCuda::cuda_data_type, reinterpret_cast(A), lda, &d_lwork, &h_lwork)); - void* d_work = nullptr, *h_work = nullptr; - cudaErrcheck(cudaMalloc((void**)&d_work, d_lwork)); - if (h_lwork) { - h_work = malloc(h_lwork); - if (h_work == nullptr) { - throw std::bad_alloc(); - } - } - int h_info = 0; - int* d_info = nullptr; - cudaErrcheck(cudaMalloc((void**)&d_info, sizeof(int))); - // Perform Cholesky decomposition - cusolverErrcheck(cusolverDnXtrtri(cusolver_handle, cublas_fill_mode(uplo), cublas_diag_type(diag), n, GetTypeCuda::cuda_data_type, reinterpret_cast(A), n, d_work, d_lwork, h_work, h_lwork, d_info)); - cudaErrcheck(cudaMemcpy(&h_info, d_info, sizeof(int), cudaMemcpyDeviceToHost)); - if (h_info != 0) { - throw std::runtime_error("trtri: failed to invert matrix"); - } - free(h_work); - cudaErrcheck(cudaFree(d_work)); - cudaErrcheck(cudaFree(d_info)); -} - -static inline -void potri (cusolverDnHandle_t& cusolver_handle, const char& uplo, const char& diag, const int& n, float * A, const int& lda) -{ - int lwork; - cusolverErrcheck(cusolverDnSpotri_bufferSize(cusolver_handle, cublas_fill_mode(uplo), n, A, n, &lwork)); - float* work; - cudaErrcheck(cudaMalloc((void**)&work, lwork * sizeof(float))); - // Perform Cholesky decomposition - cusolverErrcheck(cusolverDnSpotri(cusolver_handle, cublas_fill_mode(uplo), n, A, n, work, lwork, nullptr)); - cudaErrcheck(cudaFree(work)); -} -static inline -void potri (cusolverDnHandle_t& cusolver_handle, const char& uplo, const char& diag, const int& n, double * A, const int& lda) -{ - int lwork; - cusolverErrcheck(cusolverDnDpotri_bufferSize(cusolver_handle, cublas_fill_mode(uplo), n, A, n, &lwork)); - double* work; - cudaErrcheck(cudaMalloc((void**)&work, lwork * sizeof(double))); - // Perform Cholesky decomposition - cusolverErrcheck(cusolverDnDpotri(cusolver_handle, cublas_fill_mode(uplo), n, A, n, work, lwork, nullptr)); - cudaErrcheck(cudaFree(work)); -} -static inline -void potri (cusolverDnHandle_t& cusolver_handle, const char& uplo, const char& diag, const int& n, std::complex * A, const int& lda) -{ - int lwork; - cusolverErrcheck(cusolverDnCpotri_bufferSize(cusolver_handle, cublas_fill_mode(uplo), n, reinterpret_cast(A), n, &lwork)); - cuComplex* work; - cudaErrcheck(cudaMalloc((void**)&work, lwork * sizeof(cuComplex))); - // Perform Cholesky decomposition - cusolverErrcheck(cusolverDnCpotri(cusolver_handle, cublas_fill_mode(uplo), n, reinterpret_cast(A), n, work, lwork, nullptr)); - cudaErrcheck(cudaFree(work)); -} -static inline -void potri (cusolverDnHandle_t& cusolver_handle, const char& uplo, const char& diag, const int& n, std::complex * A, const int& lda) -{ - int lwork; - cusolverErrcheck(cusolverDnZpotri_bufferSize(cusolver_handle, cublas_fill_mode(uplo), n, reinterpret_cast(A), n, &lwork)); - cuDoubleComplex* work; - cudaErrcheck(cudaMalloc((void**)&work, lwork * sizeof(cuDoubleComplex))); - // Perform Cholesky decomposition - cusolverErrcheck(cusolverDnZpotri(cusolver_handle, cublas_fill_mode(uplo), n, reinterpret_cast(A), n, work, lwork, nullptr)); - cudaErrcheck(cudaFree(work)); -} - - -static inline -void potrf (cusolverDnHandle_t& cusolver_handle, const char& uplo, const int& n, float * A, const int& lda) -{ - int lwork; - cusolverErrcheck(cusolverDnSpotrf_bufferSize(cusolver_handle, cublas_fill_mode(uplo), n, A, n, &lwork)); - float* work; - cudaErrcheck(cudaMalloc((void**)&work, lwork * sizeof(float))); - // Perform Cholesky decomposition - cusolverErrcheck(cusolverDnSpotrf(cusolver_handle, cublas_fill_mode(uplo), n, A, n, work, lwork, nullptr)); - cudaErrcheck(cudaFree(work)); -} -static inline -void potrf (cusolverDnHandle_t& cusolver_handle, const char& uplo, const int& n, double * A, const int& lda) -{ - int lwork; - cusolverErrcheck(cusolverDnDpotrf_bufferSize(cusolver_handle, cublas_fill_mode(uplo), n, A, n, &lwork)); - double* work; - cudaErrcheck(cudaMalloc((void**)&work, lwork * sizeof(double))); - // Perform Cholesky decomposition - cusolverErrcheck(cusolverDnDpotrf(cusolver_handle, cublas_fill_mode(uplo), n, A, n, work, lwork, nullptr)); - cudaErrcheck(cudaFree(work)); -} -static inline -void potrf (cusolverDnHandle_t& cusolver_handle, const char& uplo, const int& n, std::complex * A, const int& lda) -{ - int lwork; - cusolverErrcheck(cusolverDnCpotrf_bufferSize(cusolver_handle, cublas_fill_mode(uplo), n, reinterpret_cast(A), n, &lwork)); - cuComplex* work; - cudaErrcheck(cudaMalloc((void**)&work, lwork * sizeof(cuComplex))); - // Perform Cholesky decomposition - cusolverErrcheck(cusolverDnCpotrf(cusolver_handle, cublas_fill_mode(uplo), n, reinterpret_cast(A), n, work, lwork, nullptr)); - cudaErrcheck(cudaFree(work)); -} -static inline -void potrf (cusolverDnHandle_t& cusolver_handle, const char& uplo, const int& n, std::complex * A, const int& lda) -{ - int lwork; - cusolverErrcheck(cusolverDnZpotrf_bufferSize(cusolver_handle, cublas_fill_mode(uplo), n, reinterpret_cast(A), n, &lwork)); - cuDoubleComplex* work; - cudaErrcheck(cudaMalloc((void**)&work, lwork * sizeof(cuDoubleComplex))); - // Perform Cholesky decomposition - cusolverErrcheck(cusolverDnZpotrf(cusolver_handle, cublas_fill_mode(uplo), n, reinterpret_cast(A), n, work, lwork, nullptr)); - cudaErrcheck(cudaFree(work)); -} - - -static inline -void dnevd (cusolverDnHandle_t& cusolver_handle, const char& jobz, const char& uplo, const int& n, float* A, const int& lda, float * W) -{ - // prepare some values for cusolverDnSsyevd_bufferSize - int lwork = 0; - int h_info = 0; - int* d_info = nullptr; - float* d_work = nullptr; - cudaErrcheck(cudaMalloc((void**)&d_info, sizeof(int))); - - // calculate the sizes needed for pre-allocated buffer. - cusolverErrcheck(cusolverDnSsyevd_bufferSize(cusolver_handle, cublas_eig_mode(jobz), cublas_fill_mode(uplo), - n, A, lda, W, &lwork)); - // allocate memory - cudaErrcheck(cudaMalloc((void**)&d_work, sizeof(float) * lwork)); - // compute eigenvalues and eigenvectors. - cusolverErrcheck(cusolverDnSsyevd(cusolver_handle, cublas_eig_mode(jobz), cublas_fill_mode(uplo), - n, A, lda, W, d_work, lwork, d_info)); - - cudaErrcheck(cudaMemcpy(&h_info, d_info, sizeof(int), cudaMemcpyDeviceToHost)); - if (h_info != 0) { - throw std::runtime_error("dnevd: failed to invert matrix"); - } - cudaErrcheck(cudaFree(d_info)); - cudaErrcheck(cudaFree(d_work)); -} -static inline -void dnevd (cusolverDnHandle_t& cusolver_handle, const char& jobz, const char& uplo, const int& n, double* A, const int& lda, double * W) -{ - // prepare some values for cusolverDnDsyevd_bufferSize - int lwork = 0; - int h_info = 0; - int* d_info = nullptr; - double* d_work = nullptr; - cudaErrcheck(cudaMalloc((void**)&d_info, sizeof(int))); - - // calculate the sizes needed for pre-allocated buffer. - cusolverErrcheck(cusolverDnDsyevd_bufferSize(cusolver_handle, cublas_eig_mode(jobz), cublas_fill_mode(uplo), - n, A, lda, W, &lwork)); - // allocate memory - cudaErrcheck(cudaMalloc((void**)&d_work, sizeof(double) * lwork)); - // compute eigenvalues and eigenvectors. - cusolverErrcheck(cusolverDnDsyevd(cusolver_handle, cublas_eig_mode(jobz), cublas_fill_mode(uplo), - n, A, lda, W, d_work, lwork, d_info)); - - cudaErrcheck(cudaMemcpy(&h_info, d_info, sizeof(int), cudaMemcpyDeviceToHost)); - if (h_info != 0) { - throw std::runtime_error("dnevd: failed to invert matrix"); - } - cudaErrcheck(cudaFree(d_info)); - cudaErrcheck(cudaFree(d_work)); -} -static inline -void dnevd (cusolverDnHandle_t& cusolver_handle, const char& jobz, const char& uplo, const int& n, std::complex* A, const int& lda, float * W) -{ - // prepare some values for cusolverDnCheevd_bufferSize - int lwork = 0; - int h_info = 0; - int* d_info = nullptr; - cuComplex* d_work = nullptr; - cudaErrcheck(cudaMalloc((void**)&d_info, sizeof(int))); - - // calculate the sizes needed for pre-allocated buffer. - cusolverErrcheck(cusolverDnCheevd_bufferSize(cusolver_handle, cublas_eig_mode(jobz), cublas_fill_mode(uplo), - n, reinterpret_cast(A), lda, W, &lwork)); - // allocate memory - cudaErrcheck(cudaMalloc((void**)&d_work, sizeof(cuComplex) * lwork)); - // compute eigenvalues and eigenvectors. - cusolverErrcheck(cusolverDnCheevd(cusolver_handle, cublas_eig_mode(jobz), cublas_fill_mode(uplo), - n, reinterpret_cast(A), lda, W, d_work, lwork, d_info)); - - cudaErrcheck(cudaMemcpy(&h_info, d_info, sizeof(int), cudaMemcpyDeviceToHost)); - if (h_info != 0) { - throw std::runtime_error("dnevd: failed to invert matrix"); - } - cudaErrcheck(cudaFree(d_info)); - cudaErrcheck(cudaFree(d_work)); -} -static inline -void dnevd (cusolverDnHandle_t& cusolver_handle, const char& jobz, const char& uplo, const int& n, std::complex* A, const int& lda, double* W) -{ - // prepare some values for cusolverDnZheevd_bufferSize - int lwork = 0; - int h_info = 0; - int* d_info = nullptr; - cuDoubleComplex* d_work = nullptr; - cudaErrcheck(cudaMalloc((void**)&d_info, sizeof(int))); - - // calculate the sizes needed for pre-allocated buffer. - cusolverErrcheck(cusolverDnZheevd_bufferSize(cusolver_handle, cublas_eig_mode(jobz), cublas_fill_mode(uplo), - n, reinterpret_cast(A), lda, W, &lwork)); - // allocate memory - cudaErrcheck(cudaMalloc((void**)&d_work, sizeof(cuDoubleComplex) * lwork)); - // compute eigenvalues and eigenvectors. - cusolverErrcheck(cusolverDnZheevd(cusolver_handle, cublas_eig_mode(jobz), cublas_fill_mode(uplo), - n, reinterpret_cast(A), lda, W, d_work, lwork, d_info)); - - cudaErrcheck(cudaMemcpy(&h_info, d_info, sizeof(int), cudaMemcpyDeviceToHost)); - if (h_info != 0) { - throw std::runtime_error("dnevd: failed to invert matrix"); - } - cudaErrcheck(cudaFree(d_info)); - cudaErrcheck(cudaFree(d_work)); -} - -static inline -void dngvd (cusolverDnHandle_t& cusolver_handle, const int& itype, const char& jobz, const char& uplo, const int& n, float* A, const int& lda, float* B, const int& ldb, float * W) -{ - // prepare some values for cusolverDnSsygvd_bufferSize - int lwork = 0; - int h_info = 0; - int* d_info = nullptr; - float* d_work = nullptr; - cudaErrcheck(cudaMalloc((void**)&d_info, sizeof(int))); - - // calculate the sizes needed for pre-allocated buffer. - cusolverErrcheck(cusolverDnSsygvd_bufferSize(cusolver_handle, cublas_eig_type(itype), cublas_eig_mode(jobz), cublas_fill_mode(uplo), - n, A, lda, B, ldb, W, &lwork)); - // allocate memory - cudaErrcheck(cudaMalloc((void**)&d_work, sizeof(float) * lwork)); - // compute eigenvalues and eigenvectors. - cusolverErrcheck(cusolverDnSsygvd(cusolver_handle, cublas_eig_type(itype), cublas_eig_mode(jobz), cublas_fill_mode(uplo), - n, A, lda, B, ldb, W, d_work, lwork, d_info)); - - cudaErrcheck(cudaMemcpy(&h_info, d_info, sizeof(int), cudaMemcpyDeviceToHost)); - if (h_info != 0) { - throw std::runtime_error("dnevd: failed to invert matrix"); - } - cudaErrcheck(cudaFree(d_info)); - cudaErrcheck(cudaFree(d_work)); -} -static inline -void dngvd (cusolverDnHandle_t& cusolver_handle, const int& itype, const char& jobz, const char& uplo, const int& n, double* A, const int& lda, double* B, const int& ldb, double * W) -{ - // prepare some values for cusolverDnDsygvd_bufferSize - int lwork = 0; - int h_info = 0; - int* d_info = nullptr; - double* d_work = nullptr; - cudaErrcheck(cudaMalloc((void**)&d_info, sizeof(int))); - - // calculate the sizes needed for pre-allocated buffer. - cusolverErrcheck(cusolverDnDsygvd_bufferSize(cusolver_handle, cublas_eig_type(itype), cublas_eig_mode(jobz), cublas_fill_mode(uplo), - n, A, lda, B, ldb, W, &lwork)); - // allocate memory - cudaErrcheck(cudaMalloc((void**)&d_work, sizeof(double) * lwork)); - // compute eigenvalues and eigenvectors. - cusolverErrcheck(cusolverDnDsygvd(cusolver_handle, cublas_eig_type(itype), cublas_eig_mode(jobz), cublas_fill_mode(uplo), - n, A, lda, B, ldb, W, d_work, lwork, d_info)); - - cudaErrcheck(cudaMemcpy(&h_info, d_info, sizeof(int), cudaMemcpyDeviceToHost)); - if (h_info != 0) { - throw std::runtime_error("dnevd: failed to invert matrix"); - } - cudaErrcheck(cudaFree(d_info)); - cudaErrcheck(cudaFree(d_work)); -} -static inline -void dngvd (cusolverDnHandle_t& cusolver_handle, const int& itype, const char& jobz, const char& uplo, const int& n, std::complex* A, const int& lda, std::complex* B, const int& ldb, float* W) -{ - // prepare some values for cusolverDnChegvd_bufferSize - int lwork = 0; - int h_info = 0; - int* d_info = nullptr; - cuComplex* d_work = nullptr; - cudaErrcheck(cudaMalloc((void**)&d_info, sizeof(int))); - - // calculate the sizes needed for pre-allocated buffer. - cusolverErrcheck(cusolverDnChegvd_bufferSize(cusolver_handle, cublas_eig_type(itype), cublas_eig_mode(jobz), cublas_fill_mode(uplo), - n, reinterpret_cast(A), lda, reinterpret_cast(B), ldb, W, &lwork)); - // allocate memory - cudaErrcheck(cudaMalloc((void**)&d_work, sizeof(cuComplex) * lwork)); - // compute eigenvalues and eigenvectors. - cusolverErrcheck(cusolverDnChegvd(cusolver_handle, cublas_eig_type(itype), cublas_eig_mode(jobz), cublas_fill_mode(uplo), - n, reinterpret_cast(A), lda, reinterpret_cast(B), ldb, W, d_work, lwork, d_info)); - - cudaErrcheck(cudaMemcpy(&h_info, d_info, sizeof(int), cudaMemcpyDeviceToHost)); - if (h_info != 0) { - throw std::runtime_error("dnevd: failed to invert matrix"); - } - cudaErrcheck(cudaFree(d_info)); - cudaErrcheck(cudaFree(d_work)); -} -static inline -void dngvd (cusolverDnHandle_t& cusolver_handle, const int& itype, const char& jobz, const char& uplo, const int& n, std::complex* A, const int& lda, std::complex* B, const int& ldb, double* W) -{ - // prepare some values for cusolverDnZhegvd_bufferSize - int lwork = 0; - int h_info = 0; - int* d_info = nullptr; - cuDoubleComplex* d_work = nullptr; - cudaErrcheck(cudaMalloc((void**)&d_info, sizeof(int))); - - // calculate the sizes needed for pre-allocated buffer. - cusolverErrcheck(cusolverDnZhegvd_bufferSize(cusolver_handle, cublas_eig_type(itype), cublas_eig_mode(jobz), cublas_fill_mode(uplo), - n, reinterpret_cast(A), lda, reinterpret_cast(B), ldb, W, &lwork)); - // allocate memory - cudaErrcheck(cudaMalloc((void**)&d_work, sizeof(cuDoubleComplex) * lwork)); - // compute eigenvalues and eigenvectors. - cusolverErrcheck(cusolverDnZhegvd(cusolver_handle, cublas_eig_type(itype), cublas_eig_mode(jobz), cublas_fill_mode(uplo), - n, reinterpret_cast(A), lda, reinterpret_cast(B), ldb, W, d_work, lwork, d_info)); - - cudaErrcheck(cudaMemcpy(&h_info, d_info, sizeof(int), cudaMemcpyDeviceToHost)); - if (h_info != 0) { - throw std::runtime_error("dnevd: failed to invert matrix"); - } - cudaErrcheck(cudaFree(d_info)); - cudaErrcheck(cudaFree(d_work)); -} - -static inline -void getrf(cusolverDnHandle_t& cusolver_handle, const int& m, const int& n, float* A, const int& lda, int* ipiv) -{ - // prepare some values for cusolverDnSgetrf_bufferSize - int lwork = 0; - int h_info = 0; - int* d_info = nullptr; - float* d_work = nullptr; - cudaErrcheck(cudaMalloc((void**)&d_info, sizeof(int))); - - // calculate the sizes needed for pre-allocated buffer. - cusolverErrcheck(cusolverDnSgetrf_bufferSize(cusolver_handle, m, n, A, lda, &lwork)); - - // allocate memory - cudaErrcheck(cudaMalloc((void**)&d_work, sizeof(float) * lwork)); - - // Perform LU decomposition - cusolverErrcheck(cusolverDnSgetrf(cusolver_handle, m, n, A, lda, d_work, ipiv, d_info)); - - cudaErrcheck(cudaMemcpy(&h_info, d_info, sizeof(int), cudaMemcpyDeviceToHost)); - if (h_info != 0) { - throw std::runtime_error("getrf: failed to compute LU factorization"); - } - - cudaErrcheck(cudaFree(d_work)); - cudaErrcheck(cudaFree(d_info)); -} -static inline -void getrf(cusolverDnHandle_t& cusolver_handle, const int& m, const int& n, double* A, const int& lda, int* ipiv) -{ - // prepare some values for cusolverDnDgetrf_bufferSize - int lwork = 0; - int h_info = 0; - int* d_info = nullptr; - double* d_work = nullptr; - cudaErrcheck(cudaMalloc((void**)&d_info, sizeof(int))); - - // calculate the sizes needed for pre-allocated buffer. - cusolverErrcheck(cusolverDnDgetrf_bufferSize(cusolver_handle, m, n, A, lda, &lwork)); - - // allocate memory - cudaErrcheck(cudaMalloc((void**)&d_work, sizeof(double) * lwork)); - - // Perform LU decomposition - cusolverErrcheck(cusolverDnDgetrf(cusolver_handle, m, n, A, lda, d_work, ipiv, d_info)); - - cudaErrcheck(cudaMemcpy(&h_info, d_info, sizeof(int), cudaMemcpyDeviceToHost)); - if (h_info != 0) { - throw std::runtime_error("getrf: failed to compute LU factorization"); - } - - cudaErrcheck(cudaFree(d_work)); - cudaErrcheck(cudaFree(d_info)); -} -static inline -void getrf(cusolverDnHandle_t& cusolver_handle, const int& m, const int& n, std::complex* A, const int& lda, int* ipiv) -{ - // prepare some values for cusolverDnCgetrf_bufferSize - int lwork = 0; - int h_info = 0; - int* d_info = nullptr; - cuComplex* d_work = nullptr; - cudaErrcheck(cudaMalloc((void**)&d_info, sizeof(int))); - - // calculate the sizes needed for pre-allocated buffer. - cusolverErrcheck(cusolverDnCgetrf_bufferSize(cusolver_handle, m, n, reinterpret_cast(A), lda, &lwork)); - - // allocate memory - cudaErrcheck(cudaMalloc((void**)&d_work, sizeof(cuComplex) * lwork)); - - // Perform LU decomposition - cusolverErrcheck(cusolverDnCgetrf(cusolver_handle, m, n, reinterpret_cast(A), lda, d_work, ipiv, d_info)); - - cudaErrcheck(cudaMemcpy(&h_info, d_info, sizeof(int), cudaMemcpyDeviceToHost)); - if (h_info != 0) { - throw std::runtime_error("getrf: failed to compute LU factorization"); - } - - cudaErrcheck(cudaFree(d_work)); - cudaErrcheck(cudaFree(d_info)); -} -static inline -void getrf(cusolverDnHandle_t& cusolver_handle, const int& m, const int& n, std::complex* A, const int& lda, int* ipiv) -{ - // prepare some values for cusolverDnZgetrf_bufferSize - int lwork = 0; - int h_info = 0; - int* d_info = nullptr; - cuDoubleComplex* d_work = nullptr; - cudaErrcheck(cudaMalloc((void**)&d_info, sizeof(int))); - - // calculate the sizes needed for pre-allocated buffer. - cusolverErrcheck(cusolverDnZgetrf_bufferSize(cusolver_handle, m, n, reinterpret_cast(A), lda, &lwork)); - - // allocate memory - cudaErrcheck(cudaMalloc((void**)&d_work, sizeof(cuDoubleComplex) * lwork)); - - // Perform LU decomposition - cusolverErrcheck(cusolverDnZgetrf(cusolver_handle, m, n, reinterpret_cast(A), lda, d_work, ipiv, d_info)); - - cudaErrcheck(cudaMemcpy(&h_info, d_info, sizeof(int), cudaMemcpyDeviceToHost)); - if (h_info != 0) { - throw std::runtime_error("getrf: failed to compute LU factorization"); - } - - cudaErrcheck(cudaFree(d_work)); - cudaErrcheck(cudaFree(d_info)); -} - -static inline -void getrs(cusolverDnHandle_t& cusolver_handle, const char& trans, const int& n, const int& nrhs, float* A, const int& lda, const int* ipiv, float* B, const int& ldb) -{ - int h_info = 0; - int* d_info = nullptr; - cudaErrcheck(cudaMalloc((void**)&d_info, sizeof(int))); - - cusolverErrcheck(cusolverDnSgetrs(cusolver_handle, GetCublasOperation(trans), n, nrhs, A, lda, ipiv, B, ldb, d_info)); - - cudaErrcheck(cudaMemcpy(&h_info, d_info, sizeof(int), cudaMemcpyDeviceToHost)); - if (h_info != 0) { - throw std::runtime_error("getrs: failed to solve the linear system"); - } - - cudaErrcheck(cudaFree(d_info)); -} -static inline -void getrs(cusolverDnHandle_t& cusolver_handle, const char& trans, const int& n, const int& nrhs, double* A, const int& lda, const int* ipiv, double* B, const int& ldb) -{ - int h_info = 0; - int* d_info = nullptr; - cudaErrcheck(cudaMalloc((void**)&d_info, sizeof(int))); - - cusolverErrcheck(cusolverDnDgetrs(cusolver_handle, GetCublasOperation(trans), n, nrhs, A, lda, ipiv, B, ldb, d_info)); - - cudaErrcheck(cudaMemcpy(&h_info, d_info, sizeof(int), cudaMemcpyDeviceToHost)); - if (h_info != 0) { - throw std::runtime_error("getrs: failed to solve the linear system"); - } - - cudaErrcheck(cudaFree(d_info)); -} -static inline -void getrs(cusolverDnHandle_t& cusolver_handle, const char& trans, const int& n, const int& nrhs, std::complex* A, const int& lda, const int* ipiv, std::complex* B, const int& ldb) -{ - int h_info = 0; - int* d_info = nullptr; - cudaErrcheck(cudaMalloc((void**)&d_info, sizeof(int))); - - cusolverErrcheck(cusolverDnCgetrs(cusolver_handle, GetCublasOperation(trans), n, nrhs, reinterpret_cast(A), lda, ipiv, reinterpret_cast(B), ldb, d_info)); - - cudaErrcheck(cudaMemcpy(&h_info, d_info, sizeof(int), cudaMemcpyDeviceToHost)); - if (h_info != 0) { - throw std::runtime_error("getrs: failed to solve the linear system"); - } - - cudaErrcheck(cudaFree(d_info)); -} -static inline -void getrs(cusolverDnHandle_t& cusolver_handle, const char& trans, const int& n, const int& nrhs, std::complex* A, const int& lda, const int* ipiv, std::complex* B, const int& ldb) -{ - int h_info = 0; - int* d_info = nullptr; - cudaErrcheck(cudaMalloc((void**)&d_info, sizeof(int))); - - cusolverErrcheck(cusolverDnZgetrs(cusolver_handle, GetCublasOperation(trans), n, nrhs, reinterpret_cast(A), lda, ipiv, reinterpret_cast(B), ldb, d_info)); - - cudaErrcheck(cudaMemcpy(&h_info, d_info, sizeof(int), cudaMemcpyDeviceToHost)); - if (h_info != 0) { - throw std::runtime_error("getrs: failed to solve the linear system"); - } - - cudaErrcheck(cudaFree(d_info)); -} - -} // namespace cuSolverConnector -} // namespace container - -#endif // BASE_THIRD_PARTY_CUSOLVER_H_ \ No newline at end of file diff --git a/source/module_base/module_container/base/third_party/hipblas.h b/source/module_base/module_container/base/third_party/hipblas.h deleted file mode 100644 index 739fbd96b2..0000000000 --- a/source/module_base/module_container/base/third_party/hipblas.h +++ /dev/null @@ -1,321 +0,0 @@ -#ifndef BASE_THIRD_PARTY_HIPBLAS_H_ -#define BASE_THIRD_PARTY_HIPBLAS_H_ - -#include -#include -#include - -namespace container { -namespace hipBlasConnector { - -static inline -void dot(hipblasHandle_t& handle, const int& n, const float *x, const int& incx, const float *y, const int& incy, float* result) -{ - hipblasErrcheck(hipblasSdot(handle, n, x, incx, y, incy, result)); -} -static inline -void dot(hipblasHandle_t& handle, const int& n, const double *x, const int& incx, const double *y, const int& incy, double* result) -{ - hipblasErrcheck(hipblasDdot(handle, n, x, incx, y, incy, result)); -} -static inline -void dot(hipblasHandle_t& handle, const int& n, const std::complex *x, const int& incx, const std::complex *y, const int& incy, std::complex* result) -{ - hipblasErrcheck(hipblasCdotc(handle, n, reinterpret_cast(x), incx, reinterpret_cast(y), incy, reinterpret_cast(result))); -} -static inline -void dot(hipblasHandle_t& handle, const int& n, const std::complex *x, const int& incx, const std::complex *y, const int& incy, std::complex* result) -{ - hipblasErrcheck(hipblasZdotc(handle, n, reinterpret_cast(x), incx, reinterpret_cast(y), incy, reinterpret_cast(result))); -} - -static inline -void axpy(hipblasHandle_t& handle, const int& n, const float& alpha, const float *x, const int& incx, float *y, const int& incy) -{ - hipblasErrcheck(hipblasSaxpy(handle, n, &alpha, x, incx, y, incy)); -} -static inline -void axpy(hipblasHandle_t& handle, const int& n, const double& alpha, const double *x, const int& incx, double *y, const int& incy) -{ - hipblasErrcheck(hipblasDaxpy(handle, n, &alpha, x, incx, y, incy)); -} -static inline -void axpy(hipblasHandle_t& handle, const int& n, const std::complex& alpha, const std::complex *x, const int& incx, std::complex *y, const int& incy) -{ - hipblasErrcheck(hipblasCaxpy(handle, n, reinterpret_cast(&alpha), reinterpret_cast(x), incx, reinterpret_cast(y), incy)); -} -static inline -void axpy(hipblasHandle_t& handle, const int& n, const std::complex& alpha, const std::complex *x, const int& incx, std::complex *y, const int& incy) -{ - hipblasErrcheck(hipblasZaxpy(handle, n, reinterpret_cast(&alpha), reinterpret_cast(x), incx, reinterpret_cast(y), incy)); -} - -static inline -void scal(hipblasHandle_t& handle, const int& n, const float& alpha, float *x, const int& incx) -{ - hipblasErrcheck(hipblasSscal(handle, n, &alpha, x, incx)); -} -static inline -void scal(hipblasHandle_t& handle, const int& n, const double& alpha, double *x, const int& incx) -{ - hipblasErrcheck(hipblasDscal(handle, n, &alpha, x, incx)); -} -static inline -void scal(hipblasHandle_t& handle, const int& n, const std::complex& alpha, std::complex *x, const int& incx) -{ - hipblasErrcheck(hipblasCscal(handle, n, reinterpret_cast(&alpha), reinterpret_cast(x), incx)); -} -static inline -void scal(hipblasHandle_t& handle, const int& n, const std::complex& alpha, std::complex *x, const int& incx) -{ - hipblasErrcheck(hipblasZscal(handle, n, reinterpret_cast(&alpha), reinterpret_cast(x), incx)); -} - -static inline -void gemv(hipblasHandle_t& handle, const char& trans, const int& m, const int& n, - const float& alpha, const float *A, const int& lda, const float *x, const int& incx, - const float& beta, float *y, const int& incy) -{ - hipblasErrcheck(hipblasSgemv(handle, GetHipblasOperation(trans), m, n, &alpha, A, lda, x, incx, &beta, y, incy)); -} -static inline -void gemv(hipblasHandle_t& handle, const char& trans, const int& m, const int& n, - const double& alpha, const double *A, const int& lda, const double *x, const int& incx, - const double& beta, double *y, const int& incy) -{ - hipblasErrcheck(hipblasDgemv(handle, GetHipblasOperation(trans), m, n, &alpha, A, lda, x, incx, &beta, y, incy)); -} -static inline -void gemv(hipblasHandle_t& handle, const char& trans, const int& m, const int& n, - const std::complex& alpha, const std::complex *A, const int& lda, const std::complex *x, const int& incx, - const std::complex& beta, std::complex *y, const int& incy) -{ - hipblasErrcheck(hipblasCgemv(handle, GetHipblasOperation(trans), m, n, reinterpret_cast(&alpha), - reinterpret_cast(A), lda, reinterpret_cast(x), incx, reinterpret_cast(&beta), reinterpret_cast(y), incy)); -} -static inline -void gemv(hipblasHandle_t& handle, const char& trans, const int& m, const int& n, - const std::complex& alpha, const std::complex *A, const int& lda, const std::complex *x, const int& incx, - const std::complex& beta, std::complex *y, const int& incy) -{ - hipblasErrcheck(hipblasZgemv(handle, GetHipblasOperation(trans), m, n, reinterpret_cast(&alpha), - reinterpret_cast(A), lda, reinterpret_cast(x), incx, reinterpret_cast(&beta), reinterpret_cast(y), incy)); -} - -template -static inline -void gemv_batched(hipblasHandle_t& handle, const char& trans, const int& m, const int& n, - const T& alpha, T** A, const int& lda, T** x, const int& incx, - const T& beta, T** y, const int& incy, const int& batch_size) -{ - for (int ii = 0; ii < batch_size; ++ii) { - // Call the single GEMV for each pair of matrix A[ii] and vector x[ii] - hipBlasConnector::gemv(handle, trans, m, n, alpha, A[ii], lda, x[ii], incy, beta, y[ii], incy); - } -} - -template -static inline -void gemv_batched_strided(hipblasHandle_t& handle, const char& transa, const int& m, const int& n, - const T& alpha, const T* A, const int& lda, const int& stride_a, const T* x, const int& incx, const int& stride_x, - const T& beta, T* y, const int& incy, const int& stride_y, const int& batch_size) -{ - for (int ii = 0; ii < batch_size; ii++) { - // Call the single GEMV for each pair of matrix A[ii] and vector x[ii] - hipBlasConnector::gemv(handle, transa, m, n, alpha, A + ii * stride_a, lda, x + ii * stride_x, incx, beta, y + ii * stride_y, incy); - } -} - -static inline -void gemm(hipblasHandle_t& handle, const char& transa, const char& transb, const int& m, const int& n, const int& k, - const float& alpha, const float* A, const int& lda, const float* B, const int& ldb, - const float& beta, float* C, const int& ldc) -{ - hipblasErrcheck(hipblasSgemm(handle, GetHipblasOperation(transa), GetHipblasOperation(transb), - m, n, k, &alpha, A, lda, B, ldb, &beta, C, ldc)); -} -static inline -void gemm(hipblasHandle_t& handle, const char& transa, const char& transb, const int& m, const int& n, const int& k, - const double& alpha, const double* A, const int& lda, const double* B, const int& ldb, - const double& beta, double* C, const int& ldc) -{ - hipblasErrcheck(hipblasDgemm(handle, GetHipblasOperation(transa), GetHipblasOperation(transb), - m, n, k, &alpha, A, lda, B, ldb, &beta, C, ldc)); -} -static inline -void gemm(hipblasHandle_t& handle, const char& transa, const char& transb, const int& m, const int& n, const int& k, - const std::complex& alpha, const std::complex* A, const int& lda, const std::complex* B, const int& ldb, - const std::complex& beta, std::complex* C, const int& ldc) -{ - hipblasErrcheck(hipblasCgemm(handle, GetHipblasOperation(transa), GetHipblasOperation(transb), - m, n, k, - reinterpret_cast(&alpha), - reinterpret_cast(A), lda, - reinterpret_cast(B), ldb, - reinterpret_cast(&beta), - reinterpret_cast(C), ldc)); -} -static inline -void gemm(hipblasHandle_t& handle, const char& transa, const char& transb, const int& m, const int& n, const int& k, - const std::complex& alpha, const std::complex* A, const int& lda, const std::complex* B, const int& ldb, - const std::complex& beta, std::complex* C, const int& ldc) -{ - hipblasErrcheck(hipblasZgemm(handle, GetHipblasOperation(transa), GetHipblasOperation(transb), - m, n, k, - reinterpret_cast(&alpha), - reinterpret_cast(A), lda, - reinterpret_cast(B), ldb, - reinterpret_cast(&beta), - reinterpret_cast(C), ldc)); -} - -template -static inline -T** allocate_(T** in, const int& batch_size) -{ - T** out = nullptr; - hipErrcheck(hipMalloc(reinterpret_cast(&out), sizeof(T*) * batch_size)); - hipErrcheck(hipMemcpy(out, in, sizeof(T*) * batch_size, hipMemcpyHostToDevice)); - return out; -} - -static inline -void gemm_batched(hipblasHandle_t& handle, const char& transa, const char& transb, const int& m, const int& n, const int& k, - const float& alpha, float** A, const int& lda, float** B, const int& ldb, - const float& beta, float** C, const int& ldc, const int& batch_size) -{ - float** d_A = allocate_(A, batch_size); - float** d_B = allocate_(B, batch_size); - float** d_C = allocate_(C, batch_size); - hipblasErrcheck(hipblasSgemmBatched(handle, GetHipblasOperation(transa), GetHipblasOperation(transb), - m, n, k, &alpha, d_A, lda, d_B, ldb, &beta, d_C, ldc, batch_size)); - hipErrcheck(hipFree(d_A)); - hipErrcheck(hipFree(d_B)); - hipErrcheck(hipFree(d_C)); -} -static inline -void gemm_batched(hipblasHandle_t& handle, const char& transa, const char& transb, const int& m, const int& n, const int& k, - const double& alpha, double** A, const int& lda, double** B, const int& ldb, - const double& beta, double** C, const int& ldc, const int& batch_size) -{ - double** d_A = allocate_(A, batch_size); - double** d_B = allocate_(B, batch_size); - double** d_C = allocate_(C, batch_size); - hipblasErrcheck(hipblasDgemmBatched(handle, GetHipblasOperation(transa), GetHipblasOperation(transb), - m, n, k, &alpha, d_A, lda, d_B, ldb, &beta, d_C, ldc, batch_size)); - hipErrcheck(hipFree(d_A)); - hipErrcheck(hipFree(d_B)); - hipErrcheck(hipFree(d_C)); -} -static inline -void gemm_batched(hipblasHandle_t& handle, const char& transa, const char& transb, const int& m, const int& n, const int& k, - const std::complex& alpha, std::complex** A, const int& lda, std::complex** B, const int& ldb, - const std::complex& beta, std::complex** C, const int& ldc, const int& batch_size) -{ - std::complex** d_A = allocate_(A, batch_size); - std::complex** d_B = allocate_(B, batch_size); - std::complex** d_C = allocate_(C, batch_size); - hipblasErrcheck(hipblasCgemmBatched(handle, GetHipblasOperation(transa), GetHipblasOperation(transb), - m, n, k, - reinterpret_cast(&alpha), - reinterpret_cast(d_A), lda, - reinterpret_cast(d_B), ldb, - reinterpret_cast(&beta), - reinterpret_cast(d_C), ldc, batch_size)); - hipErrcheck(hipFree(d_A)); - hipErrcheck(hipFree(d_B)); - hipErrcheck(hipFree(d_C)); -} -static inline -void gemm_batched(hipblasHandle_t& handle, const char& transa, const char& transb, const int& m, const int& n, const int& k, - const std::complex& alpha, std::complex** A, const int& lda, std::complex** B, const int& ldb, - const std::complex& beta, std::complex** C, const int& ldc, const int& batch_size) -{ - std::complex** d_A = allocate_(A, batch_size); - std::complex** d_B = allocate_(B, batch_size); - std::complex** d_C = allocate_(C, batch_size); - hipblasErrcheck(hipblasZgemmBatched(handle, GetHipblasOperation(transa), GetHipblasOperation(transb), - m, n, k, - reinterpret_cast(&alpha), - reinterpret_cast(d_A), lda, - reinterpret_cast(d_B), ldb, - reinterpret_cast(&beta), - reinterpret_cast(d_C), ldc, batch_size)); - hipErrcheck(hipFree(d_A)); - hipErrcheck(hipFree(d_B)); - hipErrcheck(hipFree(d_C)); -} - -static inline -void gemm_batched_strided(hipblasHandle_t& handle, const char& transa, const char& transb, const int& m, const int& n, const int& k, - const float& alpha, const float* A, const int& lda, const int& stride_a, const float* B, const int& ldb, const int& stride_b, - const float& beta, float* C, const int& ldc, const int& stride_c, const int& batch_size) -{ - hipblasErrcheck(hipblasSgemmStridedBatched( - handle, - GetHipblasOperation(transa), - GetHipblasOperation(transb), - m, n, k, - &alpha, - A, lda, stride_a, - B, ldb, stride_b, - &beta, - C, ldc, stride_c, - batch_size)); -} -static inline -void gemm_batched_strided(hipblasHandle_t& handle, const char& transa, const char& transb, const int& m, const int& n, const int& k, - const double& alpha, const double* A, const int& lda, const int& stride_a, const double* B, const int& ldb, const int& stride_b, - const double& beta, double* C, const int& ldc, const int& stride_c, const int& batch_size) -{ - hipblasErrcheck(hipblasDgemmStridedBatched( - handle, - GetHipblasOperation(transa), - GetHipblasOperation(transb), - m, n, k, - &alpha, - A, lda, stride_a, - B, ldb, stride_b, - &beta, - C, ldc, stride_c, - batch_size)); -} -static inline -void gemm_batched_strided(hipblasHandle_t& handle, const char& transa, const char& transb, const int& m, const int& n, const int& k, - const std::complex& alpha, const std::complex* A, const int& lda, const int& stride_a, const std::complex* B, const int& ldb, const int& stride_b, - const std::complex& beta, std::complex* C, const int& ldc, const int& stride_c, const int& batch_size) -{ - hipblasErrcheck(hipblasCgemmStridedBatched( - handle, - GetHipblasOperation(transa), - GetHipblasOperation(transb), - m, n, k, - reinterpret_cast(&alpha), - reinterpret_cast(A), lda, stride_a, - reinterpret_cast(B), ldb, stride_b, - reinterpret_cast(&beta), - reinterpret_cast(C), ldc, stride_c, - batch_size)); -} -static inline -void gemm_batched_strided(hipblasHandle_t& handle, const char& transa, const char& transb, const int& m, const int& n, const int& k, - const std::complex& alpha, const std::complex* A, const int& lda, const int& stride_a, const std::complex* B, const int& ldb, const int& stride_b, - const std::complex& beta, std::complex* C, const int& ldc, const int& stride_c, const int& batch_size) -{ - hipblasErrcheck(hipblasZgemmStridedBatched( - handle, - GetHipblasOperation(transa), - GetHipblasOperation(transb), - m, n, k, - reinterpret_cast(&alpha), - reinterpret_cast(A), lda, stride_a, - reinterpret_cast(B), ldb, stride_b, - reinterpret_cast(&beta), - reinterpret_cast(C), ldc, stride_c, - batch_size)); -} - -} // namespace hipBlasConnector -} // namespace container - -#endif // BASE_THIRD_PARTY_HIPBLAS_H_ \ No newline at end of file diff --git a/source/module_base/module_container/base/third_party/hipsolver.h b/source/module_base/module_container/base/third_party/hipsolver.h deleted file mode 100644 index a0826d3a09..0000000000 --- a/source/module_base/module_container/base/third_party/hipsolver.h +++ /dev/null @@ -1,346 +0,0 @@ -#ifndef BASE_THIRD_PARTY_HIPSOLVER_H_ -#define BASE_THIRD_PARTY_HIPSOLVER_H_ - -#include - -#include -#include -#include - -namespace container { -namespace hipSolverConnector { - -template -static inline -void trtri (hipsolverHandle_t& hipsolver_handle, const char& uplo, const char& diag, const int& n, T* A, const int& lda) -{ - size_t d_lwork = 0, h_lwork = 0; - hipsolverErrcheck(hipsolverDnXtrtri_bufferSize(hipsolver_handle, hipsolver_fill_mode(uplo), hipblas_diag_type(diag), n, GetTypeRocm::cuda_data_type, A, lda, &d_lwork, &h_lwork)); - void* d_work = nullptr, *h_work = nullptr; - hipErrcheck(hipMalloc((void**)&d_work, d_lwork)); - if (h_lwork) { - h_work = malloc(h_lwork); - if (h_work == nullptr) { - throw std::bad_alloc(); - } - } - int h_info = 0; - int* d_info = nullptr; - hipErrcheck(hipMalloc((void**)&d_info, sizeof(int))); - // Perform Cholesky decomposition - hipsolverErrcheck(hipsolverDnXtrtri(hipsolver_handle, hipsolver_fill_mode(uplo), hipblas_diag_type(diag), n, GetTypeRocm::cuda_data_type, A, n, d_work, d_lwork, h_work, h_lwork, d_info)); - hipErrcheck(hipMemcpy(&h_info, d_info, sizeof(int), hipMemcpyDeviceToHost)); - if (h_info != 0) { - throw std::runtime_error("trtri: failed to invert matrix"); - } - free(h_work); - hipErrcheck(hipFree(d_work)); - hipErrcheck(hipFree(d_info)); -} - -static inline -void potri (hipsolverHandle_t& hipsolver_handle, const char& uplo, const char& diag, const int& n, float * A, const int& lda) -{ - int lwork; - hipsolverErrcheck(hipsolverDnSpotri_bufferSize(hipsolver_handle, hipsolver_fill_mode(uplo), n, A, n, &lwork)); - float* work; - hipErrcheck(hipMalloc((void**)&work, lwork * sizeof(float))); - // Perform Cholesky decomposition - hipsolverErrcheck(hipsolverDnSpotri(hipsolver_handle, hipsolver_fill_mode(uplo), n, A, n, work, lwork, nullptr)); - hipErrcheck(hipFree(work)); -} -static inline -void potri (hipsolverHandle_t& hipsolver_handle, const char& uplo, const char& diag, const int& n, double * A, const int& lda) -{ - int lwork; - hipsolverErrcheck(hipsolverDnDpotri_bufferSize(hipsolver_handle, hipsolver_fill_mode(uplo), n, A, n, &lwork)); - double* work; - hipErrcheck(hipMalloc((void**)&work, lwork * sizeof(double))); - // Perform Cholesky decomposition - hipsolverErrcheck(hipsolverDnDpotri(hipsolver_handle, hipsolver_fill_mode(uplo), n, A, n, work, lwork, nullptr)); - hipErrcheck(hipFree(work)); -} -static inline -void potri (hipsolverHandle_t& hipsolver_handle, const char& uplo, const char& diag, const int& n, std::complex * A, const int& lda) -{ - int lwork; - hipsolverErrcheck(hipsolverDnCpotri_bufferSize(hipsolver_handle, hipsolver_fill_mode(uplo), n, reinterpret_cast(A), n, &lwork)); - hipFloatComplex* work; - hipErrcheck(hipMalloc((void**)&work, lwork * sizeof(hipFloatComplex))); - // Perform Cholesky decomposition - hipsolverErrcheck(hipsolverDnCpotri(hipsolver_handle, hipsolver_fill_mode(uplo), n, reinterpret_cast(A), n, work, lwork, nullptr)); - hipErrcheck(hipFree(work)); -} -static inline -void potri (hipsolverHandle_t& hipsolver_handle, const char& uplo, const char& diag, const int& n, std::complex * A, const int& lda) -{ - int lwork; - hipsolverErrcheck(hipsolverDnZpotri_bufferSize(hipsolver_handle, hipsolver_fill_mode(uplo), n, reinterpret_cast(A), n, &lwork)); - hipDoubleComplex* work; - hipErrcheck(hipMalloc((void**)&work, lwork * sizeof(hipDoubleComplex))); - // Perform Cholesky decomposition - hipsolverErrcheck(hipsolverDnZpotri(hipsolver_handle, hipsolver_fill_mode(uplo), n, reinterpret_cast(A), n, work, lwork, nullptr)); - hipErrcheck(hipFree(work)); -} - - -static inline -void potrf (hipsolverHandle_t& hipsolver_handle, const char& uplo, const int& n, float * A, const int& lda) -{ - int lwork; - hipsolverErrcheck(hipsolverDnSpotrf_bufferSize(hipsolver_handle, hipsolver_fill_mode(uplo), n, A, n, &lwork)); - float* work; - hipErrcheck(hipMalloc((void**)&work, lwork * sizeof(float))); - // Perform Cholesky decomposition - hipsolverErrcheck(hipsolverDnSpotrf(hipsolver_handle, hipsolver_fill_mode(uplo), n, A, n, work, lwork, nullptr)); - hipErrcheck(hipFree(work)); -} -static inline -void potrf (hipsolverHandle_t& hipsolver_handle, const char& uplo, const int& n, double * A, const int& lda) -{ - int lwork; - hipsolverErrcheck(hipsolverDnDpotrf_bufferSize(hipsolver_handle, hipsolver_fill_mode(uplo), n, A, n, &lwork)); - double* work; - hipErrcheck(hipMalloc((void**)&work, lwork * sizeof(double))); - // Perform Cholesky decomposition - hipsolverErrcheck(hipsolverDnDpotrf(hipsolver_handle, hipsolver_fill_mode(uplo), n, A, n, work, lwork, nullptr)); - hipErrcheck(hipFree(work)); -} -static inline -void potrf (hipsolverHandle_t& hipsolver_handle, const char& uplo, const int& n, std::complex * A, const int& lda) -{ - int lwork; - hipsolverErrcheck(hipsolverDnCpotrf_bufferSize(hipsolver_handle, hipsolver_fill_mode(uplo), n, reinterpret_cast(A), n, &lwork)); - hipFloatComplex* work; - hipErrcheck(hipMalloc((void**)&work, lwork * sizeof(hipFloatComplex))); - // Perform Cholesky decomposition - hipsolverErrcheck(hipsolverDnCpotrf(hipsolver_handle, hipsolver_fill_mode(uplo), n, reinterpret_cast(A), n, work, lwork, nullptr)); - hipErrcheck(hipFree(work)); -} -static inline -void potrf (hipsolverHandle_t& hipsolver_handle, const char& uplo, const int& n, std::complex * A, const int& lda) -{ - int lwork; - hipsolverErrcheck(hipsolverDnZpotrf_bufferSize(hipsolver_handle, hipsolver_fill_mode(uplo), n, reinterpret_cast(A), n, &lwork)); - hipDoubleComplex* work; - hipErrcheck(hipMalloc((void**)&work, lwork * sizeof(hipDoubleComplex))); - // Perform Cholesky decomposition - hipsolverErrcheck(hipsolverDnZpotrf(hipsolver_handle, hipsolver_fill_mode(uplo), n, reinterpret_cast(A), n, work, lwork, nullptr)); - hipErrcheck(hipFree(work)); -} - - -static inline -void dnevd (hipsolverHandle_t& hipsolver_handle, const char& jobz, const char& uplo, const int& n, float* A, const int& lda, float * W) -{ - // prepare some values for hipsolverDnZhegvd_bufferSize - int lwork = 0; - int h_info = 0; - int* d_info = nullptr; - float* d_work = nullptr; - hipErrcheck(hipMalloc((void**)&d_info, sizeof(int))); - - // calculate the sizes needed for pre-allocated buffer. - hipsolverErrcheck(hipsolverDnSsyevd_bufferSize(hipsolver_handle, hipblas_eig_mode(jobz), hipsolver_fill_mode(uplo), - n, A, lda, W, &lwork)); - // allocate memery - hipErrcheck(hipMalloc((void**)&d_work, sizeof(float) * lwork)); - // compute eigenvalues and eigenvectors. - hipsolverErrcheck(hipsolverDnSsyevd(hipsolver_handle, hipblas_eig_mode(jobz), hipsolver_fill_mode(uplo), - n, A, lda, W, d_work, lwork, d_info)); - - hipErrcheck(hipMemcpy(&h_info, d_info, sizeof(int), hipMemcpyDeviceToHost)); - if (h_info != 0) { - throw std::runtime_error("dnevd: failed to invert matrix"); - } - hipErrcheck(hipFree(d_info)); - hipErrcheck(hipFree(d_work)); -} -static inline -void dnevd (hipsolverHandle_t& hipsolver_handle, const char& jobz, const char& uplo, const int& n, double* A, const int& lda, double * W) -{ - // prepare some values for hipsolverDnZhegvd_bufferSize - int lwork = 0; - int h_info = 0; - int* d_info = nullptr; - double* d_work = nullptr; - hipErrcheck(hipMalloc((void**)&d_info, sizeof(int))); - - // calculate the sizes needed for pre-allocated buffer. - hipsolverErrcheck(hipsolverDnDsyevd_bufferSize(hipsolver_handle, hipblas_eig_mode(jobz), hipsolver_fill_mode(uplo), - n, A, lda, W, &lwork)); - // allocate memery - hipErrcheck(hipMalloc((void**)&d_work, sizeof(double) * lwork)); - // compute eigenvalues and eigenvectors. - hipsolverErrcheck(hipsolverDnDsyevd(hipsolver_handle, hipblas_eig_mode(jobz), hipsolver_fill_mode(uplo), - n, A, lda, W, d_work, lwork, d_info)); - - hipErrcheck(hipMemcpy(&h_info, d_info, sizeof(int), hipMemcpyDeviceToHost)); - if (h_info != 0) { - throw std::runtime_error("dnevd: failed to invert matrix"); - } - hipErrcheck(hipFree(d_info)); - hipErrcheck(hipFree(d_work)); -} -static inline -void dnevd (hipsolverHandle_t& hipsolver_handle, const char& jobz, const char& uplo, const int& n, std::complex* A, const int& lda, float * W) -{ - // prepare some values for hipsolverDnZhegvd_bufferSize - int lwork = 0; - int h_info = 0; - int* d_info = nullptr; - hipFloatComplex* d_work = nullptr; - hipErrcheck(hipMalloc((void**)&d_info, sizeof(int))); - - // calculate the sizes needed for pre-allocated buffer. - hipsolverErrcheck(hipsolverDnCheevd_bufferSize(hipsolver_handle, hipblas_eig_mode(jobz), hipsolver_fill_mode(uplo), - n, reinterpret_cast(A), lda, W, &lwork)); - // allocate memery - hipErrcheck(hipMalloc((void**)&d_work, sizeof(hipFloatComplex) * lwork)); - // compute eigenvalues and eigenvectors. - hipsolverErrcheck(hipsolverDnCheevd(hipsolver_handle, hipblas_eig_mode(jobz), hipsolver_fill_mode(uplo), - n, reinterpret_cast(A), lda, W, d_work, lwork, d_info)); - - hipErrcheck(hipMemcpy(&h_info, d_info, sizeof(int), hipMemcpyDeviceToHost)); - if (h_info != 0) { - throw std::runtime_error("dnevd: failed to invert matrix"); - } - hipErrcheck(hipFree(d_info)); - hipErrcheck(hipFree(d_work)); -} -static inline -void dnevd (hipsolverHandle_t& hipsolver_handle, const char& jobz, const char& uplo, const int& n, std::complex* A, const int& lda, double* W) -{ - // prepare some values for hipsolverDnZhegvd_bufferSize - int lwork = 0; - int h_info = 0; - int* d_info = nullptr; - hipDoubleComplex* d_work = nullptr; - hipErrcheck(hipMalloc((void**)&d_info, sizeof(int))); - - // calculate the sizes needed for pre-allocated buffer. - hipsolverErrcheck(hipsolverDnZheevd_bufferSize(hipsolver_handle, hipblas_eig_mode(jobz), hipsolver_fill_mode(uplo), - n, reinterpret_cast(A), lda, W, &lwork)); - // allocate memery - hipErrcheck(hipMalloc((void**)&d_work, sizeof(hipDoubleComplex) * lwork)); - // compute eigenvalues and eigenvectors. - hipsolverErrcheck(hipsolverDnZheevd(hipsolver_handle, hipblas_eig_mode(jobz), hipsolver_fill_mode(uplo), - n, reinterpret_cast(A), lda, W, d_work, lwork, d_info)); - - hipErrcheck(hipMemcpy(&h_info, d_info, sizeof(int), hipMemcpyDeviceToHost)); - if (h_info != 0) { - throw std::runtime_error("dnevd: failed to invert matrix"); - } - hipErrcheck(hipFree(d_info)); - hipErrcheck(hipFree(d_work)); -} - -static inline -void dngvd (hipsolverHandle_t& hipsolver_handle, const int& itype, const char& jobz, const char& uplo, const int& n, float* A, const int& lda, float* B, const int& ldb, float * W) -{ - // prepare some values for hipsolverDnZhegvd_bufferSize - int lwork = 0; - int h_info = 0; - int* d_info = nullptr; - float* d_work = nullptr; - hipErrcheck(hipMalloc((void**)&d_info, sizeof(int))); - - // calculate the sizes needed for pre-allocated buffer. - hipsolverErrcheck(hipsolverDnSsygvd_bufferSize(hipsolver_handle, hipblas_eig_type(itype), hipblas_eig_mode(jobz), hipsolver_fill_mode(uplo), - n, A, lda, B, ldb, W, &lwork)); - // allocate memery - hipErrcheck(hipMalloc((void**)&d_work, sizeof(float) * lwork)); - // compute eigenvalues and eigenvectors. - hipsolverErrcheck(hipsolverDnSsygvd(hipsolver_handle, hipblas_eig_type(itype), hipblas_eig_mode(jobz), hipsolver_fill_mode(uplo), - n, A, lda, B, ldb, W, d_work, lwork, d_info)); - - hipErrcheck(hipMemcpy(&h_info, d_info, sizeof(int), hipMemcpyDeviceToHost)); - if (h_info != 0) { - throw std::runtime_error("dnevd: failed to invert matrix"); - } - hipErrcheck(hipFree(d_info)); - hipErrcheck(hipFree(d_work)); -} -static inline -void dngvd (hipsolverHandle_t& hipsolver_handle, const int& itype, const char& jobz, const char& uplo, const int& n, double* A, const int& lda, double* B, const int& ldb, double * W) -{ - // prepare some values for hipsolverDnZhegvd_bufferSize - int lwork = 0; - int h_info = 0; - int* d_info = nullptr; - double* d_work = nullptr; - hipErrcheck(hipMalloc((void**)&d_info, sizeof(int))); - - // calculate the sizes needed for pre-allocated buffer. - hipsolverErrcheck(hipsolverDnDsygvd_bufferSize(hipsolver_handle, hipblas_eig_type(itype), hipblas_eig_mode(jobz), hipsolver_fill_mode(uplo), - n, A, lda, B, ldb, W, &lwork)); - // allocate memery - hipErrcheck(hipMalloc((void**)&d_work, sizeof(double) * lwork)); - // compute eigenvalues and eigenvectors. - hipsolverErrcheck(hipsolverDnDsygvd(hipsolver_handle, hipblas_eig_type(itype), hipblas_eig_mode(jobz), hipsolver_fill_mode(uplo), - n, A, lda, B, ldb, W, d_work, lwork, d_info)); - - hipErrcheck(hipMemcpy(&h_info, d_info, sizeof(int), hipMemcpyDeviceToHost)); - if (h_info != 0) { - throw std::runtime_error("dnevd: failed to invert matrix"); - } - hipErrcheck(hipFree(d_info)); - hipErrcheck(hipFree(d_work)); -} -static inline -void dngvd (hipsolverHandle_t& hipsolver_handle, const int& itype, const char& jobz, const char& uplo, const int& n, std::complex* A, const int& lda, std::complex* B, const int& ldb, float* W) -{ - // prepare some values for hipsolverDnZhegvd_bufferSize - int lwork = 0; - int h_info = 0; - int* d_info = nullptr; - hipFloatComplex* d_work = nullptr; - hipErrcheck(hipMalloc((void**)&d_info, sizeof(int))); - - // calculate the sizes needed for pre-allocated buffer. - hipsolverErrcheck(hipsolverDnChegvd_bufferSize(hipsolver_handle, hipblas_eig_type(itype), hipblas_eig_mode(jobz), hipsolver_fill_mode(uplo), - n, reinterpret_cast(A), lda, reinterpret_cast(B), ldb, W, &lwork)); - // allocate memery - hipErrcheck(hipMalloc((void**)&d_work, sizeof(hipFloatComplex) * lwork)); - // compute eigenvalues and eigenvectors. - hipsolverErrcheck(hipsolverDnChegvd(hipsolver_handle, hipblas_eig_type(itype), hipblas_eig_mode(jobz), hipsolver_fill_mode(uplo), - n, reinterpret_cast(A), lda, reinterpret_cast(B), ldb, W, d_work, lwork, d_info)); - - hipErrcheck(hipMemcpy(&h_info, d_info, sizeof(int), hipMemcpyDeviceToHost)); - if (h_info != 0) { - throw std::runtime_error("dnevd: failed to invert matrix"); - } - hipErrcheck(hipFree(d_info)); - hipErrcheck(hipFree(d_work)); -} -static inline -void dngvd (hipsolverHandle_t& hipsolver_handle, const int& itype, const char& jobz, const char& uplo, const int& n, std::complex* A, const int& lda, std::complex* B, const int& ldb, double* W) -{ - // prepare some values for hipsolverDnZhegvd_bufferSize - int lwork = 0; - int h_info = 0; - int* d_info = nullptr; - hipDoubleComplex* d_work = nullptr; - hipErrcheck(hipMalloc((void**)&d_info, sizeof(int))); - - // calculate the sizes needed for pre-allocated buffer. - hipsolverErrcheck(hipsolverDnZhegvd_bufferSize(hipsolver_handle, hipblas_eig_type(itype), hipblas_eig_mode(jobz), hipsolver_fill_mode(uplo), - n, reinterpret_cast(A), lda, reinterpret_cast(B), ldb, W, &lwork)); - // allocate memery - hipErrcheck(hipMalloc((void**)&d_work, sizeof(hipDoubleComplex) * lwork)); - // compute eigenvalues and eigenvectors. - hipsolverErrcheck(hipsolverDnZhegvd(hipsolver_handle, hipblas_eig_type(itype), hipblas_eig_mode(jobz), hipsolver_fill_mode(uplo), - n, reinterpret_cast(A), lda, reinterpret_cast(B), ldb, W, d_work, lwork, d_info)); - - hipErrcheck(hipMemcpy(&h_info, d_info, sizeof(int), hipMemcpyDeviceToHost)); - if (h_info != 0) { - throw std::runtime_error("dnevd: failed to invert matrix"); - } - hipErrcheck(hipFree(d_info)); - hipErrcheck(hipFree(d_work)); -} - -} // namespace hipSolverConnector -} // namespace container - -#endif // BASE_THIRD_PARTY_HIPSOLVER_H_ \ No newline at end of file diff --git a/source/module_base/module_container/base/third_party/lapack.h b/source/module_base/module_container/base/third_party/lapack.h deleted file mode 100644 index 7452dc1835..0000000000 --- a/source/module_base/module_container/base/third_party/lapack.h +++ /dev/null @@ -1,404 +0,0 @@ -#ifndef BASE_THIRD_PARTY_LAPACK_H_ -#define BASE_THIRD_PARTY_LAPACK_H_ - -#include - - -#if defined(__CUDA) -#include -#elif defined(__ROCM) -#include -#endif - -//Naming convention of lapack subroutines : ammxxx, where -//"a" specifies the data type: -// - d stands for double -// - z stands for complex double -//"mm" specifies the type of matrix, for example: -// - he stands for hermitian -// - sy stands for symmetric -//"xxx" specifies the type of problem, for example: -// - gv stands for generalized eigenvalue - -extern "C" -{ -int ilaenv_(int* ispec,const char* name,const char* opts, - const int* n1,const int* n2,const int* n3,const int* n4); - - -// solve the generalized eigenproblem Ax=eBx, where A is Hermitian and complex couble -// zhegv_ & zhegvd_ returns all eigenvalues while zhegvx_ returns selected ones -void ssygvd_(const int* itype, const char* jobz, const char* uplo, const int* n, - float* a, const int* lda, - const float* b, const int* ldb, float* w, - float* work, int* lwork, - int* iwork, int* liwork, int* info); - -void dsygvd_(const int* itype, const char* jobz, const char* uplo, const int* n, - double* a, const int* lda, - const double* b, const int* ldb, double* w, - double* work, int* lwork, - int* iwork, int* liwork, int* info); - -void chegvd_(const int* itype, const char* jobz, const char* uplo, const int* n, - std::complex* a, const int* lda, - const std::complex* b, const int* ldb, float* w, - std::complex* work, int* lwork, float* rwork, int* lrwork, - int* iwork, int* liwork, int* info); - -void zhegvd_(const int* itype, const char* jobz, const char* uplo, const int* n, - std::complex* a, const int* lda, - const std::complex* b, const int* ldb, double* w, - std::complex* work, int* lwork, double* rwork, int* lrwork, - int* iwork, int* liwork, int* info); - -void ssyevx_(const char* jobz, const char* range, const char* uplo, const int* n, - float *a, const int* lda, - const float* vl, const float* vu, const int* il, const int* iu, const float* abstol, - const int* m, float* w, float *z, const int *ldz, - float *work, const int* lwork, float* rwork, int* iwork, int* ifail, int* info); -void dsyevx_(const char* jobz, const char* range, const char* uplo, const int* n, - double *a, const int* lda, - const double* vl, const double* vu, const int* il, const int* iu, const double* abstol, - const int* m, double* w, double *z, const int *ldz, - double *work, const int* lwork, double* rwork, int* iwork, int* ifail, int* info); -void cheevx_(const char* jobz, const char* range, const char* uplo, const int* n, - std::complex *a, const int* lda, - const float* vl, const float* vu, const int* il, const int* iu, const float* abstol, - const int* m, float* w, std::complex *z, const int *ldz, - std::complex *work, const int* lwork, float* rwork, int* iwork, int* ifail, int* info); -void zheevx_(const char* jobz, const char* range, const char* uplo, const int* n, - std::complex *a, const int* lda, - const double* vl, const double* vu, const int* il, const int* iu, const double* abstol, - const int* m, double* w, std::complex *z, const int *ldz, - std::complex *work, const int* lwork, double* rwork, int* iwork, int* ifail, int* info); - -void ssyevd_(const char *jobz, const char *uplo, const int *n, - float *a, const int *lda, float *w, - float *work, int *lwork, - int *iwork, int *liwork, int *info); -void dsyevd_(const char *jobz, const char *uplo, const int *n, - double *a, const int *lda, double *w, - double *work, int *lwork, - int *iwork, int *liwork, int *info); -void cheevd_(const char *jobz, const char *uplo, const int *n, - std::complex *a, const int *lda, float *w, - std::complex *work, int *lwork, float *rwork, int *lrwork, - int *iwork, int *liwork, int *info); -void zheevd_(const char *jobz, const char *uplo, const int *n, - std::complex *a, const int *lda, double *w, - std::complex *work, int *lwork, double *rwork, int *lrwork, - int *iwork, int *liwork, int *info); - -void spotrf_(const char*const uplo, const int*const n, float*const A, const int*const lda, int*const info); -void dpotrf_(const char*const uplo, const int*const n, double*const A, const int*const lda, int*const info); -void cpotrf_(const char*const uplo, const int*const n, std::complex*const A, const int*const lda, int*const info); -void zpotrf_(const char*const uplo, const int*const n, std::complex*const A, const int*const lda, int*const info); - -void spotri_(const char*const uplo, const int*const n, float*const A, const int*const lda, int*const info); -void dpotri_(const char*const uplo, const int*const n, double*const A, const int*const lda, int*const info); -void cpotri_(const char*const uplo, const int*const n, std::complex*const A, const int*const lda, int*const info); -void zpotri_(const char*const uplo, const int*const n, std::complex*const A, const int*const lda, int*const info); - -void strtri_(const char* uplo, const char* diag, const int* n, float* a, const int* lda, int* info); -void dtrtri_(const char* uplo, const char* diag, const int* n, double* a, const int* lda, int* info); -void ctrtri_(const char* uplo, const char* diag, const int* n, std::complex* a, const int* lda, int* info); -void ztrtri_(const char* uplo, const char* diag, const int* n, std::complex* a, const int* lda, int* info); - -void sgetrf_(const int* m, const int* n, float* a, const int* lda, int* ipiv, int* info); -void dgetrf_(const int* m, const int* n, double* a, const int* lda, int* ipiv, int* info); -void cgetrf_(const int* m, const int* n, std::complex* a, const int* lda, int* ipiv, int* info); -void zgetrf_(const int* m, const int* n, std::complex* a, const int* lda, int* ipiv, int* info); - -void sgetri_(const int* n, float* A, const int* lda, const int* ipiv, float* work, const int* lwork, int* info); -void dgetri_(const int* n, double* A, const int* lda, const int* ipiv, double* work, const int* lwork, int* info); -void cgetri_(const int* n, std::complex* A, const int* lda, const int* ipiv, std::complex* work, const int* lwork, int* info); -void zgetri_(const int* n, std::complex* A, const int* lda, const int* ipiv, std::complex* work, const int* lwork, int* info); - -void sgetrs_(const char* trans, const int* n, const int* nrhs, const float* A, const int* lda, const int* ipiv, float* B, const int* ldb, int* info); -void dgetrs_(const char* trans, const int* n, const int* nrhs, const double* A, const int* lda, const int* ipiv, double* B, const int* ldb, int* info); -void cgetrs_(const char* trans, const int* n, const int* nrhs, const std::complex* A, const int* lda, const int* ipiv, std::complex* B, const int* ldb, int* info); -void zgetrs_(const char* trans, const int* n, const int* nrhs, const std::complex* A, const int* lda, const int* ipiv, std::complex* B, const int* ldb, int* info); -} - -// Class LapackConnector provide the connector to fortran lapack routine. -// The entire function in this class are static and inline function. -// Usage example: LapackConnector::functionname(parameter list). -namespace container { -namespace lapackConnector -{ -static inline -int ilaenv( int ispec, const char *name,const char *opts,const int n1,const int n2, - const int n3,const int n4) -{ - const int nb = ilaenv_(&ispec, name, opts, &n1, &n2, &n3, &n4); - return nb; -} -// wrap function of fortran lapack routine zhegvd. (pointer version) -static inline -void dngvd(const int itype, const char jobz, const char uplo, const int n, - float* a, const int lda, - const float* b, const int ldb, float* w, - float* work, int lwork, float* rwork, int lrwork, - int* iwork, int liwork, int info) -{ - // call the fortran routine - ssygvd_(&itype, &jobz, &uplo, &n, - a, &lda, b, &ldb, w, - work, &lwork, - iwork, &liwork, &info); -} -// wrap function of fortran lapack routine zhegvd. -static inline -void dngvd(const int itype, const char jobz, const char uplo, const int n, - double* a, const int lda, - const double* b, const int ldb, double* w, - double* work, int lwork, double* rwork, int lrwork, - int* iwork, int liwork, int info) -{ - // call the fortran routine - dsygvd_(&itype, &jobz, &uplo, &n, - a, &lda, b, &ldb, w, - work, &lwork, - iwork, &liwork, &info); -} -static inline -void dngvd(const int itype, const char jobz, const char uplo, const int n, - std::complex* a, const int lda, - const std::complex* b, const int ldb, float* w, - std::complex* work, int lwork, float* rwork, int lrwork, - int* iwork, int liwork, int info) -{ - // call the fortran routine - chegvd_(&itype, &jobz, &uplo, &n, - a, &lda, b, &ldb, w, - work, &lwork, rwork, &lrwork, - iwork, &liwork, &info); -} -// wrap function of fortran lapack routine zhegvd. -static inline -void dngvd(const int itype, const char jobz, const char uplo, const int n, - std::complex* a, const int lda, - const std::complex* b, const int ldb, double* w, - std::complex* work, int lwork, double* rwork, int lrwork, - int* iwork, int liwork, int info) -{ - // call the fortran routine - zhegvd_(&itype, &jobz, &uplo, &n, - a, &lda, b, &ldb, w, - work, &lwork, rwork, &lrwork, - iwork, &liwork, &info); -} - -// wrap function of fortran lapack routine zheevx. -static inline -void dnevx( const int itype, const char jobz, const char range, const char uplo, const int n, - float* a, const int lda, - const float vl, const float vu, const int il, const int iu, const float abstol, - const int m, float* w, float* z, const int ldz, - float* work, const int lwork, float* rwork, int* iwork, int* ifail, int info) -{ - ssyevx_(&jobz, &range, &uplo, &n, - a, &lda, &vl, &vu, &il, &iu, - &abstol, &m, w, z, &ldz, - work, &lwork, rwork, iwork, ifail, &info); -} -// wrap function of fortran lapack routine zheevx. -static inline -void dnevx( const int itype, const char jobz, const char range, const char uplo, const int n, - double* a, const int lda, - const double vl, const double vu, const int il, const int iu, const double abstol, - const int m, double* w, double* z, const int ldz, - double* work, const int lwork, double* rwork, int* iwork, int* ifail, int info) -{ - dsyevx_(&jobz, &range, &uplo, &n, - a, &lda, &vl, &vu, &il, &iu, - &abstol, &m, w, z, &ldz, - work, &lwork, rwork, iwork, ifail, &info); -} -static inline -void dnevx( const int itype, const char jobz, const char range, const char uplo, const int n, - std::complex* a, const int lda, - const float vl, const float vu, const int il, const int iu, const float abstol, - const int m, float* w, std::complex* z, const int ldz, - std::complex* work, const int lwork, float* rwork, int* iwork, int* ifail, int info) -{ - cheevx_(&jobz, &range, &uplo, &n, - a, &lda, &vl, &vu, &il, &iu, - &abstol, &m, w, z, &ldz, - work, &lwork, rwork, iwork, ifail, &info); -} -// wrap function of fortran lapack routine zheevx. -static inline -void dnevx( const int itype, const char jobz, const char range, const char uplo, const int n, - std::complex* a, const int lda, - const double vl, const double vu, const int il, const int iu, const double abstol, - const int m, double* w, std::complex* z, const int ldz, - std::complex* work, const int lwork, double* rwork, int* iwork, int* ifail, int info) -{ - zheevx_(&jobz, &range, &uplo, &n, - a, &lda, &vl, &vu, &il, &iu, - &abstol, &m, w, z, &ldz, - work, &lwork, rwork, iwork, ifail, &info); -} - -static inline -void dnevd(const char jobz, const char uplo, const int n, - float* a, const int lda, float* w, - float* work, int lwork, float* rwork, int lrwork, - int* iwork, int liwork, int& info) -{ - // call the fortran routine - ssyevd_( &jobz, &uplo, &n, - a, &lda, w, - work, &lwork, - iwork, &liwork, &info); -} -// wrap function of fortran lapack routine zhegvd. -static inline -void dnevd(const char jobz, const char uplo, const int n, - double* a, const int lda, double* w, - double* work, int lwork, double* rwork, int lrwork, - int* iwork, int liwork, int& info) -{ - // call the fortran routine - dsyevd_( &jobz, &uplo, &n, - a, &lda, w, - work, &lwork, - iwork, &liwork, &info); -} -static inline -void dnevd(const char jobz, const char uplo, const int n, - std::complex* a, const int lda, float* w, - std::complex* work, int lwork, float* rwork, int lrwork, - int* iwork, int liwork, int& info) -{ - // call the fortran routine - cheevd_( &jobz, &uplo, &n, - a, &lda, w, - work, &lwork, rwork, &lrwork, - iwork, &liwork, &info); -} -// wrap function of fortran lapack routine zhegvd. -static inline -void dnevd(const char jobz, const char uplo, const int n, - std::complex* a, const int lda, double* w, - std::complex* work, int lwork, double* rwork, int lrwork, - int* iwork, int liwork, int& info) -{ - // call the fortran routine - zheevd_( &jobz, &uplo, &n, - a, &lda, w, - work, &lwork, rwork, &lrwork, - iwork, &liwork, &info); -} - -static inline -void potrf( const char &uplo, const int &n, float* A, const int &lda, int &info ) -{ - spotrf_(&uplo, &n, A, &lda, &info ); -} -static inline -void potrf( const char &uplo, const int &n, double* A, const int &lda, int &info ) -{ - dpotrf_(&uplo, &n, A, &lda, &info ); -} -static inline -void potrf( const char &uplo, const int &n, std::complex* A, const int &lda, int &info ) -{ - cpotrf_(&uplo, &n, A, &lda, &info ); -} -static inline -void potrf( const char &uplo, const int &n, std::complex* A, const int &lda, int &info ) -{ - zpotrf_( &uplo, &n, A, &lda, &info ); -} - -static inline -void trtri( const char &uplo, const char &diag, const int &n, float* A, const int &lda, int &info ) -{ - strtri_( &uplo, &diag, &n, A, &lda, &info); -} -static inline -void trtri( const char &uplo, const char &diag, const int &n, double* A, const int &lda, int &info) -{ - dtrtri_( &uplo, &diag, &n, A, &lda, &info); -} -static inline -void trtri( const char &uplo, const char &diag, const int &n, std::complex* A, const int &lda, int &info ) -{ - ctrtri_( &uplo, &diag, &n, A, &lda, &info); -} -static inline -void trtri( const char &uplo, const char &diag, const int &n, std::complex* A, const int &lda, int &info) -{ - ztrtri_( &uplo, &diag, &n, A, &lda, &info); -} - -static inline -void getrf(const int m, const int n, float* A, const int lda, int* ipiv, int &info) -{ - sgetrf_(&m, &n, A, &lda, ipiv, &info); -} -static inline -void getrf(const int m, const int n, double* A, const int lda, int* ipiv, int &info) -{ - dgetrf_(&m, &n, A, &lda, ipiv, &info); -} -static inline -void getrf(const int m, const int n, std::complex* A, const int lda, int* ipiv, int &info) -{ - cgetrf_(&m, &n, A, &lda, ipiv, &info); -} -static inline -void getrf(const int m, const int n, std::complex* A, const int lda, int* ipiv, int &info) -{ - zgetrf_(&m, &n, A, &lda, ipiv, &info); -} - -static inline -void getri(const int n, float* A, const int lda, const int* ipiv, float* work, const int lwork, int& info) -{ - sgetri_(&n, A, &lda, ipiv, work, &lwork, &info); -} -static inline -void getri(const int n, double* A, const int lda, const int* ipiv, double* work, const int lwork, int& info) -{ - dgetri_(&n, A, &lda, ipiv, work, &lwork, &info); -} -static inline -void getri(const int n, std::complex* A, const int lda, const int* ipiv, std::complex* work, const int lwork, int& info) -{ - cgetri_(&n, A, &lda, ipiv, work, &lwork, &info); -} -static inline -void getri(const int n, std::complex* A, const int lda, const int* ipiv, std::complex* work, const int lwork, int& info) -{ - zgetri_(&n, A, &lda, ipiv, work, &lwork, &info); -} - -static inline -void getrs(const char& trans, const int n, const int nrhs, float* A, const int lda, const int* ipiv, float* B, const int ldb, int& info) -{ - sgetrs_(&trans, &n, &nrhs, A, &lda, ipiv, B, &ldb, &info); -} -static inline -void getrs(const char& trans, const int n, const int nrhs, double* A, const int lda, const int* ipiv, double* B, const int ldb, int& info) -{ - dgetrs_(&trans, &n, &nrhs, A, &lda, ipiv, B, &ldb, &info); -} -static inline -void getrs(const char& trans, const int n, const int nrhs, std::complex* A, const int lda, const int* ipiv, std::complex* B, const int ldb, int& info) -{ - cgetrs_(&trans, &n, &nrhs, A, &lda, ipiv, B, &ldb, &info); -} -static inline -void getrs(const char& trans, const int n, const int nrhs, std::complex* A, const int lda, const int* ipiv, std::complex* B, const int ldb, int& info) -{ - zgetrs_(&trans, &n, &nrhs, A, &lda, ipiv, B, &ldb, &info); -} - -} // namespace lapackConnector -} // namespace container - -#endif // BASE_THIRD_PARTY_LAPACK_H_ diff --git a/source/module_base/module_container/base/utils/array_ref.h b/source/module_base/module_container/base/utils/array_ref.h deleted file mode 100644 index 2af73ae970..0000000000 --- a/source/module_base/module_container/base/utils/array_ref.h +++ /dev/null @@ -1,114 +0,0 @@ -#ifndef BASE_UTILS_ARRAY_REF_H_ -#define BASE_UTILS_ARRAY_REF_H_ - -#include -#include -#include - -namespace base { -namespace utils { - -template -class array_ref final { - - private: - T* data_; - size_t length_; - - public: - /* implicit */ constexpr array_ref() : data_(nullptr), length_(0) {} - /* implicit */ constexpr array_ref(T* data, size_t length) : data_(data), length_(length) {} - /* implicit */ constexpr array_ref(T* begin, T* end) : data_(begin), length_(end - begin) {} - explicit constexpr array_ref(const T& item) : data_(&item), length_(1) {} - - // Construct from a std::vector. - template - /* implicit */ array_ref(const std::vector& vec) - : data_(vec.data()), length_(vec.size()) { - static_assert( - !std::is_same::value, - "array_ref cannot be constructed from a std::vector bitfield."); - } - - // Construct from a std::array. - template - /* implicit */ constexpr array_ref(const std::array& arr) : data_(arr.data()), length_(N) {} - - // Construct from a std::initializer_list. - /* implicit */ constexpr array_ref(const std::initializer_list& list) - : data_(list.begin()), length_(list.size()) {} - - constexpr const T* begin() const { return data_; } - constexpr const T* end() const { return data_ + length_; } - - constexpr bool empty() const { - return length_ == 0; - } - - constexpr const T* data() const { - return data_; - } - - constexpr size_t size() const { - return length_; - } - - constexpr const T& front() const { - return data_[0]; - } - - constexpr const T& back() const { - return data_[length_ - 1]; - } - - constexpr bool equals(const array_ref& rhs) const { - return length_ == rhs.size() && std::equal(begin(), end(), rhs.begin()); - } - - constexpr const T& operator[](size_t index) const { - return data_[index]; - } - - template - typename std::enable_if::value, array_ref>::type& - operator=(U&& Temporary) = delete; - - template - typename std::enable_if::value, array_ref>::type& - operator=(std::initializer_list) = delete; - - std::vector vec() const { - return std::vector(data_, data_ + length_); - } -}; - -template -std::ostream& operator<<(std::ostream& out, array_ref arr) { - int ii = 0; - out << "["; - for (const auto& item : arr) { - if (ii++ > 0) - out << ", "; - out << item; - } - out << "]"; - return out; -} - -template -bool operator==(array_ref a1, array_ref a2) { - return a1.equals(a2); -} - -template -bool operator!=(array_ref a1, array_ref a2) { - return !a1.equals(a2); -} - - -} // namespace utils -} // namespace base - -using int_array_ref = ::base::utils::array_ref; - -#endif // BASE_UTILS_ARRAY_REF_H_ \ No newline at end of file diff --git a/source/module_base/module_container/base/utils/gtest.h b/source/module_base/module_container/base/utils/gtest.h deleted file mode 100644 index 4ec7ecb118..0000000000 --- a/source/module_base/module_container/base/utils/gtest.h +++ /dev/null @@ -1,57 +0,0 @@ -#ifndef BASE_UTILS_GTEST_H_ -#define BASE_UTILS_GTEST_H_ -#include -#include -#include - -namespace base { -namespace utils { - -#if __CUDA || __ROCM -using ComplexTypes = ::testing::Types< - std::tuple, ct::DEVICE_CPU>, std::tuple, ct::DEVICE_GPU>, - std::tuple, ct::DEVICE_CPU>, std::tuple, ct::DEVICE_GPU>>; -using Types = ::testing::Types< - std::tuple, std::tuple, - std::tuple, std::tuple, - std::tuple, ct::DEVICE_CPU>, std::tuple, ct::DEVICE_GPU>, - std::tuple, ct::DEVICE_CPU>, std::tuple, ct::DEVICE_GPU>>; -#else -using ComplexTypes = ::testing::Types< - std::tuple, ct::DEVICE_CPU>, - std::tuple, ct::DEVICE_CPU>>; -using Types = ::testing::Types< - std::tuple, - std::tuple, - std::tuple, ct::DEVICE_CPU>, - std::tuple, ct::DEVICE_CPU>>; -#endif - -static inline void init_blas_handle() { - #if __CUDA || __ROCM - ct::kernels::createGpuBlasHandle(); - #endif -} - -static inline void delete_blas_handle() { - #if __CUDA || __ROCM - ct::kernels::destroyGpuBlasHandle(); - #endif -} - -static inline void init_cusolver_handle() { - #if __CUDA || __ROCM - ct::kernels::createGpuSolverHandle(); - #endif -} - -static inline void delete_cusolver_handle() { - #if __CUDA || __ROCM - ct::kernels::destroyGpuSolverHandle(); - #endif -} - -} // namespace utils -} // namespace base - -#endif // BASE_UTILS_GTEST_H_ \ No newline at end of file diff --git a/source/module_base/module_container/base/utils/logging.h b/source/module_base/module_container/base/utils/logging.h deleted file mode 100644 index 7d45105774..0000000000 --- a/source/module_base/module_container/base/utils/logging.h +++ /dev/null @@ -1,22 +0,0 @@ -#ifndef BASE_CORE_LOGGING_H_ -#define BASE_CORE_LOGGING_H_ - -#include - -namespace base { -namespace utils { - -// Note while in the calling situation of check_msg_impl and check_exit_impl, -// the check has been failed, so we don't need to release the char* msg -inline static const char* check_msg_impl(const char* msg) { - return msg; -} - -inline static void check_exit_impl(const char* func, const char* file, uint32_t line, const char* msg) { - fprintf(stderr, "Fatal error in function %s, file %s, line %u, \nwith message: \n\t\t%s\n", func, file, line, msg); - std::abort(); -} - -} // namespace logging -} // namespace base -#endif // BASE_CORE_LOGGING_H_ \ No newline at end of file diff --git a/source/module_base/module_container/test/CMakeLists.txt b/source/module_base/module_container/test/CMakeLists.txt deleted file mode 100644 index 9a9505870b..0000000000 --- a/source/module_base/module_container/test/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -remove_definitions(-D__MPI) - -AddTest( - TARGET MODULE_BASE_CONTAINER_Unittests - LIBS parameter container base device ${math_libs} - SOURCES tensor_test.cpp tensor_shape_test.cpp allocator_test.cpp - tensor_buffer_test.cpp tensor_map_test.cpp - tensor_utils_test.cpp tensor_accessor_test.cpp -) diff --git a/source/module_base/module_container/test/allocator_test.cpp b/source/module_base/module_container/test/allocator_test.cpp deleted file mode 100644 index 980a5e8071..0000000000 --- a/source/module_base/module_container/test/allocator_test.cpp +++ /dev/null @@ -1,38 +0,0 @@ -#include -#include - -#include -#include -#include - - -TEST(CPUAllocator, AllocateAndFree) { - base::core::CPUAllocator alloc; - // Allocate memory of size 100. - void* ptr = alloc.allocate(100); - EXPECT_NE(nullptr, ptr); - alloc.free(ptr); - - // Allocate memory of size 200 with alignment 16. - ptr = alloc.allocate(200, 16); - EXPECT_NE(nullptr, ptr); - alloc.free(ptr); - - // Allocate memory of size 200 with alignment 16. - ptr = alloc.allocate(0, 0); - EXPECT_EQ(nullptr, ptr); -} - -TEST(CPUAllocator, AllocatedSize) { - base::core::CPUAllocator alloc; - // Allocate memory of size 100 and check its size. - void* ptr = alloc.allocate(100); - EXPECT_NE(nullptr, ptr); - alloc.free(ptr); -} - -TEST(CPUAllocator, GetDeviceType) { - base::core::CPUAllocator alloc; - EXPECT_EQ(container::DeviceType::CpuDevice, - alloc.GetDeviceType()); -} \ No newline at end of file diff --git a/source/module_base/module_container/test/tensor_accessor_test.cpp b/source/module_base/module_container/test/tensor_accessor_test.cpp deleted file mode 100644 index f04918e43f..0000000000 --- a/source/module_base/module_container/test/tensor_accessor_test.cpp +++ /dev/null @@ -1,43 +0,0 @@ -#include -#include // Include the header file you provided - -namespace container { - -// Test fixture to set up common data for tests -class TensorAccessorTest : public testing::Test { -protected: - // Common setup code - TensorAccessorTest() = default; - - // Common cleanup code - virtual ~TensorAccessorTest() = default; -}; - -// Test the TensorAccessor class -TEST_F(TensorAccessorTest, TensorAccessorTest) { - // Test data - int data[6] = {1, 2, 3, 4, 5, 6}; - int sizes[3] = {2, 3, 1}; - int strides[3] = {3, 1, 1}; - - TensorAccessor accessor(data, sizes, strides); - - // Test operator[] for 1D TensorAccessor - EXPECT_EQ(accessor[0][0][0], 1); - EXPECT_EQ(accessor[0][1][0], 2); - EXPECT_EQ(accessor[0][2][0], 3); - EXPECT_EQ(accessor[1][0][0], 4); - EXPECT_EQ(accessor[1][1][0], 5); - EXPECT_EQ(accessor[1][2][0], 6); - - // Test operator[] for 2D TensorAccessor - auto sub_accessor_1 = accessor[1]; - EXPECT_EQ(sub_accessor_1[0][0], 4); - EXPECT_EQ(sub_accessor_1[1][0], 5); - EXPECT_EQ(sub_accessor_1[2][0], 6); - - auto sub_accessor_2 = accessor[1][0]; - EXPECT_EQ(sub_accessor_2[0], 4); -} - -} // namespace container diff --git a/source/module_base/module_container/test/tensor_buffer_test.cpp b/source/module_base/module_container/test/tensor_buffer_test.cpp deleted file mode 100644 index a533670911..0000000000 --- a/source/module_base/module_container/test/tensor_buffer_test.cpp +++ /dev/null @@ -1,85 +0,0 @@ -#include - -#include -#include - -// Test the GetAllocatedBytes() method. -TEST(TensorBuffer, GetAllocatedBytes) { - // Create an allocator and allocate memory for a TensorBuffer. - base::core::Allocator* alloc = new base::core::CPUAllocator(); - const size_t buffer_size = 100; - - // Create a TensorBuffer. - container::TensorBuffer tensor_buffer(alloc, 100); - - // Check the allocator - EXPECT_EQ(alloc, tensor_buffer.allocator()); - - // Check the DeviceType - EXPECT_EQ(container::DeviceType::CpuDevice, tensor_buffer.GetDeviceType()); - - // Check the size of the buffer. - EXPECT_EQ(buffer_size, tensor_buffer.GetAllocatedBytes()); -} - -// Test the resize() method. -TEST(TensorBuffer, resize) { - // Create an allocator and allocate memory for a TensorBuffer. - base::core::Allocator* alloc = new base::core::CPUAllocator(); - const size_t initial_buffer_size = 100; - - // Create a TensorBuffer. - container::TensorBuffer tensor_buffer(alloc, initial_buffer_size); - - // Check the allocator - EXPECT_EQ(alloc, tensor_buffer.allocator()); - - // Check the DeviceType - EXPECT_EQ(container::DeviceType::CpuDevice, tensor_buffer.GetDeviceType()); - - // Resize the buffer. - const size_t new_buffer_size = 200; - tensor_buffer.resize(new_buffer_size); - - // Free the memory. - // auto free by the destructor - // alloc.free(buffer); -} - -// Test the root_buffer() method. -TEST(TensorBuffer, root_buffer) { - // Create an allocator and allocate memory for a TensorBuffer. - base::core::Allocator* alloc = new base::core::CPUAllocator(); - const size_t buffer_size = 100; - - // Create a root TensorBuffer. - container::TensorBuffer root_buffer(alloc, buffer_size); - - // Check the allocator - EXPECT_EQ(alloc, root_buffer.allocator()); - - // Check the DeviceType - EXPECT_EQ(container::DeviceType::CpuDevice, root_buffer.GetDeviceType()); - - // Check that the sub-buffer's root buffer is correct. - EXPECT_EQ(&root_buffer, root_buffer.root_buffer()); - - // Free the memory. - // alloc.free(buffer); -} - -TEST(TensorBuffer, empty_allocator) { - // Create an allocator and allocate memory for a TensorBuffer. - base::core::CPUAllocator alloc; - const size_t buffer_size = 100; - void* buffer = alloc.allocate(buffer_size); - - // Create a root TensorBuffer. - container::TensorBuffer root_buffer(buffer); - - // Check the DeviceType - EXPECT_EQ(container::DeviceType::UnKnown, root_buffer.GetDeviceType()); - - // Free the memory. - alloc.free(buffer); -} \ No newline at end of file diff --git a/source/module_base/module_container/test/tensor_map_test.cpp b/source/module_base/module_container/test/tensor_map_test.cpp deleted file mode 100644 index 77a2a60897..0000000000 --- a/source/module_base/module_container/test/tensor_map_test.cpp +++ /dev/null @@ -1,29 +0,0 @@ -#include -#include - -#include - -TEST(TensorMap, Constructor) { - // Test reference constructor - std::vector vec{1.0, 2.0, 3.0}; - container::TensorMap t1(&vec[0], container::DataType::DT_FLOAT, container::DeviceType::CpuDevice, container::TensorShape({1, 3})); - EXPECT_EQ(t1.data_type(), container::DataType::DT_FLOAT); - EXPECT_EQ(t1.device_type(), container::DeviceType::CpuDevice); - EXPECT_EQ(t1.shape().dims(), std::vector({1, 3})); - EXPECT_EQ(t1.NumElements(), 3); - EXPECT_EQ(t1.data(), vec.data()); - - container::TensorMap t2(&vec[0], t1, container::TensorShape({1, 3})); - EXPECT_EQ(t2.data_type(), container::DataType::DT_FLOAT); - EXPECT_EQ(t2.device_type(), container::DeviceType::CpuDevice); - EXPECT_EQ(t2.shape().dims(), std::vector({1, 3})); - EXPECT_EQ(t2.NumElements(), 3); - EXPECT_EQ(t2.data(), vec.data()); - - container::TensorMap t3(&vec[0], t2); - EXPECT_EQ(t3.data_type(), container::DataType::DT_FLOAT); - EXPECT_EQ(t3.device_type(), container::DeviceType::CpuDevice); - EXPECT_EQ(t3.shape().dims(), std::vector({1, 3})); - EXPECT_EQ(t3.NumElements(), 3); - EXPECT_EQ(t3.data(), vec.data()); -} \ No newline at end of file diff --git a/source/module_base/module_container/test/tensor_shape_test.cpp b/source/module_base/module_container/test/tensor_shape_test.cpp deleted file mode 100644 index 14944d9c7b..0000000000 --- a/source/module_base/module_container/test/tensor_shape_test.cpp +++ /dev/null @@ -1,80 +0,0 @@ -#include - -#include - - -/** - * @brief Test cases for constructors of container::TensorShape class. - */ -TEST(TensorShape, Constructor) { - // Test default constructor - container::TensorShape shape1; - EXPECT_EQ(shape1.ndim(), 0); - - // Test initializer_list constructor - container::TensorShape shape2({2, 3, 4}); - EXPECT_EQ(shape2.ndim(), 3); - EXPECT_EQ(shape2.dim_size(0), 2); - EXPECT_EQ(shape2.dim_size(1), 3); - EXPECT_EQ(shape2.dim_size(2), 4); - - // Test vector constructor - std::vector dims = {5, 6}; - container::TensorShape shape3(dims); - EXPECT_EQ(shape3.ndim(), 2); - EXPECT_EQ(shape3.dim_size(0), 5); - EXPECT_EQ(shape3.dim_size(1), 6); -} - -/** - * @brief Test cases for size manipulation functions of container::TensorShape class. - */ -TEST(TensorShape, SizeManipulation) { - // Test add_dim and dim_size - container::TensorShape shape({2, 3}); - shape.add_dim(4); - EXPECT_EQ(shape.ndim(), 3); - EXPECT_EQ(shape.dim_size(0), 2); - EXPECT_EQ(shape.dim_size(1), 3); - EXPECT_EQ(shape.dim_size(2), 4); - - // Test remove_dim - shape.remove_dim(1); - EXPECT_EQ(shape.ndim(), 2); - EXPECT_EQ(shape.dim_size(0), 2); - EXPECT_EQ(shape.dim_size(1), 4); - - // Test set_dim_size - shape.set_dim_size(1, 5); - EXPECT_EQ(shape.dim_size(1), 5); - - // Test NumElements - EXPECT_EQ(shape.NumElements(), 10); -} - -/** - * @brief Test cases for comparison operators of container::TensorShape class. - */ -TEST(TensorShape, Comparison) { - container::TensorShape shape1({2, 3, 4}); - container::TensorShape shape2({2, 3, 4}); - container::TensorShape shape3({3, 3, 4}); - - // Test == operator - EXPECT_EQ(shape1, shape2); - EXPECT_NE(shape1, shape3); - - // Test != operator - EXPECT_NE(shape1, shape3); - EXPECT_NE(shape2, shape3); -} - -/** - * @brief Test cases for output stream operator of container::TensorShape class. - */ -TEST(TensorShape, Output) { - container::TensorShape shape({2, 3, 4}); - std::stringstream ss; - ss << shape; - EXPECT_EQ(ss.str(), "[2,3,4]"); -} diff --git a/source/module_base/module_container/test/tensor_test.cpp b/source/module_base/module_container/test/tensor_test.cpp deleted file mode 100644 index 803ac3d382..0000000000 --- a/source/module_base/module_container/test/tensor_test.cpp +++ /dev/null @@ -1,536 +0,0 @@ -#include -#include - -#include -#include - -namespace container { - -TEST(Tensor, Constructor) { - // Test constructor with default allocator - container::Tensor t1(container::DataType::DT_FLOAT, container::TensorShape({2, 3})); - EXPECT_EQ(t1.data_type(), container::DataType::DT_FLOAT); - EXPECT_EQ(t1.device_type(), container::DeviceType::CpuDevice); - // EXPECT_EQ(t1.shape().dims(), std::vector({2, 3})); - EXPECT_EQ(t1.NumElements(), 6); - -#if __CUDA || __ROCM - // Test constructor with specified device type - container::Tensor t2(container::DataType::DT_DOUBLE, container::DeviceType::GpuDevice, - container::TensorShape({3, 4})); - EXPECT_EQ(t2.data_type(), container::DataType::DT_DOUBLE); - EXPECT_EQ(t2.device_type(), container::DeviceType::GpuDevice); - EXPECT_EQ(t2.shape().dims(), std::vector({3, 4})); - EXPECT_EQ(t2.NumElements(), 12); -#endif - - // Test copy constructor - container::Tensor t3 = t1; - EXPECT_EQ(t3.data_type(), container::DataType::DT_FLOAT); - EXPECT_EQ(t3.device_type(), container::DeviceType::CpuDevice); - // EXPECT_EQ(t3.shape().dims(), std::vector({2, 3})); - EXPECT_EQ(t3.NumElements(), 6); - EXPECT_NE(t3.data(), t1.data()); - - // Test reference constructor - std::vector vec{1.0, 2.0, 3.0}; - container::TensorMap t4(&vec[0], container::DataType::DT_FLOAT, container::DeviceType::CpuDevice, - container::TensorShape({1, 3})); - EXPECT_EQ(t4.data_type(), container::DataType::DT_FLOAT); - EXPECT_EQ(t4.device_type(), container::DeviceType::CpuDevice); - // EXPECT_EQ(t4.shape().dims(), std::vector({1, 3})); - EXPECT_EQ(t4.NumElements(), 3); - EXPECT_EQ(t4.data(), vec.data()); -} - - -TEST(Tensor, GetDataPointer) { - // Create a 1x1 float tensor with data [1.0, 2.0, 3.0, 4.0]. - container::Tensor t1(container::DataType::DT_INT, container::TensorShape({1, 1})); - container::Tensor t2(container::DataType::DT_INT64, container::TensorShape({1, 1})); - container::Tensor t3(container::DataType::DT_FLOAT, container::TensorShape({1, 1})); - container::Tensor t4(container::DataType::DT_DOUBLE, container::TensorShape({1, 1})); - container::Tensor t5(container::DataType::DT_COMPLEX, container::TensorShape({1, 1})); - container::Tensor t6(container::DataType::DT_COMPLEX_DOUBLE, container::TensorShape({1, 1})); - t1.data()[0] = 1; - t2.data()[0] = 1; - t3.data()[0] = 1.0f; - t4.data()[0] = 1.0f; - t5.data>()[0] = {1.0f, 0.0f}; - t6.data>()[0] = {1.0f, 0.0f}; - // Get a pointer to the data buffer. - void *ptr1 = t1.data(); - void *ptr2 = t2.data(); - void *ptr3 = t3.data(); - void *ptr4 = t4.data(); - void *ptr5 = t5.data(); - void *ptr6 = t6.data(); - // Ensure that the returned pointer is not null and points to the expected data. - EXPECT_NE(ptr1, nullptr); - EXPECT_NE(ptr2, nullptr); - EXPECT_NE(ptr3, nullptr); - EXPECT_NE(ptr4, nullptr); - EXPECT_NE(ptr5, nullptr); - EXPECT_NE(ptr6, nullptr); - EXPECT_EQ(static_cast(ptr1)[0], 1); - EXPECT_EQ(static_cast(ptr2)[0], 1); - EXPECT_EQ(static_cast(ptr3)[0], 1.0f); - EXPECT_EQ(static_cast(ptr4)[0], 1.0f); - - EXPECT_EQ(static_cast *>(ptr5)[0].real(), 1.0); - EXPECT_EQ(static_cast *>(ptr5)[0].imag(), 0.0); - EXPECT_EQ(static_cast *>(ptr6)[0].real(), 1.0); - EXPECT_EQ(static_cast *>(ptr6)[0].imag(), 0.0); -} - - -TEST(Tensor, GetDataPointerDeathTest) { - ::testing::FLAGS_gtest_death_test_style = "threadsafe"; - // Try to get a typed pointer with a type that does not match the tensor's data type. - // This should cause an error message to be printed and the program to exit with failure. - container::Tensor tensor(container::DataType::DT_FLOAT, container::TensorShape({1, 1})); - // Verify that requesting data with an unsupported data type causes the program to exit. - ASSERT_EXIT( - tensor.data(), // Unsupported data type - ::testing::ExitedWithCode(EXIT_FAILURE), - "Tensor data type does not match requested type." - ); -} - -TEST(Tensor, SizeOfType) { - // Test DT_FLOAT - EXPECT_EQ(container::Tensor::SizeOfType(container::DataType::DT_FLOAT), sizeof(float)); - - // Test DT_INT - EXPECT_EQ(container::Tensor::SizeOfType(container::DataType::DT_INT), sizeof(int32_t)); - - // Test DT_INT64 - EXPECT_EQ(container::Tensor::SizeOfType(container::DataType::DT_INT64), sizeof(int64_t)); - - // Test DT_DOUBLE - EXPECT_EQ(container::Tensor::SizeOfType(container::DataType::DT_DOUBLE), sizeof(double)); - - // Test DT_COMPLEX - EXPECT_EQ(container::Tensor::SizeOfType(container::DataType::DT_COMPLEX), sizeof(std::complex)); - - // Test DT_COMPLEX_DOUBLE - EXPECT_EQ(container::Tensor::SizeOfType(container::DataType::DT_COMPLEX_DOUBLE), sizeof(std::complex)); - -} - -TEST(Tensor, SizeOfTypeDeathTest) { - ::testing::FLAGS_gtest_death_test_style = "threadsafe"; - // Verify that requesting data with an unsupported data type causes the program to exit. - ASSERT_EXIT( - container::Tensor::SizeOfType(container::DataType::DT_INVALID), - ::testing::ExitedWithCode(EXIT_FAILURE), - "Unsupported data type!" - ); -} - -TEST(Tensor, ToDeviceAndSetZero) { - // Create tensor on CPU - container::Tensor tensor(container::DataType::DT_FLOAT, container::DeviceType::CpuDevice, {2, 3}); - - // Set zero test - tensor.zero(); - - // Create tensor on GPU - container::Tensor cpu_tensor = tensor.to_device(); - - // Check device type - EXPECT_EQ(cpu_tensor.device_type(), container::DeviceType::CpuDevice); - - // Check data type - EXPECT_EQ(cpu_tensor.data_type(), container::DataType::DT_FLOAT); - - // Check shape - EXPECT_EQ(cpu_tensor.shape(), tensor.shape()); - - // Check data - for (int ii = 0; ii < cpu_tensor.NumElements(); ii++) { - EXPECT_EQ(cpu_tensor.data()[ii], 0.0); - } -} - -TEST(Tensor, Cast) { - // Create a tensor object with float data type and device CPU - container::Tensor t(container::DataType::DT_COMPLEX_DOUBLE, container::DeviceType::CpuDevice, {2, 3}); - t.data>()[0] = {1.0, 0.0}; - t.data>()[1] = {2.0, 0.0}; - t.data>()[2] = {3.0, 0.0}; - t.data>()[3] = {4.0, 0.0}; - t.data>()[4] = {5.0, 0.0}; - t.data>()[5] = {6.0, 0.0}; - - // Cast the tensor to integer data type - container::Tensor t_float = t.cast>(); - - // Check that the data type and device of the output tensor are correct - EXPECT_EQ(t_float.data_type(), container::DataType::DT_COMPLEX); - EXPECT_EQ(t_float.device_type(), container::DeviceType::CpuDevice); - - // Check that the shape of the output tensor is correct - EXPECT_EQ(t_float.shape().dims(), std::vector({2, 3})); - - // Check that the data of the output tensor is correct - EXPECT_EQ(t_float.data>()[0].real(), 1.0); - EXPECT_EQ(t_float.data>()[0].imag(), 0.0); - EXPECT_EQ(t_float.data>()[1].real(), 2.0); - EXPECT_EQ(t_float.data>()[1].imag(), 0.0); - EXPECT_EQ(t_float.data>()[2].real(), 3.0); - EXPECT_EQ(t_float.data>()[2].imag(), 0.0); - EXPECT_EQ(t_float.data>()[3].real(), 4.0); - EXPECT_EQ(t_float.data>()[3].imag(), 0.0); - EXPECT_EQ(t_float.data>()[4].real(), 5.0); - EXPECT_EQ(t_float.data>()[4].imag(), 0.0); - EXPECT_EQ(t_float.data>()[5].real(), 6.0); - EXPECT_EQ(t_float.data>()[5].imag(), 0.0); -} - -// Tests the reshape() function of the Tensor class. -TEST(Tensor, Reshape) { - container::Tensor t(container::DataType::DT_FLOAT, container::DeviceType::CpuDevice, {2, 3, 4}); - container::TensorShape new_shape({-1, 8}); - ASSERT_NO_THROW(t.reshape(new_shape)); - EXPECT_EQ(t.shape().ndim(), 2); - EXPECT_EQ(t.shape().dim_size(0), 3); - EXPECT_EQ(t.shape().dim_size(1), 8); - - container::Tensor t1(container::DataType::DT_FLOAT, container::DeviceType::CpuDevice, {2, 3, 4}); - container::TensorShape new_shape1({2, 3, 4}); - ASSERT_NO_THROW(t1.reshape(new_shape1)); - EXPECT_EQ(t1.shape(), new_shape1); -} - -TEST(Tensor, GetValueAndInnerMostPtr) { - container::Tensor t(container::DataType::DT_INT, container::DeviceType::CpuDevice, {2, 2, 4}); - std::vector vec = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - EXPECT_EQ(t.shape().NumElements(), vec.size()); - memcpy(t.data(), vec.data(), sizeof(int) * vec.size()); - EXPECT_EQ(t.get_value(0, 0, 1), 2); - EXPECT_EQ(t.get_value(1, 1, 2), 15); - t.reshape({4, 4}); - - // check the inner_most_ptr meshod - auto row_ptr = t.inner_most_ptr(2); - EXPECT_EQ(row_ptr[0], 9); - EXPECT_EQ(row_ptr[3], 12); -} - -TEST(Tensor, ReshapeDeathTest) { - ::testing::FLAGS_gtest_death_test_style = "threadsafe"; - container::Tensor t(container::DataType::DT_FLOAT, container::DeviceType::CpuDevice, {2, 3, 4}); - container::TensorShape new_shape({-1, 8}); - new_shape.set_dim_size(1, -2); - EXPECT_THROW(t.reshape(new_shape), std::invalid_argument); - - container::Tensor t1(container::DataType::DT_FLOAT, container::DeviceType::CpuDevice, {2, 3, 4}); - container::TensorShape new_shape1({-1, 5}); - EXPECT_THROW(t1.reshape(new_shape1), std::invalid_argument); - - container::Tensor t2(container::DataType::DT_FLOAT, container::DeviceType::CpuDevice, {2, 3, 4}); - container::TensorShape new_shape2({-1, -1}); - EXPECT_THROW(t2.reshape(new_shape2), std::invalid_argument); - - container::Tensor t3(container::DataType::DT_FLOAT, container::DeviceType::CpuDevice, {2, 3, 4}); - container::TensorShape new_shape3({2, 7}); - EXPECT_THROW(t3.reshape(new_shape3), std::invalid_argument); -} - -// Tests the slice() function of the Tensor class. -TEST(Tensor, Slice) { - container::Tensor t(container::DataType::DT_FLOAT, container::DeviceType::CpuDevice, {2, 3}); - // fill with test data - for (int ii = 0; ii < t.NumElements(); ++ii) { - t.data()[ii] = ii; - } - // test the slice() function - container::Tensor output = t.slice({0, 0}, {2, 2}); - EXPECT_EQ(output.shape().ndim(), 2); - EXPECT_EQ(output.shape().dim_size(0), 2); - EXPECT_EQ(output.shape().dim_size(1), 2); - EXPECT_EQ(output.data()[0], 0.0f); - EXPECT_EQ(output.data()[1], 1.0f); - EXPECT_EQ(output.data()[2], 3.0f); - EXPECT_EQ(output.data()[3], 4.0f); - - // test error handling - container::Tensor t2(container::DataType::DT_FLOAT, container::DeviceType::CpuDevice, {2, 3}); - EXPECT_THROW(t2.slice({-1, 0}, {2, 2}), std::invalid_argument); - EXPECT_THROW(t2.slice({0, 0}, {2, 4}), std::invalid_argument); - EXPECT_THROW(t2.slice({0, 0, 0}, {2, 4, 3}), std::invalid_argument); - EXPECT_THROW(t2.slice({0, 0, 0, 0}, {2, 4, 3, 6}), std::invalid_argument); - - container::Tensor t3(container::DataType::DT_FLOAT, container::DeviceType::CpuDevice, {3}); - // fill with test data - for (int ii = 0; ii < t3.NumElements(); ++ii) { - t3.data()[ii] = ii; - } - // test the slice() function - container::Tensor output3 = t3.slice({0}, {1}); - EXPECT_EQ(output3.shape().ndim(), 1); - EXPECT_EQ(output3.shape().dim_size(0), 1); - EXPECT_EQ(output3.data()[0], 0.0f); - - container::Tensor t4(container::DataType::DT_FLOAT, container::DeviceType::CpuDevice, {3}); - // fill with test data - for (int ii = 0; ii < t4.NumElements(); ++ii) { - t4.data()[ii] = ii; - } - t4.reshape({1, 1, 3}); - // test the slice() function - container::Tensor output4 = t4.slice({0, 0, 0}, {1, 1, 2}); - EXPECT_EQ(output4.shape().ndim(), 3); - EXPECT_EQ(output4.shape().dim_size(2), 2); - EXPECT_EQ(output4.data()[0], 0.0f); -} - -TEST(Tensor, Buffer) { - // create a tensor of shape (2, 3) - container::TensorShape shape({2, 3}); - container::Tensor tensor(container::DataType::DT_FLOAT, container::DeviceType::CpuDevice, shape); - - // fill the tensor with some values - auto *data_ptr = tensor.data(); - for (int ii = 0; ii < tensor.NumElements(); ii++) { - data_ptr[ii] = static_cast(ii); - } - - // get the tensor buffer - const container::TensorBuffer &buffer = tensor.buffer(); - - // check if the data pointer is the same as the tensor data pointer - assert(buffer.data() == static_cast(data_ptr)); -} - -TEST(Tensor, Resize) { - container::Tensor t1(container::DataType::DT_FLOAT, container::TensorShape({2, 2})); - const float *data_ptr1 = t1.data(); - - container::TensorShape new_shape({3, 3}); - t1.resize(new_shape); - t1.zero(); - - // Check if the data type remains the same after resize - EXPECT_EQ(t1.data_type(), container::DataType::DT_FLOAT); - - // Check if the shape of the tensor object is updated - EXPECT_EQ(t1.shape(), new_shape); - - // Check if the data buffer of the tensor object is reallocated - EXPECT_NE(t1.data(), data_ptr1); - - // Check if the data buffer is correctly zeroed - const float *data_ptr2 = t1.data(); - for (int ii = 0; ii < new_shape.NumElements(); ++ii) { - EXPECT_FLOAT_EQ(data_ptr2[ii], 0.0); - } - - container::Tensor t2(container::DataType::DT_FLOAT, container::DeviceType::CpuDevice, {2, 3, 4}); - container::TensorShape new_shape2({2, 3, 4}); - ASSERT_NO_THROW(t2.resize(new_shape2)); -} - -TEST(Tensor, GetAllocatorDeathTest) { - ::testing::FLAGS_gtest_death_test_style = "threadsafe"; - container::Tensor t1(container::DataType::DT_FLOAT, container::TensorShape({2, 2})); - ASSERT_EXIT( - base::core::Allocator *alloc = container::Tensor::GetAllocator(container::DeviceType::UnKnown), - ::testing::ExitedWithCode(EXIT_FAILURE), - "Tensor device type unknown does not match requested type." - ); -} - -TEST(Tensor, OutputOperator) { - // Create a tensor of shape [2, 2] with random values - const int64_t num_elements = 4; - int *data1 = new int[num_elements]; - auto *data2 = new int64_t[num_elements]; - auto *data3 = new float[num_elements]; - auto *data4 = new double[num_elements]; - auto *data5 = new std::complex[num_elements]; - auto *data6 = new std::complex[num_elements]; - for (int ii = 0; ii < num_elements; ++ii) { - data1[ii] = static_cast(ii); - data2[ii] = static_cast(ii); - data3[ii] = static_cast(ii); - data4[ii] = static_cast(ii); - data5[ii] = std::complex{static_cast(ii), static_cast(ii)}; - data6[ii] = std::complex{static_cast(ii), static_cast(ii)}; - } - const container::TensorShape shape({2, 2}); - const container::TensorMap t1(data1, container::DataType::DT_INT, container::DeviceType::CpuDevice, shape); - const container::TensorMap t2(data2, container::DataType::DT_INT64, container::DeviceType::CpuDevice, shape); - const container::TensorMap t3(data3, container::DataType::DT_FLOAT, container::DeviceType::CpuDevice, shape); - const container::TensorMap t4(data4, container::DataType::DT_DOUBLE, container::DeviceType::CpuDevice, shape); - const container::TensorMap t5(data5, container::DataType::DT_COMPLEX, container::DeviceType::CpuDevice, shape); - const container::TensorMap t6(data6, container::DataType::DT_COMPLEX_DOUBLE, container::DeviceType::CpuDevice, - shape); - // Test if the output operator produces the expected output - std::ostringstream oss; - oss << t1 << t2 << t3 << t4 << t5 << t6; - const std::string expected_output = "Tensor(shape=[2,2], data_type=int32, device_type=cpu, owns_memory=0, buffer="; - EXPECT_TRUE(oss.str().find(expected_output) == 0); - - delete[] data1; -} - -// Test constructor and basic operations -TEST(Tensor, CopyFrom) { - // Create two tensors for testing - container::Tensor sourceTensor(DataType::DT_INT, DeviceType::CpuDevice, TensorShape({3, 2})); - container::Tensor destTensor(DataType::DT_FLOAT, DeviceType::CpuDevice, TensorShape({2, 3})); - - // Initialize data in the source tensor - int *sourceData = sourceTensor.data(); - for (int ii = 0; ii < sourceTensor.NumElements(); ++ii) { - sourceData[ii] = ii; - } - - // Perform the CopyFrom operation - bool result = destTensor.CopyFrom(sourceTensor); - - // Verify that the CopyFrom operation was successful - EXPECT_TRUE(result); - - // Check the properties of the destination tensor - EXPECT_EQ(destTensor.data_type(), DataType::DT_INT); - EXPECT_EQ(destTensor.device_type(), DeviceType::CpuDevice); - EXPECT_EQ(destTensor.shape(), TensorShape({3, 2})); - EXPECT_EQ(destTensor.NumElements(), 6); - - // Check that the data in the destination tensor matches the source tensor - int *destData = destTensor.data(); - for (int ii = 0; ii < destTensor.NumElements(); ++ii) { - EXPECT_EQ(destData[ii], ii); - } -} - -// Test constructor and basic operations -TEST(Tensor, CopyFromWithReshape) { - // Create two tensors for testing - container::Tensor sourceTensor(DataType::DT_INT, DeviceType::CpuDevice, TensorShape({2, 3})); - container::Tensor destTensor(DataType::DT_FLOAT, DeviceType::CpuDevice, TensorShape({3, 2})); - - // Initialize data in the source tensor - int* sourceData = sourceTensor.data(); - for (int ii = 0; ii < sourceTensor.NumElements(); ++ii) { - sourceData[ii] = ii; - } - - // Perform the CopyFrom with reshaping operation - bool result = destTensor.CopyFrom(sourceTensor, TensorShape({3, 2})); - - // Verify that the CopyFrom with reshaping operation was successful - EXPECT_TRUE(result); - - // Check the properties of the destination tensor - EXPECT_EQ(destTensor.data_type(), DataType::DT_INT); - EXPECT_EQ(destTensor.device_type(), DeviceType::CpuDevice); - EXPECT_EQ(destTensor.shape(), TensorShape({3, 2})); - EXPECT_EQ(destTensor.NumElements(), 6); - - // Check that the data in the destination tensor matches the source tensor - int* destData = destTensor.data(); - for (int ii = 0; ii < destTensor.NumElements(); ++ii) { - EXPECT_EQ(destData[ii], ii); - } -} - -// Test AllocateFrom function -TEST(Tensor, AllocateFrom) { - // Create source and destination tensors - container::Tensor sourceTensor(DataType::DT_INT, DeviceType::CpuDevice, TensorShape({2, 2})); - container::Tensor destTensor = {}; - - // Initialize data in the source tensor - int* sourceData = sourceTensor.data(); - for (int ii = 0; ii < sourceTensor.NumElements(); ++ii) { - sourceData[ii] = ii; - } - - // Perform the AllocateFrom operation - bool result = destTensor.AllocateFrom(sourceTensor, sourceTensor.shape()); - - // Verify that the AllocateFrom operation was successful - EXPECT_TRUE(result); - - // Check the properties of the destination tensor - EXPECT_EQ(destTensor.data_type(), DataType::DT_INT); - EXPECT_EQ(destTensor.device_type(), DeviceType::CpuDevice); - EXPECT_EQ(destTensor.shape(), TensorShape({2, 2})); - EXPECT_EQ(destTensor.NumElements(), 4); -} - -// Test sync function -TEST(Tensor, Sync) { - // Create two tensors with the same data type, device type, and shape - container::Tensor tensor1(DataType::DT_INT, DeviceType::CpuDevice, TensorShape({2, 2})); - container::Tensor tensor2(DataType::DT_INT, DeviceType::CpuDevice, TensorShape({2, 2})); - - // Initialize data in the source tensor (tensor2) - int* tensor2Data = tensor2.data(); - for (int ii = 0; ii < tensor2.NumElements(); ++ii) { - tensor2Data[ii] = ii; - } - - // Sync the data from tensor2 to tensor1 - tensor1.sync(tensor2); - - // Check that the data in tensor1 now matches tensor2 - int* tensor1Data = tensor1.data(); - for (int ii = 0; ii < tensor1.NumElements(); ++ii) { - EXPECT_EQ(tensor1Data[ii], ii); - } -} - -TEST(Tensor, SubTensor) { - // Create a tensor with some data - container::Tensor tensor(DataType::DT_INT, DeviceType::CpuDevice, TensorShape({2, 3})); - int* tensorData = tensor.data(); - - // Initialize data in the tensor - for (int ii = 0; ii < tensor.NumElements(); ++ii) { - tensorData[ii] = ii; - } - - // Access a sub-tensor based on the provided index - container::Tensor subTensor = tensor[1]; // Get the second row - - // Check the properties of the sub-tensor - EXPECT_EQ(subTensor.data_type(), DataType::DT_INT); - EXPECT_EQ(subTensor.device_type(), DeviceType::CpuDevice); - EXPECT_EQ(subTensor.shape().ndim(), 1); // Sub-tensor should be 1D - EXPECT_EQ(subTensor.shape().dim_size(0), 3); // Sub-tensor should have 3 elements - - // Check the data in the sub-tensor - int* subTensorData = subTensor.data(); - for (int ii = 0; ii < subTensor.NumElements(); ++ii) { - EXPECT_EQ(subTensorData[ii], ii + 3); // Offset by 3 elements (second row) - } -} - -// Test accessor function -TEST(Tensor, Accessor) { - // Create a tensor with some data - container::Tensor tensor(DataType::DT_INT, DeviceType::CpuDevice, TensorShape({2, 3})); - int* tensorData = tensor.data(); - - // Initialize data in the tensor - for (int ii = 0; ii < tensor.NumElements(); ++ii) { - tensorData[ii] = ii; - } - - // Access a 2D tensor accessor - container::TensorAccessor accessor2D = tensor.accessor(); - - // Check the data in the accessor - for (int ii = 0; ii < 2; ++ii) { - for (int jj = 0; jj < 3; ++jj) { - EXPECT_EQ(accessor2D[ii][jj], ii * 3 + jj); - } - } -} - -} // namespace container \ No newline at end of file diff --git a/source/module_base/module_container/test/tensor_utils_test.cpp b/source/module_base/module_container/test/tensor_utils_test.cpp deleted file mode 100644 index 4d99aaa1aa..0000000000 --- a/source/module_base/module_container/test/tensor_utils_test.cpp +++ /dev/null @@ -1,37 +0,0 @@ -#include - -#include - - -TEST(TensorUtils, _get_digit_places) { - const int size = 6; - float arr[size] = {-1.0, 2.5, 3.0, -0.5, 0.0, 1.234567}; - int int_count = 0, frac_count = 0; - - // Test for float type - int total_digits = container::_get_digit_places(arr, size, int_count, frac_count); - EXPECT_EQ(total_digits, 9); - EXPECT_EQ(int_count, 2); - EXPECT_EQ(frac_count, 7); -} - -TEST(TensorUtils, _internal_output) { - const int num_elements = 8; - float* data = new float[num_elements]; - for (int ii = 0; ii < 8; ii++) { - data[ii] = ii; - } - container::TensorShape shape1 {8}, shape2{2, 4}, shape3{2, 2, 2}, shape4{1, 2, 2, 2}; - // Test if the output operator produces the expected output - std::ostringstream oss; - container::_internal_output(oss, data, shape1, num_elements); - container::_internal_output(oss, data, shape2, num_elements); - container::_internal_output(oss, data, shape3, num_elements); - container::_internal_output(oss, data, shape4, num_elements); - const std::string expected_output = "[ 0, 1, 2, 3, 4, 5, 6, 7]"; - EXPECT_TRUE(oss.str().find(expected_output) == 0); -} - -TEST(TensorUtils, removeTrailingZeros) { - EXPECT_EQ(container::removeTrailingZeros(""), "0"); -} \ No newline at end of file diff --git a/source/module_base/module_device/CMakeLists.txt b/source/module_base/module_device/CMakeLists.txt deleted file mode 100644 index 0aede5e57b..0000000000 --- a/source/module_base/module_device/CMakeLists.txt +++ /dev/null @@ -1,44 +0,0 @@ -# list(APPEND module_device_srcs -# memory_op.cpp -# device.cpp -# ) - -# if(USE_CUDA) -# list(APPEND module_device_srcs -# cuda/memory_op.cu -# ) -# endif() - - -# if(USE_ROCM) -# hip_add_library(module_device_rocm STATIC -# rocm/memory_op.hip.cu -# ) -# target_link_libraries( -# device -# module_device_rocm -# hip::host -# hip::device -# hip::hipfft -# roc::hipblas -# roc::hipsolver -# ) -# endif() - -# add_library(device OBJECT ${device_srcs}) - -# if(USE_CUDA) -# target_link_libraries( -# device -# ) -# elseif(USE_ROCM) -# target_link_libraries( -# device -# device_rocm -# hip::host -# hip::device -# hip::hipfft -# roc::hipblas -# roc::hipsolver -# ) -# endif() \ No newline at end of file diff --git a/source/module_base/module_device/cuda/memory_op.cu b/source/module_base/module_device/cuda/memory_op.cu deleted file mode 100644 index c4f9efdb42..0000000000 --- a/source/module_base/module_device/cuda/memory_op.cu +++ /dev/null @@ -1,289 +0,0 @@ -#include "module_base/module_device/memory_op.h" -#include "module_base/memory.h" - -#include -#include -#include - -#include -#include - -#define THREADS_PER_BLOCK 256 - -namespace base_device -{ -namespace memory -{ - -template -__global__ void cast_memory(FPTYPE_out* out, const FPTYPE_in* in, const int size) -{ - int idx = blockIdx.x * blockDim.x + threadIdx.x; - if (idx >= size) - { - return; - } - out[idx] = static_cast(in[idx]); -} - -template -__global__ void cast_memory(std::complex* out, const std::complex* in, const int size) -{ - int idx = blockIdx.x * blockDim.x + threadIdx.x; - if (idx >= size) - { - return; - } - auto* _out = reinterpret_cast*>(out); - const auto* _in = reinterpret_cast*>(in); - _out[idx] = static_cast>(_in[idx]); -} - -template -__global__ void cast_memory(std::complex* out, const FPTYPE_in* in, const int size) -{ - int idx = blockIdx.x * blockDim.x + threadIdx.x; - if (idx >= size) - { - return; - } - auto* _out = reinterpret_cast*>(out); - _out[idx] = static_cast>(in[idx]); -} - -template -void resize_memory_op::operator()(FPTYPE*& arr, - const size_t size, - const char* record_in) -{ - if (arr != nullptr) - { - delete_memory_op()(arr); - } - cudaErrcheck(cudaMalloc((void**)&arr, sizeof(FPTYPE) * size)); - std::string record_string; - if (record_in != nullptr) - { - record_string = record_in; - } - else - { - record_string = "no_record"; - } - - if (record_string != "no_record") - { - ModuleBase::Memory::record_gpu(record_string, sizeof(FPTYPE) * size); - } -} - -template -void set_memory_op::operator()(FPTYPE* arr, - const int var, - const size_t size) -{ - cudaErrcheck(cudaMemset(arr, var, sizeof(FPTYPE) * size)); -} - -template -void synchronize_memory_op::operator()( - FPTYPE* arr_out, - const FPTYPE* arr_in, - const size_t size) -{ - cudaErrcheck(cudaMemcpy(arr_out, arr_in, sizeof(FPTYPE) * size, cudaMemcpyDeviceToHost)); -} - -template -void synchronize_memory_op::operator()( - FPTYPE* arr_out, - const FPTYPE* arr_in, - const size_t size) -{ - cudaErrcheck(cudaMemcpy(arr_out, arr_in, sizeof(FPTYPE) * size, cudaMemcpyHostToDevice)); -} - -template -void synchronize_memory_op::operator()( - FPTYPE* arr_out, - const FPTYPE* arr_in, - const size_t size) -{ - cudaErrcheck(cudaMemcpy(arr_out, arr_in, sizeof(FPTYPE) * size, cudaMemcpyDeviceToDevice)); -} - -template -struct cast_memory_op -{ - void operator()(FPTYPE_out* arr_out, - const FPTYPE_in* arr_in, - const size_t size) - { - if (size == 0) - { - return; - } - const int block = (size + THREADS_PER_BLOCK - 1) / THREADS_PER_BLOCK; - cast_memory<<>>(arr_out, arr_in, size); - - cudaCheckOnDebug(); - } -}; - -template -struct cast_memory_op { - void operator()(FPTYPE_out* arr_out, - const FPTYPE_in* arr_in, - const size_t size) { - - if (size == 0) {return;} - // No need to cast the memory if the data types are the same. - if (std::is_same::value) - { - synchronize_memory_op()(arr_out, - reinterpret_cast(arr_in), - size); - return; - } - FPTYPE_in * arr = nullptr; - cudaErrcheck(cudaMalloc((void **)&arr, sizeof(FPTYPE_in) * size)); - cudaErrcheck(cudaMemcpy(arr, arr_in, sizeof(FPTYPE_in) * size, cudaMemcpyHostToDevice)); - const int block = (size + THREADS_PER_BLOCK - 1) / THREADS_PER_BLOCK; - cast_memory<<>>(arr_out, arr, size); - cudaCheckOnDebug(); - cudaErrcheck(cudaFree(arr)); - } -}; - -template -struct cast_memory_op { - void operator()(FPTYPE_out* arr_out, - const FPTYPE_in* arr_in, - const size_t size) { - if (size == 0) {return;} - // No need to cast the memory if the data types are the same. - if (std::is_same::value) - { - synchronize_memory_op()(arr_out, - reinterpret_cast(arr_in), - size); - return; - } - auto * arr = (FPTYPE_in*) malloc(sizeof(FPTYPE_in) * size); - cudaErrcheck(cudaMemcpy(arr, arr_in, sizeof(FPTYPE_in) * size, cudaMemcpyDeviceToHost)); - for (int ii = 0; ii < size; ii++) { - arr_out[ii] = static_cast(arr[ii]); - } - free(arr); - } -}; - -template -void delete_memory_op::operator()(FPTYPE* arr) -{ - cudaErrcheck(cudaFree(arr)); -} - -template struct resize_memory_op; -template struct resize_memory_op; -template struct resize_memory_op; -template struct resize_memory_op, base_device::DEVICE_GPU>; -template struct resize_memory_op, base_device::DEVICE_GPU>; - -template struct set_memory_op; -template struct set_memory_op; -template struct set_memory_op; -template struct set_memory_op, base_device::DEVICE_GPU>; -template struct set_memory_op, base_device::DEVICE_GPU>; - -template struct synchronize_memory_op; -template struct synchronize_memory_op; -template struct synchronize_memory_op; -template struct synchronize_memory_op; -template struct synchronize_memory_op; -template struct synchronize_memory_op; -template struct synchronize_memory_op; -template struct synchronize_memory_op; -template struct synchronize_memory_op; -template struct synchronize_memory_op, base_device::DEVICE_CPU, base_device::DEVICE_GPU>; -template struct synchronize_memory_op, base_device::DEVICE_GPU, base_device::DEVICE_CPU>; -template struct synchronize_memory_op, base_device::DEVICE_GPU, base_device::DEVICE_GPU>; -template struct synchronize_memory_op, base_device::DEVICE_CPU, base_device::DEVICE_GPU>; -template struct synchronize_memory_op, base_device::DEVICE_GPU, base_device::DEVICE_CPU>; -template struct synchronize_memory_op, base_device::DEVICE_GPU, base_device::DEVICE_GPU>; - -template struct cast_memory_op; -template struct cast_memory_op; -template struct cast_memory_op; -template struct cast_memory_op; -template struct cast_memory_op, - std::complex, - base_device::DEVICE_GPU, - base_device::DEVICE_GPU>; -template struct cast_memory_op, - std::complex, - base_device::DEVICE_GPU, - base_device::DEVICE_GPU>; -template struct cast_memory_op, - std::complex, - base_device::DEVICE_GPU, - base_device::DEVICE_GPU>; -template struct cast_memory_op, - std::complex, - base_device::DEVICE_GPU, - base_device::DEVICE_GPU>; -template struct cast_memory_op, float, base_device::DEVICE_GPU, base_device::DEVICE_GPU>; -template struct cast_memory_op, double, base_device::DEVICE_GPU, base_device::DEVICE_GPU>; -template struct cast_memory_op; -template struct cast_memory_op; -template struct cast_memory_op; -template struct cast_memory_op; -template struct cast_memory_op, - std::complex, - base_device::DEVICE_GPU, - base_device::DEVICE_CPU>; -template struct cast_memory_op, - std::complex, - base_device::DEVICE_GPU, - base_device::DEVICE_CPU>; -template struct cast_memory_op, - std::complex, - base_device::DEVICE_GPU, - base_device::DEVICE_CPU>; -template struct cast_memory_op, - std::complex, - base_device::DEVICE_GPU, - base_device::DEVICE_CPU>; -template struct cast_memory_op; -template struct cast_memory_op; -template struct cast_memory_op; -template struct cast_memory_op; -template struct cast_memory_op, - std::complex, - base_device::DEVICE_CPU, - base_device::DEVICE_GPU>; -template struct cast_memory_op, - std::complex, - base_device::DEVICE_CPU, - base_device::DEVICE_GPU>; -template struct cast_memory_op, - std::complex, - base_device::DEVICE_CPU, - base_device::DEVICE_GPU>; -template struct cast_memory_op, - std::complex, - base_device::DEVICE_CPU, - base_device::DEVICE_GPU>; - -template struct delete_memory_op; -template struct delete_memory_op; -template struct delete_memory_op; -template struct delete_memory_op, base_device::DEVICE_GPU>; -template struct delete_memory_op, base_device::DEVICE_GPU>; -template struct delete_memory_op; -template struct delete_memory_op; -template struct delete_memory_op*, base_device::DEVICE_GPU>; -template struct delete_memory_op*, base_device::DEVICE_GPU>; - -} // namespace memory -} // end of namespace base_device \ No newline at end of file diff --git a/source/module_base/module_device/device.cpp b/source/module_base/module_device/device.cpp deleted file mode 100644 index 9373a5a31a..0000000000 --- a/source/module_base/module_device/device.cpp +++ /dev/null @@ -1,719 +0,0 @@ - -#include "device.h" - -#include "module_base/tool_quit.h" - -#include -#include -#include -#ifdef __MPI -#include "mpi.h" -#endif - -#if defined(__CUDA) -#include -#endif - -#if defined(__ROCM) -#include -#endif - -namespace base_device { - -// for device -template <> -base_device::AbacusDevice_t -get_device_type(const base_device::DEVICE_CPU *dev) { - return base_device::CpuDevice; -} -template <> -base_device::AbacusDevice_t -get_device_type(const base_device::DEVICE_GPU *dev) { - return base_device::GpuDevice; -} - -// for precision -template <> std::string get_current_precision(const float *var) { - return "single"; -} -template <> std::string get_current_precision(const double *var) { - return "double"; -} -template <> std::string get_current_precision(const std::complex *var) { - return "single"; -} -template <> std::string get_current_precision(const std::complex *var) { - return "double"; -} - -namespace information { - -#if __MPI -int stringCmp(const void *a, const void *b) { - char *m = (char *)a; - char *n = (char *)b; - int i, sum = 0; - - for (i = 0; i < MPI_MAX_PROCESSOR_NAME; i++) { - if (m[i] == n[i]) { - continue; - } else { - sum = m[i] - n[i]; - break; - } - } - return sum; -} -int get_node_rank() { - char host_name[MPI_MAX_PROCESSOR_NAME]; - memset(host_name, '\0', sizeof(char) * MPI_MAX_PROCESSOR_NAME); - char(*host_names)[MPI_MAX_PROCESSOR_NAME]; - int n, namelen, color, rank, nprocs, myrank; - size_t bytes; - MPI_Comm nodeComm; - - MPI_Comm_rank(MPI_COMM_WORLD, &rank); - MPI_Comm_size(MPI_COMM_WORLD, &nprocs); - MPI_Get_processor_name(host_name, &namelen); - - bytes = nprocs * sizeof(char[MPI_MAX_PROCESSOR_NAME]); - host_names = (char(*)[MPI_MAX_PROCESSOR_NAME])malloc(bytes); - for (int ii = 0; ii < nprocs; ii++) { - memset(host_names[ii], '\0', sizeof(char) * MPI_MAX_PROCESSOR_NAME); - } - - strcpy(host_names[rank], host_name); - - for (n = 0; n < nprocs; n++) { - MPI_Bcast(&(host_names[n]), MPI_MAX_PROCESSOR_NAME, MPI_CHAR, n, - MPI_COMM_WORLD); - } - qsort(host_names, nprocs, sizeof(char[MPI_MAX_PROCESSOR_NAME]), stringCmp); - - color = 0; - for (n = 0; n < nprocs - 1; n++) { - if (strcmp(host_name, host_names[n]) == 0) { - break; - } - if (strcmp(host_names[n], host_names[n + 1])) { - color++; - } - } - - MPI_Comm_split(MPI_COMM_WORLD, color, 0, &nodeComm); - MPI_Comm_rank(nodeComm, &myrank); - - MPI_Barrier(MPI_COMM_WORLD); - int looprank = myrank; - // printf (" Assigning device %d to process on node %s rank %d, - // OK\n",looprank, host_name, rank ); - free(host_names); - return looprank; -} - -int get_node_rank_with_mpi_shared(const MPI_Comm mpi_comm) { - // 20240530 zhanghaochong - // The main difference between this function and the above is that it does not - // use hostname, but uses MPI's built-in function to achieve similar - // functions. - MPI_Comm localComm; - int localMpiRank; - MPI_Comm_split_type(mpi_comm, MPI_COMM_TYPE_SHARED, 0, MPI_INFO_NULL, - &localComm); - MPI_Comm_rank(localComm, &localMpiRank); - MPI_Comm_free(&localComm); - return localMpiRank; -} -#if defined(__CUDA) - -int set_device_by_rank(const MPI_Comm mpi_comm) { - int localMpiRank = get_node_rank_with_mpi_shared(mpi_comm); - int device_num = -1; - - cudaGetDeviceCount(&device_num); - if (device_num <= 0) { - ModuleBase::WARNING_QUIT("device", "can not find gpu device!"); - } - // warning: this is not a good way to assign devices, user should assign One - // process per GPU - int local_device_id = localMpiRank % device_num; - int ret = cudaSetDevice(local_device_id); - if (ret != cudaSuccess) { - ModuleBase::WARNING_QUIT("device", "cudaSetDevice failed!"); - } - return local_device_id; -} -#endif - -#endif - -std::string get_device_flag(const std::string &device, - const std::string &basis_type) { -if (device == "cpu") { - return "cpu"; // no extra checks required -} -std::string error_message; -if (device != "auto" and device != "gpu") -{ - error_message += "Parameter \"device\" can only be set to \"cpu\" or \"gpu\"!"; - ModuleBase::WARNING_QUIT("device", error_message); -} - -// Get available GPU count -int device_count = -1; -#if ((defined __CUDA) || (defined __ROCM)) -#if defined(__CUDA) -cudaGetDeviceCount(&device_count); -#elif defined(__ROCM) -hipGetDeviceCount(&device_count); -/***auto start_time = std::chrono::high_resolution_clock::now(); -std::cout << "Starting hipGetDeviceCount.." << std::endl; -auto end_time = std::chrono::high_resolution_clock::now(); -auto duration = std::chrono::duration_cast>(end_time - start_time); -std::cout << "hipGetDeviceCount took " << duration.count() << "seconds" << std::endl;***/ -#endif -if (device_count <= 0) -{ - error_message += "Cannot find GPU on this computer!\n"; -} -#else // CPU only -error_message += "ABACUS is built with CPU support only. Please rebuild with GPU support.\n"; -#endif - -if (basis_type == "lcao_in_pw") { - error_message += - "The GPU currently does not support the basis type \"lcao_in_pw\"!"; -} -if(error_message.empty()) -{ - return "gpu"; // possibly automatically set to GPU -} -else if (device == "gpu") -{ - ModuleBase::WARNING_QUIT("device", error_message); -} -else { return "cpu"; -} -} - -int get_device_kpar(const int& kpar, const int& bndpar) -{ -#if __MPI && (__CUDA || __ROCM) - int temp_nproc = 0; - int new_kpar = kpar; - MPI_Comm_size(MPI_COMM_WORLD, &temp_nproc); - if (temp_nproc != kpar * bndpar) - { - new_kpar = temp_nproc / bndpar; - ModuleBase::WARNING("Input_conv", "kpar is not compatible with the number of processors, auto set kpar value."); - } - - // get the CPU rank of current node - int node_rank = base_device::information::get_node_rank(); - - int device_num = -1; -#if defined(__CUDA) - cudaGetDeviceCount(&device_num); // get the number of GPU devices of current node - cudaSetDevice(node_rank % device_num); // band the CPU processor to the devices -#elif defined(__ROCM) - hipGetDeviceCount(&device_num); - hipSetDevice(node_rank % device_num); -#endif - return new_kpar; -#endif - return kpar; -} - -std::string get_device_info(std::string device_flag) { - std::string device_info = "Unknown"; - -#if defined(__CUDA) - if (device_flag == "gpu") { - int dev = 0; - cudaDeviceProp deviceProp; - cudaErrcheck(cudaGetDeviceProperties(&deviceProp, dev)); - device_info = deviceProp.name; - } -#elif defined(__ROCM) - if (device_flag == "gpu") { - int dev = 0; - hipDeviceProp_t deviceProp; - hipErrcheck(hipGetDeviceProperties(&deviceProp, dev)); - device_info = deviceProp.name; - } -#endif - if (device_flag == "cpu") { - std::ifstream cpuinfo("/proc/cpuinfo"); - std::string line = "", cpu_name = ""; - - while (std::getline(cpuinfo, line)) { - if (line.find("model name") != std::string::npos) { - // Extract the CPU name from the line - size_t colonPos = line.find(":"); - if (colonPos != std::string::npos) { - cpu_name = line.substr(colonPos + 2); // Skip the colon and space - break; // Stop after the first match - } - } - } - if (cpu_name != "") { - device_info = cpu_name; - } - cpuinfo.close(); - } - return device_info; -} - -#if defined(__CUDA) - -static bool is_init = false; - -template <> -void print_device_info( - const base_device::DEVICE_GPU *ctx, std::ofstream &ofs_device) { - if (is_init) { - return; - } - int deviceCount = 0; - cudaError_t error_id = cudaGetDeviceCount(&deviceCount); - if (error_id != cudaSuccess) { - ofs_device << "cudaGetDeviceCount returned " << static_cast(error_id) - << "\n-> " << cudaGetErrorString(error_id) << std::endl; - ModuleBase::WARNING_QUIT("device", "GPU returned is without cudaSuccess"); - } - // This function call returns 0 if there are no CUDA capable devices. - if (deviceCount == 0) { - ofs_device << "There are no available device(s) that support CUDA\n"; - } else { - ofs_device << "Detected " << deviceCount << " CUDA Capable device(s)\n"; - } - int dev = 0, driverVersion = 0, runtimeVersion = 0; - cudaErrcheck(cudaSetDevice(dev)); - cudaDeviceProp deviceProp; - cudaErrcheck(cudaGetDeviceProperties(&deviceProp, dev)); - ofs_device << "\nDevice " << dev << ":\t " << deviceProp.name << std::endl; - // Console log - cudaErrcheck(cudaDriverGetVersion(&driverVersion)); - cudaErrcheck(cudaRuntimeGetVersion(&runtimeVersion)); - char msg[1024]; - sprintf(msg, - " CUDA Driver Version / Runtime Version %d.%d / %d.%d\n", - driverVersion / 1000, (driverVersion % 100) / 10, - runtimeVersion / 1000, (runtimeVersion % 100) / 10); - ofs_device << msg << std::endl; - sprintf(msg, " CUDA Capability Major/Minor version number: %d.%d\n", - deviceProp.major, deviceProp.minor); - ofs_device << msg << std::endl; - sprintf(msg, - " GPU Max Clock rate: %.0f MHz (%0.2f " - "GHz)\n", - deviceProp.clockRate * 1e-3f, deviceProp.clockRate * 1e-6f); - ofs_device << msg << std::endl; - // This is supported in CUDA 5.0 (runtime API device properties) - sprintf(msg, " Memory Clock rate: %.0f Mhz\n", - deviceProp.memoryClockRate * 1e-3f); - ofs_device << msg << std::endl; - - sprintf(msg, " Memory Bus Width: %d-bit\n", - deviceProp.memoryBusWidth); - ofs_device << msg << std::endl; - sprintf(msg, - " Maximum Texture Dimension Size (x,y,z) 1D=(%d), 2D=(%d, " - "%d), 3D=(%d, %d, %d)\n", - deviceProp.maxTexture1D, deviceProp.maxTexture2D[0], - deviceProp.maxTexture2D[1], deviceProp.maxTexture3D[0], - deviceProp.maxTexture3D[1], deviceProp.maxTexture3D[2]); - ofs_device << msg << std::endl; - - sprintf( - msg, - " Maximum Layered 1D Texture Size, (num) layers 1D=(%d), %d layers\n", - deviceProp.maxTexture1DLayered[0], deviceProp.maxTexture1DLayered[1]); - ofs_device << msg << std::endl; - sprintf(msg, - " Maximum Layered 2D Texture Size, (num) layers 2D=(%d, %d), %d " - "layers\n", - deviceProp.maxTexture2DLayered[0], deviceProp.maxTexture2DLayered[1], - deviceProp.maxTexture2DLayered[2]); - ofs_device << msg << std::endl; - sprintf(msg, " Total amount of constant memory: %zu bytes\n", - deviceProp.totalConstMem); - ofs_device << msg << std::endl; - sprintf(msg, " Total amount of shared memory per block: %zu bytes\n", - deviceProp.sharedMemPerBlock); - ofs_device << msg << std::endl; - sprintf(msg, " Total shared memory per multiprocessor: %zu bytes\n", - deviceProp.sharedMemPerMultiprocessor); - ofs_device << msg << std::endl; - sprintf(msg, " Total number of registers available per block: %d\n", - deviceProp.regsPerBlock); - ofs_device << msg << std::endl; - sprintf(msg, " Warp size: %d\n", - deviceProp.warpSize); - ofs_device << msg << std::endl; - sprintf(msg, " Maximum number of threads per multiprocessor: %d\n", - deviceProp.maxThreadsPerMultiProcessor); - ofs_device << msg << std::endl; - sprintf(msg, " Maximum number of threads per block: %d\n", - deviceProp.maxThreadsPerBlock); - ofs_device << msg << std::endl; - sprintf(msg, " Max dimension size of a thread block (x,y,z): (%d, %d, %d)\n", - deviceProp.maxThreadsDim[0], deviceProp.maxThreadsDim[1], - deviceProp.maxThreadsDim[2]); - ofs_device << msg << std::endl; - sprintf(msg, " Max dimension size of a grid size (x,y,z): (%d, %d, %d)\n", - deviceProp.maxGridSize[0], deviceProp.maxGridSize[1], - deviceProp.maxGridSize[2]); - ofs_device << msg << std::endl; - sprintf(msg, " Maximum memory pitch: %zu bytes\n", - deviceProp.memPitch); - ofs_device << msg << std::endl; - sprintf(msg, " Texture alignment: %zu bytes\n", - deviceProp.textureAlignment); - ofs_device << msg << std::endl; - sprintf(msg, - " Concurrent copy and kernel execution: %s with %d copy " - "engine(s)\n", - (deviceProp.deviceOverlap ? "Yes" : "No"), - deviceProp.asyncEngineCount); - ofs_device << msg << std::endl; - sprintf(msg, " Run time limit on kernels: %s\n", - deviceProp.kernelExecTimeoutEnabled ? "Yes" : "No"); - ofs_device << msg << std::endl; - sprintf(msg, " Integrated GPU sharing Host Memory: %s\n", - deviceProp.integrated ? "Yes" : "No"); - ofs_device << msg << std::endl; - sprintf(msg, " Support host page-locked memory mapping: %s\n", - deviceProp.canMapHostMemory ? "Yes" : "No"); - ofs_device << msg << std::endl; - sprintf(msg, " Alignment requirement for Surfaces: %s\n", - deviceProp.surfaceAlignment ? "Yes" : "No"); - ofs_device << msg << std::endl; - sprintf(msg, " Device has ECC support: %s\n", - deviceProp.ECCEnabled ? "Enabled" : "Disabled"); - ofs_device << msg << std::endl; - sprintf(msg, " Device supports Unified Addressing (UVA): %s\n", - deviceProp.unifiedAddressing ? "Yes" : "No"); - ofs_device << msg << std::endl; - sprintf(msg, " Device supports Managed Memory: %s\n", - deviceProp.managedMemory ? "Yes" : "No"); - ofs_device << msg << std::endl; - sprintf(msg, " Device supports Compute Preemption: %s\n", - deviceProp.computePreemptionSupported ? "Yes" : "No"); - ofs_device << msg << std::endl; - sprintf(msg, " Supports Cooperative Kernel Launch: %s\n", - deviceProp.cooperativeLaunch ? "Yes" : "No"); - ofs_device << msg << std::endl; - sprintf(msg, " Supports MultiDevice Co-op Kernel Launch: %s\n", - deviceProp.cooperativeMultiDeviceLaunch ? "Yes" : "No"); - ofs_device << msg << std::endl; - sprintf(msg, - " Device PCI Domain ID / Bus ID / location ID: %d / %d / %d\n", - deviceProp.pciDomainID, deviceProp.pciBusID, deviceProp.pciDeviceID); - ofs_device << msg << std::endl; - const char *sComputeMode[] = { - "Default (multiple host threads can use ::cudaSetDevice() with device " - "simultaneously)", - "Exclusive (only one host thread in one process is able to use " - "::cudaSetDevice() with this device)", - "Prohibited (no host thread can use ::cudaSetDevice() with this " - "device)", - "Exclusive Process (many threads in one process is able to use " - "::cudaSetDevice() with this device)", - "Unknown", - NULL}; - sprintf(msg, " Compute Mode:\n"); - ofs_device << msg << std::endl; - ofs_device << " " << sComputeMode[deviceProp.computeMode] << std::endl - << std::endl; - - // If there are 2 or more GPUs, query to determine whether RDMA is supported - if (deviceCount >= 2) { - cudaDeviceProp prop[64]; - int gpuid[64]; // we want to find the first two GPUs that can support P2P - int gpu_p2p_count = 0; - - for (int i = 0; i < deviceCount; i++) { - cudaErrcheck(cudaGetDeviceProperties(&prop[i], i)); - - // Only boards based on Fermi or later can support P2P - if (prop[i].major >= 2) { - // This is an array of P2P capable GPUs - gpuid[gpu_p2p_count++] = i; - } - } - - // Show all the combinations of support P2P GPUs - int can_access_peer; - - if (gpu_p2p_count >= 2) { - for (int i = 0; i < gpu_p2p_count; i++) { - for (int j = 0; j < gpu_p2p_count; j++) { - if (gpuid[i] == gpuid[j]) { - continue; - } - cudaErrcheck( - cudaDeviceCanAccessPeer(&can_access_peer, gpuid[i], gpuid[j])); - sprintf(msg, "> Peer access from %s (GPU%d) -> %s (GPU%d) : %s\n", - prop[gpuid[i]].name, gpuid[i], prop[gpuid[j]].name, gpuid[j], - can_access_peer ? "Yes" : "No"); - ofs_device << msg << std::endl; - } - } - } - } - - // csv masterlog info - // ***************************** - // exe and CUDA driver name - std::string sProfileString = "deviceQuery, CUDA Driver = CUDART"; - char cTemp[16]; - - // driver version - sProfileString += ", CUDA Driver Version = "; - - snprintf(cTemp, sizeof(cTemp), "%d.%d", driverVersion / 1000, - (driverVersion % 100) / 10); - sProfileString += cTemp; - - // Runtime version - sProfileString += ", CUDA Runtime Version = "; - snprintf(cTemp, sizeof(cTemp), "%d.%d", runtimeVersion / 1000, - (runtimeVersion % 100) / 10); - sProfileString += cTemp; - - // Device count - sProfileString += ", NumDevs = "; - snprintf(cTemp, sizeof(cTemp), "%d", deviceCount); - sProfileString += cTemp; - sProfileString += "\n"; - - ofs_device << sProfileString.c_str() << std::endl; - is_init = true; - ofs_device << "End of device informations." << std::endl << std::endl; -} - -template <> -void record_device_memory( - const base_device::DEVICE_GPU *ctx, std::ofstream &ofs_device, - std::string str, size_t size) { - ofs_device << "Allocate " << static_cast(size) / 8 / 1024 / 1024 - << " \tMB device memory\t" - << "from " << str << std::endl - << std::endl; -} - -#elif defined(__ROCM) - -static bool is_init = false; - -template <> -void print_device_info( - const base_device::DEVICE_GPU *ctx, std::ofstream &ofs_device) { - if (is_init) { - return; - } - int deviceCount = 0; - hipError_t error_id = hipGetDeviceCount(&deviceCount); - if (error_id != hipSuccess) { - ofs_device << "hipGetDeviceCount returned " << static_cast(error_id) - << "\n-> " << hipGetErrorString(error_id) << std::endl; - ModuleBase::WARNING_QUIT("device", "GPU returned is without hipSuccess"); - } - // This function call returns 0 if there are no CUDA capable devices. - if (deviceCount == 0) { - ofs_device << "There are no available device(s) that support CUDA\n"; - } else { - ofs_device << "Detected " << deviceCount << " CUDA Capable device(s)\n"; - } - int dev = 0, driverVersion = 0, runtimeVersion = 0; - hipErrcheck(hipSetDevice(dev)); - hipDeviceProp_t deviceProp; - hipErrcheck(hipGetDeviceProperties(&deviceProp, dev)); - ofs_device << "\nDevice " << dev << ":\t " << deviceProp.name << std::endl; - // Console log - hipErrcheck(hipDriverGetVersion(&driverVersion)); - hipErrcheck(hipRuntimeGetVersion(&runtimeVersion)); - char msg[1024]; - sprintf(msg, - " CUDA Driver Version / Runtime Version %d.%d / %d.%d\n", - driverVersion / 1000, (driverVersion % 100) / 10, - runtimeVersion / 1000, (runtimeVersion % 100) / 10); - ofs_device << msg << std::endl; - sprintf(msg, " CUDA Capability Major/Minor version number: %d.%d\n", - deviceProp.major, deviceProp.minor); - ofs_device << msg << std::endl; - sprintf(msg, - " GPU Max Clock rate: %.0f MHz (%0.2f " - "GHz)\n", - deviceProp.clockRate * 1e-3f, deviceProp.clockRate * 1e-6f); - ofs_device << msg << std::endl; - // This is supported in CUDA 5.0 (runtime API device properties) - sprintf(msg, " Memory Clock rate: %.0f Mhz\n", - deviceProp.memoryClockRate * 1e-3f); - ofs_device << msg << std::endl; - - sprintf(msg, " Memory Bus Width: %d-bit\n", - deviceProp.memoryBusWidth); - ofs_device << msg << std::endl; - sprintf(msg, - " Maximum Texture Dimension Size (x,y,z) 1D=(%d), 2D=(%d, " - "%d), 3D=(%d, %d, %d)\n", - deviceProp.maxTexture1D, deviceProp.maxTexture2D[0], - deviceProp.maxTexture2D[1], deviceProp.maxTexture3D[0], - deviceProp.maxTexture3D[1], deviceProp.maxTexture3D[2]); - ofs_device << msg << std::endl; - - sprintf(msg, " Total amount of constant memory: %zu bytes\n", - deviceProp.totalConstMem); - ofs_device << msg << std::endl; - sprintf(msg, " Total amount of shared memory per block: %zu bytes\n", - deviceProp.sharedMemPerBlock); - ofs_device << msg << std::endl; - sprintf(msg, " Total number of registers available per block: %d\n", - deviceProp.regsPerBlock); - ofs_device << msg << std::endl; - sprintf(msg, " Warp size: %d\n", - deviceProp.warpSize); - ofs_device << msg << std::endl; - sprintf(msg, " Maximum number of threads per multiprocessor: %d\n", - deviceProp.maxThreadsPerMultiProcessor); - ofs_device << msg << std::endl; - sprintf(msg, " Maximum number of threads per block: %d\n", - deviceProp.maxThreadsPerBlock); - ofs_device << msg << std::endl; - sprintf(msg, " Max dimension size of a thread block (x,y,z): (%d, %d, %d)\n", - deviceProp.maxThreadsDim[0], deviceProp.maxThreadsDim[1], - deviceProp.maxThreadsDim[2]); - ofs_device << msg << std::endl; - sprintf(msg, " Max dimension size of a grid size (x,y,z): (%d, %d, %d)\n", - deviceProp.maxGridSize[0], deviceProp.maxGridSize[1], - deviceProp.maxGridSize[2]); - ofs_device << msg << std::endl; - sprintf(msg, " Maximum memory pitch: %zu bytes\n", - deviceProp.memPitch); - ofs_device << msg << std::endl; - sprintf(msg, " Texture alignment: %zu bytes\n", - deviceProp.textureAlignment); - ofs_device << msg << std::endl; - sprintf(msg, " Run time limit on kernels: %s\n", - deviceProp.kernelExecTimeoutEnabled ? "Yes" : "No"); - ofs_device << msg << std::endl; - sprintf(msg, " Integrated GPU sharing Host Memory: %s\n", - deviceProp.integrated ? "Yes" : "No"); - ofs_device << msg << std::endl; - sprintf(msg, " Support host page-locked memory mapping: %s\n", - deviceProp.canMapHostMemory ? "Yes" : "No"); - ofs_device << msg << std::endl; - sprintf(msg, " Device has ECC support: %s\n", - deviceProp.ECCEnabled ? "Enabled" : "Disabled"); - ofs_device << msg << std::endl; - sprintf(msg, " Device supports Managed Memory: %s\n", - deviceProp.managedMemory ? "Yes" : "No"); - ofs_device << msg << std::endl; - sprintf(msg, " Supports Cooperative Kernel Launch: %s\n", - deviceProp.cooperativeLaunch ? "Yes" : "No"); - ofs_device << msg << std::endl; - sprintf(msg, " Supports MultiDevice Co-op Kernel Launch: %s\n", - deviceProp.cooperativeMultiDeviceLaunch ? "Yes" : "No"); - ofs_device << msg << std::endl; - sprintf(msg, - " Device PCI Domain ID / Bus ID / location ID: %d / %d / %d\n", - deviceProp.pciDomainID, deviceProp.pciBusID, deviceProp.pciDeviceID); - ofs_device << msg << std::endl; - const char *sComputeMode[] = { - "Default (multiple host threads can use ::hipSetDevice() with device " - "simultaneously)", - "Exclusive (only one host thread in one process is able to use " - "::hipSetDevice() with this device)", - "Prohibited (no host thread can use ::hipSetDevice() with this " - "device)", - "Exclusive Process (many threads in one process is able to use " - "::hipSetDevice() with this device)", - "Unknown", - NULL}; - sprintf(msg, " Compute Mode:\n"); - ofs_device << msg << std::endl; - ofs_device << " " << sComputeMode[deviceProp.computeMode] << std::endl - << std::endl; - - // If there are 2 or more GPUs, query to determine whether RDMA is supported - if (deviceCount >= 2) { - hipDeviceProp_t prop[64]; - int gpuid[64]; // we want to find the first two GPUs that can support P2P - int gpu_p2p_count = 0; - - for (int i = 0; i < deviceCount; i++) { - hipErrcheck(hipGetDeviceProperties(&prop[i], i)); - - // Only boards based on Fermi or later can support P2P - if (prop[i].major >= 2) { - // This is an array of P2P capable GPUs - gpuid[gpu_p2p_count++] = i; - } - } - - // Show all the combinations of support P2P GPUs - int can_access_peer; - - if (gpu_p2p_count >= 2) { - for (int i = 0; i < gpu_p2p_count; i++) { - for (int j = 0; j < gpu_p2p_count; j++) { - if (gpuid[i] == gpuid[j]) { - continue; - } - hipErrcheck( - hipDeviceCanAccessPeer(&can_access_peer, gpuid[i], gpuid[j])); - sprintf(msg, "> Peer access from %s (GPU%d) -> %s (GPU%d) : %s\n", - prop[gpuid[i]].name, gpuid[i], prop[gpuid[j]].name, gpuid[j], - can_access_peer ? "Yes" : "No"); - ofs_device << msg << std::endl; - } - } - } - } - - // csv masterlog info - // ***************************** - // exe and CUDA driver name - std::string sProfileString = "deviceQuery, CUDA Driver = CUDART"; - char cTemp[16]; - - // driver version - sProfileString += ", CUDA Driver Version = "; - - snprintf(cTemp, sizeof(cTemp), "%d.%d", driverVersion / 1000, - (driverVersion % 100) / 10); - sProfileString += cTemp; - - // Runtime version - sProfileString += ", CUDA Runtime Version = "; - snprintf(cTemp, sizeof(cTemp), "%d.%d", runtimeVersion / 1000, - (runtimeVersion % 100) / 10); - sProfileString += cTemp; - - // Device count - sProfileString += ", NumDevs = "; - snprintf(cTemp, sizeof(cTemp), "%d", deviceCount); - sProfileString += cTemp; - sProfileString += "\n"; - - ofs_device << sProfileString.c_str() << std::endl; - is_init = true; - ofs_device << "End of device informations." << std::endl << std::endl; -} - -template <> -void record_device_memory( - const base_device::DEVICE_GPU *ctx, std::ofstream &ofs_device, - std::string str, size_t size) { - ofs_device << "Allocate " << static_cast(size) / 8 / 1024 / 1024 - << " \tMB device memory\t" - << "from " << str << std::endl - << std::endl; -} - -#endif - -} // end of namespace information -} // end of namespace base_device diff --git a/source/module_base/module_device/device.h b/source/module_base/module_device/device.h deleted file mode 100644 index a6b4412721..0000000000 --- a/source/module_base/module_device/device.h +++ /dev/null @@ -1,105 +0,0 @@ -#ifndef MODULE_DEVICE_H_ -#define MODULE_DEVICE_H_ - -#include "types.h" -#include - -#ifdef __MPI -#include "mpi.h" -#endif - -namespace base_device -{ - -// struct CPU; -// struct GPU; - -// enum AbacusDevice_t -// { -// UnKnown, -// CpuDevice, -// GpuDevice -// }; - -template -base_device::AbacusDevice_t get_device_type(const Device* dev); - -template -std::string get_current_precision(const T* var); - -namespace information -{ - -/** - * @brief Get the device info object - * for source_esolver - */ -std::string get_device_info(std::string device_flag); - -/** - * @brief Get the device kpar object - * for module_io GlobalV::KPAR - */ -int get_device_kpar(const int& kpar, const int& bndpar); - -/** - * @brief Get the device flag object - * for module_io PARAM.inp.device - */ -std::string get_device_flag(const std::string& device, - const std::string& basis_type); - -#if __MPI -/** - * @brief Get the rank of current node - * Note that GPU can only be binded with CPU in the same node - * - * @return int - */ -int get_node_rank(); -int get_node_rank_with_mpi_shared(const MPI_Comm mpi_comm = MPI_COMM_WORLD); -int stringCmp(const void* a, const void* b); - -#ifdef __CUDA - -int set_device_by_rank(const MPI_Comm mpi_comm = MPI_COMM_WORLD); -#endif - -#endif - -template -void print_device_info(const Device* dev, std::ofstream& ofs_device) -{ - return; -} - -template -void record_device_memory(const Device* dev, std::ofstream& ofs_device, std::string str, size_t size) -{ - return; -} - -} // end of namespace information -} // end of namespace base_device - -/** - * @brief for compatibility with __CUDA_ARCH__ 600 and earlier - * - */ -#if defined(__CUDA_ARCH__) && __CUDA_ARCH__ < 600 && !defined(__CUDA_ON_DCU) -static __inline__ __device__ double atomicAdd(double* address, double val) -{ - unsigned long long int* address_as_ull = (unsigned long long int*)address; - unsigned long long int old = *address_as_ull, assumed; - do - { - assumed = old; - old = atomicCAS(address_as_ull, assumed, __double_as_longlong(val + __longlong_as_double(assumed))); - // Note: uses integer comparison to avoid hang in case of NaN (since NaN != - // NaN) } while (assumed != old); - } while (assumed != old); - return __longlong_as_double(old); -} -#endif - -#endif // MODULE_DEVICE_H_ \ No newline at end of file diff --git a/source/module_base/module_device/memory_op.cpp b/source/module_base/module_device/memory_op.cpp deleted file mode 100644 index 9af0ce5a79..0000000000 --- a/source/module_base/module_device/memory_op.cpp +++ /dev/null @@ -1,452 +0,0 @@ -#include "memory_op.h" - -#include "module_base/memory.h" -#include "module_base/tool_threading.h" -#ifdef __DSP -#include "module_base/kernels/dsp/dsp_connector.h" -#include "module_base/global_variable.h" -#endif - -#include -#include - -namespace base_device -{ -namespace memory -{ - -template -struct resize_memory_op -{ - void operator()(FPTYPE*& arr, const size_t size, const char* record_in) - { - if (arr != nullptr) - { - free(arr); - } - arr = (FPTYPE*)malloc(sizeof(FPTYPE) * size); - std::string record_string; - if (record_in != nullptr) - { - record_string = record_in; - } - else - { - record_string = "no_record"; - } - - if (record_string != "no_record") - { - ModuleBase::Memory::record(record_string, sizeof(FPTYPE) * size); - } - } -}; - -template -struct set_memory_op -{ - void operator()(FPTYPE* arr, const int var, const size_t size) - { - ModuleBase::OMP_PARALLEL([&](int num_thread, int thread_id) { - int beg = 0, len = 0; - ModuleBase::BLOCK_TASK_DIST_1D(num_thread, thread_id, size, (size_t)4096 / sizeof(FPTYPE), beg, len); - memset(arr + beg, var, sizeof(FPTYPE) * len); - }); - } -}; - -template -struct synchronize_memory_op -{ - void operator()(FPTYPE* arr_out, - const FPTYPE* arr_in, - const size_t size) - { - ModuleBase::OMP_PARALLEL([&](int num_thread, int thread_id) { - int beg = 0, len = 0; - ModuleBase::BLOCK_TASK_DIST_1D(num_thread, thread_id, size, (size_t)4096 / sizeof(FPTYPE), beg, len); - memcpy(arr_out + beg, arr_in + beg, sizeof(FPTYPE) * len); - }); - } -}; - -template -struct cast_memory_op -{ - void operator()(FPTYPE_out* arr_out, - const FPTYPE_in* arr_in, - const size_t size) - { -#ifdef _OPENMP -#pragma omp parallel for schedule(static, 4096 / sizeof(FPTYPE_out)) -#endif - for (int ii = 0; ii < size; ii++) - { - arr_out[ii] = static_cast(arr_in[ii]); - } - } -}; - -template -struct delete_memory_op -{ - void operator()(FPTYPE* arr) - { - free(arr); - } -}; - -template struct resize_memory_op; -template struct resize_memory_op; -template struct resize_memory_op; -template struct resize_memory_op, base_device::DEVICE_CPU>; -template struct resize_memory_op, base_device::DEVICE_CPU>; - -template struct set_memory_op; -template struct set_memory_op; -template struct set_memory_op; -template struct set_memory_op, base_device::DEVICE_CPU>; -template struct set_memory_op, base_device::DEVICE_CPU>; - -template struct synchronize_memory_op; -template struct synchronize_memory_op; -template struct synchronize_memory_op; -template struct synchronize_memory_op, base_device::DEVICE_CPU, base_device::DEVICE_CPU>; -template struct synchronize_memory_op, base_device::DEVICE_CPU, base_device::DEVICE_CPU>; - -template struct cast_memory_op; -template struct cast_memory_op; -template struct cast_memory_op; -template struct cast_memory_op; -template struct cast_memory_op, - std::complex, - base_device::DEVICE_CPU, - base_device::DEVICE_CPU>; -template struct cast_memory_op, - std::complex, - base_device::DEVICE_CPU, - base_device::DEVICE_CPU>; -template struct cast_memory_op, - std::complex, - base_device::DEVICE_CPU, - base_device::DEVICE_CPU>; -template struct cast_memory_op, - std::complex, - base_device::DEVICE_CPU, - base_device::DEVICE_CPU>; -template struct cast_memory_op, float, base_device::DEVICE_CPU, base_device::DEVICE_CPU>; -template struct cast_memory_op, double, base_device::DEVICE_CPU, base_device::DEVICE_CPU>; - -template struct delete_memory_op; -template struct delete_memory_op; -template struct delete_memory_op; -template struct delete_memory_op, base_device::DEVICE_CPU>; -template struct delete_memory_op, base_device::DEVICE_CPU>; -template struct delete_memory_op; -template struct delete_memory_op; -template struct delete_memory_op*, base_device::DEVICE_CPU>; -template struct delete_memory_op*, base_device::DEVICE_CPU>; - -#if !(defined(__CUDA) || defined(__ROCM)) - -template -struct resize_memory_op -{ - void operator()(FPTYPE*& arr, - const size_t size, - const char* record_in = nullptr) - { - } -}; - -template -struct set_memory_op -{ - void operator()(FPTYPE* arr, const int var, const size_t size) - { - } -}; - -template -struct synchronize_memory_op -{ - void operator()(FPTYPE* arr_out, - const FPTYPE* arr_in, - const size_t size) - { - } -}; - -template -struct synchronize_memory_op -{ - void operator()(FPTYPE* arr_out, - const FPTYPE* arr_in, - const size_t size) - { - } -}; - -template -struct synchronize_memory_op -{ - void operator()(FPTYPE* arr_out, - const FPTYPE* arr_in, - const size_t size) - { - } -}; - -template -struct cast_memory_op -{ - void operator()(FPTYPE_out* arr_out, - const FPTYPE_in* arr_in, - const size_t size) - { - } -}; - -template -struct cast_memory_op -{ - void operator()(FPTYPE_out* arr_out, - const FPTYPE_in* arr_in, - const size_t size) - { - } -}; - -template -struct cast_memory_op -{ - void operator()(FPTYPE_out* arr_out, - const FPTYPE_in* arr_in, - const size_t size) - { - } -}; - -template -struct delete_memory_op -{ - void operator()(FPTYPE* arr) - { - } -}; - -template struct resize_memory_op; -template struct resize_memory_op; -template struct resize_memory_op; -template struct resize_memory_op, base_device::DEVICE_GPU>; -template struct resize_memory_op, base_device::DEVICE_GPU>; - -template struct set_memory_op; -template struct set_memory_op; -template struct set_memory_op; -template struct set_memory_op, base_device::DEVICE_GPU>; -template struct set_memory_op, base_device::DEVICE_GPU>; - -template struct synchronize_memory_op; -template struct synchronize_memory_op; -template struct synchronize_memory_op; -template struct synchronize_memory_op; -template struct synchronize_memory_op; -template struct synchronize_memory_op; -template struct synchronize_memory_op; -template struct synchronize_memory_op; -template struct synchronize_memory_op; -template struct synchronize_memory_op, base_device::DEVICE_CPU, base_device::DEVICE_GPU>; -template struct synchronize_memory_op, base_device::DEVICE_GPU, base_device::DEVICE_CPU>; -template struct synchronize_memory_op, base_device::DEVICE_GPU, base_device::DEVICE_GPU>; -template struct synchronize_memory_op, base_device::DEVICE_CPU, base_device::DEVICE_GPU>; -template struct synchronize_memory_op, base_device::DEVICE_GPU, base_device::DEVICE_CPU>; -template struct synchronize_memory_op, base_device::DEVICE_GPU, base_device::DEVICE_GPU>; - -template struct cast_memory_op; -template struct cast_memory_op; -template struct cast_memory_op; -template struct cast_memory_op; -template struct cast_memory_op, - std::complex, - base_device::DEVICE_GPU, - base_device::DEVICE_GPU>; -template struct cast_memory_op, - std::complex, - base_device::DEVICE_GPU, - base_device::DEVICE_GPU>; -template struct cast_memory_op, - std::complex, - base_device::DEVICE_GPU, - base_device::DEVICE_GPU>; -template struct cast_memory_op, - std::complex, - base_device::DEVICE_GPU, - base_device::DEVICE_GPU>; -template struct cast_memory_op; -template struct cast_memory_op; -template struct cast_memory_op; -template struct cast_memory_op; -template struct cast_memory_op, - std::complex, - base_device::DEVICE_GPU, - base_device::DEVICE_CPU>; -template struct cast_memory_op, - std::complex, - base_device::DEVICE_GPU, - base_device::DEVICE_CPU>; -template struct cast_memory_op, - std::complex, - base_device::DEVICE_GPU, - base_device::DEVICE_CPU>; -template struct cast_memory_op, - std::complex, - base_device::DEVICE_GPU, - base_device::DEVICE_CPU>; -template struct cast_memory_op; -template struct cast_memory_op; -template struct cast_memory_op; -template struct cast_memory_op; -template struct cast_memory_op, - std::complex, - base_device::DEVICE_CPU, - base_device::DEVICE_GPU>; -template struct cast_memory_op, - std::complex, - base_device::DEVICE_CPU, - base_device::DEVICE_GPU>; -template struct cast_memory_op, - std::complex, - base_device::DEVICE_CPU, - base_device::DEVICE_GPU>; -template struct cast_memory_op, - std::complex, - base_device::DEVICE_CPU, - base_device::DEVICE_GPU>; - -template struct delete_memory_op; -template struct delete_memory_op; -template struct delete_memory_op; -template struct delete_memory_op, base_device::DEVICE_GPU>; -template struct delete_memory_op, base_device::DEVICE_GPU>; -#endif - -#ifdef __DSP - -template -struct resize_memory_op_mt -{ - void operator()(FPTYPE*& arr, const size_t size, const char* record_in) - { - if (arr != nullptr) - { - mtfunc::free_ht(arr); - } - arr = (FPTYPE*)mtfunc::malloc_ht(sizeof(FPTYPE) * size, GlobalV::MY_RANK); - std::string record_string; - if (record_in != nullptr) - { - record_string = record_in; - } - else - { - record_string = "no_record"; - } - - if (record_string != "no_record") - { - ModuleBase::Memory::record(record_string, sizeof(FPTYPE) * size); - } - } -}; - -template -struct delete_memory_op_mt -{ - void operator()(FPTYPE* arr) - { - mtfunc::free_ht(arr); - } -}; - - -template struct resize_memory_op_mt; -template struct resize_memory_op_mt; -template struct resize_memory_op_mt; -template struct resize_memory_op_mt, base_device::DEVICE_CPU>; -template struct resize_memory_op_mt, base_device::DEVICE_CPU>; - -template struct delete_memory_op_mt; -template struct delete_memory_op_mt; -template struct delete_memory_op_mt; -template struct delete_memory_op_mt, base_device::DEVICE_CPU>; -template struct delete_memory_op_mt, base_device::DEVICE_CPU>; -#endif - -template -void resize_memory(FPTYPE* arr, const size_t size, base_device::AbacusDevice_t device_type) -{ - if (device_type == base_device::AbacusDevice_t::CpuDevice){ - resize_memory_op()(arr, size); - } - else if (device_type == base_device::AbacusDevice_t::GpuDevice){ - resize_memory_op()(arr, size); - } -} - -template -void set_memory(FPTYPE* arr, const int var, const size_t size, base_device::AbacusDevice_t device_type){ - if (device_type == base_device::AbacusDevice_t::CpuDevice){ - set_memory_op()(arr, var, size); - } - else if (device_type == base_device::AbacusDevice_t::GpuDevice){ - set_memory_op()(arr, var, size); - } -} - -template -void synchronize_memory(FPTYPE* arr_out, const FPTYPE* arr_in, const size_t size, base_device::AbacusDevice_t device_type_out, base_device::AbacusDevice_t device_type_in){ - if (device_type_out == base_device::AbacusDevice_t::CpuDevice || device_type_in == base_device::AbacusDevice_t::CpuDevice){ - synchronize_memory_op()(arr_out, arr_in, size); - } - else if (device_type_out == base_device::AbacusDevice_t::CpuDevice || device_type_in == base_device::AbacusDevice_t::GpuDevice){ - synchronize_memory_op()(arr_out, arr_in, size); - } - else if (device_type_out == base_device::AbacusDevice_t::GpuDevice || device_type_in == base_device::AbacusDevice_t::CpuDevice){ - synchronize_memory_op()(arr_out, arr_in, size); - } - else if (device_type_out == base_device::AbacusDevice_t::GpuDevice || device_type_in == base_device::AbacusDevice_t::GpuDevice){ - synchronize_memory_op()(arr_out, arr_in, size); - } -} - -template -void cast_memory(FPTYPE_out* arr_out, const FPTYPE_in* arr_in, const size_t size, base_device::AbacusDevice_t device_type_out, base_device::AbacusDevice_t device_type_in) -{ - if (device_type_out == base_device::AbacusDevice_t::CpuDevice || device_type_in == base_device::AbacusDevice_t::CpuDevice){ - cast_memory_op()(arr_out, arr_in, size); - } - else if (device_type_out == base_device::AbacusDevice_t::CpuDevice || device_type_in == base_device::AbacusDevice_t::GpuDevice){ - cast_memory_op()(arr_out, arr_in, size); - } - else if (device_type_out == base_device::AbacusDevice_t::GpuDevice || device_type_in == base_device::AbacusDevice_t::CpuDevice){ - cast_memory_op()(arr_out, arr_in, size); - } - else if (device_type_out == base_device::AbacusDevice_t::GpuDevice || device_type_in == base_device::AbacusDevice_t::GpuDevice){ - cast_memory_op()(arr_out, arr_in, size); - } -} - -template -void delete_memory(FPTYPE* arr, base_device::AbacusDevice_t device_type) -{ - if (device_type == base_device::AbacusDevice_t::CpuDevice){ - delete_memory_op()(arr); - } - else if (device_type == base_device::AbacusDevice_t::GpuDevice){ - delete_memory_op()(arr); - } -} - -} // namespace memory -} // namespace base_device \ No newline at end of file diff --git a/source/module_base/module_device/memory_op.h b/source/module_base/module_device/memory_op.h deleted file mode 100644 index 30182649d3..0000000000 --- a/source/module_base/module_device/memory_op.h +++ /dev/null @@ -1,261 +0,0 @@ -#ifndef MODULE_DEVICE_MEMORY_H_ -#define MODULE_DEVICE_MEMORY_H_ - -#include "types.h" - -#include -#include - -namespace base_device -{ - -namespace memory -{ - -template -struct resize_memory_op -{ - /// @brief Allocate memory for a given pointer. Note this op will free the pointer first. - /// - /// Input Parameters - /// \param size : array size - /// \param record_string : label for memory record - /// - /// Output Parameters - /// \param arr : allocated array - void operator()(FPTYPE*& arr, const size_t size, const char* record_in = nullptr); -}; - -template -struct set_memory_op -{ - /// @brief memset for multi-device - /// - /// Input Parameters - /// \param var : the specified constant value - /// \param size : array size - /// - /// Output Parameters - /// \param arr : output array initialized by the input value - void operator()(FPTYPE* arr, const int var, const size_t size); -}; - -template -struct synchronize_memory_op -{ - /// @brief memcpy for multi-device - /// - /// Input Parameters - /// \param arr_in : input array - /// \param size : array size - /// - /// Output Parameters - /// \param arr_out : output array initialized by the input array - void operator()(FPTYPE* arr_out, - const FPTYPE* arr_in, - const size_t size); -}; - -template -struct cast_memory_op -{ - /// @brief memcpy for multi-device - /// - /// Input Parameters - /// \param arr_in : input array - /// \param size : array size - /// - /// Output Parameters - /// \param arr_out : output array initialized by the input array - void operator()(FPTYPE_out* arr_out, - const FPTYPE_in* arr_in, - const size_t size); -}; - -template -struct delete_memory_op -{ - /// @brief free memory for multi-device - /// - /// Input Parameters - /// \param arr : the input array - void operator()(FPTYPE* arr); -}; - -template -void resize_memory(FPTYPE* arr, const size_t size, base_device::AbacusDevice_t device_type = base_device::AbacusDevice_t::CpuDevice); - -template -void set_memory(FPTYPE* arr, const int var, const size_t size, base_device::AbacusDevice_t device_type = base_device::AbacusDevice_t::CpuDevice); - -template -void synchronize_memory(FPTYPE* arr_out, const FPTYPE* arr_in, const size_t size, base_device::AbacusDevice_t device_type_out, base_device::AbacusDevice_t device_type_in); - -template -void cast_memory(FPTYPE_out* arr_out, const FPTYPE_in* arr_in, const size_t size, base_device::AbacusDevice_t device_type_out, base_device::AbacusDevice_t device_type_in); - -template -void delete_memory(FPTYPE* arr, base_device::AbacusDevice_t device_type = base_device::AbacusDevice_t::CpuDevice); - -#if __CUDA || __UT_USE_CUDA || __ROCM || __UT_USE_ROCM -// Partially specialize operator for base_device::GpuDevice. -template -struct resize_memory_op -{ - void operator()(FPTYPE*& arr, - const size_t size, - const char* record_in = nullptr); -}; - -template -struct set_memory_op -{ - void operator()(FPTYPE* arr, const int var, const size_t size); -}; - -template -struct synchronize_memory_op -{ - void operator()(FPTYPE* arr_out, - const FPTYPE* arr_in, - const size_t size); -}; -template -struct synchronize_memory_op -{ - void operator()(FPTYPE* arr_out, - const FPTYPE* arr_in, - const size_t size); -}; -template -struct synchronize_memory_op -{ - void operator()(FPTYPE* arr_out, - const FPTYPE* arr_in, - const size_t size); - -}; - -template -struct delete_memory_op -{ - void operator()(FPTYPE* arr); -}; -#endif // __CUDA || __UT_USE_CUDA || __ROCM || __UT_USE_ROCM - -#ifdef __DSP - -template -struct resize_memory_op_mt -{ - /// @brief Allocate memory for a given pointer. Note this op will free the pointer first. - /// - /// Input Parameters - /// \param size : array size - /// \param record_string : label for memory record - /// - /// Output Parameters - /// \param arr : allocated array - void operator()(FPTYPE*& arr, const size_t size, const char* record_in = nullptr); -}; - -template -struct delete_memory_op_mt -{ - /// @brief free memory for multi-device - /// - /// Input Parameters - /// \param arr : the input array - void operator()(FPTYPE* arr); -}; - -#endif // __DSP - -} // end of namespace memory -} // end of namespace base_device - -using resmem_sh_op = base_device::memory::resize_memory_op; -using resmem_dh_op = base_device::memory::resize_memory_op; -using resmem_ch_op = base_device::memory::resize_memory_op, base_device::DEVICE_CPU>; -using resmem_zh_op = base_device::memory::resize_memory_op, base_device::DEVICE_CPU>; - -using resmem_sd_op = base_device::memory::resize_memory_op; -using resmem_dd_op = base_device::memory::resize_memory_op; -using resmem_cd_op = base_device::memory::resize_memory_op, base_device::DEVICE_GPU>; -using resmem_zd_op = base_device::memory::resize_memory_op, base_device::DEVICE_GPU>; - -using setmem_sh_op = base_device::memory::set_memory_op; -using setmem_dh_op = base_device::memory::set_memory_op; -using setmem_ch_op = base_device::memory::set_memory_op, base_device::DEVICE_CPU>; -using setmem_zh_op = base_device::memory::set_memory_op, base_device::DEVICE_CPU>; - -using setmem_sd_op = base_device::memory::set_memory_op; -using setmem_dd_op = base_device::memory::set_memory_op; -using setmem_cd_op = base_device::memory::set_memory_op, base_device::DEVICE_GPU>; -using setmem_zd_op = base_device::memory::set_memory_op, base_device::DEVICE_GPU>; - -using delmem_sh_op = base_device::memory::delete_memory_op; -using delmem_dh_op = base_device::memory::delete_memory_op; -using delmem_ch_op = base_device::memory::delete_memory_op, base_device::DEVICE_CPU>; -using delmem_zh_op = base_device::memory::delete_memory_op, base_device::DEVICE_CPU>; - -using delmem_sd_op = base_device::memory::delete_memory_op; -using delmem_dd_op = base_device::memory::delete_memory_op; -using delmem_cd_op = base_device::memory::delete_memory_op, base_device::DEVICE_GPU>; -using delmem_zd_op = base_device::memory::delete_memory_op, base_device::DEVICE_GPU>; - -using syncmem_s2s_h2h_op - = base_device::memory::synchronize_memory_op; -using syncmem_s2s_h2d_op - = base_device::memory::synchronize_memory_op; -using syncmem_s2s_d2h_op - = base_device::memory::synchronize_memory_op; -using syncmem_d2d_h2h_op - = base_device::memory::synchronize_memory_op; -using syncmem_d2d_h2d_op - = base_device::memory::synchronize_memory_op; -using syncmem_d2d_d2h_op - = base_device::memory::synchronize_memory_op; - -using syncmem_c2c_h2h_op - = base_device::memory::synchronize_memory_op, base_device::DEVICE_CPU, base_device::DEVICE_CPU>; -using syncmem_c2c_h2d_op - = base_device::memory::synchronize_memory_op, base_device::DEVICE_GPU, base_device::DEVICE_CPU>; -using syncmem_c2c_d2h_op - = base_device::memory::synchronize_memory_op, base_device::DEVICE_CPU, base_device::DEVICE_GPU>; -using syncmem_z2z_h2h_op - = base_device::memory::synchronize_memory_op, base_device::DEVICE_CPU, base_device::DEVICE_CPU>; -using syncmem_z2z_h2d_op - = base_device::memory::synchronize_memory_op, base_device::DEVICE_GPU, base_device::DEVICE_CPU>; -using syncmem_z2z_d2h_op - = base_device::memory::synchronize_memory_op, base_device::DEVICE_CPU, base_device::DEVICE_GPU>; - -using castmem_s2d_h2h_op - = base_device::memory::cast_memory_op; -using castmem_s2d_h2d_op - = base_device::memory::cast_memory_op; -using castmem_s2d_d2h_op - = base_device::memory::cast_memory_op; -using castmem_d2s_h2h_op - = base_device::memory::cast_memory_op; -using castmem_d2s_h2d_op - = base_device::memory::cast_memory_op; -using castmem_d2s_d2h_op - = base_device::memory::cast_memory_op; - -using castmem_c2z_h2h_op = base_device::memory:: - cast_memory_op, std::complex, base_device::DEVICE_CPU, base_device::DEVICE_CPU>; -using castmem_c2z_h2d_op = base_device::memory:: - cast_memory_op, std::complex, base_device::DEVICE_GPU, base_device::DEVICE_CPU>; -using castmem_c2z_d2h_op = base_device::memory:: - cast_memory_op, std::complex, base_device::DEVICE_CPU, base_device::DEVICE_GPU>; -using castmem_z2c_h2h_op = base_device::memory:: - cast_memory_op, std::complex, base_device::DEVICE_CPU, base_device::DEVICE_CPU>; -using castmem_z2c_h2d_op = base_device::memory:: - cast_memory_op, std::complex, base_device::DEVICE_GPU, base_device::DEVICE_CPU>; -using castmem_z2c_d2h_op = base_device::memory:: - cast_memory_op, std::complex, base_device::DEVICE_CPU, base_device::DEVICE_GPU>; - -static base_device::DEVICE_CPU* cpu_ctx = {}; -static base_device::DEVICE_GPU* gpu_ctx = {}; -#endif // MODULE_DEVICE_MEMORY_H_ \ No newline at end of file diff --git a/source/module_base/module_device/rocm/memory_op.hip.cu b/source/module_base/module_device/rocm/memory_op.hip.cu deleted file mode 100644 index 287a5990c0..0000000000 --- a/source/module_base/module_device/rocm/memory_op.hip.cu +++ /dev/null @@ -1,258 +0,0 @@ -#include "module_base/module_device/memory_op.h" - -#include -#include -#include - -#include -#include - -#define THREADS_PER_BLOCK 256 - -namespace base_device -{ -namespace memory -{ - -template -__global__ void cast_memory(FPTYPE_out* out, const FPTYPE_in* in, const int size) -{ - int idx = blockIdx.x * blockDim.x + threadIdx.x; - if (idx >= size) - { - return; - } - out[idx] = static_cast(in[idx]); -} - -template -__global__ void cast_memory(std::complex* out, const std::complex* in, const int size) -{ - int idx = blockIdx.x * blockDim.x + threadIdx.x; - if (idx >= size) - { - return; - } - auto* _out = reinterpret_cast*>(out); - const auto* _in = reinterpret_cast*>(in); - _out[idx] = static_cast>(_in[idx]); -} - -template -void resize_memory_op::operator()(FPTYPE*& arr, - const size_t size, - const char* record_in) -{ - if (arr != nullptr) - { - delete_memory_op()(arr); - } - hipErrcheck(hipMalloc((void**)&arr, sizeof(FPTYPE) * size)); -} - -template -void set_memory_op::operator()(FPTYPE* arr, - const int var, - const size_t size) -{ - hipErrcheck(hipMemset(arr, var, sizeof(FPTYPE) * size)); -} - -template -void synchronize_memory_op::operator()( - FPTYPE* arr_out, - const FPTYPE* arr_in, - const size_t size) -{ - hipErrcheck(hipMemcpy(arr_out, arr_in, sizeof(FPTYPE) * size, hipMemcpyDeviceToHost)); -} - -template -void synchronize_memory_op::operator()( - FPTYPE* arr_out, - const FPTYPE* arr_in, - const size_t size) -{ - hipErrcheck(hipMemcpy(arr_out, arr_in, sizeof(FPTYPE) * size, hipMemcpyHostToDevice)); -} - -template -void synchronize_memory_op::operator()( - FPTYPE* arr_out, - const FPTYPE* arr_in, - const size_t size) -{ - hipErrcheck(hipMemcpy(arr_out, arr_in, sizeof(FPTYPE) * size, hipMemcpyDeviceToDevice)); -} - -template -struct cast_memory_op { - void operator()(FPTYPE_out* arr_out, - const FPTYPE_in* arr_in, - const size_t size) { - - if (size == 0) {return;} - const int block = (size + THREADS_PER_BLOCK - 1) / THREADS_PER_BLOCK; - hipLaunchKernelGGL(cast_memory, dim3(block), dim3(THREADS_PER_BLOCK), 0, 0, arr_out, arr_in, size); - hipCheckOnDebug(); - } -}; - -template -struct cast_memory_op { - void operator()(FPTYPE_out* arr_out, - const FPTYPE_in* arr_in, - const size_t size) { - - if (size == 0) {return;} - // No need to cast the memory if the data types are the same. - if (std::is_same::value) - { - synchronize_memory_op()(arr_out, - reinterpret_cast(arr_in), - size); - return; - } - FPTYPE_in * arr = nullptr; - hipErrcheck(hipMalloc((void **)&arr, sizeof(FPTYPE_in) * size)); - hipErrcheck(hipMemcpy(arr, arr_in, sizeof(FPTYPE_in) * size, hipMemcpyHostToDevice)); - const int block = (size + THREADS_PER_BLOCK - 1) / THREADS_PER_BLOCK; - hipLaunchKernelGGL(cast_memory, dim3(block), dim3(THREADS_PER_BLOCK), 0, 0, arr_out, arr, size); - hipCheckOnDebug(); - hipErrcheck(hipFree(arr)); - } -}; - -template -struct cast_memory_op { - void operator()(FPTYPE_out* arr_out, - const FPTYPE_in* arr_in, - const size_t size) { - - if (size == 0) {return;} - // No need to cast the memory if the data types are the same. - if (std::is_same::value) - { - synchronize_memory_op()(arr_out, - reinterpret_cast(arr_in), - size); - return; - } - auto * arr = (FPTYPE_in*) malloc(sizeof(FPTYPE_in) * size); - hipErrcheck(hipMemcpy(arr, arr_in, sizeof(FPTYPE_in) * size, hipMemcpyDeviceToHost)); - for (int ii = 0; ii < size; ii++) { - arr_out[ii] = static_cast(arr[ii]); - } - free(arr); - } -}; - -template -void delete_memory_op::operator()(FPTYPE* arr) -{ - hipErrcheck(hipFree(arr)); -} - -template struct resize_memory_op; -template struct resize_memory_op; -template struct resize_memory_op; -template struct resize_memory_op, base_device::DEVICE_GPU>; -template struct resize_memory_op, base_device::DEVICE_GPU>; - -template struct set_memory_op; -template struct set_memory_op; -template struct set_memory_op; -template struct set_memory_op, base_device::DEVICE_GPU>; -template struct set_memory_op, base_device::DEVICE_GPU>; - -template struct synchronize_memory_op; -template struct synchronize_memory_op; -template struct synchronize_memory_op; -template struct synchronize_memory_op; -template struct synchronize_memory_op; -template struct synchronize_memory_op; -template struct synchronize_memory_op; -template struct synchronize_memory_op; -template struct synchronize_memory_op; -template struct synchronize_memory_op, base_device::DEVICE_CPU, base_device::DEVICE_GPU>; -template struct synchronize_memory_op, base_device::DEVICE_GPU, base_device::DEVICE_CPU>; -template struct synchronize_memory_op, base_device::DEVICE_GPU, base_device::DEVICE_GPU>; -template struct synchronize_memory_op, base_device::DEVICE_CPU, base_device::DEVICE_GPU>; -template struct synchronize_memory_op, base_device::DEVICE_GPU, base_device::DEVICE_CPU>; -template struct synchronize_memory_op, base_device::DEVICE_GPU, base_device::DEVICE_GPU>; - -template struct cast_memory_op; -template struct cast_memory_op; -template struct cast_memory_op; -template struct cast_memory_op; -template struct cast_memory_op, - std::complex, - base_device::DEVICE_GPU, - base_device::DEVICE_GPU>; -template struct cast_memory_op, - std::complex, - base_device::DEVICE_GPU, - base_device::DEVICE_GPU>; -template struct cast_memory_op, - std::complex, - base_device::DEVICE_GPU, - base_device::DEVICE_GPU>; -template struct cast_memory_op, - std::complex, - base_device::DEVICE_GPU, - base_device::DEVICE_GPU>; -template struct cast_memory_op, float, base_device::DEVICE_GPU, base_device::DEVICE_GPU>; -template struct cast_memory_op, double, base_device::DEVICE_GPU, base_device::DEVICE_GPU>; -template struct cast_memory_op; -template struct cast_memory_op; -template struct cast_memory_op; -template struct cast_memory_op; -template struct cast_memory_op, - std::complex, - base_device::DEVICE_GPU, - base_device::DEVICE_CPU>; -template struct cast_memory_op, - std::complex, - base_device::DEVICE_GPU, - base_device::DEVICE_CPU>; -template struct cast_memory_op, - std::complex, - base_device::DEVICE_GPU, - base_device::DEVICE_CPU>; -template struct cast_memory_op, - std::complex, - base_device::DEVICE_GPU, - base_device::DEVICE_CPU>; -template struct cast_memory_op; -template struct cast_memory_op; -template struct cast_memory_op; -template struct cast_memory_op; -template struct cast_memory_op, - std::complex, - base_device::DEVICE_CPU, - base_device::DEVICE_GPU>; -template struct cast_memory_op, - std::complex, - base_device::DEVICE_CPU, - base_device::DEVICE_GPU>; -template struct cast_memory_op, - std::complex, - base_device::DEVICE_CPU, - base_device::DEVICE_GPU>; -template struct cast_memory_op, - std::complex, - base_device::DEVICE_CPU, - base_device::DEVICE_GPU>; - -template struct delete_memory_op; -template struct delete_memory_op; -template struct delete_memory_op; -template struct delete_memory_op, base_device::DEVICE_GPU>; -template struct delete_memory_op, base_device::DEVICE_GPU>; -template struct delete_memory_op; -template struct delete_memory_op; -template struct delete_memory_op*, base_device::DEVICE_GPU>; -template struct delete_memory_op*, base_device::DEVICE_GPU>; - -} // namespace memory -} // end of namespace base_device \ No newline at end of file diff --git a/source/module_base/module_device/test/CMakeLists.txt b/source/module_base/module_device/test/CMakeLists.txt deleted file mode 100644 index 732b30fd1f..0000000000 --- a/source/module_base/module_device/test/CMakeLists.txt +++ /dev/null @@ -1,5 +0,0 @@ -AddTest( - TARGET MODULE_BASE_DEVICE_Unittests - LIBS parameter ${math_libs} base device - SOURCES memory_test.cpp device_test.cpp -) \ No newline at end of file diff --git a/source/module_base/module_device/test/device_test.cpp b/source/module_base/module_device/test/device_test.cpp deleted file mode 100644 index e14392999e..0000000000 --- a/source/module_base/module_device/test/device_test.cpp +++ /dev/null @@ -1,33 +0,0 @@ -#include "module_base/module_device/device.h" - -#include -#include -#include - -class TestModulePsiDevice : public ::testing::Test -{ - protected: - const base_device::DEVICE_CPU* cpu_ctx = {}; - const base_device::DEVICE_GPU* gpu_ctx = {}; - - void SetUp() override - { - } - void TearDown() override - { - } -}; - -TEST_F(TestModulePsiDevice, get_device_type_cpu) -{ - base_device::AbacusDevice_t device = base_device::get_device_type(cpu_ctx); - EXPECT_EQ(device, base_device::CpuDevice); -} - -#if __UT_USE_CUDA || __UT_USE_ROCM -TEST_F(TestModulePsiDevice, get_device_type_gpu) -{ - base_device::AbacusDevice_t device = base_device::get_device_type(gpu_ctx); - EXPECT_EQ(device, base_device::GpuDevice); -} -#endif // __UT_USE_CUDA || __UT_USE_ROCM diff --git a/source/module_base/module_device/test/memory_test.cpp b/source/module_base/module_device/test/memory_test.cpp deleted file mode 100644 index 39c5c25d52..0000000000 --- a/source/module_base/module_device/test/memory_test.cpp +++ /dev/null @@ -1,350 +0,0 @@ -#include "module_base/module_device/memory_op.h" - -#include -#include -#include - -#if __UT_USE_CUDA || __UT_USE_ROCM -#include -#include -#include -#include -#include -#include -#include -#include -#include -#endif - -class TestModulePsiMemory : public ::testing::Test -{ - protected: - const std::vector xx - = {-0.65412617, -0.74208893, -2.21731157, 0.42540039, 3.36373004, -2.51647562, -2.985111, -0.53251562, - 0.37908265, 0.81605825, 1.66281318, 2.71761869, 2.2010268, 0.65498149, 1.51153638, 0.71501482, - 0.53546578, 1.4564317, -2.36701143, 1.23009056, 3.41302551, -2.3175205, -0.27628221, -1.35701656}; - - const std::vector> z_xx = {{-0.65412617, -0.74208893}, - {-2.21731157, 0.42540039}, - {3.36373004, -2.51647562}, - {-2.985111, -0.53251562}, - {0.37908265, 0.81605825}, - {1.66281318, 2.71761869}, - {2.2010268, 0.65498149}, - {1.51153638, 0.71501482}, - {0.53546578, 1.4564317}, - {-2.36701143, 1.23009056}, - {3.41302551, -2.3175205}, - {-0.27628221, -1.35701656}}; - - const int z_dim = z_xx.size(); - - const base_device::DEVICE_CPU* cpu_ctx = {}; - const base_device::DEVICE_GPU* gpu_ctx = {}; - - void SetUp() override - { - } - void TearDown() override - { - } - - using set_memory_double_cpu_op = base_device::memory::set_memory_op; - using set_memory_complex_double_cpu_op - = base_device::memory::set_memory_op, base_device::DEVICE_CPU>; - using resize_memory_double_cpu_op = base_device::memory::resize_memory_op; - using resize_memory_comlex_double_cpu_op - = base_device::memory::resize_memory_op, base_device::DEVICE_CPU>; - using synchronize_memory_double_cpu_to_cpu_op - = base_device::memory::synchronize_memory_op; - using synchronize_memory_complex_double_cpu_to_cpu_op - = base_device::memory::synchronize_memory_op, base_device::DEVICE_CPU, base_device::DEVICE_CPU>; - using delete_memory_double_cpu_op = base_device::memory::delete_memory_op; - using delete_memory_complex_double_cpu_op - = base_device::memory::delete_memory_op, base_device::DEVICE_CPU>; - -#if __UT_USE_CUDA || __UT_USE_ROCM - using set_memory_double_gpu_op = base_device::memory::set_memory_op; - using set_memory_complex_double_gpu_op - = base_device::memory::set_memory_op, base_device::DEVICE_GPU>; - using resize_memory_double_gpu_op = base_device::memory::resize_memory_op; - using resize_memory_comlex_double_gpu_op - = base_device::memory::resize_memory_op, base_device::DEVICE_GPU>; - using synchronize_memory_double_cpu_to_gpu_op - = base_device::memory::synchronize_memory_op; - using synchronize_memory_double_gpu_to_cpu_op - = base_device::memory::synchronize_memory_op; - using synchronize_memory_double_gpu_to_gpu_op - = base_device::memory::synchronize_memory_op; - using synchronize_memory_complex_double_cpu_to_gpu_op - = base_device::memory::synchronize_memory_op, base_device::DEVICE_GPU, base_device::DEVICE_CPU>; - using synchronize_memory_complex_double_gpu_to_cpu_op - = base_device::memory::synchronize_memory_op, base_device::DEVICE_CPU, base_device::DEVICE_GPU>; - using synchronize_memory_complex_double_gpu_to_gpu_op - = base_device::memory::synchronize_memory_op, base_device::DEVICE_GPU, base_device::DEVICE_GPU>; - using delete_memory_double_gpu_op = base_device::memory::delete_memory_op; - using delete_memory_complex_double_gpu_op - = base_device::memory::delete_memory_op, base_device::DEVICE_GPU>; -#endif // __UT_USE_CUDA || __UT_USE_ROCM -}; - -TEST_F(TestModulePsiMemory, set_memory_op_double_cpu) -{ - std::vector v_xx = xx; - set_memory_double_cpu_op()(v_xx.data(), 0, xx.size()); - for (int ii = 0; ii < xx.size(); ii++) - { - EXPECT_EQ(v_xx[ii], 0.0); - } -} - -TEST_F(TestModulePsiMemory, set_memory_op_complex_double_cpu) -{ - std::vector> vz_xx = z_xx; - set_memory_complex_double_cpu_op()(vz_xx.data(), 0, z_xx.size()); - for (int ii = 0; ii < z_xx.size(); ii++) - { - EXPECT_EQ(vz_xx[ii], std::complex(0.0, 0.0)); - } -} - -TEST_F(TestModulePsiMemory, resize_memory_op_double_cpu) -{ - double* xx_tmp = NULL; - resize_memory_double_cpu_op()(xx_tmp, xx.size()); - for (int ii = 0; ii < xx.size(); ii++) - { - xx_tmp[ii] = xx[ii]; - } - for (int ii = 0; ii < xx.size(); ii++) - { - EXPECT_EQ(xx_tmp[ii], xx[ii]); - } - free(xx_tmp); -} - -TEST_F(TestModulePsiMemory, resize_memory_op_comlex_double_cpu) -{ - std::complex* z_xx_tmp = NULL; - resize_memory_comlex_double_cpu_op()(z_xx_tmp, z_xx.size()); - for (int ii = 0; ii < z_xx.size(); ii++) - { - z_xx_tmp[ii] = z_xx[ii]; - } - for (int ii = 0; ii < z_xx.size(); ii++) - { - EXPECT_EQ(z_xx_tmp[ii], z_xx[ii]); - } - free(z_xx_tmp); -} - -TEST_F(TestModulePsiMemory, synchronize_memory_op_double_cpu_to_cpu) -{ - std::vector h_xx(xx.size(), 0); - synchronize_memory_double_cpu_to_cpu_op()(h_xx.data(), xx.data(), xx.size()); - for (int ii = 0; ii < z_xx.size(); ii++) - { - EXPECT_EQ(h_xx[ii], xx[ii]); - } -} - -TEST_F(TestModulePsiMemory, synchronize_memory_op_complex_double_cpu_to_cpu) -{ - std::vector> hz_xx(z_xx.size(), std::complex(0, 0)); - synchronize_memory_complex_double_cpu_to_cpu_op()(hz_xx.data(), z_xx.data(), z_xx.size()); - for (int ii = 0; ii < z_xx.size(); ii++) - { - EXPECT_EQ(hz_xx[ii], z_xx[ii]); - } -} - -TEST_F(TestModulePsiMemory, delete_memory_op_double_cpu) -{ - double* h_xx = (double*)malloc(sizeof(double) * xx.size()); - delete_memory_double_cpu_op()(h_xx); -} - -TEST_F(TestModulePsiMemory, delete_memory_op_complex_double_cpu) -{ - std::complex* hz_xx = (std::complex*)malloc(sizeof(std::complex) * z_xx.size()); - delete_memory_complex_double_cpu_op()(hz_xx); -} - -#if __UT_USE_CUDA || __UT_USE_ROCM -TEST_F(TestModulePsiMemory, set_memory_op_double_gpu) -{ - thrust::device_ptr d_xx = thrust::device_malloc(xx.size()); - thrust::copy(xx.begin(), xx.end(), d_xx); - set_memory_double_gpu_op()(thrust::raw_pointer_cast(d_xx), 0, xx.size()); - thrust::host_vector h_xx(xx.size()); - thrust::copy(d_xx, d_xx + xx.size(), h_xx.begin()); - for (int ii = 0; ii < xx.size(); ii++) - { - EXPECT_EQ(h_xx[ii], 0.0); - } -} - -TEST_F(TestModulePsiMemory, set_memory_op_complex_double_gpu) -{ - thrust::device_ptr> dz_xx = thrust::device_malloc>(z_xx.size()); - thrust::copy(z_xx.begin(), z_xx.end(), dz_xx); - set_memory_complex_double_gpu_op()(thrust::raw_pointer_cast(dz_xx), 0, z_xx.size()); - thrust::host_vector> h_xx(z_xx.size()); - thrust::copy(dz_xx, dz_xx + z_xx.size(), h_xx.begin()); - for (int ii = 0; ii < z_xx.size(); ii++) - { - EXPECT_EQ(h_xx[ii], std::complex(0.0, 0.0)); - } -} - -TEST_F(TestModulePsiMemory, resize_memory_op_double_gpu) -{ - double* xx_tmp = NULL; - resize_memory_double_gpu_op()(xx_tmp, xx.size()); - - thrust::device_ptr d_xx(xx_tmp); - thrust::copy(xx.begin(), xx.end(), d_xx); - - thrust::host_vector h_xx(xx.size()); - thrust::copy(d_xx, d_xx + xx.size(), h_xx.begin()); - for (int ii = 0; ii < xx.size(); ii++) - { - EXPECT_EQ(h_xx[ii], xx[ii]); - } - thrust::device_free(d_xx); -} - -TEST_F(TestModulePsiMemory, resize_memory_op_complex_double_gpu) -{ - std::complex* z_xx_tmp = NULL; - resize_memory_comlex_double_gpu_op()(z_xx_tmp, z_xx.size()); - - thrust::device_ptr> dz_xx(z_xx_tmp); - thrust::copy(z_xx.begin(), z_xx.end(), dz_xx); - - thrust::host_vector> h_z_xx(z_xx.size()); - thrust::copy(dz_xx, dz_xx + z_xx.size(), h_z_xx.begin()); - for (int ii = 0; ii < z_xx.size(); ii++) - { - EXPECT_EQ(h_z_xx[ii], z_xx[ii]); - } - thrust::device_free(dz_xx); -} - -TEST_F(TestModulePsiMemory, synchronize_memory_op_double_cpu_to_gpu) -{ - thrust::device_ptr d_xx = thrust::device_malloc(xx.size()); - std::vector hv_xx(xx.size(), 0); - thrust::copy(hv_xx.begin(), hv_xx.end(), d_xx); - synchronize_memory_double_cpu_to_gpu_op()(thrust::raw_pointer_cast(d_xx), xx.data(), xx.size()); - - thrust::host_vector h_xx(xx.size()); - thrust::copy(d_xx, d_xx + xx.size(), h_xx.begin()); - for (int ii = 0; ii < xx.size(); ii++) - { - EXPECT_EQ(h_xx[ii], xx[ii]); - } - thrust::device_free(d_xx); -} - -TEST_F(TestModulePsiMemory, synchronize_memory_op_double_gpu_to_cpu) -{ - thrust::device_ptr d_xx = thrust::device_malloc(xx.size()); - thrust::copy(xx.begin(), xx.end(), d_xx); - thrust::host_vector h_xx(xx.size()); - synchronize_memory_double_gpu_to_cpu_op()(thrust::raw_pointer_cast(h_xx.data()), - thrust::raw_pointer_cast(d_xx), - xx.size()); - - for (int ii = 0; ii < xx.size(); ii++) - { - EXPECT_EQ(h_xx[ii], xx[ii]); - } - thrust::device_free(d_xx); -} - -TEST_F(TestModulePsiMemory, synchronize_memory_op_double_gpu_to_gpu) -{ - thrust::device_ptr d1_xx = thrust::device_malloc(xx.size()); - thrust::device_ptr d2_xx = thrust::device_malloc(xx.size()); - thrust::copy(xx.begin(), xx.end(), d1_xx); - synchronize_memory_double_gpu_to_gpu_op()(thrust::raw_pointer_cast(d2_xx), - thrust::raw_pointer_cast(d1_xx), - xx.size()); - - thrust::host_vector h_xx(xx.size()); - thrust::copy(d2_xx, d2_xx + xx.size(), h_xx.begin()); - for (int ii = 0; ii < xx.size(); ii++) - { - EXPECT_EQ(h_xx[ii], xx[ii]); - } - thrust::device_free(thrust::device_ptr(d1_xx)); - thrust::device_free(thrust::device_ptr(d2_xx)); -} - -TEST_F(TestModulePsiMemory, synchronize_memory_op_complex_double_cpu_to_gpu) -{ - thrust::device_ptr> dz_xx = thrust::device_malloc>(z_xx.size()); - std::vector> hvz_xx(z_xx.size(), 0); - thrust::copy(hvz_xx.begin(), hvz_xx.end(), dz_xx); - synchronize_memory_complex_double_cpu_to_gpu_op()(thrust::raw_pointer_cast(dz_xx), - z_xx.data(), - z_xx.size()); - - thrust::host_vector> hz_xx(z_xx.size()); - thrust::copy(dz_xx, dz_xx + z_xx.size(), hz_xx.begin()); - for (int ii = 0; ii < z_xx.size(); ii++) - { - EXPECT_EQ(hz_xx[ii], z_xx[ii]); - } - thrust::device_free(dz_xx); -} - -TEST_F(TestModulePsiMemory, synchronize_memory_op_complex_double_gpu_to_cpu) -{ - thrust::device_ptr> dz_xx = thrust::device_malloc>(z_xx.size()); - thrust::copy(z_xx.begin(), z_xx.end(), dz_xx); - thrust::host_vector> hz_xx(z_xx.size()); - synchronize_memory_complex_double_gpu_to_cpu_op()(thrust::raw_pointer_cast(hz_xx.data()), - thrust::raw_pointer_cast(dz_xx), - z_xx.size()); - - for (int ii = 0; ii < z_xx.size(); ii++) - { - EXPECT_EQ(hz_xx[ii], z_xx[ii]); - } - thrust::device_free(dz_xx); -} - -TEST_F(TestModulePsiMemory, synchronize_memory_op_complex_double_gpu_to_gpu) -{ - thrust::device_ptr> dz1_xx = thrust::device_malloc>(z_xx.size()); - thrust::device_ptr> dz2_xx = thrust::device_malloc>(z_xx.size()); - thrust::copy(z_xx.begin(), z_xx.end(), dz1_xx); - synchronize_memory_complex_double_gpu_to_gpu_op()(thrust::raw_pointer_cast(dz2_xx), - thrust::raw_pointer_cast(dz1_xx), - z_xx.size()); - - thrust::host_vector> h_xx(z_xx.size()); - thrust::copy(dz2_xx, dz2_xx + z_xx.size(), h_xx.begin()); - for (int ii = 0; ii < z_xx.size(); ii++) - { - EXPECT_EQ(h_xx[ii], z_xx[ii]); - } - thrust::device_free(thrust::device_ptr>(dz1_xx)); - thrust::device_free(thrust::device_ptr>(dz2_xx)); -} - -TEST_F(TestModulePsiMemory, delete_memory_op_double_gpu) -{ - thrust::device_ptr d_xx = thrust::device_malloc(xx.size()); - delete_memory_double_gpu_op()(thrust::raw_pointer_cast(d_xx)); -} - -TEST_F(TestModulePsiMemory, delete_memory_op_complex_double_gpu) -{ - thrust::device_ptr> dz_xx = thrust::device_malloc>(z_xx.size()); - delete_memory_complex_double_gpu_op()(thrust::raw_pointer_cast(dz_xx)); -} - -#endif // __UT_USE_CUDA || __UT_USE_ROCM diff --git a/source/module_base/module_device/types.h b/source/module_base/module_device/types.h deleted file mode 100644 index 81413006f4..0000000000 --- a/source/module_base/module_device/types.h +++ /dev/null @@ -1,21 +0,0 @@ -#ifndef MODULE_TYPES_H_ -#define MODULE_TYPES_H_ - -namespace base_device -{ - -struct DEVICE_CPU; -struct DEVICE_GPU; -struct DEVICE_DSP; - -enum AbacusDevice_t -{ - UnKnown, - CpuDevice, - GpuDevice, - DspDevice -}; - -} // namespace base_device - -#endif // MODULE_TYPES_H_ \ No newline at end of file diff --git a/source/module_base/module_mixing/broyden_mixing.cpp b/source/module_base/module_mixing/broyden_mixing.cpp deleted file mode 100644 index 0d769ede0e..0000000000 --- a/source/module_base/module_mixing/broyden_mixing.cpp +++ /dev/null @@ -1,203 +0,0 @@ -#include "broyden_mixing.h" - -#include "module_base/lapack_connector.h" -#include "module_base/memory.h" -#include "module_base/module_container/base/third_party/blas.h" -#include "module_base/timer.h" -#include "module_base/tool_title.h" -namespace Base_Mixing -{ -template void Broyden_Mixing::tem_push_data(Mixing_Data& mdata, - const double* data_in, - const double* data_out, - std::function screen, - std::function mix, - const bool& need_calcoef); -template void Broyden_Mixing::tem_push_data( - Mixing_Data& mdata, - const std::complex* data_in, - const std::complex* data_out, - std::function*)> screen, - std::function*, const std::complex*, const std::complex*)> mix, - const bool& need_calcoef); - -template -void Broyden_Mixing::tem_push_data(Mixing_Data& mdata, - const FPTYPE* data_in, - const FPTYPE* data_out, - std::function screen, - std::function mix, - const bool& need_calcoef) -{ - const size_t length = mdata.length; - std::vector F_tmp(length); -#ifdef _OPENMP -#pragma omp parallel for schedule(static, 4096 / sizeof(FPTYPE)) -#endif - for (int i = 0; i < length; ++i) - { - F_tmp[i] = data_out[i] - data_in[i]; - } - - // get screened F - if (screen != nullptr) - screen(F_tmp.data()); - - // container::Tensor data = data_in + mixing_beta * F; - std::vector data(length); - mix(data.data(), data_in, F_tmp.data()); - - mdata.push(data.data()); - - if (!need_calcoef) - return; - - if (address != &mdata && address != nullptr) - ModuleBase::WARNING_QUIT( - "Broyden_Mixing", - "One Broyden_Mixing object can only bind one Mixing_Data object to calculate coefficients"); - - FPTYPE* FP_dF = static_cast(dF); - FPTYPE* FP_F = static_cast(F); - if (mdata.ndim_use == 1) - { - address = &mdata; - // allocate - if (F != nullptr) - free(F); - F = malloc(sizeof(FPTYPE) * length); - FP_F = static_cast(F); - if (dF != nullptr) - free(dF); - dF = malloc(sizeof(FPTYPE) * length * mixing_ndim); - FP_dF = static_cast(dF); -#ifdef _OPENMP -#pragma omp parallel for schedule(static, 4096 / sizeof(FPTYPE)) -#endif - for (int i = 0; i < length; ++i) - { - FP_F[i] = F_tmp[i]; - } - } - else - { - this->ndim_cal_dF = std::min(this->ndim_cal_dF + 1, this->mixing_ndim); - start_dF = (this->start_dF + 1) % this->mixing_ndim; -#ifdef _OPENMP -#pragma omp parallel for schedule(static, 4096 / sizeof(FPTYPE)) -#endif - for (int i = 0; i < length; ++i) - { - FP_F[i] = F_tmp[i]; - // dF{n} = F{n-1} - F{n} = -(F{n} - F{n-1}) - FP_dF[start_dF * length + i] -= FP_F[i]; - } - } -}; - -template void Broyden_Mixing::tem_cal_coef(const Mixing_Data& mdata, - std::function inner_product); -template void Broyden_Mixing::tem_cal_coef( - const Mixing_Data& mdata, - std::function*, std::complex*)> inner_product); - -template -void Broyden_Mixing::tem_cal_coef(const Mixing_Data& mdata, std::function inner_product) -{ - ModuleBase::TITLE("Broyden_Mixing", "Simplified_Broyden_mixing"); - ModuleBase::timer::tick("Broyden_Mixing", "tem_cal_coef"); - - if (address != &mdata && address != nullptr) - { - ModuleBase::WARNING_QUIT( - "Broyden_mixing", - "One Broyden_Mixing object can only bind one Mixing_Data object to calculate coefficients"); - } - - const int length = mdata.length; - FPTYPE* FP_dF = static_cast(dF); - FPTYPE* FP_F = static_cast(F); - - if (ndim_cal_dF > 0) - { - ModuleBase::matrix beta_tmp(ndim_cal_dF, ndim_cal_dF); - // beta(i, j) = - for (int i = 0; i < ndim_cal_dF; ++i) - { - FPTYPE* dFi = FP_dF + i * length; - for (int j = i; j < ndim_cal_dF; ++j) - { - if (i != start_dF && j != start_dF) - { - beta_tmp(i, j) = beta(i, j); - } - else - { - FPTYPE* dFj = FP_dF + j * length; - beta(i, j) = beta_tmp(i, j) = inner_product(dFi, dFj); - } - if (j != i) - { - beta_tmp(j, i) = beta_tmp(i, j); - } - } - } - double* work = new double[ndim_cal_dF]; // workspace - int* iwork = new int[ndim_cal_dF]; // ipiv - char uu = 'U'; - int info = 0; - int m = 1; - // gamma means the coeficients for mixing - // but now gamma store , namely c - std::vector gamma(ndim_cal_dF); - for (int i = 0; i < ndim_cal_dF; ++i) - { - FPTYPE* dFi = FP_dF + i * length; - gamma[i] = inner_product(dFi, FP_F); - } - - // solve aG = c - dsysv_(&uu, - &ndim_cal_dF, - &m, - beta_tmp.c, - &ndim_cal_dF, - iwork, - gamma.data(), - &ndim_cal_dF, - work, - &ndim_cal_dF, - &info); - - if (info != 0) - { - ModuleBase::WARNING_QUIT("Charge_Mixing", "Error when DSYSV."); - } - - // after solving, gamma store the coeficients for mixing - coef[mdata.start] = 1 + gamma[dFindex_move(0)]; - for (int i = 1; i < ndim_cal_dF; ++i) - { - coef[mdata.index_move(-i)] = gamma[dFindex_move(-i)] - gamma[dFindex_move(-i + 1)]; - } - coef[mdata.index_move(-ndim_cal_dF)] = -gamma[dFindex_move(-ndim_cal_dF + 1)]; - - delete[] work; - delete[] iwork; - } - else - { - coef[0] = 1.0; - } - - FPTYPE* dFnext = FP_dF + dFindex_move(1) * length; -#ifdef _OPENMP -#pragma omp parallel for schedule(static, 4096 / sizeof(FPTYPE)) -#endif - for (int i = 0; i < length; ++i) - { - dFnext[i] = FP_F[i]; - } - ModuleBase::timer::tick("Broyden_Mixing", "tem_cal_coef"); -}; -} // namespace Base_Mixing diff --git a/source/module_base/module_mixing/broyden_mixing.h b/source/module_base/module_mixing/broyden_mixing.h deleted file mode 100644 index d3fbbd82f3..0000000000 --- a/source/module_base/module_mixing/broyden_mixing.h +++ /dev/null @@ -1,156 +0,0 @@ -#ifndef BROYDEN_MIXING_H_ -#define BROYDEN_MIXING_H_ -#include "mixing.h" -#include "module_base/matrix.h" - -namespace Base_Mixing -{ -/** - * @brief Simplified modified broyden_mixing method. - * Ref: D.D. Johnson PRB 38, 12807 (1988) - * Here the weight w0 of the error of the inverse Jacobian is set to 0 and the weight wn of - * the error of each previous iteration is set to same. - * @note Formula: - * F = n_out - n_in - * dF{i} = F_{i-1} - F{i} //different from Ref - * dn_in{i} = n_in_{i-1} - n_in{i} //different from Ref - * alpha{ij} = - * beta{ij} = inv(alpha){ij} - * c{mk} = - * gamma{mn} = \sum_k c{mk} * beta{kn} - * n{m+1} = n_in{m} + mixing_beta*F{m} - \sum_n gamma{mn} * (dn_in{n} + mixing_beta*dF{n}) - * mixing_data{i} = n_in{i} + mixing_beta*F{i} - * n{m+1} = \sum_i coef{i} * mixing_data{i} - */ -class Broyden_Mixing : public Mixing -{ - public: - Broyden_Mixing(const int& mixing_ndim) - { - this->mixing_ndim = mixing_ndim; - this->data_ndim = mixing_ndim + 1; - this->coef = std::vector(mixing_ndim + 1); - this->beta = ModuleBase::matrix(mixing_ndim, mixing_ndim, true); - } - Broyden_Mixing(const int& mixing_ndim, const double& mixing_beta) : Broyden_Mixing(mixing_ndim) - { - this->mixing_beta = mixing_beta; - } - virtual ~Broyden_Mixing() override - { - if (F != nullptr) - free(F); - if (dF != nullptr) - free(dF); - }; - /** - * @brief reset mixing - * - */ - virtual void reset() override - { - this->ndim_cal_dF = 0; - this->start_dF = -1; - this->address = nullptr; - } - - /** - * @brief - * - * @param mdata store information of this iterative step - * @param data_in x_in - * @param data_out x_out = f(x_in) - * @param screen pointer to the screen function for Ker-Ker mixing - * @param mix (double* out, const double* in, const double* residual) calculate 'out' with 'in' and residual - * @param need_calcoef whether need to calculate the coef - * - */ - virtual void push_data(Mixing_Data& mdata, - const double* data_in, - const double* data_out, - std::function screen, - std::function mix, - const bool& need_calcoef) override - { - this->tem_push_data(mdata, data_in, data_out, screen, mix, need_calcoef); - }; - virtual void push_data( - Mixing_Data& mdata, - const std::complex* data_in, - const std::complex* data_out, - std::function*)> screen, - std::function*, const std::complex*, const std::complex*)> mix, - const bool& need_calcoef) override - { - this->tem_push_data(mdata, data_in, data_out, screen, mix, need_calcoef); - }; - - /** - * @brief calculate coeficients for mixing - * - * @param mdata Mixing_Data - * @param inner_product pointer to the inner dot function - */ - virtual void cal_coef(const Mixing_Data& mdata, std::function inner_product) override - { - tem_cal_coef(mdata, inner_product); - } - virtual void cal_coef(const Mixing_Data& mdata, - std::function*, std::complex*)> inner_product) override - { - tem_cal_coef(mdata, inner_product); - } - - private: - /** - * @brief - * - * @param mdata store information of this iterative step - * @param data_in x_in - * @param data_out x_out = f(x_in) - * @param screen pointer to the screen function for Ker-Ker mixing - * @param mix (double* out, const double* in, const double* residual) calculate 'out' with 'in' and residual - * @param need_calcoef whether need to calculate the coef - * - */ - template - void tem_push_data(Mixing_Data& mdata, - const FPTYPE* data_in, - const FPTYPE* data_out, - std::function screen, - std::function mix, - const bool& need_calcoef); - - /** - * @brief calculate coeficients for mixing - * - * @param mdata Mixing_Data - * @param inner_product pointer to the inner dot function - */ - template - void tem_cal_coef(const Mixing_Data& mdata, std::function inner_product); - - private: - // F = data_out - data_in - void* F = nullptr; - // dF = F_{n+1} - F_n - void* dF = nullptr; - // binded mixing_data - Mixing_Data* address = nullptr; - // beta_ij = - ModuleBase::matrix beta; - // mixing_ndim = data_ndim - 1 - int mixing_ndim = -1; - - // start index for dF - int start_dF = -1; - // get the index of i-th dF vector - int dFindex_move(const int& index) - { - return (start_dF + index + mixing_ndim) % mixing_ndim; - } - // the number of calculated dF - int ndim_cal_dF = 0; -}; -} // namespace Base_Mixing -#endif \ No newline at end of file diff --git a/source/module_base/module_mixing/mixing.cpp b/source/module_base/module_mixing/mixing.cpp deleted file mode 100644 index bd522bc60b..0000000000 --- a/source/module_base/module_mixing/mixing.cpp +++ /dev/null @@ -1,113 +0,0 @@ -#include "mixing.h" - -#include "module_base/module_container/base/third_party/blas.h" -namespace Base_Mixing -{ - -void Mixing::push_data(Mixing_Data& mdata, - const double* data_in, - const double* data_out, - std::function screen, - const bool& need_calcoef) -{ - const size_t length = mdata.length; - this->push_data( - mdata, - data_in, - data_out, - screen, - [this, length](double* out, const double* in, const double* sres) { -#ifdef _OPENMP -#pragma omp parallel for schedule(static, 512) -#endif - for (int i = 0; i < length; ++i) - { - out[i] = in[i] + this->mixing_beta * sres[i]; - } - }, - need_calcoef); - return; -} - -void Mixing::push_data(Mixing_Data& mdata, - const std::complex* data_in, - const std::complex* data_out, - std::function*)> screen, - const bool& need_calcoef) -{ - const size_t length = mdata.length; - this->push_data( - mdata, - data_in, - data_out, - screen, - [this, length](std::complex* out, const std::complex* in, const std::complex* sres) { -#ifdef _OPENMP -#pragma omp parallel for schedule(static, 256) -#endif - for (int i = 0; i < length; ++i) - { - out[i] = in[i] + this->mixing_beta * sres[i]; - } - }, - need_calcoef); - return; -} - -void Mixing::mix_data(const Mixing_Data& mdata, double* data_mix) -{ - if (mdata.length <= 0) - return; - double* FP_data = static_cast(mdata.data); - if (mdata.ndim_use == 1) - { -#ifdef _OPENMP -#pragma omp parallel for schedule(static, 512) -#endif - for (int i = 0; i < mdata.length; ++i) - data_mix[i] = FP_data[i]; - return; - } - container::BlasConnector::gemv('N', - mdata.length, - mdata.ndim_use, - 1.0, - FP_data, - mdata.length, - coef.data(), - 1, - 0.0, - data_mix, - 1); -} -void Mixing::mix_data(const Mixing_Data& mdata, std::complex* data_mix) -{ - if (mdata.length <= 0) - return; - std::complex* FP_data = static_cast*>(mdata.data); - if (mdata.ndim_use == 1) - { -#ifdef _OPENMP -#pragma omp parallel for schedule(static, 256) -#endif - for (int i = 0; i < mdata.length; ++i) - data_mix[i] = FP_data[i]; - return; - } - // conver coef to complex - std::vector> coef_complex(coef.size()); - for (int i = 0; i < coef.size(); ++i) - coef_complex[i] = coef[i]; - container::BlasConnector::gemv('N', - mdata.length, - mdata.ndim_use, - 1.0, - FP_data, - mdata.length, - coef_complex.data(), - 1, - 0.0, - data_mix, - 1); -} -} // namespace Base_Mixing \ No newline at end of file diff --git a/source/module_base/module_mixing/mixing.h b/source/module_base/module_mixing/mixing.h deleted file mode 100644 index ba0226ee79..0000000000 --- a/source/module_base/module_mixing/mixing.h +++ /dev/null @@ -1,122 +0,0 @@ -#ifndef MIXING_H_ -#define MIXING_H_ -#include - -#include "mixing_data.h" - -namespace Base_Mixing -{ - -/** - * @brief Mixing class can mixing different steps of data to solver the iteration problem. - * For equation x = f(x), we can use iterative process to solve it: - * x_{n+1} = f(x_n), n = 0, 1, 2, ... - * To acceralte the convergence, we can use mixing method, we need information including - * x_in, x_out=f(x_in) in each iterative step. - * - */ -class Mixing -{ - public: - Mixing(){}; - virtual ~Mixing(){}; - - /** - * @brief init mixing data - * - * @param mdata mixing data - * @param length the length of each vector - * @param type_size size of type - * - */ - virtual void init_mixing_data(Mixing_Data& mdata, const int& length, const size_t& type_size) const - { - mdata.resize(data_ndim, length, type_size); - } - - /** - * @brief - * - * @param mdata store information of this iterative step - * @param data_in x_in - * @param data_out x_out = f(x_in) - * @param screen pointer to the screen function for Ker-Ker mixing - * @param mix (double* out, const double* in, const double* residual) calculate 'out' with 'in' and residual - * @param need_calcoef whether need to calculate the coef - * - */ - virtual void push_data(Mixing_Data& mdata, - const double* data_in, - const double* data_out, - std::function screen, - std::function mix, - const bool& need_calcoef) - = 0; - virtual void push_data( - Mixing_Data& mdata, - const std::complex* data_in, - const std::complex* data_out, - std::function*)> screen, - std::function*, const std::complex*, const std::complex*)> mix, - const bool& need_calcoef) - = 0; - - /** - * @brief - * - * @param mdata store information of this iterative step - * @param data_in x_in - * @param data_out x_out = f(x_in) - * @param screen pointer to the screen function for Ker-Ker mixing - * @param need_calcoef whether need to calculate the coef - * - */ - virtual void push_data(Mixing_Data& mdata, - const double* data_in, - const double* data_out, - std::function screen, - const bool& need_calcoef); - virtual void push_data(Mixing_Data& mdata, - const std::complex* data_in, - const std::complex* data_out, - std::function*)> screen, - const bool& need_calcoef); - - /** - * @brief calculate coeficients for mixing - * - * @param mdata Mixing_Data - * @param inner_product pointer to the inner dot function - */ - virtual void cal_coef(const Mixing_Data& mdata, std::function inner_product) = 0; - virtual void cal_coef(const Mixing_Data& mdata, - std::function*, std::complex*)> inner_product) - = 0; - - /** - * @brief calculate the mixing data - * - * @param mdata Mixing_Data - * @param data_mix output data - */ - void mix_data(const Mixing_Data& mdata, double* data_mix); - void mix_data(const Mixing_Data& mdata, std::complex* data_mix); - - /** - * @brief reset mixing - * - */ - virtual void reset() = 0; - - public: - // mixing_beta from INPUT - double mixing_beta = 0.7; - // coeficients for mixing - std::vector coef; - // ndim for mixing - int data_ndim = 1; -}; - -} // namespace Base_Mixing - -#endif \ No newline at end of file diff --git a/source/module_base/module_mixing/mixing_data.cpp b/source/module_base/module_mixing/mixing_data.cpp deleted file mode 100644 index 27d3292a72..0000000000 --- a/source/module_base/module_mixing/mixing_data.cpp +++ /dev/null @@ -1,39 +0,0 @@ -#include "mixing_data.h" - -namespace Base_Mixing -{ - -Mixing_Data::Mixing_Data(const int& ndim, const std::size_t& length, const size_t& type_size) -{ - this->ndim_tot = ndim; - this->length = length; - if (ndim * length > 0) - { - this->data = malloc(ndim * length * type_size); - } -} - -Mixing_Data::~Mixing_Data() -{ - if (this->data != nullptr) { - free(this->data); -} -} - -void Mixing_Data::resize(const int& ndim, const std::size_t& length, const size_t& type_size) -{ - this->ndim_tot = ndim; - this->length = length; - if (this->data != nullptr) { - free(this->data); -} - if (ndim * length > 0) - { - this->data = malloc(ndim * length * type_size); - } - this->start = -1; - this->ndim_use = 0; - this->ndim_history = 0; -} - -} // namespace Base_Mixing diff --git a/source/module_base/module_mixing/mixing_data.h b/source/module_base/module_mixing/mixing_data.h deleted file mode 100644 index e5986f7faa..0000000000 --- a/source/module_base/module_mixing/mixing_data.h +++ /dev/null @@ -1,99 +0,0 @@ -#ifndef MIXING_DATA_H_ -#define MIXING_DATA_H_ -#include - -#include "module_base/module_container/ATen/tensor.h" -namespace Base_Mixing -{ - -/** - * @brief data for Mixing class - * - */ -class Mixing_Data -{ - public: - Mixing_Data() = default; - /** - * @brief Construct a new Mixing_Data object - * - * @param ndim store ndim vectors for mixing - * @param length the length of each vector - * @param type_size size of type - * - */ - Mixing_Data(const int& ndim, const std::size_t& length, const size_t& type_size); - - /** - * @brief Destroy the Mixing_Data object - * - */ - ~Mixing_Data(); - - /** - * @brief resize the data - * - * @param ndim store ndim vectors for mixing - * @param length the length of each vector - * @param type_size size of type - * - */ - void resize(const int& ndim, const std::size_t& length, const size_t& type_size); - - /** - * @brief push data to the tensor - * - */ - template - void push(const FPTYPE* data_in) - { - this->start = (this->start + 1) % this->ndim_tot; - this->ndim_use = std::min(this->ndim_use + 1, this->ndim_tot); - ++this->ndim_history; - FPTYPE* FP_startdata = static_cast(this->data) + this->start * this->length; -#ifdef _OPENMP -#pragma omp parallel for schedule(static, 4096/sizeof(FPTYPE)) -#endif - for (std::size_t i = 0; i < length; ++i) - { - FP_startdata[i] = data_in[i]; - } - } - - /** - * @brief reset mixing - * - */ - void reset() - { - this->ndim_use = 0; - this->ndim_history = 0; - this->start = -1; - } - - /** - * @brief get the index of i-th vector - * - */ - int index_move(const int& n) const - { - return (n + this->start + ndim_tot) % ndim_tot; - } - - public: - // Tensor pointer to store the data - void* data = nullptr; - // the number of vectors for mixing - int ndim_tot = 0; - // the length of each vector - std::size_t length = 0; - // the start index for vector: start = this->index_move(0) - int start = -1; - // the number of used vectors for mixing - int ndim_use = 0; - // the number of history vectors - int ndim_history = 0; -}; - -} // namespace Base_Mixing -#endif \ No newline at end of file diff --git a/source/module_base/module_mixing/plain_mixing.cpp b/source/module_base/module_mixing/plain_mixing.cpp deleted file mode 100644 index 025cc67b1e..0000000000 --- a/source/module_base/module_mixing/plain_mixing.cpp +++ /dev/null @@ -1,99 +0,0 @@ -#include "plain_mixing.h" - -#include "module_base/memory.h" -#include "module_base/timer.h" -#include "module_base/tool_title.h" -namespace Base_Mixing -{ -template void Plain_Mixing::tem_push_data(Mixing_Data& mdata, - const double* data_in, - const double* data_out, - std::function screen, - std::function mix, - const bool& need_calcoef); -template void Plain_Mixing::tem_push_data( - Mixing_Data& mdata, - const std::complex* data_in, - const std::complex* data_out, - std::function*)> screen, - std::function*, const std::complex*, const std::complex*)> mix, - const bool& need_calcoef); - -template -void Plain_Mixing::tem_push_data(Mixing_Data& mdata, - const FPTYPE* data_in, - const FPTYPE* data_out, - std::function screen, - std::function mix, - const bool& need_calcoef) -{ - const size_t length = mdata.length; - std::vector F_tmp(length); -#ifdef _OPENMP -#pragma omp parallel for schedule(static, 4096 / sizeof(FPTYPE)) -#endif - for (int i = 0; i < length; ++i) - { - F_tmp[i] = data_out[i] - data_in[i]; - } - - // get screened F - if (screen != nullptr) - screen(F_tmp.data()); - - // container::Tensor data = data_in + mixing_beta * F; - std::vector data(length); - mix(data.data(), data_in, F_tmp.data()); - - mdata.push(data.data()); -}; - -template void Plain_Mixing::simple_mix(double* data_new, - const double* data_in, - const double* data_out, - const int& length, - std::function screen); -template void Plain_Mixing::simple_mix(std::complex* data_new, - const std::complex* data_in, - const std::complex* data_out, - const int& length, - std::function*)> screen); -template -void Plain_Mixing::simple_mix(FPTYPE* data_new, - const FPTYPE* data_in, - const FPTYPE* data_out, - const int& length, - std::function screen) -{ - if (screen == nullptr) - { -#ifdef _OPENMP -#pragma omp parallel for schedule(static, 4096 / sizeof(FPTYPE)) -#endif - for (int ig = 0; ig < length; ig++) - { - data_new[ig] = data_in[ig] + this->mixing_beta * (data_out[ig] - data_in[ig]); - } - } - else - { - std::vector F_tmp(length); -#ifdef _OPENMP -#pragma omp parallel for schedule(static, 4096 / sizeof(FPTYPE)) -#endif - for (int i = 0; i < length; ++i) - { - F_tmp[i] = data_out[i] - data_in[i]; - } - screen(F_tmp.data()); -#ifdef _OPENMP -#pragma omp parallel for schedule(static, 4096 / sizeof(FPTYPE)) -#endif - for (int i = 0; i < length; ++i) - { - data_new[i] = data_in[i] + this->mixing_beta * F_tmp[i]; - } - } -} - -} // namespace Base_Mixing \ No newline at end of file diff --git a/source/module_base/module_mixing/plain_mixing.h b/source/module_base/module_mixing/plain_mixing.h deleted file mode 100644 index e7e3c87def..0000000000 --- a/source/module_base/module_mixing/plain_mixing.h +++ /dev/null @@ -1,137 +0,0 @@ -#ifndef PLAIN_MIXING_H_ -#define PLAIN_MIXING_H_ -#include "mixing.h" - -namespace Base_Mixing -{ -/** - * @brief Plain mixing : rho_new = rho_in + mixing_beta * (rho_out - rho_in) - * - */ -class Plain_Mixing : public Mixing -{ - public: - Plain_Mixing() - { - this->coef = std::vector(1, 1.0); - } - Plain_Mixing(const double& mixing_beta) : Plain_Mixing() - { - this->mixing_beta = mixing_beta; - } - virtual ~Plain_Mixing() override{}; - - /** - * @brief reset mixing - * - */ - virtual void reset() override - { - return; - } - - /** - * @brief - * - * @param mdata store information of this iterative step - * @param data_in x_in - * @param data_out x_out = f(x_in) - * @param screen pointer to the screen function for Ker-Ker mixing - * @param mix (double* out, const double* in, const double* residual) calculate 'out' with 'in' and residual - * @param need_calcoef whether need to calculate the coef - * - */ - virtual void push_data(Mixing_Data& mdata, - const double* data_in, - const double* data_out, - std::function screen, - std::function mix, - const bool& need_calcoef) override - { - this->tem_push_data(mdata, data_in, data_out, screen, mix, need_calcoef); - }; - virtual void push_data( - Mixing_Data& mdata, - const std::complex* data_in, - const std::complex* data_out, - std::function*)> screen, - std::function*, const std::complex*, const std::complex*)> mix, - const bool& need_calcoef) override - { - this->tem_push_data(mdata, data_in, data_out, screen, mix, need_calcoef); - }; - - /** - * @brief calculate coeficients for mixing - * - * @param mdata Mixing_Data - * @param inner_product pointer to the inner dot function - */ - virtual void cal_coef(const Mixing_Data& mdata, std::function inner_product) override - { - return; - } - virtual void cal_coef(const Mixing_Data& mdata, - std::function*, std::complex*)> inner_product) override - { - return; - } - - /** - * @brief Simple plain mixing - * data_new = data_in + mixing_beta * (data_out - data_in) - * - * @param data_new can be the same as data_in or data_out - */ - void plain_mix(double* data_new, - const double* data_in, - const double* data_out, - const int& length, - std::function screen) - { - this->simple_mix(data_new, data_in, data_out, length, screen); - } - void plain_mix(std::complex* data_new, - const std::complex* data_in, - const std::complex* data_out, - const int& length, - std::function*)> screen) - { - this->simple_mix(data_new, data_in, data_out, length, screen); - } - - private: - /** - * @brief - * - * @param mdata store information of this iterative step - * @param data_in x_in - * @param data_out x_out = f(x_in) - * @param screen pointer to the screen function for Ker-Ker mixing - * @param mix (double* out, const double* in, const double* residual) calculate 'out' with 'in' and residual - * @param need_calcoef whether need to calculate the coef - * - */ - template - void tem_push_data(Mixing_Data& mdata, - const FPTYPE* data_in, - const FPTYPE* data_out, - std::function screen, - std::function mix, - const bool& need_calcoef); - - /** - * @brief Simple plain mixing - * data_new = data_in + mixing_beta * (data_out - data_in) - * - * @param data_new can be the same as data_in or data_out - */ - template - void simple_mix(FPTYPE* data_new, - const FPTYPE* data_in, - const FPTYPE* data_out, - const int& length, - std::function screen); -}; -} // namespace Base_Mixing -#endif \ No newline at end of file diff --git a/source/module_base/module_mixing/pulay_mixing.cpp b/source/module_base/module_mixing/pulay_mixing.cpp deleted file mode 100644 index 9c9c10a7bd..0000000000 --- a/source/module_base/module_mixing/pulay_mixing.cpp +++ /dev/null @@ -1,182 +0,0 @@ -#include "pulay_mixing.h" - -#include "module_base/lapack_connector.h" -#include "module_base/memory.h" -#include "module_base/timer.h" -#include "module_base/tool_title.h" -namespace Base_Mixing -{ -template void Pulay_Mixing::tem_push_data(Mixing_Data& mdata, - const double* data_in, - const double* data_out, - std::function screen, - std::function mix, - const bool& need_calcoef); -template void Pulay_Mixing::tem_push_data( - Mixing_Data& mdata, - const std::complex* data_in, - const std::complex* data_out, - std::function*)> screen, - std::function*, const std::complex*, const std::complex*)> mix, - const bool& need_calcoef); - -template -void Pulay_Mixing::tem_push_data(Mixing_Data& mdata, - const FPTYPE* data_in, - const FPTYPE* data_out, - std::function screen, - std::function mix, - const bool& need_calcoef) -{ - const std::size_t length = mdata.length; - std::vector F_tmp(length); - -#ifdef _OPENMP -#pragma omp parallel for schedule(static, 4096 / sizeof(FPTYPE)) -#endif - for (std::size_t i = 0; i < length; ++i) - { - F_tmp[i] = data_out[i] - data_in[i]; - } - - // get screened F - if (screen != nullptr) - screen(F_tmp.data()); - - // container::Tensor data = data_in + mixing_beta * F; - std::vector data(length); - mix(data.data(), data_in, F_tmp.data()); - - mdata.push(data.data()); - - if (!need_calcoef) - return; - - if (address != &mdata && address != nullptr) - ModuleBase::WARNING_QUIT( - "Pulay_Mixing", - "One Pulay_Mixing object can only bind one Mixing_Data object to calculate coefficients"); - - FPTYPE* FP_F = static_cast(F); - if (mdata.ndim_use == 1) - { - address = &mdata; - // allocate - if (F != nullptr) - free(F); - F = malloc(sizeof(FPTYPE) * length * mixing_ndim); - FP_F = static_cast(F); -#ifdef _OPENMP -#pragma omp parallel for schedule(static, 4096 / sizeof(FPTYPE)) -#endif - for (std::size_t i = 0; i < length; ++i) - { - FP_F[i] = F_tmp[i]; - } - } - else - { - start_F = (this->start_F + 1) % this->mixing_ndim; - FPTYPE* FP_startF = FP_F + start_F * length; -#ifdef _OPENMP -#pragma omp parallel for schedule(static, 4096 / sizeof(FPTYPE)) -#endif - for (std::size_t i = 0; i < length; ++i) - { - FP_startF[i] = F_tmp[i]; - } - } -}; - -template void Pulay_Mixing::tem_cal_coef(const Mixing_Data& mdata, - std::function inner_product); -template void Pulay_Mixing::tem_cal_coef( - const Mixing_Data& mdata, - std::function*, std::complex*)> inner_product); - -template -void Pulay_Mixing::tem_cal_coef(const Mixing_Data& mdata, std::function inner_product) -{ - ModuleBase::TITLE("Charge_Mixing", "Pulay_mixing"); - ModuleBase::timer::tick("Charge", "Pulay_mixing"); - if (address != &mdata && address != nullptr) - ModuleBase::WARNING_QUIT( - "Pulay_mixing", - "One Pulay_Mixing object can only bind one Mixing_Data object to calculate coefficients"); - const std::size_t length = mdata.length; - FPTYPE* FP_F = static_cast(F); - - if (mdata.ndim_use > 1) - { - const int ndim_use = mdata.ndim_use; - ModuleBase::matrix beta_tmp(ndim_use, ndim_use); - // beta(i, j) = - for (int i = 0; i < ndim_use; ++i) - { - FPTYPE* Fi = FP_F + i * length; - for (int j = i; j < ndim_use; ++j) - { - if (i != start_F && j != start_F) - { - beta_tmp(i, j) = beta(i, j); - } - else - { - FPTYPE* Fj = FP_F + j * length; - beta(i, j) = beta_tmp(i, j) = inner_product(Fi, Fj); - } - if (j != i) - { - beta(j, i) = beta_tmp(j, i) = beta_tmp(i, j); - } - } - } - - double* work = new double[ndim_use]; - int* iwork = new int[ndim_use]; - char uu = 'U'; - int info; - dsytrf_(&uu, &ndim_use, beta_tmp.c, &ndim_use, iwork, work, &ndim_use, &info); - if (info != 0) - ModuleBase::WARNING_QUIT("Charge_Mixing", "Error when factorizing beta."); - dsytri_(&uu, &ndim_use, beta_tmp.c, &ndim_use, iwork, work, &info); - if (info != 0) - ModuleBase::WARNING_QUIT("Charge_Mixing", "Error when DSYTRI beta."); - for (int i = 0; i < ndim_use; ++i) - { - for (int j = i + 1; j < ndim_use; ++j) - { - beta_tmp(i, j) = beta_tmp(j, i); - } - } - - // coef{i} = \sum_j beta{ij} / \sum_k \sum_j beta{kj} - double sum_beta = 0.; - for (int i = 0; i < ndim_use; ++i) - { - for (int j = 0; j < ndim_use; ++j) - { - sum_beta += beta_tmp(j, i); - } - } - for (int i = 0; i < ndim_use; ++i) - { - coef[i] = 0.; - for (int j = 0; j < ndim_use; ++j) - { - coef[i] += beta_tmp(i, j); - } - coef[i] /= sum_beta; - } - delete[] work; - delete[] iwork; - } - else - { - beta(0, 0) = inner_product(FP_F, FP_F); - coef[0] = 1.0; - } - - ModuleBase::timer::tick("Charge", "Pulay_mixing"); -}; -} // namespace Base_Mixing diff --git a/source/module_base/module_mixing/pulay_mixing.h b/source/module_base/module_mixing/pulay_mixing.h deleted file mode 100644 index 0e6c6de595..0000000000 --- a/source/module_base/module_mixing/pulay_mixing.h +++ /dev/null @@ -1,136 +0,0 @@ -#ifndef PULAY_MIXING_H_ -#define PULAY_MIXING_H_ -#include "mixing.h" -#include "module_base/matrix.h" - -namespace Base_Mixing -{ -/** - * @brief Pulay mixing method. - * Ref: Pulay P. Chemical Physics Letters, 1980, 73(2): 393-398. - * @note Formula: - * F = n_out - n_in - * alpha{ij} = - * beta{ij} = inv(alpha){ij} - * coef{i} = \sum_j beta{ij} / \sum_k \sum_j beta{kj} - * mixing_data{i} = n_in{i} + mixing_beta*F{i} - * n{m+1} = \sum_n coef{i} * mixing_data{i} - */ -class Pulay_Mixing : public Mixing -{ - public: - Pulay_Mixing(const int& mixing_ndim) - { - this->mixing_ndim = mixing_ndim; - this->data_ndim = mixing_ndim; - this->coef = std::vector(mixing_ndim); - this->beta = ModuleBase::matrix(mixing_ndim, mixing_ndim, true); - } - Pulay_Mixing(const int& mixing_ndim, const double& mixing_beta) : Pulay_Mixing(mixing_ndim) - { - this->mixing_beta = mixing_beta; - } - virtual ~Pulay_Mixing() override - { - if (F != nullptr) - free(F); - } - /** - * @brief reset mixing - * - */ - virtual void reset() override - { - this->start_F = 0; - this->address = nullptr; - } - - /** - * @brief - * - * @param mdata store information of this iterative step - * @param data_in x_in - * @param data_out x_out = f(x_in) - * @param screen pointer to the screen function for Ker-Ker mixing - * @param mix (double* out, const double* in, const double* residual) calculate 'out' with 'in' and residual - * @param need_calcoef whether need to calculate the coef - * - */ - virtual void push_data(Mixing_Data& mdata, - const double* data_in, - const double* data_out, - std::function screen, - std::function mix, - const bool& need_calcoef) override - { - this->tem_push_data(mdata, data_in, data_out, screen, mix, need_calcoef); - }; - virtual void push_data( - Mixing_Data& mdata, - const std::complex* data_in, - const std::complex* data_out, - std::function*)> screen, - std::function*, const std::complex*, const std::complex*)> mix, - const bool& need_calcoef) override - { - this->tem_push_data(mdata, data_in, data_out, screen, mix, need_calcoef); - }; - - /** - * @brief calculate coeficients for mixing - * - * @param mdata Mixing_Data - * @param inner_product pointer to the inner dot function - */ - virtual void cal_coef(const Mixing_Data& mdata, std::function inner_product) override - { - tem_cal_coef(mdata, inner_product); - } - virtual void cal_coef(const Mixing_Data& mdata, - std::function*, std::complex*)> inner_product) override - { - tem_cal_coef(mdata, inner_product); - } - - private: - /** - * @brief - * - * @param mdata store information of this iterative step - * @param data_in x_in - * @param data_out x_out = f(x_in) - * @param screen pointer to the screen function for Ker-Ker mixing - * @param mix (double* out, const double* in, const double* residual) calculate 'out' with 'in' and residual - * @param need_calcoef whether need to calculate the coef - * - */ - template - void tem_push_data(Mixing_Data& mdata, - const FPTYPE* data_in, - const FPTYPE* data_out, - std::function screen, - std::function mix, - const bool& need_calcoef); - - /** - * @brief calculate coeficients for mixing - * - * @param mdata Mixing_Data - * @param inner_product pointer to the inner dot function - */ - template - void tem_cal_coef(const Mixing_Data& mdata, std::function inner_product); - - // F = data_out - data_in - void* F = nullptr; - // binded mixing_data - Mixing_Data* address = nullptr; - // beta_ij = - ModuleBase::matrix beta; - // mixing_ndim = data_ndim - 1 - int mixing_ndim = -1; - // start index for F - int start_F = 0; -}; -} // namespace Base_Mixing -#endif \ No newline at end of file diff --git a/source/module_base/module_mixing/test/CMakeLists.txt b/source/module_base/module_mixing/test/CMakeLists.txt deleted file mode 100644 index 86d201e1f7..0000000000 --- a/source/module_base/module_mixing/test/CMakeLists.txt +++ /dev/null @@ -1,6 +0,0 @@ -remove_definitions(-D__MPI) -AddTest( - TARGET MODULE_BASE_MIXING_unittests - LIBS parameter base device ${math_libs} - SOURCES mixing_test.cpp -) \ No newline at end of file diff --git a/source/module_base/module_mixing/test/mixing_test.cpp b/source/module_base/module_mixing/test/mixing_test.cpp deleted file mode 100755 index cd9340cdf3..0000000000 --- a/source/module_base/module_mixing/test/mixing_test.cpp +++ /dev/null @@ -1,309 +0,0 @@ -#ifdef _OPENMP -#include -#endif - -#include "../broyden_mixing.h" -#include "../plain_mixing.h" -#include "../pulay_mixing.h" -#include "gmock/gmock.h" -#include "gtest/gtest.h" - -#define DOUBLETHRESHOLD 1e-8 -double ext_inner_product_mock(double* x1, double* x2) -{ - return 0.0; -} -class Mixing_Test : public testing::Test -{ - protected: - Mixing_Test() - { - } - ~Mixing_Test() - { - delete this->mixing; - } - const double mixing_beta = 0.6; - const int mixing_ndim = 3; - Base_Mixing::Mixing_Data xdata; - Base_Mixing::Mixing* mixing = nullptr; - double thr = 1e-8; - int niter = 0; - int maxiter = 10; - std::vector xd_ref = {0.0, 0.0, 0.0}; - std::vector> xc_ref = { - {0.0, 1.0}, - {1.0, 0.0}, - 0.0 - }; - void init_method(std::string method) - { - if (method == "broyden") - { - this->mixing = new Base_Mixing::Broyden_Mixing(this->mixing_ndim, this->mixing_beta); - } - else if (method == "pulay") - { - this->mixing = new Base_Mixing::Pulay_Mixing(this->mixing_ndim, this->mixing_beta); - } - else if (method == "plain") - { - this->mixing = new Base_Mixing::Plain_Mixing(this->mixing_beta); - } - } - - void clear() - { - delete this->mixing; - this->mixing = nullptr; - } - - /** - * @brief sover linear equation: - * [ 8 -3 2 ][x1] [20] [3] - * [ 4 11 -1 ][x2] = [33] x = [2] - * [ 6 3 12 ][x3] [36] [1] - * - * [x1] [ 3/8 -2/8 20/8 ][x1] - * [x2] = [-4/11 1/11 -33/11][x2] - * [x3] [-6/12 -3/12 36/12][x3] - */ - template - void solve_linear_eq(FPTYPE* x_in, FPTYPE* x_out, bool diff_beta = false) - { - this->mixing->init_mixing_data(xdata, 3, sizeof(FPTYPE)); - std::vector delta_x(3); - - auto screen = std::bind(&Mixing_Test::Kerker_mock, this, std::placeholders::_1); - auto inner_product - = std::bind(static_cast(&Mixing_Test::inner_product_mock), - this, - std::placeholders::_1, - std::placeholders::_2); - - double residual = 10.; - this->niter = 0; - while (niter < maxiter) - { - x_out[0] = (3. * x_in[1] - 2. * x_in[2] + 20.) / 8.; - x_out[1] = (-4. * x_out[0] + 1. * x_in[2] + 33.) / 11.; - x_out[2] = (-6. * x_out[0] - 3. * x_out[1] + 36.) / 12.; - - niter++; - - for (int i = 0; i < 3; ++i) - { - delta_x[i] = x_out[i] - x_in[i]; - } - residual = this->inner_product_mock(delta_x.data(), delta_x.data()); - if (residual <= thr) - { - break; - } - if (diff_beta) - { - this->mixing->push_data( - this->xdata, - x_in, - x_out, - screen, - // mixing can use different mixing_beta for one vector - [](FPTYPE* out, const FPTYPE* in, const FPTYPE* sres) { - out[0] = in[0] + 0.5 * sres[0]; - out[1] = in[1] + 0.6 * sres[1]; - out[2] = in[2] + 0.5 * sres[2]; - }, - true); - } - else - { - this->mixing->push_data(this->xdata, x_in, x_out, screen, true); - } - - this->mixing->cal_coef(this->xdata, inner_product); - - this->mixing->mix_data(this->xdata, x_in); - } - } - - template - void Kerker_mock(FPTYPE* drho) - { - } - - double inner_product_mock(double* x1, double* x2) - { - double xnorm = 0.0; - for (int ir = 0; ir < 3; ++ir) - { - xnorm += x1[ir] * x2[ir]; - } - return xnorm; - } - double inner_product_mock(std::complex* x1, std::complex* x2) - { - double xnorm = 0.0; - for (int ir = 0; ir < 3; ++ir) - { - xnorm += x1[ir].real() * x2[ir].real() + x1[ir].imag() * x2[ir].imag(); - } - return xnorm; - } -}; - -TEST_F(Mixing_Test, BroydenSolveLinearEq) -{ -#ifdef _OPENMP - omp_set_num_threads(1); -#endif - init_method("broyden"); - std::vector x_in = xd_ref; - std::vector x_out(3); - solve_linear_eq(x_in.data(), x_out.data(), true); - EXPECT_NEAR(x_out[0], 3.0, DOUBLETHRESHOLD); - EXPECT_NEAR(x_out[1], 2.0, DOUBLETHRESHOLD); - EXPECT_NEAR(x_out[2], 1.0, DOUBLETHRESHOLD); - ASSERT_EQ(niter, 5); - - this->mixing->reset(); - xdata.reset(); - - std::vector> xc_in = xc_ref; - std::vector> xc_out(3); - solve_linear_eq>(xc_in.data(), xc_out.data(), true); - EXPECT_NEAR(xc_out[0].real(), 3.0, DOUBLETHRESHOLD); - EXPECT_NEAR(xc_out[1].real(), 2.0, DOUBLETHRESHOLD); - EXPECT_NEAR(xc_out[2].real(), 1.0, DOUBLETHRESHOLD); - ASSERT_EQ(niter, 5); - std::string output; - Base_Mixing::Mixing_Data testdata; - this->mixing->init_mixing_data(testdata, 3, sizeof(double)); - - testing::internal::CaptureStdout(); - EXPECT_EXIT(this->mixing->push_data(testdata, x_in.data(), x_out.data(), nullptr, true), - ::testing::ExitedWithCode(1), - ""); - output = testing::internal::GetCapturedStdout(); - EXPECT_THAT( - output, - testing::HasSubstr("One Broyden_Mixing object can only bind one Mixing_Data object to calculate coefficients")); - - testing::internal::CaptureStdout(); - EXPECT_EXIT(this->mixing->cal_coef(testdata, ext_inner_product_mock), ::testing::ExitedWithCode(1), ""); - output = testing::internal::GetCapturedStdout(); - EXPECT_THAT( - output, - testing::HasSubstr("One Broyden_Mixing object can only bind one Mixing_Data object to calculate coefficients")); - - clear(); -} - -TEST_F(Mixing_Test, PulaySolveLinearEq) -{ -#ifdef _OPENMP - omp_set_num_threads(1); -#endif - init_method("pulay"); - std::vector x_in = xd_ref; - std::vector x_out(3); - solve_linear_eq(x_in.data(), x_out.data()); - EXPECT_NEAR(x_out[0], 2.9999959638248037, DOUBLETHRESHOLD); - EXPECT_NEAR(x_out[1], 2.0000002552633349, DOUBLETHRESHOLD); - EXPECT_NEAR(x_out[2], 1.0000019542717642, DOUBLETHRESHOLD); - ASSERT_EQ(niter, 6); - - this->mixing->reset(); - xdata.reset(); - - std::vector> xc_in = xc_ref; - std::vector> xc_out(3); - solve_linear_eq>(xc_in.data(), xc_out.data()); - EXPECT_NEAR(xc_out[0].real(), 3.0000063220482565, DOUBLETHRESHOLD); - EXPECT_NEAR(xc_out[1].real(), 1.9999939191147462, DOUBLETHRESHOLD); - EXPECT_NEAR(xc_out[2].real(), 0.99999835919718549, DOUBLETHRESHOLD); - ASSERT_EQ(niter, 6); - - std::string output; - Base_Mixing::Mixing_Data testdata; - this->mixing->init_mixing_data(testdata, 3, sizeof(double)); - - testing::internal::CaptureStdout(); - EXPECT_EXIT(this->mixing->push_data(testdata, x_in.data(), x_out.data(), nullptr, true), - ::testing::ExitedWithCode(1), - ""); - output = testing::internal::GetCapturedStdout(); - EXPECT_THAT( - output, - testing::HasSubstr("One Pulay_Mixing object can only bind one Mixing_Data object to calculate coefficients")); - - testing::internal::CaptureStdout(); - EXPECT_EXIT(this->mixing->cal_coef(testdata, ext_inner_product_mock), ::testing::ExitedWithCode(1), ""); - output = testing::internal::GetCapturedStdout(); - EXPECT_THAT( - output, - testing::HasSubstr("One Pulay_Mixing object can only bind one Mixing_Data object to calculate coefficients")); - - clear(); -} - -TEST_F(Mixing_Test, PlainSolveLinearEq) -{ -#ifdef _OPENMP - omp_set_num_threads(1); -#endif - init_method("plain"); - std::vector x_in = xd_ref; - std::vector x_out(3); - solve_linear_eq(x_in.data(), x_out.data()); - EXPECT_NEAR(x_out[0], 2.9999613068687698, DOUBLETHRESHOLD); - EXPECT_NEAR(x_out[1], 2.0000472873362103, DOUBLETHRESHOLD); - EXPECT_NEAR(x_out[2], 1.0000075247315625, DOUBLETHRESHOLD); - ASSERT_EQ(niter, 10); - - this->mixing->reset(); - xdata.reset(); - - std::vector> xc_in = xc_ref; - std::vector> xc_out(3); - solve_linear_eq>(xc_in.data(), xc_out.data()); - EXPECT_NEAR(xc_out[0].real(), 2.9999418982632711, DOUBLETHRESHOLD); - EXPECT_NEAR(xc_out[1].real(), 2.0000317031363761, DOUBLETHRESHOLD); - EXPECT_NEAR(xc_out[2].real(), 1.0000211250842703, DOUBLETHRESHOLD); - ASSERT_EQ(niter, 10); - - // test mix_data of plain_mixing - std::vector x_tmp(3); - this->mixing->push_data(this->xdata, x_in.data(), x_out.data(), nullptr, true); - this->mixing->mix_data(this->xdata, x_tmp.data()); - Base_Mixing::Plain_Mixing plain_mix(mixing_beta); - plain_mix.plain_mix(x_in.data(), x_in.data(), x_out.data(), 3, [](double* x) {}); - EXPECT_NEAR(x_tmp[0], x_in[0], DOUBLETHRESHOLD); - EXPECT_NEAR(x_tmp[1], x_in[1], DOUBLETHRESHOLD); - EXPECT_NEAR(x_tmp[2], x_in[2], DOUBLETHRESHOLD); - - std::vector> xc_tmp(3); - this->mixing->push_data(this->xdata, xc_in.data(), xc_out.data(), nullptr, true); - this->mixing->mix_data(this->xdata, xc_tmp.data()); - plain_mix.plain_mix(xc_in.data(), xc_in.data(), xc_out.data(), 3, nullptr); - EXPECT_NEAR(xc_tmp[0].real(), xc_in[0].real(), DOUBLETHRESHOLD); - EXPECT_NEAR(xc_tmp[1].real(), xc_in[1].real(), DOUBLETHRESHOLD); - EXPECT_NEAR(xc_tmp[2].real(), xc_in[2].real(), DOUBLETHRESHOLD); - - this->mixing->reset(); - - clear(); -} - -TEST_F(Mixing_Test, OtherCover) -{ - this->mixing = new Base_Mixing::Broyden_Mixing(2, 0.7); - Base_Mixing::Mixing_Data nodata; - this->mixing->init_mixing_data(nodata, 0, sizeof(double)); - this->mixing->push_data(nodata, (double*)nullptr, (double*)nullptr, nullptr, false); - this->mixing->push_data(nodata, (double*)nullptr, (double*)nullptr, nullptr, false); - this->mixing->mix_data(nodata, (double*)nullptr); - this->mixing->mix_data(nodata, (std::complex*)nullptr); - EXPECT_EQ(nodata.length, 0); - - clear(); -} \ No newline at end of file diff --git a/source/module_base/mymath.cpp b/source/module_base/mymath.cpp deleted file mode 100644 index 7a04750db6..0000000000 --- a/source/module_base/mymath.cpp +++ /dev/null @@ -1,180 +0,0 @@ -#include "mymath.h" - -#include "timer.h" - -namespace ModuleBase -{ - -void heapAjust(double *r, int *ind, int s, int m) -{ - int j = 0, ic = 0; - double rc = 0.0; - rc = r[s]; - ic = ind[s]; - - for (j = 2 * s; j <= m; j *= 2) - { - if (j < m && (r[j] < r[j + 1])) - j++; - - if (!(rc < r[j])) - break; - - r[s] = r[j]; - - ind[s] = ind[j]; - - s = j; - } - - r[s] = rc; - - ind[s] = ic; - return; -} - -void heapsort(const int n, double *r, int *ind) -{ - ModuleBase::timer::tick("mymath", "heapsort"); - int i = 0, ic = 0; - double rc = 0.0; - - if (ind[0] == 0) - { - for (i = 0; i < n; i++) - { - ind[i] = i; - } - } - - for (i = n / 2; i >= 0; i--) - { - heapAjust(r, ind, i, n - 1); - } - - for (i = n - 1; i > 0; i--) - { - rc = r[0]; - r[0] = r[i]; - r[i] = rc; - ic = ind[0]; - ind[0] = ind[i]; - ind[i] = ic; - heapAjust(r, ind, 0, i - 1); - } - ModuleBase::timer::tick("mymath", "heapsort"); - return; -} - -/*-------------------------------------------------------------------- - subroutine hpsort(n,ra,ind) -c--------------------------------------------------------------------- -c sort an array ra(1:n) into ascending order using heapsort algorithm. -c n is input, ra is replaced on output by its sorted rearrangement. -c create an index table (ind) by making an exchange in the index array -c whenever an exchange is made on the sorted data array (ra). -c in case of equal values in the data array (ra) the values in the -c index array (ind) are used to order the entries. -c if on input ind(1) = 0 then indices are initialized in the routine, -c if on input ind(1) != 0 then indices are assumed to have been -c initialized before entering the routine and these -c indices are carried around during the sorting process -c -c no work space needed ! -c free us from machine-dependent sorting-routines ! -c -c adapted from Numerical Recipes pg. 329 (new edition) -*********************************************************************/ - -// from hpsort.f90 -void hpsort(int n, double *ra, int *ind) -{ - int i = 0, ir = 0, j = 0, k = 0, iind = 0; - double rra = 0.0; - - if (ind[0] == 0) - { - for (i = 1; i <= n; i++) - ind[i - 1] = i; - } - - if (n < 2) - return; // nothing to order - - k = n / 2; - - ir = n - 1; - - while (true) - { - if (k > 0) // still in hiring phase - { - k = k - 1; - rra = ra[k]; - iind = ind[k]; - } - else // in retirement-promotion phase. - { - rra = ra[ir]; // clear a space at the end of the array - iind = ind[ir]; // - ra[ir] = ra[0]; // retire the top of the heap into it - ind[ir] = ind[0]; // - ir = ir - 1; // decrease the size of the corporation - - if (ir == 0) // done with the last promotion - { - ra[0] = rra; // the least competent worker at all // - ind[0] = iind; // - return; - } - } - - i = k; // wheter in hiring or promotion phase, we - - j = k + k + 1; // set up to place rra in its proper level - - while (j <= ir) - { - if (j < ir) - { - if (ra[j] < ra[j + 1]) // compare to better underling - { - j = j + 1; - } - else if (ra[j] == ra[j + 1]) - { - if (ind[j] < ind[j + 1]) - j = j + 1; - } - } - - if (rra < ra[j]) // demote rra - { - ra[i] = ra[j]; - ind[i] = ind[j]; - i = j; - j = j + j + 1; - } - else if (rra == ra[j]) - { - if (iind < ind[j]) // demote rra - { - ra[i] = ra[j]; - ind[i] = ind[j]; - i = j; - j = j + j + 1; - } - else - j = ir + 1; // set j to terminate do-while loop - } - else // this is the right place for rra - j = ir + 1; // set j to terminate do-while loop - } - - ra[i] = rra; - - ind[i] = iind; - } -} - -} // namespace ModuleBase diff --git a/source/module_base/mymath.h b/source/module_base/mymath.h deleted file mode 100644 index 206380b871..0000000000 --- a/source/module_base/mymath.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef MYMATH_H -#define MYMATH_H - -namespace ModuleBase -{ -void heapsort(int n, double *r, int *ind); -void heapAjust(double r[], int ind[], int s, int m);//not be used now! -void hpsort(int n, double *ra, int *ind); -} - -#endif // MYMATH_H - - diff --git a/source/module_base/name_angular.h b/source/module_base/name_angular.h deleted file mode 100644 index 06627c8e22..0000000000 --- a/source/module_base/name_angular.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifndef NAME_ANGULAR_H -#define NAME_ANGULAR_H - -namespace ModuleBase -{ - const std::string Name_Angular[5][11] = - { - {"s"}, - {"pz", "px", "py"}, - {"dz^2", "dxz", "dyz", "dx^2-y^2", "dxy"}, - {"fz^3", "fxz^2", "fyz^2", "fzx^2-zy^2", "fxyz", "fx^3-3*xy^2", "f3yx^2-y^3"}, - {"g1", "g2", "g3", "g4", "g5", "g6", "g7", "g8", "g9"} - }; // name of atomic orbital jiyy add 2022-05-10 -} - -#endif diff --git a/source/module_base/ndarray.h b/source/module_base/ndarray.h deleted file mode 100644 index 585af603b8..0000000000 --- a/source/module_base/ndarray.h +++ /dev/null @@ -1,226 +0,0 @@ -/** - * @file NDArray.h - * @author your name (you@domain.com) - * @brief under the restriction of C++11, a simple alternative to std::vector + std::mdspan. In module_base/module_container/ATen/tensor.h, tensor class provides a cross-device container, but std::string is not supported. Therefore, this class is to provide a general (but CPU-only) container for multi-dimensional data. It can easily convert to ontainer::Tensor. - * @version 0.1 - * @date 2024-04-24 - * - * @copyright Copyright (c) 2024 - * - */ - -#ifndef NDARRAY_H -#define NDARRAY_H - -#include -#include -#include -#include -#include -#include -// for heterogeneous computing, we can use ATen::Tensor -//#include "./module_container/ATen/tensor.h" - -/** - * @brief under the restriction of C++11, a simple alternative to std::vector + std::mdspan. In module_base/module_container/ATen/tensor.h, tensor class provides a cross-device container, but std::string is not supported. Therefore, this class is to provide a general (but CPU-only) container for multi-dimensional data. It can easily convert to container::Tensor. - * - * @tparam T - */ -template -class NDArray -{ - // align with STL container implementation, there are several functions compulsory to be implemented - // constructor: default, copy, move, initializer_list - // operator: =, ==, !=, <, <=, >, >= - // iterator: begin, cbegin, end, cend - // capacity: size, empty, max_size, reserve, shrink_to_fit - // element access: [], at, front, back, data - // modifiers: clear, insert, erase, push_back, pop_back, resize, swap - // allocator: get_allocator -public: - // constructors - /** - * @brief Construct a new NDArray object - * - */ - NDArray()= delete; - // initializer_list constructor - NDArray(std::initializer_list il) : shape_(il), data_(std::accumulate(shape_.begin(), shape_.end(), 1, std::multiplies())) {} - NDArray(std::initializer_list il) : shape_(il.begin(), il.end()), data_(std::accumulate(shape_.begin(), shape_.end(), 1, std::multiplies())) {} - // variadic template constructor, (delegate constructor) - template NDArray(const size_t idx, Args... args) : NDArray({idx, static_cast(args)...}) {} - template NDArray(const int& idx, Args... args) : NDArray({idx, static_cast(args)...}) {} // not happy with this because size_t can have larger range - // copy constructor - NDArray(const NDArray& other) : data_(other.data_), shape_(other.shape_) {} - // move constructor - NDArray(NDArray&& other) : data_(std::move(other.data_)), shape_(std::move(other.shape_)) {} - - // destructor - ~NDArray() {} - - // operators - /** - * @brief = operator, copy assignment - * - * @param other - * @return NDArray& - */ - NDArray& operator=(const NDArray& other) - { - if (this != &other) - { - data_ = other.data_; - shape_ = other.shape_; - } - return *this; - } - /** - * @brief = operator, move assignment - */ - NDArray& operator=(NDArray&& other) - { - if (this != &other) - { - data_ = std::move(other.data_); - shape_ = std::move(other.shape_); - } - return *this; - } - - /** - * @brief == operator - * - * @param other - * @return true if the data and shape are the same - * @return false otherwise - */ - bool operator==(const NDArray& other) const { return data_ == other.data_ && shape_ == other.shape_; } - /** - * @brief != operator - * - * @param other - * @return true if the data and shape are different - * @return false otherwise - */ - bool operator!=(const NDArray& other) const { return !(*this == other); } - // other operators are not generally supported - - // element access - /** - * @brief at function - * - * @tparam Args - * @param args indices of the element - * @return T& or const T& - */ - template T& at(const size_t idx, Args... args) { return data_[index(idx, args...)]; } - template const T& at(const size_t idx, Args... args) const { return data_[index(idx, args...)]; } - /** - * @brief [] operator - * - * @tparam Args - * @param args indices of the element - * @return T& or const T& - */ - template T& operator()(const size_t idx, Args... args) { return data_[index(idx, args...)]; } - template const T& operator()(const size_t idx, Args... args) const { return data_[index(idx, args...)]; } - // front - T& front() { return data_.front(); } - const T& front() const { return data_.front(); } - // back - T& back() { return data_.back(); } - const T& back() const { return data_.back(); } - // data - T* data() { return data_.data(); } - const T* data() const { return data_.data(); } - - // iterators - // iterators on the whole data - T* begin() { return data_.data(); } - T* end() { return data_.data() + data_.size(); } - const T* cbegin() const { return data_.data(); } - const T* cend() const { return data_.data() + data_.size(); } - // iterators on different dimensions - - // capacity - // size - size_t size() const { return data_.size(); } - size_t size(const size_t& dim) const { return shape_.at(dim); } - // empty - bool empty() const { return data_.empty(); } - // multi-dimensional specific - // shape - const std::vector& shape() const { return shape_; } - // reshape - template - void reshape(Args... args) - { - // DEVELP WARNING: what if arg = -2? :) - // save args into a vector - //std::vector dims = {static_cast(args)...}; - std::vector dims = {args...}; - // assert number of -1 in dims is at most 1 - // -1 is not type-safe!!! - size_t count = std::count_if(dims.begin(), dims.end(), [](size_t i) { return i == -1; }); - assert(count <= 1); - // if there is -1, calculate the size - if (count == 1) - { - size_t size = 1; - for (size_t i = 0; i < dims.size(); ++i) - { - if (dims[i] != -1) - { - size *= dims[i]; - } - } - size_t idx = std::find(dims.begin(), dims.end(), -1) - dims.begin(); - dims[idx] = data_.size() / size; - } - // calculate the size - size_t size = std::accumulate(dims.begin(), dims.end(), 1, std::multiplies()); - // assert size is the same - assert(size == data_.size()); - // assign dims to shape_ - std::copy(dims.begin(), dims.end(), shape_.begin()); - } - - // interface to ATen::Tensor, but constraint to int, double, float, std::complex, std::complex - /** - * @brief SFINAE (Substitution Failure Is Not An Error) to_tensor function, only if T is int, double, float, std::complex, std::complex, otherwise there is no such function - * - * @return container::Tensor, only if T is int, double, float, std::complex, std::complex - */ - // std::enable_if< - // std::is_same::value - // || std::is_same::value - // || std::is_same::value - // || std::is_same>::value - // || std::is_same>::value, container::Tensor - // >::type to_tensor() const - // { - // container::TensorShape shape(shape_); - // container::Tensor result = container::Tensor(container::DataTypeToEnum::value, shape); - // std::memcpy(result.data(), data_.data(), data_.size() * sizeof(T)); - // return result; - // } - template - size_t index(const size_t idx, Args... args) const - { - assert(sizeof...(args) == shape_.size() - 1); // assert the indices are the same as the shape - size_t indices[] = {idx, static_cast(args)...}; - size_t index = 0; - for (size_t i = 0; i < shape_.size(); ++i) - { - index += indices[i] * std::accumulate(shape_.begin() + i + 1, shape_.end(), 1, std::multiplies()); - } - assert(index < data_.size()); // assert the index is within the data - return index; - } -private: - std::vector shape_; - // for GPU-compatible data container, will be replaced by raw pointer - std::vector data_; -}; - -#endif // NDARRAY_H \ No newline at end of file diff --git a/source/module_base/opt_CG.cpp b/source/module_base/opt_CG.cpp deleted file mode 100644 index aa289da44d..0000000000 --- a/source/module_base/opt_CG.cpp +++ /dev/null @@ -1,248 +0,0 @@ -#include "opt_CG.h" -#include - -namespace ModuleBase -{ -Opt_CG::Opt_CG() -{ -} - -Opt_CG::~Opt_CG() -{ - delete[] this->pb_; - delete[] this->pdirect_old_; - delete[] this->pgradient_old_; -} - -/** - * @brief Initialize b before solving Ax = b. - * - * @param pinp_b b in the linear equation Ax = b - */ -void Opt_CG::init_b(double* pinp_b) -{ - if (this->pb_ != nullptr) - delete[] this->pb_; - this->pb_ = new double[this->nx_]; - for (int i = 0; i < this->nx_; ++i) - this->pb_[i] = pinp_b[i]; -} - -/** - * @brief Allocate the space for pdirect_old and pgradient_old. - * - * @param nx length of the solution array x - */ -void Opt_CG::allocate(int nx) -{ - this->nx_ = nx; - delete[] this->pdirect_old_; - delete[] this->pgradient_old_; - this->pdirect_old_ = new double[this->nx_]; - this->pgradient_old_ = new double[this->nx_]; - ModuleBase::GlobalFunc::ZEROS(this->pdirect_old_, this->nx_); - ModuleBase::GlobalFunc::ZEROS(this->pgradient_old_, this->nx_); -} - -void Opt_CG::set_para(double dV) -{ - this->dV_ = dV; -} - -/** - * @brief Refresh the class. - * If nx changes, reallocate space. If b is provided, initialize it. - * - * @param nx_new length of new x, default 0 means the length doesn't change - * @param pinp_b new b in Ax = b, default nullptr means we are dealing with general case - */ -void Opt_CG::refresh(int nx_new, double* pinp_b) -{ - this->iter_ = 0; - this->alpha_ = 0.; - this->beta_ = 0.; - if (nx_new != 0) - { - this->allocate(nx_new); - } - else - { - ModuleBase::GlobalFunc::ZEROS(this->pdirect_old_, this->nx_); - ModuleBase::GlobalFunc::ZEROS(this->pgradient_old_, this->nx_); - } - if (pinp_b != nullptr) - this->init_b(pinp_b); -} - -/** - * @brief Get the next optimization direction. - * - * @param [in] pgradient Ad for linear equaiont Ax=b, and gradient for general case - * @param [in] label 0 for solve Ax=b, 1 for PR form, 2 for HZ form. - * @param [in, out] rdirect the next optimization direction - * - */ -void Opt_CG::next_direct(double* pgradient, int label, double* rdirect) -{ - if (label == 0) // standard CG to solve Ap=x - { - this->stantard_CGdirect(pgradient, rdirect); - } - else if (label == 1 or label == 2) // FR formula or HZ form - { - if (this->iter_ == 0) // if iter == 0, d = -g - { - for (int i = 0; i < this->nx_; ++i) - { - rdirect[i] = -pgradient[i]; - this->pgradient_old_[i] = pgradient[i]; - this->pdirect_old_[i] = rdirect[i]; - } - } - else // d = -g + beta * d - { - if (label == 1) - { - this->PR_beta(pgradient); - } - else if (label == 2) - { - this->HZ_beta(pgradient); - } - for (int i = 0; i < this->nx_; ++i) - { - rdirect[i] = -pgradient[i] + this->beta_ * this->pdirect_old_[i]; - this->pgradient_old_[i] = pgradient[i]; - this->pdirect_old_[i] = rdirect[i]; - } - } - this->iter_++; - } -} - -/** - * @brief Get the step length, only work for standard CG - * - * @param pAd Ad for Ax=b - * @param pdirect direction - * @param ifPD 0 if positive definite, -1, -2 when not - * @return the step length alpha - */ -double Opt_CG::step_length(double* pAd, double* pdirect, int& ifPD) -{ - double dAd = this->inner_product(pdirect, pAd, this->nx_); - Parallel_Reduce::reduce_all(dAd); - ifPD = 0; - // check for positive-definiteness, very important for convergence - if (dAd == 0) - { - this->alpha_ = 0; - return 0; - } - else if (dAd < 0) - { - if (this->iter_ == 1) - { - ifPD = -1; - } - else - { - ifPD = -2; - } - } - this->alpha_ = this->gg_ / dAd; - return this->alpha_; -} - -/** - * @brief Get the next optimization direction with standard CG workflow. - * - * @param [in] pAd Ad for Ax=b - * @param [out] rdirect the next direction - */ -void Opt_CG::stantard_CGdirect(double* pAd, double* rdirect) -{ - if (this->iter_ == 0) - { - for (int i = 0; i < this->nx_; ++i) - { - this->pgradient_old_[i] = -this->pb_[i]; - rdirect[i] = this->pb_[i]; - this->pdirect_old_[i] = this->pb_[i]; - } - } - else - { - std::vector temp_gradient(this->nx_); - for (int i = 0; i < this->nx_; ++i) - { - temp_gradient[i] = this->pgradient_old_[i] + this->alpha_ * pAd[i]; - } - this->beta_ = this->inner_product(temp_gradient.data(), temp_gradient.data(), this->nx_) / this->gg_; - Parallel_Reduce::reduce_all(this->beta_); - for (int i = 0; i < this->nx_; ++i) - { - this->pgradient_old_[i] = temp_gradient[i]; - rdirect[i] = -this->pgradient_old_[i] + this->beta_ * this->pdirect_old_[i]; - this->pdirect_old_[i] = rdirect[i]; - } - } - this->gg_ = this->inner_product(this->pgradient_old_, this->pgradient_old_, this->nx_); - Parallel_Reduce::reduce_all(this->gg_); - this->iter_++; -} - -/** - * @brief Get the beta in PR form. - * beta_k = max{0, /} - * <> means inner product. - * - * @param pgradient df(x)/dx - */ -void Opt_CG::PR_beta(double* pgradient) -{ - double temp_beta = 0.; - temp_beta = this->inner_product(pgradient, pgradient, this->nx_); - temp_beta -= this->inner_product(pgradient, this->pgradient_old_, this->nx_); - Parallel_Reduce::reduce_all(temp_beta); - double gg_old = this->inner_product(this->pgradient_old_, this->pgradient_old_, this->nx_); - Parallel_Reduce::reduce_all(gg_old); - // temp_beta /= this->inner_product(this->pgradient_old_, this->pgradient_old_, this->nx_); - temp_beta /= gg_old; - this->beta_ = std::max(0., temp_beta); -} - -/** - * @brief Get the beta in HZ form. - * See formula in - * Hager W W, Zhang H. SIAM Journal on optimization, 2005, 16(1): 170-192 - * - * @param pgradient df(x)/dx - */ -void Opt_CG::HZ_beta(double* pgradient) -{ - double* y = new double[this->nx_]; - for (int i = 0; i < this->nx_; ++i) - y[i] = pgradient[i] - this->pgradient_old_[i]; - - double py = this->inner_product(this->pdirect_old_, y, this->nx_); - Parallel_Reduce::reduce_all(py); - double yy = this->inner_product(y, y, this->nx_); - Parallel_Reduce::reduce_all(yy); - double pg = this->inner_product(this->pdirect_old_, pgradient, this->nx_); - Parallel_Reduce::reduce_all(pg); - double yg = this->inner_product(y, pgradient, this->nx_); - Parallel_Reduce::reduce_all(yg); - double temp_beta = (yg - 2 * pg * yy / py) / py; - - double pp = this->inner_product(this->pdirect_old_, this->pdirect_old_, this->nx_); - Parallel_Reduce::reduce_all(pp); - double gg = this->inner_product(this->pgradient_old_, this->pgradient_old_, this->nx_); - Parallel_Reduce::reduce_all(gg); - double temp_eta = -1 / (sqrt(pp) * std::min(this->eta_, sqrt(gg))); - - this->beta_ = std::max(temp_beta, temp_eta); - - delete[] y; -} -} // namespace ModuleBase \ No newline at end of file diff --git a/source/module_base/opt_CG.h b/source/module_base/opt_CG.h deleted file mode 100644 index 32707d6ca7..0000000000 --- a/source/module_base/opt_CG.h +++ /dev/null @@ -1,91 +0,0 @@ -#ifndef OPT_CG_H -#define OPT_CG_H - -#include - -#include - -#include "global_function.h" -#include "module_base/parallel_reduce.h" - -namespace ModuleBase -{ -/** - * @brief A class designed to deal with optimization problems with CG method. - * Three forms of CG methods have been implemented, including standard flow to solve - * the linear equation Ax = b, Polak-Ribire (PR) form and Hager-Zhang (HZ) form to - * solve general optimization problems min{f(x)}. - * We adopt following abbreviation - * x -> solution - * d -> direction - * g -> gradient - * @author sunliang - */ -class Opt_CG -{ - public: - Opt_CG(); - ~Opt_CG(); - - void init_b(double* pinp_b // b in the linear equation Ax = b - ); - void allocate(int nx // length of the solution array x - ); - void set_para(double dV); - void refresh(int nx_new = 0, // length of new x, default 0 means the length doesn't change - double* pinp_b = nullptr // new b in Ax = b, default nullptr means we are dealing with general case - ); - - void next_direct(double* pgradient, // Ad for linear equaiont Ax=b, and gradient for general case - int label, // 0 for solve Ax=b, 1 for PR form, 2 for HZ form - double* rdirect // next direct - ); - double step_length(double* pAd, // Ad for Ax=b - double* pdirect, // direct - int& ifPD // if postive definit - ); - - double get_residual() - { - return sqrt(this->gg_); - }; - int get_iter() - { - return this->iter_; - } - - // void ZEROS(double *x, int n) - // { - // for (int i = 0; i < n; ++i) x[i] =0; - // } - - private: - double dV_ = 1.; - int nx_ = 0; // length of the sulotion array x - int iter_ = 0; // number of iteration - double gg_ = 1000; // gradient dot gradient - double beta_ = 0.; // d = -g + beta * d - double eta_ = 0.01; // a constand used in HZ form - double* pdirect_old_ = nullptr; // direction of last step - double* pgradient_old_ = nullptr; // gradient, for meth=0, gradient is minus residual r. - - // only for standard CG - double alpha_ = 0.; // step length in standard CG - double* pb_ = nullptr; // b in Ax=b, only for standard CG - - void stantard_CGdirect(double* pAd, // Ad for Ax=b - double* rdirect // next direct - ); - void PR_beta(double* pgradient // df(x)/dx - ); - void HZ_beta(double* pgradient // df(x)/dx - ); - double inner_product(double* pa, double* pb, int length) - { - double innerproduct = BlasConnector::dot(length, pa, 1, pb, 1); - innerproduct *= this->dV_; - return innerproduct; - } -}; -} // namespace ModuleBase -#endif \ No newline at end of file diff --git a/source/module_base/opt_DCsrch.cpp b/source/module_base/opt_DCsrch.cpp deleted file mode 100644 index 924e0dcc22..0000000000 --- a/source/module_base/opt_DCsrch.cpp +++ /dev/null @@ -1,732 +0,0 @@ -#include "opt_DCsrch.h" - -#include -#include - -// This file is translated from fortran codes dcstep.f of scipy. -// The structure and all annotation of the original file have been retained. -// See original source at https://github.com/scipy/scipy/blob/main/scipy/optimize/minpack2/dcstep.f. -// sunliang 2022-05-30 - -namespace ModuleBase -{ -int dcsrch(double& stp, - double& f, - double& g, - double& ftol, - double& gtol, - double& xtol, - char* task, - double& stpmin, - double& stpmax, - int* isave, - double* dsave) -{ - // c ********** - // c - // c Subroutine dcsrch - // c - // c This subroutine finds a step that satisfies a sufficient - // c decrease condition and a curvature condition. - // c - // c Each call of the subroutine updates an interval with - // c endpoints stx and sty. The interval is initially chosen - // c so that it contains a minimizer of the modified function - // c - // c psi(stp) = f(stp) - f(0) - ftol*stp*f'(0). - // c - // c If psi(stp) <= 0 and f'(stp) >= 0 for some step, then the - // c interval is chosen so that it contains a minimizer of f. - // c - // c The algorithm is designed to find a step that satisfies - // c the sufficient decrease condition - // c - // c f(stp) <= f(0) + ftol*stp*f'(0), - // c - // c and the curvature condition - // c - // c abs(f'(stp)) <= gtol*abs(f'(0)). - // c - // c If ftol is less than gtol and if, for example, the function - // c is bounded below, then there is always a step which satisfies - // c both conditions. - // c - // c If no step can be found that satisfies both conditions, then - // c the algorithm stops with a warning. In this case stp only - // c satisfies the sufficient decrease condition. - // c - // c A typical invocation of dcsrch has the following outline: - // c - // c Evaluate the function at stp = 0.0d0; store in f. - // c Evaluate the gradient at stp = 0.0d0; store in g. - // c Choose a starting step stp. - // c - // c task = 'START' - // c 10 continue - // c call dcsrch(stp,f,g,ftol,gtol,xtol,task,stpmin,stpmax, - // c + isave,dsave) - // c if (task .eq. 'FG') then - // c Evaluate the function and the gradient at stp - // c go to 10 - // c end if - // c - // c NOTE: The user must not alter work arrays between calls. - // c - // c The subroutine statement is - // c - // c subroutine dcsrch(f,g,stp,ftol,gtol,xtol,stpmin,stpmax, - // c task,isave,dsave) - // c where - // c - // c stp is a double precision variable. - // c On entry stp is the current estimate of a satisfactory - // c step. On initial entry, a positive initial estimate - // c must be provided. - // c On exit stp is the current estimate of a satisfactory step - // c if task = 'FG'. If task = 'CONV' then stp satisfies - // c the sufficient decrease and curvature condition. - // c - // c f is a double precision variable. - // c On initial entry f is the value of the function at 0. - // c On subsequent entries f is the value of the - // c function at stp. - // c On exit f is the value of the function at stp. - // c - // c g is a double precision variable. - // c On initial entry g is the derivative of the function at 0. - // c On subsequent entries g is the derivative of the - // c function at stp. - // c On exit g is the derivative of the function at stp. - // c - // c ftol is a double precision variable. - // c On entry ftol specifies a nonnegative tolerance for the - // c sufficient decrease condition. - // c On exit ftol is unchanged. - // c - // c gtol is a double precision variable. - // c On entry gtol specifies a nonnegative tolerance for the - // c curvature condition. - // c On exit gtol is unchanged. - // c - // c xtol is a double precision variable. - // c On entry xtol specifies a nonnegative relative tolerance - // c for an acceptable step. The subroutine exits with a - // c warning if the relative difference between sty and stx - // c is less than xtol. - // c On exit xtol is unchanged. - // c - // c task is a character variable of length at least 60. - // c On initial entry task must be set to 'START'. - // c On exit task indicates the required action: - // c - // c If task(1:2) = 'FG' then evaluate the function and - // c derivative at stp and call dcsrch again. - // c - // c If task(1:4) = 'CONV' then the search is successful. - // c - // c If task(1:4) = 'WARN' then the subroutine is not able - // c to satisfy the convergence conditions. The exit value of - // c stp contains the best point found during the search. - // c - // c If task(1:5) = 'ERROR' then there is an error in the - // c input arguments. - // c - // c On exit with convergence, a warning or an error, the - // c variable task contains additional information. - // c - // c stpmin is a double precision variable. - // c On entry stpmin is a nonnegative lower bound for the step. - // c On exit stpmin is unchanged. - // c - // c stpmax is a double precision variable. - // c On entry stpmax is a nonnegative upper bound for the step. - // c On exit stpmax is unchanged. - // c - // c isave is an integer work array of dimension 2. - // c - // c dsave is a double precision work array of dimension 13. - // c - // c Subprograms called - // c - // c MINPACK-2 ... dcstep - // c - // c MINPACK-1 Project. June 1983. - // c Argonne National Laboratory. - // c Jorge J. More' and David J. Thuente. - // c - // c MINPACK-2 Project. November 1993. - // c Argonne National Laboratory and University of Minnesota. - // c Brett M. Averick, Richard G. Carter, and Jorge J. More'. - // c - // c ********** - double zero = 0.0; - double p5 = 0.5; - double p66 = 0.66; - double xtrapl = 1.1; - double xtrapu = 4.0; - - bool brackt = false; - int stage = 0; - double finit = 0.0, ftest = 0.0, fm = 0.0, fx = 0.0, fxm = 0.0, fy = 0.0, fym = 0.0; - double ginit = 0.0, gtest = 0.0, gm = 0.0, gx = 0.0, gxm = 0.0, gy = 0.0, gym = 0.0; - double stx = 0.0, sty = 0.0, stmin = 0.0, stmax = 0.0, width = 0.0, width1 = 0.0; - - extern /* Subroutine */ void dcstep(double&, - double&, - double&, - double&, - double&, - double&, - double&, - double&, - double&, - bool&, - double&, - double&); - // c Initialization block. - if (strncmp(task, "START", 5) == 0) - { - // c Check the input arguments for errors. - if (stp < stpmin) - { - strcpy(task, "ERROR: STP .LT. STPMIN"); - } - if (stp > stpmax) - { - strcpy(task, "ERROR: STP .GT. STPMAX"); - } - if (g >= 0.) - { - strcpy(task, "ERROR: INITIAL G .GE. ZERO"); - } - if (ftol < 0.) - { - strcpy(task, "ERROR: FTOL .LT. ZERO"); - } - if (gtol < 0.) - { - strcpy(task, "ERROR: GTOL .LT. ZERO"); - } - if (xtol < 0.) - { - strcpy(task, "ERROR: XTOL .LT. ZERO"); - } - if (stpmin < 0.) - { - strcpy(task, "ERROR: STPMIN .LT. ZERO"); - } - if (stpmax < stpmin) - { - strcpy(task, "ERROR: STPMAX .LT. STPMIN"); - } - - // c Exit if there are errors on input. - - if (strncmp(task, "ERROR", 5) == 0) - { - return 0; - } - // c Initialize local variables. - brackt = false; - stage = 1; - finit = f; - ginit = g; - gtest = ftol * ginit; - width = stpmax - stpmin; - width1 = width / p5; - - // c The variables stx, fx, gx contain the values of the step, - // c function, and derivative at the best step. - // c The variables sty, fy, gy contain the value of the step, - // c function, and derivative at sty. - // c The variables stp, f, g contain the values of the step, - // c function, and derivative at stp. - - stx = zero; - fx = finit; - gx = ginit; - sty = zero; - fy = finit; - gy = ginit; - stmin = zero; - stmax = stp + stp * xtrapu; - strcpy(task, "FG"); - goto L10; - } - else - { - - // c Restore local variables. - - if (isave[1] == 1) - { - brackt = true; - } - else - { - brackt = false; - } - stage = isave[2]; - ginit = dsave[1]; - gtest = dsave[2]; - gx = dsave[3]; - gy = dsave[4]; - finit = dsave[5]; - fx = dsave[6]; - fy = dsave[7]; - stx = dsave[8]; - sty = dsave[9]; - stmin = dsave[10]; - stmax = dsave[11]; - width = dsave[12]; - width1 = dsave[13]; - } - - // c If psi(stp) <= 0 and f'(stp) >= 0 for some step, then the - // c algorithm enters the second stage. - - ftest = finit + stp * gtest; - if (stage == 1 && f <= ftest && g >= zero) - stage = 2; - - // c Test for warnings. - - if (brackt && (stp <= stmin || stp >= stmax)) - { - strcpy(task, "WARNING: ROUNDING ERRORS PREVENT PROGRESS"); - } - if (brackt && stmax - stmin <= xtol * stmax) - { - strcpy(task, "WARNING: XTOL TEST SATISFIED"); - } - if (stp == stpmax && f <= ftest && g <= gtest) - { - strcpy(task, "WARNING: STP = STPMAX"); - } - if (stp == stpmin && (f > ftest || g >= gtest)) - { - strcpy(task, "WARNING: STP = STPMIN"); - } - - // c Test for convergence. - - if (f <= ftest && std::abs(g) <= gtol * (-ginit)) - { - strcpy(task, "CONVERGENCE"); - // strcpy(task, "CONVERGENCE", 11); - } - - // c Test for termination. - - if (strncmp(task, "WARN", 4) == 0 || strncmp(task, "CONV", 4) == 0) - { - goto L10; - } - - // c A modified function is used to predict the step during the - // c first stage if a lower function value has been obtained but - // c the decrease is not sufficient. - - if (stage == 1 && f <= fx && f > ftest) - { - - // c Define the modified function and derivative values. - - fm = f - stp * gtest; - fxm = fx - stx * gtest; - fym = fy - sty * gtest; - gm = g - gtest; - gxm = gx - gtest; - gym = gy - gtest; - - // c Call dcstep to update stx, sty, and to compute the new step. - - dcstep(stx, fxm, gxm, sty, fym, gym, stp, fm, gm, brackt, stmin, stmax); - - // c Reset the function and derivative values for f. - - fx = fxm + stx * gtest; - fy = fym + sty * gtest; - gx = gxm + gtest; - gy = gym + gtest; - } - else - { - - // c Call dcstep to update stx, sty, and to compute the new step. - - dcstep(stx, fx, gx, sty, fy, gy, stp, f, g, brackt, stmin, stmax); - } - // c Decide if a bisection step is needed. - if (brackt) - { - if (std::abs(sty - stx) >= p66 * width1) - stp = stx + p5 * (sty - stx); - width1 = width; - width = std::abs(sty - stx); - } - // c Set the minimum and maximum steps allowed for stp. - - if (brackt) - { - stmin = std::min(stx, sty); - stmax = std::max(stx, sty); - } - else - { - stmin = stp + xtrapl * (stp - stx); - stmax = stp + xtrapu * (stp - stx); - } - - // c Force the step to be within the bounds stpmax and stpmin. - stp = std::max(stp, stpmin); - stp = std::min(stp, stpmax); - // c If further progress is not possible, let stp be the best - // c point obtained during the search. - if ((brackt && (stp <= stmin || stp >= stmax)) || (brackt && stmax - stmin <= xtol * stmax)) - { - stp = stx; - } - // c Obtain another function and derivative. - - strcpy(task, "FG"); -L10: - // c Save local variables. - if (brackt) - { - isave[1] = 1; - } - else - { - isave[1] = 0; - } - isave[2] = stage; - dsave[1] = ginit; - dsave[2] = gtest; - dsave[3] = gx; - dsave[4] = gy; - dsave[5] = finit; - dsave[6] = fx; - dsave[7] = fy; - dsave[8] = stx; - dsave[9] = sty; - dsave[10] = stmin; - dsave[11] = stmax; - dsave[12] = width; - dsave[13] = width1; - return 0; -} - -/* Subroutine */ void dcstep(double& stx, - double& fx, - double& dx, - double& sty, - double& fy, - double& dy, - double& stp, - double& fp, - double& dp, - bool& brackt, - double& stpmin, - double& stpmax) -{ - // c ********** - // c - // c Subroutine dcstep - // c - // c This subroutine computes a safeguarded step for a search - // c procedure and updates an interval that contains a step that - // c satisfies a sufficient decrease and a curvature condition. - // c - // c The parameter stx contains the step with the least function - // c value. If brackt is set to .true. then a minimizer has - // c been bracketed in an interval with endpoints stx and sty. - // c The parameter stp contains the current step. - // c The subroutine assumes that if brackt is set to .true. then - // c - // c min(stx,sty) < stp < max(stx,sty), - // c - // c and that the derivative at stx is negative in the direction - // c of the step. - // c - // c The subroutine statement is - // c - // c subroutine dcstep(stx,fx,dx,sty,fy,dy,stp,fp,dp,brackt, - // c stpmin,stpmax) - // c - // c where - // c - // c stx is a double precision variable. - // c On entry stx is the best step obtained so far and is an - // c endpoint of the interval that contains the minimizer. - // c On exit stx is the updated best step. - // c - // c fx is a double precision variable. - // c On entry fx is the function at stx. - // c On exit fx is the function at stx. - // c - // c dx is a double precision variable. - // c On entry dx is the derivative of the function at - // c stx. The derivative must be negative in the direction of - // c the step, that is, dx and stp - stx must have opposite - // c signs. - // c On exit dx is the derivative of the function at stx. - // c - // c sty is a double precision variable. - // c On entry sty is the second endpoint of the interval that - // c contains the minimizer. - // c On exit sty is the updated endpoint of the interval that - // c contains the minimizer. - // c - // c fy is a double precision variable. - // c On entry fy is the function at sty. - // c On exit fy is the function at sty. - // c - // c dy is a double precision variable. - // c On entry dy is the derivative of the function at sty. - // c On exit dy is the derivative of the function at the exit sty. - // c - // c stp is a double precision variable. - // c On entry stp is the current step. If brackt is set to .true. - // c then on input stp must be between stx and sty. - // c On exit stp is a new trial step. - // c - // c fp is a double precision variable. - // c On entry fp is the function at stp - // c On exit fp is unchanged. - // c - // c dp is a double precision variable. - // c On entry dp is the the derivative of the function at stp. - // c On exit dp is unchanged. - // c - // c brackt is an logical variable. - // c On entry brackt specifies if a minimizer has been bracketed. - // c Initially brackt must be set to .false. - // c On exit brackt specifies if a minimizer has been bracketed. - // c When a minimizer is bracketed brackt is set to .true. - // c - // c stpmin is a double precision variable. - // c On entry stpmin is a lower bound for the step. - // c On exit stpmin is unchanged. - // c - // c stpmax is a double precision variable. - // c On entry stpmax is an upper bound for the step. - // c On exit stpmax is unchanged. - // c - // c MINPACK-1 Project. June 1983 - // c Argonne National Laboratory. - // c Jorge J. More' and David J. Thuente. - // c - // c MINPACK-2 Project. November 1993. - // c Argonne National Laboratory and University of Minnesota. - // c Brett M. Averick and Jorge J. More'. - // c - // c ********** - double zero = 0.; - double p66 = 0.66; - double two = 2.; - double three = 3.; - - double gamma, p, q, r, s, sgnd, stpc, stpf, stpq, theta; - - sgnd = dp * (dx / std::abs(dx)); - - // c First case: A higher function value. The minimum is bracketed. - // c If the cubic step is closer to stx than the quadratic step, the - // c cubic step is taken, otherwise the average of the cubic and - // c quadratic steps is taken. - - if (fp > fx) - { - theta = three * (fx - fp) / (stp - stx) + dx + dp; - double temps = std::max(std::abs(theta), std::abs(dx)); // get max(std::abs(theta),std::abs(dx),std::abs(dp)) - s = std::max(temps, std::abs(dp)); - gamma = s * sqrt(pow(theta / s, 2) - (dx / s) * (dp / s)); - if (stp < stx) - gamma = -gamma; - p = (gamma - dx) + theta; - q = ((gamma - dx) + gamma) + dp; - r = p / q; - stpc = stx + r * (stp - stx); - stpq = stx + ((dx / ((fx - fp) / (stp - stx) + dx)) / two) * (stp - stx); - if (std::abs(stpc - stx) < std::abs(stpq - stx)) - { - stpf = stpc; - } - else - { - stpf = stpc + (stpq - stpc) / two; - } - brackt = true; - } - - // c Second case: A lower function value and derivatives of opposite - // c sign. The minimum is bracketed. If the cubic step is farther from - // c stp than the secant step, the cubic step is taken, otherwise the - // c secant step is taken. - - else if (sgnd < zero) - { - theta = three * (fx - fp) / (stp - stx) + dx + dp; - double temps = std::max(std::abs(theta), std::abs(dx)); // get max(std::abs(theta),std::abs(dx),std::abs(dp)) - s = std::max(temps, std::abs(dp)); - gamma = s * sqrt(pow(theta / s, 2) - (dx / s) * (dp / s)); - if (stp > stx) - gamma = -gamma; - p = (gamma - dp) + theta; - q = ((gamma - dp) + gamma) + dx; - r = p / q; - stpc = stp + r * (stx - stp); - stpq = stp + (dp / (dp - dx)) * (stx - stp); - if (std::abs(stpc - stp) > std::abs(stpq - stp)) - { - stpf = stpc; - } - else - { - stpf = stpq; - } - brackt = true; - } - - // c Third case: A lower function value, derivatives of the same sign, - // c and the magnitude of the derivative decreases. - - else if (std::abs(dp) < std::abs(dx)) - { - // c The cubic step is computed only if the cubic tends to infinity - // c in the direction of the step or if the minimum of the cubic - // c is beyond stp. Otherwise the cubic step is defined to be the - // c secant step. - theta = three * (fx - fp) / (stp - stx) + dx + dp; - double temps = std::max(std::abs(theta), std::abs(dx)); // get max(std::abs(theta),std::abs(dx),std::abs(dp)) - s = std::max(temps, std::abs(dp)); - // c The case gamma = 0 only arises if the cubic does not tend - // c to infinity in the direction of the step. - gamma = s * sqrt(std::max(zero, pow(theta / s, 2) - (dx / s) * (dp / s))); - if (stp > stx) - gamma = -gamma; - p = (gamma - dp) + theta; - q = (gamma + (dx - dp)) + gamma; - r = p / q; - if (r < zero && gamma != zero) - { - stpc = stp + r * (stx - stp); - } - else if (stp > stx) - { - stpc = stpmax; - } - else - { - stpc = stpmin; - } - stpq = stp + (dp / (dp - dx)) * (stx - stp); - - if (brackt) - { - // c A minimizer has been bracketed. If the cubic step is - // c closer to stp than the secant step, the cubic step is - // c taken, otherwise the secant step is taken. - if (std::abs(stpc - stp) < std::abs(stpq - stp)) - { - stpf = stpc; - } - else - { - stpf = stpq; - } - if (stp > stx) - { - stpf = std::min(stp + p66 * (sty - stp), stpf); - } - else - { - stpf = std::max(stp + p66 * (sty - stp), stpf); - } - } - else - { - // c A minimizer has not been bracketed. If the cubic step is - // c farther from stp than the secant step, the cubic step is - // c taken, otherwise the secant step is taken. - if (std::abs(stpc - stp) > std::abs(stpq - stp)) - { - stpf = stpc; - } - else - { - stpf = stpq; - } - stpf = std::min(stpmax, stpf); - stpf = std::max(stpmin, stpf); - } - } - // c Fourth case: A lower function value, derivatives of the same sign, - // c and the magnitude of the derivative does not decrease. If the - // c minimum is not bracketed, the step is either stpmin or stpmax, - // c otherwise the cubic step is taken. - else - { - if (brackt) - { - theta = three * (fp - fy) / (sty - stp) + dy + dp; - double temps - = std::max(std::abs(theta), std::abs(dy)); // get max(std::abs(theta),std::abs(dy),std::abs(dp)) - s = std::max(temps, std::abs(dp)); - gamma = s * sqrt(pow(theta / s, 2) - (dy / s) * (dp / s)); - if (stp > sty) - gamma = -gamma; - p = (gamma - dp) + theta; - q = ((gamma - dp) + gamma) + dy; - r = p / q; - stpc = stp + r * (sty - stp); - stpf = stpc; - } - else if (stp > stx) - { - stpf = stpmax; - } - else - { - stpf = stpmin; - } - } - // c Update the interval which contains a minimizer. - if (fp > fx) - { - sty = stp; - fy = fp; - dy = dp; - } - else - { - if (sgnd < zero) - { - sty = stx; - fy = fx; - dy = dx; - } - stx = stp; - fx = fp; - dx = dp; - } - // c Compute the new step. - stp = stpf; -} - -void Opt_DCsrch::dcSrch(double& f, double& g, double& rstp, char* rtask) -{ - dcsrch(rstp, - f, - g, - this->ftol_, - this->gtol_, - this->xtol_, - rtask, - this->stpmin_, - this->stpmax_, - this->isave_, - this->dsave_); -} -} // namespace ModuleBase diff --git a/source/module_base/opt_DCsrch.h b/source/module_base/opt_DCsrch.h deleted file mode 100644 index 6432833350..0000000000 --- a/source/module_base/opt_DCsrch.h +++ /dev/null @@ -1,90 +0,0 @@ -#ifndef OPT_DCSRCH_H -#define OPT_DCSRCH_H - -#include - -#include "constants.h" - -namespace ModuleBase -{ - -/** - * @brief A interface to line search - * - */ -class Opt_DCsrch -{ - public: - Opt_DCsrch() - { - this->isave_ = new int[3]; - this->dsave_ = new double[14]; - } - ~Opt_DCsrch() - { - delete[] this->isave_; - delete[] this->dsave_; - } - - // - // - // - /** - * @brief Reset following parameters. - * The default setting in PROFESS is - * TN ftol = 1e-4 gtol = 2e-1 - * CG ftol = 1e-4 gtol = 1e-2 - * BFGS ftol = 1e-4 gtol = 2e-1 - * - * @param ftol nonnegative tolerance for the sufficient decrease condition. - * @param gtol nonnegative tolerance for the curvature condition. - * @param xtol nonnegative relative tolerance for an acceptable step. - * The subroutine exits with a warning if the relative difference between sty and stx is less than xtol. - * @param stpmin nonnegative lower bound for the step. - * @param stpmax nonnegative upper bound for the step. - */ - void set_paras(double ftol = 1e-4, - double gtol = 2e-1, - double xtol = 1e-12, - double stpmin = 0., - double stpmax = ModuleBase::PI) - { - this->ftol_ = ftol; - this->gtol_ = gtol; - this->xtol_ = xtol; - this->stpmin_ = stpmin; - this->stpmax_ = stpmax; - } - - /** - * @brief Interface to dcsrch, finding the optimal step length with line search. - * - * @param f the value of the function at x on initial entry. - * On subsequent entries f is the value of the function at x + stp * d. - * @param g the derivative of the function at 0 on initial entry. - * On subsequent entries g is the derivative of the function at x + stp * d. - * @param rstp the optimized step length, assert the initial value is larger than zero. - * @param rtask a character variable of length at least 60. - * On initial entry task must be set to 'START'. - * On exit task indicates the required action: - * If task(1:2) = 'FG' then evaluate the function and derivative at stp and call dcsrch again. - * If task(1:4) = 'CONV' then the search is successful. - * If task(1:4) = 'WARN' then the subroutine is not able to satisfy the convergence conditions. - * The exit value of stp contains the best point found during the search. - * If task(1:5) = 'ERROR' then there is an error in the input arguments. - */ - void dcSrch(double& f, double& g, double& rstp, char* rtask); - - private: - double ftol_ = 1e-4; // nonnegative tolerance for the sufficient decrease condition. - double gtol_ = 2e-1; // nonnegative tolerance for the curvature condition. - double xtol_ = 1e-12; // nonnegative relative tolerance for an acceptable step. The subroutine exits with a warning - // if the relative difference between sty and stx is less than xtol. - double stpmin_ = 0.; // nonnegative lower bound for the step. - double stpmax_ = ModuleBase::PI; // nonnegative upper bound for the step. - int* isave_ = nullptr; // an integer work array of dimension 2. - double* dsave_ = nullptr; // a double precision work array of dimension 13. -}; -} // namespace ModuleBase - -#endif \ No newline at end of file diff --git a/source/module_base/opt_TN.hpp b/source/module_base/opt_TN.hpp deleted file mode 100644 index aad30b0f60..0000000000 --- a/source/module_base/opt_TN.hpp +++ /dev/null @@ -1,239 +0,0 @@ -#ifndef OPT_TN_H -#define OPT_TN_H - -#include "opt_CG.h" - -#include - -namespace ModuleBase -{ -/** - * @brief A class designed to deal with optimization problems with Truncated-Newton (TN) method. - * At each step, the optimization direction d is determined by roughly - * solving linear equation Hd=-g, where H is Hessian matrix of f(x), and g is the gradient df(x)/dx. - * In this section, we get Hd by interpolation, and solve Hd=-g with CG method. - * We set three truncated conditions: - * 1) the residual of CG method has decreased more than 90%; - * 2) the number of CG iteration is more than 50; - * 3) the residual of CG method doesn't decrease and the CG iteration is larger than 9. - * @author sunliang - */ -class Opt_TN -{ - public: - Opt_TN() - { - this->mach_prec_ = std::numeric_limits::epsilon(); // get machine precise - } - ~Opt_TN() {}; - - /** - * @brief Allocate the space for the arrays in cg_. - * - * @param nx length of the solution array x - */ - void allocate(int nx) - { - this->nx_ = nx; - this->cg_.allocate(this->nx_); - } - - void set_para(double dV) - { - this->dV_ = dV; - this->cg_.set_para(this->dV_); - } - - /** - * @brief Refresh the class. - * If nx changes, reallocate space in cg_. - * - * @param nx_new length of new x, default 0 means the length doesn't change - */ - void refresh(int nx_new = 0) - { - this->iter_ = 0; - if (nx_new != 0) - { - this->nx_ = nx_new; - } - this->cg_.refresh(nx_new); - } - - template - void next_direct( - double* px, // current x - double* pgradient, // df(x)/dx - int& flag, // record which truncated condition was triggered, 0 for cond.1, 1 for cond.2, and 2 for cond.3 - double* rdirect, // next optimization direction - T* t, // point of class T, which contains the gradient function - void (T::*p_calGradient)( - double* ptemp_x, - double* rtemp_gradient) // a function point, which calculates the gradient at provided x - ); - - int get_iter() - { - return this->iter_; - } - - private: - Opt_CG cg_; - double dV_ = 1.; - - int nx_ = 0; // length of the solution array x - int iter_ = 0; // number of the iteration - double mach_prec_ = 0.; // machine precision - - double inner_product(double* pa, double* pb, int length) - { - double innerproduct = BlasConnector::dot(length, pa, 1, pb, 1); - innerproduct *= this->dV_; - return innerproduct; - } - - /** - * @brief Get epsilon used in interpolation. - * epsilon = 2*sqrt(mach_prec_) * (1+|x|) / |d|. - * || means modulu. - * @param px x - * @param pcg_direction the direction of cg_ - * @return epsilon - */ - double get_epsilon(double* px, double* pcg_direction) - { - double epsilon = 0.; - double xx = this->inner_product(px, px, this->nx_); - Parallel_Reduce::reduce_all(xx); - double dd = this->inner_product(pcg_direction, pcg_direction, this->nx_); - Parallel_Reduce::reduce_all(dd); - epsilon = 2 * sqrt(this->mach_prec_) * (1 + sqrt(xx)) / sqrt(dd); - // epsilon = 2 * sqrt(this->mach_prec_) * (1 + sqrt(this->inner_product(px, px, this->nx_))) - // / sqrt(this->inner_product(pcg_direction, pcg_direction, this->nx_)); - return epsilon; - } -}; - -/** - * @brief Get the next direction d with TN method. - * - * @tparam T for example, ESolver_OF - * @param [in] px current x. - * @param [in] pgradient df(x)/dx. - * @param [out] flag record which truncated condition was triggered, 0 for cond.1, 1 for cond.2, and 2 for cond.3. - * @param [out] rdirect next optimization direction. - * @param [in] t pointer of class T, which contains the gradient function. - * @param [in] p_calGradient a function pointer, which calculates gradient at provided x. - */ -template -void Opt_TN::next_direct(double* px, - double* pgradient, - int& flag, - double* rdirect, - T* t, - void (T::*p_calGradient)(double* px, double* rgradient)) -{ - // initialize arrays and parameters - ModuleBase::GlobalFunc::ZEROS(rdirect, this->nx_); // very important - - double* minus_gradient = new double[this->nx_]; // b=-g, which will be used in CG - double* temp_x = new double[this->nx_]; // temp_x = x + step * cg_direct, used in interpolation - double* temp_gradient = new double[this->nx_]; // df(temp_x)/dx - double* cg_direct = new double[this->nx_]; // rdirect += cg_alpha * cg_direct at each step - double* temp_Hcgd = new double[this->nx_]; // Hessian * cg_direct - for (int i = 0; i < this->nx_; ++i) - { - minus_gradient[i] = -pgradient[i]; - } - ModuleBase::GlobalFunc::ZEROS(cg_direct, this->nx_); - ModuleBase::GlobalFunc::ZEROS(temp_x, this->nx_); - ModuleBase::GlobalFunc::ZEROS(temp_gradient, this->nx_); - ModuleBase::GlobalFunc::ZEROS(temp_Hcgd, this->nx_); - - cg_.refresh(0, minus_gradient); - int cg_iter = 0; - int cg_ifPD = 0; - - double epsilon = 0.; // step length in interpolation - double cg_alpha = 0.; // step length got by CG - double init_residual = 0.; // initial residual of CG - double last_residual = 0.; // last residual of CG - double curr_residual = 0.; // current residual of CG - - while (true) - { - cg_.next_direct(temp_Hcgd, 0, cg_direct); - - // get temp_Hcgd with interpolation - // Hcgd = (df(temp_x)/dx - df(x)/x) / epsilon, where temp_x = x + step * cg_direct - epsilon = this->get_epsilon(px, cg_direct); - // epsilon = 1e-9; - for (int i = 0; i < this->nx_; ++i) - { - temp_x[i] = px[i] + epsilon * cg_direct[i]; - } - (t->*p_calGradient)(temp_x, temp_gradient); - for (int i = 0; i < this->nx_; ++i) - { - temp_Hcgd[i] = (temp_gradient[i] - pgradient[i]) / epsilon; - } - - // get CG step length and update rdirect - cg_alpha = cg_.step_length(temp_Hcgd, cg_direct, cg_ifPD); - if (cg_ifPD == -1) // Hessian is not positive definite, and cgiter = 1. - { - for (int i = 0; i < this->nx_; ++i) - { - rdirect[i] += cg_alpha * cg_direct[i]; - } - flag = -1; - break; - } - else if (cg_ifPD == -2) // Hessian is not positive definite, and cgiter > 1. - { - flag = -2; - break; - } - - for (int i = 0; i < this->nx_; ++i) - { - rdirect[i] += cg_alpha * cg_direct[i]; - } - - // store residuals used in truncated conditions - last_residual = curr_residual; - curr_residual = cg_.get_residual(); - cg_iter = cg_.get_iter(); - if (cg_iter == 1) - { - init_residual = curr_residual; - } - - // check truncated conditions - // if (curr_residual < 1e-12) - if (curr_residual < 0.1 * init_residual) - { - flag = 0; - // std::cout << "cg_ iter_ = " << cg_iter << "\n"; - break; - } - else if (cg_iter > 50) - { - flag = 1; - break; - } - else if ((fabs(curr_residual - last_residual) / curr_residual) < 0.01 && cg_iter > 9) - { - flag = 2; - break; - } - } - this->iter_++; - delete[] minus_gradient; - delete[] temp_gradient; - delete[] temp_x; - delete[] temp_Hcgd; - delete[] cg_direct; -} -} // namespace ModuleBase -#endif \ No newline at end of file diff --git a/source/module_base/para_gemm.cpp b/source/module_base/para_gemm.cpp deleted file mode 100644 index abfacf5154..0000000000 --- a/source/module_base/para_gemm.cpp +++ /dev/null @@ -1,412 +0,0 @@ -#include "para_gemm.h" - -#include "kernels/math_kernel_op.h" -#include "parallel_device.h" -#include "module_base/timer.h" -namespace ModuleBase -{ -template -PGemmCN::PGemmCN() -{ -} -template -PGemmCN::~PGemmCN() -{ -#ifdef __MPI - delmem_dev_op()(C_local_tmp_); - delmem_dev_op()(A_tmp_device_); - delmem_dev_op()(B_tmp_device_); -#endif -} - -template -void PGemmCN::set_dimension( -#ifdef __MPI - MPI_Comm comm_col, - MPI_Comm comm_row, -#endif - const int ncolA_in, - const int LDA_in, - const int ncolB_in, - const int LDB_in, - const int nrow_in, - const int LDC_in, - const int mode) -{ -#ifdef __MPI - MPI_Comm_rank(comm_col, &col_rank); - MPI_Comm_size(comm_col, &col_nproc); - if (comm_row != MPI_COMM_NULL) - { - MPI_Comm_rank(comm_row, &row_rank); - MPI_Comm_size(comm_row, &row_nproc); - } - col_world = comm_col; - row_world = comm_row; -#endif - this->LDA = LDA_in; - this->LDB = LDB_in; - this->LDC = LDC_in; - this->ncolA = ncolA_in; - this->ncolB = ncolB_in; - this->nrow = nrow_in; -#ifdef __MPI - switch (mode) - { - case 1: - gatherC = true; - divideCrow = false; - break; - case 2: - gatherC = false; - divideCrow = false; - break; - case 3: - gatherC = false; - divideCrow = true; - break; - default: - break; - } - - if(col_nproc > 1) - { - requests.resize(col_nproc); - if (this->divideCrow) - { - colB_loc.resize(col_nproc); - MPI_Allgather(&ncolB, 1, MPI_INT, colB_loc.data(), 1, MPI_INT, col_world); - int sum = 0; - for (int ip = 0; ip < col_nproc; ip++) - { - max_colB = std::max(max_colB, colB_loc[ip]); - sum += colB_loc[ip]; - } - size_C_local = sum * LDC; - - // allocate temperory memory - if (std::is_same::value) - { - resmem_dev_op()(B_tmp_device_, max_colB * LDB); - } - B_tmp_.resize(max_colB * LDB); - } - else - { - colA_loc.resize(col_nproc); - MPI_Allgather(&ncolA, 1, MPI_INT, colA_loc.data(), 1, MPI_INT, col_world); - for (int ip = 0; ip < col_nproc; ip++) - { - max_colA = std::max(max_colA, colA_loc[ip]); - } - size_C_local = ncolB * LDC; - - // allocate temperory memory - if (std::is_same::value) - { - resmem_dev_op()(A_tmp_device_, max_colA * LDA); -#ifndef __CUDA_MPI - isend_tmp_.resize(max_colA * LDA); -#endif - } - A_tmp_.resize(max_colA * LDA); - } - - if (this->gatherC) - { - colB_loc.resize(col_nproc); - recv_counts.resize(col_nproc); - displs.resize(col_nproc); - MPI_Allgather(&ncolB, 1, MPI_INT, colB_loc.data(), 1, MPI_INT, col_world); - for (int ip = 0; ip < col_nproc; ip++) - { - recv_counts[ip] = LDC * colB_loc[ip]; - } - displs[0] = 0; - for (int ip = 1; ip < col_nproc; ip++) - { - displs[ip] = displs[ip - 1] + recv_counts[ip - 1]; - } - size_C_global = displs[col_nproc - 1] + recv_counts[col_nproc - 1]; - - // allocate temperory memory - if (std::is_same::value) - { - resmem_dev_op()(C_local_tmp_, size_C_local); -#ifndef __CUDA_MPI - C_global_tmp_.resize(size_C_global); -#endif - } - C_tmp_.resize(size_C_local); - } - } -#endif -} - -template -void PGemmCN::multiply(const T alpha, const T* A, const T* B, const T beta, T* C) -{ - ModuleBase::timer::tick("PGemmCN", "multiply"); -#ifdef __MPI - if (this->col_nproc > 1) - { - if (this->divideCrow) - { - multiply_row(alpha, A, B, beta, C); - } - else - { - multiply_col(alpha, A, B, beta, C); - } - } - else -#endif - { - multiply_single(alpha, A, B, beta, C); - } - ModuleBase::timer::tick("PGemmCN", "multiply"); -} - -template -void PGemmCN::multiply_single(const T alpha, const T* A, const T* B, const T beta, T* C) -{ - const Device* ctx = {}; -#ifdef __MPI - T real_beta = row_rank == 0 ? beta : 0; -#else - T real_beta = beta; -#endif - ModuleBase::gemm_op()('C', 'N', ncolA, ncolB, nrow, &alpha, A, LDA, B, LDB, &real_beta, C, LDC); -#ifdef __MPI - if (this->row_nproc > 1) - { - const int size = ncolB * LDC; - Parallel_Common::reduce_dev(C, size, row_world); - } -#endif -} - -#ifdef __MPI -template -void PGemmCN::multiply_col(const T alpha, const T* A, const T* B, const T beta, T* C) -{ - const Device* ctx = {}; - - // send A to other procs - T* isend_tmp = isend_tmp_.data(); - for (int ip = 0; ip < col_nproc; ip++) - { - if (col_rank != ip) - { - int size = ncolA * LDA; - Parallel_Common::isend_dev(A, size, ip, 0, col_world, &requests[ip], isend_tmp); - } - } - - - //init pointers - T* C_local = C; - if (this->gatherC) - { - if (std::is_same::value) - { - C_local = C_local_tmp_; - } - else - { - C_local = C_tmp_.data(); - } - syncmem_dev_op()(C_local, C + displs[col_rank], size_C_local); - } - T* Atmp_device = nullptr; - if (std::is_same::value) - { - Atmp_device = A_tmp_device_; - } - else - { - Atmp_device = A_tmp_.data(); - } - - // multiply - int shift = 0; - T real_beta = row_rank == 0 ? beta : 0; - for (int ip = 0; ip < col_nproc; ip++) - { - T* C_start = C_local + shift; - if (col_rank == ip) - { - ModuleBase::gemm_op()('C', - 'N', - ncolA, - ncolB, - nrow, - &alpha, - A, - LDA, - B, - LDB, - &real_beta, - C_start, - LDC); - shift += ncolA; - } - else - { - int m = colA_loc[ip]; - int size = m * LDA; - MPI_Status status; - Parallel_Common::recv_dev(Atmp_device, size, ip, 0, col_world, &status, A_tmp_.data()); - MPI_Wait(&requests[ip], &status); - ModuleBase::gemm_op()('C', - 'N', - m, - ncolB, - nrow, - &alpha, - Atmp_device, - LDA, - B, - LDB, - &real_beta, - C_start, - LDC); - shift += m; - } - } - - if (this->gatherC) - { -#ifdef __CUDA_MPI - T* Clocal_mpi = C_local; - T* Cglobal_mpi = C; -#else - T* Clocal_mpi = C_tmp_.data(); - T* Cglobal_mpi = nullptr; - if (std::is_same::value) - { - syncmem_d2h_op()(Clocal_mpi, C_local, size_C_local); - Cglobal_mpi = C_global_tmp_.data(); - } - else - { - Cglobal_mpi = C; - } -#endif - if (this->row_nproc > 1) - { - Parallel_Common::reduce_data(Clocal_mpi, size_C_local, row_world); - } - Parallel_Common::gatherv_data(Clocal_mpi, - size_C_local, - Cglobal_mpi, - recv_counts.data(), - displs.data(), - col_world); -#ifndef __CUDA_MPI - if (std::is_same::value) - { - syncmem_h2d_op()(C, Cglobal_mpi, size_C_global); - } -#endif - } - else - { - if (this->row_nproc > 1) - { - Parallel_Common::reduce_dev(C, size_C_local, row_world); - } - } -} - -template -void PGemmCN::multiply_row(const T alpha, const T* A, const T* B, const T beta, T* C) -{ - const Device* ctx = {}; - - // Send B to other procs - for (int ip = 0; ip < col_nproc; ip++) - { - if (col_rank != ip) - { - int size = ncolB * LDB; - Parallel_Common::isend_dev(B, size, ip, 0, col_world, &requests[ip], B_tmp_.data()); - } - } - - // init pointers - T* Btmp_device = nullptr; - if (std::is_same::value) - { - Btmp_device = B_tmp_device_; - } - else - { - Btmp_device = B_tmp_.data(); - } - - // multiply - int shift = 0; - T real_beta = row_rank == 0 ? beta : 0; - for (int ip = 0; ip < col_nproc; ip++) - { - T* C_start = C + shift; - if (col_rank == ip) - { - ModuleBase::gemm_op()('C', - 'N', - ncolA, - ncolB, - nrow, - &alpha, - A, - LDA, - B, - LDB, - &real_beta, - C_start, - LDC); - shift += ncolB * LDC; - } - else - { - int m = colB_loc[ip]; - int size = m * LDB; - MPI_Status status; - Parallel_Common::recv_dev(Btmp_device, size, ip, 0, col_world, &status, B_tmp_.data()); - MPI_Wait(&requests[ip], &status); - ModuleBase::gemm_op()('C', - 'N', - ncolA, - m, - nrow, - &alpha, - A, - LDA, - Btmp_device, - LDB, - &real_beta, - C_start, - LDC); - shift += m * LDC; - } - } - if (this->row_nproc > 1) - { - Parallel_Common::reduce_dev(C, size_C_local, row_world); - } -} -#endif - -template class PGemmCN; -template class PGemmCN; -template class PGemmCN, base_device::DEVICE_CPU>; -template class PGemmCN, base_device::DEVICE_CPU>; -#if ((defined __CUDA) || (defined __ROCM)) -template class PGemmCN; -template class PGemmCN; -template class PGemmCN, base_device::DEVICE_GPU>; -template class PGemmCN, base_device::DEVICE_GPU>; -#endif - -} // namespace ModuleBase \ No newline at end of file diff --git a/source/module_base/para_gemm.h b/source/module_base/para_gemm.h deleted file mode 100644 index a0e01d2734..0000000000 --- a/source/module_base/para_gemm.h +++ /dev/null @@ -1,117 +0,0 @@ -#ifndef PARA_GEMM_H -#define PARA_GEMM_H -#include "module_base/module_device/device.h" -#include "module_base/module_device/memory_op.h" - -#include -#ifdef __MPI -#include "mpi.h" -#endif - -namespace ModuleBase -{ -/** - * @brief this class is used to perform parallel matrix multiplication - * C = alpha * A^H * B + beta * C - * Here, A and B are local matrices in each proc, - * C can be C_local or C_global, depending on the value of gatherC - * C_local is a local matrix in each proc - * C_global is a global matrix gathered from all procs and all procs have their own C_global matrix with the same - * C_global and C_local have the same LDC, but different column numbers - * values. - */ -template -class PGemmCN -{ - public: - PGemmCN(); - ~PGemmCN(); - - /** - * @brief set the dimension of A, B, and C - * - * @param ncolA number of columns of A, which is a local matrix in each proc - * @param LDA leading dimension of A in each proc - * @param ncolB number of columns of B, which is a local matrix in each proc - * @param LDB leading dimension of B in each proc - * @param nrow number of rows of A or B - * @param LDC leading dimension of C. C can be C_local or C_global - * @param mode 1: gather C_local to C_global, 2:C_local(nrow * ncol_loc), 3:C_global(nrow_loc * ncol) - */ - void set_dimension( -#ifdef __MPI - MPI_Comm comm_col, - MPI_Comm comm_row, -#endif - const int ncolA, - const int LDA, - const int ncolB, - const int LDB, - const int nrow, - const int LDC, - const int mode = 1); - - /** - * @brief calculate C = alpha * A^H * B + beta * C - * - */ - void multiply(const T alpha, const T* A, const T* B, const T beta, T* C); -#ifdef __MPI - MPI_Comm col_world = MPI_COMM_NULL; ///< column communicator world - MPI_Comm row_world = MPI_COMM_NULL; ///< row communicator world - - int col_rank = 0; ///< rank in col_world - int col_nproc = 1; ///< number of procs in col_world - int row_rank = 0; ///< rank in row_world - int row_nproc = 1; ///< number of procs in row_world - - std::vector colA_loc; ///< [col_nproc] number of columns of A matrix in each proc - int max_colA = 0; ///< maximum number of columns of A matrix in all procs - std::vector colB_loc; ///< [col_nproc] number of columns of B matrix in each proc - int max_colB = 0; ///< maximum number of columns of B matrix in all procs - - std::vector requests; ///< MPI request - std::vector recv_counts; ///< receive counts for gathering C_local to C_global - std::vector displs; ///< displacements for gathering C_local to C_global - int size_C_local = 0; ///< size of C_local, which is a local matrix in each proc - int size_C_global = 0; ///< size of C_global, which is the global C matrix gathered from all procs - bool gatherC = true; ///< whether gather C_local to C_global - bool divideCrow = false; ///< whether divide C_global to C_local -#endif - int ncolA = 0; ///< number of columns of A, which is a local matrix in each proc - int ncolB = 0; ///< number of columns of B, which is a local matrix in each proc - int nrow = 0; ///< number of rows of A or B - int LDA = 0; ///< leading dimension of A in each proc - int LDB = 0; ///< leading dimension of B in each proc - int LDC = 0; ///< leading dimension of C, which can be C_local or C_global - private: - /// @brief for col_nproc == 1 - void multiply_single(const T alpha, const T* A, const T* B, const T beta, T* C); -#ifdef __MPI - /// @brief for mode = 1 or 2 - void multiply_col(const T alpha, const T* A, const T* B, const T beta, T* C); - /// @brief for mode = 3 - void multiply_row(const T alpha, const T* A, const T* B, const T beta, T* C); -#endif - using resmem_dev_op = base_device::memory::resize_memory_op; - using delmem_dev_op = base_device::memory::delete_memory_op; - using syncmem_dev_op = base_device::memory::synchronize_memory_op; - using syncmem_d2h_op = base_device::memory::synchronize_memory_op; - using syncmem_h2d_op = base_device::memory::synchronize_memory_op; - -#ifdef __MPI - private: - std::vector isend_tmp_; ///< temperory memory for sending data - std::vector A_tmp_; ///< temperory memory for A - std::vector B_tmp_; ///< temperory memory for B - std::vector C_tmp_; ///< temperory memory for C - std::vector C_global_tmp_; ///< temperory memory for C_global - T* C_local_tmp_ = nullptr; ///< temperory memory for C_local - T* A_tmp_device_ = nullptr; ///< temperory memory for A - T* B_tmp_device_ = nullptr; ///< temperory memory for B -#endif - - -}; -} // namespace ModuleBase -#endif \ No newline at end of file diff --git a/source/module_base/parallel_2d.cpp b/source/module_base/parallel_2d.cpp deleted file mode 100644 index 3791a1218b..0000000000 --- a/source/module_base/parallel_2d.cpp +++ /dev/null @@ -1,144 +0,0 @@ -#include "parallel_2d.h" - -#include "module_base/scalapack_connector.h" - -#include -#include - -bool Parallel_2D::in_this_processor(const int iw1_all, const int iw2_all) const -{ - return global2local_row(iw1_all) != -1 && global2local_col(iw2_all) != -1; -} - -int Parallel_2D::get_global_row_size() const -{ - if (!is_serial) - { -#ifdef __MPI - return desc[2]; -#endif - } - return nrow; -} - -int Parallel_2D::get_global_col_size() const -{ - if (!is_serial) - { -#ifdef __MPI - return desc[3]; -#endif - } - return ncol; -} - -#ifdef __MPI -MPI_Comm Parallel_2D::comm() const -{ - // it is an error to call blacs_get with an invalid BLACS context - if (blacs_ctxt < 0) - { - return MPI_COMM_NULL; - } - - int sys_ctxt = 0; - Cblacs_get(blacs_ctxt, 10, &sys_ctxt); - // blacs_get with "what" = 10 takes a BLACS context and returns the index - // of the associated system context (MPI communicator) that can be used by - // blacs2sys_handle to get the MPI communicator. - return Cblacs2sys_handle(sys_ctxt); -} - -void Parallel_2D::_init_proc_grid(const MPI_Comm comm, const bool mode) -{ - // determine the number of rows and columns of the process grid - // by factorizing n = p * q such that p, q are closest and p <= q - int num_proc = 0; - MPI_Comm_size(comm, &num_proc); - dim0 = static_cast(std::sqrt(num_proc + 0.5)); - while (dim1 = num_proc / dim0, dim0 * dim1 != num_proc) - { - --dim0; - } - - if (mode) - { - std::swap(dim0, dim1); - } - - // initialize the BLACS grid accordingly - blacs_ctxt = Csys2blacs_handle(comm); - char order = 'R'; // row-major - Cblacs_gridinit(&blacs_ctxt, &order, dim0, dim1); - Cblacs_gridinfo(blacs_ctxt, &dim0, &dim1, &coord[0], &coord[1]); -} - -void Parallel_2D::_set_dist_info(const int mg, const int ng, const int nb) -{ - this->nb = nb; - - // number of local rows and columns - const int zero = 0; - nrow = numroc_(&mg, &nb, &coord[0], &zero, &dim0); - ncol = numroc_(&ng, &nb, &coord[1], &zero, &dim1); - nloc = static_cast(nrow) * ncol; - - // initialize the ScaLAPACK descriptor - int info = 0, lld = std::max(nrow, 1); - descinit_(desc, &mg, &ng, &nb, &nb, &zero, &zero, &blacs_ctxt, &lld, &info); - - // generate the global-to-local and local-to-global index maps - local2global_row_.resize(nrow); - global2local_row_ = std::vector(mg, -1); - for (int i = 0; i < nrow; ++i) - { - local2global_row_[i] = (i / nb * dim0 + coord[0]) * nb + i % nb; - global2local_row_[local2global_row_[i]] = i; - } - - local2global_col_.resize(ncol); - global2local_col_ = std::vector(ng, -1); - for (int j = 0; j < ncol; ++j) - { - local2global_col_[j] = (j / nb * dim1 + coord[1]) * nb + j % nb; - global2local_col_[local2global_col_[j]] = j; - } -} - -int Parallel_2D::init(const int mg, const int ng, const int nb, const MPI_Comm comm, const bool mode) -{ - _init_proc_grid(comm, mode); - _set_dist_info(mg, ng, nb); - return nrow == 0 || ncol == 0; -} - -int Parallel_2D::set(const int mg, const int ng, const int nb, const int blacs_ctxt) -{ - this->blacs_ctxt = blacs_ctxt; - Cblacs_gridinfo(blacs_ctxt, &dim0, &dim1, &coord[0], &coord[1]); - _set_dist_info(mg, ng, nb); - return nrow == 0 || ncol == 0; -} -#endif - -void Parallel_2D::set_serial(const int mg, const int ng) -{ - assert(mg > 0 && ng > 0); - - nb = 1; - dim0 = dim1 = 1; - coord[0] = coord[1] = 0; - nrow = mg; - ncol = ng; - nloc = static_cast(nrow) * ncol; - local2global_row_.resize(nrow); - local2global_col_.resize(ncol); - std::iota(local2global_row_.begin(), local2global_row_.end(), 0); - std::iota(local2global_col_.begin(), local2global_col_.end(), 0); - global2local_row_ = local2global_row_; - global2local_col_ = local2global_col_; - is_serial = true; -#ifdef __MPI - blacs_ctxt = -1; -#endif -} diff --git a/source/module_base/parallel_2d.h b/source/module_base/parallel_2d.h deleted file mode 100644 index 2f8bc8b132..0000000000 --- a/source/module_base/parallel_2d.h +++ /dev/null @@ -1,149 +0,0 @@ -#ifndef _PARALLEL_2D_H_ -#define _PARALLEL_2D_H_ - -#include -#include - -#include "module_base/blacs_connector.h" - -/// @brief This class packs the basic information of -/// 2D-block-cyclic parallel distribution of an arbitrary matrix. -class Parallel_2D -{ - public: - Parallel_2D() = default; - ~Parallel_2D() = default; - - Parallel_2D& operator=(Parallel_2D&& rhs) = default; - Parallel_2D(Parallel_2D&& rhs) = default; - - /// number of local rows - int get_row_size() const - { - return nrow; - }; - - /// number of local columns - int get_col_size() const - { - return ncol; - }; - - /// number of global rows - int get_global_row_size() const; - - /// number of global columns - int get_global_col_size() const; - - /// number of local matrix elements - int64_t get_local_size() const - { - return nloc; - }; - - /// get the local index of a global index (row) - int global2local_row(const int igr) const - { - return global2local_row_[igr]; - } - - /// get the local index of a global index (col) - int global2local_col(const int igc) const - { - return global2local_col_[igc]; - } - - /// get the global index of a local index (row) - int local2global_row(const int ilr) const - { - return local2global_row_[ilr]; - } - - /// get the global index of a local index (col) - int local2global_col(const int ilc) const - { - return local2global_col_[ilc]; - } - - /// check whether a global index is in this process - bool in_this_processor(const int iw1_all, const int iw2_all) const; - - /// side length of 2d square block - int get_block_size() const - { - return nb; - }; - -#ifdef __MPI - /** - * @brief Initialize a BLACS grid with the given MPI communicator - * and set up the info of a block-cyclic distribution. - * - */ - int init(const int mg, - const int ng, - const int nb, // square block is assumed - const MPI_Comm comm, - bool mode = false); - - /** - * @brief Set up the info of a block-cyclic distribution using given - * BLACS context. - * - */ - int set(const int mg, - const int ng, - const int nb, // square block is assumed - const int blacs_ctxt); - - /// BLACS context - int blacs_ctxt = -1; - - /// ScaLAPACK descriptor - int desc[9] = {}; - - MPI_Comm comm() const; -#endif - - void set_serial(const int mg, const int ng); - - // FIXME the following variables should be private, but they are - // widely used in the code currently. Public visibility is kept - // for now, but might be changed in the future. - - /// local size (nloc = nrow * ncol) - int nrow = 0; - int ncol = 0; - int64_t nloc = 0; - // NOTE: ScaLAPACK descriptors use int type for the number of rows and columns of - // both the global and local matrices, so nrow & ncol have to be int type. Their - // product, however, can exceed the range of int type. - - /// block size - int nb = 1; - - /// number of processes in each dimension of the MPI Cartesian grid - int dim0 = 0; - int dim1 = 0; - - /// process coordinate in the BLACS grid - int coord[2] = {-1, -1}; - - /// whether to use the serial mode - bool is_serial = false; - - protected: - /// map from global index to local index - std::vector global2local_row_; - std::vector global2local_col_; - - /// map from local index to global index - std::vector local2global_row_; - std::vector local2global_col_; - -#ifdef __MPI - void _init_proc_grid(const MPI_Comm comm, const bool mode); - void _set_dist_info(const int mg, const int ng, const int nb); -#endif -}; -#endif diff --git a/source/module_base/parallel_comm.cpp b/source/module_base/parallel_comm.cpp deleted file mode 100644 index 5d03447b5a..0000000000 --- a/source/module_base/parallel_comm.cpp +++ /dev/null @@ -1,55 +0,0 @@ -#if defined __MPI - -#include "mpi.h" -#include "parallel_global.h" - -MPI_Comm POOL_WORLD; //groups for different plane waves. In this group, only plane waves are different. K-points and bands are the same. -MPI_Comm KP_WORLD; // groups for differnt k. In this group, only k-points are different. Bands and plane waves are the same. -MPI_Comm BP_WORLD; // groups for differnt bands. In this group, only bands are different. K-points and plane waves are the same. -MPI_Comm INT_BGROUP; // internal comm groups for same bands. In this group, only bands are the same. K-points and plane waves are different. -MPI_Comm GRID_WORLD; // mohan add 2012-01-13 -MPI_Comm DIAG_WORLD; // mohan add 2012-01-13 - -MPICommGroup::MPICommGroup(MPI_Comm parent_comm) - : parent_comm(parent_comm) -{ - MPI_Comm_size(parent_comm, &this->gsize); - MPI_Comm_rank(parent_comm, &this->grank); -} - -MPICommGroup::~MPICommGroup() -{ - if (group_comm != MPI_COMM_NULL) - { - MPI_Comm_free(&group_comm); - } - if (inter_comm != MPI_COMM_NULL) - { - MPI_Comm_free(&inter_comm); - } -} - -void MPICommGroup::divide_group_comm(const int& ngroup, const bool assert_even) -{ - this->ngroups = ngroup; - Parallel_Global::divide_mpi_groups(this->gsize, - ngroup, - this->grank, - this->nprocs_in_group, - this->my_group, - this->rank_in_group, - assert_even); - - MPI_Comm_split(parent_comm, my_group, rank_in_group, &group_comm); - if(this->gsize % ngroup == 0) - { - this->is_even = true; - } - - if (this->is_even) - { - MPI_Comm_split(parent_comm, my_inter, rank_in_inter, &inter_comm); - } -} - -#endif \ No newline at end of file diff --git a/source/module_base/parallel_comm.h b/source/module_base/parallel_comm.h deleted file mode 100644 index 127fcd72ca..0000000000 --- a/source/module_base/parallel_comm.h +++ /dev/null @@ -1,45 +0,0 @@ -#ifndef PARALLEL_COMM_H -#define PARALLEL_COMM_H - -#ifdef __MPI -#include "mpi.h" -extern MPI_Comm POOL_WORLD; -extern MPI_Comm KP_WORLD; // communicator among different pools -extern MPI_Comm INT_BGROUP; -extern MPI_Comm BP_WORLD; -extern MPI_Comm GRID_WORLD; // mohan add 2012-01-13 -extern MPI_Comm DIAG_WORLD; // mohan add 2012-01-13 - - -class MPICommGroup -{ - - public: - - MPICommGroup(MPI_Comm parent_comm); - ~MPICommGroup(); - - void divide_group_comm(const int& ngroup, const bool assert_even = true); - - bool is_even = false; ///< whether the group is even - - MPI_Comm parent_comm = MPI_COMM_NULL; ///< parent communicator - int gsize = 0; ///< size of parent communicator - int grank = 0; ///< rank of parent communicator - - MPI_Comm group_comm = MPI_COMM_NULL; ///< group communicator - int ngroups = 0; ///< number of groups - int nprocs_in_group = 0; ///< number of processes in the group - int my_group = 0; ///< the group index - int rank_in_group = 0; ///< the rank in the group - - MPI_Comm inter_comm = MPI_COMM_NULL; ///< inter communicator - bool has_inter_comm = false; ///< whether has inter communicator - int& nprocs_in_inter = ngroups; ///< number of processes in the inter communicator - int& my_inter = rank_in_group; ///< the rank in the inter communicator - int& rank_in_inter = my_group; ///< the inter group index -}; - -#endif - -#endif // PARALLEL_COMM_H diff --git a/source/module_base/parallel_common.cpp b/source/module_base/parallel_common.cpp deleted file mode 100644 index 6f8ce79fbc..0000000000 --- a/source/module_base/parallel_common.cpp +++ /dev/null @@ -1,81 +0,0 @@ -#include "parallel_common.h" - -#ifdef __MPI -#include -#endif - -#include - -#ifdef __MPI -void Parallel_Common::bcast_string(std::string& object) // Peize Lin fix bug 2019-03-18 -{ - int size = object.size(); - MPI_Bcast(&size, 1, MPI_INT, 0, MPI_COMM_WORLD); - - int my_rank; - MPI_Comm_rank(MPI_COMM_WORLD, &my_rank); - - if (0 != my_rank) - { - object.resize(size); - } - - MPI_Bcast(&object[0], size, MPI_CHAR, 0, MPI_COMM_WORLD); - return; -} - -void Parallel_Common::bcast_string(std::string* object, const int n) // Peize Lin fix bug 2019-03-18 -{ - for (int i = 0; i < n; i++) - bcast_string(object[i]); - return; -} - -void Parallel_Common::bcast_complex_double(std::complex& object) -{ - MPI_Bcast(&object, 1, MPI_DOUBLE_COMPLEX, 0, MPI_COMM_WORLD); -} - -void Parallel_Common::bcast_complex_double(std::complex* object, const int n) -{ - MPI_Bcast(object, n, MPI_DOUBLE_COMPLEX, 0, MPI_COMM_WORLD); -} - -void Parallel_Common::bcast_double(double& object) -{ - MPI_Bcast(&object, 1, MPI_DOUBLE, 0, MPI_COMM_WORLD); -} - -void Parallel_Common::bcast_double(double* object, const int n) -{ - MPI_Bcast(object, n, MPI_DOUBLE, 0, MPI_COMM_WORLD); -} - -void Parallel_Common::bcast_int(int& object) -{ - MPI_Bcast(&object, 1, MPI_INT, 0, MPI_COMM_WORLD); -} - -void Parallel_Common::bcast_int(int* object, const int n) -{ - MPI_Bcast(object, n, MPI_INT, 0, MPI_COMM_WORLD); -} - -void Parallel_Common::bcast_bool(bool& object) -{ - int swap = object; - int my_rank; - MPI_Comm_rank(MPI_COMM_WORLD, &my_rank); - if (my_rank == 0) - swap = object; - MPI_Bcast(&swap, 1, MPI_INT, 0, MPI_COMM_WORLD); - if (my_rank != 0) - object = static_cast(swap); -} - -void Parallel_Common::bcast_char(char* object, const int n) -{ - MPI_Bcast(object, n, MPI_CHAR, 0, MPI_COMM_WORLD); -} - -#endif diff --git a/source/module_base/parallel_common.h b/source/module_base/parallel_common.h deleted file mode 100644 index 26054dbe17..0000000000 --- a/source/module_base/parallel_common.h +++ /dev/null @@ -1,28 +0,0 @@ -#ifndef W_ABACUS_DEVELOP_ABACUS_DEVELOP_SOURCE_MODULE_BASE_PARALLEL_COMMON_H -#define W_ABACUS_DEVELOP_ABACUS_DEVELOP_SOURCE_MODULE_BASE_PARALLEL_COMMON_H - -#ifdef __MPI -#include "mpi.h" -#endif -#include -#include - -namespace Parallel_Common -{ -//(1) bcast array -void bcast_complex_double(std::complex* object, const int n); -void bcast_string(std::string* object, const int n); -void bcast_double(double* object, const int n); -void bcast_int(int* object, const int n); -void bcast_char(char* object, const int n); - -//(2) bcast single -void bcast_complex_double(std::complex& object); -void bcast_string(std::string& object); -void bcast_double(double& object); -void bcast_int(int& object); -void bcast_bool(bool& object); - -} // namespace Parallel_Common - -#endif diff --git a/source/module_base/parallel_device.cpp b/source/module_base/parallel_device.cpp deleted file mode 100644 index 933064e248..0000000000 --- a/source/module_base/parallel_device.cpp +++ /dev/null @@ -1,178 +0,0 @@ -#include "parallel_device.h" -#ifdef __MPI -namespace Parallel_Common -{ -void isend_data(const double* buf, int count, int dest, int tag, MPI_Comm& comm, MPI_Request* request) -{ - MPI_Isend(buf, count, MPI_DOUBLE, dest, tag, comm, request); -} -void isend_data(const std::complex* buf, int count, int dest, int tag, MPI_Comm& comm, MPI_Request* request) -{ - MPI_Isend(buf, count, MPI_DOUBLE_COMPLEX, dest, tag, comm, request); -} -void isend_data(const float* buf, int count, int dest, int tag, MPI_Comm& comm, MPI_Request* request) -{ - MPI_Isend(buf, count, MPI_FLOAT, dest, tag, comm, request); -} -void isend_data(const std::complex* buf, int count, int dest, int tag, MPI_Comm& comm, MPI_Request* request) -{ - MPI_Isend(buf, count, MPI_COMPLEX, dest, tag, comm, request); -} -void send_data(const double* buf, int count, int dest, int tag, MPI_Comm& comm) -{ - MPI_Send(buf, count, MPI_DOUBLE, dest, tag, comm); -} -void send_data(const std::complex* buf, int count, int dest, int tag, MPI_Comm& comm) -{ - MPI_Send(buf, count, MPI_DOUBLE_COMPLEX, dest, tag, comm); -} -void send_data(const float* buf, int count, int dest, int tag, MPI_Comm& comm) -{ - MPI_Send(buf, count, MPI_FLOAT, dest, tag, comm); -} -void send_data(const std::complex* buf, int count, int dest, int tag, MPI_Comm& comm) -{ - MPI_Send(buf, count, MPI_COMPLEX, dest, tag, comm); -} -void recv_data(double* buf, int count, int source, int tag, MPI_Comm& comm, MPI_Status* status) -{ - MPI_Recv(buf, count, MPI_DOUBLE, source, tag, comm, status); -} -void recv_data(std::complex* buf, int count, int source, int tag, MPI_Comm& comm, MPI_Status* status) -{ - MPI_Recv(buf, count, MPI_DOUBLE_COMPLEX, source, tag, comm, status); -} -void recv_data(float* buf, int count, int source, int tag, MPI_Comm& comm, MPI_Status* status) -{ - MPI_Recv(buf, count, MPI_FLOAT, source, tag, comm, status); -} -void recv_data(std::complex* buf, int count, int source, int tag, MPI_Comm& comm, MPI_Status* status) -{ - MPI_Recv(buf, count, MPI_COMPLEX, source, tag, comm, status); -} -void bcast_data(std::complex* object, const int& n, const MPI_Comm& comm) -{ - MPI_Bcast(object, n * 2, MPI_DOUBLE, 0, comm); -} -void bcast_data(std::complex* object, const int& n, const MPI_Comm& comm) -{ - MPI_Bcast(object, n * 2, MPI_FLOAT, 0, comm); -} -void bcast_data(double* object, const int& n, const MPI_Comm& comm) -{ - MPI_Bcast(object, n, MPI_DOUBLE, 0, comm); -} -void bcast_data(float* object, const int& n, const MPI_Comm& comm) -{ - MPI_Bcast(object, n, MPI_FLOAT, 0, comm); -} -void reduce_data(std::complex* object, const int& n, const MPI_Comm& comm) -{ - MPI_Allreduce(MPI_IN_PLACE, object, n * 2, MPI_DOUBLE, MPI_SUM, comm); -} -void reduce_data(std::complex* object, const int& n, const MPI_Comm& comm) -{ - MPI_Allreduce(MPI_IN_PLACE, object, n * 2, MPI_FLOAT, MPI_SUM, comm); -} -void reduce_data(double* object, const int& n, const MPI_Comm& comm) -{ - MPI_Allreduce(MPI_IN_PLACE, object, n, MPI_DOUBLE, MPI_SUM, comm); -} -void reduce_data(float* object, const int& n, const MPI_Comm& comm) -{ - MPI_Allreduce(MPI_IN_PLACE, object, n, MPI_FLOAT, MPI_SUM, comm); -} -void gatherv_data(const double* sendbuf, int sendcount, double* recvbuf, const int* recvcounts, const int* displs, MPI_Comm& comm) -{ - MPI_Allgatherv(sendbuf, sendcount, MPI_DOUBLE, recvbuf, recvcounts, displs, MPI_DOUBLE, comm); -} -void gatherv_data(const std::complex* sendbuf, int sendcount, std::complex* recvbuf, const int* recvcounts, const int* displs, MPI_Comm& comm) -{ - MPI_Allgatherv(sendbuf, sendcount, MPI_DOUBLE_COMPLEX, recvbuf, recvcounts, displs, MPI_DOUBLE_COMPLEX, comm); -} -void gatherv_data(const float* sendbuf, int sendcount, float* recvbuf, const int* recvcounts, const int* displs, MPI_Comm& comm) -{ - MPI_Allgatherv(sendbuf, sendcount, MPI_FLOAT, recvbuf, recvcounts, displs, MPI_FLOAT, comm); -} -void gatherv_data(const std::complex* sendbuf, int sendcount, std::complex* recvbuf, const int* recvcounts, const int* displs, MPI_Comm& comm) -{ - MPI_Allgatherv(sendbuf, sendcount, MPI_COMPLEX, recvbuf, recvcounts, displs, MPI_COMPLEX, comm); -} - -#ifndef __CUDA_MPI -template -struct object_cpu_point -{ - bool alloc = false; - T* get(const T* object, const int& n, T* tmp_space = nullptr) - { - T* object_cpu = nullptr; - alloc = false; - - if (tmp_space == nullptr) - { - base_device::memory::resize_memory_op()(object_cpu, n); - alloc = true; - } - else - { - object_cpu = tmp_space; - } - base_device::memory::synchronize_memory_op()(object_cpu, - object, - n); - - return object_cpu; - } - void sync_h2d(T* object, const T* object_cpu, const int& n) - { - base_device::memory::synchronize_memory_op()(object, - object_cpu, - n); - } - void sync_d2h(T* object_cpu, const T* object, const int& n) - { - base_device::memory::synchronize_memory_op()(object_cpu, - object, - n); - } - void del(T* object_cpu) - { - if (alloc) - { - base_device::memory::delete_memory_op()(object_cpu); - } - } -}; - -template -struct object_cpu_point -{ - bool alloc = false; - T* get(const T* object, const int& n, T* tmp_space = nullptr) - { - return const_cast(object); - } - void sync_h2d(T* object, const T* object_cpu, const int& n) - { - } - void sync_d2h(T* object_cpu, const T* object, const int& n) - { - } - void del(T* object_cpu) - { - } -}; - -template struct object_cpu_point; -template struct object_cpu_point; -template struct object_cpu_point, base_device::DEVICE_CPU>; -template struct object_cpu_point, base_device::DEVICE_GPU>; -template struct object_cpu_point; -template struct object_cpu_point; -template struct object_cpu_point, base_device::DEVICE_CPU>; -template struct object_cpu_point, base_device::DEVICE_GPU>; -#endif - -} // namespace Parallel_Common -#endif \ No newline at end of file diff --git a/source/module_base/parallel_device.h b/source/module_base/parallel_device.h deleted file mode 100644 index 3ecc2f6aae..0000000000 --- a/source/module_base/parallel_device.h +++ /dev/null @@ -1,180 +0,0 @@ -#ifndef __PARALLEL_DEVICE_H__ -#define __PARALLEL_DEVICE_H__ -#ifdef __MPI -#include "mpi.h" -#include "module_base/module_device/device.h" -#include "module_base/module_device/memory_op.h" -#include -namespace Parallel_Common -{ -void isend_data(const double* buf, int count, int dest, int tag, MPI_Comm& comm, MPI_Request* request); -void isend_data(const std::complex* buf, int count, int dest, int tag, MPI_Comm& comm, MPI_Request* request); -void isend_data(const float* buf, int count, int dest, int tag, MPI_Comm& comm, MPI_Request* request); -void isend_data(const std::complex* buf, int count, int dest, int tag, MPI_Comm& comm, MPI_Request* request); -void send_data(const double* buf, int count, int dest, int tag, MPI_Comm& comm); -void send_data(const std::complex* buf, int count, int dest, int tag, MPI_Comm& comm); -void send_data(const float* buf, int count, int dest, int tag, MPI_Comm& comm); -void send_data(const std::complex* buf, int count, int dest, int tag, MPI_Comm& comm); -void recv_data(double* buf, int count, int source, int tag, MPI_Comm& comm, MPI_Status* status); -void recv_data(std::complex* buf, int count, int source, int tag, MPI_Comm& comm, MPI_Status* status); -void recv_data(float* buf, int count, int source, int tag, MPI_Comm& comm, MPI_Status* status); -void recv_data(std::complex* buf, int count, int source, int tag, MPI_Comm& comm, MPI_Status* status); -void bcast_data(std::complex* object, const int& n, const MPI_Comm& comm); -void bcast_data(std::complex* object, const int& n, const MPI_Comm& comm); -void bcast_data(double* object, const int& n, const MPI_Comm& comm); -void bcast_data(float* object, const int& n, const MPI_Comm& comm); -void reduce_data(std::complex* object, const int& n, const MPI_Comm& comm); -void reduce_data(std::complex* object, const int& n, const MPI_Comm& comm); -void reduce_data(double* object, const int& n, const MPI_Comm& comm); -void reduce_data(float* object, const int& n, const MPI_Comm& comm); -void gatherv_data(const double* sendbuf, int sendcount, double* recvbuf, const int* recvcounts, const int* displs, MPI_Comm& comm); -void gatherv_data(const std::complex* sendbuf, int sendcount, std::complex* recvbuf, const int* recvcounts, const int* displs, MPI_Comm& comm); -void gatherv_data(const float* sendbuf, int sendcount, float* recvbuf, const int* recvcounts, const int* displs, MPI_Comm& comm); -void gatherv_data(const std::complex* sendbuf, int sendcount, std::complex* recvbuf, const int* recvcounts, const int* displs, MPI_Comm& comm); - -#ifndef __CUDA_MPI -template -struct object_cpu_point -{ - bool alloc = false; - T* get(const T* object, const int& n, T* tmp_space = nullptr); - void del(T* object); - void sync_d2h(T* object_cpu, const T* object, const int& n); - void sync_h2d(T* object, const T* object_cpu, const int& n); -}; -#endif - -/** - * @brief send data in Device - * - */ -template -void send_dev(const T* object, int count, int dest, int tag, MPI_Comm& comm, T* tmp_space = nullptr) -{ -#ifdef __CUDA_MPI - send_data(object, count, dest, tag, comm); -#else - object_cpu_point o; - T* object_cpu = o.get(object, count, tmp_space); - o.sync_d2h(object_cpu, object, count); - send_data(object_cpu, count, dest, tag, comm); - o.del(object_cpu); -#endif - return; -} - -/** - * @brief isend data in Device - * @note before the date in send_space is recieved, it should not be modified - * - */ -template -void isend_dev(const T* object, int count, int dest, int tag, MPI_Comm& comm, MPI_Request* request, T* send_space) -{ -#ifdef __CUDA_MPI - isend_data(object, count, dest, tag, comm, request); -#else - object_cpu_point o; - T* object_cpu = o.get(object, count, send_space); - o.sync_d2h(object_cpu, object, count); - isend_data(object_cpu, count, dest, tag, comm, request); - o.del(object_cpu); -#endif - return; -} - -/** - * @brief recv data in Device - * - */ -template -void recv_dev(T* object, int count, int source, int tag, MPI_Comm& comm, MPI_Status* status, T* tmp_space = nullptr) -{ -#ifdef __CUDA_MPI - recv_data(object, count, source, tag, comm, status); -#else - object_cpu_point o; - T* object_cpu = o.get(object, count, tmp_space); - recv_data(object_cpu, count, source, tag, comm, status); - o.sync_h2d(object, object_cpu, count); - o.del(object_cpu); -#endif - return; -} - -/** - * @brief bcast data in Device - * - * @tparam T: float, double, std::complex, std::complex - * @tparam Device - * @param ctx Device ctx - * @param object complex arrays in Device - * @param n the size of complex arrays - * @param comm MPI_Comm - * @param tmp_space tmp space in CPU - */ -template -void bcast_dev(T* object, const int& n, const MPI_Comm& comm, T* tmp_space = nullptr) -{ -#ifdef __CUDA_MPI - bcast_data(object, n, comm); -#else - object_cpu_point o; - T* object_cpu = o.get(object, n, tmp_space); - o.sync_d2h(object_cpu, object, n); - bcast_data(object_cpu, n, comm); - o.sync_h2d(object, object_cpu, n); - o.del(object_cpu); -#endif - return; -} - -template -void reduce_dev(T* object, const int& n, const MPI_Comm& comm, T* tmp_space = nullptr) -{ -#ifdef __CUDA_MPI - reduce_data(object, n, comm); -#else - object_cpu_point o; - T* object_cpu = o.get(object, n, tmp_space); - o.sync_d2h(object_cpu, object, n); - reduce_data(object_cpu, n, comm); - o.sync_h2d(object, object_cpu, n); - o.del(object_cpu); -#endif - return; -} - -template -void gatherv_dev(const T* sendbuf, - int sendcount, - T* recvbuf, - const int* recvcounts, - const int* displs, - MPI_Comm& comm, - T* tmp_sspace = nullptr, - T* tmp_rspace = nullptr) -{ -#ifdef __CUDA_MPI - gatherv_data(sendbuf, sendcount, recvbuf, recvcounts, displs, comm); -#else - object_cpu_point o1, o2; - int size = 0; - MPI_Comm_size(comm, &size); - int gather_space = displs[size - 1] + recvcounts[size - 1]; - T* sendbuf_cpu = o1.get(sendbuf, sendcount, tmp_sspace); - T* recvbuf_cpu = o2.get(recvbuf, gather_space, tmp_rspace); - o1.sync_d2h(sendbuf_cpu, sendbuf, sendcount); - gatherv_data(sendbuf_cpu, sendcount, recvbuf_cpu, recvcounts, displs, comm); - o2.sync_h2d(recvbuf, recvbuf_cpu, gather_space); - o1.del(sendbuf_cpu); - o2.del(recvbuf_cpu); -#endif - return; -} - -} - - -#endif -#endif \ No newline at end of file diff --git a/source/module_base/parallel_global.cpp b/source/module_base/parallel_global.cpp deleted file mode 100644 index ab76b0c872..0000000000 --- a/source/module_base/parallel_global.cpp +++ /dev/null @@ -1,423 +0,0 @@ -//========================================================== -// AUTHOR : fangwei, mohan -// DATE : 2009-11-08 -//========================================================== -#include "parallel_global.h" - -#ifdef __MPI -#include -#endif -#ifdef _OPENMP -#include -#endif - -#include "module_base/global_function.h" -#include "module_base/parallel_common.h" -#include "module_base/parallel_reduce.h" -#include "module_parameter/parameter.h" -// #include "module_base/tool_quit.h" -#include "source_main/version.h" - -#include -#include -#if defined __MPI -namespace Parallel_Global -{ -int mpi_number = 0; -int omp_number = 0; -} // namespace Parallel_Global - -void Parallel_Global::myProd(std::complex* in, std::complex* inout, int* len, MPI_Datatype* dptr) -{ - for (int i = 0; i < *len; i++) - { - // (*inout).real()=(*inout).real()+(*in).real(); - // (*inout).imag()=(*inout).imag()+(*in).imag(); - - // mohan updat 2011-09-21 - (*inout) = std::complex((*inout).real() + (*in).real(), (*inout).imag() + (*in).imag()); - - in++; - inout++; - } - return; -} -#endif - -void Parallel_Global::split_diag_world(const int& diag_np, - const int& nproc, - const int& my_rank, - int& drank, - int& dsize, - int& dcolor) -{ -#ifdef __MPI - assert(diag_np > 0); - int group_grid_np = -1; - int color = -1; - int key = -1; - divide_mpi_groups(nproc, diag_np, my_rank, group_grid_np, key, color); - MPI_Comm_split(MPI_COMM_WORLD, color, key, &DIAG_WORLD); - MPI_Comm_rank(DIAG_WORLD, &drank); - MPI_Comm_size(DIAG_WORLD, &dsize); - dcolor = color; -#else - dcolor = 0; // mohan fix bug 2012-02-04 - drank = 0; - dsize = 1; -#endif - return; -} - -void Parallel_Global::split_grid_world(const int diag_np, const int& nproc, const int& my_rank, int& grank, int& gsize) -{ -#ifdef __MPI - assert(diag_np > 0); - int group_grid_np = -1; - int color = -1; - int key = -1; - divide_mpi_groups(nproc, diag_np, my_rank, group_grid_np, color, key); - MPI_Comm_split(MPI_COMM_WORLD, color, key, &GRID_WORLD); - MPI_Comm_rank(GRID_WORLD, &grank); - MPI_Comm_size(GRID_WORLD, &gsize); -#else - grank = 0; // mohan fix bug 2012-02-04 - gsize = 1; -#endif - return; -} - -// changed from read_mpi_parameters in 2024-1018 -void Parallel_Global::read_pal_param(int argc, - char** argv, - int& NPROC, - int& NTHREAD_PER_PROC, - int& MY_RANK) -{ -#ifdef __MPI -#ifdef _OPENMP - int provided = 0; - MPI_Init_thread(&argc, &argv, MPI_THREAD_MULTIPLE, &provided); - if (provided != MPI_THREAD_MULTIPLE) - { - std::cerr << "MPI_Init_thread request " << MPI_THREAD_MULTIPLE << " but provide " << provided << std::endl; - } - // Peize Lin change 2022.08.08 - // MPI_THREAD_FUNNELED is enough for ABACUS. Using MPI_THREAD_SERIALIZED for elpa, using MPI_THREAD_MULTIPLE for - // libRI. -#else - MPI_Init(&argc, &argv); // Peize Lin change 2018-07-12 -#endif //_OPENMP - - // KPAR = atoi(argv[1]); // mohan abandon 2010-06-09 - - // get world size --> NPROC - // get global rank --> MY_RANK - MPI_Comm_size(MPI_COMM_WORLD, &NPROC); - MPI_Comm_rank(MPI_COMM_WORLD, &MY_RANK); - int process_num = 0; // number of processes in the current node - int local_rank = 0; // rank of the process in the current node - MPI_Comm shmcomm; - MPI_Comm_split_type(MPI_COMM_WORLD, MPI_COMM_TYPE_SHARED, 0, MPI_INFO_NULL, &shmcomm); - MPI_Comm_size(shmcomm, &process_num); - MPI_Comm_rank(shmcomm, &local_rank); - MPI_Comm_free(&shmcomm); - - // Determining appropriate thread number for OpenMP: - // 1. If the number of threads is set by the user by `OMP_NUM_THREADS`, use it. - // 2. Otherwise, set to number of CPU cores / number of processes. - // 3. If the number of threads is larger than the hardware availability (should only happens if route 1 taken), - // output a warning message. - // 4. If the number of threads is smaller than the hardware availability, output an info message. - // CAVEAT: The user should set the number of threads properly to avoid oversubscribing. - // This mechanism only handles the worst case for the default setting (not setting number of threads at all, causing - // oversubscribing and extremely slow performance), not guaranteed to be optimal. - const int max_thread_num = std::thread::hardware_concurrency(); // Consider Hyperthreading disabled. -#ifdef _OPENMP - int current_thread_num = omp_get_max_threads(); // Get the number of threads set by the user. - if (current_thread_num == max_thread_num - && process_num >= 1) // Avoid oversubscribing on the number of threads not set. - { - current_thread_num = max_thread_num / process_num; - omp_set_num_threads(current_thread_num); - } -#else - int current_thread_num = 1; -#endif - mpi_number = process_num; - omp_number = current_thread_num; - if (current_thread_num * process_num > max_thread_num && local_rank == 0) - { - std::stringstream mess; - mess << "WARNING: Total thread number(" << current_thread_num * process_num << ") " - << "is larger than hardware availability(" << max_thread_num << ")." << std::endl - << "The results may be INCORRECT. Please set the environment variable OMP_NUM_THREADS to a proper value." - << std::endl; - std::cerr << mess.str() << std::endl; - // the user may take their own risk by set the OMP_NUM_THREADS env var. - if (std::getenv("OMP_NUM_THREADS") == nullptr) - { - // usage of WARNING_QUIT need module_base/tool_quit.cpp - // lead to undefined error in unit_test building - // ModuleBase::WARNING_QUIT( "Parallel_Global::read_pal_param","OMP_NUM_THREADS setting is invalid. Please set it to a proper value."); - std::cerr << "ERROR: OMP_NUM_THREADS setting is invalid. Please set it to a proper value." << std::endl; - exit(1); - } - } - else if (current_thread_num * process_num < max_thread_num && local_rank == 0) - { - // only output info in local rank 0 - std::cerr << "Info: Local MPI proc number: " << process_num << "," - << "OpenMP thread number: " << current_thread_num << "," - << "Total thread number: " << current_thread_num * process_num << "," - << "Local thread limit: " << max_thread_num << std::endl; - } - - NTHREAD_PER_PROC = current_thread_num; - - if (MY_RANK == 0) - { -#ifdef VERSION - const char* version = VERSION; -#else - const char* version = "unknown"; -#endif -#ifdef COMMIT_INFO -#include "commit.h" - const char* commit = COMMIT; -#else - const char* commit = "unknown"; -#endif - std::cout << " " - << std::endl - << " ABACUS " << version << std::endl - << std::endl - << " Atomic-orbital Based Ab-initio Computation at UStc " - << std::endl - << std::endl - << " Website: http://abacus.ustc.edu.cn/ " - << std::endl - << " Documentation: https://abacus.deepmodeling.com/ " - << std::endl - << " Repository: https://github.com/abacusmodeling/abacus-develop " - << std::endl - << " https://github.com/deepmodeling/abacus-develop " - << std::endl - << " Commit: " << commit << std::endl - << std::endl; - time_t time_now = time(nullptr); - std::cout << " " << ctime(&time_now); - } - - // for test - /* - for (int i=0; i 1 && NPROC %(BNDPAR * KPAR) != 0) - { - std::cout << "Error: When BNDPAR = " << BNDPAR << " > 1, number of processes (" << NPROC << ") must be divisible by the number of groups (" - << BNDPAR * KPAR << ")." << std::endl; - exit(1); - } - // k-point parallelization - MPICommGroup kpar_group(MPI_COMM_WORLD); - kpar_group.divide_group_comm(KPAR, false); - - // band parallelization - MPICommGroup bndpar_group(kpar_group.group_comm); - bndpar_group.divide_group_comm(BNDPAR, true); - - // Set parallel index. - // In previous versions, the order of k-point parallelization and band parallelization is reversed. - // So we need to keep some variables for compatibility. - NPROC_IN_POOL = bndpar_group.nprocs_in_group; - RANK_IN_POOL = bndpar_group.rank_in_group; - MY_POOL = kpar_group.my_group; - MPI_Comm_dup(bndpar_group.group_comm, &POOL_WORLD); - if(kpar_group.inter_comm != MPI_COMM_NULL) - { - MPI_Comm_dup(kpar_group.inter_comm, &KP_WORLD); - } - else - { - KP_WORLD = MPI_COMM_NULL; - } - - if(BNDPAR > 1) - { - NPROC_IN_BNDGROUP = kpar_group.ngroups * bndpar_group.nprocs_in_group; - RANK_IN_BPGROUP = kpar_group.my_group * bndpar_group.nprocs_in_group + bndpar_group.rank_in_group; - MY_BNDGROUP = bndpar_group.my_group; - MPI_Comm_split(MPI_COMM_WORLD, MY_BNDGROUP, RANK_IN_BPGROUP, &INT_BGROUP); - MPI_Comm_dup(bndpar_group.inter_comm, &BP_WORLD); - } - else - { - NPROC_IN_BNDGROUP = NPROC; - RANK_IN_BPGROUP = MY_RANK; - MY_BNDGROUP = 0; - MPI_Comm_dup(MPI_COMM_WORLD, &INT_BGROUP); - MPI_Comm_split(MPI_COMM_WORLD, MY_RANK, 0, &BP_WORLD); - } - return; -} - -void Parallel_Global::divide_mpi_groups(const int& procs, - const int& num_groups, - const int& rank, - int& procs_in_group, - int& my_group, - int& rank_in_group, - const bool even) -{ - if (num_groups == 0) - { - std::cout << "Error: Number of groups must be greater than 0." << std::endl; - exit(1); - } - if (procs < num_groups) - { - std::cout << "Error: Number of processes (" << procs << ") must be greater than the number of groups (" - << num_groups << ")." << std::endl; - exit(1); - } - // Calculate the distribution of processes among pools. - procs_in_group = procs / num_groups; - int extra_procs = procs % num_groups; - - if (even && extra_procs != 0) - { - std::cout << "Error: Number of processes (" << procs << ") must be evenly divisible by the number of groups (" - << num_groups << " in the even partition case)." << std::endl; - exit(1); - } - - if(rank < extra_procs * (procs_in_group + 1)) - { - // The first extra_procs groups have procs_in_group + 1 processes. - procs_in_group++; - my_group = rank / procs_in_group; - rank_in_group = rank % procs_in_group; - } - else - { - // The remaining groups have procs_in_group processes. - my_group = (rank - extra_procs) / procs_in_group; - rank_in_group = (rank - extra_procs) % procs_in_group; - } -} - -#endif diff --git a/source/module_base/parallel_global.h b/source/module_base/parallel_global.h deleted file mode 100644 index 71e933a33e..0000000000 --- a/source/module_base/parallel_global.h +++ /dev/null @@ -1,97 +0,0 @@ -//========================================================== -// AUTHOR : Fang Wei, Mohan Chen -// DATE : 2008 -// LAST UPDATE : 2009-3-23 mohan add GATHER_MINIMUM_DOUBLE -//========================================================== -#ifndef PARALLEL_GLOBAL_H -#define PARALLEL_GLOBAL_H - -#include -#include "parallel_comm.h" - -// void myProd(std::complex *in,std::complex *inout,int *len,MPI_Datatype *dptr); - -namespace Parallel_Global -{ -extern int mpi_number; -extern int omp_number; -//--------------------------- -// call at the very first. -//--------------------------- - -// changed from read_mpi_parameters in 2024-1018 -void read_pal_param(int argc, char** argv, int& NPROC, int& NTHREAD_PER_PROC, int& MY_RANK); -#ifdef __MPI -void myProd(std::complex* in, std::complex* inout, int* len, MPI_Datatype* dptr); -#endif - -/**------------------------------------------- - * call to split the "diago world" - * the unit of first proc of each grid group - * us the diag world. - * for example, if we have 64 processors, - * and diago_proc = 4, - * then we have 4 'grid world', which - * have 16, 16, 16, 16 processors each, - * and the head of each 'grid world' - * leads to the 'diag world', diag - * is only carried out using those 4 proc. - */ -void split_diag_world(const int& diag_np, const int& nproc, const int& my_rank, int& drank, int& dsize, int& dcolor); -void split_grid_world(const int diag_np, const int& nproc, const int& my_rank, int& grank, int& gsize); - -/** - * @brief An interface function to call "Parallel_Global::divide_pools()" - * - */ -void init_pools(const int& NPROC, - const int& MY_RANK, - const int& BNDPAR, - const int& KPAR, - int& NPROC_IN_BNDGROUP, - int& RANK_IN_BPGROUP, - int& MY_BNDGROUP, - int& NPROC_IN_POOL, - int& RANK_IN_POOL, - int& MY_POOL); - -void divide_pools(const int& NPROC, - const int& MY_RANK, - const int& BNDPAR, - const int& KPAR, - int& NPROC_IN_BNDGROUP, - int& RANK_IN_BPGROUP, - int& MY_BNDGROUP, - int& NPROC_IN_POOL, - int& RANK_IN_POOL, - int& MY_POOL); - -/** - * @brief Divide MPI processes into groups - * @param[in] procs Number of MPI processes - * @param[in] num_groups Number of groups - * @param[in] rank Rank of the process - * @param[out] procs_in_group Number of processes in each group - * @param[out] my_group Group number of the process - * @param[out] rank_in_group Rank of the process in the group - * @param[in] even If true, require the number of processes in each group is the same - */ -void divide_mpi_groups(const int& procs, - const int& num_groups, - const int& rank, - int& procs_in_group, - int& my_group, - int& rank_in_group, - const bool even = false); - -/** - * @brief Release MPI communicator and resources - * - */ -#ifdef __MPI -void finalize_mpi(); -#endif - -} // namespace Parallel_Global - -#endif // PARALLEL_GLOBAL_H diff --git a/source/module_base/parallel_reduce.cpp b/source/module_base/parallel_reduce.cpp deleted file mode 100644 index c44bd8fb66..0000000000 --- a/source/module_base/parallel_reduce.cpp +++ /dev/null @@ -1,299 +0,0 @@ -#include "parallel_reduce.h" - -#include "parallel_comm.h" - -#include - -template <> -void Parallel_Reduce::reduce_all(int& object) -{ -#ifdef __MPI - MPI_Allreduce(MPI_IN_PLACE, &object, 1, MPI_INT, MPI_SUM, MPI_COMM_WORLD); -#endif - return; -} - -void Parallel_Reduce::reduce_int_diag(int& object) -{ -#ifdef __MPI - MPI_Allreduce(MPI_IN_PLACE, &object, 1, MPI_INT, MPI_SUM, DIAG_WORLD); -#endif - return; -} - -template <> -void Parallel_Reduce::reduce_all(double& object) -{ -#ifdef __MPI - MPI_Allreduce(MPI_IN_PLACE, &object, 1, MPI_DOUBLE, MPI_SUM, MPI_COMM_WORLD); -#endif - return; -} - -template <> -void Parallel_Reduce::reduce_all(float& object) -{ -#ifdef __MPI - MPI_Allreduce(MPI_IN_PLACE, &object, 1, MPI_FLOAT, MPI_SUM, MPI_COMM_WORLD); -#endif - return; -} - -template <> -void Parallel_Reduce::reduce_all(int* object, const int n) -{ -#ifdef __MPI - MPI_Allreduce(MPI_IN_PLACE, object, n, MPI_INT, MPI_SUM, MPI_COMM_WORLD); -#endif - return; -} - -void Parallel_Reduce::reduce_int_grid(int* object, const int n) -{ -#ifdef __MPI - MPI_Allreduce(MPI_IN_PLACE, object, n, MPI_INT, MPI_SUM, GRID_WORLD); -#endif - return; -} - -template <> -void Parallel_Reduce::reduce_all(double* object, const int n) -{ -#ifdef __MPI - MPI_Allreduce(MPI_IN_PLACE, object, n, MPI_DOUBLE, MPI_SUM, MPI_COMM_WORLD); -#endif - return; -} - -void Parallel_Reduce::reduce_double_grid(double* object, const int n) -{ -#ifdef __MPI - MPI_Allreduce(MPI_IN_PLACE, object, n, MPI_DOUBLE, MPI_SUM, GRID_WORLD); -#endif - return; -} - -void Parallel_Reduce::reduce_double_diag(double* object, const int n) -{ -#ifdef __MPI - MPI_Allreduce(MPI_IN_PLACE, object, n, MPI_DOUBLE, MPI_SUM, DIAG_WORLD); -#endif - return; -} - -template <> -void Parallel_Reduce::reduce_pool(float& object) -{ -#ifdef __MPI - MPI_Allreduce(MPI_IN_PLACE, &object, 1, MPI_FLOAT, MPI_SUM, POOL_WORLD); -#endif - return; -} - -template <> -void Parallel_Reduce::reduce_pool(double& object) -{ -#ifdef __MPI - MPI_Allreduce(MPI_IN_PLACE, &object, 1, MPI_DOUBLE, MPI_SUM, POOL_WORLD); -#endif - return; -} - -template <> -void Parallel_Reduce::reduce_pool(double* object, const int n) -{ -#ifdef __MPI - MPI_Allreduce(MPI_IN_PLACE, object, n, MPI_DOUBLE, MPI_SUM, POOL_WORLD); -#endif - return; -} - -// (1) the value is same in each pool. -// (2) we need to reduce the value from different pool. -void Parallel_Reduce::reduce_double_allpool(const int& npool, const int& nproc_in_pool, double& object) -{ - if (npool == 1) - { - return; - } -#ifdef __MPI - double swap = object / nproc_in_pool; - MPI_Allreduce(&swap, &object, 1, MPI_DOUBLE, MPI_SUM, MPI_COMM_WORLD); -#endif -} - -// (1) the value is same in each pool. -// (2) we need to reduce the value from different pool. -void Parallel_Reduce::reduce_double_allpool(const int& npool, const int& nproc_in_pool, double* object, const int n) -{ - if (npool == 1) - { - return; - } -#ifdef __MPI - std::vector swap(n, 0.0); - for (int i = 0; i < n; i++) - { - swap[i] = object[i] / nproc_in_pool; - } - MPI_Allreduce(swap.data(), object, n, MPI_DOUBLE, MPI_SUM, MPI_COMM_WORLD); -#endif -} - -template <> -void Parallel_Reduce::reduce_all>(std::complex& object) -{ -#ifdef __MPI - MPI_Allreduce(MPI_IN_PLACE, &object, 1, MPI_DOUBLE_COMPLEX, MPI_SUM, MPI_COMM_WORLD); -#endif - return; -} - -// LiuXh add 2019-07-16 -template <> -void Parallel_Reduce::reduce_all>(std::complex* object, const int n) -{ -#ifdef __MPI - MPI_Allreduce(MPI_IN_PLACE, object, n, MPI_DOUBLE_COMPLEX, MPI_SUM, MPI_COMM_WORLD); -#endif - return; -} - - -template <> -void Parallel_Reduce::reduce_all>(std::complex& object) -{ -#ifdef __MPI - MPI_Allreduce(MPI_IN_PLACE, &object, 1, MPI_C_FLOAT_COMPLEX, MPI_SUM, MPI_COMM_WORLD); -#endif - return; -} - -// LiuXh add 2019-07-16 -template <> -void Parallel_Reduce::reduce_all>(std::complex* object, const int n) -{ -#ifdef __MPI - MPI_Allreduce(MPI_IN_PLACE, object, n, MPI_C_FLOAT_COMPLEX, MPI_SUM, MPI_COMM_WORLD); -#endif - return; -} - -template <> -void Parallel_Reduce::reduce_pool>(std::complex& object) -{ -#ifdef __MPI - MPI_Allreduce(MPI_IN_PLACE, &object, 1, MPI_DOUBLE_COMPLEX, MPI_SUM, POOL_WORLD); -#endif - return; -} - -template <> -void Parallel_Reduce::reduce_pool>(std::complex* object, const int n) -{ -#ifdef __MPI - MPI_Allreduce(MPI_IN_PLACE, object, n, MPI_C_FLOAT_COMPLEX, MPI_SUM, POOL_WORLD); -#endif - return; -} - -template <> -void Parallel_Reduce::reduce_pool>(std::complex* object, const int n) -{ -#ifdef __MPI - MPI_Allreduce(MPI_IN_PLACE, object, n, MPI_DOUBLE_COMPLEX, MPI_SUM, POOL_WORLD); -#endif - return; -} - -void Parallel_Reduce::gather_int_all(int& v, int* all) -{ -#ifdef __MPI - assert(all != nullptr); - MPI_Allgather(&v, 1, MPI_INT, all, 1, MPI_INT, MPI_COMM_WORLD); -#endif - return; -} - -void Parallel_Reduce::gather_min_int_all(const int& nproc, int& v) -{ -#ifdef __MPI - std::vector all(nproc, 0); - MPI_Allgather(&v, 1, MPI_INT, all.data(), 1, MPI_INT, MPI_COMM_WORLD); - for (int i = 0; i < nproc; i++) - { - if (v > all[i]) - { - v = all[i]; - } - } -#endif -} - -void Parallel_Reduce::gather_max_double_all(const int& nproc, double& v) -{ -#ifdef __MPI - std::vector value(nproc, 0.0); - MPI_Allgather(&v, 1, MPI_DOUBLE, value.data(), 1, MPI_DOUBLE, MPI_COMM_WORLD); - for (int i = 0; i < nproc; i++) - { - if (v < value[i]) - { - v = value[i]; - } - } -#endif -} - -void Parallel_Reduce::gather_max_double_pool(const int& nproc_in_pool, double& v) -{ -#ifdef __MPI - if (nproc_in_pool == 1) - { - return; - } - std::vector value(nproc_in_pool, 0.0); - MPI_Allgather(&v, 1, MPI_DOUBLE, value.data(), 1, MPI_DOUBLE, POOL_WORLD); - for (int i = 0; i < nproc_in_pool; i++) - { - if (v < value[i]) - { - v = value[i]; - } - } -#endif -} - -void Parallel_Reduce::gather_min_double_pool(const int& nproc_in_pool, double& v) -{ -#ifdef __MPI - if (nproc_in_pool == 1) - { - return; - } - std::vector value(nproc_in_pool, 0.0); - MPI_Allgather(&v, 1, MPI_DOUBLE, value.data(), 1, MPI_DOUBLE, POOL_WORLD); - for (int i = 0; i < nproc_in_pool; i++) - { - if (v > value[i]) - { - v = value[i]; - } - } -#endif -} - -void Parallel_Reduce::gather_min_double_all(const int& nproc, double& v) -{ -#ifdef __MPI - std::vector value(nproc, 0.0); - MPI_Allgather(&v, 1, MPI_DOUBLE, value.data(), 1, MPI_DOUBLE, MPI_COMM_WORLD); - for (int i = 0; i < nproc; i++) - { - if (v > value[i]) - { - v = value[i]; - } - } -#endif -} \ No newline at end of file diff --git a/source/module_base/parallel_reduce.h b/source/module_base/parallel_reduce.h deleted file mode 100644 index 2d612efc86..0000000000 --- a/source/module_base/parallel_reduce.h +++ /dev/null @@ -1,70 +0,0 @@ -#ifndef PARALLEL_REDUCE_H -#define PARALLEL_REDUCE_H - -#ifdef __MPI -#include -#endif - -#include -#include - -using std::complex; - -namespace Parallel_Reduce -{ -/// reduce in all process -template -void reduce_all(T& object); -template -void reduce_all(T* object, const int n); -template -void reduce_pool(T& object); -template -void reduce_pool(T* object, const int n); - -void reduce_int_diag(int& object); // mohan add 2012-01-12 - -void reduce_int_grid(int* object, const int n); // mohan add 2012-01-12 - -// reduce double only in this pool -// (each pool contain different k points) -void reduce_double_grid(double* object, const int n); -void reduce_double_diag(double* object, const int n); - -void reduce_double_allpool(const int& npool, const int& nproc_in_pool, double& object); -void reduce_double_allpool(const int& npool, const int& nproc_in_pool, double* object, const int n); - -void gather_min_int_all(const int& nproc, int& v); -void gather_max_double_all(const int& nproc, double& v); -void gather_min_double_all(const int& nproc, double& v); -void gather_max_double_pool(const int& nproc_in_pool, double& v); -void gather_min_double_pool(const int& nproc_in_pool, double& v); - -// mohan add 2011-04-21 -void gather_int_all(int& v, int* all); - -bool check_if_equal(double& v); // mohan add 2009-11-11 - -template -inline void ZEROS(std::complex* u, const TI n) -{ - assert(n >= 0); - for (TI i = 0; i < n; i++) - { - u[i] = std::complex(0.0, 0.0); - } - return; -} - -template -inline void ZEROS(T* u, const TI n) -{ - assert(n >= 0); - for (TI i = 0; i < n; i++) - { - u[i] = 0; - } -} -} // namespace Parallel_Reduce - -#endif diff --git a/source/module_base/projgen.cpp b/source/module_base/projgen.cpp deleted file mode 100644 index dc8d880019..0000000000 --- a/source/module_base/projgen.cpp +++ /dev/null @@ -1,195 +0,0 @@ -#include "projgen.h" - -#include -#include -#include -#include -#include - -#include "module_base/cubic_spline.h" -#include "module_base/math_integral.h" -#include "module_base/math_sphbes.h" - -using namespace ModuleBase; - -void projgen(const int l, - const int nr, - const double* r, - const double* chi, - const double rcut, - const int nbes, - std::vector& alpha) -{ - assert(rcut < r[nr - 1]); - assert(std::is_sorted(r, r + nr)); - - std::vector dr(nr); - std::adjacent_difference(r, r + nr, dr.begin()); - - // lower_bound returns the first element that is equal or larger than rcut - int nr_proj = std::distance(r, std::lower_bound(r, r + nr, rcut)) + 1; - - // zeros of spherical Bessel function - std::vector theta(nbes); - Sphbes::sphbes_zeros(l, nbes, theta.data()); - - // z & w vectors (see notes) - std::vector z(nbes); - std::vector w(nbes); - - std::transform(theta.begin(), theta.end(), z.begin(), [rcut, l](double theta_p) { - return 0.5 * std::pow(rcut, 3) * std::pow(Sphbes::sphbesj(l + 1, theta_p), 2); - }); - - // r^2 * chi (independent from p) - std::vector tmp(nr_proj); - std::transform(r, r + nr_proj, chi, tmp.begin(), [](double r_i, double chi_i) { return r_i * r_i * chi_i; }); - - // r^2 * chi * j_l(theta[p] * r / rcut) (dependent on p) - std::vector integrand(nr_proj); - - for (int p = 0; p < nbes; ++p) - { - std::transform(r, r + nr_proj, tmp.begin(), integrand.begin(), [theta, p, rcut, l](double r_i, double tmp_i) { - return tmp_i * Sphbes::sphbesj(l, theta[p] * r_i / rcut); - }); - w[p] = Integral::simpson(nr_proj, integrand.data(), &dr[1]); - } - - // optimal coefficients - std::vector c(nbes, 0.0); - std::transform(w.begin(), w.end(), z.begin(), c.begin(), [](double w_p, double z_p) { return w_p * w_p / z_p; }); - double prefac = 1.0 / std::sqrt(std::accumulate(c.begin(), c.end(), 0.0)); - std::transform(w.begin(), w.end(), z.begin(), c.begin(), [prefac](double w_p, double z_p) { - return prefac * w_p / z_p; - }); - - // new radial function - alpha.resize(nr_proj); - std::fill(alpha.begin(), alpha.end(), 0.0); - for (int i = 0; i < nr_proj; ++i) - { - for (int p = 0; p < nbes; ++p) - { - alpha[i] += c[p] * Sphbes::sphbesj(l, theta[p] * r[i] / rcut); - } - } -} - -void smoothgen(const int nr, const double* r, const double* chi, const double rcut, std::vector& alpha) -{ - // lambda function for generate the new radial function - assert(rcut < r[nr - 1]); - assert(std::is_sorted(r, r + nr)); - - std::vector dr(nr); - std::adjacent_difference(r, r + nr, dr.begin()); - - // lower_bound returns the first element that is equal or larger than rcut - int nr_proj = std::distance(r, std::lower_bound(r, r + nr, rcut)) + 1; - alpha.resize(nr_proj); - auto smooth_sigma = [&](double sigma_in) { - for (int i = 0; i < nr_proj; i++) - { - alpha[i] = chi[i] * (1 - std::exp(-std::pow((r[i] - rcut), 2) / 2 / sigma_in / sigma_in)); - } - // r^2 * chi (independent from p) - std::vector tmp(nr_proj); - std::transform(r, r + nr_proj, alpha.data(), tmp.begin(), [](double r_i, double chi_i) { - return r_i * r_i * chi_i; - }); - - // r^2 * chi * chi - std::vector integrand(nr_proj); - - std::transform(alpha.data(), - alpha.data() + nr_proj, - tmp.begin(), - integrand.begin(), - [](double chi_i, double tmp_i) { return tmp_i * chi_i; }); - double overlap = ModuleBase::Integral::simpson(nr_proj, integrand.data(), &dr[1]); - for (int i = 0; i < nr_proj; i++) - { - alpha[i] /= std::sqrt(overlap); - } - return; - }; - - // cubic spline interpolation - ModuleBase::CubicSpline cubspl(nr_proj, r, chi); - std::vector dchi(nr_proj); - cubspl.eval(nr_proj, r, nullptr, dchi.data()); - - // function for calculating the overlap between dalpha and dchi - auto overlap_dalpha_dchi = [&]() { - // calculate dalpha first - ModuleBase::CubicSpline cubspl_alpha(nr_proj, r, alpha.data()); - std::vector dalpha(nr_proj); - cubspl_alpha.eval(nr_proj, r, nullptr, dalpha.data()); - for (int i = 0; i < nr_proj; i++) - dalpha[i] -= dchi[i]; - // r^2 * dchi (independent from p) - std::vector tmp(nr_proj); - std::transform(r, r + nr_proj, dalpha.data(), tmp.begin(), [](double r_i, double dalpha_i) { - return r_i * r_i * dalpha_i; - }); - - // r^2 * dalpha * dchi - std::vector integrand(nr_proj); - - std::transform(dalpha.data(), - dalpha.data() + nr_proj, - tmp.begin(), - integrand.begin(), - [](double dalpha_i, double tmp_i) { return tmp_i * dalpha_i; }); - return ModuleBase::Integral::simpson(nr_proj, integrand.data(), &dr[1]); - }; - - // optimize sigma - double sigma_left = 0.1; - smooth_sigma(sigma_left); - double overlap_alpha_chi_left = overlap_dalpha_dchi(); - double sigma_right = 1.0; - smooth_sigma(sigma_right); - double overlap_alpha_chi_right = overlap_dalpha_dchi(); - double overlap_alpha_chi = 0.0; - double sigma = 0.0; - while (std::abs(overlap_alpha_chi_right - overlap_alpha_chi_left) > 1e-6) - { - sigma = (sigma_left + sigma_right) / 2; - smooth_sigma(sigma); - overlap_alpha_chi = overlap_dalpha_dchi(); - if (overlap_alpha_chi < overlap_alpha_chi_left && overlap_alpha_chi < overlap_alpha_chi_right) - { // the minimum is in the middle - if (overlap_alpha_chi_left > overlap_alpha_chi_right) - { - sigma_left = sigma; - overlap_alpha_chi_left = overlap_alpha_chi; - } - else - { - sigma_right = sigma; - overlap_alpha_chi_right = overlap_alpha_chi; - } - } - else - { // the minimum is on the left or right - if (overlap_alpha_chi_left < overlap_alpha_chi_right) - { - sigma_right = sigma; - overlap_alpha_chi_right = overlap_alpha_chi; - sigma_left = sigma_left - (sigma_right - sigma_left) * 0.5; - smooth_sigma(sigma_left); - overlap_alpha_chi_left = overlap_dalpha_dchi(); - } - else - { - sigma_left = sigma; - overlap_alpha_chi_left = overlap_alpha_chi; - sigma_right = sigma_right + (sigma_right - sigma_left) * 0.5; - smooth_sigma(sigma_right); - overlap_alpha_chi_right = overlap_dalpha_dchi(); - } - } - } -} diff --git a/source/module_base/projgen.h b/source/module_base/projgen.h deleted file mode 100644 index 5d886ec06c..0000000000 --- a/source/module_base/projgen.h +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef MODULE_NAO_PROJGEN_H_ -#define MODULE_NAO_PROJGEN_H_ - -#include - -/** - * @brief Generates a projector's radial function for DFT+U - * - * Starting with a numerical radial function chi on grid r with angular momentum l, - * given a smaller cutoff radius rcut and the number of spherical Bessel components (j_l), - * this function generates a new radial function alpha of the same l on the truncated grid - * which satisfies the following conditions: - * - * * alpha = \sum_p j_l(theta[p]*r/rcut) * c[p] where theta[p] is the p-th zero of j_l; - * * \int_0^rcut alpha(r) r^2 dr = 1 (normalization); - * * \int_0^rcut alpha(r) chi(r) r^2 dr is maximized; - * - * @param[in] l angular momentum - * @param[in] nr number of grid points - * @param[in] r radial grid - * @param[in] chi radial function - * @param[in] rcut cutoff radius of the projector - * @param[in] nbes number of spherical Bessel components - * @param[out] alpha new radial function of the projector - * - */ -void projgen( - const int l, - const int nr, - const double* r, - const double* chi, - const double rcut, - const int nbes, - std::vector& alpha); - -void smoothgen( - const int nr, - const double* r, - const double* chi, - const double rcut, - std::vector& alpha); - -#endif \ No newline at end of file diff --git a/source/module_base/random.h b/source/module_base/random.h deleted file mode 100644 index 42c526866e..0000000000 --- a/source/module_base/random.h +++ /dev/null @@ -1,52 +0,0 @@ -#ifndef RANDOM_H -#define RANDOM_H -#include -#include - -namespace ModuleBase -{ - -class Random -{ - public: - Random(); - ~Random(); - - static void between0and1( double *v, const int &num ) - { - assert( v!= NULL); - assert( num > 1); - for(int i=0; i( std::rand() ) / RAND_MAX; - } - } - - static double betweenMinus2and2(void) - { - return 2.0*betweenMinus1and1(); - } - - static double betweenMinus1and1(void) - { - const int a = std::rand() % 2; - if(a==0) return between0and1(); - else if(a==1) return betweenMinus1and0(); - else throw(std::string(__FILE__)+" line "+std::to_string(__LINE__)); // Peize Lin add to fix warning 2019-05-01 - } - - static double between0and1(void) - { - return static_cast( std::rand() )/RAND_MAX; - } - - static double betweenMinus1and0(void) - { - return -static_cast( std::rand() )/RAND_MAX; - } - -}; - -} - -#endif diff --git a/source/module_base/realarray.cpp b/source/module_base/realarray.cpp deleted file mode 100644 index b9983ed804..0000000000 --- a/source/module_base/realarray.cpp +++ /dev/null @@ -1,194 +0,0 @@ -/******************************************* - * ESCP:Electro-Structure Calculate Package. - ********************************************/ - -#include "realarray.h" - -#include - -namespace ModuleBase -{ - -int realArray::arrayCount = 0; - -void realArrayAlloc() -{ - std::cout << "\n Allocation error for realArray " << std::endl; - exit(0); -} - -realArray::realArray(const int d1,const int d2,const int d3) -{ - dim = 3; - bound1 = (d1 <= 0) ? 1 : d1; - bound2 = (d2 <= 0) ? 1 : d2; - bound3 = (d3 <= 0) ? 1 : d3; - bound4 = 0; - - size = bound1 * bound2 * bound3 ; //* sizeof(float); - - auto handler_old = std::set_new_handler(realArrayAlloc); - ptr = new double[size]; - std::set_new_handler(handler_old); - zero_out(); - assert(ptr != 0); - - ++arrayCount; -} - -realArray::realArray(const int d1,const int d2,const int d3,const int d4) -{ - dim = 4; - bound1 = (d1 <= 0) ? 1 : d1; - bound2 = (d2 <= 0) ? 1 : d2; - bound3 = (d3 <= 0) ? 1 : d3; - bound4 = (d4 <= 0) ? 1 : d4; - - size = bound1 * bound2 * bound3 * bound4 ; //* sizeof(float); - - auto handler_old = std::set_new_handler(realArrayAlloc); - ptr = new double[size]; - std::set_new_handler(handler_old); - zero_out(); - - ++arrayCount; -} - -realArray::realArray(const realArray &cd) -{ - this->size = cd.getSize(); - this->ptr = new double[size]; - for (int i = 0; i < size; i++) - this->ptr[i] = cd.ptr[i]; - this->dim = cd.dim; - this->bound1 = cd.bound1; - this->bound2 = cd.bound2; - this->bound3 = cd.bound3; - this->bound4 = cd.bound4; - - ++arrayCount; -} - - -//******************************** -// -// Destructor for class realArray -// -//******************************** -realArray ::~realArray() -{ - freemem(); -} - -void realArray::freemem() -{ - delete [] ptr; - ptr = NULL; -} - -void realArray::create(const int d1,const int d2,const int d3,const int d4) -{ - size = d1 * d2 * d3 * d4; - assert(size>0); - - dim = 4; - - bound1 = d1; - bound2 = d2; - bound3 = d3; - bound4 = d4; - - delete [] ptr; - ptr = new double[size]; - - zero_out(); // mohan modify 2009-09-17 - - assert(ptr != 0); -} - -void realArray::create(const int d1,const int d2,const int d3) -{ - size = d1 * d2 * d3; - assert(size>0); - - dim = 3; - - bound1 = d1; - bound2 = d2; - bound3 = d3; - bound4 = 1; - - delete [] ptr; - ptr = new double[size]; - zero_out(); - assert(ptr != 0); -} - -const realArray &realArray::operator=(const realArray &right) -{ - for (int i = 0;i < size;i++) ptr[i] = right.ptr[i]; - return *this;// enables x = y = z; -} - -const realArray &realArray::operator=(const double &right) -{ - for (int i = 0;i < size;i++) ptr[i] = right; - return *this;// enables x = y = z; -} - -//******************************************************** -// overloaded subscript operator for const real Array -// const reference return create an cvakue -//******************************************************** -// Peize Lin add assert 2016-08-22 -const double &realArray::operator() -(const int ind1,const int ind2,const int ind3)const -{ - assert(ind1>=0); assert(ind1=0); assert(ind2=0); assert(ind3=0); assert(ind1=0); assert(ind2=0); assert(ind3=0); assert(ind4=0); assert(ind1=0); assert(ind2=0); assert(ind3=0); assert(ind1=0); assert(ind2=0); assert(ind3=0); assert(ind4 -#include -#include -#include - - -namespace ModuleBase -{ -/** - * @brief double float array - * - */ -class realArray -{ - public: - double *ptr; - - realArray(const int d1 = 1, const int d2 = 1, const int d3 = 1); - realArray(const int d1, const int d2, const int d3, const int d4); - ~realArray(); - - /** - * @brief create 3 dimensional real array - * - * @param[in] d1 The first dimension size - * @param[in] d2 The second dimension size - * @param[in] d3 The third dimension size - */ - void create(const int d1, const int d2, const int d3); - void create(const int d1, const int d2, const int d3, const int d4); - - realArray(const realArray &cd); - - /** - * @brief Equal a realArray to another one - * - * @param right - * @return const realArray& - */ - const realArray &operator=(const realArray &right); - /** - * @brief Set all value of an array to a double float number - * - * @param right - * @return const realArray& - */ - const realArray &operator=(const double &right); - - /** - * @brief Access elements by using operator "()" - * - * @param d1 - * @param d2 - * @param d3 - * @return double& - */ - double &operator()(const int d1, const int d2, const int d3); - double &operator()(const int d1, const int d2, const int d3, const int d4); - - /** - * @brief Access elements by using "()" through pointer - * without changing its elements - * - * @param d1 - * @param d2 - * @param d3 - * @return const double& - */ - const double &operator()(const int d1, const int d2, const int d3) const; - const double &operator()(const int d1, const int d2, const int d3, const int d4) const; - - /** - * @brief Set all elements of an IntArray to zero - * - */ - void zero_out(void); - - /** - * @brief Get the Size object - * - * @return int - */ - int getSize() const - { - return size; - } - - /** - * @brief Get the Dim object - * i.e. the dimension of a real array - * - * @return int - */ - int getDim() const - { - return dim; - } - - /** - * @brief Get the Bound1 object - * i.e. the first dimension size - * - * @return int - */ - int getBound1() const - { - return bound1; - } - - int getBound2() const - { - return bound2; - } - - int getBound3() const - { - return bound3; - } - - int getBound4() const - { - return bound4; - } - - /** - * @brief Get the Array Count object - * - * @return int - */ - static int getArrayCount(void) - { - return arrayCount; - } - - private: - int size; - int dim; - int bound1, bound2, bound3, bound4; - static int arrayCount; - - void freemem(); -}; - -//************************************************** -// set elements of a as zeros which a is 1_d array. -//************************************************** -template void zeros(T *u, const int n) -{ - assert(n > 0); - for (int i = 0; i < n; i++) - u[i] = 0; -} - -} // namespace ModuleBase - -#endif // realArray class diff --git a/source/module_base/scalapack_connector.h b/source/module_base/scalapack_connector.h deleted file mode 100644 index 25eb3db59f..0000000000 --- a/source/module_base/scalapack_connector.h +++ /dev/null @@ -1,471 +0,0 @@ -#ifndef SCALAPACK_CONNECTOR_H -#define SCALAPACK_CONNECTOR_H - -#ifdef __MPI - -#include - -extern "C" -{ - int numroc_( const int *n, const int *nb, const int *iproc, const int *srcproc, const int *nprocs ); - void descinit_( - int *desc, - const int *m, const int *n, const int *mb, const int *nb, const int *irsrc, const int *icsrc, - const int *ictxt, const int *lld, int *info); - - void pddot_(int* n, double* dot, double* x, int* ix, int* jx, int* descx, int* incx, - double* y, int* iy, int* jy, int* descy, int* incy); - void pzdotc_(int* n, std::complex* dot, std::complex* x, int* ix, int* jx, int* descx, int* incx, - std::complex* y, int* iy, int* jy, int* descy, int* incy); - - void pdpotrf_(char *uplo, int *n, double *a, int *ia, int *ja, int *desca, int *info); -// void pzpotrf_(char *uplo, int *n, double _Complex *a, int *ia, int *ja, int *desca, int *info); - void pzpotrf_(char *uplo, int *n, std::complex *a, int *ia, int *ja, int *desca, int *info); - - void pdtran_(const int* m, const int* n, - const double* alpha, const double* a, const int* ia, const int* ja, const int* desca, - const double* beta, double* c, const int* ic, const int* jc, const int* descc); - - void pztranu_(const int *m,const int*n, - const std::complex* alpha, const std::complex* a, const int* ia, const int* ja, const int* desca, - const std::complex *beta , std::complex *c , const int *ic ,const int *jc ,const int *descc); - - void pzgemv_( - const char *transa, - const int *M, const int *N, - const double *alpha, - const std::complex *A, const int *IA, const int *JA, const int *DESCA, - const std::complex *B, const int *IB, const int *JB, const int *DESCB, const int *K, - const double *beta, std::complex *C, const int *IC, const int *JC, const int *DESCC,const int *L); - void pdgemv_( - const char *transa, - const int *M, const int *N, - const double *alpha, - const double *A, const int *IA, const int *JA, const int *DESCA, - const double *B, const int *IB, const int *JB, const int *DESCB, const int *K, - const double *beta, double *C, const int *IC, const int *JC, const int *DESCC,const int *L); - // C = a * A.? * B.? + b * C - void pdgemm_( - const char *transa, const char *transb, - const int *M, const int *N, const int *K, - const double *alpha, - const double *A, const int *IA, const int *JA, const int *DESCA, - const double *B, const int *IB, const int *JB, const int *DESCB, - const double *beta, - double *C, const int *IC, const int *JC, const int *DESCC); - void pzgemm_( - const char *transa, const char *transb, - const int *M, const int *N, const int *K, - const std::complex *alpha, - const std::complex *A, const int *IA, const int *JA, const int *DESCA, - const std::complex *B, const int *IB, const int *JB, const int *DESCB, - const std::complex *beta, - std::complex *C, const int *IC, const int *JC, const int *DESCC); - void pdsymm_(char *side , char *uplo , int *m , int *n , - double *alpha , double *a , int *ia , int *ja , int *desca , - double *b , int *ib , int *jb , int *descb , - double *beta , double *c , int *ic , int *jc , int *descc ); - void pdtrmm_(char *side , char *uplo , char *transa , char *diag , int *m , int *n , - double *alpha , double *a , int *ia , int *ja , int *desca , - double *b , int *ib , int *jb , int *descb ); -// void pztrmm_(char *side , char *uplo , char *transa , char *diag , int *m , int *n , -// double *alpha , double _Complex *a , int *ia , int *ja , int *desca , -// double _Complex *b , int *ib , int *jb , int *descb ); - void pztrmm_(char *side , char *uplo , char *transa , char *diag , int *m , int *n , - std::complex *alpha , std::complex *a , int *ia , int *ja , int *desca , - std::complex *b , int *ib , int *jb , int *descb ); - void pzhemm_(char* side , char* uplo , int* m , int* n , - std::complex* alpha , std::complex* a , int* ia , int* ja , int* desca , - std::complex* b , int* ib , int* jb , int* descb , - std::complex* beta , std::complex* c , int* ic , int* jc , int* descc ); - void pzgetrf_( - const int *M, const int *N, - std::complex *A, const int *IA, const int *JA, const int *DESCA, - int *ipiv, int *info); - - void pzgesv_( - const int *n, const int *nrhs, - const std::complex *A, const int *ia, const int *ja, const int *desca, - int *ipiv, std::complex* B, const int* ib, const int* jb, const int*descb, const int *info - ); - - void pdsygvx_(const int* itype, const char* jobz, const char* range, const char* uplo, - const int* n, double* A, const int* ia, const int* ja, const int*desca, double* B, const int* ib, const int* jb, const int*descb, - const double* vl, const double* vu, const int* il, const int* iu, - const double* abstol, int* m, int* nz, double* w, const double*orfac, double* Z, const int* iz, const int* jz, const int*descz, - double* work, int* lwork, int*iwork, int*liwork, int* ifail, int*iclustr, double*gap, int* info); - - void pzhegvx_(const int* itype, const char* jobz, const char* range, const char* uplo, - const int* n, std::complex* A, const int* ia, const int* ja, const int*desca, std::complex* B, const int* ib, const int* jb, const int*descb, - const double* vl, const double* vu, const int* il, const int* iu, - const double* abstol, int* m, int* nz, double* w, const double*orfac, std::complex* Z, const int* iz, const int* jz, const int*descz, - std::complex* work, int* lwork, double* rwork, int* lrwork, int*iwork, int*liwork, int* ifail, int*iclustr, double*gap, int* info); - - void pssygvx_(const int* itype, const char* jobz, const char* range, const char* uplo, - const int* n, float* A, const int* ia, const int* ja, const int*desca, float* B, const int* ib, const int* jb, const int*descb, - const float* vl, const float* vu, const int* il, const int* iu, - const float* abstol, int* m, int* nz, float* w, const float*orfac, float* Z, const int* iz, const int* jz, const int*descz, - float* work, int* lwork, int*iwork, int*liwork, int* ifail, int*iclustr, float*gap, int* info); - - void pchegvx_(const int* itype, const char* jobz, const char* range, const char* uplo, - const int* n, std::complex* A, const int* ia, const int* ja, const int*desca, std::complex* B, const int* ib, const int* jb, const int*descb, - const float* vl, const float* vu, const int* il, const int* iu, - const float* abstol, int* m, int* nz, float* w, const float*orfac, std::complex* Z, const int* iz, const int* jz, const int*descz, - std::complex* work, int* lwork, float* rwork, int* lrwork, int*iwork, int*liwork, int* ifail, int*iclustr, float*gap, int* info); - - - void pzgetri_( - const int *n, - const std::complex *A, const int *ia, const int *ja, const int *desca, - int *ipiv, const std::complex *work, const int *lwork, const int *iwork, const int *liwork, const int *info); - - void pzgeadd_( - const char *transa, - const int *m, const int *n, - const std::complex *alpha, - const std::complex *a, const int *ia, const int *ja, const int *desca, - const std::complex *beta, - const std::complex *c, const int *ic, const int *jc, const int *descc); - - void pztranc_( - const int *M, const int *N, - const std::complex *alpha, - const std::complex *A, const int *IA, const int *JA, const int *DESCA, - const std::complex *beta, - std::complex *C, const int *IC, const int *JC, const int *DESCC); - - void pdgemr2d_(const int *M, const int *N, - double *A, const int *IA, const int *JA, const int *DESCA, - double *B, const int *IB, const int *JB, const int *DESCB, - const int *ICTXT); - - void pzgemr2d_(const int *M, const int *N, - std::complex *A, const int *IA, const int *JA, const int *DESCA, - std::complex *B, const int *IB, const int *JB, const int *DESCB, - const int *ICTXT); - - // Scalapack wrappers to copy 2D blocks of data - // more info: - // https://netlib.org/scalapack/explore-html/da/db5/pigemr_8c.html - // https://netlib.org/scalapack/explore-html/dd/dcd/pdgemr_8c.html - // https://netlib.org/scalapack/explore-html/d5/dd4/pzgemr_8c.html - // https://netlib.org/scalapack/explore-html/d5/deb/psgemr_8c.html - // https://netlib.org/scalapack/explore-html/d4/dad/pcgemr_8c.html - void Cpigemr2d (int m, int n, int *ptrmyblock, int ia, int ja, int *ma, int *ptrmynewblock, int ib, int jb, int *mb, int globcontext); - void Cpdgemr2d (int m, int n, double *ptrmyblock, int ia, int ja, int *ma, double *ptrmynewblock, int ib, int jb, int *mb, int globcontext); - void Cpzgemr2d (int m, int n, std::complex *ptrmyblock, int ia, int ja, int *ma, std::complex *ptrmynewblock, int ib, int jb, int *mb, int globcontext); - void Cpsgemr2d (int m, int n, float *ptrmyblock, int ia, int ja, int *ma, float *ptrmynewblock, int ib, int jb, int *mb, int globcontext); - void Cpcgemr2d (int m, int n, std::complex *ptrmyblock, int ia, int ja, int *ma, std::complex *ptrmynewblock, int ib, int jb, int *mb, int globcontext); -} - - template - struct block2d_data_type - { - constexpr static bool value = std::is_same::value || std::is_same>::value || std::is_same::value || std::is_same>::value || std::is_same::value; - }; - - - /** - * Copies a 2D block of data from matrix A to matrix B using the Scalapack library. - * This function supports different data types: double, std::complex, float, std::complex, and int. - * - * @tparam T The data type of the matrices A and B. - * @param M The number of rows of matrix A. - * @param N The number of columns of matrix A. - * @param A Pointer to the source matrix A. - * @param IA The starting row index of the block in matrix A. - * @param JA The starting column index of the block in matrix A. - * @param DESCA Descriptor array for matrix A. - * @param B Pointer to the destination matrix B. - * @param IB The starting row index of the block in matrix B. - * @param JB The starting column index of the block in matrix B. - * @param DESCB Descriptor array for matrix B. - * @param ICTXT The context identifier. - */ - template - typename std::enable_if::value,void>::type Cpxgemr2d(int M, int N, T *A, int IA, int JA, int *DESCA, T *B, int IB, int JB, int *DESCB, int ICTXT) - { - if (std::is_same::value) Cpdgemr2d(M, N, reinterpret_cast(A),IA, JA, DESCA,reinterpret_cast(B),IB,JB, DESCB,ICTXT); - if (std::is_same>::value) Cpzgemr2d(M, N, reinterpret_cast*>(A),IA, JA, DESCA,reinterpret_cast*>(B),IB,JB, DESCB,ICTXT); - if (std::is_same::value) Cpsgemr2d(M, N, reinterpret_cast(A),IA, JA, DESCA,reinterpret_cast(B),IB,JB, DESCB,ICTXT); - if (std::is_same>::value) Cpcgemr2d(M, N, reinterpret_cast*>(A),IA, JA, DESCA,reinterpret_cast*>(B),IB,JB, DESCB,ICTXT); - if (std::is_same::value) Cpigemr2d(M, N, reinterpret_cast(A),IA, JA, DESCA,reinterpret_cast(B),IB,JB, DESCB,ICTXT); - }; - - -class ScalapackConnector -{ -public: - static inline - void geadd( - const char transa, - const int m, const int n, - const std::complex alpha, - const std::complex *a, const int ia, const int ja, const int *desca, - const std::complex beta, - const std::complex *c, const int ic, const int jc, const int *descc) - { - pzgeadd_(&transa, &m, &n, &alpha, a, &ia, &ja, desca, &beta, c, &ic, &jc, descc); - } - - static inline - void dot(int n, - double& dot, - double* a, - int ia, - int ja, - int inca, - double* b, - int ib, - int jb, - int incb, - int* desc) - { - pddot_(&n, &dot, a, &ia, &ja, desc, &inca, b, &ib, &jb, desc, &incb); - } - - static inline - void dot(int n, - std::complex& dotc, - std::complex* a, - int ia, - int ja, - int inca, - std::complex* b, - int ib, - int jb, - int incb, - int* desc) - { - pzdotc_(&n, &dotc, a, &ia, &ja, desc, &inca, b, &ib, &jb, desc, &incb); - } - - static inline - void gemm( - const char transa, const char transb, - const int M, const int N, const int K, - const double alpha, - const double* A, const int IA, const int JA, const int* DESCA, - const double* B, const int IB, const int JB, const int* DESCB, - const double beta, - double* C, const int IC, const int JC, const int* DESCC) - { - pdgemm_(&transa, &transb, &M, &N, &K, &alpha, A, &IA, &JA, DESCA, - B, &IB, &JB, DESCB, &beta, C, &IC, &JC, DESCC); - } - - static inline - void gemm( - const char transa, const char transb, - const int M, const int N, const int K, - const std::complex alpha, - const std::complex *A, const int IA, const int JA, const int *DESCA, - const std::complex *B, const int IB, const int JB, const int *DESCB, - const std::complex beta, - std::complex *C, const int IC, const int JC, const int *DESCC) - { - pzgemm_(&transa, &transb, &M, &N, &K, &alpha, A, &IA, &JA, DESCA, - B, &IB, &JB, DESCB, &beta, C, &IC, &JC, DESCC); - } - - static inline - void gemm(char transa, char transb, int M, int N, int K, - double alpha, - double* A, - double* B, - double beta, - double* C, - int* DESC) - { - int isrc = 1; - pdgemm_(&transa, - &transb, - &M, - &N, - &K, - &alpha, - A, - &isrc, - &isrc, - DESC, - B, - &isrc, - &isrc, - DESC, - &beta, - C, - &isrc, - &isrc, - DESC); - } - - static inline - void gemm(char transa, char transb, int M, int N, int K, - std::complex alpha, - std::complex* A, - std::complex* B, - std::complex beta, - std::complex* C, - int* DESC) - { - - int isrc = 1; - pzgemm_(&transa, - &transb, - &M, - &N, - &K, - &alpha, - A, - &isrc, - &isrc, - DESC, - B, - &isrc, - &isrc, - DESC, - &beta, - C, - &isrc, - &isrc, - DESC); - } - - static inline - void symm(char side, - char uplo, - int m, - int n, - double alpha, - double* a, - double* b, - double beta, - double* c, - int* desc) - { - int isrc = 1; - pdsymm_(&side, &uplo, &m, &n, &alpha, a, &isrc, &isrc, desc, b, &isrc, &isrc, desc, &beta, c, &isrc, &isrc, desc); - } - - static inline - void getrf( - const int M, const int N, - std::complex *A, const int IA, const int JA, const int *DESCA, - int *ipiv, int *info) //fix a bug: info is output and we must use int* - { - pzgetrf_(&M, &N, A, &IA, &JA, DESCA, ipiv, info); - } - - static inline - void getri( - const int n, - const std::complex *A, const int ia, const int ja, const int *desca, int *ipiv, - const std::complex *work, const int *lwork, const int *iwork, const int *liwork, int *info) - { - pzgetri_(&n, A, &ia, &ja, desca, ipiv, work, lwork, iwork, liwork, info); - } - - static inline - void gesv( - const int n, const int nrhs, - const std::complex *A, const int ia, const int ja, const int *desca, - int *ipiv, std::complex* B, const int ib, const int jb, const int*descb, int *info) - { - pzgesv_(&n, &nrhs, A, &ia, &ja, desca, ipiv, B, &ib, &jb, descb, info); - } - - static inline - void tranu( - const int m, const int n, - const std::complex alpha , std::complex *a , const int ia , const int ja , const int *desca, - const std::complex beta , std::complex *c , const int ic , const int jc , const int *descc) - { - pztranu_(&m, &n, &alpha, a, &ia, &ja, desca, &beta, c, &ic, &jc, descc); - } - - static inline - int potrf(char uplo, int na, double* U, int* desc) - { - int isrc = 1; - int info; - pdpotrf_(&uplo, &na, U, &isrc, &isrc, desc, &info); - return info; - } - - static inline - int potrf(char uplo, int na, std::complex* U, int* desc) - { - int isrc = 1; - int info; - pzpotrf_(&uplo, &na, U, &isrc, &isrc, desc, &info); - return info; - } - - static inline - void trmm(char side, - char uplo, - char trans, - char diag, - int m, - int n, - double alpha, - double* a, - double* b, - int* desc) - { - int isrc = 1; - pdtrmm_(&side, &uplo, &trans, &diag, &m, &n, &alpha, a, &isrc, &isrc, desc, b, &isrc, &isrc, desc); - } - - static inline - void trmm(char side, - char uplo, - char trans, - char diag, - int m, - int n, - std::complex alpha, - std::complex* a, - std::complex* b, - int* desc) - { - int isrc = 1; - pztrmm_(&side, &uplo, &trans, &diag, &m, &n, &alpha, a, &isrc, &isrc, desc, b, &isrc, &isrc, desc); - } - - static inline - void hemm(char side, - char uplo, - int na, - std::complex alpha, - std::complex* a, - std::complex* b, - std::complex beta, - std::complex* c, - int* desc) - { - int isrc = 1; - pzhemm_(&side, - &uplo, - &na, - &na, - &alpha, - a, - &isrc, - &isrc, - desc, - b, - &isrc, - &isrc, - desc, - &beta, - c, - &isrc, - &isrc, - desc); - } -}; - -#endif // __MPI - -#endif diff --git a/source/module_base/sph_bessel_recursive-d1.cpp b/source/module_base/sph_bessel_recursive-d1.cpp deleted file mode 100644 index c34e2ea97c..0000000000 --- a/source/module_base/sph_bessel_recursive-d1.cpp +++ /dev/null @@ -1,382 +0,0 @@ -//========================================================== -// AUTHOR : Peize Lin -// DATE : 2017-04-24 -//========================================================== -#include "sph_bessel_recursive.h" - -#include -#include - -#include "constants.h" - -namespace ModuleBase -{ - -std::vector Sph_Bessel_Recursive_Pool::D1::sb_pool; - -void Sph_Bessel_Recursive::D1::set_dx( const double dx_in ) -{ - if(finish_set_dx && dx_in!=dx) - throw std::runtime_error("Sph_Bessel_Recursive::set_dx, dx can only set once"); - else - { - dx = dx_in; - finish_set_dx = true; - } -} - -const std::vector> & Sph_Bessel_Recursive::D1::cal_jlx( const int lmax, const size_t ix_size ) -{ - if(lmax<0) - throw std::invalid_argument("Sph_Bessel_Recursive::jlx l<0"); - cal_jlx_0( lmax+1 ); - cal_jlx_smallx( lmax+1, ix_size ); - cal_jlx_recursive( lmax+1, ix_size ); - return jlx; -} - -void Sph_Bessel_Recursive::D1::cal_jlx_0( const int l_size ) -{ - if(jlx.size() < static_cast(l_size)) - jlx.resize(l_size); - - for( int l=0; l!=l_size; ++l ) - { - if(jlx[l].size()<1) - { - jlx[l].resize(1); - if(0==l) - jlx[l][0] = 1.0; - else - jlx[l][0] = 0.0; - } - } -} - -void Sph_Bessel_Recursive::D1::cal_jlx_smallx( const int l_size, const size_t ix_size ) -{ - if(jlx.size() < static_cast(l_size)) - jlx.resize(l_size); - - for( int l=0; l!=l_size; ++l ) - { - if(jlx[l].size()threshold/coeff*(l+1.5)*4, 1.0/(l+2) ); - - const size_t ix_size_begin = static_cast(jlx[l].size()); - const size_t ix_size_end = std::min( ix_size, static_cast(smallx_range/dx) ); - if(jlx[l].size()(l_size)) - jlx.resize(l_size); - - for( int l=0; l!=l_size; ++l ) - { - if(jlx[l].size()(jlx[l].size()); - jlx[l].resize(ix_size); - switch(l) - { - case 0: - for( size_t ix=ix_size_begin; ix(jlx[l].size()); - jlx[l].resize(ix_size); - switch(l) - { - case 0: - { - for( size_t ix=ix_size_begin; ix(0.14/dx)+1 ); - for( size_t ix=ix_size_begin; ix(0.29/dx)+1 ); - for( size_t ix=ix_size_begin; ix(0.29/dx)+1 ); - for( size_t ix=ix_size_begin; ix(0.29/dx)+1 ); - for( size_t ix=ix_size_begin; ix(0.29/dx)+1 ); - for( size_t ix=ix_size_begin; ix(0.29/dx)+1 ); - for( size_t ix=ix_size_begin; ix(0.29/dx)+1 ); - for( size_t ix=ix_size_begin; ix(0.29/dx)+1 ); - for( size_t ix=ix_size_begin; ix6"); - } - } -//timeval t_end; gettimeofday( &t_end, NULL); -//std::cout< -#include - -#include "constants.h" - -namespace ModuleBase -{ - -std::vector Sph_Bessel_Recursive_Pool::D2::sb_pool; - -void Sph_Bessel_Recursive::D2::set_dx( const double dx_in ) -{ - if(finish_set_dx && dx_in!=dx) - throw std::runtime_error("Sph_Bessel_Recursive::set_dx, dx can only set once"); - else - { - dx = dx_in; - finish_set_dx = true; - } -} - -const std::vector>> & Sph_Bessel_Recursive::D2::cal_jlx( const int lmax, const size_t ix1_size, const size_t ix2_size ) -{ - if(lmax<0) - throw std::invalid_argument("Sph_Bessel_Recursive::jlx l<0"); - cal_jlx_0( lmax+1, ix1_size, ix2_size ); - cal_jlx_smallx( lmax+1, ix1_size, ix2_size ); - cal_jlx_recursive( lmax+1, ix1_size, ix2_size ); - return jlx; -} - -void Sph_Bessel_Recursive::D2::cal_jlx_0( const int l_size, const size_t ix1_size, const size_t ix2_size ) -{ - if(jlx.size() < static_cast(l_size)) - jlx.resize(l_size); - - for( int l=0; l!=l_size; ++l ) - { - const double jlx0 = (0==l) ? 1.0 : 0.0; - - if( jlx[l].size()(1,jlx0)); - - if( jlx[l][0].size()(l_size)) - jlx.resize(l_size); - - for( int l=0; l!=l_size; ++l ) - { - const double coeff = sqrt(ModuleBase::PI)/tgamma(l+1.5)/pow(2,l+1); - const double smallx_range = pow( this->threshold/coeff*(l+1.5)*4, 1.0/(l+2) ); - - if(jlx[l].size()(1), jlx[l][ix1].size() ); - const size_t ix2_size_end = std::min( ix2_size, static_cast(smallx_range/dx)/ix1 ); - if(jlx[l][ix1].size()(l_size)) - jlx.resize(l_size); - - for( int l=0; l!=l_size; ++l ) - { - switch(l) - { - case 0: - if(jlx[l].size()(1), jlx[l][ix1].size() ); - if(jlx[l][ix1].size()(1), jlx[l][ix1].size() ); - if(jlx[l][ix1].size()(1), jlx[l][ix1].size() ); - if(jlx[l][ix1].size()(jlx[l].size()); - jlx[l].resize(ix_size); - switch(l) - { - case 0: - { - for( size_t ix=ix_size_begin; ix(0.14/dx)+1 ); - for( size_t ix=ix_size_begin; ix(0.29/dx)+1 ); - for( size_t ix=ix_size_begin; ix(0.29/dx)+1 ); - for( size_t ix=ix_size_begin; ix(0.29/dx)+1 ); - for( size_t ix=ix_size_begin; ix(0.29/dx)+1 ); - for( size_t ix=ix_size_begin; ix(0.29/dx)+1 ); - for( size_t ix=ix_size_begin; ix(0.29/dx)+1 ); - for( size_t ix=ix_size_begin; ix(0.29/dx)+1 ); - for( size_t ix=ix_size_begin; ix6"); - } - } -//timeval t_end; gettimeofday( &t_end, NULL); -//std::cout< -#include - -namespace ModuleBase -{ - -class Sph_Bessel_Recursive -{ -public: - class D1; - class D2; -}; - - - -class Sph_Bessel_Recursive::D1 -{ -public: - const std::vector> & cal_jlx( const int lmax, const size_t ix_size ); - const std::vector> & get_jlx()const{ return jlx; } - - void set_dx(const double dx_in); - double get_dx()const{ return dx; } - -private: - std::vector> jlx; // jlx[l][x] - double dx = 0.0; - bool finish_set_dx = false; - - void cal_jlx_0( const int l_size ); - void cal_jlx_smallx( const int l_size, const size_t ix_size ); - void cal_jlx_recursive( const int l_size, const size_t ix_size ); - - - double threshold = 1e-8; // Peize Lin test -}; - - - -class Sph_Bessel_Recursive::D2 -{ -public: - const std::vector>> & cal_jlx( const int lmax, const size_t ix1_size, const size_t ix2_size ); - const std::vector>> & get_jlx()const{ return jlx; } - - void set_dx(const double dx_in); - double get_dx()const{ return dx; } - -private: - std::vector>> jlx; // jlx[l][x1][x2] - double dx = 0.0; - bool finish_set_dx = false; - - void cal_jlx_0( const int l_size, const size_t ix1_size, const size_t ix2_size ); - void cal_jlx_smallx( const int l_size, const size_t ix1_size, const size_t ix2_size ); - void cal_jlx_recursive( const int l_size, const size_t ix1_size, const size_t ix2_size ); - - - double threshold = 1e-8; // Peize Lin test -}; - - - -class Sph_Bessel_Recursive_Pool -{ -public: - class D1 - { - public: - static std::vector sb_pool; - }; - class D2 - { - public: - static std::vector sb_pool; - }; -}; - -} - -#endif // SPH_BESSEL_RECURSIVE_H \ No newline at end of file diff --git a/source/module_base/spherical_bessel_transformer.cpp b/source/module_base/spherical_bessel_transformer.cpp deleted file mode 100644 index 3fa6cb2a32..0000000000 --- a/source/module_base/spherical_bessel_transformer.cpp +++ /dev/null @@ -1,480 +0,0 @@ -#include "module_base/spherical_bessel_transformer.h" - -#include -#include -#include -#include -#include -#include - -#include "module_base/math_integral.h" -#include "module_base/math_sphbes.h" - -namespace ModuleBase -{ - -//********************************************************************** -// Implementation -//********************************************************************** -class SphericalBesselTransformer::Impl -{ - -public: - - Impl(const bool cache_enabled = false); - ~Impl() { _rfft_clear(); }; - - Impl(Impl const&) = delete; - Impl(Impl&&) = delete; - - Impl& operator=(Impl const&) = delete; - Impl& operator=(Impl&&) = delete; - - // see the interface class for details - void radrfft( - const int l, - const int ngrid, - const double cutoff, - const double* const in, - double* const out, - const int p = 0 - ); - - // see the interface class for details - void direct( - const int l, - const int ngrid_in, - const double* const grid_in, - const double* const in, - const int ngrid_out, - const double* const grid_out, - double* const out, - const int p = 0 - ); - - // total heap usage (in bytes) from the FFTW buffer and tabulated jl - size_t heap_usage() const; - - // clear the FFTW plan & buffer as well as the tabulated jl - void clear(); - - -private: - - //***************************************************************** - // FFT-based algorithm - //***************************************************************** - // NOTE: The reason of using a raw pointer to handle the FFT buffer is because - // FFTW suggests using its own memory allocation utility, which guarantee that - // the returned pointer obeys any special alignment restrictions imposed by any - // algorithm in FFTW. - - /// buffer used for in-place real-input FFT - double* f_ = nullptr; - - /// FFTW plan - fftw_plan rfft_plan_ = nullptr; - - /// size of the planned FFT - int sz_planned_ = 0; - - /// planner flag used to create rfft_plan_ - const unsigned fftw_plan_flag_; - - /// buffer allocation and plan creation for in-place real-input FFT - void _rfft_prepare(const int n); - - /// clear the FFTW plan and buffer - void _rfft_clear(); - - - //***************************************************************** - // numerical integration - //***************************************************************** - /// if true, jl values used in numerical integration will be cached - const bool cache_enabled_ = false; - - /// order of the cached spherical Bessel function - int l_ = -1; - - /// cached input grid - std::vector grid_in_; - - /// cached output grid - std::vector grid_out_; - - /// cached spherical Bessel function values - std::vector jl_; - - /// tabulate spherical Bessel function on the mesh grid - void _tabulate( - const int l, - const int ngrid_in, - const double* const grid_in, - const int ngrid_out, - const double* const grid_out - ); - - /// clear the tabulated jl - void _table_clear(); - -}; // class SphericalBesselTransformer::Impl - - -SphericalBesselTransformer::Impl::Impl(const bool cache_enabled): - // NOTE: For the current usage of this class, the performance gain - // by using FFTW_MEASURE instead of FFTW_ESTIMATE usually does not - // worth the extra overhead, and may cause a timeout of the integrated - // test. This might need more investigation and change in the future. - //fftw_plan_flag_(cache_enabled ? FFTW_MEASURE : FFTW_ESTIMATE), - fftw_plan_flag_(FFTW_ESTIMATE), - cache_enabled_(cache_enabled) -{} - - -void SphericalBesselTransformer::Impl::radrfft( - const int l, - const int ngrid, - const double cutoff, - const double* const in, - double* const out, - const int p -) -{ - /* - * An l-th order spherical Bessel transform F(x) -> G(y) can be expressed - * in terms of Fourier transforms: - * - * l - * --- 1 / +inf -iyx - * G(y) = \ ------- Re | dr f(n,x) e - * / l+1-n / -inf - * --- y - * n=0 - * - * where - * - * 1 F(x) - * f(n,x) = ---------- [ q(l,n) + i*p(l,n) ] -------- - * sqrt(2*pi) l-n-1 - * x - * - * p,q are polynomial coefficients in Rayleigh's formula (see below), - * and the domain of F(x) is extended to negative values by letting - * F(-x) = pow(-1,l)*F(x). - * - * Note that given l & n, q(l,n) and p(l,n) cannot be both non-zero. - * Therefore, each FFT input array is either purely real or purely - * imaginary, which suggests the use of real-input FFT. - * - */ - assert(l >= 0); - assert(ngrid > 1); - assert(p <= 2); - - const double pi = std::acos(-1.0); - const int n = ngrid - 1; - const double dx = cutoff / n; - const double dy = pi / cutoff; - const double pref = dx / std::sqrt(2. * pi); - - // temporary storage for the output (in order to support in-place transform) - std::vector tmp(ngrid); - - // The l-th order spherical Bessel function of the first kind can be expressed as - // - // sin(x)*P(l,x) + cos(x)*Q(l,x) - // j (x) = ----------------------------- - // l l+1 - // x - // - // where P(l,x) and Q(l,x) are polynomials of degree no more than l. Their polynomial - // coefficients follow the same recurrence relation - // - // c(l,m) = (2l-1) * c(l-1,m) - c(l-2,m-2) - // - // with different initial conditions: - // - // cos sin - // - // c(0,0) = 0 c(0,0) = 1 - // c(1,0) = 0 c(1,0) = 1 - // c(1,1) = -1 c(1,1) = 0 - // - std::vector> c((l+1) * (l+2) / 2); // cos->real; sin->imag - auto idx = [](int ll, int m) { return (ll+1)*ll/2 + m; }; - - c[idx(0, 0)] = {0, 1}; - if (l > 0) - { - c[idx(1, 0)] = {0, 1}; - c[idx(1, 1)] = {-1, 0}; - } - - for (int ll = 2; ll <= l; ++ll) - { - for (int m = 0; m < ll; ++m) - { - c[idx(ll,m)] = (2*ll-1.0) * c[idx(ll-1, m)] - (m >= 2 ? c[idx(ll-2, m-2)] : 0); - } - c[idx(ll,ll)] = - c[idx(ll-2, ll-2)]; - } - - _rfft_prepare(2 * n); - - bool is_imag = true; - int sign = -1; - for (int m = 0; m <= l; ++m) - { - // m even --> sin; f[2*n-i] = -f[i]; out += -imag(rfft(f)) / y^(l+1-m) - // m odd --> cos; f[2*n-i] = +f[i]; out += +real(rfft(f)) / y^(l+1-m) - const double coef = reinterpret_cast(c[idx(l,m)])[is_imag]; - - f_[0] = f_[n] = 0.0; - for (int i = 1; i != n; ++i) - { - f_[i] = pref * coef * in[i] * std::pow(i * dx, m + 1 - l - p); - f_[2 * n - i] = sign * f_[i]; - } - - fftw_execute(rfft_plan_); // perform in-place rfft on f_ - - // sum up the series by ( ... ( ( g0/y + g1 )/y + g2 )/y + ... + gl )/y - // out[0] is handled later by direct integration - for (int j = 1; j <= n; ++j) - { - tmp[j] = (tmp[j] + sign * f_[2*j + is_imag]) / (j * dy); - } - - is_imag = !is_imag; - sign = -sign; - } - - // out[0] is done by direct integration - // note that only the zeroth order spherical Bessel function is nonzero at 0 - if (l == 0) - { - for (int i = 0; i <= n; ++i) - { - tmp[0] += 2.0 * pref * in[i] * std::pow(i*dx, 2-p); // p <= 2 is required here - } - } - - // FFT-based method does not yield accurate results for small y at high l - // use numerical integration in this case - const int n_direct = (l == 0) ? 0 : static_cast(ngrid * std::pow(1e-8, 1.0/l)); - if (n_direct > 0) - { - std::vector buffer(ngrid + n_direct); - double* grid_in = buffer.data(); - double* grid_out = grid_in + ngrid; - - std::for_each(grid_in, grid_in + ngrid, - [&](double& x) { x = (&x - grid_in) * dx; }); - std::for_each(grid_out, grid_out + n_direct, - [&](double& y) { y = ((&y - grid_out) + 1) * dy; }); - - direct(l, ngrid, grid_in, in, n_direct, grid_out, &tmp[1], p); - } - - std::copy(tmp.begin(), tmp.end(), out); - - if (!cache_enabled_) - { - _rfft_clear(); - } -} - - -void SphericalBesselTransformer::Impl::direct( - const int l, - const int ngrid_in, - const double* const grid_in, - const double* const in, - const int ngrid_out, - const double* const grid_out, - double* const out, - const int p -) -{ - assert(p <= 2); - assert(ngrid_in > 1 && ngrid_out > 0); - assert(grid_in[0] >= 0.0 && grid_out[0] >= 0.0); - assert(std::is_sorted(grid_in, grid_in + ngrid_in, std::less_equal())); - assert(std::is_sorted(grid_out, grid_out + ngrid_out, std::less_equal())); - - std::vector buffer(3 * ngrid_in); - double* rab = buffer.data(); - double* tmp = rab + ngrid_in; // integrand without the jl part - double* integrand = tmp + ngrid_in; // integrand - - std::adjacent_difference(grid_in, grid_in + ngrid_in, rab); - - std::copy(in, in + ngrid_in, tmp); - std::for_each(tmp, tmp + ngrid_in, - [&](double& x) { x *= std::pow(grid_in[&x - tmp], 2 - p); }); - - // compute spherical Bessel function on the grid and store the results in jl_ - // (will be cleared at the end of this function if cache is disabled) - _tabulate(l, ngrid_in, grid_in, ngrid_out, grid_out); - - for (int j = 0; j < ngrid_out; ++j) - { - double* jl = &jl_[j * grid_in_.size()]; - std::transform(tmp, tmp + ngrid_in, jl, integrand, std::multiplies()); - out[j] = ModuleBase::Integral::simpson(ngrid_in, integrand, &rab[1]); - } - - const double pref = std::sqrt(2.0 / std::acos(-1.0)); - std::for_each(out, out + ngrid_out, [pref](double& x) { x *= pref; }); - - if (!cache_enabled_) - { - _table_clear(); - } -} - - -void SphericalBesselTransformer::Impl::_rfft_prepare(const int n) -{ - if (n != sz_planned_) - { - if (f_) - { - fftw_free(f_); - } - f_ = fftw_alloc_real(sizeof(double) * 2 * (n/2 + 1)); - // see FFTW documentation "one-dimensional DFTs of real data" - - if (rfft_plan_) - { - fftw_destroy_plan(rfft_plan_); - } - auto* out = reinterpret_cast(f_); // in-place transform - rfft_plan_ = fftw_plan_dft_r2c_1d(n, f_, out, fftw_plan_flag_); - - sz_planned_ = n; - } -} - - -void SphericalBesselTransformer::Impl::_tabulate( - const int l, - const int ngrid_in, - const double* const grid_in, - const int ngrid_out, - const double* const grid_out -) -{ - const bool is_cached = - cache_enabled_ && l == l_ - && ngrid_in <= grid_in_.size() && ngrid_out <= grid_out_.size() - && std::equal(grid_in, grid_in + ngrid_in, grid_in_.begin()) - && std::equal(grid_out, grid_out + ngrid_out, grid_out_.begin()); - - if (is_cached) - { - return; - } - - l_ = l; - grid_in_ = std::vector(grid_in, grid_in + ngrid_in); - grid_out_ = std::vector(grid_out, grid_out + ngrid_out); - jl_.resize(grid_in_.size() * grid_out_.size()); - - for (int j = 0; j < ngrid_out; ++j) - { - ModuleBase::Sphbes::sphbesj(ngrid_in, grid_in, grid_out[j], l, &jl_[j * ngrid_in]); - } -} - - -void SphericalBesselTransformer::Impl::_rfft_clear() -{ - if (rfft_plan_) - { - fftw_destroy_plan(rfft_plan_); - rfft_plan_ = nullptr; - } - - if (f_) - { - fftw_free(f_); - f_ = nullptr; - } - - sz_planned_ = 0; -} - - -void SphericalBesselTransformer::Impl::_table_clear() -{ - std::vector().swap(grid_in_); - std::vector().swap(grid_out_); - std::vector().swap(jl_); -} - - -size_t SphericalBesselTransformer::Impl::heap_usage() const -{ - return (grid_in_.capacity() + grid_out_.capacity() + jl_.capacity() - + sz_planned_) * sizeof(double); -} - - -void SphericalBesselTransformer::Impl::clear() -{ - _rfft_clear(); - _table_clear(); -} - - -//********************************************************************** -// Interface -//********************************************************************** -SphericalBesselTransformer::SphericalBesselTransformer(const bool cache_enabled) - : impl_(new Impl(cache_enabled)) -{} - - -void SphericalBesselTransformer::radrfft( - const int l, - const int ngrid, - const double cutoff, - const double* const in, - double* const out, - const int p -) const -{ - impl_->radrfft(l, ngrid, cutoff, in, out, p); -} - - -void SphericalBesselTransformer::direct( - const int l, - const int ngrid_in, - const double* const grid_in, - const double* const in, - const int ngrid_out, - const double* const grid_out, - double* const out, - const int p -) const -{ - impl_->direct(l, ngrid_in, grid_in, in, ngrid_out, grid_out, out, p); -} - - -size_t SphericalBesselTransformer::heap_usage() const -{ - return impl_->heap_usage(); -} - - -void SphericalBesselTransformer::clear() -{ - impl_->clear(); -} - - -} // namespace ModuleBase diff --git a/source/module_base/spherical_bessel_transformer.h b/source/module_base/spherical_bessel_transformer.h deleted file mode 100644 index 5a0a4b6663..0000000000 --- a/source/module_base/spherical_bessel_transformer.h +++ /dev/null @@ -1,184 +0,0 @@ -#ifndef SPHERICAL_BESSEL_TRANSFORMER_H_ -#define SPHERICAL_BESSEL_TRANSFORMER_H_ - -#include -#include - -namespace ModuleBase -{ - -/** - * @brief A class that provides spherical Bessel transforms. - * - * @note This class is implemented as an opaque shared pointer. The underlying - * object of the implementation class, which may cache some tabulated function - * values, is shared via copy-construction and copy-assignment. - * - * The spherical Bessel transform of a function F(x) is defined as - * - * / +inf 2 - * G(y) = sqrt(2/pi) * | dx x F(x) j (y*x) - * / 0 l - * - * where - * - * j - * l - * - * is the l-th order spherical Bessel function of the first kind. - * - * This class interprets the input array as - * - * p - * in[i] = x [i] F(x[i]) (p being an input argument) - * - * and, on finish, fills the output array with - * - * out[j] = G(y[j]) - * - * - * Usage: - * - * // cache is disabled by default - * SphericalBesselTransformer sbt; - * - * // cache enabled mode - * // faster for multiple transforms with the same size & order - * SphericalBesselTransformer sbt2(true); - * - * //--------------------------------------------------------------------- - * // FFT-based algorithm - * //--------------------------------------------------------------------- - * // basic usage - * sbt.radrfft(l, ngrid, cutoff, in, out); - * - * // perform SBT on F(r) with input values r*F(r) - * sbt.radrfft(l, ngrid, cutoff, in, out, 1); - * - * //--------------------------------------------------------------------- - * // numerical integration (Simpson's rule) - * //--------------------------------------------------------------------- - * // basic usage - * sbt.direct(l, ngrid_in, grid_in, value_in, ngrid_out, grid_out, value_out); - * - * // perform SBT on F(r) with input values r^2*F(r) - * sbt.direct(l, ngrid_in, grid_in, value_in, ngrid_out, grid_out, value_out, 2); - * - */ -class SphericalBesselTransformer -{ -public: - SphericalBesselTransformer(const bool cache_enabled = false); - ~SphericalBesselTransformer() = default; - - SphericalBesselTransformer(SphericalBesselTransformer const&) = default; - SphericalBesselTransformer(SphericalBesselTransformer &&) = default; - - SphericalBesselTransformer& operator=(const SphericalBesselTransformer&) = default; - SphericalBesselTransformer& operator=(SphericalBesselTransformer&&) = default; - - /** - * @brief Spherical Bessel transform via fast Fourier transforms. - * - * This function computes the spherical Bessel transform F(x) -> G(y) with input - * - * p - * in[i] = x [i] F(x[i]) - * - * where p <= 2 is an integer, and - * - * cutoff - * x[i] = i * ------- i = 0, 1, 2,..., ngrid-1. - * ngrid-1 - * - * On finish, out[j] = G(y[j]) where - * - * pi - * y[j] = j * ------ j = 0, 1, 2,..., ngrid-1. - * cutoff - * - * @param[in] l order of the transform - * @param[in] ngrid number of grid points (same for input and output) - * @param[in] cutoff cutoff distance of input grid - * @param[in] in input values - * @param[out] out transformed values - * @param[in] p exponent of the extra power term in input values - * (must not exceed 2) - * - * @note F(x) is supposed to be exactly zero at and after cutoff. Results would - * make no sense if the input is truncated at a place where F(x) is still - * significantly non-zero. - * @note FFT-based algorithm is not accurate for high l at small y. Numerical - * integration via Simpson's rule is implicitly invoked to handle this case. - * @note p is restricted to p <= 2 in order to avoid the situation that one has to - * determine x^2*F(x) at x = 0 from x[i]^p*F(x[i]). - */ - void radrfft( - const int l, - const int ngrid, - const double cutoff, - const double* const in, - double* const out, - const int p = 0 - ) const; - - - /** - * @brief Spherical Bessel transform via numerical integration with Simpson's rule. - * - * This function computes the spherical Bessel transform F(x) -> G(y) with input - * - * p - * in[i] = x [i] F(x[i]) - * - * where p <= 2 is an integer. On finish, out[j] = G(y[j]). - * - * @param[in] l order of the transform - * @param[in] ngrid_in number of the input grid points - * @param[in] grid_in input grid - * @param[in] in input values - * @param[in] ngrid_out number of the output grid points - * @param[in] grid_out output grid - * @param[out] out transformed values on the output grid - * @param[in] p exponent of the extra power term in input values - * (must not exceed 2) - * - * @note Even if the input grid forms a good sampling of F(x), results would still be - * inaccurate for very large y values (y*dx ~ pi) because the oscillation of - * j_l(y*x) in this case is poorly sampled, in which case Simpson's 1/3 rule - * could be a bad approximation. - * @note p is restricted to p <= 2 in order to avoid the situation that one has to - * determine x^2*F(x) at x = 0 from x[i]^p*F(x[i]). - * - */ - void direct( - const int l, - const int ngrid_in, - const double* const grid_in, - const double* const in, - const int ngrid_out, - const double* const grid_out, - double* const out, - const int p = 0 - ) const; - - - /// total heap usage (in bytes) from the FFTW buffer and tabulated jl - size_t heap_usage() const; - - /// clear the FFTW plan & buffer as well as the tabulated jl - void clear(); - - /// check if two objects share the same underlying implementation object - bool operator==(const SphericalBesselTransformer& rhs) const { return impl_ == rhs.impl_; } - - -private: - - class Impl; // forward declaration - std::shared_ptr impl_; -}; - -} // namespace ModuleBase - -#endif diff --git a/source/module_base/test/CMakeLists.txt b/source/module_base/test/CMakeLists.txt deleted file mode 100644 index a39ba8436a..0000000000 --- a/source/module_base/test/CMakeLists.txt +++ /dev/null @@ -1,240 +0,0 @@ -remove_definitions(-D__MPI) -install(DIRECTORY data DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) -AddTest( - TARGET MODULE_BASE_blas_connector - LIBS parameter ${math_libs} base device - SOURCES blas_connector_test.cpp -) -AddTest( - TARGET MODULE_BASE_atom_in - LIBS parameter - SOURCES atom_in_test.cpp -) -AddTest( - TARGET MODULE_BASE_timer - LIBS parameter - SOURCES timer_test.cpp ../timer.cpp ../global_variable.cpp -) -AddTest( - TARGET MODULE_BASE_tool_quit - LIBS parameter - SOURCES tool_quit_test.cpp ../tool_quit.cpp ../global_variable.cpp ../global_file.cpp ../global_function.cpp ../memory.cpp ../timer.cpp -) -AddTest( - TARGET MODULE_BASE_tool_check - LIBS parameter - SOURCES tool_check_test.cpp ../tool_check.cpp ../tool_quit.cpp ../global_variable.cpp ../global_file.cpp ../global_function.cpp ../memory.cpp ../timer.cpp -) -AddTest( - TARGET MODULE_BASE_memory - SOURCES memory_test.cpp ../memory.cpp ../parallel_reduce.cpp -) -ADDTest( - TARGET MODULE_BASE_global_function - LIBS parameter ${math_libs} - SOURCES global_function_test.cpp ../global_function.cpp ../tool_quit.cpp ../global_variable.cpp ../global_file.cpp ../memory.cpp ../timer.cpp -) -AddTest( - TARGET MODULE_BASE_vector3 - LIBS parameter - SOURCES vector3_test.cpp -) -AddTest( - TARGET MODULE_BASE_matrix3 - LIBS parameter ${math_libs} base device - SOURCES matrix3_test.cpp -) -AddTest( - TARGET MODULE_BASE_intarray - LIBS parameter - SOURCES intarray_test.cpp ../intarray.cpp -) -AddTest( - TARGET MODULE_BASE_realarray - LIBS parameter - SOURCES realarray_test.cpp ../realarray.cpp -) -AddTest( - TARGET MODULE_BASE_matrix - LIBS parameter ${math_libs} base device - SOURCES matrix_test.cpp -) -AddTest( - TARGET MODULE_BASE_complexarray - LIBS parameter - SOURCES complexarray_test.cpp ../complexarray.cpp ../tool_quit.cpp ../global_variable.cpp ../global_file.cpp ../global_function.cpp ../memory.cpp ../timer.cpp -) -AddTest( - TARGET MODULE_BASE_complexmatrix - LIBS parameter ${math_libs} base device - SOURCES complexmatrix_test.cpp -) -AddTest( - TARGET MODULE_BASE_integral - LIBS parameter - SOURCES math_integral_test.cpp ../math_integral.cpp -) -AddTest( - TARGET MODULE_BASE_sph_bessel_recursive - LIBS parameter - SOURCES sph_bessel_recursive_test.cpp ../sph_bessel_recursive-d1.cpp ../sph_bessel_recursive-d2.cpp -) -AddTest( - TARGET MODULE_BASE_ylmreal - LIBS parameter ${math_libs} base device - SOURCES math_ylmreal_test.cpp ../libm/branred.cpp ../libm/sincos.cpp -) -AddTest( - TARGET MODULE_BASE_math_sphbes - LIBS parameter - SOURCES math_sphbes_test.cpp ../math_sphbes.cpp ../timer.cpp -) -AddTest( - TARGET MODULE_BASE_mathzone - LIBS parameter ${math_libs} base device - SOURCES mathzone_test.cpp -) -AddTest( - TARGET MODULE_BASE_mathzone_add1 - LIBS parameter ${math_libs} base device - SOURCES mathzone_add1_test.cpp -) -AddTest( - TARGET MODULE_BASE_math_polyint - LIBS parameter - SOURCES math_polyint_test.cpp ../math_polyint.cpp ../realarray.cpp ../timer.cpp -) -AddTest( - TARGET MODULE_BASE_gram_schmidt_orth - LIBS parameter ${math_libs} base device - SOURCES gram_schmidt_orth_test.cpp -) -AddTest( - TARGET MODULE_BASE_math_bspline - LIBS parameter - SOURCES math_bspline_test.cpp ../math_bspline.cpp -) -AddTest( - TARGET MODULE_BASE_inverse_matrix - LIBS parameter ${math_libs} base device - SOURCES inverse_matrix_test.cpp -) -AddTest( - TARGET MODULE_BASE_mymath - LIBS parameter - SOURCES mymath_test.cpp ../mymath.cpp ../timer.cpp -) -AddTest( - TARGET MODULE_BASE_container - LIBS parameter - SOURCES container_operator_test.cpp ../container_operator.h -) - -AddTest( - TARGET MODULE_BASE_math_chebyshev - LIBS parameter ${math_libs} base device container - SOURCES math_chebyshev_test.cpp -) - -AddTest( - TARGET MODULE_BASE_lapack_connector - LIBS parameter ${math_libs} base device - SOURCES lapack_connector_test.cpp -) - -AddTest( - TARGET MODULE_BASE_opt_CG - LIBS parameter ${math_libs} base device - SOURCES opt_CG_test.cpp opt_test_tools.cpp -) - -AddTest( - TARGET MODULE_BASE_opt_TN - LIBS parameter ${math_libs} base device - SOURCES opt_TN_test.cpp opt_test_tools.cpp -) - -AddTest( - TARGET MODULE_BASE_ylm - LIBS parameter - SOURCES ylm_test.cpp ../ylm.cpp ../timer.cpp ../tool_quit.cpp ../global_variable.cpp ../global_file.cpp ../global_function.cpp ../memory.cpp -) - -AddTest( - TARGET MODULE_BASE_abfs-vector3_order - LIBS parameter - SOURCES abfs-vector3_order_test.cpp ../abfs-vector3_order.cpp -) - -AddTest( - TARGET MODULE_BASE_global_file - LIBS parameter - SOURCES global_file_test.cpp ../global_file.cpp ../global_function.cpp ../tool_quit.cpp ../global_variable.cpp ../memory.cpp ../timer.cpp -) - -AddTest( - TARGET MODULE_BASE_tool_title - LIBS parameter - SOURCES tool_title_test.cpp ../tool_title.cpp ../global_variable.cpp ../global_function.cpp ../timer.cpp ../tool_quit.cpp ../global_file.cpp ../memory.cpp -) - -AddTest( - TARGET MODULE_BASE_element_basis_index - LIBS parameter - SOURCES element_basis_index_test.cpp ../element_basis_index.cpp -) - -AddTest( - TARGET MODULE_BASE_tool_threading - LIBS parameter - SOURCES tool_threading_test.cpp ../tool_threading.h -) - -AddTest( - TARGET MODULE_BASE_spherical_bessel_transformer - SOURCES spherical_bessel_transformer_test.cpp - LIBS parameter ${math_libs} base device -) - -AddTest( - TARGET MODULE_BASE_cubic_spline - SOURCES cubic_spline_test.cpp - LIBS parameter ${math_libs} base device -) - -AddTest( - TARGET MODULE_BASE_clebsch_gordan_coeff_test - SOURCES clebsch_gordan_coeff_test.cpp - LIBS parameter ${math_libs} base device -) - -AddTest( - TARGET MODULE_BASE_assoc_laguerre_test - SOURCES assoc_laguerre_test.cpp - LIBS parameter ${math_libs} base device -) - -AddTest( - TARGET MODULE_BASE_ndarray_test - LIBS parameter - SOURCES ndarray_test.cpp -) - -AddTest( - TARGET MODULE_BASE_formatter_test - LIBS parameter - SOURCES formatter_test.cpp -) - -AddTest( - TARGET MODULE_BASE_lebedev_laikov - SOURCES test_lebedev_laikov.cpp ../ylm.cpp ../math_lebedev_laikov.cpp -) - -if(ENABLE_GOOGLEBENCH) - AddTest( - TARGET MODULE_BASE_perf_sphbes - LIBS parameter - SOURCES perf_sphbes_test.cpp ../math_sphbes.cpp ../timer.cpp - ) -endif() diff --git a/source/module_base/test/abfs-vector3_order_test.cpp b/source/module_base/test/abfs-vector3_order_test.cpp deleted file mode 100644 index 713fb38609..0000000000 --- a/source/module_base/test/abfs-vector3_order_test.cpp +++ /dev/null @@ -1,26 +0,0 @@ -#include "module_base/abfs-vector3_order.h" -#include "module_base/vector3.h" -#include "gtest/gtest.h" -#include "module_ri/abfs.h" - -/************************************************ - * unit test of functions in class Abfs::vector3_order - ***********************************************/ - -/** - * - Tested Function - * - Two constructor functions of Vector3_Order - * - overloaded operator of < - */ - -TEST(AbfsVector3Order,Vector3Order) -{ - ModuleBase::Vector3 vd31 (10.,10.,10.); - Abfs::Vector3_Order vdo31(vd31); - Abfs::Vector3_Order vdo32(10.0,10.0,10.0); - EXPECT_FALSE(vdo31 vi31 (2,2,2); - Abfs::Vector3_Order vio31(vi31); - Abfs::Vector3_Order vio32(2,2,2); - EXPECT_FALSE(vio31 -#include -#include "module_base/assoc_laguerre.h" -#include // use standard library version for reference value -/* - Unittest for associated Laguerre polynomials -*/ - -class AssocLaguerreTest : public ::testing::Test -{ - protected: - AssocLaguerreTest() - { - } - - ~AssocLaguerreTest() - { - } - - void SetUp() - { - } - - void TearDown() - { - } -}; - -TEST_F(AssocLaguerreTest, LaguerreTest) -{ - // reference value from scipy.special.assoc_laguerre with k = 0 - Assoc_Laguerre al; - // 0-th order Laguerre polynomial - int n = 0; - std::vector xs = {0.0, 1.0, 2.0, 3.0}; - std::vector ref_ys; - for(int i = 0; i < xs.size(); i++) - { - ref_ys.push_back(1.0); - } - for(int i = 0; i < xs.size(); i++) - { - EXPECT_NEAR(al.laguerre(n, xs[i]), ref_ys[i], 1e-6); - } - // 1-st order Laguerre polynomial - n = 1; - ref_ys = {1.0, 0.0, -1.0, -2.0}; - for(int i = 0; i < xs.size(); i++) - { - EXPECT_NEAR(al.laguerre(n, xs[i]), ref_ys[i], 1e-6); - } - // 2-nd order Laguerre polynomial - n = 2; - ref_ys = {1.0, -0.5, -1.0, -0.5}; - for(int i = 0; i < xs.size(); i++) - { - EXPECT_NEAR(al.laguerre(n, xs[i]), ref_ys[i], 1e-6); - } - // 3-rd order Laguerre polynomial - n = 3; - ref_ys = {1.0, -0.6666666666666666, -0.33333333333333337, 1.0}; - for(int i = 0; i < xs.size(); i++) - { - EXPECT_NEAR(al.laguerre(n, xs[i]), ref_ys[i], 1e-6); - } - // 4-th order Laguerre polynomial - n = 4; - ref_ys = {1.0, -0.625, 0.33333333333333337, 1.375}; - for(int i = 0; i < xs.size(); i++) - { - EXPECT_NEAR(al.laguerre(n, xs[i]), ref_ys[i], 1e-6); - } - // 5-th order Laguerre polynomial - n = 5; - ref_ys = {1.0, -0.4666666666666667, 0.7333333333333334, 0.8500000000000001}; - for(int i = 0; i < xs.size(); i++) - { - EXPECT_NEAR(al.laguerre(n, xs[i]), ref_ys[i], 1e-6); - } - // 6-th order Laguerre polynomial - n = 6; - ref_ys = {1.0, -0.2569444444444444, 0.8222222222222224, -0.012499999999999956}; - for(int i = 0; i < xs.size(); i++) - { - EXPECT_NEAR(al.laguerre(n, xs[i]), ref_ys[i], 1e-6); - } - // 7-th order Laguerre polynomial - n = 7; - ref_ys = {1.0, -0.04047619047619044, 0.6634920634920637, -0.7464285714285714}; - for(int i = 0; i < xs.size(); i++) - { - EXPECT_NEAR(al.laguerre(n, xs[i]), ref_ys[i], 1e-6); - } - // 8-th order Laguerre polynomial - n = 8; - ref_ys = {1.0, 0.1539930555555556, 0.3587301587301589, -1.1087053571428571}; - for(int i = 0; i < xs.size(); i++) - { - EXPECT_NEAR(al.laguerre(n, xs[i]), ref_ys[i], 1e-6); - } - // all physical and possible n values are tested -} - -TEST_F(AssocLaguerreTest, AssociateLaguerreTest) -{ - // reference value from scipy.special.assoc_laguerre - Assoc_Laguerre al; - // test n = 8, k = 0 - int n = 8; - int k = 0; - std::vector xs = {0.0, 1.0, 2.0, 3.0}; - std::vector ref_ys = {1.0, 0.1539930555555556, 0.3587301587301589, -1.1087053571428571}; - for(int i = 0; i < xs.size(); i++) - { - EXPECT_NEAR(al.associate_laguerre(n, xs[i], k), ref_ys[i], 1e-6); - } - // test n = 8, k = 1 - n = 8; - k = 1; - xs = {0.0, 1.0, 2.0, 3.0}; - ref_ys = {9.0, -1.4017609126984123, 1.5777777777777775, -0.14263392857142831}; - for(int i = 0; i < xs.size(); i++) - { - EXPECT_NEAR(al.associate_laguerre(n, xs[i], k), ref_ys[i], 1e-6); - } - // test n = 8, k = 2 - n = 8; - k = 2; - xs = {0.0, 1.0, 2.0, 3.0}; - ref_ys = {45.0, -4.189459325396824, 0.7523809523809523, 3.1359374999999994}; - for(int i = 0; i < xs.size(); i++) - { - EXPECT_NEAR(al.associate_laguerre(n, xs[i], k), ref_ys[i], 1e-6); - } - // test n = 8, k = 3 - n = 8; - k = 3; - xs = {0.0, 1.0, 2.0, 3.0}; - ref_ys = {165.0, 1.449231150793654, -6.384126984126984, 5.70200892857143}; - for(int i = 0; i < xs.size(); i++) - { - EXPECT_NEAR(al.associate_laguerre(n, xs[i], k), ref_ys[i], 1e-6); - } - // test n = 8, k = 4 - n = 8; - k = 4; - xs = {0.0, 1.0, 2.0, 3.0}; - ref_ys = {495.0, 51.8809771825397, -20.098412698412695, -0.09441964285714727}; - for(int i = 0; i < xs.size(); i++) - { - EXPECT_NEAR(al.associate_laguerre(n, xs[i], k), ref_ys[i], 1e-6); - } - // test n = 8, k = 5 - n = 8; - k = 5; - xs = {0.0, 1.0, 2.0, 3.0}; - ref_ys = {1287.0, 242.01411210317463, -21.990476190476176, -23.028348214285717}; - for(int i = 0; i < xs.size(); i++) - { - EXPECT_NEAR(al.associate_laguerre(n, xs[i], k), ref_ys[i], 1e-6); - } - // test n = 8, k = 6 - n = 8; - k = 6; - xs = {0.0, 1.0, 2.0, 3.0}; - ref_ys = {3003.0, 777.6319692460318, 53.67301587301589, -60.999776785714275}; - for(int i = 0; i < xs.size(); i++) - { - EXPECT_NEAR(al.associate_laguerre(n, xs[i], k), ref_ys[i], 1e-6); - } - // test n = 8, k = 7 - n = 8; - k = 7; - xs = {0.0, 1.0, 2.0, 3.0}; - ref_ys = {6435.0, 2055.2262152777776, 368.62539682539676, -75.53370535714284}; - for(int i = 0; i < xs.size(); i++) - { - EXPECT_NEAR(al.associate_laguerre(n, xs[i], k), ref_ys[i], 1e-6); - } - // test n = 8, k = 8 - n = 8; - k = 8; - xs = {0.0, 1.0, 2.0, 3.0}; - ref_ys = {12870.0, 4777.330183531744, 1256.2666666666667, 53.21986607142856}; - for(int i = 0; i < xs.size(); i++) - { - EXPECT_NEAR(al.associate_laguerre(n, xs[i], k), ref_ys[i], 1e-6); - } - // all physical and possible n, k values are tested -} - -TEST_F(AssocLaguerreTest, FactorialTest) -{ - // this test is simple, no need to compare with reference value - Assoc_Laguerre al; - EXPECT_DOUBLE_EQ(al.factorial(0), 1); - EXPECT_DOUBLE_EQ(al.factorial(1), 1); - EXPECT_DOUBLE_EQ(al.factorial(2), 2); - EXPECT_DOUBLE_EQ(al.factorial(3), 6); - EXPECT_DOUBLE_EQ(al.factorial(4), 24); - EXPECT_DOUBLE_EQ(al.factorial(5), 120); - EXPECT_DOUBLE_EQ(al.factorial(6), 720); - EXPECT_DOUBLE_EQ(al.factorial(7), 5040); - EXPECT_DOUBLE_EQ(al.factorial(8), 40320); - EXPECT_DOUBLE_EQ(al.factorial(9), 362880); - EXPECT_DOUBLE_EQ(al.factorial(10), 3628800); -} - -TEST_F(AssocLaguerreTest, ValueTest) -{ - Assoc_Laguerre al; - //test n = 1, 2, ..., 4, from 1s to 4f - std::vector xs; - // segment1: 0-0.25, 0.01 - for(double x = 0.0; x < 0.25; x += 0.01) - { - xs.push_back(x); - } - // segment2: 0.25-1.0, 0.05 - for(double x = 0.25; x < 1.0; x += 0.05) - { - xs.push_back(x); - } - // segment3: 1.0-2.0, 0.1 - for(double x = 1.0; x < 2.0; x += 0.1) - { - xs.push_back(x); - } - // segment4: 2.0-5.0, 0.2 - for(double x = 2.0; x < 5.0; x += 0.2) - { - xs.push_back(x); - } - // segment5: 5.0-10.0, 0.5 - for(double x = 5.0; x < 10.0; x += 0.5) - { - xs.push_back(x); - } - int nmax = 4; - for(int n = 1; n < nmax; n++) - { - for(int l = 0; l < n; l++) - { - std::vector ref_ys; - for(int i = 0; i < xs.size(); i++) - { - ref_ys.push_back(std::tr1::assoc_laguerre(n-l-1, 2*l+1, xs[i])); - //ref_ys.push_back(al.associate_laguerre(n-l-1, xs[i], 2*l+1)); - } - for(int i = 0; i < xs.size(); i++) - { - EXPECT_NEAR(al.value(n, l, xs[i]), ref_ys[i], 1e-10); - } - } - } -} - -TEST_F(AssocLaguerreTest, GenerateVectorTest) -{ - Assoc_Laguerre al; - //test n = 1, 2, ..., 4, from 1s to 4f - std::vector xs = {0.0, 1.0, 2.0, 3.0}; - int nmax = 4; - for(int n = 1; n <= nmax; n++) - { - for(int l = 0; l < n; l++) - { - std::vector ref_ys; - for(int i = 0; i < xs.size(); i++) - { - ref_ys.push_back(al.associate_laguerre(n-l-1, xs[i], 2*l+1)); - } - std::vector ys; - ys.resize(xs.size()); - al.generate(n, l, xs, ys); - for(int i = 0; i < xs.size(); i++) - { - EXPECT_NEAR(ys[i], ref_ys[i], 1e-6); - } - } - } -} - -TEST_F(AssocLaguerreTest, GeneratePointerTest) -{ - Assoc_Laguerre al; - //test n = 1, 2, ..., 4, from 1s to 4f - std::vector xs = {0.0, 1.0, 2.0, 3.0}; - int nmax = 4; - for(int n = 1; n <= nmax; n++) - { - for(int l = 0; l < n; l++) - { - std::vector ref_ys; - for(int i = 0; i < xs.size(); i++) - { - ref_ys.push_back(al.associate_laguerre(n-l-1, xs[i], 2*l+1)); - } - double* ys = new double[xs.size()]; - al.generate(n, l, xs.size(), xs.data(), ys); - for(int i = 0; i < xs.size(); i++) - { - EXPECT_NEAR(ys[i], ref_ys[i], 1e-6); - } - delete[] ys; - } - } -} \ No newline at end of file diff --git a/source/module_base/test/atom_in_test.cpp b/source/module_base/test/atom_in_test.cpp deleted file mode 100644 index 09816ea5b7..0000000000 --- a/source/module_base/test/atom_in_test.cpp +++ /dev/null @@ -1,34 +0,0 @@ -#include "gtest/gtest.h" -#include "gmock/gmock.h" -#include "../atom_in.h" - -/************************************************ - * unit test of functions in atom_in.h - ***********************************************/ - -/** - * - Tested functions of class atom_in: - * - map atom_Z - * - get the atomic number - * - * - map atom_RCS - * - get the atomic radius - * - */ - -class atom_in_test : public testing::Test -{ -protected: - - atom_in Atomin; - int a = Atomin.atom_Z["H"]; - -}; - -TEST_F(atom_in_test, atomin) -{ - EXPECT_EQ(atom_in_test::a, 1); - EXPECT_EQ(Atomin.atom_RCS["H"],0.603774); - EXPECT_EQ(Atomin.atom_symbol["H"],"Hydrogen"); - EXPECT_EQ(Atomin.symbol_Z["Hydrogen"],1); -} \ No newline at end of file diff --git a/source/module_base/test/blas_connector_test.cpp b/source/module_base/test/blas_connector_test.cpp deleted file mode 100644 index dfe1e484b1..0000000000 --- a/source/module_base/test/blas_connector_test.cpp +++ /dev/null @@ -1,697 +0,0 @@ -#include "../blas_connector.h" -#include "../module_device/memory_op.h" -#include "gtest/gtest.h" - -#include -#include -#include -#include -TEST(blas_connector, sscal_) { - typedef float T; - const int size = 8; - const T scale = 2; - const int incx = 1; - std::array result, answer; - std::generate(result.begin(), result.end(), - []() { return std::rand() / T(RAND_MAX); }); - for (int i = 0; i < size; i++) - answer[i] = result[i] * scale; - sscal_(&size, &scale, result.data(), &incx); - for (int i = 0; i < size; i++) - EXPECT_FLOAT_EQ(answer[i], result[i]); -} - -TEST(blas_connector, dscal_) { - typedef double T; - const int size = 8; - const T scale = 2; - const int incx = 1; - std::array result, answer; - std::generate(result.begin(), result.end(), - []() { return std::rand() / T(RAND_MAX); }); - for (int i = 0; i < size; i++) - answer[i] = result[i] * scale; - dscal_(&size, &scale, result.data(), &incx); - for (int i = 0; i < size; i++) - EXPECT_DOUBLE_EQ(answer[i], result[i]); -} - -TEST(blas_connector, cscal_) { - typedef std::complex T; - const int size = 8; - const T scale = {2, 3}; - const int incx = 1; - std::array result, answer; - std::generate(result.begin(), result.end(), []() { - return T{static_cast(std::rand() / float(RAND_MAX)), - static_cast(std::rand() / float(RAND_MAX))}; - }); - for (int i = 0; i < size; i++) - answer[i] = result[i] * scale; - cscal_(&size, &scale, result.data(), &incx); - for (int i = 0; i < size; i++) { - EXPECT_FLOAT_EQ(answer[i].real(), result[i].real()); - EXPECT_FLOAT_EQ(answer[i].imag(), result[i].imag()); - } -} - -TEST(blas_connector, zscal_) { - typedef std::complex T; - const int size = 8; - const T scale = {2, 3}; - const int incx = 1; - std::array result, answer; - std::generate(result.begin(), result.end(), []() { - return T{static_cast(std::rand() / double(RAND_MAX)), - static_cast(std::rand() / double(RAND_MAX))}; - }); - for (int i = 0; i < size; i++) - answer[i] = result[i] * scale; - zscal_(&size, &scale, result.data(), &incx); - for (int i = 0; i < size; i++) { - EXPECT_DOUBLE_EQ(answer[i].real(), result[i].real()); - EXPECT_DOUBLE_EQ(answer[i].imag(), result[i].imag()); - } -} - -TEST(blas_connector, Scal) { - const int size = 8; - const std::complex scale = {2, 3}; - const int incx = 1; - std::complex result[8], answer[8]; - for (int i=0; i< size; i++) { - result[i] = std::complex{static_cast(std::rand() / double(RAND_MAX)), - static_cast(std::rand() / double(RAND_MAX))}; - }; - for (int i = 0; i < size; i++) - answer[i] = result[i] * scale; - BlasConnector::scal(size,scale,result,incx); - // incx is the spacing between elements if result - for (int i = 0; i < size; i++) { - EXPECT_DOUBLE_EQ(answer[i].real(), result[i].real()); - EXPECT_DOUBLE_EQ(answer[i].imag(), result[i].imag()); - } -} - -#ifdef __CUDA - -TEST(blas_connector, ScalGpu) { - const int size = 8; - const std::complex scale = {2, 3}; - const int incx = 1; - std::complex result[8], answer[8]; - std::complex* result_gpu = nullptr; - resmem_zd_op()(result_gpu, 8 * sizeof(std::complex)); - for (int i=0; i< size; i++) { - result[i] = std::complex{static_cast(std::rand() / double(RAND_MAX)), - static_cast(std::rand() / double(RAND_MAX))}; - }; - for (int i = 0; i < size; i++) - answer[i] = result[i] * scale; - syncmem_z2z_h2d_op()(result_gpu, result, sizeof(std::complex) * 8); - BlasConnector::scal(size,scale,result_gpu,incx,base_device::AbacusDevice_t::GpuDevice); - syncmem_z2z_d2h_op()(result, result_gpu, sizeof(std::complex) * 8); - delmem_zd_op()(result_gpu); - // incx is the spacing between elements if result - for (int i = 0; i < size; i++) { - EXPECT_DOUBLE_EQ(answer[i].real(), result[i].real()); - EXPECT_DOUBLE_EQ(answer[i].imag(), result[i].imag()); - } -} - -#endif - -TEST(blas_connector, daxpy_) { - typedef double T; - const int size = 8; - const T scale = 2; - const int incx = 1; - const int incy = 1; - std::array x_const, result, answer; - std::generate(x_const.begin(), x_const.end(), - []() { return std::rand() / double(RAND_MAX); }); - std::generate(result.begin(), result.end(), - []() { return std::rand() / double(RAND_MAX); }); - for (int i = 0; i < size; i++) - answer[i] = x_const[i] * scale + result[i]; - daxpy_(&size, &scale, x_const.data(), &incx, result.data(), &incy); - for (int i = 0; i < size; i++) - EXPECT_DOUBLE_EQ(answer[i], result[i]); -} - -TEST(blas_connector, zaxpy_) { - typedef std::complex T; - const int size = 8; - const T scale = {2, 3}; - const int incx = 1; - const int incy = 1; - std::array x_const, result, answer; - std::generate(x_const.begin(), x_const.end(), []() { - return T{static_cast(std::rand() / double(RAND_MAX)), - static_cast(std::rand() / double(RAND_MAX))}; - }); - std::generate(result.begin(), result.end(), []() { - return T{static_cast(std::rand() / double(RAND_MAX)), - static_cast(std::rand() / double(RAND_MAX))}; - }); - for (int i = 0; i < size; i++) - answer[i] = x_const[i] * scale + result[i]; - zaxpy_(&size, &scale, x_const.data(), &incx, result.data(), &incy); - for (int i = 0; i < size; i++) { - EXPECT_DOUBLE_EQ(answer[i].real(), result[i].real()); - EXPECT_DOUBLE_EQ(answer[i].imag(), result[i].imag()); - } -} - -TEST(blas_connector, Axpy) { - typedef std::complex T; - const int size = 8; - const T scale = {2, 3}; - const int incx = 1; - const int incy = 1; - std::array x_const, result, answer; - std::generate(x_const.begin(), x_const.end(), []() { - return T{static_cast(std::rand() / double(RAND_MAX)), - static_cast(std::rand() / double(RAND_MAX))}; - }); - std::generate(result.begin(), result.end(), []() { - return T{static_cast(std::rand() / double(RAND_MAX)), - static_cast(std::rand() / double(RAND_MAX))}; - }); - for (int i = 0; i < size; i++) - answer[i] = x_const[i] * scale + result[i]; - BlasConnector::axpy(size, scale, x_const.data(), incx, result.data(), incy); - for (int i = 0; i < size; i++) { - EXPECT_DOUBLE_EQ(answer[i].real(), result[i].real()); - EXPECT_DOUBLE_EQ(answer[i].imag(), result[i].imag()); - } -} - -#ifdef __CUDA - -TEST(blas_connector, AxpyGpu) { - typedef std::complex T; - const int size = 8; - const T scale = {2, 3}; - const int incx = 1; - const int incy = 1; - std::array x_const, result, answer; - T* x_gpu = nullptr; - T* result_gpu = nullptr; - resmem_zd_op()(x_gpu, size * sizeof(std::complex)); - resmem_zd_op()(result_gpu, size * sizeof(std::complex)); - std::generate(x_const.begin(), x_const.end(), []() { - return T{static_cast(std::rand() / double(RAND_MAX)), - static_cast(std::rand() / double(RAND_MAX))}; - }); - std::generate(result.begin(), result.end(), []() { - return T{static_cast(std::rand() / double(RAND_MAX)), - static_cast(std::rand() / double(RAND_MAX))}; - }); - for (int i = 0; i < size; i++) - answer[i] = x_const[i] * scale + result[i]; - syncmem_z2z_h2d_op()(result_gpu, result.data(), sizeof(std::complex) * size); - syncmem_z2z_h2d_op()(x_gpu, x_const.data(), sizeof(std::complex) * size); - BlasConnector::axpy(size, scale, x_gpu, incx, result_gpu, incy, base_device::AbacusDevice_t::GpuDevice); - syncmem_z2z_d2h_op()(result.data(), result_gpu, sizeof(std::complex) * size); - delmem_zd_op()(result_gpu); - delmem_zd_op()(x_gpu); - for (int i = 0; i < size; i++) { - EXPECT_DOUBLE_EQ(answer[i].real(), result[i].real()); - EXPECT_DOUBLE_EQ(answer[i].imag(), result[i].imag()); - } -} - -#endif - -TEST(blas_connector, dcopy_) { - typedef double T; - long const size = 8; - int const incx = 1; - int const incy = 1; - std::array x_const, result, answer; - std::generate(x_const.begin(), x_const.end(), - []() { return std::rand() / double(RAND_MAX); }); - for (int i = 0; i < size; i++) - answer[i] = x_const[i]; - dcopy_(&size, x_const.data(), &incx, result.data(), &incy); - for (int i = 0; i < size; i++) - EXPECT_DOUBLE_EQ(answer[i], result[i]); -} - -TEST(blas_connector, zcopy_) { - typedef std::complex T; - long const size = 8; - int const incx = 1; - int const incy = 1; - std::array x_const, result, answer; - std::generate(x_const.begin(), x_const.end(), []() { - return T{static_cast(std::rand() / double(RAND_MAX)), - static_cast(std::rand() / double(RAND_MAX))}; - }); - for (int i = 0; i < size; i++) - answer[i] = x_const[i]; - zcopy_(&size, x_const.data(), &incx, result.data(), &incy); - for (int i = 0; i < size; i++) { - EXPECT_DOUBLE_EQ(answer[i].real(), result[i].real()); - EXPECT_DOUBLE_EQ(answer[i].imag(), result[i].imag()); - } -} - -TEST(blas_connector, copy) { - long const size = 8; - int const incx = 1; - int const incy = 1; - std::complex result[8], answer[8]; - for (int i = 0; i < size; i++) - { - answer[i] = std::complex{static_cast(std::rand() / double(RAND_MAX)), - static_cast(std::rand() / double(RAND_MAX))}; - } - BlasConnector bs; - bs.copy(size, answer, incx, result, incy); - for (int i = 0; i < size; i++) { - EXPECT_DOUBLE_EQ(answer[i].real(), result[i].real()); - EXPECT_DOUBLE_EQ(answer[i].imag(), result[i].imag()); - } -} - -TEST(blas_connector, dgemv_) { - typedef double T; - const char transa_m = 'N'; - const char transa_n = 'T'; - const int size_m = 3; - const int size_n = 4; - const T alpha_const = 2; - const T beta_const = 3; - const int lda = size_m; - const int incx = 1; - const int incy = 1; - std::array x_const_m, result_m, answer_m, c_dot_m{}; - std::array x_const_n, result_n, answer_n, c_dot_n{}; - std::generate(x_const_n.begin(), x_const_n.end(), - []() { return std::rand() / double(RAND_MAX); }); - std::generate(result_n.begin(), result_n.end(), - []() { return std::rand() / double(RAND_MAX); }); - std::generate(x_const_m.begin(), x_const_m.end(), - []() { return std::rand() / double(RAND_MAX); }); - std::generate(result_m.begin(), result_m.end(), - []() { return std::rand() / double(RAND_MAX); }); - std::array a_const; - std::generate(a_const.begin(), a_const.end(), - []() { return std::rand() / double(RAND_MAX); }); - for (int i = 0; i < size_m; i++) { - for (int j = 0; j < size_n; j++) { - c_dot_m[i] += a_const[i + j * lda] * x_const_n[j]; - } - answer_m[i] = alpha_const * c_dot_m[i] + beta_const * result_m[i]; - } - dgemv_(&transa_m, &size_m, &size_n, &alpha_const, a_const.data(), &lda, - x_const_n.data(), &incx, &beta_const, result_m.data(), &incy); - - for (int j = 0; j < size_n; j++) { - for (int i = 0; i < size_m; i++) { - c_dot_n[j] += a_const[i + j * lda] * x_const_m[i]; - } - answer_n[j] = alpha_const * c_dot_n[j] + beta_const * result_n[j]; - } - dgemv_(&transa_n, &size_m, &size_n, &alpha_const, a_const.data(), &lda, - x_const_m.data(), &incx, &beta_const, result_n.data(), &incy); - - for (int i = 0; i < size_m; i++) - EXPECT_DOUBLE_EQ(answer_m[i], result_m[i]); - for (int j = 0; j < size_n; j++) - EXPECT_DOUBLE_EQ(answer_n[j], result_n[j]); -} - -TEST(blas_connector, zgemv_) { - typedef std::complex T; - const char transa_m = 'N'; - const char transa_n = 'T'; - const char transa_h = 'C'; - const int size_m = 3; - const int size_n = 4; - const T alpha_const = {2, 3}; - const T beta_const = {3, 4}; - const int lda = 5; - const int incx = 1; - const int incy = 1; - std::array x_const_m, x_const_c, result_m, answer_m, c_dot_m{}; - std::array x_const_n, result_n, result_c, answer_n, answer_c, - c_dot_n{}, c_dot_c{}; - std::generate(x_const_n.begin(), x_const_n.end(), []() { - return T{static_cast(std::rand() / double(RAND_MAX)), - static_cast(std::rand() / double(RAND_MAX))}; - }); - std::generate(result_n.begin(), result_n.end(), []() { - return T{static_cast(std::rand() / double(RAND_MAX)), - static_cast(std::rand() / double(RAND_MAX))}; - }); - std::generate(x_const_m.begin(), x_const_m.end(), []() { - return T{static_cast(std::rand() / double(RAND_MAX)), - static_cast(std::rand() / double(RAND_MAX))}; - }); - std::generate(result_m.begin(), result_m.end(), []() { - return T{static_cast(std::rand() / double(RAND_MAX)), - static_cast(std::rand() / double(RAND_MAX))}; - }); - std::array a_const; - std::generate(a_const.begin(), a_const.end(), []() { - return T{static_cast(std::rand() / double(RAND_MAX)), - static_cast(std::rand() / double(RAND_MAX))}; - }); - for (int i = 0; i < size_m; i++) { - for (int j = 0; j < size_n; j++) { - c_dot_m[i] += a_const[i + j * lda] * x_const_n[j]; - } - answer_m[i] = alpha_const * c_dot_m[i] + beta_const * result_m[i]; - } - zgemv_(&transa_m, &size_m, &size_n, &alpha_const, a_const.data(), &lda, - x_const_n.data(), &incx, &beta_const, result_m.data(), &incy); - - for (int j = 0; j < size_n; j++) { - for (int i = 0; i < size_m; i++) { - c_dot_n[j] += a_const[i + j * lda] * x_const_m[i]; - } - answer_n[j] = alpha_const * c_dot_n[j] + beta_const * result_n[j]; - } - zgemv_(&transa_n, &size_m, &size_n, &alpha_const, a_const.data(), &lda, - x_const_m.data(), &incx, &beta_const, result_n.data(), &incy); - - for (int j = 0; j < size_n; j++) { - for (int i = 0; i < size_m; i++) { - c_dot_c[j] += conj(a_const[i + j * lda]) * x_const_c[i]; - } - answer_c[j] = alpha_const * c_dot_c[j] + beta_const * result_c[j]; - } - zgemv_(&transa_h, &size_m, &size_n, &alpha_const, a_const.data(), &lda, - x_const_c.data(), &incx, &beta_const, result_c.data(), &incy); - - for (int i = 0; i < size_m; i++) { - EXPECT_DOUBLE_EQ(answer_m[i].real(), result_m[i].real()); - EXPECT_DOUBLE_EQ(answer_m[i].imag(), result_m[i].imag()); - } - for (int j = 0; j < size_n; j++) { - EXPECT_DOUBLE_EQ(answer_n[j].real(), result_n[j].real()); - EXPECT_DOUBLE_EQ(answer_n[j].imag(), result_n[j].imag()); - } - for (int j = 0; j < size_n; j++) { - EXPECT_DOUBLE_EQ(answer_c[j].real(), result_c[j].real()); - EXPECT_DOUBLE_EQ(answer_c[j].imag(), result_c[j].imag()); - } -} - -TEST(blas_connector, Gemv) { - typedef std::complex T; - const char transa_m = 'N'; - const char transa_n = 'T'; - const char transa_h = 'C'; - const int size_m = 3; - const int size_n = 4; - const T alpha_const = {2, 3}; - const T beta_const = {3, 4}; - const int lda = 5; - const int incx = 1; - const int incy = 1; - std::array x_const_m, x_const_c, result_m, answer_m, c_dot_m{}; - std::array x_const_n, result_n, result_c, answer_n, answer_c, - c_dot_n{}, c_dot_c{}; - std::generate(x_const_n.begin(), x_const_n.end(), []() { - return T{static_cast(std::rand() / double(RAND_MAX)), - static_cast(std::rand() / double(RAND_MAX))}; - }); - std::generate(result_n.begin(), result_n.end(), []() { - return T{static_cast(std::rand() / double(RAND_MAX)), - static_cast(std::rand() / double(RAND_MAX))}; - }); - std::generate(x_const_m.begin(), x_const_m.end(), []() { - return T{static_cast(std::rand() / double(RAND_MAX)), - static_cast(std::rand() / double(RAND_MAX))}; - }); - std::generate(result_m.begin(), result_m.end(), []() { - return T{static_cast(std::rand() / double(RAND_MAX)), - static_cast(std::rand() / double(RAND_MAX))}; - }); - std::array a_const; - std::generate(a_const.begin(), a_const.end(), []() { - return T{static_cast(std::rand() / double(RAND_MAX)), - static_cast(std::rand() / double(RAND_MAX))}; - }); - for (int i = 0; i < size_m; i++) { - for (int j = 0; j < size_n; j++) { - c_dot_m[i] += a_const[i + j * lda] * x_const_n[j]; - } - answer_m[i] = alpha_const * c_dot_m[i] + beta_const * result_m[i]; - } - BlasConnector::gemv(transa_m, size_m, size_n, alpha_const, a_const.data(), lda, - x_const_n.data(), incx, beta_const, result_m.data(), incy); - - for (int j = 0; j < size_n; j++) { - for (int i = 0; i < size_m; i++) { - c_dot_n[j] += a_const[i + j * lda] * x_const_m[i]; - } - answer_n[j] = alpha_const * c_dot_n[j] + beta_const * result_n[j]; - } - BlasConnector::gemv(transa_n, size_m, size_n, alpha_const, a_const.data(), lda, - x_const_m.data(), incx, beta_const, result_n.data(), incy); - - for (int j = 0; j < size_n; j++) { - for (int i = 0; i < size_m; i++) { - c_dot_c[j] += conj(a_const[i + j * lda]) * x_const_c[i]; - } - answer_c[j] = alpha_const * c_dot_c[j] + beta_const * result_c[j]; - } - BlasConnector::gemv(transa_h, size_m, size_n, alpha_const, a_const.data(), lda, - x_const_c.data(), incx, beta_const, result_c.data(), incy); - - for (int i = 0; i < size_m; i++) { - EXPECT_DOUBLE_EQ(answer_m[i].real(), result_m[i].real()); - EXPECT_DOUBLE_EQ(answer_m[i].imag(), result_m[i].imag()); - } - for (int j = 0; j < size_n; j++) { - EXPECT_DOUBLE_EQ(answer_n[j].real(), result_n[j].real()); - EXPECT_DOUBLE_EQ(answer_n[j].imag(), result_n[j].imag()); - } - for (int j = 0; j < size_n; j++) { - EXPECT_DOUBLE_EQ(answer_c[j].real(), result_c[j].real()); - EXPECT_DOUBLE_EQ(answer_c[j].imag(), result_c[j].imag()); - } -} - - -TEST(blas_connector, dgemm_) { - typedef double T; - const char transa_m = 'N'; - const char transb_m = 'N'; - const int size_m = 3; - const int size_n = 4; - const int size_k = 5; - const T alpha_const = 2; - const T beta_const = 3; - const int lda = 6; - const int ldb = 5; - const int ldc = 4; - std::array a_const; - std::array b_const; - std::array c_dot{}, answer, result; - std::generate(a_const.begin(), a_const.end(), - []() { return std::rand() / double(RAND_MAX); }); - std::generate(b_const.begin(), b_const.end(), - []() { return std::rand() / double(RAND_MAX); }); - std::generate(result.begin(), result.end(), - []() { return std::rand() / double(RAND_MAX); }); - for (int i = 0; i < size_m; i++) { - for (int j = 0; j < size_n; j++) { - for (int k = 0; k < size_k; k++) { - c_dot[i + j * ldc] += - a_const[i + k * lda] * b_const[k + j * ldb]; - } - answer[i + j * ldc] = alpha_const * c_dot[i + j * ldc] + - beta_const * result[i + j * ldc]; - } - } - dgemm_(&transa_m, &transb_m, &size_m, &size_n, &size_k, &alpha_const, - a_const.data(), &lda, b_const.data(), &ldb, &beta_const, - result.data(), &ldc); - - for (int i = 0; i < size_m; i++) - for (int j = 0; j < size_n; j++) { - EXPECT_DOUBLE_EQ(answer[i + j * ldc], result[i + j * ldc]); - } -} - -TEST(blas_connector, zgemm_) { - typedef std::complex T; - const char transa_m = 'N'; - const char transb_m = 'N'; - const int size_m = 3; - const int size_n = 4; - const int size_k = 5; - const T alpha_const = {2, 3}; - const T beta_const = {3, 4}; - const int lda = 6; - const int ldb = 5; - const int ldc = 4; - std::array a_const; - std::array b_const; - std::array c_dot{}, answer, result; - std::generate(a_const.begin(), a_const.end(), []() { - return T{static_cast(std::rand() / double(RAND_MAX)), - static_cast(std::rand() / double(RAND_MAX))}; - }); - std::generate(b_const.begin(), b_const.end(), []() { - return T{static_cast(std::rand() / double(RAND_MAX)), - static_cast(std::rand() / double(RAND_MAX))}; - }); - std::generate(result.begin(), result.end(), []() { - return T{static_cast(std::rand() / double(RAND_MAX)), - static_cast(std::rand() / double(RAND_MAX))}; - }); - for (int i = 0; i < size_m; i++) { - for (int j = 0; j < size_n; j++) { - for (int k = 0; k < size_k; k++) { - c_dot[i + j * ldc] += - a_const[i + k * lda] * b_const[k + j * ldb]; - } - answer[i + j * ldc] = alpha_const * c_dot[i + j * ldc] + - beta_const * result[i + j * ldc]; - } - } - zgemm_(&transa_m, &transb_m, &size_m, &size_n, &size_k, &alpha_const, - a_const.data(), &lda, b_const.data(), &ldb, &beta_const, - result.data(), &ldc); - - for (int i = 0; i < size_m; i++) - for (int j = 0; j < size_n; j++) { - EXPECT_DOUBLE_EQ(answer[i + j * ldc].real(), - result[i + j * ldc].real()); - EXPECT_DOUBLE_EQ(answer[i + j * ldc].imag(), - result[i + j * ldc].imag()); - } -} - -TEST(blas_connector, Gemm) { - typedef std::complex T; - const char transa_m = 'N'; - const char transb_m = 'N'; - const int size_m = 3; - const int size_n = 4; - const int size_k = 5; - const T alpha_const = {2, 3}; - const T beta_const = {3, 4}; - const int lda = 6; - const int ldb = 5; - const int ldc = 4; - std::array a_const; - std::array b_const; - std::array c_dot{}, answer, result; - std::generate(a_const.begin(), a_const.end(), []() { - return T{static_cast(std::rand() / double(RAND_MAX)), - static_cast(std::rand() / double(RAND_MAX))}; - }); - std::generate(b_const.begin(), b_const.end(), []() { - return T{static_cast(std::rand() / double(RAND_MAX)), - static_cast(std::rand() / double(RAND_MAX))}; - }); - std::generate(result.begin(), result.end(), []() { - return T{static_cast(std::rand() / double(RAND_MAX)), - static_cast(std::rand() / double(RAND_MAX))}; - }); - for (int i = 0; i < size_m; i++) { - for (int j = 0; j < size_n; j++) { - for (int k = 0; k < size_k; k++) { - c_dot[i + j * ldc] += - a_const[i + k * lda] * b_const[k + j * ldb]; - } - answer[i + j * ldc] = alpha_const * c_dot[i + j * ldc] + - beta_const * result[i + j * ldc]; - } - } - BlasConnector::gemm_cm(transa_m, transb_m, size_m, size_n, size_k, alpha_const, - a_const.data(), lda, b_const.data(), ldb, beta_const, - result.data(), ldc); - - for (int i = 0; i < size_m; i++) - for (int j = 0; j < size_n; j++) { - EXPECT_DOUBLE_EQ(answer[i + j * ldc].real(), - result[i + j * ldc].real()); - EXPECT_DOUBLE_EQ(answer[i + j * ldc].imag(), - result[i + j * ldc].imag()); - } -} - -#ifdef __CUDA - -TEST(blas_connector, GemmGpu) { - typedef std::complex T; - const char transa_m = 'N'; - const char transb_m = 'N'; - const int size_m = 3; - const int size_n = 4; - const int size_k = 5; - const T alpha_const = {2, 3}; - const T beta_const = {3, 4}; - const int lda = 6; - const int ldb = 5; - const int ldc = 4; - std::array a_const; - std::array b_const; - std::array c_dot{}, answer, result; - std::complex* a_gpu = nullptr; - std::complex* b_gpu = nullptr; - std::complex* result_gpu = nullptr; - resmem_zd_op()(a_gpu, size_k * lda * sizeof(std::complex)); - resmem_zd_op()(b_gpu, size_n * ldb * sizeof(std::complex)); - resmem_zd_op()(result_gpu, size_n * ldc * sizeof(std::complex)); - std::generate(a_const.begin(), a_const.end(), []() { - return T{static_cast(std::rand() / double(RAND_MAX)), - static_cast(std::rand() / double(RAND_MAX))}; - }); - std::generate(b_const.begin(), b_const.end(), []() { - return T{static_cast(std::rand() / double(RAND_MAX)), - static_cast(std::rand() / double(RAND_MAX))}; - }); - std::generate(result.begin(), result.end(), []() { - return T{static_cast(std::rand() / double(RAND_MAX)), - static_cast(std::rand() / double(RAND_MAX))}; - }); - for (int i = 0; i < size_m; i++) { - for (int j = 0; j < size_n; j++) { - for (int k = 0; k < size_k; k++) { - c_dot[i + j * ldc] += - a_const[i + k * lda] * b_const[k + j * ldb]; - } - answer[i + j * ldc] = alpha_const * c_dot[i + j * ldc] + - beta_const * result[i + j * ldc]; - } - } - syncmem_z2z_h2d_op()(a_gpu, a_const.data(), sizeof(std::complex) * size_k * lda); - syncmem_z2z_h2d_op()(b_gpu, b_const.data(), sizeof(std::complex) * size_n * ldb); - syncmem_z2z_h2d_op()(result_gpu, result.data(), sizeof(std::complex) * size_n * ldc); - BlasConnector::gemm_cm(transa_m, transb_m, size_m, size_n, size_k, alpha_const, - a_gpu, lda, b_gpu, ldb, beta_const, - result_gpu, ldc, base_device::AbacusDevice_t::GpuDevice); - syncmem_z2z_d2h_op()(result.data(), result_gpu, sizeof(std::complex) * size_n * ldc); - delmem_zd_op()(result_gpu); - delmem_zd_op()(a_gpu); - delmem_zd_op()(b_gpu); - for (int i = 0; i < size_m; i++) - for (int j = 0; j < size_n; j++) { - EXPECT_DOUBLE_EQ(answer[i + j * ldc].real(), - result[i + j * ldc].real()); - EXPECT_DOUBLE_EQ(answer[i + j * ldc].imag(), - result[i + j * ldc].imag()); - } -} - -#endif - -int main(int argc, char **argv) { -#ifdef __CUDA - std::cout << "Initializing CublasHandle..." << std::endl; - BlasUtils::createGpuBlasHandle(); - std::cout << "Initializing CublasHandle Done." << std::endl; -#endif - testing::InitGoogleTest(&argc, argv); - return RUN_ALL_TESTS(); -} diff --git a/source/module_base/test/clebsch_gordan_coeff_test.cpp b/source/module_base/test/clebsch_gordan_coeff_test.cpp deleted file mode 100644 index 888249765f..0000000000 --- a/source/module_base/test/clebsch_gordan_coeff_test.cpp +++ /dev/null @@ -1,46 +0,0 @@ -#include "../clebsch_gordan_coeff.h" - -#include - -#include "gmock/gmock.h" -#include "gtest/gtest.h" - -/************************************************ - * unit test of class Clebsch_Gordan - ***********************************************/ - -/** - * - Tested Functions: - * - clebsch_gordan - * - computes Clebsch-Gordan coefficient - * - functions: gen_rndm_r and compute_ap - */ - -TEST(ClebschGordanTest, ClebschGordanExit) -{ - int lmaxkb = -2; - ModuleBase::realArray ap; - ModuleBase::IntArray lpx; - ModuleBase::IntArray lpl; - - std::string output; - testing::internal::CaptureStdout(); - EXPECT_EXIT(ModuleBase::Clebsch_Gordan::clebsch_gordan(lmaxkb + 1, ap, lpx, lpl), ::testing::ExitedWithCode(1), ""); - output = testing::internal::GetCapturedStdout(); - EXPECT_THAT(output, testing::HasSubstr("Clebsch_Gordan: lmaxkb + 1 < 0")); -} - -TEST(ClebschGordanTest, ClebschGordan) -{ - int lmaxkb = 1; - ModuleBase::realArray ap; - ModuleBase::IntArray lpx; - ModuleBase::IntArray lpl; - - ModuleBase::Clebsch_Gordan::clebsch_gordan(lmaxkb + 1, ap, lpx, lpl); - EXPECT_DOUBLE_EQ(ap(0, 0, 0), 0.28209479177387564); - EXPECT_EQ(lpx(0, 0), 1); - EXPECT_EQ(lpx(3, 3), 3); - EXPECT_EQ(lpl(0, 0, 5), 0); - EXPECT_EQ(lpl(3, 3, 8), 0); -} \ No newline at end of file diff --git a/source/module_base/test/complexarray_test.cpp b/source/module_base/test/complexarray_test.cpp deleted file mode 100644 index 6d6eb0be30..0000000000 --- a/source/module_base/test/complexarray_test.cpp +++ /dev/null @@ -1,511 +0,0 @@ -#include"../complexarray.h" -#include"gtest/gtest.h" -#include"gmock/gmock.h" - -/************************************************ -* unit test of class ComplexArray and related functions -***********************************************/ - -/** -* - Tested functions of class ComplexArray: -* - constructor: -* - ComplexArray(const int bnd1=0, const int bnd2=1, const int bnd3=1, const int bnd4=1) -* - ComplexArray(const ComplexArray &cd) -* - ComplexArray(ComplexArray &&cd) -* - operator "=": -* - assign a complex to all elements of a ComplexArray -* - assign a ComplexArray to another ComplexArray -* - rvalue reference to a ComplexArray -* -* - operator "+": -* - one ComplexArray plus another ComplexArray that has -* the same dimension. -* - throw error when one ComplexArray plus another ComplexArray -* that has different dimension. -* -* - operator "+=": -* - one ComplexArray plus another ComplexArray, and assign the -* value to first ComplexArray -* - throw error when one ComplexArray plus another ComplexArray -* that has different dimension. -* -* - operator "-": -* - one ComplexArray minus another ComplexArray that has -* the same dimension. -* - throw error when one ComplexArray minus another ComplexArray -* that has different dimension. -* -* - operator "-=": -* - one ComplexArray minus another ComplexArray, and assign the -* value to first ComplexArray -* - throw error when one ComplexArray minus another ComplexArray -* that has different dimension. -* -* - operator "*": -* - one ComplexArray is multiplied by a double -* - one ComplexArray is multiplied by a complex -* - one ComplexArray is multiplied by another ComplexArray that has same dimension -* - throw error when one ComplexArray is miltiplied by another ComplexArray -* that has different dimension. -* -* - operator "*=": -* similar as "*" -* -* - operator "==": -* judge if two ComplexArray is equal, all element is equal. -* -* - operator "!=": -* judge if two ComplexArray is not equal -* -* - oprator "()": -* - access the element -* -* - function zero_out, negate, randomize, getBound/Size, create. -* -* Test relative functions: -* - overloading of operator "*". a double/complex multiply a Class ComplexArray. -* - functon abs2(), return the sum of squares of all elements -* - function dot() -* - function scale_accumulate() -* - function scaled_sum() -* - function point_mult() -* - function complexArrayxAlloc -* - overloading of the function scaled_sum(). Does cd3 = c1*cd1 + c2*cd2. c1 and c2 are complex numbers. -* - overloading of operator "()". The operator is effectively overload by "const". -*/ - -//compare two complex by using EXPECT_DOUBLE_EQ() -void EXPECT_COMPLEX_EQUAL(const std::complex& a,const std::complex& b) -{ - EXPECT_DOUBLE_EQ(a.real(),b.real()); - EXPECT_DOUBLE_EQ(a.imag(),b.imag()); -} - -namespace ModuleBase -{ - void complexArrayxAlloc(); -} - -class ComplexArray_test : public testing::Test -{ - protected: - ModuleBase::ComplexArray a2,a4,b2,b4,c2,c4,d2; - std::complex com1 {1.0,2.0}; - std::complex com2 {3.0,4.0}; - std::complex com3 {-2.0,-3.0}; - std::complex comzero {0.0,0.0}; - - void SetUp() - { - a2 = ModuleBase::ComplexArray(2,1,1,1); // if define this class as a matrix - b2 = ModuleBase::ComplexArray(2,1,1,1); // of 4 dimesions, - c2 = ModuleBase::ComplexArray(2,1,1,1); // is a2 +/-/* d2 allowed or not??? - d2 = ModuleBase::ComplexArray(1,2,1,1); // it does not matter, this situation will not appear in ABACUS - a4 = ModuleBase::ComplexArray(2,2,1,1); - b4 = ModuleBase::ComplexArray(2,2,1,1); - c4 = ModuleBase::ComplexArray(2,2,1,1); - } - -}; - - -TEST(ComplexArray, constructor_bnd1234_test) -{ - ModuleBase::ComplexArray a(1,2,3,4); - ASSERT_EQ(a.getSize(),24); - ASSERT_EQ(a.getBound1(),1); - ASSERT_EQ(a.getBound2(),2); - ASSERT_EQ(a.getBound3(),3); - ASSERT_EQ(a.getBound4(),4); - /* - ASSERT_DEATH(ModuleBase::ComplexArray a(0,2,3,4),""); - ASSERT_DEATH(ModuleBase::ComplexArray a(1,0,3,4),""); - ASSERT_DEATH(ModuleBase::ComplexArray a(1,2,0,4),""); - ASSERT_DEATH(ModuleBase::ComplexArray a(1,2,3,0),""); - */ -} - -TEST(ComplexArray, constructor_copy_test) -{ - ModuleBase::ComplexArray a(1,2,3,4); - ModuleBase::ComplexArray b(a); - ASSERT_EQ(b.getSize(),24); - ASSERT_EQ(b.getBound1(),1); - ASSERT_EQ(b.getBound2(),2); - ASSERT_EQ(b.getBound3(),3); - ASSERT_EQ(b.getBound4(),4); - - ASSERT_EQ(a.getSize(),24); - ASSERT_EQ(a.getBound1(),1); - ASSERT_EQ(a.getBound2(),2); - ASSERT_EQ(a.getBound3(),3); - ASSERT_EQ(a.getBound4(),4); - -} - -TEST(ComplexArray, constructor_rvalue_test) -{ - ModuleBase::ComplexArray b(std::move(ModuleBase::ComplexArray(1,2,3,4))); - ASSERT_EQ(b.getSize(),24); - ASSERT_EQ(b.getBound1(),1); - ASSERT_EQ(b.getBound2(),2); - ASSERT_EQ(b.getBound3(),3); - ASSERT_EQ(b.getBound4(),4); -} - - -TEST_F(ComplexArray_test,operator_equal_complex) -{ - a2 = com1; - for(int i = 0;i= -0.5) && (a.ptr[i].imag() >= -0.5)); - EXPECT_TRUE((a.ptr[i].real() < 0.5) && (a.ptr[i].imag() < 0.5)); - } - -} - -TEST(ComplexArray,getBoundSize) -{ - ModuleBase::ComplexArray a(1,2,3,4); - EXPECT_EQ(a.getSize(),24); - EXPECT_EQ(a.getBound1(),1); - EXPECT_EQ(a.getBound2(),2); - EXPECT_EQ(a.getBound3(),3); - EXPECT_EQ(a.getBound4(),4); -} - - -TEST_F(ComplexArray_test,create) -{ - a2.create(2,3,4,5); - EXPECT_EQ(a2.getSize(),120); -} - -TEST_F(ComplexArray_test,operator_double_multiply) -{ - a2 = com1; - c2 = 2.0 * a2 ; - for (int i = 0;i{0.0,0.0}; - a(1,0,0,0) = std::complex{1.0,1.0}; - a(0,1,0,0) = std::complex{2.0,2.0}; - a(1,1,0,0) = std::complex{3.0,3.0}; - EXPECT_DOUBLE_EQ(abs2(a),28.0); -} - -TEST(ComplexArray,dot) -{ - ModuleBase::ComplexArray a(2,2,1,1); - a(0,0,0,0) = std::complex{0.0,1.0}; - a(1,0,0,0) = std::complex{1.0,0.0}; - a(0,1,0,0) = std::complex{2.0,3.0}; - a(1,1,0,0) = std::complex{3.0,2.0}; - - ModuleBase::ComplexArray b(2,2,1,1); - b(0,0,0,0) = std::complex{1.0,0.0}; - b(1,0,0,0) = std::complex{2.0,-1.0}; - b(0,1,0,0) = std::complex{3.0,-2.0}; - b(1,1,0,0) = std::complex{4.0,-3.0}; - std::complex expectab {8.0,-32.0}; - std::complex expectba {8.0,32.0}; - EXPECT_COMPLEX_EQUAL(dot(a,b),expectab); - EXPECT_COMPLEX_EQUAL(dot(b,a),expectba); -} - -TEST_F(ComplexArray_test,scale_accumulate_double) -{ - a2 = com1; - b2 = com2; - scale_accumulate(0.3,a2,b2); - for (int i = 0;i& a,const std::complex& b) -{ - EXPECT_DOUBLE_EQ(a.real(),b.real()); - EXPECT_DOUBLE_EQ(a.imag(),b.imag()); -} - -class ComplexMatrixTest : public testing::Test -{ - protected: - ModuleBase::ComplexMatrix cm22, cm23, cm32, cm33; - std::complex comzero {0.0,0.0}; - - void SetUp() - { - cm22.create(2,2); - cm22(0,0) = std::complex{1.0,2.0}; - cm22(0,1) = std::complex{2.0,3.0}; - cm22(1,0) = std::complex{3.0,4.0}; - cm22(1,1) = std::complex{4.0,5.0}; - - cm23.create(2,3); - cm23(0,0) = std::complex{1.0,2.0}; - cm23(0,1) = std::complex{2.0,3.0}; - cm23(0,2) = std::complex{3.0,4.0}; - cm23(1,0) = std::complex{4.0,5.0}; - cm23(1,1) = std::complex{5.0,6.0}; - cm23(1,2) = std::complex{6.0,7.0}; - } -}; - -TEST(ComplexMatrix,Constructor) -{ - ModuleBase::ComplexMatrix cm; - EXPECT_EQ(cm.nr,0); - EXPECT_EQ(cm.nc,0); - EXPECT_EQ(cm.size,0); -} - -TEST(ComplexMatrix,ConstructorNrNc) -{ - ModuleBase::ComplexMatrix cm(3,4); - EXPECT_EQ(cm.nr,3); - EXPECT_EQ(cm.nc,4); - EXPECT_EQ(cm.size,12); -} - -TEST_F(ComplexMatrixTest,ConstructorCM) -{ - ModuleBase::ComplexMatrix cm1(cm22); - EXPECT_EQ(cm1.nr,cm22.nr); - EXPECT_EQ(cm1.nc,cm22.nc); - EXPECT_EQ(cm1.size,cm22.size); - for(int i=0; i{1.0,0.0}); - EXPECT_COMPLEX_EQ(cm(0,1),std::complex{2.0,0.0}); - EXPECT_COMPLEX_EQ(cm(1,0),std::complex{3.0,0.0}); - EXPECT_COMPLEX_EQ(cm(1,1),std::complex{4.0,0.0}); -} - -TEST(ComplexMatrix,Create) -{ - ModuleBase::ComplexMatrix cm; - cm.create(111,222); - EXPECT_EQ(cm.nr,111); - EXPECT_EQ(cm.nc,222); - EXPECT_EQ(cm.size,111*222); -} - -TEST_F(ComplexMatrixTest,OperatorEqual) -{ - ModuleBase::ComplexMatrix cm; - cm = cm22; - EXPECT_EQ(cm.nr,cm22.nr); - EXPECT_EQ(cm.nc,cm22.nc); - EXPECT_EQ(cm.size,cm22.size); - - for(int i=0; i com{1.0,2.0}; - cm *= com; - EXPECT_EQ(cm.nr,cm22.nr); - EXPECT_EQ(cm.nc,cm22.nc); - EXPECT_EQ(cm.size,cm22.size); - - for(int i=0; i{0.0,0.0}); - } -} - - -TEST_F(ComplexMatrixTest,SetAsIdentityMatrix) -{ - cm22.set_as_identity_matrix(); - EXPECT_COMPLEX_EQ(cm22(0,0),std::complex {1.0,0.0}); - EXPECT_COMPLEX_EQ(cm22(0,1),std::complex {0.0,0.0}); - EXPECT_COMPLEX_EQ(cm22(1,0),std::complex {0.0,0.0}); - EXPECT_COMPLEX_EQ(cm22(1,1),std::complex {1.0,0.0}); -} - -TEST(ComplexMatrix,CheckReal) -{ - ModuleBase::ComplexMatrix cm22(2,2); - cm22(0,0) = std::complex {0.0,0.0}; - cm22(0,1) = std::complex {1.0,0.0}; - cm22(1,0) = std::complex {2.0,0.0}; - cm22(1,1) = std::complex {3.0,0.0}; - EXPECT_TRUE(cm22.checkreal()); - - cm22(0,0) = std::complex {0.0,0.01}; - EXPECT_FALSE(cm22.checkreal()); -} - -TEST_F(ComplexMatrixTest,OperatorPlus) -{ - ModuleBase::ComplexMatrix cm1(cm22),cm2; - cm2 = cm1 + cm22; - EXPECT_EQ(cm2.nr,cm22.nr); - EXPECT_EQ(cm2.nc,cm22.nc); - EXPECT_EQ(cm2.size,cm22.size); - - for(int i=0; i{1.0,1.0}; - cm23(0,1)=std::complex{2.0,0.0}; - cm23(0,2)=std::complex{3.0,-1.0}; - cm23(1,0)=std::complex{4.0,-2.0}; - cm23(1,1)=std::complex{5.0,-3.0}; - cm23(1,2)=std::complex{6.0,-4.0}; - - cm32(0,0)=std::complex{-11.0,11.0}; - cm32(0,1)=std::complex{-12.0,12.0}; - cm32(1,0)=std::complex{-13.0,13.0}; - cm32(1,1)=std::complex{-14.0,14.0}; - cm32(2,0)=std::complex{-15.0,15.0}; - cm32(2,1)=std::complex{-16.0,16.0}; - - cm22 = cm23 * cm32; - EXPECT_EQ(cm22.nr,2); - EXPECT_EQ(cm22.nc,2); - EXPECT_EQ(cm22.size,4); - EXPECT_COMPLEX_EQ(cm22(0,0),std::complex{-78.0,86.0}); - EXPECT_COMPLEX_EQ(cm22(0,1),std::complex{-84.0,92.0}); - EXPECT_COMPLEX_EQ(cm22(1,0),std::complex{-78.0,320.0}); - EXPECT_COMPLEX_EQ(cm22(1,1),std::complex{-84.0,344.0}); - - cm33 = cm32 * cm23; - EXPECT_EQ(cm33.nr,3); - EXPECT_EQ(cm33.nc,3); - EXPECT_EQ(cm33.size,9); - EXPECT_COMPLEX_EQ(cm33(0,0),std::complex{-46.0,72.0 }); - EXPECT_COMPLEX_EQ(cm33(0,1),std::complex{-46.0,118.0 }); - EXPECT_COMPLEX_EQ(cm33(0,2),std::complex{-46.0,164.0 }); - EXPECT_COMPLEX_EQ(cm33(1,0),std::complex{-54.0,84.0 }); - EXPECT_COMPLEX_EQ(cm33(1,1),std::complex{-54.0,138.0 }); - EXPECT_COMPLEX_EQ(cm33(1,2),std::complex{-54.0,192.0 }); - EXPECT_COMPLEX_EQ(cm33(2,0),std::complex{-62.0,96.0 }); - EXPECT_COMPLEX_EQ(cm33(2,1),std::complex{-62.0,158.0 }); - EXPECT_COMPLEX_EQ(cm33(2,2),std::complex{-62.0,220.0 }); - - EXPECT_DEATH(cm22 * cm32,""); -} - -TEST_F(ComplexMatrixTest,OperatorMultDouble) -{ - ModuleBase::ComplexMatrix cm2,cm3; - - cm2 = cm22 * 2.0; - EXPECT_EQ(cm2.nr,cm22.nr); - EXPECT_EQ(cm2.nc,cm22.nc); - EXPECT_EQ(cm2.size,cm22.size); - for(int i=0; i com {2.0,3.0}; - - cm2 = cm22 * com; - EXPECT_EQ(cm2.nr,cm22.nr); - EXPECT_EQ(cm2.nc,cm22.nc); - EXPECT_EQ(cm2.size,cm22.size); - for(int i=0; i{5.0,7.0}); -} - -TEST_F(ComplexMatrixTest,abs2Row) -{ - EXPECT_EQ(abs2_row(cm22,0),18.0); - EXPECT_EQ(abs2_row(cm22,1),66.0); -} - -TEST_F(ComplexMatrixTest,abs2Column) -{ - EXPECT_EQ(abs2_column(cm22,0),30.0); - EXPECT_EQ(abs2_column(cm22,1),54.0); -} - -TEST_F(ComplexMatrixTest,abs2) -{ - EXPECT_EQ(abs2(cm22),84.0); -} - -TEST_F(ComplexMatrixTest,abs2arraymatrix) -{ - ModuleBase::ComplexMatrix **m; - m = new ModuleBase::ComplexMatrix*[2]; - m[0] = &cm22; - m[1] = &cm23; - EXPECT_EQ(abs2(1,m),84.0); - EXPECT_EQ(abs2(2,m),314.0); - delete [] m; -} - -TEST_F(ComplexMatrixTest,transpose) -{ - ModuleBase::ComplexMatrix m(transpose(cm22,false)); - EXPECT_COMPLEX_EQ(m(0,0),cm22(0,0)); - EXPECT_COMPLEX_EQ(m(0,1),cm22(1,0)); - EXPECT_COMPLEX_EQ(m(1,0),cm22(0,1)); - EXPECT_COMPLEX_EQ(m(1,1),cm22(1,1)); - - ModuleBase::ComplexMatrix m1(transpose(cm22,true)); - EXPECT_COMPLEX_EQ(m1(0,0),conj(cm22(0,0))); - EXPECT_COMPLEX_EQ(m1(0,1),conj(cm22(1,0))); - EXPECT_COMPLEX_EQ(m1(1,0),conj(cm22(0,1))); - EXPECT_COMPLEX_EQ(m1(1,1),conj(cm22(1,1))); -} - -TEST_F(ComplexMatrixTest,conj) -{ - ModuleBase::ComplexMatrix m = conj(cm22); - EXPECT_COMPLEX_EQ(m(0,0),std::conj(cm22(0,0))); - EXPECT_COMPLEX_EQ(m(0,1),std::conj(cm22(0,1))); - EXPECT_COMPLEX_EQ(m(1,0),std::conj(cm22(1,0))); - EXPECT_COMPLEX_EQ(m(1,1),std::conj(cm22(1,1))); -} - -TEST_F(ComplexMatrixTest,ScaleAccumulate) -{ - std::complex com1{2.0,2.0}; - ModuleBase::ComplexMatrix m(2.0*cm22),m1; - m1 = m; - ModuleBase::scale_accumulate(com1,cm22,m); - for(int i=0; i com1{2.0,2.0}; - ModuleBase::ComplexMatrix cm1(cm22),cm2(2.0*cm22),cm3(3.0*cm22),cm4(4.0*cm22); - ModuleBase::ComplexMatrix **cmout; - ModuleBase::ComplexMatrix **cmin; - cmout = new ModuleBase::ComplexMatrix*[2]; - cmin = new ModuleBase::ComplexMatrix*[2]; - - cmout[0] = &cm1; - cmout[1] = &cm2; - cmin[0] = &cm3; - cmin[1] = &cm4; - int size = cm22.size; - - ModuleBase::scale_accumulate(2,com1,cmin,cmout); - - for(int i=0; i com1{2.0,2.0},com2{-1.0,-2.0}; - ModuleBase::ComplexMatrix cm1(1.1*cm22),cm2(2.5*cm22),cmout(2,2); - - ModuleBase::scaled_sum(com1,cm1,com2,cm2,cmout); - for(int i=0; i com1{2.0,2.0},com2{-1.0,-2.0}; - ModuleBase::ComplexMatrix cm1(cm22),cm2(2.0*cm22),cm3(3.0*cm22),cm4(4.0*cm22); - ModuleBase::ComplexMatrix cm5(2,2),cm6(2,2); - ModuleBase::ComplexMatrix **cmout; - ModuleBase::ComplexMatrix **cmin1; - ModuleBase::ComplexMatrix **cmin2; - cmout = new ModuleBase::ComplexMatrix*[2]; - cmin1 = new ModuleBase::ComplexMatrix*[2]; - cmin2 = new ModuleBase::ComplexMatrix*[2]; - - cmin1[0] = &cm1; - cmin1[1] = &cm2; - cmin2[0] = &cm3; - cmin2[1] = &cm4; - cmout[0] = &cm5; - cmout[1] = &cm6; - - int size = cm22.size; - - ModuleBase::scaled_sum(2,com1,cmin1,com2,cmin2,cmout); - - for(int i=0; ithreshold_abs && std::imag(data)) <= threshold_imag - ofs.open("printtest2.log"); - cm22.print(ofs,1e-10,2); - ofs.close(); - ifs.open("printtest2.log"); - getline(ifs,output); - EXPECT_THAT(output,testing::HasSubstr("1\t(2,3)\t")); - getline(ifs,output); - EXPECT_THAT(output,testing::HasSubstr("(3,4)\t(4,5)\t")); - ifs.close(); - remove("printtest2.log"); -// The condition of std::abs(data) threshold_imag - ofs.open("printtest3.log"); - cm22.print(ofs,3,1e-10); - ofs.close(); - ifs.open("printtest3.log"); - getline(ifs,output); - EXPECT_THAT(output,testing::HasSubstr("0\t(2,3)\t")); - getline(ifs,output); - EXPECT_THAT(output,testing::HasSubstr("(3,4)\t(4,5)\t")); - ifs.close(); - remove("printtest3.log"); -} diff --git a/source/module_base/test/container_operator_test.cpp b/source/module_base/test/container_operator_test.cpp deleted file mode 100644 index cae4fefad1..0000000000 --- a/source/module_base/test/container_operator_test.cpp +++ /dev/null @@ -1,129 +0,0 @@ -#include "../container_operator.h" -#include "gtest/gtest.h" -#include - -/************************************************ - * unit test of container operator - ***********************************************/ - -/** - * - Tested Functions: - * - VectorPlus - * - "+" operator for vectors - * - VectorMinus - * - "-" operator for vectors - * - VectorMultiply - * - "*" operator for scalar*vector - * - MapPlus - * - "+" operator for maps - * - MapMinus - * - "-" operator for maps - * - MapMultiply - * - "*" operator for scalar*map - */ - -TEST(ContainerOperator,VectorPlus) -{ - std::vector a(20,10.0); - std::vector b(20,1.0); - std::vector c(20); - c = a+b; - for (int i=0;i a(20,10.0); - std::vector b(20,1.0); - std::vector c(20); - c = a-b; - for (int i=0;i a(20,10.0); - double b = 2.0; - std::vector c(20); - c = b*a; - for (int i=0;i a(20,10.0); - std::vector b(19,1.0); - std::vector c(20); - EXPECT_DEATH(c=a+b,""); - EXPECT_DEATH(c=a-b,""); -} - -TEST(ContainerOperator,MapLengthCheck) -{ - std::map a; - std::map b; - std::map c; - for (int i=0;i<10;i++) - { - a.insert(std::pair (i, i*2.0)); - if (i<9) b.insert(std::pair (i, i*3.0)); - } - EXPECT_DEATH(c=a+b,""); - EXPECT_DEATH(c=a-b,""); -} - -TEST(ContainerOperator,MapPlus) -{ - std::map a; - std::map b; - std::map c; - for (int i=0;i<10;i++) - { - a.insert(std::pair (i, i*2.0)); - b.insert(std::pair (i, i*3.0)); - } - c = a+b; - for (int i=0;i<10;i++) - { - //std::cout << c[i] << std::endl; - EXPECT_EQ(c[i],i*5.0); - } -} - -TEST(ContainerOperator,MapMinus) -{ - std::map a; - std::map b; - std::map c; - for (int i=0;i<10;i++) - { - a.insert(std::pair (i, i*4.0)); - b.insert(std::pair (i, i*2.0)); - } - c = a-b; - for (int i=0;i<10;i++) - { - //std::cout << c[i] << std::endl; - EXPECT_EQ(c[i],i*2.0); - } -} - -TEST(ContainerOperator,MapMultiply) -{ - std::map a; - double b = 3.0; - std::map c; - for (int i=0;i<10;i++) - { - a.insert(std::pair (i, i*4.0)); - } - c = b*a; - for (int i=0;i<10;i++) - { - //std::cout << c[i] << std::endl; - EXPECT_EQ(c[i],i*4.0*3.0); - } -} diff --git a/source/module_base/test/cubic_spline_test.cpp b/source/module_base/test/cubic_spline_test.cpp deleted file mode 100644 index b28f53ce14..0000000000 --- a/source/module_base/test/cubic_spline_test.cpp +++ /dev/null @@ -1,459 +0,0 @@ -#include "module_base/cubic_spline.h" - -#include -#include -#include -#include -#include - -#include "gtest/gtest.h" - -using ModuleBase::CubicSpline; -using BoundaryCondition = CubicSpline::BoundaryCondition; -using BoundaryType = CubicSpline::BoundaryType; - -/** - * @brief Unit test of class CubicSpline - * - * Tested functions include: - * - * - build - * Constructs a cubic spline interpolant from - * a set of data points and boundary conditions. - * - * - eval - * Evaluates a single interpolant at multiple places. - * - * - add - * Adds an interpolant that shares the same knots. - * - * - multi_eval - * Evaluates multiple interpolants at a single place. - * - * - reserve - * Reserves memory for multiple interpolants. - * - * - heap_usage - * Returns the heap usage of the object. - * - * - xmin, xmax - * Returns the first and last knots. - * - */ -class CubicSplineTest : public ::testing::Test -{ -protected: - - CubicSplineTest(); - ~CubicSplineTest() = default; - - /// maximum number of knots - int n_max_; - - /// buffer for a cubic spline (x_, y_ & dy_) - std::vector spline_; - - /// knots (x-coordinates of data points) - double* x_; - - /// values at knots (y-coordinates of data points) - double* y_; - - /// derivatives at knots (computed when building a cubic spline) - double* dy_; - - /// maximum number of places to evaluate an interpolant - int n_interp_max_; - - /// buffer for interpolant evaluation - std::vector interp_; - - /// places to evaluate an interpolant - double* x_interp_; - - /// values and derivatives of the interpolant at x_interp_ - double* y_interp_; - double* dy_interp_; - double* d2y_interp_; - - /// reference values and derivatives - double* y_ref_; - double* dy_ref_; - double* d2y_ref_; - - /// y/dy/d2y tolerance for cross-check - const double tol_[3] = {1e-14, 1e-13, 1e-12}; - - - /** - * @brief Sample functions & derivatives in error bound check. - * - * @note Functions with vanishing 4-th derivative in an interval - * should in principle be interpolated exactly by a cubic spline. - * However, the presence of floating-point rounding errors would - * lead to some discrepancy between the interpolant and the original - * function. Such error is not covered by the error bound formula. - * Functions here should not include those kind of functions. - * - */ - std::vector>> f_; - - /// theoretical error bound for complete cubic spline - double error_bound( - int n, - const double* x, - const std::function& f, - int d = 0 - ) const; - - /// - void read( - const std::string& fname, - int& n, - double* x, - double* y, - BoundaryCondition& bc_start, - BoundaryCondition& bc_end, - int& n_interp, - double* x_interp, - double* y_interp, - double* dy_interp, - double* d2y_interp - ) const; -}; - - -CubicSplineTest::CubicSplineTest(): - n_max_(1000), - spline_(3 * n_max_), - x_(spline_.data()), - y_(x_ + n_max_), - dy_(y_ + n_max_), - n_interp_max_(1000), - interp_(7 * n_interp_max_), - x_interp_(interp_.data()), - y_interp_(x_interp_ + n_interp_max_), - dy_interp_(y_interp_ + n_interp_max_), - d2y_interp_(dy_interp_ + n_interp_max_), - y_ref_(d2y_interp_ + n_interp_max_), - dy_ref_(y_ref_ + n_interp_max_), - d2y_ref_(dy_ref_ + n_interp_max_), - f_{ - { - [](double x) { return std::sin(x); }, - [](double x) { return std::cos(x); }, - [](double x) { return -std::sin(x); }, - [](double x) { return -std::cos(x); }, - [](double x) { return std::sin(x); }, - }, - { - [](double x) { return std::exp(-x); }, - [](double x) { return -std::exp(-x); }, - [](double x) { return std::exp(-x); }, - [](double x) { return -std::exp(-x); }, - [](double x) { return std::exp(-x); }, - }, - { - [](double x) { return std::log(x); }, - [](double x) { return 1.0 / x; }, - [](double x) { return -1.0 / (x * x); }, - [](double x) { return 2.0 / (x * x * x); }, - [](double x) { return -6.0 / (x * x * x * x); }, - }, - } -{} - - -double CubicSplineTest::error_bound( - int n, - const double* x, - const std::function& d4f, - int d -) const -{ - std::vector buffer(n); - - std::adjacent_difference(x, x + n, buffer.begin()); - double max_dx = *std::max_element(buffer.begin() + 1, buffer.end()); - - auto d4f_abs = [&d4f](double x) { return std::abs(d4f(x)); }; - std::transform(x, x + n, buffer.begin(), d4f_abs); - double max_d4f = *std::max_element(buffer.begin(), buffer.end()); - - // See Carl de Boor, "A Practical Guide to Splines", Chapter V. - switch (d) - { - case 0: - return 5.0 / 384.0 * std::pow(max_dx, 4) * max_d4f; - case 1: - return 1.0 / 24.0 * std::pow(max_dx, 3) * max_d4f; - case 2: - return 3.0 / 8.0 * std::pow(max_dx, 2) * max_d4f; - default: - assert(false); // should not reach here - } -} - - -void CubicSplineTest::read( - const std::string& fname, - int& n, - double* x, - double* y, - BoundaryCondition& bc_start, - BoundaryCondition& bc_end, - int& n_interp, - double* x_interp, - double* y_interp, - double* dy_interp, - double* d2y_interp -) const -{ - std::ifstream ifs(fname); - assert(ifs.is_open()); - - std::string line, bc1, bc2; - - // read boundary conditions - std::getline(ifs, line); - std::stringstream ss(line); - ss >> bc1 >> bc2; - - auto bc_parse = [](const std::string& bc) - { - if (bc == "periodic") - { - return BoundaryCondition(BoundaryType::periodic); - } - if (bc == "not-a-knot") - { - return BoundaryCondition(BoundaryType::not_a_knot); - } - if (bc.find("first_deriv") != std::string::npos) - { - return BoundaryCondition(BoundaryType::first_deriv, - std::stod(bc.substr(12, std::string::npos))); - } - if (bc.find("second_deriv") != std::string::npos) - { - return BoundaryCondition(BoundaryType::second_deriv, - std::stod(bc.substr(13, std::string::npos))); - } - else - { - assert(false); - } - }; - - bc_start = bc_parse(bc1); - bc_end = bc_parse(bc2); - - double* data[6] = {x, y, x_interp, y_interp, dy_interp, d2y_interp}; - for (int i = 0; i < 6; ++i) - { - std::getline(ifs, line); - std::stringstream ss(line); - data[i] = std::copy(std::istream_iterator(ss), - std::istream_iterator(), data[i]); - } - n = data[0] - x; - n_interp = data[2] - x_interp; -} - - -TEST_F(CubicSplineTest, MultiEval) -{ - int n = 100; - double xmin = 0.1; - double xmax = 10; - double dx = (xmax - xmin) / (n - 1); - - std::for_each(x_, x_ + n, [&](double& x) { x = xmin + (&x - x_) * dx; }); - - // empty interpolant with specified knots - CubicSpline cubspl(n, xmin, dx); - cubspl.reserve(f_.size()); - - for (size_t i = 0; i < f_.size(); ++i) - { - std::transform(x_, x_ + n, y_, [this, i](double x) { return f_[i][0](x); }); - cubspl.add(y_, {BoundaryType::first_deriv, f_[i][1](xmin)}, - {BoundaryType::first_deriv, f_[i][1](xmax)}); - } - - EXPECT_EQ(cubspl.n_spline(), f_.size()); - - std::vector> err_bound(f_.size(), std::vector(3)); - for (size_t i = 0; i < f_.size(); ++i) - { - err_bound[i][0] = error_bound(n, x_, f_[i][4], 0); - err_bound[i][1] = error_bound(n, x_, f_[i][4], 1); - err_bound[i][2] = error_bound(n, x_, f_[i][4], 2); - } - - int n_interp = 1000; - double dx_interp = (xmax - xmin) / (n_interp - 1); - std::for_each(x_interp_, x_interp_ + n_interp, - [&](double& x) { x = (&x - x_interp_) * dx_interp + xmin; }); - - for (int p = 0; p < n_interp; ++p) - { - cubspl.multi_eval(x_interp_[p], y_interp_, dy_interp_, d2y_interp_); - double ytmp, dytmp, d2ytmp; - for (size_t i = 0; i < f_.size(); ++i) - { - EXPECT_LT(std::abs(y_interp_[i] - f_[i][0](x_interp_[p])), err_bound[i][0]); - EXPECT_LT(std::abs(dy_interp_[i] - f_[i][1](x_interp_[p])), err_bound[i][1]); - EXPECT_LT(std::abs(d2y_interp_[i] - f_[i][2](x_interp_[p])), err_bound[i][2]); - - cubspl.eval(1, &x_interp_[p], &ytmp, &dytmp, &d2ytmp, i); - EXPECT_NEAR(ytmp, y_interp_[i], tol_[0]); - EXPECT_NEAR(dytmp, dy_interp_[i], tol_[1]); - EXPECT_NEAR(d2ytmp, d2y_interp_[i], tol_[2]); - } - } -} - - -TEST_F(CubicSplineTest, ErrorBound) -{ - // Error bound formula used in this test correspond to the complete cubic - // spline interpolant (exact first_deriv boundary conditions at both ends). - // This does not apply to other types of boundary conditions. - - // knots (logspace) - int n = 100; - double xmin = 0.1; - double xmax = 10; - - double rho0 = std::log(xmin); - double drho = (std::log(xmax) - rho0) / (n - 1); - std::for_each(x_, x_ + n, [&](double& x) { x = std::exp(rho0 + (&x - x_) * drho); }); - - // places to evaluate the interpolant - int n_interp = 777; - double dx_interp = (xmax - xmin) / (n_interp - 1); - std::for_each(x_interp_, x_interp_ + n_interp, - [&](double& x) { x = (&x - x_interp_) * dx_interp + xmin; }); - - // make sure x_interp is inside the range of x - x_interp_[0] += tol_[0]; - x_interp_[n_interp - 1] -= tol_[0]; - - for (size_t i = 0; i < f_.size(); ++i) - { - std::transform(x_, x_ + n, y_, f_[i][0]); - - // complete cubic spline (exact first_deriv boundary conditions at both ends) - CubicSpline::build( - n, x_, y_, - {BoundaryType::first_deriv, f_[i][1](x_[0])}, - {BoundaryType::first_deriv, f_[i][1](x_[n - 1])}, - dy_ - ); - - CubicSpline::eval( - n, x_, y_, dy_, - n_interp, x_interp_, y_interp_, dy_interp_, d2y_interp_ - ); - - double* diff[3] = {y_interp_, dy_interp_, d2y_interp_}; - for (int d = 0; d < 3; ++d) - { - std::transform(x_interp_, x_interp_ + n_interp, diff[d], diff[d], - [&](double x, double y) { return std::abs(y - f_[i][d](x)); }); - - double err_bound = error_bound(n, x_, f_[i][4], d); - EXPECT_TRUE(std::all_of(diff[d], diff[d] + n_interp, - [err_bound](double diff) { return diff < err_bound; })); - } - } -} - - -TEST_F(CubicSplineTest, Reserve) -{ - int n_spline = 20; - int n = 1000; - double x0 = 0.0, dx = 0.01; - for (int i = 0; i < n; ++i) - { - x_[i] = x0 + i * dx; - y_[i] = std::sin(x_[i]); - } - - CubicSpline cubspl(n, x0, dx, y_); - cubspl.reserve(n_spline); - EXPECT_EQ(cubspl.heap_usage(), n_spline * 2 * n * sizeof(double)); - - cubspl = CubicSpline(n, x_, y_); - cubspl.reserve(n_spline); - EXPECT_EQ(cubspl.heap_usage(), (1 + n_spline * 2) * n * sizeof(double)); -} - - -TEST_F(CubicSplineTest, MinMax) -{ - int n = 1000; - double x0 = 0.0, dx = 0.01; - for (int i = 0; i < n; ++i) - { - x_[i] = x0 + i * dx; - y_[i] = std::sin(x_[i]); - } - - CubicSpline cubspl(n, x_, y_); - EXPECT_EQ(cubspl.xmin(), x_[0]); - EXPECT_EQ(cubspl.xmax(), x_[n - 1]); - - int m = 300; - cubspl = CubicSpline(m, x0, dx, y_); - EXPECT_EQ(cubspl.xmin(), x0); - EXPECT_EQ(cubspl.xmax(), x0 + (m - 1) * dx); - -} - - -TEST_F(CubicSplineTest, CrossCheck) -{ - std::vector fnames = { - "./data/sin_not_a_knot.dat", - "./data/cos_periodic.dat", - "./data/exp_first_deriv.dat", - "./data/log_second_deriv.dat", - "./data/sqrt_mix_bc.dat", - "./data/two_points_periodic.dat", - "./data/two_points_first_deriv.dat", - "./data/two_points_second_deriv.dat", - "./data/three_points_not_a_knot.dat", - }; - - int n = 0, n_interp = 0; - BoundaryCondition bc_start, bc_end; - - for (const auto& fname : fnames) - { - read(fname, n, x_, y_, bc_start, bc_end, - n_interp, x_interp_, y_ref_, dy_ref_, d2y_ref_); - CubicSpline cubspl(n, x_, y_, bc_start, bc_end); - cubspl.eval(n_interp, x_interp_, y_interp_, dy_interp_, d2y_interp_); - - double* diff[] = {y_interp_, dy_interp_, d2y_interp_}; - double* ref[] = {y_ref_, dy_ref_, d2y_ref_}; - for (int d = 0; d < 3; ++d) - { - std::transform(diff[d], diff[d] + n_interp, ref[d], diff[d], std::minus()); - EXPECT_TRUE(std::all_of(diff[d], diff[d] + n_interp, - [this, d](double diff) { return std::abs(diff) < tol_[d]; })); - } - } -} - - -int main() -{ - ::testing::InitGoogleTest(); - return RUN_ALL_TESTS(); -} - - diff --git a/source/module_base/test/data/bjo.bin b/source/module_base/test/data/bjo.bin deleted file mode 100644 index 39c137c618..0000000000 Binary files a/source/module_base/test/data/bjo.bin and /dev/null differ diff --git a/source/module_base/test/data/bjxo.bin b/source/module_base/test/data/bjxo.bin deleted file mode 100644 index 0a93b2997f..0000000000 Binary files a/source/module_base/test/data/bjxo.bin and /dev/null differ diff --git a/source/module_base/test/data/cos_periodic.dat b/source/module_base/test/data/cos_periodic.dat deleted file mode 100644 index 2d0ae6b062..0000000000 --- a/source/module_base/test/data/cos_periodic.dat +++ /dev/null @@ -1,7 +0,0 @@ -periodic periodic - 0.00000000000000000e+00 1.00000000000000006e-01 1.00000000000000000e+00 1.50000000000000000e+00 3.00000000000000000e+00 6.28318530717958623e+00 - 1.00000000000000000e+00 9.95004165278025821e-01 5.40302305868139765e-01 7.07372016677029064e-02 -9.89992496600445415e-01 1.00000000000000000e+00 - 0.00000000000000000e+00 1.74532925199432948e-01 3.49065850398865896e-01 5.23598775598298816e-01 6.98131700797731791e-01 8.72664625997164767e-01 1.04719755119659763e+00 1.22173047639603061e+00 1.39626340159546358e+00 1.57079632679489656e+00 1.74532925199432953e+00 1.91986217719376251e+00 2.09439510239319526e+00 2.26892802759262846e+00 2.44346095279206121e+00 2.61799387799149441e+00 2.79252680319092716e+00 2.96705972839035992e+00 3.14159265358979312e+00 3.31612557878922587e+00 3.49065850398865907e+00 3.66519142918809182e+00 3.83972435438752502e+00 4.01425727958695777e+00 4.18879020478639053e+00 4.36332312998582328e+00 4.53785605518525692e+00 4.71238898038468967e+00 4.88692190558412243e+00 5.06145483078355518e+00 5.23598775598298882e+00 5.41052068118242158e+00 5.58505360638185433e+00 5.75958653158128708e+00 5.93411945678071984e+00 6.10865238198015348e+00 6.28318530717958623e+00 - 1.00000000000000000e+00 9.84381299886306516e-01 9.38016522020507670e-01 8.63713424115361450e-01 7.64165387715657451e-01 6.42065794366185383e-01 5.00118352188328785e-01 3.42056178626561569e-01 1.73503016854116870e-01 2.70592234453568648e-04 -1.72386293431320586e-01 -3.39925662651143046e-01 -4.97852121855354546e-01 -6.41670277474296391e-01 -7.66884735938309081e-01 -8.69000103677733948e-01 -9.43520987122911547e-01 -9.85951992704182878e-01 -9.92542393974230608e-01 -9.64850207988183883e-01 -9.06738697819773454e-01 -8.22080502627916765e-01 -7.14748261571530152e-01 -5.88614613809530951e-01 -4.47552198500836496e-01 -2.95433654804362900e-01 -1.36131621879026887e-01 2.64812611162533740e-02 1.88532355022561493e-01 3.46149020680980524e-01 4.95458618932594463e-01 6.32588510618484978e-01 7.53666056579735066e-01 8.54818617657429058e-01 9.32173554692648398e-01 9.81858228526478083e-01 1.00000000000000000e+00 - 6.18473891098361445e-03 -1.80469237892337431e-01 -3.48259990143118536e-01 -5.00618802880412384e-01 -6.37545676104219083e-01 -7.59040609814538803e-01 -8.64447219749984619e-01 -9.41247940672875094e-01 -9.84665089228650259e-01 -9.95326120656199964e-01 -9.78883265201603403e-01 -9.36683701867835450e-01 -8.68727430654895882e-01 -7.75014451562784812e-01 -6.55544764591502682e-01 -5.10318369741048716e-01 -3.39335267011423580e-01 -1.42595456402626830e-01 6.41233977052624166e-02 2.49507580803381257e-01 4.12703175963197166e-01 5.53710183184709215e-01 6.72528602467918124e-01 7.69158433812823450e-01 8.43599677219425303e-01 8.95852332687724018e-01 9.25916400217719260e-01 9.33791879809410919e-01 9.19478771462799216e-01 8.82977075177883819e-01 8.24286790954665616e-01 7.43407918793143718e-01 6.40340458693318570e-01 5.15084410655190172e-01 3.67639774678758080e-01 1.98006550764022293e-01 6.18473891098361445e-03 --1.16262364588415146e+00 -1.00557944472069671e+00 -9.17160944338298312e-01 -8.28742443955899910e-01 -7.40323943573501397e-01 -6.51905443191102996e-01 -5.35672607329632511e-01 -3.44398827159106469e-01 -1.53125046988580316e-01 2.04230892878108500e-02 1.67998154850598658e-01 3.15573220413386479e-01 4.63148285976174190e-01 6.10723351538962067e-01 7.58298417101749722e-01 9.05873482664537821e-01 1.05344854822732525e+00 1.20102361379011291e+00 1.12573875011125457e+00 9.98607505889287705e-01 8.71476261667320506e-01 7.44345017445353752e-01 6.17213773223386442e-01 4.90082529001419687e-01 3.62951284779452932e-01 2.35820040557485955e-01 1.08688796335518534e-01 -1.84424478864484431e-02 -1.45573692108415198e-01 -2.72704936330382175e-01 -3.99836180552349374e-01 -5.26967424774316351e-01 -6.54098668996283328e-01 -7.81229913218249861e-01 -9.08361157440217282e-01 -1.03549240166218426e+00 -1.16262364588415146e+00 diff --git a/source/module_base/test/data/exp_first_deriv.dat b/source/module_base/test/data/exp_first_deriv.dat deleted file mode 100644 index e5144b72b0..0000000000 --- a/source/module_base/test/data/exp_first_deriv.dat +++ /dev/null @@ -1,7 +0,0 @@ -first_deriv:1.10517091807564771e+00 first_deriv:2.71828182845904509e+00 - 1.00000000000000006e-01 1.29154966501488389e-01 1.66810053720005874e-01 2.15443469003188337e-01 2.78255940220712428e-01 3.59381366380462752e-01 4.64158883361277863e-01 5.99484250318940926e-01 7.74263682681126997e-01 1.00000000000000000e+00 - 1.10517091807564771e+00 1.13786644168535322e+00 1.18152981679905356e+00 1.24041185922219421e+00 1.32082420599103290e+00 1.43244298301307027e+00 1.59067568226275657e+00 1.82117928549843455e+00 2.16899447087117636e+00 2.71828182845904509e+00 - 1.00000000000000006e-01 1.25000000000000000e-01 1.50000000000000022e-01 1.75000000000000017e-01 2.00000000000000011e-01 2.25000000000000006e-01 2.50000000000000000e-01 2.75000000000000022e-01 3.00000000000000044e-01 3.25000000000000011e-01 3.49999999999999978e-01 3.75000000000000000e-01 4.00000000000000022e-01 4.25000000000000044e-01 4.50000000000000067e-01 4.74999999999999978e-01 5.00000000000000000e-01 5.25000000000000022e-01 5.50000000000000044e-01 5.75000000000000067e-01 5.99999999999999978e-01 6.25000000000000000e-01 6.50000000000000022e-01 6.75000000000000044e-01 7.00000000000000067e-01 7.24999999999999978e-01 7.50000000000000000e-01 7.75000000000000022e-01 8.00000000000000044e-01 8.25000000000000067e-01 8.49999999999999978e-01 8.75000000000000000e-01 9.00000000000000022e-01 9.25000000000000044e-01 9.50000000000000067e-01 9.74999999999999978e-01 1.00000000000000000e+00 - 1.10517091807564771e+00 1.13314845305620615e+00 1.16183423781052575e+00 1.19124621006218145e+00 1.22140274895196677e+00 1.25232269983173161e+00 1.28402537693915098e+00 1.31653067826587877e+00 1.34985870568413047e+00 1.38403052288246253e+00 1.41906754700129101e+00 1.45499127838897557e+00 1.49182434073154035e+00 1.52959016783122848e+00 1.56831221140395694e+00 1.60801396407294228e+00 1.64872023299870918e+00 1.69045738865219253e+00 1.73325189263525137e+00 1.77713020654974518e+00 1.82211879200369298e+00 1.86824485646834759e+00 1.91553841190619289e+00 1.96403012931547272e+00 2.01375067969443089e+00 2.06473073404130947e+00 2.11700096335435450e+00 2.17059203866204742e+00 2.22553592214226725e+00 2.28186930422749290e+00 2.33962995740218638e+00 2.39885565415081015e+00 2.45958416695782534e+00 2.52185326830769485e+00 2.58570073068487982e+00 2.65116432657384271e+00 2.71828182845904465e+00 - 1.10517091807564771e+00 1.13314857626511545e+00 1.16183448755634799e+00 1.19124518701385762e+00 1.22140376069562406e+00 1.25232046400808739e+00 1.28402663663421768e+00 1.31653040155273815e+00 1.34985411865053440e+00 1.38403404177963485e+00 1.41907067229022621e+00 1.45497988810568324e+00 1.49182144407227635e+00 1.52960106867554990e+00 1.56831876191550346e+00 1.60798584383446830e+00 1.64869208090593933e+00 1.69045678205178129e+00 1.73327994727199441e+00 1.77716157656657869e+00 1.82210170576561081e+00 1.86818792472837214e+00 1.91550098362087740e+00 1.96404088244312680e+00 2.01380762119512058e+00 2.06480119987685740e+00 2.11702161848833859e+00 2.17046900023482614e+00 2.22529349474582894e+00 2.28162888863530977e+00 2.33947518190326731e+00 2.39883237454970333e+00 2.45970046657461650e+00 2.52207945797800726e+00 2.58596934875987605e+00 2.65137013892022200e+00 2.71828182845904553e+00 - 1.10510282004738825e+00 1.13310983511001884e+00 1.16189187653084680e+00 1.19124256407428741e+00 1.22144333046701914e+00 1.25229505919741335e+00 1.28419875089301683e+00 1.31610244258862052e+00 1.35006277753420334e+00 1.38433107279383738e+00 1.41859936805347142e+00 1.45490086593012635e+00 1.49242361139733326e+00 1.52994635686453995e+00 1.56746910233174686e+00 1.60708020137141450e+00 1.64941876434625834e+00 1.69175732732110240e+00 1.73409589029594624e+00 1.77643445327079030e+00 1.81891195991557297e+00 1.86798555710533210e+00 1.91705915429509122e+00 1.96613275148485056e+00 2.01520634867460968e+00 2.06427994586436858e+00 2.11335354305412793e+00 2.16276179287056580e+00 2.22319776800966951e+00 2.28363374314877277e+00 2.34406971828787603e+00 2.40450569342697928e+00 2.46494166856608299e+00 2.52537764370518625e+00 2.58581361884428951e+00 2.64624959398339277e+00 2.70668556912249603e+00 diff --git a/source/module_base/test/data/gen_ref.py b/source/module_base/test/data/gen_ref.py deleted file mode 100644 index abc1969657..0000000000 --- a/source/module_base/test/data/gen_ref.py +++ /dev/null @@ -1,64 +0,0 @@ -''' -This script generates reference data for the cross-check in cubic_spline_test.cpp. -To add more tests, append a new Case object to the cases list. - -''' -import numpy as np -from scipy.interpolate import CubicSpline - -class Case: - def __init__(self, f, x, bc, fname): - self.x = x - self.y = f(x) - self.bc = bc - self.fname = fname - if bc == 'periodic': - self.y[-1] = self.y[0] - -cases = [ - Case(np.sin, np.logspace(-1, 0, 10), 'not-a-knot', - 'sin_not_a_knot.dat'), - Case(np.cos, [0, 0.1, 1, 1.5, 3, 2*np.pi], 'periodic', - 'cos_periodic.dat'), - Case(np.exp, np.logspace(-1, 0, 10), ((1, np.exp(0.1)), (1, np.exp(1))), - 'exp_first_deriv.dat'), - Case(np.log, np.logspace(0, 1, 10), ((2, -1), (2, -0.01)), - 'log_second_deriv.dat'), - Case(np.sqrt, np.logspace(0, 1, 10), ((1, 0.5), 'not-a-knot'), - 'sqrt_mix_bc.dat'), - Case(lambda x: np.ones_like(x), [0, 1], 'periodic', - 'two_points_periodic.dat'), - Case(np.arccos, [0, 0.5], ((1, -1), (1, -2/np.sqrt(3))), - 'two_points_first_deriv.dat'), - Case(np.sqrt, [1, 4], ((2, 0.5), (2, 0.25)), - 'two_points_second_deriv.dat'), - Case(np.sin, [0, 0.3, 1], 'not-a-knot', - 'three_points_not_a_knot.dat'), -] - -n_interp = 37 - -for case in cases: - cubspl = CubicSpline(case.x, case.y, bc_type=case.bc) - x_interp = np.linspace(case.x[0], case.x[-1], n_interp) - y_interp = cubspl(x_interp) - dy_interp = cubspl(x_interp, 1) - d2y_interp = cubspl(x_interp, 2) - - with open(case.fname, 'w') as f: - if case.bc == 'periodic' or case.bc == 'not-a-knot': - f.write('{bc} {bc}\n'.format(bc=case.bc)) - else: - for b in case.bc: - if b == 'not-a-knot': - f.write('not-a-knot ') - else: - tag = 'first_deriv' if b[0] == 1 else 'second_deriv' - f.write('{tag}:{val:<24.17e} '.format(tag=tag, val=b[1])) - f.write('\n') - - for data in [case.x, case.y, x_interp, y_interp, dy_interp, d2y_interp]: - for elem in data: - f.write('% 24.17e '%(elem)) - f.write('\n') - diff --git a/source/module_base/test/data/log_second_deriv.dat b/source/module_base/test/data/log_second_deriv.dat deleted file mode 100644 index 62060d5f77..0000000000 --- a/source/module_base/test/data/log_second_deriv.dat +++ /dev/null @@ -1,7 +0,0 @@ -second_deriv:-1.00000000000000000e+00 second_deriv:-1.00000000000000002e-02 - 1.00000000000000000e+00 1.29154966501488389e+00 1.66810053720005880e+00 2.15443469003188381e+00 2.78255940220712450e+00 3.59381366380462763e+00 4.64158883361277841e+00 5.99484250318940859e+00 7.74263682681126930e+00 1.00000000000000000e+01 - 0.00000000000000000e+00 2.55842788110449526e-01 5.11685576220899052e-01 7.67528364331348634e-01 1.02337115244179810e+00 1.27921394055224780e+00 1.53505672866269705e+00 1.79089951677314629e+00 2.04674230488359621e+00 2.30258509299404590e+00 - 1.00000000000000000e+00 1.25000000000000000e+00 1.50000000000000000e+00 1.75000000000000000e+00 2.00000000000000000e+00 2.25000000000000000e+00 2.50000000000000000e+00 2.75000000000000000e+00 3.00000000000000000e+00 3.25000000000000000e+00 3.50000000000000000e+00 3.75000000000000000e+00 4.00000000000000000e+00 4.25000000000000000e+00 4.50000000000000000e+00 4.75000000000000000e+00 5.00000000000000000e+00 5.25000000000000000e+00 5.50000000000000000e+00 5.75000000000000000e+00 6.00000000000000000e+00 6.25000000000000000e+00 6.50000000000000000e+00 6.75000000000000000e+00 7.00000000000000000e+00 7.25000000000000000e+00 7.50000000000000000e+00 7.75000000000000000e+00 8.00000000000000000e+00 8.25000000000000000e+00 8.50000000000000000e+00 8.75000000000000000e+00 9.00000000000000000e+00 9.25000000000000000e+00 9.50000000000000000e+00 9.75000000000000000e+00 1.00000000000000000e+01 - 0.00000000000000000e+00 2.23201685990528503e-01 4.05482161721055334e-01 5.59647381157334922e-01 6.93212288502453533e-01 8.10938183318088091e-01 9.16348065656249267e-01 1.01160453727708877e+00 1.09865227971226798e+00 1.17872100366669685e+00 1.25277767969836296e+00 1.32176777395878364e+00 1.38635002079692837e+00 1.44697637249515854e+00 1.50409420887274625e+00 1.55814764821316754e+00 1.60947600084362952e+00 1.65829393447507156e+00 1.70480885095700785e+00 1.74922815213895189e+00 1.79175923970966466e+00 1.83259005049654222e+00 1.87183533226151133e+00 1.90959263384970646e+00 1.94595950410626362e+00 1.98103349187631750e+00 2.01491214600500346e+00 2.04769301510038781e+00 2.07946352550178926e+00 2.11027403528676105e+00 2.14016641953235709e+00 2.16918255331563126e+00 2.19736431171363611e+00 2.22475356980342642e+00 2.25139220266205564e+00 2.27732208536657810e+00 2.30258509299404635e+00 - 1.00254261613056794e+00 7.98334999625206598e-01 6.66752209256807338e-01 5.71952135021786212e-01 4.99597454958138398e-01 4.44699888470842797e-01 3.99955939076224509e-01 3.63472602732268946e-01 3.33587746439520605e-01 3.07606422584049077e-01 2.85491363057420178e-01 2.66837284058103641e-01 2.50118943859901521e-01 2.35190122938787882e-01 2.22050821294762640e-01 2.10610784319237826e-01 2.00154304624132307e-01 1.90527432327081331e-01 1.81730167428084816e-01 1.73762509927142816e-01 1.66624366318174705e-01 1.60087152540269423e-01 1.53940134142904944e-01 1.48183311126081213e-01 1.42816683489798313e-01 1.37840251234056188e-01 1.33254014358854894e-01 1.29057876274537020e-01 1.25134123654711077e-01 1.21377871343099950e-01 1.17789119339703638e-01 1.14367867644522142e-01 1.11114116257555462e-01 1.08027865178803598e-01 1.05109114408266549e-01 1.02357863945944316e-01 9.97741137918368992e-02 --1.00000000000000377e+00 -6.33660932042887648e-01 -4.49235132334255161e-01 -3.25782694882304436e-01 -2.53054745626878019e-01 -1.95497023679798904e-01 -1.62454571477147702e-01 -1.29412119274496529e-01 -1.11657824079571477e-01 -9.61927667642009099e-02 -8.07277094488303704e-02 -7.04523993469851478e-02 -6.32943222386314758e-02 -5.61362451302777968e-02 -4.89781680219241247e-02 -4.34851335765309294e-02 -4.01667039843129556e-02 -3.68482743920949818e-02 -3.35298447998770149e-02 -3.02114152076590411e-02 -2.69292458727027513e-02 -2.53684643505395734e-02 -2.38076828283763989e-02 -2.22469013062132209e-02 -2.06861197840500430e-02 -1.91253382618868650e-02 -1.75645567397236871e-02 -1.60300110957334006e-02 -1.53600098628741376e-02 -1.46900086300148763e-02 -1.40200073971556132e-02 -1.33500061642963519e-02 -1.26800049314370888e-02 -1.20100036985778258e-02 -1.13400024657185645e-02 -1.06700012328593032e-02 -1.00000000000000401e-02 diff --git a/source/module_base/test/data/sin_not_a_knot.dat b/source/module_base/test/data/sin_not_a_knot.dat deleted file mode 100644 index 417d0140ae..0000000000 --- a/source/module_base/test/data/sin_not_a_knot.dat +++ /dev/null @@ -1,7 +0,0 @@ -not-a-knot not-a-knot - 1.00000000000000006e-01 1.29154966501488389e-01 1.66810053720005874e-01 2.15443469003188337e-01 2.78255940220712428e-01 3.59381366380462752e-01 4.64158883361277863e-01 5.99484250318940926e-01 7.74263682681126997e-01 1.00000000000000000e+00 - 9.98334166468281548e-02 1.28796193418703991e-01 1.66037531159675150e-01 2.13780666055298912e-01 2.74679090976688467e-01 3.51695188663471381e-01 4.47670834718957189e-01 5.64216731736942645e-01 6.99189845133651677e-01 8.41470984807896505e-01 - 1.00000000000000006e-01 1.25000000000000000e-01 1.50000000000000022e-01 1.75000000000000017e-01 2.00000000000000011e-01 2.25000000000000006e-01 2.50000000000000000e-01 2.75000000000000022e-01 3.00000000000000044e-01 3.25000000000000011e-01 3.49999999999999978e-01 3.75000000000000000e-01 4.00000000000000022e-01 4.25000000000000044e-01 4.50000000000000067e-01 4.74999999999999978e-01 5.00000000000000000e-01 5.25000000000000022e-01 5.50000000000000044e-01 5.75000000000000067e-01 5.99999999999999978e-01 6.25000000000000000e-01 6.50000000000000022e-01 6.75000000000000044e-01 7.00000000000000067e-01 7.24999999999999978e-01 7.50000000000000000e-01 7.75000000000000022e-01 8.00000000000000044e-01 8.25000000000000067e-01 8.49999999999999978e-01 8.75000000000000000e-01 9.00000000000000022e-01 9.25000000000000044e-01 9.50000000000000067e-01 9.74999999999999978e-01 1.00000000000000000e+00 - 9.98334166468281548e-02 1.24674734514712698e-01 1.49438130358688637e-01 1.74108137455688206e-01 1.98669331470162691e-01 2.23106356655036864e-01 2.47403944178155422e-01 2.71546935540866008e-01 2.95520208213219726e-01 3.19308806225840347e-01 3.42897834817652569e-01 3.66272425041630545e-01 3.89418057463319811e-01 4.12320464705872358e-01 4.34965384966057578e-01 4.57338563261367681e-01 4.79425963790102938e-01 5.01213811410824883e-01 5.22688346176908625e-01 5.43835808141729826e-01 5.64642437361874472e-01 5.85094862720930697e-01 6.05181175115716008e-01 6.24889809005897301e-01 6.44209198851141918e-01 6.63127779111117310e-01 6.81633984245490487e-01 6.99716248713929012e-01 7.17363006976099671e-01 7.34562693491669916e-01 7.51303742720306977e-01 7.67574589121678086e-01 7.83363667155450361e-01 7.98659411281291143e-01 8.13450255958867552e-01 8.27724635647847040e-01 8.41470984807896505e-01 - 9.95004923184505952e-01 9.92197390241733368e-01 9.88771161271814858e-01 9.84726484485526354e-01 9.80066691602079154e-01 9.74793416196813478e-01 9.68912581684626351e-01 9.62425723364175201e-01 9.55336713363020729e-01 9.47651829867646733e-01 9.39371159698343727e-01 9.30499643073893545e-01 9.21055871973040285e-01 9.11041628742959020e-01 9.00456913383649749e-01 8.89303613354681888e-01 8.77596695966640139e-01 8.65339380713611495e-01 8.52531667595595843e-01 8.39173556612593186e-01 8.25265066443230833e-01 8.10851858679044746e-01 7.95976029301547761e-01 7.80637578310739877e-01 7.64836505706621206e-01 7.48572811489191747e-01 7.31846495658451279e-01 7.14657558214399802e-01 6.97005999157037537e-01 6.78891818486364262e-01 6.60315016202380312e-01 6.41275592305085462e-01 6.21773546794479715e-01 6.01808879670563179e-01 5.81381590933335857e-01 5.60491680582797747e-01 5.39139148618948627e-01 --9.99273971679864453e-02 -1.24675238253821624e-01 -1.49423079339714465e-01 -1.74110306895194078e-01 -1.98673123780586686e-01 -2.23112904322202821e-01 -2.47353856652764159e-01 -2.71594808983325553e-01 -2.95479606336378597e-01 -3.19311073293541137e-01 -3.43142540250703731e-01 -3.66341401449573223e-01 -3.89160286618692008e-01 -4.11979171787810738e-01 -4.34798056956929524e-01 -4.57268738221928150e-01 -4.79284652821407420e-01 -5.01300567420886689e-01 -5.23316482020365958e-01 -5.45332396619845228e-01 -5.67275878301223169e-01 -5.85780742833658996e-01 -6.04285607366094824e-01 -6.22790471898530651e-01 -6.41295336430966478e-01 -6.59800200963402195e-01 -6.78305065495838022e-01 -6.96809930028275515e-01 -7.15314794560709233e-01 -7.33819659093142951e-01 -7.52324523625576669e-01 -7.70829388158010387e-01 -7.89334252690444216e-01 -8.07839117222877934e-01 -8.26343981755311652e-01 -8.44848846287745370e-01 -8.63353710820179088e-01 diff --git a/source/module_base/test/data/sqrt_mix_bc.dat b/source/module_base/test/data/sqrt_mix_bc.dat deleted file mode 100644 index 1a63a03293..0000000000 --- a/source/module_base/test/data/sqrt_mix_bc.dat +++ /dev/null @@ -1,7 +0,0 @@ -first_deriv:5.00000000000000000e-01 not-a-knot - 1.00000000000000000e+00 1.29154966501488389e+00 1.66810053720005880e+00 2.15443469003188381e+00 2.78255940220712450e+00 3.59381366380462763e+00 4.64158883361277841e+00 5.99484250318940859e+00 7.74263682681126930e+00 1.00000000000000000e+01 - 1.00000000000000000e+00 1.13646366638572482e+00 1.29154966501488389e+00 1.46779926762206947e+00 1.66810053720005880e+00 1.89573565240637598e+00 2.15443469003188381e+00 2.44843674682222678e+00 2.78255940220712450e+00 3.16227766016837952e+00 - 1.00000000000000000e+00 1.25000000000000000e+00 1.50000000000000000e+00 1.75000000000000000e+00 2.00000000000000000e+00 2.25000000000000000e+00 2.50000000000000000e+00 2.75000000000000000e+00 3.00000000000000000e+00 3.25000000000000000e+00 3.50000000000000000e+00 3.75000000000000000e+00 4.00000000000000000e+00 4.25000000000000000e+00 4.50000000000000000e+00 4.75000000000000000e+00 5.00000000000000000e+00 5.25000000000000000e+00 5.50000000000000000e+00 5.75000000000000000e+00 6.00000000000000000e+00 6.25000000000000000e+00 6.50000000000000000e+00 6.75000000000000000e+00 7.00000000000000000e+00 7.25000000000000000e+00 7.50000000000000000e+00 7.75000000000000000e+00 8.00000000000000000e+00 8.25000000000000000e+00 8.50000000000000000e+00 8.75000000000000000e+00 9.00000000000000000e+00 9.25000000000000000e+00 9.50000000000000000e+00 9.75000000000000000e+00 1.00000000000000000e+01 - 1.00000000000000000e+00 1.11803728698643989e+00 1.22475682769484950e+00 1.32287978023881414e+00 1.41422464207946574e+00 1.50000375623387994e+00 1.58115482205509994e+00 1.65831336044919975e+00 1.73206149587978508e+00 1.80279292004163660e+00 1.87083207865261780e+00 1.93649703530829753e+00 2.00002057410239775e+00 2.06157397820173083e+00 2.12132717083545463e+00 2.17944902427163800e+00 2.23607463862589828e+00 2.29129895056073130e+00 2.34521455546809943e+00 2.39791404873996372e+00 2.44949002569315066e+00 2.50002598372984819e+00 2.54957121153853006e+00 2.59816695899999894e+00 2.64585447599505841e+00 2.69267501240451246e+00 2.73866981810916421e+00 2.78388014298981767e+00 2.82834723692727730e+00 2.87211234980234575e+00 2.91521673149582661e+00 2.95770163188852342e+00 2.99960830086124020e+00 3.04097798829478050e+00 3.08185194406994789e+00 3.12227141806754682e+00 3.16227766016837952e+00 - 5.00000000000000000e-01 4.47098909750842544e-01 4.08224810882382050e-01 3.78053779833561365e-01 3.53481662512829198e-01 3.33407818352801533e-01 3.16209958323798612e-01 3.01467598935841907e-01 2.88742679905178157e-01 2.77324939467649523e-01 2.67204555498214813e-01 2.58260988871481856e-01 2.50040603634092751e-01 2.42499911313340782e-01 2.35638911909225951e-01 2.29428522778511251e-01 2.23638122316879184e-01 2.18218103423094306e-01 2.13168466097156617e-01 2.08489210339066144e-01 2.04180292443896155e-01 2.00134871770223183e-01 1.96254450619764736e-01 1.92539028992520816e-01 1.88988606888491395e-01 1.85603184307676500e-01 1.82382761250076131e-01 1.79327337715690260e-01 1.76436913704518944e-01 1.73711489216562182e-01 1.71151064251819918e-01 1.68755638810292180e-01 1.66525212891979024e-01 1.64459786496880367e-01 1.62559359624996236e-01 1.60823932276326687e-01 1.59253504450871608e-01 --2.45211727308500382e-01 -1.77996994684759102e-01 -1.37423541149741701e-01 -1.07607040737062801e-01 -8.89698978287946640e-02 -7.37024413981044041e-02 -6.38804388339192647e-02 -5.40584362697341184e-02 -4.82656746863025995e-02 -4.30762488139266458e-02 -3.78868229415506921e-02 -3.42409267828305136e-02 -3.15221551162820982e-02 -2.88033834497336862e-02 -2.60846117831852707e-02 -2.39023649822226771e-02 -2.24208387108338972e-02 -2.09393124394451208e-02 -1.94577861680563409e-02 -1.79762598966675645e-02 -1.65116817411209045e-02 -1.58516836482628341e-02 -1.51916855554047638e-02 -1.45316874625466934e-02 -1.38716893696886247e-02 -1.32116912768305544e-02 -1.25516931839724857e-02 -1.18916950911143095e-02 -1.12316969982561819e-02 -1.05716989053980526e-02 -9.91170081253992322e-03 -9.25170271968179560e-03 -8.59170462682366798e-03 -7.93170653396553862e-03 -7.27170844110741014e-03 -6.61171034824928165e-03 -5.95171225539115403e-03 diff --git a/source/module_base/test/data/three_points_not_a_knot.dat b/source/module_base/test/data/three_points_not_a_knot.dat deleted file mode 100644 index 0aaf9351c1..0000000000 --- a/source/module_base/test/data/three_points_not_a_knot.dat +++ /dev/null @@ -1,7 +0,0 @@ -not-a-knot not-a-knot - 0.00000000000000000e+00 2.99999999999999989e-01 1.00000000000000000e+00 - 0.00000000000000000e+00 2.95520206661339546e-01 8.41470984807896505e-01 - 0.00000000000000000e+00 2.77777777777777762e-02 5.55555555555555525e-02 8.33333333333333287e-02 1.11111111111111105e-01 1.38888888888888895e-01 1.66666666666666657e-01 1.94444444444444420e-01 2.22222222222222210e-01 2.50000000000000000e-01 2.77777777777777790e-01 3.05555555555555525e-01 3.33333333333333315e-01 3.61111111111111105e-01 3.88888888888888840e-01 4.16666666666666630e-01 4.44444444444444420e-01 4.72222222222222210e-01 5.00000000000000000e-01 5.27777777777777790e-01 5.55555555555555580e-01 5.83333333333333259e-01 6.11111111111111049e-01 6.38888888888888840e-01 6.66666666666666630e-01 6.94444444444444420e-01 7.22222222222222210e-01 7.50000000000000000e-01 7.77777777777777679e-01 8.05555555555555469e-01 8.33333333333333259e-01 8.61111111111111049e-01 8.88888888888888840e-01 9.16666666666666630e-01 9.44444444444444420e-01 9.72222222222222210e-01 1.00000000000000000e+00 - 0.00000000000000000e+00 2.89141774610951995e-02 5.75117844399816239e-02 8.57928209366592559e-02 1.13757286951128120e-01 1.41405182483388209e-01 1.68736507533439495e-01 1.95751262101282020e-01 2.22449446186915784e-01 2.48831059790340758e-01 2.74896102911556972e-01 3.00644575550564286e-01 3.26076477707362977e-01 3.51191809381952769e-01 3.75990570574333827e-01 4.00472761284506151e-01 4.24638381512469687e-01 4.48487431258224378e-01 4.72019910521770392e-01 4.95235819303107561e-01 5.18135157602235941e-01 5.40717925419155421e-01 5.62984122753866445e-01 5.84933749606368458e-01 6.06566805976661683e-01 6.27883291864746340e-01 6.48883207270621987e-01 6.69566552194288955e-01 6.89933326635747024e-01 7.09983530594996526e-01 7.29717164072037017e-01 7.49134227066868941e-01 7.68234719579492076e-01 7.87018641609906422e-01 8.05485993158111757e-01 8.23636774224108636e-01 8.41470984807896394e-01 - 1.04660865727918528e+00 1.03521211991966933e+00 1.02381558256015315e+00 1.01241904520063719e+00 1.00102250784112101e+00 9.89625970481604944e-01 9.78229433122088876e-01 9.66832895762572919e-01 9.55436358403056851e-01 9.44039821043540783e-01 9.32643283684024715e-01 9.21246746324508647e-01 9.09850208964992579e-01 8.98453671605476623e-01 8.87057134245960555e-01 8.75660596886444487e-01 8.64264059526928530e-01 8.52867522167412462e-01 8.41470984807896394e-01 8.30074447448380437e-01 8.18677910088864369e-01 8.07281372729348412e-01 7.95884835369832344e-01 7.84488298010316276e-01 7.73091760650800319e-01 7.61695223291284251e-01 7.50298685931768183e-01 7.38902148572252226e-01 7.27505611212736158e-01 7.16109073853220091e-01 7.04712536493704134e-01 6.93315999134188066e-01 6.81919461774672109e-01 6.70522924415156041e-01 6.59126387055640084e-01 6.47729849696123905e-01 6.36333312336607948e-01 --4.10275344942578168e-01 -4.10275344942578168e-01 -4.10275344942578168e-01 -4.10275344942578168e-01 -4.10275344942578168e-01 -4.10275344942578168e-01 -4.10275344942578168e-01 -4.10275344942578168e-01 -4.10275344942578168e-01 -4.10275344942578168e-01 -4.10275344942578168e-01 -4.10275344942577003e-01 -4.10275344942577003e-01 -4.10275344942577003e-01 -4.10275344942577003e-01 -4.10275344942577003e-01 -4.10275344942577003e-01 -4.10275344942577003e-01 -4.10275344942577003e-01 -4.10275344942577003e-01 -4.10275344942577003e-01 -4.10275344942577003e-01 -4.10275344942577003e-01 -4.10275344942577003e-01 -4.10275344942577003e-01 -4.10275344942577003e-01 -4.10275344942577003e-01 -4.10275344942577003e-01 -4.10275344942577003e-01 -4.10275344942577003e-01 -4.10275344942577003e-01 -4.10275344942577003e-01 -4.10275344942577003e-01 -4.10275344942577003e-01 -4.10275344942577003e-01 -4.10275344942577003e-01 -4.10275344942577003e-01 diff --git a/source/module_base/test/data/two_points_first_deriv.dat b/source/module_base/test/data/two_points_first_deriv.dat deleted file mode 100644 index 7ec6981d9c..0000000000 --- a/source/module_base/test/data/two_points_first_deriv.dat +++ /dev/null @@ -1,7 +0,0 @@ -first_deriv:-1.00000000000000000e+00 first_deriv:-1.15470053837925168e+00 - 0.00000000000000000e+00 5.00000000000000000e-01 - 1.57079632679489656e+00 1.04719755119659785e+00 - 0.00000000000000000e+00 1.38888888888888881e-02 2.77777777777777762e-02 4.16666666666666644e-02 5.55555555555555525e-02 6.94444444444444475e-02 8.33333333333333287e-02 9.72222222222222099e-02 1.11111111111111105e-01 1.25000000000000000e-01 1.38888888888888895e-01 1.52777777777777762e-01 1.66666666666666657e-01 1.80555555555555552e-01 1.94444444444444420e-01 2.08333333333333315e-01 2.22222222222222210e-01 2.36111111111111105e-01 2.50000000000000000e-01 2.63888888888888895e-01 2.77777777777777790e-01 2.91666666666666630e-01 3.05555555555555525e-01 3.19444444444444420e-01 3.33333333333333315e-01 3.47222222222222210e-01 3.61111111111111105e-01 3.75000000000000000e-01 3.88888888888888840e-01 4.02777777777777735e-01 4.16666666666666630e-01 4.30555555555555525e-01 4.44444444444444420e-01 4.58333333333333315e-01 4.72222222222222210e-01 4.86111111111111105e-01 5.00000000000000000e-01 - 1.57079632679489656e+00 1.55691184868293275e+00 1.54303360701525194e+00 1.52915772412750273e+00 1.51528032235533483e+00 1.50139752403439686e+00 1.48750545150033808e+00 1.47360022708880711e+00 1.45967797313545344e+00 1.44573481197592613e+00 1.43176686594587399e+00 1.41777025738094609e+00 1.40374110861679124e+00 1.38967554198905918e+00 1.37556967983339828e+00 1.36141964448545805e+00 1.34722155828088708e+00 1.33297154355533487e+00 1.31866572264445048e+00 1.30430021788388251e+00 1.28987115160928023e+00 1.27537464615629270e+00 1.26080682386056875e+00 1.24616380705775787e+00 1.23144171808350888e+00 1.21663667927347063e+00 1.20174481296329239e+00 1.18676224148862319e+00 1.17168508718511211e+00 1.15650947238840818e+00 1.14123151943416024e+00 1.12584735065801733e+00 1.11035308839562874e+00 1.09474485498264351e+00 1.07901877275471048e+00 1.06317096404747891e+00 1.04719755119659785e+00 --1.00000000000000000e+00 -9.99411380094997748e-01 -9.99101952023264350e-01 -9.99071715784799697e-01 -9.99320671379603787e-01 -9.99848818807676620e-01 -1.00065615806901831e+00 -1.00174268916362874e+00 -1.00310841209150792e+00 -1.00475332685265606e+00 -1.00667743344707272e+00 -1.00888073187475835e+00 -1.01136322213571272e+00 -1.01412490422993584e+00 -1.01716577815742770e+00 -1.02048584391818853e+00 -1.02408510151221788e+00 -1.02796355093951619e+00 -1.03212119220008325e+00 -1.03655802529391905e+00 -1.04127405022102359e+00 -1.04626926698139711e+00 -1.05154367557503914e+00 -1.05709727600195014e+00 -1.06293006826212988e+00 -1.06904205235557836e+00 -1.07543322828229559e+00 -1.08210359604228179e+00 -1.08905315563553651e+00 -1.09628190706206019e+00 -1.10378985032185262e+00 -1.11157698541491379e+00 -1.11964331234124370e+00 -1.12798883110084258e+00 -1.13661354169370998e+00 -1.14551744411984635e+00 -1.15470053837925146e+00 - 5.24315391578369372e-02 3.23297271624847227e-02 1.22279151671325081e-02 -7.87389682821970638e-03 -2.79757088235719209e-02 -4.80775208189241354e-02 -6.81793328142763499e-02 -8.82811448096285367e-02 -1.08382956804980779e-01 -1.28484768800332994e-01 -1.48586580795685208e-01 -1.68688392791037367e-01 -1.88790204786389637e-01 -2.08892016781741852e-01 -2.28993828777094011e-01 -2.49095640772446225e-01 -2.69197452767798495e-01 -2.89299264763150710e-01 -3.09401076758502924e-01 -3.29502888753855139e-01 -3.49604700749207353e-01 -3.69706512744559457e-01 -3.89808324739911671e-01 -4.09910136735263997e-01 -4.30011948730616211e-01 -4.50113760725968426e-01 -4.70215572721320640e-01 -4.90317384716672855e-01 -5.10419196712024958e-01 -5.30521008707377173e-01 -5.50622820702729387e-01 -5.70724632698081602e-01 -5.90826444693433928e-01 -6.10928256688786142e-01 -6.31030068684138357e-01 -6.51131880679490571e-01 -6.71233692674842786e-01 diff --git a/source/module_base/test/data/two_points_periodic.dat b/source/module_base/test/data/two_points_periodic.dat deleted file mode 100644 index 3b9a3d6d4d..0000000000 --- a/source/module_base/test/data/two_points_periodic.dat +++ /dev/null @@ -1,7 +0,0 @@ -periodic periodic - 0.00000000000000000e+00 1.00000000000000000e+00 - 1.00000000000000000e+00 1.00000000000000000e+00 - 0.00000000000000000e+00 2.77777777777777762e-02 5.55555555555555525e-02 8.33333333333333287e-02 1.11111111111111105e-01 1.38888888888888895e-01 1.66666666666666657e-01 1.94444444444444420e-01 2.22222222222222210e-01 2.50000000000000000e-01 2.77777777777777790e-01 3.05555555555555525e-01 3.33333333333333315e-01 3.61111111111111105e-01 3.88888888888888840e-01 4.16666666666666630e-01 4.44444444444444420e-01 4.72222222222222210e-01 5.00000000000000000e-01 5.27777777777777790e-01 5.55555555555555580e-01 5.83333333333333259e-01 6.11111111111111049e-01 6.38888888888888840e-01 6.66666666666666630e-01 6.94444444444444420e-01 7.22222222222222210e-01 7.50000000000000000e-01 7.77777777777777679e-01 8.05555555555555469e-01 8.33333333333333259e-01 8.61111111111111049e-01 8.88888888888888840e-01 9.16666666666666630e-01 9.44444444444444420e-01 9.72222222222222210e-01 1.00000000000000000e+00 - 1.00000000000000000e+00 1.00000000000000000e+00 1.00000000000000000e+00 1.00000000000000000e+00 1.00000000000000000e+00 1.00000000000000000e+00 1.00000000000000000e+00 1.00000000000000000e+00 1.00000000000000000e+00 1.00000000000000000e+00 1.00000000000000000e+00 1.00000000000000000e+00 1.00000000000000000e+00 1.00000000000000000e+00 1.00000000000000000e+00 1.00000000000000000e+00 1.00000000000000000e+00 1.00000000000000000e+00 1.00000000000000000e+00 1.00000000000000000e+00 1.00000000000000000e+00 1.00000000000000000e+00 1.00000000000000000e+00 1.00000000000000000e+00 1.00000000000000000e+00 1.00000000000000000e+00 1.00000000000000000e+00 1.00000000000000000e+00 1.00000000000000000e+00 1.00000000000000000e+00 1.00000000000000000e+00 1.00000000000000000e+00 1.00000000000000000e+00 1.00000000000000000e+00 1.00000000000000000e+00 1.00000000000000000e+00 1.00000000000000000e+00 - 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 - 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 diff --git a/source/module_base/test/data/two_points_second_deriv.dat b/source/module_base/test/data/two_points_second_deriv.dat deleted file mode 100644 index 79882a4a18..0000000000 --- a/source/module_base/test/data/two_points_second_deriv.dat +++ /dev/null @@ -1,7 +0,0 @@ -second_deriv:5.00000000000000000e-01 second_deriv:2.50000000000000000e-01 - 1.00000000000000000e+00 4.00000000000000000e+00 - 1.00000000000000000e+00 2.00000000000000000e+00 - 1.00000000000000000e+00 1.08333333333333326e+00 1.16666666666666674e+00 1.25000000000000000e+00 1.33333333333333326e+00 1.41666666666666652e+00 1.50000000000000000e+00 1.58333333333333326e+00 1.66666666666666652e+00 1.75000000000000000e+00 1.83333333333333326e+00 1.91666666666666652e+00 2.00000000000000000e+00 2.08333333333333304e+00 2.16666666666666652e+00 2.25000000000000000e+00 2.33333333333333304e+00 2.41666666666666652e+00 2.50000000000000000e+00 2.58333333333333304e+00 2.66666666666666652e+00 2.75000000000000000e+00 2.83333333333333304e+00 2.91666666666666652e+00 3.00000000000000000e+00 3.08333333333333304e+00 3.16666666666666652e+00 3.25000000000000000e+00 3.33333333333333304e+00 3.41666666666666652e+00 3.50000000000000000e+00 3.58333333333333304e+00 3.66666666666666652e+00 3.75000000000000000e+00 3.83333333333333304e+00 3.91666666666666652e+00 4.00000000000000000e+00 - 1.00000000000000000e+00 9.77422518004115282e-01 9.58269032921810648e-01 9.42491319444444531e-01 9.30041152263374471e-01 9.20870306069958899e-01 9.14930555555555469e-01 9.12173675411522611e-01 9.12551440329218089e-01 9.16015625000000000e-01 9.22518004115226220e-01 9.32010352366254957e-01 9.44444444444444420e-01 9.59772055041152150e-01 9.77944958847736689e-01 9.98914930555555469e-01 1.02263374485596703e+00 1.04905317644032903e+00 1.07812500000000000e+00 1.10980099022633705e+00 1.14403292181069949e+00 1.18077256944444420e+00 1.21997170781892983e+00 1.26158211162551437e+00 1.30555555555555558e+00 1.35184381430041123e+00 1.40039866255144019e+00 1.45117187500000000e+00 1.50411522633744821e+00 1.55918049125514369e+00 1.61631944444444442e+00 1.67548386059670751e+00 1.73662551440329205e+00 1.79969618055555580e+00 1.86464763374485565e+00 1.93143164866255113e+00 2.00000000000000000e+00 --2.91666666666666685e-01 -2.50289351851851916e-01 -2.09490740740740727e-01 -1.69270833333333343e-01 -1.29629629629629706e-01 -9.05671296296297335e-02 -5.20833333333333703e-02 -1.41782407407408349e-02 2.31481481481480254e-02 5.98958333333332801e-02 9.60648148148147418e-02 1.31655092592592504e-01 1.66666666666666630e-01 2.01099537037036841e-01 2.34953703703703554e-01 2.68229166666666630e-01 3.00925925925925764e-01 3.33043981481481399e-01 3.64583333333333259e-01 3.95543981481481344e-01 4.25925925925925930e-01 4.55729166666666741e-01 4.84953703703703665e-01 5.13599537037036979e-01 5.41666666666666741e-01 5.69155092592592338e-01 5.96064814814814659e-01 6.22395833333333259e-01 6.48148148148147918e-01 6.73321759259259189e-01 6.97916666666666630e-01 7.21932870370370239e-01 7.45370370370370239e-01 7.68229166666666630e-01 7.90509259259259189e-01 8.12210648148148140e-01 8.33333333333333370e-01 - 4.99999999999999944e-01 4.93055555555555525e-01 4.86111111111111049e-01 4.79166666666666630e-01 4.72222222222222210e-01 4.65277777777777790e-01 4.58333333333333315e-01 4.51388888888888895e-01 4.44444444444444475e-01 4.37500000000000000e-01 4.30555555555555580e-01 4.23611111111111160e-01 4.16666666666666685e-01 4.09722222222222265e-01 4.02777777777777846e-01 3.95833333333333370e-01 3.88888888888888951e-01 3.81944444444444531e-01 3.75000000000000056e-01 3.68055555555555636e-01 3.61111111111111160e-01 3.54166666666666741e-01 3.47222222222222321e-01 3.40277777777777901e-01 3.33333333333333426e-01 3.26388888888889006e-01 3.19444444444444531e-01 3.12500000000000111e-01 3.05555555555555691e-01 2.98611111111111271e-01 2.91666666666666796e-01 2.84722222222222376e-01 2.77777777777777957e-01 2.70833333333333481e-01 2.63888888888889062e-01 2.56944444444444642e-01 2.50000000000000167e-01 diff --git a/source/module_base/test/element_basis_index_test.cpp b/source/module_base/test/element_basis_index_test.cpp deleted file mode 100644 index f844e32bed..0000000000 --- a/source/module_base/test/element_basis_index_test.cpp +++ /dev/null @@ -1,54 +0,0 @@ -#include "../element_basis_index.h" -#include "gtest/gtest.h" -#include "gmock/gmock.h" - -/************************************************ - * unit test of class Element_Basis_Index - ***********************************************/ - -/** - * - Tested Functions: - * - construct_index - * - make a index - */ - -class IndexLNMTest : public testing::Test -{ - -}; - -TEST_F(IndexLNMTest,makeindex) -{ - ModuleBase::Element_Basis_Index::Range rangtest; - rangtest.resize(2); - rangtest[0].resize(3); - rangtest[1].resize(3); - rangtest[0][0].N=1; - rangtest[0][0].M=2; - rangtest[0][1].N=1; - rangtest[0][1].M=3; - rangtest[0][2].N=2; - rangtest[0][2].M=1; - rangtest[1][0].N=2; - rangtest[1][0].M=2; - rangtest[1][1].N=2; - rangtest[1][1].M=3; - rangtest[1][2].N=3; - rangtest[1][2].M=3; - ModuleBase::Element_Basis_Index::IndexLNM testindex; - testindex=ModuleBase::Element_Basis_Index::construct_index(rangtest); - EXPECT_EQ(rangtest[0][0].N,testindex[0][0].N); - EXPECT_EQ(rangtest[0][0].M,testindex[0][0].M); - EXPECT_EQ(rangtest[1][1].N,testindex[1][1].N); - EXPECT_EQ(rangtest[1][1].M,testindex[1][1].M); - EXPECT_EQ(rangtest[0][2].N,testindex[0][2].N); - EXPECT_EQ(rangtest[0][2].M,testindex[0][2].M); - EXPECT_EQ(testindex[0][0][0][0],0); - EXPECT_EQ(testindex[0][0][0][1],1); - EXPECT_EQ(testindex[0][1][0][0],2); - EXPECT_EQ(testindex[1][1][0][0],4); - EXPECT_EQ(testindex[1][2][0][1],11); - EXPECT_EQ(testindex[0].count_size,7); - EXPECT_EQ(testindex[1].count_size,19); -} - diff --git a/source/module_base/test/formatter_test.cpp b/source/module_base/test/formatter_test.cpp deleted file mode 100644 index 20696e1357..0000000000 --- a/source/module_base/test/formatter_test.cpp +++ /dev/null @@ -1,408 +0,0 @@ -#include "module_base/formatter.h" -#include -#include -#include - -TEST(FormatterTest, FmtCoreStaticFormat) { - // const char* - std::string result = FmtCore::format("Hello, %s!", "world"); - // remove the last '\0' character - EXPECT_EQ(result, "Hello, world!"); - // std::string - result = FmtCore::format("Hello, %s!", std::string("world")); - EXPECT_EQ(result, "Hello, world!"); - // int - result = FmtCore::format("Hello, %d!", 123); - EXPECT_EQ(result, "Hello, 123!"); - // float - result = FmtCore::format("Hello, %f!", 123.456); - EXPECT_EQ(result, "Hello, 123.456000!"); - // char - result = FmtCore::format("Hello, %c!", 'a'); - EXPECT_EQ(result, "Hello, a!"); - // invalid format - result = FmtCore::format("Hello, %z!", "world"); - EXPECT_EQ(result, "Hello, %!"); - // varadic template case - result = FmtCore::format("Hello, %s, %d, %f, %c!", "world", 123, 123.456, 'a'); - EXPECT_EQ(result, "Hello, world, 123, 123.456000, a!"); -} - -TEST(FormatterTest, FmtCoreDynamic) -{ - FmtCore fmt("Hello, %s!"); - EXPECT_EQ(fmt.fmt(), "Hello, %s!"); - std::string result = fmt.format(std::string("world")); - EXPECT_EQ(result, "Hello, world!"); - - fmt.reset("Hello, %d!"); - EXPECT_EQ(fmt.fmt(), "Hello, %d!"); - result = fmt.format(123); - EXPECT_EQ(result, "Hello, 123!"); - - fmt.reset("Hello, %f!"); - EXPECT_EQ(fmt.fmt(), "Hello, %f!"); - result = fmt.format(123.456); - EXPECT_EQ(result, "Hello, 123.456000!"); - - fmt.reset("Hello, %c!"); - EXPECT_EQ(fmt.fmt(), "Hello, %c!"); - result = fmt.format('a'); - EXPECT_EQ(result, "Hello, a!"); - - // varadic template case - fmt.reset("Hello, %s, %d, %f, %c!"); - EXPECT_EQ(fmt.fmt(), "Hello, %s, %d, %f, %c!"); - result = fmt.format(std::string("world"), 123, 123.456, 'a'); - EXPECT_EQ(result, "Hello, world, 123, 123.456000, a!"); -} - -TEST(FormatterTest, FmtPyStrFuncSplit) -{ - std::string fmt = "Hello, %s, %d, %f, %c!"; - // default delimiter, whitespace - std::vector result = FmtCore::split(fmt); - std::vector ref = {"Hello,", "%s,", "%d,", "%f,", "%c!"}; - for(int i = 0; i < result.size(); i++) - { - EXPECT_EQ(result[i], ref[i]); - } - fmt = "Hello, %s, %d, %f, %c"; - // other delimiter - result = FmtCore::split(fmt, "%"); - ref = {"Hello, ", "s, ", "d, ", "f, ", "c"}; - for(int i = 0; i < result.size(); i++) - { - EXPECT_EQ(result[i], ref[i]); - } - // really string case, multiple chars - result = FmtCore::split(fmt, ", %"); - ref = {"Hello", "s", "d", "f", "c"}; - for(int i = 0; i < result.size(); i++) - { - EXPECT_EQ(result[i], ref[i]); - } - // no such delimiter - result = FmtCore::split(fmt, "z"); - ref = {"Hello, %s, %d, %f, %c"}; - for(int i = 0; i < result.size(); i++) - { - EXPECT_EQ(result[i], ref[i]); - } - // multiple delimiters exist - fmt = "Hello, %s, %d, %f, %c!"; - result = FmtCore::split(fmt); - ref = {"Hello,", "%s,", "%d,", "%f,", "%c!"}; - for(int i = 0; i < result.size(); i++) - { - EXPECT_EQ(result[i], ref[i]); - } - result = FmtCore::split(fmt, " "); - ref = {"Hello,", "", "", "", "", "", "", "%s,", "", "%d,", "", "", "", "%f,", "", "%c!"}; - for(int i = 0; i < result.size(); i++) - { - EXPECT_EQ(result[i], ref[i]); - } -} - -TEST(FormatterTest, FmtPyStrFuncStartswith) -{ - const std::string fmt = "Hello, %s, %d, %f, %c!"; - EXPECT_TRUE(FmtCore::startswith(fmt, "Hello")); - EXPECT_FALSE(FmtCore::startswith(fmt, "world")); -} - -TEST(FormatterTest, FmtPyStrFuncEndswith) -{ - const std::string fmt = "Hello, %s, %d, %f, %c!"; - EXPECT_TRUE(FmtCore::endswith(fmt, "!")); - EXPECT_FALSE(FmtCore::endswith(fmt, "world")); -} - -TEST(FormatterTest, FmtPyStrFuncStrip) -{ - std::string fmt = " Hello, %s, %d, %f, %c! "; - std::string result = FmtCore::strip(fmt); - std::string ref = "Hello, %s, %d, %f, %c!"; - EXPECT_EQ(result, ref); - fmt = " Hello, %s, %d, %f, %c! "; - result = FmtCore::strip(fmt, " "); - ref = "Hello, %s, %d, %f, %c!"; - EXPECT_EQ(result, ref); - fmt = ""; - result = FmtCore::strip(fmt); - ref = ""; - EXPECT_EQ(result, ref); - fmt = " "; - result = FmtCore::strip(fmt); - ref = ""; - EXPECT_EQ(result, ref); -} - -TEST(FormatterTest, FmtPyStrFuncCenter) -{ - std::string fmt = "Hello, %s, %d, %f, %c!"; - std::string result = FmtCore::center(fmt, 30); - std::string ref = " Hello, %s, %d, %f, %c! "; - EXPECT_EQ(result, ref); - result = FmtCore::center(fmt, 30, '*'); - ref = "****Hello, %s, %d, %f, %c!****"; - fmt = "Hello, %s, %d, %f, %c"; // length 21 - result = FmtCore::center(fmt, 30, '*'); - ref = "****Hello, %s, %d, %f, %c*****"; - EXPECT_EQ(result, ref); - fmt = ""; - result = FmtCore::center(fmt, 30, '*'); - ref = "******************************"; - EXPECT_EQ(result, ref); -} - -TEST(FormatterTest, FmtPyStrFuncReplace) -{ - const std::string fmt = "Hello, %s, %d, %f, %c!"; - std::string result = FmtCore::replace(fmt, "%s", "world"); - std::string ref = "Hello, world, %d, %f, %c!"; - EXPECT_EQ(result, ref); - result = FmtCore::replace(fmt, "%d", "world"); - ref = "Hello, %s, world, %f, %c!"; - EXPECT_EQ(result, ref); - result = FmtCore::replace(fmt, "%f", "world"); - ref = "Hello, %s, %d, world, %c!"; - EXPECT_EQ(result, ref); - result = FmtCore::replace(fmt, "%c", "world"); - ref = "Hello, %s, %d, %f, world!"; - EXPECT_EQ(result, ref); - result = FmtCore::replace(fmt, "%z", "world"); - ref = "Hello, %s, %d, %f, %c!"; - EXPECT_EQ(result, ref); - result = FmtCore::replace(fmt, "%", "world"); - ref = "Hello, worlds, worldd, worldf, worldc!"; - EXPECT_EQ(result, ref); -} - -TEST(FormatterTest, FmtPyStrFuncJoin) -{ - const std::vector strs = {"Hello", "world", "!"}; - std::string result = FmtCore::join("", strs); - std::string ref = "Helloworld!"; - EXPECT_EQ(result, ref); - result = FmtCore::join(" ", strs); - ref = "Hello world !"; - EXPECT_EQ(result, ref); - result = FmtCore::join("__", strs); - ref = "Hello__world__!"; -} - -TEST(FormatterTest, FmtTableDefaultArgs) -{ - const std::vector titles = {"title1", "t i t l e 2", "t-i-t-l-e-3"}; - const std::vector fmts = {"%s", "%d", "%f"}; - FmtTable table(titles, 5, fmts); - const std::vector col1 = {"row1", "row2", "row3", "row4", "row5"}; - const std::vector col2 = {1, 2, 3, 4, 5}; - const std::vector col3 = {1.1, 2.2, 3.3, 4.4, 5.5}; - table << col1 << col2 << col3; - const std::string result = table.str(); - std::cout << result << std::endl; - std::string ref = ""; - ref += "--------------------------------\n"; - ref += " title1 t i t l e 2 t-i-t-l-e-3 \n"; - ref += "--------------------------------\n"; - ref += " row1 1 1.100000 \n"; - ref += " row2 2 2.200000 \n"; - ref += " row3 3 3.300000 \n"; - ref += " row4 4 4.400000 \n"; - ref += " row5 5 5.500000 \n"; - ref += "--------------------------------\n"; - EXPECT_EQ(result, ref); -} - -TEST(FormatterTest, FmtTableHeadless) -{ - const std::vector titles = {"", "", ""}; - const std::vector fmts = {"%s", "%d", "%f"}; - FmtTable table(titles, 5, fmts); - const std::vector col1 = {"row1", "row2", "row3", "row4", "row5"}; - const std::vector col2 = {1, 2, 3, 4, 5}; - const std::vector col3 = {1.1, 2.2, 3.3, 4.4, 5.5}; - table << col1 << col2 << col3; - const std::string result = table.str(); - std::cout << result << std::endl; - std::string ref = ""; - ref += "-----------------\n"; - ref += " row1 1 1.100000 \n"; - ref += " row2 2 2.200000 \n"; - ref += " row3 3 3.300000 \n"; - ref += " row4 4 4.400000 \n"; - ref += " row5 5 5.500000 \n"; - ref += "-----------------\n"; - EXPECT_EQ(result, ref); -} - -TEST(FormatterTest, FmtTableCustomArgsAlign) -{ - // shared data - std::vector titles = {"title1", "t i t l e 2", "t-i-t-l-e-3"}; - std::vector fmts = {"%s", "%d", "%f"}; - std::vector col1 = {"row1", "row2", "row3", "row4", "row5"}; - std::vector col2 = {1, 2, 3, 4, 5}; - std::vector col3 = {1.1, 2.2, 3.3, 4.4, 5.5}; - // align: l and l - FmtTable table(titles, 5, fmts, 0, {FmtTable::Align::LEFT, FmtTable::Align::LEFT}); - table << col1 << col2 << col3; - std::string result = table.str(); - std::cout << result << std::endl; - std::string ref = ""; - ref += "--------------------------------\n"; - ref += " title1 t i t l e 2 t-i-t-l-e-3 \n"; - ref += "--------------------------------\n"; - ref += " row1 1 1.100000 \n"; - ref += " row2 2 2.200000 \n"; - ref += " row3 3 3.300000 \n"; - ref += " row4 4 4.400000 \n"; - ref += " row5 5 5.500000 \n"; - ref += "--------------------------------\n"; - EXPECT_EQ(result, ref); - - // align: r and r - FmtTable table2(titles, 5, fmts, 0, {FmtTable::Align::RIGHT, FmtTable::Align::RIGHT}); - table2 << col1 << col2 << col3; - result = table2.str(); - std::cout << result << std::endl; - ref = ""; - ref += "--------------------------------\n"; - ref += " title1 t i t l e 2 t-i-t-l-e-3 \n"; - ref += "--------------------------------\n"; - ref += " row1 1 1.100000 \n"; - ref += " row2 2 2.200000 \n"; - ref += " row3 3 3.300000 \n"; - ref += " row4 4 4.400000 \n"; - ref += " row5 5 5.500000 \n"; - ref += "--------------------------------\n"; - EXPECT_EQ(result, ref); - - // align: l and r - FmtTable table3(titles, 5, fmts, 0, {FmtTable::Align::RIGHT, FmtTable::Align::LEFT}); - table3 << col1 << col2 << col3; - result = table3.str(); - std::cout << result << std::endl; - ref = ""; - ref += "--------------------------------\n"; - ref += " title1 t i t l e 2 t-i-t-l-e-3 \n"; - ref += "--------------------------------\n"; - ref += " row1 1 1.100000 \n"; - ref += " row2 2 2.200000 \n"; - ref += " row3 3 3.300000 \n"; - ref += " row4 4 4.400000 \n"; - ref += " row5 5 5.500000 \n"; - ref += "--------------------------------\n"; - EXPECT_EQ(result, ref); - - // align: r and l - FmtTable table4(titles, 5, fmts, 0, {FmtTable::Align::LEFT, FmtTable::Align::RIGHT}); - table4 << col1 << col2 << col3; - result = table4.str(); - std::cout << result << std::endl; - ref = ""; - ref += "--------------------------------\n"; - ref += " title1 t i t l e 2 t-i-t-l-e-3 \n"; - ref += "--------------------------------\n"; - ref += " row1 1 1.100000 \n"; - ref += " row2 2 2.200000 \n"; - ref += " row3 3 3.300000 \n"; - ref += " row4 4 4.400000 \n"; - ref += " row5 5 5.500000 \n"; - ref += "--------------------------------\n"; - EXPECT_EQ(result, ref); -} - -TEST(FormatterTest, FmtTableCustomArgsAlignFrame) -{ - // shared data - std::vector titles = {"title1", "t i t l e 2", "t-i-t-l-e-3"}; - std::vector fmts = {"%s", "%d", "%f"}; - std::vector col1 = {"row1", "row2", "row3", "row4", "row5"}; - std::vector col2 = {1, 2, 3, 4, 5}; - std::vector col3 = {1.1, 2.2, 3.3, 4.4, 5.5}; - - FmtTable table1(titles, - 5, - fmts, - 0, - {FmtTable::Align::LEFT, FmtTable::Align::LEFT}, - {'+', '?', '*', '.', '^'}); - table1 << col1 << col2 << col3; - std::string result = table1.str(); - std::cout << result << std::endl; - std::string ref = ""; - ref += "++++++++++++++++++++++++++++++++\n"; - ref += ".title1 t i t l e 2 t-i-t-l-e-3^\n"; - ref += "????????????????????????????????\n"; - ref += ".row1 1 1.100000 ^\n"; - ref += ".row2 2 2.200000 ^\n"; - ref += ".row3 3 3.300000 ^\n"; - ref += ".row4 4 4.400000 ^\n"; - ref += ".row5 5 5.500000 ^\n"; - ref += "********************************\n"; - EXPECT_EQ(result, ref); -} - -TEST(FormatterTest, FmtTableCustomArgsAlignFrameDelim) -{ - // shared data - std::vector titles = {"title1", "t i t l e 2", "t-i-t-l-e-3"}; - std::vector fmts = {"%s", "%d", "%f"}; - std::vector col1 = {"row1", "row2", "row3", "row4", "row5"}; - std::vector col2 = {1, 2, 3, 4, 5}; - std::vector col3 = {1.1, 2.2, 3.3, 4.4, 5.5}; - FmtTable table1(titles, - 5, - fmts, - 0, - {FmtTable::Align::LEFT, FmtTable::Align::LEFT}, - {'=', '/', '&', '#', '%'}, - {'"', ']'}); - table1 << col1 << col2 << col3; - std::string result = table1.str(); - std::cout << result << std::endl; - std::string ref = ""; - ref += "================================\n"; - ref += "#title1]t i t l e 2]t-i-t-l-e-3%\n"; - ref += "////////////////////////////////\n"; - ref += "#row1 ]1 ]1.100000 %\n"; - ref += "#row2 ]2 ]2.200000 %\n"; - ref += "#row3 ]3 ]3.300000 %\n"; - ref += "#row4 ]4 ]4.400000 %\n"; - ref += "#row5 ]5 ]5.500000 %\n"; - ref += "&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&\n"; - EXPECT_EQ(result, ref); -} - -TEST(FormatterTest, FmtTableCustomIndent) -{ - const std::vector titles = {"title1", "t i t l e 2", "t-i-t-l-e-3"}; - const std::vector fmts = {"%s", "%d", "%f"}; - FmtTable table(titles, 5, fmts, 4); - const std::vector col1 = {"row1", "row2", "row3", "row4", "row5"}; - const std::vector col2 = {1, 2, 3, 4, 5}; - const std::vector col3 = {1.1, 2.2, 3.3, 4.4, 5.5}; - table << col1 << col2 << col3; - const std::string result = table.str(); - std::cout << result << std::endl; - std::string ref = ""; - ref += " --------------------------------\n"; - ref += " title1 t i t l e 2 t-i-t-l-e-3 \n"; - ref += " --------------------------------\n"; - ref += " row1 1 1.100000 \n"; - ref += " row2 2 2.200000 \n"; - ref += " row3 3 3.300000 \n"; - ref += " row4 4 4.400000 \n"; - ref += " row5 5 5.500000 \n"; - ref += " --------------------------------\n"; - EXPECT_EQ(result, ref); -} - -int main(int argc, char** argv) { - ::testing::InitGoogleTest(&argc, argv); - return RUN_ALL_TESTS(); -} \ No newline at end of file diff --git a/source/module_base/test/global_file_test.cpp b/source/module_base/test/global_file_test.cpp deleted file mode 100644 index 365782cd80..0000000000 --- a/source/module_base/test/global_file_test.cpp +++ /dev/null @@ -1,160 +0,0 @@ -#include "gtest/gtest.h" -#include "gmock/gmock.h" -#define private public -#include "module_parameter/parameter.h" -#undef private -#include "../global_file.h" -#include "../global_variable.h" -#include -#include - -#ifdef __MPI -#include "mpi.h" -#endif - -/************************************************ - * unit test of functions in global_file.cpp - ***********************************************/ - -/** - * - Tested Function - * - mkdiratom - * - generate atom dir for each type of atom - * - openlog - * - Open the out file with the name *.log - */ - -class GlobalFile : public testing::Test -{ - -}; - -TEST_F(GlobalFile,mkdirout) -{ - std::string output; - testing::internal::CaptureStdout(); - ModuleBase::Global_File::make_dir_out("Si","m",false,0,true,true); - output = testing::internal::GetCapturedStdout(); - EXPECT_THAT(output,testing::HasSubstr("MAKE THE DIR")); - GlobalV::ofs_warning.close(); - EXPECT_TRUE(GlobalV::ofs_running.is_open()); - GlobalV::ofs_running.close(); - std::string dd = "OUT.Si/running_m_1.log"; - remove(dd.c_str()); - - testing::internal::CaptureStdout(); - ModuleBase::Global_File::make_dir_out("Si","md",false,0,true,false); - output = testing::internal::GetCapturedStdout(); - EXPECT_THAT(output,testing::HasSubstr("MAKE THE STRU DIR")); - EXPECT_TRUE(GlobalV::ofs_running.is_open()); - GlobalV::ofs_running.close(); - GlobalV::ofs_warning.close(); - std::string bb = "OUT.Si/running_md.log"; - remove(bb.c_str()); - - testing::internal::CaptureStdout(); - ModuleBase::Global_File::make_dir_out("Si","md",true,0,true,true); - output = testing::internal::GetCapturedStdout(); - EXPECT_THAT(output,testing::HasSubstr("MAKE THE MATRIX DIR")); - EXPECT_TRUE(GlobalV::ofs_running.is_open()); - GlobalV::ofs_running.close(); - std::string cc = "OUT.Si/running_md_1.log"; - remove(cc.c_str()); - std::string aa = "OUT.Si/warning.log"; - remove(aa.c_str()); - rmdir(PARAM.sys.global_stru_dir.c_str()); - rmdir(PARAM.sys.global_matrix_dir.c_str()); - rmdir(PARAM.sys.global_out_dir.c_str()); -} - -TEST_F(GlobalFile,mkdiratom) -{ - PARAM.sys.global_out_dir = "./"; - ModuleBase::Global_File::make_dir_atom("Si"); - int a = access("./Si/",0); - EXPECT_EQ(a , 0); - std::string ss = "./Si/"; - rmdir(ss.c_str()); -} - -TEST_F(GlobalFile,openlog) -{ - std::ofstream ofs; - ModuleBase::Global_File::open_log(ofs,"Si.log","md",true); - EXPECT_TRUE(ofs.is_open()); - ofs.close(); - ModuleBase::Global_File::open_log(ofs,"Si.log","md",false); - EXPECT_TRUE(ofs.is_open()); - ofs.close(); - std::string sss = "Si.log"; - remove(sss.c_str()); -} - -TEST_F(GlobalFile,closelog) -{ - std::ofstream ofs; - std::string sss = "Si.log"; - ofs.open(sss.c_str()); - ModuleBase::Global_File::close_log(ofs, sss); - EXPECT_FALSE(ofs.is_open()); - if (ofs.is_open()) - { - ofs.close(); - } - remove(sss.c_str()); -} - -TEST_F(GlobalFile,closealllog) -{ - /* - For module_io/input.cpp:line3578 close_log() is a void function, - All its contents is calling close_all_log() in module_base/global_file.cpp - For Input::close_log() what is left to test are the validities of parameters - GlobalV::MY_RANK and this->out_alllog. - */ - /* Test out_alllog == true case */ - std::string header = "running_"; - std::string tailCpuRank0 = "_cpu0.log"; - std::string tail = ".log"; - std::string f1 = header + PARAM.input.calculation + tailCpuRank0; - - if (GlobalV::ofs_running.is_open()) - { - GlobalV::ofs_running.close(); - } - if (GlobalV::ofs_warning.is_open()) - { - GlobalV::ofs_warning.close(); - } - GlobalV::ofs_running.open(f1.c_str()); - GlobalV::ofs_warning.open("warning.log"); - ModuleBase::Global_File::close_all_log(0,true,PARAM.input.calculation); - EXPECT_FALSE(GlobalV::ofs_running.is_open()); - if (GlobalV::ofs_running.is_open()) - { - GlobalV::ofs_running.close(); - } - EXPECT_FALSE(GlobalV::ofs_warning.is_open()); - if (GlobalV::ofs_warning.is_open()) - { - GlobalV::ofs_warning.close(); - } - remove(f1.c_str()); - //remove("warning.log"); - /* Test out_alllog == false case */ - GlobalV::ofs_running.open("running.log"); - GlobalV::ofs_warning.open("warning.log"); - ModuleBase::Global_File::close_all_log(0,false,PARAM.input.calculation); - EXPECT_FALSE(GlobalV::ofs_running.is_open()); - if (GlobalV::ofs_running.is_open()) - { - GlobalV::ofs_running.close(); - } - EXPECT_FALSE(GlobalV::ofs_warning.is_open()); - if (GlobalV::ofs_warning.is_open()) - { - GlobalV::ofs_warning.close(); - } - remove("running.log"); - remove("warning.log"); -} \ No newline at end of file diff --git a/source/module_base/test/global_function_test.cpp b/source/module_base/test/global_function_test.cpp deleted file mode 100644 index 05d4d70877..0000000000 --- a/source/module_base/test/global_function_test.cpp +++ /dev/null @@ -1,776 +0,0 @@ -#include "../global_function.h" -#include "../global_variable.h" -#define private public -#include "module_parameter/parameter.h" -#undef private -#include "../vector3.h" -#include "../tool_quit.h" -#include -#include -#include -#include - -#include "gmock/gmock.h" -#include "gtest/gtest.h" -#include - -/************************************************ - * unit test of functions in global_function - ***********************************************/ - -/** - * - Tested Function - * - NewPart - * - note the start of new calculation part - * - OutV1 - * - output a string name with format - * - OutV2 - * - output a string name and its value with format - * - OutV3 - * - output a string name and three value with format - * - OutP - * - output a string paramter, its value and explanation with format - * - TO_STRING - * - change an arbitrary type of data to string - * - MakeDir - * - make a directory - * - OutTime - * - print out calculation time > 0.1 minites - * - AutoSet - * - note the setting of values in code - * - Done - * - output info. and time on screen and log - * - Zero - * - zero out complex array - * - Scan - * - SCAN_BEGIN and SCAN_END used to read xml files - * - MapExist - * - search the existence of an index in a map - * - ReadValue - * - read a value and delete "\n" - * - Dcopy - * - copy vector - * - VectorToPointer - * - get the first pointer of (const) vector or valarray - * - Note - * - print out warning info in running.log file - * - COPYARRAY - * - copy complex or double arrays - * - IS_COLUMN_MAJOR_KS_SOLVER(PARAM.input.ks_solver) - * - judge whether the KS_SOLVER is column major - * - VECTOR_TO_PTR - * - get a copy of the ptr of a vector - * - VECTOR_TO_PTR_v3double - * - get a copy of the ptr of a vector whose elements' type belongs to Vector3 - * - MemAvailable - * - get the current memory valus - * - TETS_LEVEL - * - set the test level - * - BLOCK_HERE - * - add the block - */ - -inline void EXPECT_COMPLEX_FLOAT_EQ(const std::complex& a, const std::complex& b) -{ - EXPECT_FLOAT_EQ(a.real(), b.real()); - EXPECT_FLOAT_EQ(a.imag(), b.imag()); -} - -inline void EXPECT_COMPLEX_DOUBLE_EQ(const std::complex& a, const std::complex& b) -{ - EXPECT_DOUBLE_EQ(a.real(), b.real()); - EXPECT_DOUBLE_EQ(a.imag(), b.imag()); -} - - -template -inline void CHECK_ZEROS(T &size) -{ - bool* pt_b = nullptr; - int* pt_i = nullptr; - float* pt_f = nullptr; - double* pt_d = nullptr; - std::complex* pt_cf = nullptr; - std::complex* pt_cd = nullptr; - ModuleBase::Vector3* pt_v3 = nullptr; - pt_b = new bool[size]; - pt_i = new int[size]; - pt_f = new float[size]; - pt_d = new double[size]; - pt_cf = new std::complex[size]; - pt_cd = new std::complex[size]; - pt_v3 = new ModuleBase::Vector3[size]; - // long long size - long long size_ll = 100; - bool value_b = true; - int value_i = 2; - float value_f = 3.0; - double value_d = 4.8; - std::complex value_cf{1.3, 2.2}; - std::complex value_cd{1.1, 2.2}; - std::fill(&pt_b[0], &pt_b[size], value_b); - std::fill(&pt_i[0], &pt_i[size], value_i); - std::fill(&pt_f[0], &pt_f[size], value_f); - std::fill(&pt_d[0], &pt_d[size], value_d); - std::fill(&pt_cf[0], &pt_cf[size], value_cf); - std::fill(&pt_cd[0], &pt_cd[size], value_cd); - for (int i = 0; i < size; ++i) - { - pt_v3[i].set(1.1,2.2,3.3); - } - ModuleBase::GlobalFunc::ZEROS(pt_b, size); - ModuleBase::GlobalFunc::ZEROS(pt_i, size); - ModuleBase::GlobalFunc::ZEROS(pt_f, size); - ModuleBase::GlobalFunc::ZEROS(pt_d, size); - ModuleBase::GlobalFunc::ZEROS(pt_cf, size); - ModuleBase::GlobalFunc::ZEROS(pt_cd, size); - ModuleBase::GlobalFunc::ZEROS(pt_v3, size); - int zero_i = 0; - float zero_f = 0.0; - double zero_d = 0.0; - std::complex zero_cf{0.0, 0.0}; - std::complex zero_cd{0.0, 0.0}; - for (int i = 0; i < size; ++i) - { - EXPECT_FALSE(pt_b[i]); - EXPECT_EQ(pt_i[i],zero_i); - EXPECT_FLOAT_EQ(pt_f[i],zero_f); - EXPECT_DOUBLE_EQ(pt_d[i],zero_d); - EXPECT_COMPLEX_FLOAT_EQ(pt_cf[i], zero_cf); - EXPECT_COMPLEX_DOUBLE_EQ(pt_cd[i], zero_cd); - EXPECT_DOUBLE_EQ(pt_v3[i].x,zero_d); - EXPECT_DOUBLE_EQ(pt_v3[i].y,zero_d); - EXPECT_DOUBLE_EQ(pt_v3[i].z,zero_d); - } - delete[] pt_b; - delete[] pt_i; - delete[] pt_f; - delete[] pt_d; - delete[] pt_cf; - delete[] pt_cd; - delete[] pt_v3; -} - -class GlobalFunctionTest : public testing::Test -{ - protected: - std::ofstream ofs; - std::ifstream ifs; - time_t start, end; - // for capturing output in files and on screen - std::string output; - void SetUp() - { - GlobalV::ofs_warning.open("warning.log"); - GlobalV::ofs_running.open("running.log"); - } - void TearDown() - { - GlobalV::ofs_warning.close(); - GlobalV::ofs_running.close(); - remove("warning.log"); - remove("running.log"); - remove("tmp"); - } -}; - -TEST_F(GlobalFunctionTest, NewPart) -{ - ModuleBase::GlobalFunc::NEW_PART("New Part Starts ..."); - GlobalV::ofs_running.close(); - ifs.open("running.log"); - getline(ifs, output); - getline(ifs, output); - getline(ifs, output); - getline(ifs, output); - // output in running.log file - EXPECT_THAT(output, testing::HasSubstr("New Part Starts ...")); - ifs.close(); -} - -TEST_F(GlobalFunctionTest, OutScreen) -{ - testing::internal::CaptureStdout(); - int nbx = 100; - double rcut = 10.5; - ModuleBase::GlobalFunc::OUT("nbx", nbx); - ModuleBase::GlobalFunc::OUT("rcut", rcut); - output = testing::internal::GetCapturedStdout(); - EXPECT_THAT(output,testing::HasSubstr("nbx = 100")); - EXPECT_THAT(output,testing::HasSubstr("rcut = 10.5")); -} - -TEST_F(GlobalFunctionTest, OutV1) -{ - ofs.open("tmp"); - ModuleBase::GlobalFunc::OUT(ofs, "abacus"); - ofs.close(); - ifs.open("tmp"); - getline(ifs, output); - getline(ifs, output); - EXPECT_THAT(output, testing::HasSubstr("abacus")); - ifs.close(); -} - -TEST_F(GlobalFunctionTest, OutV2) -{ - ofs.open("tmp"); - bool tmp_bool = true; - int tmp_int = 1; - long tmp_long = 2; - unsigned long tmp_unsigned_long = 3; - float tmp_float = 4.0; - double tmp_double = 5.0; - std::string tmp_string = "string"; - ModuleBase::GlobalFunc::OUT(ofs, "tmp_bool", tmp_bool); - ModuleBase::GlobalFunc::OUT(ofs, "tmp_int", tmp_int); - ModuleBase::GlobalFunc::OUT(ofs, "tmp_long", tmp_long); - ModuleBase::GlobalFunc::OUT(ofs, "tmp_unsigned_long", tmp_unsigned_long); - ModuleBase::GlobalFunc::OUT(ofs, "tmp_float", tmp_float); - ModuleBase::GlobalFunc::OUT(ofs, "tmp_double", tmp_double); - ModuleBase::GlobalFunc::OUT(ofs, "tmp_string", tmp_string); - std::string para = ""; - int length = 0; - for (int i=0;i<50;i++) - { - para += "a"; - length = para.size()+1; - if(length == 5){ - char tmp_char[5]; - strcpy(tmp_char,para.c_str()); - ModuleBase::GlobalFunc::OUT(ofs, "para", tmp_char);} - else if (length == 6){ - char tmp_char[6]; - strcpy(tmp_char,para.c_str()); - ModuleBase::GlobalFunc::OUT(ofs, "para", tmp_char);} - else if (length == 13){ - char tmp_char[13]; - strcpy(tmp_char,para.c_str()); - ModuleBase::GlobalFunc::OUT(ofs, "para", tmp_char);} - else if (length == 15){ - char tmp_char[15]; - strcpy(tmp_char,para.c_str()); - ModuleBase::GlobalFunc::OUT(ofs, "para", tmp_char);} - else if (length == 20){ - char tmp_char[20]; - strcpy(tmp_char,para.c_str()); - ModuleBase::GlobalFunc::OUT(ofs, "para", tmp_char);} - else if (length == 22){ - char tmp_char[22]; - strcpy(tmp_char,para.c_str()); - ModuleBase::GlobalFunc::OUT(ofs, "para", tmp_char);} - else if (length == 23){ - char tmp_char[23]; - strcpy(tmp_char,para.c_str()); - ModuleBase::GlobalFunc::OUT(ofs, "para", tmp_char);} - else if (length == 25){ - char tmp_char[25]; - strcpy(tmp_char,para.c_str()); - ModuleBase::GlobalFunc::OUT(ofs, "para", tmp_char);} - else if (length == 28){ - char tmp_char[28]; - strcpy(tmp_char,para.c_str()); - ModuleBase::GlobalFunc::OUT(ofs, "para", tmp_char);} - else if (length == 29){ - char tmp_char[29]; - strcpy(tmp_char,para.c_str()); - ModuleBase::GlobalFunc::OUT(ofs, "para", tmp_char);} - else if (length == 30){ - char tmp_char[30]; - strcpy(tmp_char,para.c_str()); - ModuleBase::GlobalFunc::OUT(ofs, "para", tmp_char);} - else if (length == 32){ - char tmp_char[32]; - strcpy(tmp_char,para.c_str()); - ModuleBase::GlobalFunc::OUT(ofs, "para", tmp_char);} - } - ofs.close(); - ifs.open("tmp"); - std::string str((std::istreambuf_iterator(ifs)),std::istreambuf_iterator()); - EXPECT_THAT(str, testing::HasSubstr("tmp_bool = 1")); - EXPECT_THAT(str, testing::HasSubstr("tmp_int = 1")); - EXPECT_THAT(str, testing::HasSubstr("tmp_long = 2")); - EXPECT_THAT(str, testing::HasSubstr("tmp_unsigned_long = 3")); - EXPECT_THAT(str, testing::HasSubstr("tmp_float = 4")); - EXPECT_THAT(str, testing::HasSubstr("tmp_double = 5")); - EXPECT_THAT(str, testing::HasSubstr("tmp_string = string")); - std::string tmp_para = "a"; - for (int i=0;i<50;i++) - { - tmp_para += "a"; - length = tmp_para.size()+1; - if (length == 32) { EXPECT_THAT(str, testing::HasSubstr(tmp_para)); -} - } - ifs.close(); -} - -TEST_F(GlobalFunctionTest, OutV3) -{ - ofs.open("tmp"); - int nx = 100; - int ny = 125; - int nz = 375; - double ax = 1.1; - double ay = 2.2; - double az = 3.3; - ModuleBase::GlobalFunc::OUT(ofs, "grid", nx, ny, nz); - ModuleBase::GlobalFunc::OUT(ofs, "direct", ax, ay, az); - ofs.close(); - ifs.open("tmp"); - getline(ifs, output); - EXPECT_THAT(output, testing::HasSubstr("grid = [ 100, 125, 375 ]")); - getline(ifs, output); - EXPECT_THAT(output, testing::HasSubstr("direct = [ 1.1, 2.2, 3.3 ]")); - ifs.close(); -} -// P for parameters -TEST_F(GlobalFunctionTest, OutP) -{ - ofs.open("tmp"); - bool tmp_bool = true; - int tmp_int = 1; - double tmp_double = 2.0; - std::string tmp_string = "string"; - std::string tmp_bool_ex = "tmp_bool_ex"; - std::string tmp_int_ex = "tmp_int_ex"; - std::string tmp_double_ex = "tmp_double_ex"; - std::string tmp_string_ex = "tmp_string_ex"; - ofs << std::setiosflags(std::ios::left); - ModuleBase::GlobalFunc::OUTP(ofs, "tmp_bool", tmp_bool, tmp_bool_ex); - ModuleBase::GlobalFunc::OUTP(ofs, "tmp_int", tmp_int, tmp_int_ex); - ModuleBase::GlobalFunc::OUTP(ofs, "tmp_double", tmp_double, tmp_double_ex); - ModuleBase::GlobalFunc::OUTP(ofs, "tmp_string", tmp_string, tmp_string_ex); - ofs.close(); - ifs.open("tmp"); - std::string str((std::istreambuf_iterator(ifs)),std::istreambuf_iterator()); - EXPECT_THAT(str, testing::HasSubstr("tmp_bool 1 #tmp_bool_ex")); - EXPECT_THAT(str, testing::HasSubstr("tmp_int 1 #tmp_int_ex")); - EXPECT_THAT(str, testing::HasSubstr("tmp_double 2 #tmp_double_ex")); - EXPECT_THAT(str, testing::HasSubstr("tmp_string string #tmp_string_ex")); - ifs.close(); -} - -TEST_F(GlobalFunctionTest, ToString) -{ - bool tmp_bool = true; - int tmp_int = 1; - long tmp_long = 2; - unsigned long tmp_unsigned_long = 3; - float tmp_float = 4.0; - double tmp_double = 5.0; - std::string tmp_string = "string"; - EXPECT_EQ(ModuleBase::GlobalFunc::TO_STRING(tmp_bool),"1"); - EXPECT_EQ(ModuleBase::GlobalFunc::TO_STRING(tmp_int),"1"); - EXPECT_EQ(ModuleBase::GlobalFunc::TO_STRING(tmp_long),"2"); - EXPECT_EQ(ModuleBase::GlobalFunc::TO_STRING(tmp_unsigned_long),"3"); - EXPECT_EQ(ModuleBase::GlobalFunc::TO_STRING(tmp_float),"4"); - EXPECT_EQ(ModuleBase::GlobalFunc::TO_STRING(tmp_double),"5"); - EXPECT_EQ(ModuleBase::GlobalFunc::TO_STRING(tmp_string),"string"); - std::string para = ""; - int length = 0; - for (int i=0;i<100;i++) - { - para += "a"; - length = para.size()+1; - if(length == 42){ - char tmp_char[42]; - strcpy(tmp_char,para.c_str()); - EXPECT_EQ(ModuleBase::GlobalFunc::TO_STRING(tmp_char),para);} - else if (length == 47){ - char tmp_char[47]; - strcpy(tmp_char,para.c_str()); - EXPECT_EQ(ModuleBase::GlobalFunc::TO_STRING(tmp_char),para);} - else if (length == 50){ - char tmp_char[50]; - strcpy(tmp_char,para.c_str()); - EXPECT_EQ(ModuleBase::GlobalFunc::TO_STRING(tmp_char),para);} - else if (length == 52){ - char tmp_char[52]; - strcpy(tmp_char,para.c_str()); - EXPECT_EQ(ModuleBase::GlobalFunc::TO_STRING(tmp_char),para);} - else if (length == 53){ - char tmp_char[53]; - strcpy(tmp_char,para.c_str()); - EXPECT_EQ(ModuleBase::GlobalFunc::TO_STRING(tmp_char),para);} - else if (length == 63){ - char tmp_char[63]; - strcpy(tmp_char,para.c_str()); - EXPECT_EQ(ModuleBase::GlobalFunc::TO_STRING(tmp_char),para);} - else if (length == 64){ - char tmp_char[64]; - strcpy(tmp_char,para.c_str()); - EXPECT_EQ(ModuleBase::GlobalFunc::TO_STRING(tmp_char),para);} - else if (length == 74){ - char tmp_char[74]; - strcpy(tmp_char,para.c_str()); - EXPECT_EQ(ModuleBase::GlobalFunc::TO_STRING(tmp_char),para);} - else if (length == 81){ - char tmp_char[81]; - strcpy(tmp_char,para.c_str()); - EXPECT_EQ(ModuleBase::GlobalFunc::TO_STRING(tmp_char),para);} - else if (length == 83){ - char tmp_char[83]; - strcpy(tmp_char,para.c_str()); - EXPECT_EQ(ModuleBase::GlobalFunc::TO_STRING(tmp_char),para);} - } -} - -TEST_F(GlobalFunctionTest, MakeDir) -{ - GlobalV::MY_RANK = 0; - ModuleBase::GlobalFunc::MAKE_DIR("scf"); - auto error1 = std::system("test -d "); - EXPECT_EQ(error1, 0); - auto error2 = std::system("rm -r scf "); - EXPECT_EQ(error2, 0); - SUCCEED(); -} - -TEST_F(GlobalFunctionTest, OutTime) -{ - std::string name = "scf"; - start = time(nullptr); - end = time(nullptr) + 200; - ModuleBase::GlobalFunc::OUT_TIME(name, start, end); - GlobalV::ofs_warning.close(); - ifs.open("warning.log"); - getline(ifs, output); - getline(ifs, output); - EXPECT_THAT(output, testing::HasSubstr("NAME < scf >")); - ifs.close(); -} - -TEST_F(GlobalFunctionTest, AutoSet) -{ - bool tmp_b = false; - int tmp_i = 1; - float tmp_f = 2.0; - double tmp_d = 3.0; - std::string tmp_string = "string"; - ModuleBase::GlobalFunc::AUTO_SET("tmp_b", tmp_b); - ModuleBase::GlobalFunc::AUTO_SET("tmp_i", tmp_i); - ModuleBase::GlobalFunc::AUTO_SET("tmp_f", tmp_f); - ModuleBase::GlobalFunc::AUTO_SET("tmp_d", tmp_d); - ModuleBase::GlobalFunc::AUTO_SET("tmp_string", tmp_string); - std::string para = ""; - int length = 0; - for (int i=0;i<10;i++) - { - para += "a"; - length = para.size()+1; - if(length == 2){ - char tmp_char[2]; - strcpy(tmp_char,para.c_str()); - ModuleBase::GlobalFunc::AUTO_SET("tmp_char",tmp_char);} - else if (length == 3){ - char tmp_char[3]; - strcpy(tmp_char,para.c_str()); - ModuleBase::GlobalFunc::AUTO_SET("tmp_char",tmp_char);} - else if (length == 6){ - char tmp_char[6]; - strcpy(tmp_char,para.c_str()); - ModuleBase::GlobalFunc::AUTO_SET("tmp_char",tmp_char);} - else if (length == 8){ - char tmp_char[8]; - strcpy(tmp_char,para.c_str()); - ModuleBase::GlobalFunc::AUTO_SET("tmp_char",tmp_char);} - } - GlobalV::ofs_warning.close(); - ifs.open("warning.log"); - std::string str((std::istreambuf_iterator(ifs)),std::istreambuf_iterator()); - EXPECT_THAT(str, testing::HasSubstr("AUTO_SET tmp_b to 0")); - EXPECT_THAT(str, testing::HasSubstr("AUTO_SET tmp_i to 1")); - EXPECT_THAT(str, testing::HasSubstr("AUTO_SET tmp_f to 2")); - EXPECT_THAT(str, testing::HasSubstr("AUTO_SET tmp_d to 3")); - EXPECT_THAT(str, testing::HasSubstr("AUTO_SET tmp_string to string")); - EXPECT_THAT(str, testing::HasSubstr("AUTO_SET tmp_char to aaaaaaa")); - ifs.close(); -} - -TEST_F(GlobalFunctionTest, Done) -{ - ofs.open("tmp"); - testing::internal::CaptureStdout(); - ModuleBase::GlobalFunc::DONE(ofs, "SETUP UNITCELL"); - // output on screen - output = testing::internal::GetCapturedStdout(); - EXPECT_THAT(output, testing::HasSubstr("DONE")); - EXPECT_THAT(output, testing::HasSubstr("SETUP UNITCELL")); - ofs.close(); - // output in file - ifs.open("tmp"); - std::string outputf; - getline(ifs, outputf); - EXPECT_THAT(outputf, testing::HasSubstr("DONE")); - EXPECT_THAT(outputf, testing::HasSubstr("SETUP UNITCELL")); - ifs.close(); -} - -TEST_F(GlobalFunctionTest, Zeros) -{ - int size_i = 1000; - CHECK_ZEROS(size_i); - long size_l = 1000; - CHECK_ZEROS(size_l); - unsigned long size_ul = 1000; - CHECK_ZEROS(size_ul); - long long size_ll = 1000; - CHECK_ZEROS(size_ll); -} - -TEST_F(GlobalFunctionTest, Scan) -{ - ofs.open("tmp"); - ofs << "" << std::endl; - ofs << "100 100 100" << std::endl; - ofs << "" << std::endl; - ofs.close(); - ifs.open("tmp"); - EXPECT_FALSE(ModuleBase::GlobalFunc::SCAN_BEGIN(ifs, "")); - getline(ifs, output); - getline(ifs, output); - // std::cout << output << std::endl; - ModuleBase::GlobalFunc::SCAN_END(ifs, ""); - EXPECT_TRUE(ModuleBase::GlobalFunc::SCAN_BEGIN(ifs, "")); - getline(ifs, output); - getline(ifs, output); - // std::cout << output << std::endl; - ModuleBase::GlobalFunc::SCAN_END(ifs, ""); - ifs.close(); - ifs.open("warning.log"); - getline(ifs, output); - EXPECT_THAT(output, testing::HasSubstr("In SCAN_BEGIN, can't find: block.")); - getline(ifs, output); - EXPECT_THAT(output, testing::HasSubstr("In SCAN_END, can't find: block.")); - ifs.close(); -} - -TEST_F(GlobalFunctionTest, MapExist) -{ - std::map SPIN = {{1, 2}, {3, 4}, {5, 6}}; - EXPECT_EQ(ModuleBase::GlobalFunc::MAP_EXIST(SPIN, 1), &SPIN[1]); - EXPECT_EQ(ModuleBase::GlobalFunc::MAP_EXIST(SPIN, 3), &SPIN[3]); - EXPECT_EQ(ModuleBase::GlobalFunc::MAP_EXIST(SPIN, 5), &SPIN[5]); -} - -TEST_F(GlobalFunctionTest, ReadValue) -{ - ofs.open("tmp"); - ofs << "100" << std::endl; - ofs << "3.0" << std::endl; - ofs << "string" << std::endl; - ofs.close(); - ifs.open("tmp"); - int tmp_int = 0; - double tmp_double = 0.0; - std::string tmp_string; - // source/module_cell/read_atoms.cpp line 153:154 - ModuleBase::GlobalFunc::READ_VALUE(ifs, tmp_int); - ModuleBase::GlobalFunc::READ_VALUE(ifs, tmp_double); - ModuleBase::GlobalFunc::READ_VALUE(ifs, tmp_string); - ifs.close(); - EXPECT_EQ(tmp_int, 100); - EXPECT_DOUBLE_EQ(tmp_double, 3.0); - EXPECT_EQ(tmp_string, "string"); -} - -TEST_F(GlobalFunctionTest, Dcopy) -{ - int size = 100; - std::vector> aa(size, std::complex(1.0, 2.0)); - std::vector> bb(size); - std::vector daa(size,1.1); - std::vector dbb(size); - std::complex* aalist = new std::complex[size]; - std::complex* bblist = new std::complex[size]; - for (int i=0;i(1.0,2.0); - bblist[i] = std::complex(0.0,0.0); - } - double* daalist = new double[size]; - double* dbblist = new double[size]; - for (int i=0;i aa(size, 1.0); - EXPECT_EQ(ModuleBase::GlobalFunc::VECTOR_TO_PTR(aa), aa.data()); - std::valarray bb(1.0, size); - EXPECT_EQ(ModuleBase::GlobalFunc::VECTOR_TO_PTR(bb), &bb[0]); - const std::vector cc(size, 1.0); - EXPECT_EQ(ModuleBase::GlobalFunc::VECTOR_TO_PTR(cc), cc.data()); - const std::valarray dd(1.0, size); - EXPECT_EQ(ModuleBase::GlobalFunc::VECTOR_TO_PTR(dd), &dd[0]); -} - -TEST_F(GlobalFunctionTest, COPYARRAY) -{ - long size = 100; - std::complex* aa = nullptr; - std::complex* bb = nullptr; - aa = new std::complex[size]; - bb = new std::complex[size]; - std::complex value{1.1, 2.2}; - std::fill(&aa[0], &aa[size], value); - ModuleBase::GlobalFunc::COPYARRAY(aa,bb,size); - for (int i = 0; i < size; ++i) - { - EXPECT_COMPLEX_DOUBLE_EQ(bb[i], value); - } - double* daa = nullptr; - double* dbb = nullptr; - daa = new double[size]; - dbb = new double[size]; - std::fill(&daa[0],&daa[size],3.3); - ModuleBase::GlobalFunc::COPYARRAY(daa,dbb,size); - for (int i = 0; i < size; ++i) - { - EXPECT_DOUBLE_EQ(dbb[i], 3.3); - } - delete[] aa; - delete[] bb; - delete[] daa; - delete[] dbb; -} - -TEST_F(GlobalFunctionTest,IsColumnMajor) -{ - PARAM.input.ks_solver = "genelpa"; - EXPECT_TRUE(ModuleBase::GlobalFunc::IS_COLUMN_MAJOR_KS_SOLVER(PARAM.input.ks_solver)); -} - -TEST_F(GlobalFunctionTest,Vector2Ptr) -{ - int size = 100; - std::vector> aa(size, std::complex(1.0, 2.0)); - std::complex* ptr_d = nullptr; - ptr_d=ModuleBase::GlobalFunc::VECTOR_TO_PTR(aa); - for (int i = 0; i < size; ++i) - { - EXPECT_COMPLEX_DOUBLE_EQ(ptr_d[i],std::complex(1.0,2.0)); - } -} - -TEST_F(GlobalFunctionTest,MemAvailable) -{ - for(int i=0;i<5;i++) - { - std::ifstream ifs("/proc/meminfo"); - while (ifs.good()) - { - std::string label, size, kB; - ifs >> label >> size >> kB; - if (label == "MemAvailable:") - { - EXPECT_LE(std::stol(size)-1000,ModuleBase::GlobalFunc::MemAvailable()); - EXPECT_GE(std::stol(size)+1000,ModuleBase::GlobalFunc::MemAvailable()); - } - } - } -} - - -TEST_F(GlobalFunctionTest,BlockHere) -{ -#ifdef __MPI -#undef __MPI -#endif - std::string output2; - std::string block_in="111"; - GlobalV::MY_RANK=1; - testing::internal::CaptureStdout(); - EXPECT_EXIT(ModuleBase::GlobalFunc::BLOCK_HERE(block_in), ::testing::ExitedWithCode(0),""); - output2 = testing::internal::GetCapturedStdout(); - EXPECT_THAT(output2,testing::HasSubstr("\n********************************************" - "\n Here is a Block, 1: go on 0: quit" - "\n 111" - "\n********************************************")); -} - -TEST_F(GlobalFunctionTest,BlockHere2) -{ -#ifdef __MPI -#undef __MPI -#endif - std::string output2; - std::string block_in="111"; - GlobalV::MY_RANK=0; - std::string fake_input = "1"; - std::istringstream iss{fake_input}; - std::cin.rdbuf(iss.rdbuf()); - testing::internal::CaptureStdout(); -// EXPECT_EXIT(ModuleBase::GlobalFunc::BLOCK_HERE(block_in), ::testing::ExitedWithCode(1),""); - ModuleBase::GlobalFunc::BLOCK_HERE(block_in); - output2 = testing::internal::GetCapturedStdout(); - EXPECT_THAT(output2,testing::HasSubstr("\n********************************************" - "\n Here is a Block, 1: go on 0: quit" - "\n 111" - "\n********************************************")); -} - -TEST_F(GlobalFunctionTest,BlockHere3) -{ -#ifdef __MPI -#undef __MPI -#endif - std::string output2; - std::string block_in="111"; - GlobalV::MY_RANK=0; - testing::internal::CaptureStdout(); - std::string fake_input = "0"; - std::istringstream iss{fake_input}; - std::cin.rdbuf(iss.rdbuf()); - EXPECT_EXIT(ModuleBase::GlobalFunc::BLOCK_HERE(block_in), ::testing::ExitedWithCode(0),""); - output2 = testing::internal::GetCapturedStdout(); - EXPECT_THAT(output2,testing::HasSubstr("\n********************************************" - "\n Here is a Block, 1: go on 0: quit" - "\n 111" - "\n********************************************")); -} - -/* -TEST_F(GlobalFunctionTest, Note) -{ - ModuleBase::GlobalFunc::NOTE("Wrong Settings!"); - GlobalV::ofs_running.close(); - ifs.open("running.log"); - getline(ifs, output); - getline(ifs, output); - // output in runnint.log file - EXPECT_THAT(output, testing::HasSubstr("Wrong Settings!")); - ifs.close(); -} -*/ - -TEST_F(GlobalFunctionTest,Vector2Ptr_v3double) -{ - int size = 100; - std::vector> abcd(size, ModuleBase::Vector3(1.1,2.2,3.3)); - ModuleBase::Vector3* ptr_v3d = nullptr; - ptr_v3d=ModuleBase::GlobalFunc::VECTOR_TO_PTR(abcd); - for (int i = 0; i < size; ++i) - { - EXPECT_EQ(ptr_v3d[i],ModuleBase::Vector3(1.1,2.2,3.3)); - } -} - - diff --git a/source/module_base/test/gram_schmidt_orth_test.cpp b/source/module_base/test/gram_schmidt_orth_test.cpp deleted file mode 100644 index b1b8f409b8..0000000000 --- a/source/module_base/test/gram_schmidt_orth_test.cpp +++ /dev/null @@ -1,139 +0,0 @@ -#include"../gram_schmidt_orth.h" -#include"../gram_schmidt_orth-inl.h" -#include"gtest/gtest.h" - - -#define DOUBLETHRESHOLD 1e-8 - - -/************************************************ -* unit test of class Gram_Schmidt_Orth -***********************************************/ - -/** - * Based on an linearly independent, but not orthonormal, - * set of functions x:{x1,x2,x3,...}, we can construct an - * orthonormal set X:{X1, X2, X3, ...} by using Gram-Schmidt - * orthogonalization. - * The new set X should has below properties: - * 1. X1 = x1/||x1|| - * 2. = 1 if (i == j) else 0 - * - * Note:in this class, for coordinate of sphere, the inner product - * of two radial function f(r) and g(r) equals the integral of r^2*f(r)*g(r) - * $$ (f(r),g(r)) = {\int}r^2f(r)g(r)dr $$ - * - */ - -class GramSchmidtOrth -{ - public: - int nbasis; - int ndim; - double dr; - std::vector r2; - double norm0; - ModuleBase::Gram_Schmidt_Orth::Coordinate coordinate; - std::vector rab; - std::vector> basis; - - GramSchmidtOrth(int nbasis, int ndim, double dr, - ModuleBase::Gram_Schmidt_Orth::Coordinate coordinate): - nbasis(nbasis),ndim(ndim),dr(dr),coordinate(coordinate) - { - basis.resize(nbasis,std::vector(ndim)); - rab.resize(ndim,dr); - r2.resize(ndim,1.0); - - norm0 = sqrt(1.0/3.0 * pow(dr*(static_cast(ndim-1)),3.0)); - if (ModuleBase::Gram_Schmidt_Orth::Coordinate::Sphere == this->coordinate) - { - for(int i=0;i(ndim-1)),5.0)); - } - - //build the function basis - for(int i=0;i(j) * dr, static_cast(i+1)); - } - } - } - - //calculate the inner product of two vector - double inner_product(std::vector a, std::vector b) - { - double ip; - std::vector mul_func = ModuleBase::Mathzone::Pointwise_Product(a,b); - std::vector mul_func1 = ModuleBase::Mathzone::Pointwise_Product(mul_func,r2); - ModuleBase::Integral::Simpson_Integral(mul_func1.size(),ModuleBase::GlobalFunc::VECTOR_TO_PTR(mul_func1),ModuleBase::GlobalFunc::VECTOR_TO_PTR(rab),ip); - return ip; - } - -}; - -class GramSchmidtOrthTest : public ::testing::TestWithParam {}; - - -TEST_P(GramSchmidtOrthTest,CalOrth) -{ - GramSchmidtOrth gsot = GetParam(); - ModuleBase::Gram_Schmidt_Orth gso_sphere(gsot.rab,gsot.coordinate); - std::vector> old_basis = gsot.basis; - std::vector> new_basis = gso_sphere.cal_orth(old_basis); - - //========================================================== - // VERIFY X0=x0/|x0| - // the integral of old_basis[0] = {\int}_{0}^{dr*(ndim-1)} r^2*r*r dr - // =1/5*r^5|_{0}^{dr*(ndim-1)} - //========================================================== - for(int i=0;i = 0 for i!=j - //========================================================== - int niter = 1; - int maxiter = 1; - bool pass = false; - double maxip; - - //do iteration. - while (true) - { - int nbasis = new_basis.size(); - maxip = std::abs(gsot.inner_product(new_basis[nbasis-1],new_basis[nbasis-2])); - for(int i=0;i maxip) {maxip = std::abs(ip);} - } - } - if (maxip < DOUBLETHRESHOLD) {pass = true; break;}; - if (niter >= maxiter) {break;} - - niter += 1; - old_basis = gso_sphere.cal_orth(new_basis); new_basis = old_basis; - } - - //std::cout << "nbasis=" << gsot.nbasis << "niter=" << niter << " max_inner_product=" << std::setprecision(15) << maxip << std::endl; - EXPECT_TRUE(pass) << "nbasis=" << gsot.nbasis << "niter=" << niter << " max_inner_product=" << std::setprecision(15) << maxip; -} - -INSTANTIATE_TEST_SUITE_P(VerifyOrth,GramSchmidtOrthTest,::testing::Values( - GramSchmidtOrth(10,101,0.1,ModuleBase::Gram_Schmidt_Orth::Coordinate::Sphere), - GramSchmidtOrth(20,1001,0.01,ModuleBase::Gram_Schmidt_Orth::Coordinate::Sphere), - GramSchmidtOrth(50,10001,0.001,ModuleBase::Gram_Schmidt_Orth::Coordinate::Sphere), - GramSchmidtOrth(10,10001,0.001,ModuleBase::Gram_Schmidt_Orth::Coordinate::Cartesian), - GramSchmidtOrth(20,1001,0.01,ModuleBase::Gram_Schmidt_Orth::Coordinate::Cartesian), - GramSchmidtOrth(50,101,0.1,ModuleBase::Gram_Schmidt_Orth::Coordinate::Cartesian) -)); - diff --git a/source/module_base/test/intarray_test.cpp b/source/module_base/test/intarray_test.cpp deleted file mode 100644 index 6ccfb24452..0000000000 --- a/source/module_base/test/intarray_test.cpp +++ /dev/null @@ -1,324 +0,0 @@ -#include "../intarray.h" -#include "gtest/gtest.h" -#include "gmock/gmock.h" - -/************************************************ - * unit test of class IntArray - ***********************************************/ - -/** - * - Tested Functions: - * - Construct - * - construct an int array (2 to 6 dimensions) - * - Creat - * - create an int array (2 to 6 dimensions) - * - GetArrayCount - * - get the total number of int array created - * - GetSize - * - get the total size of an int array - * - GetDim - * - get the dimension of an int array - * - ZeroOut - * - set all elements of an int array to zero - * - GetBound - * - get the size of each dimension of an int array - * - ArrayEqReal - * - set all value of an array to an int number - * - ArrayEqArray - * - equal an intarray to another intarray - * - Parentheses - * - access element by using operator"()" - * - ConstParentheses - * - access element by using "()" through pointer - * - without changing its elements - * -IntArrayAlloc - * - Warning of integer array allocation error - */ - -namespace ModuleBase -{ -void IntArrayAlloc(); -} - -class IntArrayTest : public testing::Test -{ -protected: - ModuleBase::IntArray a2, a3, a4, a5, a6; - int aa = 11; - int bb = 1; - int count0; - int count1; - const int zero = 0; -}; - -TEST_F(IntArrayTest,GetArrayCount) -{ - count0 = ModuleBase::IntArray::getArrayCount(); - ModuleBase::IntArray c3, c4; - count1 = ModuleBase::IntArray::getArrayCount(); - EXPECT_EQ((count1-count0),2); -} - -TEST_F(IntArrayTest,Construct) -{ - ModuleBase::IntArray x2(1,5); - ModuleBase::IntArray x3(1,5,3); - ModuleBase::IntArray x4(1,7,3,4); - ModuleBase::IntArray x5(1,5,3,8,2); - ModuleBase::IntArray x6(1,7,3,4,3,2); - EXPECT_EQ(x2.getSize(),5); - EXPECT_EQ(x3.getSize(),15); - EXPECT_EQ(x4.getSize(),84); - EXPECT_EQ(x5.getSize(),240); - EXPECT_EQ(x6.getSize(),504); -} - -TEST_F(IntArrayTest,Create) -{ - a2.create(2,1); - a3.create(3,2,1); - a4.create(4,3,2,1); - a5.create(5,4,3,2,1); - a6.create(6,5,4,3,2,1); - EXPECT_EQ(a2.getSize(),2); - EXPECT_EQ(a3.getSize(),6); - EXPECT_EQ(a4.getSize(),24); - EXPECT_EQ(a5.getSize(),120); - EXPECT_EQ(a6.getSize(),720); -} - - -TEST_F(IntArrayTest,GetSize) -{ - ModuleBase::IntArray x3(1,5,3); - ModuleBase::IntArray x4(1,7,3,4); - EXPECT_EQ(x3.getSize(),15); - EXPECT_EQ(x4.getSize(),84); -} - -TEST_F(IntArrayTest,GetDim) -{ - a2.create(2,3); - a3.create(3,5,1); - a4.create(4,3,7,1); - a5.create(5,4,1,2,1); - a6.create(6,5,9,3,2,1); - EXPECT_EQ(a2.getDim(),2); - EXPECT_EQ(a3.getDim(),3); - EXPECT_EQ(a4.getDim(),4); - EXPECT_EQ(a5.getDim(),5); - EXPECT_EQ(a6.getDim(),6); -} - -TEST_F(IntArrayTest,ZeroOut) -{ - a2.create(2,3); - a3.create(3,5,1); - a4.create(4,3,7,1); - a5.create(5,4,1,2,1); - a6.create(6,5,9,3,2,1); - a2.zero_out(); - a3.zero_out(); - a4.zero_out(); - a5.zero_out(); - a6.zero_out(); - for (int i=0;i - -/************************************************ - * unit test of inverse_matrix.h - ***********************************************/ - -/** - * - Tested Functions: - * - InverseMatrixComplex - * - use Inverse_Matrix_Complex to inverse a Hermite matrix - * - functions: init and using_zheev - * - * - Inverse_Matrix_Real - * - computes the inverse of a dim*dim real matrix - */ - -TEST(InverseMatrixComplexTest, InverseMatrixComplex) -{ - int dim = 10; - ModuleBase::ComplexMatrix B(dim, dim); - ModuleBase::ComplexMatrix C(dim, dim); - ModuleBase::ComplexMatrix D(dim, dim); - double a; - double b; - double c; - // construct a Hermite matrix - for (int j = 0; j < dim; j++) - { - for (int i = 0; i <= j; i++) - { - if (i == j) - { - c = std::rand(); - B(i, j) = std::complex(c, 0.0); - } - else - { - a = std::rand(); - b = std::rand(); - B(i, j) = std::complex(a, b); - B(j, i) = conj(B(i, j)); - } - } - } - ModuleBase::Inverse_Matrix_Complex IMC; - IMC.init(dim); - IMC.using_zheev(B, C); - D = B * C; - for (int i = 0; i < dim; i++) - { - EXPECT_NEAR(D(i, i).real(), 1.0, 1e-14); - EXPECT_NEAR(D(i, i).imag(), 0.0, 1e-14); - // std::cout << D(i,i).real() << " " << D(i,i).imag() << std::endl; - } -} - -TEST(InverseMatrixRealTest, InverseMatrixReal) -{ - int dim = 3; - double in[9]; - double out[9]; - for (int i = 0; i < dim; i++) - { - for (int j = 0; j < dim; j++) - { - if (i == j) - { - in[i * dim + j] = 2.0; - } - else - { - in[i * dim + j] = 0.0; - } - } - } - ModuleBase::Inverse_Matrix_Real(dim, in, out); - for (int i = 0; i < dim; i++) - { - for (int j = 0; j < dim; j++) - { - if (i == j) - { - EXPECT_DOUBLE_EQ(in[i * dim + j], 2.0); - } - else - { - EXPECT_DOUBLE_EQ(in[i * dim + j], 0.0); - } - } - } - EXPECT_DOUBLE_EQ(out[0], 0.5); - EXPECT_DOUBLE_EQ(out[1], 0.0); - EXPECT_DOUBLE_EQ(out[2], 0.0); - EXPECT_DOUBLE_EQ(out[3], 0.0); - EXPECT_DOUBLE_EQ(out[4], 0.5); - EXPECT_DOUBLE_EQ(out[5], 0.0); - EXPECT_DOUBLE_EQ(out[6], 0.0); - EXPECT_DOUBLE_EQ(out[7], 0.0); - EXPECT_DOUBLE_EQ(out[8], 0.5); -} diff --git a/source/module_base/test/lapack_connector_test.cpp b/source/module_base/test/lapack_connector_test.cpp deleted file mode 100644 index b46cfa214b..0000000000 --- a/source/module_base/test/lapack_connector_test.cpp +++ /dev/null @@ -1,154 +0,0 @@ -#include "../lapack_connector.h" - -#include -#include -#include - -#include "gtest/gtest.h" - -/************************************************ - * unit test of lapack_connector.h - ***********************************************/ - -/** - * - Tested Functions: - * - zhegv_ - * - use zhegv_ to compute the eigenvalues and eigenvectors of - * - a complex Hermitian-definite generalized eigenproblem - */ - -class LapackConnectorTest : public testing::Test -{ - protected: - void SetUp() override - { - // Initialize matrices A and B and the eigenvalue vector - // (Use appropriate values for your test case) - A = { - std::complex(2.0, 0.0), - std::complex(1.0, -1.0), - std::complex(1.0, 1.0), - std::complex(3.0, 0.0), - }; - - // Create a random square matrix C with complex elements - std::vector> C = { - {1.0, 2.0}, - {3.0, 4.0}, - {5.0, 6.0}, - {7.0, 8.0} - }; - - // Compute the conjugate transpose of C - std::vector> C_conj_transpose = { - {C[0].real(), -C[0].imag()}, - {C[1].real(), -C[1].imag()}, - {C[2].real(), -C[2].imag()}, - {C[3].real(), -C[3].imag()} - }; - - // Compute the product of C_conj_transpose and C to obtain B - B = {{C_conj_transpose[0] * C[0] + C_conj_transpose[1] * C[1]}, - {C_conj_transpose[0] * C[2] + C_conj_transpose[1] * C[3]}, - {C_conj_transpose[2] * C[0] + C_conj_transpose[3] * C[1]}, - {C_conj_transpose[2] * C[2] + C_conj_transpose[3] * C[3]}}; - - n = sqrt(A.size()); - lda = n; - ldb = n; - w.resize(n); - - // Set up the parameters for zhegv_ - itype = 1; - jobz = 'V'; - uplo = 'U'; - lwork = -1; - info = 0; - - // Ensure that B is positive definite - } - - int itype; - char jobz; - char uplo; - int n; - int lda; - int ldb; - int lwork; - int info; - // matrices A and B are column-major - std::vector> A; - std::vector> B; - std::vector w; -}; - -// Test the zhegv_ function -TEST_F(LapackConnectorTest, ZHEGV) -{ - // First, query the optimal size of the work array - std::complex work_query; - double rwork_query; - zhegv_(&itype, - &jobz, - &uplo, - &n, - A.data(), - &lda, - B.data(), - &ldb, - w.data(), - &work_query, - &lwork, - &rwork_query, - &info); - lwork = static_cast(work_query.real()); - std::vector> work(lwork); - // std::vector rwork(static_cast(rwork_query)); - // the above line is not working as rwork_query will return -nan - // std::vector rwork(7 * lwork); - std::vector rwork(7 * n); - - // Now, call zhegv_ with the optimal work array size - zhegv_(&itype, - &jobz, - &uplo, - &n, - A.data(), - &lda, - B.data(), - &ldb, - w.data(), - work.data(), - &lwork, - rwork.data(), - &info); - - // Check that the function completed successfully - ASSERT_EQ(info, 0); - - // Check the computed eigenvalues and eigenvectors - // (Use appropriate values for your test case) - std::vector expected_eigenvalues = {0.014371905048252809, 1.0871905949517402}; - std::vector> expected_eigenvectors = { - {0.00029066041795582461, -0.042636598658647745}, - {0.07557994526773984, 0.0 }, - {-0.81903769393029213, -0.083945171943878405}, - {0.33387897788468901, 0.0 } - }; - - for (size_t i = 0; i < n; ++i) - { - EXPECT_NEAR(w[i], expected_eigenvalues[i], 1e-8); - for (size_t j = 0; j < n; ++j) - { - EXPECT_NEAR(A[i * n + j].real(), expected_eigenvectors[i * n + j].real(), 1e-8); - EXPECT_NEAR(A[i * n + j].imag(), expected_eigenvectors[i * n + j].imag(), 1e-8); - } - } -} - -int main(int argc, char** argv) -{ - testing::InitGoogleTest(&argc, argv); - return RUN_ALL_TESTS(); -} \ No newline at end of file diff --git a/source/module_base/test/math_bspline_test.cpp b/source/module_base/test/math_bspline_test.cpp deleted file mode 100644 index 607321f472..0000000000 --- a/source/module_base/test/math_bspline_test.cpp +++ /dev/null @@ -1,59 +0,0 @@ -#include "../math_bspline.h" -#include "gtest/gtest.h" - -/************************************************ - * unit test of class Bspline - ***********************************************/ - -/** - * - Tested Functions: - * - Init - * - norder must be even - * - norder mush be positive - * - Properties - * - \sum_i M_n(u+i) = 1 (i=0,1,2,...n) - * - */ - -class MathBsplineTest : public testing::Test -{ -protected: - ModuleBase::Bspline bp; - int norder; -}; - -TEST_F(MathBsplineTest,Init) -{ - EXPECT_DEATH( - { - norder = 3; // norder must be even - bp.init(norder,0.05,0); - },"" - ); - EXPECT_DEATH( - { - norder = 0; // norder must be positive - bp.init(norder,0.05,0); - },"" - ); -} - -// summation over n is unity -TEST_F(MathBsplineTest,Properties) -{ - int by = 2; - for (norder=2;norder<=20;norder=norder+by) - { - bp.init(norder,1.0,0); - bp.getbspline(0.2); - double sum=0.0; - //std::cout << "\n" << "norder : "<< norder< expi(std::complex x) - { - const std::complex j(0.0, 1.0); - return exp(j * x); - } - std::complex expi2(std::complex x) - { - const std::complex j(0.0, 1.0); - const double PI = 3.14159265358979323846; - return exp(j * PI / 2.0 * x); - } - // Pauli matrix: [0,-i;i,0] - int LDA = 2; - double factor = 1; - void sigma_y(std::complex* spin_in, std::complex* spin_out, const int m = 1) - { - const std::complex j(0.0, 1.0); - if (this->LDA < 2) { - this->LDA = 2; -} - for (int i = 0; i < m; ++i) - { - spin_out[LDA * i] = -factor * j * spin_in[LDA * i + 1]; - spin_out[LDA * i + 1] = factor * j * spin_in[LDA * i]; - } - } -#ifdef __ENABLE_FLOAT_FFTW - float x7(float x) - { - return pow(x, 7); - } - float x6(float x) - { - return pow(x, 6); - } - float expr(float x) - { - return exp(x); - } - std::complex expi(std::complex x) - { - const std::complex j(0.0, 1.0); - return exp(j * x); - } - std::complex expi2(std::complex x) - { - const std::complex j(0.0, 1.0); - const float PI = 3.14159265358979323846; - return exp(j * PI / 2.0f * x); - } - // Pauli matrix: [0,-i;i,0] - void sigma_y(std::complex* spin_in, std::complex* spin_out, const int m = 1) - { - const std::complex j(0.0, 1.0); - if (this->LDA < 2) - this->LDA = 2; - for (int i = 0; i < m; ++i) - { - spin_out[LDA * i] = -j * spin_in[LDA * i + 1]; - spin_out[LDA * i + 1] = j * spin_in[LDA * i]; - } - } -#endif -}; -class MathChebyshevTest : public testing::Test -{ - protected: - ModuleBase::Chebyshev* p_chetest; - ModuleBase::Chebyshev* p_fchetest; - toolfunc fun; -}; - -TEST_F(MathChebyshevTest, calcoef_real) -{ - auto fun_x6 = [&](double x) { return fun.x6(x); }; - auto fun_x7 = [&](double x) { return fun.x7(x); }; - p_chetest = new ModuleBase::Chebyshev(10); - // x^6 = 1/32*( 10T_0 + 15T_2 + 6T_4 + T_6 ) - // x^7 = 1/64*( 35T_1 + 21T_3 + 7T_5 + T_7 ) - const double x6ref[10] = {10, 0, 15, 0, 6, 0, 1, 0, 0, 0}; - const double x7ref[10] = {0, 35, 0, 21, 0, 7, 0, 1, 0, 0}; - - p_chetest->calcoef_real(fun_x6); - for (int i = 0; i < 10; ++i) - { - EXPECT_NEAR(p_chetest->coef_real[i] * 32.0, x6ref[i], 1.e-8); - } - p_chetest->calcoef_real(fun_x7); - for (int i = 0; i < 10; ++i) - { - EXPECT_NEAR(p_chetest->coef_real[i] * 64.0, x7ref[i], 1.e-8); - } - delete p_chetest; -} - -TEST_F(MathChebyshevTest, calcoef_pair) -{ - auto fun_x6 = [&](double x) { return fun.x6(x); }; - auto fun_x7 = [&](double x) { return fun.x7(x); }; - p_chetest = new ModuleBase::Chebyshev(10); - // x^6 = 1/32*( 10T_0 + 15T_2 + 6T_4 + T_6 ) - // x^7 = 1/64*( 35T_1 + 21T_3 + 7T_5 + T_7 ) - const double x6ref[10] = {10, 0, 15, 0, 6, 0, 1, 0, 0, 0}; - const double x7ref[10] = {0, 35, 0, 21, 0, 7, 0, 1, 0, 0}; - p_chetest->calcoef_pair(fun_x6, fun_x7); - for (int i = 0; i < 10; ++i) - { - EXPECT_NEAR(p_chetest->coef_complex[i].real() * 32.0, x6ref[i], 1.e-8); - EXPECT_NEAR(p_chetest->coef_complex[i].imag() * 64.0, x7ref[i], 1.e-8); - } - delete p_chetest; -} - -TEST_F(MathChebyshevTest, calcoef_complex) -{ - auto fun_expi = [&](std::complex x) { return fun.expi(x); }; - const int norder = 100; - const double PI = 3.14159265358979323846; - p_chetest = new ModuleBase::Chebyshev(norder); - double* T = new double[norder]; - // check exp(i\pi/4) = \sum_n C_n[exp(ix)]T_n(\pi/4) = sqrt(2)/2*(1, i) - p_chetest->calcoef_complex(fun_expi); - p_chetest->getpolyval(PI / 4, T, norder); - std::complex sum(0, 0); - for (int i = 0; i < norder; ++i) - { - sum += p_chetest->coef_complex[i] * T[i]; - } - EXPECT_NEAR(sum.real(), sqrt(2) / 2, 1.e-8); - EXPECT_NEAR(sum.imag(), sqrt(2) / 2, 1.e-8); - delete[] T; - delete p_chetest; -} - -TEST_F(MathChebyshevTest, calfinalvec_real) -{ - const int norder = 100; - const double E = 2.718281828459046; - p_chetest = new ModuleBase::Chebyshev(norder); - // 1 [ 1/e+e -i(e-1/e) ] - // exp(\sigma_y)= - [ ], where \sigma_y = [0, -i; i, 0] - // 2 [ i(e-1/e) 1/e+e ] - std::complex* v = new std::complex[4]; - std::complex* vout = new std::complex[4]; - v[0] = 1.0; - v[1] = 0.0; - v[2] = 0.0; - v[3] = 1.0; //[1 0; 0 1] - - auto fun_expr = [&](double x) { return fun.expr(x); }; - auto fun_sigma_y - = [&](std::complex* in, std::complex* out, const int m = 1) { fun.sigma_y(in, out, m); }; - p_chetest->calcoef_real(fun_expr); - p_chetest->calfinalvec_real(fun_sigma_y, v, vout, 2, 2, 2); - EXPECT_NEAR(vout[0].real(), 0.5 * (E + 1 / E), 1.e-8); - EXPECT_NEAR(vout[0].imag(), 0, 1.e-8); - EXPECT_NEAR(vout[1].real(), 0, 1.e-8); - EXPECT_NEAR(vout[1].imag(), 0.5 * (E - 1 / E), 1.e-8); - EXPECT_NEAR(vout[2].real(), 0, 1.e-8); - EXPECT_NEAR(vout[2].imag(), -0.5 * (E - 1 / E), 1.e-8); - EXPECT_NEAR(vout[3].real(), 0.5 * (E + 1 / E), 1.e-8); - EXPECT_NEAR(vout[3].imag(), 0, 1.e-8); - - delete[] v; - delete[] vout; - delete p_chetest; -} - -TEST_F(MathChebyshevTest, calfinalvec_complex) -{ - const int norder = 100; - const double E = 2.718281828459046; - p_chetest = new ModuleBase::Chebyshev(norder); - // [ 0 1 ] - // exp(i pi/2*\sigma_y)= [ ], where \sigma_y = [0, -i; i, 0] - // [ -1 0 ] - std::complex* v = new std::complex[4]; - std::complex* vout = new std::complex[4]; - v[0] = 1.0; - v[1] = 0.0; - v[2] = 0.0; - v[3] = 1.0; //[1 0; 0 1] - - auto fun_sigma_y - = [&](std::complex* in, std::complex* out, const int m = 1) { fun.sigma_y(in, out, m); }; - auto fun_expi2 = [&](std::complex x) { return fun.expi2(x); }; - p_chetest->calcoef_complex(fun_expi2); - p_chetest->calfinalvec_complex(fun_sigma_y, v, vout, 2, 2, 2); - EXPECT_NEAR(vout[0].real(), 0, 1.e-8); - EXPECT_NEAR(vout[0].imag(), 0, 1.e-8); - EXPECT_NEAR(vout[1].real(), -1, 1.e-8); - EXPECT_NEAR(vout[1].imag(), 0, 1.e-8); - EXPECT_NEAR(vout[2].real(), 1, 1.e-8); - EXPECT_NEAR(vout[2].imag(), 0, 1.e-8); - EXPECT_NEAR(vout[3].real(), 0, 1.e-8); - EXPECT_NEAR(vout[3].imag(), 0, 1.e-8); - - delete[] v; - delete[] vout; - delete p_chetest; -} - -TEST_F(MathChebyshevTest, calpolyvec_complex) -{ - const int norder = 100; - const double E = 2.718281828459046; - p_chetest = new ModuleBase::Chebyshev(norder); - // [ 0 1 ] - // exp(i pi/2*\sigma_y)= [ ], where \sigma_y = [0, -i; i, 0] - // [ -1 0 ] - std::complex* v = new std::complex[4]; - std::complex* polyv = new std::complex[4 * norder]; - std::complex* vout = new std::complex[4]; - v[0] = 1.0; - v[1] = 0.0; - v[2] = 0.0; - v[3] = 1.0; //[1 0; 0 1] - vout[0] = 0; - vout[1] = 0; - vout[2] = 0; - vout[3] = 0; - - auto fun_sigma_y - = [&](std::complex* in, std::complex* out, const int m = 1) { fun.sigma_y(in, out, m); }; - auto fun_expi2 = [&](std::complex x) { return fun.expi2(x); }; - p_chetest->calcoef_complex(fun_expi2); - p_chetest->calpolyvec_complex(fun_sigma_y, v, polyv, 2, 2, 2); - for (int i = 0; i < norder; ++i) - { - for (int j = 0; j < 4; ++j) - { - vout[j] += polyv[i * 4 + j] * p_chetest->coef_complex[i]; - } - } - EXPECT_NEAR(vout[0].real(), 0, 1.e-8); - EXPECT_NEAR(vout[0].imag(), 0, 1.e-8); - EXPECT_NEAR(vout[1].real(), -1, 1.e-8); - EXPECT_NEAR(vout[1].imag(), 0, 1.e-8); - EXPECT_NEAR(vout[2].real(), 1, 1.e-8); - EXPECT_NEAR(vout[2].imag(), 0, 1.e-8); - EXPECT_NEAR(vout[3].real(), 0, 1.e-8); - EXPECT_NEAR(vout[3].imag(), 0, 1.e-8); - - delete[] v; - delete[] vout; - delete[] polyv; - delete p_chetest; -} - -TEST_F(MathChebyshevTest, tracepolyA) -{ - const int norder = 100; - p_chetest = new ModuleBase::Chebyshev(norder); - - // N == LDA - std::complex* v = new std::complex[4]; - v[0] = 1.0; - v[1] = 0.0; - v[2] = 0.0; - v[3] = 1.0; //[1 0; 0 1] - - auto fun_sigma_y - = [&](std::complex* in, std::complex* out, const int m = 1) { fun.sigma_y(in, out, m); }; - p_chetest->tracepolyA(fun_sigma_y, v, 2, 2, 2); - // Trace: even function: 2 ; odd function 0. - for (int i = 0; i < norder; ++i) - { - if (i % 2 == 0) { - EXPECT_NEAR(p_chetest->polytrace[i], 2, 1.e-8); - } else { - EXPECT_NEAR(p_chetest->polytrace[i], 0, 1.e-8); -} - } - delete[] v; - - // N < LDA - fun.LDA = 3; - int LDA = fun.LDA; - v = new std::complex[2 * LDA]; - v[0] = 1.0; - v[1] = 0.0; - v[2] = 100.0; - v[3] = 0.0; - v[4] = 1.0; - v[5] = 1.0; //[1 0; 0 1; 100 2] - - p_chetest->tracepolyA(fun_sigma_y, v, 2, LDA, 2); - // Trace: even function: 2 ; odd function 0. - for (int i = 0; i < norder; ++i) - { - if (i % 2 == 0) { - EXPECT_NEAR(p_chetest->polytrace[i], 2, 1.e-8); - } else { - EXPECT_NEAR(p_chetest->polytrace[i], 0, 1.e-8); -} - } - fun.LDA = 2; - delete[] v; - delete p_chetest; -} - -TEST_F(MathChebyshevTest, checkconverge) -{ -#ifdef __MPI -#undef __MPI - const int norder = 100; - p_chetest = new ModuleBase::Chebyshev(norder); - auto fun_sigma_y - = [&](std::complex* in, std::complex* out, const int m = 1) { fun.sigma_y(in, out, m); }; - - std::complex* v = new std::complex[4]; - v[0] = 1.0; - v[1] = 0.0; - v[2] = 0.0; - v[3] = 1.0; //[1 0; 0 1] - double tmin = -1.1; - double tmax = 1.1; - bool converge; - converge = p_chetest->checkconverge(fun_sigma_y, v, 2, 2, tmax, tmin, 0.2); - EXPECT_TRUE(converge); - converge = p_chetest->checkconverge(fun_sigma_y, v + 2, 2, 2, tmax, tmin, 0.2); - EXPECT_TRUE(converge); - EXPECT_NEAR(tmin, -1.1, 1e-8); - EXPECT_NEAR(tmax, 1.1, 1e-8); - - tmax = -1.1; - converge = p_chetest->checkconverge(fun_sigma_y, v, 2, 2, tmax, tmin, 2.2); - EXPECT_TRUE(converge); - EXPECT_NEAR(tmin, -1.1, 1e-8); - EXPECT_NEAR(tmax, 1.1, 1e-8); - - // not converge - v[0] = std::complex(0, 1), v[1] = 1; - fun.factor = 1.5; - tmin = -1.1, tmax = 1.1; - converge = p_chetest->checkconverge(fun_sigma_y, v, 2, 2, tmax, tmin, 0.2); - EXPECT_FALSE(converge); - - fun.factor = -1.5; - tmin = -1.1, tmax = 1.1; - converge = p_chetest->checkconverge(fun_sigma_y, v, 2, 2, tmax, tmin, 0.2); - EXPECT_FALSE(converge); - fun.factor = 1; - - delete[] v; - delete p_chetest; -#define __MPI -#endif -} - -TEST_F(MathChebyshevTest, recurs) -{ - testing::internal::CaptureStdout(); - EXPECT_EXIT(ModuleBase::Chebyshev noneche(0), ::testing::ExitedWithCode(1), ""); - std::string output = testing::internal::GetCapturedStdout(); - EXPECT_THAT(output, testing::HasSubstr("NOTICE")); - - int norder = 100; - p_chetest = new ModuleBase::Chebyshev(norder); - int Tnp = p_chetest->recurs(1, 1, 0); - EXPECT_EQ(Tnp, 2); - delete p_chetest; -} - -#ifdef __ENABLE_FLOAT_FFTW -TEST_F(MathChebyshevTest, calcoef_real_float) -{ - auto fun_x6f = [&](float x) { return fun.x6(x); }; - auto fun_x7f = [&](float x) { return fun.x7(x); }; - p_fchetest = new ModuleBase::Chebyshev(10); - // x^6 = 1/32*( 10T_0 + 15T_2 + 6T_4 + T_6 ) - // x^7 = 1/64*( 35T_1 + 21T_3 + 7T_5 + T_7 ) - const float x6ref[10] = {10, 0, 15, 0, 6, 0, 1, 0, 0, 0}; - const float x7ref[10] = {0, 35, 0, 21, 0, 7, 0, 1, 0, 0}; - p_fchetest->calcoef_real(fun_x6f); - for (int i = 0; i < 10; ++i) - { - EXPECT_NEAR(p_fchetest->coef_real[i] * 32.0, x6ref[i], 1.e-5); - } - p_fchetest->calcoef_real(fun_x7f); - for (int i = 0; i < 10; ++i) - { - EXPECT_NEAR(p_fchetest->coef_real[i] * 64.0, x7ref[i], 1.e-5); - } - delete p_fchetest; -} - -TEST_F(MathChebyshevTest, calcoef_pair_float) -{ - auto fun_x6f = [&](float x) { return fun.x6(x); }; - auto fun_x7f = [&](float x) { return fun.x7(x); }; - p_fchetest = new ModuleBase::Chebyshev(10); - // x^6 = 1/32*( 10T_0 + 15T_2 + 6T_4 + T_6 ) - // x^7 = 1/64*( 35T_1 + 21T_3 + 7T_5 + T_7 ) - const float x6ref[10] = {10, 0, 15, 0, 6, 0, 1, 0, 0, 0}; - const float x7ref[10] = {0, 35, 0, 21, 0, 7, 0, 1, 0, 0}; - p_fchetest->calcoef_pair(fun_x6f, fun_x7f); - for (int i = 0; i < 10; ++i) - { - EXPECT_NEAR(p_fchetest->coef_complex[i].real() * 32.0, x6ref[i], 1.e-5); - EXPECT_NEAR(p_fchetest->coef_complex[i].imag() * 64.0, x7ref[i], 1.e-5); - } - delete p_fchetest; -} - -TEST_F(MathChebyshevTest, calcoef_complex_float) -{ - auto fun_expif = [&](std::complex x) { return fun.expi(x); }; - const int norder = 100; - const float PI = 3.14159265358979323846; - p_fchetest = new ModuleBase::Chebyshev(norder); - float* T = new float[norder]; - // check exp(i\pi/4) = \sum_n C_n[exp(ix)]T_n(\pi/4) = sqrt(2)/2*(1, i) - p_fchetest->calcoef_complex(fun_expif); - p_fchetest->getpolyval(PI / 4, T, norder); - std::complex sum(0, 0); - for (int i = 0; i < norder; ++i) - { - sum += p_fchetest->coef_complex[i] * T[i]; - } - EXPECT_NEAR(sum.real(), sqrt(2) / 2, 1.e-6); - EXPECT_NEAR(sum.imag(), sqrt(2) / 2, 1.e-6); - delete[] T; - delete p_fchetest; -} - -TEST_F(MathChebyshevTest, calfinalvec_real_float) -{ - const int norder = 100; - const float E = 2.718281828459046; - p_fchetest = new ModuleBase::Chebyshev(norder); - // 1 [ 1/e+e -i(e-1/e) ] - // exp(\sigma_y)= - [ ], where \sigma_y = [0, -i; i, 0] - // 2 [ i(e-1/e) 1/e+e ] - std::complex* v = new std::complex[4]; - std::complex* vout = new std::complex[4]; - v[0] = 1.0; - v[1] = 0.0; - v[2] = 0.0; - v[3] = 1.0; //[1 0; 0 1] - - auto fun_exprf = [&](float x) { return fun.expr(x); }; - auto fun_sigma_yf - = [&](std::complex* in, std::complex* out, const int m = 1) { fun.sigma_y(in, out, m); }; - p_fchetest->calcoef_real(fun_exprf); - p_fchetest->calfinalvec_real(fun_sigma_yf, v, vout, 2, 2, 2); - EXPECT_NEAR(vout[0].real(), 0.5 * (E + 1 / E), 1.e-6); - EXPECT_NEAR(vout[0].imag(), 0, 1.e-6); - EXPECT_NEAR(vout[1].real(), 0, 1.e-6); - EXPECT_NEAR(vout[1].imag(), 0.5 * (E - 1 / E), 1.e-6); - EXPECT_NEAR(vout[2].real(), 0, 1.e-6); - EXPECT_NEAR(vout[2].imag(), -0.5 * (E - 1 / E), 1.e-6); - EXPECT_NEAR(vout[3].real(), 0.5 * (E + 1 / E), 1.e-6); - EXPECT_NEAR(vout[3].imag(), 0, 1.e-6); - - delete[] v; - delete[] vout; - delete p_fchetest; -} - -TEST_F(MathChebyshevTest, calfinalvec_complex_float) -{ - const int norder = 100; - const float E = 2.718281828459046; - p_fchetest = new ModuleBase::Chebyshev(norder); - // [ 0 1 ] - // exp(i pi/2*\sigma_y)= [ ], where \sigma_y = [0, -i; i, 0] - // [ -1 0 ] - std::complex* v = new std::complex[4]; - std::complex* vout = new std::complex[4]; - v[0] = 1.0; - v[1] = 0.0; - v[2] = 0.0; - v[3] = 1.0; //[1 0; 0 1] - - auto fun_sigma_yf - = [&](std::complex* in, std::complex* out, const int m = 1) { fun.sigma_y(in, out, m); }; - auto fun_expi2f = [&](std::complex x) { return fun.expi2(x); }; - p_fchetest->calcoef_complex(fun_expi2f); - p_fchetest->calfinalvec_complex(fun_sigma_yf, v, vout, 2, 2, 2); - EXPECT_NEAR(vout[0].real(), 0, 1.e-6); - EXPECT_NEAR(vout[0].imag(), 0, 1.e-6); - EXPECT_NEAR(vout[1].real(), -1, 1.e-6); - EXPECT_NEAR(vout[1].imag(), 0, 1.e-6); - EXPECT_NEAR(vout[2].real(), 1, 1.e-6); - EXPECT_NEAR(vout[2].imag(), 0, 1.e-6); - EXPECT_NEAR(vout[3].real(), 0, 1.e-6); - EXPECT_NEAR(vout[3].imag(), 0, 1.e-6); - - delete[] v; - delete[] vout; - delete p_fchetest; -} - -TEST_F(MathChebyshevTest, calpolyvec_float) -{ - const int norder = 100; - const float E = 2.718281828459046; - p_fchetest = new ModuleBase::Chebyshev(norder); - // [ 0 1 ] - // exp(i pi/2*\sigma_y)= [ ], where \sigma_y = [0, -i; i, 0] - // [ -1 0 ] - std::complex* v = new std::complex[4]; - std::complex* polyv = new std::complex[4 * norder]; - std::complex* vout = new std::complex[4]; - v[0] = 1.0; - v[1] = 0.0; - v[2] = 0.0; - v[3] = 1.0; //[1 0; 0 1] - vout[0] = 0; - vout[1] = 0; - vout[2] = 0; - vout[3] = 0; - - auto fun_sigma_yf - = [&](std::complex* in, std::complex* out, const int m = 1) { fun.sigma_y(in, out, m); }; - auto fun_expi2f = [&](std::complex x) { return fun.expi2(x); }; - p_fchetest->calcoef_complex(fun_expi2f); - p_fchetest->calpolyvec_complex(fun_sigma_yf, v, polyv, 2, 2, 2); - for (int i = 0; i < norder; ++i) - { - for (int j = 0; j < 4; ++j) - { - vout[j] += polyv[i * 4 + j] * p_fchetest->coef_complex[i]; - } - } - EXPECT_NEAR(vout[0].real(), 0, 1.e-6); - EXPECT_NEAR(vout[0].imag(), 0, 1.e-6); - EXPECT_NEAR(vout[1].real(), -1, 1.e-6); - EXPECT_NEAR(vout[1].imag(), 0, 1.e-6); - EXPECT_NEAR(vout[2].real(), 1, 1.e-6); - EXPECT_NEAR(vout[2].imag(), 0, 1.e-6); - EXPECT_NEAR(vout[3].real(), 0, 1.e-6); - EXPECT_NEAR(vout[3].imag(), 0, 1.e-6); - - delete[] v; - delete[] vout; - delete[] polyv; - delete p_fchetest; -} - -TEST_F(MathChebyshevTest, tracepolyA_float) -{ - const int norder = 100; - p_fchetest = new ModuleBase::Chebyshev(norder); - - std::complex* v = new std::complex[4]; - v[0] = 1.0; - v[1] = 0.0; - v[2] = 0.0; - v[3] = 1.0; //[1 0; 0 1] - - auto fun_sigma_yf - = [&](std::complex* in, std::complex* out, const int m = 1) { fun.sigma_y(in, out, m); }; - p_fchetest->tracepolyA(fun_sigma_yf, v, 2, 2, 2); - // Trace: even function: 2 ; odd function 0. - for (int i = 0; i < norder; ++i) - { - if (i % 2 == 0) - EXPECT_NEAR(p_fchetest->polytrace[i], 2, 1.e-6); - else - EXPECT_NEAR(p_fchetest->polytrace[i], 0, 1.e-6); - } - delete[] v; - - // N < LDA - fun.LDA = 3; - int LDA = fun.LDA; - v = new std::complex[2 * LDA]; - v[0] = 1.0; - v[1] = 0.0; - v[2] = 100.0; - v[3] = 0.0; - v[4] = 1.0; - v[5] = 1.0; //[1 0; 0 1; 100 2] - - p_fchetest->tracepolyA(fun_sigma_yf, v, 2, LDA, 2); - // Trace: even function: 2 ; odd function 0. - for (int i = 0; i < norder; ++i) - { - if (i % 2 == 0) - EXPECT_NEAR(p_fchetest->polytrace[i], 2, 1.e-6); - else - EXPECT_NEAR(p_fchetest->polytrace[i], 0, 1.e-6); - } - fun.LDA = 2; - delete[] v; - delete p_fchetest; -} - -TEST_F(MathChebyshevTest, checkconverge_float) -{ - #ifdef __MPI - #undef __MPI - const int norder = 100; - p_fchetest = new ModuleBase::Chebyshev(norder); - - std::complex* v = new std::complex[4]; - v[0] = 1.0; - v[1] = 0.0; - v[2] = 0.0; - v[3] = 1.0; //[1 0; 0 1] - float tmin = -1.1; - float tmax = 1.1; - bool converge; - - auto fun_sigma_yf - = [&](std::complex* in, std::complex* out, const int m = 1) { fun.sigma_y(in, out, m); }; - converge = p_fchetest->checkconverge(fun_sigma_yf, v, 2, 2, tmax, tmin, 0.2); - EXPECT_TRUE(converge); - converge = p_fchetest->checkconverge(fun_sigma_yf, v + 2, 2, 2, tmax, tmin, 0.2); - EXPECT_TRUE(converge); - EXPECT_NEAR(tmin, -1.1, 1e-6); - EXPECT_NEAR(tmax, 1.1, 1e-6); - - delete[] v; - delete p_fchetest; - #endif -} -#endif \ No newline at end of file diff --git a/source/module_base/test/math_integral_test.cpp b/source/module_base/test/math_integral_test.cpp deleted file mode 100644 index eded83f76d..0000000000 --- a/source/module_base/test/math_integral_test.cpp +++ /dev/null @@ -1,432 +0,0 @@ -#include"../math_integral.h" -#include"gtest/gtest.h" - -#include -#include -#include - -#include "module_base/constants.h" - -#define doublethreshold 1e-12 - - - -/************************************************ -* unit test of class Integral -***********************************************/ - -/** - * Tested functions: - * - function Simpson_Integral with rab as input - * - function Simpson_Integral with dr as input - * - function Simpson_Integral_0toall - * - function Simpson_Integral_alltoinf - * - function Simpson_Integral with f(x) = sin(x) - * - function Simpson_Integral with f(x) = 1 / (1 + x^2) - * - function Simpson_Integral with f(x) = exp(x) - */ - -// generate irregular grid with sinx -void sinspace(double start, double end, const int nums, double* xv, double* h){ - double astart = asin(start); - double aend = asin(end); - double step = (aend - astart) / (nums - 1); - - for(int i = 0; i < nums; ++i){ - h[i] = sin(astart + i * step); - } - // calculate the difference - xv[0] = start; - for(int i = 0; i< nums - 1; ++i){ - h[i] = h[i+1] - h[i]; - xv[i+1] = xv[i] + h[i]; - } -} - -class SimpsonIntegralSinx : public testing::Test -{ - /** - * test the integral of sinx between [0,PI], - * devide to mesh-1 parts - */ - - protected: - - double* func; - double* rab; - int mesh = 10001; - double dr = M_PI/(mesh-1); - double asum; - double* asumlist; - double expectvalue = 2.0; - - void SetUp() - { - func = new double[mesh]; - rab = new double[mesh]; - asumlist = new double[mesh]; - - for (int i=0;i(&err), sizeof(double)); - } - delete[] f; - file_o.close(); -} - -TEST_F(SimpsonIntegralITF, SinGridOdd) -{ - double start = -1.0, end = 1.0; - const int ngrid_max = 10000; - double *xv = new double[ngrid_max]; - double *h = new double[ngrid_max]; - double *f = new double[ngrid_max]; - std::ofstream file_o("data/itf_sin_out.bin", std::ios::binary); - double ref_val = std::atan(end) - std::atan(start); - for (int ngrid = 5; ngrid <= ngrid_max; ngrid += 2) { - sinspace(start, end, ngrid, xv, h); - for (int i = 0; i < ngrid; ++i) { - f[i] = 1.0 / (1.0 + xv[i] * xv[i]); - } - - // crude estimate for irregular-grid error bound - double dx = h[ngrid / 2]; - double tol = (end-start) * std::pow(dx, 4); - EXPECT_NEAR(std::atan(end) - std::atan(start), ModuleBase::Integral::simpson(ngrid, f, h), std::max(tol, doublethreshold)); - double err = std::abs(ModuleBase::Integral::simpson(ngrid, f, h) - ref_val) / std::abs(ref_val); - file_o.write(reinterpret_cast(&err), sizeof(double)); - } - - delete[] xv; - delete[] h; - delete[] f; - file_o.close(); -} - -class SimpsonIntegralExp : public testing::Test{ - -}; - -TEST_F(SimpsonIntegralExp, UniformGridOdd) -{ - double start = 0.0, end = 1.0; - const int ngrid_max = 10000; - double *f = new double[ngrid_max]; - std::ofstream file_o("data/exp_uni_out.bin", std::ios::binary); - double ref_val = std::exp(end) - std::exp(start); - for (int ngrid = 5; ngrid <= ngrid_max; ngrid += 2) { - const double dx = (end - start) / (ngrid - 1); - for (int i = 0; i < ngrid; ++i) { - double x = start + i * dx; - f[i] = std::exp(x); - } - double tol = (end-start) * std::exp(1) * std::pow(dx, 4) / 180; - EXPECT_NEAR(std::exp(end) - std::exp(start), ModuleBase::Integral::simpson(ngrid, f, dx), std::max(tol, doublethreshold)); - double err = std::abs(ModuleBase::Integral::simpson(ngrid, f, dx) - ref_val) / std::abs(ref_val); - file_o.write(reinterpret_cast(&err), sizeof(double)); - } - delete[] f; - file_o.close(); -} - -TEST_F(SimpsonIntegralExp, SinGridOdd) -{ - double start = 0.0, end = 1.0; - const int ngrid_max = 10000; - double *xv = new double[ngrid_max]; - double *h = new double[ngrid_max]; - double *f = new double[ngrid_max]; - std::ofstream file_o("data/exp_sin_out.bin", std::ios::binary); - double ref_val = std::exp(end) - std::exp(start); - // skip ngrid = 3 since the errors exceeds the threshold - for (int ngrid = 5; ngrid <= ngrid_max; ngrid += 2) { - sinspace(start, end, ngrid, xv, h); - for (int i = 0; i < ngrid; ++i) { - f[i] = std::exp(xv[i]); - } - - double dx = h[ngrid / 2]; - double tol = (end-start) * std::pow(dx, 4); - EXPECT_NEAR(std::exp(end) - std::exp(start), ModuleBase::Integral::simpson(ngrid, f, h), std::max(tol, doublethreshold)); - double err = std::abs(ModuleBase::Integral::simpson(ngrid, f, h) - ref_val) / std::abs(ref_val); - file_o.write(reinterpret_cast(&err), sizeof(double)); - } - - delete[] xv; - delete[] h; - delete[] f; - file_o.close(); -} \ No newline at end of file diff --git a/source/module_base/test/math_polyint_test.cpp b/source/module_base/test/math_polyint_test.cpp deleted file mode 100644 index c2578f8531..0000000000 --- a/source/module_base/test/math_polyint_test.cpp +++ /dev/null @@ -1,143 +0,0 @@ -#include "../math_polyint.h" - -#include - -#include "../realarray.h" -#include "gmock/gmock.h" -#include "gtest/gtest.h" - -#define doublethreshold 1e-9 - -/************************************************ -* unit test of class PolyInt -***********************************************/ - -/** - * This unit test is to verify the accuracy of - * interpolation method on the function sin(x)/x - * with a interval of 0.01. - * sin(x)/x is one of the solution of spherical bessel - * function when l=0. - * - * - Tested function: - * - 4 types of Polynomial_Interpolation - * - Polynomial_Interpolation_xy - */ - - -class bessell0 : public testing::Test -{ - protected: - - int TableLength = 400; - double interval = 0.01; - ModuleBase::realArray table3,table4; - ModuleBase::realArray y3; - double *tablex; - double *tabley; - - double sinc(double x) {return sin(x)/x;} - - void SetUp() - { - tablex = new double[TableLength]; - tabley = new double[TableLength]; - table3.create(1,1,TableLength); - table4.create(1,1,1,TableLength); - y3.create(1,1,TableLength); - - for(int i=1;i -#include // Dependency for memset initialization -#include -#include - -#ifdef __MPI -#include "mpi.h" -#endif - -#include "gtest/gtest.h" - -#define doublethreshold 1e-7 -#define MAX(x, y) ((x) > (y) ? (x) : (y)) - -/************************************************ - * unit test of class Integral - ***********************************************/ - -/** - * Note: this unit test try to ensure the invariance - * of the spherical Bessel produced by class Sphbes, - * and the reference results are produced by ABACUS - * at 2022-1-27. - * - * Tested function: - * - Spherical_Bessel. - * - Spherical_Bessel_Roots - * - overloading of Spherical_Bessel. This funnction sets sjp[i] to 1.0 when i < msh. - * - sphbesj - * - sphbes_zeros - */ - -double mean(const double* vect, const int totN) -{ - double meanv = 0.0; - for (int i = 0; i < totN; ++i) - { - meanv += vect[i] / totN; - } - return meanv; -} - -class Sphbes : public testing::Test -{ - protected: - int msh = 700; - int l0 = 0; - int l1 = 1; - int l2 = 2; - int l3 = 3; - int l4 = 4; - int l5 = 5; - int l6 = 6; - int l7 = 7; - double q = 1.0; - double* r = new double[msh]; - double* jl = new double[msh]; - double* djl = new double[msh]; - - void SetUp() - { - for (int i = 0; i < msh; ++i) - { - r[i] = 0.01 * (i); - } - } - - void TearDown() - { - delete[] r; - delete[] jl; - delete[] djl; - } -}; - -TEST_F(Sphbes, Constructor) -{ - EXPECT_NO_THROW(ModuleBase::Sphbes sb); -} - -TEST_F(Sphbes, SphericalBessel) -{ - // int l = 0; - ModuleBase::Sphbes::Spherical_Bessel(msh, r, q, l0, jl); - // reference result is from bessel_test.cpp which is calculated by - // ModuleBase::Sph_Bessel_Recursive::D1 - EXPECT_NEAR(mean(jl, msh) / 0.2084468748396, 1.0, doublethreshold); - - // int l = 1; - ModuleBase::Sphbes::Spherical_Bessel(msh, r, q, l1, jl); - // reference result is from bessel_test.cpp which is calculated by - // ModuleBase::Sph_Bessel_Recursive::D1 - EXPECT_NEAR(mean(jl, msh) / 0.12951635180384, 1.0, doublethreshold); - - // int l = 2; - ModuleBase::Sphbes::Spherical_Bessel(msh, r, q, l2, jl); - // the result from bessel_test.cpp calculated by - // ModuleBase::Sph_Bessel_Recursive::D1 is 0.124201140093879 - // reference result is calculated by Sphbes::Spherical_Bessel(msh,r,q,l,jl) - EXPECT_NEAR(mean(jl, msh) / 0.12420114009271901456, 1.0, doublethreshold); - - // int l = 3; - ModuleBase::Sphbes::Spherical_Bessel(msh, r, q, l3, jl); - // the result from bessel_test.cpp calculated by - // ModuleBase::Sph_Bessel_Recursive::D1 is 0.118268654505568 - // reference result is calculated by Sphbes::Spherical_Bessel(msh,r,q,l,jl) - EXPECT_NEAR(mean(jl, msh) / 0.11826865448477598408, 1.0, doublethreshold); - - // int l = 4; - ModuleBase::Sphbes::Spherical_Bessel(msh, r, q, l4, jl); - // the result from bessel_test.cpp calculated by - // ModuleBase::Sph_Bessel_Recursive::D1 is 0.0933871035384385 - // reference result is calculated by Sphbes::Spherical_Bessel(msh,r,q,l,jl) - EXPECT_NEAR(mean(jl, msh) / 0.093387100084701621383, 1.0, doublethreshold); - - // int l = 5; - ModuleBase::Sphbes::Spherical_Bessel(msh, r, q, l5, jl); - // the result from bessel_test.cpp calculated by - // ModuleBase::Sph_Bessel_Recursive::D1 is 0.0603800487910689 - // reference result is calculated by Sphbes::Spherical_Bessel(msh,r,q,l,jl) - EXPECT_NEAR(mean(jl, msh) / 0.060380048719821471925, 1.0, doublethreshold); - - // int l = 6; - ModuleBase::Sphbes::Spherical_Bessel(msh, r, q, l6, jl); - // the result from bessel_test.cpp calculated by - // ModuleBase::Sph_Bessel_Recursive::D1 is 0.0327117051555907 - // reference result is calculated by Sphbes::Spherical_Bessel(msh,r,q,l,jl) - EXPECT_NEAR(mean(jl, msh) / 0.032711705053977857549, 1.0, doublethreshold); - - // int l = 7; - ModuleBase::Sphbes::Spherical_Bessel(msh, r, q, l7, jl); - // the result from bessel_test.cpp calculated by - // ModuleBase::Sph_Bessel_Recursive::D1 is 0.0152155566653926 - // reference result is calculated by Sphbes::Spherical_Bessel(msh,r,q,l,jl) - EXPECT_NEAR(mean(jl, msh) / 0.015215556095798710851, 1.0, doublethreshold); -} - -TEST_F(Sphbes, dSpherical_Bessel_dx) -{ - double djl0; - for (int il = 0; il <= l7; ++il) - { - if (il == 1) - djl0 = 1.0 / 3.0; - else - djl0 = 0.0; - ModuleBase::Sphbes::dSpherical_Bessel_dx(msh, r, q, il, djl); - ModuleBase::Sphbes::Spherical_Bessel(msh, r, q, il, jl); - EXPECT_NEAR(djl[0], djl0, 1e-8); - for (int i = 1; i < msh - 1; ++i) - { - if (jl[i - 1] < 1e-8) - continue; - double djl_diff = (jl[i + 1] - jl[i - 1]) / (q * (r[i + 1] - r[i - 1])); - EXPECT_NEAR(djl[i], djl_diff, 1e-4); - } - ModuleBase::Sphbes::dSpherical_Bessel_dx(msh, r, 0, il, djl); - for (int i = 0; i < msh; ++i) - { - EXPECT_NEAR(djl[i], djl0, 1e-8); - } - } -} - -TEST_F(Sphbes, SphericalBesselRoots) -{ - int neign = 100; - double** eign = new double*[8]; - for (int i = 0; i < 8; ++i) - { - eign[i] = new double[neign]; - ModuleBase::Sphbes::Spherical_Bessel_Roots(neign, i, 1.0e-12, eign[i], 10.0); - } - - EXPECT_NEAR(eign[0][0] / 0.31415926535899563188, 1.0, doublethreshold); - EXPECT_NEAR(eign[0][99] / 31.415926535896932847, 1.0, doublethreshold); - EXPECT_NEAR(mean(eign[0], 100) / 15.865042900628463229, 1.0, doublethreshold); - EXPECT_NEAR(eign[1][0] / 0.44934094579091843347, 1.0, doublethreshold); - EXPECT_NEAR(eign[1][99] / 31.572689440204385392, 1.0, doublethreshold); - EXPECT_NEAR(mean(eign[1], 100) / 16.020655759558295017, 1.0, doublethreshold); - EXPECT_NEAR(eign[2][0] / 0.57634591968946913276, 1.0, doublethreshold); - EXPECT_NEAR(eign[2][99] / 31.729140298172534784, 1.0, doublethreshold); - EXPECT_NEAR(mean(eign[2], 100) / 16.175128483074864505, 1.0, doublethreshold); - EXPECT_NEAR(eign[3][0] / 0.69879320005004752492, 1.0, doublethreshold); - EXPECT_NEAR(eign[3][99] / 31.885283678838447941, 1.0, doublethreshold); - EXPECT_NEAR(mean(eign[3], 100) / 16.328616567969248763, 1.0, doublethreshold); - EXPECT_NEAR(eign[4][0] / 0.81825614525711076741, 1.0, doublethreshold); - EXPECT_NEAR(eign[4][99] / 32.041124042016576823, 1.0, doublethreshold); - EXPECT_NEAR(mean(eign[4], 100) / 16.481221742387987206, 1.0, doublethreshold); - EXPECT_NEAR(eign[5][0] / 0.93558121110426506473, 1.0, doublethreshold); - EXPECT_NEAR(eign[5][99] / 32.196665741899131774, 1.0, doublethreshold); - EXPECT_NEAR(mean(eign[5], 100) / 16.633019118735202113, 1.0, doublethreshold); - EXPECT_NEAR(eign[6][0] / 1.051283540809391015, 1.0, doublethreshold); - EXPECT_NEAR(eign[6][99] / 32.351913030537232885, 1.0, doublethreshold); - EXPECT_NEAR(mean(eign[6], 100) / 16.784067905062840964, 1.0, doublethreshold); - EXPECT_NEAR(eign[7][0] / 1.1657032192516516567, 1.0, doublethreshold); - EXPECT_NEAR(eign[7][99] / 32.506870061157627561, 1.0, doublethreshold); - EXPECT_NEAR(mean(eign[7], 100) / 16.934416735327332049, 1.0, doublethreshold); - - for (int i = 0; i < 8; ++i) - delete[] eign[i]; - delete[] eign; -} - -// TEST_F(Sphbes, SeriesAndRecurrence) -// { -// // This test checks whether Spherical_Bessel and sphbesj agree with each other -// // on a coarse grid for a range of l and q values. -// // -// // NOTE: this test should be removed once Spherical_Bessel is removed from the code. -// int lmax = 8; -// int nr = 5000; -// double rcut = 50; -// double dr = rcut / (nr - 1); -// double* r = new double[nr]; -// for (int i = 0; i < nr; ++i) -// { -// r[i] = i * dr; -// } - -// double* jl_old = new double[nr]; -// double* jl_new = new double[nr]; -// for (int l = 0; l <= lmax; ++l) -// { -// for (double q = 0.1; q < 10; q += 0.1) -// { -// ModuleBase::Sphbes::Spherical_Bessel(nr, r, q, l, jl_old); -// ModuleBase::Sphbes::sphbesj(nr, r, q, l, jl_new); -// for (int i = 0; i < nr; ++i) -// { -// EXPECT_NEAR(jl_old[i], jl_new[i], 1e-12); -// } - -// // derivative -// ModuleBase::Sphbes::dSpherical_Bessel_dx(nr, r, q, l, jl_old); -// ModuleBase::Sphbes::dsphbesj(nr, r, q, l, jl_new); -// for (int i = 0; i < nr; ++i) -// { -// EXPECT_NEAR(jl_old[i], jl_new[i], 1e-12); -// } -// } -// } - -// delete[] r; -// delete[] jl_old; -// delete[] jl_new; -// } - -TEST_F(Sphbes, SphericalBesselPrecisionGrid) -{ - // This test checks whether sphbesj agrees with the Octave implementation - // on a coarse grid for a range of l and q values. - const double q = 0.1; - const double rcut = 50; - const int nr = 5000; - const int l_lo = 0, l_hi = 11; - const double dr = rcut / nr; - double* r = new double[nr + 10]; - double* Y = new double[nr * (l_hi - l_lo + 1) + 10]; - // save errs to binary file - std::ofstream file_o("data/sphj_old_out.bin", std::ios::binary); - std::ofstream file_n("data/sphj_new_out.bin", std::ios::binary); - - // case 0: x = 0, l = 0 - EXPECT_NEAR(ModuleBase::Sphbes::sphbesj(0, 0), 1.0, 1e-12); - // case 1: x = 0, l = 1, ... , 11 - for (int l = 1; l <= l_hi; ++l) - { - EXPECT_NEAR(ModuleBase::Sphbes::sphbesj(l, 0), 0.0, 1e-12); - } - // case 2: wide range of x and l - double y; - // read reference data - std::ifstream fin("data/bjo.bin", std::ios::binary); - int i = 0; - while (fin.read(reinterpret_cast(&y), sizeof(double))) - { - Y[i] = y; - ++i; - } - fin.close(); - - for (int i = 0; i < nr; ++i) - { - r[i] = (i + 1) * dr; - } - - // test for new sphbesj - for (int l = l_lo; l <= l_hi; ++l) - { - for (int i = 0; i < nr; ++i) - { - EXPECT_NEAR(ModuleBase::Sphbes::sphbesj(l, r[i] * q), Y[l * nr + i], 1e-12); - double tmp = std::abs(Y[l * nr + i] - ModuleBase::Sphbes::sphbesj(l, r[i] * q)); - file_n.write(reinterpret_cast(&tmp), sizeof(double)); - } - } - // test for old Bessel - // most of l cases precision failed to achieve 1e-12 - double* jl_old = new double[nr + 10]; - for (int l = l_lo; l <= l_hi; ++l) - { - ModuleBase::Sphbes::Spherical_Bessel(nr, r, q, l, jl_old); - for (int i = 0; i < nr; ++i) - { - double tmp = std::abs(jl_old[i] - Y[l * nr + i]); - file_o.write(reinterpret_cast(&tmp), sizeof(double)); - } - } - - delete[] r; - delete[] Y; - delete[] jl_old; - file_o.close(); - file_n.close(); -} - -TEST_F(Sphbes, SphericalBesselPrecisionNearZero) -{ - // This test checks whether sphbesj agrees with the Octave implementation - // when x is near zero point for a range of l. - const int n = 16; - const int l_lo = 0, l_hi = 11; - double* x = new double[n + 10]; - double* Y = new double[n * (l_hi - l_lo + 1) + 10]; - - // read reference data - double y; - std::ifstream fin("data/bjxo.bin", std::ios::binary); - int i = 0; - while (fin.read(reinterpret_cast(&y), sizeof(double))) - { - Y[i] = y; - ++i; - } - fin.close(); - // generate x - x[0] = 1.0 / (1 << 5); - for (int i = 1; i < n; i++) - { - x[i] = x[i - 1] / 2; - } - - // test for sphbesj near zero - for (int l = l_lo; l <= l_hi; ++l) - { - for (int i = 0; i < n; ++i) - { - EXPECT_NEAR(ModuleBase::Sphbes::sphbesj(l, x[i]), Y[l * n + i], 1e-12); - } - } - delete[] x; - delete[] Y; -} - -TEST_F(Sphbes, Zeros) -{ - // This test checks whether sphbes_zeros properly computes the zeros of sphbesj. - - int lmax = 20; - int nzeros = 500; - double* zeros = new double[nzeros*(lmax+1)]; - for (int l = 0; l <= lmax; ++l) - { - ModuleBase::Sphbes::sphbes_zeros(l, nzeros, zeros, false); - for (int i = 0; i < nzeros; ++i) - { - EXPECT_LT(std::abs(ModuleBase::Sphbes::sphbesj(l, zeros[i])), 1e-14); - } - } - - - ModuleBase::Sphbes::sphbes_zeros(lmax, nzeros, zeros, true); - for (int l = 0; l <= lmax; ++l) - { - for (int i = 0; i < nzeros; ++i) - { - EXPECT_LT(std::abs(ModuleBase::Sphbes::sphbesj(l, zeros[l*nzeros+i])), 1e-14); - } - } - - delete[] zeros; -} - -TEST_F(Sphbes, ZerosOld) -{ - // This test checks whether Spherical_Bessel_Roots properly computes the zeros of sphbesj. - - int lmax = 7; - int nzeros = 50; - double* zeros = new double[nzeros]; - for (int l = 0; l <= lmax; ++l) - { - ModuleBase::Sphbes::Spherical_Bessel_Roots(nzeros, l, 1e-7, zeros, 1.0); - for (int i = 0; i < nzeros; ++i) - { - EXPECT_LT(std::abs(ModuleBase::Sphbes::sphbesj(l, zeros[i])), 1e-7); - } - } -} - -TEST_F(Sphbes, Derivatives) -{ - int lmax = 20; - int numr = 20; - double* r = new double[numr]; - double* djl = new double[numr]; - double q = 0.001; - r[0] = 1.0; - for (int i = 0; i < numr; ++i) - { - r[i + 1] = r[i] * 2.0; - } - - for (int l = 0; l <= lmax; ++l) - { - ModuleBase::Sphbes::dsphbesj(numr, r, q, l, djl); - for (int i = 0; i < numr; ++i) - { - double h = 1e-8; - EXPECT_LT( - abs(djl[i] * 2 * h - - (ModuleBase::Sphbes::sphbesj(l, q * r[i] + h) - ModuleBase::Sphbes::sphbesj(l, q * r[i] - h))), - 1e-14); - } - } -} - -TEST_F(Sphbes, DerivativesOld) -{ - int lmax = 20; - int numr = 20; - double* r = new double[numr]; - double* djl = new double[numr]; - double q = 0.001; - r[0] = 1.0; - for (int i = 0; i < numr; ++i) - { - r[i + 1] = r[i] * 2.0; - } - - for (int l = 0; l < lmax; l++) - { - ModuleBase::Sphbes::dSpherical_Bessel_dx(numr, r, q, l, djl); - for (int i = 0; i < numr; i++) - { - double h = 1e-8; - double errs - = abs(djl[i] * 2 * h - - (ModuleBase::Sphbes::sphbesj(l, q * r[i] + h) - ModuleBase::Sphbes::sphbesj(l, q * r[i] - h))); - if (errs > 1e-14) - { - std::cout << "l = " << l << ", r = " << r[i] << ", errs = " << errs << std::endl; - } - } - } -} - -int main(int argc, char** argv) -{ -#ifdef __MPI - MPI_Init(&argc, &argv); -#endif - - testing::InitGoogleTest(&argc, argv); - int result = RUN_ALL_TESTS(); -#ifdef __MPI - MPI_Finalize(); -#endif - return result; -} - -TEST_F(Sphbes, SphericalBesselsjp) -{ - int iii = 0; - double* sjp = new double[msh]; - std::memset(sjp, 0, msh * sizeof(double)); - ModuleBase::Sphbes::Spherical_Bessel(msh, r, q, l0, jl, sjp); - EXPECT_NEAR(mean(jl, msh) / 0.2084468748396, 1.0, doublethreshold); - for (int iii = 0; iii < msh; ++iii) - { - EXPECT_EQ(sjp[iii], 1.0); - } - delete[] sjp; -} diff --git a/source/module_base/test/math_ylmreal_test.cpp b/source/module_base/test/math_ylmreal_test.cpp deleted file mode 100644 index 891c948f7e..0000000000 --- a/source/module_base/test/math_ylmreal_test.cpp +++ /dev/null @@ -1,504 +0,0 @@ -#include"../math_ylmreal.h" -#include"../ylm.h" -#include"../vector3.h" -#include"../matrix.h" -#include"gtest/gtest.h" -#include -#include "module_psi/psi.h" -#include "module_base/array_pool.h" - -#define doublethreshold 1e-12 - -/************************************************ -* unit test of class YlmReal and Ylm -***********************************************/ - -/** - * For lmax <5 cases, the reference values are calculated by the formula from - * https://formulasearchengine.com/wiki/Table_of_spherical_harmonics. Note, these - * formula lack of the Condon–Shortley phase (-1)^m, and in this unit test, item - * (-1)^m is multiplied. - * For lmax >=5, the reference values are calculated by YlmReal::Ylm_Real. - * - * - Tested functions of class YlmReal - * - Ylm_Real - * - Ylm_Real2 - * - rlylm - * - YlmRealTemplate (double and float) - * - * - Tested functions of class Ylm - * - get_ylm_real - * - sph_harm - * - rl_sph_harm - * - grad_rl_sph_harm - * - equality_value_test: test the eqaulity of Ylm function between rl_sph_harm (spherical input) and get_ylm_real (Cartesian input) - * - equality_gradient_test:test the eqaulity of Ylm gradient function between grad_rl_sph_harm(spherical input) and rlylm (Cartesian input) - * - */ - -class YlmRealTest : public testing::Test -{ - protected: - - int lmax = 7; //maximum angular quantum number - int ng = 4; //test the 4 selected points on the sphere - int nylm = 64; //total Ylm number; - - ModuleBase::matrix ylm; //Ylm - ModuleBase::matrix *dylm; //dYlm/dx, dYlm/dy, dYlm/dz - ModuleBase::Vector3 *g; //vectors of the 4 points - double *ref; //reference of Ylm - double *rly; //Ylm - double (*rlgy)[3]; //the gradient of Ylm - std::vector rlyvector; //Ylm - ModuleBase::Array_Pool rlgyvector; //the gradient of Ylm - - //Ylm function - inline double norm(const double &x, const double &y, const double &z) {return sqrt(x*x + y*y + z*z);} - double y00(const double &x, const double &y, const double &z) {return 1.0/2.0/sqrt(M_PI);} - double y10(const double &x, const double &y, const double &z) {double r=norm(x,y,z); return sqrt(3.0/(4.0*M_PI)) * z / r;} - double y11(const double &x, const double &y, const double &z) {double r=norm(x,y,z); return -1.0*sqrt(3.0/(4.*M_PI)) * x / r;} - double y1m1(const double &x, const double &y, const double &z) {double r=norm(x,y,z); return -1.0*sqrt(3./(4.*M_PI)) * y / r;} // y1m1 means Y1,-1 - double y20(const double &x, const double &y, const double &z) {double r=norm(x,y,z); return 1./4. * sqrt(5./M_PI) * (-1.*x*x - y*y + 2.*z*z) / (r*r);} - double y21(const double &x, const double &y, const double &z) {double r=norm(x,y,z); return -1.0*1./2. * sqrt(15./M_PI) * (z*x) / (r*r);} - double y2m1(const double &x, const double &y, const double &z) {double r=norm(x,y,z); return -1.0*1./2. * sqrt(15./M_PI) * (z*y) / (r*r);} - double y22(const double &x, const double &y, const double &z) {double r=norm(x,y,z); return 1./4. * sqrt(15./M_PI) * (x*x - y*y) / (r*r);} - double y2m2(const double &x, const double &y, const double &z) {double r=norm(x,y,z); return 1./2. * sqrt(15./M_PI) * (x*y) / (r*r);} - double y30(const double &x, const double &y, const double &z) {double r=norm(x,y,z); return 1./4. * sqrt(7./M_PI) * z*(2.*z*z-3.*x*x-3.*y*y) / (r*r*r);} - double y31(const double &x, const double &y, const double &z) {double r=norm(x,y,z); return -1.0*1./4. * sqrt(21./2./M_PI) * x*(4.*z*z-x*x-y*y) / (r*r*r);} - double y3m1(const double &x, const double &y, const double &z) {double r=norm(x,y,z); return -1.0*1./4. * sqrt(21./2./M_PI) * y*(4.*z*z-x*x-y*y) / (r*r*r);} - double y32(const double &x, const double &y, const double &z) {double r=norm(x,y,z); return 1./4. * sqrt(105./M_PI) * (x*x - y*y)*z / (r*r*r);} - double y3m2(const double &x, const double &y, const double &z) {double r=norm(x,y,z); return 1./2. * sqrt(105./M_PI) * x*y*z / (r*r*r);} - double y33(const double &x, const double &y, const double &z) {double r=norm(x,y,z); return -1.0*1./4. * sqrt(35./2./M_PI) * x*(x*x - 3.*y*y) / (r*r*r);} - double y3m3(const double &x, const double &y, const double &z) {double r=norm(x,y,z); return -1.0*1./4. * sqrt(35./2./M_PI) * y*(3.*x*x - y*y) / (r*r*r);} - double y40(const double &x, const double &y, const double &z) {double r=norm(x,y,z); return 3./16.*sqrt(1./M_PI) * (35.*z*z*z*z - 30.*z*z*r*r + 3*r*r*r*r) / (r*r*r*r);} - double y41(const double &x, const double &y, const double &z) {double r=norm(x,y,z); return -1.0*3./4.*sqrt(5./2./M_PI) * x*z*(7.*z*z - 3*r*r) / (r*r*r*r);} - double y4m1(const double &x, const double &y, const double &z) {double r=norm(x,y,z); return -1.0*3./4.*sqrt(5./2./M_PI) * y*z*(7.*z*z - 3.*r*r) / (r*r*r*r);} - double y42(const double &x, const double &y, const double &z) {double r=norm(x,y,z); return 3./8.*sqrt(5./M_PI) * (x*x-y*y)*(7.*z*z-r*r) / (r*r*r*r);} - double y4m2(const double &x, const double &y, const double &z) {double r=norm(x,y,z); return 3./4.*sqrt(5./M_PI) * x*y*(7.*z*z - r*r) / (r*r*r*r);} - double y43(const double &x, const double &y, const double &z) {double r=norm(x,y,z); return -1.0*3./4.*sqrt(35./2./M_PI) * x*z*(x*x - 3.*y*y) / (r*r*r*r);} - double y4m3(const double &x, const double &y, const double &z) {double r=norm(x,y,z); return -1.0*3./4.*sqrt(35./2./M_PI) * y*z*(3.*x*x - y*y) / (r*r*r*r);} - double y44(const double &x, const double &y, const double &z) {double r=norm(x,y,z); return 3./16.*sqrt(35./M_PI) * (x*x*(x*x - 3.*y*y) - y*y*(3.*x*x-y*y)) / (r*r*r*r);} - double y4m4(const double &x, const double &y, const double &z) {double r=norm(x,y,z); return 3./4.*sqrt(35./M_PI) * x*y*(x*x - y*y) / (r*r*r*r);} - - //the reference values are calculated by ModuleBase::Ylm::grad_rl_sph_harm - //1st dimension: example, 2nd dimension: Ylm, 3rd dimension: dx/dy/dz - double rlgyref[4][64][3] = { - { { 0.00000e+00, 0.00000e+00, 0.00000e+00}, { 0.00000e+00, 0.00000e+00, 4.88603e-01}, {-4.88603e-01, 0.00000e+00, 0.00000e+00}, - { 0.00000e+00, -4.88603e-01, 0.00000e+00}, {-6.30783e-01, 0.00000e+00, 0.00000e+00}, {-0.00000e+00, 0.00000e+00, -1.09255e+00}, - { 0.00000e+00, -0.00000e+00, 0.00000e+00}, { 1.09255e+00, 0.00000e+00, 0.00000e+00}, {-0.00000e+00, 1.09255e+00, -0.00000e+00}, - {-0.00000e+00, 0.00000e+00, -1.11953e+00}, { 1.37114e+00, 0.00000e+00, -0.00000e+00}, { 0.00000e+00, 4.57046e-01, 0.00000e+00}, - { 0.00000e+00, 0.00000e+00, 1.44531e+00}, {-0.00000e+00, 0.00000e+00, 0.00000e+00}, {-1.77013e+00, 0.00000e+00, -0.00000e+00}, - { 0.00000e+00, -1.77013e+00, 0.00000e+00}, { 1.26943e+00, 0.00000e+00, -0.00000e+00}, { 0.00000e+00, 0.00000e+00, 2.00714e+00}, - { 0.00000e+00, 0.00000e+00, 0.00000e+00}, {-1.89235e+00, 0.00000e+00, 0.00000e+00}, {-0.00000e+00, -9.46175e-01, 0.00000e+00}, - {-0.00000e+00, 0.00000e+00, -1.77013e+00}, { 0.00000e+00, -0.00000e+00, 0.00000e+00}, { 2.50334e+00, 0.00000e+00, 0.00000e+00}, - {-0.00000e+00, 2.50334e+00, 0.00000e+00}, { 0.00000e+00, 0.00000e+00, 1.75425e+00}, {-2.26473e+00, 0.00000e+00, 0.00000e+00}, - { 0.00000e+00, -4.52947e-01, 0.00000e+00}, {-0.00000e+00, 0.00000e+00, -2.39677e+00}, {-0.00000e+00, -0.00000e+00, 0.00000e+00}, - { 2.44619e+00, 0.00000e+00, 0.00000e+00}, { 0.00000e+00, 1.46771e+00, 0.00000e+00}, { 0.00000e+00, 0.00000e+00, 2.07566e+00}, - {-0.00000e+00, 0.00000e+00, 0.00000e+00}, {-3.28191e+00, 0.00000e+00, 0.00000e+00}, { 0.00000e+00, -3.28191e+00, 0.00000e+00}, - {-1.90708e+00, 0.00000e+00, 0.00000e+00}, {-0.00000e+00, 0.00000e+00, -2.91311e+00}, { 0.00000e+00, -0.00000e+00, 0.00000e+00}, - { 2.76362e+00, 0.00000e+00, -0.00000e+00}, {-0.00000e+00, 9.21205e-01, 0.00000e+00}, { 0.00000e+00, 0.00000e+00, 2.76362e+00}, - { 0.00000e+00, 0.00000e+00, 0.00000e+00}, {-3.02739e+00, 0.00000e+00, 0.00000e+00}, {-0.00000e+00, -2.01826e+00, 0.00000e+00}, - {-0.00000e+00, 0.00000e+00, -2.36662e+00}, { 0.00000e+00, -0.00000e+00, 0.00000e+00}, { 4.09910e+00, 0.00000e+00, 0.00000e+00}, - {-0.00000e+00, 4.09910e+00, 0.00000e+00}, {-0.00000e+00, 0.00000e+00, -2.38995e+00}, { 3.16161e+00, 0.00000e+00, -0.00000e+00}, - { 0.00000e+00, 4.51658e-01, 0.00000e+00}, { 0.00000e+00, 0.00000e+00, 3.31900e+00}, {-0.00000e+00, 0.00000e+00, 0.00000e+00}, - {-3.28564e+00, 0.00000e+00, 0.00000e+00}, { 0.00000e+00, -1.40813e+00, 0.00000e+00}, {-0.00000e+00, 0.00000e+00, -3.11349e+00}, - {-0.00000e+00, -0.00000e+00, 0.00000e+00}, { 3.63241e+00, 0.00000e+00, -0.00000e+00}, { 0.00000e+00, 2.59458e+00, 0.00000e+00}, - { 0.00000e+00, 0.00000e+00, 2.64596e+00}, { 0.00000e+00, 0.00000e+00, 0.00000e+00}, {-4.95014e+00, 0.00000e+00, -0.00000e+00}, - { 0.00000e+00, -4.95014e+00, 0.00000e+00} - }, - { - { 0.00000e+00, 0.00000e+00, 0.00000e+00}, { 0.00000e+00, 0.00000e+00, 4.88603e-01}, {-4.88603e-01, 0.00000e+00, 0.00000e+00}, - { 0.00000e+00, -4.88603e-01, 0.00000e+00}, { 0.00000e+00, -6.30783e-01, 0.00000e+00}, {-0.00000e+00, 0.00000e+00, 0.00000e+00}, - { 0.00000e+00, -0.00000e+00, -1.09255e+00}, { 0.00000e+00, -1.09255e+00, 0.00000e+00}, { 1.09255e+00, 0.00000e+00, -0.00000e+00}, - { 0.00000e+00, -0.00000e+00, -1.11953e+00}, { 4.57046e-01, 0.00000e+00, 0.00000e+00}, { 0.00000e+00, 1.37114e+00, -0.00000e+00}, - { 0.00000e+00, -0.00000e+00, -1.44531e+00}, { 0.00000e+00, 0.00000e+00, 0.00000e+00}, { 1.77013e+00, 0.00000e+00, 0.00000e+00}, - { 0.00000e+00, 1.77013e+00, 0.00000e+00}, { 0.00000e+00, 1.26943e+00, -0.00000e+00}, { 0.00000e+00, 0.00000e+00, 0.00000e+00}, - { 0.00000e+00, 0.00000e+00, 2.00714e+00}, { 0.00000e+00, 1.89235e+00, -0.00000e+00}, {-9.46175e-01, 0.00000e+00, 0.00000e+00}, - { 0.00000e+00, 0.00000e+00, 0.00000e+00}, { 0.00000e+00, 0.00000e+00, 1.77013e+00}, { 0.00000e+00, 2.50334e+00, -0.00000e+00}, - {-2.50334e+00, 0.00000e+00, 0.00000e+00}, { 0.00000e+00, 0.00000e+00, 1.75425e+00}, {-4.52947e-01, 0.00000e+00, 0.00000e+00}, - { 0.00000e+00, -2.26473e+00, 0.00000e+00}, { 0.00000e+00, 0.00000e+00, 2.39677e+00}, {-0.00000e+00, 0.00000e+00, 0.00000e+00}, - {-1.46771e+00, 0.00000e+00, 0.00000e+00}, { 0.00000e+00, -2.44619e+00, 0.00000e+00}, { 0.00000e+00, 0.00000e+00, 2.07566e+00}, - {-0.00000e+00, 0.00000e+00, 0.00000e+00}, {-3.28191e+00, 0.00000e+00, 0.00000e+00}, { 0.00000e+00, -3.28191e+00, 0.00000e+00}, - { 0.00000e+00, -1.90708e+00, 0.00000e+00}, {-0.00000e+00, 0.00000e+00, 0.00000e+00}, { 0.00000e+00, -0.00000e+00, -2.91311e+00}, - { 0.00000e+00, -2.76362e+00, 0.00000e+00}, { 9.21205e-01, 0.00000e+00, 0.00000e+00}, {-0.00000e+00, 0.00000e+00, 0.00000e+00}, - { 0.00000e+00, -0.00000e+00, -2.76362e+00}, { 0.00000e+00, -3.02739e+00, 0.00000e+00}, { 2.01826e+00, 0.00000e+00, 0.00000e+00}, - {-0.00000e+00, 0.00000e+00, 0.00000e+00}, { 0.00000e+00, -0.00000e+00, -2.36662e+00}, { 0.00000e+00, -4.09910e+00, 0.00000e+00}, - { 4.09910e+00, 0.00000e+00, 0.00000e+00}, { 0.00000e+00, -0.00000e+00, -2.38995e+00}, { 4.51658e-01, 0.00000e+00, 0.00000e+00}, - { 0.00000e+00, 3.16161e+00, -0.00000e+00}, { 0.00000e+00, -0.00000e+00, -3.31900e+00}, { 0.00000e+00, 0.00000e+00, 0.00000e+00}, - { 1.40813e+00, 0.00000e+00, 0.00000e+00}, { 0.00000e+00, 3.28564e+00, -0.00000e+00}, { 0.00000e+00, -0.00000e+00, -3.11349e+00}, - { 0.00000e+00, 0.00000e+00, 0.00000e+00}, { 2.59458e+00, 0.00000e+00, 0.00000e+00}, { 0.00000e+00, 3.63241e+00, -0.00000e+00}, - { 0.00000e+00, 0.00000e+00, -2.64596e+00}, { 0.00000e+00, 0.00000e+00, 0.00000e+00}, { 4.95014e+00, 0.00000e+00, 0.00000e+00}, - { 0.00000e+00, 4.95014e+00, -0.00000e+00} - }, - { - { 0.00000e+00, 0.00000e+00, 0.00000e+00}, { 0.00000e+00, 0.00000e+00, 4.88603e-01}, {-4.88603e-01, 0.00000e+00, 0.00000e+00}, - { 0.00000e+00, -4.88603e-01, 0.00000e+00}, { 0.00000e+00, 0.00000e+00, 1.26157e+00}, {-1.09255e+00, 0.00000e+00, 0.00000e+00}, - { 0.00000e+00, -1.09255e+00, 0.00000e+00}, { 0.00000e+00, 0.00000e+00, 2.22045e-16}, {-0.00000e+00, 0.00000e+00, -0.00000e+00}, - { 0.00000e+00, 0.00000e+00, 2.23906e+00}, {-1.82818e+00, 0.00000e+00, 0.00000e+00}, { 0.00000e+00, -1.82818e+00, 0.00000e+00}, - { 0.00000e+00, 0.00000e+00, 8.81212e-16}, {-0.00000e+00, 0.00000e+00, 0.00000e+00}, {-1.84324e-16, 0.00000e+00, 0.00000e+00}, - { 0.00000e+00, 5.55112e-17, 0.00000e+00}, { 0.00000e+00, 0.00000e+00, 3.38514e+00}, {-2.67619e+00, 0.00000e+00, 0.00000e+00}, - { 0.00000e+00, -2.67619e+00, 0.00000e+00}, { 0.00000e+00, 0.00000e+00, 2.30756e-15}, {-0.00000e+00, 0.00000e+00, 0.00000e+00}, - {-5.52973e-16, 0.00000e+00, 0.00000e+00}, { 0.00000e+00, 1.66533e-16, 0.00000e+00}, { 0.00000e+00, 0.00000e+00, 0.00000e+00}, - {-0.00000e+00, 0.00000e+00, 0.00000e+00}, { 0.00000e+00, 0.00000e+00, 4.67801e+00}, {-3.62357e+00, 0.00000e+00, 0.00000e+00}, - { 0.00000e+00, -3.62357e+00, 0.00000e+00}, { 0.00000e+00, 0.00000e+00, 4.87108e-15}, {-0.00000e+00, 0.00000e+00, 0.00000e+00}, - {-1.22267e-15, 0.00000e+00, 0.00000e+00}, { 0.00000e+00, 3.68219e-16, 0.00000e+00}, { 0.00000e+00, 0.00000e+00, 0.00000e+00}, - {-0.00000e+00, 0.00000e+00, 0.00000e+00}, { 4.93038e-32, 0.00000e+00, 0.00000e+00}, { 0.00000e+00, -6.16298e-33, 0.00000e+00}, - { 0.00000e+00, 0.00000e+00, 6.10264e+00}, {-4.66097e+00, 0.00000e+00, 0.00000e+00}, { 0.00000e+00, -4.66097e+00, 0.00000e+00}, - { 0.00000e+00, 0.00000e+00, 8.98664e-15}, {-0.00000e+00, 0.00000e+00, 0.00000e+00}, {-2.30221e-15, 0.00000e+00, 0.00000e+00}, - { 0.00000e+00, 6.93334e-16, 0.00000e+00}, { 0.00000e+00, 0.00000e+00, 0.00000e+00}, {-0.00000e+00, 0.00000e+00, 0.00000e+00}, - { 1.77767e-31, 0.00000e+00, 0.00000e+00}, { 0.00000e+00, -2.22209e-32, 0.00000e+00}, { 0.00000e+00, 0.00000e+00, 0.00000e+00}, - {-0.00000e+00, 0.00000e+00, 0.00000e+00}, { 0.00000e+00, 0.00000e+00, 7.64784e+00}, {-5.78122e+00, 0.00000e+00, 0.00000e+00}, - { 0.00000e+00, -5.78122e+00, 0.00000e+00}, { 0.00000e+00, 0.00000e+00, 1.51096e-14}, {-0.00000e+00, 0.00000e+00, 0.00000e+00}, - {-3.91011e-15, 0.00000e+00, 0.00000e+00}, { 0.00000e+00, 1.17757e-15, 0.00000e+00}, { 0.00000e+00, 0.00000e+00, 0.00000e+00}, - {-0.00000e+00, 0.00000e+00, 0.00000e+00}, { 4.67737e-31, 0.00000e+00, 0.00000e+00}, { 0.00000e+00, -5.84671e-32, 0.00000e+00}, - { 0.00000e+00, 0.00000e+00, 0.00000e+00}, { 0.00000e+00, 0.00000e+00, 0.00000e+00}, { 1.13319e-47, 0.00000e+00, 0.00000e+00}, - { 0.00000e+00, -1.41649e-48, 0.00000e+00} - }, - { - { 0.00000e+00, 0.00000e+00, 0.00000e+00}, { 0.00000e+00, 0.00000e+00, 4.88603e-01}, {-4.88603e-01, 0.00000e+00, 0.00000e+00}, - { 0.00000e+00, -4.88603e-01, 0.00000e+00}, { 3.64183e-01, 3.64183e-01, -7.28366e-01}, { 6.30783e-01, -0.00000e+00, 6.30783e-01}, - {-0.00000e+00, 6.30783e-01, 6.30783e-01}, {-6.30783e-01, 6.30783e-01, -1.66533e-16}, {-6.30783e-01, -6.30783e-01, 0.00000e+00}, - {-7.46353e-01, -7.46353e-01, 0.00000e+00}, { 0.00000e+00, 3.04697e-01, -1.21879e+00}, { 3.04697e-01, 0.00000e+00, -1.21879e+00}, - { 9.63537e-01, -9.63537e-01, 4.01253e-16}, { 9.63537e-01, 9.63537e-01, 9.63537e-01}, {-4.44089e-16, 1.18009e+00, -2.22045e-16}, - {-1.18009e+00, -1.11022e-16, 0.00000e+00}, { 4.88603e-01, 4.88603e-01, 1.30294e+00}, {-1.03006e+00, -7.72548e-01, 7.72548e-01}, - {-7.72548e-01, -1.03006e+00, 7.72548e-01}, {-7.28366e-01, 7.28366e-01, -5.25363e-16}, {-3.64183e-01, -3.64183e-01, -2.18510e+00}, - { 7.69185e-16, -2.04397e+00, -6.81324e-01}, { 2.04397e+00, 1.92296e-16, 6.81324e-01}, { 9.63537e-01, 9.63537e-01, -1.44756e-16}, - {-9.63537e-01, 9.63537e-01, -5.55112e-17}, { 5.19779e-01, 5.19779e-01, -1.81923e+00}, { 1.40917e+00, 8.05238e-01, 8.05238e-01}, - { 8.05238e-01, 1.40917e+00, 8.05238e-01}, { 0.00000e+00, -4.44089e-16, 3.24739e-16}, {-1.06523e+00, -1.06523e+00, 2.13046e+00}, - {-2.17439e-01, 1.73951e+00, 1.73951e+00}, {-1.73951e+00, 2.17439e-01, -1.73951e+00}, {-1.84503e+00, -1.84503e+00, -9.22517e-01}, - { 1.84503e+00, -1.84503e+00, 6.58625e-16}, { 1.45863e+00, 1.11022e-15, 0.00000e+00}, {-8.88178e-16, 1.45863e+00, 0.00000e+00}, - {-1.46807e+00, -1.46807e+00, 5.87227e-01}, {-4.48502e-01, -3.36617e-16, -2.24251e+00}, {-3.36617e-16, -4.48502e-01, -2.24251e+00}, - { 7.09144e-01, -7.09144e-01, 1.87222e-16}, { 2.12743e+00, 2.12743e+00, -9.38779e-16}, { 7.09144e-01, -5.11006e-16, -2.12743e+00}, - { 1.02201e-15, -7.09144e-01, 2.12743e+00}, { 1.81260e+00, 1.81260e+00, 2.58943e+00}, {-2.07154e+00, 2.07154e+00, -1.66969e-15}, - {-3.03637e+00, -2.31111e-15, -6.07275e-01}, { 1.84889e-15, -3.03637e+00, -6.07275e-01}, { 1.05183e+00, -1.05183e+00, 5.77778e-17}, - { 1.05183e+00, 1.05183e+00, 4.03986e-17}, { 1.27464e+00, 1.27464e+00, 1.69952e+00}, {-1.28472e+00, -1.20442e+00, 1.92707e+00}, - {-1.20442e+00, -1.28472e+00, 1.92707e+00}, {-8.52285e-01, 8.52285e-01, -6.74704e-16}, {-1.50789e+00, -1.50789e+00, -2.95022e+00}, - {-1.11260e+00, -2.08612e+00, 9.27164e-01}, { 2.08612e+00, 1.11260e+00, -9.27164e-01}, {-3.07506e-01, -3.07506e-01, -3.69007e+00}, - { 1.23002e+00, -1.23002e+00, 2.28018e-15}, { 3.69007e+00, -1.53753e-01, 1.84503e+00}, {-1.53753e-01, 3.69007e+00, 1.84503e+00}, - {-2.35197e+00, 2.35197e+00, -8.00513e-16}, {-2.35197e+00, -2.35197e+00, -7.83988e-01}, { 1.37903e-15, -1.46671e+00, 9.77875e-17}, - { 1.46671e+00, 1.14919e-15, 1.34475e-16} - } - }; - - void SetUp() - { - ylm.create(nylm,ng); - dylm = new ModuleBase::matrix[3]; - for(int i = 0 ; i < 3 ; ++i) dylm[i].create(nylm,ng); - g = new ModuleBase::Vector3[ng]; - g[0].set(1.0,0.0,0.0); - g[1].set(0.0,1.0,0.0); - g[2].set(0.0,0.0,1.0); - g[3].set(-1.0,-1.0,-1.0); - - rly = new double[nylm]; - rlyvector.resize(nylm); - rlgy = new double[nylm][3]; - rlgyvector = ModuleBase::Array_Pool(nylm,3); - ref = new double[64*4]{ - y00(g[0].x, g[0].y, g[0].z), y00(g[1].x, g[1].y, g[1].z), y00(g[2].x, g[2].y, g[2].z), y00(g[3].x, g[3].y, g[3].z), - y10(g[0].x, g[0].y, g[0].z), y10(g[1].x, g[1].y, g[1].z), y10(g[2].x, g[2].y, g[2].z), y10(g[3].x, g[3].y, g[3].z), - y11(g[0].x, g[0].y, g[0].z), y11(g[1].x, g[1].y, g[1].z), y11(g[2].x, g[2].y, g[2].z), y11(g[3].x, g[3].y, g[3].z), - y1m1(g[0].x, g[0].y, g[0].z), y1m1(g[1].x, g[1].y, g[1].z), y1m1(g[2].x, g[2].y, g[2].z), y1m1(g[3].x, g[3].y, g[3].z), - y20(g[0].x, g[0].y, g[0].z), y20(g[1].x, g[1].y, g[1].z), y20(g[2].x, g[2].y, g[2].z), y20(g[3].x, g[3].y, g[3].z), - y21(g[0].x, g[0].y, g[0].z), y21(g[1].x, g[1].y, g[1].z), y21(g[2].x, g[2].y, g[2].z), y21(g[3].x, g[3].y, g[3].z), - y2m1(g[0].x, g[0].y, g[0].z), y2m1(g[1].x, g[1].y, g[1].z), y2m1(g[2].x, g[2].y, g[2].z), y2m1(g[3].x, g[3].y, g[3].z), - y22(g[0].x, g[0].y, g[0].z), y22(g[1].x, g[1].y, g[1].z), y22(g[2].x, g[2].y, g[2].z), y22(g[3].x, g[3].y, g[3].z), - y2m2(g[0].x, g[0].y, g[0].z), y2m2(g[1].x, g[1].y, g[1].z), y2m2(g[2].x, g[2].y, g[2].z), y2m2(g[3].x, g[3].y, g[3].z), - y30(g[0].x, g[0].y, g[0].z), y30(g[1].x, g[1].y, g[1].z), y30(g[2].x, g[2].y, g[2].z), y30(g[3].x, g[3].y, g[3].z), - y31(g[0].x, g[0].y, g[0].z), y31(g[1].x, g[1].y, g[1].z), y31(g[2].x, g[2].y, g[2].z), y31(g[3].x, g[3].y, g[3].z), - y3m1(g[0].x, g[0].y, g[0].z), y3m1(g[1].x, g[1].y, g[1].z), y3m1(g[2].x, g[2].y, g[2].z), y3m1(g[3].x, g[3].y, g[3].z), - y32(g[0].x, g[0].y, g[0].z), y32(g[1].x, g[1].y, g[1].z), y32(g[2].x, g[2].y, g[2].z), y32(g[3].x, g[3].y, g[3].z), - y3m2(g[0].x, g[0].y, g[0].z), y3m2(g[1].x, g[1].y, g[1].z), y3m2(g[2].x, g[2].y, g[2].z), y3m2(g[3].x, g[3].y, g[3].z), - y33(g[0].x, g[0].y, g[0].z), y33(g[1].x, g[1].y, g[1].z), y33(g[2].x, g[2].y, g[2].z), y33(g[3].x, g[3].y, g[3].z), - y3m3(g[0].x, g[0].y, g[0].z), y3m3(g[1].x, g[1].y, g[1].z), y3m3(g[2].x, g[2].y, g[2].z), y3m3(g[3].x, g[3].y, g[3].z), - y40(g[0].x, g[0].y, g[0].z), y40(g[1].x, g[1].y, g[1].z), y40(g[2].x, g[2].y, g[2].z), y40(g[3].x, g[3].y, g[3].z), - y41(g[0].x, g[0].y, g[0].z), y41(g[1].x, g[1].y, g[1].z), y41(g[2].x, g[2].y, g[2].z), y41(g[3].x, g[3].y, g[3].z), - y4m1(g[0].x, g[0].y, g[0].z), y4m1(g[1].x, g[1].y, g[1].z), y4m1(g[2].x, g[2].y, g[2].z), y4m1(g[3].x, g[3].y, g[3].z), - y42(g[0].x, g[0].y, g[0].z), y42(g[1].x, g[1].y, g[1].z), y42(g[2].x, g[2].y, g[2].z), y42(g[3].x, g[3].y, g[3].z), - y4m2(g[0].x, g[0].y, g[0].z), y4m2(g[1].x, g[1].y, g[1].z), y4m2(g[2].x, g[2].y, g[2].z), y4m2(g[3].x, g[3].y, g[3].z), - y43(g[0].x, g[0].y, g[0].z), y43(g[1].x, g[1].y, g[1].z), y43(g[2].x, g[2].y, g[2].z), y43(g[3].x, g[3].y, g[3].z), - y4m3(g[0].x, g[0].y, g[0].z), y4m3(g[1].x, g[1].y, g[1].z), y4m3(g[2].x, g[2].y, g[2].z), y4m3(g[3].x, g[3].y, g[3].z), - y44(g[0].x, g[0].y, g[0].z), y44(g[1].x, g[1].y, g[1].z), y44(g[2].x, g[2].y, g[2].z), y44(g[3].x, g[3].y, g[3].z), - y4m4(g[0].x, g[0].y, g[0].z), y4m4(g[1].x, g[1].y, g[1].z), y4m4(g[2].x, g[2].y, g[2].z), y4m4(g[3].x, g[3].y, g[3].z), - 0.000000000000000, 0.000000000000000, 0.935602579627389, 0.090028400200397, - -0.452946651195697, -0.000000000000000, -0.000000000000000, -0.348678494661834, - -0.000000000000000, -0.452946651195697, -0.000000000000000, -0.348678494661834, - -0.000000000000000, 0.000000000000000, 0.000000000000000, -0.000000000000000, - -0.000000000000000, -0.000000000000000, 0.000000000000000, -0.000000000000000, - 0.489238299435250, 0.000000000000000, -0.000000000000000, -0.376615818502422, - 0.000000000000000, -0.489238299435250, -0.000000000000000, 0.376615818502422, - 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.532615198330370, - 0.000000000000000, 0.000000000000000, 0.000000000000000, -0.000000000000000, - -0.656382056840170, -0.000000000000000, -0.000000000000000, -0.168427714314628, - -0.000000000000000, -0.656382056840170, -0.000000000000000, -0.168427714314628, - -0.317846011338142, -0.317846011338142, 1.017107236282055, 0.226023830284901, - -0.000000000000000, -0.000000000000000, -0.000000000000000, 0.258942827786103, - -0.000000000000000, -0.000000000000000, -0.000000000000000, 0.258942827786103, - 0.460602629757462, -0.460602629757462, 0.000000000000000, -0.000000000000000, - 0.000000000000000, 0.000000000000000, 0.000000000000000, -0.409424559784410, - -0.000000000000000, -0.000000000000000, -0.000000000000000, 0.136474853261470, - -0.000000000000000, 0.000000000000000, -0.000000000000000, -0.136474853261470, - -0.504564900728724, -0.504564900728724, 0.000000000000000, -0.598002845308118, - -0.000000000000000, -0.000000000000000, 0.000000000000000, 0.000000000000000, - -0.000000000000000, -0.000000000000000, -0.000000000000000, 0.350610246256556, - -0.000000000000000, -0.000000000000000, -0.000000000000000, 0.350610246256556, - 0.683184105191914, -0.683184105191914, 0.000000000000000, -0.000000000000000, - 0.000000000000000, 0.000000000000000, 0.000000000000000, -0.202424920056864, - 0.000000000000000, 0.000000000000000, 1.092548430592079, -0.350435072502801, - 0.451658037912587, 0.000000000000000, -0.000000000000000, 0.046358202625865, - 0.000000000000000, 0.451658037912587, -0.000000000000000, 0.046358202625865, - 0.000000000000000, -0.000000000000000, 0.000000000000000, 0.000000000000000, - 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.492067081245654, - -0.469376801586882, -0.000000000000000, -0.000000000000000, 0.187354445356332, - -0.000000000000000, 0.469376801586882, -0.000000000000000, -0.187354445356332, - 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.355076798886913, - 0.000000000000000, 0.000000000000000, 0.000000000000000, -0.000000000000000, - 0.518915578720260, 0.000000000000000, -0.000000000000000, -0.443845998608641, - 0.000000000000000, 0.518915578720260, -0.000000000000000, -0.443845998608641, - 0.000000000000000, -0.000000000000000, 0.000000000000000, 0.000000000000000, - 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.452635881587108, - -0.707162732524596, 0.000000000000000, -0.000000000000000, 0.120972027847095, - -0.000000000000000, 0.707162732524596, -0.000000000000000, -0.120972027847095 - } ; - } - - void TearDown() - { - delete [] dylm; - delete [] g; - delete [] ref; - delete [] rly; - delete [] rlgy; - } -}; - -TEST_F(YlmRealTest,Constructor) -{ - EXPECT_NO_THROW(ModuleBase::YlmReal YR); -} - -TEST_F(YlmRealTest,YlmReal) -{ - ModuleBase::YlmReal::Ylm_Real(nylm,ng,g,ylm); - for(int i=0;i(g), ylm.c); - for(int i=0;i gplus = g[j]; - ModuleBase::Vector3 gminus = g[j]; - gplus[id] += step/2; - gminus[id] -= step/2; - ModuleBase::YlmReal::Ylm_Real(nylm,1,&gplus,ylmplus); - ModuleBase::YlmReal::Ylm_Real(nylm,1,&gminus,ylmminus); - for(int i=0;i R (20.0, 0.0, 0.0); - const double xdr = R.x/R.norm(); - const double ydr = R.y/R.norm(); - const double zdr = R.z/R.norm(); - const int L = 9; - const double rl = std::pow( R.norm(), L); - //std::cout << " rl=" << rl << std::endl; - ModuleBase::Ylm::set_coefficients(); - - int nu = 100; - - // Peize Lin change rlya 2016-08-26 - std::vector rlya; - double rlyb[400]; - ModuleBase::Ylm::ZEROS( rlyb, 400); - - ModuleBase::Ylm::rl_sph_harm(L, xdr, ydr, zdr, rlya); - ModuleBase::Ylm::get_ylm_real(L+1, R, rlyb); - - for (int i=0; i < nu; i++) - { - double diff = fabs(rlya[i]-rlyb[i]); - EXPECT_LT(diff,1e-8); - } - -} - -//used to be test2 in ylm.h -TEST_F(YlmRealTest, equality_gradient_test) -{ - - - ModuleBase::Vector3 R (0.1,-0.2,0.5); - ModuleBase::Ylm::set_coefficients(); - - //int nu = 100; - - double rlya[100]; - double rlyb[400]; - - ModuleBase::Array_Pool grlya(100, 3); - double grlyb[400][3]; - - ModuleBase::Ylm::grad_rl_sph_harm (9, R.x, R.y, R.z, rlya, grlya.get_ptr_2D()); - ModuleBase::Ylm::rlylm (10, R.x, R.y, R.z, rlyb, grlyb); - - for (int i = 0; i < 100; i++) - { - double diffx = fabs(grlya[i][2]-grlyb[i][2]); - EXPECT_LT(diffx,1e-8); - } - -} -TEST_F(YlmRealTest,YlmRealTemplatefloat) -{ - ModuleBase::Vector3 *gg; - gg = new ModuleBase::Vector3[ng]; - gg[0].set(1.0,0.0,0.0); - gg[1].set(0.0,1.0,0.0); - gg[2].set(0.0,0.0,1.0); - gg[3].set(-1.0,-1.0,-1.0); - float*ccc; - ccc=new float[nylm*ng]; - base_device::DEVICE_CPU* cpu_ctx = {}; - ModuleBase::YlmReal::Ylm_Real(cpu_ctx, nylm, ng, reinterpret_cast(gg), ccc); - for(int i=0;i (y) ? (x) : (y)) - -double count_err(double* x, std::function func, int n, int derivative) -{ - double maxf4x = -10000000000; - double maxh = 0; - - for (int i = 0; i != n; ++i) - { - maxf4x = MAX(abs(func(x[i])), maxf4x); - } - // printf("maxf4x = %.8lf\n", maxf4x); - for (int i = 1; i != n; ++i) - { - maxh = MAX(x[i + 1] - x[i], maxh); - } - - // if(func==2) printf("maxh = %.8lf,maxf4x = %.8lf\n", maxh,maxf4x); - double err = (5.0 / 384.0) * maxf4x * pow(maxh, 4 - derivative); - return MAX(err, 1e-15); - ; -} - -/// first kind boundary condition: f'(0) = f'(n) = 0.0 -TEST_F(MathzoneAdd1Test, sinx_Boundary1) -{ - for (int i = 0; i <= 10; i++) - { - r_in[i] = i * 0.1 * PI + 0.5 * PI; - psi_in[i] = sin(r_in[i]); - } - auto f = [](double x) -> double { return sin(x); }; - double err = count_err(r_in, f, 11, 0); - for (int i = 0; i < 100; i++) - { - r_out[i] = i * 0.01 * PI + 0.5 * PI; - } - ModuleBase::Mathzone_Add1::SplineD2(r_in, psi_in, 11, 0.0, 0.0, y2); - ModuleBase::Mathzone_Add1::Cubic_Spline_Interpolation(r_in, psi_in, y2, 11, r_out, 100, psi_out, dpsi); - for (int i = 0; i < 100; i++) - { - double ans = sin(r_out[i]); - EXPECT_NEAR(psi_out[i], ans, err); - } -} - -/// second kind boundary condition: f''(0) = f''(n) = 0.0 -TEST_F(MathzoneAdd1Test, sinx_Boundary2) -{ - for (int i = 0; i <= 10; i++) - { - r_in[i] = i * 0.1 * PI; - psi_in[i] = sin(r_in[i]); - } - auto f = [](double x) -> double { return sin(x); }; - double err = count_err(r_in, f, 11, 0); - for (int i = 0; i < 100; i++) - { - r_out[i] = i * 0.01 * PI; - } - ModuleBase::Mathzone_Add1::SplineD2(r_in, psi_in, 11, 0.0, 0.0, y2); - ModuleBase::Mathzone_Add1::Cubic_Spline_Interpolation(r_in, psi_in, y2, 11, r_out, 100, psi_out, dpsi); - for (int i = 0; i < 100; i++) - { - double ans = sin(r_out[i]); - EXPECT_NEAR(psi_out[i], ans, err); - } -} - -TEST_F(MathzoneAdd1Test, expx) -{ - for (int i = 0; i <= 10; i++) - { - r_in[i] = i; - psi_in[i] = exp(r_in[i]); - } - auto f = [](double x) -> double { return exp(x); }; - double err = count_err(r_in, f, 11, 0); - for (int i = 0; i < 100; i++) - { - r_out[i] = i * 0.1; - } - double d2 = exp(10); - ModuleBase::Mathzone_Add1::SplineD2(r_in, psi_in, 11, 1, d2, y2); - ModuleBase::Mathzone_Add1::Cubic_Spline_Interpolation(r_in, psi_in, y2, 11, r_out, 100, psi_out, dpsi); - for (int i = 0; i < 100; i++) - { - double ans = exp(r_out[i]); - EXPECT_NEAR(psi_out[i], ans, err); - } -} - -// /// second kind boundary condition: f''(0) = f''(n) = 0.0 -// TEST_F(MathzoneAdd1Test, expx_Boundary2) -// { -// for (int i=0; i<=10; i++) -// { -// r_in[i] = i; -// psi_in[i] = exp(r_in[i]); - -// } -// double err = count_err(r_in, 2, 11, 0); -// for (int i=0; i< 100; i++) -// { -// r_out[i] = i*0.1; -// } -// double d2 = exp(10); -// ModuleBase::Mathzone_Add1::SplineD2(r_in,psi_in,11,1,d2,y2); -// ModuleBase::Mathzone_Add1::Cubic_Spline_Interpolation(r_in,psi_in,y2,11,r_out,100,psi_out,dpsi); -// for (int i=0; i< 100; i++) -// { -// double ans = exp(r_out[i]); -// EXPECT_NEAR(psi_out[i],ans,err); -// } -// } - -/// second kind boundary condition: f''(0) = f''(n) = 0.0 -TEST_F(MathzoneAdd1Test, CubicSplineBoundary2) -{ - // data from abacus/tests/integrate/tools/PP_ORB/Si_gga_8au_60Ry_2s2p1d.orb - // data for 1st p orbital of Si: L = 1, N= 0 - psi_in[0] = 0; - psi_in[1] = 2.023466616834e-01; - psi_in[2] = 3.318755771343e-01; - psi_in[3] = 3.648245752646e-01; - psi_in[4] = 3.224822944963e-01; - psi_in[5] = 2.491332695240e-01; - psi_in[6] = 1.807635173291e-01; - psi_in[7] = 1.266983610308e-01; - psi_in[8] = 8.649140297968e-02; - psi_in[9] = 5.949030687701e-02; - psi_in[10] = 4.039513774853e-02; - psi_in[11] = 2.778453347548e-02; - psi_in[12] = 1.985533549037e-02; - psi_in[13] = 1.345471632235e-02; - psi_in[14] = 9.880871041599e-03; - psi_in[15] = 7.795456942712e-03; - psi_in[16] = 0; - for (int i = 0; i < nr_in; i++) - { - r_in[i] = i * 0.5; - // std::cout<< r_in[i] << " " << psi_in[i] << std::endl; // for plotting - } - for (int i = 0; i < nr_out; i++) - { - r_out[i] = i * 0.05; - } - ModuleBase::Mathzone_Add1::SplineD2(r_in, psi_in, nr_in, 100000.0, 100000.0, y2); - EXPECT_EQ(y2[0], 0.0); - EXPECT_EQ(y2[nr_in - 1], 0.0); - // std::cout << "y2[0] "<< y2[0] << " y2[nr_in] "<< y2[nr_in-1] << std::endl; // for checking - ModuleBase::Mathzone_Add1::Cubic_Spline_Interpolation(r_in, psi_in, y2, nr_in, r_out, nr_out, psi_out, dpsi); - for (int i = 0; i < nr_out; i++) - { - int j = i / 10; - if (i % 10 == 0) - { - EXPECT_EQ(psi_in[j], psi_out[i]); - } - // std::cout<< r_out[i] << " " << psi_out[i] << std::endl; // for plotting - } - // std::cout< direct, cartesian; -}; - -TEST_F(MathzoneTest, PointwiseProduct) -{ - std::vector aa, bb, cc; - for(int i=0;i<10;i++) - { - aa.push_back(i*i); - bb.push_back(i*2); - } - cc = ModuleBase::Mathzone::Pointwise_Product(aa,bb); - for(int i=0;i<10;i++) - { - EXPECT_EQ(cc[i],i*i*i*2); - } -} - -TEST_F(MathzoneTest, Direct2Cartesian) -{ - direct.set(0.1,0.2,0.4); - cartesian.set(0.368,2.02,10.68); - ModuleBase::Vector3 cartnew; - ModuleBase::Mathzone::Direct_to_Cartesian(direct.x, - direct.y, - direct.z, - R11, R12, R13, - R21, R22, R23, - R31, R32, R33, - cartnew.x, - cartnew.y, - cartnew.z); - EXPECT_NEAR(cartnew.x,cartesian.x, 1e-15); - EXPECT_NEAR(cartnew.y,cartesian.y, 1e-15); - EXPECT_NEAR(cartnew.z,cartesian.z, 1e-15); -} - -TEST_F(MathzoneTest, Cartesian2Direct) -{ - direct.set(0.1,0.2,0.4); - cartesian.set(0.368,2.02,10.68); - ModuleBase::Vector3 directnew; - ModuleBase::Mathzone::Cartesian_to_Direct(cartesian.x, - cartesian.y, - cartesian.z, - R11, R12, R13, - R21, R22, R23, - R31, R32, R33, - directnew.x, - directnew.y, - directnew.z); - EXPECT_NEAR(directnew.x,direct.x, 1e-15); - EXPECT_NEAR(directnew.y,direct.y, 1e-15); - EXPECT_NEAR(directnew.z,direct.z, 1e-15); -} diff --git a/source/module_base/test/matrix3_test.cpp b/source/module_base/test/matrix3_test.cpp deleted file mode 100644 index 6e98d7c09c..0000000000 --- a/source/module_base/test/matrix3_test.cpp +++ /dev/null @@ -1,366 +0,0 @@ -#include "../matrix3.h" -#include "gtest/gtest.h" -#include "gmock/gmock.h" -#include -#include - -/************************************************ - * unit test of class Matrix3 - ***********************************************/ - -/** - * - Tested Functions: - * - Construct - * - two ways of constructing a 3x3 matrix - * - Identity - * - set a 3x3 matrix to identity matrix - * - Zero - * - set all elements of a 3x3 matrix to zero - * - Det - * - calculate the determinant of 3x3 matrix - * - Transpose - * - do the transpose of 3x3 matrix - * - Inverse - * - do the inverse of 3x3 matrix - * - Assignment - * - overload assignment operator "=" for 3x3 matrix - * - AddEqual - * - overload operator "+=" for 3x3 matrix - * - MinusEqual - * - overload operator "-=" for 3x3 matrix - * - MultiplyEqual - * - overload operator "*=" for (3x3 matrix) * scalar - * - OverEqual - * - overload operator "/=" for (3x3 matrix) / scaler - * - Print - * - print a 3x3 matrix - * - MaddM - * - overload operator "+" for two 3x3 matrices - * - MminusM - * - overload operator "-" for two 3x3 matrices - * - MoverNum - * - overload operator "/" for a (3x3 matrix)/(scalar) - * - MmultiplyM - * - overload operator "*" for (3x3 matrix)*(3x3 matrix) - * - MmultiplyNum - * - overload operator "*" for (3x3 matrix)*(scalar) - * - and (scalar)*(3x3 matrix) - * - MmultiplyV - * - overload operator "*" for (3x3 matrix)*(Vector3) - * - VmultiplyM - * - overload operator "*" for (Vector3)*(3x3 matrix) - * - MeqM - * - overload operator "==" to assert - * - the equality between two 3x3 matrices - * - MneM - * - overload operator "!=" to assert - * - the inequality between two 3x3 matrices - * - ToMatrix - * - change the form of a 3x3 matrix from that of class Matrix3 - * - to that of class matrix - * -Template V Multiply M - * -tamplate classes for (Vector3)*(3x3 matrix) - */ - -class Matrix3Test : public testing::Test -{ -protected: - ModuleBase::Matrix3 matrix_a, matrix_a1, matrix_b; - ModuleBase::Matrix3 get_random_matrix3() - { - std::vector v(9); - for (auto &i : v) - { - i = std::rand(); - } - auto matrix_a = ModuleBase::Matrix3(v[0], v[1], v[2], v[3], v[4], v[5], v[6], v[7], v[8]); - return matrix_a; - } - // for capturing stdout - std::string output; -}; - -TEST_F(Matrix3Test, Construct) -{ - // method 1 - ModuleBase::Matrix3 ma; - EXPECT_EQ(ma.e11,1); EXPECT_EQ(ma.e12,0); EXPECT_EQ(ma.e13,0); - EXPECT_EQ(ma.e21,0); EXPECT_EQ(ma.e22,1); EXPECT_EQ(ma.e23,0); - EXPECT_EQ(ma.e31,0); EXPECT_EQ(ma.e32,0); EXPECT_EQ(ma.e33,1); - // method 2 - ModuleBase::Matrix3 mb(1,2,3,4,5,6,7,8,9); - EXPECT_EQ(mb.e11,1); EXPECT_EQ(mb.e12,2); EXPECT_EQ(mb.e13,3); - EXPECT_EQ(mb.e21,4); EXPECT_EQ(mb.e22,5); EXPECT_EQ(mb.e23,6); - EXPECT_EQ(mb.e31,7); EXPECT_EQ(mb.e32,8); EXPECT_EQ(mb.e33,9); -} - -TEST_F(Matrix3Test, Idenity) -{ - ModuleBase::Matrix3 mb(1,2,3,4,5,6,7,8,9); - mb.Identity(); - EXPECT_EQ(mb.e11,1); EXPECT_EQ(mb.e12,0); EXPECT_EQ(mb.e13,0); - EXPECT_EQ(mb.e21,0); EXPECT_EQ(mb.e22,1); EXPECT_EQ(mb.e23,0); - EXPECT_EQ(mb.e31,0); EXPECT_EQ(mb.e32,0); EXPECT_EQ(mb.e33,1); -} - -TEST_F(Matrix3Test, Zero) -{ - ModuleBase::Matrix3 ma; - ma.Zero(); - EXPECT_EQ(ma.e11,0); EXPECT_EQ(ma.e12,0); EXPECT_EQ(ma.e13,0); - EXPECT_EQ(ma.e21,0); EXPECT_EQ(ma.e22,0); EXPECT_EQ(ma.e23,0); - EXPECT_EQ(ma.e31,0); EXPECT_EQ(ma.e32,0); EXPECT_EQ(ma.e33,0); -} - -TEST_F(Matrix3Test, Det) -{ - ModuleBase::Matrix3 ma; - ma = get_random_matrix3(); - double determinant = ma.e11 * ma.e22 * ma.e33 - - ma.e11 * ma.e32 * ma.e23 - - ma.e12 * ma.e21 * ma.e33 - + ma.e12 * ma.e31 * ma.e23 - + ma.e13 * ma.e21 * ma.e32 - - ma.e13 * ma.e22 * ma.e31; - EXPECT_DOUBLE_EQ(ma.Det(),determinant); -} - -TEST_F(Matrix3Test, Transpose) -{ - ModuleBase::Matrix3 ma, mb; - ma = get_random_matrix3(); - mb = ma.Transpose(); - EXPECT_EQ(ma.e11,mb.e11); EXPECT_EQ(ma.e12,mb.e21); EXPECT_EQ(ma.e13,mb.e31); - EXPECT_EQ(ma.e21,mb.e12); EXPECT_EQ(ma.e22,mb.e22); EXPECT_EQ(ma.e23,mb.e32); - EXPECT_EQ(ma.e31,mb.e13); EXPECT_EQ(ma.e32,mb.e23); EXPECT_EQ(ma.e33,mb.e33); -} - -TEST_F(Matrix3Test, Inverse) -{ - ModuleBase::Matrix3 ma, mb; - ma = get_random_matrix3(); - mb = ma.Inverse(); - EXPECT_NEAR( (ma.e11*mb.e11 + ma.e12*mb.e21 + ma.e13*mb.e31), 1.0, 1e-15); - EXPECT_NEAR( (ma.e11*mb.e12 + ma.e12*mb.e22 + ma.e13*mb.e32), 0.0, 1e-15); - EXPECT_NEAR( (ma.e11*mb.e13 + ma.e12*mb.e23 + ma.e13*mb.e33), 0.0, 1e-15); - EXPECT_NEAR( (ma.e21*mb.e11 + ma.e22*mb.e21 + ma.e23*mb.e31), 0.0, 1e-15); - EXPECT_NEAR( (ma.e21*mb.e12 + ma.e22*mb.e22 + ma.e23*mb.e32), 1.0, 1e-15); - EXPECT_NEAR( (ma.e21*mb.e13 + ma.e22*mb.e23 + ma.e23*mb.e33), 0.0, 1e-15); - EXPECT_NEAR( (ma.e31*mb.e11 + ma.e32*mb.e21 + ma.e33*mb.e31), 0.0, 1e-15); - EXPECT_NEAR( (ma.e31*mb.e12 + ma.e32*mb.e22 + ma.e33*mb.e32), 0.0, 1e-15); - EXPECT_NEAR( (ma.e31*mb.e13 + ma.e32*mb.e23 + ma.e33*mb.e33), 1.0, 1e-15); -} - -TEST_F(Matrix3Test, Assignment) -{ - ModuleBase::Matrix3 ma, mb; - ma = get_random_matrix3(); - mb = ma; - EXPECT_EQ(ma.e11,mb.e11); EXPECT_EQ(ma.e12,mb.e12); EXPECT_EQ(ma.e13,mb.e13); - EXPECT_EQ(ma.e21,mb.e21); EXPECT_EQ(ma.e22,mb.e22); EXPECT_EQ(ma.e23,mb.e23); - EXPECT_EQ(ma.e31,mb.e31); EXPECT_EQ(ma.e32,mb.e32); EXPECT_EQ(ma.e33,mb.e33); -} - -TEST_F(Matrix3Test, AddEqual) -{ - ModuleBase::Matrix3 ma, mb; - ma = get_random_matrix3(); - mb += ma; - EXPECT_EQ(ma.e11+1.0,mb.e11); EXPECT_EQ(ma.e12,mb.e12); EXPECT_EQ(ma.e13,mb.e13); - EXPECT_EQ(ma.e21,mb.e21); EXPECT_EQ(ma.e22+1.0,mb.e22); EXPECT_EQ(ma.e23,mb.e23); - EXPECT_EQ(ma.e31,mb.e31); EXPECT_EQ(ma.e32,mb.e32); EXPECT_EQ(ma.e33+1.0,mb.e33); -} - -TEST_F(Matrix3Test, MinusEqual) -{ - ModuleBase::Matrix3 ma, mb; - ma = get_random_matrix3(); - mb -= ma; - EXPECT_EQ(1.0-ma.e11,mb.e11); EXPECT_EQ(-ma.e12,mb.e12); EXPECT_EQ(-ma.e13,mb.e13); - EXPECT_EQ(-ma.e21,mb.e21); EXPECT_EQ(1.0-ma.e22,mb.e22); EXPECT_EQ(-ma.e23,mb.e23); - EXPECT_EQ(-ma.e31,mb.e31); EXPECT_EQ(-ma.e32,mb.e32); EXPECT_EQ(1.0-ma.e33,mb.e33); -} - -TEST_F(Matrix3Test, MultiplyEqual) -{ - ModuleBase::Matrix3 ma, mb; - ma = get_random_matrix3(); - mb = ma; - mb *= 3.0; - EXPECT_EQ(ma.e11*3.0,mb.e11); EXPECT_EQ(ma.e12*3.0,mb.e12); EXPECT_EQ(ma.e13*3.0,mb.e13); - EXPECT_EQ(ma.e21*3.0,mb.e21); EXPECT_EQ(ma.e22*3.0,mb.e22); EXPECT_EQ(ma.e23*3.0,mb.e23); - EXPECT_EQ(ma.e31*3.0,mb.e31); EXPECT_EQ(ma.e32*3.0,mb.e32); EXPECT_EQ(ma.e33*3.0,mb.e33); -} - -TEST_F(Matrix3Test, OverEqual) -{ - ModuleBase::Matrix3 ma, mb; - ma = get_random_matrix3(); - mb = ma; - mb /= 3.0; - EXPECT_EQ(ma.e11/3.0,mb.e11); EXPECT_EQ(ma.e12/3.0,mb.e12); EXPECT_EQ(ma.e13/3.0,mb.e13); - EXPECT_EQ(ma.e21/3.0,mb.e21); EXPECT_EQ(ma.e22/3.0,mb.e22); EXPECT_EQ(ma.e23/3.0,mb.e23); - EXPECT_EQ(ma.e31/3.0,mb.e31); EXPECT_EQ(ma.e32/3.0,mb.e32); EXPECT_EQ(ma.e33/3.0,mb.e33); -} - -TEST_F(Matrix3Test, Print) -{ - ModuleBase::Matrix3 ma; - ma = get_random_matrix3(); - testing::internal::CaptureStdout(); - ma.print(); - output = testing::internal::GetCapturedStdout(); - EXPECT_THAT(output,testing::HasSubstr("e")); -} - -TEST_F(Matrix3Test, MaddM) -{ - ModuleBase::Matrix3 ma, mb, mc; - ma = get_random_matrix3(); - mb = get_random_matrix3(); - mc = ma + mb; - EXPECT_EQ(ma.e11+mb.e11, mc.e11); - EXPECT_EQ(ma.e12+mb.e12, mc.e12); - EXPECT_EQ(ma.e13+mb.e13, mc.e13); - EXPECT_EQ(ma.e21+mb.e21, mc.e21); - EXPECT_EQ(ma.e22+mb.e22, mc.e22); - EXPECT_EQ(ma.e23+mb.e23, mc.e23); - EXPECT_EQ(ma.e31+mb.e31, mc.e31); - EXPECT_EQ(ma.e32+mb.e32, mc.e32); - EXPECT_EQ(ma.e33+mb.e33, mc.e33); -} - -TEST_F(Matrix3Test, MminusM) -{ - ModuleBase::Matrix3 ma, mb, mc; - ma = get_random_matrix3(); - mb = get_random_matrix3(); - mc = ma - mb; - EXPECT_EQ(ma.e11-mb.e11, mc.e11); - EXPECT_EQ(ma.e12-mb.e12, mc.e12); - EXPECT_EQ(ma.e13-mb.e13, mc.e13); - EXPECT_EQ(ma.e21-mb.e21, mc.e21); - EXPECT_EQ(ma.e22-mb.e22, mc.e22); - EXPECT_EQ(ma.e23-mb.e23, mc.e23); - EXPECT_EQ(ma.e31-mb.e31, mc.e31); - EXPECT_EQ(ma.e32-mb.e32, mc.e32); - EXPECT_EQ(ma.e33-mb.e33, mc.e33); -} - -TEST_F(Matrix3Test, MoverNum) -{ - ModuleBase::Matrix3 ma, mb; - ma = get_random_matrix3(); - mb = ma/3.0; - EXPECT_EQ(ma.e11/3.0,mb.e11); EXPECT_EQ(ma.e12/3.0,mb.e12); EXPECT_EQ(ma.e13/3.0,mb.e13); - EXPECT_EQ(ma.e21/3.0,mb.e21); EXPECT_EQ(ma.e22/3.0,mb.e22); EXPECT_EQ(ma.e23/3.0,mb.e23); - EXPECT_EQ(ma.e31/3.0,mb.e31); EXPECT_EQ(ma.e32/3.0,mb.e32); EXPECT_EQ(ma.e33/3.0,mb.e33); -} - -TEST_F(Matrix3Test, MmultiplyM) -{ - ModuleBase::Matrix3 ma, mb, mc; - ma = get_random_matrix3(); - mb = get_random_matrix3(); - mc = ma * mb; - EXPECT_EQ( (ma.e11*mb.e11 + ma.e12*mb.e21 + ma.e13*mb.e31), mc.e11); - EXPECT_EQ( (ma.e11*mb.e12 + ma.e12*mb.e22 + ma.e13*mb.e32), mc.e12); - EXPECT_EQ( (ma.e11*mb.e13 + ma.e12*mb.e23 + ma.e13*mb.e33), mc.e13); - EXPECT_EQ( (ma.e21*mb.e11 + ma.e22*mb.e21 + ma.e23*mb.e31), mc.e21); - EXPECT_EQ( (ma.e21*mb.e12 + ma.e22*mb.e22 + ma.e23*mb.e32), mc.e22); - EXPECT_EQ( (ma.e21*mb.e13 + ma.e22*mb.e23 + ma.e23*mb.e33), mc.e23); - EXPECT_EQ( (ma.e31*mb.e11 + ma.e32*mb.e21 + ma.e33*mb.e31), mc.e31); - EXPECT_EQ( (ma.e31*mb.e12 + ma.e32*mb.e22 + ma.e33*mb.e32), mc.e32); - EXPECT_EQ( (ma.e31*mb.e13 + ma.e32*mb.e23 + ma.e33*mb.e33), mc.e33); -} - -TEST_F(Matrix3Test, MmultiplyNum) -{ - ModuleBase::Matrix3 ma, mb, mc; - ma = get_random_matrix3(); - mb = ma; - mc = ma; - mb = ma*3.0; - mc = 3.0*ma; - EXPECT_EQ(ma.e11*3.0,mb.e11); EXPECT_EQ(ma.e12*3.0,mb.e12); EXPECT_EQ(ma.e13*3.0,mb.e13); - EXPECT_EQ(ma.e21*3.0,mb.e21); EXPECT_EQ(ma.e22*3.0,mb.e22); EXPECT_EQ(ma.e23*3.0,mb.e23); - EXPECT_EQ(ma.e31*3.0,mb.e31); EXPECT_EQ(ma.e32*3.0,mb.e32); EXPECT_EQ(ma.e33*3.0,mb.e33); - EXPECT_EQ(ma.e11*3.0,mc.e11); EXPECT_EQ(ma.e12*3.0,mc.e12); EXPECT_EQ(ma.e13*3.0,mc.e13); - EXPECT_EQ(ma.e21*3.0,mc.e21); EXPECT_EQ(ma.e22*3.0,mc.e22); EXPECT_EQ(ma.e23*3.0,mc.e23); - EXPECT_EQ(ma.e31*3.0,mc.e31); EXPECT_EQ(ma.e32*3.0,mc.e32); EXPECT_EQ(ma.e33*3.0,mc.e33); -} - -TEST_F(Matrix3Test, MmultiplyV) -{ - ModuleBase::Matrix3 ma; - ModuleBase::Vector3 u(3.0,4.0,5.0); - ModuleBase::Vector3 v; - ma = get_random_matrix3(); - v = ma * u; - EXPECT_EQ(v.x, u.x*ma.e11+u.y*ma.e12+u.z*ma.e13); - EXPECT_EQ(v.y, u.x*ma.e21+u.y*ma.e22+u.z*ma.e23); - EXPECT_EQ(v.z, u.x*ma.e31+u.y*ma.e32+u.z*ma.e33); -} - -TEST_F(Matrix3Test, VmultiplyM) -{ - ModuleBase::Matrix3 ma; - ModuleBase::Vector3 u(3.0,4.0,5.0); - ModuleBase::Vector3 v; - ma = get_random_matrix3(); - v = u*ma; - EXPECT_EQ(v.x, u.x*ma.e11+u.y*ma.e21+u.z*ma.e31); - EXPECT_EQ(v.y, u.x*ma.e12+u.y*ma.e22+u.z*ma.e32); - EXPECT_EQ(v.z, u.x*ma.e13+u.y*ma.e23+u.z*ma.e33); -} - -TEST_F(Matrix3Test, MeqM) -{ - matrix_a = get_random_matrix3(); - matrix_a1 = matrix_a; - matrix_b = get_random_matrix3(); - EXPECT_TRUE(matrix_a == matrix_a1); - EXPECT_FALSE(matrix_a == matrix_b); -} - -TEST_F(Matrix3Test, MneM) -{ - matrix_a = get_random_matrix3(); - matrix_a1 = matrix_a; - matrix_b = get_random_matrix3(); - EXPECT_FALSE(matrix_a != matrix_a1); - EXPECT_TRUE(matrix_a != matrix_b); -} - -TEST_F(Matrix3Test, ToMatrix) -{ - ModuleBase::Matrix3 ma; - ModuleBase::matrix mb; - ma = get_random_matrix3(); - mb = ma.to_matrix(); - EXPECT_EQ(ma.e11,mb(0,0)); EXPECT_EQ(ma.e12,mb(0,1)); EXPECT_EQ(ma.e13,mb(0,2)); - EXPECT_EQ(ma.e21,mb(1,0)); EXPECT_EQ(ma.e22,mb(1,1)); EXPECT_EQ(ma.e23,mb(1,2)); - EXPECT_EQ(ma.e31,mb(2,0)); EXPECT_EQ(ma.e32,mb(2,1)); EXPECT_EQ(ma.e33,mb(2,2)); -} - -TEST_F(Matrix3Test,TemplateVectorMultiplyMatrix) -{ - ModuleBase::Vector3 ui(1,2,3); - ModuleBase::Vector3 ud(1.0,2.0,3.0); - ModuleBase::Vector3 uf(1.0,2.0,3.0); - ModuleBase::Vector3 vi,vd,vf; - ModuleBase::Matrix3 ma; - ma = get_random_matrix3(); - vi=ui*ma; - vd=ud*ma; - vf=uf*ma; - EXPECT_DOUBLE_EQ(vi.x,ui.x * ma.e11 + ui.y * ma.e21 + ui.z * ma.e31); - EXPECT_DOUBLE_EQ(vi.y,ui.x * ma.e12 + ui.y * ma.e22 + ui.z * ma.e32); - EXPECT_DOUBLE_EQ(vi.z,ui.x * ma.e13 + ui.y * ma.e23 + ui.z * ma.e33); - EXPECT_DOUBLE_EQ(vd.x,ud.x * ma.e11 + ud.y * ma.e21 + ud.z * ma.e31); - EXPECT_DOUBLE_EQ(vd.y,ud.x * ma.e12 + ud.y * ma.e22 + ud.z * ma.e32); - EXPECT_DOUBLE_EQ(vd.z,ud.x * ma.e13 + ud.y * ma.e23 + ud.z * ma.e33); - EXPECT_DOUBLE_EQ(vf.x,uf.x * ma.e11 + uf.y * ma.e21 + uf.z * ma.e31); - EXPECT_DOUBLE_EQ(vf.y,uf.x * ma.e12 + uf.y * ma.e22 + uf.z * ma.e32); - EXPECT_DOUBLE_EQ(vf.z,uf.x * ma.e13 + uf.y * ma.e23 + uf.z * ma.e33); -} \ No newline at end of file diff --git a/source/module_base/test/matrix_test.cpp b/source/module_base/test/matrix_test.cpp deleted file mode 100644 index b04ebc510e..0000000000 --- a/source/module_base/test/matrix_test.cpp +++ /dev/null @@ -1,384 +0,0 @@ -#include"../matrix.h" -#include"gtest/gtest.h" -#include "gmock/gmock.h" - -/************************************************ -* unit test of class matrix and related functions -***********************************************/ - -/** - * - Tested functions of class matrix: - * - constructor: - * - constructed by nrow and ncloumn - * - constructed by a matrix - * - constructed by the rvalue of a matrix - * - function create - * - operator "=": assigned by a matrix or the rvalue of a matrix - * - operator "()": access the element - * - operator "*=", "+=", "-=" - * - function trace_on - * - function zero_out - * - function fill_out(fill a matrix with a const double) - * - function max/min/absmax - * - function norm - * - function print(print the element which is larger than threshold) - * - function reshape(change the index of the array) - * - * - Tested functions related to class matrix - * - operator "+", "-", "*" between two matrixs - * - operator "*" between a double and a matrix, and reverse. - * - function transpose - * - function trace_on - * - function mdot - * - function matrixAlloc - */ - -//a mock function of WARNING_QUIT, to avoid the uncorrected call by matrix.cpp at line 37. -namespace ModuleBase -{ - void matrixAlloc(); -} - -class matrixTest : public testing::Test -{ - protected: - ModuleBase::matrix m23a,m33a,m33b,m33c,m34a,m34b; - - void SetUp() - { - m23a.create(2,3); - for (int i=1;i<=6;++i) {m23a.c[i-1] = i*1.0;} - - m33a.create(3,3); - for (int i=1;i<=9;++i) {m33a.c[i-1] = i*1.0;} - - m33b.create(3,3); - for (int i=1;i<=9;++i) {m33b.c[i-1] = i*11.1;} - - m33c.create(3,3,true); - m34a.create(3,4,true); - m34b.create(3,4,true); - } - -}; - -TEST(matrix,ConstructorNrNc) -{ - ModuleBase::matrix m(3,4,true); - EXPECT_EQ(m.nr,3); - EXPECT_EQ(m.nc,4); - EXPECT_DOUBLE_EQ(m(0,0),0.0); -} - -TEST_F(matrixTest,ConstructorMatrix) -{ - ModuleBase::matrix m(m33a); - int mnr = m.nr; - EXPECT_EQ(mnr,m33a.nr); - EXPECT_EQ(m.nc,m33a.nc); - for (int i=0;i<9;++i) - { - EXPECT_DOUBLE_EQ(m.c[i],m33a.c[i]); - } -} - -TEST_F(matrixTest,ConstructorMtrixRValue) -{ - - ModuleBase::matrix m(3.0*m33a); - EXPECT_EQ(m.nr,m33a.nr); - EXPECT_EQ(m.nc,m33a.nc); - for (int i=0;i<9;++i) - { - EXPECT_DOUBLE_EQ(m.c[i],m33a.c[i] * 3.0); - } -} - -TEST_F(matrixTest,Create) -{ - m33a.create(13,14,true); - EXPECT_EQ(m33a.nr,13); - EXPECT_EQ(m33a.nc,14); - for(int i=0;i<13*14;++i) - { - EXPECT_DOUBLE_EQ(m33a.c[i],0.0); - } -} - -TEST_F(matrixTest,OperatorEqualMatrix) -{ - ModuleBase::matrix m; - m = m33a; - EXPECT_EQ(m.nr,m33a.nr); - EXPECT_EQ(m.nc,m33a.nc); - for (int i=0;i<9;++i) - { - EXPECT_DOUBLE_EQ(m.c[i],m33a.c[i]); - } - - m23a = m33a; - EXPECT_EQ(m23a.nr,m33a.nr); - EXPECT_EQ(m23a.nc,m33a.nc); -} - -TEST_F(matrixTest,OperatorEqualMatrixRvalue) -{ - ModuleBase::matrix m; - m = 3.0 * m33a; - EXPECT_EQ(m.nr,m33a.nr); - EXPECT_EQ(m.nc,m33a.nc); - for (int i=0;i<9;++i) - { - EXPECT_DOUBLE_EQ(m.c[i],m33a.c[i] * 3.0); - } -} - -TEST_F(matrixTest,OperatorParentheses) -{ - //EXPECT_DEATH(m33a(3,3),""); - //EXPECT_DEATH(m33a(-1,0),""); - m33a(0,0) = 1.1; - EXPECT_DOUBLE_EQ(m33a(0,0),1.1); -} - -TEST_F(matrixTest,OperatorMultiplyEqual) -{ - m33b = m33a; - m33a *= 11.1; - for (int i=0;i -#include - -namespace GlobalV -{ - std::ofstream ofs_running; - int KPAR = 1; -} // namespace GlobalV - -/************************************************ - * unit test of class Memory - ***********************************************/ - -/** - * - Tested Functions: - * - calculate_mem - * - caculate memory consumed for various types - * - of data - * - record - * - record memory consumed during running - * - print_all - * - print memory consumed (> MB) in a - * - std::ofstream file - */ - -#define private public -#include "../memory.h" -#undef private - -class MemoryTest : public testing::Test -{ -protected: - // definition according to ../memory_psi.cpp - double factor = 1.0 / 1024.0 / 1024.0; // MB - double complex_matrix_mem = 2*sizeof(double) * factor; // byte to MB - double double_mem = sizeof(double) * factor; - double int_mem = sizeof(int) * factor; - double bool_mem = sizeof(bool) * factor; - double float_mem = sizeof(float) * factor; - double short_mem = sizeof(short) * factor; - int n = 1024; - // for capturing stdout - std::string output; - // for output in file - std::ofstream ofs; - std::ifstream ifs; - void TearDown() - { - remove("tmp"); - } -}; - -TEST_F(MemoryTest, Constructor) -{ - EXPECT_NO_THROW(ModuleBase::Memory mem); -} - -TEST_F(MemoryTest, CalculateMem) -{ - // three types of complex number - EXPECT_EQ(ModuleBase::Memory::calculate_mem(n,"ModuleBase::ComplexMatrix"), - n * complex_matrix_mem); - EXPECT_EQ(ModuleBase::Memory::calculate_mem(n,"complexmatrix"), - n * complex_matrix_mem); - EXPECT_EQ(ModuleBase::Memory::calculate_mem(n,"cdouble"), - n * complex_matrix_mem); - - // three types of integral number - EXPECT_EQ(ModuleBase::Memory::calculate_mem(n,"bool"), n * bool_mem); - EXPECT_EQ(ModuleBase::Memory::calculate_mem(n,"int"), n * int_mem); - EXPECT_EQ(ModuleBase::Memory::calculate_mem(n,"short"), n * short_mem); - - // three types of float point number - EXPECT_EQ(ModuleBase::Memory::calculate_mem(n,"real"), n * double_mem); - EXPECT_EQ(ModuleBase::Memory::calculate_mem(n,"double"), n * double_mem); - EXPECT_EQ(ModuleBase::Memory::calculate_mem(n,"float"), n * float_mem); - - // vector with 3 double float point number - EXPECT_EQ(ModuleBase::Memory::calculate_mem(n,"ModuleBase::Vector3"), - n * 3 * double_mem); - - // test a struct AtomLink defined in module_neighbor/sltk_grid.h - // AtomLink defined as class FAtom (module_neighbor/sltk_atom.h) - // which includes 3 double and 2 int numbers - EXPECT_EQ(ModuleBase::Memory::calculate_mem(n,"AtomLink"), - n * (int_mem * 2 + 3 * double_mem)); - - // test types of data not defined - testing::internal::CaptureStdout(); - ModuleBase::Memory::calculate_mem(n,"Exception"); - output = testing::internal::GetCapturedStdout(); - EXPECT_THAT(output,testing::HasSubstr("not this type in memory storage")); -} - -TEST_F(MemoryTest,Record) -{ - // abacus record mem in MB - // for double - double mem = ModuleBase::Memory::record("wavefunc","evc",1024*1024,"double"); - EXPECT_EQ(mem,double_mem/factor); - // for cdouble - mem = ModuleBase::Memory::record("wavefunc","evc",1024*1024,"cdouble"); - EXPECT_EQ(mem,complex_matrix_mem/factor); - // for int - mem = ModuleBase::Memory::record("wavefunc","evc",1024*1024,"int"); - EXPECT_EQ(mem,int_mem/factor); - // for bool - mem = ModuleBase::Memory::record("wavefunc","evc",1024*1024,"bool"); - EXPECT_EQ(mem,bool_mem/factor); - // for float - mem = ModuleBase::Memory::record("wavefunc","evc",1024*1024,"float"); - EXPECT_EQ(mem,float_mem/factor); - // for short - mem = ModuleBase::Memory::record("wavefunc","evc",1024*1024,"short"); - EXPECT_EQ(mem,short_mem/factor); - // for Vector3 - mem = ModuleBase::Memory::record("wavefunc","evc",1024*1024,"ModuleBase::Vector3"); - EXPECT_EQ(mem,double_mem/factor*3); - // for AtomLink - mem = ModuleBase::Memory::record("wavefunc","evc",1024*1024,"AtomLink"); - EXPECT_EQ(mem,double_mem/factor*3+int_mem/factor*2); -} - -TEST_F(MemoryTest, printall) -{ - ofs.open("tmp"); - // total memory is an internal parameter and added inside the class Memory - ModuleBase::Memory::record("Charge_Mixing","Rrho",1024*1024,"ModuleBase::Vector3"); - ModuleBase::Memory::record("Charge_Mixing","drho",1024*1024,"AtomLink"); - ModuleBase::Memory::record("wavefunc","evc",1024*1024,"float"); - ModuleBase::Memory::print_all(ofs); - ofs.close(); - ifs.open("tmp"); - getline(ifs,output); - getline(ifs,output); - EXPECT_THAT(output,testing::HasSubstr("MEMORY(MB)")); - ifs.close(); -} - -TEST_F(MemoryTest, finish) -{ - *ModuleBase::Memory::name = "tmp_name"; - *ModuleBase::Memory::class_name = "tmp_class_name"; - *ModuleBase::Memory::consume = 100.0; - ModuleBase::Memory::init_flag = true; - ofs.open("tmp"); - // total memory is an internal parameter and added inside the class Memory - ModuleBase::Memory::record("Charge_Mixing","Rrho",1024*1024,"ModuleBase::Vector3"); - EXPECT_NO_THROW(ModuleBase::Memory::finish(ofs)); - ofs.close(); - EXPECT_FALSE(ModuleBase::Memory::init_flag); -} diff --git a/source/module_base/test/mymath_test.cpp b/source/module_base/test/mymath_test.cpp deleted file mode 100644 index e7b1198bdf..0000000000 --- a/source/module_base/test/mymath_test.cpp +++ /dev/null @@ -1,66 +0,0 @@ -#include "../mymath.h" -#include "gtest/gtest.h" -#include -#include - -/************************************************ - * unit test of heap sort functions - ***********************************************/ - -/** - * - Tested Functions: - * - Heapsort - * - heapsort function in mymath.cpp - * - Hpsort - * - hpsort function in mymath.cpp - * - */ - -class MymathTest : public testing::Test -{ -protected: - int number; -}; - -TEST_F(MymathTest,Heapsort) -{ - number = 5; - double rr[number]; - int index[number]; - rr[0] = 10; - rr[1] = 9; - rr[2] = 8; - rr[3] = 7; - rr[4] = 6; - index[0] = 0; - //for (int i=0;i -#include "module_base/ndarray.h" -#include - -// TEST(NDArray, Constructor) -// { -// const NDArray a; -// EXPECT_EQ(a.size(), 0); -// EXPECT_EQ(a.empty(), true); -// } - -TEST(NDArray, InitializerListConstructor) -{ - const NDArray a({1, 2, 3}); /* 1 * 2 * 3, 3d array */ - EXPECT_EQ(a.size(), 6); - EXPECT_EQ(a.empty(), false); -} - -TEST(NDArray, VariadicTemplateConstructor) -{ - const NDArray a(1, 2, 3); /* 1 * 2 * 3, 3d array */ - EXPECT_EQ(a.size(), 6); - EXPECT_EQ(a.empty(), false); -} - -TEST(NDArray, CopyConstructor) -{ - const NDArray a(1, 2, 3); /* 1 * 2 * 3, 3d array */ - const NDArray b(a); - EXPECT_EQ(b.size(), 6); - EXPECT_EQ(b.empty(), false); - // and a will be the same as b - EXPECT_EQ(a.size(), 6); - EXPECT_EQ(a.empty(), false); -} - -TEST(NDArray, MoveConstructor) -{ - NDArray a(1, 2, 3); /* 1 * 2 * 3, 3d array */ - const NDArray b(std::move(a)); - EXPECT_EQ(b.size(), 6); - EXPECT_EQ(b.empty(), false); - // and a will be empty, but still valid (principle of std::move) - EXPECT_EQ(a.size(), 0); - EXPECT_EQ(a.empty(), true); -} - -TEST(NDArray, CopyAssignment) -{ - const NDArray a(1, 2, 3); /* 1 * 2 * 3, 3d array */ - NDArray b(1); - b = a; - EXPECT_EQ(b.size(), 6); - EXPECT_EQ(b.empty(), false); - // and a will be the same as b - EXPECT_EQ(a.size(), 6); - EXPECT_EQ(a.empty(), false); -} - -TEST(NDArray, MoveAssignment) -{ - NDArray a(1, 2, 3); /* 1 * 2 * 3, 3d array */ - NDArray b(1); - b = std::move(a); - EXPECT_EQ(b.size(), 6); - EXPECT_EQ(b.empty(), false); - // and a will be empty, but still valid (principle of std::move) - EXPECT_EQ(a.size(), 0); - EXPECT_EQ(a.empty(), true); -} - -TEST(NDArray, EqualityOperator) -{ - const NDArray a(1, 2, 3); /* 1 * 2 * 3, 3d array */ - const NDArray b(1, 2, 3); /* 1 * 2 * 3, 3d array */ - const NDArray c(1, 2, 4); /* 1 * 2 * 4, 3d array */ - EXPECT_EQ(a == b, true); - EXPECT_EQ(a == c, false); -} - -TEST(NDArray, InequalityOperator) -{ - const NDArray a(1, 2, 3); /* 1 * 2 * 3, 3d array */ - const NDArray b(1, 2, 3); /* 1 * 2 * 3, 3d array */ - const NDArray c(1, 2, 4); /* 1 * 2 * 4, 3d array */ - EXPECT_EQ(a != b, false); - EXPECT_EQ(a != c, true); -} - -TEST(NDArray, Index) -{ - const NDArray a(1, 2, 3); /* 1 * 2 * 3, 3d array */ - EXPECT_EQ(a.index(0, 0, 0), 0); - EXPECT_EQ(a.index(0, 0, 1), 1); - EXPECT_EQ(a.index(0, 0, 2), 2); - EXPECT_EQ(a.index(0, 1, 0), 3); - EXPECT_EQ(a.index(0, 1, 1), 4); - EXPECT_EQ(a.index(0, 1, 2), 5); -} - -TEST(NDArray, AtMethodMultiIndex) -{ - NDArray a(1, 2, 3); /* 1 * 2 * 3, 3d array */ - a.at(0, 0, 0) = 1; - a.at(0, 0, 1) = 2; - a.at(0, 0, 2) = 3; - a.at(0, 1, 0) = 4; - a.at(0, 1, 1) = 5; - a.at(0, 1, 2) = 6; - EXPECT_EQ(a.at(0, 0, 0), 1); - EXPECT_EQ(a.at(0, 0, 1), 2); - EXPECT_EQ(a.at(0, 0, 2), 3); - EXPECT_EQ(a.at(0, 1, 0), 4); - EXPECT_EQ(a.at(0, 1, 1), 5); - EXPECT_EQ(a.at(0, 1, 2), 6); -} - -TEST(NDArray, IndexOperatorMultiIndex) -{ - NDArray a(1, 2, 3); - a(0, 0, 0) = 1; - a(0, 0, 1) = 2; - a(0, 0, 2) = 3; - a(0, 1, 0) = 4; - a(0, 1, 1) = 5; - a(0, 1, 2) = 6; - EXPECT_EQ(a(0, 0, 0), 1); - EXPECT_EQ(a(0, 0, 1), 2); - EXPECT_EQ(a(0, 0, 2), 3); - EXPECT_EQ(a(0, 1, 0), 4); - EXPECT_EQ(a(0, 1, 1), 5); - EXPECT_EQ(a(0, 1, 2), 6); -} - -TEST(NDArray, Reshape) -{ - NDArray a(1, 2, 3); /* 1 * 2 * 3, 3d array */ - a.reshape(2, 3, 1); /* 2 * 3 * 1, 3d array */ - EXPECT_EQ(a.size(), 6); - EXPECT_EQ(a.empty(), false); - // expect assert error if the size is not the same - EXPECT_DEATH(a.reshape(2, 3, 2), ""); -} - -TEST(NDArray, ReshapeValue) -{ - NDArray a(1, 2, 3); /* 1 * 2 * 3, 3d array */ - /* - [ - [ - [1, 2, 3], - [4, 5, 6] - ] - ] // in sequence of 1, 2, 3, 4, 5, 6 - */ - a(0, 0, 0) = 1; - a(0, 0, 1) = 2; - a(0, 0, 2) = 3; - a(0, 1, 0) = 4; - a(0, 1, 1) = 5; - a(0, 1, 2) = 6; - a.reshape(2, 3, 1); /* 2 * 3 * 1, 3d array */ - /* - [ - [ - [1], - [2], - [3] - ], - [ - [4], - [5], - [6] - ] - ] - */ - EXPECT_EQ(a(0, 0, 0), 1); - EXPECT_EQ(a(0, 1, 0), 2); - EXPECT_EQ(a(0, 2, 0), 3); - EXPECT_EQ(a(1, 0, 0), 4); - EXPECT_EQ(a(1, 1, 0), 5); - EXPECT_EQ(a(1, 2, 0), 6); -} - -TEST(NDArray, ReshapeInfer) -{ - const NDArray a(1, 2, 3); /* 1 * 2 * 3, 3d array */ - // infer the first dimension - // infer the second dimension - // infer the last dimension -} - -int main(int argc, char **argv) -{ - testing::InitGoogleTest(&argc, argv); - return RUN_ALL_TESTS(); -} diff --git a/source/module_base/test/opt_CG_test.cpp b/source/module_base/test/opt_CG_test.cpp deleted file mode 100644 index b8abeb5760..0000000000 --- a/source/module_base/test/opt_CG_test.cpp +++ /dev/null @@ -1,221 +0,0 @@ -#ifdef __MPI -#undef __MPI -#endif -#include "gtest/gtest.h" -#include "../opt_CG.h" -#include "../opt_DCsrch.h" -#include "./opt_test_tools.h" - -#define DOUBLETHRESHOLD 1e-8 - -class CG_test : public testing::Test -{ -protected: - ModuleBase::Opt_CG cg; - ModuleBase::Opt_DCsrch ds; - // LinearEqu le; - // MinFunc mf; - TestTools tools; - int maxiter = 500; - double step = 1.; - double residual = 10.; - double tol = 1e-5; - int final_iter = 0; - char *task = nullptr; - double *Ap = nullptr; - double *p = nullptr; - double *x = nullptr; - - void SetUp() - { - cg.set_para(1.); - cg.allocate(tools.nx); - cg.init_b(tools.le.b); - task = new char[60]; - Ap = new double[tools.nx]; - p = new double[tools.nx]; - x = new double[tools.nx]; - } - - void TearDown() - { - delete[] task; - delete[] Ap; - delete[] p; - delete[] x; - } - - void CG_Solve_LinearEq() - { - final_iter = 0; - cg.refresh(0, tools.le.b); - step = 1; - residual = 10.; - for (int i = 0; i < tools.nx; ++i) - { - x[i] = 0; - p[i] = 0; - Ap[i] = 0; - } - for (int iter = 0; iter < maxiter; ++iter) - { - if (residual < tol) - { - final_iter = iter; - break; - } - cg.next_direct(Ap, 0, p); - tools.le.get_Ap(tools.le.A, p, Ap); - int ifPD = 0; - step = cg.step_length(Ap, p, ifPD); - for (int i = 0; i < 3; ++i) { x[i] += step * p[i]; -} - residual = cg.get_residual(); - } - } - - void Solve(int cg_label, int func_label) - { - if (func_label==0) - { - cg.refresh(0, tools.le.b); - } - else - { - cg.refresh(); - } - ds.set_paras(1e-4, 2e-1, 1e-12, 0.,12.); - step = 1.; - residual = 10.; - final_iter = 0; - for (int i = 0; i < tools.nx; ++i) - { - x[i] = 0; - p[i] = 0; - Ap[i] = 0; - } - - double f = 0; - double g = 0; - double *gradient = new double[3]; - double *temp_x = new double[3]; - ModuleBase::GlobalFunc::ZEROS(gradient, 3); - ModuleBase::GlobalFunc::ZEROS(temp_x, 3); - - for (int iter = 0; iter < maxiter; ++iter) - { - tools.dfuncdx(x, gradient, func_label); - residual = 0; - for (int i = 0; i<3 ;++i) { residual += gradient[i] * gradient[i]; -} - if (residual < tol) - { - final_iter = iter; - break; - } - cg.next_direct(gradient, cg_label, p); - for (int i = 0; i < 3; ++i) { temp_x[i] = x[i]; -} - task[0] = 'S'; task[1] = 'T'; task[2] = 'A'; task[3] = 'R'; task[4] = 'T'; - while (true) - { - f = tools.func(temp_x, func_label); - g = tools.dfuncdstp(temp_x, p, func_label); - ds.dcSrch(f, g, step, task); - if (task[0] == 'F' && task[1] == 'G') - { - for (int j = 0; j < 3; ++j) { temp_x[j] = x[j] + step * p[j]; -} - continue; - } - else if (task[0] == 'C' && task[1] == 'O') - { - break; - } - else if (task[0] == 'W' && task[1] == 'A') - { - break; - } - else if (task[0] == 'E' && task[1] == 'R') - { - break; - } - } - for (int i = 0; i < 3; ++i) { x[i] += step * p[i]; -} - } - delete[] temp_x; - delete[] gradient; - } -}; - -TEST_F(CG_test, Stand_Solve_LinearEq) -{ -#ifdef __MPI -#undef __MPI - CG_Solve_LinearEq(); - EXPECT_NEAR(x[0], 0.5, DOUBLETHRESHOLD); - EXPECT_NEAR(x[1], 1.6429086563584579739e-18, DOUBLETHRESHOLD); - EXPECT_NEAR(x[2], 1.5, DOUBLETHRESHOLD); - ASSERT_EQ(final_iter, 4); - ASSERT_EQ(cg.get_iter(), 4); -#define __MPI -#endif -} - -TEST_F(CG_test, PR_Solve_LinearEq) -{ -#ifdef __MPI -#undef __MPI - Solve(1, 0); - EXPECT_NEAR(x[0], 0.50000000000003430589, DOUBLETHRESHOLD); - EXPECT_NEAR(x[1], -3.4028335704761047964e-14, DOUBLETHRESHOLD); - EXPECT_NEAR(x[2], 1.5000000000000166533, DOUBLETHRESHOLD); - ASSERT_EQ(final_iter, 3); - ASSERT_EQ(cg.get_iter(), 3); -#define __MPI -#endif -} - -TEST_F(CG_test, HZ_Solve_LinearEq) -{ -#ifdef __MPI -#undef __MPI - Solve(2, 0); - EXPECT_NEAR(x[0], 0.49999999999999944489, DOUBLETHRESHOLD); - EXPECT_NEAR(x[1], -9.4368957093138305936e-16, DOUBLETHRESHOLD); - EXPECT_NEAR(x[2], 1.5000000000000011102, DOUBLETHRESHOLD); - ASSERT_EQ(final_iter, 3); - ASSERT_EQ(cg.get_iter(), 3); -#define __MPI -#endif -} - -TEST_F(CG_test, PR_Min_Func) -{ -#ifdef __MPI -#undef __MPI - Solve(1, 1); - EXPECT_NEAR(x[0], 4.0006805979150792396, DOUBLETHRESHOLD); - EXPECT_NEAR(x[1], 2.0713759992720870429, DOUBLETHRESHOLD); - EXPECT_NEAR(x[2], 9.2871067233169171118, DOUBLETHRESHOLD); - ASSERT_EQ(final_iter, 18); - ASSERT_EQ(cg.get_iter(), 18); -#define __MPI -#endif -} - -TEST_F(CG_test, HZ_Min_Func) -{ -#ifdef __MPI -#undef __MPI - Solve(2, 1); - EXPECT_NEAR(x[0], 4.0006825378033568086, DOUBLETHRESHOLD); - EXPECT_NEAR(x[1], 2.0691732100663737803, DOUBLETHRESHOLD); - EXPECT_NEAR(x[2], 9.2780872787668311474, DOUBLETHRESHOLD); - ASSERT_EQ(final_iter, 18); - ASSERT_EQ(cg.get_iter(), 18); -#define __MPI -#endif -} -// g++ -std=c++11 ../opt_CG.cpp ../opt_DCsrch.cpp ./CG_test.cpp ./test_tools.cpp -lgtest -lpthread -lgtest_main -o test.exe \ No newline at end of file diff --git a/source/module_base/test/opt_TN_test.cpp b/source/module_base/test/opt_TN_test.cpp deleted file mode 100644 index 1fc5b7f2d6..0000000000 --- a/source/module_base/test/opt_TN_test.cpp +++ /dev/null @@ -1,141 +0,0 @@ -#include "gtest/gtest.h" -#include "../opt_TN.hpp" -#include "../opt_DCsrch.h" -#include "./opt_test_tools.h" - -#define DOUBLETHRESHOLD 1e-5 - -class TN_test : public testing::Test -{ -protected: - ModuleBase::Opt_TN tn; - ModuleBase::Opt_DCsrch ds; - TestTools tools; - int maxiter = 500; - double step = 1.; - double residual = 10.; - double tol = 1e-5; - int final_iter = 0; - int flag = 0; - char *task = nullptr; - double *p = nullptr; - double *x = nullptr; - - void SetUp() - { - tn.set_para(1.); - tn.allocate(tools.nx); - task = new char[60]; - p = new double[tools.nx]; - x = new double[tools.nx]; - } - - void TearDown() - { - delete[] task; - delete[] p; - delete[] x; - } - - void Solve(int func_label) - { - tn.refresh(); - ds.set_paras(1e-4, 2e-1, 1e-12, 0.,12.); - step = 1.; - residual = 10.; - final_iter = 0; - for (int i = 0; i < tools.nx; ++i) - { - x[i] = 0; - p[i] = 0; - } - - double f = 0; - double g = 0; - double *gradient = new double[3]; - double *temp_x = new double[3]; - ModuleBase::GlobalFunc::ZEROS(gradient, 3); - ModuleBase::GlobalFunc::ZEROS(temp_x, 3); - - for (int iter = 0; iter < maxiter; ++iter) - { - tools.dfuncdx(x, gradient, func_label); - residual = 0; - for (int i = 0; i<3 ;++i) { residual += gradient[i] * gradient[i]; -} - if (residual < tol) - { - final_iter = iter; - break; - } - if (func_label == 0) - { - tn.next_direct(x, gradient, flag, p, &(tools.le), &LinearEqu::dfuncdx); - } - else if (func_label == 1) - { - tn.next_direct(x, gradient, flag, p, &(tools.mf), &ModuleESolver::ESolver_OF::dfuncdx); - } - for (int i = 0; i < 3; ++i) { temp_x[i] = x[i]; -} - task[0] = 'S'; task[1] = 'T'; task[2] = 'A'; task[3] = 'R'; task[4] = 'T'; - while (true) - { - f = tools.func(temp_x, func_label); - g = tools.dfuncdstp(temp_x, p, func_label); - ds.dcSrch(f, g, step, task); - if (task[0] == 'F' && task[1] == 'G') - { - for (int j = 0; j < 3; ++j) { temp_x[j] = x[j] + step * p[j]; -} - continue; - } - else if (task[0] == 'C' && task[1] == 'O') - { - break; - } - else if (task[0] == 'W' && task[1] == 'A') - { - break; - } - else if (task[0] == 'E' && task[1] == 'R') - { - break; - } - } - for (int i = 0; i < 3; ++i) { x[i] += step * p[i]; -} - } - delete[] temp_x; - delete[] gradient; - } -}; - - -TEST_F(TN_test, TN_Solve_LinearEq) -{ -#ifdef __MPI -#undef __MPI - Solve(0); - EXPECT_NEAR(x[0], 0.50000000000003430589, DOUBLETHRESHOLD); - EXPECT_NEAR(x[1], -3.4028335704761047964e-14, DOUBLETHRESHOLD); - EXPECT_NEAR(x[2], 1.5000000000000166533, DOUBLETHRESHOLD); - ASSERT_EQ(final_iter, 1); - ASSERT_EQ(tn.get_iter(), 1); -#define __MPI -#endif -} - -TEST_F(TN_test, TN_Min_Func) -{ -#ifdef __MPI -#undef __MPI - Solve(1); - EXPECT_NEAR(x[0], 4.0049968540891525137, DOUBLETHRESHOLD); - EXPECT_NEAR(x[1], 2.1208751163987624722, DOUBLETHRESHOLD); - EXPECT_NEAR(x[2], 9.4951527720891863993, DOUBLETHRESHOLD); - ASSERT_EQ(final_iter, 6); - ASSERT_EQ(tn.get_iter(), 6); -#define __MPI -#endif -} \ No newline at end of file diff --git a/source/module_base/test/opt_test_tools.cpp b/source/module_base/test/opt_test_tools.cpp deleted file mode 100644 index 71e136b3ef..0000000000 --- a/source/module_base/test/opt_test_tools.cpp +++ /dev/null @@ -1,130 +0,0 @@ -#ifdef __MPI -#undef __MPI -#endif -#include "./opt_test_tools.h" -#include - -LinearEqu::LinearEqu() -{ - // initial A, x, b, p, Ap - - // A = [[2,1,0], [1,2,1], [0,1,2]] - A = new double*[this->nx]; - for (int i = 0; i < this->nx; ++i) - { - A[i] = new double[this->nx]; - } - A[0][0] = 2; A[0][1] = 1; A[0][2] = 0; - A[1][0] = 1; A[1][1] = 2; A[1][2] = 1; - A[2][0] = 0; A[2][1] = 1; A[2][2] = 2; - // A[0][0] = 1; A[0][1] = 1; A[0][2] = 0; - // A[1][0] = 1; A[1][1] = 1; A[1][2] = 1; - // A[2][0] = 0; A[2][1] = 1; A[2][2] = 1; - - b = new double[this->nx]; - b[0] = 1; b[1] = 2; b[2] = this->nx; -} - -LinearEqu::~LinearEqu() -{ - delete[] b; - for (int i = 0; i < this->nx; ++i) - { - delete[] A[i]; - } - delete[] A; -} - -void LinearEqu::get_Ap(double **A, double *p, double *Ap, int nx, int ny) -{ - for (int i = 0; i < this->nx; ++i) - { - Ap[i] = 0; - for (int j = 0; j < ny; ++j) - { - Ap[i] += A[i][j] * p[j]; - } - } -} - -// f(x) = xAx/2 - bx -// A must be symmetrical positive definite matrix -double LinearEqu::func(double *x) -{ - double *Ax = new double[this->nx]; - this->get_Ap(A, x, Ax, this->nx, this->nx); - double result = 0; - for (int i = 0; i < this->nx; ++i) - { - result += x[i] * Ax[i] / 2 - b[i] * x[i]; - } - delete[] Ax; - return result; -} - -// df(x)/dx = Ax - b -void LinearEqu::dfuncdx(double *x, double *gradient) -{ - double *Ax = new double[this->nx]; - this->get_Ap(A, x, Ax, this->nx, this->nx); - for (int i = 0; i < this->nx; ++i) - { - gradient[i] = Ax[i] - b[i]; - } - delete[] Ax; -} - -// x = x + ap -// df(x)/da = df(x)/dx * dx/da = (Ax - b)*p -double LinearEqu::dfuncdstp(double *x, double *p) -{ - double *Ax = new double[this->nx]; - get_Ap(A, x, Ax, this->nx, this->nx); - double result = 0; - for (int i = 0; i < this->nx; ++i) - { - result += (Ax[i] - b[i]) * p[i]; - } - delete[] Ax; - return result; -} - -namespace ModuleESolver -{ -// f(x) = xAx/2 - bx -// A must be symmetrical positive definite matrix -double ESolver_OF::func(double *x) -{ - double result = 0.; - result += pow(x[0] - x[1] - 2, 4.); - result += pow((x[0] * x[1] - x[2] + 1), 2.); - result += pow(x[0] - 4, 2.); - // result += pow(x[0] - 2, 4.); - // result += pow(x[1] - 2, 2.); - // result += pow(x[2] - 4, 2.); - return result; -} - -// df(x)/dx = Ax - b -void ESolver_OF::dfuncdx(double *x, double *gradient) -{ - gradient[0] = 4 * pow(x[0] - x[1] - 2, 3) + 2 * (x[0] * x[1] - x[2] + 1) * x[1] + 2 * (x[0] - 4); - gradient[1] = -4 * pow(x[0] - x[1] - 2, 3) + 2 * (x[0] * x[1] - x[2] + 1) * x[0]; - gradient[2] = -2 * (x[0] * x[1] - x[2] + 1); - // gradient[0] = 4 * pow(x[0] - 2, 3.); - // gradient[1] = 2 * (x[1] - 2); - // gradient[2] = 2 * (x[2] - 4); -} - -// x = x + ap -// df(x)/da = df(x)/dx * dx/da = gradient*p -double ESolver_OF::dfuncdstp(double *x, double *p) -{ - double *grad = new double[3]; - dfuncdx(x, grad); - double result = 0; - for (int i = 0; i < 3; ++i) result += grad[i] * p[i]; - delete[] grad; - return result; -} -} \ No newline at end of file diff --git a/source/module_base/test/opt_test_tools.h b/source/module_base/test/opt_test_tools.h deleted file mode 100644 index 178b36c7d0..0000000000 --- a/source/module_base/test/opt_test_tools.h +++ /dev/null @@ -1,60 +0,0 @@ -class LinearEqu -{ -public: - LinearEqu(); - ~LinearEqu(); - void get_Ap(double **A, double *p, double *Ap, int nx = 3, int ny = 3); - double func(double *x); - void dfuncdx(double *x, double *gradient); - double dfuncdstp(double *x, double *p); - double *b; - double **A; - int nx = 3; -}; - -namespace ModuleESolver -{ -// A mock class of ModuleEsolver::ESolver_OF -class ESolver_OF -{ -public: - ESolver_OF(){}; - ~ESolver_OF(){}; - double func(double *x); - void dfuncdx(double *x, double *gradient); - double dfuncdstp(double *x, double *p); - double *x; -}; -} - -class TestTools -{ -public: - TestTools() - { - this->nx = le.nx; - } - double func(double *x, int func_label) - { - double result = 0.; - if (func_label==0) result = le.func(x); - else if (func_label==1) result = mf.func(x); - return result; - } - void dfuncdx(double *x, double *gradient, int func_label) - { - if (func_label==0) le.dfuncdx(x, gradient); - else if (func_label==1) mf.dfuncdx(x, gradient); - } - double dfuncdstp(double *x, double *p, int func_label) - { - double result = 0.; - if (func_label==0) result = le.dfuncdstp(x, p); - else if (func_label==1) result = mf.dfuncdstp(x, p); - return result; - } - - int nx = 0; - LinearEqu le; - ModuleESolver::ESolver_OF mf; -}; diff --git a/source/module_base/test/perf_sphbes_test.cpp b/source/module_base/test/perf_sphbes_test.cpp deleted file mode 100644 index 4c574baa8e..0000000000 --- a/source/module_base/test/perf_sphbes_test.cpp +++ /dev/null @@ -1,72 +0,0 @@ -#include"../math_sphbes.h" -#include -#include -#include -#include -#include - -/************************************************ -* performace test of class Sphbes -***********************************************/ - -/** - * Tested function: - * - sphbesj - * - Spherical_Bessel - */ - -class PerfSphbes : public benchmark::Fixture { -public: - const double q = 1; - const int n = 1000; - double stop = 1000.0; - double dr = 0.0; - double* rc, *rinf, *jc, *jinf; - void SetUp(const benchmark::State& state){ - const double rcut = state.range(0) + 0.5; - rc = new double[n + 10]; - rinf = new double[n + 10]; - jc = new double[n + 10]; - jinf = new double[n + 10]; - - // generate data points in (0, rcut] in log scale - double rmin = 0.0001; - double log_rmin = std::log(rmin); - double log_rcut = std::log(rcut); - dr = (log_rcut - log_rmin) / (n-1); - memset(rc, 0, (n+10) * sizeof(double)); - for (int i = 0; i < n; i++) - rc[i] = std::exp(log_rmin + i * dr); - - // generate data points in [rcut, stop] in linear scale - memset(rinf, 0, (n+10) * sizeof(double)); - rinf[0] = rcut; - dr = (stop - rcut) / (n-1); - for (int i = 1; i < n; i++) - rinf[i] += rinf[i-1] + dr; - } - void TearDown(const benchmark::State& state){ - delete[] rc; - delete[] rinf; - delete[] jc; - delete[] jinf; - } -}; - -BENCHMARK_DEFINE_F(PerfSphbes, BM_Spherical_Bessel)(benchmark::State& state) { - for (auto _ : state) { - ModuleBase::Sphbes::Spherical_Bessel(n, rc, q, state.range(0), jc); - ModuleBase::Sphbes::Spherical_Bessel(n, rinf, q, state.range(0), jinf); - } -} - -BENCHMARK_DEFINE_F(PerfSphbes, BM_sphbesj)(benchmark::State& state) { - for (auto _ : state) { - ModuleBase::Sphbes::sphbesj(n, rc, q, state.range(0), jc); - ModuleBase::Sphbes::sphbesj(n, rinf, q, state.range(0), jinf); - } -} - -BENCHMARK_REGISTER_F(PerfSphbes, BM_sphbesj)->DenseRange(0, 11, 1)->Unit(benchmark::kMicrosecond); -BENCHMARK_REGISTER_F(PerfSphbes, BM_Spherical_Bessel)->DenseRange(0, 11, 1)->Unit(benchmark::kMicrosecond); -BENCHMARK_MAIN(); \ No newline at end of file diff --git a/source/module_base/test/realarray_test.cpp b/source/module_base/test/realarray_test.cpp deleted file mode 100644 index cf469c1d7d..0000000000 --- a/source/module_base/test/realarray_test.cpp +++ /dev/null @@ -1,216 +0,0 @@ -#include "../realarray.h" -#include "gtest/gtest.h" -#include "gmock/gmock.h" -/************************************************ - * unit test of class realArray - ***********************************************/ - -/** - * - Tested Functions: - * - GetArrayCount - * - get the total number of real array created - * - Construct - * - construct real arrays (3 or 4 dimensions) - * - Creat - * - create a real array (3 or 4 dimensions) - * - GetSize - * - get the total size of a real array - * - GetDim - * - get the dimension of a real array - * - ZeroOut - * - set all elements of a real array to zero - * - GetBound - * - get the size of each dimension of a real array - * - ArrayEqReal - * - set all value of an array to a double float - * - ArrayEqArray - * - equal a realarray to another one - * - Parentheses - * - access element by using operator"()" - * - ConstParentheses - * - access element by using "()" through pointer - * - without changing its elements - * - realArrayAlloc - * - output the warning message when allocation error for realArray - * - occurs - * - zeros - * - set all elements of a 1_d array to zero - */ - -class realArrayTest : public testing::Test -{ -protected: - ModuleBase::realArray a3, a4, b3, b4; - double aa = 11.0; - double bb = 1.0; - int count0 = 0; - int count1 = 0; - const double zero = 0.0; -}; - -namespace ModuleBase -{ -void realArrayAlloc(); -} - -TEST_F(realArrayTest,GetArrayCount) -{ - count0 = ModuleBase::realArray::getArrayCount(); - ModuleBase::realArray c3, c4; - count1 = ModuleBase::realArray::getArrayCount(); - EXPECT_EQ((count1-count0),2); -} - -TEST_F(realArrayTest,Construct) -{ - ModuleBase::realArray x3(1,5,3); - ModuleBase::realArray xp3(x3); - ModuleBase::realArray x4(1,7,3,4); - ModuleBase::realArray xp4(x4); - EXPECT_EQ(x3.getSize(),15); - EXPECT_EQ(xp3.getSize(),15); - EXPECT_EQ(x4.getSize(),84); - EXPECT_EQ(xp4.getSize(),84); -} - -TEST_F(realArrayTest,Create) -{ - a3.create(1,2,3); - a4.create(1,2,3,4); - EXPECT_EQ(a3.getSize(),6); - EXPECT_EQ(a4.getSize(),24); -} - -TEST_F(realArrayTest,GetSize) -{ - ModuleBase::realArray a3(1,5,3); - //std::cout<< &a3 << &(this->a3) <(p,100); - for(int i = 0 ; i < 100; i ++) - { - EXPECT_DOUBLE_EQ(p[i],0.0); - } - delete [] p; - -} diff --git a/source/module_base/test/sph_bessel_recursive_test.cpp b/source/module_base/test/sph_bessel_recursive_test.cpp deleted file mode 100644 index 9355cb0903..0000000000 --- a/source/module_base/test/sph_bessel_recursive_test.cpp +++ /dev/null @@ -1,84 +0,0 @@ -#include"../sph_bessel_recursive.h" -#include"gtest/gtest.h" - -#define threshold 1e-12 - -/************************************************ -* unit test of class Sph_Bessel_Recursive -***********************************************/ - -/** - * Note: this unit test try to ensure the invariance - * of the spherical Bessel produced by class Sph_Bessel_Recursive, - * and the reference results are produced by ModuleBase::Sph_Bessel_Recursive - * at 2022-1-25. - * - */ - -double mean(std::vector &vect) -{ - double meanv = 0.0; - - int totN = vect.size(); - for (int i=0; i< totN; ++i) {meanv += vect[i]/totN;} - - return meanv; -} - -TEST(SphBessel,D1) -{ - int lmax = 7; - int rmesh = 700; - double dx = 0.01; - - ModuleBase::Sph_Bessel_Recursive::D1 sphbesseld1; - sphbesseld1.set_dx(dx); - sphbesseld1.cal_jlx(lmax,rmesh); - std::vector> jlx = sphbesseld1.get_jlx(); - - ASSERT_EQ(jlx.size(),static_cast(lmax + 1)); - EXPECT_NEAR( mean(jlx[0])/0.2084468748396, 1.0, threshold); - EXPECT_NEAR( mean(jlx[1])/0.12951635180384, 1.0, threshold); - EXPECT_NEAR( mean(jlx[2])/0.124201140093879, 1.0, threshold); - EXPECT_NEAR( mean(jlx[3])/0.118268654505568, 1.0, threshold); - EXPECT_NEAR( mean(jlx[4])/0.0933871035384385, 1.0, threshold); - EXPECT_NEAR( mean(jlx[5])/0.0603800487910689, 1.0, threshold); - EXPECT_NEAR( mean(jlx[6])/0.0327117051555907, 1.0, threshold); - EXPECT_NEAR( mean(jlx[7])/0.0152155566653926, 1.0, threshold); -} - - -TEST(SphBessel,D2) -{ - int lmax = 7; - int rmesh = 700; - int kmesh = 800; - double dx = 0.0001; - - ModuleBase::Sph_Bessel_Recursive::D2 sphbesseld2; - sphbesseld2.set_dx(dx); - sphbesseld2.cal_jlx(lmax,rmesh,kmesh); - std::vector>> jlxd2 = sphbesseld2.get_jlx(); - std::vector> jlx(lmax+1); - - ASSERT_EQ(jlxd2.size(),static_cast(lmax + 1)); - - //calculate the mean of jlxd2[i][j] and assign to jlx[i][j] - for(int i=0; i -#include - -#include "gtest/gtest.h" -#include "module_base/constants.h" - -#ifdef __MPI -#include -#endif - -using ModuleBase::PI; -using ModuleBase::SphericalBesselTransformer; - -/*********************************************************** - * Unit test of class SphericalBesselTransform - ***********************************************************/ - -/*! Tested functions: - * - * - radrfft - * - Performs a spherical Bessel transform via fast - * Fourier transforms. - * - * - direct - * - Performs a spherical Bessel transform via quadrature - * using the Simpson's rule. - * - * - set_fftw_plan_flag - * - Sets the planner flag for FFTW plan creation. - * - * */ - -class SphericalBesselTransformTest : public ::testing::Test -{ - - protected: - /// Allocates buffers - void SetUp(); - - /// Deallocates buffers - void TearDown(); - - /// Gets the maximum absolute element-wise difference between two arrays - static double max_diff(int sz, const double* arr1, const double* arr2); - - const int sz_max = 10000; ///< size of each buffer - double* buffer = nullptr; ///< buffer for all arrays below - - double* f = nullptr; ///< input array - double* g = nullptr; ///< output array - double* g_ref = nullptr; ///< reference array - double* grid_in = nullptr; ///< input grid - double* grid_out = nullptr; ///< output grid - - const double tol = 1e-9; ///< tolerance for element-wise numerical error -}; - -void SphericalBesselTransformTest::SetUp() -{ - buffer = new double[sz_max * 5]; - - f = buffer; - g = f + sz_max; - g_ref = g + sz_max; - grid_in = g_ref + sz_max; - grid_out = grid_in + sz_max; -} - -void SphericalBesselTransformTest::TearDown() -{ - delete[] buffer; -} - -double SphericalBesselTransformTest::max_diff(int sz, const double* arr1, const double* arr2) -{ - double diff = 0.0; - double tmp = 0.0; - for (int i = 0; i < sz; ++i) - { - tmp = std::abs(arr1[i] - arr2[i]); - if (tmp > diff) - { - diff = tmp; - } - } - return diff; -} - -TEST_F(SphericalBesselTransformTest, RadrfftBasic) -{ - /* - * Computes the zeroth, first and second order spherical Bessel - * transforms of r*exp(-r) and compares the results with analytic - * expressions: - * - * zeroth: 2*sqrt(2/pi) * (3-k^2) / (k^2+1)^3. - * first : 2*sqrt(2/pi) * 4k / (k^2+1)^3. - * second: 2*sqrt(2/pi) * 4k^2 / (k^2+1)^3. - * */ - const int sz = 10000; - assert(sz <= sz_max); - - const double dr = 0.01; - const double rcut = dr * (sz - 1); - const double dk = PI / rcut; - const double pref = std::sqrt(2. / PI) * 2.; - - SphericalBesselTransformer sbt; - - for (int i = 0; i != sz; ++i) - { - double r = i * dr; - f[i] = r * std::exp(-r); - } - - // zeroth-order transform - for (int i = 0; i != sz; ++i) - { - double k = dk * i; - g_ref[i] = pref * (3.0 - k * k) / std::pow(k * k + 1, 3); - } - sbt.radrfft(0, sz, rcut, f, g, 0); - EXPECT_LT(max_diff(sz, g_ref, g), tol); - - // first-order transform - for (int i = 0; i != sz; ++i) - { - double k = dk * i; - g_ref[i] = pref * 4.0 * k / std::pow(k * k + 1, 3); - } - sbt.radrfft(1, sz, rcut, f, g, 0); - EXPECT_LT(max_diff(sz, g_ref, g), tol); - - // second-order transform - for (int i = 0; i != sz; ++i) - { - double k = dk * i; - g_ref[i] = pref * 4.0 * k * k / std::pow(k * k + 1, 3); - } - sbt.radrfft(2, sz, rcut, f, g, 0); - EXPECT_LT(max_diff(sz, g_ref, g), tol); -} - -TEST_F(SphericalBesselTransformTest, RadrfftImplicitExponent) -{ - /* - * Computes the second order spherical Bessel transform of - * r^2*exp(-r) with input given as r^(p+2)*exp(-r) instead of - * bare r^2*exp(-r). Compares the results with the analytic - * expression: - * - * 48*sqrt(2/pi) * k^2 / (k^2+1)^4. - * */ - const int sz = 5000; - assert(sz <= sz_max); - - const double dr = 0.02; - const double rcut = dr * (sz - 1); - const double dk = PI / rcut; - const double pref = std::sqrt(2. / PI) * 48.; - - SphericalBesselTransformer sbt(true); - - for (int i = 0; i != sz; ++i) - { - double k = dk * i; - g_ref[i] = pref * k * k / std::pow(k * k + 1, 4); - } - - for (int p = -2; p <= 2; ++p) - { - for (int i = 0; i != sz; ++i) - { - double r = i * dr; - f[i] = std::pow(r, 2 + p) * std::exp(-r); - } - sbt.radrfft(2, sz, rcut, f, g, p); - EXPECT_LT(max_diff(sz, g_ref, g), tol); - } -} - -TEST_F(SphericalBesselTransformTest, RadrfftVariableSize) -{ - /* - * Computes the second order spherical Bessel transform of - * r^2*exp(-r) with various input sizes. Compares the results - * with the analytic expression: - * - * 48*sqrt(2/pi) * k^2 / (k^2+1)^4. - * */ - const double dr = 0.02; - const double pref = std::sqrt(2. / PI) * 48.; - - SphericalBesselTransformer sbt; - - for (int sz = 5000; sz <= sz_max; sz += 1000) - { - - for (int i = 0; i != sz; ++i) - { - double r = i * dr; - f[i] = r * r * std::exp(-r); - } - - const double rcut = dr * (sz - 1); - const double dk = PI / rcut; - for (int i = 0; i != sz; ++i) - { - double k = dk * i; - g_ref[i] = pref * k * k / std::pow(k * k + 1, 4); - } - sbt.radrfft(2, sz, rcut, f, g, 0); - EXPECT_LT(max_diff(sz, g_ref, g), tol); - } -} - -TEST_F(SphericalBesselTransformTest, RadrfftInPlace) -{ - /* - * Performs an in-place second order spherical Bessel transform - * on r^2*exp(-r^2). Compares the results with the analytic - * expression: - * - * sqrt(2)/16 * k^2 * exp(-k^2/4) - * */ - const double dr = 0.02; - const double pref = std::sqrt(2.) / 16.; - - SphericalBesselTransformer sbt; - - const double sz = 10000; - const double rcut = dr * (sz - 1); - for (int i = 0; i != sz; ++i) - { - double r = i * dr; - f[i] = r * r * std::exp(-r * r); - } - - double dk = PI / rcut; - for (int i = 0; i != sz; ++i) - { - double k = dk * i; - g_ref[i] = pref * k * k * std::exp(-k * k / 4); - } - sbt.radrfft(2, sz, rcut, f, f, 0); - EXPECT_LT(max_diff(sz, g_ref, f), tol); -} - -TEST_F(SphericalBesselTransformTest, DirectBasic) -{ - /* - * Computes the zeroth, first and second order spherical Bessel - * transforms of r*exp(-r) and compares the results with analytic - * expressions: - * - * zeroth: 2*sqrt(2/pi) * (3-k^2) / (k^2+1)^3. - * first : 2*sqrt(2/pi) * 4k / (k^2+1)^3. - * second: 2*sqrt(2/pi) * 4k^2 / (k^2+1)^3. - * */ - const int sz_in = 7000; - const int sz_out = 5000; - assert(sz_in <= sz_max && sz_out <= sz_max); - - const double dr = 0.007; - const double dk = 0.013; - std::for_each(grid_in, grid_in + sz_in, [&](double& x) { x = (&x - grid_in) * dr; }); - std::for_each(grid_out, grid_out + sz_out, [&](double& x) { x = (&x - grid_out) * dk; }); - - const double pref = std::sqrt(2. / PI) * 2.; - - std::for_each(f, f + sz_in, [&](double& x) { - double r = (&x - f) * dr; - x = r * std::exp(-r); - }); - - // zeroth-order transform - std::for_each(g_ref, g_ref + sz_out, [&](double& y) { - double k = (&y - g_ref) * dk; - y = pref * (3.0 - k * k) / std::pow(k * k + 1, 3); - }); - - SphericalBesselTransformer sbt; - - sbt.direct(0, sz_in, grid_in, f, sz_out, grid_out, g); - EXPECT_LT(max_diff(sz_out, g_ref, g), tol); - - // first-order transform - std::for_each(g_ref, g_ref + sz_out, [&](double& y) { - double k = (&y - g_ref) * dk; - y = pref * 4.0 * k / std::pow(k * k + 1, 3); - }); - - sbt.direct(1, sz_in, grid_in, f, sz_out, grid_out, g); - EXPECT_LT(max_diff(sz_out, g_ref, g), tol); - - // second-order transform - std::for_each(g_ref, g_ref + sz_out, [&](double& y) { - double k = (&y - g_ref) * dk; - y = pref * 4.0 * k * k / std::pow(k * k + 1, 3); - }); - - sbt.direct(2, sz_in, grid_in, f, sz_out, grid_out, g); - EXPECT_LT(max_diff(sz_out, g_ref, g), tol); -} - -TEST_F(SphericalBesselTransformTest, DirectImplicitExponent) -{ - /* - * Computes the second order spherical Bessel transform of - * r^2*exp(-r) with input given as r^(p+2)*exp(-r) instead of - * bare r^2*exp(-r). Compares the results with the analytic - * expression: - * - * 48*sqrt(2/pi) * k^2 / (k^2+1)^4. - * */ - const int sz_in = 7000; - const int sz_out = 6000; - assert(sz_in <= sz_max && sz_out <= sz_max); - - const double dr = 0.007; - const double dk = 0.011; - std::for_each(grid_in, grid_in + sz_in, [&](double& x) { x = (&x - grid_in) * dr; }); - std::for_each(grid_out, grid_out + sz_out, [&](double& x) { x = (&x - grid_out) * dk; }); - - const double pref = std::sqrt(2. / PI) * 48.; - std::for_each(g_ref, g_ref + sz_out, [&](double& y) { - double k = (&y - g_ref) * dk; - y = pref * k * k / std::pow(k * k + 1, 4); - }); - - SphericalBesselTransformer sbt(true); - - for (int p = -2; p <= 2; ++p) - { - std::for_each(f, f + sz_in, [&](double& x) { - double r = (&x - f) * dr; - x = std::pow(r, 2 + p) * std::exp(-r); - }); - - sbt.direct(2, sz_in, grid_in, f, sz_out, grid_out, g, p); - EXPECT_LT(max_diff(sz_out, g_ref, g), tol); - } -} - -TEST_F(SphericalBesselTransformTest, DirectInPlace) -{ - /* - * Performs an in-place second order spherical Bessel transform - * on r^2*exp(-r^2). Compares the results with the analytic - * expression: - * - * sqrt(2)/16 * k^2 * exp(-k^2/4) - * */ - const int sz_in = 7000; - const int sz_out = 7000; - assert(sz_in <= sz_max && sz_out == sz_in); - - const double dr = 0.011; - const double dk = 0.007; - std::for_each(grid_in, grid_in + sz_in, [&](double& x) { x = (&x - grid_in) * dr; }); - std::for_each(grid_out, grid_out + sz_out, [&](double& x) { x = (&x - grid_out) * dk; }); - - std::for_each(f, f + sz_in, [&](double& x) { - double r = (&x - f) * dr; - x = r * r * std::exp(-r * r); - }); - - const double pref = std::sqrt(2.) / 16.; - std::for_each(g_ref, g_ref + sz_out, [&](double& y) { - double k = (&y - g_ref) * dk; - y = pref * k * k * std::exp(-k * k / 4); - }); - - SphericalBesselTransformer sbt; - - sbt.direct(2, sz_in, grid_in, f, sz_out, grid_out, f); - EXPECT_LT(max_diff(sz_out, g_ref, f), tol); -} - -TEST_F(SphericalBesselTransformTest, HighOrder) -{ - /* - * Computes the l-order spherical Bessel transforms of - * r^l*exp(-r^2) using radrfft and direct with some high l, - * and check the consistency between their results. - * */ - const int l = 6; - const int sz = 5000; - assert(sz <= sz_max); - - const double dr = 0.01; - const double rcut = dr * (sz - 1); - const double dk = PI / rcut; - - std::for_each(grid_in, grid_in + sz, [&](double& x) { x = (&x - grid_in) * dr; }); - std::for_each(grid_out, grid_out + sz, [&](double& x) { x = (&x - grid_out) * dk; }); - - for (int i = 0; i != sz; ++i) - { - double r = i * dr; - f[i] = std::pow(r, l) * std::exp(-r * r); - } - - SphericalBesselTransformer sbt; - sbt.radrfft(l, sz, rcut, f, g); - - sbt.direct(l, sz, grid_in, f, sz, grid_out, g_ref); - - // NOTE: Simpson's integration gets increasingly inaccurate as k gets large - // since the factor of (k*dr)^4 in its error becomes significant when k*dr - // is of order 1. So we only compare the results for relatively small k. - EXPECT_LT(max_diff(sz / 2, g_ref, g), tol); -} - -TEST_F(SphericalBesselTransformTest, HeapUsage) -{ - /* - * Tests the setter and getter of the planner flag for FFTW plan - * creation. - * */ - const int sz = 2000; - assert(sz <= sz_max); - - const double dr = 0.01; - const double rcut = dr * (sz - 1); - - SphericalBesselTransformer sbt_no_cache(false); - SphericalBesselTransformer sbt_cached(true); - - EXPECT_EQ(sbt_no_cache.heap_usage(), 0); - EXPECT_EQ(sbt_cached.heap_usage(), 0); - - for (int i = 0; i != sz; ++i) - { - f[i] = std::exp(-i * dr); - } - - sbt_no_cache.radrfft(0, sz, rcut, f, g, 0); - sbt_cached.radrfft(0, sz, rcut, f, g, 0); - - // zeroth-order transform does not involve tabulating jl - // but FFT needs to allocate memory - EXPECT_EQ(sbt_no_cache.heap_usage(), 0); - EXPECT_EQ(sbt_cached.heap_usage(), 2*(sz-1)*sizeof(double)); - - // higher-order transforms involve tabulating jl - sbt_no_cache.radrfft(5, sz, rcut, f, g, 0); - sbt_cached.radrfft(5, sz, rcut, f, g, 0); - - EXPECT_EQ(sbt_no_cache.heap_usage(), 0); - EXPECT_GT(sbt_cached.heap_usage(), 2*(sz-1)*sizeof(double)); - - sbt_no_cache.clear(); - sbt_cached.clear(); - - EXPECT_EQ(sbt_no_cache.heap_usage(), 0); - EXPECT_EQ(sbt_cached.heap_usage(), 0); -} - - -int main(int argc, char** argv) -{ - -#ifdef __MPI - int nprocs, id; - MPI_Init(&argc, &argv); - MPI_Comm_size(MPI_COMM_WORLD, &nprocs); - MPI_Comm_rank(MPI_COMM_WORLD, &id); -#endif - - testing::InitGoogleTest(&argc, argv); - int result = RUN_ALL_TESTS(); - -#ifdef __MPI - MPI_Finalize(); -#endif - - fftw_cleanup(); - - return result; -} diff --git a/source/module_base/test/test_lebedev_laikov.cpp b/source/module_base/test/test_lebedev_laikov.cpp deleted file mode 100644 index f0758c6ae4..0000000000 --- a/source/module_base/test/test_lebedev_laikov.cpp +++ /dev/null @@ -1,152 +0,0 @@ -#include "module_base/math_lebedev_laikov.h" -#include "module_base/ylm.h" - -#include "gtest/gtest.h" -#include -#ifdef __MPI -#include -#endif - -using ModuleBase::Lebedev_laikov_grid; - -// mock the function to prevent unnecessary dependency -namespace ModuleBase { -void WARNING_QUIT(const std::string&, const std::string&) {} -} - -class LebedevLaikovTest: public ::testing::Test { -protected: - void randgen(int lmax, std::vector& coef); - const double tol = 1e-12; -}; - - -void LebedevLaikovTest::randgen(int lmax, std::vector& coef) { - coef.resize((lmax + 1) * (lmax + 1)); - - // fill coef with uniformly distributed random numbers - std::random_device rd; - std::mt19937 gen(rd()); - std::uniform_real_distribution dis(0.0, 1.0); - for (size_t i = 0; i < coef.size(); ++i) { - coef[i] = dis(gen); - } - - // normalize the coefficients - double fac = 0.0; - for (size_t i = 0; i < coef.size(); ++i) { - fac += coef[i] * coef[i]; - } - - fac = 1.0 / std::sqrt(fac); - for (size_t i = 0; i < coef.size(); ++i) { - coef[i] *= fac; - } -} - - -TEST_F(LebedevLaikovTest, Accuracy) { - /* - * Given - * - * f = c[0]*Y00 + c[1]*Y10 + c[2]*Y11 + ..., - * - * where c[0], c[1], c[2], ... are some random numbers, the integration - * of |f|^2 on the unit sphere - * - * \int |f|^2 d\Omega = c[0]^2 + c[1]^2 + c[2]^2 + ... . - * - * This test verifies with the above integral that quadrature with - * Lebedev grid is exact up to floating point errors. - * - */ - - // (ngrid, lmax) - std::set> supported = { - {6, 3}, - {14, 5}, - {26, 7}, - {38, 9}, - {50, 11}, - {74, 13}, - {86, 15}, - {110, 17}, - {146, 19}, - {170, 21}, - {194, 23}, - {230, 25}, - {266, 27}, - {302, 29}, - {350, 31}, - {434, 35}, - {590, 41}, - {770, 47}, - {974, 53}, - {1202, 59}, - {1454, 65}, - {1730, 71}, - {2030, 77}, - {2354, 83}, - {2702, 89}, - {3074, 95}, - {3470, 101}, - {3890, 107}, - {4334, 113}, - {4802, 119}, - {5294, 125}, - {5810, 131}, - }; - - std::vector coef; - - for (auto& grid_info: supported) { - int ngrid = grid_info.first; - int grid_lmax = grid_info.second; - - Lebedev_laikov_grid lebgrid(ngrid); - lebgrid.generate_grid_points(); - - const double* weight = lebgrid.get_weight(); - const ModuleBase::Vector3* grid = lebgrid.get_grid_coor(); - - int func_lmax = grid_lmax / 2; - randgen(func_lmax, coef); - - double val = 0.0; - std::vector ylm_real; - for (int i = 0; i < ngrid; i++) { - ModuleBase::Ylm::sph_harm(func_lmax, - grid[i].x, grid[i].y, grid[i].z, ylm_real); - double tmp = 0.0; - for (size_t j = 0; j < coef.size(); ++j) { - tmp += coef[j] * ylm_real[j]; - } - val += weight[i] * tmp * tmp; - } - - double val_ref = 0.0; - for (size_t i = 0; i < coef.size(); ++i) { - val_ref += coef[i] * coef[i]; - } - - double abs_diff = std::abs(val - val_ref); - EXPECT_LT(abs_diff, tol); - } -} - - -int main(int argc, char** argv) -{ -#ifdef __MPI - MPI_Init(&argc, &argv); -#endif - - testing::InitGoogleTest(&argc, argv); - int result = RUN_ALL_TESTS(); - -#ifdef __MPI - MPI_Finalize(); -#endif - - return result; -} diff --git a/source/module_base/test/timer_test.cpp b/source/module_base/test/timer_test.cpp deleted file mode 100644 index d7f678348c..0000000000 --- a/source/module_base/test/timer_test.cpp +++ /dev/null @@ -1,208 +0,0 @@ -#include "../timer.h" -#include "gtest/gtest.h" -#include "gmock/gmock.h" -#include -#include -#include -#include -#ifdef __MPI -#include "mpi.h" -#endif - -/************************************************ - * unit test of class timer - ***********************************************/ - -/** - * - Tested Functions: - * - Tick - * - tick 1st time, set start_flag to false - * - tick 2nd time, calculate time duration - * - Start - * - start total time calculation - * - PrintAll - * - print computational processes with time > 0.1 s - * - Finish - * - finish total time calculation - * - print computational processes with time > 0.1 s - * - PrintUntilNow - * - stop total time calculation - * - print total time until now - * - then start total time calculation again - */ - -class TimerTest : public testing::Test -{ -protected: - // - // for capturing stdout - std::string output; - // for output in file - std::ofstream ofs; - std::ifstream ifs; - int T_Elapse = 100; // microseconds = 0.1 milliseconds - void TearDown() - { - remove("tmp"); - } -}; - - -TEST_F(TimerTest, Tick) -{ - ModuleBase::timer::tick("wavefunc","evc"); - // after 1st call of tick, start_flag becomes false - EXPECT_FALSE(ModuleBase::timer::timer_pool["wavefunc"]["evc"].start_flag); - std::this_thread::sleep_for(std::chrono::microseconds(T_Elapse)); // 0.1 ms - // then we can have time elapsed in cpu_second - ModuleBase::timer::tick("wavefunc","evc"); - EXPECT_GT(ModuleBase::timer::timer_pool["wavefunc"]["evc"].cpu_second,0.0001); -} - - -TEST_F(TimerTest, Start) -{ - ModuleBase::timer::start(); - // start() called tick() once - EXPECT_FALSE(ModuleBase::timer::timer_pool[""]["total"].start_flag); -} - - -TEST_F(TimerTest, write_to_json) -{ - ModuleBase::timer::tick("wavefunc","evc"); - std::this_thread::sleep_for(std::chrono::microseconds(T_Elapse)); // 0.1 ms - ModuleBase::timer::tick("wavefunc","evc"); - ModuleBase::timer::write_to_json("tmp.json"); - - // check if tmp.json exists - ifs.open("tmp.json"); - EXPECT_TRUE(ifs.good()); - - // read all lines and remove all spaces and tabs and newlines - std::string line; - std::string tmp; - std::string content; - while(getline(ifs,line)) - { - tmp = line; - tmp.erase(std::remove(tmp.begin(),tmp.end(),' '),tmp.end()); - tmp.erase(std::remove(tmp.begin(),tmp.end(),'\t'),tmp.end()); - tmp.erase(std::remove(tmp.begin(),tmp.end(),'\n'),tmp.end()); - content += tmp; - } - - EXPECT_THAT(content,testing::HasSubstr("\"total\":")); - EXPECT_THAT(content,testing::HasSubstr("\"sub\":[{\"class_name\":\"wavefunc\",\"sub\":[{\"name\":\"evc\",\"cpu_second\":")); - EXPECT_THAT(content,testing::HasSubstr("\"calls\":2,\"cpu_second_per_call\":")); - EXPECT_THAT(content,testing::HasSubstr("\"cpu_second_per_total\":")); - EXPECT_THAT(content,testing::HasSubstr("}]}]}")); - ifs.close(); - remove("tmp.json"); -} - -TEST_F(TimerTest, PrintAll) -{ - ModuleBase::timer::tick("wavefunc","evc"); - std::this_thread::sleep_for(std::chrono::microseconds(T_Elapse)); // 0.1 ms - ModuleBase::timer::tick("wavefunc","evc"); - - // call print_all - ofs.open("tmp"); - testing::internal::CaptureStdout(); - ModuleBase::timer::print_all(ofs); - output = testing::internal::GetCapturedStdout(); - ofs.close(); - - // checout output on screen - // std::cout << "Get captured stdout: \n" << std::endl; - // std::cout << output << std::endl; - EXPECT_THAT(output,testing::HasSubstr("TIME STATISTICS")); - EXPECT_THAT(output,testing::HasSubstr("CLASS_NAME")); - EXPECT_THAT(output,testing::HasSubstr("NAME")); - EXPECT_THAT(output,testing::HasSubstr("TIME/s")); - EXPECT_THAT(output,testing::HasSubstr("CALLS")); - EXPECT_THAT(output,testing::HasSubstr("AVG/s")); - EXPECT_THAT(output,testing::HasSubstr("PER/%")); - - // check output in file - ifs.open("tmp"); - // std::cout << "Capture contents line by line from output file: \n" << std::endl; - getline(ifs,output); - getline(ifs,output); - EXPECT_THAT(output,testing::HasSubstr("TIME STATISTICS")); - getline(ifs,output); - getline(ifs,output); - EXPECT_THAT(output,testing::HasSubstr("CLASS_NAME")); - EXPECT_THAT(output,testing::HasSubstr("NAME")); - EXPECT_THAT(output,testing::HasSubstr("TIME/s")); - EXPECT_THAT(output,testing::HasSubstr("CALLS")); - EXPECT_THAT(output,testing::HasSubstr("AVG/s")); - EXPECT_THAT(output,testing::HasSubstr("PER/%")); - ifs.close(); - remove("time.json"); -} - - -TEST_F(TimerTest, PrintUntilNow) -{ - long double time = ModuleBase::timer::print_until_now(); - EXPECT_TRUE(time>0.0); -} - - -TEST_F(TimerTest, Finish) -{ - ModuleBase::timer::tick("wavefunc","evc"); - std::this_thread::sleep_for(std::chrono::microseconds(T_Elapse)); // 0.1 ms - ModuleBase::timer::tick("wavefunc","evc"); - - // call print_all - ofs.open("tmp"); - testing::internal::CaptureStdout(); - ModuleBase::timer::finish(ofs); - output = testing::internal::GetCapturedStdout(); - ofs.close(); - // checout output on screen - //std::cout << "Get captured stdout: \n" << std::endl; - //std::cout << output << std::endl; - EXPECT_THAT(output,testing::HasSubstr("TIME STATISTICS")); - EXPECT_THAT(output,testing::HasSubstr("CLASS_NAME")); - EXPECT_THAT(output,testing::HasSubstr("NAME")); - EXPECT_THAT(output,testing::HasSubstr("TIME/s")); - EXPECT_THAT(output,testing::HasSubstr("CALLS")); - EXPECT_THAT(output,testing::HasSubstr("AVG/s")); - EXPECT_THAT(output,testing::HasSubstr("PER/%")); - - // check output in file - ifs.open("tmp"); - //std::cout << "Capture contents line by line from output file: \n" << std::endl; - getline(ifs,output); - getline(ifs,output); - EXPECT_THAT(output,testing::HasSubstr("TIME STATISTICS")); - getline(ifs,output); - getline(ifs,output); - EXPECT_THAT(output,testing::HasSubstr("CLASS_NAME")); - EXPECT_THAT(output,testing::HasSubstr("NAME")); - EXPECT_THAT(output,testing::HasSubstr("TIME/s")); - EXPECT_THAT(output,testing::HasSubstr("CALLS")); - EXPECT_THAT(output,testing::HasSubstr("AVG/s")); - EXPECT_THAT(output,testing::HasSubstr("PER/%")); - ifs.close(); -} - -#ifdef __MPI -int main(int argc, char **argv) -{ - - MPI_Init(&argc,&argv); - - testing::InitGoogleTest(&argc,argv); - int result = RUN_ALL_TESTS(); - - MPI_Finalize(); - - return result; -} -#endif - diff --git a/source/module_base/test/tool_check_test.cpp b/source/module_base/test/tool_check_test.cpp deleted file mode 100644 index 47b20e3a91..0000000000 --- a/source/module_base/test/tool_check_test.cpp +++ /dev/null @@ -1,129 +0,0 @@ -#include "../tool_check.h" -#include "gtest/gtest.h" -#include "gmock/gmock.h" -#include -#include - -/************************************************ - * unit test of functions in tool_check.h - ***********************************************/ - -/** - * - Tested Function - * - ModuleBase::CHECK_NAME - * - check the next input from ifs is std::string - * - * - ModuleBase::CHECK_INT - * - check the next input from ifs is int - * - * - ModuleBase::CHECK_DOUBLE - * - check the next input from ifs is double - * - * - ModuleBase::CHECK_STRING - * - check the next input from ifs is string - */ - -class ToolCheckTest : public testing::Test -{ - protected: - std::ofstream ofs; - std::ifstream ifs; - // define std::string, int, double variables - std::string name = "abaqus"; - int ecut = 100; - double occupation = 0.23; - std::string caltype = "nscf"; - // quit is the swith to control performance of function - bool quit = false; - // for capturing stdout - std::string output = ""; - void TearDown() - { - remove("tmp"); - } - -}; - -TEST_F(ToolCheckTest, Name) -{ - ofs.open("tmp"); - // double input to check continus check function - ofs << name << std::endl; - ofs << name << std::endl; - ofs.close(); - ifs.open("tmp"); - // non-quit check - testing::internal::CaptureStdout(); - ModuleBase::CHECK_NAME(ifs, "abacus", quit); - output = testing::internal::GetCapturedStdout(); - EXPECT_THAT(output,testing::HasSubstr("not match")); - // quit check: quit = false - testing::internal::CaptureStdout(); - EXPECT_EXIT(ModuleBase::CHECK_NAME(ifs, "abacus"), ::testing::ExitedWithCode(1), ""); - output = testing::internal::GetCapturedStdout(); - EXPECT_THAT(output,testing::HasSubstr("NOTICE")); - ifs.close(); -} - -TEST_F(ToolCheckTest, Int) -{ - ofs.open("tmp"); - // double input to check continus check function - ofs << ecut << std::endl; - ofs << ecut << std::endl; - ofs.close(); - ifs.open("tmp"); - // non-quit check - testing::internal::CaptureStdout(); - ModuleBase::CHECK_INT(ifs, 80, quit); - output = testing::internal::GetCapturedStdout(); - EXPECT_THAT(output,testing::HasSubstr("not match")); - // quit check: quit = false - testing::internal::CaptureStdout(); - EXPECT_EXIT(ModuleBase::CHECK_INT(ifs, 80), ::testing::ExitedWithCode(1), ""); - output = testing::internal::GetCapturedStdout(); - EXPECT_THAT(output,testing::HasSubstr("NOTICE")); - ifs.close(); -} - -TEST_F(ToolCheckTest, Double) -{ - ofs.open("tmp"); - // double input to check continus check function - ofs << occupation << std::endl; - ofs << occupation << std::endl; - ofs.close(); - ifs.open("tmp"); - // non-quit check: quit = false - testing::internal::CaptureStdout(); - ModuleBase::CHECK_DOUBLE(ifs, 0.23002, quit); - output = testing::internal::GetCapturedStdout(); - EXPECT_THAT(output,testing::HasSubstr("not match")); - // quit check - testing::internal::CaptureStdout(); - EXPECT_EXIT(ModuleBase::CHECK_DOUBLE(ifs, 0.22998), ::testing::ExitedWithCode(1), ""); - output = testing::internal::GetCapturedStdout(); - EXPECT_THAT(output,testing::HasSubstr("NOTICE")); - ifs.close(); -} - -TEST_F(ToolCheckTest, String) -{ - ofs.open("tmp"); - // double input to check continus check function - ofs << caltype << std::endl; - ofs << caltype << std::endl; - ofs.close(); - ifs.open("tmp"); - // non-quit check: quit=false - testing::internal::CaptureStdout(); - ModuleBase::CHECK_STRING(ifs, "scf", quit); - output = testing::internal::GetCapturedStdout(); - EXPECT_THAT(output,testing::HasSubstr("not match")); - // quit check - testing::internal::CaptureStdout(); - EXPECT_EXIT(ModuleBase::CHECK_STRING(ifs, "scf"), ::testing::ExitedWithCode(1), ""); - output = testing::internal::GetCapturedStdout(); - EXPECT_THAT(output,testing::HasSubstr("NOTICE")); - ifs.close(); -} diff --git a/source/module_base/test/tool_quit_no_exit.cpp b/source/module_base/test/tool_quit_no_exit.cpp deleted file mode 100644 index 4c9bca7be0..0000000000 --- a/source/module_base/test/tool_quit_no_exit.cpp +++ /dev/null @@ -1,42 +0,0 @@ -#include -#include -#include - -// mock for UT only -namespace ModuleBase -{ -void WARNING(const std::string &file,const std::string &description) -{ - return; -} - -void WARNING_QUIT(const std::string &file,const std::string &description, int ret) -{ -#ifdef __NORMAL - - std::cout << " !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << std::endl; - std::cout << " NOTICE " << std::endl; - std::cout << " !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << std::endl; - -#else - std::cout << " " << std::endl; - std::cout << " !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << std::endl; - std::cout << " NOTICE " << std::endl; - std::cout << " !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << std::endl; - std::cout << " " << std::endl; - std::cout << " " << description << std::endl; - std::cout << " " << std::endl; - std::cout << " !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << std::endl; - std::cout << " NOTICE " << std::endl; - std::cout << " !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << std::endl; -#endif - - throw std::runtime_error("WARNING_QUIT"); -} - -void WARNING_QUIT(const std::string &file,const std::string &description) -{ - WARNING_QUIT(file, description, 0); -} - -} diff --git a/source/module_base/test/tool_quit_test.cpp b/source/module_base/test/tool_quit_test.cpp deleted file mode 100644 index 1119fc4064..0000000000 --- a/source/module_base/test/tool_quit_test.cpp +++ /dev/null @@ -1,137 +0,0 @@ -#include "../tool_quit.h" -#include "../global_variable.h" -#define private public -#include "module_parameter/parameter.h" -#undef private -#include "gtest/gtest.h" -#include "gmock/gmock.h" -#ifdef __MPI -#include "mpi.h" -#endif - -/************************************************ - * unit test of functions in tool_quit.h - ***********************************************/ - -/** - * - Tested Function - * - ModuleBase::WARNING - * - print out warning info. in warning.log - * - * - ModuleBase::QUIT - * - close log files and exit - * - * - ModuleBase::WARNING_QUIT - * - combine the above 2 functions - */ - -class ToolQuitTest : public testing::Test -{ - protected: - std::ifstream ifs; - // for capturing output on screen - std::string output; - void SetUp() - { - GlobalV::ofs_warning.open("warning.log"); - GlobalV::ofs_running.open("running.log"); - PARAM.sys.global_out_dir = "OUT/"; - } - void TearDown() - { - remove("warning.log"); - remove("running.log"); - } -}; - - -TEST_F(ToolQuitTest,warning) -{ - ModuleBase::WARNING("INPUT","bad input parameter"); - GlobalV::ofs_warning.close(); - ifs.open("warning.log"); - getline(ifs,output); - // test output in warning.log file - EXPECT_THAT(output,testing::HasSubstr("warning")); - ifs.close(); -} - -TEST_F(ToolQuitTest,quit) -{ - testing::internal::CaptureStdout(); - EXPECT_EXIT(ModuleBase::QUIT(), ::testing::ExitedWithCode(0), ""); - output = testing::internal::GetCapturedStdout(); - // test output on screen - EXPECT_THAT(output,testing::HasSubstr("TIME STATISTICS")); -} - -TEST_F(ToolQuitTest,quit_with_ret) -{ - testing::internal::CaptureStdout(); - EXPECT_EXIT(ModuleBase::QUIT(1), ::testing::ExitedWithCode(1), ""); - output = testing::internal::GetCapturedStdout(); - // test output on screen - EXPECT_THAT(output,testing::HasSubstr("TIME STATISTICS")); -} - -// use EXPECT_EXIT to test exit codes -TEST_F(ToolQuitTest,warningquit) -{ - testing::internal::CaptureStdout(); - EXPECT_EXIT(ModuleBase::WARNING_QUIT("INPUT","bad input parameter"), - ::testing::ExitedWithCode(1), ""); - output = testing::internal::GetCapturedStdout(); - // test output on screening - EXPECT_THAT(output,testing::HasSubstr("TIME STATISTICS")); - GlobalV::ofs_warning.close(); - GlobalV::ofs_running.close(); - ifs.open("warning.log"); - getline(ifs,output); - // test output in warning.log file - EXPECT_THAT(output,testing::HasSubstr("warning")); - ifs.close(); - ifs.open("running.log"); - getline(ifs,output); - // test output in running.log file - EXPECT_THAT(output,testing::HasSubstr("-------")); - ifs.close(); -} - -// use EXPECT_EXIT to test exit codes -TEST_F(ToolQuitTest,warningquit_with_ret) -{ - testing::internal::CaptureStdout(); - EXPECT_EXIT(ModuleBase::WARNING_QUIT("INPUT","bad input parameter",1), - ::testing::ExitedWithCode(1), ""); - output = testing::internal::GetCapturedStdout(); - // test output on screening - EXPECT_THAT(output,testing::HasSubstr("TIME STATISTICS")); - GlobalV::ofs_warning.close(); - GlobalV::ofs_running.close(); - ifs.open("warning.log"); - getline(ifs,output); - // test output in warning.log file - EXPECT_THAT(output,testing::HasSubstr("warning")); - ifs.close(); - ifs.open("running.log"); - getline(ifs,output); - // test output in running.log file - EXPECT_THAT(output,testing::HasSubstr("-------")); - ifs.close(); -} -// use __MPI to activate parallel environment -#ifdef __MPI -int main(int argc, char **argv) -{ - - MPI_Init(&argc,&argv); - - testing::InitGoogleTest(&argc,argv); - int result = RUN_ALL_TESTS(); - - MPI_Finalize(); - - return result; -} -#endif - diff --git a/source/module_base/test/tool_threading_test.cpp b/source/module_base/test/tool_threading_test.cpp deleted file mode 100644 index d816aacded..0000000000 --- a/source/module_base/test/tool_threading_test.cpp +++ /dev/null @@ -1,162 +0,0 @@ -#include "../tool_threading.h" -#include "gtest/gtest.h" -#include "gmock/gmock.h" -#include -/************************************************ -* unit test of threading tool -***********************************************/ - -/** -* - Tested functions of class threading tool: -* - TASK_DIST_1D: -* - (template)Distributing 1d tasks by worker id (int and long long) -* - BLOCK_TASK_DIST_1D: -* - (template)Distributing 1d tasks by block_size and worker id (int and long long) -* - OMP_PARALLE: -* - Run functions in parallel mode -* - TRY_OMP_PARALLEL: -* - Run functions in parallel mode(Add the judgment statement to determine whether program is in parallel) -**/ - -// The meaning of the parameters used in the following tests -// nw: nworker -// iw: iworker -// nt: ntask -// st: start -// le: len -// bs: block_size - -//Test function used in the following tests -void test_fun(int a,int b) - { - std::cout< ComplexMatrix::scaled_sum()")); - ifs.close(); -} - -TEST_F(ToolTitleTest, TITLE3) -{ - std::ofstream oofs; - std::string output3a; - std::string output3b; - oofs.open("TITLEtest3.log"); - ModuleBase::TITLE(oofs,claname,funname,false); - oofs.close(); - ifs.open("TITLEtest3.log"); - getline(ifs,output3a); - EXPECT_THAT(output3a,testing::HasSubstr(" ==> ComplexMatrix::scaled_sum()")); - ifs.close(); -} diff --git a/source/module_base/test/vector3_test.cpp b/source/module_base/test/vector3_test.cpp deleted file mode 100644 index 9a1cf49254..0000000000 --- a/source/module_base/test/vector3_test.cpp +++ /dev/null @@ -1,768 +0,0 @@ -#include "../vector3.h" -#include "gtest/gtest.h" -#include "gmock/gmock.h" - -/************************************************ - * unit test of class Vector3 - ***********************************************/ - -/** - * - Tested Functions: - * - Construct - * - two ways of constructing a 3d vector - * - Set - * - set a 3d vector - * - Equal - * - overload operator "=" for 3d vector - * - equal - * - overload operator "=" for scalar - * - PlusEqual - * - overload operator "+=" for 3d vector - * - MinusEqual - * - overload operator "-=" for 3d vector - * - MultiplyEqual - * - overload operator "*=" for (3d vector) * scalar - * - OverEqual - * - overload operator "/=" for (3d vector) / scalar - * - Negative - * - overload operator "-" to get - Vector3 - * - Reverse - * - same as negative - * - Access - * - access elements by using "[]" - * - ConstAccess - * - access elements by using "[]" through pinters - * - withough chaning element values - * - VectorPlus - * - overload operator "+" for two 3d vectors - * - VectorMinus - * - overload operator "-" for two 3d vectors - * - Norm2 - * - get the square of norm of a 3d vector - * - Norm - * - get the norm of a 3d vector - * - Normalize - * - normalize a 3d vector - * - VmultiplyV - * - overload operator "*" to calculate - * - the dot product of two 3d vectors - * - VdotV - * - dot product of two 3d vectors - * - VmultiplyNum - * - overload operator "*" to calculate - * - the product of a 3d vector with a scalar - * - of the product of a scalar with a 3d vector - * - VoverNum - * - overload operator "/" to calculate - * - a 3d vector over a scalar - * - OperatorCaret - * - overload operator "^" to calculate - * - the cross product of two 3d vectors - * - VeqV - * - overload operator "==" to assert - * - the equality between two 3d vectors - * - VneV - * - overload operator "!=" to assert - * - the inequality between two 3d vectors - * - VltV - * - overload operator "<" to sort - * - the "less than" relationship between two 3d vectors - * - StdOutV - * - overload operator "<<" to print out - * - a 3d vectors on standard output - * - PrintV - * - print a 3d vectors on standard output - * - with formats - */ - -class Vector3Test : public testing::Test -{ -protected: - double da = 3.0; - double db = 4.0; - double dc = 5.0; - int ia = 3; - int ib = 4; - int ic = 5; - float fa = 3.0; - float fb = 4.0; - float fc = 5.0; - // for capturing stdout - std::string output; -}; - -TEST_F(Vector3Test,Construct) -{ - // double Vector3 - ModuleBase::Vector3 u (da,db,dc); - ModuleBase::Vector3 up (u); - EXPECT_EQ(u.x,3.0); - EXPECT_EQ(u.y,4.0); - EXPECT_EQ(u.z,5.0); - EXPECT_EQ(up.x,3.0); - EXPECT_EQ(up.y,4.0); - EXPECT_EQ(up.z,5.0); - // float Vector3 - ModuleBase::Vector3 v (fa,fb,fc); - ModuleBase::Vector3 vp (v); - EXPECT_EQ(v.x,3.0); - EXPECT_EQ(v.y,4.0); - EXPECT_EQ(v.z,5.0); - EXPECT_EQ(vp.x,3.0); - EXPECT_EQ(vp.y,4.0); - EXPECT_EQ(vp.z,5.0); - // int Vector3 - ModuleBase::Vector3 w (ia,ib,ic); - ModuleBase::Vector3 wp (w); - EXPECT_EQ(w.x,3); - EXPECT_EQ(w.y,4); - EXPECT_EQ(w.z,5); - EXPECT_EQ(wp.x,3); - EXPECT_EQ(wp.y,4); - EXPECT_EQ(wp.z,5); -} - -TEST_F(Vector3Test,Set) -{ - // double Vector3 - ModuleBase::Vector3 u; - u.set(da,db,dc); - EXPECT_EQ(u.x,3.0); - EXPECT_EQ(u.y,4.0); - EXPECT_EQ(u.z,5.0); - // float Vector3 - ModuleBase::Vector3 v; - v.set(fa,fb,fc); - EXPECT_EQ(v.x,3.0); - EXPECT_EQ(v.y,4.0); - EXPECT_EQ(v.z,5.0); - // int Vector3 - ModuleBase::Vector3 w; - w.set(ia,ib,ic); - EXPECT_EQ(w.x,3); - EXPECT_EQ(w.y,4); - EXPECT_EQ(w.z,5); -} - -TEST_F(Vector3Test,Equal) -{ - // double Vector3 - ModuleBase::Vector3 u, up; - u.set(da,db,dc); - up = u; - EXPECT_EQ(up.x,3.0); - EXPECT_EQ(up.y,4.0); - EXPECT_EQ(up.z,5.0); - // float Vector3 - ModuleBase::Vector3 v, vp; - v.set(fa,fb,fc); - vp = v; - EXPECT_EQ(vp.x,3.0); - EXPECT_EQ(vp.y,4.0); - EXPECT_EQ(vp.z,5.0); - // int Vector3 - ModuleBase::Vector3 w, wp; - w.set(ia,ib,ic); - wp = w; - EXPECT_EQ(wp.x,3); - EXPECT_EQ(wp.y,4); - EXPECT_EQ(wp.z,5); -} - -TEST_F(Vector3Test,equal) -{ - // double Vector3 - ModuleBase::Vector3 u; - u.set(da,db,dc); - u = 2; - EXPECT_EQ(u.x,2.0); - EXPECT_EQ(u.y,2.0); - EXPECT_EQ(u.z,2.0); - // float Vector3 - ModuleBase::Vector3 v; - v.set(fa,fb,fc); - v = 2; - EXPECT_EQ(v.x,2.0); - EXPECT_EQ(v.y,2.0); - EXPECT_EQ(v.z,2.0); - // int Vector3 - ModuleBase::Vector3 w; - w.set(ia,ib,ic); - w = 2; - EXPECT_EQ(w.x,2); - EXPECT_EQ(w.y,2); - EXPECT_EQ(w.z,2); -} - -TEST_F(Vector3Test,PlusEqual) -{ - // double Vector3 - ModuleBase::Vector3 u, up; - u.set(da,db,dc); - up.set(da,db,dc); - up += u; - EXPECT_EQ(up.x,6.0); - EXPECT_EQ(up.y,8.0); - EXPECT_EQ(up.z,10.0); - // float Vector3 - ModuleBase::Vector3 v, vp; - v.set(fa,fb,fc); - vp.set(fa,fb,fc); - vp += v; - EXPECT_EQ(vp.x,6.0); - EXPECT_EQ(vp.y,8.0); - EXPECT_EQ(vp.z,10.0); - // int Vector3 - ModuleBase::Vector3 w, wp; - w.set(ia,ib,ic); - wp.set(ia,ib,ic); - wp += w; - EXPECT_EQ(wp.x,6); - EXPECT_EQ(wp.y,8); - EXPECT_EQ(wp.z,10); -} - -TEST_F(Vector3Test,MinusEqual) -{ - // double Vector3 - ModuleBase::Vector3 u, up; - u.set(da,db,dc); - up.set(3*da,3*db,3*dc); - up -= u; - EXPECT_EQ(up.x,6.0); - EXPECT_EQ(up.y,8.0); - EXPECT_EQ(up.z,10.0); - // float Vector3 - ModuleBase::Vector3 v, vp; - v.set(fa,fb,fc); - vp.set(3*fa,3*fb,3*fc); - vp -= v; - EXPECT_EQ(vp.x,6.0); - EXPECT_EQ(vp.y,8.0); - EXPECT_EQ(vp.z,10.0); - // int Vector3 - ModuleBase::Vector3 w, wp; - w.set(ia,ib,ic); - wp.set(3*ia,3*ib,3*ic); - wp -= w; - EXPECT_EQ(wp.x,6); - EXPECT_EQ(wp.y,8); - EXPECT_EQ(wp.z,10); -} - -TEST_F(Vector3Test,MultiplyEqual) -{ - // double Vector3 - ModuleBase::Vector3 u; - u.set(da,db,dc); - u *= 2; - EXPECT_EQ(u.x,6.0); - EXPECT_EQ(u.y,8.0); - EXPECT_EQ(u.z,10.0); - // float Vector3 - ModuleBase::Vector3 v; - v.set(fa,fb,fc); - v *= 2; - EXPECT_EQ(v.x,6.0); - EXPECT_EQ(v.y,8.0); - EXPECT_EQ(v.z,10.0); - // int Vector3 - ModuleBase::Vector3 w; - w.set(ia,ib,ic); - w *= 2; - EXPECT_EQ(w.x,6); - EXPECT_EQ(w.y,8); - EXPECT_EQ(w.z,10); -} - -TEST_F(Vector3Test,OverEqual) -{ - // double Vector3 - ModuleBase::Vector3 u; - u.set(4*da,4*db,4*dc); - u /= 2; - EXPECT_EQ(u.x,6.0); - EXPECT_EQ(u.y,8.0); - EXPECT_EQ(u.z,10.0); - // float Vector3 - ModuleBase::Vector3 v; - v.set(4*fa,4*fb,4*fc); - v /= 2; - EXPECT_EQ(v.x,6.0); - EXPECT_EQ(v.y,8.0); - EXPECT_EQ(v.z,10.0); - // int Vector3 - ModuleBase::Vector3 w; - w.set(4*ia,4*ib,4*ic); - w /= 2; - EXPECT_EQ(w.x,6); - EXPECT_EQ(w.y,8); - EXPECT_EQ(w.z,10); -} - -TEST_F(Vector3Test,Negative) -{ - // double Vector3 - ModuleBase::Vector3 u, up; - u.set(da,db,dc); - up = -u; - EXPECT_EQ(up.x,-3.0); - EXPECT_EQ(up.y,-4.0); - EXPECT_EQ(up.z,-5.0); - // float Vector3 - ModuleBase::Vector3 v, vp; - v.set(fa,fb,fc); - vp = -v; - EXPECT_EQ(vp.x,-3.0); - EXPECT_EQ(vp.y,-4.0); - EXPECT_EQ(vp.z,-5.0); - // int Vector3 - ModuleBase::Vector3 w, wp; - w.set(ia,ib,ic); - wp = -w; - EXPECT_EQ(wp.x,-3); - EXPECT_EQ(wp.y,-4); - EXPECT_EQ(wp.z,-5); -} - -TEST_F(Vector3Test,Access) -{ - // double Vector3 - ModuleBase::Vector3 u; - u.set(da,db,dc); - EXPECT_EQ(u[0],3.0); - EXPECT_EQ(u[1],4.0); - EXPECT_EQ(u[2],5.0); - // float Vector3 - ModuleBase::Vector3 v; - v.set(fa,fb,fc); - EXPECT_EQ(v.x,3.0); - EXPECT_EQ(v.y,4.0); - EXPECT_EQ(v.z,5.0); - // int Vector3 - ModuleBase::Vector3 w; - w.set(ia,ib,ic); - EXPECT_EQ(w.x,3); - EXPECT_EQ(w.y,4); - EXPECT_EQ(w.z,5); -} - - -TEST_F(Vector3Test,ConstAccess) -{ - // double Vector3 - ModuleBase::Vector3 u; - u.set(da,db,dc); - const ModuleBase::Vector3 *up(&u); - EXPECT_EQ((*up)[0],3.0); - EXPECT_EQ((*up)[1],4.0); - EXPECT_EQ((*up)[2],5.0); - // float Vector3 - ModuleBase::Vector3 v; - const ModuleBase::Vector3 *vp(&v); - v.set(fa,fb,fc); - EXPECT_EQ((*vp).x,3.0); - EXPECT_EQ((*vp).y,4.0); - EXPECT_EQ((*vp).z,5.0); - // int Vector3 - //ModuleBase::Vector3 w; - //w.set(ia,ib,ic); - //EXPECT_EQ(w.x,3); - //EXPECT_EQ(w.y,4); - //EXPECT_EQ(w.z,5); -} - - -TEST_F(Vector3Test,Reverse) -{ - // double Vector3 - ModuleBase::Vector3 u; - u.set(da,db,dc); - u.reverse(); - EXPECT_EQ(u.x,-3.0); - EXPECT_EQ(u.y,-4.0); - EXPECT_EQ(u.z,-5.0); - // float Vector3 - ModuleBase::Vector3 v; - v.set(fa,fb,fc); - v.reverse(); - EXPECT_EQ(v.x,-3.0); - EXPECT_EQ(v.y,-4.0); - EXPECT_EQ(v.z,-5.0); - // int Vector3 - ModuleBase::Vector3 w; - w.set(ia,ib,ic); - w.reverse(); - EXPECT_EQ(w.x,-3); - EXPECT_EQ(w.y,-4); - EXPECT_EQ(w.z,-5); -} - -TEST_F(Vector3Test,VectorPlus) -{ - // double Vector3 - ModuleBase::Vector3 u,up,upp; - u.set(da,db,dc); - up.set(da,db,dc); - upp = u + up; - EXPECT_EQ(upp[0],6.0); - EXPECT_EQ(upp[1],8.0); - EXPECT_EQ(upp[2],10.0); - // float Vector3 - ModuleBase::Vector3 v,vp,vpp; - v.set(fa,fb,fc); - vp.set(fa,fb,fc); - vpp = v + vp; - EXPECT_EQ(vpp.x,6.0); - EXPECT_EQ(vpp.y,8.0); - EXPECT_EQ(vpp.z,10.0); - // int Vector3 - ModuleBase::Vector3 w,wp,wpp; - w.set(ia,ib,ic); - wp.set(ia,ib,ic); - wpp = w + wp; - EXPECT_EQ(wpp.x,6); - EXPECT_EQ(wpp.y,8); - EXPECT_EQ(wpp.z,10); -} - -TEST_F(Vector3Test,VectorMinus) -{ - // double Vector3 - ModuleBase::Vector3 u,up,upp; - u.set(da,db,dc); - up.set(2*da,2*db,2*dc); - upp = u - up; - EXPECT_EQ(upp[0],-3.0); - EXPECT_EQ(upp[1],-4.0); - EXPECT_EQ(upp[2],-5.0); - // float Vector3 - ModuleBase::Vector3 v,vp,vpp; - v.set(fa,fb,fc); - vp.set(3*fa,3*fb,3*fc); - vpp = v - vp; - EXPECT_EQ(vpp.x,-6.0); - EXPECT_EQ(vpp.y,-8.0); - EXPECT_EQ(vpp.z,-10.0); - // int Vector3 - ModuleBase::Vector3 w,wp,wpp; - w.set(3*ia,3*ib,3*ic); - wp.set(ia,ib,ic); - wpp = w - wp; - EXPECT_EQ(wpp.x,6); - EXPECT_EQ(wpp.y,8); - EXPECT_EQ(wpp.z,10); -} - -TEST_F(Vector3Test,Norm2) -{ - // double Vector3 - ModuleBase::Vector3 u; - u.set(da,db,dc); - EXPECT_EQ(u.norm2(),50.0); - // float Vector3 - ModuleBase::Vector3 v; - v.set(fa,fb,fc); - EXPECT_EQ(v.norm2(),50.0); - // int Vector3 - ModuleBase::Vector3 w; - w.set(ia,ib,ic); - EXPECT_EQ(w.norm2(),50); -} - - -TEST_F(Vector3Test,Norm) -{ - // double Vector3 - ModuleBase::Vector3 u; - u.set(da,db,dc); - double nm = u.norm(); - double nm2= sqrt(50.0); - EXPECT_DOUBLE_EQ(nm,nm2); - EXPECT_FLOAT_EQ(nm,sqrt(50.0)); - // float Vector3 - ModuleBase::Vector3 v; - v.set(fa,fb,fc); - float nmp = v.norm(); - float nmp2= sqrt(50.0); - EXPECT_FLOAT_EQ(nmp,sqrt(50.0)); -} - - -TEST_F(Vector3Test,Normalize) -{ - // double Vector3 - ModuleBase::Vector3 u; - u.set(da,db,dc); - u.normalize(); - EXPECT_DOUBLE_EQ(u.norm(),1.0); - // float Vector3 - ModuleBase::Vector3 v; - v.set(fa,fb,fc); - v.normalize(); - EXPECT_FLOAT_EQ(v.norm(),1.0); -} - -TEST_F(Vector3Test,VmultiplyV) -{ - // double Vector3 - ModuleBase::Vector3 u,up; - u.set(da,db,dc); - up.set(da,db,dc); - double mpd = u * up; - EXPECT_EQ(mpd,50.0); - // float Vector3 - ModuleBase::Vector3 v,vp; - v.set(fa,fb,fc); - vp.set(fa,fb,fc); - float mpf = v*vp; - EXPECT_EQ(mpf,50.0); - // int Vector3 - ModuleBase::Vector3 w,wp; - w.set(ia,ib,ic); - wp.set(ia,ib,ic); - int mpi = w*wp; - EXPECT_EQ(mpf,50); -} - -TEST_F(Vector3Test,VdotV) -{ - // double Vector3 - ModuleBase::Vector3 u,up; - u.set(da,db,dc); - up.set(da,db,dc); - double mpd = dot(u,up); - EXPECT_EQ(mpd,50.0); - // float Vector3 - ModuleBase::Vector3 v,vp; - v.set(fa,fb,fc); - vp.set(fa,fb,fc); - float mpf = dot(v,vp); - EXPECT_EQ(mpf,50.0); - // int Vector3 - ModuleBase::Vector3 w,wp; - w.set(ia,ib,ic); - wp.set(ia,ib,ic); - int mpi = dot(w,wp); - EXPECT_EQ(mpf,50); -} - -TEST_F(Vector3Test,VmultiplyNum) -{ - // double Vector3 - ModuleBase::Vector3 u,up,upp; - u.set(da,db,dc); - double s = 3.0; - up = s*u; upp = u*s; - EXPECT_EQ(upp[0],up[0]); - EXPECT_EQ(upp[1],up[1]); - EXPECT_EQ(upp[2],up[2]); - EXPECT_EQ(upp[0],9.0); - EXPECT_EQ(upp[1],12.0); - EXPECT_EQ(upp[2],15.0); - // float Vector3 - ModuleBase::Vector3 v,vp,vpp; - v.set(fa,fb,fc); - float t = 3.0; - vp = t*v; vpp = v*t; - EXPECT_EQ(vpp[0],vp[0]); - EXPECT_EQ(vpp[1],vp[1]); - EXPECT_EQ(vpp[2],vp[2]); - EXPECT_EQ(vpp[0],9.0); - EXPECT_EQ(vpp[1],12.0); - EXPECT_EQ(vpp[2],15.0); - // int Vector3 - ModuleBase::Vector3 w,wp,wpp; - w.set(ia,ib,ic); - int q = 3; - wp = q*w; wpp = w*q; - EXPECT_EQ(wpp[0],wp[0]); - EXPECT_EQ(wpp[1],wp[1]); - EXPECT_EQ(wpp[2],wp[2]); - EXPECT_EQ(wpp[0],9.0); - EXPECT_EQ(wpp[1],12.0); - EXPECT_EQ(wpp[2],15.0); -} - -TEST_F(Vector3Test,VoverNum) -{ - // double Vector3 - ModuleBase::Vector3 u,up; - u.set(2*da,2*db,2*dc); - double s = 2.0; - up = u/s; - EXPECT_EQ(up.x,3.0); - EXPECT_EQ(up.y,4.0); - EXPECT_EQ(up.z,5.0); - // float Vector3 - ModuleBase::Vector3 v,vp; - v.set(2*fa,2*fb,2*fc); - float t = 2.0; - vp = v/t; - EXPECT_EQ(vp.x,3.0); - EXPECT_EQ(vp.y,4.0); - EXPECT_EQ(vp.z,5.0); - // int Vector3 - ModuleBase::Vector3 w,wp; - w.set(2*ia,2*ib,2*ic); - int q = 2; - wp = w/q; - EXPECT_EQ(wp.x,3); - EXPECT_EQ(wp.y,4); - EXPECT_EQ(wp.z,5); -} - -TEST_F(Vector3Test,OperatorCaret) -{ - // double Vector3 - ModuleBase::Vector3 u,up,upp; - u.set(da,db,dc); - up.set(da,db,dc); - upp = u^up; - EXPECT_EQ(upp.x,u.y*up.z - u.z*up.y); - EXPECT_EQ(upp.y,u.z*up.x - u.x*up.z); - EXPECT_EQ(upp.z,u.x*up.y - u.y*up.x); - // float Vector3 - ModuleBase::Vector3 v,vp,vpp; - v.set(2*fa,2*fb,2*fc); - vp.set(fa,fb,fc); - vpp = v^vp; - EXPECT_EQ(vpp.x,v.y*vp.z - v.z*vp.y); - EXPECT_EQ(vpp.y,v.z*vp.x - v.x*vp.z); - EXPECT_EQ(vpp.z,v.x*vp.y - v.y*vp.x); - // int Vector3 - ModuleBase::Vector3 w,wp,wpp; - w.set(2*ia,2*ib,2*ic); - wp.set(ia,ib,ic); - wpp = w^wp; - EXPECT_EQ(wpp.x,w.y*wp.z - w.z*wp.y); - EXPECT_EQ(wpp.y,w.z*wp.x - w.x*wp.z); - EXPECT_EQ(wpp.z,w.x*wp.y - w.y*wp.x); -} - -TEST_F(Vector3Test,Cross) -{ - // double Vector3 - ModuleBase::Vector3 u,up,upp; - u.set(da,db,dc); - up.set(da,db,dc); - upp = cross(u,up); - EXPECT_EQ(upp.x,u.y*up.z - u.z*up.y); - EXPECT_EQ(upp.y,u.z*up.x - u.x*up.z); - EXPECT_EQ(upp.z,u.x*up.y - u.y*up.x); - // float Vector3 - ModuleBase::Vector3 v,vp,vpp; - v.set(2*fa,2*fb,2*fc); - vp.set(fa,fb,fc); - vpp = cross(v,vp); - EXPECT_EQ(vpp.x,v.y*vp.z - v.z*vp.y); - EXPECT_EQ(vpp.y,v.z*vp.x - v.x*vp.z); - EXPECT_EQ(vpp.z,v.x*vp.y - v.y*vp.x); - // int Vector3 - ModuleBase::Vector3 w,wp,wpp; - w.set(2*ia,2*ib,2*ic); - wp.set(ia,ib,ic); - wpp = cross(w,wp); - EXPECT_EQ(wpp.x,w.y*wp.z - w.z*wp.y); - EXPECT_EQ(wpp.y,w.z*wp.x - w.x*wp.z); - EXPECT_EQ(wpp.z,w.x*wp.y - w.y*wp.x); -} - -TEST_F(Vector3Test,VeqV) -{ - // double Vector3 - ModuleBase::Vector3 u,up; - u.set(da,db,dc); - up.set(da,db,dc); - EXPECT_TRUE(up == u); - // float Vector3 - ModuleBase::Vector3 v,vp; - v.set(fa,fb,fc); - vp.set(fa,fb,fc); - EXPECT_TRUE(vp == v); - // int Vector3 - ModuleBase::Vector3 w,wp; - w.set(ia,ib,ic); - wp.set(ia,ib,ic); - EXPECT_TRUE(wp == w); -} - -TEST_F(Vector3Test,VneV) -{ - // double Vector3 - ModuleBase::Vector3 u,up; - u.set(da,db,dc); - up.set(da,db,2*dc); - EXPECT_TRUE(up != u); - // float Vector3 - ModuleBase::Vector3 v,vp; - v.set(fa,fb,2*fc); - vp.set(fa,fb,fc); - EXPECT_TRUE(vp != v); - // int Vector3 - ModuleBase::Vector3 w,wp; - w.set(ia,ib,2*ic); - wp.set(ia,ib,ic); - EXPECT_TRUE(wp != w); -} - -TEST_F(Vector3Test, VltV) -{ - ModuleBase::Vector3 u, up; - u.set(da, db, dc); - up.set(dc, db, da); - EXPECT_TRUE(u < up); - ModuleBase::Vector3 v, vp; - v.set(fa, fb, fc); - vp.set(fa, fb, fc); - EXPECT_FALSE(v < vp); - ModuleBase::Vector3 w, wp; - w.set(ia, ib, ic); - wp.set(ib, ib, ic); - EXPECT_TRUE(w < wp); -} - -TEST_F(Vector3Test,StdOutV) -{ - // double Vector3 - ModuleBase::Vector3 u(da,db,dc); - testing::internal::CaptureStdout(); - std::cout << u << std::endl; - output = testing::internal::GetCapturedStdout(); - EXPECT_THAT(output,testing::HasSubstr("(")); - // float Vector3 - ModuleBase::Vector3 v(fa,fb,fc); - testing::internal::CaptureStdout(); - std::cout << v << std::endl; - output = testing::internal::GetCapturedStdout(); - EXPECT_THAT(output,testing::HasSubstr(",")); - // int Vector3 - ModuleBase::Vector3 w(ia,ib,ic); - testing::internal::CaptureStdout(); - std::cout << w << std::endl; - output = testing::internal::GetCapturedStdout(); - EXPECT_THAT(output,testing::HasSubstr(")")); -} - -TEST_F(Vector3Test,PrintV) -{ - // double Vector3 - ModuleBase::Vector3 u(3.1415926,db,dc); - testing::internal::CaptureStdout(); - u.print(); - output = testing::internal::GetCapturedStdout(); - EXPECT_THAT(output,testing::HasSubstr("3.1416")); - // float Vector3 - ModuleBase::Vector3 v(fa,fb,3.14); - testing::internal::CaptureStdout(); - v.print(); - output = testing::internal::GetCapturedStdout(); - EXPECT_THAT(output,testing::HasSubstr("3.14")); - // int Vector3 - ModuleBase::Vector3 w(ia,101,ic); - testing::internal::CaptureStdout(); - w.print(); - output = testing::internal::GetCapturedStdout(); - EXPECT_THAT(output,testing::HasSubstr("101")); -} - diff --git a/source/module_base/test/ylm_test.cpp b/source/module_base/test/ylm_test.cpp deleted file mode 100644 index ee85ac80ec..0000000000 --- a/source/module_base/test/ylm_test.cpp +++ /dev/null @@ -1,25 +0,0 @@ -#include "../ylm.h" -#include "gtest/gtest.h" -/************************************************ - * unit test of class ylm - ***********************************************/ - -/** - * - Tested Functions: - * - ZEROS - * - set all elements of a double float array to zero - * */ - -class ylmTest : public testing::Test -{ -}; - -TEST_F(ylmTest,Zeros) -{ - double aaaa[100]; - ModuleBase::Ylm::ZEROS(aaaa,100); - for(int i = 0; i < 100; i++) - { - EXPECT_EQ(aaaa[i],0.0); - } -} diff --git a/source/module_base/test_parallel/CMakeLists.txt b/source/module_base/test_parallel/CMakeLists.txt deleted file mode 100644 index bf4ed79bbc..0000000000 --- a/source/module_base/test_parallel/CMakeLists.txt +++ /dev/null @@ -1,85 +0,0 @@ -AddTest( - TARGET MODULE_BASE_ParaCommon - LIBS parameter MPI::MPI_CXX - SOURCES parallel_common_test.cpp ../global_variable.cpp ../parallel_common.cpp -) - -AddTest( - TARGET MODULE_BASE_ParaGlobal - LIBS parameter MPI::MPI_CXX - SOURCES parallel_global_test.cpp ../global_variable.cpp ../parallel_global.cpp ../parallel_comm.cpp -) - -AddTest( - TARGET MODULE_BASE_ParaReduce - LIBS parameter MPI::MPI_CXX - SOURCES parallel_reduce_test.cpp ../global_variable.cpp ../parallel_global.cpp ../parallel_comm.cpp ../parallel_common.cpp ../parallel_reduce.cpp -) - -install(FILES parallel_common_test.sh DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) -install(FILES parallel_global_test.sh DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) -install(FILES parallel_reduce_test.sh DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) - -find_program(BASH bash) -add_test(NAME MODULE_BASE_parallel_common_test - COMMAND ${BASH} parallel_common_test.sh - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} -) -add_test(NAME MODULE_BASE_parallel_global_test - COMMAND ${BASH} parallel_global_test.sh - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} -) -add_test(NAME MODULE_BASE_parallel_reduce_test - COMMAND ${BASH} parallel_reduce_test.sh - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} -) - -AddTest( - TARGET MODULE_BASE_para_gemm - LIBS MPI::MPI_CXX ${math_libs} base device parameter - SOURCES test_para_gemm.cpp -) - -AddTest( - TARGET MODULE_BASE_math_chebyshev_mpi - LIBS MPI::MPI_CXX parameter ${math_libs} base device container - SOURCES math_chebyshev_mpi_test.cpp -) - -add_test(NAME MODULE_BASE_para_gemm_parallel - COMMAND mpirun -np 4 ./MODULE_BASE_para_gemm - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} -) - -AddTest( - TARGET MODULE_BASE_parallel_2d_test - SOURCES parallel_2d_test.cpp ../parallel_2d.cpp - LIBS parameter ${math_libs} -) - -install(FILES parallel_2d_test.sh DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) -find_program(BASH bash) -add_test(NAME MODULE_BASE_parallel_2d_test_para - COMMAND ${BASH} parallel_2d_test.sh - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} -) - - - # figure out the lib that provides BLACS - if(MKLROOT) - list(APPEND BLACS_LIB MKL::MKL MKL::MKL_SCALAPACK) - else() - set(BLACS_LIB ScaLAPACK::ScaLAPACK) - endif() - - AddTest( - TARGET MODULE_BASE_blacs_connector - LIBS parameter MPI::MPI_CXX ${BLACS_LIB} - SOURCES blacs_connector_test.cpp - ) - install(FILES blacs_connector_test.sh DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) - add_test(NAME MODULE_BASE_blacs_connector_test - COMMAND ${BASH} blacs_connector_test.sh - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - ) - diff --git a/source/module_base/test_parallel/blacs_connector_test.cpp b/source/module_base/test_parallel/blacs_connector_test.cpp deleted file mode 100644 index 59fd348fc9..0000000000 --- a/source/module_base/test_parallel/blacs_connector_test.cpp +++ /dev/null @@ -1,109 +0,0 @@ -#ifdef __MPI - -#include "../blacs_connector.h" -#include -#include "gtest/gtest.h" - -/************************************************ - * unit test of functions in blacs_connector.h - ***********************************************/ - -/** - * - Tested Function - * - Cblacs_gridinit - * - Initializes a grid of processors with a given number of rows and columns. - * The function creates a cartesian topology of all the processors initialized - * by the BLS library. In this topology, each processor is identified by its - * coordinates (row, col) in the grid. - */ - -class BLACSTest: public testing::Test -{ -protected: - void SetUp(); - - int rank = 0; - int nprocs = 0; - char layout = 'R'; - - // number of rows and columns in the process grid - int nprow = 0; - int npcol = 0; - - // process coordinate - int iprow = -1; - int ipcol = -1; -}; - -void BLACSTest::SetUp() -{ - Cblacs_pinfo(&rank, &nprocs); -} - - -TEST_F(BLACSTest, WorldGrid) -{ - // generate a grid of size 1 x nproc - nprow = 1; - npcol = nprocs; - - int ictxt_row = Csys2blacs_handle(MPI_COMM_WORLD); - Cblacs_gridinit(&ictxt_row, &layout, nprow, npcol); - Cblacs_gridinfo(ictxt_row, &nprow, &npcol, &iprow, &ipcol); - - EXPECT_EQ(iprow, 0); - EXPECT_EQ(ipcol, rank); - - // generate a grid of size nproc x 1 - nprow = nprocs; - npcol = 1; - - int ictxt_col = Csys2blacs_handle(MPI_COMM_WORLD); - Cblacs_gridinit(&ictxt_col, &layout, nprow, npcol); - Cblacs_gridinfo(ictxt_col, &nprow, &npcol, &iprow, &ipcol); - - EXPECT_EQ(iprow, rank); - EXPECT_EQ(ipcol, 0); - - - // two BLACS grids should have difference context index - EXPECT_NE(ictxt_row, ictxt_col); -} - -TEST_F(BLACSTest, SplitGrid) -{ - // this test create BLACS grids based on a disjoint communicator - - const int n_blacs = 2; - int rank_sub = -1; - int nprocs_sub = 0; - - // sub communicators are divided based on odd / even ranks - MPI_Comm comm_sub; - MPI_Comm_split(MPI_COMM_WORLD, rank % n_blacs, rank, &comm_sub); - MPI_Comm_rank(comm_sub, &rank_sub); - MPI_Comm_size(comm_sub, &nprocs_sub); - - int ctxt_sub = Csys2blacs_handle(comm_sub); - - nprow = 1, npcol = nprocs_sub; // row-like grids - Cblacs_gridinit(&ctxt_sub, &layout, nprow, npcol); - Cblacs_gridinfo(ctxt_sub, &nprow, &npcol, &iprow, &ipcol); - - // verifies that the BLACS grid is created based on comm_sub instead of MPI_COMM_WORLD - EXPECT_EQ(iprow, 0); - EXPECT_EQ(ipcol, rank_sub); -} - -int main(int argc, char** argv) -{ - MPI_Init(&argc, &argv); - testing::InitGoogleTest(&argc, argv); - - int result = RUN_ALL_TESTS(); - - MPI_Finalize(); - - return result; -} -#endif diff --git a/source/module_base/test_parallel/blacs_connector_test.sh b/source/module_base/test_parallel/blacs_connector_test.sh deleted file mode 100644 index cbf6e13ca0..0000000000 --- a/source/module_base/test_parallel/blacs_connector_test.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash -e - -np=`cat /proc/cpuinfo | grep "cpu cores" | uniq| awk '{print $NF}'` -echo "nprocs in this machine is $np" - -for i in {8..2}; -do - if [[ $i -gt $np ]];then - continue - fi - echo "TEST in parallel, nprocs=$i" - mpirun -np $i ./MODULE_BASE_blacs_connector - if [[ $? -ne 0 ]]; then - echo -e "\e[1;33m [ FAILED ] \e[0m"\ - "execute UT with $i cores error." - exit 1 - fi - break -done - diff --git a/source/module_base/test_parallel/math_chebyshev_mpi_test.cpp b/source/module_base/test_parallel/math_chebyshev_mpi_test.cpp deleted file mode 100644 index 5ca222bb3c..0000000000 --- a/source/module_base/test_parallel/math_chebyshev_mpi_test.cpp +++ /dev/null @@ -1,207 +0,0 @@ -#include "../math_chebyshev.h" -#include "mpi.h" -#include "module_base/parallel_comm.h" -#include "gmock/gmock.h" -#include "gtest/gtest.h" -/************************************************ - * unit test of class Chebyshev MPI part - ***********************************************/ - - /** - * - Tested Functions: - * - checkconverge - */ -class toolfunc -{ - public: - double x7(double x) - { - return pow(x, 7); - } - double x6(double x) - { - return pow(x, 6); - } - double expr(double x) - { - return exp(x); - } - std::complex expi(std::complex x) - { - const std::complex j(0.0, 1.0); - return exp(j * x); - } - std::complex expi2(std::complex x) - { - const std::complex j(0.0, 1.0); - const double PI = 3.14159265358979323846; - return exp(j * PI / 2.0 * x); - } - // Pauli matrix: [0,-i;i,0] - int LDA = 2; - double factor = 1; - void sigma_y(std::complex* spin_in, std::complex* spin_out, const int m = 1) - { - const std::complex j(0.0, 1.0); - if (this->LDA < 2) { - this->LDA = 2; -} - for (int i = 0; i < m; ++i) - { - spin_out[LDA * i] = -factor * j * spin_in[LDA * i + 1]; - spin_out[LDA * i + 1] = factor * j * spin_in[LDA * i]; - } - } -#ifdef __ENABLE_FLOAT_FFTW - float x7(float x) - { - return pow(x, 7); - } - float x6(float x) - { - return pow(x, 6); - } - float expr(float x) - { - return exp(x); - } - std::complex expi(std::complex x) - { - const std::complex j(0.0, 1.0); - return exp(j * x); - } - std::complex expi2(std::complex x) - { - const std::complex j(0.0, 1.0); - const float PI = 3.14159265358979323846; - return exp(j * PI / 2.0f * x); - } - // Pauli matrix: [0,-i;i,0] - void sigma_y(std::complex* spin_in, std::complex* spin_out, const int m = 1) - { - const std::complex j(0.0, 1.0); - if (this->LDA < 2) - this->LDA = 2; - for (int i = 0; i < m; ++i) - { - spin_out[LDA * i] = -j * spin_in[LDA * i + 1]; - spin_out[LDA * i + 1] = j * spin_in[LDA * i]; - } - } -#endif -}; -class MathChebyshevTest : public testing::Test -{ - protected: - ModuleBase::Chebyshev* p_chetest; - ModuleBase::Chebyshev* p_fchetest; - toolfunc fun; - int dsize = 0; - int my_rank = 0; - void SetUp() override - { - int world_rank; - MPI_Comm_rank(MPI_COMM_WORLD, &world_rank); - int world_size; - MPI_Comm_size(MPI_COMM_WORLD, &world_size); - - int color = (world_rank < world_size / 2) ? 0 : 1; - int key = world_rank; - - MPI_Comm_split(MPI_COMM_WORLD, color, key, &POOL_WORLD); - - int pool_rank, pool_size; - MPI_Comm_rank(POOL_WORLD, &pool_rank); - MPI_Comm_size(POOL_WORLD, &pool_size); - } - void TearDown() override - { - } -}; - -TEST_F(MathChebyshevTest, checkconverge) -{ - const int norder = 100; - p_chetest = new ModuleBase::Chebyshev(norder); - auto fun_sigma_y - = [&](std::complex* in, std::complex* out, const int m = 1) { fun.sigma_y(in, out, m); }; - - std::complex* v = new std::complex[4]; - v[0] = 1.0; - v[1] = 0.0; - v[2] = 0.0; - v[3] = 1.0; //[1 0; 0 1] - double tmin = -1.1; - double tmax = 1.1; - bool converge; - converge = p_chetest->checkconverge(fun_sigma_y, v, 2, 2, tmax, tmin, 0.2); - EXPECT_TRUE(converge); - converge = p_chetest->checkconverge(fun_sigma_y, v + 2, 2, 2, tmax, tmin, 0.2); - EXPECT_TRUE(converge); - EXPECT_NEAR(tmin, -1.1, 1e-8); - EXPECT_NEAR(tmax, 1.1, 1e-8); - - tmax = -1.1; - converge = p_chetest->checkconverge(fun_sigma_y, v, 2, 2, tmax, tmin, 2.2); - EXPECT_TRUE(converge); - EXPECT_NEAR(tmin, -1.1, 1e-8); - EXPECT_NEAR(tmax, 1.1, 1e-8); - - // not converge - v[0] = std::complex(0, 1), v[1] = 1; - fun.factor = 1.5; - tmin = -1.1, tmax = 1.1; - converge = p_chetest->checkconverge(fun_sigma_y, v, 2, 2, tmax, tmin, 0.2); - EXPECT_FALSE(converge); - - fun.factor = -1.5; - tmin = -1.1, tmax = 1.1; - converge = p_chetest->checkconverge(fun_sigma_y, v, 2, 2, tmax, tmin, 0.2); - EXPECT_FALSE(converge); - fun.factor = 1; - - delete[] v; - delete p_chetest; -} - -#ifdef __ENABLE_FLOAT_FFTW -TEST_F(MathChebyshevTest, checkconverge_float) -{ - const int norder = 100; - p_fchetest = new ModuleBase::Chebyshev(norder); - - std::complex* v = new std::complex[4]; - v[0] = 1.0; - v[1] = 0.0; - v[2] = 0.0; - v[3] = 1.0; //[1 0; 0 1] - float tmin = -1.1; - float tmax = 1.1; - bool converge; - - auto fun_sigma_yf - = [&](std::complex* in, std::complex* out, const int m = 1) { fun.sigma_y(in, out, m); }; - converge = p_fchetest->checkconverge(fun_sigma_yf, v, 2, 2, tmax, tmin, 0.2); - EXPECT_TRUE(converge); - converge = p_fchetest->checkconverge(fun_sigma_yf, v + 2, 2, 2, tmax, tmin, 0.2); - EXPECT_TRUE(converge); - EXPECT_NEAR(tmin, -1.1, 1e-6); - EXPECT_NEAR(tmax, 1.1, 1e-6); - - delete[] v; - delete p_fchetest; -} -#endif - -int main(int argc, char** argv) -{ -#ifdef __MPI - MPI_Init(&argc, &argv); -#endif - testing::InitGoogleTest(&argc, argv); - int result = RUN_ALL_TESTS(); -#ifdef __MPI - MPI_Finalize(); -#endif - return result; -} diff --git a/source/module_base/test_parallel/parallel_2d_test.cpp b/source/module_base/test_parallel/parallel_2d_test.cpp deleted file mode 100644 index 5073571bcc..0000000000 --- a/source/module_base/test_parallel/parallel_2d_test.cpp +++ /dev/null @@ -1,189 +0,0 @@ -#include "../parallel_2d.h" - -#include "gtest/gtest.h" -/*********************************************************** - * unit test of class "Parallel_2D" - ***********************************************************/ - -/* Tested functions (in order): - * - * - init - * initialize the MPI & BLACS 2d Cartesian grid and set up - * the info of block-cyclic distribution. - * - * - set_serial (serial) - * set the local(=global) sizes. - * - * - some getters: - * - get_row_size, get_col_size, get_local_size, get_block_size - * - in_this_processor - * - * Result check: - * - local sizes - * - index maps - * - desc[9] - ***********************************************************/ -class test_para2d : public testing::Test -{ - protected: - int dsize; - int my_rank = 0; - std::vector> sizes{{30, 35}, {49, 94}, {57, 57}}; - std::vector nbs{1, 2, 3}; -#ifdef __MPI - void SetUp() override - { - MPI_Comm_size(MPI_COMM_WORLD, &dsize); - MPI_Comm_rank(MPI_COMM_WORLD, &my_rank); - } - void TearDown() override - { - } -#endif -}; - -#ifdef __MPI -TEST_F(test_para2d, Divide2D) -{ - for (auto& size: sizes) - { - int gr = size.first; - int gc = size.second; - for (auto nb: nbs) - { - Parallel_2D p2d; - - for (auto mode: {0, 1}) - { - p2d.init(gr, gc, nb, MPI_COMM_WORLD, mode); - - EXPECT_EQ(p2d.get_block_size(), nb); - - // 1. dim0 and dim1 - EXPECT_EQ(p2d.dim0 * p2d.dim1, dsize); - if (mode) { - EXPECT_LE(p2d.dim1, p2d.dim0); - } else { - EXPECT_LE(p2d.dim0, p2d.dim1); -} - - // 2. MPI 2d communicator - //EXPECT_NE(p2d.comm_2D, MPI_COMM_NULL); - - // 3. local2global and local sizes - int lr = p2d.get_row_size(); - int lc = p2d.get_col_size(); - EXPECT_EQ(lr * lc, p2d.get_local_size()); - auto cal_lsize = [](const int& gsize, const int& nb, const int& np, const int& pcoord) -> int { - int nblock = gsize / nb; - return nblock / np * nb + static_cast(nblock % np > pcoord) * nb // full blocks' contribution - + static_cast(nblock % np == pcoord) * (gsize % nb); // the last block's contribution - }; - EXPECT_EQ(lr, cal_lsize(gr, nb, p2d.dim0, p2d.coord[0])); - EXPECT_EQ(lc, cal_lsize(gc, nb, p2d.dim1, p2d.coord[1])); - - // 4. ScaLAPACK descriptor - EXPECT_EQ(p2d.desc[0], 1); - EXPECT_EQ(p2d.desc[1], p2d.blacs_ctxt); - EXPECT_EQ(p2d.desc[2], gr); - EXPECT_EQ(p2d.desc[3], gc); - EXPECT_EQ(p2d.desc[4], p2d.get_block_size()); - EXPECT_EQ(p2d.desc[5], p2d.get_block_size()); - EXPECT_EQ(p2d.desc[6], 0); - EXPECT_EQ(p2d.desc[7], 0); - EXPECT_EQ(p2d.desc[8], lr); - - // 5. global2local - auto sum_array = [&p2d](const int& gr, const int& gc) -> std::pair { - int sum_row = 0; - int sum_col = 0; - for (int i = 0; i < gr; ++i) { - sum_row += p2d.global2local_row(i); -} - for (int i = 0; i < gc; ++i) { - sum_col += p2d.global2local_col(i); -} - return {sum_row, sum_col}; - }; - std::pair sumrc = sum_array(gr, gc); - EXPECT_EQ(std::get<0>(sumrc), lr * (lr - 1) / 2 - (gr - lr)); - EXPECT_EQ(std::get<1>(sumrc), lc * (lc - 1) / 2 - (gc - lc)); - for (int i = 0; i < lr; ++i) { - for (int j = 0; j < lc; ++j) { - EXPECT_TRUE(p2d.in_this_processor(p2d.local2global_row(i), p2d.local2global_col(j))); -} -} - - EXPECT_EQ(p2d.get_global_row_size(), gr); - EXPECT_EQ(p2d.get_global_col_size(), gc); - } - } - } -} - -TEST_F(test_para2d, DescReuseCtxt) -{ - for (auto nb: nbs) - { - Parallel_2D p1; - p1.init(sizes[0].first, sizes[0].second, nb, MPI_COMM_WORLD); - - Parallel_2D p2; // use 2 different sizes, but they can share the same ctxt - p2.set(sizes[1].first, sizes[1].second, nb, p1.blacs_ctxt); - - EXPECT_EQ(p1.desc[1], p2.desc[1]); - - Parallel_2D p3; - p3.init(sizes[2].first, sizes[2].second, nb, MPI_COMM_WORLD); - EXPECT_NE(p1.desc[1], p3.desc[1]); - } -} -#else -TEST_F(test_para2d, Serial) -{ - for (auto& size: sizes) - { - int gr = size.first; - int gc = size.second; - - Parallel_2D p2d; - - // set_serial - p2d.set_serial(gr, gc); - EXPECT_EQ(p2d.dim0 * p2d.dim1, 1); - EXPECT_EQ(p2d.dim0, 1); - EXPECT_EQ(p2d.dim1, 1); - - EXPECT_EQ(p2d.get_row_size(), gr); - EXPECT_EQ(p2d.get_col_size(), gc); - EXPECT_EQ(p2d.get_local_size(), gr * gc); - for (int i = 0; i < gr; ++i) - EXPECT_EQ(p2d.local2global_row(i), i); - for (int i = 0; i < gc; ++i) - EXPECT_EQ(p2d.local2global_col(i), i); - - // 3. global2local - for (int i = 0; i < gr; ++i) - EXPECT_EQ(p2d.global2local_row(i), i); - for (int i = 0; i < gc; ++i) - EXPECT_EQ(p2d.global2local_col(i), i); - - // 4. get_global_row_size, get_global_col_size - EXPECT_EQ(p2d.get_global_row_size(), gr); - EXPECT_EQ(p2d.get_global_col_size(), gc); - } -} -#endif - -int main(int argc, char** argv) -{ -#ifdef __MPI - MPI_Init(&argc, &argv); -#endif - testing::InitGoogleTest(&argc, argv); - int result = RUN_ALL_TESTS(); -#ifdef __MPI - MPI_Finalize(); -#endif - return result; -} diff --git a/source/module_base/test_parallel/parallel_2d_test.sh b/source/module_base/test_parallel/parallel_2d_test.sh deleted file mode 100755 index 47aadc867e..0000000000 --- a/source/module_base/test_parallel/parallel_2d_test.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash -e - -np=`cat /proc/cpuinfo | grep "cpu cores" | uniq| awk '{print $NF}'` -echo "nprocs in this machine is $np" - -for i in 2 3 4; do - if [[ $i -gt $np ]];then - continue - fi - echo "TEST in parallel, nprocs=$i" - mpirun -np $i ./MODULE_BASE_parallel_2d_test - if [[ $? -ne 0 ]]; then - echo -e "\e[1;33m [ FAILED ] \e[0m"\ - "execute UT with $i cores error." - exit 1 - fi -done diff --git a/source/module_base/test_parallel/parallel_common_test.cpp b/source/module_base/test_parallel/parallel_common_test.cpp deleted file mode 100644 index 111eef0884..0000000000 --- a/source/module_base/test_parallel/parallel_common_test.cpp +++ /dev/null @@ -1,128 +0,0 @@ -#ifdef __MPI -#include "module_base/parallel_common.h" - -#include "mpi.h" - -#include "gtest/gtest.h" -#include -#include -#include - -/************************************************ - * unit test of functions in parallel_common.cpp - ***********************************************/ - -/** - * The tested functions are wrappers of MPI_Bcast - * in ABACUS, as defined in module_base/parallel_common.h. - * The source is process 0 in all MPI_Bcast - * wrappers. - */ - -class MPIContext -{ - public: - MPIContext() - { - MPI_Comm_rank(MPI_COMM_WORLD, &_rank); - MPI_Comm_size(MPI_COMM_WORLD, &_size); - } - - int GetRank() const - { - return _rank; - } - int GetSize() const - { - return _size; - } - - private: - int _rank; - int _size; -}; - -class ParaCommon : public testing::Test -{ - protected: - bool boo = true; - int is = 0; - double fs = 0.0; - std::complex imgs{0.0, 0.0}; - std::string chs = "abacus"; - char cha[7] = "abacus"; - int iv[10] = {0}; - double fv[10] = {0}; - std::complex imgv[10] = {0.0, 0.0}; - std::string chv[10] = {""}; - MPIContext mpiContext; -}; - -TEST_F(ParaCommon, Bcast) -{ - // reset data in the first process - int MY_RANK = mpiContext.GetRank(); - if (MY_RANK == 0) - { - boo = false; - is = 1; - fs = 1.0; - imgs = std::complex(1.0, -1.0); - chs = "ABACUS"; - strcpy(cha, chs.c_str()); - for (int i = 0; i < 10; i++) - { - double ii = static_cast(i); - iv[i] = i; - fv[i] = ii; - imgv[i] = std::complex(ii, -ii); - std::stringstream ss; - ss << chs << i; - chv[i] = ss.str(); - } - } - // call bcast wrappers - Parallel_Common::bcast_bool(boo); - Parallel_Common::bcast_int(is); - Parallel_Common::bcast_double(fs); - Parallel_Common::bcast_complex_double(imgs); - Parallel_Common::bcast_string(chs); - Parallel_Common::bcast_char(cha, 7); - Parallel_Common::bcast_int(iv, 10); - Parallel_Common::bcast_double(fv, 10); - Parallel_Common::bcast_complex_double(imgv, 10); - Parallel_Common::bcast_string(chv, 10); - // make comparisons - EXPECT_FALSE(boo); - EXPECT_EQ(is, 1); - EXPECT_EQ(fs, 1.0); - EXPECT_NEAR(imgs.real(), 1.0, 1E-15); - EXPECT_NEAR(imgs.imag(), -1.0, 1E-15); - EXPECT_EQ(chs, "ABACUS"); - EXPECT_STREQ(cha, "ABACUS"); - for (int i = 0; i < 10; i++) - { - double ii = static_cast(i); - EXPECT_EQ(iv[i], i); - EXPECT_NEAR(fv[i], ii, 1E-15); - EXPECT_NEAR(imgv[i].real(), ii, 1E-15); - EXPECT_NEAR(imgv[i].imag(), -ii, 1E-15); - std::stringstream ss; - ss << chs << i; - EXPECT_EQ(chv[i], ss.str()); - } -} - -int main(int argc, char** argv) -{ - - MPI_Init(&argc, &argv); - testing::InitGoogleTest(&argc, argv); - - int result = RUN_ALL_TESTS(); - - MPI_Finalize(); - - return result; -} -#endif diff --git a/source/module_base/test_parallel/parallel_common_test.sh b/source/module_base/test_parallel/parallel_common_test.sh deleted file mode 100755 index 9adbcb1f95..0000000000 --- a/source/module_base/test_parallel/parallel_common_test.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash -e - -np=`cat /proc/cpuinfo | grep "cpu cores" | uniq| awk '{print $NF}'` -echo "nprocs in this machine is $np" - -for i in 3;do - if [[ $i -gt $np ]];then - continue - fi - echo "TEST in parallel, nprocs=$i" - mpirun -np $i ./MODULE_BASE_ParaCommon - if [[ $? -ne 0 ]]; then - echo -e "\e[1;33m [ FAILED ] \e[0m"\ - "execute UT with $i cores error." - exit 1 - fi - break -done diff --git a/source/module_base/test_parallel/parallel_global_test.cpp b/source/module_base/test_parallel/parallel_global_test.cpp deleted file mode 100644 index 8b9e5053a4..0000000000 --- a/source/module_base/test_parallel/parallel_global_test.cpp +++ /dev/null @@ -1,210 +0,0 @@ -#ifdef __MPI -#include "module_base/parallel_global.h" - -#include "mpi.h" - -#include "gtest/gtest.h" -#include "gmock/gmock.h" -#include -#include -#include - -/************************************************ - * unit test of functions in parallel_global.cpp - ***********************************************/ - -/** - * The tested functions are: - * i. Parallel_Global::split_diag_world(), which is - * used in David diagonalization in pw basis - * calculation. - * ii. Parallel_Global::split_grid_world() - * iii. Parallel_Global::MyProd(std::complex *in,std::complex *inout,int *len,MPI_Datatype *dptr); - * iv. Parallel_Global::init_pools(); - * v. Parallel_Global::divide_pools(void); - */ - -class MPIContext -{ - public: - MPIContext() - { - MPI_Comm_rank(MPI_COMM_WORLD, &_rank); - MPI_Comm_size(MPI_COMM_WORLD, &_size); - } - - int GetRank() const - { - return _rank; - } - int GetSize() const - { - return _size; - } - - int drank; - int dsize; - int dcolor; - - int grank; - int gsize; - - int kpar; - int nproc_in_pool; - int my_pool; - int rank_in_pool; - - int nstogroup; - int MY_BNDGROUP; - int rank_in_stogroup; - int nproc_in_stogroup; - - private: - int _rank; - int _size; -}; - -class ParaGlobal : public ::testing::Test -{ - protected: - MPIContext mpi; - int nproc; - int my_rank; - void SetUp() override - { - nproc = mpi.GetSize(); - my_rank = mpi.GetRank(); - } -}; - -TEST_F(ParaGlobal, SplitGrid) -{ - // NPROC is set to 4 in parallel_global_test.sh - if (nproc == 4) - { - Parallel_Global::split_grid_world(2, nproc, my_rank, mpi.grank, mpi.gsize); - EXPECT_EQ(mpi.gsize, 2); - if (my_rank == 0) - EXPECT_EQ(mpi.grank, 0); - if (my_rank == 1) - EXPECT_EQ(mpi.grank, 1); - if (my_rank == 2) - EXPECT_EQ(mpi.grank, 0); - if (my_rank == 3) - EXPECT_EQ(mpi.grank, 1); - Parallel_Global::split_grid_world(4, nproc, my_rank, mpi.grank, mpi.gsize); - EXPECT_EQ(mpi.gsize, 1); - if (my_rank == 0) - EXPECT_EQ(mpi.grank, 0); - if (my_rank == 1) - EXPECT_EQ(mpi.grank, 0); - if (my_rank == 2) - EXPECT_EQ(mpi.grank, 0); - if (my_rank == 3) - EXPECT_EQ(mpi.grank, 0); - } - else - { - Parallel_Global::split_grid_world(nproc, nproc, my_rank, mpi.grank, mpi.gsize); - EXPECT_EQ(mpi.gsize, 1); - EXPECT_EQ(mpi.grank, 0); - } - // std::cout< in[2] = {std::complex(1.0, 2.0), std::complex(-1, -2)}; - std::complex inout[2] = {std::complex(2.0, 1.0), std::complex(-2, -1)}; - - int len = 2; - MPI_Datatype dptr = MPI_DOUBLE_COMPLEX; - Parallel_Global::myProd(in, inout, &len, &dptr); - EXPECT_EQ(inout[0], std::complex(3.0, 3.0)); - EXPECT_EQ(inout[1], std::complex(-3.0, -3.0)); -} - -TEST_F(ParaGlobal, InitPools) -{ - nproc = 12; - mpi.kpar = 3; - mpi.nstogroup = 3; - my_rank = 5; - testing::internal::CaptureStdout(); - EXPECT_EXIT(Parallel_Global::init_pools(nproc, - my_rank, - mpi.nstogroup, - mpi.kpar, - mpi.nproc_in_stogroup, - mpi.rank_in_stogroup, - mpi.MY_BNDGROUP, - mpi.nproc_in_pool, - mpi.rank_in_pool, - mpi.my_pool), ::testing::ExitedWithCode(1), ""); - std::string output = testing::internal::GetCapturedStdout(); - EXPECT_THAT(output, testing::HasSubstr("Error:")); -} - - -TEST_F(ParaGlobal, DivideMPIPools) -{ - this->nproc = 12; - mpi.kpar = 3; - this->my_rank = 5; - Parallel_Global::divide_mpi_groups(this->nproc, - mpi.kpar, - this->my_rank, - mpi.nproc_in_pool, - mpi.my_pool, - mpi.rank_in_pool); - EXPECT_EQ(mpi.nproc_in_pool, 4); - EXPECT_EQ(mpi.my_pool, 1); - EXPECT_EQ(mpi.rank_in_pool, 1); -} - -int main(int argc, char** argv) -{ - - MPI_Init(&argc, &argv); - testing::InitGoogleTest(&argc, argv); - int result = RUN_ALL_TESTS(); - MPI_Finalize(); - return result; -} -#endif diff --git a/source/module_base/test_parallel/parallel_global_test.sh b/source/module_base/test_parallel/parallel_global_test.sh deleted file mode 100755 index 37024e3cb8..0000000000 --- a/source/module_base/test_parallel/parallel_global_test.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash -e - -np=`cat /proc/cpuinfo | grep "cpu cores" | uniq| awk '{print $NF}'` -echo "nprocs in this machine is $np" - -for i in 4;do - if [[ $i -gt $np ]];then - continue - fi - echo "TEST in parallel, nprocs=$i" - mpirun -np $i ./MODULE_BASE_ParaGlobal - if [[ $? -ne 0 ]]; then - echo -e "\e[1;33m [ FAILED ] \e[0m"\ - "execute UT with $i cores error." - exit 1 - fi - break -done diff --git a/source/module_base/test_parallel/parallel_reduce_test.cpp b/source/module_base/test_parallel/parallel_reduce_test.cpp deleted file mode 100644 index 50d1290899..0000000000 --- a/source/module_base/test_parallel/parallel_reduce_test.cpp +++ /dev/null @@ -1,614 +0,0 @@ -#ifdef __MPI -#include "module_base/parallel_reduce.h" - -#include "module_base/parallel_global.h" -#include "mpi.h" - -#include "gtest/gtest.h" -#include -#include -#include - -/************************************************************* - * unit test of functions in parallel_reduce.cpp - *************************************************************/ - -/** - * The tested functions are mainly wrappers of MPI_Allreduce - * and MPI_Allgather in ABACUS, as defined in module_base/ - * parallel_reduce.h. - * - * The logic to test MPI_Allreduce wrapper functions is to - * calculate the sum of the total array in two ways, one by - * using MPI_Allreduce with only 1 number, another one by - * using MPI_Allreduce with n numbers. The total array is - * deemed as the sum of local arrays with the same length. - * 1. ReduceIntAll: - * Tests two variations of reduce_all() - * 2. ReduceDoubleAll: - * Tests two variations of reduce_all() - * 3. ReduceComplexAll: - * Tests two variations of reduce_complex_all() - * 4. GatherIntAll: - * Tests gather_int_all() and gather_min_int_all() - * 5. GatherDoubleAll: - * Tests gather_min_double_all() and gather_max_double_all() - * 6. ReduceIntDiag: - * Tests reduce_int_diag() - * 7. ReduceDoubleDiag: - * Tests reduce_double_diag() - * 8. ReduceIntGrid: - * Tests reduce_int_grid() - * 9. ReduceDoubleGrid: - * Tests reduce_double_grid() - * 10.ReduceDoublePool: - * Tests two variations of reduce_pool() - * and two variations of reduce_double_allpool() - * 11.ReduceComplexPool: - * Tests two variations of reduce_pool() - * 12.GatherDoublePool: - * Tests gather_min_double_pool() and gather_max_double_pool() - * - * - */ - -class MPIContext -{ - public: - MPIContext() - { - MPI_Comm_rank(MPI_COMM_WORLD, &_rank); - MPI_Comm_size(MPI_COMM_WORLD, &_size); - } - - int GetRank() const - { - return _rank; - } - int GetSize() const - { - return _size; - } - - int drank; - int dsize; - int dcolor; - - int grank; - int gsize; - - int kpar; - int nproc_in_pool; - int my_pool; - int rank_in_pool; - - private: - int _rank; - int _size; -}; - -const int MIN_FOR_RAND = 1; -const int MAX_FOR_RAND = 99999; - -// generate an array of random numbers -template -T* get_rand_array(int num, int my_rank) -{ - T* rand_array = new T[num](); - assert(num > 0); - std::default_random_engine e(time(NULL) * (my_rank + 1)); - std::uniform_int_distribution u(MIN_FOR_RAND, MAX_FOR_RAND); - for (int i = 0; i < num; i++) - { - rand_array[i] = static_cast(u(e)) % 100; - } - return rand_array; -} - -class ParaReduce : public testing::Test -{ - protected: - int num_per_process = 100; - MPIContext mpiContext; - int my_rank = 0; - int nproc = 0; - void SetUp() override - { - my_rank = mpiContext.GetRank(); - nproc = mpiContext.GetSize(); - } -}; - -TEST_F(ParaReduce, ReduceIntAll) -{ - // generate a random array - int* rand_array = NULL; - rand_array = get_rand_array(num_per_process, my_rank); - - // calculate local sum - int local_sum = 0; - for (int i = 0; i < num_per_process; i++) - { - local_sum += rand_array[i]; - } - - // first way of calculating global sum - int global_sum_first = local_sum; - Parallel_Reduce::reduce_all(global_sum_first); - // second way of calculating global sum - Parallel_Reduce::reduce_all(rand_array, num_per_process); - int global_sum_second = 0; - for (int i = 0; i < num_per_process; i++) - { - global_sum_second += rand_array[i]; - } - // compare two sums - /// printf("rank %d sum1 = %d, sum2 = %d\n",my_rank, - /// global_sum_first, global_sum_second); - EXPECT_EQ(global_sum_first, global_sum_second); - delete[] rand_array; -} - -TEST_F(ParaReduce, ReduceDoubleAll) -{ - // generate a random array - double* rand_array = NULL; - rand_array = get_rand_array(num_per_process, my_rank); - - // calculate local sum - double local_sum = 0.0; - for (int i = 0; i < num_per_process; i++) - { - local_sum += rand_array[i]; - } - - // first way of calculating global sum - double global_sum_first = local_sum; - Parallel_Reduce::reduce_all(global_sum_first); - // second way of calculating global sum - Parallel_Reduce::reduce_all(rand_array, num_per_process); - double global_sum_second = 0; - for (int i = 0; i < num_per_process; i++) - { - global_sum_second += rand_array[i]; - } - // compare two sums - /// printf("rank %d sum1 = %f, sum2 = %f\n",my_rank, - /// global_sum_first, global_sum_second); - EXPECT_NEAR(global_sum_first, global_sum_second, 1e-14); - delete[] rand_array; -} - -TEST_F(ParaReduce, ReduceComplexAll) -{ - // allocate local complex vector - std::complex* rand_array = nullptr; - rand_array = new std::complex[num_per_process]; - // set its elements to random complex numbers - std::default_random_engine e(time(NULL) * (my_rank + 1)); - std::uniform_int_distribution u(MIN_FOR_RAND, MAX_FOR_RAND); - // and calculate local sum - std::complex local_sum = std::complex{0.0, 0.0}; - for (int i = 0; i < num_per_process; i++) - { - double realpart = pow(-1.0, u(e) % 2) * static_cast(u(e)) / MAX_FOR_RAND; - double imagpart = pow(-1.0, u(e) % 2) * static_cast(u(e)) / MAX_FOR_RAND; - rand_array[i] = std::complex{realpart, imagpart}; - local_sum += rand_array[i]; - /// printf("pre rank %d rand_array[%d] = (%f,%f) \n",my_rank,i, - /// rand_array[i].real(), rand_array[i].imag()); - } - // first way of calculating global sum - std::complex global_sum_first = local_sum; - Parallel_Reduce::reduce_all(global_sum_first); - - // second way of calculating global sum - Parallel_Reduce::reduce_all(rand_array, num_per_process); - std::complex global_sum_second = std::complex{0.0, 0.0}; - for (int i = 0; i < num_per_process; i++) - { - global_sum_second += rand_array[i]; - /// printf("pos rank %d rand_array[%d] = (%f,%f) \n",my_rank,i, - /// rand_array[i].real(), rand_array[i].imag()); - } - // compare two sums - /// printf("rank %d sum1 = (%f,%f) sum2 = (%f,%f)\n",my_rank, - /// global_sum_first.real(), global_sum_first.imag(), - /// global_sum_second.real(), global_sum_second.imag()); - EXPECT_NEAR(global_sum_first.real(), global_sum_second.real(), 1e-13); - EXPECT_NEAR(global_sum_first.imag(), global_sum_second.imag(), 1e-13); - - delete[] rand_array; -} - -TEST_F(ParaReduce, GatherIntAll) -{ - std::default_random_engine e(time(NULL) * (my_rank + 1)); - std::uniform_int_distribution u(MIN_FOR_RAND, MAX_FOR_RAND); - int local_number = static_cast(u(e)) % 100; - // printf("pre rank %d local_number = %d \n ",my_rank,local_number); - int* array = new int[nproc](); - // use MPI_Allgather to gather together numbers - Parallel_Reduce::gather_int_all(local_number, array); - EXPECT_EQ(local_number, array[my_rank]); - // get minimum integer among all processes - int min_number = local_number; - Parallel_Reduce::gather_min_int_all(nproc, min_number); - for (int i = 0; i < nproc; i++) - { - EXPECT_LE(min_number, array[i]); - /// printf("post rank %d array[%d] = %d, min = %d \n", - /// my_rank,i,array[i],min_number); - } - delete[] array; -} - -TEST_F(ParaReduce, GatherDoubleAll) -{ - std::default_random_engine e(time(NULL) * (my_rank + 1)); - std::uniform_int_distribution u(MIN_FOR_RAND, MAX_FOR_RAND); - double local_number = static_cast(u(e)) % 100; - // printf("pre rank %d local_number = %d \n ",my_rank,local_number); - double* array = new double[nproc](); - // use MPI_Allgather to gather together numbers - MPI_Allgather(&local_number, 1, MPI_DOUBLE, array, 1, MPI_DOUBLE, MPI_COMM_WORLD); - - EXPECT_EQ(local_number, array[my_rank]); - // get minimum integer among all processes - double min_number = local_number; - Parallel_Reduce::gather_min_double_all(nproc, min_number); - // get maximum integer among all processes - double max_number = local_number; - Parallel_Reduce::gather_max_double_all(nproc, max_number); - for (int i = 0; i < nproc; i++) - { - EXPECT_LE(min_number, array[i]); - EXPECT_GE(max_number, array[i]); - /// printf("post rank %d array[%d] = %f, min = %f, max = %f \n", - /// my_rank,i,array[i],min_number,max_number); - } - delete[] array; -} - -TEST_F(ParaReduce, ReduceIntDiag) -{ - /// num_per_process = 2; - // NPROC is set to 4 in parallel_global_test.sh - if (nproc == 4) - { - Parallel_Global::split_diag_world(2, nproc, my_rank, mpiContext.drank, mpiContext.dsize, mpiContext.dcolor); - // generate a random array - int* rand_array = NULL; - rand_array = get_rand_array(num_per_process, my_rank); - - // calculate local sum - int local_sum = 0; - for (int i = 0; i < num_per_process; i++) - { - local_sum += rand_array[i]; - /// printf(" pre world_rank %d, drank %d rand_array[%d] = %d\n", - /// my_rank,mpiContext.dsize,i, rand_array[i]); - } - - // first way of calculating diag sum - int diag_sum_first = local_sum; - Parallel_Reduce::reduce_int_diag(diag_sum_first); - // second way of calculating global sum - int* swap = new int[num_per_process](); - MPI_Allreduce(rand_array, swap, num_per_process, MPI_INT, MPI_SUM, DIAG_WORLD); - int diag_sum_second = 0; - for (int i = 0; i < num_per_process; i++) - { - diag_sum_second += swap[i]; - /// printf(" post world_rank %d, drank %d swap[%d] = %d\n", - /// my_rank,mpiContext.dsize,i, swap[i]); - } - // compare two sums - /// printf("world_rank %d, drank %d sum1 = %d, sum2 = %d\n", - /// my_rank,mpiContext.dsize,diag_sum_first, diag_sum_second); - EXPECT_EQ(diag_sum_first, diag_sum_second); - delete[] rand_array; - delete[] swap; - MPI_Comm_free(&DIAG_WORLD); - } -} - -TEST_F(ParaReduce, ReduceDoubleDiag) -{ - /// num_per_process = 1; - // NPROC is set to 4 in parallel_global_test.sh - if (nproc == 4) - { - Parallel_Global::split_diag_world(2, nproc, my_rank, mpiContext.drank, mpiContext.dsize, mpiContext.dcolor); - // generate a random array - double* rand_array = NULL; - rand_array = get_rand_array(num_per_process, my_rank); - - // calculate local sum - double local_sum = 0.0; - for (int i = 0; i < num_per_process; i++) - { - local_sum += rand_array[i]; - /// printf(" pre world_rank %d, drank %d rand_array[%d] = %f\n", - /// my_rank,mpiContext.dsize,i, rand_array[i]); - } - - // first way of calculating diag sum - double diag_sum_first = 0.0; - MPI_Allreduce(&local_sum, &diag_sum_first, 1, MPI_DOUBLE, MPI_SUM, DIAG_WORLD); - - // second way of calculating global sum - Parallel_Reduce::reduce_double_diag(rand_array, num_per_process); - double diag_sum_second = 0.0; - for (int i = 0; i < num_per_process; i++) - { - diag_sum_second += rand_array[i]; - /// printf(" post world_rank %d, drank %d rand_array[%d] = %f\n", - /// my_rank,mpiContext.dsize,i, rand_array[i]); - } - // compare two sums - /// printf("world_rank %d, drank %d sum1 = %f, sum2 = %f\n", - /// my_rank,mpiContext.dsize,diag_sum_first, diag_sum_second); - EXPECT_NEAR(diag_sum_first, diag_sum_second, 1e-13); - delete[] rand_array; - MPI_Comm_free(&DIAG_WORLD); - } -} - -TEST_F(ParaReduce, ReduceIntGrid) -{ - /// num_per_process = 2; - // NPROC is set to 4 in parallel_global_test.sh - if (nproc == 4) - { - Parallel_Global::split_grid_world(2, nproc, my_rank, mpiContext.grank, mpiContext.gsize); - // generate a random array - int* rand_array = NULL; - rand_array = get_rand_array(num_per_process, my_rank); - - // calculate local sum - int local_sum = 0; - for (int i = 0; i < num_per_process; i++) - { - local_sum += rand_array[i]; - /// printf(" pre world_rank %d, drank %d rand_array[%d] = %d\n", - /// my_rank,mpiContext.dsize,i, rand_array[i]); - } - - // first way of calculating diag sum - int grid_sum_first = 0; - MPI_Allreduce(&local_sum, &grid_sum_first, 1, MPI_INT, MPI_SUM, GRID_WORLD); - - // second way of calculating global sum - Parallel_Reduce::reduce_int_grid(rand_array, num_per_process); - int grid_sum_second = 0; - for (int i = 0; i < num_per_process; i++) - { - grid_sum_second += rand_array[i]; - /// printf(" post world_rank %d, drank %d rand_array[%d] = %d\n", - /// my_rank,mpiContext.dsize,i, rand_array[i]); - } - // compare two sums - /// printf("world_rank %d, drank %d sum1 = %d, sum2 = %d\n", - /// my_rank,mpiContext.dsize,grid_sum_first, grid_sum_second); - EXPECT_EQ(grid_sum_first, grid_sum_second); - delete[] rand_array; - MPI_Comm_free(&GRID_WORLD); - } -} - -TEST_F(ParaReduce, ReduceDoubleGrid) -{ - /// num_per_process = 1; - // NPROC is set to 4 in parallel_global_test.sh - if (nproc == 4) - { - Parallel_Global::split_grid_world(2, nproc, my_rank, mpiContext.grank, mpiContext.gsize); - // generate a random array - double* rand_array = NULL; - rand_array = get_rand_array(num_per_process, my_rank); - - // calculate local sum - double local_sum = 0.0; - for (int i = 0; i < num_per_process; i++) - { - local_sum += rand_array[i]; - /// printf(" pre world_rank %d, drank %d rand_array[%d] = %f\n", - /// my_rank,mpiContext.dsize,i, rand_array[i]); - } - - // first way of calculating diag sum - double grid_sum_first = 0.0; - MPI_Allreduce(&local_sum, &grid_sum_first, 1, MPI_DOUBLE, MPI_SUM, GRID_WORLD); - - // second way of calculating global sum - Parallel_Reduce::reduce_double_grid(rand_array, num_per_process); - double grid_sum_second = 0.0; - for (int i = 0; i < num_per_process; i++) - { - grid_sum_second += rand_array[i]; - /// printf(" post world_rank %d, drank %d rand_array[%d] = %f\n", - /// my_rank,mpiContext.dsize,i, rand_array[i]); - } - // compare two sums - /// printf("world_rank %d, drank %d sum1 = %f, sum2 = %f\n", - /// my_rank,mpiContext.dsize,grid_sum_first, grid_sum_second); - EXPECT_NEAR(grid_sum_first, grid_sum_second, 1e-13); - delete[] rand_array; - MPI_Comm_free(&GRID_WORLD); - } -} - -TEST_F(ParaReduce, ReduceDoublePool) -{ - /// num_per_process = 1; - // NPROC is set to 4 in parallel_global_test.sh - if (nproc == 4) - { - mpiContext.kpar = 2; - Parallel_Global::divide_mpi_groups(nproc, - mpiContext.kpar, - my_rank, - mpiContext.nproc_in_pool, - mpiContext.my_pool, - mpiContext.rank_in_pool); - MPI_Comm_split(MPI_COMM_WORLD, mpiContext.my_pool, mpiContext.rank_in_pool, &POOL_WORLD); - /// printf("word_rank/world_size = %d/%d, pool_rank/pool_size = %d/%d \n", - /// my_rank,nproc, - /// mpiContext.rank_in_pool,mpiContext.nproc_in_pool); - - // generate a random array - double* rand_array = NULL; - rand_array = get_rand_array(num_per_process, my_rank); - - // calculate local sum - double local_sum = 0.0; - for (int i = 0; i < num_per_process; i++) - { - local_sum += rand_array[i]; - } - - // first way of calculating pool sum - double pool_sum_first = local_sum; - Parallel_Reduce::reduce_pool(pool_sum_first); - // second way of calculating pool sum - Parallel_Reduce::reduce_pool(rand_array, num_per_process); - double pool_sum_second = 0.0; - for (int i = 0; i < num_per_process; i++) - { - pool_sum_second += rand_array[i]; - } - // compare two pool sums - /// printf("pool rank %d sum1 = %f, sum2 = %f\n",my_rank, - /// pool_sum_first, pool_sum_second); - EXPECT_NEAR(pool_sum_first, pool_sum_second, 1e-14); - - // first way of calculating global sum - double global_sum_first = pool_sum_first; - Parallel_Reduce::reduce_double_allpool(mpiContext.kpar, mpiContext.nproc_in_pool, global_sum_first); - // second way of calculating pool sum - Parallel_Reduce::reduce_double_allpool(mpiContext.kpar, mpiContext.nproc_in_pool, rand_array, num_per_process); - double global_sum_second = 0.0; - for (int i = 0; i < num_per_process; i++) - { - global_sum_second += rand_array[i]; - } - // compare two global sums - /// printf("global rank %d sum1 = %f, sum2 = %f\n",my_rank, - /// global_sum_first, global_sum_second); - EXPECT_NEAR(global_sum_first, global_sum_second, 1e-14); - - delete[] rand_array; - MPI_Comm_free(&POOL_WORLD); - } -} - -TEST_F(ParaReduce, ReduceComplexPool) -{ - /// num_per_process = 1; - // NPROC is set to 4 in parallel_global_test.sh - if (nproc == 4) - { - mpiContext.kpar = 2; - Parallel_Global::divide_mpi_groups(nproc, - mpiContext.kpar, - my_rank, - mpiContext.nproc_in_pool, - mpiContext.my_pool, - mpiContext.rank_in_pool); - MPI_Comm_split(MPI_COMM_WORLD, mpiContext.my_pool, mpiContext.rank_in_pool, &POOL_WORLD); - /// printf("word_rank/world_size = %d/%d, pool_rank/pool_size = %d/%d \n", - /// my_rank,nproc, - /// mpiContext.rank_in_pool,mpiContext.nproc_in_pool); - // allocate local complex vector - std::complex* rand_array = nullptr; - rand_array = new std::complex[num_per_process]; - // set its elements to random complex numbers - std::default_random_engine e(time(NULL) * (my_rank + 1)); - std::uniform_int_distribution u(MIN_FOR_RAND, MAX_FOR_RAND); - // and calculate local sum - std::complex local_sum = std::complex{0.0, 0.0}; - for (int i = 0; i < num_per_process; i++) - { - double realpart = pow(-1.0, u(e) % 2) * static_cast(u(e)) / MAX_FOR_RAND; - double imagpart = pow(-1.0, u(e) % 2) * static_cast(u(e)) / MAX_FOR_RAND; - rand_array[i] = std::complex{realpart, imagpart}; - local_sum += rand_array[i]; - /// printf("pre rank %d rand_array[%d] = (%f,%f) \n",my_rank,i, - /// rand_array[i].real(), rand_array[i].imag()); - } - // first way of calculating pool sum - std::complex pool_sum_first = local_sum; - Parallel_Reduce::reduce_pool(pool_sum_first); - - // second way of calculating pool sum - Parallel_Reduce::reduce_pool(rand_array, num_per_process); - std::complex pool_sum_second = std::complex{0.0, 0.0}; - for (int i = 0; i < num_per_process; i++) - { - pool_sum_second += rand_array[i]; - /// printf("pos rank %d rand_array[%d] = (%f,%f) \n",my_rank,i, - /// rand_array[i].real(), rand_array[i].imag()); - } - // compare two sums - /// printf("rank %d sum1 = (%f,%f) sum2 = (%f,%f)\n",my_rank, - /// pool_sum_first.real(), pool_sum_first.imag(), - /// pool_sum_second.real(), pool_sum_second.imag()); - EXPECT_NEAR(pool_sum_first.real(), pool_sum_second.real(), 1e-13); - EXPECT_NEAR(pool_sum_first.imag(), pool_sum_second.imag(), 1e-13); - - delete[] rand_array; - MPI_Comm_free(&POOL_WORLD); - } -} - -TEST_F(ParaReduce, GatherDoublePool) -{ - /// num_per_process = 1; - // NPROC is set to 4 in parallel_global_test.sh - if (nproc == 4) - { - mpiContext.kpar = 2; - Parallel_Global::divide_mpi_groups(nproc, - mpiContext.kpar, - my_rank, - mpiContext.nproc_in_pool, - mpiContext.my_pool, - mpiContext.rank_in_pool); - MPI_Comm_split(MPI_COMM_WORLD, mpiContext.my_pool, mpiContext.rank_in_pool, &POOL_WORLD); - std::default_random_engine e(time(NULL) * (my_rank + 1)); - std::uniform_int_distribution u(MIN_FOR_RAND, MAX_FOR_RAND); - double local_number = static_cast(u(e)) % 100; - // printf("pre rank %d local_number = %d \n ",my_rank,local_number); - double* array = new double[mpiContext.nproc_in_pool](); - // use MPI_Allgather to gather together numbers - MPI_Allgather(&local_number, 1, MPI_DOUBLE, array, 1, MPI_DOUBLE, POOL_WORLD); - - EXPECT_EQ(local_number, array[mpiContext.rank_in_pool]); - // get minimum integer among all processes - double min_number = local_number; - Parallel_Reduce::gather_min_double_pool(mpiContext.nproc_in_pool, min_number); - // get maximum integer among all processes - double max_number = local_number; - Parallel_Reduce::gather_max_double_pool(mpiContext.nproc_in_pool, max_number); - for (int i = 0; i < mpiContext.nproc_in_pool; i++) - { - EXPECT_LE(min_number, array[i]); - EXPECT_GE(max_number, array[i]); - /// printf("post rank %d, pool rank %d, array[%d] = %f, min = %f, max = %f \n", - /// my_rank,mpiContext.rank_in_pool,i,array[i],min_number,max_number); - } - delete[] array; - MPI_Comm_free(&POOL_WORLD); - } -} - -int main(int argc, char** argv) -{ - MPI_Init(&argc, &argv); - testing::InitGoogleTest(&argc, argv); - int result = RUN_ALL_TESTS(); - MPI_Finalize(); - return result; -} -#endif diff --git a/source/module_base/test_parallel/parallel_reduce_test.sh b/source/module_base/test_parallel/parallel_reduce_test.sh deleted file mode 100755 index ec2b46a583..0000000000 --- a/source/module_base/test_parallel/parallel_reduce_test.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash -e - -np=`cat /proc/cpuinfo | grep "cpu cores" | uniq| awk '{print $NF}'` -echo "nprocs in this machine is $np" - -for i in 4;do - if [[ $i -gt $np ]];then - continue - fi - echo "TEST in parallel, nprocs=$i" - mpirun -np $i ./MODULE_BASE_ParaReduce - if [[ $? -ne 0 ]]; then - echo -e "\e[1;33m [ FAILED ] \e[0m"\ - "execute UT with $i cores error." - exit 1 - fi - break -done diff --git a/source/module_base/test_parallel/test_para_gemm.cpp b/source/module_base/test_parallel/test_para_gemm.cpp deleted file mode 100644 index 61fcfc9ea7..0000000000 --- a/source/module_base/test_parallel/test_para_gemm.cpp +++ /dev/null @@ -1,516 +0,0 @@ -#include "../kernels/math_kernel_op.h" -#include "../para_gemm.h" - -#include -#include -#include -#include - -void random_data(std::vector& A_global, - std::vector& B_global, - std::vector& Cref_global, - std::vector& C_global, - double& alpha, - double& beta) -{ - for (auto& val: A_global) - { - val = std::rand() / (RAND_MAX + 1.0); - } - for (auto& val: B_global) - { - val = std::rand() / (RAND_MAX + 1.0); - } - for (auto& val: Cref_global) - { - val = std::rand() / (RAND_MAX + 1.0); - } - C_global = Cref_global; - - alpha = std::rand() / (RAND_MAX + 1.0); - beta = std::rand() / (RAND_MAX + 1.0); -} -void random_data(std::vector>& A_global, - std::vector>& B_global, - std::vector>& Cref_global, - std::vector>& C_global, - std::complex& alpha, - std::complex& beta) -{ - for (auto& val: A_global) - { - val = std::complex(std::rand() / (RAND_MAX + 1.0), std::rand() / (RAND_MAX + 1.0)); - } - for (auto& val: B_global) - { - val = std::complex(std::rand() / (RAND_MAX + 1.0), std::rand() / (RAND_MAX + 1.0)); - } - for (auto& val: Cref_global) - { - val = std::complex(std::rand() / (RAND_MAX + 1.0), std::rand() / (RAND_MAX + 1.0)); - } - C_global = Cref_global; - - alpha = std::complex(std::rand() / (RAND_MAX + 1.0), std::rand() / (RAND_MAX + 1.0)); - beta = std::complex(std::rand() / (RAND_MAX + 1.0), std::rand() / (RAND_MAX + 1.0)); -} -double get_double(std::complex& val) -{ - return val.real() + val.imag(); -} -double get_double(double& val) -{ - return val; -} - -void scatterv_data(const double* sendbuf, - const int* sendcounts, - const int* displs, - double* recvbuf, - const int recvcount, - MPI_Comm comm) -{ - MPI_Scatterv(sendbuf, sendcounts, displs, MPI_DOUBLE, recvbuf, recvcount, MPI_DOUBLE, 0, comm); -} -void scatterv_data(const std::complex* sendbuf, - const int* sendcounts, - const int* displs, - std::complex* recvbuf, - const int recvcount, - MPI_Comm comm) -{ - MPI_Scatterv(sendbuf, sendcounts, displs, MPI_DOUBLE_COMPLEX, recvbuf, recvcount, MPI_DOUBLE_COMPLEX, 0, comm); -} -template -class PgemmTest : public ::testing::Test -{ - protected: - void SetUp() override - { - MPI_Comm_rank(MPI_COMM_WORLD, &rank); - MPI_Comm_size(MPI_COMM_WORLD, &nproc); - } - void TearDown() override - { - MPI_Comm_free(&col_world); - MPI_Comm_free(&row_world); - } - - public: - void decide_ngroup(const int& willing_ncolgroup, const int& willing_nrowgroup) - { - ncolgroup = willing_ncolgroup; - nrowgroup = willing_nrowgroup; - if (nproc % (ncolgroup * nrowgroup) != 0) - { - ncolgroup = nproc; - nrowgroup = 1; - } - else - { - nrowgroup = nproc / ncolgroup; - } - - MPI_Comm_split(MPI_COMM_WORLD, rank % nrowgroup, rank / nrowgroup, &col_world); - MPI_Comm_split(MPI_COMM_WORLD, rank / nrowgroup, rank % nrowgroup, &row_world); - MPI_Comm_rank(col_world, &rank_col); - MPI_Comm_rank(row_world, &rank_row); - MPI_Comm_size(col_world, &nproc_col); - MPI_Comm_size(row_world, &nproc_row); - } - void randomize_initialization() - { - random_data(A_global, B_global, Cref_global, C_global, alpha, beta); - } - - void prepare(const int& ncolA_global, - const int& ncolB_global, - const int& nrow_global, - const int& LDA_global, - const int& LDB_global, - const int& LDC_global) - { - A_global = std::vector(LDA_global * ncolA_global, 0.0); - B_global = std::vector(LDB_global * ncolB_global, 0.0); - C_global = std::vector(LDC_global * ncolB_global, 0.0); - Cref_global = std::vector(LDC_global * ncolB_global, 0.0); - if (rank == 0) - { - - this->randomize_initialization(); - const base_device::DEVICE_CPU* ctx = {}; - char transC = 'C'; - char transN = 'N'; - ModuleBase::gemm_op()(transC, - transN, - ncolA_global, - ncolB_global, - nrow_global, - &alpha, - A_global.data(), - LDA_global, - B_global.data(), - LDB_global, - &beta, - Cref_global.data(), - LDC_global); - } - - if (std::is_same::value) - { - MPI_Bcast(A_global.data(), A_global.size(), MPI_DOUBLE, 0, MPI_COMM_WORLD); - MPI_Bcast(B_global.data(), B_global.size(), MPI_DOUBLE, 0, MPI_COMM_WORLD); - MPI_Bcast(C_global.data(), C_global.size(), MPI_DOUBLE, 0, MPI_COMM_WORLD); - MPI_Bcast(Cref_global.data(), Cref_global.size(), MPI_DOUBLE, 0, MPI_COMM_WORLD); - MPI_Bcast(&alpha, 1, MPI_DOUBLE, 0, MPI_COMM_WORLD); - MPI_Bcast(&beta, 1, MPI_DOUBLE, 0, MPI_COMM_WORLD); - } - else if (std::is_same>::value) - { - MPI_Bcast(A_global.data(), A_global.size(), MPI_DOUBLE_COMPLEX, 0, MPI_COMM_WORLD); - MPI_Bcast(B_global.data(), B_global.size(), MPI_DOUBLE_COMPLEX, 0, MPI_COMM_WORLD); - MPI_Bcast(C_global.data(), C_global.size(), MPI_DOUBLE_COMPLEX, 0, MPI_COMM_WORLD); - MPI_Bcast(Cref_global.data(), Cref_global.size(), MPI_DOUBLE_COMPLEX, 0, MPI_COMM_WORLD); - MPI_Bcast(&alpha, 1, MPI_DOUBLE_COMPLEX, 0, MPI_COMM_WORLD); - MPI_Bcast(&beta, 1, MPI_DOUBLE_COMPLEX, 0, MPI_COMM_WORLD); - } - - // Broadcast A_global and B_global to all ranks - getncol_and_row(ncolA_global, ncolB_global, nrow_global); - LDA = nrow + 1; - LDB = nrow + 2; - - A_local = std::vector(LDA * ncolA, 0.0); - B_local = std::vector(LDB * ncolB, 0.0); - - scatter_matrix(ncolA_global, ncolB_global, nrow_global, LDA_global, LDB_global); - } - - void getncol_and_row(const int& ncolA_global, const int& ncolB_global, const int& nrow_global) - { - ncolA = ncolA_global / ncolgroup; - if (ncolA_global % ncolgroup > rank_col) - { - ncolA += 1; - } - ncolB = ncolB_global / ncolgroup; - if (ncolB_global % ncolgroup > rank_col) - { - ncolB += 1; - } - - nrow = nrow_global / nrowgroup; - if (nrow_global % nrowgroup > rank_row) - { - nrow += 1; - } - - ncolA_ip.resize(nproc_col); - ncolB_ip.resize(nproc_col); - nrow_ip.resize(nproc_row); - MPI_Allgather(&ncolA, 1, MPI_INT, ncolA_ip.data(), 1, MPI_INT, col_world); - MPI_Allgather(&ncolB, 1, MPI_INT, ncolB_ip.data(), 1, MPI_INT, col_world); - if (row_world != MPI_COMM_NULL) - { - MPI_Allgather(&nrow, 1, MPI_INT, nrow_ip.data(), 1, MPI_INT, row_world); - } - } - - void scatter_matrix(const int& ncolA_global, - const int& ncolB_global, - const int& nrow_global, - const int& LDA_global, - const int& LDB_global) - { - std::vector A_semiglobal(ncolA * LDA_global, 0.0); - std::vector B_semiglobal(ncolB * LDB_global, 0.0); - - // Scatter A_global and B_global to A_semiglobal and B_semiglobal - std::vector sendcounts(nproc_col, 0); - std::vector displs(nproc_col, 0); - for (int i = 0; i < nproc_col; i++) - { - sendcounts[i] = ncolA_ip[i] * LDA_global; - } - displs[0] = 0; - for (int i = 1; i < nproc_col; i++) - { - displs[i] = displs[i - 1] + sendcounts[i - 1]; - } - scatterv_data(A_global.data(), - sendcounts.data(), - displs.data(), - A_semiglobal.data(), - ncolA * LDA_global, - col_world); - - for (int i = 0; i < nproc_col; i++) - { - sendcounts[i] = ncolB_ip[i] * LDB_global; - } - displs[0] = 0; - for (int i = 1; i < nproc_col; i++) - { - displs[i] = displs[i - 1] + sendcounts[i - 1]; - } - scatterv_data(B_global.data(), - sendcounts.data(), - displs.data(), - B_semiglobal.data(), - ncolB * LDB_global, - col_world); - - // Scatter A_semiglobal and B_semiglobal to A_local and B_local - sendcounts.resize(nproc_row, 0); - displs.resize(nproc_row, 0); - for (int i = 0; i < nproc_row; i++) - { - sendcounts[i] = nrow_ip[i]; - } - displs[0] = 0; - for (int i = 1; i < nproc_row; i++) - { - displs[i] = displs[i - 1] + sendcounts[i - 1]; - } - for (int i = 0; i < ncolA; i++) - { - scatterv_data(A_semiglobal.data() + i * LDA_global, - sendcounts.data(), - displs.data(), - A_local.data() + i * LDA, - nrow, - row_world); - } - - for (int i = 0; i < ncolB; i++) - { - scatterv_data(B_semiglobal.data() + i * LDB_global, - sendcounts.data(), - displs.data(), - B_local.data() + i * LDB, - nrow, - row_world); - } - } - - void compare_result(const int& nrowC_global, const int& ncolC_global, const int& LDC_global) - { - for (int i = 0; i < ncolC_global; i++) - { - for (int j = 0; j < nrowC_global; j++) - { - EXPECT_NEAR(get_double(Cref_global[i * LDC_global + j]), - get_double(C_global[i * LDC_global + j]), - 1e-10); - } - } - } - - int rank = 0, nproc = 0; - T alpha = 0, beta = 0; - std::vector A_global, B_global, Cref_global, C_global; - std::vector A_local, B_local; - int ncolA = 0, ncolB = 0, nrow = 0, LDA = 0, LDB = 0; - int ncolgroup = 1, nrowgroup = 1; - int rank_col = 0, rank_row = 0; - int nproc_col = 0, nproc_row = 0; - ModuleBase::PGemmCN pgemm; - MPI_Comm col_world; - MPI_Comm row_world; - std::vector ncolA_ip, ncolB_ip, nrow_ip; -}; - -typedef ::testing::Types> MyTypes; - -TYPED_TEST_SUITE(PgemmTest, MyTypes); - -TYPED_TEST(PgemmTest, even_case) -{ - const int ncolA_global = 16, ncolB_global = 8, nrow_global = 12; - const int LDA_global = 17, LDB_global = 18, LDC_global = 19; - - this->decide_ngroup(2, 2); - this->prepare(ncolA_global, ncolB_global, nrow_global, LDA_global, LDB_global, LDC_global); - - this->pgemm.set_dimension(this->col_world, - this->row_world, - this->ncolA, - this->LDA, - this->ncolB, - this->LDB, - this->nrow, - LDC_global); - this->pgemm.multiply(this->alpha, this->A_local.data(), this->B_local.data(), this->beta, this->C_global.data()); - - this->compare_result(ncolA_global, ncolB_global, LDC_global); -} - -TYPED_TEST(PgemmTest, odd_case) -{ - const int ncolA_global = 17, ncolB_global = 7, nrow_global = 13; - const int LDA_global = 17, LDB_global = 18, LDC_global = 19; - - this->decide_ngroup(2, 2); - this->prepare(ncolA_global, ncolB_global, nrow_global, LDA_global, LDB_global, LDC_global); - - this->pgemm.set_dimension(this->col_world, - this->row_world, - this->ncolA, - this->LDA, - this->ncolB, - this->LDB, - this->nrow, - LDC_global); - this->pgemm.multiply(this->alpha, this->A_local.data(), this->B_local.data(), this->beta, this->C_global.data()); - - this->compare_result(ncolA_global, ncolB_global, LDC_global); -} - -TYPED_TEST(PgemmTest, row_parallel) -{ - const int ncolA_global = 17, ncolB_global = 7, nrow_global = 13; - const int LDA_global = 17, LDB_global = 18, LDC_global = 19; - - this->decide_ngroup(1, 4); - this->prepare(ncolA_global, ncolB_global, nrow_global, LDA_global, LDB_global, LDC_global); - - this->pgemm.set_dimension(this->col_world, - this->row_world, - this->ncolA, - this->LDA, - this->ncolB, - this->LDB, - this->nrow, - LDC_global); - this->pgemm.multiply(this->alpha, this->A_local.data(), this->B_local.data(), this->beta, this->C_global.data()); - - this->compare_result(ncolA_global, ncolB_global, LDC_global); -} - -TYPED_TEST(PgemmTest, col_parallel) -{ - const int ncolA_global = 17, ncolB_global = 7, nrow_global = 13; - const int LDA_global = 17, LDB_global = 18, LDC_global = 19; - - this->decide_ngroup(4, 1); - this->prepare(ncolA_global, ncolB_global, nrow_global, LDA_global, LDB_global, LDC_global); - - this->pgemm.set_dimension(this->col_world, - this->row_world, - this->ncolA, - this->LDA, - this->ncolB, - this->LDB, - this->nrow, - LDC_global); - this->pgemm.multiply(this->alpha, this->A_local.data(), this->B_local.data(), this->beta, this->C_global.data()); - - this->compare_result(ncolA_global, ncolB_global, LDC_global); -} - -TYPED_TEST(PgemmTest, divide_col) -{ - const int ncolA_global = 17, ncolB_global = 7, nrow_global = 13; - const int LDA_global = 17, LDB_global = 18, LDC_global = 19; - - this->decide_ngroup(2, 2); - this->prepare(ncolA_global, ncolB_global, nrow_global, LDA_global, LDB_global, LDC_global); - std::vector colB_loc(this->nproc_col); - MPI_Allgather(&this->ncolB, 1, MPI_INT, colB_loc.data(), 1, MPI_INT, this->col_world); - std::vector displs(this->nproc_col); - displs[0] = 0; - for (int i = 1; i < this->nproc_col; i++) - { - displs[i] = (displs[i - 1] + colB_loc[i - 1]) * LDC_global; - } - int start = displs[this->rank_col]; - - this->pgemm.set_dimension(this->col_world, - this->row_world, - this->ncolA, - this->LDA, - this->ncolB, - this->LDB, - this->nrow, - LDC_global, - 2); - this->pgemm.multiply(this->alpha, this->A_local.data(), this->B_local.data(), this->beta, this->C_global.data()+ start); - - - - for (int i = 0; i < this->ncolB; i++) - { - for (int j = 0; j < ncolA_global; j++) - { - EXPECT_NEAR(get_double(this->Cref_global[i * LDC_global + start + j]), - get_double(this->C_global[i * LDC_global + start + j]), - 1e-10); - } - } -} - -TYPED_TEST(PgemmTest, divide_row) -{ - const int ncolA_global = 17, ncolB_global = 7, nrow_global = 13; - const int LDA_global = 17, LDB_global = 18, LDC_global = 19; - - this->decide_ngroup(2, 2); - this->prepare(ncolA_global, ncolB_global, nrow_global, LDA_global, LDB_global, LDC_global); - std::vector colA_loc(this->nproc_col); - MPI_Allgather(&this->ncolA, 1, MPI_INT, colA_loc.data(), 1, MPI_INT, this->col_world); - std::vector displs(this->nproc_col); - displs[0] = 0; - for (int i = 1; i < this->nproc_col; i++) - { - displs[i] = (displs[i - 1] + colA_loc[i - 1]); - } - int start = displs[this->rank_col]; - - int LDC_local = this->ncolA + 2; - std::vector C_loc(LDC_local * ncolB_global, 0.0); - for(int i = 0; i < ncolB_global; i++) - { - for(int j = 0; j < this->ncolA; j++) - { - C_loc[i * LDC_local + j] = this->C_global[i * LDC_global + start + j]; - } - } - - this->pgemm.set_dimension(this->col_world, - this->row_world, - this->ncolA, - this->LDA, - this->ncolB, - this->LDB, - this->nrow, - LDC_local, - 3); - this->pgemm.multiply(this->alpha, this->A_local.data(), this->B_local.data(), this->beta, C_loc.data()); - - - - for (int i = 0; i < ncolB_global; i++) - { - for (int j = 0; j < this->ncolA; j++) - { - EXPECT_NEAR(get_double(this->Cref_global[i * LDC_global + start + j]), - get_double(C_loc[i * LDC_local + j]), - 1e-10); - } - } -} - -int main(int argc, char** argv) -{ - ::testing::InitGoogleTest(&argc, argv); - MPI_Init(&argc, &argv); - - int RANK, NPROC; - MPI_Comm_rank(MPI_COMM_WORLD, &RANK); - MPI_Comm_size(MPI_COMM_WORLD, &NPROC); - - int result = RUN_ALL_TESTS(); - - MPI_Finalize(); - return result; -} \ No newline at end of file diff --git a/source/module_base/timer.cpp b/source/module_base/timer.cpp deleted file mode 100644 index 1c2b9d8e59..0000000000 --- a/source/module_base/timer.cpp +++ /dev/null @@ -1,315 +0,0 @@ -#include "timer.h" - -#include - -#ifdef __MPI -#include -#endif -#ifdef _OPENMP -#include -#endif - -#include - -#include "chrono" -#include "module_base/formatter.h" - -namespace ModuleBase -{ - -//---------------------------------------------------------- -// EXPLAIN : -//---------------------------------------------------------- -bool timer::disabled = false; -size_t timer::n_now = 0; -std::map> timer::timer_pool; - -void timer::finish(std::ofstream &ofs,const bool print_flag) -{ - timer::tick("","total"); - if(print_flag) { - print_all( ofs ); -} -} - -//---------------------------------------------------------- -// -//---------------------------------------------------------- -void timer::start() -{ - // first init ,then we can use tick - timer::tick("","total"); -} - -double timer::cpu_time() -{ -//---------------------------------------------------------- -// EXPLAIN : here static is important !! -// only first call can let t0 = 0,clock begin -// when enter this function second time , t0 > 0 -//---------------------------------------------------------- - static auto t1 = std::chrono::system_clock::now(); - const auto t2 = std::chrono::system_clock::now(); - auto duration = std::chrono::duration_cast(t2 - t1); - return double(duration.count()) * std::chrono::microseconds::period::num / std::chrono::microseconds::period::den; -} - -void timer::tick(const std::string &class_name,const std::string &name) -{ -//---------------------------------------------------------- -// EXPLAIN : if timer is disabled , return -//---------------------------------------------------------- - if (disabled) { - return; -} - -#ifdef _OPENMP - if(!omp_get_thread_num()) -#endif - { - Timer_One &timer_one = timer_pool[class_name][name]; - -//---------------------------------------------------------- -// CALL MEMBER FUNCTION : -// NAME : cpu_time -// -// EXPLAIN : -// if start_flag == true,means a new clock counting begin, -// hence we record the start time of this clock counting. -// if start_flag == false, means it's the end of this counting, -// so we add the time during this two 'time point' to the clock time storage. -//---------------------------------------------------------- - if(timer_one.start_flag) - { -#ifdef __MPI - int is_initialized = 0; - MPI_Initialized(&is_initialized); - if(is_initialized) - { - timer_one.cpu_start = MPI_Wtime(); - } -#else - timer_one.cpu_start = cpu_time(); -#endif - ++timer_one.calls; - timer_one.start_flag = false; - } - else - { -#ifdef __MPI - int is_initialized = 0; - MPI_Initialized(&is_initialized); - if(is_initialized) - { - timer_one.cpu_second += MPI_Wtime() - timer_one.cpu_start; - } -#else - timer_one.cpu_second += (cpu_time() - timer_one.cpu_start); -#endif - timer_one.start_flag = true; - } - } // end if(!omp_get_thread_num()) -} - -long double timer::print_until_now() -{ - // stop the clock - timer::tick("","total"); - // start again - timer::tick("","total"); - return timer_pool[""]["total"].cpu_second; -} - -void timer::write_to_json(std::string file_name) -{ -#ifdef __MPI - // in some unit test, the mpi is not initialized, so we need to check it - // if mpi is not initialized, we do not run this function - int is_initialized = 0; - MPI_Initialized(&is_initialized); - if (!is_initialized) { - return; -} - int my_rank = 0; - MPI_Comm_rank(MPI_COMM_WORLD, &my_rank); - if (my_rank != 0) { - return; -} -#endif - - // check if a double is inf, if so, return "null", else return a string of the input double - auto double_to_string = [](double d) -> std::string - { - if(std::isinf(d)) - { - return "Infinity"; - } - else - { - return FmtCore::format("%.15f", d); - } - }; - - // The output json file format is like this: - // { - // "total": 1.0, - // "sub": [ - // { - // "class_name": "wavefunc", - // "sub": [ - // { - // "name": "evc", - // "cpu_second": 0.000318, - // "calls": 2, - // "cpu_second_per_call": 0.000159, - // "cpu_second_per_total": 0.000318 - // } - // ] - // } - // ] - // } - - std::ofstream ofs(file_name); - std::string indent = " "; - int order_a = 0; - ofs << "{\n"; - ofs << indent << "\"total\": " << timer_pool[""]["total"].cpu_second << ",\n"; - ofs << indent << "\"sub\": [\n"; - for(auto &timer_pool_A : timer_pool) - { - order_a ++; - // if calss_name == "", it means total time, so we skip it - if(timer_pool_A.first == "") - { - continue; - } - int order_b = 0; - const std::string class_name = timer_pool_A.first; - ofs << indent << indent << "{\n"; - ofs << indent << indent << indent << "\"class_name\": \"" << class_name << "\",\n"; - ofs << indent << indent << indent << "\"sub\": [\n"; - for(auto &timer_pool_B : timer_pool_A.second) - { - order_b ++; - const std::string name = timer_pool_B.first; - const Timer_One timer_one = timer_pool_B.second; - ofs << indent << indent << indent << indent << "{\n"; - ofs << indent << indent << indent << indent << "\"name\": \"" << name << "\",\n"; - ofs << indent << indent << indent << indent << "\"cpu_second\": " - << std::setprecision(15) << timer_one.cpu_second << ",\n"; - ofs << indent << indent << indent << indent << "\"calls\": " << timer_one.calls << ",\n"; - ofs << indent << indent << indent << indent << "\"cpu_second_per_call\": " - << double_to_string(timer_one.cpu_second/timer_one.calls) << ",\n"; - ofs << indent << indent << indent << indent << "\"cpu_second_per_total\": " - << double_to_string(timer_one.cpu_second/timer_pool[""]["total"].cpu_second) << "\n"; - - if (order_b == timer_pool_A.second.size()) - { - ofs << indent << indent << indent << indent << "}\n"; - } - else - { - ofs << indent << indent << indent << indent << "},\n"; - } - } - ofs << indent << indent << indent << "]\n"; - if (order_a == timer_pool.size()) - { - ofs << indent << indent << "}\n"; - } - else - { - ofs << indent << indent << "},\n"; - } - } - ofs << indent << "]\n"; - ofs << "}\n"; - ofs.close(); -} - -void timer::print_all(std::ofstream &ofs) -{ - constexpr double small = 0.1; // cpu = 10^6 - // if want to print > 1s , set small = 10^6 - - std::vector,Timer_One>> timer_pool_order; - for(auto &timer_pool_A : timer_pool) - { - const std::string class_name = timer_pool_A.first; - for(auto &timer_pool_B : timer_pool_A.second) - { - const std::string name = timer_pool_B.first; - const Timer_One timer_one = timer_pool_B.second; - if(timer_pool_order.size() < timer_one.order+1) - { - timer_pool_order.resize(timer_one.order+1); - } - //timer_pool_order[timer_one.order] = {{class_name, name}, timer_one}; //qianrui change it to make it compatible with old compiler version - timer_pool_order[timer_one.order] = std::pair, Timer_One> { - std::pair{class_name,name}, timer_one}; - } - } - std::vector class_names; - std::vector names; - std::vector times; - std::vector calls; - std::vector avgs; - std::vector pers; - for(auto &timer_pool_order_A : timer_pool_order) - { - const std::string &class_name = timer_pool_order_A.first.first; - const std::string &name = timer_pool_order_A.first.second; - const Timer_One &timer_one = timer_pool_order_A.second; - - if(timer_one.cpu_second < 0) - { - continue; - } - - // only print out timers that are larger than 1% - // mohan add 2025-03-09 - const double percentage_thr = 1.0; - const double percentage = timer_one.cpu_second / timer_pool_order[0].second.cpu_second * 100; - if(percentage titles = {"CLASS_NAME", "NAME", "TIME/s", "CALLS", "AVG/s", "PER/%"}; - std::vector formats = {"%-10s", "%-10s", "%6.2f", "%8d", "%6.2f", "%6.2f"}; - FmtTable time_statistics(/*titles=*/titles, - /*nrows=*/pers.size(), - /*formats=*/formats, - /*indent=*/0, - /*align=*/{/*value*/FmtTable::Align::LEFT, /*title*/FmtTable::Align::CENTER}); - time_statistics << class_names << names << times << calls << avgs << pers; - const std::string table = "\nTIME STATISTICS\n" + time_statistics.str(); - std::cout< -#include -#include -#include -#include -#include - -namespace ModuleBase -{ -/** - * @brief Tracing computation time - * @authors Fangwei, Mohan, Peize Lin - * - */ -class timer -{ - public: - struct Timer_One - { - double cpu_start; - double cpu_second = 0.0; - size_t calls = 0; - size_t order = n_now++; - bool start_flag = true; - }; - - static std::map> timer_pool; - - /** - * @brief Use twice at a time: the first time, set start_flag to false; - * the second time, calculate the time duration - * - * @param class_name_in The class name for timing - * @param name_in The compuational process for timing - */ - static void tick(const std::string &class_name_in, const std::string &name_in); - - /** - * @brief Start total time calculation - * - */ - static void start(void); - - /** - * @brief Finish total time calculation and - * print computational processes with duration > 0.1 s - * - * @param ofs The output file for print out timings - * @param print_flag Print timings or not - */ - static void finish(std::ofstream &ofs, const bool print_flag = 1); - - /** - * @brief Enable time computation - * - */ - static void enable(void) - { - disabled = false; - } - - /** - * @brief Disable time computation - * - */ - static void disable(void) - { - disabled = true; - } - - /** - * @brief Write all computational processes to json file - * - * @param file_name The output file name - */ - static void write_to_json(std::string file_name); - - /** - * @brief Print all computational processes with during > 0.1 s - * - * @param ofs The output file for print out timings - */ - static void print_all(std::ofstream &ofs); - - /** - * @brief Stop total time calculation, print total time until now, - * and then start total time calculation again - * - * @return long double - */ - static long double print_until_now(void); - - private: - /** - * @brief Member variable: if disabled , timer can't work - * - */ - static bool disabled; - - /** - * @brief Member variable: the index of clocks - * - */ - static size_t n_now; - - /** - * @brief Member function: calculate time - * - * @return double - */ - static double cpu_time(void); -}; - -} // namespace ModuleBase -#endif diff --git a/source/module_base/tool_check.cpp b/source/module_base/tool_check.cpp deleted file mode 100644 index a9450b4fcb..0000000000 --- a/source/module_base/tool_check.cpp +++ /dev/null @@ -1,90 +0,0 @@ -#include "tool_check.h" -#include "tool_quit.h" - -namespace ModuleBase -{ - -void CHECK_NAME(std::ifstream &ifs,const std::string &name_in,bool quit) -{ - std::string name; - ifs >> name; - if ( name != name_in) - { - if(quit) - { - //GlobalV::ofs_warning << "\n name = " <> v_in; - if( v!= v_in) - { - if(quit) - { - std::cout << "\n value = " << v_in; - std::cout << "\n should be = " << v; - WARNING_QUIT("CHECK_INT","Some parameter name is wrong!"); - } - else - { - std::cout <<"\n Can not match well: "<> v_in; - if( fabs(v - v_in) > tiny ) - { - if(quit) - { - std::cout << " read in value = " << v_in << std::endl; - std::cout << " the value should be = " << v << std::endl; - WARNING_QUIT("CHECK_DOUBLE","the name of parameter wrong!"); - } - else - { - std::cout <<" can not match well (1.0e-5): "<< v_in <<"(readin) "<> v_in; - if( v_in != v ) - { - if(quit) - { - std::cout << " read in value = " << v_in << std::endl; - std::cout << " the value should be = " << v << std::endl; - WARNING_QUIT("CHECK_STRING","the name of parameter wrong!"); - } - else - { - std::cout <<" can not match well : "< -#include -#include -#include -#include -#include -#include -#include - -namespace ModuleBase -{ -/** - * @brief Check the next input from ifs is std::string. - * This is a global function. - * - * @param[in] ifs The input file stream - * @param[in] name_in The name for checking - * @param[in] quit Whether call WARNING_QUIT to quit or not - */ -void CHECK_NAME(std::ifstream &ifs, const std::string &name_in, bool quit = true); - -/** - * @brief Check the next input from ifs is integer. - * This is a global function. - * - * @param[in] ifs The input file stream - * @param[in] v The int variable for checking - * @param[in] quit Whether call WARNING_QUIT to quit or not - */ -void CHECK_INT(std::ifstream &ifs, const int &v, bool quit = true); - -/** - * @brief Check the next input from ifs is double. - * This is a global function. - * - * @param[in] ifs The input file stream - * @param[in] v The double variable for checking - * @param[in] quit Whether call WARNING_QUIT to quit or not - */ -void CHECK_DOUBLE(std::ifstream &ifs, const double &v, bool quit = true); - -/** - * @brief Check the next input from ifs is std::string. - * This is a global function. - * - * @param[in] ifs The input file stream - * @param[in] v The std::string variable for checking - * @param[in] quit Whether call WARNING_QUIT to quit or not - */ -void CHECK_STRING(std::ifstream &ifs, const std::string &v, bool quit = true); -} // namespace ModuleBase - -#endif diff --git a/source/module_base/tool_quit.cpp b/source/module_base/tool_quit.cpp deleted file mode 100644 index 6eb48c421a..0000000000 --- a/source/module_base/tool_quit.cpp +++ /dev/null @@ -1,171 +0,0 @@ -#include "tool_quit.h" -#ifdef __MPI -#include "mpi.h" -#endif - -#ifdef __NORMAL - -#else -#include "global_variable.h" -#include "module_parameter/parameter.h" -#include "global_file.h" -#include "timer.h" -#include "memory.h" -#endif - -namespace ModuleBase -{ -//========================================================== -// GLOBAL FUNCTION : -// NAME : WARNING( write information into GlobalV::ofs_warning) -// NAME : QUIT( exit the running program) -// NAME : WARNING_QUIT( write information into -// GlobalV::ofs_warning , and then quit) -//========================================================== -void WARNING(const std::string &file,const std::string &description) -{ -#ifdef __NORMAL - -#else - - if (GlobalV::MY_RANK==0) - { -// std::cout << "\n "< -#include -#include -#include -#include -#include -#include -#include - -namespace ModuleBase -{ - -//========================================================== -// GLOBAL FUNCTION : -// NAME : WARNING( write information into GlobalV::ofs_warning) -// NAME : QUIT( exit the running program) -// NAME : WARNING_QUIT( write information into -// GlobalV::ofs_warning , and then quit) -//========================================================== -/** - * @brief Print out warning information in warning.log file - * - * @param file The file where warning happens - * @param description The warning information - */ -void WARNING(const std::string &file, const std::string &description); - -/** - * @brief Close .log files and exit - * - */ -[[noreturn]] void QUIT(void); - -/** - * @brief Close .log files and exit - * - */ -[[noreturn]] void QUIT(int ret); - -/** - * @brief Combine the functions of WARNING and QUIT - * - * @param file The file where warning happens - * @param description The warning information - */ -[[noreturn]] void WARNING_QUIT(const std::string& file, const std::string& description); - -/** - * @brief Combine the functions of WARNING and QUIT - * - * @param file The file where warning happens - * @param description The warning information - */ -[[noreturn]] void WARNING_QUIT(const std::string& file, const std::string& description, int ret); - -/** - * @brief Check, if true, WARNING_QUIT - * - * @param file The file where warning happens - * @param description The warning information - */ -void CHECK_WARNING_QUIT(const bool error, const std::string &file,const std::string &calculation,const std::string &description); - -} // namespace ModuleBase - -#endif diff --git a/source/module_base/tool_threading.h b/source/module_base/tool_threading.h deleted file mode 100644 index a4f2f33968..0000000000 --- a/source/module_base/tool_threading.h +++ /dev/null @@ -1,108 +0,0 @@ -#ifndef TOOL_THREADING_H -#define TOOL_THREADING_H - -#ifdef _OPENMP -#include -#endif - -#include - -namespace ModuleBase -{ - -//========================================================== -// NAME : TASK_DIST_1D -// Distributing 1d tasks by worker id -//========================================================== -template -inline void TASK_DIST_1D(int nworker, int iworker, T_task ntask, T_out& start, T_out& len) -{ - if (nworker == 1) - { - start = 0; - len = ntask; - } - else - { - const T_task tlen = ntask / nworker; - const T_task trem = ntask - tlen * nworker; - if (iworker < trem) - { - start = tlen * iworker + iworker; - len = tlen + 1; - } - else - { - start = tlen * iworker + trem; - len = tlen; - } - } -} - -template -inline void BLOCK_TASK_DIST_1D(int nworker, int iworker, T_task ntask, T_task block_size, T_out& start, T_out& len) -{ - if (nworker == 1) - { - start = 0; - len = ntask; - } - else - { - const T_task nblock = (ntask + block_size - 1) / block_size; - const T_task blen = nblock / nworker; - const T_task brem = nblock - blen * nworker; - if (iworker < brem) - { - start = blen * iworker + iworker; - len = blen + 1; - } - else - { - start = blen * iworker + brem; - len = blen; - } - start *= block_size; - len *= block_size; - if (start > ntask) - { - start = ntask; - len = 0; - return; - } - if (start + len > ntask) - { - len = ntask - start; - } - } -} - -inline void OMP_PARALLEL(const std::function &f) -{ -#ifdef _OPENMP - #pragma omp parallel - { - f(omp_get_num_threads(), omp_get_thread_num()); - } -#else - f(1, 0); -#endif -} - -inline void TRY_OMP_PARALLEL(const std::function &f) -{ -#ifdef _OPENMP - if (!omp_in_parallel()) - { - OMP_PARALLEL(f); - } - else -#endif - { - f(1, 0); - } -} - -} - -#endif diff --git a/source/module_base/tool_title.cpp b/source/module_base/tool_title.cpp deleted file mode 100644 index 6d2716670e..0000000000 --- a/source/module_base/tool_title.cpp +++ /dev/null @@ -1,58 +0,0 @@ -#include "tool_title.h" - -#ifdef __NORMAL -#else -#include "global_variable.h" -#endif - -#include "global_function.h" -#include "timer.h" - -namespace ModuleBase -{ -//========================================================== -// GLOBAL FUNCTION : -// NAME : TITLE( title for each function ) -//========================================================== - -void TITLE(const std::string &class_name,const std::string &function_name,const bool disable) -{ - if (disable) - { - return; // no output - } -#ifdef __NORMAL - std::cout<<" ==> "< "< "< "< -#include -#include -#include -#include -#include -#include -#include - -namespace ModuleBase -{ - -void TITLE( - const std::string &class_name, - const std::string &function_name = "", -#ifndef __DEBUG - const bool disable=true -#else - const bool disable=false -#endif -); -void TITLE( - std::ofstream &ofs, - const std::string &class_name, - const std::string &function_name, -#ifndef __DEBUG - const bool disable=true -#else - const bool disable=false -#endif -); -} - -#endif diff --git a/source/module_base/vector3.h b/source/module_base/vector3.h deleted file mode 100644 index 3540018ae0..0000000000 --- a/source/module_base/vector3.h +++ /dev/null @@ -1,426 +0,0 @@ -#ifndef VECTOR3_H -#define VECTOR3_H - -#include -#include -#include -#include - -#ifdef _MCD_CHECK -#include "mcd.h" -#endif - -namespace ModuleBase -{ - -/** - * @brief 3 elements vector - * - * @tparam T - */ -template class Vector3 -{ - public: - T x; - T y; - T z; - - /** - * @brief Construct a new Vector 3 object - * - * @param x1 - * @param y1 - * @param z1 - */ - Vector3(const T &x1 = 0, const T &y1 = 0, const T &z1 = 0) : x(x1), y(y1), z(z1){}; - Vector3(const Vector3 &v) : x(v.x), y(v.y), z(v.z){}; // Peize Lin add 2018-07-16 - explicit Vector3(const std::array &v) :x(v[0]), y(v[1]), z(v[2]){} - - template - explicit Vector3(const Vector3& other) : x(static_cast(other.x)), y(static_cast(other.y)), z(static_cast(other.z)) {} - - Vector3(Vector3 &&v) noexcept : x(v.x), y(v.y), z(v.z) {} - - /** - * @brief set a 3d vector - * - * @param x1 - * @param y1 - * @param z1 - */ - void set(const T &x1, const T &y1, const T &z1) - { - x = x1; - y = y1; - z = z1; - } - - /** - * @brief Overload operator "=" for Vector3 - * - * @param u - * @return Vector3& - */ - Vector3 &operator=(const Vector3 &u) - { - x = u.x; - y = u.y; - z = u.z; - return *this; - } - - Vector3 &operator=(const T &u) - { - x = u; - y = u; - z = u; - return *this; - } - - /** - * @brief Overload operator "+=" for Vector3 - * - * @param u - * @return Vector3& - */ - Vector3 &operator+=(const Vector3 &u) - { - x += u.x; - y += u.y; - z += u.z; - return *this; - } - - /** - * @brief Overload operator "-=" for Vector3 - * - * @param u - * @return Vector3& - */ - Vector3 &operator-=(const Vector3 &u) - { - x -= u.x; - y -= u.y; - z -= u.z; - return *this; - } - - /** - * @brief Overload operator "*=" for (Vector3)*scalar - * - * @param s - * @return Vector3& - */ - Vector3 &operator*=(const T &s) - { - x *= s; - y *= s; - z *= s; - return *this; - } - - /** - * @brief Overload operator "/=" for (Vector3)/scalar - * - * @param s - * @return Vector3& - */ - Vector3 &operator/=(const T &s) - { - x /= s; - y /= s; - z /= s; - return *this; - } - - /** - * @brief Overload operator "-" to get (-Vector3) - * - * @return Vector3 - */ - Vector3 operator-() const - { - return Vector3(-x, -y, -z); - } // Peize Lin add 2017-01-10 - - /** - * @brief Over load "[]" for accessing elements with pointers - * - * @param index - * @return T - */ - T operator[](int index) const - { - //return (&x)[index]; // this is undefind behavior and breaks with icpx - T const* ptr[3] = {&x, &y, &z}; - return *ptr[index]; - } - - /** - * @brief Overload operator "[]" for accesing elements - * - * @param index - * @return T& - */ - T &operator[](int index) - { - //return (&x)[index]; // this is undefind behavior and breaks with icpx - T* ptr[3] = {&x, &y, &z}; - return *ptr[index]; - } - - /** - * @brief Get the square of nomr of a Vector3 - * - * @return T - */ - T norm2(void) const - { - return x * x + y * y + z * z; - } - - /** - * @brief Get the norm of a Vector3 - * - * @return T - */ - T norm(void) const - { - return sqrt(norm2()); - } - - /** - * @brief Normalize a Vector3 - * - * @return Vector3& - */ - Vector3 &normalize(void) - { - const T m = norm(); - x /= m; - y /= m; - z /= m; - return *this; - } // Peize Lin update return 2019-09-08 - - /** - * @brief Get (-Vector3) - * - * @return Vector3& - */ - Vector3 &reverse(void) - { - x = -x; - y = -y; - z = -z; - return *this; - } // Peize Lin update return 2019-09-08 - - /** - * @brief Print a Vector3 on standard output - * with formats - * - */ - void print(void) const; // mohan add 2009-11-29 -}; - -/** - * @brief Overload "+" for two Vector3 - * - * @param[in] u - * @param[in] v - * @return Vector3 - */ -template inline Vector3 operator+(const Vector3 &u, const Vector3 &v) -{ - return Vector3(u.x + v.x, u.y + v.y, u.z + v.z); -} - -/** - * @brief Overload "-" for two Vector3 - * - * @param[in] u - * @param[in] v - * @return Vector3 - */ -template inline Vector3 operator-(const Vector3 &u, const Vector3 &v) -{ - return Vector3(u.x - v.x, u.y - v.y, u.z - v.z); -} - -/** - * @brief Overload "*" to calculate the dot product - * of two Vector3 - * - * @param u - * @param v - * @return template - */ -template inline T operator*(const Vector3 &u, const Vector3 &v) -{ - return (u.x * v.x + u.y * v.y + u.z * v.z); -} - -/** - * @brief Overload "*" to calculate (Vector3)*scalar - * - * @param[in] s - * @param[in] u - * @return Vector3 - */ -template inline Vector3 operator*(const T &s, const Vector3 &u) -{ - return Vector3(u.x * s, u.y * s, u.z * s); -} - -/** - * @brief Overload "*" to calculate scalar*(Vector3) - * - * @param u - * @param s - * @return Vector3 - */ -template inline Vector3 operator*(const Vector3 &u, const T &s) -{ - return Vector3(u.x * s, u.y * s, u.z * s); -} // mohan add 2009-5-10 - -/** - * @brief Overload "/" to calculate Vector3/scalar - * - * @tparam T - * @param u - * @param s - * @return Vector3 - */ -template inline Vector3 operator/(const Vector3 &u, const T &s) -{ - return Vector3(u.x / s, u.y / s, u.z / s); -} - -/** - * @brief Overload "/" to calculate scalar/Vector3 - * - * @tparam T - * @param s - * @param u - * @return Vector3 - */ -template inline Vector3 operator/(const T &s, const Vector3 &u) -{ - return Vector3(s/u.x, s/u.y, s/u.z); -} - -/** - * @brief Dot productor of two Vector3 - * - * @param u - * @param v - * @return T - * @note u.v=(ux*vx)+(uy*vy)+(uz*vz) - */ -template inline T dot(const Vector3 &u, const Vector3 &v) -{ - return (u.x * v.x + u.y * v.y + u.z * v.z); -} - -/** - * @brief Overload "^" for cross product of two Vector3 - * - * @param u - * @param v - * @return template - * @note - * | i j k | - * | ux uy uz | - * | vx vy vz | - * u.v=(uy*vz-uz*vy)i+(-ux*vz+uz*vx)j+(ux*vy-uy*vx)k - */ -template inline Vector3 operator^(const Vector3 &u, const Vector3 &v) -{ - return Vector3(u.y * v.z - u.z * v.y, -u.x * v.z + u.z * v.x, u.x * v.y - u.y * v.x); -} - -/** - * @brief Cross product of two Vector3 - * - * @param u - * @param v - * @return template - * @note - * | i j k | - * | ux uy uz | - * | vx vy vz | - * u.v=(uy*vz-uz*vy)i+(-ux*vz+uz*vx)j+(ux*vy-uy*vx)k - */ -template inline Vector3 cross(const Vector3 &u, const Vector3 &v) -{ - return Vector3(u.y * v.z - u.z * v.y, -u.x * v.z + u.z * v.x, u.x * v.y - u.y * v.x); -} -// s = u.(v x w) -// template T TripleScalarProduct(Vector3 u, Vector3 v, Vector3 w) -//{ -// return T((u.x * (v.y * w.z - v.z * w.y)) + -// (u.y * (-v.x * w.z + v.z * w.x)) + -// (u.z * (v.x * w.y - v.y * w.x))); -// } - -// Overload the < operator for sorting -template bool operator<(const Vector3 &u, const Vector3 &v) -{ - if (u.x < v.x) - return true; - if (u.x > v.x) - return false; - if (u.y < v.y) - return true; - if (u.y > v.y) - return false; - if (u.z < v.z) - return true; - return false; -} - -// whether m1 != m2 -template inline bool operator!=(const Vector3 &u, const Vector3 &v) -{ - return !(u == v); -} -// whether u == v -template inline bool operator==(const Vector3 &u, const Vector3 &v) -{ - if (u.x == v.x && u.y == v.y && u.z == v.z) - return true; - return false; -} - -/** - * @brief Print a Vector3 on standard output with formats - * - */ -template void Vector3::print(void) const -{ - std::cout.precision(5); - std::cout << "(" << std::setw(10) << x << "," << std::setw(10) << y << "," << std::setw(10) << z << ")" - << std::endl; - return; -} - -/** - * @brief Overload "<<" tor print out a - * Vector3 on standard output - * - * @tparam T - * @param[in] os - * @param[in] u - * @return std::ostream& - */ -template static std::ostream &operator<<(std::ostream &os, const Vector3 &u) -{ - os << "(" << std::setw(10) << u.x << "," << std::setw(10) << u.y << "," << std::setw(10) << u.z << ")"; - return os; -} - -} // namespace ModuleBase - -#endif diff --git a/source/module_base/ylm.cpp b/source/module_base/ylm.cpp deleted file mode 100644 index a36b14c60a..0000000000 --- a/source/module_base/ylm.cpp +++ /dev/null @@ -1,1878 +0,0 @@ -#include "ylm.h" - -#include -#include - -#include "constants.h" -#include "timer.h" -#include "tool_quit.h" -#include "array_pool.h" - -namespace ModuleBase -{ - -int Ylm::nlm = 0; -std::vector Ylm::ylmcoef = { - 1.0 / sqrt(ModuleBase::FOUR_PI), - sqrt (3.0 / ModuleBase::FOUR_PI), - sqrt (15.0) / 2.0, - sqrt (5.0) / 2.0, - sqrt (5.0), - 1.0 / sqrt(3.0), - sqrt (5.0 / 3.0), - sqrt (35.0 / 9.0), - sqrt (7.0/3.0)/1.5, - sqrt (35.0 / 8.0), - sqrt (7.0 / 8.0), - sqrt (7.0), - 1.0 / sqrt (15.0), - sqrt (14.0 / 15.0), - sqrt (14.0 / 3.0), - sqrt(7.0)*3.0/4.0, - 9.0/4.0/sqrt(5.0), - sqrt(21.0/5.0), - sqrt(24.0/25.0), - sqrt(21.0)/2.0, - sqrt(3.0)/2.0, - 0.5/sqrt(7.0), - 1.5*sqrt(3.0/7.0), - 3.0/sqrt(2.0), - 0.6*sqrt(11.0), - 0.8*sqrt(11.0/7.0), - sqrt (33.0/8.0), - sqrt (55.0/56.0), - sqrt (33.0/7.0), - sqrt (11.0)*2.0/7.0, - sqrt (11.0)*0.75, - sqrt (11.0)*0.25, - sqrt (11.0), - 1.0/3.0/sqrt(5.0), - 2.0/3.0*sqrt(11.0/5.0), - sqrt(22.0/5.0) -}; - -// here Lmax == max angular momentum + 1 -void Ylm::get_ylm_real( const int &Lmax, const ModuleBase::Vector3 &vec, double ylmr[] ) -{ - //ModuleBase::timer::tick ("Ylm","get_ylm_real"); - //1e-9 is too large - const double cut0 = 1e-12; - // allocate space. - Ylm::nlm = Lmax * Lmax; - if(Lmax==1) - { - for(int i=0; i 1.0 - cut0) - { - cost = sgn(cost) * (1.0 - cut0); - // std::cout << "\n" << "cost = " << cost << std::endl; - } - sint = sqrt(1.0 - cost*cost); - - if(vec.x > cut0) - { - phi = std::atan( vec.y / vec.x ); - } - else if( vec.x < -cut0 ) - { - phi = std::atan( vec.y / vec.x ) + ModuleBase::PI; - } - else - { - phi = ModuleBase::PI_HALF * ((vec.y >= 0.0) ? 1.0 : -1.0); - } - - //=============================== - // NAME : p(Legendre Polynomials) - //=============================== - double p[20][20]; - assert(Lmax <= 20); - - int m=0; - double x1=0.0; // x2; - int lm = -1; // must initialized! - - for (int l=0; l(l)) ;//liaochen modify 2009-09-06 - if (l%2 == 1) - { - x1 = -x1; - } - p[l][l] = x1; - } // end if - - // Y_lm, m = 0 - ++lm; - ylmr[lm] = c*p[0][l]; - - for(m=1;m<=l;m++) - { - // Y_lm, m > 0 - const double same = c * sqrt - ( - static_cast( Ylm::Fact(l - m)) / - static_cast( Ylm::Fact(l + m)) - ) - *ModuleBase::SQRT2; - - ++lm; - ylmr[lm] = same * p[m][l] * cos(m * phi); - - // Y_lm, m < 0 - ++lm; - ylmr[lm] = same * p[m][l] * sin(m * phi); - } - }// end do - - //ModuleBase::timer::tick ("Ylm", "get_ylm_real"); - return; -} - -void Ylm::get_ylm_real( const int &Lmax, const ModuleBase::Vector3 &vec, double ylmr[], double dylmdr[][3] ) -{ - //1e-9 is too large - const double cut0 = 1e-12; - // allocate space. - Ylm::nlm = Lmax * Lmax; - if(Lmax==1) - { - for(int i=0; i 1.0-cut0) - { - cost = sgn(cost) * (1.0 - cut0); - } - sint = sqrt(1.0 - cost*cost); - - if(vec.x > cut0) - { - phi = std::atan( vec.y / vec.x ); - } - else if( vec.x < -cut0 ) - { - phi = std::atan( vec.y / vec.x ) + ModuleBase::PI; - } - else - { - phi = ModuleBase::PI_HALF * ((vec.y >= 0.0) ? 1.0 : -1.0); - } - - //=============================== - // NAME : p(Legendre Polynomials) - //=============================== - double p[20][20]; - double dp[20][20]; - assert(Lmax <= 20); - - int m = 0; - int lm = -1; // must initialized! - for (int l=0; l(l)) ; - if (l%2 == 1) - { - p[l][l] = -p[l][l]; - } - } - - for(m=0; m <= l; m++) - { - if( m == l ) - { - dp[l][l] = l * cost * p[l][l] / sint; - } - else - { - dp[m][l] = (l * cost * p[m][l] - (l+m) * p[m][l-1]) / sint; - } - } - - // Y_lm, m = 0 - ++lm; - ylmr[lm] = c*p[0][l]; - - dylmdr[lm][0] = c * dp[0][l] * cost * cos(phi) / vnorm; - dylmdr[lm][1] = c * dp[0][l] * cost * sin(phi) / vnorm; - dylmdr[lm][2] = -c * dp[0][l] * sint / vnorm; - - for(m=1; m <= l; m++) - { - // Y_lm, m > 0 - const double same = c * sqrt - ( - static_cast( Ylm::Fact(l - m)) / - static_cast( Ylm::Fact(l + m)) - ) - *ModuleBase::SQRT2; - - ++lm; - ylmr[lm] = same * p[m][l] * cos(m * phi); - - dylmdr[lm][0] = same * dp[m][l] * cos(m * phi) * cost * cos(phi) / vnorm - + same * p[m][l] * m * sin(m * phi) * sin(phi) / sint / vnorm; - dylmdr[lm][1] = same * dp[m][l] * cos(m * phi) * cost * sin(phi) / vnorm - - same * p[m][l] * m * sin(m * phi) * cos(phi) / sint / vnorm; - dylmdr[lm][2] = -same * dp[m][l] * cos(m * phi) * sint / vnorm; - - // Y_lm, m < 0 - ++lm; - ylmr[lm] = same * p[m][l] * sin(m * phi); - - dylmdr[lm][0] = same * dp[m][l] * sin(m * phi) * cost * cos(phi) / vnorm - - same * p[m][l] * m * cos(m * phi) * sin(phi) / sint / vnorm; - dylmdr[lm][1] = same * dp[m][l] * sin(m * phi) * cost * sin(phi) / vnorm - + same * p[m][l] * m * cos(m * phi) * cos(phi) / sint / vnorm; - dylmdr[lm][2] = -same * dp[m][l] * sin(m * phi) * sint / vnorm; - } - }// end do - - return; -} - -/*************************** - * Solid Spherical Harmonic - * *************************/ -void Ylm::rlylm -( - const int& Lmax, //max momentum of l + 1 - const double& x, - const double& y, - const double& z, - double rly[] -) -{ -// ModuleBase::TITLE("Ylm","rlylm"); -// ModuleBase::timer::tick("Ylm","rlylm"); - - int MaxL = Lmax - 1; - - assert(MaxL >= 0); - - //get xy_dependence - assert(MaxL <= 19); - - double Am[20]; - double Bm[20]; - -// ZEROS(Am, 20); -// ZEROS(Bm, 20); - - double x2, x3, x4, x5; - double y2, y3, y4, y5; - - x2 = x * x; - x3 = x2 * x; - x4 = x3 * x; - x5 = x4 * x; - - y2 = y * y; - y3 = y2 * y; - y4 = y3 * y; - y5 = y4 * y; - - //x-y dependence - //Am - //Bm - for(int im = 0; im < MaxL+1; im++) - { - if(im == 0) - { - Am[0] = 1.0; - Bm[0] = 0.0; - } - else if(im == 1) - { - Am[1] = x; - Bm[1] = y; - } - else if(im == 2) - { - Am[2] = x2- y2; - Bm[2] = 2.0 * x * y; - } - else if(im == 3) - { - Am[3] = x3 - 3.0 * x * y2; - Bm[3] = 3.0 * x2 * y - y3; - } - else if(im == 4) - { - Am[4] = x4 - 6.0 * x2 * y2 + y4; - Bm[4] = 4.0 * (x3 * y - x * y3); - } - else if(im == 5) - { - Am[5] = x5 - 10.0 * x3 * y2 + 5.0 * x * y4; - Bm[5] = 5.0 * x4 * y - 10.0 * x2 * y3 + y5; - } - else - { - for(int ip = 0; ip <= im; ip++) - { - double aux = Fact(im) / Fact(ip) / Fact(im - ip); - Am[im] += aux * pow(x, ip) * pow(y, im-ip) * cos( (im-ip) * ModuleBase::PI / 2.0 ); - Bm[im] += aux * pow(x, ip) * pow(y, im-ip) * sin( (im-ip) * ModuleBase::PI / 2.0 ); - } - } - } - - //z dependence - double zdep[20][20]; - -// for(int il = 0; il < 20; il++) -// { -// ZEROS(zdep[il], 20); -// } - - double z2 = z * z; - double z3 = z2 * z; - double z4 = z3 * z; - //double z5 = z4 * z; - - double r = sqrt(x*x + y*y + z*z); - double r2 = r * r; - double r3 = r2 * r; - double r4 = r3 * r; - - for(int il = 0; il < MaxL+1; il++) - { - if(il == 0) - { - zdep[0][0] = 1.0; - } - else if(il == 1) - { - zdep[1][0] = z; - zdep[1][1] = 1.0; - } - else if(il == 2) - { - zdep[2][0] = 0.5 * (3.0 * z2 - r2); - zdep[2][1] = sqrt(3.0) * z; - zdep[2][2] = sqrt(3.0) * 0.5; - } - else if(il == 3) - { - zdep[3][0] = 2.5 * z3 - 1.5 * z * r2; - zdep[3][1] = 0.25 * sqrt(6.0) * (5.0 * z2 - r2); - zdep[3][2] = 0.5 * sqrt(15.0) * z; - zdep[3][3] = 0.25 * sqrt(10.0); - } - else if(il == 4) - { - zdep[4][0] = 0.125 * (35.0 * z4 - 30.0 * r2 * z2 + 3.0 * r4); - zdep[4][1] = sqrt(10.0) * 0.25 * z * (7.0 * z2 - 3.0 * r2); - zdep[4][2] = sqrt(5.0) * 0.25 * (7.0 * z2 - r2); - zdep[4][3] = sqrt(70.0) * 0.25 * z; - zdep[4][4] = sqrt(35.0) * 0.125; - } - else if(il == 5) - { - zdep[5][0] = 0.125 * z *( 63.0 * z4 - 70.0 * z2 * r2 + 15.0 * r4); - zdep[5][1] = 0.125 * sqrt(15.0) * (21.0 * z4 - 14.0 * z2 * r2 + r4); - zdep[5][2] = 0.25 * sqrt(105.0) * z * (3.0 * z2 - r2); - zdep[5][3] = 0.0625 * sqrt(70.0) * (9.0 * z2 - r2); - zdep[5][4] = 0.375 * sqrt(35.0) * z; - zdep[5][5] = 0.1875 * sqrt(14.0); - } - else - { - for(int im = 0; im <= il; im++) - { - int kmax = static_cast( (il - im) / 2 ); - for(int ik = 0; ik <= kmax; ik++) - { - int twok = 2 * ik; - - double gamma; - double aux0, aux1, aux2, aux3; - - aux0 = pow(-1.0, ik) * pow(2.0, -il); - aux1 = Fact(il) / Fact(ik) / Fact(il-ik); - aux2 = Fact(2*il - twok) / Fact(il) / Fact(il - twok); - aux3 = Fact(il - twok) / Fact(il - twok - im); - - gamma = aux0 * aux1 * aux2 * aux3; - - assert(il - twok - im >= 0); - zdep[il][im] += pow(r, twok) * pow(z, il-twok-im) * gamma; - } - - if(im >= 1) - { - zdep[il][im] *= sqrt(2 * Fact(il - im) / Fact(il + im)); - } - } - } - } - - //calc - int ic = 0; - for(int il = 0; il <= MaxL; il++) - { - double fac = sqrt( (2.0 * il + 1.0) / ModuleBase::FOUR_PI ); - - //m=0 - rly[ic] = Am[0] * zdep[il][0] * fac; - - ic++; - - //m ! = 0 - for(int im = 1; im <= il; im++) - { - //m>0 - rly[ic] = Am[im] * zdep[il][im] * pow(-1.0, im) * fac; - - ic++; - - //m<0 - rly[ic] = Bm[im] * zdep[il][im] * pow(-1.0, im) * fac; - - ic++; - } - } - -// ModuleBase::timer::tick("Ylm", "rlylm"); - return; -} - -//return ylm, not rlylm -void Ylm::sph_harm -( - const int& Lmax, //max momentum of l - const double& xdr, - const double& ydr, - const double& zdr, - std::vector &rly -) -{ - rly.resize( (Lmax+1)*(Lmax+1) ); - - //begin calculation - /*************************** - L = 0 - ***************************/ - rly[0] = Ylm::ylmcoef[0]; //l=0, m=0 - if (Lmax == 0) return; - - /*************************** - L = 1 - ***************************/ - rly[1] = Ylm::ylmcoef[1]*zdr; //l=1, m=0 - rly[2] = -Ylm::ylmcoef[1]*xdr; //l=1, m=1 - rly[3] = -Ylm::ylmcoef[1]*ydr; //l=1, m=-1 - if (Lmax == 1) return; - - /*************************** - L = 2 - ***************************/ - rly[4] = Ylm::ylmcoef[2]*zdr*rly[1]-Ylm::ylmcoef[3]*rly[0];//l=2, m=0 - - double tmp0 = Ylm::ylmcoef[4]*zdr; - rly[5] = tmp0*rly[2];//l=2,m=1 - rly[6] = tmp0*rly[3];//l=2,m=-1 - - double tmp2 = Ylm::ylmcoef[4]*xdr; - rly[7]= Ylm::ylmcoef[5]*rly[4]-Ylm::ylmcoef[6]*rly[0] - tmp2*rly[2];//l=2,m=2 - rly[8] = -tmp2*rly[3]; -// rly[8] = tmp1+tmp2*rly[3];//l=2,m=-2 - if (Lmax == 2) return; - - /*************************** - L = 3 - ***************************/ - rly[9] = Ylm::ylmcoef[7]*zdr*rly[4]-Ylm::ylmcoef[8]*rly[1]; //l=3, m=0 - - double tmp3 = Ylm::ylmcoef[9]*zdr; - rly[10] = tmp3*rly[5]-Ylm::ylmcoef[10]*rly[2];//l=3,m=1 - rly[11] = tmp3*rly[6]-Ylm::ylmcoef[10]*rly[3];//l=3,m=-1 - - double tmp4 = Ylm::ylmcoef[11]*zdr; - rly[12] = tmp4*rly[7];//l=3,m=2 - rly[13] = tmp4*rly[8];//l=3,m=-2 - - double tmp5 = Ylm::ylmcoef[14]*xdr; - rly[14] = Ylm::ylmcoef[12]*rly[10]-Ylm::ylmcoef[13]*rly[2]-tmp5*rly[7];//l=3,m=3 - rly[15] = Ylm::ylmcoef[12]*rly[11]-Ylm::ylmcoef[13]*rly[3]-tmp5*rly[8];//l=3,m=-3 - if (Lmax == 3) return; - - /*************************** - L = 4 - ***************************/ - rly[16] = Ylm::ylmcoef[15]*zdr*rly[9]-Ylm::ylmcoef[16]*rly[4];//l=4,m=0 - - double tmp6 = Ylm::ylmcoef[17]*zdr; - rly[17] = tmp6*rly[10]-Ylm::ylmcoef[18]*rly[5];//l=4,m=1 - rly[18] = tmp6*rly[11]-Ylm::ylmcoef[18]*rly[6];//l=4,m=-1 - - double tmp7 = Ylm::ylmcoef[19]*zdr; - rly[19] = tmp7*rly[12]-Ylm::ylmcoef[20]*rly[7];//l=4,m=2 - rly[20] = tmp7*rly[13]-Ylm::ylmcoef[20]*rly[8];//l=4,m=-2 - - double tmp8 = 3.0*zdr; - rly[21] = tmp8*rly[14];//l=4,m=3 - rly[22] = tmp8*rly[15];//l=4,m=-3 - - double tmp9 = Ylm::ylmcoef[23]*xdr; - rly[23] = Ylm::ylmcoef[21]*rly[19]-Ylm::ylmcoef[22]*rly[7]-tmp9*rly[14];//l=4,m=4 - rly[24] = Ylm::ylmcoef[21]*rly[20]-Ylm::ylmcoef[22]*rly[8]-tmp9*rly[15];//l=4,m=-4 - if (Lmax == 4) return; - - /*************************** - L = 5 - ***************************/ - rly[25] = Ylm::ylmcoef[24]*zdr*rly[16]-Ylm::ylmcoef[25]*rly[9];//l=5,m=0 - - double tmp10 = Ylm::ylmcoef[26]*zdr; - rly[26] = tmp10*rly[17]-Ylm::ylmcoef[27]*rly[10];//l=5,m=1 - rly[27] = tmp10*rly[18]-Ylm::ylmcoef[27]*rly[11];//l=5,m=-1 - - double tmp11 = Ylm::ylmcoef[28]*zdr; - rly[28] = tmp11*rly[19]-Ylm::ylmcoef[29]*rly[12];//l=5,m=2 - rly[29] = tmp11*rly[20]-Ylm::ylmcoef[29]*rly[13];//l=5,m=-2 - - double tmp12 = Ylm::ylmcoef[30]*zdr; - rly[30] = tmp12*rly[21]-Ylm::ylmcoef[31]*rly[14];//l=5,m=3 - rly[31] = tmp12*rly[22]-Ylm::ylmcoef[31]*rly[15];//l=5,m=-3 - - double tmp13 = Ylm::ylmcoef[32]*zdr; - rly[32] = tmp13*rly[23];//l=5,m=4 - rly[33] = tmp13*rly[24];//l=5,m=-4 - - double tmp14 = Ylm::ylmcoef[35]*xdr; - rly[34] = Ylm::ylmcoef[33]*rly[30]-Ylm::ylmcoef[34]*rly[14]-tmp14*rly[23];//l=5,m=5 - rly[35] = Ylm::ylmcoef[33]*rly[31]-Ylm::ylmcoef[34]*rly[15]-tmp14*rly[24];//l=5,m=-5 - if (Lmax == 5) return; - - //if Lmax > 5 - for (int il = 6; il <= Lmax; il++) - { - int istart = il*il; - int istart1 = (il-1)*(il-1); - int istart2 = (il-2)*(il-2); - - double fac2 = sqrt(4.0*istart-1.0); - double fac4 = sqrt(4.0*istart1-1.0); - - for (int im = 0; im < 2*il-1; im++) - { - int imm = (im+1)/2; -// if (im % 2 == 0) imm *= -1; - - rly[istart+im] = fac2/sqrt((double)istart-imm*imm)* - (zdr*rly[istart1+im] - sqrt((double)istart1-imm*imm)/fac4*rly[istart2+im]); - } - - double bl1 = sqrt(2.0*il/(2.0*il+1.0)); - double bl2 = sqrt((2.0*il-2.0)/(2.0*il-1.0)); - double bl3 = sqrt(2.0)/fac2; - - rly[istart+2*il-1] = (bl3*rly[istart+2*il-5]-bl2*rly[istart2+2*il-5]-2.0*xdr*rly[istart1+2*il-3]) / bl1; - rly[istart+2*il] = (bl3*rly[istart+2*il-4]-bl2*rly[istart2+2*il-4]-2.0*xdr*rly[istart1+2*il-2]) / bl1; - } - - - return; -} - -// Peize Lin change rly 2016-08-26 -void Ylm::rl_sph_harm -( - const int& Lmax, //max momentum of L - const double& x, - const double& y, - const double& z, - std::vector& rly -) -{ - rly.resize( (Lmax+1)*(Lmax+1) ); - - double radius2 = x*x+y*y+z*z; - - //begin calculation - /*************************** - L = 0 - ***************************/ - rly[0] = Ylm::ylmcoef[0]; //l=0, m=0 - if (Lmax == 0) return; - - /*************************** - L = 1 - ***************************/ - rly[1] = Ylm::ylmcoef[1]*z; //l=1, m=0 - rly[2] = -Ylm::ylmcoef[1]*x; //l=1, m=1 - rly[3] = -Ylm::ylmcoef[1]*y; //l=1, m=-1 - if (Lmax == 1) return; - - /*************************** - L = 2 - ***************************/ - rly[4] = Ylm::ylmcoef[2]*z*rly[1]-Ylm::ylmcoef[3]*rly[0]*radius2;//l=2, m=0 - - double tmp0 = Ylm::ylmcoef[4]*z; - rly[5] = tmp0*rly[2];//l=2,m=1 - rly[6] = tmp0*rly[3];//l=2,m=-1 - - double tmp2 = Ylm::ylmcoef[4]*x; - rly[7]= Ylm::ylmcoef[5]*rly[4]-Ylm::ylmcoef[6]*rly[0]*radius2 - tmp2*rly[2];//l=2,m=2 - rly[8] = -tmp2*rly[3]; -// rly[8] = tmp1+tmp2*rly[3];//l=2,m=-2 - if (Lmax == 2) return; - - /*************************** - L = 3 - ***************************/ - rly[9] = Ylm::ylmcoef[7]*z*rly[4]-Ylm::ylmcoef[8]*rly[1]*radius2; //l=3, m=0 - - double tmp3 = Ylm::ylmcoef[9]*z; - rly[10] = tmp3*rly[5]-Ylm::ylmcoef[10]*rly[2]*radius2;//l=3,m=1 - rly[11] = tmp3*rly[6]-Ylm::ylmcoef[10]*rly[3]*radius2;//l=3,m=-1 - - double tmp4 = Ylm::ylmcoef[11]*z; - rly[12] = tmp4*rly[7];//l=3,m=2 - rly[13] = tmp4*rly[8];//l=3,m=-2 - - double tmp5 = Ylm::ylmcoef[14]*x; - rly[14] = Ylm::ylmcoef[12]*rly[10]-Ylm::ylmcoef[13]*rly[2]*radius2-tmp5*rly[7];//l=3,m=3 - rly[15] = Ylm::ylmcoef[12]*rly[11]-Ylm::ylmcoef[13]*rly[3]*radius2-tmp5*rly[8];//l=3,m=-3 - if (Lmax == 3) return; - - /*************************** - L = 4 - ***************************/ - rly[16] = Ylm::ylmcoef[15]*z*rly[9]-Ylm::ylmcoef[16]*rly[4]*radius2;//l=4,m=0 - - double tmp6 = Ylm::ylmcoef[17]*z; - rly[17] = tmp6*rly[10]-Ylm::ylmcoef[18]*rly[5]*radius2;//l=4,m=1 - rly[18] = tmp6*rly[11]-Ylm::ylmcoef[18]*rly[6]*radius2;//l=4,m=-1 - - double tmp7 = Ylm::ylmcoef[19]*z; - rly[19] = tmp7*rly[12]-Ylm::ylmcoef[20]*rly[7]*radius2;//l=4,m=2 - rly[20] = tmp7*rly[13]-Ylm::ylmcoef[20]*rly[8]*radius2;//l=4,m=-2 - - double tmp8 = 3.0*z; - rly[21] = tmp8*rly[14];//l=4,m=3 - rly[22] = tmp8*rly[15];//l=4,m=-3 - - double tmp9 = Ylm::ylmcoef[23]*x; - rly[23] = Ylm::ylmcoef[21]*rly[19]-Ylm::ylmcoef[22]*rly[7]*radius2-tmp9*rly[14];//l=4,m=4 - rly[24] = Ylm::ylmcoef[21]*rly[20]-Ylm::ylmcoef[22]*rly[8]*radius2-tmp9*rly[15];//l=4,m=-4 - if (Lmax == 4) return; - - /*************************** - L = 5 - ***************************/ - rly[25] = Ylm::ylmcoef[24]*z*rly[16]-Ylm::ylmcoef[25]*rly[9]*radius2;//l=5,m=0 - - double tmp10 = Ylm::ylmcoef[26]*z; - rly[26] = tmp10*rly[17]-Ylm::ylmcoef[27]*rly[10]*radius2;//l=5,m=1 - rly[27] = tmp10*rly[18]-Ylm::ylmcoef[27]*rly[11]*radius2;//l=5,m=-1 - - double tmp11 = Ylm::ylmcoef[28]*z; - rly[28] = tmp11*rly[19]-Ylm::ylmcoef[29]*rly[12]*radius2;//l=5,m=2 - rly[29] = tmp11*rly[20]-Ylm::ylmcoef[29]*rly[13]*radius2;//l=5,m=-2 - - double tmp12 = Ylm::ylmcoef[30]*z; - rly[30] = tmp12*rly[21]-Ylm::ylmcoef[31]*rly[14]*radius2;//l=5,m=3 - rly[31] = tmp12*rly[22]-Ylm::ylmcoef[31]*rly[15]*radius2;//l=5,m=-3 - - double tmp13 = Ylm::ylmcoef[32]*z; - rly[32] = tmp13*rly[23];//l=5,m=4 - rly[33] = tmp13*rly[24];//l=5,m=-4 - - double tmp14 = Ylm::ylmcoef[35]*x; - rly[34] = Ylm::ylmcoef[33]*rly[30]-Ylm::ylmcoef[34]*rly[14]*radius2-tmp14*rly[23];//l=5,m=5 - rly[35] = Ylm::ylmcoef[33]*rly[31]-Ylm::ylmcoef[34]*rly[15]*radius2-tmp14*rly[24];//l=5,m=-5 - if (Lmax == 5) return; - - //if Lmax > 5 - for (int il = 6; il <= Lmax; il++) - { - int istart = il*il; - int istart1 = (il-1)*(il-1); - int istart2 = (il-2)*(il-2); - - double fac2 = sqrt(4.0*istart-1); - double fac4 = sqrt(4.0*istart1-1); - - for (int im = 0; im < 2*il-1; im++) - { - int imm = (im+1)/2; -// if (im % 2 == 0) imm *= -1; - - rly[istart+im] = fac2/sqrt((double)istart-imm*imm)* - (z*rly[istart1+im] - sqrt((double)istart1-imm*imm)/fac4*rly[istart2+im]*radius2); - } - - double bl1 = sqrt(2.0*il/(2.0*il+1.0)); - double bl2 = sqrt((2.0*il-2.0)/(2.0*il-1.0)); - double bl3 = sqrt(2.0)/fac2; - - rly[istart+2*il-1] = (bl3*rly[istart+2*il-5]-bl2*rly[istart2+2*il-5]*radius2-2.0*x*rly[istart1+2*il-3]) / bl1; - rly[istart+2*il] = (bl3*rly[istart+2*il-4]-bl2*rly[istart2+2*il-4]*radius2-2.0*x*rly[istart1+2*il-2]) / bl1; - } - - return; -} - -void Ylm::grad_rl_sph_harm -( - const int& Lmax, //max momentum of L - const double& x, - const double& y, - const double& z, - double* rly, - double** grly -) -{ - double radius2 = x*x+y*y+z*z; - double tx = 2.0*x; - double ty = 2.0*y; - double tz = 2.0*z; - - //begin calculation - /*************************** - L = 0 - ***************************/ - rly[0] = Ylm::ylmcoef[0]; //l=0, m=0 - grly[0][0] = grly[0][1] = grly[0][2] = 0.0; - if (Lmax == 0) return; - - /*************************** - L = 1 - ***************************/ - rly[1] = Ylm::ylmcoef[1]*z; //l=1, m=0 - grly[1][0] = grly[1][1] = 0.0; - grly[1][2] = Ylm::ylmcoef[1]; - - rly[2] = -Ylm::ylmcoef[1]*x; //l=1, m=1 - grly[2][1] = grly[2][2] = 0.0; - grly[2][0] = -Ylm::ylmcoef[1]; - - rly[3] = -Ylm::ylmcoef[1]*y; //l=1, m=-1 - grly[3][0] = grly[3][2] = 0.0; - grly[3][1] = -Ylm::ylmcoef[1]; - - if (Lmax == 1) return; - - /*************************** - L = 2 - ***************************/ - rly[4] = Ylm::ylmcoef[2]*z*rly[1]-Ylm::ylmcoef[3]*rly[0]*radius2;//l=2, m=0 - grly[4][0] = Ylm::ylmcoef[2]*z*grly[1][0]-Ylm::ylmcoef[3]*(grly[0][0]*radius2+rly[0]*tx);//l=2, m=0 - grly[4][1] = Ylm::ylmcoef[2]*z*grly[1][1]-Ylm::ylmcoef[3]*(grly[0][1]*radius2+rly[0]*ty);//l=2, m=0 - grly[4][2] = Ylm::ylmcoef[2]*(z*grly[1][2]+rly[1])-Ylm::ylmcoef[3]*(grly[0][2]*radius2+rly[0]*tz);//l=2, m=0 - - - double tmp0 = Ylm::ylmcoef[4]*z; - rly[5] = tmp0*rly[2];//l=2,m=1 - grly[5][0] = tmp0*grly[2][0]; - grly[5][1] = tmp0*grly[2][1]; - grly[5][2] = Ylm::ylmcoef[4]*(rly[2]+z*grly[2][2]); - - rly[6] = tmp0*rly[3];//l=2,m=-1 - grly[6][0] = tmp0*grly[3][0]; - grly[6][1] = tmp0*grly[3][1]; - grly[6][2] = Ylm::ylmcoef[4]*(rly[3]+z*grly[3][2]); - - double tmp2 = Ylm::ylmcoef[4]*x; - rly[7]= Ylm::ylmcoef[5]*rly[4]-Ylm::ylmcoef[6]*rly[0]*radius2 - tmp2*rly[2];//l=2,m=2 - grly[7][0] = Ylm::ylmcoef[5]*grly[4][0]-Ylm::ylmcoef[6]*(rly[0]*tx+grly[0][0]*radius2)-Ylm::ylmcoef[4]*(x*grly[2][0]+rly[2]); - -// std::cout << "\np1 = "<< Ylm::ylmcoef[5]*grly[4][0] << " p2 = " << -Ylm::ylmcoef[6]*rly[0]*tx -// << " p3 = " << -Ylm::ylmcoef[4]*x*grly[2][0] << " p4 = " << -Ylm::ylmcoef[4]*rly[2] << std::endl; - - grly[7][1] = Ylm::ylmcoef[5]*grly[4][1]-Ylm::ylmcoef[6]*(rly[0]*ty+grly[0][1]*radius2)-tmp2*grly[2][1]; - grly[7][2] = Ylm::ylmcoef[5]*grly[4][2]-Ylm::ylmcoef[6]*(rly[0]*tz+grly[0][2]*radius2)-tmp2*grly[2][2]; - - rly[8] = -tmp2*rly[3]; - grly[8][0] = -Ylm::ylmcoef[4]*(rly[3]+x*grly[3][0]); - grly[8][1] = -tmp2*grly[3][1]; - grly[8][2] = -tmp2*grly[3][2]; -// rly[8] = tmp1+tmp2*rly[3];//l=2,m=-2 - if (Lmax == 2) return; - - /*************************** - L = 3 - ***************************/ - rly[9] = Ylm::ylmcoef[7]*z*rly[4]-Ylm::ylmcoef[8]*rly[1]*radius2; //l=3, m=0 - grly[9][0] = Ylm::ylmcoef[7]*z*grly[4][0]-Ylm::ylmcoef[8]*(rly[1]*tx+grly[1][0]*radius2); - grly[9][1] = Ylm::ylmcoef[7]*z*grly[4][1]-Ylm::ylmcoef[8]*(rly[1]*ty+grly[1][1]*radius2); - grly[9][2] = Ylm::ylmcoef[7]*(rly[4]+z*grly[4][2])-Ylm::ylmcoef[8]*(rly[1]*tz+grly[1][2]*radius2); - - double tmp3 = Ylm::ylmcoef[9]*z; - rly[10] = tmp3*rly[5]-Ylm::ylmcoef[10]*rly[2]*radius2;//l=3,m=1 - grly[10][0] = tmp3*grly[5][0]-Ylm::ylmcoef[10]*(grly[2][0]*radius2+rly[2]*tx); - grly[10][1] = tmp3*grly[5][1]-Ylm::ylmcoef[10]*(grly[2][1]*radius2+rly[2]*ty); - grly[10][2] = Ylm::ylmcoef[9]*(z*grly[5][2]+rly[5])-Ylm::ylmcoef[10]*(grly[2][2]*radius2+rly[2]*tz); - - rly[11] = tmp3*rly[6]-Ylm::ylmcoef[10]*rly[3]*radius2;//l=3,m=-1 - grly[11][0] = tmp3*grly[6][0]-Ylm::ylmcoef[10]*(grly[3][0]*radius2+rly[3]*tx); - grly[11][1] = tmp3*grly[6][1]-Ylm::ylmcoef[10]*(grly[3][1]*radius2+rly[3]*ty); - grly[11][2] = Ylm::ylmcoef[9]*(z*grly[6][2]+rly[6])-Ylm::ylmcoef[10]*(grly[3][2]*radius2+rly[3]*tz); - - double tmp4 = Ylm::ylmcoef[11]*z; - rly[12] = tmp4*rly[7];//l=3,m=2 - grly[12][0] = tmp4*grly[7][0]; - grly[12][1] = tmp4*grly[7][1]; - grly[12][2] = Ylm::ylmcoef[11]*(z*grly[7][2]+rly[7]); - - rly[13] = tmp4*rly[8];//l=3,m=-2 - grly[13][0] = tmp4*grly[8][0]; - grly[13][1] = tmp4*grly[8][1]; - grly[13][2] = Ylm::ylmcoef[11]*(z*grly[8][2]+rly[8]); - - double tmp5 = Ylm::ylmcoef[14]*x; - rly[14] = Ylm::ylmcoef[12]*rly[10]-Ylm::ylmcoef[13]*rly[2]*radius2-tmp5*rly[7];//l=3,m=3 - grly[14][0] = Ylm::ylmcoef[12]*grly[10][0]-Ylm::ylmcoef[13]*(rly[2]*tx+grly[2][0]*radius2)-Ylm::ylmcoef[14]*(rly[7]+x*grly[7][0]); - grly[14][1] = Ylm::ylmcoef[12]*grly[10][1]-Ylm::ylmcoef[13]*(rly[2]*ty+grly[2][1]*radius2)-tmp5*grly[7][1]; - grly[14][2] = Ylm::ylmcoef[12]*grly[10][2]-Ylm::ylmcoef[13]*(rly[2]*tz+grly[2][2]*radius2)-tmp5*grly[7][2]; - - rly[15] = Ylm::ylmcoef[12]*rly[11]-Ylm::ylmcoef[13]*rly[3]*radius2-tmp5*rly[8];//l=3,m=-3 - grly[15][0] = Ylm::ylmcoef[12]*grly[11][0]-Ylm::ylmcoef[13]*(rly[3]*tx+grly[3][0]*radius2)-Ylm::ylmcoef[14]*(rly[8]+x*grly[8][0]); - grly[15][1] = Ylm::ylmcoef[12]*grly[11][1]-Ylm::ylmcoef[13]*(rly[3]*ty+grly[3][1]*radius2)-tmp5*grly[8][1]; - grly[15][2] = Ylm::ylmcoef[12]*grly[11][2]-Ylm::ylmcoef[13]*(rly[3]*tz+grly[3][2]*radius2)-tmp5*grly[8][2]; - if (Lmax == 3) return; - - /*************************** - L = 4 - ***************************/ - rly[16] = Ylm::ylmcoef[15]*z*rly[9]-Ylm::ylmcoef[16]*rly[4]*radius2;//l=4,m=0 - grly[16][0] = Ylm::ylmcoef[15]*z*grly[9][0]-Ylm::ylmcoef[16]*(rly[4]*tx+grly[4][0]*radius2); - grly[16][1] = Ylm::ylmcoef[15]*z*grly[9][1]-Ylm::ylmcoef[16]*(rly[4]*ty+grly[4][1]*radius2); - grly[16][2] = Ylm::ylmcoef[15]*(z*grly[9][2]+rly[9])-Ylm::ylmcoef[16]*(rly[4]*tz+grly[4][2]*radius2); - - double tmp6 = Ylm::ylmcoef[17]*z; - rly[17] = tmp6*rly[10]-Ylm::ylmcoef[18]*rly[5]*radius2;//l=4,m=1 - grly[17][0] = tmp6*grly[10][0]-Ylm::ylmcoef[18]*(rly[5]*tx+grly[5][0]*radius2); - grly[17][1] = tmp6*grly[10][1]-Ylm::ylmcoef[18]*(rly[5]*ty+grly[5][1]*radius2); - grly[17][2] = Ylm::ylmcoef[17]*(z*grly[10][2]+rly[10])-Ylm::ylmcoef[18]*(rly[5]*tz+grly[5][2]*radius2); - - rly[18] = tmp6*rly[11]-Ylm::ylmcoef[18]*rly[6]*radius2;//l=4,m=-1 - grly[18][0] = tmp6*grly[11][0]-Ylm::ylmcoef[18]*(rly[6]*tx+grly[6][0]*radius2); - grly[18][1] = tmp6*grly[11][1]-Ylm::ylmcoef[18]*(rly[6]*ty+grly[6][1]*radius2); - grly[18][2] = Ylm::ylmcoef[17]*(z*grly[11][2]+rly[11])-Ylm::ylmcoef[18]*(rly[6]*tz+grly[6][2]*radius2); - - double tmp7 = Ylm::ylmcoef[19]*z; - rly[19] = tmp7*rly[12]-Ylm::ylmcoef[20]*rly[7]*radius2;//l=4,m=2 - grly[19][0] = tmp7*grly[12][0]-Ylm::ylmcoef[20]*(rly[7]*tx+grly[7][0]*radius2); - grly[19][1] = tmp7*grly[12][1]-Ylm::ylmcoef[20]*(rly[7]*ty+grly[7][1]*radius2); - grly[19][2] = Ylm::ylmcoef[19]*(z*grly[12][2]+rly[12])-Ylm::ylmcoef[20]*(rly[7]*tz+grly[7][2]*radius2); - - rly[20] = tmp7*rly[13]-Ylm::ylmcoef[20]*rly[8]*radius2;//l=4,m=-2 - grly[20][0] = tmp7*grly[13][0]-Ylm::ylmcoef[20]*(rly[8]*tx+grly[8][0]*radius2); - grly[20][1] = tmp7*grly[13][1]-Ylm::ylmcoef[20]*(rly[8]*ty+grly[8][1]*radius2); - grly[20][2] = Ylm::ylmcoef[19]*(z*grly[13][2]+rly[13])-Ylm::ylmcoef[20]*(rly[8]*tz+grly[8][2]*radius2); - - double tmp8 = 3.0*z; - rly[21] = tmp8*rly[14];//l=4,m=3 - grly[21][0] = tmp8*grly[14][0]; - grly[21][1] = tmp8*grly[14][1]; - grly[21][2] = 3.0*(z*grly[14][2]+rly[14]); - - - rly[22] = tmp8*rly[15];//l=4,m=-3 - grly[22][0] = tmp8*grly[15][0]; - grly[22][1] = tmp8*grly[15][1]; - grly[22][2] = 3.0*(z*grly[15][2]+rly[15]); - - double tmp9 = Ylm::ylmcoef[23]*x; - rly[23] = Ylm::ylmcoef[21]*rly[19]-Ylm::ylmcoef[22]*rly[7]*radius2-tmp9*rly[14];//l=4,m=4 - grly[23][0] = Ylm::ylmcoef[21]*grly[19][0]-Ylm::ylmcoef[22]*(rly[7]*tx+grly[7][0]*radius2)-Ylm::ylmcoef[23]*(x*grly[14][0]+rly[14]); - grly[23][1] = Ylm::ylmcoef[21]*grly[19][1]-Ylm::ylmcoef[22]*(rly[7]*ty+grly[7][1]*radius2)-tmp9*grly[14][1]; - grly[23][2] = Ylm::ylmcoef[21]*grly[19][2]-Ylm::ylmcoef[22]*(rly[7]*tz+grly[7][2]*radius2)-tmp9*grly[14][2]; - - rly[24] = Ylm::ylmcoef[21]*rly[20]-Ylm::ylmcoef[22]*rly[8]*radius2-tmp9*rly[15];//l=4,m=-4 - grly[24][0] = Ylm::ylmcoef[21]*grly[20][0]-Ylm::ylmcoef[22]*(rly[8]*tx+grly[8][0]*radius2)-Ylm::ylmcoef[23]*(x*grly[15][0]+rly[15]); - grly[24][1] = Ylm::ylmcoef[21]*grly[20][1]-Ylm::ylmcoef[22]*(rly[8]*ty+grly[8][1]*radius2)-tmp9*grly[15][1]; - grly[24][2] = Ylm::ylmcoef[21]*grly[20][2]-Ylm::ylmcoef[22]*(rly[8]*tz+grly[8][2]*radius2)-tmp9*grly[15][2]; - - if (Lmax == 4) return; - - /*************************** - L = 5 - ***************************/ - rly[25] = Ylm::ylmcoef[24]*z*rly[16]-Ylm::ylmcoef[25]*rly[9]*radius2;//l=5,m=0 - grly[25][0] = Ylm::ylmcoef[24]*z*grly[16][0]-Ylm::ylmcoef[25]*(rly[9]*tx+grly[9][0]*radius2); - grly[25][1] = Ylm::ylmcoef[24]*z*grly[16][1]-Ylm::ylmcoef[25]*(rly[9]*ty+grly[9][1]*radius2); - grly[25][2] = Ylm::ylmcoef[24]*(z*grly[16][2]+rly[16])-Ylm::ylmcoef[25]*(rly[9]*tz+grly[9][2]*radius2); - - double tmp10 = Ylm::ylmcoef[26]*z; - rly[26] = tmp10*rly[17]-Ylm::ylmcoef[27]*rly[10]*radius2;//l=5,m=1 - grly[26][0] = tmp10*grly[17][0]-Ylm::ylmcoef[27]*(rly[10]*tx+grly[10][0]*radius2); - grly[26][1] = tmp10*grly[17][1]-Ylm::ylmcoef[27]*(rly[10]*ty+grly[10][1]*radius2); - grly[26][2] = Ylm::ylmcoef[26]*(z*grly[17][2]+rly[17])-Ylm::ylmcoef[27]*(rly[10]*tz+grly[10][2]*radius2); - - rly[27] = tmp10*rly[18]-Ylm::ylmcoef[27]*rly[11]*radius2;//l=5,m=-1 - grly[27][0] = tmp10*grly[18][0]-Ylm::ylmcoef[27]*(rly[11]*tx+grly[11][0]*radius2); - grly[27][1] = tmp10*grly[18][1]-Ylm::ylmcoef[27]*(rly[11]*ty+grly[11][1]*radius2); - grly[27][2] = Ylm::ylmcoef[26]*(z*grly[18][2]+rly[18])-Ylm::ylmcoef[27]*(rly[11]*tz+grly[11][2]*radius2); - - double tmp11 = Ylm::ylmcoef[28]*z; - rly[28] = tmp11*rly[19]-Ylm::ylmcoef[29]*rly[12]*radius2;//l=5,m=2 - grly[28][0] = tmp11*grly[19][0]-Ylm::ylmcoef[29]*(rly[12]*tx+grly[12][0]*radius2); - grly[28][1] = tmp11*grly[19][1]-Ylm::ylmcoef[29]*(rly[12]*ty+grly[12][1]*radius2); - grly[28][2] = Ylm::ylmcoef[28]*(z*grly[19][2]+rly[19])-Ylm::ylmcoef[29]*(rly[12]*tz+grly[12][2]*radius2); - - rly[29] = tmp11*rly[20]-Ylm::ylmcoef[29]*rly[13]*radius2;//l=5,m=-2 - grly[29][0] = tmp11*grly[20][0]-Ylm::ylmcoef[29]*(rly[13]*tx+grly[13][0]*radius2); - grly[29][1] = tmp11*grly[20][1]-Ylm::ylmcoef[29]*(rly[13]*ty+grly[13][1]*radius2); - grly[29][2] = Ylm::ylmcoef[28]*(z*grly[20][2]+rly[20])-Ylm::ylmcoef[29]*(rly[13]*tz+grly[13][2]*radius2); - - double tmp12 = Ylm::ylmcoef[30]*z; - rly[30] = tmp12*rly[21]-Ylm::ylmcoef[31]*rly[14]*radius2;//l=5,m=3 - grly[30][0] = tmp12*grly[21][0]-Ylm::ylmcoef[31]*(grly[14][0]*radius2+rly[14]*tx); - grly[30][1] = tmp12*grly[21][1]-Ylm::ylmcoef[31]*(grly[14][1]*radius2+rly[14]*ty); - grly[30][2] = Ylm::ylmcoef[30]*(z*grly[21][2]+rly[21])-Ylm::ylmcoef[31]*(grly[14][2]*radius2+rly[14]*tz); - - rly[31] = tmp12*rly[22]-Ylm::ylmcoef[31]*rly[15]*radius2;//l=5,m=-3 - grly[31][0] = tmp12*grly[22][0]-Ylm::ylmcoef[31]*(grly[15][0]*radius2+rly[15]*tx); - grly[31][1] = tmp12*grly[22][1]-Ylm::ylmcoef[31]*(grly[15][1]*radius2+rly[15]*ty); - grly[31][2] = Ylm::ylmcoef[30]*(z*grly[22][2]+rly[22])-Ylm::ylmcoef[31]*(grly[15][2]*radius2+rly[15]*tz); - - double tmp13 = Ylm::ylmcoef[32]*z; - rly[32] = tmp13*rly[23];//l=5,m=4 - grly[32][0] = tmp13*grly[23][0]; - grly[32][1] = tmp13*grly[23][1]; - grly[32][2] = Ylm::ylmcoef[32]*(rly[23]+z*grly[23][2]); - - rly[33] = tmp13*rly[24];//l=5,m=-4 - grly[33][0] = tmp13*grly[24][0]; - grly[33][1] = tmp13*grly[24][1]; - grly[33][2] = Ylm::ylmcoef[32]*(rly[24]+z*grly[24][2]); - - double tmp14 = Ylm::ylmcoef[35]*x; - rly[34] = Ylm::ylmcoef[33]*rly[30]-Ylm::ylmcoef[34]*rly[14]*radius2-tmp14*rly[23];//l=5,m=5 - grly[34][0] = Ylm::ylmcoef[33]*grly[30][0]-Ylm::ylmcoef[34]*(rly[14]*tx+grly[14][0]*radius2)-Ylm::ylmcoef[35]*(x*grly[23][0]+rly[23]); - grly[34][1] = Ylm::ylmcoef[33]*grly[30][1]-Ylm::ylmcoef[34]*(rly[14]*ty+grly[14][1]*radius2)-tmp14*grly[23][1]; - grly[34][2] = Ylm::ylmcoef[33]*grly[30][2]-Ylm::ylmcoef[34]*(rly[14]*tz+grly[14][2]*radius2)-tmp14*grly[23][2]; - - rly[35] = Ylm::ylmcoef[33]*rly[31]-Ylm::ylmcoef[34]*rly[15]*radius2-tmp14*rly[24];//l=5,m=-5 - grly[35][0] = Ylm::ylmcoef[33]*grly[31][0]-Ylm::ylmcoef[34]*(rly[15]*tx+grly[15][0]*radius2)-Ylm::ylmcoef[35]*(x*grly[24][0]+rly[24]); - grly[35][1] = Ylm::ylmcoef[33]*grly[31][1]-Ylm::ylmcoef[34]*(rly[15]*ty+grly[15][1]*radius2)-tmp14*grly[24][1]; - grly[35][2] = Ylm::ylmcoef[33]*grly[31][2]-Ylm::ylmcoef[34]*(rly[15]*tz+grly[15][2]*radius2)-tmp14*grly[24][2]; - - if (Lmax == 5) return; - - //if Lmax > 5 - for (int il = 6; il <= Lmax; il++) - { - int istart = il*il; - int istart1 = (il-1)*(il-1); - int istart2 = (il-2)*(il-2); - - double fac2 = sqrt(4.0*istart-1.0); - double fac4 = sqrt(4.0*istart1-1.0); - - for (int im = 0; im < 2*il-1; im++) - { - int imm = (im+1)/2; -// if (im % 2 == 0) imm *= -1; - - double var1 = fac2/sqrt((double)istart-imm*imm); - double var2 = sqrt((double)istart1-imm*imm)/fac4; - - rly[istart+im] = var1*(z*rly[istart1+im] - var2*rly[istart2+im]*radius2); - - grly[istart+im][0]=var1*(z*grly[istart1+im][0]-var2*(rly[istart2+im]*tx+grly[istart2+im][0]*radius2)); - grly[istart+im][1]=var1*(z*grly[istart1+im][1]-var2*(rly[istart2+im]*ty+grly[istart2+im][1]*radius2)); - grly[istart+im][2]=var1*(z*grly[istart1+im][2]+rly[istart1+im]-var2*(rly[istart2+im]*tz+grly[istart2+im][2]*radius2)); - - } - - double bl1 = sqrt(2.0*il/(2.0*il+1.0)); - double bl2 = sqrt((2.0*il-2.0)/(2.0*il-1.0)); - double bl3 = sqrt(2.0)/fac2; - - int id1 = istart+2*il-1; - int id2 = istart+2*il-5; - int id3 = istart2+2*il-5; - int id4 = istart1+2*il-3; - - rly[id1] = (bl3*rly[id2]-bl2*rly[id3]*radius2-2.0*x*rly[id4]) / bl1; - grly[id1][0] = (bl3*grly[id2][0]-bl2*(grly[id3][0]*radius2+rly[id3]*tx)-2.0*(rly[id4]+x*grly[id4][0]))/bl1; - grly[id1][1] = (bl3*grly[id2][1]-bl2*(grly[id3][1]*radius2+rly[id3]*ty)-2.0*x*grly[id4][1])/bl1; - grly[id1][2] = (bl3*grly[id2][2]-bl2*(grly[id3][2]*radius2+rly[id3]*tz)-2.0*x*grly[id4][2])/bl1; - - - rly[id1+1] = (bl3*rly[id2+1]-bl2*rly[id3+1]*radius2-2.0*x*rly[id4+1]) / bl1; - grly[id1+1][0] = (bl3*grly[id2+1][0]-bl2*(grly[id3+1][0]*radius2+rly[id3+1]*tx)-2.0*(rly[id4+1]+x*grly[id4+1][0]))/bl1; - grly[id1+1][1] = (bl3*grly[id2+1][1]-bl2*(grly[id3+1][1]*radius2+rly[id3+1]*ty)-2.0*x*grly[id4+1][1])/bl1; - grly[id1+1][2] = (bl3*grly[id2+1][2]-bl2*(grly[id3+1][2]*radius2+rly[id3+1]*tz)-2.0*x*grly[id4+1][2])/bl1; - } - - - return; -} - -void Ylm::hes_rl_sph_harm -( - const int& Lmax, //max momentum of L - const double& x, - const double& y, - const double& z, - std::vector>& hrly -) -{ - hrly.resize( (Lmax+1)*(Lmax+1), std::vector(6) ); - - double radius2 = x*x+y*y+z*z; - double coeff; - - //begin calculation - /*************************** - L = 0 - ***************************/ - hrly[0][0] = hrly[0][1] = hrly[0][2] = 0.0; - hrly[0][3] = hrly[0][4] = hrly[0][5] = 0.0; - if (Lmax == 0) return; - - /*************************** - L = 1 - ***************************/ - hrly[1][0] = hrly[1][1] = hrly[1][2] = 0.0; - hrly[1][3] = hrly[1][4] = hrly[1][5] = 0.0; - - hrly[2][0] = hrly[2][1] = hrly[2][2] = 0.0; - hrly[2][3] = hrly[2][4] = hrly[2][5] = 0.0; - - hrly[3][0] = hrly[3][1] = hrly[3][2] = 0.0; - hrly[3][3] = hrly[3][4] = hrly[3][5] = 0.0; - - if (Lmax == 1) return; - - /*************************** - L = 2 - ***************************/ - //m=0 : 3z^2-r^2 - coeff = sqrt(5.0 / ModuleBase::PI) / 4.0; - hrly[4][0] = hrly[4][3] = -2.0 * coeff; - hrly[4][5] = 4.0 * coeff; - hrly[4][1] = hrly[4][2] = hrly[4][4] = 0.0; - - //m=1 : xz - coeff = sqrt(15.0 / ModuleBase::PI) / 2.0; - hrly[5][2] = coeff; - hrly[5][0] = hrly[5][1] = 0.0; - hrly[5][3] = hrly[5][4] = hrly[5][5] = 0.0; - - //m=-1 : yz - hrly[6][4] = coeff; - hrly[6][0] = hrly[6][1] = 0.0; - hrly[6][2] = hrly[6][3] = hrly[6][5] = 0.0; - - //m=-2 : xy - hrly[8][1] = coeff; - hrly[8][0] = hrly[8][2] = 0.0; - hrly[8][3] = hrly[8][4] = hrly[8][5] = 0.0; - - //m=2 : (x^2-y^2) - coeff = sqrt(15.0 / ModuleBase::PI) / 4.0; - hrly[7][0] = 2.0 * coeff; - hrly[7][3] = -2.0 * coeff; - hrly[7][1] = hrly[7][2] = 0.0; - hrly[7][4] = hrly[7][5] = 0.0; - - if (Lmax == 2) return; - - /*************************** - L = 3 - ***************************/ - //m=0 : (5z^3-3zr^2) - coeff = sqrt(7.0 / ModuleBase::PI) / 4.0; - hrly[9][0] = hrly[9][3] = -6.0 * z * coeff; - hrly[9][1] = 0.0; - hrly[9][2] = -6.0 * x * coeff; - hrly[9][4] = -6.0 * y * coeff; - hrly[9][5] = 12.0 * z * coeff; - - //m=1 : x(5z^2-r^2) - coeff = sqrt(21.0 / 2.0 / ModuleBase::PI) / 4.0; - hrly[10][0] = -6.0 * x * coeff; - hrly[10][1] = -2.0 * y * coeff; - hrly[10][2] = 8.0 * z * coeff; - hrly[10][3] = -2.0 * x * coeff; - hrly[10][4] = 0.0; - hrly[10][5] = 8.0 * x * coeff; - - //m=-1 : y(5z^2-r^2) - hrly[11][0] = -2.0 * y * coeff; - hrly[11][1] = -2.0 * x * coeff; - hrly[11][2] = 0.0; - hrly[11][3] = -6.0 * y * coeff; - hrly[11][4] = 8.0 * z * coeff; - hrly[11][5] = 8.0 * y * coeff; - - //m=2 : (x^2-y^2)z - coeff = sqrt(105.0 / ModuleBase::PI) / 4.0; - hrly[12][0] = 2.0 * z * coeff; - hrly[12][1] = 0.0; - hrly[12][2] = 2.0 * x * coeff; - hrly[12][3] = -hrly[12][0]; - hrly[12][4] = -2.0 * y * coeff; - hrly[12][5] = 0.0; - - //m=-2 : xyz - coeff = sqrt(105.0 / ModuleBase::PI) / 2.0; - hrly[13][0] = 0.0; - hrly[13][1] = z * coeff; - hrly[13][2] = y * coeff; - hrly[13][3] = 0.0; - hrly[13][4] = x * coeff; - hrly[13][5] = 0.0; - - //m=3 : x(x^2-3y^2) - coeff = sqrt(35.0 / 2.0 / ModuleBase::PI) / 4.0; - hrly[14][0] = 6.0 * x * coeff; - hrly[14][1] = -6.0 * y * coeff; - hrly[14][2] = 0.0; - hrly[14][3] = -hrly[14][0]; - hrly[14][4] = 0.0; - hrly[14][5] = 0.0; - - //m=-3 : y(3x^2-y^2) - hrly[15][0] = 6.0 * y * coeff; - hrly[15][1] = 6.0 * x * coeff; - hrly[15][2] = 0.0; - hrly[15][3] = -hrly[15][0]; - hrly[15][4] = 0.0; - hrly[15][5] = 0.0; - - if (Lmax == 3) return; - - /*************************** - L = 4 - ***************************/ - //m=0 : (35z^4 - 30z^2r^2 + 3r^4) - coeff = sqrt(1.0 / ModuleBase::PI) * 3.0 / 16.0; - hrly[16][0] = 12.0 * (3.0 * x*x + y*y - 4.0 * z*z) * coeff; - hrly[16][1] = 24.0 * x * y * coeff; - hrly[16][2] = -96.0 * x * z * coeff; - hrly[16][3] = 12.0 * (x*x + 3.0 * y*y - 4.0 * z*z) * coeff; - hrly[16][4] = -96.0 * y * z * coeff; - hrly[16][5] = -48.0 * (x*x + y*y -2.0 * z*z) * coeff; - - //m=1 : x(7z^3 - 3zr^2) - coeff = 3.0 / 4.0 * sqrt(5.0 / 2.0 / ModuleBase::PI); - hrly[17][0] = -18.0 * x * z * coeff; - hrly[17][1] = -6.0 * y * z * coeff; - hrly[17][2] = -3.0 * (3.0 * x*x + y*y - 4.0 * z*z) * coeff; - hrly[17][3] = -6.0 * x * z * coeff; - hrly[17][4] = -6.0 * x * y * coeff; - hrly[17][5] = 24.0 * x * z * coeff; - - //m=-1 : y(7z^3 - 3zr^2) - hrly[18][0] = -6.0 * y * z * coeff; - hrly[18][1] = -6.0 * x * z * coeff; - hrly[18][2] = -6.0 * x * y * coeff; - hrly[18][3] = -18.0 * y * z * coeff; - hrly[18][4] = -3.0 * (x*x + 3.0 * y*y - 4.0 * z*z) * coeff; - hrly[18][5] = 24.0 * y * z * coeff; - - //m=2 : (x^2 - y^2)(7z^2 - r^2) - coeff = 3.0 / 8.0 * sqrt(5.0 / ModuleBase::PI); - hrly[19][0] = -12.0 * (x*x - z*z) * coeff; - hrly[19][1] = 0.0; - hrly[19][2] = 24.0 * x * z * coeff; - hrly[19][3] = 12.0 * (y*y - z*z) * coeff; - hrly[19][4] = -24.0 * y * z * coeff; - hrly[19][5] = 12.0 * (x*x - y*y) * coeff; - - //m=-2 : xy(7z^2 - r^2) - coeff = 3.0 / 4.0 * sqrt(5.0 / ModuleBase::PI); - hrly[20][0] = -6.0 * x * y * coeff; - hrly[20][1] = -3.0 * (x*x + y*y - 2.0 * z*z) * coeff; - hrly[20][2] = 2.0 * y * z * coeff; - hrly[20][3] = hrly[20][0]; - hrly[20][4] = 12.0 * x * z * coeff; - hrly[20][5] = 12.0 * x * y * coeff; - - //m=3 : x(x^2-3y^2)z - coeff = 3.0 / 4.0 * sqrt(35.0 / 2.0 / ModuleBase::PI); - hrly[21][0] = 6.0 * x * z * coeff; - hrly[21][1] = -6.0 * y * z * coeff; - hrly[21][2] = 3.0 * (x*x - y*y) * coeff; - hrly[21][3] = -6.0 * x * z * coeff; - hrly[21][4] = -6.0 * x * y * coeff; - hrly[21][5] = 0.0; - - //m=-3 : y(3x^2-y^2)z - hrly[22][0] = 6.0 * y * z * coeff; - hrly[22][1] = 6.0 * x * z * coeff; - hrly[22][2] = 6.0 * x * y * coeff; - hrly[22][3] = -6.0 * y * z * coeff; - hrly[22][4] = 3.0 * (x*x - y*y) * coeff; - hrly[22][5] = 0.0; - - //m=4 : x^4 + y^4 - 6 x^2y^2 - coeff = 3.0 / 16.0 * sqrt(35.0 / ModuleBase::PI); - hrly[23][0] = 12.0 * (x*x - y*y) * coeff; - hrly[23][1] = -24.0 * x * y * coeff; - hrly[23][2] = 0.0; - hrly[23][3] = -hrly[23][0]; - hrly[23][4] = 0.0; - hrly[23][5] = 0.0; - - //m=-4 : xy(x^2 - y^2) - coeff = 3.0 / 4.0 * sqrt(35.0 / ModuleBase::PI); - hrly[24][0] = 6.0 * x * y * coeff; - hrly[24][1] = 3.0 * (x*x - y*y) * coeff; - hrly[24][2] = 0.0; - hrly[24][3] = -hrly[24][0]; - hrly[24][4] = 0.0; - hrly[24][5] = 0.0; - - if (Lmax == 4) return; - - /*************************** - L > 4 - ***************************/ - ModuleBase::WARNING_QUIT("hes_rl_sph_harm","l>4 not implemented!"); - - - return; -} -void Ylm::set_coefficients (){}; -/* -void Ylm::test1 (void) -{ - ModuleBase::Vector3 R (20.0, 0.0, 0.0); - double xdr = R.x/R.norm(); - double ydr = R.y/R.norm(); - double zdr = R.z/R.norm(); - const int L = 9; - const double rl = std::pow( R.norm(), L); - std::cout << " rl=" << rl << std::endl; - Ylm::set_coefficients(); - - int nu = 100; - - // Peize Lin change rlya 2016-08-26 - std::vector rlya; - double rlyb[400]; - ZEROS( rlyb, 400); - -// Ylm::sph_harm (9, xdr, ydr, zdr, rlya); - Ylm::rl_sph_harm (L, xdr, ydr, zdr, rlya); -// Ylm::rlylm (10, R.x, R.y, R.z, rlyb); - Ylm::get_ylm_real (L+1, R, rlyb); - - for (int i=0; i < nu; i++) - { - // std::cout << "\ni= " << i << " rlya = " << rlya[i] << " rlyb = " << rlyb[i] << std::endl; - double diff = fabs(rlya[i]-rlyb[i]); - if (diff > 1e-8) - { - std::cout << "Ylm::test1, error is too large!" << std::endl; - //WARNING_QUIT ("Ylm::test1","error is too large!"); - exit(0); - } - } - return; -} -*/ -/* -void Ylm::test2 (void) -{ - ModuleBase::Vector3 R (0.1,-0.2,0.5); - Ylm::set_coefficients(); - - //int nu = 100; - - std::vector rlya; - double rlyb[400]; - - std::vector> grlya; - double grlyb[400][3]; - - Ylm::grad_rl_sph_harm (9, R.x, R.y, R.z, rlya, grlya); - Ylm::rlylm (10, R.x, R.y, R.z, rlyb, grlyb); - - for (int i = 0; i < 100; i++) - { - double diffx = fabs(grlya[i][2]-grlyb[i][2]); - if (diffx > 1e-8) - { - std::cout << "Ylm::test2, Large error in Direv X!" << std::endl; - //WARNING_QUIT ("Ylm::test2","Large error in Direv X!"); - exit(0); - } - } - return; -} -*/ - -void Ylm::rlylm -( - const int& Lmax, //max momentum of l + 1 - const double& x, - const double& y, - const double& z, - double rly[], - double grly[][3] -) -{ - int MaxL = Lmax - 1; - - assert(MaxL >= 0); - - //get xy_dependence - assert(MaxL <= 19); - - double Am[20]; - double Bm[20]; - double Gx_Am[20]; - double Gx_Bm[20]; - double Gy_Am[20]; - double Gy_Bm[20]; - - ZEROS(Am, 20); - ZEROS(Bm, 20); - ZEROS(Gx_Am, 20); - ZEROS(Gy_Am, 20); - - double x2, x3, x4, x5; - double y2, y3, y4, y5; - - x2 = x * x; - x3 = x2 * x; - x4 = x3 * x; - x5 = x4 * x; - - y2 = y * y; - y3 = y2 * y; - y4 = y3 * y; - y5 = y4 * y; - - //x-y dependence - //Am - //Bm - for(int im = 0; im < MaxL+1; im++) - { - if(im == 0) - { - Am[0] = 1.0; - Bm[0] = 0.0; - - Gx_Am[0] = 0.0; - Gy_Am[0] = 0.0; - - Gx_Bm[0] = 0.0; - Gy_Bm[0] = 0.0; - } - else if(im == 1) - { - Am[1] = x; - Bm[1] = y; - - Gx_Am[1] = 1.0; - Gy_Am[1] = 0.0; - - Gx_Bm[1] = 0.0; - Gy_Bm[1] = 1.0; - } - else if(im == 2) - { - Am[2] = x2- y2; - Bm[2] = 2.0 * x * y; - - Gx_Am[2] = 2.0 * x; - Gy_Am[2] = -2.0 * y; - - Gx_Bm[2] = 2.0 * y; - Gy_Bm[2] = 2.0 * x; - } - else if(im == 3) - { - Am[3] = x3 - 3.0 * x * y2; - Bm[3] = 3.0 * x2 * y - y3; - - Gx_Am[3] = 3.0 * (x2 - y2); - Gy_Am[3] = -6.0 * x * y; - - Gx_Bm[3] = 6.0 * x * y; - Gy_Bm[3] = 3.0 * (x2 - y2); - } - else if(im == 4) - { - Am[4] = x4 - 6.0 * x2 * y2 + y4; - Bm[4] = 4.0 * (x3 * y - x * y3); - - Gx_Am[4] = 4.0 * x3 - 12.0 * x * y2; - Gy_Am[4] = -12.0 * x2 * y + 4.0 * y3; - - Gx_Bm[4] = 12.0 * x2 * y - 4.0 * y3; - Gy_Bm[4] = 4.0 * x3 - 12.0 * x * y2; - } - else if(im == 5) - { - Am[5] = x5 - 10.0 * x3 * y2 + 5.0 * x * y4; - Bm[5] = 5.0 * x4 * y - 10.0 * x2 * y3 + y5; - - Gx_Am[5] = 5.0 * x4 - 30.0 * x2 * y2 + 5.0 * y4; - Gy_Am[5] = 20.0 * (x * y3 - x3 * y); - - Gx_Bm[5] = 20.0 * (x3 * y - x * y3); - Gy_Bm[5] = 5.0 * x4 - 30.0 * x2 * y2 + 5.0 * y4; - } - else - { - for(int ip = 0; ip <= im; ip++) - { - double aux = Fact(im) / Fact(ip) / Fact(im - ip); - Am[im] += aux * pow(x, ip) * pow(y, im-ip) * cos( (im-ip) * ModuleBase::PI / 2.0 ); - Bm[im] += aux * pow(x, ip) * pow(y, im-ip) * sin( (im-ip) * ModuleBase::PI / 2.0 ); - - if(ip > 0) - { - Gx_Am[im] += aux * ip * pow(x, ip-1) * pow(y, im-ip) * cos( (im-ip) * ModuleBase::PI / 2.0 ); - Gx_Bm[im] += aux * ip * pow(x, ip-1) * pow(y, im-ip) * sin( (im-ip) * ModuleBase::PI / 2.0 ); - } - - if(ip < im) - { - Gy_Am[im] += aux * pow(x, ip) * (im - ip) * pow(y, im-ip-1) * cos( (im-ip) * ModuleBase::PI / 2.0 ); - Gy_Bm[im] += aux * pow(x, ip) * (im - ip) * pow(y, im-ip-1) * sin( (im-ip) * ModuleBase::PI / 2.0 ); - } - } - } - } - - //z dependence - double zdep[20][20]; - double Gx_dep[20][20]; - double Gy_dep[20][20]; - double Gz_dep[20][20]; - - for(int il = 0; il < 20; il++) - { - ZEROS(zdep[il], 20); - ZEROS(Gx_dep[il], 20); - ZEROS(Gy_dep[il], 20); - ZEROS(Gz_dep[il], 20); - } - - double z2 = z * z; - double z3 = z2 * z; - double z4 = z3 * z; - //double z5 = z4 * z; - - double r = sqrt(x*x + y*y + z*z); - double r2 = r * r; - double r3 = r2 * r; - double r4 = r3 * r; - - for(int il = 0; il < MaxL+1; il++) - { - if(il == 0) - { - zdep[0][0] = 1.0; - } - else if(il == 1) - { - zdep[1][0] = z; - zdep[1][1] = 1.0; - - Gz_dep[1][0] = 1.0; - } - else if(il == 2) - { - zdep[2][0] = 0.5 * (3.0 * z2 - r2); - Gx_dep[2][0] = -x; - Gy_dep[2][0] = -y; - Gz_dep[2][0] = 2.0 * z; - - zdep[2][1] = sqrt(3.0) * z; - Gz_dep[2][1] = sqrt(3.0); - - zdep[2][2] = sqrt(3.0) * 0.5; - } - else if(il == 3) - { - zdep[3][0] = 2.5 * z3 - 1.5 * z * r2; - Gx_dep[3][0] = -3.0 * x * z; - Gy_dep[3][0] = -3.0 * y * z; - Gz_dep[3][0] = 1.5 * (3.0 * z2 - r2); - - zdep[3][1] = 0.25 * sqrt(6.0) * (5.0 * z2 - r2); - Gx_dep[3][1] = -0.5 * sqrt(6.0) * x; - Gy_dep[3][1] = -0.5 * sqrt(6.0) * y; - Gz_dep[3][1] = sqrt(6.0) * 2.0 * z; - - zdep[3][2] = 0.5 * sqrt(15.0) * z; - Gz_dep[3][2] = 0.5 * sqrt(15.0); - - zdep[3][3] = 0.25 * sqrt(10.0); - } - else if(il == 4) - { - zdep[4][0] = 0.125 * (35.0 * z4 - 30.0 * r2 * z2 + 3.0 * r4); - Gx_dep[4][0] = -7.5 * x * z2 + 1.5 * x * r2; - Gy_dep[4][0] = -7.5 * y * z2 + 1.5 * y * r2; - Gz_dep[4][0] = 10.0 * z3 - 6.0 * r2 * z; - - zdep[4][1] = sqrt(10.0) * 0.25 * z * (7.0 * z2 - 3.0 * r2); - Gx_dep[4][1] = -1.5 * sqrt(10.0) * x * z; - Gy_dep[4][1] = -1.5 * sqrt(10.0) * y * z; - Gz_dep[4][1] = 0.75 * sqrt(10.0) * (5.0 * z2 - r2); - - zdep[4][2] = sqrt(5.0) * 0.25 * (7.0 * z2 - r2); - Gx_dep[4][2] = -0.5 * sqrt(5.0) * x; - Gy_dep[4][2] = -0.5 * sqrt(5.0) * y; - Gz_dep[4][2] = 3.0 * sqrt(5.0) * z; - - zdep[4][3] = sqrt(70.0) * 0.25 * z; - Gz_dep[4][3] = 0.25 * sqrt(70.0); - - zdep[4][4] = sqrt(35.0) * 0.125; - } - else if(il == 5) - { - zdep[5][0] = 0.125 * z *( 63.0 * z4 - 70.0 * z2 * r2 + 15.0 * r4); - Gx_dep[5][0] = -17.5 * x * z3 + 7.5 * x * z * r2; - Gy_dep[5][0] = -17.5 * y * z3 + 7.5 * y * z * r2; - Gz_dep[5][0] = 175.0 * 0.125 * z4 + 15.0 * 0.125 * r4 - 150.0 * 0.125 * r2 * z2; - - zdep[5][1] = 0.125 * sqrt(15.0) * (21.0 * z4 - 14.0 * z2 * r2 + r4); - Gx_dep[5][1] = -3.5 * sqrt(15.0) * x * z2 + 0.5 * sqrt(15.0) * x * r2; - Gy_dep[5][1] = -3.5 * sqrt(15.0) * y * z2 + 0.5 * sqrt(15.0) * y * r2; - Gz_dep[5][1] = 7.0 * sqrt(15.0) * z3 - 3.0 * sqrt(15.0) * r2 * z; - - zdep[5][2] = 0.25 * sqrt(105.0) * z * (3.0 * z2 - r2); - Gx_dep[5][2] = -0.5 * sqrt(105.0) * x * z; - Gy_dep[5][2] = -0.5 * sqrt(105.0) * y * z; - Gz_dep[5][2] = 0.25 * sqrt(105.0) * (7.0 * z2 - r2); - - zdep[5][3] = 0.0625 * sqrt(70.0) * (9.0 * z2 - r2); - Gx_dep[5][3] = -0.125 * sqrt(70.0) * x; - Gy_dep[5][3] = -0.125 * sqrt(70.0) * y; - Gz_dep[5][3] = sqrt(70.0) * z; - - zdep[5][4] = 0.375 * sqrt(35.0) * z; - Gz_dep[5][4] = 0.375 * sqrt(35.0); - - zdep[5][5] = 0.1875 * sqrt(14.0); - } - else - { - for(int im = 0; im <= il; im++) - { - int kmax = static_cast( (il - im) / 2 ); - for(int ik = 0; ik <= kmax; ik++) - { - int twok = 2 * ik; - - double gamma; - double aux0, aux1, aux2, aux3; - - aux0 = pow(-1.0, ik) * pow(2.0, -il); - aux1 = Fact(il) / Fact(ik) / Fact(il-ik); - aux2 = Fact(2*il - twok) / Fact(il) / Fact(il - twok); - aux3 = Fact(il - twok) / Fact(il - twok - im); - - gamma = aux0 * aux1 * aux2 * aux3; - - assert(il - twok - im >= 0); - zdep[il][im] += pow(r, twok) * pow(z, il-twok-im) * gamma; - - if(ik > 0) - { - Gx_dep[il][im] += (ik * pow(r2, ik-1) * 2.0 * x) * pow(z, il-twok-im) * gamma; - Gy_dep[il][im] += (ik * pow(r2, ik-1) * 2.0 * y) * pow(z, il-twok-im) * gamma; - } - - if(ik == 0) - { - if(il > im) - { - Gz_dep[il][im] += (il-im) * pow(z, il-im-1) * gamma; - } - } - else - { - if(il - twok - im == 0) - { - Gz_dep[il][im] += gamma * ik * pow(r2, ik-1) * 2.0 * z; - } - else - { - Gz_dep[il][im] += gamma * (ik * pow(r2, ik-1) * 2.0 * z * pow(z, il-twok-im) - + pow(r, twok) * (il-twok-im) * pow(z, il-twok-im-1)); - } - } - } - - if(im >= 1) - { - zdep[il][im] *= sqrt(2 * Fact(il - im) / Fact(il + im)); - Gx_dep[il][im] *= sqrt(2 * Fact(il - im) / Fact(il + im)); - Gy_dep[il][im] *= sqrt(2 * Fact(il - im) / Fact(il + im)); - Gz_dep[il][im] *= sqrt(2 * Fact(il - im) / Fact(il + im)); - - } - } - } - } - - //calc - int ic = 0; - for(int il = 0; il <= MaxL; il++) - { - double fac = sqrt( (2.0 * il + 1.0) / ModuleBase::FOUR_PI ); - - //m=0 - rly[ic] = Am[0] * zdep[il][0] * fac; - grly[ic][0] = (Gx_dep[il][0] * Am[0] + zdep[il][0] * Gx_Am[0]) * fac; - grly[ic][1] = (Gy_dep[il][0] * Am[0] + zdep[il][0] * Gy_Am[0]) * fac; - grly[ic][2] = Gz_dep[il][0] * Am[0] * fac; - - ic++; - - //m ! = 0 - for(int im = 1; im <= il; im++) - { - //m>0 - rly[ic] = Am[im] * zdep[il][im] * pow(-1.0, im) * fac; - grly[ic][0] = (Gx_dep[il][im] * Am[im] + zdep[il][im] * Gx_Am[im]) * pow(-1.0, im) * fac; - grly[ic][1] = (Gy_dep[il][im] * Am[im] + zdep[il][im] * Gy_Am[im]) * pow(-1.0, im) * fac; - grly[ic][2] = Gz_dep[il][im] * Am[im] * pow(-1.0, im) * fac; - - ic++; - - //m<0 - rly[ic] = Bm[im] * zdep[il][im] * pow(-1.0, im) * fac; - grly[ic][0] = (Gx_dep[il][im] * Bm[im] + zdep[il][im] * Gx_Bm[im]) * pow(-1.0, im) * fac; - grly[ic][1] = (Gy_dep[il][im] * Bm[im] + zdep[il][im] * Gy_Bm[im]) * pow(-1.0, im) * fac; - grly[ic][2] = Gz_dep[il][im] * Bm[im] * pow(-1.0, im) * fac; - - ic++; - } - } - - return; -} - -/* -void Ylm::test(void) -{ - ModuleBase::Vector3 R(0.0, 0.0, 1.0); - - double r,r2,r3,r4,r5,r6,r7; - r = R.norm(); - r2 = r * r; - r3 = r2 * r; - r4 = r3 * r; - r5 = r4 * r; - r6 = r5 * r; - r7 = r6 * r; - - //Max L = 7; - double ylm[64]; - double dylmdr[64][3]; - - double rly[64]; - double grly[64][3]; -// std::cout << R.x << " " << R.y << " " << R.z << std::endl; - get_ylm_real(8, R, ylm, dylmdr); - rlylm(8, R.x, R.y, R.z, rly, grly); - -// std::cout << R.x << " " << R.y << " " << R.z << std::endl; - for(int i = 0; i < 64; i++) - { - if(i >= 1 && i <= 3) - { - dylmdr[i][0] = dylmdr[i][0] * r + ylm[i] * R.x / r; - dylmdr[i][1] = dylmdr[i][1] * r + ylm[i] * R.y / r; - dylmdr[i][2] = dylmdr[i][2] * r + ylm[i] * R.z / r; - - ylm[i] *= r; - } - if(i >= 4 && i <= 8) - { - dylmdr[i][0] = dylmdr[i][0] * r2 + ylm[i] * R.x * 2.0; - dylmdr[i][1] = dylmdr[i][1] * r2 + ylm[i] * R.y * 2.0; - dylmdr[i][2] = dylmdr[i][2] * r2 + ylm[i] * R.z * 2.0; - - ylm[i] *= r2; - } - if(i >= 9 && i <= 15) - { - dylmdr[i][0] = dylmdr[i][0] * r3 + ylm[i] * R.x * 3.0 * r; - dylmdr[i][1] = dylmdr[i][1] * r3 + ylm[i] * R.y * 3.0 * r; - dylmdr[i][2] = dylmdr[i][2] * r3 + ylm[i] * R.z * 3.0 * r; - - ylm[i] *= pow(R.norm(),3); - } - if(i >= 16 && i <=24) - { - dylmdr[i][0] = dylmdr[i][0] * r4 + ylm[i] * R.x * 4.0 * r2; - dylmdr[i][1] = dylmdr[i][1] * r4 + ylm[i] * R.y * 4.0 * r2; - dylmdr[i][2] = dylmdr[i][2] * r4 + ylm[i] * R.z * 4.0 * r2; - - ylm[i] *= pow(R.norm(), 4); - } - if(i >= 25 && i <= 35) - { - dylmdr[i][0] = dylmdr[i][0] * r5 + ylm[i] * R.x * 5.0 * r3; - dylmdr[i][1] = dylmdr[i][1] * r5 + ylm[i] * R.y * 5.0 * r3; - dylmdr[i][2] = dylmdr[i][2] * r5 + ylm[i] * R.z * 5.0 * r3; - - ylm[i] *= pow(R.norm(), 5); - } - if(i >= 36 && i <= 48) - { - dylmdr[i][0] = dylmdr[i][0] * r6 + ylm[i] * R.x * 6.0 * r4; - dylmdr[i][1] = dylmdr[i][1] * r6 + ylm[i] * R.y * 6.0 * r4; - dylmdr[i][2] = dylmdr[i][2] * r6 + ylm[i] * R.z * 6.0 * r4; - ylm[i] *= pow(R.norm(), 6); - } - if(i >= 49 && i <= 63) - { - dylmdr[i][0] = dylmdr[i][0] * r7 + ylm[i] * R.x * 7.0 * r5; - dylmdr[i][1] = dylmdr[i][1] * r7 + ylm[i] * R.y * 7.0 * r5; - dylmdr[i][2] = dylmdr[i][2] * r7 + ylm[i] * R.z * 7.0 * r5; - ylm[i] *= pow(R.norm(), 7); - } - - std::cout << grly[i][0] << std::setw(20) << grly[i][1] << std::setw(20) << grly[i][2] << std::endl; - } - - return; -} -*/ - -void Ylm::ZEROS(double u[], const int& n) -{ - for(int i = 0; i < n; i++) - { - u[i] = 0.0; - } - return; -} - - -//========================================================== -// MEMBER FUNCTION : -// NAME : Fact ( n! ) -// NAME : Semi_Fact ( n!! ) -//========================================================== -long double Ylm::Fact(const int n) -{ - long double f = 1; - for(int i=n; i>1; i--) - { - f *= i; - } - return f; -} - - -int Ylm::Semi_Fact(const int n) -{ - int semif = 1; - for(int i=n; i>2; i -= 2) - { - semif *= i; - } - return semif; -} - - -double Ylm::sgn(const double x) -{ - if(x < 0.0) return -1.0; - if(x > 0.0) return 1.0; - return 0.0; -} - -} diff --git a/source/module_base/ylm.h b/source/module_base/ylm.h deleted file mode 100644 index 65adcf18f6..0000000000 --- a/source/module_base/ylm.h +++ /dev/null @@ -1,168 +0,0 @@ -#ifndef YLM_H -#define YLM_H - -#include - -#include "vector3.h" - -namespace ModuleBase -{ - -class Ylm -{ - public: - Ylm(){}; - ~Ylm(){}; - - static int nlm; - - - /** - * @brief Get the ylm real object - * - * @param Lmax [in] maximum angular quantum number + 1 - * @param vec [in] the vector to be calculated - * @param ylmr [out] calculated Ylm, Y00, Y10, Y11, Y1-1, Y20, Y21, Y2-1, Y22, Y2-2... - */ - static void get_ylm_real( - const int &Lmax , - const ModuleBase::Vector3 &vec, - double ylmr[]); - - /** - * @brief Get the ylm real object and the gradient - * - * @param Lmax [in] maximum angular quantum number + l - * @param vec [in] the vector to be calculated - * @param ylmr [out] calculated Ylm, Y00, Y10, Y11, Y1-1, Y20, Y21, Y2-1, Y22, Y2-2... - * @param dylmdr [out] gradient of Ylm, [dY00/dx, dY00/dy, dY00/dz], [dY10/dx, dY10/dy, dY10/dz], [dY11/dx, dY11/dy, dY11/dz],... - */ - static void get_ylm_real( - const int &Lmax , - const ModuleBase::Vector3 &vec, - double ylmr[], - double dylmdr[][3]); - - /** - * @brief Get the ylm real (solid) object (not used anymore) - * - * @param Lmax [in] maximum angular quantum number + l - * @param x [in] x - * @param y [in] y - * @param z [in] z - * @param rly [in] calculated Ylm, Y00, Y10, Y11, Y1-1, Y20, Y21, Y2-1, Y22, Y2-2... - */ - static void rlylm( - const int& Lmax, - const double& x, - const double& y, - const double& z, - double rly[]); - - /** - * @brief Get the ylm real (solid) object and the gradient (not used anymore) - * - * @param Lmax [in] maximum angular quantum number + 1 - * @param x [in] x - * @param y [in] y - * @param z [in] z - * @param rly [in] calculated Ylm, Y00, Y10, Y11, Y1-1, Y20, Y21, Y2-1, Y22, Y2-2... - * @param grly [out] gradient of Ylm, [dY00/dx, dY00/dy, dY00/dz], [dY10/dx, dY10/dy, dY10/dz], [dY11/dx, dY11/dy, dY11/dz],... - */ - static void rlylm( - const int& Lmax, - const double& x, - const double& y, - const double& z, - double rly[], - double grly[][3]); - - /** - * @brief Get the ylm real object (used in grid integration) - * - * @param Lmax [in] maximum angular quantum number - * @param xdr [in] x/r - * @param ydr [in] y/r - * @param zdr [in] z/r - * @param rly [in] calculated Ylm, Y00, Y10, Y11, Y1-1, Y20, Y21, Y2-1, Y22, Y2-2... - */ - static void sph_harm( - const int& Lmax, - const double& xdr, - const double& ydr, - const double& zdr, - std::vector &rly); - - /** - * @brief Get the ylm real object (used in getting overlap) - * - * @param Lmax [in] maximum angular quantum number - * @param x [in] x/r - * @param y [in] y/r - * @param z [in] z/r - * @param rly [in] calculated Ylm, Y00, Y10, Y11, Y1-1, Y20, Y21, Y2-1, Y22, Y2-2... - * @author Peize Lin - * @date 2016-08-26 - */ - static void rl_sph_harm( - const int& Lmax, - const double& x, - const double& y, - const double& z, - std::vector& rly); - - /** - * @brief Get the ylm real object and the gradient (used in getting derivative of overlap) - * - * @param Lmax [in] maximum angular quantum number - * @param x [in] x/r - * @param y [in] y/r - * @param z [in] z/r - * @param rly [in] calculated Ylm, Y00, Y10, Y11, Y1-1, Y20, Y21, Y2-1, Y22, Y2-2... - * @param grly [out] gradient of Ylm, [dY00/dx, dY00/dy, dY00/dz], [dY10/dx, dY10/dy, dY10/dz], [dY11/dx, dY11/dy, dY11/dz],... - * grly should be a memory-contiguous two-dimensional array for better performance. - */ - static void grad_rl_sph_harm( - const int& Lmax, - const double& x, - const double& y, - const double& z, - double* rly, - double** grly); - - /** - * @brief Get the hessian of r^l Ylm (used in getting derivative of overlap) - * - * @param Lmax [in] maximum angular quantum number - * @param x [in] x - * @param y [in] y - * @param z [in] z - * @param hrly [out] hessian of Ylm, [dY00/dx2, dY00/dxy, dY00/dxz, dY00/dyy, dY00/dyz, dY00/dzz] , ... - */ - static void hes_rl_sph_harm( - const int& Lmax, - const double& x, - const double& y, - const double& z, - std::vector>& hrly); - - //calculate the coefficient of Ylm, ylmcoef. - static void set_coefficients (); - static std::vector ylmcoef; - - //static void test(); - //static void test1(); - //static void test2(); - - //set the first n elements of u to be 0.0 - static void ZEROS(double u[], const int& n); - - private: - static long double Fact(const int n); - static int Semi_Fact(const int n); - static double sgn(const double x); -}; - -} - -#endif diff --git a/source/module_basis/module_ao/ORB_atomic.h b/source/module_basis/module_ao/ORB_atomic.h index 2539e0a0c9..71212f8b28 100644 --- a/source/module_basis/module_ao/ORB_atomic.h +++ b/source/module_basis/module_ao/ORB_atomic.h @@ -3,8 +3,8 @@ #include -#include "module_base/intarray.h" -#include "module_base/vector3.h" +#include "source_base/intarray.h" +#include "source_base/vector3.h" #include "ORB_atomic_lm.h" class Numerical_Orbital_AtomRelation diff --git a/source/module_basis/module_ao/ORB_atomic_lm.cpp b/source/module_basis/module_ao/ORB_atomic_lm.cpp index 9807df4f3f..72729e91ed 100644 --- a/source/module_basis/module_ao/ORB_atomic_lm.cpp +++ b/source/module_basis/module_ao/ORB_atomic_lm.cpp @@ -1,11 +1,11 @@ #include "ORB_atomic_lm.h" -#include "module_base/sph_bessel_recursive.h" +#include "source_base/sph_bessel_recursive.h" #include "module_parameter/parameter.h" -#include "module_base/blas_connector.h" -#include "module_base/timer.h" -#include "module_base/math_integral.h" -#include "module_base/math_sphbes.h" -#include "module_base/constants.h" +#include "source_base/blas_connector.h" +#include "source_base/timer.h" +#include "source_base/math_integral.h" +#include "source_base/math_sphbes.h" +#include "source_base/constants.h" #ifdef _OPENMP #include @@ -216,7 +216,7 @@ void Numerical_Orbital_Lm::copy_parameter( this->kcut = (nk-1) * this->dk; } -#include "module_base/mathzone_add1.h" +#include "source_base/mathzone_add1.h" void Numerical_Orbital_Lm::extra_uniform(const double &dr_uniform_in, const bool &force_flag) { ModuleBase::timer::tick("NOrbital_Lm", "extra_uniform"); diff --git a/source/module_basis/module_ao/ORB_atomic_lm.h b/source/module_basis/module_ao/ORB_atomic_lm.h index 134ad8316f..9b2be4f01a 100644 --- a/source/module_basis/module_ao/ORB_atomic_lm.h +++ b/source/module_basis/module_ao/ORB_atomic_lm.h @@ -8,8 +8,8 @@ #include using std::vector; -#include "module_base/global_function.h" -#include "module_base/global_variable.h" +#include "source_base/global_function.h" +#include "source_base/global_variable.h" /** * CLASS Num_orbital_lm diff --git a/source/module_basis/module_ao/ORB_gaunt_table.cpp b/source/module_basis/module_ao/ORB_gaunt_table.cpp index 26dfc38ed8..e314bc87d6 100644 --- a/source/module_basis/module_ao/ORB_gaunt_table.cpp +++ b/source/module_basis/module_ao/ORB_gaunt_table.cpp @@ -1,13 +1,13 @@ #include #include #include "ORB_gaunt_table.h" -#include "module_base/timer.h" -#include "module_base/memory.h" -#include "module_base/mathzone.h" -#include "module_base/global_function.h" -#include "module_base/vector3.h" -#include "module_base/constants.h" -#include "module_base/math_ylmreal.h" +#include "source_base/timer.h" +#include "source_base/memory.h" +#include "source_base/mathzone.h" +#include "source_base/global_function.h" +#include "source_base/vector3.h" +#include "source_base/constants.h" +#include "source_base/math_ylmreal.h" ORB_gaunt_table::ORB_gaunt_table(){} ORB_gaunt_table::~ORB_gaunt_table(){} diff --git a/source/module_basis/module_ao/ORB_gaunt_table.h b/source/module_basis/module_ao/ORB_gaunt_table.h index 3db96604b6..6e4eed550c 100644 --- a/source/module_basis/module_ao/ORB_gaunt_table.h +++ b/source/module_basis/module_ao/ORB_gaunt_table.h @@ -2,8 +2,8 @@ #define ORB_GAUNT_TABLE_H #include -#include "module_base/realarray.h" -#include "module_base/matrix.h" +#include "source_base/realarray.h" +#include "source_base/matrix.h" class ORB_gaunt_table { diff --git a/source/module_basis/module_ao/ORB_nonlocal.cpp b/source/module_basis/module_ao/ORB_nonlocal.cpp index 86ec82be22..d8775e0b36 100644 --- a/source/module_basis/module_ao/ORB_nonlocal.cpp +++ b/source/module_basis/module_ao/ORB_nonlocal.cpp @@ -1,5 +1,5 @@ #include "ORB_nonlocal.h" -#include "module_base/global_function.h" +#include "source_base/global_function.h" Numerical_Nonlocal::Numerical_Nonlocal() { diff --git a/source/module_basis/module_ao/ORB_nonlocal.h b/source/module_basis/module_ao/ORB_nonlocal.h index 8991620f16..bc5e5776ae 100644 --- a/source/module_basis/module_ao/ORB_nonlocal.h +++ b/source/module_basis/module_ao/ORB_nonlocal.h @@ -1,8 +1,8 @@ #ifndef NUMERICAL_NONLOCAL_H #define NUMERICAL_NONLOCAL_H -#include "module_base/complexarray.h" -#include "module_base/complexmatrix.h" +#include "source_base/complexarray.h" +#include "source_base/complexmatrix.h" #include "ORB_nonlocal_lm.h" /** * \class Numerical_Nonlocal diff --git a/source/module_basis/module_ao/ORB_nonlocal_lm.cpp b/source/module_basis/module_ao/ORB_nonlocal_lm.cpp index 9db01eb4a1..361ecda7a3 100644 --- a/source/module_basis/module_ao/ORB_nonlocal_lm.cpp +++ b/source/module_basis/module_ao/ORB_nonlocal_lm.cpp @@ -1,12 +1,12 @@ #include "ORB_nonlocal_lm.h" -#include "module_base/constants.h" -#include "module_base/global_function.h" -#include "module_base/math_integral.h" -#include "module_base/math_polyint.h" -#include "module_base/math_sphbes.h" -#include "module_base/mathzone.h" /// use Polynomial_Interpolation_xy, Spherical_Bessel -#include "module_base/mathzone_add1.h" /// use SplineD2 +#include "source_base/constants.h" +#include "source_base/global_function.h" +#include "source_base/math_integral.h" +#include "source_base/math_polyint.h" +#include "source_base/math_sphbes.h" +#include "source_base/mathzone.h" /// use Polynomial_Interpolation_xy, Spherical_Bessel +#include "source_base/mathzone_add1.h" /// use SplineD2 #include "module_parameter/parameter.h" #include diff --git a/source/module_basis/module_ao/ORB_read.cpp b/source/module_basis/module_ao/ORB_read.cpp index c1c77461ee..36d5d55f35 100644 --- a/source/module_basis/module_ao/ORB_read.cpp +++ b/source/module_basis/module_ao/ORB_read.cpp @@ -1,9 +1,9 @@ #include "ORB_read.h" -#include "module_base/math_integral.h" -#include "module_base/parallel_common.h" -#include "module_base/timer.h" -#include "module_base/tool_check.h" +#include "source_base/math_integral.h" +#include "source_base/parallel_common.h" +#include "source_base/timer.h" +#include "source_base/tool_check.h" #include "module_parameter/parameter.h" #include diff --git a/source/module_basis/module_ao/parallel_orbitals.cpp b/source/module_basis/module_ao/parallel_orbitals.cpp index 4b6132cac4..985c769565 100644 --- a/source/module_basis/module_ao/parallel_orbitals.cpp +++ b/source/module_basis/module_ao/parallel_orbitals.cpp @@ -1,8 +1,8 @@ #include "parallel_orbitals.h" -#include "module_base/blacs_connector.h" -#include "module_base/scalapack_connector.h" -#include "module_base/global_function.h" +#include "source_base/blacs_connector.h" +#include "source_base/scalapack_connector.h" +#include "source_base/global_function.h" Parallel_Orbitals::Parallel_Orbitals() { diff --git a/source/module_basis/module_ao/parallel_orbitals.h b/source/module_basis/module_ao/parallel_orbitals.h index 77f094e361..1ff74d3b2d 100644 --- a/source/module_basis/module_ao/parallel_orbitals.h +++ b/source/module_basis/module_ao/parallel_orbitals.h @@ -1,6 +1,6 @@ #ifndef _PARALLEL_ORBITALS_H_ #define _PARALLEL_ORBITALS_H_ -#include "module_base/parallel_2d.h" +#include "source_base/parallel_2d.h" #include /// This class packs the information of 2D-block-cyclic for LCAO code: diff --git a/source/module_basis/module_ao/test/1_snap_equal_test.cpp b/source/module_basis/module_ao/test/1_snap_equal_test.cpp index 95e99fd3f6..d29418ddad 100644 --- a/source/module_basis/module_ao/test/1_snap_equal_test.cpp +++ b/source/module_basis/module_ao/test/1_snap_equal_test.cpp @@ -1,6 +1,6 @@ #include #include"ORB_unittest.h" -#include "module_base/global_variable.h" +#include "source_base/global_variable.h" //Test whether the 2-center-int results // and its derivative from two clases are equal. diff --git a/source/module_basis/module_ao/test/CMakeLists.txt b/source/module_basis/module_ao/test/CMakeLists.txt index 1cde85d51e..a51a5aaeda 100644 --- a/source/module_basis/module_ao/test/CMakeLists.txt +++ b/source/module_basis/module_ao/test/CMakeLists.txt @@ -1,35 +1,35 @@ remove_definitions(-D__EXX) list(APPEND depend_files - ../../../module_base/math_integral.cpp - ../../../module_base/math_sphbes.cpp - ../../../module_base/math_polyint.cpp - ../../../module_base/math_ylmreal.cpp - ../../../module_base/ylm.cpp - ../../../module_base/memory.cpp - ../../../module_base/blas_connector_base.cpp - ../../../module_base/blas_connector_vector.cpp - ../../../module_base/blas_connector_matrix.cpp - ../../../module_base/complexarray.cpp - ../../../module_base/complexmatrix.cpp - ../../../module_base/matrix.cpp - ../../../module_base/realarray.cpp - ../../../module_base/intarray.cpp - ../../../module_base/sph_bessel_recursive-d1.cpp - ../../../module_base/sph_bessel_recursive-d2.cpp - ../../../module_base/tool_title.cpp - ../../../module_base/tool_quit.cpp - ../../../module_base/tool_check.cpp - ../../../module_base/timer.cpp - ../../../module_base/mathzone_add1.cpp - ../../../module_base/global_variable.cpp - ../../../module_base/global_function.cpp - ../../../module_base/global_file.cpp - ../../../module_base/libm/branred.cpp - ../../../module_base/libm/sincos.cpp - ../../../module_base/spherical_bessel_transformer.cpp - ../../../module_base/cubic_spline.cpp - ../../../module_base/parallel_2d.cpp + ../../../source_base/math_integral.cpp + ../../../source_base/math_sphbes.cpp + ../../../source_base/math_polyint.cpp + ../../../source_base/math_ylmreal.cpp + ../../../source_base/ylm.cpp + ../../../source_base/memory.cpp + ../../../source_base/blas_connector_base.cpp + ../../../source_base/blas_connector_vector.cpp + ../../../source_base/blas_connector_matrix.cpp + ../../../source_base/complexarray.cpp + ../../../source_base/complexmatrix.cpp + ../../../source_base/matrix.cpp + ../../../source_base/realarray.cpp + ../../../source_base/intarray.cpp + ../../../source_base/sph_bessel_recursive-d1.cpp + ../../../source_base/sph_bessel_recursive-d2.cpp + ../../../source_base/tool_title.cpp + ../../../source_base/tool_quit.cpp + ../../../source_base/tool_check.cpp + ../../../source_base/timer.cpp + ../../../source_base/mathzone_add1.cpp + ../../../source_base/global_variable.cpp + ../../../source_base/global_function.cpp + ../../../source_base/global_file.cpp + ../../../source_base/libm/branred.cpp + ../../../source_base/libm/sincos.cpp + ../../../source_base/spherical_bessel_transformer.cpp + ../../../source_base/cubic_spline.cpp + ../../../source_base/parallel_2d.cpp ../ORB_read.cpp ../ORB_atomic.cpp ../ORB_atomic_lm.cpp diff --git a/source/module_basis/module_ao/test/ORB_atomic_lm_test.cpp b/source/module_basis/module_ao/test/ORB_atomic_lm_test.cpp index bf46859517..80f1fafc9b 100644 --- a/source/module_basis/module_ao/test/ORB_atomic_lm_test.cpp +++ b/source/module_basis/module_ao/test/ORB_atomic_lm_test.cpp @@ -1,5 +1,5 @@ #include "gtest/gtest.h" -#include "module_base/math_integral.h" +#include "source_base/math_integral.h" #define private public #include "module_parameter/parameter.h" #undef private diff --git a/source/module_basis/module_ao/test/ORB_nonlocal_lm_test.cpp b/source/module_basis/module_ao/test/ORB_nonlocal_lm_test.cpp index c2cf09ba08..52f2249266 100644 --- a/source/module_basis/module_ao/test/ORB_nonlocal_lm_test.cpp +++ b/source/module_basis/module_ao/test/ORB_nonlocal_lm_test.cpp @@ -1,10 +1,10 @@ #include "gtest/gtest.h" -#include "module_base/global_function.h" +#include "source_base/global_function.h" #define private public #include "module_parameter/parameter.h" #undef private -#include "module_base/global_variable.h" -#include "module_base/math_integral.h" +#include "source_base/global_variable.h" +#include "source_base/math_integral.h" #include #include diff --git a/source/module_basis/module_ao/test/ORB_nonlocal_test.cpp b/source/module_basis/module_ao/test/ORB_nonlocal_test.cpp index d1654144d1..b02b284319 100644 --- a/source/module_basis/module_ao/test/ORB_nonlocal_test.cpp +++ b/source/module_basis/module_ao/test/ORB_nonlocal_test.cpp @@ -1,5 +1,5 @@ #include "gtest/gtest.h" -#include "module_base/global_variable.h" +#include "source_base/global_variable.h" #define private public #include "module_basis/module_ao/ORB_nonlocal.h" diff --git a/source/module_basis/module_ao/test/ORB_read_test.cpp b/source/module_basis/module_ao/test/ORB_read_test.cpp index 13385ecad4..088448f0f1 100644 --- a/source/module_basis/module_ao/test/ORB_read_test.cpp +++ b/source/module_basis/module_ao/test/ORB_read_test.cpp @@ -1,6 +1,6 @@ #include #include "gtest/gtest.h" -#include "module_base/global_variable.h" +#include "source_base/global_variable.h" #include "module_basis/module_ao/ORB_atomic.h" #include "module_basis/module_ao/ORB_atomic_lm.h" diff --git a/source/module_basis/module_ao/test/ORB_unittest.h b/source/module_basis/module_ao/test/ORB_unittest.h index 509a72541c..9288339281 100644 --- a/source/module_basis/module_ao/test/ORB_unittest.h +++ b/source/module_basis/module_ao/test/ORB_unittest.h @@ -1,7 +1,7 @@ #ifndef _ORBUNITTEST_ #define _ORBUNITTEST_ -#include "module_base/global_function.h" +#include "source_base/global_function.h" #include "module_basis/module_ao/ORB_control.h" #include "module_hamilt_lcao/hamilt_lcaodft/center2_orb-orb11.h" diff --git a/source/module_basis/module_nao/atomic_radials.cpp b/source/module_basis/module_nao/atomic_radials.cpp index 42a9867662..a27266202b 100644 --- a/source/module_basis/module_nao/atomic_radials.cpp +++ b/source/module_basis/module_nao/atomic_radials.cpp @@ -1,13 +1,13 @@ #include "module_basis/module_nao/atomic_radials.h" -#include "module_base/math_integral.h" -#include "module_base/parallel_common.h" -#include "module_base/tool_quit.h" +#include "source_base/math_integral.h" +#include "source_base/parallel_common.h" +#include "source_base/tool_quit.h" // FIXME: should update with pyabacus // #include "module_io/orb_io.h" -#include "module_base/projgen.h" +#include "source_base/projgen.h" #include #include diff --git a/source/module_basis/module_nao/beta_radials.cpp b/source/module_basis/module_nao/beta_radials.cpp index fdef1822d0..f220ed95b8 100644 --- a/source/module_basis/module_nao/beta_radials.cpp +++ b/source/module_basis/module_nao/beta_radials.cpp @@ -1,9 +1,9 @@ #include "module_basis/module_nao/beta_radials.h" #include "module_parameter/parameter.h" -#include "module_base/global_variable.h" -#include "module_base/parallel_common.h" -#include "module_base/tool_quit.h" +#include "source_base/global_variable.h" +#include "source_base/parallel_common.h" +#include "source_base/tool_quit.h" #include diff --git a/source/module_basis/module_nao/hydrogen_radials.cpp b/source/module_basis/module_nao/hydrogen_radials.cpp index a0e6479774..a342f877ba 100644 --- a/source/module_basis/module_nao/hydrogen_radials.cpp +++ b/source/module_basis/module_nao/hydrogen_radials.cpp @@ -1,7 +1,7 @@ #include "module_basis/module_nao/hydrogen_radials.h" -#include "module_base/global_variable.h" -#include "module_base/math_integral.h" -#include "module_base/atom_in.h" // for calculating slater screening constant +#include "source_base/global_variable.h" +#include "source_base/math_integral.h" +#include "source_base/atom_in.h" // for calculating slater screening constant #include #include #include diff --git a/source/module_basis/module_nao/hydrogen_radials.h b/source/module_basis/module_nao/hydrogen_radials.h index a1242fb709..0013cc46f4 100644 --- a/source/module_basis/module_nao/hydrogen_radials.h +++ b/source/module_basis/module_nao/hydrogen_radials.h @@ -2,7 +2,7 @@ #define HYDROGEN_RADIALS_H_ #include "module_basis/module_nao/radial_set.h" -#include "module_base/assoc_laguerre.h" +#include "source_base/assoc_laguerre.h" // include pair container #include // include map container diff --git a/source/module_basis/module_nao/numerical_radial.cpp b/source/module_basis/module_nao/numerical_radial.cpp index f7f039c04e..6ce5b4270f 100644 --- a/source/module_basis/module_nao/numerical_radial.cpp +++ b/source/module_basis/module_nao/numerical_radial.cpp @@ -6,11 +6,11 @@ #include #include -#include "module_base/constants.h" -#include "module_base/cubic_spline.h" -#include "module_base/global_variable.h" -#include "module_base/math_integral.h" -#include "module_base/spherical_bessel_transformer.h" +#include "source_base/constants.h" +#include "source_base/cubic_spline.h" +#include "source_base/global_variable.h" +#include "source_base/math_integral.h" +#include "source_base/spherical_bessel_transformer.h" #include "module_parameter/parameter.h" using ModuleBase::PI; diff --git a/source/module_basis/module_nao/numerical_radial.h b/source/module_basis/module_nao/numerical_radial.h index f94f5a88b1..18e9f2a00a 100644 --- a/source/module_basis/module_nao/numerical_radial.h +++ b/source/module_basis/module_nao/numerical_radial.h @@ -5,7 +5,7 @@ #include #include -#include "module_base/spherical_bessel_transformer.h" +#include "source_base/spherical_bessel_transformer.h" #include "module_basis/module_ao/ORB_atomic_lm.h" /** diff --git a/source/module_basis/module_nao/pswfc_radials.cpp b/source/module_basis/module_nao/pswfc_radials.cpp index b871025029..d8cef912eb 100644 --- a/source/module_basis/module_nao/pswfc_radials.cpp +++ b/source/module_basis/module_nao/pswfc_radials.cpp @@ -1,13 +1,13 @@ #include "module_basis/module_nao/pswfc_radials.h" -#include "module_base/math_integral.h" -#include "module_base/tool_quit.h" +#include "source_base/math_integral.h" +#include "source_base/tool_quit.h" #include #include #ifdef __MPI -#include "module_base/parallel_common.h" +#include "source_base/parallel_common.h" #endif PswfcRadials& PswfcRadials::operator=(const PswfcRadials& rhs) diff --git a/source/module_basis/module_nao/radial_collection.cpp b/source/module_basis/module_nao/radial_collection.cpp index 10df8a6e5c..0ab1f027cb 100644 --- a/source/module_basis/module_nao/radial_collection.cpp +++ b/source/module_basis/module_nao/radial_collection.cpp @@ -1,14 +1,14 @@ #include "module_basis/module_nao/radial_collection.h" #include -#include "module_base/spherical_bessel_transformer.h" +#include "source_base/spherical_bessel_transformer.h" #include "module_basis/module_nao/atomic_radials.h" #include "module_basis/module_nao/beta_radials.h" #include "module_basis/module_nao/sphbes_radials.h" -#include "module_base/parallel_common.h" -#include "module_base/tool_quit.h" -#include "module_base/global_variable.h" +#include "source_base/parallel_common.h" +#include "source_base/tool_quit.h" +#include "source_base/global_variable.h" #include "module_basis/module_nao/hydrogen_radials.h" #include "module_basis/module_nao/pswfc_radials.h" diff --git a/source/module_basis/module_nao/radial_set.cpp b/source/module_basis/module_nao/radial_set.cpp index 3b00ba679a..44fe185ad7 100644 --- a/source/module_basis/module_nao/radial_set.cpp +++ b/source/module_basis/module_nao/radial_set.cpp @@ -5,7 +5,7 @@ #include #include -#include "module_base/spherical_bessel_transformer.h" +#include "source_base/spherical_bessel_transformer.h" // FIXME: should update with pyabacus // #include "module_io/orb_io.h" diff --git a/source/module_basis/module_nao/radial_set.h b/source/module_basis/module_nao/radial_set.h index b102a30951..8da82673a5 100644 --- a/source/module_basis/module_nao/radial_set.h +++ b/source/module_basis/module_nao/radial_set.h @@ -6,7 +6,7 @@ #include #include -#include "module_base/spherical_bessel_transformer.h" +#include "source_base/spherical_bessel_transformer.h" #include "module_basis/module_nao/numerical_radial.h" #include "module_basis/module_ao/ORB_nonlocal.h" #include "module_basis/module_ao/ORB_atomic.h" diff --git a/source/module_basis/module_nao/real_gaunt_table.cpp b/source/module_basis/module_nao/real_gaunt_table.cpp index 03f49a079a..33ef67133c 100644 --- a/source/module_basis/module_nao/real_gaunt_table.cpp +++ b/source/module_basis/module_nao/real_gaunt_table.cpp @@ -4,7 +4,7 @@ #include #include -#include "module_base/constants.h" +#include "source_base/constants.h" void RealGauntTable::build(const int lmax) { diff --git a/source/module_basis/module_nao/sphbes_radials.cpp b/source/module_basis/module_nao/sphbes_radials.cpp index 829b446031..f71fb064c6 100644 --- a/source/module_basis/module_nao/sphbes_radials.cpp +++ b/source/module_basis/module_nao/sphbes_radials.cpp @@ -1,8 +1,8 @@ #include "module_basis/module_nao/sphbes_radials.h" -#include "module_base/math_sphbes.h" -#include "module_base/parallel_common.h" -#include "module_base/tool_quit.h" +#include "source_base/math_sphbes.h" +#include "source_base/parallel_common.h" +#include "source_base/tool_quit.h" #include #include diff --git a/source/module_basis/module_nao/test/atomic_radials_test.cpp b/source/module_basis/module_nao/test/atomic_radials_test.cpp index f1a64c2e07..1dca3c668d 100644 --- a/source/module_basis/module_nao/test/atomic_radials_test.cpp +++ b/source/module_basis/module_nao/test/atomic_radials_test.cpp @@ -1,14 +1,14 @@ #include "module_basis/module_nao/atomic_radials.h" #include "gtest/gtest.h" -#include "module_base/spherical_bessel_transformer.h" +#include "source_base/spherical_bessel_transformer.h" #ifdef __MPI #include #endif -#include "module_base/constants.h" -#include "module_base/global_variable.h" +#include "source_base/constants.h" +#include "source_base/global_variable.h" #include "module_basis/module_ao/ORB_atomic.h" using ModuleBase::SphericalBesselTransformer; diff --git a/source/module_basis/module_nao/test/beta_radials_test.cpp b/source/module_basis/module_nao/test/beta_radials_test.cpp index d9378f28a0..d18024db09 100644 --- a/source/module_basis/module_nao/test/beta_radials_test.cpp +++ b/source/module_basis/module_nao/test/beta_radials_test.cpp @@ -6,8 +6,8 @@ #include #endif -#include "module_base/constants.h" -#include "module_base/global_variable.h" +#include "source_base/constants.h" +#include "source_base/global_variable.h" /*********************************************************** * Unit test of class "BetaRadials" diff --git a/source/module_basis/module_nao/test/hydrogen_radials_test.cpp b/source/module_basis/module_nao/test/hydrogen_radials_test.cpp index db169801d1..d472c70a43 100644 --- a/source/module_basis/module_nao/test/hydrogen_radials_test.cpp +++ b/source/module_basis/module_nao/test/hydrogen_radials_test.cpp @@ -1,7 +1,7 @@ #include #include #include "module_basis/module_nao/hydrogen_radials.h" -#include "module_base/math_integral.h" +#include "source_base/math_integral.h" #ifdef __MPI #include diff --git a/source/module_basis/module_nao/test/numerical_radial_test.cpp b/source/module_basis/module_nao/test/numerical_radial_test.cpp index 170699040d..af6236a6c8 100644 --- a/source/module_basis/module_nao/test/numerical_radial_test.cpp +++ b/source/module_basis/module_nao/test/numerical_radial_test.cpp @@ -3,13 +3,13 @@ #include #include "gtest/gtest.h" -#include "module_base/spherical_bessel_transformer.h" +#include "source_base/spherical_bessel_transformer.h" #ifdef __MPI #include #endif -#include "module_base/constants.h" +#include "source_base/constants.h" #include "module_basis/module_nao/numerical_radial.h" using ModuleBase::PI; diff --git a/source/module_basis/module_nao/test/projgen_test.cpp b/source/module_basis/module_nao/test/projgen_test.cpp index 2feaadfb7a..620bd7786d 100644 --- a/source/module_basis/module_nao/test/projgen_test.cpp +++ b/source/module_basis/module_nao/test/projgen_test.cpp @@ -1,9 +1,9 @@ -#include "module_base/projgen.h" +#include "source_base/projgen.h" #include "gtest/gtest.h" -#include "module_base/math_integral.h" -#include "module_base/math_sphbes.h" -#include "module_base/cubic_spline.h" +#include "source_base/math_integral.h" +#include "source_base/math_sphbes.h" +#include "source_base/cubic_spline.h" #include #include diff --git a/source/module_basis/module_nao/test/radial_collection_test.cpp b/source/module_basis/module_nao/test/radial_collection_test.cpp index 2838cd7294..cdead42048 100644 --- a/source/module_basis/module_nao/test/radial_collection_test.cpp +++ b/source/module_basis/module_nao/test/radial_collection_test.cpp @@ -1,6 +1,6 @@ #include "module_basis/module_nao/radial_collection.h" #include "gtest/gtest.h" -#include "module_base/spherical_bessel_transformer.h" +#include "source_base/spherical_bessel_transformer.h" #ifdef __MPI #include diff --git a/source/module_basis/module_nao/test/real_gaunt_table_test.cpp b/source/module_basis/module_nao/test/real_gaunt_table_test.cpp index 3f8c198060..eb373620ef 100644 --- a/source/module_basis/module_nao/test/real_gaunt_table_test.cpp +++ b/source/module_basis/module_nao/test/real_gaunt_table_test.cpp @@ -11,7 +11,7 @@ #include using iclock = std::chrono::high_resolution_clock; -#include "module_base/constants.h" +#include "source_base/constants.h" #include "module_basis/module_ao/ORB_gaunt_table.h" /*********************************************************** diff --git a/source/module_basis/module_nao/test/sphbes_radials_test.cpp b/source/module_basis/module_nao/test/sphbes_radials_test.cpp index 748ee3629d..9f550bde5e 100644 --- a/source/module_basis/module_nao/test/sphbes_radials_test.cpp +++ b/source/module_basis/module_nao/test/sphbes_radials_test.cpp @@ -2,8 +2,8 @@ #include "gtest/gtest.h" -#include "module_base/global_variable.h" -#include "module_base/math_sphbes.h" +#include "source_base/global_variable.h" +#include "source_base/math_sphbes.h" #ifdef __MPI #include diff --git a/source/module_basis/module_nao/test/two_center_bundle_test.cpp b/source/module_basis/module_nao/test/two_center_bundle_test.cpp index a517b486d5..9d05b01f87 100644 --- a/source/module_basis/module_nao/test/two_center_bundle_test.cpp +++ b/source/module_basis/module_nao/test/two_center_bundle_test.cpp @@ -1,8 +1,8 @@ #include "module_basis/module_nao/two_center_bundle.h" #include "gtest/gtest.h" -#include "module_base/ylm.h" -#include "module_base/global_variable.h" +#include "source_base/ylm.h" +#include "source_base/global_variable.h" #ifdef __MPI #include diff --git a/source/module_basis/module_nao/test/two_center_integrator_test.cpp b/source/module_basis/module_nao/test/two_center_integrator_test.cpp index c616504eed..b0f8a8bf1c 100644 --- a/source/module_basis/module_nao/test/two_center_integrator_test.cpp +++ b/source/module_basis/module_nao/test/two_center_integrator_test.cpp @@ -1,10 +1,10 @@ #include "module_basis/module_nao/two_center_integrator.h" -#include "module_base/constants.h" -#include "module_base/math_sphbes.h" -#include "module_base/spherical_bessel_transformer.h" -#include "module_base/vector3.h" -#include "module_base/ylm.h" +#include "source_base/constants.h" +#include "source_base/math_sphbes.h" +#include "source_base/spherical_bessel_transformer.h" +#include "source_base/vector3.h" +#include "source_base/ylm.h" #include "gtest/gtest.h" #include diff --git a/source/module_basis/module_nao/test/two_center_table_test.cpp b/source/module_basis/module_nao/test/two_center_table_test.cpp index 554f1cce3f..1fc2afa005 100644 --- a/source/module_basis/module_nao/test/two_center_table_test.cpp +++ b/source/module_basis/module_nao/test/two_center_table_test.cpp @@ -1,8 +1,8 @@ #include "module_basis/module_nao/two_center_table.h" -#include "module_base/constants.h" -#include "module_base/math_integral.h" -#include "module_base/spherical_bessel_transformer.h" +#include "source_base/constants.h" +#include "source_base/math_integral.h" +#include "source_base/spherical_bessel_transformer.h" #include "gtest/gtest.h" #include diff --git a/source/module_basis/module_nao/two_center_bundle.cpp b/source/module_basis/module_nao/two_center_bundle.cpp index e01ad1bfa2..081b0a7249 100644 --- a/source/module_basis/module_nao/two_center_bundle.cpp +++ b/source/module_basis/module_nao/two_center_bundle.cpp @@ -1,9 +1,9 @@ #include "module_basis/module_nao/two_center_bundle.h" -#include "module_base/global_variable.h" -#include "module_base/memory.h" -#include "module_base/parallel_common.h" -#include "module_base/ylm.h" +#include "source_base/global_variable.h" +#include "source_base/memory.h" +#include "source_base/parallel_common.h" +#include "source_base/ylm.h" #include "module_basis/module_nao/real_gaunt_table.h" #include "module_parameter/parameter.h" diff --git a/source/module_basis/module_nao/two_center_integrator.cpp b/source/module_basis/module_nao/two_center_integrator.cpp index cfacc0f07a..a7bfb13e26 100644 --- a/source/module_basis/module_nao/two_center_integrator.cpp +++ b/source/module_basis/module_nao/two_center_integrator.cpp @@ -1,8 +1,8 @@ #include "module_basis/module_nao/two_center_integrator.h" -#include "module_base/vector3.h" -#include "module_base/ylm.h" -#include "module_base/array_pool.h" +#include "source_base/vector3.h" +#include "source_base/ylm.h" +#include "source_base/array_pool.h" TwoCenterIntegrator::TwoCenterIntegrator(): is_tabulated_(false), diff --git a/source/module_basis/module_nao/two_center_integrator.h b/source/module_basis/module_nao/two_center_integrator.h index 0dd0c69a1c..165960c233 100644 --- a/source/module_basis/module_nao/two_center_integrator.h +++ b/source/module_basis/module_nao/two_center_integrator.h @@ -4,7 +4,7 @@ #include "module_basis/module_nao/two_center_table.h" #include "module_basis/module_nao/real_gaunt_table.h" #include "module_basis/module_nao/radial_collection.h" -#include "module_base/vector3.h" +#include "source_base/vector3.h" /*! * @brief A class to compute two-center integrals diff --git a/source/module_basis/module_nao/two_center_table.cpp b/source/module_basis/module_nao/two_center_table.cpp index f5f6e07193..a2b5db84c0 100644 --- a/source/module_basis/module_nao/two_center_table.cpp +++ b/source/module_basis/module_nao/two_center_table.cpp @@ -1,8 +1,8 @@ #include "module_basis/module_nao/two_center_table.h" -#include "module_base/constants.h" -#include "module_base/cubic_spline.h" -#include "module_base/math_integral.h" +#include "source_base/constants.h" +#include "source_base/cubic_spline.h" +#include "source_base/math_integral.h" #include #include diff --git a/source/module_basis/module_nao/two_center_table.h b/source/module_basis/module_nao/two_center_table.h index dff8a21502..291fda87d3 100644 --- a/source/module_basis/module_nao/two_center_table.h +++ b/source/module_basis/module_nao/two_center_table.h @@ -2,7 +2,7 @@ #define TWO_CENTER_TABLE_H #include -#include "module_base/spherical_bessel_transformer.h" +#include "source_base/spherical_bessel_transformer.h" #include "module_basis/module_nao/radial_collection.h" class TwoCenterTable diff --git a/source/module_basis/module_pw/kernels/test/CMakeLists.txt b/source/module_basis/module_pw/kernels/test/CMakeLists.txt index b0c35b294a..861474785a 100644 --- a/source/module_basis/module_pw/kernels/test/CMakeLists.txt +++ b/source/module_basis/module_pw/kernels/test/CMakeLists.txt @@ -4,10 +4,10 @@ AddTest( TARGET PW_Kernels_UTs LIBS parameter ${math_libs} psi device SOURCES pw_op_test.cpp - ../../../../module_base/tool_quit.cpp ../../../../module_base/global_variable.cpp - ../../../../module_base/parallel_global.cpp ../../../../module_base/parallel_reduce.cpp - ../../../../module_base/parallel_comm.cpp - ../../../../module_base/complexmatrix.cpp ../../../../module_base/matrix.cpp ../../../../module_base/memory.cpp - ../../../../module_base/libm/branred.cpp ../../../../module_base/libm/sincos.cpp - ../../../../module_base/blas_connector_base.cpp ../../../../module_base/blas_connector_vector.cpp ../../../../module_base/blas_connector_matrix.cpp + ../../../../source_base/tool_quit.cpp ../../../../source_base/global_variable.cpp + ../../../../source_base/parallel_global.cpp ../../../../source_base/parallel_reduce.cpp + ../../../../source_base/parallel_comm.cpp + ../../../../source_base/complexmatrix.cpp ../../../../source_base/matrix.cpp ../../../../source_base/memory.cpp + ../../../../source_base/libm/branred.cpp ../../../../source_base/libm/sincos.cpp + ../../../../source_base/blas_connector_base.cpp ../../../../source_base/blas_connector_vector.cpp ../../../../source_base/blas_connector_matrix.cpp ) \ No newline at end of file diff --git a/source/module_basis/module_pw/kernels/test/pw_op_test.cpp b/source/module_basis/module_pw/kernels/test/pw_op_test.cpp index e9bc07bd9e..cb09d4e682 100644 --- a/source/module_basis/module_pw/kernels/test/pw_op_test.cpp +++ b/source/module_basis/module_pw/kernels/test/pw_op_test.cpp @@ -1,6 +1,6 @@ #include "module_basis/module_pw/kernels/pw_op.h" -#include "module_base/module_device/memory_op.h" +#include "source_base/module_device/memory_op.h" #include #include diff --git a/source/module_basis/module_pw/module_fft/fft_bundle.cpp b/source/module_basis/module_pw/module_fft/fft_bundle.cpp index 7c0edeab08..8e318c8d6d 100644 --- a/source/module_basis/module_pw/module_fft/fft_bundle.cpp +++ b/source/module_basis/module_pw/module_fft/fft_bundle.cpp @@ -1,8 +1,8 @@ #include "fft_bundle.h" -#include "module_base/module_device/device.h" -#include "module_base/module_device/memory_op.h" -#include "module_base/tool_quit.h" +#include "source_base/module_device/device.h" +#include "source_base/module_device/memory_op.h" +#include "source_base/tool_quit.h" #include #if defined(__CUDA) diff --git a/source/module_basis/module_pw/module_fft/fft_cuda.cpp b/source/module_basis/module_pw/module_fft/fft_cuda.cpp index aab80e2944..bbcc603491 100644 --- a/source/module_basis/module_pw/module_fft/fft_cuda.cpp +++ b/source/module_basis/module_pw/module_fft/fft_cuda.cpp @@ -1,6 +1,6 @@ #include "fft_cuda.h" -#include "module_base/module_device/memory_op.h" +#include "source_base/module_device/memory_op.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" namespace ModulePW diff --git a/source/module_basis/module_pw/module_fft/fft_dsp.cpp b/source/module_basis/module_pw/module_fft/fft_dsp.cpp index a463f340cc..e26292cf5b 100644 --- a/source/module_basis/module_pw/module_fft/fft_dsp.cpp +++ b/source/module_basis/module_pw/module_fft/fft_dsp.cpp @@ -1,6 +1,6 @@ #include "fft_dsp.h" -#include "module_base/global_variable.h" +#include "source_base/global_variable.h" #include #include diff --git a/source/module_basis/module_pw/module_fft/fft_rocm.cpp b/source/module_basis/module_pw/module_fft/fft_rocm.cpp index 1dd9c433ec..0e947141b9 100644 --- a/source/module_basis/module_pw/module_fft/fft_rocm.cpp +++ b/source/module_basis/module_pw/module_fft/fft_rocm.cpp @@ -1,5 +1,5 @@ #include "fft_rocm.h" -#include "module_base/module_device/memory_op.h" +#include "source_base/module_device/memory_op.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" namespace ModulePW { diff --git a/source/module_basis/module_pw/pw_basis.cpp b/source/module_basis/module_pw/pw_basis.cpp index f4f7abf1dd..6a27cda397 100644 --- a/source/module_basis/module_pw/pw_basis.cpp +++ b/source/module_basis/module_pw/pw_basis.cpp @@ -1,9 +1,9 @@ #include "pw_basis.h" #include -#include "module_base/mymath.h" -#include "module_base/timer.h" -#include "module_base/global_function.h" +#include "source_base/mymath.h" +#include "source_base/timer.h" +#include "source_base/global_function.h" namespace ModulePW diff --git a/source/module_basis/module_pw/pw_basis.h b/source/module_basis/module_pw/pw_basis.h index e0f5dd071b..531245a81a 100644 --- a/source/module_basis/module_pw/pw_basis.h +++ b/source/module_basis/module_pw/pw_basis.h @@ -1,11 +1,11 @@ #ifndef PWBASIS_H #define PWBASIS_H -#include "module_base/macros.h" -#include "module_base/module_device/memory_op.h" -#include "module_base/matrix.h" -#include "module_base/matrix3.h" -#include "module_base/vector3.h" +#include "source_base/macros.h" +#include "source_base/module_device/memory_op.h" +#include "source_base/matrix.h" +#include "source_base/matrix3.h" +#include "source_base/vector3.h" #include #include "module_fft/fft_bundle.h" #include diff --git a/source/module_basis/module_pw/pw_basis_big.h b/source/module_basis/module_pw/pw_basis_big.h index 18aa822f44..2a04720877 100644 --- a/source/module_basis/module_pw/pw_basis_big.h +++ b/source/module_basis/module_pw/pw_basis_big.h @@ -1,7 +1,7 @@ #ifndef PW_BASIS_BIG_H #define PW_BASIS_BIG_H -#include "module_base/constants.h" -#include "module_base/global_function.h" +#include "source_base/constants.h" +#include "source_base/global_function.h" #ifdef __MPI #include "mpi.h" #endif diff --git a/source/module_basis/module_pw/pw_basis_k.cpp b/source/module_basis/module_pw/pw_basis_k.cpp index a4689ab2d2..306369a7c6 100644 --- a/source/module_basis/module_pw/pw_basis_k.cpp +++ b/source/module_basis/module_pw/pw_basis_k.cpp @@ -1,8 +1,8 @@ #include "pw_basis_k.h" -#include "module_base/constants.h" -#include "module_base/memory.h" -#include "module_base/timer.h" +#include "source_base/constants.h" +#include "source_base/memory.h" +#include "source_base/timer.h" #include "module_parameter/parameter.h" #include diff --git a/source/module_basis/module_pw/pw_basis_k.h b/source/module_basis/module_pw/pw_basis_k.h index cf2202e2b3..a65db77ca2 100644 --- a/source/module_basis/module_pw/pw_basis_k.h +++ b/source/module_basis/module_pw/pw_basis_k.h @@ -3,7 +3,7 @@ #include "pw_basis.h" #include "module_psi/psi.h" -#include "module_base/module_device/device.h" +#include "source_base/module_device/device.h" namespace ModulePW { diff --git a/source/module_basis/module_pw/pw_basis_k_big.h b/source/module_basis/module_pw/pw_basis_k_big.h index 065f122924..128c1d937d 100644 --- a/source/module_basis/module_pw/pw_basis_k_big.h +++ b/source/module_basis/module_pw/pw_basis_k_big.h @@ -1,7 +1,7 @@ #ifndef PW_BASIS_K_BIG_H #define PW_BASIS_K_BIG_H -#include "module_base/constants.h" -#include "module_base/global_function.h" +#include "source_base/constants.h" +#include "source_base/global_function.h" // temporary class, because previous ABACUS consider big grid for fft grids // which are used for grid integration in LCAO. diff --git a/source/module_basis/module_pw/pw_basis_sup.cpp b/source/module_basis/module_pw/pw_basis_sup.cpp index 1b420f60da..6408bd3627 100644 --- a/source/module_basis/module_pw/pw_basis_sup.cpp +++ b/source/module_basis/module_pw/pw_basis_sup.cpp @@ -1,4 +1,4 @@ -#include "module_base/timer.h" +#include "source_base/timer.h" #include "pw_basis.h" #include "module_parameter/parameter.h" namespace ModulePW diff --git a/source/module_basis/module_pw/pw_basis_sup.h b/source/module_basis/module_pw/pw_basis_sup.h index 1a093e8645..9e6ada0054 100644 --- a/source/module_basis/module_pw/pw_basis_sup.h +++ b/source/module_basis/module_pw/pw_basis_sup.h @@ -1,7 +1,7 @@ #ifndef PWBASIS_SUP_H #define PWBASIS_SUP_H -#include "module_base/complexmatrix.h" +#include "source_base/complexmatrix.h" namespace ModulePW { diff --git a/source/module_basis/module_pw/pw_distributeg.cpp b/source/module_basis/module_pw/pw_distributeg.cpp index 0ae3d51553..e3f8b791bd 100644 --- a/source/module_basis/module_pw/pw_distributeg.cpp +++ b/source/module_basis/module_pw/pw_distributeg.cpp @@ -1,7 +1,7 @@ #include "pw_basis.h" -#include "module_base/tool_quit.h" -#include "module_base/global_function.h" -#include "module_base/timer.h" +#include "source_base/tool_quit.h" +#include "source_base/global_function.h" +#include "source_base/timer.h" #include "module_parameter/parameter.h" namespace ModulePW { diff --git a/source/module_basis/module_pw/pw_distributeg_method1.cpp b/source/module_basis/module_pw/pw_distributeg_method1.cpp index bd3de9e26b..a3e3e4ac89 100644 --- a/source/module_basis/module_pw/pw_distributeg_method1.cpp +++ b/source/module_basis/module_pw/pw_distributeg_method1.cpp @@ -1,6 +1,6 @@ #include "pw_basis.h" -#include "module_base/mymath.h" -#include "module_base/global_function.h" +#include "source_base/mymath.h" +#include "source_base/global_function.h" namespace ModulePW diff --git a/source/module_basis/module_pw/pw_distributeg_method2.cpp b/source/module_basis/module_pw/pw_distributeg_method2.cpp index 2456a9d4ac..7c2ae76fb1 100644 --- a/source/module_basis/module_pw/pw_distributeg_method2.cpp +++ b/source/module_basis/module_pw/pw_distributeg_method2.cpp @@ -1,6 +1,6 @@ #include "pw_basis.h" -#include "module_base/mymath.h" -#include "module_base/global_function.h" +#include "source_base/mymath.h" +#include "source_base/global_function.h" namespace ModulePW diff --git a/source/module_basis/module_pw/pw_distributer.cpp b/source/module_basis/module_pw/pw_distributer.cpp index b4a577c12b..cc2b14f772 100644 --- a/source/module_basis/module_pw/pw_distributer.cpp +++ b/source/module_basis/module_pw/pw_distributer.cpp @@ -1,5 +1,5 @@ #include "pw_basis.h" -#include "module_base/global_function.h" +#include "source_base/global_function.h" namespace ModulePW { diff --git a/source/module_basis/module_pw/pw_gatherscatter.h b/source/module_basis/module_pw/pw_gatherscatter.h index 97be6e5c23..827182d997 100644 --- a/source/module_basis/module_pw/pw_gatherscatter.h +++ b/source/module_basis/module_pw/pw_gatherscatter.h @@ -1,6 +1,6 @@ #include "pw_basis.h" -#include "module_base/global_function.h" -#include "module_base/timer.h" +#include "source_base/global_function.h" +#include "source_base/timer.h" #include "typeinfo" namespace ModulePW { diff --git a/source/module_basis/module_pw/pw_init.cpp b/source/module_basis/module_pw/pw_init.cpp index b70662491e..08c676d39f 100644 --- a/source/module_basis/module_pw/pw_init.cpp +++ b/source/module_basis/module_pw/pw_init.cpp @@ -1,5 +1,5 @@ #include "pw_basis.h" -#include "module_base/constants.h" +#include "source_base/constants.h" namespace ModulePW { diff --git a/source/module_basis/module_pw/pw_transform.cpp b/source/module_basis/module_pw/pw_transform.cpp index 9d83d57e3c..075e8bb6a1 100644 --- a/source/module_basis/module_pw/pw_transform.cpp +++ b/source/module_basis/module_pw/pw_transform.cpp @@ -1,5 +1,5 @@ -#include "module_base/global_function.h" -#include "module_base/timer.h" +#include "source_base/global_function.h" +#include "source_base/timer.h" #include "module_basis/module_pw/kernels/pw_op.h" #include "module_fft/fft_bundle.h" #include "pw_basis.h" diff --git a/source/module_basis/module_pw/pw_transform_gpu.cpp b/source/module_basis/module_pw/pw_transform_gpu.cpp index 6b3cfb045f..1a8ecfc13d 100644 --- a/source/module_basis/module_pw/pw_transform_gpu.cpp +++ b/source/module_basis/module_pw/pw_transform_gpu.cpp @@ -1,4 +1,4 @@ -#include "module_base/timer.h" +#include "source_base/timer.h" #include "module_basis/module_pw/kernels/pw_op.h" #include "pw_basis.h" namespace ModulePW diff --git a/source/module_basis/module_pw/pw_transform_k.cpp b/source/module_basis/module_pw/pw_transform_k.cpp index 61fb2892c2..f6f40a88fe 100644 --- a/source/module_basis/module_pw/pw_transform_k.cpp +++ b/source/module_basis/module_pw/pw_transform_k.cpp @@ -1,4 +1,4 @@ -#include "module_base/timer.h" +#include "source_base/timer.h" #include "module_basis/module_pw/kernels/pw_op.h" #include "pw_basis_k.h" #include "pw_gatherscatter.h" diff --git a/source/module_basis/module_pw/pw_transform_k_dsp.cpp b/source/module_basis/module_pw/pw_transform_k_dsp.cpp index 8c33041c1f..a2ed5ecc1a 100644 --- a/source/module_basis/module_pw/pw_transform_k_dsp.cpp +++ b/source/module_basis/module_pw/pw_transform_k_dsp.cpp @@ -1,4 +1,4 @@ -#include "module_base/timer.h" +#include "source_base/timer.h" #include "module_basis/module_pw/kernels/pw_op.h" #include "pw_basis_k.h" #include "pw_gatherscatter.h" diff --git a/source/module_basis/module_pw/test/CMakeLists.txt b/source/module_basis/module_pw/test/CMakeLists.txt index 8b1038af93..8fddff4322 100644 --- a/source/module_basis/module_pw/test/CMakeLists.txt +++ b/source/module_basis/module_pw/test/CMakeLists.txt @@ -2,11 +2,11 @@ add_definitions(-D__NORMAL) AddTest( TARGET pw_test LIBS parameter ${math_libs} planewave device - SOURCES ../../../module_base/matrix.cpp ../../../module_base/complexmatrix.cpp ../../../module_base/matrix3.cpp ../../../module_base/tool_quit.cpp - ../../../module_base/mymath.cpp ../../../module_base/timer.cpp ../../../module_base/memory.cpp - ../../../module_base/blas_connector_base.cpp ../../../module_base/blas_connector_vector.cpp ../../../module_base/blas_connector_matrix.cpp - ../../../module_base/libm/branred.cpp ../../../module_base/libm/sincos.cpp - ../../../module_base/module_device/memory_op.cpp + SOURCES ../../../source_base/matrix.cpp ../../../source_base/complexmatrix.cpp ../../../source_base/matrix3.cpp ../../../source_base/tool_quit.cpp + ../../../source_base/mymath.cpp ../../../source_base/timer.cpp ../../../source_base/memory.cpp + ../../../source_base/blas_connector_base.cpp ../../../source_base/blas_connector_vector.cpp ../../../source_base/blas_connector_matrix.cpp + ../../../source_base/libm/branred.cpp ../../../source_base/libm/sincos.cpp + ../../../source_base/module_device/memory_op.cpp depend_mock.cpp pw_test.cpp test1-1-1.cpp test1-1-2.cpp test1-2.cpp test1-3.cpp test1-4.cpp test1-5.cpp test2-1-1.cpp test2-1-2.cpp test2-2.cpp test2-3.cpp test3-1.cpp test3-2.cpp test3-3.cpp test3-3-2.cpp diff --git a/source/module_basis/module_pw/test/Makefile b/source/module_basis/module_pw/test/Makefile index 0e60ff17bf..7d62b4a997 100644 --- a/source/module_basis/module_pw/test/Makefile +++ b/source/module_basis/module_pw/test/Makefile @@ -25,7 +25,7 @@ GTEST_DIR = /home/qianrui/gnucompile/g_gtest # Compiler information #========================== HONG = -D__NORMAL -INCLUDES = -I. -I../../../ -I../../../source_main -I../../../module_base/module_container +INCLUDES = -I. -I../../../ -I../../../source_main -I../../../source_base/module_container LIBS = OPTS = -Ofast -march=native -std=c++11 -m64 ${INCLUDES} OBJ_DIR = obj @@ -102,10 +102,10 @@ GTESTOPTS = -I${GTEST_DIR}/include -L${GTEST_DIR}/lib -lgtest -lpthread -w # Objects #========================== VPATH=../../../source_main\ -../../../module_base\ -../../../module_base/module_device\ -../../../module_base/module_container/ATen/core\ -../../../module_base/module_container/ATen\ +../../../source_base\ +../../../source_base/module_device\ +../../../source_base/module_container/ATen/core\ +../../../source_base/module_container/ATen\ ../../../module_parameter\ ../module_fft\ ../\ diff --git a/source/module_basis/module_pw/test/generate.cpp b/source/module_basis/module_pw/test/generate.cpp index 06876e4e8d..31998b5c67 100644 --- a/source/module_basis/module_pw/test/generate.cpp +++ b/source/module_basis/module_pw/test/generate.cpp @@ -1,9 +1,9 @@ #include "../pw_basis.h" #include "test_tool.h" -#include "module_base/parallel_global.h" +#include "source_base/parallel_global.h" #include "mpi.h" -#include "module_base/global_function.h" -#include "module_base/constants.h" +#include "source_base/global_function.h" +#include "source_base/constants.h" #include "pw_test.h" using namespace std; diff --git a/source/module_basis/module_pw/test/test-big.cpp b/source/module_basis/module_pw/test/test-big.cpp index a000a4b117..f1c2082d0b 100644 --- a/source/module_basis/module_pw/test/test-big.cpp +++ b/source/module_basis/module_pw/test/test-big.cpp @@ -4,11 +4,11 @@ #include "../pw_basis_k.h" #ifdef __MPI #include "test_tool.h" -#include "module_base/parallel_global.h" +#include "source_base/parallel_global.h" #include "mpi.h" #endif -#include "module_base/constants.h" -#include "module_base/global_function.h" +#include "source_base/constants.h" +#include "source_base/global_function.h" #include "pw_test.h" using namespace std; diff --git a/source/module_basis/module_pw/test/test-other.cpp b/source/module_basis/module_pw/test/test-other.cpp index 308f4c6c68..aee3c66ccd 100644 --- a/source/module_basis/module_pw/test/test-other.cpp +++ b/source/module_basis/module_pw/test/test-other.cpp @@ -4,12 +4,12 @@ #include "../pw_basis_k.h" #ifdef __MPI #include "test_tool.h" -#include "module_base/parallel_global.h" +#include "source_base/parallel_global.h" #include "mpi.h" #endif -#include "module_base/constants.h" -#include "module_base/global_function.h" -#include "module_base/module_device/types.h" +#include "source_base/constants.h" +#include "source_base/global_function.h" +#include "source_base/module_device/types.h" #include "pw_test.h" #include "gmock/gmock.h" diff --git a/source/module_basis/module_pw/test/test1-1-1.cpp b/source/module_basis/module_pw/test/test1-1-1.cpp index a7ea166c66..3eb9d8fd5e 100644 --- a/source/module_basis/module_pw/test/test1-1-1.cpp +++ b/source/module_basis/module_pw/test/test1-1-1.cpp @@ -1,11 +1,11 @@ #include "../pw_basis.h" #ifdef __MPI #include "test_tool.h" -#include "module_base/parallel_global.h" +#include "source_base/parallel_global.h" #include "mpi.h" #endif -#include "module_base/global_function.h" -#include "module_base/constants.h" +#include "source_base/global_function.h" +#include "source_base/constants.h" #include "pw_test.h" extern int nproc_in_pool,rank_in_pool; using namespace std; diff --git a/source/module_basis/module_pw/test/test1-1-2.cpp b/source/module_basis/module_pw/test/test1-1-2.cpp index 4f9aa5ec6f..699d70c803 100644 --- a/source/module_basis/module_pw/test/test1-1-2.cpp +++ b/source/module_basis/module_pw/test/test1-1-2.cpp @@ -1,11 +1,11 @@ #include "../pw_basis.h" #ifdef __MPI #include "test_tool.h" -#include "module_base/parallel_global.h" +#include "source_base/parallel_global.h" #include "mpi.h" #endif -#include "module_base/global_function.h" -#include "module_base/constants.h" +#include "source_base/global_function.h" +#include "source_base/constants.h" #include "pw_test.h" extern int nproc_in_pool,rank_in_pool; using namespace std; diff --git a/source/module_basis/module_pw/test/test1-2-2.cpp b/source/module_basis/module_pw/test/test1-2-2.cpp index db5b9765fb..2470c0a38f 100644 --- a/source/module_basis/module_pw/test/test1-2-2.cpp +++ b/source/module_basis/module_pw/test/test1-2-2.cpp @@ -4,11 +4,11 @@ #include "../pw_basis.h" #ifdef __MPI #include "test_tool.h" -#include "module_base/parallel_global.h" +#include "source_base/parallel_global.h" #include "mpi.h" #endif -#include "module_base/constants.h" -#include "module_base/global_function.h" +#include "source_base/constants.h" +#include "source_base/global_function.h" #include "pw_test.h" using namespace std; diff --git a/source/module_basis/module_pw/test/test1-2.cpp b/source/module_basis/module_pw/test/test1-2.cpp index 6f76590a81..add240917d 100644 --- a/source/module_basis/module_pw/test/test1-2.cpp +++ b/source/module_basis/module_pw/test/test1-2.cpp @@ -4,11 +4,11 @@ #include "../pw_basis.h" #ifdef __MPI #include "test_tool.h" -#include "module_base/parallel_global.h" +#include "source_base/parallel_global.h" #include "mpi.h" #endif -#include "module_base/constants.h" -#include "module_base/global_function.h" +#include "source_base/constants.h" +#include "source_base/global_function.h" #include "pw_test.h" using namespace std; diff --git a/source/module_basis/module_pw/test/test1-3.cpp b/source/module_basis/module_pw/test/test1-3.cpp index bb2103212e..19323b1f78 100644 --- a/source/module_basis/module_pw/test/test1-3.cpp +++ b/source/module_basis/module_pw/test/test1-3.cpp @@ -4,11 +4,11 @@ #include "../pw_basis.h" #ifdef __MPI #include "test_tool.h" -#include "module_base/parallel_global.h" +#include "source_base/parallel_global.h" #include "mpi.h" #endif -#include "module_base/constants.h" -#include "module_base/global_function.h" +#include "source_base/constants.h" +#include "source_base/global_function.h" #include "pw_test.h" using namespace std; diff --git a/source/module_basis/module_pw/test/test1-4.cpp b/source/module_basis/module_pw/test/test1-4.cpp index 4ea6ec5c9e..e2e0520a3d 100644 --- a/source/module_basis/module_pw/test/test1-4.cpp +++ b/source/module_basis/module_pw/test/test1-4.cpp @@ -4,11 +4,11 @@ #include "../pw_basis_k.h" #ifdef __MPI #include "test_tool.h" -#include "module_base/parallel_global.h" +#include "source_base/parallel_global.h" #include "mpi.h" #endif -#include "module_base/constants.h" -#include "module_base/global_function.h" +#include "source_base/constants.h" +#include "source_base/global_function.h" #include "pw_test.h" using namespace std; diff --git a/source/module_basis/module_pw/test/test1-5.cpp b/source/module_basis/module_pw/test/test1-5.cpp index 6729192d8a..7750694a14 100644 --- a/source/module_basis/module_pw/test/test1-5.cpp +++ b/source/module_basis/module_pw/test/test1-5.cpp @@ -4,11 +4,11 @@ #include "../pw_basis_k.h" #ifdef __MPI #include "test_tool.h" -#include "module_base/parallel_global.h" +#include "source_base/parallel_global.h" #include "mpi.h" #endif -#include "module_base/constants.h" -#include "module_base/global_function.h" +#include "source_base/constants.h" +#include "source_base/global_function.h" #include "pw_test.h" using namespace std; diff --git a/source/module_basis/module_pw/test/test2-1-1.cpp b/source/module_basis/module_pw/test/test2-1-1.cpp index a41e92a49b..57a70c6af3 100644 --- a/source/module_basis/module_pw/test/test2-1-1.cpp +++ b/source/module_basis/module_pw/test/test2-1-1.cpp @@ -1,11 +1,11 @@ #include "../pw_basis.h" #ifdef __MPI #include "test_tool.h" -#include "module_base/parallel_global.h" +#include "source_base/parallel_global.h" #include "mpi.h" #endif -#include "module_base/global_function.h" -#include "module_base/constants.h" +#include "source_base/global_function.h" +#include "source_base/constants.h" #include "pw_test.h" extern int nproc_in_pool,rank_in_pool; using namespace std; diff --git a/source/module_basis/module_pw/test/test2-1-2.cpp b/source/module_basis/module_pw/test/test2-1-2.cpp index 0a5713aabf..3824747800 100644 --- a/source/module_basis/module_pw/test/test2-1-2.cpp +++ b/source/module_basis/module_pw/test/test2-1-2.cpp @@ -1,11 +1,11 @@ #include "../pw_basis.h" #ifdef __MPI #include "test_tool.h" -#include "module_base/parallel_global.h" +#include "source_base/parallel_global.h" #include "mpi.h" #endif -#include "module_base/global_function.h" -#include "module_base/constants.h" +#include "source_base/global_function.h" +#include "source_base/constants.h" #include "pw_test.h" extern int nproc_in_pool,rank_in_pool; using namespace std; diff --git a/source/module_basis/module_pw/test/test2-2.cpp b/source/module_basis/module_pw/test/test2-2.cpp index 8ce6db3c1c..d9d6d7b8c3 100644 --- a/source/module_basis/module_pw/test/test2-2.cpp +++ b/source/module_basis/module_pw/test/test2-2.cpp @@ -4,11 +4,11 @@ #include "../pw_basis.h" #ifdef __MPI #include "test_tool.h" -#include "module_base/parallel_global.h" +#include "source_base/parallel_global.h" #include "mpi.h" #endif -#include "module_base/constants.h" -#include "module_base/global_function.h" +#include "source_base/constants.h" +#include "source_base/global_function.h" #include "pw_test.h" using namespace std; diff --git a/source/module_basis/module_pw/test/test2-3.cpp b/source/module_basis/module_pw/test/test2-3.cpp index 5f1d1b0cb5..a611ac8ef3 100644 --- a/source/module_basis/module_pw/test/test2-3.cpp +++ b/source/module_basis/module_pw/test/test2-3.cpp @@ -4,11 +4,11 @@ #include "../pw_basis.h" #ifdef __MPI #include "test_tool.h" -#include "module_base/parallel_global.h" +#include "source_base/parallel_global.h" #include "mpi.h" #endif -#include "module_base/constants.h" -#include "module_base/global_function.h" +#include "source_base/constants.h" +#include "source_base/global_function.h" #include "pw_test.h" using namespace std; diff --git a/source/module_basis/module_pw/test/test3-1.cpp b/source/module_basis/module_pw/test/test3-1.cpp index 800aa4dec6..33ac4f46b0 100644 --- a/source/module_basis/module_pw/test/test3-1.cpp +++ b/source/module_basis/module_pw/test/test3-1.cpp @@ -1,11 +1,11 @@ #include "../pw_basis.h" #ifdef __MPI #include "test_tool.h" -#include "module_base/parallel_global.h" +#include "source_base/parallel_global.h" #include "mpi.h" #endif -#include "module_base/global_function.h" -#include "module_base/constants.h" +#include "source_base/global_function.h" +#include "source_base/constants.h" #include "pw_test.h" extern int nproc_in_pool,rank_in_pool; using namespace std; diff --git a/source/module_basis/module_pw/test/test3-2.cpp b/source/module_basis/module_pw/test/test3-2.cpp index 9c667ab574..439fa2e811 100644 --- a/source/module_basis/module_pw/test/test3-2.cpp +++ b/source/module_basis/module_pw/test/test3-2.cpp @@ -4,11 +4,11 @@ #include "../pw_basis.h" #ifdef __MPI #include "test_tool.h" -#include "module_base/parallel_global.h" +#include "source_base/parallel_global.h" #include "mpi.h" #endif -#include "module_base/constants.h" -#include "module_base/global_function.h" +#include "source_base/constants.h" +#include "source_base/global_function.h" #include "pw_test.h" using namespace std; diff --git a/source/module_basis/module_pw/test/test3-3-2.cpp b/source/module_basis/module_pw/test/test3-3-2.cpp index 46decccd20..e86555c5de 100644 --- a/source/module_basis/module_pw/test/test3-3-2.cpp +++ b/source/module_basis/module_pw/test/test3-3-2.cpp @@ -4,11 +4,11 @@ #include "../pw_basis.h" #ifdef __MPI #include "test_tool.h" -#include "module_base/parallel_global.h" +#include "source_base/parallel_global.h" #include "mpi.h" #endif -#include "module_base/constants.h" -#include "module_base/global_function.h" +#include "source_base/constants.h" +#include "source_base/global_function.h" #include "pw_test.h" using namespace std; diff --git a/source/module_basis/module_pw/test/test3-3.cpp b/source/module_basis/module_pw/test/test3-3.cpp index 9195324892..fb6b471bf8 100644 --- a/source/module_basis/module_pw/test/test3-3.cpp +++ b/source/module_basis/module_pw/test/test3-3.cpp @@ -4,11 +4,11 @@ #include "../pw_basis.h" #ifdef __MPI #include "test_tool.h" -#include "module_base/parallel_global.h" +#include "source_base/parallel_global.h" #include "mpi.h" #endif -#include "module_base/constants.h" -#include "module_base/global_function.h" +#include "source_base/constants.h" +#include "source_base/global_function.h" #include "pw_test.h" using namespace std; diff --git a/source/module_basis/module_pw/test/test4-1.cpp b/source/module_basis/module_pw/test/test4-1.cpp index 06c8a5d716..0e6e17c82d 100644 --- a/source/module_basis/module_pw/test/test4-1.cpp +++ b/source/module_basis/module_pw/test/test4-1.cpp @@ -1,11 +1,11 @@ #include "../pw_basis.h" #ifdef __MPI #include "test_tool.h" -#include "module_base/parallel_global.h" +#include "source_base/parallel_global.h" #include "mpi.h" #endif -#include "module_base/global_function.h" -#include "module_base/constants.h" +#include "source_base/global_function.h" +#include "source_base/constants.h" #include "pw_test.h" extern int nproc_in_pool,rank_in_pool; using namespace std; diff --git a/source/module_basis/module_pw/test/test4-2.cpp b/source/module_basis/module_pw/test/test4-2.cpp index e1941a4b2f..32c51be221 100644 --- a/source/module_basis/module_pw/test/test4-2.cpp +++ b/source/module_basis/module_pw/test/test4-2.cpp @@ -4,11 +4,11 @@ #include "../pw_basis.h" #ifdef __MPI #include "test_tool.h" -#include "module_base/parallel_global.h" +#include "source_base/parallel_global.h" #include "mpi.h" #endif -#include "module_base/constants.h" -#include "module_base/global_function.h" +#include "source_base/constants.h" +#include "source_base/global_function.h" #include "pw_test.h" using namespace std; diff --git a/source/module_basis/module_pw/test/test4-3.cpp b/source/module_basis/module_pw/test/test4-3.cpp index 3700766743..a3e942bfc4 100644 --- a/source/module_basis/module_pw/test/test4-3.cpp +++ b/source/module_basis/module_pw/test/test4-3.cpp @@ -4,11 +4,11 @@ #include "../pw_basis.h" #ifdef __MPI #include "test_tool.h" -#include "module_base/parallel_global.h" +#include "source_base/parallel_global.h" #include "mpi.h" #endif -#include "module_base/constants.h" -#include "module_base/global_function.h" +#include "source_base/constants.h" +#include "source_base/global_function.h" #include "pw_test.h" using namespace std; diff --git a/source/module_basis/module_pw/test/test4-4.cpp b/source/module_basis/module_pw/test/test4-4.cpp index 7eb0241318..cde571e91c 100644 --- a/source/module_basis/module_pw/test/test4-4.cpp +++ b/source/module_basis/module_pw/test/test4-4.cpp @@ -4,11 +4,11 @@ #include "../pw_basis_k.h" #ifdef __MPI #include "test_tool.h" -#include "module_base/parallel_global.h" +#include "source_base/parallel_global.h" #include "mpi.h" #endif -#include "module_base/constants.h" -#include "module_base/global_function.h" +#include "source_base/constants.h" +#include "source_base/global_function.h" #include "pw_test.h" using namespace std; diff --git a/source/module_basis/module_pw/test/test4-5.cpp b/source/module_basis/module_pw/test/test4-5.cpp index c2aea38c8c..22235eff81 100644 --- a/source/module_basis/module_pw/test/test4-5.cpp +++ b/source/module_basis/module_pw/test/test4-5.cpp @@ -4,11 +4,11 @@ #include "../pw_basis_k.h" #ifdef __MPI #include "test_tool.h" -#include "module_base/parallel_global.h" +#include "source_base/parallel_global.h" #include "mpi.h" #endif -#include "module_base/constants.h" -#include "module_base/global_function.h" +#include "source_base/constants.h" +#include "source_base/global_function.h" #include "pw_test.h" using namespace std; diff --git a/source/module_basis/module_pw/test/test5-1-1.cpp b/source/module_basis/module_pw/test/test5-1-1.cpp index f669733eee..1fb800d9e9 100644 --- a/source/module_basis/module_pw/test/test5-1-1.cpp +++ b/source/module_basis/module_pw/test/test5-1-1.cpp @@ -1,11 +1,11 @@ #include "../pw_basis.h" #ifdef __MPI #include "test_tool.h" -#include "module_base/parallel_global.h" +#include "source_base/parallel_global.h" #include "mpi.h" #endif -#include "module_base/global_function.h" -#include "module_base/constants.h" +#include "source_base/global_function.h" +#include "source_base/constants.h" #include "pw_test.h" extern int nproc_in_pool,rank_in_pool; using namespace std; diff --git a/source/module_basis/module_pw/test/test5-1-2.cpp b/source/module_basis/module_pw/test/test5-1-2.cpp index 77cec7c36a..50b6c17c49 100644 --- a/source/module_basis/module_pw/test/test5-1-2.cpp +++ b/source/module_basis/module_pw/test/test5-1-2.cpp @@ -1,11 +1,11 @@ #include "../pw_basis.h" #ifdef __MPI #include "test_tool.h" -#include "module_base/parallel_global.h" +#include "source_base/parallel_global.h" #include "mpi.h" #endif -#include "module_base/global_function.h" -#include "module_base/constants.h" +#include "source_base/global_function.h" +#include "source_base/constants.h" #include "pw_test.h" extern int nproc_in_pool,rank_in_pool; using namespace std; diff --git a/source/module_basis/module_pw/test/test5-2-1.cpp b/source/module_basis/module_pw/test/test5-2-1.cpp index fdc624522b..a05306285d 100644 --- a/source/module_basis/module_pw/test/test5-2-1.cpp +++ b/source/module_basis/module_pw/test/test5-2-1.cpp @@ -1,11 +1,11 @@ #include "../pw_basis.h" #ifdef __MPI #include "test_tool.h" -#include "module_base/parallel_global.h" +#include "source_base/parallel_global.h" #include "mpi.h" #endif -#include "module_base/global_function.h" -#include "module_base/constants.h" +#include "source_base/global_function.h" +#include "source_base/constants.h" #include "pw_test.h" extern int nproc_in_pool,rank_in_pool; using namespace std; diff --git a/source/module_basis/module_pw/test/test5-2-2.cpp b/source/module_basis/module_pw/test/test5-2-2.cpp index 530e27be2a..080a58af6f 100644 --- a/source/module_basis/module_pw/test/test5-2-2.cpp +++ b/source/module_basis/module_pw/test/test5-2-2.cpp @@ -1,11 +1,11 @@ #include "../pw_basis.h" #ifdef __MPI #include "test_tool.h" -#include "module_base/parallel_global.h" +#include "source_base/parallel_global.h" #include "mpi.h" #endif -#include "module_base/global_function.h" -#include "module_base/constants.h" +#include "source_base/global_function.h" +#include "source_base/constants.h" #include "pw_test.h" extern int nproc_in_pool,rank_in_pool; using namespace std; diff --git a/source/module_basis/module_pw/test/test5-3-1.cpp b/source/module_basis/module_pw/test/test5-3-1.cpp index 5ce5d80dea..29ff78927a 100644 --- a/source/module_basis/module_pw/test/test5-3-1.cpp +++ b/source/module_basis/module_pw/test/test5-3-1.cpp @@ -4,11 +4,11 @@ #include "../pw_basis.h" #ifdef __MPI #include "test_tool.h" -#include "module_base/parallel_global.h" +#include "source_base/parallel_global.h" #include "mpi.h" #endif -#include "module_base/constants.h" -#include "module_base/global_function.h" +#include "source_base/constants.h" +#include "source_base/global_function.h" #include "pw_test.h" using namespace std; diff --git a/source/module_basis/module_pw/test/test5-4-1.cpp b/source/module_basis/module_pw/test/test5-4-1.cpp index ac6a38c1b8..6743e8b6e8 100644 --- a/source/module_basis/module_pw/test/test5-4-1.cpp +++ b/source/module_basis/module_pw/test/test5-4-1.cpp @@ -4,11 +4,11 @@ #include "../pw_basis.h" #ifdef __MPI #include "test_tool.h" -#include "module_base/parallel_global.h" +#include "source_base/parallel_global.h" #include "mpi.h" #endif -#include "module_base/constants.h" -#include "module_base/global_function.h" +#include "source_base/constants.h" +#include "source_base/global_function.h" #include "pw_test.h" using namespace std; diff --git a/source/module_basis/module_pw/test/test5-4-2.cpp b/source/module_basis/module_pw/test/test5-4-2.cpp index 4aefc7e49d..b86b423715 100644 --- a/source/module_basis/module_pw/test/test5-4-2.cpp +++ b/source/module_basis/module_pw/test/test5-4-2.cpp @@ -4,11 +4,11 @@ #include "../pw_basis.h" #ifdef __MPI #include "test_tool.h" -#include "module_base/parallel_global.h" +#include "source_base/parallel_global.h" #include "mpi.h" #endif -#include "module_base/constants.h" -#include "module_base/global_function.h" +#include "source_base/constants.h" +#include "source_base/global_function.h" #include "pw_test.h" using namespace std; diff --git a/source/module_basis/module_pw/test/test6-1-1.cpp b/source/module_basis/module_pw/test/test6-1-1.cpp index 904b120f62..d7cce63c82 100644 --- a/source/module_basis/module_pw/test/test6-1-1.cpp +++ b/source/module_basis/module_pw/test/test6-1-1.cpp @@ -1,11 +1,11 @@ #include "../pw_basis.h" #ifdef __MPI #include "test_tool.h" -#include "module_base/parallel_global.h" +#include "source_base/parallel_global.h" #include "mpi.h" #endif -#include "module_base/global_function.h" -#include "module_base/constants.h" +#include "source_base/global_function.h" +#include "source_base/constants.h" #include "pw_test.h" extern int nproc_in_pool,rank_in_pool; using namespace std; diff --git a/source/module_basis/module_pw/test/test6-1-2.cpp b/source/module_basis/module_pw/test/test6-1-2.cpp index f9434655c5..8aa431441c 100644 --- a/source/module_basis/module_pw/test/test6-1-2.cpp +++ b/source/module_basis/module_pw/test/test6-1-2.cpp @@ -1,11 +1,11 @@ #include "../pw_basis.h" #ifdef __MPI #include "test_tool.h" -#include "module_base/parallel_global.h" +#include "source_base/parallel_global.h" #include "mpi.h" #endif -#include "module_base/global_function.h" -#include "module_base/constants.h" +#include "source_base/global_function.h" +#include "source_base/constants.h" #include "pw_test.h" extern int nproc_in_pool,rank_in_pool; using namespace std; diff --git a/source/module_basis/module_pw/test/test6-2-1.cpp b/source/module_basis/module_pw/test/test6-2-1.cpp index 684c95d2e7..8473553e00 100644 --- a/source/module_basis/module_pw/test/test6-2-1.cpp +++ b/source/module_basis/module_pw/test/test6-2-1.cpp @@ -1,11 +1,11 @@ #include "../pw_basis.h" #ifdef __MPI #include "test_tool.h" -#include "module_base/parallel_global.h" +#include "source_base/parallel_global.h" #include "mpi.h" #endif -#include "module_base/global_function.h" -#include "module_base/constants.h" +#include "source_base/global_function.h" +#include "source_base/constants.h" #include "pw_test.h" extern int nproc_in_pool,rank_in_pool; using namespace std; diff --git a/source/module_basis/module_pw/test/test6-2-2.cpp b/source/module_basis/module_pw/test/test6-2-2.cpp index ae3fe8e337..87a8b19af1 100644 --- a/source/module_basis/module_pw/test/test6-2-2.cpp +++ b/source/module_basis/module_pw/test/test6-2-2.cpp @@ -1,11 +1,11 @@ #include "../pw_basis.h" #ifdef __MPI #include "test_tool.h" -#include "module_base/parallel_global.h" +#include "source_base/parallel_global.h" #include "mpi.h" #endif -#include "module_base/global_function.h" -#include "module_base/constants.h" +#include "source_base/global_function.h" +#include "source_base/constants.h" #include "pw_test.h" extern int nproc_in_pool,rank_in_pool; using namespace std; diff --git a/source/module_basis/module_pw/test/test6-3-1.cpp b/source/module_basis/module_pw/test/test6-3-1.cpp index 76e44d34f6..8531a230d5 100644 --- a/source/module_basis/module_pw/test/test6-3-1.cpp +++ b/source/module_basis/module_pw/test/test6-3-1.cpp @@ -4,11 +4,11 @@ #include "../pw_basis.h" #ifdef __MPI #include "test_tool.h" -#include "module_base/parallel_global.h" +#include "source_base/parallel_global.h" #include "mpi.h" #endif -#include "module_base/constants.h" -#include "module_base/global_function.h" +#include "source_base/constants.h" +#include "source_base/global_function.h" #include "pw_test.h" using namespace std; diff --git a/source/module_basis/module_pw/test/test6-4-1.cpp b/source/module_basis/module_pw/test/test6-4-1.cpp index 646c662399..e87cd67d3b 100644 --- a/source/module_basis/module_pw/test/test6-4-1.cpp +++ b/source/module_basis/module_pw/test/test6-4-1.cpp @@ -4,11 +4,11 @@ #include "../pw_basis.h" #ifdef __MPI #include "test_tool.h" -#include "module_base/parallel_global.h" +#include "source_base/parallel_global.h" #include "mpi.h" #endif -#include "module_base/constants.h" -#include "module_base/global_function.h" +#include "source_base/constants.h" +#include "source_base/global_function.h" #include "pw_test.h" using namespace std; diff --git a/source/module_basis/module_pw/test/test6-4-2.cpp b/source/module_basis/module_pw/test/test6-4-2.cpp index 3e8531bdb8..31d4c90e5e 100644 --- a/source/module_basis/module_pw/test/test6-4-2.cpp +++ b/source/module_basis/module_pw/test/test6-4-2.cpp @@ -4,11 +4,11 @@ #include "../pw_basis.h" #ifdef __MPI #include "test_tool.h" -#include "module_base/parallel_global.h" +#include "source_base/parallel_global.h" #include "mpi.h" #endif -#include "module_base/constants.h" -#include "module_base/global_function.h" +#include "source_base/constants.h" +#include "source_base/global_function.h" #include "pw_test.h" using namespace std; diff --git a/source/module_basis/module_pw/test/test7-1.cpp b/source/module_basis/module_pw/test/test7-1.cpp index 7ec6630061..8492779792 100644 --- a/source/module_basis/module_pw/test/test7-1.cpp +++ b/source/module_basis/module_pw/test/test7-1.cpp @@ -1,11 +1,11 @@ #include "../pw_basis.h" #ifdef __MPI #include "test_tool.h" -#include "module_base/parallel_global.h" +#include "source_base/parallel_global.h" #include "mpi.h" #endif -#include "module_base/global_function.h" -#include "module_base/constants.h" +#include "source_base/global_function.h" +#include "source_base/constants.h" #include "pw_test.h" extern int nproc_in_pool,rank_in_pool; using namespace std; diff --git a/source/module_basis/module_pw/test/test7-2-1.cpp b/source/module_basis/module_pw/test/test7-2-1.cpp index d79768285c..50dac0fad8 100644 --- a/source/module_basis/module_pw/test/test7-2-1.cpp +++ b/source/module_basis/module_pw/test/test7-2-1.cpp @@ -4,11 +4,11 @@ #include "../pw_basis.h" #ifdef __MPI #include "test_tool.h" -#include "module_base/parallel_global.h" +#include "source_base/parallel_global.h" #include "mpi.h" #endif -#include "module_base/constants.h" -#include "module_base/global_function.h" +#include "source_base/constants.h" +#include "source_base/global_function.h" #include "pw_test.h" using namespace std; diff --git a/source/module_basis/module_pw/test/test7-3-1.cpp b/source/module_basis/module_pw/test/test7-3-1.cpp index 7970368d74..10f13b7def 100644 --- a/source/module_basis/module_pw/test/test7-3-1.cpp +++ b/source/module_basis/module_pw/test/test7-3-1.cpp @@ -4,11 +4,11 @@ #include "../pw_basis.h" #ifdef __MPI #include "test_tool.h" -#include "module_base/parallel_global.h" +#include "source_base/parallel_global.h" #include "mpi.h" #endif -#include "module_base/constants.h" -#include "module_base/global_function.h" +#include "source_base/constants.h" +#include "source_base/global_function.h" #include "pw_test.h" using namespace std; diff --git a/source/module_basis/module_pw/test/test7-3-2.cpp b/source/module_basis/module_pw/test/test7-3-2.cpp index 279efb21ce..66ed6cc6d8 100644 --- a/source/module_basis/module_pw/test/test7-3-2.cpp +++ b/source/module_basis/module_pw/test/test7-3-2.cpp @@ -4,11 +4,11 @@ #include "../pw_basis.h" #ifdef __MPI #include "test_tool.h" -#include "module_base/parallel_global.h" +#include "source_base/parallel_global.h" #include "mpi.h" #endif -#include "module_base/constants.h" -#include "module_base/global_function.h" +#include "source_base/constants.h" +#include "source_base/global_function.h" #include "pw_test.h" using namespace std; diff --git a/source/module_basis/module_pw/test/test8-1.cpp b/source/module_basis/module_pw/test/test8-1.cpp index ee7e8dc985..0204e14fa4 100644 --- a/source/module_basis/module_pw/test/test8-1.cpp +++ b/source/module_basis/module_pw/test/test8-1.cpp @@ -1,11 +1,11 @@ #include "../pw_basis.h" #ifdef __MPI #include "test_tool.h" -#include "module_base/parallel_global.h" +#include "source_base/parallel_global.h" #include "mpi.h" #endif -#include "module_base/global_function.h" -#include "module_base/constants.h" +#include "source_base/global_function.h" +#include "source_base/constants.h" #include "pw_test.h" extern int nproc_in_pool,rank_in_pool; using namespace std; diff --git a/source/module_basis/module_pw/test/test8-2-1.cpp b/source/module_basis/module_pw/test/test8-2-1.cpp index 351c77e835..9f796162d2 100644 --- a/source/module_basis/module_pw/test/test8-2-1.cpp +++ b/source/module_basis/module_pw/test/test8-2-1.cpp @@ -4,11 +4,11 @@ #include "../pw_basis.h" #ifdef __MPI #include "test_tool.h" -#include "module_base/parallel_global.h" +#include "source_base/parallel_global.h" #include "mpi.h" #endif -#include "module_base/constants.h" -#include "module_base/global_function.h" +#include "source_base/constants.h" +#include "source_base/global_function.h" #include "pw_test.h" using namespace std; diff --git a/source/module_basis/module_pw/test/test8-3-1.cpp b/source/module_basis/module_pw/test/test8-3-1.cpp index 6dbbb73f7c..b40dac1e21 100644 --- a/source/module_basis/module_pw/test/test8-3-1.cpp +++ b/source/module_basis/module_pw/test/test8-3-1.cpp @@ -4,11 +4,11 @@ #include "../pw_basis.h" #ifdef __MPI #include "test_tool.h" -#include "module_base/parallel_global.h" +#include "source_base/parallel_global.h" #include "mpi.h" #endif -#include "module_base/constants.h" -#include "module_base/global_function.h" +#include "source_base/constants.h" +#include "source_base/global_function.h" #include "pw_test.h" using namespace std; diff --git a/source/module_basis/module_pw/test/test8-3-2.cpp b/source/module_basis/module_pw/test/test8-3-2.cpp index e60d878f6c..563cad8e85 100644 --- a/source/module_basis/module_pw/test/test8-3-2.cpp +++ b/source/module_basis/module_pw/test/test8-3-2.cpp @@ -4,11 +4,11 @@ #include "../pw_basis.h" #ifdef __MPI #include "test_tool.h" -#include "module_base/parallel_global.h" +#include "source_base/parallel_global.h" #include "mpi.h" #endif -#include "module_base/constants.h" -#include "module_base/global_function.h" +#include "source_base/constants.h" +#include "source_base/global_function.h" #include "pw_test.h" using namespace std; diff --git a/source/module_basis/module_pw/test/test_sup.cpp b/source/module_basis/module_pw/test/test_sup.cpp index c3a10a85fc..188aabc4ed 100644 --- a/source/module_basis/module_pw/test/test_sup.cpp +++ b/source/module_basis/module_pw/test/test_sup.cpp @@ -1,11 +1,11 @@ #include "../pw_basis.h" #ifdef __MPI -#include "module_base/parallel_global.h" +#include "source_base/parallel_global.h" #include "mpi.h" #include "test_tool.h" #endif -#include "module_base/constants.h" -#include "module_base/global_function.h" +#include "source_base/constants.h" +#include "source_base/global_function.h" #include "pw_test.h" extern int nproc_in_pool, rank_in_pool; using namespace std; diff --git a/source/module_basis/module_pw/test_gpu/pw_basis_C2C.cpp b/source/module_basis/module_pw/test_gpu/pw_basis_C2C.cpp index 9ec1f00ce0..dab015bf51 100644 --- a/source/module_basis/module_pw/test_gpu/pw_basis_C2C.cpp +++ b/source/module_basis/module_pw/test_gpu/pw_basis_C2C.cpp @@ -1,7 +1,7 @@ #include "cuda_runtime.h" #include "fftw3.h" -#include "module_base/module_device/device.h" -#include "module_base/vector3.h" +#include "source_base/module_device/device.h" +#include "source_base/vector3.h" #include "module_basis/module_pw/pw_basis.h" #include "module_basis/module_pw/pw_basis_k.h" diff --git a/source/module_basis/module_pw/test_gpu/pw_basis_C2R.cpp b/source/module_basis/module_pw/test_gpu/pw_basis_C2R.cpp index 398805c2ef..635dfd2935 100644 --- a/source/module_basis/module_pw/test_gpu/pw_basis_C2R.cpp +++ b/source/module_basis/module_pw/test_gpu/pw_basis_C2R.cpp @@ -1,7 +1,7 @@ #include "cuda_runtime.h" #include "fftw3.h" -#include "module_base/module_device/device.h" -#include "module_base/vector3.h" +#include "source_base/module_device/device.h" +#include "source_base/vector3.h" #include "module_basis/module_pw/pw_basis.h" #include diff --git a/source/module_basis/module_pw/test_gpu/pw_basis_k_C2C.cpp b/source/module_basis/module_pw/test_gpu/pw_basis_k_C2C.cpp index fe215a0841..9772c6e2fa 100644 --- a/source/module_basis/module_pw/test_gpu/pw_basis_k_C2C.cpp +++ b/source/module_basis/module_pw/test_gpu/pw_basis_k_C2C.cpp @@ -1,7 +1,7 @@ #include "cuda_runtime.h" #include "fftw3.h" -#include "module_base/module_device/device.h" -#include "module_base/vector3.h" +#include "source_base/module_device/device.h" +#include "source_base/vector3.h" #include "module_basis/module_pw/pw_basis.h" #include "module_basis/module_pw/pw_basis_k.h" diff --git a/source/module_basis/module_pw/test_serial/pw_basis_k_test.cpp b/source/module_basis/module_pw/test_serial/pw_basis_k_test.cpp index 2b4b4fc6ce..84932bae2f 100644 --- a/source/module_basis/module_pw/test_serial/pw_basis_k_test.cpp +++ b/source/module_basis/module_pw/test_serial/pw_basis_k_test.cpp @@ -1,7 +1,7 @@ #include "gtest/gtest.h" -#include "module_base/global_function.h" -#include "module_base/constants.h" -#include "module_base/matrix3.h" +#include "source_base/global_function.h" +#include "source_base/constants.h" +#include "source_base/matrix3.h" /************************************************ * serial unit test of functions in pw_basis.cpp diff --git a/source/module_basis/module_pw/test_serial/pw_basis_test.cpp b/source/module_basis/module_pw/test_serial/pw_basis_test.cpp index 0814263ef2..ea678b9d97 100644 --- a/source/module_basis/module_pw/test_serial/pw_basis_test.cpp +++ b/source/module_basis/module_pw/test_serial/pw_basis_test.cpp @@ -1,7 +1,7 @@ #include "gtest/gtest.h" -#include "module_base/global_function.h" -#include "module_base/constants.h" -#include "module_base/matrix3.h" +#include "source_base/global_function.h" +#include "source_base/constants.h" +#include "source_base/matrix3.h" /************************************************ * serial unit test of functions in pw_basis.cpp diff --git a/source/module_cell/atom_pseudo.cpp b/source/module_cell/atom_pseudo.cpp index 0b6767f8ed..f4a6dae50d 100644 --- a/source/module_cell/atom_pseudo.cpp +++ b/source/module_cell/atom_pseudo.cpp @@ -142,7 +142,7 @@ void Atom_pseudo::set_d_so(ModuleBase::ComplexMatrix& d_so_in, return; } -#include "module_base/parallel_common.h" +#include "source_base/parallel_common.h" #ifdef __MPI void Atom_pseudo::bcast_atom_pseudo() diff --git a/source/module_cell/atom_pseudo.h b/source/module_cell/atom_pseudo.h index c02687c78f..356798d5fb 100644 --- a/source/module_cell/atom_pseudo.h +++ b/source/module_cell/atom_pseudo.h @@ -1,11 +1,11 @@ #ifndef ATOM_PSEUDO_H #define ATOM_PSEUDO_H -#include "module_base/global_variable.h" -#include "module_base/vector3.h" +#include "source_base/global_variable.h" +#include "source_base/vector3.h" #include "module_io/output.h" -#include "module_base/complexarray.h" -#include "module_base/complexmatrix.h" +#include "source_base/complexarray.h" +#include "source_base/complexmatrix.h" #include "pseudo.h" diff --git a/source/module_cell/atom_spec.cpp b/source/module_cell/atom_spec.cpp index db6e9086e5..6cf293c69e 100644 --- a/source/module_cell/atom_spec.cpp +++ b/source/module_cell/atom_spec.cpp @@ -73,7 +73,7 @@ void Atom::print_Atom(std::ofstream& ofs) return; } -#include "module_base/parallel_common.h" +#include "source_base/parallel_common.h" #ifdef __MPI void Atom::bcast_atom() { diff --git a/source/module_cell/bcast_cell.cpp b/source/module_cell/bcast_cell.cpp index bb07b54e82..d0863df131 100644 --- a/source/module_cell/bcast_cell.cpp +++ b/source/module_cell/bcast_cell.cpp @@ -1,5 +1,5 @@ #include "unitcell.h" -#include "module_base/parallel_common.h" +#include "source_base/parallel_common.h" #include "module_parameter/parameter.h" #ifdef __EXX #include "module_ri/serialization_cereal.h" diff --git a/source/module_cell/cell_index.cpp b/source/module_cell/cell_index.cpp index 3470d1ee82..75708dec76 100644 --- a/source/module_cell/cell_index.cpp +++ b/source/module_cell/cell_index.cpp @@ -1,7 +1,7 @@ #include "cell_index.h" -#include "module_base/name_angular.h" -#include "module_base/tool_quit.h" +#include "source_base/name_angular.h" +#include "source_base/tool_quit.h" #include CellIndex::CellIndex(const std::vector& atomLabels_in, diff --git a/source/module_cell/check_atomic_stru.cpp b/source/module_cell/check_atomic_stru.cpp index b22cfe985d..f2c55f7101 100644 --- a/source/module_cell/check_atomic_stru.cpp +++ b/source/module_cell/check_atomic_stru.cpp @@ -1,7 +1,7 @@ #include "check_atomic_stru.h" -#include "module_base/element_covalent_radius.h" -#include "module_base/timer.h" +#include "source_base/element_covalent_radius.h" +#include "source_base/timer.h" namespace unitcell { diff --git a/source/module_cell/k_vector_utils.cpp b/source/module_cell/k_vector_utils.cpp index a9dd7e7f56..db80488979 100644 --- a/source/module_cell/k_vector_utils.cpp +++ b/source/module_cell/k_vector_utils.cpp @@ -4,12 +4,12 @@ #include "k_vector_utils.h" #include "klist.h" -#include "module_base/global_variable.h" -#include "module_base/matrix3.h" +#include "source_base/global_variable.h" +#include "source_base/matrix3.h" -#include "module_base/formatter.h" -#include "module_base/parallel_common.h" -#include "module_base/parallel_reduce.h" +#include "source_base/formatter.h" +#include "source_base/parallel_common.h" +#include "source_base/parallel_reduce.h" #include "module_parameter/parameter.h" namespace KVectorUtils diff --git a/source/module_cell/k_vector_utils.h b/source/module_cell/k_vector_utils.h index c492a49ad0..0270ad9a47 100644 --- a/source/module_cell/k_vector_utils.h +++ b/source/module_cell/k_vector_utils.h @@ -5,8 +5,8 @@ #ifndef K_VECTOR_UTILS_H #define K_VECTOR_UTILS_H -#include "module_base/global_variable.h" -#include "module_base/matrix3.h" +#include "source_base/global_variable.h" +#include "source_base/matrix3.h" #include "module_cell/unitcell.h" class K_Vectors; diff --git a/source/module_cell/klist.cpp b/source/module_cell/klist.cpp index da5f9f16a0..3ae6984be9 100644 --- a/source/module_cell/klist.cpp +++ b/source/module_cell/klist.cpp @@ -1,11 +1,11 @@ #include "klist.h" #include "k_vector_utils.h" -#include "module_base/formatter.h" -#include "module_base/memory.h" -#include "module_base/parallel_common.h" -#include "module_base/parallel_global.h" -#include "module_base/parallel_reduce.h" +#include "source_base/formatter.h" +#include "source_base/memory.h" +#include "source_base/parallel_common.h" +#include "source_base/parallel_global.h" +#include "source_base/parallel_reduce.h" #include "module_cell/module_symmetry/symmetry.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" #include "module_io/berryphase.h" diff --git a/source/module_cell/klist.h b/source/module_cell/klist.h index a832c1959f..6fe95624e4 100644 --- a/source/module_cell/klist.h +++ b/source/module_cell/klist.h @@ -1,9 +1,9 @@ #ifndef K_VECTORS_H #define K_VECTORS_H -#include "module_base/global_function.h" -#include "module_base/global_variable.h" -#include "module_base/matrix3.h" +#include "source_base/global_function.h" +#include "source_base/global_variable.h" +#include "source_base/matrix3.h" #include "module_cell/unitcell.h" #include "parallel_kpoints.h" #include "k_vector_utils.h" diff --git a/source/module_cell/module_neighbor/sltk_atom.h b/source/module_cell/module_neighbor/sltk_atom.h index 76b4a8c314..94406417ae 100644 --- a/source/module_cell/module_neighbor/sltk_atom.h +++ b/source/module_cell/module_neighbor/sltk_atom.h @@ -3,7 +3,7 @@ #include #include "sltk_util.h" -#include "module_base/timer.h" +#include "source_base/timer.h" #include // a class contains the atom position, diff --git a/source/module_cell/module_neighbor/sltk_atom_arrange.cpp b/source/module_cell/module_neighbor/sltk_atom_arrange.cpp index 24c72a4a12..803382a0f6 100644 --- a/source/module_cell/module_neighbor/sltk_atom_arrange.cpp +++ b/source/module_cell/module_neighbor/sltk_atom_arrange.cpp @@ -1,6 +1,6 @@ #include "sltk_atom_arrange.h" -#include "module_base/timer.h" +#include "source_base/timer.h" #include "module_parameter/parameter.h" #include "sltk_grid.h" #include "sltk_grid_driver.h" diff --git a/source/module_cell/module_neighbor/sltk_grid.cpp b/source/module_cell/module_neighbor/sltk_grid.cpp index 73ccbcf989..9b1d86b957 100644 --- a/source/module_cell/module_neighbor/sltk_grid.cpp +++ b/source/module_cell/module_neighbor/sltk_grid.cpp @@ -1,9 +1,9 @@ #include "sltk_grid.h" -#include "module_base/global_function.h" -#include "module_base/global_variable.h" -#include "module_base/memory.h" -#include "module_base/timer.h" +#include "source_base/global_function.h" +#include "source_base/global_variable.h" +#include "source_base/memory.h" +#include "source_base/timer.h" Grid::Grid(const int& test_grid_in) : test_grid(test_grid_in) { diff --git a/source/module_cell/module_neighbor/sltk_grid_driver.cpp b/source/module_cell/module_neighbor/sltk_grid_driver.cpp index 01aaf63bae..018318aade 100644 --- a/source/module_cell/module_neighbor/sltk_grid_driver.cpp +++ b/source/module_cell/module_neighbor/sltk_grid_driver.cpp @@ -1,8 +1,8 @@ #include "sltk_grid_driver.h" -#include "module_base/global_function.h" -#include "module_base/global_variable.h" -#include "module_base/timer.h" +#include "source_base/global_function.h" +#include "source_base/global_variable.h" +#include "source_base/timer.h" #include "module_parameter/parameter.h" #ifdef _OPENMP diff --git a/source/module_cell/module_neighbor/sltk_grid_driver.h b/source/module_cell/module_neighbor/sltk_grid_driver.h index 1316420a1e..686739d92e 100644 --- a/source/module_cell/module_neighbor/sltk_grid_driver.h +++ b/source/module_cell/module_neighbor/sltk_grid_driver.h @@ -1,9 +1,9 @@ #ifndef GRID_DRIVER_H #define GRID_DRIVER_H -#include "module_base/global_function.h" -#include "module_base/global_variable.h" -#include "module_base/vector3.h" +#include "source_base/global_function.h" +#include "source_base/global_variable.h" +#include "source_base/vector3.h" #include "module_cell/unitcell.h" #include "module_hamilt_pw/hamilt_pwdft/structure_factor.h" #include "sltk_atom.h" diff --git a/source/module_cell/module_neighbor/test/prepare_unitcell.h b/source/module_cell/module_neighbor/test/prepare_unitcell.h index a494215b9c..7af6d01e90 100644 --- a/source/module_cell/module_neighbor/test/prepare_unitcell.h +++ b/source/module_cell/module_neighbor/test/prepare_unitcell.h @@ -2,7 +2,7 @@ #define PREPARE_UNITCELL_H #include #include -#include "module_base/mathzone.h" +#include "source_base/mathzone.h" class UcellTestPrepare { diff --git a/source/module_cell/module_symmetry/run_symmetry.cpp b/source/module_cell/module_symmetry/run_symmetry.cpp index 2eff5fb0ae..b950a805a7 100644 --- a/source/module_cell/module_symmetry/run_symmetry.cpp +++ b/source/module_cell/module_symmetry/run_symmetry.cpp @@ -3,8 +3,8 @@ #include #include #include "symmetry.h" -#include "module_base/global_variable.h" -#include "module_base/parallel_global.h" +#include "source_base/global_variable.h" +#include "source_base/parallel_global.h" void calculate(); diff --git a/source/module_cell/module_symmetry/symm_other.h b/source/module_cell/module_symmetry/symm_other.h index 8107d7f632..a2295ded18 100644 --- a/source/module_cell/module_symmetry/symm_other.h +++ b/source/module_cell/module_symmetry/symm_other.h @@ -1,8 +1,8 @@ #ifndef SYMM_OTHER_H #define SYMM_OTHER_H -#include "module_base/vector3.h" -#include "module_base/global_function.h" +#include "source_base/vector3.h" +#include "source_base/global_function.h" namespace ModuleSymmetry { namespace Symm_Other diff --git a/source/module_cell/module_symmetry/symm_rho.cpp b/source/module_cell/module_symmetry/symm_rho.cpp index 858054df23..0b5bac03b9 100644 --- a/source/module_cell/module_symmetry/symm_rho.cpp +++ b/source/module_cell/module_symmetry/symm_rho.cpp @@ -1,7 +1,7 @@ #include "symmetry.h" using namespace ModuleSymmetry; -#include "module_base/libm/libm.h" +#include "source_base/libm/libm.h" #include "module_parameter/parameter.h" void Symmetry::rho_symmetry( double *rho, diff --git a/source/module_cell/module_symmetry/symmetry.h b/source/module_cell/module_symmetry/symmetry.h index 748ca49d58..a8d9636405 100644 --- a/source/module_cell/module_symmetry/symmetry.h +++ b/source/module_cell/module_symmetry/symmetry.h @@ -3,9 +3,9 @@ #include "module_cell/unitcell_data.h" #include "module_cell/atom_spec.h" -#include "module_base/timer.h" -#include "module_base/mathzone.h" -#include "module_base/constants.h" +#include "source_base/timer.h" +#include "source_base/mathzone.h" +#include "source_base/constants.h" #include "module_io/output.h" #include "symmetry_basic.h" diff --git a/source/module_cell/module_symmetry/symmetry_basic.cpp b/source/module_cell/module_symmetry/symmetry_basic.cpp index dffa59f69d..955e2a2157 100644 --- a/source/module_cell/module_symmetry/symmetry_basic.cpp +++ b/source/module_cell/module_symmetry/symmetry_basic.cpp @@ -1,5 +1,5 @@ #include "symmetry.h" -#include "module_base/mymath.h" +#include "source_base/mymath.h" #include "module_parameter/parameter.h" bool ModuleSymmetry::test_brav = 0; diff --git a/source/module_cell/module_symmetry/symmetry_basic.h b/source/module_cell/module_symmetry/symmetry_basic.h index 5a2a5bf567..7308a20df9 100644 --- a/source/module_cell/module_symmetry/symmetry_basic.h +++ b/source/module_cell/module_symmetry/symmetry_basic.h @@ -5,9 +5,9 @@ #ifndef SYMMETRY_BASIC_H #define SYMMETRY_BASIC_H #include "symm_other.h" -#include "module_base/mymath.h" -#include "module_base/ylm.h" -#include "module_base/matrix3.h" +#include "source_base/mymath.h" +#include "source_base/ylm.h" +#include "source_base/matrix3.h" namespace ModuleSymmetry { class Symmetry_Basic diff --git a/source/module_cell/module_symmetry/test/symmetry_test.h b/source/module_cell/module_symmetry/test/symmetry_test.h index f50e045ff3..e22a3b73a3 100644 --- a/source/module_cell/module_symmetry/test/symmetry_test.h +++ b/source/module_cell/module_symmetry/test/symmetry_test.h @@ -1,5 +1,5 @@ #pragma once -#include "module_base/mathzone.h" +#include "source_base/mathzone.h" #include "module_cell/unitcell.h" #include "gtest/gtest.h" diff --git a/source/module_cell/parallel_kpoints.cpp b/source/module_cell/parallel_kpoints.cpp index a0351e6560..2ca14090fb 100644 --- a/source/module_cell/parallel_kpoints.cpp +++ b/source/module_cell/parallel_kpoints.cpp @@ -1,7 +1,7 @@ #include "parallel_kpoints.h" -#include "module_base/parallel_common.h" -#include "module_base/parallel_global.h" +#include "source_base/parallel_common.h" +#include "source_base/parallel_global.h" // the kpoints here are reduced after symmetry applied. void Parallel_Kpoints::kinfo(int& nkstot_in, diff --git a/source/module_cell/parallel_kpoints.h b/source/module_cell/parallel_kpoints.h index 971a2849f2..f29ae540fb 100644 --- a/source/module_cell/parallel_kpoints.h +++ b/source/module_cell/parallel_kpoints.h @@ -1,10 +1,10 @@ #ifndef PARALLEL_KPOINTS_H #define PARALLEL_KPOINTS_H -#include "module_base/complexarray.h" -#include "module_base/global_function.h" -#include "module_base/realarray.h" -#include "module_base/vector3.h" +#include "source_base/complexarray.h" +#include "source_base/global_function.h" +#include "source_base/realarray.h" +#include "source_base/vector3.h" class Parallel_Kpoints { diff --git a/source/module_cell/print_cell.cpp b/source/module_cell/print_cell.cpp index 3ad653ee83..5580f28f23 100644 --- a/source/module_cell/print_cell.cpp +++ b/source/module_cell/print_cell.cpp @@ -2,9 +2,9 @@ #include #include "print_cell.h" -#include "module_base/formatter.h" -#include "module_base/tool_title.h" -#include "module_base/global_variable.h" +#include "source_base/formatter.h" +#include "source_base/tool_title.h" +#include "source_base/global_variable.h" namespace unitcell { diff --git a/source/module_cell/pseudo.cpp b/source/module_cell/pseudo.cpp index 7743e45447..e3124bbf4d 100644 --- a/source/module_cell/pseudo.cpp +++ b/source/module_cell/pseudo.cpp @@ -1,5 +1,5 @@ #include "pseudo.h" -#include "module_base/tool_title.h" +#include "source_base/tool_title.h" pseudo::pseudo() { diff --git a/source/module_cell/pseudo.h b/source/module_cell/pseudo.h index 22af587557..8613a49252 100644 --- a/source/module_cell/pseudo.h +++ b/source/module_cell/pseudo.h @@ -1,7 +1,7 @@ #ifndef PSEUDO_H #define PSEUDO_H -#include "module_base/global_function.h" +#include "source_base/global_function.h" #include "module_io/output.h" //----------------------------------------- diff --git a/source/module_cell/read_atom_species.cpp b/source/module_cell/read_atom_species.cpp index a969826bee..1ff82d3667 100644 --- a/source/module_cell/read_atom_species.cpp +++ b/source/module_cell/read_atom_species.cpp @@ -1,7 +1,7 @@ #include "read_stru.h" #include "module_parameter/parameter.h" -#include "module_base/tool_title.h" +#include "source_base/tool_title.h" #ifdef __EXX #include "module_hamilt_pw/hamilt_pwdft/global.h" #include "module_ri/serialization_cereal.h" diff --git a/source/module_cell/read_atoms.cpp b/source/module_cell/read_atoms.cpp index 2db4f1f616..b2b729ce1f 100644 --- a/source/module_cell/read_atoms.cpp +++ b/source/module_cell/read_atoms.cpp @@ -8,11 +8,11 @@ #include "module_cell/print_cell.h" #include "module_cell/read_stru.h" #include "module_elecstate/read_orb.h" -#include "module_base/timer.h" -#include "module_base/constants.h" +#include "source_base/timer.h" +#include "source_base/constants.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" -#include "module_base/formatter.h" -#include "module_base/mathzone.h" +#include "source_base/formatter.h" +#include "source_base/mathzone.h" #ifdef __LCAO #include "module_basis/module_ao/ORB_read.h" // to use 'ORB' -- mohan 2021-01-30 diff --git a/source/module_cell/read_pp.cpp b/source/module_cell/read_pp.cpp index c6bb4ab208..99c1c96d3a 100644 --- a/source/module_cell/read_pp.cpp +++ b/source/module_cell/read_pp.cpp @@ -9,7 +9,7 @@ #include #include -#include "module_base/math_integral.h" // for numerical integration +#include "source_base/math_integral.h" // for numerical integration Pseudopot_upf::Pseudopot_upf() { diff --git a/source/module_cell/read_pp.h b/source/module_cell/read_pp.h index 6029269639..1290950e92 100644 --- a/source/module_cell/read_pp.h +++ b/source/module_cell/read_pp.h @@ -4,8 +4,8 @@ #include #include "atom_pseudo.h" -#include "module_base/matrix.h" -#include "module_base/realarray.h" +#include "source_base/matrix.h" +#include "source_base/realarray.h" class Pseudopot_upf { diff --git a/source/module_cell/read_pp_blps.cpp b/source/module_cell/read_pp_blps.cpp index 222565da19..682f39dfdc 100644 --- a/source/module_cell/read_pp_blps.cpp +++ b/source/module_cell/read_pp_blps.cpp @@ -1,6 +1,6 @@ #include "read_pp.h" -#include "module_base/atom_in.h" -#include "module_base/element_name.h" +#include "source_base/atom_in.h" +#include "source_base/element_name.h" int Pseudopot_upf::read_pseudo_blps(std::ifstream &ifs, Atom_pseudo& pp) { diff --git a/source/module_cell/read_stru.cpp b/source/module_cell/read_stru.cpp index 8cba080427..d1d3141072 100644 --- a/source/module_cell/read_stru.cpp +++ b/source/module_cell/read_stru.cpp @@ -1,7 +1,7 @@ #include "read_stru.h" -#include "module_base/timer.h" -#include "module_base/vector3.h" -#include "module_base/mathzone.h" +#include "source_base/timer.h" +#include "source_base/vector3.h" +#include "source_base/mathzone.h" bool unitcell::check_tau(const Atom* atoms, const int& ntype, diff --git a/source/module_cell/setup_nonlocal.cpp b/source/module_cell/setup_nonlocal.cpp index c31557e25e..5a31200b17 100644 --- a/source/module_cell/setup_nonlocal.cpp +++ b/source/module_cell/setup_nonlocal.cpp @@ -1,6 +1,6 @@ #include "setup_nonlocal.h" -#include "module_base/parallel_common.h" +#include "source_base/parallel_common.h" #include "module_parameter/parameter.h" #ifdef __LCAO @@ -22,7 +22,7 @@ InfoNonlocal::~InfoNonlocal() delete[] nproj; } -#include "../module_base/complexmatrix.h" +#include "../source_base/complexmatrix.h" void InfoNonlocal::Set_NonLocal(const int& it, Atom* atom, int& n_projectors, diff --git a/source/module_cell/setup_nonlocal.h b/source/module_cell/setup_nonlocal.h index eef458968d..85139282a6 100644 --- a/source/module_cell/setup_nonlocal.h +++ b/source/module_cell/setup_nonlocal.h @@ -2,8 +2,8 @@ #define INFONONLOCAL_H #include "atom_spec.h" -#include "../module_base/global_function.h" -#include "../module_base/global_variable.h" +#include "../source_base/global_function.h" +#include "../source_base/global_variable.h" #include "../module_basis/module_ao/ORB_nonlocal.h" #include "../module_basis/module_ao/ORB_read.h" class InfoNonlocal diff --git a/source/module_cell/test/CMakeLists.txt b/source/module_cell/test/CMakeLists.txt index 149b394bcc..d0a207aaa9 100644 --- a/source/module_cell/test/CMakeLists.txt +++ b/source/module_cell/test/CMakeLists.txt @@ -85,8 +85,8 @@ add_test(NAME MODULE_CELL_klist_test_para4 AddTest( TARGET MODULE_CELL_ParaKpoints LIBS parameter MPI::MPI_CXX - SOURCES parallel_kpoints_test.cpp ../../module_base/global_variable.cpp ../../module_base/parallel_global.cpp - ../../module_base/parallel_common.cpp ../../module_base/parallel_comm.cpp ../parallel_kpoints.cpp + SOURCES parallel_kpoints_test.cpp ../../source_base/global_variable.cpp ../../source_base/parallel_global.cpp + ../../source_base/parallel_common.cpp ../../source_base/parallel_comm.cpp ../parallel_kpoints.cpp ) find_program(BASH bash) diff --git a/source/module_cell/test/klist_test.cpp b/source/module_cell/test/klist_test.cpp index 3bedf060fc..0185b2392e 100644 --- a/source/module_cell/test/klist_test.cpp +++ b/source/module_cell/test/klist_test.cpp @@ -18,8 +18,8 @@ #include "module_io/berryphase.h" #include "module_parameter/parameter.h" #undef private -#include "module_base/mathzone.h" -#include "module_base/parallel_global.h" +#include "source_base/mathzone.h" +#include "source_base/parallel_global.h" #include "module_cell/parallel_kpoints.h" bool berryphase::berry_phase_flag = false; diff --git a/source/module_cell/test/klist_test_para.cpp b/source/module_cell/test/klist_test_para.cpp index f7cb12fec1..eee2da85c3 100644 --- a/source/module_cell/test/klist_test_para.cpp +++ b/source/module_cell/test/klist_test_para.cpp @@ -1,5 +1,5 @@ -#include "module_base/mathzone.h" -#include "module_base/parallel_global.h" +#include "source_base/mathzone.h" +#include "source_base/parallel_global.h" #define private public #include "module_parameter/parameter.h" #undef private diff --git a/source/module_cell/test/parallel_kpoints_test.cpp b/source/module_cell/test/parallel_kpoints_test.cpp index f5b82ecfd5..26abbf1815 100644 --- a/source/module_cell/test/parallel_kpoints_test.cpp +++ b/source/module_cell/test/parallel_kpoints_test.cpp @@ -1,5 +1,5 @@ #ifdef __MPI -#include "module_base/parallel_global.h" +#include "source_base/parallel_global.h" #include "gmock/gmock.h" #include "gtest/gtest.h" diff --git a/source/module_cell/test/unitcell_test.cpp b/source/module_cell/test/unitcell_test.cpp index 11c10d15fc..78c988b853 100644 --- a/source/module_cell/test/unitcell_test.cpp +++ b/source/module_cell/test/unitcell_test.cpp @@ -10,8 +10,8 @@ #include "module_cell/print_cell.h" #include "memory" #include "module_cell/read_stru.h" -#include "module_base/global_variable.h" -#include "module_base/mathzone.h" +#include "source_base/global_variable.h" +#include "source_base/mathzone.h" #include "prepare_unitcell.h" #include "module_cell/update_cell.h" #include "module_cell/read_stru.h" diff --git a/source/module_cell/test/unitcell_test_para.cpp b/source/module_cell/test/unitcell_test_para.cpp index 4a9319fd81..f776ba016c 100644 --- a/source/module_cell/test/unitcell_test_para.cpp +++ b/source/module_cell/test/unitcell_test_para.cpp @@ -4,8 +4,8 @@ #include "module_parameter/parameter.h" #undef private #include "memory" -#include "module_base/global_variable.h" -#include "module_base/mathzone.h" +#include "source_base/global_variable.h" +#include "source_base/mathzone.h" #include "module_cell/unitcell.h" #include "module_elecstate/read_pseudo.h" #include diff --git a/source/module_cell/test/unitcell_test_readpp.cpp b/source/module_cell/test/unitcell_test_readpp.cpp index 980da0b6a9..1b8ce61f4c 100644 --- a/source/module_cell/test/unitcell_test_readpp.cpp +++ b/source/module_cell/test/unitcell_test_readpp.cpp @@ -4,8 +4,8 @@ #include "module_parameter/parameter.h" #undef private #include "memory" -#include "module_base/global_variable.h" -#include "module_base/mathzone.h" +#include "source_base/global_variable.h" +#include "source_base/mathzone.h" #include "module_cell/check_atomic_stru.h" #include "module_cell/unitcell.h" #include "module_elecstate/read_pseudo.h" diff --git a/source/module_cell/test/unitcell_test_setupcell.cpp b/source/module_cell/test/unitcell_test_setupcell.cpp index 383a9d0312..6d3cd3df35 100644 --- a/source/module_cell/test/unitcell_test_setupcell.cpp +++ b/source/module_cell/test/unitcell_test_setupcell.cpp @@ -4,8 +4,8 @@ #include "module_parameter/parameter.h" #undef private #include "memory" -#include "module_base/mathzone.h" -#include "module_base/global_variable.h" +#include "source_base/mathzone.h" +#include "source_base/global_variable.h" #include "module_cell/unitcell.h" #include #include diff --git a/source/module_cell/test_pw/unitcell_test_pw.cpp b/source/module_cell/test_pw/unitcell_test_pw.cpp index d0d1307e9c..e7af4db5e3 100644 --- a/source/module_cell/test_pw/unitcell_test_pw.cpp +++ b/source/module_cell/test_pw/unitcell_test_pw.cpp @@ -4,8 +4,8 @@ #include "module_parameter/parameter.h" #undef private #include "memory" -#include "module_base/mathzone.h" -#include "module_base/global_variable.h" +#include "source_base/mathzone.h" +#include "source_base/global_variable.h" #include "module_cell/unitcell.h" #include "module_cell/read_stru.h" #include diff --git a/source/module_cell/unitcell.cpp b/source/module_cell/unitcell.cpp index 53c686a326..20cc905d29 100755 --- a/source/module_cell/unitcell.cpp +++ b/source/module_cell/unitcell.cpp @@ -1,17 +1,17 @@ #include #include // Peize Lin fix bug about strcmp 2016-08-02 -#include "module_base/constants.h" -#include "module_base/global_function.h" -#include "module_base/global_variable.h" +#include "source_base/constants.h" +#include "source_base/global_function.h" +#include "source_base/global_variable.h" #include "unitcell.h" #include "bcast_cell.h" #include "module_parameter/parameter.h" #include "module_cell/read_stru.h" -#include "module_base/atom_in.h" -#include "module_base/element_elec_config.h" -#include "module_base/global_file.h" -#include "module_base/parallel_common.h" +#include "source_base/atom_in.h" +#include "source_base/element_elec_config.h" +#include "source_base/global_file.h" +#include "source_base/parallel_common.h" #include "module_parameter/parameter.h" #ifdef __MPI diff --git a/source/module_cell/unitcell.h b/source/module_cell/unitcell.h index e7b3e3bdcf..552b031850 100644 --- a/source/module_cell/unitcell.h +++ b/source/module_cell/unitcell.h @@ -1,8 +1,8 @@ #ifndef UNITCELL_H #define UNITCELL_H -#include "module_base/global_function.h" -#include "module_base/global_variable.h" +#include "source_base/global_function.h" +#include "source_base/global_variable.h" #include "module_elecstate/magnetism.h" #include "module_io/output.h" #include "module_symmetry/symmetry.h" diff --git a/source/module_cell/unitcell_data.h b/source/module_cell/unitcell_data.h index 09aab0a0dc..c93c469866 100644 --- a/source/module_cell/unitcell_data.h +++ b/source/module_cell/unitcell_data.h @@ -1,8 +1,8 @@ #ifndef UNITCELL_DATA_H #define UNITCELL_DATA_H -#include "module_base/intarray.h" -#include "module_base/matrix3.h" +#include "source_base/intarray.h" +#include "source_base/matrix3.h" /// @brief info of lattice struct Lattice { diff --git a/source/module_cell/update_cell.cpp b/source/module_cell/update_cell.cpp index ca8abbc0f1..723f765d31 100644 --- a/source/module_cell/update_cell.cpp +++ b/source/module_cell/update_cell.cpp @@ -1,6 +1,6 @@ #include "update_cell.h" #include "bcast_cell.h" -#include "module_base/global_function.h" +#include "source_base/global_function.h" namespace unitcell { void remake_cell(Lattice& lat) diff --git a/source/module_elecstate/cal_dm.h b/source/module_elecstate/cal_dm.h index 99815b296b..b241791a1a 100644 --- a/source/module_elecstate/cal_dm.h +++ b/source/module_elecstate/cal_dm.h @@ -2,9 +2,9 @@ #define CAL_DM_H #include "math_tools.h" -#include "module_base/timer.h" -#include "module_base/matrix.h" -#include "module_base/complexmatrix.h" +#include "source_base/timer.h" +#include "source_base/matrix.h" +#include "source_base/complexmatrix.h" namespace elecstate { diff --git a/source/module_elecstate/cal_nelec_nband.cpp b/source/module_elecstate/cal_nelec_nband.cpp index 4e70415707..cd956ac474 100644 --- a/source/module_elecstate/cal_nelec_nband.cpp +++ b/source/module_elecstate/cal_nelec_nband.cpp @@ -1,5 +1,5 @@ #include "cal_nelec_nband.h" -#include "module_base/constants.h" +#include "source_base/constants.h" #include "module_parameter/parameter.h" namespace elecstate { diff --git a/source/module_elecstate/elecstate.cpp b/source/module_elecstate/elecstate.cpp index ee4857afd8..74a9154cea 100644 --- a/source/module_elecstate/elecstate.cpp +++ b/source/module_elecstate/elecstate.cpp @@ -1,10 +1,10 @@ #include "elecstate.h" #include "module_parameter/parameter.h" -#include "module_base/global_variable.h" +#include "source_base/global_variable.h" #include "module_parameter/parameter.h" -#include "module_base/memory.h" -#include "module_base/parallel_reduce.h" -#include "module_base/tool_title.h" +#include "source_base/memory.h" +#include "source_base/parallel_reduce.h" +#include "source_base/tool_title.h" #include "occupy.h" namespace elecstate diff --git a/source/module_elecstate/elecstate_energy.cpp b/source/module_elecstate/elecstate_energy.cpp index d7b4f7ed10..cfa3d97332 100644 --- a/source/module_elecstate/elecstate_energy.cpp +++ b/source/module_elecstate/elecstate_energy.cpp @@ -1,6 +1,6 @@ #include "elecstate.h" -#include "module_base/global_variable.h" -#include "module_base/parallel_reduce.h" +#include "source_base/global_variable.h" +#include "source_base/parallel_reduce.h" #include "module_hamilt_general/module_xc/xc_functional.h" #include "module_parameter/parameter.h" diff --git a/source/module_elecstate/elecstate_lcao.cpp b/source/module_elecstate/elecstate_lcao.cpp index efa7b1d76b..8836775fac 100644 --- a/source/module_elecstate/elecstate_lcao.cpp +++ b/source/module_elecstate/elecstate_lcao.cpp @@ -1,7 +1,7 @@ #include "elecstate_lcao.h" #include "cal_dm.h" -#include "module_base/timer.h" +#include "source_base/timer.h" #include "module_elecstate/module_dm/cal_dm_psi.h" #include "module_hamilt_general/module_xc/xc_functional.h" #include "module_hamilt_lcao/module_deltaspin/spin_constrain.h" diff --git a/source/module_elecstate/elecstate_lcao_cal_tau.cpp b/source/module_elecstate/elecstate_lcao_cal_tau.cpp index 9f2c0bd40b..d07aeba678 100644 --- a/source/module_elecstate/elecstate_lcao_cal_tau.cpp +++ b/source/module_elecstate/elecstate_lcao_cal_tau.cpp @@ -1,7 +1,7 @@ #include "elecstate_lcao.h" #include "module_hamilt_lcao/module_gint/temp_gint/gint_interface.h" -#include "module_base/timer.h" +#include "source_base/timer.h" namespace elecstate { diff --git a/source/module_elecstate/elecstate_print.cpp b/source/module_elecstate/elecstate_print.cpp index 0a31f58fff..da168a73db 100644 --- a/source/module_elecstate/elecstate_print.cpp +++ b/source/module_elecstate/elecstate_print.cpp @@ -1,7 +1,7 @@ #include "elecstate.h" -#include "module_base/formatter.h" -#include "module_base/global_variable.h" -#include "module_base/parallel_common.h" +#include "source_base/formatter.h" +#include "source_base/global_variable.h" +#include "source_base/parallel_common.h" #include "module_elecstate/module_pot/H_Hartree_pw.h" #include "module_elecstate/module_pot/efield.h" #include "module_elecstate/module_pot/gatefield.h" diff --git a/source/module_elecstate/elecstate_pw.cpp b/source/module_elecstate/elecstate_pw.cpp index ef7a168752..86f0945e51 100644 --- a/source/module_elecstate/elecstate_pw.cpp +++ b/source/module_elecstate/elecstate_pw.cpp @@ -1,11 +1,11 @@ #include "elecstate_pw.h" -#include "module_base/constants.h" -#include "module_base/libm/libm.h" -#include "module_base/math_ylmreal.h" -#include "module_base/module_device/device.h" -#include "module_base/parallel_reduce.h" -#include "module_base/timer.h" +#include "source_base/constants.h" +#include "source_base/libm/libm.h" +#include "source_base/math_ylmreal.h" +#include "source_base/module_device/device.h" +#include "source_base/parallel_reduce.h" +#include "source_base/timer.h" #include "module_hamilt_general/module_xc/xc_functional.h" #include "module_parameter/parameter.h" diff --git a/source/module_elecstate/elecstate_pw.h b/source/module_elecstate/elecstate_pw.h index 6007c8a4fe..68691de07b 100644 --- a/source/module_elecstate/elecstate_pw.h +++ b/source/module_elecstate/elecstate_pw.h @@ -1,13 +1,13 @@ #ifndef ELECSTATEPW_H #define ELECSTATEPW_H -#include +#include #include "elecstate.h" #include "module_basis/module_pw/pw_basis_k.h" #include "module_elecstate/kernels/elecstate_op.h" #include "module_hamilt_pw/hamilt_pwdft/kernels/meta_op.h" -#include "module_base/kernels/math_kernel_op.h" +#include "source_base/kernels/math_kernel_op.h" namespace elecstate { diff --git a/source/module_elecstate/elecstate_pw_sdft.cpp b/source/module_elecstate/elecstate_pw_sdft.cpp index 269efc06f2..101428d2b8 100644 --- a/source/module_elecstate/elecstate_pw_sdft.cpp +++ b/source/module_elecstate/elecstate_pw_sdft.cpp @@ -1,8 +1,8 @@ #include "./elecstate_pw_sdft.h" -#include "module_base/global_function.h" -#include "module_base/global_variable.h" -#include "module_base/timer.h" +#include "source_base/global_function.h" +#include "source_base/global_variable.h" +#include "source_base/timer.h" #include "module_hamilt_general/module_xc/xc_functional.h" #include "module_parameter/parameter.h" namespace elecstate diff --git a/source/module_elecstate/elecstate_tools.h b/source/module_elecstate/elecstate_tools.h index 884217f778..6d144ab91b 100644 --- a/source/module_elecstate/elecstate_tools.h +++ b/source/module_elecstate/elecstate_tools.h @@ -1,7 +1,7 @@ #ifndef ELECSTATE_TOOLS_H #define ELECSTATE_TOOLS_H #include "elecstate.h" -#include "module_base/matrix.h" +#include "source_base/matrix.h" namespace elecstate { diff --git a/source/module_elecstate/fp_energy.cpp b/source/module_elecstate/fp_energy.cpp index 3218f3aae0..6f90fc8c31 100644 --- a/source/module_elecstate/fp_energy.cpp +++ b/source/module_elecstate/fp_energy.cpp @@ -1,10 +1,10 @@ #include "fp_energy.h" #include "module_parameter/parameter.h" -#include "module_base/global_variable.h" +#include "source_base/global_variable.h" -#include "module_base/tool_quit.h" +#include "source_base/tool_quit.h" #include #include diff --git a/source/module_elecstate/kernels/test/elecstate_op_test.cpp b/source/module_elecstate/kernels/test/elecstate_op_test.cpp index 973df83cea..b7c9ee9857 100644 --- a/source/module_elecstate/kernels/test/elecstate_op_test.cpp +++ b/source/module_elecstate/kernels/test/elecstate_op_test.cpp @@ -1,6 +1,6 @@ #include "module_elecstate/kernels/elecstate_op.h" -#include "module_base/module_device/memory_op.h" +#include "source_base/module_device/memory_op.h" #include #include diff --git a/source/module_elecstate/magnetism.cpp b/source/module_elecstate/magnetism.cpp index 8a0090484f..2ed58de787 100644 --- a/source/module_elecstate/magnetism.cpp +++ b/source/module_elecstate/magnetism.cpp @@ -1,6 +1,6 @@ #include "magnetism.h" -#include "module_base/parallel_reduce.h" +#include "source_base/parallel_reduce.h" #include "module_parameter/parameter.h" //#include "module_elecstate/module_charge/charge.h" diff --git a/source/module_elecstate/magnetism.h b/source/module_elecstate/magnetism.h index c6bd9ed96c..061ec415e7 100644 --- a/source/module_elecstate/magnetism.h +++ b/source/module_elecstate/magnetism.h @@ -1,9 +1,9 @@ #ifndef MAGNETISM_H #define MAGNETISM_H -#include "module_base/global_function.h" -#include "module_base/global_variable.h" -#include "module_base/vector3.h" +#include "source_base/global_function.h" +#include "source_base/global_variable.h" +#include "source_base/vector3.h" class Magnetism { diff --git a/source/module_elecstate/math_tools.h b/source/module_elecstate/math_tools.h index 3798c4df0f..70560c8ced 100644 --- a/source/module_elecstate/math_tools.h +++ b/source/module_elecstate/math_tools.h @@ -1,9 +1,9 @@ -#include "module_base/blas_connector.h" -#include "module_base/complexmatrix.h" -#include "module_base/matrix.h" -#include "module_base/scalapack_connector.h" +#include "source_base/blas_connector.h" +#include "source_base/complexmatrix.h" +#include "source_base/matrix.h" +#include "source_base/scalapack_connector.h" #include "module_psi/psi.h" -#include "module_base/timer.h" +#include "source_base/timer.h" #ifdef __MPI inline void psiMulPsiMpi(const psi::Psi& psi1, diff --git a/source/module_elecstate/module_charge/charge.cpp b/source/module_elecstate/module_charge/charge.cpp index 252b336af6..e808606b1b 100644 --- a/source/module_elecstate/module_charge/charge.cpp +++ b/source/module_elecstate/module_charge/charge.cpp @@ -18,14 +18,14 @@ //---------------------------------------------------------- #include "charge.h" -#include "module_base/global_function.h" -#include "module_base/global_variable.h" -#include "module_base/libm/libm.h" -#include "module_base/math_integral.h" -#include "module_base/memory.h" -#include "module_base/parallel_reduce.h" -#include "module_base/timer.h" -#include "module_base/tool_threading.h" +#include "source_base/global_function.h" +#include "source_base/global_variable.h" +#include "source_base/libm/libm.h" +#include "source_base/math_integral.h" +#include "source_base/memory.h" +#include "source_base/parallel_reduce.h" +#include "source_base/timer.h" +#include "source_base/tool_threading.h" #include "module_cell/unitcell.h" #include "module_elecstate/magnetism.h" #include "module_hamilt_general/module_xc/xc_functional.h" diff --git a/source/module_elecstate/module_charge/charge.h b/source/module_elecstate/module_charge/charge.h index 1a2c874fd7..8cad838e85 100644 --- a/source/module_elecstate/module_charge/charge.h +++ b/source/module_elecstate/module_charge/charge.h @@ -1,10 +1,10 @@ #ifndef CHARGE_H #define CHARGE_H -#include "module_base/complexmatrix.h" -#include "module_base/global_function.h" -#include "module_base/global_variable.h" -#include "module_base/parallel_global.h" +#include "source_base/complexmatrix.h" +#include "source_base/global_function.h" +#include "source_base/global_variable.h" +#include "source_base/parallel_global.h" #include "module_basis/module_pw/pw_basis.h" #include "module_cell/module_symmetry/symmetry.h" #include "module_elecstate/fp_energy.h" diff --git a/source/module_elecstate/module_charge/charge_extra.cpp b/source/module_elecstate/module_charge/charge_extra.cpp index 35b5b2a1e0..b0e5a94ee7 100644 --- a/source/module_elecstate/module_charge/charge_extra.cpp +++ b/source/module_elecstate/module_charge/charge_extra.cpp @@ -1,9 +1,9 @@ #include "charge_extra.h" -#include "module_base/global_function.h" -#include "module_base/global_variable.h" -#include "module_base/timer.h" -#include "module_base/tool_threading.h" +#include "source_base/global_function.h" +#include "source_base/global_variable.h" +#include "source_base/timer.h" +#include "source_base/tool_threading.h" #include "module_io/cube_io.h" Charge_Extra::Charge_Extra() diff --git a/source/module_elecstate/module_charge/charge_init.cpp b/source/module_elecstate/module_charge/charge_init.cpp index cb73ad5a86..6feaa17c11 100644 --- a/source/module_elecstate/module_charge/charge_init.cpp +++ b/source/module_elecstate/module_charge/charge_init.cpp @@ -1,16 +1,16 @@ #include #include "charge.h" -#include "module_base/global_function.h" -#include "module_base/global_variable.h" +#include "source_base/global_function.h" +#include "source_base/global_variable.h" #include "module_parameter/parameter.h" -#include "module_base/libm/libm.h" -#include "module_base/math_integral.h" -#include "module_base/math_sphbes.h" -#include "module_base/memory.h" -#include "module_base/parallel_reduce.h" -#include "module_base/timer.h" -#include "module_base/tool_threading.h" +#include "source_base/libm/libm.h" +#include "source_base/math_integral.h" +#include "source_base/math_sphbes.h" +#include "source_base/memory.h" +#include "source_base/parallel_reduce.h" +#include "source_base/timer.h" +#include "source_base/tool_threading.h" #include "module_elecstate/magnetism.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" #include "module_hamilt_pw/hamilt_pwdft/parallel_grid.h" diff --git a/source/module_elecstate/module_charge/charge_mixing.cpp b/source/module_elecstate/module_charge/charge_mixing.cpp index e6e7d7f0ef..40fa49e8da 100644 --- a/source/module_elecstate/module_charge/charge_mixing.cpp +++ b/source/module_elecstate/module_charge/charge_mixing.cpp @@ -1,9 +1,9 @@ #include "charge_mixing.h" #include "module_parameter/parameter.h" -#include "module_base/module_mixing/broyden_mixing.h" -#include "module_base/module_mixing/pulay_mixing.h" -#include "module_base/timer.h" +#include "source_base/module_mixing/broyden_mixing.h" +#include "source_base/module_mixing/pulay_mixing.h" +#include "source_base/timer.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" Charge_Mixing::Charge_Mixing() diff --git a/source/module_elecstate/module_charge/charge_mixing.h b/source/module_elecstate/module_charge/charge_mixing.h index d6fdbc2586..b7df52a762 100644 --- a/source/module_elecstate/module_charge/charge_mixing.h +++ b/source/module_elecstate/module_charge/charge_mixing.h @@ -2,8 +2,8 @@ #define CHARGE_MIXING_H #include "charge.h" #include "module_elecstate/module_dm/density_matrix.h" -#include "module_base/module_mixing/mixing.h" -#include "module_base/module_mixing/plain_mixing.h" +#include "source_base/module_mixing/mixing.h" +#include "source_base/module_mixing/plain_mixing.h" class Charge_Mixing { diff --git a/source/module_elecstate/module_charge/charge_mixing_dmr.cpp b/source/module_elecstate/module_charge/charge_mixing_dmr.cpp index 516e489d68..0c000bd876 100644 --- a/source/module_elecstate/module_charge/charge_mixing_dmr.cpp +++ b/source/module_elecstate/module_charge/charge_mixing_dmr.cpp @@ -1,7 +1,7 @@ #include "charge_mixing.h" #include "module_parameter/parameter.h" -#include "module_base/timer.h" +#include "source_base/timer.h" void Charge_Mixing::allocate_mixing_dmr(const int nnr) { diff --git a/source/module_elecstate/module_charge/charge_mixing_preconditioner.cpp b/source/module_elecstate/module_charge/charge_mixing_preconditioner.cpp index ad8ea3801b..cc17d8c639 100644 --- a/source/module_elecstate/module_charge/charge_mixing_preconditioner.cpp +++ b/source/module_elecstate/module_charge/charge_mixing_preconditioner.cpp @@ -1,7 +1,7 @@ #include "charge_mixing.h" #include "module_parameter/parameter.h" -#include "module_base/timer.h" +#include "source_base/timer.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" void Charge_Mixing::Kerker_screen_recip(std::complex* drhog) diff --git a/source/module_elecstate/module_charge/charge_mixing_residual.cpp b/source/module_elecstate/module_charge/charge_mixing_residual.cpp index b195f1c790..f2b85cbc03 100644 --- a/source/module_elecstate/module_charge/charge_mixing_residual.cpp +++ b/source/module_elecstate/module_charge/charge_mixing_residual.cpp @@ -1,9 +1,9 @@ #include "charge_mixing.h" #include "module_parameter/parameter.h" -#include "module_base/timer.h" +#include "source_base/timer.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" -#include "module_base/parallel_reduce.h" +#include "source_base/parallel_reduce.h" double Charge_Mixing::get_drho(Charge* chr, const double nelec) { diff --git a/source/module_elecstate/module_charge/charge_mixing_rho.cpp b/source/module_elecstate/module_charge/charge_mixing_rho.cpp index 7b0d110633..9c403a6a64 100644 --- a/source/module_elecstate/module_charge/charge_mixing_rho.cpp +++ b/source/module_elecstate/module_charge/charge_mixing_rho.cpp @@ -1,6 +1,6 @@ #include "charge_mixing.h" #include "module_parameter/parameter.h" -#include "module_base/timer.h" +#include "source_base/timer.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" void Charge_Mixing::mix_rho_recip(Charge* chr) diff --git a/source/module_elecstate/module_charge/charge_mpi.cpp b/source/module_elecstate/module_charge/charge_mpi.cpp index c94a8f5133..bc8f8cd2df 100644 --- a/source/module_elecstate/module_charge/charge_mpi.cpp +++ b/source/module_elecstate/module_charge/charge_mpi.cpp @@ -1,8 +1,8 @@ #include "charge.h" -#include "module_base/global_function.h" -#include "module_base/global_variable.h" -#include "module_base/parallel_reduce.h" -#include "module_base/timer.h" +#include "source_base/global_function.h" +#include "source_base/global_variable.h" +#include "source_base/parallel_reduce.h" +#include "source_base/timer.h" #include "module_hamilt_general/module_xc/xc_functional.h" #include "module_parameter/parameter.h" #ifdef __MPI diff --git a/source/module_elecstate/module_charge/symmetry_rhog.cpp b/source/module_elecstate/module_charge/symmetry_rhog.cpp index 0ed87bd572..2b1e62191b 100644 --- a/source/module_elecstate/module_charge/symmetry_rhog.cpp +++ b/source/module_elecstate/module_charge/symmetry_rhog.cpp @@ -1,6 +1,6 @@ #include "symmetry_rho.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" -#include "module_base/parallel_global.h" +#include "source_base/parallel_global.h" #include "module_hamilt_general/module_xc/xc_functional.h" diff --git a/source/module_elecstate/module_dm/cal_dm_psi.cpp b/source/module_elecstate/module_dm/cal_dm_psi.cpp index 21d91e5225..47d733b1e9 100644 --- a/source/module_elecstate/module_dm/cal_dm_psi.cpp +++ b/source/module_elecstate/module_dm/cal_dm_psi.cpp @@ -1,9 +1,9 @@ #include "cal_dm_psi.h" #include "module_parameter/parameter.h" -#include "module_base/blas_connector.h" -#include "module_base/scalapack_connector.h" -#include "module_base/timer.h" +#include "source_base/blas_connector.h" +#include "source_base/scalapack_connector.h" +#include "source_base/timer.h" #include "module_psi/psi.h" namespace elecstate diff --git a/source/module_elecstate/module_dm/cal_dm_psi.h b/source/module_elecstate/module_dm/cal_dm_psi.h index cdd25eb7da..fd1b116815 100644 --- a/source/module_elecstate/module_dm/cal_dm_psi.h +++ b/source/module_elecstate/module_dm/cal_dm_psi.h @@ -1,7 +1,7 @@ #ifndef CAL_DM_PSI_H #define CAL_DM_PSI_H -#include "module_base/matrix.h" +#include "source_base/matrix.h" #include "density_matrix.h" namespace elecstate diff --git a/source/module_elecstate/module_dm/cal_edm_tddft.cpp b/source/module_elecstate/module_dm/cal_edm_tddft.cpp index f3dd47ffe5..a3111aeaad 100644 --- a/source/module_elecstate/module_dm/cal_edm_tddft.cpp +++ b/source/module_elecstate/module_dm/cal_edm_tddft.cpp @@ -1,7 +1,7 @@ #include "cal_edm_tddft.h" -#include "module_base/lapack_connector.h" -#include "module_base/scalapack_connector.h" +#include "source_base/lapack_connector.h" +#include "source_base/scalapack_connector.h" namespace elecstate { diff --git a/source/module_elecstate/module_dm/density_matrix.cpp b/source/module_elecstate/module_dm/density_matrix.cpp index 4521071d65..d76728cb22 100644 --- a/source/module_elecstate/module_dm/density_matrix.cpp +++ b/source/module_elecstate/module_dm/density_matrix.cpp @@ -1,10 +1,10 @@ #include "density_matrix.h" #include "module_parameter/parameter.h" -#include "module_base/libm/libm.h" -#include "module_base/memory.h" -#include "module_base/timer.h" -#include "module_base/tool_title.h" +#include "source_base/libm/libm.h" +#include "source_base/memory.h" +#include "source_base/timer.h" +#include "source_base/tool_title.h" #include "module_cell/klist.h" namespace elecstate diff --git a/source/module_elecstate/module_dm/density_matrix_io.cpp b/source/module_elecstate/module_dm/density_matrix_io.cpp index ceeff57a0e..2c2699295e 100644 --- a/source/module_elecstate/module_dm/density_matrix_io.cpp +++ b/source/module_elecstate/module_dm/density_matrix_io.cpp @@ -1,10 +1,10 @@ #include "density_matrix.h" #include "module_parameter/parameter.h" -#include "module_base/libm/libm.h" -#include "module_base/memory.h" -#include "module_base/timer.h" -#include "module_base/tool_title.h" +#include "source_base/libm/libm.h" +#include "source_base/memory.h" +#include "source_base/timer.h" +#include "source_base/tool_title.h" #include "module_cell/klist.h" namespace elecstate diff --git a/source/module_elecstate/module_dm/test/prepare_unitcell.h b/source/module_elecstate/module_dm/test/prepare_unitcell.h index f3370fd655..e760a8da0e 100644 --- a/source/module_elecstate/module_dm/test/prepare_unitcell.h +++ b/source/module_elecstate/module_dm/test/prepare_unitcell.h @@ -3,7 +3,7 @@ #include #include -#include "module_base/mathzone.h" +#include "source_base/mathzone.h" class UcellTestPrepare { diff --git a/source/module_elecstate/module_pot/H_Hartree_pw.cpp b/source/module_elecstate/module_pot/H_Hartree_pw.cpp index 898817f736..cdc26e9bab 100644 --- a/source/module_elecstate/module_pot/H_Hartree_pw.cpp +++ b/source/module_elecstate/module_pot/H_Hartree_pw.cpp @@ -1,9 +1,9 @@ #include "H_Hartree_pw.h" #include "module_parameter/parameter.h" -#include "module_base/constants.h" -#include "module_base/timer.h" -#include "module_base/parallel_reduce.h" +#include "source_base/constants.h" +#include "source_base/timer.h" +#include "source_base/parallel_reduce.h" namespace elecstate { diff --git a/source/module_elecstate/module_pot/H_Hartree_pw.h b/source/module_elecstate/module_pot/H_Hartree_pw.h index aed9eced2b..7f86afeca3 100644 --- a/source/module_elecstate/module_pot/H_Hartree_pw.h +++ b/source/module_elecstate/module_pot/H_Hartree_pw.h @@ -1,9 +1,9 @@ #ifndef HHARTREEPW_H #define HHARTREEPW_H -#include "module_base/global_function.h" -#include "module_base/global_variable.h" -#include "module_base/matrix.h" +#include "source_base/global_function.h" +#include "source_base/global_variable.h" +#include "source_base/matrix.h" #include "module_cell/unitcell.h" #include "module_basis/module_pw/pw_basis.h" diff --git a/source/module_elecstate/module_pot/H_TDDFT_pw.cpp b/source/module_elecstate/module_pot/H_TDDFT_pw.cpp index c75511e190..71b8550181 100644 --- a/source/module_elecstate/module_pot/H_TDDFT_pw.cpp +++ b/source/module_elecstate/module_pot/H_TDDFT_pw.cpp @@ -1,8 +1,8 @@ #include "H_TDDFT_pw.h" -#include "module_base/constants.h" -#include "module_base/math_integral.h" -#include "module_base/timer.h" +#include "source_base/constants.h" +#include "source_base/math_integral.h" +#include "source_base/timer.h" #include "module_hamilt_lcao/module_tddft/evolve_elec.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" #include "module_io/input_conv.h" diff --git a/source/module_elecstate/module_pot/efield.cpp b/source/module_elecstate/module_pot/efield.cpp index ed602d5405..6b79650aa3 100644 --- a/source/module_elecstate/module_pot/efield.cpp +++ b/source/module_elecstate/module_pot/efield.cpp @@ -2,10 +2,10 @@ #include "module_parameter/parameter.h" #include "gatefield.h" -#include "module_base/constants.h" -#include "module_base/global_variable.h" -#include "module_base/timer.h" -#include "module_base/parallel_reduce.h" +#include "source_base/constants.h" +#include "source_base/global_variable.h" +#include "source_base/timer.h" +#include "source_base/parallel_reduce.h" namespace elecstate { diff --git a/source/module_elecstate/module_pot/gatefield.cpp b/source/module_elecstate/module_pot/gatefield.cpp index 3a59f54632..8fe2ef1194 100644 --- a/source/module_elecstate/module_pot/gatefield.cpp +++ b/source/module_elecstate/module_pot/gatefield.cpp @@ -2,7 +2,7 @@ #include "module_parameter/parameter.h" #include "efield.h" -#include "module_base/timer.h" +#include "source_base/timer.h" namespace elecstate { diff --git a/source/module_elecstate/module_pot/pot_base.h b/source/module_elecstate/module_pot/pot_base.h index 2f91793612..6dae8db836 100644 --- a/source/module_elecstate/module_pot/pot_base.h +++ b/source/module_elecstate/module_pot/pot_base.h @@ -1,8 +1,8 @@ #ifndef POTBASE_H #define POTBASE_H -#include "module_base/complexmatrix.h" -#include "module_base/matrix.h" +#include "source_base/complexmatrix.h" +#include "source_base/matrix.h" #include "module_cell/unitcell.h" #include "module_basis/module_pw/pw_basis.h" #include "module_elecstate/module_charge/charge.h" diff --git a/source/module_elecstate/module_pot/pot_local.cpp b/source/module_elecstate/module_pot/pot_local.cpp index 101f527efc..e10badda7d 100644 --- a/source/module_elecstate/module_pot/pot_local.cpp +++ b/source/module_elecstate/module_pot/pot_local.cpp @@ -1,7 +1,7 @@ #include "pot_local.h" -#include "module_base/timer.h" -#include "module_base/tool_title.h" +#include "source_base/timer.h" +#include "source_base/tool_title.h" #include diff --git a/source/module_elecstate/module_pot/pot_local.h b/source/module_elecstate/module_pot/pot_local.h index df31ac471b..923e962a11 100644 --- a/source/module_elecstate/module_pot/pot_local.h +++ b/source/module_elecstate/module_pot/pot_local.h @@ -1,7 +1,7 @@ #ifndef POTLOCAL_H #define POTLOCAL_H -#include "module_base/matrix.h" +#include "source_base/matrix.h" #include "pot_base.h" namespace elecstate diff --git a/source/module_elecstate/module_pot/pot_local_paw.cpp b/source/module_elecstate/module_pot/pot_local_paw.cpp index 9b48d50098..03dab7d59e 100644 --- a/source/module_elecstate/module_pot/pot_local_paw.cpp +++ b/source/module_elecstate/module_pot/pot_local_paw.cpp @@ -1,7 +1,7 @@ #include "pot_local_paw.h" -#include "module_base/timer.h" -#include "module_base/tool_title.h" +#include "source_base/timer.h" +#include "source_base/tool_title.h" #include diff --git a/source/module_elecstate/module_pot/pot_local_paw.h b/source/module_elecstate/module_pot/pot_local_paw.h index 8c37ef93a6..7399827c33 100644 --- a/source/module_elecstate/module_pot/pot_local_paw.h +++ b/source/module_elecstate/module_pot/pot_local_paw.h @@ -1,7 +1,7 @@ #ifndef POTLOCALPAW_H #define POTLOCALPAW_H -#include "module_base/matrix.h" +#include "source_base/matrix.h" #include "pot_base.h" namespace elecstate diff --git a/source/module_elecstate/module_pot/pot_xc.cpp b/source/module_elecstate/module_pot/pot_xc.cpp index 907363fb17..2091d90c46 100644 --- a/source/module_elecstate/module_pot/pot_xc.cpp +++ b/source/module_elecstate/module_pot/pot_xc.cpp @@ -1,6 +1,6 @@ #include "pot_xc.h" -#include "module_base/timer.h" +#include "source_base/timer.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" #ifdef USE_LIBXC diff --git a/source/module_elecstate/module_pot/potential_new.cpp b/source/module_elecstate/module_pot/potential_new.cpp index d12bb72fa0..d4aff155a6 100644 --- a/source/module_elecstate/module_pot/potential_new.cpp +++ b/source/module_elecstate/module_pot/potential_new.cpp @@ -1,11 +1,11 @@ #include "potential_new.h" -#include "module_base/global_function.h" -#include "module_base/global_variable.h" -#include "module_base/memory.h" -#include "module_base/timer.h" -#include "module_base/tool_quit.h" -#include "module_base/tool_title.h" +#include "source_base/global_function.h" +#include "source_base/global_variable.h" +#include "source_base/memory.h" +#include "source_base/timer.h" +#include "source_base/tool_quit.h" +#include "source_base/tool_title.h" #include "module_hamilt_general/module_xc/xc_functional.h" #include "module_parameter/parameter.h" diff --git a/source/module_elecstate/module_pot/potential_new.h b/source/module_elecstate/module_pot/potential_new.h index 103a46e064..b4ccdbf4db 100644 --- a/source/module_elecstate/module_pot/potential_new.h +++ b/source/module_elecstate/module_pot/potential_new.h @@ -1,7 +1,7 @@ #ifndef POTENTIALNEW_H #define POTENTIALNEW_H -#include "module_base/complexmatrix.h" +#include "source_base/complexmatrix.h" #include "module_hamilt_general/module_surchem/surchem.h" #include "module_hamilt_pw/hamilt_pwdft/VNL_in_pw.h" #include "module_hamilt_pw/hamilt_pwdft/structure_factor.h" diff --git a/source/module_elecstate/module_pot/potential_types.cpp b/source/module_elecstate/module_pot/potential_types.cpp index c3dd585096..a0999b20bc 100644 --- a/source/module_elecstate/module_pot/potential_types.cpp +++ b/source/module_elecstate/module_pot/potential_types.cpp @@ -2,12 +2,12 @@ #include "efield.h" #include "module_parameter/parameter.h" #include "gatefield.h" -#include "module_base/global_function.h" -#include "module_base/global_variable.h" -#include "module_base/memory.h" -#include "module_base/timer.h" -#include "module_base/tool_quit.h" -#include "module_base/tool_title.h" +#include "source_base/global_function.h" +#include "source_base/global_variable.h" +#include "source_base/memory.h" +#include "source_base/timer.h" +#include "source_base/tool_quit.h" +#include "source_base/tool_title.h" #include "pot_local.h" #include "pot_surchem.hpp" #include "pot_xc.h" diff --git a/source/module_elecstate/occupy.cpp b/source/module_elecstate/occupy.cpp index 580f90de81..8548fa44e3 100644 --- a/source/module_elecstate/occupy.cpp +++ b/source/module_elecstate/occupy.cpp @@ -1,8 +1,8 @@ #include "occupy.h" -#include "module_base/constants.h" -#include "module_base/mymath.h" -#include "module_base/parallel_reduce.h" +#include "source_base/constants.h" +#include "source_base/mymath.h" +#include "source_base/parallel_reduce.h" #include "module_parameter/parameter.h" Occupy::Occupy() diff --git a/source/module_elecstate/occupy.h b/source/module_elecstate/occupy.h index 8f7b4a3477..627103fcab 100644 --- a/source/module_elecstate/occupy.h +++ b/source/module_elecstate/occupy.h @@ -1,10 +1,10 @@ #ifndef OCCUPY_H #define OCCUPY_H -#include "module_base/global_function.h" -#include "module_base/global_variable.h" -#include "module_base/matrix.h" -#include "module_base/vector3.h" +#include "source_base/global_function.h" +#include "source_base/global_variable.h" +#include "source_base/matrix.h" +#include "source_base/vector3.h" class Occupy { diff --git a/source/module_elecstate/read_orb.cpp b/source/module_elecstate/read_orb.cpp index 56acf1d6c9..a40d66640a 100644 --- a/source/module_elecstate/read_orb.cpp +++ b/source/module_elecstate/read_orb.cpp @@ -1,5 +1,5 @@ #include "read_orb.h" -#include "module_base/formatter.h" +#include "source_base/formatter.h" namespace elecstate { void read_orb_file(int it, std::string &orb_file, std::ofstream &ofs_running, Atom* atom) diff --git a/source/module_elecstate/read_pseudo.cpp b/source/module_elecstate/read_pseudo.cpp index d6b382ea6c..6a761a6078 100644 --- a/source/module_elecstate/read_pseudo.cpp +++ b/source/module_elecstate/read_pseudo.cpp @@ -1,10 +1,10 @@ #include "read_pseudo.h" #include "module_parameter/parameter.h" -#include "module_base/global_file.h" +#include "source_base/global_file.h" #include "module_cell/read_pp.h" #include "module_cell/bcast_cell.h" -#include "module_base/element_elec_config.h" -#include "module_base/parallel_common.h" +#include "source_base/element_elec_config.h" +#include "source_base/parallel_common.h" #include // Peize Lin fix bug about strcmp 2016-08-02 diff --git a/source/module_elecstate/test/CMakeLists.txt b/source/module_elecstate/test/CMakeLists.txt index 9a8ba6d88b..090bac0cd8 100644 --- a/source/module_elecstate/test/CMakeLists.txt +++ b/source/module_elecstate/test/CMakeLists.txt @@ -57,7 +57,7 @@ AddTest( ../occupy.cpp ../../module_psi/psi.cpp # ../../module_psi/kernels/psi_memory_op.cpp - ../../module_base/module_device/memory_op.cpp + ../../source_base/module_device/memory_op.cpp ) AddTest( diff --git a/source/module_elecstate/test/charge_mixing_test.cpp b/source/module_elecstate/test/charge_mixing_test.cpp index 2580730cf8..0f8c5195d7 100644 --- a/source/module_elecstate/test/charge_mixing_test.cpp +++ b/source/module_elecstate/test/charge_mixing_test.cpp @@ -2,7 +2,7 @@ #include "gtest/gtest.h" #define private public #include "../module_charge/charge_mixing.h" -#include "module_base/module_mixing/broyden_mixing.h" +#include "source_base/module_mixing/broyden_mixing.h" #include "module_basis/module_pw/pw_basis.h" #include "module_hamilt_general/module_xc/xc_functional.h" #include "module_parameter/parameter.h" diff --git a/source/module_elecstate/test/prepare_unitcell.h b/source/module_elecstate/test/prepare_unitcell.h index 37f761c7eb..49635e89f3 100644 --- a/source/module_elecstate/test/prepare_unitcell.h +++ b/source/module_elecstate/test/prepare_unitcell.h @@ -2,7 +2,7 @@ #define PREPARE_UNITCELL_H #include #include -#include "module_base/mathzone.h" +#include "source_base/mathzone.h" class UcellTestPrepare { diff --git a/source/module_elecstate/test_mpi/charge_mpi_test.cpp b/source/module_elecstate/test_mpi/charge_mpi_test.cpp index 81d0fff751..6df64556ce 100644 --- a/source/module_elecstate/test_mpi/charge_mpi_test.cpp +++ b/source/module_elecstate/test_mpi/charge_mpi_test.cpp @@ -1,8 +1,8 @@ #include "gmock/gmock.h" #include "gtest/gtest.h" #define private public -#include "module_base/matrix3.h" -#include "module_base/parallel_global.h" +#include "source_base/matrix3.h" +#include "source_base/parallel_global.h" #include "module_elecstate/module_charge/charge.h" #include "module_hamilt_general/module_xc/xc_functional.h" #include "module_parameter/parameter.h" diff --git a/source/module_hamilt_general/module_ewald/H_Ewald_pw.cpp b/source/module_hamilt_general/module_ewald/H_Ewald_pw.cpp index 2c8cc60f9d..0dba639959 100644 --- a/source/module_hamilt_general/module_ewald/H_Ewald_pw.cpp +++ b/source/module_hamilt_general/module_ewald/H_Ewald_pw.cpp @@ -1,11 +1,11 @@ #include "H_Ewald_pw.h" #include "module_parameter/parameter.h" -#include "module_base/mymath.h" // use heapsort +#include "source_base/mymath.h" // use heapsort #include "module_parameter/parameter.h" #include "dnrm2.h" -#include "module_base/parallel_reduce.h" -#include "module_base/constants.h" -#include "module_base/timer.h" +#include "source_base/parallel_reduce.h" +#include "source_base/constants.h" +#include "source_base/timer.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" double H_Ewald_pw::alpha=0.0; diff --git a/source/module_hamilt_general/module_ewald/H_Ewald_pw.h b/source/module_hamilt_general/module_ewald/H_Ewald_pw.h index 29c738819a..dc9ed967d9 100644 --- a/source/module_hamilt_general/module_ewald/H_Ewald_pw.h +++ b/source/module_hamilt_general/module_ewald/H_Ewald_pw.h @@ -1,8 +1,8 @@ #ifndef H_EWALD_PW_H #define H_EWALD_PW_H -#include "module_base/global_function.h" -#include "module_base/global_variable.h" +#include "source_base/global_function.h" +#include "source_base/global_variable.h" #include "module_cell/unitcell.h" #include "module_basis/module_pw/pw_basis.h" #include "module_hamilt_pw/hamilt_pwdft/forces.h" diff --git a/source/module_hamilt_general/module_surchem/H_correction_pw.cpp b/source/module_hamilt_general/module_surchem/H_correction_pw.cpp index b9f6a39548..63d3d80a09 100644 --- a/source/module_hamilt_general/module_surchem/H_correction_pw.cpp +++ b/source/module_hamilt_general/module_surchem/H_correction_pw.cpp @@ -1,8 +1,8 @@ #include -#include "module_base/constants.h" -#include "module_base/parallel_reduce.h" -#include "module_base/timer.h" +#include "source_base/constants.h" +#include "source_base/parallel_reduce.h" +#include "source_base/timer.h" #include "module_hamilt_general/module_xc/xc_functional.h" #include "surchem.h" diff --git a/source/module_hamilt_general/module_surchem/cal_vcav.cpp b/source/module_hamilt_general/module_surchem/cal_vcav.cpp index 86d6923524..d80145931d 100644 --- a/source/module_hamilt_general/module_surchem/cal_vcav.cpp +++ b/source/module_hamilt_general/module_surchem/cal_vcav.cpp @@ -1,4 +1,4 @@ -#include "module_base/timer.h" +#include "source_base/timer.h" #include "module_hamilt_general/module_xc/xc_functional.h" #include "module_parameter/parameter.h" #include "surchem.h" diff --git a/source/module_hamilt_general/module_surchem/cal_vel.cpp b/source/module_hamilt_general/module_surchem/cal_vel.cpp index ac0771cbde..23fadef7a9 100644 --- a/source/module_hamilt_general/module_surchem/cal_vel.cpp +++ b/source/module_hamilt_general/module_surchem/cal_vel.cpp @@ -1,4 +1,4 @@ -#include "module_base/timer.h" +#include "source_base/timer.h" #include "module_hamilt_general/module_xc/xc_functional.h" #include "module_parameter/parameter.h" #include "surchem.h" diff --git a/source/module_hamilt_general/module_surchem/sol_force.cpp b/source/module_hamilt_general/module_surchem/sol_force.cpp index 00c4da4404..aeb096b4ee 100644 --- a/source/module_hamilt_general/module_surchem/sol_force.cpp +++ b/source/module_hamilt_general/module_surchem/sol_force.cpp @@ -1,5 +1,5 @@ #include "surchem.h" -#include "module_base/timer.h" +#include "source_base/timer.h" #include "module_parameter/parameter.h" void surchem::force_cor_one(const UnitCell& cell, diff --git a/source/module_hamilt_general/module_surchem/surchem.h b/source/module_hamilt_general/module_surchem/surchem.h index cb69735cd1..f44e6b6e1f 100644 --- a/source/module_hamilt_general/module_surchem/surchem.h +++ b/source/module_hamilt_general/module_surchem/surchem.h @@ -1,11 +1,11 @@ #ifndef SURCHEM_H #define SURCHEM_H -#include "module_base/atom_in.h" -#include "module_base/global_function.h" -#include "module_base/global_variable.h" -#include "module_base/matrix.h" -#include "module_base/parallel_reduce.h" +#include "source_base/atom_in.h" +#include "source_base/global_function.h" +#include "source_base/global_variable.h" +#include "source_base/matrix.h" +#include "source_base/parallel_reduce.h" #include "module_basis/module_pw/pw_basis.h" #include "module_cell/unitcell.h" #include "module_hamilt_pw/hamilt_pwdft/parallel_grid.h" diff --git a/source/module_hamilt_general/module_surchem/test/cal_epsilon_test.cpp b/source/module_hamilt_general/module_surchem/test/cal_epsilon_test.cpp index dc0b404e33..72d3da12c4 100644 --- a/source/module_hamilt_general/module_surchem/test/cal_epsilon_test.cpp +++ b/source/module_hamilt_general/module_surchem/test/cal_epsilon_test.cpp @@ -1,13 +1,13 @@ #ifdef __MPI -#include "../../../module_base/parallel_global.h" +#include "../../../source_base/parallel_global.h" #include "../../../module_basis/module_pw/test/test_tool.h" #include "mpi.h" #endif -#include "../../../module_base/parallel_global.h" +#include "../../../source_base/parallel_global.h" #include "../surchem.h" -#include "module_base/constants.h" -#include "module_base/global_function.h" -#include "module_base/global_variable.h" +#include "source_base/constants.h" +#include "source_base/global_function.h" +#include "source_base/global_variable.h" #include "module_basis/module_pw/pw_basis.h" #include "gmock/gmock.h" diff --git a/source/module_hamilt_general/module_surchem/test/cal_pseudo_test.cpp b/source/module_hamilt_general/module_surchem/test/cal_pseudo_test.cpp index 54e0de6a09..c01372e6e0 100644 --- a/source/module_hamilt_general/module_surchem/test/cal_pseudo_test.cpp +++ b/source/module_hamilt_general/module_surchem/test/cal_pseudo_test.cpp @@ -1,5 +1,5 @@ #ifdef __MPI -#include "../../../module_base/parallel_global.h" +#include "../../../source_base/parallel_global.h" #include "mpi.h" #endif #include "../surchem.h" diff --git a/source/module_hamilt_general/module_surchem/test/cal_totn_test.cpp b/source/module_hamilt_general/module_surchem/test/cal_totn_test.cpp index 10bd4dcf58..09ca4647fd 100644 --- a/source/module_hamilt_general/module_surchem/test/cal_totn_test.cpp +++ b/source/module_hamilt_general/module_surchem/test/cal_totn_test.cpp @@ -1,5 +1,5 @@ #ifdef __MPI -#include "../../../module_base/parallel_global.h" +#include "../../../source_base/parallel_global.h" #include "mpi.h" #endif #include "../surchem.h" diff --git a/source/module_hamilt_general/module_surchem/test/cal_vcav_test.cpp b/source/module_hamilt_general/module_surchem/test/cal_vcav_test.cpp index 3cf4fcec61..65fe839aa2 100644 --- a/source/module_hamilt_general/module_surchem/test/cal_vcav_test.cpp +++ b/source/module_hamilt_general/module_surchem/test/cal_vcav_test.cpp @@ -1,5 +1,5 @@ #ifdef __MPI -#include "../../../module_base/parallel_global.h" +#include "../../../source_base/parallel_global.h" #include "mpi.h" #endif #include "../../module_xc/xc_functional.h" diff --git a/source/module_hamilt_general/module_surchem/test/cal_vel_test.cpp b/source/module_hamilt_general/module_surchem/test/cal_vel_test.cpp index 525a11554e..c74873ae9d 100644 --- a/source/module_hamilt_general/module_surchem/test/cal_vel_test.cpp +++ b/source/module_hamilt_general/module_surchem/test/cal_vel_test.cpp @@ -1,5 +1,5 @@ #ifdef __MPI -#include "../../../module_base/parallel_global.h" +#include "../../../source_base/parallel_global.h" #define private public #include "module_parameter/parameter.h" #undef private diff --git a/source/module_hamilt_general/module_vdw/test/vdw_test.cpp b/source/module_hamilt_general/module_vdw/test/vdw_test.cpp index 9565d3f89f..4d9ff866a4 100644 --- a/source/module_hamilt_general/module_vdw/test/vdw_test.cpp +++ b/source/module_hamilt_general/module_vdw/test/vdw_test.cpp @@ -1,7 +1,7 @@ #include "module_cell/unitcell.h" #include "module_cell/setup_nonlocal.h" -#include "module_base/mathzone.h" -#include "module_base/vector3.h" +#include "source_base/mathzone.h" +#include "source_base/vector3.h" #include"gtest/gtest.h" #include"gmock/gmock.h" #include "mpi.h" diff --git a/source/module_hamilt_general/module_vdw/vdw.cpp b/source/module_hamilt_general/module_vdw/vdw.cpp index 791200da72..b9c6185865 100644 --- a/source/module_hamilt_general/module_vdw/vdw.cpp +++ b/source/module_hamilt_general/module_vdw/vdw.cpp @@ -4,7 +4,7 @@ #include "vdw.h" #include "vdwd2.h" #include "vdwd3.h" -#include "module_base/tool_quit.h" +#include "source_base/tool_quit.h" std::string parse_xcname(const std::string &xc_input, const std::vector &xc_psp) diff --git a/source/module_hamilt_general/module_vdw/vdw_parameters.h b/source/module_hamilt_general/module_vdw/vdw_parameters.h index 68c3a4abe5..630ff3d9e7 100644 --- a/source/module_hamilt_general/module_vdw/vdw_parameters.h +++ b/source/module_hamilt_general/module_vdw/vdw_parameters.h @@ -1,7 +1,7 @@ #ifndef VDW_PARAMETERS_H #define VDW_PARAMETERS_H -#include "module_base/vector3.h" +#include "source_base/vector3.h" #include diff --git a/source/module_hamilt_general/module_vdw/vdwd2.cpp b/source/module_hamilt_general/module_vdw/vdwd2.cpp index 0439683580..6a4a387982 100644 --- a/source/module_hamilt_general/module_vdw/vdwd2.cpp +++ b/source/module_hamilt_general/module_vdw/vdwd2.cpp @@ -5,7 +5,7 @@ //========================================================== #include "vdwd2.h" -#include "module_base/timer.h" +#include "source_base/timer.h" namespace vdw { diff --git a/source/module_hamilt_general/module_vdw/vdwd3.cpp b/source/module_hamilt_general/module_vdw/vdwd3.cpp index b5b0798c63..95aeac8226 100644 --- a/source/module_hamilt_general/module_vdw/vdwd3.cpp +++ b/source/module_hamilt_general/module_vdw/vdwd3.cpp @@ -6,10 +6,10 @@ #include "vdwd3.h" -#include "module_base/constants.h" -#include "module_base/element_name.h" -#include "module_base/global_function.h" -#include "module_base/timer.h" +#include "source_base/constants.h" +#include "source_base/element_name.h" +#include "source_base/global_function.h" +#include "source_base/timer.h" namespace vdw { diff --git a/source/module_hamilt_general/module_vdw/vdwd3_autoset_xcname.cpp b/source/module_hamilt_general/module_vdw/vdwd3_autoset_xcname.cpp index bec17fbd15..1068aeebab 100644 --- a/source/module_hamilt_general/module_vdw/vdwd3_autoset_xcname.cpp +++ b/source/module_hamilt_general/module_vdw/vdwd3_autoset_xcname.cpp @@ -44,10 +44,10 @@ #include #include #include -#include "module_base/formatter.h" +#include "source_base/formatter.h" #include #include -#include "module_base/tool_quit.h" +#include "source_base/tool_quit.h" #include "module_hamilt_general/module_vdw/vdwd3_parameters.h" const std::map xcname_libxc_xc_ = { diff --git a/source/module_hamilt_general/module_vdw/vdwd3_autoset_xcparam.cpp b/source/module_hamilt_general/module_vdw/vdwd3_autoset_xcparam.cpp index 24fb9d9231..a1ea354658 100644 --- a/source/module_hamilt_general/module_vdw/vdwd3_autoset_xcparam.cpp +++ b/source/module_hamilt_general/module_vdw/vdwd3_autoset_xcparam.cpp @@ -64,8 +64,8 @@ #include #include #include -#include "module_base/formatter.h" -#include "module_base/tool_quit.h" +#include "source_base/formatter.h" +#include "source_base/tool_quit.h" #include "module_hamilt_general/module_vdw/vdwd3_parameters.h" // DFT-D3(BJ) diff --git a/source/module_hamilt_general/module_vdw/vdwd3_parameters.cpp b/source/module_hamilt_general/module_vdw/vdwd3_parameters.cpp index fc2736529b..8bb02c367a 100644 --- a/source/module_hamilt_general/module_vdw/vdwd3_parameters.cpp +++ b/source/module_hamilt_general/module_vdw/vdwd3_parameters.cpp @@ -5,7 +5,7 @@ //========================================================== #include "vdwd3_parameters.h" -#include "module_base/constants.h" +#include "source_base/constants.h" #include namespace vdw { diff --git a/source/module_hamilt_general/module_vdw/vdwd3_parameters_tab.cpp b/source/module_hamilt_general/module_vdw/vdwd3_parameters_tab.cpp index 30de4f5390..bd06018e6e 100644 --- a/source/module_hamilt_general/module_vdw/vdwd3_parameters_tab.cpp +++ b/source/module_hamilt_general/module_vdw/vdwd3_parameters_tab.cpp @@ -4,7 +4,7 @@ //========================================================== #include "vdwd3_parameters.h" -#include "module_base/constants.h" +#include "source_base/constants.h" namespace vdw { diff --git a/source/module_hamilt_general/module_xc/kernels/cuda/xc_functional_op.cu b/source/module_hamilt_general/module_xc/kernels/cuda/xc_functional_op.cu index 60b1da3e88..50ceb430b0 100644 --- a/source/module_hamilt_general/module_xc/kernels/cuda/xc_functional_op.cu +++ b/source/module_hamilt_general/module_xc/kernels/cuda/xc_functional_op.cu @@ -1,5 +1,5 @@ #include -#include "module_base/module_device/types.h" +#include "source_base/module_device/types.h" #include #include diff --git a/source/module_hamilt_general/module_xc/kernels/rocm/xc_functional_op.hip.cu b/source/module_hamilt_general/module_xc/kernels/rocm/xc_functional_op.hip.cu index 937a277d74..fb381e8a48 100644 --- a/source/module_hamilt_general/module_xc/kernels/rocm/xc_functional_op.hip.cu +++ b/source/module_hamilt_general/module_xc/kernels/rocm/xc_functional_op.hip.cu @@ -1,5 +1,5 @@ #include -#include "module_base/module_device/types.h" +#include "source_base/module_device/types.h" #include #include diff --git a/source/module_hamilt_general/module_xc/kernels/xc_functional_op.h b/source/module_hamilt_general/module_xc/kernels/xc_functional_op.h index 1c83947182..2703300cb4 100644 --- a/source/module_hamilt_general/module_xc/kernels/xc_functional_op.h +++ b/source/module_hamilt_general/module_xc/kernels/xc_functional_op.h @@ -3,7 +3,7 @@ #include #include -#include +#include namespace hamilt { diff --git a/source/module_hamilt_general/module_xc/test/CMakeLists.txt b/source/module_hamilt_general/module_xc/test/CMakeLists.txt index 9b0bc440b7..0219e47b3b 100644 --- a/source/module_hamilt_general/module_xc/test/CMakeLists.txt +++ b/source/module_hamilt_general/module_xc/test/CMakeLists.txt @@ -36,11 +36,11 @@ AddTest( ../xc_functional_libxc_wrapper_tauxc.cpp ../xc_funct_corr_gga.cpp ../xc_funct_corr_lda.cpp ../xc_funct_exch_gga.cpp ../xc_funct_exch_lda.cpp ../xc_funct_hcth.cpp - ../../../module_base/matrix.cpp - ../../../module_base/memory.cpp - ../../../module_base/libm/branred.cpp - ../../../module_base/libm/sincos.cpp - ../../../module_base/blas_connector_base.cpp ../../../module_base/blas_connector_vector.cpp ../../../module_base/blas_connector_matrix.cpp + ../../../source_base/matrix.cpp + ../../../source_base/memory.cpp + ../../../source_base/libm/branred.cpp + ../../../source_base/libm/sincos.cpp + ../../../source_base/blas_connector_base.cpp ../../../source_base/blas_connector_vector.cpp ../../../source_base/blas_connector_matrix.cpp ../../../module_basis/module_pw/module_fft/fft_bundle.cpp ../../../module_basis/module_pw/module_fft/fft_cpu.cpp ${FFT_SRC} @@ -73,12 +73,12 @@ AddTest( ../xc_functional_vxc.cpp ../xc_functional_libxc_vxc.cpp ../xc_functional_libxc_tools.cpp - ../../../module_base/blas_connector_base.cpp ../../../module_base/blas_connector_vector.cpp ../../../module_base/blas_connector_matrix.cpp - ../../../module_base/matrix.cpp - ../../../module_base/memory.cpp - ../../../module_base/timer.cpp - ../../../module_base/libm/branred.cpp - ../../../module_base/libm/sincos.cpp + ../../../source_base/blas_connector_base.cpp ../../../source_base/blas_connector_vector.cpp ../../../source_base/blas_connector_matrix.cpp + ../../../source_base/matrix.cpp + ../../../source_base/memory.cpp + ../../../source_base/timer.cpp + ../../../source_base/libm/branred.cpp + ../../../source_base/libm/sincos.cpp ../../../module_basis/module_pw/module_fft/fft_bundle.cpp ../../../module_basis/module_pw/module_fft/fft_cpu.cpp ${FFT_SRC} diff --git a/source/module_hamilt_general/module_xc/test/test_xc3.cpp b/source/module_hamilt_general/module_xc/test/test_xc3.cpp index 13255831e1..1e7657ccdd 100644 --- a/source/module_hamilt_general/module_xc/test/test_xc3.cpp +++ b/source/module_hamilt_general/module_xc/test/test_xc3.cpp @@ -6,7 +6,7 @@ #include "../xc_functional.h" #include "../exx_info.h" #include "xc3_mock.h" -#include "module_base/matrix.h" +#include "source_base/matrix.h" /************************************************ * unit test of functionals diff --git a/source/module_hamilt_general/module_xc/test/test_xc5.cpp b/source/module_hamilt_general/module_xc/test/test_xc5.cpp index 67e81b4208..fc5a46ace8 100644 --- a/source/module_hamilt_general/module_xc/test/test_xc5.cpp +++ b/source/module_hamilt_general/module_xc/test/test_xc5.cpp @@ -7,8 +7,8 @@ #include "xctest.h" #include "../exx_info.h" #include "xc3_mock.h" -#include "module_base/matrix.h" -#include "../../../module_base/parallel_reduce.h" +#include "source_base/matrix.h" +#include "../../../source_base/parallel_reduce.h" /************************************************ * unit test of functionals diff --git a/source/module_hamilt_general/module_xc/xc_functional.cpp b/source/module_hamilt_general/module_xc/xc_functional.cpp index 70e85a5c30..45bbb6d73c 100644 --- a/source/module_hamilt_general/module_xc/xc_functional.cpp +++ b/source/module_hamilt_general/module_xc/xc_functional.cpp @@ -1,7 +1,7 @@ #include "xc_functional.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" #include "module_parameter/parameter.h" -#include "module_base/global_function.h" +#include "source_base/global_function.h" #ifdef USE_LIBXC #include "xc_functional_libxc.h" diff --git a/source/module_hamilt_general/module_xc/xc_functional.h b/source/module_hamilt_general/module_xc/xc_functional.h index c0fbc91744..9a3e73eb25 100644 --- a/source/module_hamilt_general/module_xc/xc_functional.h +++ b/source/module_hamilt_general/module_xc/xc_functional.h @@ -10,11 +10,11 @@ #else #include "xc_funcs.h" #endif // ifdef USE_LIBXC -#include "module_base/macros.h" -#include "module_base/global_function.h" -#include "module_base/global_variable.h" -#include "module_base/vector3.h" -#include "module_base/matrix.h" +#include "source_base/macros.h" +#include "source_base/global_function.h" +#include "source_base/global_variable.h" +#include "source_base/vector3.h" +#include "source_base/matrix.h" #include "exx_info.h" #include "module_basis/module_pw/pw_basis_k.h" #include "module_elecstate/module_charge/charge.h" diff --git a/source/module_hamilt_general/module_xc/xc_functional_gradcorr.cpp b/source/module_hamilt_general/module_xc/xc_functional_gradcorr.cpp index 4250146510..94ca64644a 100644 --- a/source/module_hamilt_general/module_xc/xc_functional_gradcorr.cpp +++ b/source/module_hamilt_general/module_xc/xc_functional_gradcorr.cpp @@ -9,7 +9,7 @@ // and gives the spin up and spin down components of the charge. #include "xc_functional.h" -#include "module_base/timer.h" +#include "source_base/timer.h" #include "module_basis/module_pw/pw_basis_k.h" #include "module_parameter/parameter.h" #include diff --git a/source/module_hamilt_general/module_xc/xc_functional_libxc.cpp b/source/module_hamilt_general/module_xc/xc_functional_libxc.cpp index f3ea0fbbd0..24154c75b4 100644 --- a/source/module_hamilt_general/module_xc/xc_functional_libxc.cpp +++ b/source/module_hamilt_general/module_xc/xc_functional_libxc.cpp @@ -2,8 +2,8 @@ #include "xc_functional_libxc.h" #include "module_parameter/parameter.h" -#include "module_base/tool_quit.h" -#include "module_base/formatter.h" +#include "source_base/tool_quit.h" +#include "source_base/formatter.h" #ifdef __EXX #include "module_hamilt_pw/hamilt_pwdft/global.h" // just for GlobalC::exx_info diff --git a/source/module_hamilt_general/module_xc/xc_functional_libxc.h b/source/module_hamilt_general/module_xc/xc_functional_libxc.h index 67953c0c57..948db289db 100644 --- a/source/module_hamilt_general/module_xc/xc_functional_libxc.h +++ b/source/module_hamilt_general/module_xc/xc_functional_libxc.h @@ -3,8 +3,8 @@ #ifdef USE_LIBXC -#include "module_base/matrix.h" -#include "module_base/vector3.h" +#include "source_base/matrix.h" +#include "source_base/vector3.h" #include #include diff --git a/source/module_hamilt_general/module_xc/xc_functional_libxc_vxc.cpp b/source/module_hamilt_general/module_xc/xc_functional_libxc_vxc.cpp index 20836fd8b1..f5deef72e0 100644 --- a/source/module_hamilt_general/module_xc/xc_functional_libxc_vxc.cpp +++ b/source/module_hamilt_general/module_xc/xc_functional_libxc_vxc.cpp @@ -3,11 +3,11 @@ #include "xc_functional.h" #include "xc_functional_libxc.h" #include "module_elecstate/module_charge/charge.h" -#include "module_base/global_variable.h" +#include "source_base/global_variable.h" #include "module_parameter/parameter.h" -#include "module_base/parallel_reduce.h" -#include "module_base/timer.h" -#include "module_base/tool_title.h" +#include "source_base/parallel_reduce.h" +#include "source_base/timer.h" +#include "source_base/tool_title.h" #include diff --git a/source/module_hamilt_general/module_xc/xc_functional_vxc.cpp b/source/module_hamilt_general/module_xc/xc_functional_vxc.cpp index 7a2adef8e3..a68a72d4c1 100644 --- a/source/module_hamilt_general/module_xc/xc_functional_vxc.cpp +++ b/source/module_hamilt_general/module_xc/xc_functional_vxc.cpp @@ -5,8 +5,8 @@ // 3. v_xc_meta : which takes rho and tau as input, and v_xc as output #include "xc_functional.h" -#include "module_base/parallel_reduce.h" -#include "module_base/timer.h" +#include "source_base/parallel_reduce.h" +#include "source_base/timer.h" #include "module_parameter/parameter.h" #ifdef USE_LIBXC diff --git a/source/module_hamilt_general/module_xc/xc_functional_wrapper_gcxc.cpp b/source/module_hamilt_general/module_xc/xc_functional_wrapper_gcxc.cpp index a162c5f06f..b126a9a4c9 100644 --- a/source/module_hamilt_general/module_xc/xc_functional_wrapper_gcxc.cpp +++ b/source/module_hamilt_general/module_xc/xc_functional_wrapper_gcxc.cpp @@ -9,7 +9,7 @@ #include "xc_functional.h" #include #include "module_hamilt_pw/hamilt_pwdft/global.h" -#include "module_base/global_function.h" +#include "source_base/global_function.h" #ifdef USE_LIBXC #include "xc_functional_libxc.h" diff --git a/source/module_hamilt_general/operator.cpp b/source/module_hamilt_general/operator.cpp index 6682777322..0c6ced1f55 100644 --- a/source/module_hamilt_general/operator.cpp +++ b/source/module_hamilt_general/operator.cpp @@ -1,6 +1,6 @@ #include "operator.h" -#include "module_base/timer.h" +#include "source_base/timer.h" using namespace hamilt; diff --git a/source/module_hamilt_general/operator.h b/source/module_hamilt_general/operator.h index 87567f9f36..9136dfa0ee 100644 --- a/source/module_hamilt_general/operator.h +++ b/source/module_hamilt_general/operator.h @@ -1,8 +1,8 @@ #ifndef OPERATOR_H #define OPERATOR_H -#include "module_base/global_function.h" -#include "module_base/tool_quit.h" +#include "source_base/global_function.h" +#include "source_base/tool_quit.h" #include "module_psi/psi.h" #include diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/FORCE.h b/source/module_hamilt_lcao/hamilt_lcaodft/FORCE.h index cb28b3cb98..3b53073dd3 100644 --- a/source/module_hamilt_lcao/hamilt_lcaodft/FORCE.h +++ b/source/module_hamilt_lcao/hamilt_lcaodft/FORCE.h @@ -1,9 +1,9 @@ #ifndef W_ABACUS_DEVELOP_ABACUS_DEVELOP_SOURCE_MODULE_HAMILT_LCAO_HAMILT_LCAODFT_FORCE_H #define W_ABACUS_DEVELOP_ABACUS_DEVELOP_SOURCE_MODULE_HAMILT_LCAO_HAMILT_LCAODFT_FORCE_H -#include "module_base/global_function.h" -#include "module_base/global_variable.h" -#include "module_base/matrix.h" +#include "source_base/global_function.h" +#include "source_base/global_variable.h" +#include "source_base/matrix.h" #include "module_basis/module_nao/two_center_bundle.h" #include "module_elecstate/elecstate.h" #include "module_elecstate/module_dm/density_matrix.h" diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/FORCE_STRESS.cpp b/source/module_hamilt_lcao/hamilt_lcaodft/FORCE_STRESS.cpp index 30abb40823..fb3c97823d 100644 --- a/source/module_hamilt_lcao/hamilt_lcaodft/FORCE_STRESS.cpp +++ b/source/module_hamilt_lcao/hamilt_lcaodft/FORCE_STRESS.cpp @@ -5,7 +5,7 @@ #include "module_io/output_log.h" #include "module_parameter/parameter.h" // new -#include "module_base/timer.h" +#include "source_base/timer.h" #include "module_cell/module_neighbor/sltk_grid_driver.h" #include "module_elecstate/elecstate_lcao.h" #include "module_elecstate/module_pot/H_TDDFT_pw.h" // Taoni add 2025-02-20 @@ -997,7 +997,7 @@ void Force_Stress_LCAO::calStressPwPart(UnitCell& ucell, return; } -#include "module_base/mathzone.h" +#include "source_base/mathzone.h" // do symmetry for total force template void Force_Stress_LCAO::forceSymmetry(const UnitCell& ucell, ModuleBase::matrix& fcs, ModuleSymmetry::Symmetry* symm) diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/FORCE_STRESS.h b/source/module_hamilt_lcao/hamilt_lcaodft/FORCE_STRESS.h index ebd725f1a6..dba1145092 100644 --- a/source/module_hamilt_lcao/hamilt_lcaodft/FORCE_STRESS.h +++ b/source/module_hamilt_lcao/hamilt_lcaodft/FORCE_STRESS.h @@ -2,9 +2,9 @@ #define FORCE_STRESS_LCAO_H #include "FORCE.h" -#include "module_base/global_function.h" -#include "module_base/global_variable.h" -#include "module_base/matrix.h" +#include "source_base/global_function.h" +#include "source_base/global_variable.h" +#include "source_base/matrix.h" #include "module_hamilt_pw/hamilt_pwdft/forces.h" #include "module_hamilt_pw/hamilt_pwdft/stress_func.h" #include "module_hamilt_pw/hamilt_pwdft/structure_factor.h" diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/FORCE_gamma.cpp b/source/module_hamilt_lcao/hamilt_lcaodft/FORCE_gamma.cpp index 72fe2feba9..7fa5841ea5 100644 --- a/source/module_hamilt_lcao/hamilt_lcaodft/FORCE_gamma.cpp +++ b/source/module_hamilt_lcao/hamilt_lcaodft/FORCE_gamma.cpp @@ -1,7 +1,7 @@ #include "FORCE.h" -#include "module_base/memory.h" -#include "module_base/parallel_reduce.h" -#include "module_base/timer.h" +#include "source_base/memory.h" +#include "source_base/parallel_reduce.h" +#include "source_base/timer.h" #include "module_cell/module_neighbor/sltk_grid_driver.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" #include "module_parameter/parameter.h" diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/FORCE_k.cpp b/source/module_hamilt_lcao/hamilt_lcaodft/FORCE_k.cpp index 8a5545e637..a8a571502e 100644 --- a/source/module_hamilt_lcao/hamilt_lcaodft/FORCE_k.cpp +++ b/source/module_hamilt_lcao/hamilt_lcaodft/FORCE_k.cpp @@ -1,8 +1,8 @@ #include "FORCE.h" -#include "module_base/memory.h" -#include "module_base/parallel_reduce.h" -#include "module_base/timer.h" -#include "module_base/tool_threading.h" +#include "source_base/memory.h" +#include "source_base/parallel_reduce.h" +#include "source_base/timer.h" +#include "source_base/tool_threading.h" #include "module_basis/module_ao/ORB_read.h" #include "module_cell/module_neighbor/sltk_grid_driver.h" #include "module_elecstate/cal_dm.h" diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/LCAO_HS_arrays.hpp b/source/module_hamilt_lcao/hamilt_lcaodft/LCAO_HS_arrays.hpp index 908b04c80f..5a306918ea 100644 --- a/source/module_hamilt_lcao/hamilt_lcaodft/LCAO_HS_arrays.hpp +++ b/source/module_hamilt_lcao/hamilt_lcaodft/LCAO_HS_arrays.hpp @@ -1,7 +1,7 @@ #ifndef LCAO_HS_ARRAYS_H #define LCAO_HS_ARRAYS_H -#include "module_base/abfs-vector3_order.h" +#include "source_base/abfs-vector3_order.h" #include #include diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/LCAO_allocate.cpp b/source/module_hamilt_lcao/hamilt_lcaodft/LCAO_allocate.cpp index 49f5e2bb9b..ebd3dba357 100644 --- a/source/module_hamilt_lcao/hamilt_lcaodft/LCAO_allocate.cpp +++ b/source/module_hamilt_lcao/hamilt_lcaodft/LCAO_allocate.cpp @@ -1,4 +1,4 @@ -#include "module_base/timer.h" +#include "source_base/timer.h" #include "module_hamilt_lcao/hamilt_lcaodft/LCAO_domain.h" #include "module_hamilt_lcao/module_deepks/LCAO_deepks.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/LCAO_domain.h b/source/module_hamilt_lcao/hamilt_lcaodft/LCAO_domain.h index 80b566356c..333280ff81 100644 --- a/source/module_hamilt_lcao/hamilt_lcaodft/LCAO_domain.h +++ b/source/module_hamilt_lcao/hamilt_lcaodft/LCAO_domain.h @@ -1,9 +1,9 @@ #ifndef LCAO_DOMAIN_H #define LCAO_DOMAIN_H -#include "module_base/global_function.h" -#include "module_base/global_variable.h" -#include "module_base/vector3.h" +#include "source_base/global_function.h" +#include "source_base/global_variable.h" +#include "source_base/vector3.h" #include "module_basis/module_nao/two_center_bundle.h" #include "module_cell/module_neighbor/sltk_grid_driver.h" #include "module_hamilt_lcao/hamilt_lcaodft/LCAO_HS_arrays.hpp" diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/LCAO_hamilt.hpp b/source/module_hamilt_lcao/hamilt_lcaodft/LCAO_hamilt.hpp index 10f508c578..d79f621677 100644 --- a/source/module_hamilt_lcao/hamilt_lcaodft/LCAO_hamilt.hpp +++ b/source/module_hamilt_lcao/hamilt_lcaodft/LCAO_hamilt.hpp @@ -3,9 +3,9 @@ #ifndef LCAO_HAMILT_HPP #define LCAO_HAMILT_HPP -#include "module_base/abfs-vector3_order.h" -#include "module_base/global_variable.h" -#include "module_base/timer.h" +#include "source_base/abfs-vector3_order.h" +#include "source_base/global_variable.h" +#include "source_base/timer.h" #include "module_hamilt_lcao/hamilt_lcaodft/spar_exx.h" #include "module_ri/RI_2D_Comm.h" diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/LCAO_nl_mu.cpp b/source/module_hamilt_lcao/hamilt_lcaodft/LCAO_nl_mu.cpp index be02ede822..665af92afc 100644 --- a/source/module_hamilt_lcao/hamilt_lcaodft/LCAO_nl_mu.cpp +++ b/source/module_hamilt_lcao/hamilt_lcaodft/LCAO_nl_mu.cpp @@ -1,4 +1,4 @@ -#include "module_base/timer.h" +#include "source_base/timer.h" #include "module_hamilt_lcao/hamilt_lcaodft/LCAO_domain.h" #include "module_parameter/parameter.h" diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/LCAO_set_st.cpp b/source/module_hamilt_lcao/hamilt_lcaodft/LCAO_set_st.cpp index 718d504615..dbe172261d 100644 --- a/source/module_hamilt_lcao/hamilt_lcaodft/LCAO_set_st.cpp +++ b/source/module_hamilt_lcao/hamilt_lcaodft/LCAO_set_st.cpp @@ -1,4 +1,4 @@ -#include "module_base/timer.h" +#include "source_base/timer.h" #include "module_hamilt_lcao/hamilt_lcaodft/LCAO_domain.h" #include "module_parameter/parameter.h" diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/LCAO_set_zero.cpp b/source/module_hamilt_lcao/hamilt_lcaodft/LCAO_set_zero.cpp index 039efae65d..03d7edd99a 100644 --- a/source/module_hamilt_lcao/hamilt_lcaodft/LCAO_set_zero.cpp +++ b/source/module_hamilt_lcao/hamilt_lcaodft/LCAO_set_zero.cpp @@ -1,8 +1,8 @@ #include "module_hamilt_lcao/hamilt_lcaodft/LCAO_domain.h" -#include "module_base/global_variable.h" +#include "source_base/global_variable.h" #include "module_parameter/parameter.h" -#include "module_base/timer.h" -#include "module_base/tool_threading.h" +#include "source_base/timer.h" +#include "source_base/tool_threading.h" namespace LCAO_domain { diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/center2_orb-orb11.cpp b/source/module_hamilt_lcao/hamilt_lcaodft/center2_orb-orb11.cpp index 7ad7ad7dfa..394384a3b4 100644 --- a/source/module_hamilt_lcao/hamilt_lcaodft/center2_orb-orb11.cpp +++ b/source/module_hamilt_lcao/hamilt_lcaodft/center2_orb-orb11.cpp @@ -6,11 +6,11 @@ #include "center2_orb-orb11.h" #include "center2_orb.h" -#include "module_base/constants.h" -#include "module_base/math_polyint.h" -#include "module_base/sph_bessel_recursive.h" -#include "module_base/ylm.h" -#include "module_base/array_pool.h" +#include "source_base/constants.h" +#include "source_base/math_polyint.h" +#include "source_base/sph_bessel_recursive.h" +#include "source_base/ylm.h" +#include "source_base/array_pool.h" #include diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/center2_orb-orb11.h b/source/module_hamilt_lcao/hamilt_lcaodft/center2_orb-orb11.h index 8cd2eaa606..40b7716b68 100644 --- a/source/module_hamilt_lcao/hamilt_lcaodft/center2_orb-orb11.h +++ b/source/module_hamilt_lcao/hamilt_lcaodft/center2_orb-orb11.h @@ -7,8 +7,8 @@ #define W_ABACUS_DEVELOP_ABACUS_DEVELOP_SOURCE_MODULE_HAMILT_LCAO_HAMILT_LCAODFT_CENTER2_ORB_ORB11_H #include "center2_orb.h" -#include "module_base/sph_bessel_recursive.h" -#include "module_base/vector3.h" +#include "source_base/sph_bessel_recursive.h" +#include "source_base/vector3.h" #include "module_basis/module_ao/ORB_atomic_lm.h" #include "module_basis/module_ao/ORB_gaunt_table.h" diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/center2_orb-orb21.cpp b/source/module_hamilt_lcao/hamilt_lcaodft/center2_orb-orb21.cpp index ae0fde5fd6..70d85ebebb 100644 --- a/source/module_hamilt_lcao/hamilt_lcaodft/center2_orb-orb21.cpp +++ b/source/module_hamilt_lcao/hamilt_lcaodft/center2_orb-orb21.cpp @@ -6,8 +6,8 @@ #include "center2_orb-orb21.h" -#include "module_base/constants.h" -#include "module_base/ylm.h" +#include "source_base/constants.h" +#include "source_base/ylm.h" #include diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/center2_orb-orb21.h b/source/module_hamilt_lcao/hamilt_lcaodft/center2_orb-orb21.h index 0f90bc7847..250c555a46 100644 --- a/source/module_hamilt_lcao/hamilt_lcaodft/center2_orb-orb21.h +++ b/source/module_hamilt_lcao/hamilt_lcaodft/center2_orb-orb21.h @@ -8,7 +8,7 @@ #include "center2_orb-orb11.h" #include "center2_orb.h" -#include "module_base/vector3.h" +#include "source_base/vector3.h" #include "module_basis/module_ao/ORB_atomic_lm.h" #include "module_basis/module_ao/ORB_gaunt_table.h" diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/center2_orb-orb22.h b/source/module_hamilt_lcao/hamilt_lcaodft/center2_orb-orb22.h index 0b44bcbc50..80e4531420 100644 --- a/source/module_hamilt_lcao/hamilt_lcaodft/center2_orb-orb22.h +++ b/source/module_hamilt_lcao/hamilt_lcaodft/center2_orb-orb22.h @@ -8,7 +8,7 @@ #include "center2_orb-orb21.h" #include "center2_orb.h" -#include "module_base/vector3.h" +#include "source_base/vector3.h" #include "module_basis/module_ao/ORB_atomic_lm.h" #include "module_basis/module_ao/ORB_gaunt_table.h" diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/center2_orb.cpp b/source/module_hamilt_lcao/hamilt_lcaodft/center2_orb.cpp index 6766349027..a2abeaf8bd 100644 --- a/source/module_hamilt_lcao/hamilt_lcaodft/center2_orb.cpp +++ b/source/module_hamilt_lcao/hamilt_lcaodft/center2_orb.cpp @@ -1,12 +1,12 @@ #include "center2_orb.h" -#include "module_base/constants.h" -#include "module_base/math_integral.h" -#include "module_base/mathzone_add1.h" -#include "module_base/memory.h" -#include "module_base/timer.h" -#include "module_base/tool_quit.h" -#include "module_base/tool_title.h" +#include "source_base/constants.h" +#include "source_base/math_integral.h" +#include "source_base/mathzone_add1.h" +#include "source_base/memory.h" +#include "source_base/timer.h" +#include "source_base/tool_quit.h" +#include "source_base/tool_title.h" int Center2_Orb::get_rmesh(const double& R1, const double& R2, const double dr) { @@ -273,7 +273,7 @@ void Center2_Orb::cal_ST_Phi12_R(const int& job, ModuleBase::timer::tick("Center2_Orb", "cal_ST_Phi12_R"); } -#include "module_base/constants.h" +#include "source_base/constants.h" // Peize Lin add 2017-10-27 void Center2_Orb::cal_ST_Phi12_R(const int& job, diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/center2_orb.h b/source/module_hamilt_lcao/hamilt_lcaodft/center2_orb.h index f0b49b9128..adbb9de3de 100644 --- a/source/module_hamilt_lcao/hamilt_lcaodft/center2_orb.h +++ b/source/module_hamilt_lcao/hamilt_lcaodft/center2_orb.h @@ -6,7 +6,7 @@ #ifndef CENTER2_ORB_H #define CENTER2_ORB_H -#include "module_base/sph_bessel_recursive.h" +#include "source_base/sph_bessel_recursive.h" #include "module_basis/module_ao/ORB_atomic_lm.h" #include diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/edm.cpp b/source/module_hamilt_lcao/hamilt_lcaodft/edm.cpp index 49074830a8..3e5ff0b8bb 100644 --- a/source/module_hamilt_lcao/hamilt_lcaodft/edm.cpp +++ b/source/module_hamilt_lcao/hamilt_lcaodft/edm.cpp @@ -1,6 +1,6 @@ #include "FORCE.h" #include "module_elecstate/module_dm/cal_dm_psi.h" -#include "module_base/memory.h" +#include "source_base/memory.h" #include "module_parameter/parameter.h" template<> elecstate::DensityMatrix Force_LCAO::cal_edm(const elecstate::ElecState* pelec, diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/grid_init.cpp b/source/module_hamilt_lcao/hamilt_lcaodft/grid_init.cpp index d14e3ef8a9..90667a738c 100644 --- a/source/module_hamilt_lcao/hamilt_lcaodft/grid_init.cpp +++ b/source/module_hamilt_lcao/hamilt_lcaodft/grid_init.cpp @@ -1,9 +1,9 @@ #include "module_hamilt_lcao/hamilt_lcaodft/LCAO_domain.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" #include "module_parameter/parameter.h" -#include "module_base/global_variable.h" -#include "module_base/parallel_reduce.h" -#include "module_base/timer.h" +#include "source_base/global_variable.h" +#include "source_base/parallel_reduce.h" +#include "source_base/timer.h" namespace LCAO_domain { diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/hamilt_lcao.cpp b/source/module_hamilt_lcao/hamilt_lcaodft/hamilt_lcao.cpp index 953f35579c..b01bcd1ca2 100644 --- a/source/module_hamilt_lcao/hamilt_lcaodft/hamilt_lcao.cpp +++ b/source/module_hamilt_lcao/hamilt_lcaodft/hamilt_lcao.cpp @@ -1,8 +1,8 @@ #include "hamilt_lcao.h" -#include "module_base/global_variable.h" -#include "module_base/memory.h" -#include "module_base/timer.h" +#include "source_base/global_variable.h" +#include "source_base/memory.h" +#include "source_base/timer.h" #include "module_hamilt_lcao/module_dftu/dftu.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" #include "module_parameter/parameter.h" diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/deepks_lcao.cpp b/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/deepks_lcao.cpp index 262832d50b..b5b281f6ec 100644 --- a/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/deepks_lcao.cpp +++ b/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/deepks_lcao.cpp @@ -1,7 +1,7 @@ #include "deepks_lcao.h" -#include "module_base/timer.h" -#include "module_base/tool_title.h" +#include "source_base/timer.h" +#include "source_base/tool_title.h" #include "module_cell/module_neighbor/sltk_grid_driver.h" #include "module_hamilt_lcao/module_deepks/LCAO_deepks.h" #include "module_hamilt_lcao/module_hcontainer/hcontainer_funcs.h" diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/dftu_force_stress.hpp b/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/dftu_force_stress.hpp index c6d1d343f8..2ce46854a4 100644 --- a/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/dftu_force_stress.hpp +++ b/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/dftu_force_stress.hpp @@ -1,7 +1,7 @@ #pragma once #include "dftu_lcao.h" -#include "module_base/parallel_reduce.h" -#include "module_base/timer.h" +#include "source_base/parallel_reduce.h" +#include "source_base/timer.h" namespace hamilt { diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/dftu_lcao.cpp b/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/dftu_lcao.cpp index 3c4a430c6d..e5c07fae6b 100644 --- a/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/dftu_lcao.cpp +++ b/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/dftu_lcao.cpp @@ -1,7 +1,7 @@ #include "dftu_lcao.h" -#include "module_base/timer.h" -#include "module_base/tool_title.h" +#include "source_base/timer.h" +#include "source_base/tool_title.h" #include "module_cell/module_neighbor/sltk_grid_driver.h" #include "module_hamilt_lcao/hamilt_lcaodft/operator_lcao/operator_lcao.h" #include "module_hamilt_lcao/module_hcontainer/hcontainer_funcs.h" @@ -9,7 +9,7 @@ #ifdef _OPENMP #include #endif -#include "module_base/parallel_reduce.h" +#include "source_base/parallel_reduce.h" template hamilt::DFTU>::DFTU(HS_Matrix_K* hsk_in, diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/dspin_force_stress.hpp b/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/dspin_force_stress.hpp index 0646a0b617..ff14029e25 100644 --- a/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/dspin_force_stress.hpp +++ b/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/dspin_force_stress.hpp @@ -1,7 +1,7 @@ #pragma once #include "dspin_lcao.h" -#include "module_base/parallel_reduce.h" -#include "module_base/timer.h" +#include "source_base/parallel_reduce.h" +#include "source_base/timer.h" namespace hamilt { diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/dspin_lcao.cpp b/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/dspin_lcao.cpp index e2f8b65209..2515fe4117 100644 --- a/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/dspin_lcao.cpp +++ b/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/dspin_lcao.cpp @@ -1,10 +1,10 @@ #include "dspin_lcao.h" #include "module_hamilt_lcao/module_deltaspin/spin_constrain.h" -#include "module_base/blas_connector.h" -#include "module_base/timer.h" -#include "module_base/memory.h" -#include "module_base/tool_title.h" -#include "module_base/parallel_reduce.h" +#include "source_base/blas_connector.h" +#include "source_base/timer.h" +#include "source_base/memory.h" +#include "source_base/tool_title.h" +#include "source_base/parallel_reduce.h" #include "module_parameter/parameter.h" template diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/ekinetic_new.cpp b/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/ekinetic_new.cpp index aca9776c37..85e985bbe0 100644 --- a/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/ekinetic_new.cpp +++ b/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/ekinetic_new.cpp @@ -1,7 +1,7 @@ #include "ekinetic_new.h" -#include "module_base/timer.h" -#include "module_base/tool_title.h" +#include "source_base/timer.h" +#include "source_base/tool_title.h" #include "module_cell/module_neighbor/sltk_grid_driver.h" #include "module_hamilt_lcao/hamilt_lcaodft/operator_lcao/operator_lcao.h" #include "module_hamilt_lcao/module_hcontainer/hcontainer_funcs.h" diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/meta_lcao.cpp b/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/meta_lcao.cpp index de325a998f..c170e2f6f4 100644 --- a/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/meta_lcao.cpp +++ b/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/meta_lcao.cpp @@ -1,6 +1,6 @@ #include "meta_lcao.h" -#include "module_base/timer.h" -#include "module_base/tool_title.h" +#include "source_base/timer.h" +#include "source_base/tool_title.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" namespace hamilt diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/meta_lcao.h b/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/meta_lcao.h index 9ab76b43c9..3d05a85396 100644 --- a/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/meta_lcao.h +++ b/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/meta_lcao.h @@ -1,6 +1,6 @@ #ifndef METALCAO_H #define METALCAO_H -#include "module_base/timer.h" +#include "source_base/timer.h" #include "module_hamilt_lcao/module_gint/gint_gamma.h" #include "module_hamilt_lcao/module_gint/gint_k.h" #include "operator_lcao.h" diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/nonlocal_force_stress.hpp b/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/nonlocal_force_stress.hpp index d6999b7ae9..284842ae4d 100644 --- a/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/nonlocal_force_stress.hpp +++ b/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/nonlocal_force_stress.hpp @@ -1,7 +1,7 @@ #pragma once #include "nonlocal_new.h" -#include "module_base/parallel_reduce.h" -#include "module_base/timer.h" +#include "source_base/parallel_reduce.h" +#include "source_base/timer.h" namespace hamilt { diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/nonlocal_new.cpp b/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/nonlocal_new.cpp index b8afc97987..c25e70bedb 100644 --- a/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/nonlocal_new.cpp +++ b/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/nonlocal_new.cpp @@ -1,7 +1,7 @@ #include "nonlocal_new.h" -#include "module_base/timer.h" -#include "module_base/tool_title.h" +#include "source_base/timer.h" +#include "source_base/tool_title.h" #include "module_cell/module_neighbor/sltk_grid_driver.h" #include "module_hamilt_lcao/hamilt_lcaodft/operator_lcao/operator_lcao.h" #include "module_hamilt_lcao/module_hcontainer/hcontainer_funcs.h" diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/op_dftu_lcao.cpp b/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/op_dftu_lcao.cpp index 924dcf1764..d61bc700f0 100644 --- a/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/op_dftu_lcao.cpp +++ b/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/op_dftu_lcao.cpp @@ -1,6 +1,6 @@ #include "op_dftu_lcao.h" -#include "module_base/timer.h" -#include "module_base/tool_title.h" +#include "source_base/timer.h" +#include "source_base/tool_title.h" #include "module_hamilt_lcao/module_dftu/dftu.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/op_dftu_lcao.h b/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/op_dftu_lcao.h index de40bce4b3..e15f4ae9dd 100644 --- a/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/op_dftu_lcao.h +++ b/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/op_dftu_lcao.h @@ -1,6 +1,6 @@ #ifndef OPDFTULCAO_H #define OPDFTULCAO_H -#include "module_base/timer.h" +#include "source_base/timer.h" #include "operator_lcao.h" namespace hamilt diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/op_exx_lcao.cpp b/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/op_exx_lcao.cpp index 4e7b2b553f..aab8a9b822 100644 --- a/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/op_exx_lcao.cpp +++ b/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/op_exx_lcao.cpp @@ -1,6 +1,6 @@ #ifdef __EXX #include "op_exx_lcao.h" -#include "module_base/blacs_connector.h" +#include "source_base/blacs_connector.h" namespace hamilt { diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/operator_lcao.cpp b/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/operator_lcao.cpp index b108dfcbb6..cb7b1d0169 100644 --- a/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/operator_lcao.cpp +++ b/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/operator_lcao.cpp @@ -1,7 +1,7 @@ #include "operator_lcao.h" -#include "module_base/timer.h" -#include "module_base/tool_title.h" +#include "source_base/timer.h" +#include "source_base/tool_title.h" #include "module_hamilt_lcao/module_hcontainer/hcontainer_funcs.h" #include "source_hsolver/hsolver_lcao.h" diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/operator_lcao.h b/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/operator_lcao.h index f9ad63c942..8798712ad8 100644 --- a/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/operator_lcao.h +++ b/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/operator_lcao.h @@ -1,6 +1,6 @@ #ifndef OPERATORLCAO_H #define OPERATORLCAO_H -#include "module_base/vector3.h" +#include "source_base/vector3.h" #include "module_hamilt_general/matrixblock.h" #include "module_hamilt_general/operator.h" #include "module_hamilt_lcao/module_hcontainer/hcontainer.h" diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/overlap_new.cpp b/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/overlap_new.cpp index b7654aac65..b8663ef949 100644 --- a/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/overlap_new.cpp +++ b/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/overlap_new.cpp @@ -1,8 +1,8 @@ #include "overlap_new.h" #include "module_parameter/parameter.h" -#include "module_base/timer.h" -#include "module_base/tool_title.h" +#include "source_base/timer.h" +#include "source_base/tool_title.h" #include "module_cell/module_neighbor/sltk_grid_driver.h" #include "module_hamilt_lcao/hamilt_lcaodft/operator_lcao/operator_lcao.h" #include "module_hamilt_lcao/module_hcontainer/hcontainer_funcs.h" diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/td_ekinetic_lcao.cpp b/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/td_ekinetic_lcao.cpp index 38246abadb..48f0a4ce94 100644 --- a/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/td_ekinetic_lcao.cpp +++ b/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/td_ekinetic_lcao.cpp @@ -1,10 +1,10 @@ #include "td_ekinetic_lcao.h" #include "module_parameter/parameter.h" -#include "module_base/global_variable.h" -#include "module_base/libm/libm.h" -#include "module_base/timer.h" -#include "module_base/tool_title.h" +#include "source_base/global_variable.h" +#include "source_base/libm/libm.h" +#include "source_base/timer.h" +#include "source_base/tool_title.h" #include "module_cell/module_neighbor/sltk_grid_driver.h" #include "module_elecstate/module_pot/H_TDDFT_pw.h" #include "module_hamilt_lcao/hamilt_lcaodft/center2_orb-orb11.h" diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/td_ekinetic_lcao.h b/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/td_ekinetic_lcao.h index 7f5881ac1f..b1aaa1b8c7 100644 --- a/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/td_ekinetic_lcao.h +++ b/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/td_ekinetic_lcao.h @@ -1,6 +1,6 @@ #ifndef TDEKINETIC_H #define TDEKINETIC_H -#include "module_base/timer.h" +#include "source_base/timer.h" #include "module_basis/module_nao/two_center_integrator.h" #include "module_cell/klist.h" #include "module_cell/module_neighbor/sltk_grid_driver.h" diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/td_nonlocal_lcao.cpp b/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/td_nonlocal_lcao.cpp index d833c5c358..3720197566 100644 --- a/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/td_nonlocal_lcao.cpp +++ b/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/td_nonlocal_lcao.cpp @@ -1,8 +1,8 @@ #include "td_nonlocal_lcao.h" #include "module_parameter/parameter.h" -#include "module_base/timer.h" -#include "module_base/tool_title.h" +#include "source_base/timer.h" +#include "source_base/tool_title.h" #include "module_cell/module_neighbor/sltk_grid_driver.h" #include "module_hamilt_lcao/hamilt_lcaodft/operator_lcao/operator_lcao.h" #include "module_hamilt_lcao/module_hcontainer/hcontainer_funcs.h" diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/veff_lcao.cpp b/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/veff_lcao.cpp index 41fb87f222..be58d8e5fa 100644 --- a/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/veff_lcao.cpp +++ b/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/veff_lcao.cpp @@ -1,7 +1,7 @@ #include "veff_lcao.h" -#include "module_base/timer.h" +#include "source_base/timer.h" #include "module_parameter/parameter.h" -#include "module_base/tool_title.h" +#include "source_base/tool_title.h" #include "module_hamilt_general/module_xc/xc_functional.h" #include "module_cell/unitcell.h" #include "module_hamilt_lcao/module_gint/temp_gint/gint_interface.h" diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/veff_lcao.h b/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/veff_lcao.h index 23b1ec5c57..0a4d163b78 100644 --- a/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/veff_lcao.h +++ b/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/veff_lcao.h @@ -1,6 +1,6 @@ #ifndef VEFFLCAO_H #define VEFFLCAO_H -#include "module_base/timer.h" +#include "source_base/timer.h" #include "module_elecstate/module_pot/potential_new.h" #include "module_hamilt_lcao/module_gint/gint_gamma.h" #include "module_hamilt_lcao/module_gint/gint_k.h" diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/pulay_force_stress_center2_template.hpp b/source/module_hamilt_lcao/hamilt_lcaodft/pulay_force_stress_center2_template.hpp index e0eedffaad..1aec69f99e 100644 --- a/source/module_hamilt_lcao/hamilt_lcaodft/pulay_force_stress_center2_template.hpp +++ b/source/module_hamilt_lcao/hamilt_lcaodft/pulay_force_stress_center2_template.hpp @@ -1,6 +1,6 @@ #pragma once #include "pulay_force_stress.h" -#include "module_base/timer.h" +#include "source_base/timer.h" #include "module_parameter/parameter.h" namespace PulayForceStress { diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/record_adj.cpp b/source/module_hamilt_lcao/hamilt_lcaodft/record_adj.cpp index bd0a9bcfb7..30d03266e2 100644 --- a/source/module_hamilt_lcao/hamilt_lcaodft/record_adj.cpp +++ b/source/module_hamilt_lcao/hamilt_lcaodft/record_adj.cpp @@ -1,6 +1,6 @@ #include "record_adj.h" -#include "module_base/timer.h" +#include "source_base/timer.h" #include "module_cell/module_neighbor/sltk_grid_driver.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" #include "module_parameter/parameter.h" diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/spar_u.cpp b/source/module_hamilt_lcao/hamilt_lcaodft/spar_u.cpp index 4515ea185c..faf554127c 100644 --- a/source/module_hamilt_lcao/hamilt_lcaodft/spar_u.cpp +++ b/source/module_hamilt_lcao/hamilt_lcaodft/spar_u.cpp @@ -1,8 +1,8 @@ #include "spar_u.h" -#include "module_base/parallel_reduce.h" +#include "source_base/parallel_reduce.h" #include "module_parameter/parameter.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" -#include "module_base/timer.h" +#include "source_base/timer.h" #include "module_hamilt_lcao/module_dftu/dftu.h" void sparse_format::cal_HR_dftu( diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/stress_tools.h b/source/module_hamilt_lcao/hamilt_lcaodft/stress_tools.h index 4ae6ed31ee..305870e3d7 100644 --- a/source/module_hamilt_lcao/hamilt_lcaodft/stress_tools.h +++ b/source/module_hamilt_lcao/hamilt_lcaodft/stress_tools.h @@ -1,5 +1,5 @@ #pragma once -#include "module_base/matrix.h" +#include "source_base/matrix.h" // this namespace used to store global function for some stress operation namespace StressTools { diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/wavefunc_in_pw.cpp b/source/module_hamilt_lcao/hamilt_lcaodft/wavefunc_in_pw.cpp index c35cdce462..566ec2f26d 100644 --- a/source/module_hamilt_lcao/hamilt_lcaodft/wavefunc_in_pw.cpp +++ b/source/module_hamilt_lcao/hamilt_lcaodft/wavefunc_in_pw.cpp @@ -2,10 +2,10 @@ #include "module_hamilt_pw/hamilt_pwdft/global.h" #include "module_parameter/parameter.h" #include // Peize Lin fix bug about strcmp 2016-08-02 -#include "module_base/math_integral.h" -#include "module_base/math_sphbes.h" -#include "module_base/math_polyint.h" -#include "module_base/math_ylmreal.h" +#include "source_base/math_integral.h" +#include "source_base/math_sphbes.h" +#include "source_base/math_polyint.h" +#include "source_base/math_ylmreal.h" #include "module_hamilt_pw/hamilt_pwdft/soc.h" void Wavefunc_in_pw::make_table_q( diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/wavefunc_in_pw.h b/source/module_hamilt_lcao/hamilt_lcaodft/wavefunc_in_pw.h index 47cd5f9cff..5522551c68 100644 --- a/source/module_hamilt_lcao/hamilt_lcaodft/wavefunc_in_pw.h +++ b/source/module_hamilt_lcao/hamilt_lcaodft/wavefunc_in_pw.h @@ -1,11 +1,11 @@ #ifndef WAVEFUNC_IN_PW_H #define WAVEFUNC_IN_PW_H -#include "module_base/complexmatrix.h" -#include "module_base/global_function.h" -#include "module_base/global_variable.h" -#include "module_base/realarray.h" -#include "module_base/vector3.h" +#include "source_base/complexmatrix.h" +#include "source_base/global_function.h" +#include "source_base/global_variable.h" +#include "source_base/realarray.h" +#include "source_base/vector3.h" #include "module_basis/module_pw/pw_basis_k.h" #include "module_hamilt_pw/hamilt_pwdft/structure_factor.h" diff --git a/source/module_hamilt_lcao/module_deepks/LCAO_deepks.h b/source/module_hamilt_lcao/module_deepks/LCAO_deepks.h index 9e7aec1301..6d628e1f82 100644 --- a/source/module_hamilt_lcao/module_deepks/LCAO_deepks.h +++ b/source/module_hamilt_lcao/module_deepks/LCAO_deepks.h @@ -16,10 +16,10 @@ #include "deepks_vdelta.h" #include "deepks_vdpre.h" #include "deepks_vdrpre.h" -#include "module_base/complexmatrix.h" -#include "module_base/intarray.h" -#include "module_base/matrix.h" -#include "module_base/timer.h" +#include "source_base/complexmatrix.h" +#include "source_base/intarray.h" +#include "source_base/matrix.h" +#include "source_base/timer.h" #include "module_basis/module_ao/parallel_orbitals.h" #include "module_basis/module_nao/two_center_integrator.h" #include "module_cell/module_neighbor/sltk_grid_driver.h" diff --git a/source/module_hamilt_lcao/module_deepks/LCAO_deepks_interface.cpp b/source/module_hamilt_lcao/module_deepks/LCAO_deepks_interface.cpp index bb916434d9..8b953c632a 100644 --- a/source/module_hamilt_lcao/module_deepks/LCAO_deepks_interface.cpp +++ b/source/module_hamilt_lcao/module_deepks/LCAO_deepks_interface.cpp @@ -2,8 +2,8 @@ #include "LCAO_deepks_interface.h" #include "LCAO_deepks_io.h" // mohan add 2024-07-22 -#include "module_base/global_variable.h" -#include "module_base/tool_title.h" +#include "source_base/global_variable.h" +#include "source_base/tool_title.h" #include "module_elecstate/cal_dm.h" #include "module_hamilt_lcao/module_hcontainer/hcontainer.h" #include "module_hamilt_lcao/module_hcontainer/output_hcontainer.h" diff --git a/source/module_hamilt_lcao/module_deepks/LCAO_deepks_interface.h b/source/module_hamilt_lcao/module_deepks/LCAO_deepks_interface.h index a5a87f2089..dc90c47764 100644 --- a/source/module_hamilt_lcao/module_deepks/LCAO_deepks_interface.h +++ b/source/module_hamilt_lcao/module_deepks/LCAO_deepks_interface.h @@ -3,8 +3,8 @@ #ifdef __MLALGO #include "LCAO_deepks.h" -#include "module_base/complexmatrix.h" -#include "module_base/matrix.h" +#include "source_base/complexmatrix.h" +#include "source_base/matrix.h" #include "module_hamilt_lcao/hamilt_lcaodft/hamilt_lcao.h" #include diff --git a/source/module_hamilt_lcao/module_deepks/LCAO_deepks_io.cpp b/source/module_hamilt_lcao/module_deepks/LCAO_deepks_io.cpp index 6f6c28aa43..7dd734a237 100644 --- a/source/module_hamilt_lcao/module_deepks/LCAO_deepks_io.cpp +++ b/source/module_hamilt_lcao/module_deepks/LCAO_deepks_io.cpp @@ -3,7 +3,7 @@ #ifdef __MLALGO #include "LCAO_deepks_io.h" -#include "module_base/tool_quit.h" +#include "source_base/tool_quit.h" #include "npy.hpp" #include diff --git a/source/module_hamilt_lcao/module_deepks/LCAO_deepks_io.h b/source/module_hamilt_lcao/module_deepks/LCAO_deepks_io.h index e8ab04adc4..19a686fae4 100644 --- a/source/module_hamilt_lcao/module_deepks/LCAO_deepks_io.h +++ b/source/module_hamilt_lcao/module_deepks/LCAO_deepks_io.h @@ -3,9 +3,9 @@ #ifdef __MLALGO -#include "module_base/complexmatrix.h" -#include "module_base/matrix.h" -#include "module_base/tool_title.h" +#include "source_base/complexmatrix.h" +#include "source_base/matrix.h" +#include "source_base/tool_title.h" #include #include diff --git a/source/module_hamilt_lcao/module_deepks/deepks_basic.cpp b/source/module_hamilt_lcao/module_deepks/deepks_basic.cpp index 48989c350e..a2195e4c21 100644 --- a/source/module_hamilt_lcao/module_deepks/deepks_basic.cpp +++ b/source/module_hamilt_lcao/module_deepks/deepks_basic.cpp @@ -5,8 +5,8 @@ #ifdef __MLALGO #include "deepks_basic.h" -#include "module_base/atom_in.h" -#include "module_base/timer.h" +#include "source_base/atom_in.h" +#include "source_base/timer.h" #include "module_parameter/parameter.h" // d(Descriptor) / d(projected density matrix) diff --git a/source/module_hamilt_lcao/module_deepks/deepks_basic.h b/source/module_hamilt_lcao/module_deepks/deepks_basic.h index 5b0deb521d..e054390850 100644 --- a/source/module_hamilt_lcao/module_deepks/deepks_basic.h +++ b/source/module_hamilt_lcao/module_deepks/deepks_basic.h @@ -3,8 +3,8 @@ #ifdef __MLALGO #include "LCAO_deepks_io.h" -#include "module_base/parallel_reduce.h" -#include "module_base/tool_title.h" +#include "source_base/parallel_reduce.h" +#include "source_base/tool_title.h" #include "module_cell/unitcell.h" #include diff --git a/source/module_hamilt_lcao/module_deepks/deepks_descriptor.cpp b/source/module_hamilt_lcao/module_deepks/deepks_descriptor.cpp index 02dbcdd5b3..ddfd91ae3d 100644 --- a/source/module_hamilt_lcao/module_deepks/deepks_descriptor.cpp +++ b/source/module_hamilt_lcao/module_deepks/deepks_descriptor.cpp @@ -8,10 +8,10 @@ #include "deepks_descriptor.h" #include "LCAO_deepks_io.h" // mohan add 2024-07-22 -#include "module_base/blas_connector.h" -#include "module_base/constants.h" -#include "module_base/libm/libm.h" -#include "module_base/parallel_reduce.h" +#include "source_base/blas_connector.h" +#include "source_base/constants.h" +#include "source_base/libm/libm.h" +#include "source_base/parallel_reduce.h" #include "module_hamilt_lcao/module_hcontainer/atom_pair.h" #include "module_parameter/parameter.h" diff --git a/source/module_hamilt_lcao/module_deepks/deepks_descriptor.h b/source/module_hamilt_lcao/module_deepks/deepks_descriptor.h index 67b6b05e20..9316ddd675 100644 --- a/source/module_hamilt_lcao/module_deepks/deepks_descriptor.h +++ b/source/module_hamilt_lcao/module_deepks/deepks_descriptor.h @@ -3,8 +3,8 @@ #ifdef __MLALGO -#include "module_base/intarray.h" -#include "module_base/timer.h" +#include "source_base/intarray.h" +#include "source_base/timer.h" #include "module_cell/unitcell.h" #include diff --git a/source/module_hamilt_lcao/module_deepks/deepks_force.cpp b/source/module_hamilt_lcao/module_deepks/deepks_force.cpp index 8c3e5e532c..8c9e9d2e48 100644 --- a/source/module_hamilt_lcao/module_deepks/deepks_force.cpp +++ b/source/module_hamilt_lcao/module_deepks/deepks_force.cpp @@ -4,10 +4,10 @@ #include "deepks_force.h" #include "deepks_iterate.h" -#include "module_base/constants.h" -#include "module_base/libm/libm.h" -#include "module_base/timer.h" -#include "module_base/vector3.h" +#include "source_base/constants.h" +#include "source_base/libm/libm.h" +#include "source_base/timer.h" +#include "source_base/vector3.h" #include "module_hamilt_lcao/module_hcontainer/atom_pair.h" template diff --git a/source/module_hamilt_lcao/module_deepks/deepks_force.h b/source/module_hamilt_lcao/module_deepks/deepks_force.h index d0a24334db..92c73091b9 100644 --- a/source/module_hamilt_lcao/module_deepks/deepks_force.h +++ b/source/module_hamilt_lcao/module_deepks/deepks_force.h @@ -3,10 +3,10 @@ #ifdef __MLALGO -#include "module_base/complexmatrix.h" -#include "module_base/intarray.h" -#include "module_base/matrix.h" -#include "module_base/timer.h" +#include "source_base/complexmatrix.h" +#include "source_base/intarray.h" +#include "source_base/matrix.h" +#include "source_base/timer.h" #include "module_basis/module_ao/parallel_orbitals.h" #include "module_basis/module_nao/two_center_integrator.h" #include "module_cell/module_neighbor/sltk_grid_driver.h" diff --git a/source/module_hamilt_lcao/module_deepks/deepks_fpre.cpp b/source/module_hamilt_lcao/module_deepks/deepks_fpre.cpp index ea08e66c97..9bb1a3e12e 100644 --- a/source/module_hamilt_lcao/module_deepks/deepks_fpre.cpp +++ b/source/module_hamilt_lcao/module_deepks/deepks_fpre.cpp @@ -3,11 +3,11 @@ #include "deepks_fpre.h" #include "deepks_iterate.h" -#include "module_base/constants.h" -#include "module_base/libm/libm.h" -#include "module_base/parallel_reduce.h" -#include "module_base/timer.h" -#include "module_base/vector3.h" +#include "source_base/constants.h" +#include "source_base/libm/libm.h" +#include "source_base/parallel_reduce.h" +#include "source_base/timer.h" +#include "source_base/vector3.h" #include "module_hamilt_lcao/module_hcontainer/atom_pair.h" #include "module_parameter/parameter.h" diff --git a/source/module_hamilt_lcao/module_deepks/deepks_fpre.h b/source/module_hamilt_lcao/module_deepks/deepks_fpre.h index a2c324047a..9d1baa38dc 100644 --- a/source/module_hamilt_lcao/module_deepks/deepks_fpre.h +++ b/source/module_hamilt_lcao/module_deepks/deepks_fpre.h @@ -3,10 +3,10 @@ #ifdef __MLALGO -#include "module_base/complexmatrix.h" -#include "module_base/intarray.h" -#include "module_base/matrix.h" -#include "module_base/timer.h" +#include "source_base/complexmatrix.h" +#include "source_base/intarray.h" +#include "source_base/matrix.h" +#include "source_base/timer.h" #include "module_basis/module_ao/parallel_orbitals.h" #include "module_basis/module_nao/two_center_integrator.h" #include "module_cell/module_neighbor/sltk_grid_driver.h" diff --git a/source/module_hamilt_lcao/module_deepks/deepks_iterate.h b/source/module_hamilt_lcao/module_deepks/deepks_iterate.h index d41aa0b0b6..d6e7b81819 100644 --- a/source/module_hamilt_lcao/module_deepks/deepks_iterate.h +++ b/source/module_hamilt_lcao/module_deepks/deepks_iterate.h @@ -5,11 +5,11 @@ #ifdef __MLALGO -#include "module_base/complexmatrix.h" -#include "module_base/intarray.h" -#include "module_base/matrix.h" -#include "module_base/timer.h" -#include "module_base/vector3.h" +#include "source_base/complexmatrix.h" +#include "source_base/intarray.h" +#include "source_base/matrix.h" +#include "source_base/timer.h" +#include "source_base/vector3.h" #include "module_basis/module_ao/ORB_read.h" #include "module_basis/module_ao/parallel_orbitals.h" #include "module_cell/module_neighbor/sltk_grid_driver.h" diff --git a/source/module_hamilt_lcao/module_deepks/deepks_orbital.cpp b/source/module_hamilt_lcao/module_deepks/deepks_orbital.cpp index 8e3cf7f15f..7097a3e242 100644 --- a/source/module_hamilt_lcao/module_deepks/deepks_orbital.cpp +++ b/source/module_hamilt_lcao/module_deepks/deepks_orbital.cpp @@ -3,8 +3,8 @@ #ifdef __MLALGO #include "deepks_orbital.h" -#include "module_base/parallel_reduce.h" -#include "module_base/timer.h" +#include "source_base/parallel_reduce.h" +#include "source_base/timer.h" template void DeePKS_domain::cal_o_delta(const std::vector& dm_hl, diff --git a/source/module_hamilt_lcao/module_deepks/deepks_orbital.h b/source/module_hamilt_lcao/module_deepks/deepks_orbital.h index 5270d48489..6fb0d22fff 100644 --- a/source/module_hamilt_lcao/module_deepks/deepks_orbital.h +++ b/source/module_hamilt_lcao/module_deepks/deepks_orbital.h @@ -3,10 +3,10 @@ #ifdef __MLALGO -#include "module_base/complexmatrix.h" -#include "module_base/intarray.h" -#include "module_base/matrix.h" -#include "module_base/timer.h" +#include "source_base/complexmatrix.h" +#include "source_base/intarray.h" +#include "source_base/matrix.h" +#include "source_base/timer.h" #include "module_basis/module_ao/parallel_orbitals.h" #include "module_elecstate/module_dm/density_matrix.h" diff --git a/source/module_hamilt_lcao/module_deepks/deepks_orbpre.cpp b/source/module_hamilt_lcao/module_deepks/deepks_orbpre.cpp index 0042c77b89..6957a86534 100644 --- a/source/module_hamilt_lcao/module_deepks/deepks_orbpre.cpp +++ b/source/module_hamilt_lcao/module_deepks/deepks_orbpre.cpp @@ -7,10 +7,10 @@ #include "deepks_orbpre.h" #include "LCAO_deepks_io.h" // mohan add 2024-07-22 -#include "module_base/blas_connector.h" -#include "module_base/constants.h" -#include "module_base/libm/libm.h" -#include "module_base/parallel_reduce.h" +#include "source_base/blas_connector.h" +#include "source_base/constants.h" +#include "source_base/libm/libm.h" +#include "source_base/parallel_reduce.h" #include "module_hamilt_lcao/module_hcontainer/atom_pair.h" #include "module_parameter/parameter.h" diff --git a/source/module_hamilt_lcao/module_deepks/deepks_orbpre.h b/source/module_hamilt_lcao/module_deepks/deepks_orbpre.h index 6461a1723b..af48cf63c7 100644 --- a/source/module_hamilt_lcao/module_deepks/deepks_orbpre.h +++ b/source/module_hamilt_lcao/module_deepks/deepks_orbpre.h @@ -3,10 +3,10 @@ #ifdef __MLALGO -#include "module_base/complexmatrix.h" -#include "module_base/intarray.h" -#include "module_base/matrix.h" -#include "module_base/timer.h" +#include "source_base/complexmatrix.h" +#include "source_base/intarray.h" +#include "source_base/matrix.h" +#include "source_base/timer.h" #include "module_basis/module_ao/parallel_orbitals.h" #include "module_basis/module_nao/two_center_integrator.h" #include "module_cell/module_neighbor/sltk_grid_driver.h" diff --git a/source/module_hamilt_lcao/module_deepks/deepks_pdm.cpp b/source/module_hamilt_lcao/module_deepks/deepks_pdm.cpp index 13befa807f..57b7791e0d 100644 --- a/source/module_hamilt_lcao/module_deepks/deepks_pdm.cpp +++ b/source/module_hamilt_lcao/module_deepks/deepks_pdm.cpp @@ -17,12 +17,12 @@ #include "deepks_iterate.h" #include "deepks_pdm.h" -#include "module_base/constants.h" -#include "module_base/libm/libm.h" -#include "module_base/timer.h" +#include "source_base/constants.h" +#include "source_base/libm/libm.h" +#include "source_base/timer.h" #include "module_hamilt_lcao/module_hcontainer/atom_pair.h" #ifdef __MPI -#include "module_base/parallel_reduce.h" +#include "source_base/parallel_reduce.h" #endif void DeePKS_domain::read_pdm(bool read_pdm_file, diff --git a/source/module_hamilt_lcao/module_deepks/deepks_pdm.h b/source/module_hamilt_lcao/module_deepks/deepks_pdm.h index 8aec2a3bab..23f511aed7 100644 --- a/source/module_hamilt_lcao/module_deepks/deepks_pdm.h +++ b/source/module_hamilt_lcao/module_deepks/deepks_pdm.h @@ -3,9 +3,9 @@ #ifdef __MLALGO -#include "module_base/complexmatrix.h" -#include "module_base/matrix.h" -#include "module_base/timer.h" +#include "source_base/complexmatrix.h" +#include "source_base/matrix.h" +#include "source_base/timer.h" #include "module_basis/module_ao/parallel_orbitals.h" #include "module_elecstate/module_dm/density_matrix.h" #include "module_hamilt_lcao/module_hcontainer/hcontainer.h" diff --git a/source/module_hamilt_lcao/module_deepks/deepks_phialpha.cpp b/source/module_hamilt_lcao/module_deepks/deepks_phialpha.cpp index 316bc67291..88e6a37565 100644 --- a/source/module_hamilt_lcao/module_deepks/deepks_phialpha.cpp +++ b/source/module_hamilt_lcao/module_deepks/deepks_phialpha.cpp @@ -11,8 +11,8 @@ #include "deepks_phialpha.h" #include "deepks_iterate.h" -#include "module_base/timer.h" -#include "module_base/vector3.h" +#include "source_base/timer.h" +#include "source_base/vector3.h" #include "module_parameter/parameter.h" void DeePKS_domain::allocate_phialpha(const bool& cal_deri, diff --git a/source/module_hamilt_lcao/module_deepks/deepks_phialpha.h b/source/module_hamilt_lcao/module_deepks/deepks_phialpha.h index c466fdba27..37b7a7bdf6 100644 --- a/source/module_hamilt_lcao/module_deepks/deepks_phialpha.h +++ b/source/module_hamilt_lcao/module_deepks/deepks_phialpha.h @@ -3,9 +3,9 @@ #ifdef __MLALGO -#include "module_base/complexmatrix.h" -#include "module_base/matrix.h" -#include "module_base/timer.h" +#include "source_base/complexmatrix.h" +#include "source_base/matrix.h" +#include "source_base/timer.h" #include "module_basis/module_ao/parallel_orbitals.h" #include "module_basis/module_nao/two_center_integrator.h" #include "module_cell/module_neighbor/sltk_grid_driver.h" diff --git a/source/module_hamilt_lcao/module_deepks/deepks_spre.cpp b/source/module_hamilt_lcao/module_deepks/deepks_spre.cpp index 1865bca2d8..35c393f2f1 100644 --- a/source/module_hamilt_lcao/module_deepks/deepks_spre.cpp +++ b/source/module_hamilt_lcao/module_deepks/deepks_spre.cpp @@ -3,11 +3,11 @@ #include "deepks_spre.h" #include "deepks_iterate.h" -#include "module_base/constants.h" -#include "module_base/libm/libm.h" -#include "module_base/parallel_reduce.h" -#include "module_base/timer.h" -#include "module_base/vector3.h" +#include "source_base/constants.h" +#include "source_base/libm/libm.h" +#include "source_base/parallel_reduce.h" +#include "source_base/timer.h" +#include "source_base/vector3.h" #include "module_hamilt_lcao/module_hcontainer/atom_pair.h" #include "module_parameter/parameter.h" diff --git a/source/module_hamilt_lcao/module_deepks/deepks_spre.h b/source/module_hamilt_lcao/module_deepks/deepks_spre.h index a95a041aca..699a3dc8e8 100644 --- a/source/module_hamilt_lcao/module_deepks/deepks_spre.h +++ b/source/module_hamilt_lcao/module_deepks/deepks_spre.h @@ -3,10 +3,10 @@ #ifdef __MLALGO -#include "module_base/complexmatrix.h" -#include "module_base/intarray.h" -#include "module_base/matrix.h" -#include "module_base/timer.h" +#include "source_base/complexmatrix.h" +#include "source_base/intarray.h" +#include "source_base/matrix.h" +#include "source_base/timer.h" #include "module_basis/module_ao/parallel_orbitals.h" #include "module_basis/module_nao/two_center_integrator.h" #include "module_cell/module_neighbor/sltk_grid_driver.h" diff --git a/source/module_hamilt_lcao/module_deepks/deepks_vdelta.cpp b/source/module_hamilt_lcao/module_deepks/deepks_vdelta.cpp index bdfb1454f8..4a2f156eda 100644 --- a/source/module_hamilt_lcao/module_deepks/deepks_vdelta.cpp +++ b/source/module_hamilt_lcao/module_deepks/deepks_vdelta.cpp @@ -11,10 +11,10 @@ #ifdef __MLALGO #include "deepks_vdelta.h" -#include "module_base/global_function.h" -#include "module_base/parallel_reduce.h" -#include "module_base/timer.h" -#include "module_base/tool_title.h" +#include "source_base/global_function.h" +#include "source_base/parallel_reduce.h" +#include "source_base/timer.h" +#include "source_base/tool_title.h" #include "module_hamilt_lcao/hamilt_lcaodft/hamilt_lcao.h" // calculating sum of correction band energies diff --git a/source/module_hamilt_lcao/module_deepks/deepks_vdelta.h b/source/module_hamilt_lcao/module_deepks/deepks_vdelta.h index 8cfd71f444..a21d697df3 100644 --- a/source/module_hamilt_lcao/module_deepks/deepks_vdelta.h +++ b/source/module_hamilt_lcao/module_deepks/deepks_vdelta.h @@ -2,8 +2,8 @@ #define DEEPKS_VDELTA_H #ifdef __MLALGO -#include "module_base/complexmatrix.h" -#include "module_base/matrix.h" +#include "source_base/complexmatrix.h" +#include "source_base/matrix.h" #include "module_basis/module_ao/parallel_orbitals.h" // break the circular dependency of HamiltLCAO diff --git a/source/module_hamilt_lcao/module_deepks/deepks_vdpre.cpp b/source/module_hamilt_lcao/module_deepks/deepks_vdpre.cpp index a5942885ac..bb355837b8 100644 --- a/source/module_hamilt_lcao/module_deepks/deepks_vdpre.cpp +++ b/source/module_hamilt_lcao/module_deepks/deepks_vdpre.cpp @@ -10,10 +10,10 @@ #include "LCAO_deepks_io.h" // mohan add 2024-07-22 #include "deepks_iterate.h" -#include "module_base/blas_connector.h" -#include "module_base/constants.h" -#include "module_base/libm/libm.h" -#include "module_base/parallel_reduce.h" +#include "source_base/blas_connector.h" +#include "source_base/constants.h" +#include "source_base/libm/libm.h" +#include "source_base/parallel_reduce.h" #include "module_hamilt_lcao/module_hcontainer/atom_pair.h" #include "module_parameter/parameter.h" diff --git a/source/module_hamilt_lcao/module_deepks/deepks_vdpre.h b/source/module_hamilt_lcao/module_deepks/deepks_vdpre.h index d9800c4eec..6d1e741803 100644 --- a/source/module_hamilt_lcao/module_deepks/deepks_vdpre.h +++ b/source/module_hamilt_lcao/module_deepks/deepks_vdpre.h @@ -3,10 +3,10 @@ #ifdef __MLALGO -#include "module_base/complexmatrix.h" -#include "module_base/intarray.h" -#include "module_base/matrix.h" -#include "module_base/timer.h" +#include "source_base/complexmatrix.h" +#include "source_base/intarray.h" +#include "source_base/matrix.h" +#include "source_base/timer.h" #include "module_basis/module_ao/parallel_orbitals.h" #include "module_basis/module_nao/two_center_integrator.h" #include "module_cell/module_neighbor/sltk_grid_driver.h" diff --git a/source/module_hamilt_lcao/module_deepks/deepks_vdrpre.cpp b/source/module_hamilt_lcao/module_deepks/deepks_vdrpre.cpp index 3dc97b72c2..5e3b7e881a 100644 --- a/source/module_hamilt_lcao/module_deepks/deepks_vdrpre.cpp +++ b/source/module_hamilt_lcao/module_deepks/deepks_vdrpre.cpp @@ -6,10 +6,10 @@ #include "LCAO_deepks_io.h" // mohan add 2024-07-22 #include "deepks_iterate.h" -#include "module_base/blas_connector.h" -#include "module_base/constants.h" -#include "module_base/libm/libm.h" -#include "module_base/parallel_reduce.h" +#include "source_base/blas_connector.h" +#include "source_base/constants.h" +#include "source_base/libm/libm.h" +#include "source_base/parallel_reduce.h" #include "module_hamilt_lcao/module_hcontainer/atom_pair.h" #include "module_parameter/parameter.h" diff --git a/source/module_hamilt_lcao/module_deepks/deepks_vdrpre.h b/source/module_hamilt_lcao/module_deepks/deepks_vdrpre.h index 11a5daaf7a..01cb02c4d4 100644 --- a/source/module_hamilt_lcao/module_deepks/deepks_vdrpre.h +++ b/source/module_hamilt_lcao/module_deepks/deepks_vdrpre.h @@ -3,10 +3,10 @@ #ifdef __MLALGO -#include "module_base/complexmatrix.h" -#include "module_base/intarray.h" -#include "module_base/matrix.h" -#include "module_base/timer.h" +#include "source_base/complexmatrix.h" +#include "source_base/intarray.h" +#include "source_base/matrix.h" +#include "source_base/timer.h" #include "module_basis/module_ao/parallel_orbitals.h" #include "module_basis/module_nao/two_center_integrator.h" #include "module_cell/module_neighbor/sltk_grid_driver.h" diff --git a/source/module_hamilt_lcao/module_deepks/test/LCAO_deepks_test.h b/source/module_hamilt_lcao/module_deepks/test/LCAO_deepks_test.h index f1d99a0b09..27f98785a0 100644 --- a/source/module_hamilt_lcao/module_deepks/test/LCAO_deepks_test.h +++ b/source/module_hamilt_lcao/module_deepks/test/LCAO_deepks_test.h @@ -1,6 +1,6 @@ #include "klist.h" -#include "module_base/global_function.h" -#include "module_base/global_variable.h" +#include "source_base/global_function.h" +#include "source_base/global_variable.h" #include "module_basis/module_ao/ORB_read.h" #include "module_cell/module_neighbor/sltk_atom_arrange.h" #include "module_cell/module_neighbor/sltk_grid_driver.h" diff --git a/source/module_hamilt_lcao/module_deepks/test/LCAO_deepks_test_prep.cpp b/source/module_hamilt_lcao/module_deepks/test/LCAO_deepks_test_prep.cpp index d4924ece85..076544100c 100644 --- a/source/module_hamilt_lcao/module_deepks/test/LCAO_deepks_test_prep.cpp +++ b/source/module_hamilt_lcao/module_deepks/test/LCAO_deepks_test_prep.cpp @@ -1,5 +1,5 @@ #include "LCAO_deepks_test.h" -#include "module_base/global_variable.h" +#include "source_base/global_variable.h" #define private public #include "module_parameter/parameter.h" #undef private diff --git a/source/module_hamilt_lcao/module_deepks/test/Makefile b/source/module_hamilt_lcao/module_deepks/test/Makefile index 34553c1c72..099b23fda2 100644 --- a/source/module_hamilt_lcao/module_deepks/test/Makefile +++ b/source/module_hamilt_lcao/module_deepks/test/Makefile @@ -46,7 +46,7 @@ OPTS = ${INCLUDES} -Ofast -std=c++14 -march=native -xHost -m64 -qopenmp -Werror include Makefile.Objects VPATH=../../../source_main\ -:../../module_base\ +:../../source_base\ :../../module_io\ :../../module_hamilt_pw/hamilt_pwdft\ :../../module_basis/module_ao\ diff --git a/source/module_hamilt_lcao/module_deepks/test/klist.h b/source/module_hamilt_lcao/module_deepks/test/klist.h index e4fa22b0d7..3f63ed54a9 100644 --- a/source/module_hamilt_lcao/module_deepks/test/klist.h +++ b/source/module_hamilt_lcao/module_deepks/test/klist.h @@ -1,10 +1,10 @@ ///klist : adapted from klist from module_hamilt_pw/hamilt_pwdft ///deals with k point sampling -#include "module_base/vector3.h" -#include "module_base/matrix3.h" -#include "module_base/memory.h" -#include "module_base/global_function.h" +#include "source_base/vector3.h" +#include "source_base/matrix3.h" +#include "source_base/memory.h" +#include "source_base/global_function.h" #include #include diff --git a/source/module_hamilt_lcao/module_deepks/test/parallel_orbitals.h b/source/module_hamilt_lcao/module_deepks/test/parallel_orbitals.h index b3a9148e06..d301ca3183 100644 --- a/source/module_hamilt_lcao/module_deepks/test/parallel_orbitals.h +++ b/source/module_hamilt_lcao/module_deepks/test/parallel_orbitals.h @@ -1,9 +1,9 @@ ///adapted from parallel_orbitals from module_basis/module_ao ///deals with the parallelization of atomic basis -#include "module_base/global_function.h" -#include "module_base/global_variable.h" -#include "module_base/memory.h" +#include "source_base/global_function.h" +#include "source_base/global_variable.h" +#include "source_base/memory.h" namespace Test_Deepks { diff --git a/source/module_hamilt_lcao/module_deltaspin/basic_funcs.cpp b/source/module_hamilt_lcao/module_deltaspin/basic_funcs.cpp index 0e47397e9d..343b2b37a7 100644 --- a/source/module_hamilt_lcao/module_deltaspin/basic_funcs.cpp +++ b/source/module_hamilt_lcao/module_deltaspin/basic_funcs.cpp @@ -1,8 +1,8 @@ #include "basic_funcs.h" #include -#include "module_base/formatter.h" -#include "module_base/constants.h" +#include "source_base/formatter.h" +#include "source_base/constants.h" double maxval_abs_2d(const std::vector>& array) { diff --git a/source/module_hamilt_lcao/module_deltaspin/basic_funcs.h b/source/module_hamilt_lcao/module_deltaspin/basic_funcs.h index eb81a782cb..b1de060c4b 100644 --- a/source/module_hamilt_lcao/module_deltaspin/basic_funcs.h +++ b/source/module_hamilt_lcao/module_deltaspin/basic_funcs.h @@ -5,7 +5,7 @@ #include #include -#include "module_base/vector3.h" +#include "source_base/vector3.h" /** * @brief Find the maximum absolute value in a 2D array. diff --git a/source/module_hamilt_lcao/module_deltaspin/cal_mw.cpp b/source/module_hamilt_lcao/module_deltaspin/cal_mw.cpp index 25b2e4e879..97097bfd3c 100644 --- a/source/module_hamilt_lcao/module_deltaspin/cal_mw.cpp +++ b/source/module_hamilt_lcao/module_deltaspin/cal_mw.cpp @@ -1,10 +1,10 @@ #include -#include "module_base/matrix.h" -#include "module_base/name_angular.h" -#include "module_base/scalapack_connector.h" -#include "module_base/tool_title.h" -#include "module_base/timer.h" +#include "source_base/matrix.h" +#include "source_base/name_angular.h" +#include "source_base/scalapack_connector.h" +#include "source_base/tool_title.h" +#include "source_base/timer.h" #include "module_hamilt_pw/hamilt_pwdft/onsite_projector.h" #include "spin_constrain.h" #include "module_parameter/parameter.h" diff --git a/source/module_hamilt_lcao/module_deltaspin/cal_mw_from_lambda.cpp b/source/module_hamilt_lcao/module_deltaspin/cal_mw_from_lambda.cpp index 2721c30965..33e6abf42c 100644 --- a/source/module_hamilt_lcao/module_deltaspin/cal_mw_from_lambda.cpp +++ b/source/module_hamilt_lcao/module_deltaspin/cal_mw_from_lambda.cpp @@ -1,11 +1,11 @@ -#include "module_base/timer.h" -#include "module_base/tool_title.h" +#include "source_base/timer.h" +#include "source_base/tool_title.h" #include "source_hsolver/diago_iter_assist.h" #include "module_parameter/parameter.h" #include "spin_constrain.h" #include "module_hamilt_pw/hamilt_pwdft/onsite_projector.h" -#include "module_base/parallel_reduce.h" -#include "module_base/kernels/math_kernel_op.h" +#include "source_base/parallel_reduce.h" +#include "source_base/kernels/math_kernel_op.h" #include "source_hsolver/hsolver_lcao.h" #include "source_hsolver/hsolver_pw.h" #include "module_elecstate/elecstate_pw.h" diff --git a/source/module_hamilt_lcao/module_deltaspin/spin_constrain.cpp b/source/module_hamilt_lcao/module_deltaspin/spin_constrain.cpp index 30500ccca9..fb21e1ab7c 100644 --- a/source/module_hamilt_lcao/module_deltaspin/spin_constrain.cpp +++ b/source/module_hamilt_lcao/module_deltaspin/spin_constrain.cpp @@ -1,6 +1,6 @@ #include "spin_constrain.h" -#include "module_base/formatter.h" +#include "source_base/formatter.h" #include "module_hamilt_lcao/hamilt_lcaodft/operator_lcao/dspin_lcao.h" #include diff --git a/source/module_hamilt_lcao/module_deltaspin/spin_constrain.h b/source/module_hamilt_lcao/module_deltaspin/spin_constrain.h index 2e7cf6c8db..3877be8507 100644 --- a/source/module_hamilt_lcao/module_deltaspin/spin_constrain.h +++ b/source/module_hamilt_lcao/module_deltaspin/spin_constrain.h @@ -4,10 +4,10 @@ #include #include -#include "module_base/constants.h" -#include "module_base/tool_quit.h" -#include "module_base/tool_title.h" -#include "module_base/vector3.h" +#include "source_base/constants.h" +#include "source_base/tool_quit.h" +#include "source_base/tool_title.h" +#include "source_base/vector3.h" #include "module_basis/module_ao/parallel_orbitals.h" #include "module_cell/klist.h" #include "module_cell/unitcell.h" diff --git a/source/module_hamilt_lcao/module_deltaspin/test/prepare_unitcell.h b/source/module_hamilt_lcao/module_deltaspin/test/prepare_unitcell.h index 9f94cbfd86..0b280cd2ac 100644 --- a/source/module_hamilt_lcao/module_deltaspin/test/prepare_unitcell.h +++ b/source/module_hamilt_lcao/module_deltaspin/test/prepare_unitcell.h @@ -2,7 +2,7 @@ #define PREPARE_UNITCELL_H #include #include -#include "module_base/mathzone.h" +#include "source_base/mathzone.h" class UcellTestPrepare { diff --git a/source/module_hamilt_lcao/module_dftu/dftu.cpp b/source/module_hamilt_lcao/module_dftu/dftu.cpp index 751a9f05fd..50e2fb9a3a 100644 --- a/source/module_hamilt_lcao/module_dftu/dftu.cpp +++ b/source/module_hamilt_lcao/module_dftu/dftu.cpp @@ -1,12 +1,12 @@ #include "dftu.h" #include "module_parameter/parameter.h" -#include "module_base/constants.h" -#include "module_base/global_function.h" -#include "module_base/inverse_matrix.h" -#include "module_base/memory.h" -#include "module_base/scalapack_connector.h" -#include "module_base/timer.h" +#include "source_base/constants.h" +#include "source_base/global_function.h" +#include "source_base/inverse_matrix.h" +#include "source_base/memory.h" +#include "source_base/scalapack_connector.h" +#include "source_base/timer.h" #include "module_elecstate/magnetism.h" #include "module_elecstate/module_charge/charge.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" diff --git a/source/module_hamilt_lcao/module_dftu/dftu_folding.cpp b/source/module_hamilt_lcao/module_dftu/dftu_folding.cpp index ee3b641384..a5902a7078 100644 --- a/source/module_hamilt_lcao/module_dftu/dftu_folding.cpp +++ b/source/module_hamilt_lcao/module_dftu/dftu_folding.cpp @@ -1,6 +1,6 @@ #ifdef __LCAO #include "dftu.h" -#include "module_base/timer.h" +#include "source_base/timer.h" #include "module_parameter/parameter.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" #include "module_cell/module_neighbor/sltk_grid_driver.h" diff --git a/source/module_hamilt_lcao/module_dftu/dftu_force.cpp b/source/module_hamilt_lcao/module_dftu/dftu_force.cpp index f4423f623d..1b130294fd 100644 --- a/source/module_hamilt_lcao/module_dftu/dftu_force.cpp +++ b/source/module_hamilt_lcao/module_dftu/dftu_force.cpp @@ -5,11 +5,11 @@ //========================================================== #ifdef __LCAO #include "dftu.h" -#include "module_base/constants.h" -#include "module_base/global_function.h" -#include "module_base/inverse_matrix.h" -#include "module_base/parallel_reduce.h" -#include "module_base/timer.h" +#include "source_base/constants.h" +#include "source_base/global_function.h" +#include "source_base/inverse_matrix.h" +#include "source_base/parallel_reduce.h" +#include "source_base/timer.h" #include "module_elecstate/elecstate_lcao.h" #include "module_elecstate/magnetism.h" #include "module_elecstate/module_charge/charge.h" diff --git a/source/module_hamilt_lcao/module_dftu/dftu_hamilt.cpp b/source/module_hamilt_lcao/module_dftu/dftu_hamilt.cpp index 90d781ae9c..b29ea4fa3b 100644 --- a/source/module_hamilt_lcao/module_dftu/dftu_hamilt.cpp +++ b/source/module_hamilt_lcao/module_dftu/dftu_hamilt.cpp @@ -1,7 +1,7 @@ #include "dftu.h" -#include "module_base/scalapack_connector.h" +#include "source_base/scalapack_connector.h" #include "module_parameter/parameter.h" -#include "module_base/timer.h" +#include "source_base/timer.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" namespace ModuleDFTU diff --git a/source/module_hamilt_lcao/module_dftu/dftu_io.cpp b/source/module_hamilt_lcao/module_dftu/dftu_io.cpp index 0a1c79b247..78b96946a7 100644 --- a/source/module_hamilt_lcao/module_dftu/dftu_io.cpp +++ b/source/module_hamilt_lcao/module_dftu/dftu_io.cpp @@ -1,5 +1,5 @@ #include "dftu.h" -#include "module_base/timer.h" +#include "source_base/timer.h" #include "module_parameter/parameter.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" diff --git a/source/module_hamilt_lcao/module_dftu/dftu_occup.cpp b/source/module_hamilt_lcao/module_dftu/dftu_occup.cpp index 0a2c80ddf4..78916a951c 100644 --- a/source/module_hamilt_lcao/module_dftu/dftu_occup.cpp +++ b/source/module_hamilt_lcao/module_dftu/dftu_occup.cpp @@ -1,11 +1,11 @@ #include "dftu.h" -#include "module_base/timer.h" +#include "source_base/timer.h" #include "module_parameter/parameter.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" #ifdef __LCAO #include "module_hamilt_lcao/hamilt_lcaodft/hamilt_lcao.h" #endif -#include "module_base/scalapack_connector.h" +#include "source_base/scalapack_connector.h" namespace ModuleDFTU { diff --git a/source/module_hamilt_lcao/module_dftu/dftu_pw.cpp b/source/module_hamilt_lcao/module_dftu/dftu_pw.cpp index 0ae2588625..817bd61e87 100644 --- a/source/module_hamilt_lcao/module_dftu/dftu_pw.cpp +++ b/source/module_hamilt_lcao/module_dftu/dftu_pw.cpp @@ -1,8 +1,8 @@ #include "dftu.h" #include "module_hamilt_pw/hamilt_pwdft/onsite_projector.h" -#include "module_base/parallel_reduce.h" +#include "source_base/parallel_reduce.h" #include "module_parameter/parameter.h" -#include "module_base/timer.h" +#include "source_base/timer.h" namespace ModuleDFTU diff --git a/source/module_hamilt_lcao/module_dftu/dftu_tools.cpp b/source/module_hamilt_lcao/module_dftu/dftu_tools.cpp index e7d78704d7..40a7e8365b 100644 --- a/source/module_hamilt_lcao/module_dftu/dftu_tools.cpp +++ b/source/module_hamilt_lcao/module_dftu/dftu_tools.cpp @@ -1,5 +1,5 @@ #include "dftu.h" -#include "module_base/timer.h" +#include "source_base/timer.h" #include "module_parameter/parameter.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" diff --git a/source/module_hamilt_lcao/module_dftu/dftu_yukawa.cpp b/source/module_hamilt_lcao/module_dftu/dftu_yukawa.cpp index 7845fe9963..d066728aab 100644 --- a/source/module_hamilt_lcao/module_dftu/dftu_yukawa.cpp +++ b/source/module_hamilt_lcao/module_dftu/dftu_yukawa.cpp @@ -4,8 +4,8 @@ #include "module_parameter/parameter.h" // DATE : 2019-12-10 //========================================================== -#include "module_base/constants.h" -#include "module_base/global_function.h" +#include "source_base/constants.h" +#include "source_base/global_function.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" #include "dftu.h" diff --git a/source/module_hamilt_lcao/module_gint/cal_ddpsir_ylm.cpp b/source/module_hamilt_lcao/module_gint/cal_ddpsir_ylm.cpp index ea785361f1..206c6f95e8 100644 --- a/source/module_hamilt_lcao/module_gint/cal_ddpsir_ylm.cpp +++ b/source/module_hamilt_lcao/module_gint/cal_ddpsir_ylm.cpp @@ -1,6 +1,6 @@ #include "gint_tools.h" -#include "module_base/timer.h" -#include "module_base/ylm.h" +#include "source_base/timer.h" +#include "source_base/ylm.h" namespace Gint_Tools{ void cal_ddpsir_ylm( const Grid_Technique& gt, const int bxyz, diff --git a/source/module_hamilt_lcao/module_gint/cal_dpsir_ylm.cpp b/source/module_hamilt_lcao/module_gint/cal_dpsir_ylm.cpp index 494ffb85f5..8b32b2fc05 100644 --- a/source/module_hamilt_lcao/module_gint/cal_dpsir_ylm.cpp +++ b/source/module_hamilt_lcao/module_gint/cal_dpsir_ylm.cpp @@ -1,7 +1,7 @@ #include "gint_tools.h" -#include "module_base/timer.h" -#include "module_base/ylm.h" -#include "module_base/array_pool.h" +#include "source_base/timer.h" +#include "source_base/ylm.h" +#include "source_base/array_pool.h" namespace Gint_Tools{ void cal_dpsir_ylm( const Grid_Technique& gt, const int bxyz, diff --git a/source/module_hamilt_lcao/module_gint/cal_psir_ylm.cpp b/source/module_hamilt_lcao/module_gint/cal_psir_ylm.cpp index 0eb9b16e6b..4eeedd19a5 100644 --- a/source/module_hamilt_lcao/module_gint/cal_psir_ylm.cpp +++ b/source/module_hamilt_lcao/module_gint/cal_psir_ylm.cpp @@ -1,6 +1,6 @@ #include "gint_tools.h" -#include "module_base/timer.h" -#include "module_base/ylm.h" +#include "source_base/timer.h" +#include "source_base/ylm.h" namespace Gint_Tools{ void cal_psir_ylm( const Grid_Technique& gt, diff --git a/source/module_hamilt_lcao/module_gint/gint.cpp b/source/module_hamilt_lcao/module_gint/gint.cpp index 6ee4c238d1..e764eaf8a8 100644 --- a/source/module_hamilt_lcao/module_gint/gint.cpp +++ b/source/module_hamilt_lcao/module_gint/gint.cpp @@ -7,8 +7,8 @@ #include "gint_vl_gpu.h" #endif -#include "module_base/memory.h" -#include "module_base/timer.h" +#include "source_base/memory.h" +#include "source_base/timer.h" #include "module_basis/module_ao/ORB_read.h" #include "module_hamilt_lcao/module_hcontainer/hcontainer_funcs.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" diff --git a/source/module_hamilt_lcao/module_gint/gint_force_cpu_interface.cpp b/source/module_hamilt_lcao/module_gint/gint_force_cpu_interface.cpp index b024bca4d8..e3b6a30077 100644 --- a/source/module_hamilt_lcao/module_gint/gint_force_cpu_interface.cpp +++ b/source/module_hamilt_lcao/module_gint/gint_force_cpu_interface.cpp @@ -1,6 +1,6 @@ #include "gint.h" -#include "module_base/memory.h" -#include "module_base/timer.h" +#include "source_base/memory.h" +#include "source_base/timer.h" void Gint::gint_kernel_force(Gint_inout* inout) { ModuleBase::TITLE("Gint_interface", "cal_gint_force"); diff --git a/source/module_hamilt_lcao/module_gint/gint_force_gpu.cu b/source/module_hamilt_lcao/module_gint/gint_force_gpu.cu index 9cb3e785c4..cb3390aacc 100644 --- a/source/module_hamilt_lcao/module_gint/gint_force_gpu.cu +++ b/source/module_hamilt_lcao/module_gint/gint_force_gpu.cu @@ -5,7 +5,7 @@ #include "gint_force_gpu.h" #include "kernels/cuda/cuda_tools.cuh" #include "kernels/cuda/gint_force.cuh" -#include "module_base/ylm.h" +#include "source_base/ylm.h" #include "gint_tools.h" namespace GintKernel diff --git a/source/module_hamilt_lcao/module_gint/gint_fvl.cpp b/source/module_hamilt_lcao/module_gint/gint_fvl.cpp index 379b4eb26c..530ae01d5d 100644 --- a/source/module_hamilt_lcao/module_gint/gint_fvl.cpp +++ b/source/module_hamilt_lcao/module_gint/gint_fvl.cpp @@ -1,8 +1,8 @@ #include "gint_k.h" -#include "module_base/timer.h" -#include "module_base/ylm.h" +#include "source_base/timer.h" +#include "source_base/ylm.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" -#include "module_base/array_pool.h" +#include "source_base/array_pool.h" // This function utilizes the cache more effectively than calling the ddot function, thus performing faster. void Gint::cal_meshball_force( diff --git a/source/module_hamilt_lcao/module_gint/gint_gamma.h b/source/module_hamilt_lcao/module_gint/gint_gamma.h index 323893cbdf..7ed6e2c9b9 100644 --- a/source/module_hamilt_lcao/module_gint/gint_gamma.h +++ b/source/module_hamilt_lcao/module_gint/gint_gamma.h @@ -6,8 +6,8 @@ #ifndef GINT_GAMMA_H #define GINT_GAMMA_H #include "gint.h" -#include "module_base/global_function.h" -#include "module_base/global_variable.h" +#include "source_base/global_function.h" +#include "source_base/global_variable.h" #include "grid_technique.h" #ifdef _OPENMP #include diff --git a/source/module_hamilt_lcao/module_gint/gint_gamma_env.cpp b/source/module_hamilt_lcao/module_gint/gint_gamma_env.cpp index 222c604c73..96d1ccce65 100644 --- a/source/module_hamilt_lcao/module_gint/gint_gamma_env.cpp +++ b/source/module_hamilt_lcao/module_gint/gint_gamma_env.cpp @@ -1,8 +1,8 @@ #include "gint_gamma.h" #include "grid_technique.h" -#include "module_base/timer.h" -#include "module_base/ylm.h" -#include "module_base/array_pool.h" +#include "source_base/timer.h" +#include "source_base/ylm.h" +#include "source_base/array_pool.h" #include "module_basis/module_ao/ORB_read.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" diff --git a/source/module_hamilt_lcao/module_gint/gint_gamma_vl.cpp b/source/module_hamilt_lcao/module_gint/gint_gamma_vl.cpp index 5e92930e34..dcbf5e30d8 100644 --- a/source/module_hamilt_lcao/module_gint/gint_gamma_vl.cpp +++ b/source/module_hamilt_lcao/module_gint/gint_gamma_vl.cpp @@ -4,9 +4,9 @@ #include "gint_gamma.h" #include "gint_tools.h" #include "grid_technique.h" -#include "module_base/blas_connector.h" -#include "module_base/memory.h" -#include "module_base/timer.h" +#include "source_base/blas_connector.h" +#include "source_base/memory.h" +#include "source_base/timer.h" #include "module_basis/module_ao/ORB_read.h" #include "module_hamilt_lcao/module_hcontainer/hcontainer_funcs.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" diff --git a/source/module_hamilt_lcao/module_gint/gint_gpu_interface.cpp b/source/module_hamilt_lcao/module_gint/gint_gpu_interface.cpp index 9d6e6e0894..683f003f4d 100644 --- a/source/module_hamilt_lcao/module_gint/gint_gpu_interface.cpp +++ b/source/module_hamilt_lcao/module_gint/gint_gpu_interface.cpp @@ -3,8 +3,8 @@ #include "module_parameter/parameter.h" #include "gint_rho_gpu.h" #include "gint_vl_gpu.h" -#include "module_base/memory.h" -#include "module_base/timer.h" +#include "source_base/memory.h" +#include "source_base/timer.h" void Gint::gpu_vlocal_interface(Gint_inout* inout) { ModuleBase::TITLE("Gint_interface", "cal_gint_vlocal"); diff --git a/source/module_hamilt_lcao/module_gint/gint_k.h b/source/module_hamilt_lcao/module_gint/gint_k.h index 74ac0a744d..bac8869bd9 100644 --- a/source/module_hamilt_lcao/module_gint/gint_k.h +++ b/source/module_hamilt_lcao/module_gint/gint_k.h @@ -8,7 +8,7 @@ #include "module_hamilt_lcao/hamilt_lcaodft/LCAO_HS_arrays.hpp" // add by jingan for map<> in 2021-12-2, will be deleted in the future -#include "module_base/abfs-vector3_order.h" +#include "source_base/abfs-vector3_order.h" class Gint_k : public Gint { public: diff --git a/source/module_hamilt_lcao/module_gint/gint_k_env.cpp b/source/module_hamilt_lcao/module_gint/gint_k_env.cpp index da212ce4f0..b884a155eb 100644 --- a/source/module_hamilt_lcao/module_gint/gint_k_env.cpp +++ b/source/module_hamilt_lcao/module_gint/gint_k_env.cpp @@ -1,12 +1,12 @@ #include "gint_k.h" #include "grid_technique.h" #include "module_parameter/parameter.h" -#include "module_base/timer.h" -#include "module_base/ylm.h" +#include "source_base/timer.h" +#include "source_base/ylm.h" #include "module_basis/module_ao/ORB_read.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" -#include "module_base/array_pool.h" -#include "module_base/vector3.h" +#include "source_base/array_pool.h" +#include "source_base/vector3.h" void Gint_k::cal_env_k(int ik, const std::complex* psi_k, diff --git a/source/module_hamilt_lcao/module_gint/gint_k_pvdpr.cpp b/source/module_hamilt_lcao/module_gint/gint_k_pvdpr.cpp index 6562c760a3..2eb66202f8 100644 --- a/source/module_hamilt_lcao/module_gint/gint_k_pvdpr.cpp +++ b/source/module_hamilt_lcao/module_gint/gint_k_pvdpr.cpp @@ -1,13 +1,13 @@ #include "gint_k.h" #include "grid_technique.h" #include "module_parameter/parameter.h" -#include "module_base/global_function.h" -#include "module_base/global_variable.h" -#include "module_base/memory.h" -#include "module_base/parallel_reduce.h" -#include "module_base/timer.h" -#include "module_base/tool_threading.h" -#include "module_base/ylm.h" +#include "source_base/global_function.h" +#include "source_base/global_variable.h" +#include "source_base/memory.h" +#include "source_base/parallel_reduce.h" +#include "source_base/timer.h" +#include "source_base/tool_threading.h" +#include "source_base/ylm.h" #include "module_basis/module_ao/ORB_read.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" diff --git a/source/module_hamilt_lcao/module_gint/gint_k_pvpr.cpp b/source/module_hamilt_lcao/module_gint/gint_k_pvpr.cpp index 9a6cca47f7..c3f0d80b23 100644 --- a/source/module_hamilt_lcao/module_gint/gint_k_pvpr.cpp +++ b/source/module_hamilt_lcao/module_gint/gint_k_pvpr.cpp @@ -1,14 +1,14 @@ #include "gint_k.h" #include "grid_technique.h" #include "module_parameter/parameter.h" -#include "module_base/global_function.h" -#include "module_base/global_variable.h" -#include "module_base/libm/libm.h" -#include "module_base/memory.h" -#include "module_base/parallel_reduce.h" -#include "module_base/timer.h" -#include "module_base/tool_threading.h" -#include "module_base/ylm.h" +#include "source_base/global_function.h" +#include "source_base/global_variable.h" +#include "source_base/libm/libm.h" +#include "source_base/memory.h" +#include "source_base/parallel_reduce.h" +#include "source_base/timer.h" +#include "source_base/tool_threading.h" +#include "source_base/ylm.h" #include "module_basis/module_ao/ORB_read.h" #include "module_cell/module_neighbor/sltk_grid_driver.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" diff --git a/source/module_hamilt_lcao/module_gint/gint_k_sparse1.cpp b/source/module_hamilt_lcao/module_gint/gint_k_sparse1.cpp index cb1c02f5cd..0407169066 100644 --- a/source/module_hamilt_lcao/module_gint/gint_k_sparse1.cpp +++ b/source/module_hamilt_lcao/module_gint/gint_k_sparse1.cpp @@ -1,12 +1,12 @@ #include "gint_k.h" #include "grid_technique.h" #include "module_parameter/parameter.h" -#include "module_base/global_function.h" -#include "module_base/global_variable.h" -#include "module_base/memory.h" -#include "module_base/parallel_reduce.h" -#include "module_base/timer.h" -#include "module_base/ylm.h" +#include "source_base/global_function.h" +#include "source_base/global_variable.h" +#include "source_base/memory.h" +#include "source_base/parallel_reduce.h" +#include "source_base/timer.h" +#include "source_base/ylm.h" #include "module_basis/module_ao/ORB_read.h" #include "module_cell/module_neighbor/sltk_grid_driver.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" diff --git a/source/module_hamilt_lcao/module_gint/gint_rho.cpp b/source/module_hamilt_lcao/module_gint/gint_rho.cpp index 17ca9d78c1..e243415049 100644 --- a/source/module_hamilt_lcao/module_gint/gint_rho.cpp +++ b/source/module_hamilt_lcao/module_gint/gint_rho.cpp @@ -1,12 +1,12 @@ #include "gint_k.h" #include "gint_tools.h" #include "grid_technique.h" -#include "module_base/blas_connector.h" -#include "module_base/global_function.h" -#include "module_base/global_variable.h" -#include "module_base/timer.h" -#include "module_base/array_pool.h" -#include "module_base/ylm.h" +#include "source_base/blas_connector.h" +#include "source_base/global_function.h" +#include "source_base/global_variable.h" +#include "source_base/timer.h" +#include "source_base/array_pool.h" +#include "source_base/ylm.h" #include "module_basis/module_ao/ORB_read.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" diff --git a/source/module_hamilt_lcao/module_gint/gint_rho_cpu_interface.cpp b/source/module_hamilt_lcao/module_gint/gint_rho_cpu_interface.cpp index e3663145cc..9454a79edc 100644 --- a/source/module_hamilt_lcao/module_gint/gint_rho_cpu_interface.cpp +++ b/source/module_hamilt_lcao/module_gint/gint_rho_cpu_interface.cpp @@ -1,7 +1,7 @@ #include "gint.h" -#include "module_base/memory.h" +#include "source_base/memory.h" #include "module_parameter/parameter.h" -#include "module_base/timer.h" +#include "source_base/timer.h" void Gint::gint_kernel_rho(Gint_inout* inout) { ModuleBase::TITLE("Gint_interface", "cal_gint_rho"); diff --git a/source/module_hamilt_lcao/module_gint/gint_rho_gpu.cu b/source/module_hamilt_lcao/module_gint/gint_rho_gpu.cu index fc5fba03c2..c5591e662e 100644 --- a/source/module_hamilt_lcao/module_gint/gint_rho_gpu.cu +++ b/source/module_hamilt_lcao/module_gint/gint_rho_gpu.cu @@ -1,5 +1,5 @@ #include "kernels/cuda/cuda_tools.cuh" -#include "module_base/ylm.h" +#include "source_base/ylm.h" #include "gint_rho_gpu.h" #include "gint_tools.h" #include "kernels/cuda/gint_rho.cuh" diff --git a/source/module_hamilt_lcao/module_gint/gint_tau.cpp b/source/module_hamilt_lcao/module_gint/gint_tau.cpp index 09308c6f93..77fd0cbd2a 100644 --- a/source/module_hamilt_lcao/module_gint/gint_tau.cpp +++ b/source/module_hamilt_lcao/module_gint/gint_tau.cpp @@ -1,15 +1,15 @@ -#include "module_base/global_function.h" -#include "module_base/global_variable.h" +#include "source_base/global_function.h" +#include "source_base/global_variable.h" #include "gint_k.h" #include "module_basis/module_ao/ORB_read.h" #include "grid_technique.h" -#include "module_base/ylm.h" +#include "source_base/ylm.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" -#include "module_base/blas_connector.h" -#include "module_base/timer.h" -#include "module_base/array_pool.h" +#include "source_base/blas_connector.h" +#include "source_base/timer.h" +#include "source_base/array_pool.h" #include "gint_tools.h" -#include "module_base/memory.h" +#include "source_base/memory.h" #include "module_hamilt_lcao/module_gint/grid_technique.h" diff --git a/source/module_hamilt_lcao/module_gint/gint_tools.cpp b/source/module_hamilt_lcao/module_gint/gint_tools.cpp index 4979947505..da96e013d6 100644 --- a/source/module_hamilt_lcao/module_gint/gint_tools.cpp +++ b/source/module_hamilt_lcao/module_gint/gint_tools.cpp @@ -6,9 +6,9 @@ #include #include // for std::pair -#include "module_base/timer.h" -#include "module_base/ylm.h" -#include "module_base/array_pool.h" +#include "source_base/timer.h" +#include "source_base/ylm.h" +#include "source_base/array_pool.h" #include "module_basis/module_ao/ORB_read.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" diff --git a/source/module_hamilt_lcao/module_gint/gint_tools.h b/source/module_hamilt_lcao/module_gint/gint_tools.h index a2ea0a20c0..3a25daa291 100644 --- a/source/module_hamilt_lcao/module_gint/gint_tools.h +++ b/source/module_hamilt_lcao/module_gint/gint_tools.h @@ -6,7 +6,7 @@ #include "grid_technique.h" #include "module_elecstate/module_charge/charge.h" #include "module_hamilt_lcao/module_hcontainer/hcontainer.h" -#include "module_base/array_pool.h" +#include "source_base/array_pool.h" #include #include // for std::pair diff --git a/source/module_hamilt_lcao/module_gint/gint_vl.cpp b/source/module_hamilt_lcao/module_gint/gint_vl.cpp index 043f80225a..f5f73cda98 100644 --- a/source/module_hamilt_lcao/module_gint/gint_vl.cpp +++ b/source/module_hamilt_lcao/module_gint/gint_vl.cpp @@ -1,14 +1,14 @@ -#include "module_base/global_function.h" -#include "module_base/global_variable.h" +#include "source_base/global_function.h" +#include "source_base/global_variable.h" #include "gint_k.h" #include "module_basis/module_ao/ORB_read.h" #include "grid_technique.h" -#include "module_base/ylm.h" +#include "source_base/ylm.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" -#include "module_base/blas_connector.h" -#include "module_base/timer.h" -#include "module_base/array_pool.h" -#include "module_base/vector3.h" +#include "source_base/blas_connector.h" +#include "source_base/timer.h" +#include "source_base/array_pool.h" +#include "source_base/vector3.h" //#include #ifdef _OPENMP diff --git a/source/module_hamilt_lcao/module_gint/gint_vl_cpu_interface.cpp b/source/module_hamilt_lcao/module_gint/gint_vl_cpu_interface.cpp index 0eb684ad5f..3f6cf36767 100644 --- a/source/module_hamilt_lcao/module_gint/gint_vl_cpu_interface.cpp +++ b/source/module_hamilt_lcao/module_gint/gint_vl_cpu_interface.cpp @@ -1,7 +1,7 @@ #include "gint.h" -#include "module_base/memory.h" +#include "source_base/memory.h" #include "module_parameter/parameter.h" -#include "module_base/timer.h" +#include "source_base/timer.h" void Gint::gint_kernel_vlocal(Gint_inout* inout) { ModuleBase::TITLE("Gint_interface", "cal_gint_vlocal"); diff --git a/source/module_hamilt_lcao/module_gint/gint_vl_gpu.cu b/source/module_hamilt_lcao/module_gint/gint_vl_gpu.cu index c58896f34c..ddbca83a60 100644 --- a/source/module_hamilt_lcao/module_gint/gint_vl_gpu.cu +++ b/source/module_hamilt_lcao/module_gint/gint_vl_gpu.cu @@ -3,7 +3,7 @@ #endif #include "kernels/cuda/cuda_tools.cuh" -#include "module_base/ylm.h" +#include "source_base/ylm.h" #include "gint_vl_gpu.h" #include "kernels/cuda/gint_vl.cuh" diff --git a/source/module_hamilt_lcao/module_gint/grid_bigcell.cpp b/source/module_hamilt_lcao/module_gint/grid_bigcell.cpp index 7f47218096..fdec1f29b5 100644 --- a/source/module_hamilt_lcao/module_gint/grid_bigcell.cpp +++ b/source/module_hamilt_lcao/module_gint/grid_bigcell.cpp @@ -1,8 +1,8 @@ #include "grid_bigcell.h" #include "module_parameter/parameter.h" -#include "module_base/memory.h" -#include "module_base/timer.h" +#include "source_base/memory.h" +#include "source_base/timer.h" #include "module_basis/module_ao/ORB_read.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" #include "module_cell/unitcell.h" diff --git a/source/module_hamilt_lcao/module_gint/grid_bigcell.h b/source/module_hamilt_lcao/module_gint/grid_bigcell.h index 10f52a7419..7d380782dd 100644 --- a/source/module_hamilt_lcao/module_gint/grid_bigcell.h +++ b/source/module_hamilt_lcao/module_gint/grid_bigcell.h @@ -1,9 +1,9 @@ #ifndef GRID_BIGCELL_H #define GRID_BIGCELL_H -#include "module_base/global_function.h" -#include "module_base/global_variable.h" -#include "module_base/matrix3.h" +#include "source_base/global_function.h" +#include "source_base/global_variable.h" +#include "source_base/matrix3.h" #include "grid_meshcell.h" class Grid_BigCell: public Grid_MeshCell diff --git a/source/module_hamilt_lcao/module_gint/grid_meshball.cpp b/source/module_hamilt_lcao/module_gint/grid_meshball.cpp index 797581316d..5a1c395c9a 100644 --- a/source/module_hamilt_lcao/module_gint/grid_meshball.cpp +++ b/source/module_hamilt_lcao/module_gint/grid_meshball.cpp @@ -1,5 +1,5 @@ #include "grid_meshball.h" -#include "module_base/memory.h" +#include "source_base/memory.h" #include "module_parameter/parameter.h" Grid_MeshBall::Grid_MeshBall() diff --git a/source/module_hamilt_lcao/module_gint/grid_meshcell.cpp b/source/module_hamilt_lcao/module_gint/grid_meshcell.cpp index c064c97436..d0f724b4dd 100644 --- a/source/module_hamilt_lcao/module_gint/grid_meshcell.cpp +++ b/source/module_hamilt_lcao/module_gint/grid_meshcell.cpp @@ -1,7 +1,7 @@ #include "grid_meshcell.h" #include "module_parameter/parameter.h" -#include "module_base/memory.h" +#include "source_base/memory.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" Grid_MeshCell::Grid_MeshCell() diff --git a/source/module_hamilt_lcao/module_gint/grid_meshcell.h b/source/module_hamilt_lcao/module_gint/grid_meshcell.h index 67a1863ed0..4351981d23 100644 --- a/source/module_hamilt_lcao/module_gint/grid_meshcell.h +++ b/source/module_hamilt_lcao/module_gint/grid_meshcell.h @@ -1,8 +1,8 @@ #ifndef GRID_MESHCELL_H #define GRID_MESHCELL_H -#include "module_base/global_function.h" -#include "module_base/global_variable.h" -#include "module_base/matrix3.h" +#include "source_base/global_function.h" +#include "source_base/global_variable.h" +#include "source_base/matrix3.h" #include "grid_meshk.h" #include "module_cell/unitcell.h" class Grid_MeshCell: public Grid_MeshK diff --git a/source/module_hamilt_lcao/module_gint/grid_meshk.h b/source/module_hamilt_lcao/module_gint/grid_meshk.h index 22f27e1c78..fb8d458bb0 100644 --- a/source/module_hamilt_lcao/module_gint/grid_meshk.h +++ b/source/module_hamilt_lcao/module_gint/grid_meshk.h @@ -1,8 +1,8 @@ #ifndef GRID_MESHK_H #define GRID_MESHK_H -#include "module_base/global_function.h" -#include "module_base/global_variable.h" -#include "module_base/vector3.h" +#include "source_base/global_function.h" +#include "source_base/global_variable.h" +#include "source_base/vector3.h" class Grid_MeshK { diff --git a/source/module_hamilt_lcao/module_gint/grid_technique.cpp b/source/module_hamilt_lcao/module_gint/grid_technique.cpp index c61b7cc702..b343d5ea2c 100644 --- a/source/module_hamilt_lcao/module_gint/grid_technique.cpp +++ b/source/module_hamilt_lcao/module_gint/grid_technique.cpp @@ -4,9 +4,9 @@ #endif #include "grid_technique.h" #include "module_parameter/parameter.h" -#include "module_base/memory.h" -#include "module_base/parallel_reduce.h" -#include "module_base/timer.h" +#include "source_base/memory.h" +#include "source_base/parallel_reduce.h" +#include "source_base/timer.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" #include "source_hsolver/kernels/cuda/helper_cuda.h" diff --git a/source/module_hamilt_lcao/module_gint/gtask_force.cpp b/source/module_hamilt_lcao/module_gint/gtask_force.cpp index 186bf37257..66efb96f6d 100644 --- a/source/module_hamilt_lcao/module_gint/gtask_force.cpp +++ b/source/module_hamilt_lcao/module_gint/gtask_force.cpp @@ -1,9 +1,9 @@ #include #include "gint_force_gpu.h" -#include "module_base/ylm.h" +#include "source_base/ylm.h" #include "module_hamilt_lcao/module_gint/gint_tools.h" -#include "module_base/vector3.h" +#include "source_base/vector3.h" namespace GintKernel { diff --git a/source/module_hamilt_lcao/module_gint/gtask_rho.cpp b/source/module_hamilt_lcao/module_gint/gtask_rho.cpp index 9a7e618b42..917fc2bc25 100644 --- a/source/module_hamilt_lcao/module_gint/gtask_rho.cpp +++ b/source/module_hamilt_lcao/module_gint/gtask_rho.cpp @@ -1,7 +1,7 @@ #include "gint_rho_gpu.h" -#include "module_base/ylm.h" +#include "source_base/ylm.h" #include "module_hamilt_lcao/module_gint/gint_tools.h" -#include "module_base/vector3.h" +#include "source_base/vector3.h" #include "omp.h" namespace GintKernel { diff --git a/source/module_hamilt_lcao/module_gint/gtask_vl.cpp b/source/module_hamilt_lcao/module_gint/gtask_vl.cpp index ba09ea0949..673e4635a7 100644 --- a/source/module_hamilt_lcao/module_gint/gtask_vl.cpp +++ b/source/module_hamilt_lcao/module_gint/gtask_vl.cpp @@ -1,9 +1,9 @@ #include #include "gint_vl_gpu.h" -#include "module_base/ylm.h" +#include "source_base/ylm.h" #include "module_hamilt_lcao/module_gint/gint_tools.h" -#include "module_base/vector3.h" +#include "source_base/vector3.h" namespace GintKernel { diff --git a/source/module_hamilt_lcao/module_gint/init_orb.cpp b/source/module_hamilt_lcao/module_gint/init_orb.cpp index 7e90af608b..e6d8dd49ac 100644 --- a/source/module_hamilt_lcao/module_gint/init_orb.cpp +++ b/source/module_hamilt_lcao/module_gint/init_orb.cpp @@ -1,5 +1,5 @@ #include "gint_tools.h" -#include "module_base/memory.h" +#include "source_base/memory.h" #include "module_basis/module_ao/ORB_read.h" #include "module_cell/unitcell.h" diff --git a/source/module_hamilt_lcao/module_gint/kernels/cuda/gemm_selector.cu b/source/module_hamilt_lcao/module_gint/kernels/cuda/gemm_selector.cu index cfad7440f3..b8dda451f4 100644 --- a/source/module_hamilt_lcao/module_gint/kernels/cuda/gemm_selector.cu +++ b/source/module_hamilt_lcao/module_gint/kernels/cuda/gemm_selector.cu @@ -3,7 +3,7 @@ #include "gemm_selector.cuh" #include "vbatch_matrix_mul.cuh" #include "cuda_tools.cuh" -#include "module_base/blas_connector.h" +#include "source_base/blas_connector.h" #include "code_gen.cuh" /* diff --git a/source/module_hamilt_lcao/module_gint/kernels/cuda/gint_force.cu b/source/module_hamilt_lcao/module_gint/kernels/cuda/gint_force.cu index 4375af7eee..0199c9e37a 100644 --- a/source/module_hamilt_lcao/module_gint/kernels/cuda/gint_force.cu +++ b/source/module_hamilt_lcao/module_gint/kernels/cuda/gint_force.cu @@ -2,7 +2,7 @@ #include "interp.cuh" #include "gint_force.cuh" #include "cuda_tools.cuh" -#include "module_base/module_device/device.h" +#include "source_base/module_device/device.h" // CUDA kernel to calculate psi and force namespace GintKernel { diff --git a/source/module_hamilt_lcao/module_gint/kernels/cuda/vbatch_matrix_mul.cuh b/source/module_hamilt_lcao/module_gint/kernels/cuda/vbatch_matrix_mul.cuh index 38a2c3c2b1..013232cfac 100644 --- a/source/module_hamilt_lcao/module_gint/kernels/cuda/vbatch_matrix_mul.cuh +++ b/source/module_hamilt_lcao/module_gint/kernels/cuda/vbatch_matrix_mul.cuh @@ -10,7 +10,7 @@ #include #include "module_cell/unitcell.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" -#include "module_base/module_device/device.h" +#include "source_base/module_device/device.h" #define sA(i, j) sA[(j)*slda + (i)] diff --git a/source/module_hamilt_lcao/module_gint/mult_psi_dmr.cpp b/source/module_hamilt_lcao/module_gint/mult_psi_dmr.cpp index efa51ec4a6..aeb6e2f6cb 100644 --- a/source/module_hamilt_lcao/module_gint/mult_psi_dmr.cpp +++ b/source/module_hamilt_lcao/module_gint/mult_psi_dmr.cpp @@ -1,7 +1,7 @@ #include "gint_tools.h" -#include "module_base/timer.h" -#include "module_base/ylm.h" -#include "module_base/blas_connector.h" +#include "source_base/timer.h" +#include "source_base/ylm.h" +#include "source_base/blas_connector.h" namespace Gint_Tools{ diff --git a/source/module_hamilt_lcao/module_gint/temp_gint/gint_atom.cpp b/source/module_hamilt_lcao/module_gint/temp_gint/gint_atom.cpp index 91b30748dd..6ae3735ec6 100644 --- a/source/module_hamilt_lcao/module_gint/temp_gint/gint_atom.cpp +++ b/source/module_hamilt_lcao/module_gint/temp_gint/gint_atom.cpp @@ -1,5 +1,5 @@ -#include "module_base/ylm.h" -#include "module_base/array_pool.h" +#include "source_base/ylm.h" +#include "source_base/array_pool.h" #include "gint_atom.h" #include "gint_helper.h" diff --git a/source/module_hamilt_lcao/module_gint/temp_gint/gint_fvl.cpp b/source/module_hamilt_lcao/module_gint/temp_gint/gint_fvl.cpp index f97ccf0ed3..01fd6de0ab 100644 --- a/source/module_hamilt_lcao/module_gint/temp_gint/gint_fvl.cpp +++ b/source/module_hamilt_lcao/module_gint/temp_gint/gint_fvl.cpp @@ -1,4 +1,4 @@ -#include "module_base/global_function.h" +#include "source_base/global_function.h" #include "gint_fvl.h" #include "gint_common.h" #include "phi_operator.h" diff --git a/source/module_hamilt_lcao/module_gint/temp_gint/gint_fvl.h b/source/module_hamilt_lcao/module_gint/temp_gint/gint_fvl.h index ae75eda62d..013c7b2e0a 100644 --- a/source/module_hamilt_lcao/module_gint/temp_gint/gint_fvl.h +++ b/source/module_hamilt_lcao/module_gint/temp_gint/gint_fvl.h @@ -3,7 +3,7 @@ #include #include #include "module_hamilt_lcao/module_hcontainer/hcontainer.h" -#include "module_base/matrix.h" +#include "source_base/matrix.h" #include "gint.h" #include "gint_info.h" diff --git a/source/module_hamilt_lcao/module_gint/temp_gint/gint_fvl_meta.cpp b/source/module_hamilt_lcao/module_gint/temp_gint/gint_fvl_meta.cpp index d493d954b7..15ca44b041 100644 --- a/source/module_hamilt_lcao/module_gint/temp_gint/gint_fvl_meta.cpp +++ b/source/module_hamilt_lcao/module_gint/temp_gint/gint_fvl_meta.cpp @@ -1,4 +1,4 @@ -#include "module_base/global_function.h" +#include "source_base/global_function.h" #include "gint_fvl_meta.h" #include "gint_common.h" #include "phi_operator.h" diff --git a/source/module_hamilt_lcao/module_gint/temp_gint/gint_fvl_meta.h b/source/module_hamilt_lcao/module_gint/temp_gint/gint_fvl_meta.h index 36c8e69822..636bbc47b5 100644 --- a/source/module_hamilt_lcao/module_gint/temp_gint/gint_fvl_meta.h +++ b/source/module_hamilt_lcao/module_gint/temp_gint/gint_fvl_meta.h @@ -3,7 +3,7 @@ #include #include #include "module_hamilt_lcao/module_hcontainer/hcontainer.h" -#include "module_base/matrix.h" +#include "source_base/matrix.h" #include "gint.h" #include "gint_info.h" diff --git a/source/module_hamilt_lcao/module_gint/temp_gint/gint_helper.h b/source/module_hamilt_lcao/module_gint/temp_gint/gint_helper.h index b1f72c5a11..687c37df50 100644 --- a/source/module_hamilt_lcao/module_gint/temp_gint/gint_helper.h +++ b/source/module_hamilt_lcao/module_gint/temp_gint/gint_helper.h @@ -3,7 +3,7 @@ #include #include #include "gint_type.h" -#include "module_base/timer.h" +#include "source_base/timer.h" template std::shared_ptr toConstSharedPtr(std::shared_ptr ptr) { diff --git a/source/module_hamilt_lcao/module_gint/temp_gint/gint_info.cpp b/source/module_hamilt_lcao/module_gint/temp_gint/gint_info.cpp index 5283f37ab1..11f2a5d59e 100644 --- a/source/module_hamilt_lcao/module_gint/temp_gint/gint_info.cpp +++ b/source/module_hamilt_lcao/module_gint/temp_gint/gint_info.cpp @@ -1,7 +1,7 @@ #include #include #include "module_parameter/parameter.h" -#include "module_base/timer.h" +#include "source_base/timer.h" #include "gint_info.h" #include "gint_type.h" diff --git a/source/module_hamilt_lcao/module_gint/temp_gint/gint_interface.cpp b/source/module_hamilt_lcao/module_gint/temp_gint/gint_interface.cpp index 28b2770cdb..bd945b8b19 100644 --- a/source/module_hamilt_lcao/module_gint/temp_gint/gint_interface.cpp +++ b/source/module_hamilt_lcao/module_gint/temp_gint/gint_interface.cpp @@ -1,5 +1,5 @@ #include "gint_interface.h" -#include "module_base/timer.h" +#include "source_base/timer.h" #include "gint_vl.h" #include "gint_vl_metagga.h" #include "gint_vl_nspin4.h" diff --git a/source/module_hamilt_lcao/module_gint/temp_gint/gint_rho.cpp b/source/module_hamilt_lcao/module_gint/temp_gint/gint_rho.cpp index fa645af9ef..2924487c7e 100644 --- a/source/module_hamilt_lcao/module_gint/temp_gint/gint_rho.cpp +++ b/source/module_hamilt_lcao/module_gint/temp_gint/gint_rho.cpp @@ -1,4 +1,4 @@ -#include "module_base/global_function.h" +#include "source_base/global_function.h" #include "gint_rho.h" #include "gint_common.h" #include "phi_operator.h" diff --git a/source/module_hamilt_lcao/module_gint/temp_gint/gint_tau.cpp b/source/module_hamilt_lcao/module_gint/temp_gint/gint_tau.cpp index 94d1539d9d..f5d0b70a0c 100644 --- a/source/module_hamilt_lcao/module_gint/temp_gint/gint_tau.cpp +++ b/source/module_hamilt_lcao/module_gint/temp_gint/gint_tau.cpp @@ -1,4 +1,4 @@ -#include "module_base/global_function.h" +#include "source_base/global_function.h" #include "gint_tau.h" #include "gint_common.h" #include "phi_operator.h" diff --git a/source/module_hamilt_lcao/module_gint/temp_gint/gint_type.h b/source/module_hamilt_lcao/module_gint/temp_gint/gint_type.h index c6e9369ad2..9cf623765b 100644 --- a/source/module_hamilt_lcao/module_gint/temp_gint/gint_type.h +++ b/source/module_hamilt_lcao/module_gint/temp_gint/gint_type.h @@ -1,8 +1,8 @@ #pragma once #include "module_hamilt_lcao/module_hcontainer/hcontainer.h" -#include "module_base/vector3.h" -#include "module_base/matrix3.h" +#include "source_base/vector3.h" +#include "source_base/matrix3.h" using Matrix3 = ModuleBase::Matrix3; using Vec3d = ModuleBase::Vector3; diff --git a/source/module_hamilt_lcao/module_gint/temp_gint/gint_vl.cpp b/source/module_hamilt_lcao/module_gint/temp_gint/gint_vl.cpp index 734e68bb57..b0107bf064 100644 --- a/source/module_hamilt_lcao/module_gint/temp_gint/gint_vl.cpp +++ b/source/module_hamilt_lcao/module_gint/temp_gint/gint_vl.cpp @@ -1,4 +1,4 @@ -#include "module_base/blas_connector.h" +#include "source_base/blas_connector.h" #include "gint_common.h" #include "gint_vl.h" #include "phi_operator.h" diff --git a/source/module_hamilt_lcao/module_gint/temp_gint/gint_vl_metagga.cpp b/source/module_hamilt_lcao/module_gint/temp_gint/gint_vl_metagga.cpp index 4c6d2ac535..fa651a89e1 100644 --- a/source/module_hamilt_lcao/module_gint/temp_gint/gint_vl_metagga.cpp +++ b/source/module_hamilt_lcao/module_gint/temp_gint/gint_vl_metagga.cpp @@ -1,4 +1,4 @@ -#include "module_base/blas_connector.h" +#include "source_base/blas_connector.h" #include "gint_common.h" #include "gint_vl_metagga.h" #include "phi_operator.h" diff --git a/source/module_hamilt_lcao/module_gint/temp_gint/gint_vl_metagga_nspin4.cpp b/source/module_hamilt_lcao/module_gint/temp_gint/gint_vl_metagga_nspin4.cpp index 6f5a468254..986b182c09 100644 --- a/source/module_hamilt_lcao/module_gint/temp_gint/gint_vl_metagga_nspin4.cpp +++ b/source/module_hamilt_lcao/module_gint/temp_gint/gint_vl_metagga_nspin4.cpp @@ -1,6 +1,6 @@ -#include "module_base/global_function.h" +#include "source_base/global_function.h" #include "module_hamilt_lcao/module_hcontainer/hcontainer.h" -#include "module_base/blas_connector.h" +#include "source_base/blas_connector.h" #include "gint_common.h" #include "gint_vl_metagga_nspin4.h" #include "phi_operator.h" diff --git a/source/module_hamilt_lcao/module_gint/temp_gint/gint_vl_nspin4.cpp b/source/module_hamilt_lcao/module_gint/temp_gint/gint_vl_nspin4.cpp index 698d207ec7..db211570ca 100644 --- a/source/module_hamilt_lcao/module_gint/temp_gint/gint_vl_nspin4.cpp +++ b/source/module_hamilt_lcao/module_gint/temp_gint/gint_vl_nspin4.cpp @@ -1,6 +1,6 @@ -#include "module_base/global_function.h" +#include "source_base/global_function.h" #include "module_hamilt_lcao/module_hcontainer/hcontainer.h" -#include "module_base/blas_connector.h" +#include "source_base/blas_connector.h" #include "gint_common.h" #include "gint_vl_nspin4.h" #include "phi_operator.h" diff --git a/source/module_hamilt_lcao/module_gint/temp_gint/phi_operator.cpp b/source/module_hamilt_lcao/module_gint/temp_gint/phi_operator.cpp index 4a037d53be..d714546864 100644 --- a/source/module_hamilt_lcao/module_gint/temp_gint/phi_operator.cpp +++ b/source/module_hamilt_lcao/module_gint/temp_gint/phi_operator.cpp @@ -1,6 +1,6 @@ #include "phi_operator.h" -#include "module_base/global_function.h" -#include "module_base/matrix.h" +#include "source_base/global_function.h" +#include "source_base/matrix.h" namespace ModuleGint { diff --git a/source/module_hamilt_lcao/module_gint/temp_gint/phi_operator.hpp b/source/module_hamilt_lcao/module_gint/temp_gint/phi_operator.hpp index 7c46c80fe5..44603560d2 100644 --- a/source/module_hamilt_lcao/module_gint/temp_gint/phi_operator.hpp +++ b/source/module_hamilt_lcao/module_gint/temp_gint/phi_operator.hpp @@ -1,8 +1,8 @@ #pragma once #include "phi_operator.h" -#include "module_base/blas_connector.h" -#include "module_base/global_function.h" +#include "source_base/blas_connector.h" +#include "source_base/global_function.h" namespace ModuleGint { diff --git a/source/module_hamilt_lcao/module_gint/temp_gint/set_ddphi.cpp b/source/module_hamilt_lcao/module_gint/temp_gint/set_ddphi.cpp index dd0b77f18f..4d01acc262 100644 --- a/source/module_hamilt_lcao/module_gint/temp_gint/set_ddphi.cpp +++ b/source/module_hamilt_lcao/module_gint/temp_gint/set_ddphi.cpp @@ -1,6 +1,6 @@ -#include "module_base/array_pool.h" -#include "module_base/timer.h" -#include "module_base/ylm.h" +#include "source_base/array_pool.h" +#include "source_base/timer.h" +#include "source_base/ylm.h" #include "gint_atom.h" #include "gint_helper.h" diff --git a/source/module_hamilt_lcao/module_gint/test/test_sph.cu b/source/module_hamilt_lcao/module_gint/test/test_sph.cu index 3521e1d46c..58b0a6c329 100644 --- a/source/module_hamilt_lcao/module_gint/test/test_sph.cu +++ b/source/module_hamilt_lcao/module_gint/test/test_sph.cu @@ -8,7 +8,7 @@ #include "gtest/gtest.h" #include "module_hamilt_lcao/module_hcontainer/hcontainer.h" #include "test_sph.h" -#include "module_base/array_pool.h" +#include "source_base/array_pool.h" using namespace std; class gintTest : public ::testing::Test diff --git a/source/module_hamilt_lcao/module_hcontainer/atom_pair.cpp b/source/module_hamilt_lcao/module_hcontainer/atom_pair.cpp index 0a6d316272..b66bad470d 100644 --- a/source/module_hamilt_lcao/module_hcontainer/atom_pair.cpp +++ b/source/module_hamilt_lcao/module_hcontainer/atom_pair.cpp @@ -1,7 +1,7 @@ #include "atom_pair.h" #include #include -#include "module_base/blas_connector.h" +#include "source_base/blas_connector.h" namespace hamilt { diff --git a/source/module_hamilt_lcao/module_hcontainer/atom_pair.h b/source/module_hamilt_lcao/module_hcontainer/atom_pair.h index f0593641f9..3bdb94051e 100644 --- a/source/module_hamilt_lcao/module_hcontainer/atom_pair.h +++ b/source/module_hamilt_lcao/module_hcontainer/atom_pair.h @@ -3,7 +3,7 @@ // #include "module_cell/atom_spec.h" #include "base_matrix.h" -#include "module_base/vector3.h" +#include "source_base/vector3.h" #include "module_basis/module_ao/parallel_orbitals.h" #include diff --git a/source/module_hamilt_lcao/module_hcontainer/base_matrix.cpp b/source/module_hamilt_lcao/module_hcontainer/base_matrix.cpp index ff5471bfb6..d246dd2969 100644 --- a/source/module_hamilt_lcao/module_hcontainer/base_matrix.cpp +++ b/source/module_hamilt_lcao/module_hcontainer/base_matrix.cpp @@ -2,7 +2,7 @@ #include #include -#include "module_base/global_function.h" +#include "source_base/global_function.h" namespace hamilt { diff --git a/source/module_hamilt_lcao/module_hcontainer/func_folding.cpp b/source/module_hamilt_lcao/module_hcontainer/func_folding.cpp index 6d235b1d67..58ba3d267a 100644 --- a/source/module_hamilt_lcao/module_hcontainer/func_folding.cpp +++ b/source/module_hamilt_lcao/module_hcontainer/func_folding.cpp @@ -1,5 +1,5 @@ #include "hcontainer_funcs.h" -#include "module_base/libm/libm.h" +#include "source_base/libm/libm.h" namespace hamilt { diff --git a/source/module_hamilt_lcao/module_hcontainer/hcontainer.h b/source/module_hamilt_lcao/module_hcontainer/hcontainer.h index c823f06027..aa592019c0 100644 --- a/source/module_hamilt_lcao/module_hcontainer/hcontainer.h +++ b/source/module_hamilt_lcao/module_hcontainer/hcontainer.h @@ -2,7 +2,7 @@ #define W_ABACUS_DEVELOP_ABACUS_DEVELOP_SOURCE_MODULE_HAMILT_LCAO_MODULE_HCONTAINER_HCONTAINER_H #include "atom_pair.h" -#include "module_base/vector3.h" +#include "source_base/vector3.h" #include "module_cell/unitcell.h" #include diff --git a/source/module_hamilt_lcao/module_hcontainer/test/prepare_unitcell.h b/source/module_hamilt_lcao/module_hcontainer/test/prepare_unitcell.h index 84e0c9a4ec..3f0f58cabd 100644 --- a/source/module_hamilt_lcao/module_hcontainer/test/prepare_unitcell.h +++ b/source/module_hamilt_lcao/module_hcontainer/test/prepare_unitcell.h @@ -2,7 +2,7 @@ #define PREPARE_UNITCELL_H #include #include -#include "module_base/mathzone.h" +#include "source_base/mathzone.h" class UcellTestPrepare { diff --git a/source/module_hamilt_lcao/module_hcontainer/transfer.cpp b/source/module_hamilt_lcao/module_hcontainer/transfer.cpp index 0d984ab5c4..81320cb689 100644 --- a/source/module_hamilt_lcao/module_hcontainer/transfer.cpp +++ b/source/module_hamilt_lcao/module_hcontainer/transfer.cpp @@ -2,8 +2,8 @@ #include -#include "module_base/blas_connector.h" -#include "module_base/global_function.h" +#include "source_base/blas_connector.h" +#include "source_base/global_function.h" #ifdef __MPI #include diff --git a/source/module_hamilt_lcao/module_hcontainer/transfer.h b/source/module_hamilt_lcao/module_hcontainer/transfer.h index 35c41e4350..5b274cbad3 100644 --- a/source/module_hamilt_lcao/module_hcontainer/transfer.h +++ b/source/module_hamilt_lcao/module_hcontainer/transfer.h @@ -4,7 +4,7 @@ #include #include -#include "module_base/vector3.h" +#include "source_base/vector3.h" #include "./hcontainer.h" #ifdef __MPI diff --git a/source/module_hamilt_lcao/module_tddft/band_energy.cpp b/source/module_hamilt_lcao/module_tddft/band_energy.cpp index c148042be3..e52678df6c 100644 --- a/source/module_hamilt_lcao/module_tddft/band_energy.cpp +++ b/source/module_hamilt_lcao/module_tddft/band_energy.cpp @@ -1,9 +1,9 @@ #include "band_energy.h" #include "evolve_elec.h" -#include "module_base/lapack_connector.h" -#include "module_base/module_container/ATen/kernels/blas.h" -#include "module_base/scalapack_connector.h" +#include "source_base/lapack_connector.h" +#include "source_base/module_container/ATen/kernels/blas.h" +#include "source_base/scalapack_connector.h" #include #include diff --git a/source/module_hamilt_lcao/module_tddft/band_energy.h b/source/module_hamilt_lcao/module_tddft/band_energy.h index 4e1ab9aa5b..fbf74537b7 100644 --- a/source/module_hamilt_lcao/module_tddft/band_energy.h +++ b/source/module_hamilt_lcao/module_tddft/band_energy.h @@ -6,7 +6,7 @@ #ifndef BANDENERGY_H #define BANDENERGY_H -#include "module_base/module_container/ATen/core/tensor.h" // ct::Tensor +#include "source_base/module_container/ATen/core/tensor.h" // ct::Tensor #include "module_basis/module_ao/parallel_orbitals.h" #include diff --git a/source/module_hamilt_lcao/module_tddft/evolve_elec.cpp b/source/module_hamilt_lcao/module_tddft/evolve_elec.cpp index 95b05872d2..63561d9b95 100644 --- a/source/module_hamilt_lcao/module_tddft/evolve_elec.cpp +++ b/source/module_hamilt_lcao/module_tddft/evolve_elec.cpp @@ -1,8 +1,8 @@ #include "evolve_elec.h" #include "evolve_psi.h" -#include "module_base/parallel_reduce.h" -#include "module_base/timer.h" +#include "source_base/parallel_reduce.h" +#include "source_base/timer.h" #include "module_elecstate/module_charge/symmetry_rho.h" #include "module_hamilt_lcao/hamilt_lcaodft/hamilt_lcao.h" #include "module_hamilt_lcao/module_dftu/dftu.h" diff --git a/source/module_hamilt_lcao/module_tddft/evolve_elec.h b/source/module_hamilt_lcao/module_tddft/evolve_elec.h index d33f10c547..3377dbc579 100644 --- a/source/module_hamilt_lcao/module_tddft/evolve_elec.h +++ b/source/module_hamilt_lcao/module_tddft/evolve_elec.h @@ -1,13 +1,13 @@ #ifndef W_ABACUS_DEVELOP_ABACUS_DEVELOP_SOURCE_MODULE_HAMILT_LCAO_MODULE_TDDFT_EVOLVE_ELEC_H #define W_ABACUS_DEVELOP_ABACUS_DEVELOP_SOURCE_MODULE_HAMILT_LCAO_MODULE_TDDFT_EVOLVE_ELEC_H -#include "module_base/global_function.h" -#include "module_base/global_variable.h" -#include "module_base/module_container/ATen/core/tensor.h" // ct::Tensor -#include "module_base/module_container/ATen/core/tensor_map.h" // TensorMap -#include "module_base/module_device/device.h" // base_device -#include "module_base/module_device/memory_op.h" // memory operations -#include "module_base/scalapack_connector.h" // Cpxgemr2d +#include "source_base/global_function.h" +#include "source_base/global_variable.h" +#include "source_base/module_container/ATen/core/tensor.h" // ct::Tensor +#include "source_base/module_container/ATen/core/tensor_map.h" // TensorMap +#include "source_base/module_device/device.h" // base_device +#include "source_base/module_device/memory_op.h" // memory operations +#include "source_base/scalapack_connector.h" // Cpxgemr2d #include "source_esolver/esolver_ks_lcao.h" #include "source_esolver/esolver_ks_lcao_tddft.h" #include "module_hamilt_lcao/hamilt_lcaodft/hamilt_lcao.h" diff --git a/source/module_hamilt_lcao/module_tddft/evolve_psi.cpp b/source/module_hamilt_lcao/module_tddft/evolve_psi.cpp index 8a44adea78..277bbf90f0 100644 --- a/source/module_hamilt_lcao/module_tddft/evolve_psi.cpp +++ b/source/module_hamilt_lcao/module_tddft/evolve_psi.cpp @@ -2,10 +2,10 @@ #include "band_energy.h" #include "middle_hamilt.h" -#include "module_base/lapack_connector.h" -#include "module_base/module_container/ATen/kernels/blas.h" // cuBLAS handle -#include "module_base/module_container/ATen/kernels/lapack.h" // cuSOLVER handle -#include "module_base/scalapack_connector.h" +#include "source_base/lapack_connector.h" +#include "source_base/module_container/ATen/kernels/blas.h" // cuBLAS handle +#include "source_base/module_container/ATen/kernels/lapack.h" // cuSOLVER handle +#include "source_base/scalapack_connector.h" #include "source_esolver/esolver_ks_lcao_tddft.h" // use gatherMatrix #include "module_hamilt_lcao/hamilt_lcaodft/hamilt_lcao.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" diff --git a/source/module_hamilt_lcao/module_tddft/evolve_psi.h b/source/module_hamilt_lcao/module_tddft/evolve_psi.h index 44f0db888a..f70fc7ebcd 100644 --- a/source/module_hamilt_lcao/module_tddft/evolve_psi.h +++ b/source/module_hamilt_lcao/module_tddft/evolve_psi.h @@ -6,8 +6,8 @@ #ifndef ELEC_PSI_H #define ELEC_PSI_H -#include "module_base/module_container/ATen/core/tensor.h" // ct::Tensor -#include "module_base/module_container/ATen/core/tensor_map.h" // TensorMap +#include "source_base/module_container/ATen/core/tensor.h" // ct::Tensor +#include "source_base/module_container/ATen/core/tensor_map.h" // TensorMap #include "module_basis/module_ao/parallel_orbitals.h" #include "module_hamilt_lcao/hamilt_lcaodft/hamilt_lcao.h" diff --git a/source/module_hamilt_lcao/module_tddft/middle_hamilt.cpp b/source/module_hamilt_lcao/module_tddft/middle_hamilt.cpp index 94b3dc3f5d..da72911335 100644 --- a/source/module_hamilt_lcao/module_tddft/middle_hamilt.cpp +++ b/source/module_hamilt_lcao/module_tddft/middle_hamilt.cpp @@ -1,9 +1,9 @@ #include "middle_hamilt.h" -#include "module_base/lapack_connector.h" -#include "module_base/module_container/ATen/kernels/blas.h" -#include "module_base/module_device/memory_op.h" // memory operations -#include "module_base/scalapack_connector.h" +#include "source_base/lapack_connector.h" +#include "source_base/module_container/ATen/kernels/blas.h" +#include "source_base/module_device/memory_op.h" // memory operations +#include "source_base/scalapack_connector.h" #include #include diff --git a/source/module_hamilt_lcao/module_tddft/middle_hamilt.h b/source/module_hamilt_lcao/module_tddft/middle_hamilt.h index 4b153e3166..0d6377cc22 100644 --- a/source/module_hamilt_lcao/module_tddft/middle_hamilt.h +++ b/source/module_hamilt_lcao/module_tddft/middle_hamilt.h @@ -6,7 +6,7 @@ #ifndef MIDDLE_HAMILT_H #define MIDDLE_HAMILT_H -#include "module_base/module_container/ATen/core/tensor.h" // ct::Tensor +#include "source_base/module_container/ATen/core/tensor.h" // ct::Tensor #include "module_basis/module_ao/parallel_orbitals.h" #include diff --git a/source/module_hamilt_lcao/module_tddft/norm_psi.cpp b/source/module_hamilt_lcao/module_tddft/norm_psi.cpp index bbd7ea8956..913554c815 100644 --- a/source/module_hamilt_lcao/module_tddft/norm_psi.cpp +++ b/source/module_hamilt_lcao/module_tddft/norm_psi.cpp @@ -1,8 +1,8 @@ #include "norm_psi.h" -#include "module_base/lapack_connector.h" -#include "module_base/module_container/ATen/kernels/blas.h" -#include "module_base/scalapack_connector.h" +#include "source_base/lapack_connector.h" +#include "source_base/module_container/ATen/kernels/blas.h" +#include "source_base/scalapack_connector.h" #include #include diff --git a/source/module_hamilt_lcao/module_tddft/norm_psi.h b/source/module_hamilt_lcao/module_tddft/norm_psi.h index 6d3e455a3a..208eaa11e8 100644 --- a/source/module_hamilt_lcao/module_tddft/norm_psi.h +++ b/source/module_hamilt_lcao/module_tddft/norm_psi.h @@ -6,7 +6,7 @@ #ifndef NORM_PSI_H #define NORM_PSI_H -#include "module_base/module_container/ATen/core/tensor.h" // ct::Tensor +#include "source_base/module_container/ATen/core/tensor.h" // ct::Tensor #include "module_basis/module_ao/parallel_orbitals.h" #include diff --git a/source/module_hamilt_lcao/module_tddft/propagator.cpp b/source/module_hamilt_lcao/module_tddft/propagator.cpp index 154671176e..74f1c3088f 100644 --- a/source/module_hamilt_lcao/module_tddft/propagator.cpp +++ b/source/module_hamilt_lcao/module_tddft/propagator.cpp @@ -1,11 +1,11 @@ #include "propagator.h" -#include "module_base/lapack_connector.h" -#include "module_base/module_container/ATen/kernels/blas.h" -#include "module_base/module_container/ATen/kernels/lapack.h" -#include "module_base/module_container/ATen/kernels/memory.h" // memory operations (Tensor) -#include "module_base/module_device/memory_op.h" // memory operations -#include "module_base/scalapack_connector.h" +#include "source_base/lapack_connector.h" +#include "source_base/module_container/ATen/kernels/blas.h" +#include "source_base/module_container/ATen/kernels/lapack.h" +#include "source_base/module_container/ATen/kernels/memory.h" // memory operations (Tensor) +#include "source_base/module_device/memory_op.h" // memory operations +#include "source_base/scalapack_connector.h" #include "module_parameter/parameter.h" #include diff --git a/source/module_hamilt_lcao/module_tddft/propagator.h b/source/module_hamilt_lcao/module_tddft/propagator.h index cb77300b4a..fe360c5fb8 100644 --- a/source/module_hamilt_lcao/module_tddft/propagator.h +++ b/source/module_hamilt_lcao/module_tddft/propagator.h @@ -6,8 +6,8 @@ #ifndef PROPAGATOR_H #define PROPAGATOR_H -#include "module_base/constants.h" -#include "module_base/module_container/ATen/core/tensor.h" // ct::Tensor +#include "source_base/constants.h" +#include "source_base/module_container/ATen/core/tensor.h" // ct::Tensor #include "module_basis/module_ao/parallel_orbitals.h" #include diff --git a/source/module_hamilt_lcao/module_tddft/propagator_cn2.cpp b/source/module_hamilt_lcao/module_tddft/propagator_cn2.cpp index d87cf3c593..8ccbd2a5a0 100644 --- a/source/module_hamilt_lcao/module_tddft/propagator_cn2.cpp +++ b/source/module_hamilt_lcao/module_tddft/propagator_cn2.cpp @@ -1,9 +1,9 @@ -#include "module_base/lapack_connector.h" -#include "module_base/module_container/ATen/kernels/blas.h" -#include "module_base/module_container/ATen/kernels/lapack.h" -#include "module_base/module_container/ATen/kernels/memory.h" // memory operations (Tensor) -#include "module_base/module_device/memory_op.h" // memory operations -#include "module_base/scalapack_connector.h" +#include "source_base/lapack_connector.h" +#include "source_base/module_container/ATen/kernels/blas.h" +#include "source_base/module_container/ATen/kernels/lapack.h" +#include "source_base/module_container/ATen/kernels/memory.h" // memory operations (Tensor) +#include "source_base/module_device/memory_op.h" // memory operations +#include "source_base/scalapack_connector.h" #include "module_parameter/parameter.h" #include "propagator.h" diff --git a/source/module_hamilt_lcao/module_tddft/propagator_etrs.cpp b/source/module_hamilt_lcao/module_tddft/propagator_etrs.cpp index ad37264d59..e3dcec0b0d 100644 --- a/source/module_hamilt_lcao/module_tddft/propagator_etrs.cpp +++ b/source/module_hamilt_lcao/module_tddft/propagator_etrs.cpp @@ -1,9 +1,9 @@ -#include "module_base/lapack_connector.h" -#include "module_base/module_container/ATen/kernels/blas.h" -#include "module_base/module_container/ATen/kernels/lapack.h" -#include "module_base/module_container/ATen/kernels/memory.h" // memory operations (Tensor) -#include "module_base/module_device/memory_op.h" // memory operations -#include "module_base/scalapack_connector.h" +#include "source_base/lapack_connector.h" +#include "source_base/module_container/ATen/kernels/blas.h" +#include "source_base/module_container/ATen/kernels/lapack.h" +#include "source_base/module_container/ATen/kernels/memory.h" // memory operations (Tensor) +#include "source_base/module_device/memory_op.h" // memory operations +#include "source_base/scalapack_connector.h" #include "module_parameter/parameter.h" #include "propagator.h" diff --git a/source/module_hamilt_lcao/module_tddft/propagator_taylor.cpp b/source/module_hamilt_lcao/module_tddft/propagator_taylor.cpp index 58567a900a..ae03c18417 100644 --- a/source/module_hamilt_lcao/module_tddft/propagator_taylor.cpp +++ b/source/module_hamilt_lcao/module_tddft/propagator_taylor.cpp @@ -1,9 +1,9 @@ -#include "module_base/lapack_connector.h" -#include "module_base/module_container/ATen/kernels/blas.h" -#include "module_base/module_container/ATen/kernels/lapack.h" -#include "module_base/module_container/ATen/kernels/memory.h" // memory operations (Tensor) -#include "module_base/module_device/memory_op.h" // memory operations -#include "module_base/scalapack_connector.h" +#include "source_base/lapack_connector.h" +#include "source_base/module_container/ATen/kernels/blas.h" +#include "source_base/module_container/ATen/kernels/lapack.h" +#include "source_base/module_container/ATen/kernels/memory.h" // memory operations (Tensor) +#include "source_base/module_device/memory_op.h" // memory operations +#include "source_base/scalapack_connector.h" #include "module_parameter/parameter.h" #include "propagator.h" diff --git a/source/module_hamilt_lcao/module_tddft/snap_psibeta_half_tddft.cpp b/source/module_hamilt_lcao/module_tddft/snap_psibeta_half_tddft.cpp index b03e5a380d..97a71345c8 100644 --- a/source/module_hamilt_lcao/module_tddft/snap_psibeta_half_tddft.cpp +++ b/source/module_hamilt_lcao/module_tddft/snap_psibeta_half_tddft.cpp @@ -1,10 +1,10 @@ #include "snap_psibeta_half_tddft.h" -#include "module_base/constants.h" -#include "module_base/math_integral.h" -#include "module_base/math_polyint.h" -#include "module_base/timer.h" -#include "module_base/ylm.h" +#include "source_base/constants.h" +#include "source_base/math_integral.h" +#include "source_base/math_polyint.h" +#include "source_base/timer.h" +#include "source_base/ylm.h" namespace module_tddft { diff --git a/source/module_hamilt_lcao/module_tddft/snap_psibeta_half_tddft.h b/source/module_hamilt_lcao/module_tddft/snap_psibeta_half_tddft.h index 04c8eb9760..21f1df41dd 100644 --- a/source/module_hamilt_lcao/module_tddft/snap_psibeta_half_tddft.h +++ b/source/module_hamilt_lcao/module_tddft/snap_psibeta_half_tddft.h @@ -4,7 +4,7 @@ #include #include -#include "module_base/vector3.h" +#include "source_base/vector3.h" #include "module_basis/module_ao/ORB_read.h" #include "module_cell/setup_nonlocal.h" diff --git a/source/module_hamilt_lcao/module_tddft/solve_propagation.cpp b/source/module_hamilt_lcao/module_tddft/solve_propagation.cpp index 45d8a1231a..f8df6a6c71 100644 --- a/source/module_hamilt_lcao/module_tddft/solve_propagation.cpp +++ b/source/module_hamilt_lcao/module_tddft/solve_propagation.cpp @@ -2,8 +2,8 @@ #include -#include "module_base/lapack_connector.h" -#include "module_base/scalapack_connector.h" +#include "source_base/lapack_connector.h" +#include "source_base/scalapack_connector.h" namespace module_tddft { diff --git a/source/module_hamilt_lcao/module_tddft/td_current.cpp b/source/module_hamilt_lcao/module_tddft/td_current.cpp index 558ab304cc..d307b5a256 100644 --- a/source/module_hamilt_lcao/module_tddft/td_current.cpp +++ b/source/module_hamilt_lcao/module_tddft/td_current.cpp @@ -1,7 +1,7 @@ #include "td_current.h" #ifdef __LCAO -#include "module_base/timer.h" -#include "module_base/tool_title.h" +#include "source_base/timer.h" +#include "source_base/tool_title.h" #include "module_hamilt_lcao/module_tddft/snap_psibeta_half_tddft.h" #ifdef _OPENMP #include diff --git a/source/module_hamilt_lcao/module_tddft/td_current.h b/source/module_hamilt_lcao/module_tddft/td_current.h index 2d4fa5c1b1..b0c3a38c57 100644 --- a/source/module_hamilt_lcao/module_tddft/td_current.h +++ b/source/module_hamilt_lcao/module_tddft/td_current.h @@ -7,7 +7,7 @@ #include "module_hamilt_lcao/module_hcontainer/hcontainer.h" #include "module_basis/module_nao/two_center_integrator.h" #include "td_velocity.h" -#include "module_base/vector3.h" +#include "source_base/vector3.h" #ifdef __LCAO //design to calculate current for length gauge diff --git a/source/module_hamilt_lcao/module_tddft/td_velocity.h b/source/module_hamilt_lcao/module_tddft/td_velocity.h index 1fdc1dd5c4..a16e2b83e8 100644 --- a/source/module_hamilt_lcao/module_tddft/td_velocity.h +++ b/source/module_hamilt_lcao/module_tddft/td_velocity.h @@ -1,7 +1,7 @@ #ifndef TD_VELOCITY_H #define TD_VELOCITY_H -#include "module_base/abfs-vector3_order.h" -#include "module_base/timer.h" +#include "source_base/abfs-vector3_order.h" +#include "source_base/timer.h" #include "module_hamilt_lcao/module_hcontainer/hcontainer.h" #include diff --git a/source/module_hamilt_lcao/module_tddft/test/band_energy_test.cpp b/source/module_hamilt_lcao/module_tddft/test/band_energy_test.cpp index 706b50a603..a32e10ba71 100644 --- a/source/module_hamilt_lcao/module_tddft/test/band_energy_test.cpp +++ b/source/module_hamilt_lcao/module_tddft/test/band_energy_test.cpp @@ -1,7 +1,7 @@ #include "module_hamilt_lcao/module_tddft/band_energy.h" #include -#include +#include #include #include "module_basis/module_ao/parallel_orbitals.h" diff --git a/source/module_hamilt_lcao/module_tddft/test/middle_hamilt_test.cpp b/source/module_hamilt_lcao/module_tddft/test/middle_hamilt_test.cpp index 6ac920400a..a7fecf63e1 100644 --- a/source/module_hamilt_lcao/module_tddft/test/middle_hamilt_test.cpp +++ b/source/module_hamilt_lcao/module_tddft/test/middle_hamilt_test.cpp @@ -1,11 +1,11 @@ #include "module_hamilt_lcao/module_tddft/middle_hamilt.h" -#include "module_base/global_variable.h" // GlobalV::ofs_running +#include "source_base/global_variable.h" // GlobalV::ofs_running #include "module_basis/module_ao/parallel_orbitals.h" #include "tddft_test.h" #include -#include +#include #include /************************************************ diff --git a/source/module_hamilt_lcao/module_tddft/test/norm_psi_test.cpp b/source/module_hamilt_lcao/module_tddft/test/norm_psi_test.cpp index e4b8852c95..f2692870b3 100644 --- a/source/module_hamilt_lcao/module_tddft/test/norm_psi_test.cpp +++ b/source/module_hamilt_lcao/module_tddft/test/norm_psi_test.cpp @@ -1,11 +1,11 @@ #include "module_hamilt_lcao/module_tddft/norm_psi.h" -#include "module_base/global_variable.h" // GlobalV::ofs_running +#include "source_base/global_variable.h" // GlobalV::ofs_running #include "module_basis/module_ao/parallel_orbitals.h" #include "tddft_test.h" #include -#include +#include #include /************************************************ diff --git a/source/module_hamilt_lcao/module_tddft/test/propagator_test1.cpp b/source/module_hamilt_lcao/module_tddft/test/propagator_test1.cpp index 0002ee4b44..80bf8cb3d7 100644 --- a/source/module_hamilt_lcao/module_tddft/test/propagator_test1.cpp +++ b/source/module_hamilt_lcao/module_tddft/test/propagator_test1.cpp @@ -6,7 +6,7 @@ #include "module_parameter/parameter.h" #include "tddft_test.h" -#include +#include #include /************************************************ diff --git a/source/module_hamilt_lcao/module_tddft/test/propagator_test2.cpp b/source/module_hamilt_lcao/module_tddft/test/propagator_test2.cpp index 7ff2416a6a..7b05804f5c 100644 --- a/source/module_hamilt_lcao/module_tddft/test/propagator_test2.cpp +++ b/source/module_hamilt_lcao/module_tddft/test/propagator_test2.cpp @@ -6,7 +6,7 @@ #include "module_parameter/parameter.h" #include "tddft_test.h" -#include +#include #include /************************************************ diff --git a/source/module_hamilt_lcao/module_tddft/test/propagator_test3.cpp b/source/module_hamilt_lcao/module_tddft/test/propagator_test3.cpp index faabe0019d..8e59906b18 100644 --- a/source/module_hamilt_lcao/module_tddft/test/propagator_test3.cpp +++ b/source/module_hamilt_lcao/module_tddft/test/propagator_test3.cpp @@ -6,7 +6,7 @@ #include "module_parameter/parameter.h" #include "tddft_test.h" -#include +#include #include /************************************************ diff --git a/source/module_hamilt_lcao/module_tddft/test/tddft_test.cpp b/source/module_hamilt_lcao/module_tddft/test/tddft_test.cpp index a55ad59681..f3eec74202 100644 --- a/source/module_hamilt_lcao/module_tddft/test/tddft_test.cpp +++ b/source/module_hamilt_lcao/module_tddft/test/tddft_test.cpp @@ -3,8 +3,8 @@ #include #include -#include "module_base/blacs_connector.h" -#include "module_base/scalapack_connector.h" +#include "source_base/blacs_connector.h" +#include "source_base/scalapack_connector.h" #include "module_basis/module_ao/parallel_orbitals.h" /************************************************ diff --git a/source/module_hamilt_lcao/module_tddft/test/upsi_test1.cpp b/source/module_hamilt_lcao/module_tddft/test/upsi_test1.cpp index 6ffe45a3bd..25558c9c42 100644 --- a/source/module_hamilt_lcao/module_tddft/test/upsi_test1.cpp +++ b/source/module_hamilt_lcao/module_tddft/test/upsi_test1.cpp @@ -1,10 +1,10 @@ -#include "module_base/global_variable.h" // GlobalV::ofs_running +#include "source_base/global_variable.h" // GlobalV::ofs_running #include "module_basis/module_ao/parallel_orbitals.h" #include "module_hamilt_lcao/module_tddft/upsi.h" #include "tddft_test.h" #include -#include +#include #include #define doublethreshold 1e-8 diff --git a/source/module_hamilt_lcao/module_tddft/test/upsi_test2.cpp b/source/module_hamilt_lcao/module_tddft/test/upsi_test2.cpp index 915b2a248b..cc9010fef6 100644 --- a/source/module_hamilt_lcao/module_tddft/test/upsi_test2.cpp +++ b/source/module_hamilt_lcao/module_tddft/test/upsi_test2.cpp @@ -1,10 +1,10 @@ -#include "module_base/global_variable.h" // GlobalV::ofs_running +#include "source_base/global_variable.h" // GlobalV::ofs_running #include "module_basis/module_ao/parallel_orbitals.h" #include "module_hamilt_lcao/module_tddft/upsi.h" #include "tddft_test.h" #include -#include +#include #include #define doublethreshold 1e-8 diff --git a/source/module_hamilt_lcao/module_tddft/test/upsi_test3.cpp b/source/module_hamilt_lcao/module_tddft/test/upsi_test3.cpp index cf5e177b13..dbb332b453 100644 --- a/source/module_hamilt_lcao/module_tddft/test/upsi_test3.cpp +++ b/source/module_hamilt_lcao/module_tddft/test/upsi_test3.cpp @@ -1,10 +1,10 @@ -#include "module_base/global_variable.h" // GlobalV::ofs_running +#include "source_base/global_variable.h" // GlobalV::ofs_running #include "module_basis/module_ao/parallel_orbitals.h" #include "module_hamilt_lcao/module_tddft/upsi.h" #include "tddft_test.h" #include -#include +#include #include #define doublethreshold 1e-8 diff --git a/source/module_hamilt_lcao/module_tddft/upsi.cpp b/source/module_hamilt_lcao/module_tddft/upsi.cpp index cc9a2448a8..15d78f19e2 100644 --- a/source/module_hamilt_lcao/module_tddft/upsi.cpp +++ b/source/module_hamilt_lcao/module_tddft/upsi.cpp @@ -1,8 +1,8 @@ #include "upsi.h" -#include "module_base/lapack_connector.h" -#include "module_base/module_container/ATen/kernels/blas.h" -#include "module_base/scalapack_connector.h" +#include "source_base/lapack_connector.h" +#include "source_base/module_container/ATen/kernels/blas.h" +#include "source_base/scalapack_connector.h" #include #include diff --git a/source/module_hamilt_lcao/module_tddft/upsi.h b/source/module_hamilt_lcao/module_tddft/upsi.h index c687a18fed..b65d2e5f77 100644 --- a/source/module_hamilt_lcao/module_tddft/upsi.h +++ b/source/module_hamilt_lcao/module_tddft/upsi.h @@ -7,7 +7,7 @@ #ifndef UPSI_H #define UPSI_H -#include "module_base/module_container/ATen/core/tensor.h" // ct::Tensor +#include "source_base/module_container/ATen/core/tensor.h" // ct::Tensor #include "module_basis/module_ao/parallel_orbitals.h" #include diff --git a/source/module_hamilt_pw/hamilt_ofdft/kedf_lkt.cpp b/source/module_hamilt_pw/hamilt_ofdft/kedf_lkt.cpp index 733c10bc4c..ed3da4ad22 100644 --- a/source/module_hamilt_pw/hamilt_ofdft/kedf_lkt.cpp +++ b/source/module_hamilt_pw/hamilt_ofdft/kedf_lkt.cpp @@ -3,7 +3,7 @@ #include "module_parameter/parameter.h" #include -#include "module_base/parallel_reduce.h" +#include "source_base/parallel_reduce.h" void KEDF_LKT::set_para(double dV, double lkt_a) { diff --git a/source/module_hamilt_pw/hamilt_ofdft/kedf_lkt.h b/source/module_hamilt_pw/hamilt_ofdft/kedf_lkt.h index 6df93bfb33..a08bf42acb 100644 --- a/source/module_hamilt_pw/hamilt_ofdft/kedf_lkt.h +++ b/source/module_hamilt_pw/hamilt_ofdft/kedf_lkt.h @@ -3,10 +3,10 @@ #include #include -#include "module_base/global_function.h" -#include "module_base/global_variable.h" -#include "module_base/matrix.h" -#include "module_base/timer.h" +#include "source_base/global_function.h" +#include "source_base/global_variable.h" +#include "source_base/matrix.h" +#include "source_base/timer.h" #include "module_basis/module_pw/pw_basis.h" /** diff --git a/source/module_hamilt_pw/hamilt_ofdft/kedf_ml.cpp b/source/module_hamilt_pw/hamilt_ofdft/kedf_ml.cpp index e30555f75c..174c726c06 100644 --- a/source/module_hamilt_pw/hamilt_ofdft/kedf_ml.cpp +++ b/source/module_hamilt_pw/hamilt_ofdft/kedf_ml.cpp @@ -3,8 +3,8 @@ #include "kedf_ml.h" #include "npy.hpp" -#include "module_base/parallel_reduce.h" -#include "module_base/global_function.h" +#include "source_base/parallel_reduce.h" +#include "source_base/global_function.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" void KEDF_ML::set_para( diff --git a/source/module_hamilt_pw/hamilt_ofdft/kedf_ml_pot.cpp b/source/module_hamilt_pw/hamilt_ofdft/kedf_ml_pot.cpp index 40d25a36a2..a371eb669f 100644 --- a/source/module_hamilt_pw/hamilt_ofdft/kedf_ml_pot.cpp +++ b/source/module_hamilt_pw/hamilt_ofdft/kedf_ml_pot.cpp @@ -2,8 +2,8 @@ #include "kedf_ml.h" -#include "module_base/parallel_reduce.h" -#include "module_base/global_function.h" +#include "source_base/parallel_reduce.h" +#include "source_base/global_function.h" /** * @brief Calculate the Pauli potential of ML KEDF diff --git a/source/module_hamilt_pw/hamilt_ofdft/kedf_tf.cpp b/source/module_hamilt_pw/hamilt_ofdft/kedf_tf.cpp index 97c0f65f2f..3c56ac7b4b 100644 --- a/source/module_hamilt_pw/hamilt_ofdft/kedf_tf.cpp +++ b/source/module_hamilt_pw/hamilt_ofdft/kedf_tf.cpp @@ -3,7 +3,7 @@ #include "module_parameter/parameter.h" #include -#include "module_base/parallel_reduce.h" +#include "source_base/parallel_reduce.h" void KEDF_TF::set_para(int nx, double dV, double tf_weight) { diff --git a/source/module_hamilt_pw/hamilt_ofdft/kedf_tf.h b/source/module_hamilt_pw/hamilt_ofdft/kedf_tf.h index b9c247cecc..e3a0f58a5f 100644 --- a/source/module_hamilt_pw/hamilt_ofdft/kedf_tf.h +++ b/source/module_hamilt_pw/hamilt_ofdft/kedf_tf.h @@ -3,10 +3,10 @@ #include #include -#include "module_base/global_function.h" -#include "module_base/global_variable.h" -#include "module_base/matrix.h" -#include "module_base/timer.h" +#include "source_base/global_function.h" +#include "source_base/global_variable.h" +#include "source_base/matrix.h" +#include "source_base/timer.h" /** * @brief A class which calculates the kinetic energy, potential, and stress with Thomas-Fermi (TF) KEDF. diff --git a/source/module_hamilt_pw/hamilt_ofdft/kedf_vw.cpp b/source/module_hamilt_pw/hamilt_ofdft/kedf_vw.cpp index d22a499a88..605d38fad2 100644 --- a/source/module_hamilt_pw/hamilt_ofdft/kedf_vw.cpp +++ b/source/module_hamilt_pw/hamilt_ofdft/kedf_vw.cpp @@ -3,7 +3,7 @@ #include "module_parameter/parameter.h" #include -#include "module_base/parallel_reduce.h" +#include "source_base/parallel_reduce.h" void KEDF_vW::set_para(double dV, double vw_weight) { diff --git a/source/module_hamilt_pw/hamilt_ofdft/kedf_vw.h b/source/module_hamilt_pw/hamilt_ofdft/kedf_vw.h index 7f5cd47c40..e987b544b7 100644 --- a/source/module_hamilt_pw/hamilt_ofdft/kedf_vw.h +++ b/source/module_hamilt_pw/hamilt_ofdft/kedf_vw.h @@ -3,10 +3,10 @@ #include #include -#include "module_base/global_function.h" -#include "module_base/global_variable.h" -#include "module_base/matrix.h" -#include "module_base/timer.h" +#include "source_base/global_function.h" +#include "source_base/global_variable.h" +#include "source_base/matrix.h" +#include "source_base/timer.h" #include "module_basis/module_pw/pw_basis.h" /** diff --git a/source/module_hamilt_pw/hamilt_ofdft/kedf_wt.cpp b/source/module_hamilt_pw/hamilt_ofdft/kedf_wt.cpp index 312d4a2890..8c9cecaeb9 100644 --- a/source/module_hamilt_pw/hamilt_ofdft/kedf_wt.cpp +++ b/source/module_hamilt_pw/hamilt_ofdft/kedf_wt.cpp @@ -3,9 +3,9 @@ #include "module_parameter/parameter.h" #include -#include "module_base/global_variable.h" -#include "module_base/parallel_reduce.h" -#include "module_base/tool_quit.h" +#include "source_base/global_variable.h" +#include "source_base/parallel_reduce.h" +#include "source_base/tool_quit.h" /** * @brief Set the parameters of WT KEDF, and initialize kernel diff --git a/source/module_hamilt_pw/hamilt_ofdft/kedf_wt.h b/source/module_hamilt_pw/hamilt_ofdft/kedf_wt.h index a08f08c05e..46d4fb122a 100644 --- a/source/module_hamilt_pw/hamilt_ofdft/kedf_wt.h +++ b/source/module_hamilt_pw/hamilt_ofdft/kedf_wt.h @@ -3,10 +3,10 @@ #include #include -#include "module_base/global_function.h" -#include "module_base/global_variable.h" -#include "module_base/matrix.h" -#include "module_base/timer.h" +#include "source_base/global_function.h" +#include "source_base/global_variable.h" +#include "source_base/matrix.h" +#include "source_base/timer.h" #include "module_basis/module_pw/pw_basis.h" /** diff --git a/source/module_hamilt_pw/hamilt_ofdft/of_stress_pw.cpp b/source/module_hamilt_pw/hamilt_ofdft/of_stress_pw.cpp index 5f42c12624..2980934075 100644 --- a/source/module_hamilt_pw/hamilt_ofdft/of_stress_pw.cpp +++ b/source/module_hamilt_pw/hamilt_ofdft/of_stress_pw.cpp @@ -1,6 +1,6 @@ #include "of_stress_pw.h" -#include "module_base/timer.h" +#include "source_base/timer.h" #include "module_hamilt_general/module_vdw/vdw.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" #include "module_io/output_log.h" diff --git a/source/module_hamilt_pw/hamilt_pwdft/VL_in_pw.cpp b/source/module_hamilt_pw/hamilt_pwdft/VL_in_pw.cpp index 0917deb22a..88be1210ce 100644 --- a/source/module_hamilt_pw/hamilt_pwdft/VL_in_pw.cpp +++ b/source/module_hamilt_pw/hamilt_pwdft/VL_in_pw.cpp @@ -1,8 +1,8 @@ #include "VL_in_pw.h" #include "module_parameter/parameter.h" -#include "module_base/libm/libm.h" -#include "module_base/math_integral.h" -#include "module_base/timer.h" +#include "source_base/libm/libm.h" +#include "source_base/math_integral.h" +#include "source_base/timer.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" pseudopot_cell_vl::pseudopot_cell_vl() diff --git a/source/module_hamilt_pw/hamilt_pwdft/VL_in_pw.h b/source/module_hamilt_pw/hamilt_pwdft/VL_in_pw.h index 5d439216bb..597cac9e23 100644 --- a/source/module_hamilt_pw/hamilt_pwdft/VL_in_pw.h +++ b/source/module_hamilt_pw/hamilt_pwdft/VL_in_pw.h @@ -1,9 +1,9 @@ #ifndef VL_IN_PW_H #define VL_IN_PW_H -#include "module_base/global_function.h" -#include "module_base/global_variable.h" -#include "module_base/matrix.h" +#include "source_base/global_function.h" +#include "source_base/global_variable.h" +#include "source_base/matrix.h" #include "module_basis/module_pw/pw_basis.h" #include "module_cell/unitcell.h" diff --git a/source/module_hamilt_pw/hamilt_pwdft/VNL_grad_pw.cpp b/source/module_hamilt_pw/hamilt_pwdft/VNL_grad_pw.cpp index 856ca038f7..1e38a7bc7e 100644 --- a/source/module_hamilt_pw/hamilt_pwdft/VNL_grad_pw.cpp +++ b/source/module_hamilt_pw/hamilt_pwdft/VNL_grad_pw.cpp @@ -1,10 +1,10 @@ #include "VNL_in_pw.h" -#include "module_base/math_sphbes.h" +#include "source_base/math_sphbes.h" #include "module_parameter/parameter.h" -#include "module_base/timer.h" -#include "module_base/math_ylmreal.h" -#include "module_base/math_integral.h" -#include "module_base/math_polyint.h" +#include "source_base/timer.h" +#include "source_base/math_ylmreal.h" +#include "source_base/math_integral.h" +#include "source_base/math_polyint.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" void pseudopot_cell_vnl::initgradq_vnl(const UnitCell &cell) { diff --git a/source/module_hamilt_pw/hamilt_pwdft/VNL_in_pw.cpp b/source/module_hamilt_pw/hamilt_pwdft/VNL_in_pw.cpp index ee9b2bb659..cb3fd3300a 100644 --- a/source/module_hamilt_pw/hamilt_pwdft/VNL_in_pw.cpp +++ b/source/module_hamilt_pw/hamilt_pwdft/VNL_in_pw.cpp @@ -1,16 +1,16 @@ #include "VNL_in_pw.h" #include "module_parameter/parameter.h" -#include "module_base/clebsch_gordan_coeff.h" -#include "module_base/global_function.h" -#include "module_base/global_variable.h" -#include "module_base/math_integral.h" -#include "module_base/math_polyint.h" -#include "module_base/math_sphbes.h" -#include "module_base/math_ylmreal.h" -#include "module_base/memory.h" -#include "module_base/module_device/device.h" -#include "module_base/timer.h" +#include "source_base/clebsch_gordan_coeff.h" +#include "source_base/global_function.h" +#include "source_base/global_variable.h" +#include "source_base/math_integral.h" +#include "source_base/math_polyint.h" +#include "source_base/math_sphbes.h" +#include "source_base/math_ylmreal.h" +#include "source_base/memory.h" +#include "source_base/module_device/device.h" +#include "source_base/timer.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" #include "module_hamilt_pw/hamilt_pwdft/kernels/vnl_op.h" diff --git a/source/module_hamilt_pw/hamilt_pwdft/VNL_in_pw.h b/source/module_hamilt_pw/hamilt_pwdft/VNL_in_pw.h index 1e9fdaa762..0ef56b0e0b 100644 --- a/source/module_hamilt_pw/hamilt_pwdft/VNL_in_pw.h +++ b/source/module_hamilt_pw/hamilt_pwdft/VNL_in_pw.h @@ -1,10 +1,10 @@ #ifndef VNL_IN_PW_H #define VNL_IN_PW_H -#include "module_base/complexarray.h" -#include "module_base/complexmatrix.h" -#include "module_base/intarray.h" -#include "module_base/realarray.h" +#include "source_base/complexarray.h" +#include "source_base/complexmatrix.h" +#include "source_base/intarray.h" +#include "source_base/realarray.h" #include "module_cell/unitcell.h" #include "module_hamilt_pw/hamilt_pwdft/soc.h" #include "module_hamilt_pw/hamilt_pwdft/structure_factor.h" diff --git a/source/module_hamilt_pw/hamilt_pwdft/elecond.cpp b/source/module_hamilt_pw/hamilt_pwdft/elecond.cpp index 6e70c8d195..59f612161b 100644 --- a/source/module_hamilt_pw/hamilt_pwdft/elecond.cpp +++ b/source/module_hamilt_pw/hamilt_pwdft/elecond.cpp @@ -1,9 +1,9 @@ #include "elecond.h" -#include "module_base/global_function.h" -#include "module_base/global_variable.h" -#include "module_base/kernels/math_kernel_op.h" -#include "module_base/parallel_device.h" +#include "source_base/global_function.h" +#include "source_base/global_variable.h" +#include "source_base/kernels/math_kernel_op.h" +#include "source_base/parallel_device.h" #include "module_elecstate/occupy.h" #include "module_io/binstream.h" #include "module_parameter/parameter.h" diff --git a/source/module_hamilt_pw/hamilt_pwdft/elecond.h b/source/module_hamilt_pw/hamilt_pwdft/elecond.h index 8ccc0a1408..7c48529937 100644 --- a/source/module_hamilt_pw/hamilt_pwdft/elecond.h +++ b/source/module_hamilt_pw/hamilt_pwdft/elecond.h @@ -1,7 +1,7 @@ #ifndef ELECOND_H #define ELECOND_H -#include "module_base/matrix.h" +#include "source_base/matrix.h" #include "module_basis/module_pw/pw_basis_k.h" #include "module_cell/klist.h" #include "module_cell/unitcell.h" diff --git a/source/module_hamilt_pw/hamilt_pwdft/forces.cpp b/source/module_hamilt_pw/hamilt_pwdft/forces.cpp index a722bc5449..f8adc6a8f3 100644 --- a/source/module_hamilt_pw/hamilt_pwdft/forces.cpp +++ b/source/module_hamilt_pw/hamilt_pwdft/forces.cpp @@ -4,12 +4,12 @@ #include "module_hamilt_pw/hamilt_pwdft/global.h" #include "module_io/output_log.h" // new -#include "module_base/complexmatrix.h" -#include "module_base/libm/libm.h" -#include "module_base/math_integral.h" -#include "module_base/mathzone.h" -#include "module_base/timer.h" -#include "module_base/tool_threading.h" +#include "source_base/complexmatrix.h" +#include "source_base/libm/libm.h" +#include "source_base/math_integral.h" +#include "source_base/mathzone.h" +#include "source_base/timer.h" +#include "source_base/tool_threading.h" #include "module_elecstate/module_pot/efield.h" #include "module_elecstate/module_pot/gatefield.h" #include "module_hamilt_general/module_ewald/H_Ewald_pw.h" diff --git a/source/module_hamilt_pw/hamilt_pwdft/forces.h b/source/module_hamilt_pw/hamilt_pwdft/forces.h index 5e62291761..5ee2302675 100644 --- a/source/module_hamilt_pw/hamilt_pwdft/forces.h +++ b/source/module_hamilt_pw/hamilt_pwdft/forces.h @@ -1,17 +1,17 @@ #ifndef FORCES_H #define FORCES_H -#include "module_base/global_function.h" -#include "module_base/global_variable.h" -#include "module_base/matrix.h" -#include "module_base/module_device/memory_op.h" +#include "source_base/global_function.h" +#include "source_base/global_variable.h" +#include "source_base/matrix.h" +#include "source_base/module_device/memory_op.h" #include "module_basis/module_pw/pw_basis_k.h" #include "module_cell/klist.h" #include "module_cell/module_symmetry/symmetry.h" #include "module_elecstate/elecstate.h" #include "module_hamilt_pw/hamilt_pwdft/VL_in_pw.h" #include "module_hamilt_pw/hamilt_pwdft/kernels/force_op.h" -#include "module_base/kernels/math_kernel_op.h" +#include "source_base/kernels/math_kernel_op.h" #include "module_psi/psi.h" #include "structure_factor.h" diff --git a/source/module_hamilt_pw/hamilt_pwdft/forces_cc.cpp b/source/module_hamilt_pw/hamilt_pwdft/forces_cc.cpp index eaf83816e3..b8356b8281 100644 --- a/source/module_hamilt_pw/hamilt_pwdft/forces_cc.cpp +++ b/source/module_hamilt_pw/hamilt_pwdft/forces_cc.cpp @@ -3,12 +3,12 @@ #include "module_parameter/parameter.h" #include "module_io/output_log.h" // new -#include "module_base/complexmatrix.h" -#include "module_base/libm/libm.h" -#include "module_base/math_integral.h" -#include "module_base/mathzone.h" -#include "module_base/timer.h" -#include "module_base/tool_threading.h" +#include "source_base/complexmatrix.h" +#include "source_base/libm/libm.h" +#include "source_base/math_integral.h" +#include "source_base/mathzone.h" +#include "source_base/timer.h" +#include "source_base/tool_threading.h" #include "module_elecstate/cal_ux.h" #include "module_elecstate/module_pot/efield.h" #include "module_elecstate/module_pot/gatefield.h" diff --git a/source/module_hamilt_pw/hamilt_pwdft/forces_nl.cpp b/source/module_hamilt_pw/hamilt_pwdft/forces_nl.cpp index bd615f0eef..c0c033115c 100644 --- a/source/module_hamilt_pw/hamilt_pwdft/forces_nl.cpp +++ b/source/module_hamilt_pw/hamilt_pwdft/forces_nl.cpp @@ -1,6 +1,6 @@ #include "forces.h" -#include "module_base/timer.h" -#include "module_base/tool_title.h" +#include "source_base/timer.h" +#include "source_base/tool_title.h" #include "module_hamilt_pw/hamilt_pwdft/fs_nonlocal_tools.h" #ifdef _OPENMP diff --git a/source/module_hamilt_pw/hamilt_pwdft/forces_onsite.cpp b/source/module_hamilt_pw/hamilt_pwdft/forces_onsite.cpp index 36f90f0001..d6a501223b 100644 --- a/source/module_hamilt_pw/hamilt_pwdft/forces_onsite.cpp +++ b/source/module_hamilt_pw/hamilt_pwdft/forces_onsite.cpp @@ -1,6 +1,6 @@ #include "forces.h" -#include "module_base/timer.h" -#include "module_base/tool_title.h" +#include "source_base/timer.h" +#include "source_base/tool_title.h" #include "module_hamilt_pw/hamilt_pwdft/onsite_projector.h" #include "module_hamilt_pw/hamilt_pwdft/kernels/force_op.h" #include "module_parameter/parameter.h" diff --git a/source/module_hamilt_pw/hamilt_pwdft/forces_scc.cpp b/source/module_hamilt_pw/hamilt_pwdft/forces_scc.cpp index 7928d38b22..cc17003689 100644 --- a/source/module_hamilt_pw/hamilt_pwdft/forces_scc.cpp +++ b/source/module_hamilt_pw/hamilt_pwdft/forces_scc.cpp @@ -2,12 +2,12 @@ #include "module_io/output_log.h" #include "stress_func.h" // new -#include "module_base/complexmatrix.h" -#include "module_base/libm/libm.h" -#include "module_base/math_integral.h" -#include "module_base/mathzone.h" -#include "module_base/timer.h" -#include "module_base/tool_threading.h" +#include "source_base/complexmatrix.h" +#include "source_base/libm/libm.h" +#include "source_base/math_integral.h" +#include "source_base/mathzone.h" +#include "source_base/timer.h" +#include "source_base/tool_threading.h" #include "module_elecstate/module_pot/efield.h" #include "module_elecstate/module_pot/gatefield.h" #include "module_hamilt_general/module_ewald/H_Ewald_pw.h" diff --git a/source/module_hamilt_pw/hamilt_pwdft/forces_us.cpp b/source/module_hamilt_pw/hamilt_pwdft/forces_us.cpp index efa8009e63..a3884fdc25 100644 --- a/source/module_hamilt_pw/hamilt_pwdft/forces_us.cpp +++ b/source/module_hamilt_pw/hamilt_pwdft/forces_us.cpp @@ -1,8 +1,8 @@ #include "forces.h" -#include "module_base/libm/libm.h" +#include "source_base/libm/libm.h" #include "module_parameter/parameter.h" -#include "module_base/math_ylmreal.h" -#include "module_base/timer.h" +#include "source_base/math_ylmreal.h" +#include "source_base/timer.h" #include "module_elecstate/elecstate_pw.h" // This routine computes the contribution to atomic forces due diff --git a/source/module_hamilt_pw/hamilt_pwdft/fs_kin_tools.cpp b/source/module_hamilt_pw/hamilt_pwdft/fs_kin_tools.cpp index 00049866f9..853ae34abd 100644 --- a/source/module_hamilt_pw/hamilt_pwdft/fs_kin_tools.cpp +++ b/source/module_hamilt_pw/hamilt_pwdft/fs_kin_tools.cpp @@ -1,6 +1,6 @@ #include "fs_kin_tools.h" -#include "module_base/parallel_reduce.h" +#include "source_base/parallel_reduce.h" namespace hamilt { template diff --git a/source/module_hamilt_pw/hamilt_pwdft/fs_kin_tools.h b/source/module_hamilt_pw/hamilt_pwdft/fs_kin_tools.h index b6327cf47f..ae5f84336d 100644 --- a/source/module_hamilt_pw/hamilt_pwdft/fs_kin_tools.h +++ b/source/module_hamilt_pw/hamilt_pwdft/fs_kin_tools.h @@ -1,6 +1,6 @@ #ifndef FS_KIN_TOOLS_H #define FS_KIN_TOOLS_H -#include "module_base/module_device/device.h" +#include "source_base/module_device/device.h" #include "module_basis/module_pw/pw_basis_k.h" #include "module_cell/klist.h" #include "module_cell/unitcell.h" diff --git a/source/module_hamilt_pw/hamilt_pwdft/fs_nonlocal_tools.cpp b/source/module_hamilt_pw/hamilt_pwdft/fs_nonlocal_tools.cpp index 95e5d337bc..5a0ddea93c 100644 --- a/source/module_hamilt_pw/hamilt_pwdft/fs_nonlocal_tools.cpp +++ b/source/module_hamilt_pw/hamilt_pwdft/fs_nonlocal_tools.cpp @@ -1,16 +1,16 @@ #include "fs_nonlocal_tools.h" -#include "module_base/math_polyint.h" -#include "module_base/math_ylmreal.h" -#include "module_base/memory.h" -#include "module_base/parallel_device.h" -#include "module_base/timer.h" -#include "module_base/tool_title.h" +#include "source_base/math_polyint.h" +#include "source_base/math_ylmreal.h" +#include "source_base/memory.h" +#include "source_base/parallel_device.h" +#include "source_base/timer.h" +#include "source_base/tool_title.h" #include "module_hamilt_pw/hamilt_pwdft/kernels/force_op.h" #include "module_parameter/parameter.h" #include "nonlocal_maths.hpp" -#include "module_base/parallel_comm.h" // different MPI worlds (POOL_WORLD) +#include "source_base/parallel_comm.h" // different MPI worlds (POOL_WORLD) namespace hamilt { diff --git a/source/module_hamilt_pw/hamilt_pwdft/fs_nonlocal_tools.h b/source/module_hamilt_pw/hamilt_pwdft/fs_nonlocal_tools.h index 64a76e700d..b8e3ad8a96 100644 --- a/source/module_hamilt_pw/hamilt_pwdft/fs_nonlocal_tools.h +++ b/source/module_hamilt_pw/hamilt_pwdft/fs_nonlocal_tools.h @@ -1,13 +1,13 @@ #ifndef W_ABACUS_DEVELOP_ABACUS_DEVELOP_SOURCE_MODULE_HAMILT_PW_HAMILT_PWDFT_FS_NONLOCAL_TOOLS_H #define W_ABACUS_DEVELOP_ABACUS_DEVELOP_SOURCE_MODULE_HAMILT_PW_HAMILT_PWDFT_FS_NONLOCAL_TOOLS_H -#include "module_base/module_device/device.h" +#include "source_base/module_device/device.h" #include "module_basis/module_pw/pw_basis_k.h" #include "module_cell/klist.h" #include "module_cell/unitcell.h" #include "module_hamilt_pw/hamilt_pwdft/VNL_in_pw.h" #include "module_hamilt_pw/hamilt_pwdft/kernels/stress_op.h" -#include "module_base/kernels/math_kernel_op.h" +#include "source_base/kernels/math_kernel_op.h" #include "module_psi/psi.h" #include diff --git a/source/module_hamilt_pw/hamilt_pwdft/global.h b/source/module_hamilt_pw/hamilt_pwdft/global.h index d6f6be697f..202e35d129 100644 --- a/source/module_hamilt_pw/hamilt_pwdft/global.h +++ b/source/module_hamilt_pw/hamilt_pwdft/global.h @@ -1,8 +1,8 @@ #ifndef GLOBAL_H #define GLOBAL_H -#include "module_base/global_function.h" -#include "module_base/global_variable.h" +#include "source_base/global_function.h" +#include "source_base/global_variable.h" #include "module_elecstate/module_charge/charge_mixing.h" #include "module_hamilt_pw/hamilt_pwdft/VNL_in_pw.h" #include "module_io/restart.h" diff --git a/source/module_hamilt_pw/hamilt_pwdft/hamilt_pw.cpp b/source/module_hamilt_pw/hamilt_pwdft/hamilt_pw.cpp index 07087eb50a..87c4d2ce42 100644 --- a/source/module_hamilt_pw/hamilt_pwdft/hamilt_pw.cpp +++ b/source/module_hamilt_pw/hamilt_pwdft/hamilt_pw.cpp @@ -1,9 +1,9 @@ #include "hamilt_pw.h" #include "module_parameter/parameter.h" -#include "module_base/blas_connector.h" -#include "module_base/global_function.h" -#include "module_base/global_variable.h" +#include "source_base/blas_connector.h" +#include "source_base/global_function.h" +#include "source_base/global_variable.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" #include "operator_pw/veff_pw.h" diff --git a/source/module_hamilt_pw/hamilt_pwdft/hamilt_pw.h b/source/module_hamilt_pw/hamilt_pwdft/hamilt_pw.h index fe5abdc4ef..10a81c45c4 100644 --- a/source/module_hamilt_pw/hamilt_pwdft/hamilt_pw.h +++ b/source/module_hamilt_pw/hamilt_pwdft/hamilt_pw.h @@ -1,13 +1,13 @@ #ifndef HAMILTPW_H #define HAMILTPW_H -#include "module_base/macros.h" +#include "source_base/macros.h" #include "module_cell/klist.h" #include "module_elecstate/module_pot/potential_new.h" #include "source_esolver/esolver_ks_pw.h" #include "module_hamilt_general/hamilt.h" #include "module_hamilt_pw/hamilt_pwdft/VNL_in_pw.h" -#include "module_base/kernels/math_kernel_op.h" +#include "source_base/kernels/math_kernel_op.h" #include "module_hamilt_pw/hamilt_pwdft/module_exx_helper/exx_helper.h" namespace hamilt diff --git a/source/module_hamilt_pw/hamilt_pwdft/kernels/cuda/force_op.cu b/source/module_hamilt_pw/hamilt_pwdft/kernels/cuda/force_op.cu index 5d0656d105..f659ae03c4 100644 --- a/source/module_hamilt_pw/hamilt_pwdft/kernels/cuda/force_op.cu +++ b/source/module_hamilt_pw/hamilt_pwdft/kernels/cuda/force_op.cu @@ -1,13 +1,13 @@ #include "module_hamilt_pw/hamilt_pwdft/kernels/force_op.h" // #include "module_psi/kernels/device.h" -#include "module_base/module_device/types.h" +#include "source_base/module_device/types.h" #include #include #include #include -#include +#include #define THREADS_PER_BLOCK 256 diff --git a/source/module_hamilt_pw/hamilt_pwdft/kernels/cuda/stress_op.cu b/source/module_hamilt_pw/hamilt_pwdft/kernels/cuda/stress_op.cu index dfca5c4e8e..e8f5187b35 100644 --- a/source/module_hamilt_pw/hamilt_pwdft/kernels/cuda/stress_op.cu +++ b/source/module_hamilt_pw/hamilt_pwdft/kernels/cuda/stress_op.cu @@ -1,11 +1,11 @@ #include "module_hamilt_pw/hamilt_pwdft/kernels/stress_op.h" #include "vnl_tools_cu.hpp" -#include "module_base/module_device/types.h" +#include "source_base/module_device/types.h" #include #include #include -#include +#include #include diff --git a/source/module_hamilt_pw/hamilt_pwdft/kernels/stress_op.cpp b/source/module_hamilt_pw/hamilt_pwdft/kernels/stress_op.cpp index 8c26ca9f13..2aea737f3d 100644 --- a/source/module_hamilt_pw/hamilt_pwdft/kernels/stress_op.cpp +++ b/source/module_hamilt_pw/hamilt_pwdft/kernels/stress_op.cpp @@ -1,9 +1,9 @@ #include "module_hamilt_pw/hamilt_pwdft/kernels/stress_op.h" -#include "module_base/constants.h" -#include "module_base/libm/libm.h" -#include "module_base/math_polyint.h" -#include "module_base/memory.h" +#include "source_base/constants.h" +#include "source_base/libm/libm.h" +#include "source_base/math_polyint.h" +#include "source_base/memory.h" #include "module_hamilt_pw/hamilt_pwdft/kernels/vnl_op.h" #include "vnl_tools.hpp" diff --git a/source/module_hamilt_pw/hamilt_pwdft/kernels/stress_op.h b/source/module_hamilt_pw/hamilt_pwdft/kernels/stress_op.h index 7fecd96d75..e388f278d4 100644 --- a/source/module_hamilt_pw/hamilt_pwdft/kernels/stress_op.h +++ b/source/module_hamilt_pw/hamilt_pwdft/kernels/stress_op.h @@ -5,7 +5,7 @@ #include "module_psi/psi.h" #include -#include +#include namespace hamilt { diff --git a/source/module_hamilt_pw/hamilt_pwdft/kernels/test/ekinetic_op_test.cpp b/source/module_hamilt_pw/hamilt_pwdft/kernels/test/ekinetic_op_test.cpp index 7c06dfc154..149b820f49 100644 --- a/source/module_hamilt_pw/hamilt_pwdft/kernels/test/ekinetic_op_test.cpp +++ b/source/module_hamilt_pw/hamilt_pwdft/kernels/test/ekinetic_op_test.cpp @@ -1,6 +1,6 @@ #include "module_hamilt_pw/hamilt_pwdft/kernels/ekinetic_op.h" -#include "module_base/module_device/memory_op.h" +#include "source_base/module_device/memory_op.h" #include #include diff --git a/source/module_hamilt_pw/hamilt_pwdft/kernels/test/force_op_test.cpp b/source/module_hamilt_pw/hamilt_pwdft/kernels/test/force_op_test.cpp index be237b64ba..5d86ebc8ac 100644 --- a/source/module_hamilt_pw/hamilt_pwdft/kernels/test/force_op_test.cpp +++ b/source/module_hamilt_pw/hamilt_pwdft/kernels/test/force_op_test.cpp @@ -1,6 +1,6 @@ #include "module_hamilt_pw/hamilt_pwdft/kernels/force_op.h" -#include "module_base/module_device/memory_op.h" +#include "source_base/module_device/memory_op.h" #include #include diff --git a/source/module_hamilt_pw/hamilt_pwdft/kernels/test/meta_op_test.cpp b/source/module_hamilt_pw/hamilt_pwdft/kernels/test/meta_op_test.cpp index 85caa61f4b..3583829562 100644 --- a/source/module_hamilt_pw/hamilt_pwdft/kernels/test/meta_op_test.cpp +++ b/source/module_hamilt_pw/hamilt_pwdft/kernels/test/meta_op_test.cpp @@ -1,6 +1,6 @@ #include "module_hamilt_pw/hamilt_pwdft/kernels/meta_op.h" -#include "module_base/module_device/memory_op.h" +#include "source_base/module_device/memory_op.h" #include #include diff --git a/source/module_hamilt_pw/hamilt_pwdft/kernels/test/nonlocal_op_test.cpp b/source/module_hamilt_pw/hamilt_pwdft/kernels/test/nonlocal_op_test.cpp index 47deaec255..5acae65767 100644 --- a/source/module_hamilt_pw/hamilt_pwdft/kernels/test/nonlocal_op_test.cpp +++ b/source/module_hamilt_pw/hamilt_pwdft/kernels/test/nonlocal_op_test.cpp @@ -1,6 +1,6 @@ #include "module_hamilt_pw/hamilt_pwdft/kernels/nonlocal_op.h" -#include "module_base/module_device/memory_op.h" +#include "source_base/module_device/memory_op.h" #include #include diff --git a/source/module_hamilt_pw/hamilt_pwdft/kernels/test/stress_op_test.cpp b/source/module_hamilt_pw/hamilt_pwdft/kernels/test/stress_op_test.cpp index a3be95fce8..a86be44327 100644 --- a/source/module_hamilt_pw/hamilt_pwdft/kernels/test/stress_op_test.cpp +++ b/source/module_hamilt_pw/hamilt_pwdft/kernels/test/stress_op_test.cpp @@ -1,6 +1,6 @@ #include "module_hamilt_pw/hamilt_pwdft/kernels/stress_op.h" -#include "module_base/module_device/memory_op.h" +#include "source_base/module_device/memory_op.h" #include #include diff --git a/source/module_hamilt_pw/hamilt_pwdft/kernels/test/veff_op_test.cpp b/source/module_hamilt_pw/hamilt_pwdft/kernels/test/veff_op_test.cpp index 56c96157fd..09b7d3b658 100644 --- a/source/module_hamilt_pw/hamilt_pwdft/kernels/test/veff_op_test.cpp +++ b/source/module_hamilt_pw/hamilt_pwdft/kernels/test/veff_op_test.cpp @@ -1,6 +1,6 @@ #include "module_hamilt_pw/hamilt_pwdft/kernels/veff_op.h" -#include "module_base/module_device/memory_op.h" +#include "source_base/module_device/memory_op.h" #include #include diff --git a/source/module_hamilt_pw/hamilt_pwdft/kernels/test/vnl_op_test.cpp b/source/module_hamilt_pw/hamilt_pwdft/kernels/test/vnl_op_test.cpp index be5e6a8a68..fe1a1c804d 100644 --- a/source/module_hamilt_pw/hamilt_pwdft/kernels/test/vnl_op_test.cpp +++ b/source/module_hamilt_pw/hamilt_pwdft/kernels/test/vnl_op_test.cpp @@ -1,6 +1,6 @@ #include "module_hamilt_pw/hamilt_pwdft/kernels/vnl_op.h" -#include "module_base/module_device/memory_op.h" +#include "source_base/module_device/memory_op.h" #include #include diff --git a/source/module_hamilt_pw/hamilt_pwdft/kernels/test/wf_op_test.cpp b/source/module_hamilt_pw/hamilt_pwdft/kernels/test/wf_op_test.cpp index 2463234c31..eceb0575eb 100644 --- a/source/module_hamilt_pw/hamilt_pwdft/kernels/test/wf_op_test.cpp +++ b/source/module_hamilt_pw/hamilt_pwdft/kernels/test/wf_op_test.cpp @@ -1,6 +1,6 @@ #include "module_hamilt_pw/hamilt_pwdft/kernels/wf_op.h" -#include "module_base/module_device/memory_op.h" +#include "source_base/module_device/memory_op.h" #include #include diff --git a/source/module_hamilt_pw/hamilt_pwdft/kernels/wf_op.cpp b/source/module_hamilt_pw/hamilt_pwdft/kernels/wf_op.cpp index 1faeff358a..d2ec1edb8e 100644 --- a/source/module_hamilt_pw/hamilt_pwdft/kernels/wf_op.cpp +++ b/source/module_hamilt_pw/hamilt_pwdft/kernels/wf_op.cpp @@ -1,5 +1,5 @@ #include "module_hamilt_pw/hamilt_pwdft/kernels/wf_op.h" -#include "module_base/libm/libm.h" +#include "source_base/libm/libm.h" namespace hamilt{ diff --git a/source/module_hamilt_pw/hamilt_pwdft/module_exx_helper/exx_helper.h b/source/module_hamilt_pw/hamilt_pwdft/module_exx_helper/exx_helper.h index 95d5cc2597..25d5996329 100644 --- a/source/module_hamilt_pw/hamilt_pwdft/module_exx_helper/exx_helper.h +++ b/source/module_hamilt_pw/hamilt_pwdft/module_exx_helper/exx_helper.h @@ -2,7 +2,7 @@ // For EXX in PW. // #include "module_psi/psi.h" -#include "module_base/matrix.h" +#include "source_base/matrix.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" #include "module_hamilt_pw/hamilt_pwdft/operator_pw/op_exx_pw.h" diff --git a/source/module_hamilt_pw/hamilt_pwdft/nonlocal_maths.hpp b/source/module_hamilt_pw/hamilt_pwdft/nonlocal_maths.hpp index 292ad80d43..e29d077e54 100644 --- a/source/module_hamilt_pw/hamilt_pwdft/nonlocal_maths.hpp +++ b/source/module_hamilt_pw/hamilt_pwdft/nonlocal_maths.hpp @@ -1,13 +1,13 @@ #ifndef HAMILTPW_NONLOCAL_MATHS_H #define HAMILTPW_NONLOCAL_MATHS_H -#include "module_base/module_device/device.h" +#include "source_base/module_device/device.h" #include "module_basis/module_pw/pw_basis_k.h" #include "module_cell/klist.h" #include "module_cell/unitcell.h" #include "module_hamilt_pw/hamilt_pwdft/VNL_in_pw.h" #include "module_hamilt_pw/hamilt_pwdft/kernels/stress_op.h" -#include "module_base/kernels/math_kernel_op.h" +#include "source_base/kernels/math_kernel_op.h" namespace hamilt { diff --git a/source/module_hamilt_pw/hamilt_pwdft/onsite_proj_tools.cpp b/source/module_hamilt_pw/hamilt_pwdft/onsite_proj_tools.cpp index 7b88204eca..ca2453f189 100644 --- a/source/module_hamilt_pw/hamilt_pwdft/onsite_proj_tools.cpp +++ b/source/module_hamilt_pw/hamilt_pwdft/onsite_proj_tools.cpp @@ -1,10 +1,10 @@ #include "onsite_proj_tools.h" -#include "module_base/math_polyint.h" -#include "module_base/math_ylmreal.h" -#include "module_base/memory.h" -#include "module_base/timer.h" -#include "module_base/tool_title.h" +#include "source_base/math_polyint.h" +#include "source_base/math_ylmreal.h" +#include "source_base/memory.h" +#include "source_base/timer.h" +#include "source_base/tool_title.h" #include "module_hamilt_pw/hamilt_pwdft/kernels/force_op.h" #include "nonlocal_maths.hpp" diff --git a/source/module_hamilt_pw/hamilt_pwdft/onsite_proj_tools.h b/source/module_hamilt_pw/hamilt_pwdft/onsite_proj_tools.h index 0376a9709f..94bacc1229 100644 --- a/source/module_hamilt_pw/hamilt_pwdft/onsite_proj_tools.h +++ b/source/module_hamilt_pw/hamilt_pwdft/onsite_proj_tools.h @@ -1,13 +1,13 @@ #ifndef MODULEHAMILTPW_ONSITEPROJTOOLS_H #define MODULEHAMILTPW_ONSITEPROJTOOLS_H -#include "module_base/module_device/device.h" +#include "source_base/module_device/device.h" #include "module_basis/module_pw/pw_basis_k.h" #include "module_cell/klist.h" #include "module_cell/unitcell.h" #include "module_hamilt_pw/hamilt_pwdft/VNL_in_pw.h" #include "module_hamilt_pw/hamilt_pwdft/kernels/stress_op.h" -#include "module_base/kernels/math_kernel_op.h" +#include "source_base/kernels/math_kernel_op.h" #include "module_psi/psi.h" #include diff --git a/source/module_hamilt_pw/hamilt_pwdft/onsite_projector.cpp b/source/module_hamilt_pw/hamilt_pwdft/onsite_projector.cpp index 893268ae6d..fdf403e632 100644 --- a/source/module_hamilt_pw/hamilt_pwdft/onsite_projector.cpp +++ b/source/module_hamilt_pw/hamilt_pwdft/onsite_projector.cpp @@ -6,16 +6,16 @@ #include #include "module_hamilt_pw/hamilt_pwdft/onsite_projector.h" -#include "module_base/projgen.h" -#include "module_base/blas_connector.h" -#include "module_base/kernels/math_kernel_op.h" +#include "source_base/projgen.h" +#include "source_base/blas_connector.h" +#include "source_base/kernels/math_kernel_op.h" #ifdef __MPI -#include "module_base/parallel_reduce.h" -#include "module_base/parallel_common.h" +#include "source_base/parallel_reduce.h" +#include "source_base/parallel_common.h" #endif #include "module_parameter/parameter.h" -#include "module_base/timer.h" -#include "module_base/formatter.h" +#include "source_base/timer.h" +#include "source_base/formatter.h" /** * =============================================================================================== diff --git a/source/module_hamilt_pw/hamilt_pwdft/onsite_projector.h b/source/module_hamilt_pw/hamilt_pwdft/onsite_projector.h index b34d8291de..04c540e0cf 100644 --- a/source/module_hamilt_pw/hamilt_pwdft/onsite_projector.h +++ b/source/module_hamilt_pw/hamilt_pwdft/onsite_projector.h @@ -1,7 +1,7 @@ #ifndef MODULEHAMILTPW_ONSITEPROJECTOR_H #define MODULEHAMILTPW_ONSITEPROJECTOR_H -#include "module_base/module_device/device.h" -#include "module_base/kernels/math_kernel_op.h" +#include "source_base/module_device/device.h" +#include "source_base/kernels/math_kernel_op.h" #include "module_hamilt_pw/hamilt_pwdft/structure_factor.h" #include "module_basis/module_pw/pw_basis_k.h" #include "module_hamilt_pw/hamilt_pwdft/radial_proj.h" diff --git a/source/module_hamilt_pw/hamilt_pwdft/operator_pw/ekinetic_pw.cpp b/source/module_hamilt_pw/hamilt_pwdft/operator_pw/ekinetic_pw.cpp index 65b6c5b3dc..c776863089 100644 --- a/source/module_hamilt_pw/hamilt_pwdft/operator_pw/ekinetic_pw.cpp +++ b/source/module_hamilt_pw/hamilt_pwdft/operator_pw/ekinetic_pw.cpp @@ -1,9 +1,9 @@ #include "ekinetic_pw.h" -#include "module_base/timer.h" -#include "module_base/tool_quit.h" +#include "source_base/timer.h" +#include "source_base/tool_quit.h" -#include "module_base/module_device/device.h" +#include "source_base/module_device/device.h" namespace hamilt { diff --git a/source/module_hamilt_pw/hamilt_pwdft/operator_pw/ekinetic_pw.h b/source/module_hamilt_pw/hamilt_pwdft/operator_pw/ekinetic_pw.h index 8061ae6e2d..87ad93b3a0 100644 --- a/source/module_hamilt_pw/hamilt_pwdft/operator_pw/ekinetic_pw.h +++ b/source/module_hamilt_pw/hamilt_pwdft/operator_pw/ekinetic_pw.h @@ -4,7 +4,7 @@ #include "operator_pw.h" #include "module_hamilt_pw/hamilt_pwdft/kernels/ekinetic_op.h" -#include +#include namespace hamilt { diff --git a/source/module_hamilt_pw/hamilt_pwdft/operator_pw/meta_pw.cpp b/source/module_hamilt_pw/hamilt_pwdft/operator_pw/meta_pw.cpp index 817dba61ce..a87f8758aa 100644 --- a/source/module_hamilt_pw/hamilt_pwdft/operator_pw/meta_pw.cpp +++ b/source/module_hamilt_pw/hamilt_pwdft/operator_pw/meta_pw.cpp @@ -1,9 +1,9 @@ #include "meta_pw.h" -#include "module_base/timer.h" +#include "source_base/timer.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" #include "module_hamilt_general/module_xc/xc_functional.h" -#include "module_base/tool_quit.h" +#include "source_base/tool_quit.h" namespace hamilt { diff --git a/source/module_hamilt_pw/hamilt_pwdft/operator_pw/meta_pw.h b/source/module_hamilt_pw/hamilt_pwdft/operator_pw/meta_pw.h index 133eed1f5b..736bb81e86 100644 --- a/source/module_hamilt_pw/hamilt_pwdft/operator_pw/meta_pw.h +++ b/source/module_hamilt_pw/hamilt_pwdft/operator_pw/meta_pw.h @@ -2,12 +2,12 @@ #define METAPW_H #include "operator_pw.h" -#include "module_base/matrix.h" +#include "source_base/matrix.h" #include "module_basis/module_pw/pw_basis_k.h" #include "module_hamilt_pw/hamilt_pwdft/kernels/meta_op.h" -#include "module_base/kernels/math_kernel_op.h" +#include "source_base/kernels/math_kernel_op.h" -#include +#include namespace hamilt { diff --git a/source/module_hamilt_pw/hamilt_pwdft/operator_pw/nonlocal_pw.cpp b/source/module_hamilt_pw/hamilt_pwdft/operator_pw/nonlocal_pw.cpp index 66e5f04927..2053c3b850 100644 --- a/source/module_hamilt_pw/hamilt_pwdft/operator_pw/nonlocal_pw.cpp +++ b/source/module_hamilt_pw/hamilt_pwdft/operator_pw/nonlocal_pw.cpp @@ -1,10 +1,10 @@ #include "nonlocal_pw.h" #include "module_parameter/parameter.h" -#include "module_base/blas_connector.h" -#include "module_base/timer.h" -#include "module_base/parallel_reduce.h" -#include "module_base/tool_quit.h" +#include "source_base/blas_connector.h" +#include "source_base/timer.h" +#include "source_base/parallel_reduce.h" +#include "source_base/tool_quit.h" namespace hamilt { diff --git a/source/module_hamilt_pw/hamilt_pwdft/operator_pw/nonlocal_pw.h b/source/module_hamilt_pw/hamilt_pwdft/operator_pw/nonlocal_pw.h index 2ae106cb96..6714f86b08 100644 --- a/source/module_hamilt_pw/hamilt_pwdft/operator_pw/nonlocal_pw.h +++ b/source/module_hamilt_pw/hamilt_pwdft/operator_pw/nonlocal_pw.h @@ -5,7 +5,7 @@ #include "module_cell/unitcell.h" #include "module_hamilt_pw/hamilt_pwdft/kernels/nonlocal_op.h" -#include "module_base/kernels/math_kernel_op.h" +#include "source_base/kernels/math_kernel_op.h" #include "module_hamilt_pw/hamilt_pwdft/VNL_in_pw.h" diff --git a/source/module_hamilt_pw/hamilt_pwdft/operator_pw/onsite_proj_pw.cpp b/source/module_hamilt_pw/hamilt_pwdft/operator_pw/onsite_proj_pw.cpp index 24c5b11891..5d8702ff9d 100644 --- a/source/module_hamilt_pw/hamilt_pwdft/operator_pw/onsite_proj_pw.cpp +++ b/source/module_hamilt_pw/hamilt_pwdft/operator_pw/onsite_proj_pw.cpp @@ -1,9 +1,9 @@ #include "onsite_proj_pw.h" -#include "module_base/blas_connector.h" -#include "module_base/timer.h" -#include "module_base/parallel_reduce.h" -#include "module_base/tool_quit.h" +#include "source_base/blas_connector.h" +#include "source_base/timer.h" +#include "source_base/parallel_reduce.h" +#include "source_base/tool_quit.h" #include "module_hamilt_lcao/module_deltaspin/spin_constrain.h" #include "module_hamilt_lcao/module_dftu/dftu.h" #include "module_hamilt_pw/hamilt_pwdft/onsite_projector.h" diff --git a/source/module_hamilt_pw/hamilt_pwdft/operator_pw/onsite_proj_pw.h b/source/module_hamilt_pw/hamilt_pwdft/operator_pw/onsite_proj_pw.h index b28657d0df..16ab79d5ef 100644 --- a/source/module_hamilt_pw/hamilt_pwdft/operator_pw/onsite_proj_pw.h +++ b/source/module_hamilt_pw/hamilt_pwdft/operator_pw/onsite_proj_pw.h @@ -4,7 +4,7 @@ #include "operator_pw.h" #include "module_cell/unitcell.h" -#include "module_base/kernels/math_kernel_op.h" +#include "source_base/kernels/math_kernel_op.h" namespace hamilt { diff --git a/source/module_hamilt_pw/hamilt_pwdft/operator_pw/op_exx_pw.cpp b/source/module_hamilt_pw/hamilt_pwdft/operator_pw/op_exx_pw.cpp index 022d439fc5..e0c7f0ad90 100644 --- a/source/module_hamilt_pw/hamilt_pwdft/operator_pw/op_exx_pw.cpp +++ b/source/module_hamilt_pw/hamilt_pwdft/operator_pw/op_exx_pw.cpp @@ -1,11 +1,11 @@ -#include "module_base/constants.h" -#include "module_base/global_variable.h" -#include "module_base/parallel_reduce.h" -#include "module_base/timer.h" +#include "source_base/constants.h" +#include "source_base/global_variable.h" +#include "source_base/parallel_reduce.h" +#include "source_base/timer.h" #include "module_cell/klist.h" #include "module_hamilt_general/operator.h" #include "module_psi/psi.h" -#include "module_base/tool_quit.h" +#include "source_base/tool_quit.h" #include #include diff --git a/source/module_hamilt_pw/hamilt_pwdft/operator_pw/op_exx_pw.h b/source/module_hamilt_pw/hamilt_pwdft/operator_pw/op_exx_pw.h index bbf5c46bf3..885c57347e 100644 --- a/source/module_hamilt_pw/hamilt_pwdft/operator_pw/op_exx_pw.h +++ b/source/module_hamilt_pw/hamilt_pwdft/operator_pw/op_exx_pw.h @@ -1,15 +1,15 @@ #ifndef OPEXXPW_H #define OPEXXPW_H -#include "module_base/matrix.h" +#include "source_base/matrix.h" #include "module_basis/module_pw/pw_basis.h" #include "module_cell/klist.h" #include "module_psi/psi.h" #include "operator_pw.h" #include "module_basis/module_pw/pw_basis_k.h" -#include "module_base/macros.h" -#include "module_base/kernels/math_kernel_op.h" -#include "module_base/blas_connector.h" +#include "source_base/macros.h" +#include "source_base/kernels/math_kernel_op.h" +#include "source_base/blas_connector.h" #include #include diff --git a/source/module_hamilt_pw/hamilt_pwdft/operator_pw/operator_pw.cpp b/source/module_hamilt_pw/hamilt_pwdft/operator_pw/operator_pw.cpp index f377a7f96a..03cf3620e7 100644 --- a/source/module_hamilt_pw/hamilt_pwdft/operator_pw/operator_pw.cpp +++ b/source/module_hamilt_pw/hamilt_pwdft/operator_pw/operator_pw.cpp @@ -1,4 +1,4 @@ -#include "module_base/timer.h" +#include "source_base/timer.h" #include "module_hamilt_general/operator.h" #include "module_hamilt_pw/hamilt_pwdft/operator_pw/operator_pw.h" diff --git a/source/module_hamilt_pw/hamilt_pwdft/operator_pw/veff_pw.cpp b/source/module_hamilt_pw/hamilt_pwdft/operator_pw/veff_pw.cpp index c69f55cbb2..e2813b3a9a 100644 --- a/source/module_hamilt_pw/hamilt_pwdft/operator_pw/veff_pw.cpp +++ b/source/module_hamilt_pw/hamilt_pwdft/operator_pw/veff_pw.cpp @@ -1,7 +1,7 @@ #include "veff_pw.h" -#include "module_base/timer.h" -#include "module_base/tool_quit.h" +#include "source_base/timer.h" +#include "source_base/tool_quit.h" namespace hamilt { diff --git a/source/module_hamilt_pw/hamilt_pwdft/operator_pw/veff_pw.h b/source/module_hamilt_pw/hamilt_pwdft/operator_pw/veff_pw.h index 5ec042282f..7f04c35c22 100644 --- a/source/module_hamilt_pw/hamilt_pwdft/operator_pw/veff_pw.h +++ b/source/module_hamilt_pw/hamilt_pwdft/operator_pw/veff_pw.h @@ -2,11 +2,11 @@ #define VEFFPW_H #include "operator_pw.h" -#include "module_base/matrix.h" +#include "source_base/matrix.h" #include "module_basis/module_pw/pw_basis_k.h" #include "module_hamilt_pw/hamilt_pwdft/kernels/veff_op.h" -#include +#include namespace hamilt { diff --git a/source/module_hamilt_pw/hamilt_pwdft/operator_pw/velocity_pw.cpp b/source/module_hamilt_pw/hamilt_pwdft/operator_pw/velocity_pw.cpp index 3998ef9b85..f9a7aa6333 100644 --- a/source/module_hamilt_pw/hamilt_pwdft/operator_pw/velocity_pw.cpp +++ b/source/module_hamilt_pw/hamilt_pwdft/operator_pw/velocity_pw.cpp @@ -1,8 +1,8 @@ #include "velocity_pw.h" -#include "module_base/kernels/math_kernel_op.h" -#include "module_base/parallel_reduce.h" -#include "module_base/timer.h" +#include "source_base/kernels/math_kernel_op.h" +#include "source_base/parallel_reduce.h" +#include "source_base/timer.h" namespace hamilt { diff --git a/source/module_hamilt_pw/hamilt_pwdft/parallel_grid.cpp b/source/module_hamilt_pw/hamilt_pwdft/parallel_grid.cpp index 6d0eac2c59..ff7550a51d 100644 --- a/source/module_hamilt_pw/hamilt_pwdft/parallel_grid.cpp +++ b/source/module_hamilt_pw/hamilt_pwdft/parallel_grid.cpp @@ -1,6 +1,6 @@ #include "parallel_grid.h" -#include "module_base/parallel_global.h" +#include "source_base/parallel_global.h" #include "module_parameter/parameter.h" Parallel_Grid::Parallel_Grid() { diff --git a/source/module_hamilt_pw/hamilt_pwdft/parallel_grid.h b/source/module_hamilt_pw/hamilt_pwdft/parallel_grid.h index 748a612cd0..6cee615a34 100644 --- a/source/module_hamilt_pw/hamilt_pwdft/parallel_grid.h +++ b/source/module_hamilt_pw/hamilt_pwdft/parallel_grid.h @@ -1,8 +1,8 @@ #ifndef PARALLEL_GRID_H #define PARALLEL_GRID_H -#include "module_base/global_function.h" -#include "module_base/global_variable.h" +#include "source_base/global_function.h" +#include "source_base/global_variable.h" class Parallel_Grid { diff --git a/source/module_hamilt_pw/hamilt_pwdft/radial_proj.cpp b/source/module_hamilt_pw/hamilt_pwdft/radial_proj.cpp index 88cfeeadee..11a1175e98 100644 --- a/source/module_hamilt_pw/hamilt_pwdft/radial_proj.cpp +++ b/source/module_hamilt_pw/hamilt_pwdft/radial_proj.cpp @@ -4,11 +4,11 @@ #include #include #include "module_hamilt_pw/hamilt_pwdft/radial_proj.h" -#include "module_base/constants.h" -#include "module_base/matrix.h" -#include "module_base/math_ylmreal.h" -#include "module_base/spherical_bessel_transformer.h" -#include "module_base/timer.h" +#include "source_base/constants.h" +#include "source_base/matrix.h" +#include "source_base/math_ylmreal.h" +#include "source_base/spherical_bessel_transformer.h" +#include "source_base/timer.h" void RadialProjection::RadialProjector::_build_backward_map(const std::vector>& it2iproj, const std::vector& iproj2l, @@ -98,7 +98,7 @@ void RadialProjection::RadialProjector::_build_sbt_tab(const int nr, std::vector _temp(nq); // the SphericalBesselTransformer's result is multiplied by one extra factor sqrt(2/pi), should remove it - // see module_base/spherical_bessel_transformer.h and module_base/spherical_bessel_transformer.cpp:328 + // see source_base/spherical_bessel_transformer.h and source_base/spherical_bessel_transformer.cpp:328 const double pref = std::sqrt(2.0/std::acos(-1.0)); for(int i = 0; i < nrad; i++) { diff --git a/source/module_hamilt_pw/hamilt_pwdft/radial_proj.h b/source/module_hamilt_pw/hamilt_pwdft/radial_proj.h index f1e35509e7..0807fcdff7 100644 --- a/source/module_hamilt_pw/hamilt_pwdft/radial_proj.h +++ b/source/module_hamilt_pw/hamilt_pwdft/radial_proj.h @@ -12,8 +12,8 @@ */ -#include "module_base/vector3.h" -#include "module_base/cubic_spline.h" +#include "source_base/vector3.h" +#include "source_base/cubic_spline.h" #include #include #include diff --git a/source/module_hamilt_pw/hamilt_pwdft/soc.h b/source/module_hamilt_pw/hamilt_pwdft/soc.h index f30bc94889..282b77f604 100644 --- a/source/module_hamilt_pw/hamilt_pwdft/soc.h +++ b/source/module_hamilt_pw/hamilt_pwdft/soc.h @@ -1,8 +1,8 @@ #ifndef SOC_H #define SOC_H -#include "module_base/global_function.h" -#include "module_base/global_variable.h" +#include "source_base/global_function.h" +#include "source_base/global_variable.h" class Fcoef { diff --git a/source/module_hamilt_pw/hamilt_pwdft/stress_func.h b/source/module_hamilt_pw/hamilt_pwdft/stress_func.h index 20f6a91937..5c9457947b 100644 --- a/source/module_hamilt_pw/hamilt_pwdft/stress_func.h +++ b/source/module_hamilt_pw/hamilt_pwdft/stress_func.h @@ -1,20 +1,20 @@ #ifndef STRESS_FUNC_H #define STRESS_FUNC_H -#include "module_base/complexmatrix.h" -#include "module_base/global_function.h" -#include "module_base/global_variable.h" -#include "module_base/matrix.h" -#include "module_base/parallel_reduce.h" -#include "module_base/realarray.h" -#include "module_base/vector3.h" +#include "source_base/complexmatrix.h" +#include "source_base/global_function.h" +#include "source_base/global_variable.h" +#include "source_base/matrix.h" +#include "source_base/parallel_reduce.h" +#include "source_base/realarray.h" +#include "source_base/vector3.h" #include "module_basis/module_pw/pw_basis_k.h" #include "module_cell/klist.h" #include "module_elecstate/module_charge/charge.h" #include "module_hamilt_pw/hamilt_pwdft/VNL_in_pw.h" #include "module_hamilt_pw/hamilt_pwdft/kernels/stress_op.h" #include "module_hamilt_pw/hamilt_pwdft/structure_factor.h" -#include "module_base/kernels/math_kernel_op.h" +#include "source_base/kernels/math_kernel_op.h" #include "module_psi/psi.h" //------------------------------------------------------------------- diff --git a/source/module_hamilt_pw/hamilt_pwdft/stress_func_cc.cpp b/source/module_hamilt_pw/hamilt_pwdft/stress_func_cc.cpp index 32d5c2339d..51e0eccb7c 100644 --- a/source/module_hamilt_pw/hamilt_pwdft/stress_func_cc.cpp +++ b/source/module_hamilt_pw/hamilt_pwdft/stress_func_cc.cpp @@ -1,8 +1,8 @@ #include "stress_func.h" #include "module_hamilt_general/module_xc/xc_functional.h" #include "module_parameter/parameter.h" -#include "module_base/math_integral.h" -#include "module_base/timer.h" +#include "source_base/math_integral.h" +#include "source_base/timer.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" #include "module_elecstate/cal_ux.h" diff --git a/source/module_hamilt_pw/hamilt_pwdft/stress_func_ewa.cpp b/source/module_hamilt_pw/hamilt_pwdft/stress_func_ewa.cpp index 8cd845e313..6f8c283a1c 100644 --- a/source/module_hamilt_pw/hamilt_pwdft/stress_func_ewa.cpp +++ b/source/module_hamilt_pw/hamilt_pwdft/stress_func_ewa.cpp @@ -1,8 +1,8 @@ #include "stress_func.h" #include "module_hamilt_general/module_ewald/H_Ewald_pw.h" -#include "module_base/timer.h" -#include "module_base/tool_threading.h" -#include "module_base/libm/libm.h" +#include "source_base/timer.h" +#include "source_base/tool_threading.h" +#include "source_base/libm/libm.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" #ifdef _OPENMP diff --git a/source/module_hamilt_pw/hamilt_pwdft/stress_func_gga.cpp b/source/module_hamilt_pw/hamilt_pwdft/stress_func_gga.cpp index 8fd5dcd7e4..72d9d0c78b 100644 --- a/source/module_hamilt_pw/hamilt_pwdft/stress_func_gga.cpp +++ b/source/module_hamilt_pw/hamilt_pwdft/stress_func_gga.cpp @@ -1,6 +1,6 @@ #include "stress_func.h" #include "module_hamilt_general/module_xc/xc_functional.h" -#include "module_base/timer.h" +#include "source_base/timer.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" //calculate the GGA stress correction in PW and LCAO diff --git a/source/module_hamilt_pw/hamilt_pwdft/stress_func_har.cpp b/source/module_hamilt_pw/hamilt_pwdft/stress_func_har.cpp index 44b5ea3b40..1b73277f1a 100644 --- a/source/module_hamilt_pw/hamilt_pwdft/stress_func_har.cpp +++ b/source/module_hamilt_pw/hamilt_pwdft/stress_func_har.cpp @@ -1,7 +1,7 @@ #include "stress_func.h" #include "module_elecstate/module_pot/H_Hartree_pw.h" #include "module_parameter/parameter.h" -#include "module_base/timer.h" +#include "source_base/timer.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" //calculate the Hartree part in PW or LCAO base diff --git a/source/module_hamilt_pw/hamilt_pwdft/stress_func_kin.cpp b/source/module_hamilt_pw/hamilt_pwdft/stress_func_kin.cpp index 0de21d6178..2e6376f434 100644 --- a/source/module_hamilt_pw/hamilt_pwdft/stress_func_kin.cpp +++ b/source/module_hamilt_pw/hamilt_pwdft/stress_func_kin.cpp @@ -1,7 +1,7 @@ #include "stress_func.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" #include "module_parameter/parameter.h" -#include "module_base/timer.h" +#include "source_base/timer.h" #include "module_hamilt_pw/hamilt_pwdft/fs_kin_tools.h" //calculate the kinetic stress in PW base diff --git a/source/module_hamilt_pw/hamilt_pwdft/stress_func_loc.cpp b/source/module_hamilt_pw/hamilt_pwdft/stress_func_loc.cpp index a24fe639d1..01f54c2ba1 100644 --- a/source/module_hamilt_pw/hamilt_pwdft/stress_func_loc.cpp +++ b/source/module_hamilt_pw/hamilt_pwdft/stress_func_loc.cpp @@ -1,9 +1,9 @@ #include "stress_func.h" -#include "module_base/math_integral.h" +#include "source_base/math_integral.h" #include "module_parameter/parameter.h" -#include "module_base/tool_threading.h" -#include "module_base/timer.h" -#include "module_base/libm/libm.h" +#include "source_base/tool_threading.h" +#include "source_base/timer.h" +#include "source_base/libm/libm.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" //calculate local pseudopotential stress in PW or VL_dVL stress in LCAO diff --git a/source/module_hamilt_pw/hamilt_pwdft/stress_func_mgga.cpp b/source/module_hamilt_pw/hamilt_pwdft/stress_func_mgga.cpp index c528b0f417..b26829007d 100644 --- a/source/module_hamilt_pw/hamilt_pwdft/stress_func_mgga.cpp +++ b/source/module_hamilt_pw/hamilt_pwdft/stress_func_mgga.cpp @@ -1,4 +1,4 @@ -#include "module_base/timer.h" +#include "source_base/timer.h" #include "module_hamilt_general/module_xc/xc_functional.h" #include "module_parameter/parameter.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" diff --git a/source/module_hamilt_pw/hamilt_pwdft/stress_func_nl.cpp b/source/module_hamilt_pw/hamilt_pwdft/stress_func_nl.cpp index 41554e37ba..b8b9f8b381 100644 --- a/source/module_hamilt_pw/hamilt_pwdft/stress_func_nl.cpp +++ b/source/module_hamilt_pw/hamilt_pwdft/stress_func_nl.cpp @@ -1,9 +1,9 @@ -#include "module_base/math_polyint.h" +#include "source_base/math_polyint.h" #include "module_parameter/parameter.h" -#include "module_base/math_ylmreal.h" -#include "module_base/memory.h" -#include "module_base/module_device/device.h" -#include "module_base/timer.h" +#include "source_base/math_ylmreal.h" +#include "source_base/memory.h" +#include "source_base/module_device/device.h" +#include "source_base/timer.h" #include "module_hamilt_pw/hamilt_pwdft/fs_nonlocal_tools.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" #include "module_hamilt_pw/hamilt_pwdft/nonlocal_maths.hpp" diff --git a/source/module_hamilt_pw/hamilt_pwdft/stress_func_onsite.cpp b/source/module_hamilt_pw/hamilt_pwdft/stress_func_onsite.cpp index b649d219b8..567939a4d0 100644 --- a/source/module_hamilt_pw/hamilt_pwdft/stress_func_onsite.cpp +++ b/source/module_hamilt_pw/hamilt_pwdft/stress_func_onsite.cpp @@ -1,5 +1,5 @@ -#include "module_base/module_device/device.h" -#include "module_base/timer.h" +#include "source_base/module_device/device.h" +#include "source_base/timer.h" #include "module_hamilt_pw/hamilt_pwdft/onsite_projector.h" #include "module_parameter/parameter.h" #include "module_hamilt_lcao/module_dftu/dftu.h" diff --git a/source/module_hamilt_pw/hamilt_pwdft/stress_func_us.cpp b/source/module_hamilt_pw/hamilt_pwdft/stress_func_us.cpp index 3273584050..9c31fb6119 100644 --- a/source/module_hamilt_pw/hamilt_pwdft/stress_func_us.cpp +++ b/source/module_hamilt_pw/hamilt_pwdft/stress_func_us.cpp @@ -1,8 +1,8 @@ -#include "module_base/libm/libm.h" +#include "source_base/libm/libm.h" #include "module_parameter/parameter.h" -#include "module_base/math_polyint.h" -#include "module_base/math_ylmreal.h" -#include "module_base/timer.h" +#include "source_base/math_polyint.h" +#include "source_base/math_ylmreal.h" +#include "source_base/timer.h" #include "module_elecstate/elecstate_pw.h" #include "module_hamilt_pw/hamilt_pwdft/nonlocal_maths.hpp" #include "stress_pw.h" diff --git a/source/module_hamilt_pw/hamilt_pwdft/stress_pw.cpp b/source/module_hamilt_pw/hamilt_pwdft/stress_pw.cpp index 98cb66b2dc..6e0c94fb2c 100644 --- a/source/module_hamilt_pw/hamilt_pwdft/stress_pw.cpp +++ b/source/module_hamilt_pw/hamilt_pwdft/stress_pw.cpp @@ -1,6 +1,6 @@ #include "stress_pw.h" -#include "module_base/timer.h" +#include "source_base/timer.h" #include "module_hamilt_general/module_vdw/vdw.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" #include "module_io/output_log.h" diff --git a/source/module_hamilt_pw/hamilt_pwdft/structure_factor.cpp b/source/module_hamilt_pw/hamilt_pwdft/structure_factor.cpp index c751b91cab..8ade7343a8 100644 --- a/source/module_hamilt_pw/hamilt_pwdft/structure_factor.cpp +++ b/source/module_hamilt_pw/hamilt_pwdft/structure_factor.cpp @@ -1,13 +1,13 @@ -#include "module_base/global_function.h" -#include "module_base/global_variable.h" +#include "source_base/global_function.h" +#include "source_base/global_variable.h" #include "module_parameter/parameter.h" #include "structure_factor.h" -#include "module_base/constants.h" +#include "source_base/constants.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" -#include "module_base/math_bspline.h" -#include "module_base/memory.h" -#include "module_base/timer.h" -#include "module_base/libm/libm.h" +#include "source_base/math_bspline.h" +#include "source_base/memory.h" +#include "source_base/timer.h" +#include "source_base/libm/libm.h" #ifdef _OPENMP diff --git a/source/module_hamilt_pw/hamilt_pwdft/structure_factor.h b/source/module_hamilt_pw/hamilt_pwdft/structure_factor.h index 2f3e1931c8..8cb03913e8 100644 --- a/source/module_hamilt_pw/hamilt_pwdft/structure_factor.h +++ b/source/module_hamilt_pw/hamilt_pwdft/structure_factor.h @@ -1,7 +1,7 @@ #ifndef PLANEWAVE_H #define PLANEWAVE_H -#include "module_base/complexmatrix.h" +#include "source_base/complexmatrix.h" #include "module_basis/module_pw/pw_basis_k.h" #include "module_cell/unitcell.h" #include "module_hamilt_pw/hamilt_pwdft/parallel_grid.h" diff --git a/source/module_hamilt_pw/hamilt_pwdft/structure_factor_k.cpp b/source/module_hamilt_pw/hamilt_pwdft/structure_factor_k.cpp index bca92ac1cf..17f0977e44 100644 --- a/source/module_hamilt_pw/hamilt_pwdft/structure_factor_k.cpp +++ b/source/module_hamilt_pw/hamilt_pwdft/structure_factor_k.cpp @@ -1,8 +1,8 @@ -#include "module_base/memory.h" -#include "module_base/timer.h" +#include "source_base/memory.h" +#include "source_base/timer.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" #include "module_hamilt_pw/hamilt_pwdft/kernels/wf_op.h" -#include "module_base/module_device/device.h" +#include "source_base/module_device/device.h" #include "structure_factor.h" std::complex* Structure_Factor::get_sk(const int ik, const int it, diff --git a/source/module_hamilt_pw/hamilt_pwdft/test/CMakeLists.txt b/source/module_hamilt_pw/hamilt_pwdft/test/CMakeLists.txt index 96f47a53f3..a9e185b3ef 100644 --- a/source/module_hamilt_pw/hamilt_pwdft/test/CMakeLists.txt +++ b/source/module_hamilt_pw/hamilt_pwdft/test/CMakeLists.txt @@ -7,19 +7,19 @@ AddTest( TARGET pwdft_soc LIBS parameter ${math_libs} SOURCES soc_test.cpp ../soc.cpp - ../../../module_base/global_variable.cpp - ../../../module_base/global_function.cpp - ../../../module_base/global_file.cpp - ../../../module_base/tool_quit.cpp - ../../../module_base/global_variable.cpp - ../../../module_base/global_file.cpp - ../../../module_base/memory.cpp - ../../../module_base/timer.cpp - ../../../module_base/blas_connector_base.cpp ../../../module_base/blas_connector_vector.cpp ../../../module_base/blas_connector_matrix.cpp - ../../../module_base/parallel_global.cpp - ../../../module_base/parallel_comm.cpp - ../../../module_base/parallel_common.cpp - ../../../module_base/parallel_reduce.cpp + ../../../source_base/global_variable.cpp + ../../../source_base/global_function.cpp + ../../../source_base/global_file.cpp + ../../../source_base/tool_quit.cpp + ../../../source_base/global_variable.cpp + ../../../source_base/global_file.cpp + ../../../source_base/memory.cpp + ../../../source_base/timer.cpp + ../../../source_base/blas_connector_base.cpp ../../../source_base/blas_connector_vector.cpp ../../../source_base/blas_connector_matrix.cpp + ../../../source_base/parallel_global.cpp + ../../../source_base/parallel_comm.cpp + ../../../source_base/parallel_common.cpp + ../../../source_base/parallel_reduce.cpp ) AddTest( diff --git a/source/module_hamilt_pw/hamilt_stodft/hamilt_sdft_pw.cpp b/source/module_hamilt_pw/hamilt_stodft/hamilt_sdft_pw.cpp index 4bf6033477..fac4e7f867 100644 --- a/source/module_hamilt_pw/hamilt_stodft/hamilt_sdft_pw.cpp +++ b/source/module_hamilt_pw/hamilt_stodft/hamilt_sdft_pw.cpp @@ -1,5 +1,5 @@ #include "hamilt_sdft_pw.h" -#include "module_base/timer.h" +#include "source_base/timer.h" #include "kernels/hpsi_norm_op.h" namespace hamilt diff --git a/source/module_hamilt_pw/hamilt_stodft/kernels/hpsi_norm_op.cpp b/source/module_hamilt_pw/hamilt_stodft/kernels/hpsi_norm_op.cpp index b75da7900c..a2227cf767 100644 --- a/source/module_hamilt_pw/hamilt_stodft/kernels/hpsi_norm_op.cpp +++ b/source/module_hamilt_pw/hamilt_stodft/kernels/hpsi_norm_op.cpp @@ -1,6 +1,6 @@ #include "hpsi_norm_op.h" -#include "module_base/module_device/device.h" +#include "source_base/module_device/device.h" namespace hamilt { template diff --git a/source/module_hamilt_pw/hamilt_stodft/kernels/hpsi_norm_op.h b/source/module_hamilt_pw/hamilt_stodft/kernels/hpsi_norm_op.h index b422916ae8..1d6bff3eb6 100644 --- a/source/module_hamilt_pw/hamilt_stodft/kernels/hpsi_norm_op.h +++ b/source/module_hamilt_pw/hamilt_stodft/kernels/hpsi_norm_op.h @@ -1,7 +1,7 @@ #ifndef HPSI_NORM_OP_H #define HPSI_NORM_OP_H #include -#include "module_base/module_device/device.h" +#include "source_base/module_device/device.h" namespace hamilt { template diff --git a/source/module_hamilt_pw/hamilt_stodft/sto_che.cpp b/source/module_hamilt_pw/hamilt_stodft/sto_che.cpp index 9facef1ddf..06a591c2ca 100644 --- a/source/module_hamilt_pw/hamilt_stodft/sto_che.cpp +++ b/source/module_hamilt_pw/hamilt_stodft/sto_che.cpp @@ -1,8 +1,8 @@ #include "sto_che.h" -#include "module_base/blas_connector.h" -#include "module_base/module_device/device.h" -#include "module_base/kernels/math_kernel_op.h" -#include "module_base/module_container/ATen/kernels/blas.h" +#include "source_base/blas_connector.h" +#include "source_base/module_device/device.h" +#include "source_base/kernels/math_kernel_op.h" +#include "source_base/module_container/ATen/kernels/blas.h" template StoChe::~StoChe() diff --git a/source/module_hamilt_pw/hamilt_stodft/sto_che.h b/source/module_hamilt_pw/hamilt_stodft/sto_che.h index e57dfb5e78..aef324a9fd 100644 --- a/source/module_hamilt_pw/hamilt_stodft/sto_che.h +++ b/source/module_hamilt_pw/hamilt_stodft/sto_che.h @@ -1,8 +1,8 @@ #ifndef STO_CHE_H #define STO_CHE_H -#include "module_base/math_chebyshev.h" -#include "module_base/kernels/math_kernel_op.h" -#include "module_base/module_container/ATen/kernels/blas.h" +#include "source_base/math_chebyshev.h" +#include "source_base/kernels/math_kernel_op.h" +#include "source_base/module_container/ATen/kernels/blas.h" template class StoChe diff --git a/source/module_hamilt_pw/hamilt_stodft/sto_dos.cpp b/source/module_hamilt_pw/hamilt_stodft/sto_dos.cpp index 55aee269fc..561cea20ec 100644 --- a/source/module_hamilt_pw/hamilt_stodft/sto_dos.cpp +++ b/source/module_hamilt_pw/hamilt_stodft/sto_dos.cpp @@ -1,7 +1,7 @@ #include "sto_dos.h" -#include "module_base/timer.h" -#include "module_base/tool_title.h" +#include "source_base/timer.h" +#include "source_base/tool_title.h" #include "module_parameter/parameter.h" #include "sto_tool.h" template diff --git a/source/module_hamilt_pw/hamilt_stodft/sto_elecond.cpp b/source/module_hamilt_pw/hamilt_stodft/sto_elecond.cpp index 77c6b97685..2a4e0dff4e 100644 --- a/source/module_hamilt_pw/hamilt_stodft/sto_elecond.cpp +++ b/source/module_hamilt_pw/hamilt_stodft/sto_elecond.cpp @@ -1,12 +1,12 @@ #include "sto_elecond.h" -#include "module_base/complexmatrix.h" -#include "module_base/constants.h" -#include "module_base/memory.h" -#include "module_base/module_container/ATen/tensor.h" -#include "module_base/parallel_device.h" -#include "module_base/timer.h" -#include "module_base/vector3.h" +#include "source_base/complexmatrix.h" +#include "source_base/constants.h" +#include "source_base/memory.h" +#include "source_base/module_container/ATen/tensor.h" +#include "source_base/parallel_device.h" +#include "source_base/timer.h" +#include "source_base/vector3.h" #include "module_parameter/parameter.h" #include "sto_tool.h" diff --git a/source/module_hamilt_pw/hamilt_stodft/sto_forces.cpp b/source/module_hamilt_pw/hamilt_stodft/sto_forces.cpp index cf127b029d..e3eabe5c8d 100644 --- a/source/module_hamilt_pw/hamilt_stodft/sto_forces.cpp +++ b/source/module_hamilt_pw/hamilt_stodft/sto_forces.cpp @@ -1,6 +1,6 @@ #include "sto_forces.h" -#include "module_base/mathzone.h" +#include "source_base/mathzone.h" #include "module_cell/module_symmetry/symmetry.h" #include "module_elecstate/elecstate.h" #include "module_elecstate/module_pot/efield.h" @@ -11,9 +11,9 @@ #include "module_hamilt_pw/hamilt_pwdft/fs_nonlocal_tools.h" // new -#include "module_base/math_integral.h" -#include "module_base/parallel_reduce.h" -#include "module_base/timer.h" +#include "source_base/math_integral.h" +#include "source_base/parallel_reduce.h" +#include "source_base/timer.h" #include "module_hamilt_general/module_xc/xc_functional.h" template diff --git a/source/module_hamilt_pw/hamilt_stodft/sto_iter.cpp b/source/module_hamilt_pw/hamilt_stodft/sto_iter.cpp index 47519d787f..dc77a83a45 100644 --- a/source/module_hamilt_pw/hamilt_stodft/sto_iter.cpp +++ b/source/module_hamilt_pw/hamilt_stodft/sto_iter.cpp @@ -1,11 +1,11 @@ #include "sto_iter.h" -#include "module_base/kernels/math_kernel_op.h" -#include "module_base/para_gemm.h" -#include "module_base/parallel_reduce.h" -#include "module_base/timer.h" -#include "module_base/tool_quit.h" -#include "module_base/tool_title.h" +#include "source_base/kernels/math_kernel_op.h" +#include "source_base/para_gemm.h" +#include "source_base/parallel_reduce.h" +#include "source_base/timer.h" +#include "source_base/tool_quit.h" +#include "source_base/tool_title.h" #include "module_elecstate/kernels/elecstate_op.h" #include "module_elecstate/occupy.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" diff --git a/source/module_hamilt_pw/hamilt_stodft/sto_iter.h b/source/module_hamilt_pw/hamilt_stodft/sto_iter.h index 9953cfcd3b..4f2f389073 100644 --- a/source/module_hamilt_pw/hamilt_stodft/sto_iter.h +++ b/source/module_hamilt_pw/hamilt_stodft/sto_iter.h @@ -1,6 +1,6 @@ #ifndef STO_ITER_H #define STO_ITER_H -#include "module_base/math_chebyshev.h" +#include "source_base/math_chebyshev.h" #include "module_elecstate/elecstate_pw.h" #include "module_hamilt_general/hamilt.h" #include "module_hamilt_pw/hamilt_stodft/hamilt_sdft_pw.h" diff --git a/source/module_hamilt_pw/hamilt_stodft/sto_stress_pw.cpp b/source/module_hamilt_pw/hamilt_stodft/sto_stress_pw.cpp index 033a94159d..414284f215 100644 --- a/source/module_hamilt_pw/hamilt_stodft/sto_stress_pw.cpp +++ b/source/module_hamilt_pw/hamilt_stodft/sto_stress_pw.cpp @@ -1,6 +1,6 @@ #include "sto_stress_pw.h" -#include "module_base/timer.h" +#include "source_base/timer.h" #include "module_hamilt_pw/hamilt_pwdft/fs_kin_tools.h" #include "module_hamilt_pw/hamilt_pwdft/fs_nonlocal_tools.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" diff --git a/source/module_hamilt_pw/hamilt_stodft/sto_tool.cpp b/source/module_hamilt_pw/hamilt_stodft/sto_tool.cpp index 2f99ef0e81..f3d9461462 100644 --- a/source/module_hamilt_pw/hamilt_stodft/sto_tool.cpp +++ b/source/module_hamilt_pw/hamilt_stodft/sto_tool.cpp @@ -1,8 +1,8 @@ #include "sto_tool.h" -#include "module_base/math_chebyshev.h" -#include "module_base/parallel_device.h" -#include "module_base/timer.h" +#include "source_base/math_chebyshev.h" +#include "source_base/parallel_device.h" +#include "source_base/timer.h" #include "module_parameter/parameter.h" #ifdef __MPI #include "mpi.h" diff --git a/source/module_hamilt_pw/hamilt_stodft/sto_tool.h b/source/module_hamilt_pw/hamilt_stodft/sto_tool.h index 0e9fe1d41d..a6ee245420 100644 --- a/source/module_hamilt_pw/hamilt_stodft/sto_tool.h +++ b/source/module_hamilt_pw/hamilt_stodft/sto_tool.h @@ -3,7 +3,7 @@ #include "module_cell/klist.h" #include "module_hamilt_pw/hamilt_stodft/hamilt_sdft_pw.h" #include "module_hamilt_pw/hamilt_stodft/sto_wf.h" -#include "module_base/module_device/memory_op.h" +#include "source_base/module_device/memory_op.h" #include "module_psi/psi.h" /** diff --git a/source/module_hamilt_pw/hamilt_stodft/sto_wf.cpp b/source/module_hamilt_pw/hamilt_stodft/sto_wf.cpp index b00564f1ef..22ab947752 100644 --- a/source/module_hamilt_pw/hamilt_stodft/sto_wf.cpp +++ b/source/module_hamilt_pw/hamilt_stodft/sto_wf.cpp @@ -1,13 +1,13 @@ #include "sto_wf.h" -#include "module_base/memory.h" +#include "source_base/memory.h" #include "module_parameter/parameter.h" #include #include //---------Temporary------------------------------------ -#include "module_base/global_function.h" +#include "source_base/global_function.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" //------------------------------------------------------ diff --git a/source/module_io/berryphase.cpp b/source/module_io/berryphase.cpp index 9efda5a09e..aef84a3247 100644 --- a/source/module_io/berryphase.cpp +++ b/source/module_io/berryphase.cpp @@ -215,7 +215,7 @@ void berryphase::set_kpoints(const K_Vectors& kv, const int direction) } } -#include "../module_base/complexmatrix.h" +#include "../source_base/complexmatrix.h" double berryphase::stringPhase(const UnitCell& ucell, int index_str, int nbands, diff --git a/source/module_io/bessel_basis.cpp b/source/module_io/bessel_basis.cpp index 07a3619302..57fa1b1c82 100644 --- a/source/module_io/bessel_basis.cpp +++ b/source/module_io/bessel_basis.cpp @@ -1,10 +1,10 @@ #include "bessel_basis.h" #include "module_parameter/parameter.h" -#include "module_base/math_integral.h" -#include "module_base/math_sphbes.h" -#include "module_base/parallel_common.h" -#include "module_base/timer.h" +#include "source_base/math_integral.h" +#include "source_base/math_sphbes.h" +#include "source_base/parallel_common.h" +#include "source_base/timer.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" #include diff --git a/source/module_io/bessel_basis.h b/source/module_io/bessel_basis.h index cf4c609b6e..fe0dc2c14b 100644 --- a/source/module_io/bessel_basis.h +++ b/source/module_io/bessel_basis.h @@ -5,9 +5,9 @@ //========================================================== #ifndef BESSEL_BASIS_H #define BESSEL_BASIS_H -#include "../module_base/global_function.h" -#include "../module_base/global_variable.h" -#include "../module_base/realarray.h" +#include "../source_base/global_function.h" +#include "../source_base/global_variable.h" +#include "../source_base/realarray.h" #include "../module_cell/unitcell.h" diff --git a/source/module_io/cal_dos.cpp b/source/module_io/cal_dos.cpp index e9cf1b64cc..8b252d13f6 100644 --- a/source/module_io/cal_dos.cpp +++ b/source/module_io/cal_dos.cpp @@ -1,9 +1,9 @@ #include "cal_dos.h" -#include "module_base/constants.h" -#include "module_base/global_function.h" -#include "module_base/global_variable.h" -#include "module_base/parallel_reduce.h" +#include "source_base/constants.h" +#include "source_base/global_function.h" +#include "source_base/global_variable.h" +#include "source_base/parallel_reduce.h" #include "module_parameter/parameter.h" void ModuleIO::prepare_dos(std::ofstream& ofs_running, diff --git a/source/module_io/cal_dos.h b/source/module_io/cal_dos.h index 2f6c94f4de..83327acf93 100644 --- a/source/module_io/cal_dos.h +++ b/source/module_io/cal_dos.h @@ -2,7 +2,7 @@ #define DOS_H #include -#include "module_base/matrix.h" +#include "source_base/matrix.h" #include "module_elecstate/fp_energy.h" namespace ModuleIO diff --git a/source/module_io/cal_mlkedf_descriptors.h b/source/module_io/cal_mlkedf_descriptors.h index 97bec5e310..b65892b33d 100644 --- a/source/module_io/cal_mlkedf_descriptors.h +++ b/source/module_io/cal_mlkedf_descriptors.h @@ -2,7 +2,7 @@ #define CAL_MLKEDF_DESCRIPTORS_H #include -#include "module_base/global_function.h" +#include "source_base/global_function.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" #include "module_parameter/parameter.h" diff --git a/source/module_io/cal_pLpR.cpp b/source/module_io/cal_pLpR.cpp index 095e6f48a7..b0033bee15 100644 --- a/source/module_io/cal_pLpR.cpp +++ b/source/module_io/cal_pLpR.cpp @@ -6,14 +6,14 @@ #include #include #include "module_cell/unitcell.h" -#include "module_base/spherical_bessel_transformer.h" +#include "source_base/spherical_bessel_transformer.h" #include "module_basis/module_nao/two_center_integrator.h" #include "module_cell/module_neighbor/sltk_grid_driver.h" #include "module_cell/module_neighbor/sltk_atom_arrange.h" #include "module_parameter/parameter.h" #include "module_io/cal_pLpR.h" -#include "module_base/formatter.h" -#include "module_base/parallel_common.h" +#include "source_base/formatter.h" +#include "source_base/parallel_common.h" /** * * FIXME: the following part will be transfered to TwoCenterIntegrator soon diff --git a/source/module_io/cal_pdos_gamma.cpp b/source/module_io/cal_pdos_gamma.cpp index 2a12c7f42a..0ef2defdc0 100644 --- a/source/module_io/cal_pdos_gamma.cpp +++ b/source/module_io/cal_pdos_gamma.cpp @@ -1,11 +1,11 @@ #include "cal_pdos_gamma.h" -#include "module_base/parallel_reduce.h" -#include "module_base/blas_connector.h" -#include "module_base/scalapack_connector.h" +#include "source_base/parallel_reduce.h" +#include "source_base/blas_connector.h" +#include "source_base/scalapack_connector.h" #include "write_orb_info.h" -#include "module_base/global_function.h" -#include "module_base/global_variable.h" +#include "source_base/global_function.h" +#include "source_base/global_variable.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" #include "module_hamilt_lcao/hamilt_lcaodft/hamilt_lcao.h" diff --git a/source/module_io/cal_pdos_gamma.h b/source/module_io/cal_pdos_gamma.h index 039f131614..46f19c2c71 100644 --- a/source/module_io/cal_pdos_gamma.h +++ b/source/module_io/cal_pdos_gamma.h @@ -1,7 +1,7 @@ #ifndef CAL_PDOS_GAMMA_H #define CAL_PDOS_GAMMA_H -#include "module_base/matrix.h" +#include "source_base/matrix.h" #include "module_cell/klist.h" // use K_Vectors #include "module_psi/psi.h" // use psi::Psi #include "module_hamilt_general/hamilt.h" // use hamilt::Hamilt diff --git a/source/module_io/cal_pdos_multik.cpp b/source/module_io/cal_pdos_multik.cpp index 81bcae899a..d37d187dab 100644 --- a/source/module_io/cal_pdos_multik.cpp +++ b/source/module_io/cal_pdos_multik.cpp @@ -1,11 +1,11 @@ #include "cal_pdos_multik.h" -#include "module_base/parallel_reduce.h" -#include "module_base/blas_connector.h" -#include "module_base/scalapack_connector.h" +#include "source_base/parallel_reduce.h" +#include "source_base/blas_connector.h" +#include "source_base/scalapack_connector.h" #include "write_orb_info.h" -#include "module_base/global_function.h" -#include "module_base/global_variable.h" +#include "source_base/global_function.h" +#include "source_base/global_variable.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" #include "module_hamilt_lcao/hamilt_lcaodft/hamilt_lcao.h" diff --git a/source/module_io/cal_pdos_multik.h b/source/module_io/cal_pdos_multik.h index d650efbb59..045569f9d3 100644 --- a/source/module_io/cal_pdos_multik.h +++ b/source/module_io/cal_pdos_multik.h @@ -1,7 +1,7 @@ #ifndef CAL_PDOS_MULTIK_H #define CAL_PDOS_MULTIK_H -#include "module_base/matrix.h" +#include "source_base/matrix.h" #include "module_cell/klist.h" // use K_Vectors #include "module_psi/psi.h" // use psi::Psi #include "module_hamilt_general/hamilt.h" // use hamilt::Hamilt diff --git a/source/module_io/cal_r_overlap_R.cpp b/source/module_io/cal_r_overlap_R.cpp index d2eea5e5a2..a1f4e65530 100644 --- a/source/module_io/cal_r_overlap_R.cpp +++ b/source/module_io/cal_r_overlap_R.cpp @@ -1,8 +1,8 @@ #include "cal_r_overlap_R.h" #include "module_parameter/parameter.h" -#include "module_base/parallel_reduce.h" -#include "module_base/timer.h" +#include "source_base/parallel_reduce.h" +#include "source_base/timer.h" #include "module_cell/module_neighbor/sltk_grid_driver.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" diff --git a/source/module_io/cal_r_overlap_R.h b/source/module_io/cal_r_overlap_R.h index a40ec30ed2..fb7944efeb 100644 --- a/source/module_io/cal_r_overlap_R.h +++ b/source/module_io/cal_r_overlap_R.h @@ -1,10 +1,10 @@ #ifndef CAL_R_OVERLAP_R_H #define CAL_R_OVERLAP_R_H -#include "module_base/abfs-vector3_order.h" -#include "module_base/sph_bessel_recursive.h" -#include "module_base/vector3.h" -#include "module_base/ylm.h" +#include "source_base/abfs-vector3_order.h" +#include "source_base/sph_bessel_recursive.h" +#include "source_base/vector3.h" +#include "source_base/ylm.h" #include "module_basis/module_ao/ORB_atomic_lm.h" #include "module_basis/module_ao/ORB_gaunt_table.h" #include "module_basis/module_ao/ORB_read.h" diff --git a/source/module_io/cal_test.cpp b/source/module_io/cal_test.cpp index b41c38a2ba..f43f8731e8 100644 --- a/source/module_io/cal_test.cpp +++ b/source/module_io/cal_test.cpp @@ -1,10 +1,10 @@ #include "module_hamilt_pw/hamilt_pwdft/global.h" -#include "module_base/global_function.h" +#include "source_base/global_function.h" #define private public #include "module_parameter/parameter.h" #undef private -#include "module_base/global_variable.h" -#include "module_base/memory.h" +#include "source_base/global_variable.h" +#include "source_base/memory.h" #include "cal_test.h" double Cal_Test::mporter=0.0; diff --git a/source/module_io/cif_io.cpp b/source/module_io/cif_io.cpp index 3f3e67a34a..8b69a04ac3 100644 --- a/source/module_io/cif_io.cpp +++ b/source/module_io/cif_io.cpp @@ -2,13 +2,13 @@ #include #include #include -#include "module_base/formatter.h" +#include "source_base/formatter.h" #include "module_io/cif_io.h" #include #include -#include "module_base/tool_quit.h" +#include "source_base/tool_quit.h" #ifdef __MPI -#include "module_base/parallel_common.h" +#include "source_base/parallel_common.h" #endif double deg2rad(double deg) { return deg * M_PI / 180.0; } diff --git a/source/module_io/csr_reader.cpp b/source/module_io/csr_reader.cpp index 9c5ce359c1..160cb78a61 100644 --- a/source/module_io/csr_reader.cpp +++ b/source/module_io/csr_reader.cpp @@ -1,6 +1,6 @@ #include "csr_reader.h" -#include "module_base/tool_quit.h" +#include "source_base/tool_quit.h" namespace ModuleIO { diff --git a/source/module_io/fR_overlap.cpp b/source/module_io/fR_overlap.cpp index 8f54ba8d97..f4049d9090 100644 --- a/source/module_io/fR_overlap.cpp +++ b/source/module_io/fR_overlap.cpp @@ -1,10 +1,10 @@ #ifdef __LCAO #include "fR_overlap.h" #include "module_basis/module_ao/ORB_read.h" -#include "module_base/timer.h" -#include "module_base/tool_title.h" -#include "module_base/math_integral.h" -#include "module_base/blas_connector.h" +#include "source_base/timer.h" +#include "source_base/tool_title.h" +#include "source_base/math_integral.h" +#include "source_base/blas_connector.h" template FR_overlap::FR_overlap() diff --git a/source/module_io/fR_overlap.h b/source/module_io/fR_overlap.h index c89d2a4bb0..bcd82789e4 100644 --- a/source/module_io/fR_overlap.h +++ b/source/module_io/fR_overlap.h @@ -7,7 +7,7 @@ #include "module_cell/module_neighbor/sltk_grid_driver.h" #include "module_cell/unitcell.h" #include "module_hamilt_lcao/module_hcontainer/hcontainer.h" -#include "module_base/math_lebedev_laikov.h" +#include "source_base/math_lebedev_laikov.h" template diff --git a/source/module_io/file_reader.cpp b/source/module_io/file_reader.cpp index fd7a1e18b5..5f24150518 100644 --- a/source/module_io/file_reader.cpp +++ b/source/module_io/file_reader.cpp @@ -1,6 +1,6 @@ #include "file_reader.h" -#include "module_base/tool_quit.h" +#include "source_base/tool_quit.h" namespace ModuleIO { diff --git a/source/module_io/filename.cpp b/source/module_io/filename.cpp index 8c3d86fa9d..39c5da6315 100644 --- a/source/module_io/filename.cpp +++ b/source/module_io/filename.cpp @@ -1,6 +1,6 @@ #include #include "filename.h" -#include "module_base/tool_quit.h" +#include "source_base/tool_quit.h" namespace ModuleIO { diff --git a/source/module_io/get_pchg_lcao.cpp b/source/module_io/get_pchg_lcao.cpp index 6768ef7300..721f9ea199 100644 --- a/source/module_io/get_pchg_lcao.cpp +++ b/source/module_io/get_pchg_lcao.cpp @@ -1,10 +1,10 @@ #include "get_pchg_lcao.h" -#include "module_base/blas_connector.h" -#include "module_base/global_function.h" -#include "module_base/global_variable.h" -#include "module_base/parallel_common.h" -#include "module_base/scalapack_connector.h" +#include "source_base/blas_connector.h" +#include "source_base/global_function.h" +#include "source_base/global_variable.h" +#include "source_base/parallel_common.h" +#include "source_base/scalapack_connector.h" #include "module_elecstate/module_charge/symmetry_rho.h" #include "module_elecstate/module_dm/cal_dm_psi.h" #include "module_elecstate/module_dm/density_matrix.h" diff --git a/source/module_io/get_pchg_lcao.h b/source/module_io/get_pchg_lcao.h index 99b4a38d7a..3ff6ad5a62 100644 --- a/source/module_io/get_pchg_lcao.h +++ b/source/module_io/get_pchg_lcao.h @@ -9,8 +9,8 @@ #include "module_hamilt_pw/hamilt_pwdft/parallel_grid.h" #include "module_psi/psi.h" -#include -#include +#include +#include #include #include diff --git a/source/module_io/get_pchg_pw.h b/source/module_io/get_pchg_pw.h index d0bb6caa9e..1e550962dc 100644 --- a/source/module_io/get_pchg_pw.h +++ b/source/module_io/get_pchg_pw.h @@ -2,8 +2,8 @@ #define GET_PCHG_PW_H #include "cube_io.h" -#include "module_base/module_device/device.h" -#include "module_base/tool_quit.h" +#include "source_base/module_device/device.h" +#include "source_base/tool_quit.h" #include "module_basis/module_pw/pw_basis.h" #include "module_basis/module_pw/pw_basis_k.h" #include "module_cell/unitcell.h" diff --git a/source/module_io/get_wf_lcao.cpp b/source/module_io/get_wf_lcao.cpp index 5403d7c019..52a02bbd60 100644 --- a/source/module_io/get_wf_lcao.cpp +++ b/source/module_io/get_wf_lcao.cpp @@ -1,9 +1,9 @@ #include "get_wf_lcao.h" -#include "module_base/global_function.h" -#include "module_base/global_variable.h" -#include "module_base/memory.h" -#include "module_base/timer.h" +#include "source_base/global_function.h" +#include "source_base/global_variable.h" +#include "source_base/memory.h" +#include "source_base/timer.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" #include "module_io/cube_io.h" #include "module_io/write_wfc_pw.h" diff --git a/source/module_io/get_wf_pw.h b/source/module_io/get_wf_pw.h index edeb78fccf..c463b9874a 100644 --- a/source/module_io/get_wf_pw.h +++ b/source/module_io/get_wf_pw.h @@ -2,8 +2,8 @@ #define GET_WF_PW_H #include "cube_io.h" -#include "module_base/module_device/device.h" -#include "module_base/tool_quit.h" +#include "source_base/module_device/device.h" +#include "source_base/tool_quit.h" #include "module_basis/module_pw/pw_basis.h" #include "module_basis/module_pw/pw_basis_k.h" #include "module_cell/unitcell.h" diff --git a/source/module_io/input_conv.cpp b/source/module_io/input_conv.cpp index 1ccaaf8f2b..487d6fcb9c 100644 --- a/source/module_io/input_conv.cpp +++ b/source/module_io/input_conv.cpp @@ -1,7 +1,7 @@ #include "module_io/input_conv.h" -#include "module_base/global_function.h" -#include "module_base/global_variable.h" +#include "source_base/global_function.h" +#include "source_base/global_variable.h" #include "module_cell/module_symmetry/symmetry.h" #include "module_cell/unitcell.h" #include "module_elecstate/occupy.h" @@ -34,8 +34,8 @@ #include "source_hsolver/diago_elpa_native.h" #endif -#include "module_base/module_device/device.h" -#include "module_base/timer.h" +#include "source_base/module_device/device.h" +#include "source_base/timer.h" #include "module_elecstate/elecstate_lcao.h" #include "module_elecstate/module_pot/efield.h" #include "module_elecstate/module_pot/gatefield.h" diff --git a/source/module_io/input_conv.h b/source/module_io/input_conv.h index bbb51df101..d60cc59780 100644 --- a/source/module_io/input_conv.h +++ b/source/module_io/input_conv.h @@ -5,8 +5,8 @@ #ifndef INPUT_CONVERT_H #define INPUT_CONVERT_H -#include "module_base/global_function.h" -#include "module_base/global_variable.h" +#include "source_base/global_function.h" +#include "source_base/global_variable.h" #include #include diff --git a/source/module_io/io_dmk.cpp b/source/module_io/io_dmk.cpp index 69bbd7a4b3..a52971e1a2 100644 --- a/source/module_io/io_dmk.cpp +++ b/source/module_io/io_dmk.cpp @@ -1,8 +1,8 @@ #include "module_io/io_dmk.h" -#include "module_base/parallel_common.h" -#include "module_base/scalapack_connector.h" -#include "module_base/timer.h" +#include "source_base/parallel_common.h" +#include "source_base/scalapack_connector.h" +#include "source_base/timer.h" #include "module_parameter/parameter.h" /* diff --git a/source/module_io/io_dmk.h b/source/module_io/io_dmk.h index df24e9c587..0e7d08df74 100644 --- a/source/module_io/io_dmk.h +++ b/source/module_io/io_dmk.h @@ -1,7 +1,7 @@ #ifndef DM_IO_H #define DM_IO_H -#include "module_base/parallel_2d.h" +#include "source_base/parallel_2d.h" #include "module_cell/unitcell.h" #include diff --git a/source/module_io/io_npz.cpp b/source/module_io/io_npz.cpp index 0732445554..3d3f80dff4 100644 --- a/source/module_io/io_npz.cpp +++ b/source/module_io/io_npz.cpp @@ -2,7 +2,7 @@ #include "io_npz.h" -#include "module_base/element_name.h" +#include "source_base/element_name.h" #include "module_parameter/parameter.h" #ifdef __MPI diff --git a/source/module_io/json_output/general_info.cpp b/source/module_io/json_output/general_info.cpp index c6285d9000..c57a9c5746 100644 --- a/source/module_io/json_output/general_info.cpp +++ b/source/module_io/json_output/general_info.cpp @@ -2,7 +2,7 @@ #include "../para_json.h" #include "abacusjson.h" -#include "module_base/parallel_global.h" +#include "source_base/parallel_global.h" #include "source_main/version.h" // Add json objects to gener_info diff --git a/source/module_io/json_output/output_info.h b/source/module_io/json_output/output_info.h index 0be4254922..149713faf3 100644 --- a/source/module_io/json_output/output_info.h +++ b/source/module_io/json_output/output_info.h @@ -4,7 +4,7 @@ #include "module_cell/module_symmetry/symmetry.h" #include "module_cell/atom_spec.h" #include "module_cell/unitcell.h" -#include "module_base/matrix.h" +#include "source_base/matrix.h" /** diff --git a/source/module_io/nscf_band.cpp b/source/module_io/nscf_band.cpp index e824b4ce84..d45e067d3e 100644 --- a/source/module_io/nscf_band.cpp +++ b/source/module_io/nscf_band.cpp @@ -1,9 +1,9 @@ #include "nscf_band.h" -#include "module_base/global_function.h" -#include "module_base/global_variable.h" -#include "module_base/timer.h" -#include "module_base/tool_title.h" -#include "module_base/formatter.h" +#include "source_base/global_function.h" +#include "source_base/global_variable.h" +#include "source_base/timer.h" +#include "source_base/tool_title.h" +#include "source_base/formatter.h" #ifdef __MPI #include diff --git a/source/module_io/nscf_band.h b/source/module_io/nscf_band.h index d12b063f08..dba25f0288 100644 --- a/source/module_io/nscf_band.h +++ b/source/module_io/nscf_band.h @@ -1,6 +1,6 @@ #ifndef NSCF_BAND_H #define NSCF_BAND_H -#include "module_base/matrix.h" +#include "source_base/matrix.h" #include "module_cell/klist.h" #include "module_cell/parallel_kpoints.h" diff --git a/source/module_io/nscf_fermi_surf.cpp b/source/module_io/nscf_fermi_surf.cpp index ab7be76d8d..7c8b0ad337 100644 --- a/source/module_io/nscf_fermi_surf.cpp +++ b/source/module_io/nscf_fermi_surf.cpp @@ -1,8 +1,8 @@ #include "nscf_fermi_surf.h" -#include "module_base/global_function.h" +#include "source_base/global_function.h" #include "module_parameter/parameter.h" -#include "module_base/global_variable.h" -#include "module_base/timer.h" +#include "source_base/global_variable.h" +#include "source_base/timer.h" #ifdef __MPI #include diff --git a/source/module_io/nscf_fermi_surf.h b/source/module_io/nscf_fermi_surf.h index 6dd879fa29..c7153f2064 100644 --- a/source/module_io/nscf_fermi_surf.h +++ b/source/module_io/nscf_fermi_surf.h @@ -1,7 +1,7 @@ #ifndef NSCF_FERMI_SURF_H #define NSCF_FERMI_SURF_H -#include "module_base/matrix.h" +#include "source_base/matrix.h" #include "module_cell/klist.h" #include "module_cell/unitcell.h" #include "module_cell/parallel_kpoints.h" diff --git a/source/module_io/numerical_basis.cpp b/source/module_io/numerical_basis.cpp index 4eaff85250..19f1830a0a 100644 --- a/source/module_io/numerical_basis.cpp +++ b/source/module_io/numerical_basis.cpp @@ -1,13 +1,13 @@ #include "numerical_basis.h" #include "module_parameter/parameter.h" -#include "module_base/constants.h" -#include "module_base/global_variable.h" -#include "module_base/intarray.h" -#include "module_base/math_ylmreal.h" -#include "module_base/parallel_reduce.h" -#include "module_base/timer.h" -#include "module_base/vector3.h" +#include "source_base/constants.h" +#include "source_base/global_variable.h" +#include "source_base/intarray.h" +#include "source_base/math_ylmreal.h" +#include "source_base/parallel_reduce.h" +#include "source_base/timer.h" +#include "source_base/vector3.h" #include "module_cell/module_symmetry/symmetry.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" #include "module_io/numerical_basis_jyjy.h" diff --git a/source/module_io/numerical_basis.h b/source/module_io/numerical_basis.h index 20547e6f41..eb24270942 100644 --- a/source/module_io/numerical_basis.h +++ b/source/module_io/numerical_basis.h @@ -8,13 +8,13 @@ #include #include "bessel_basis.h" -#include "module_base/complexarray.h" -#include "module_base/complexmatrix.h" -#include "module_base/global_function.h" -#include "module_base/global_variable.h" -#include "module_base/intarray.h" -#include "module_base/matrix.h" -#include "module_base/vector3.h" +#include "source_base/complexarray.h" +#include "source_base/complexmatrix.h" +#include "source_base/global_function.h" +#include "source_base/global_variable.h" +#include "source_base/intarray.h" +#include "source_base/matrix.h" +#include "source_base/vector3.h" #include "module_basis/module_pw/pw_basis_k.h" #include "module_cell/klist.h" #include "module_hamilt_pw/hamilt_pwdft/structure_factor.h" diff --git a/source/module_io/numerical_basis_jyjy.cpp b/source/module_io/numerical_basis_jyjy.cpp index 8f504a9fab..9eda45bbd9 100644 --- a/source/module_io/numerical_basis_jyjy.cpp +++ b/source/module_io/numerical_basis_jyjy.cpp @@ -1,7 +1,7 @@ #include "module_io/numerical_basis_jyjy.h" -#include "module_base/matrix3.h" -#include "module_base/vector3.h" +#include "source_base/matrix3.h" +#include "source_base/vector3.h" #include "module_basis/module_nao/two_center_integrator.h" namespace NumericalBasis diff --git a/source/module_io/numerical_basis_jyjy.h b/source/module_io/numerical_basis_jyjy.h index f29deba5f4..84296c57af 100644 --- a/source/module_io/numerical_basis_jyjy.h +++ b/source/module_io/numerical_basis_jyjy.h @@ -1,9 +1,9 @@ #ifndef NUMERICAL_BASIS_JYJY_H #define NUMERICAL_BASIS_JYJY_H -#include "module_base/complexarray.h" -#include "module_base/matrix3.h" -#include "module_base/vector3.h" +#include "source_base/complexarray.h" +#include "source_base/matrix3.h" +#include "source_base/vector3.h" #include #include diff --git a/source/module_io/numerical_descriptor.cpp b/source/module_io/numerical_descriptor.cpp index 16236c63ea..899bcb967d 100644 --- a/source/module_io/numerical_descriptor.cpp +++ b/source/module_io/numerical_descriptor.cpp @@ -3,10 +3,10 @@ #include "module_parameter/parameter.h" #include "module_cell/module_symmetry/symmetry.h" #include "winput.h" -#include "module_base/math_ylmreal.h" -#include "module_base/lapack_connector.h" -#include "module_base/parallel_reduce.h" -#include "module_base/timer.h" +#include "source_base/math_ylmreal.h" +#include "source_base/lapack_connector.h" +#include "source_base/parallel_reduce.h" +#include "source_base/timer.h" Numerical_Descriptor::Numerical_Descriptor() { diff --git a/source/module_io/numerical_descriptor.h b/source/module_io/numerical_descriptor.h index 796d14706e..57c77b7f31 100644 --- a/source/module_io/numerical_descriptor.h +++ b/source/module_io/numerical_descriptor.h @@ -4,10 +4,10 @@ //========================================================== #ifndef NUMERICAL_DESCRIPTOR_H #define NUMERICAL_DESCRIPTOR_H -#include "../module_base/global_function.h" -#include "../module_base/global_variable.h" -#include "../module_base/intarray.h" -#include "../module_base/complexmatrix.h" +#include "../source_base/global_function.h" +#include "../source_base/global_variable.h" +#include "../source_base/intarray.h" +#include "../source_base/complexmatrix.h" #include "bessel_basis.h" #include "module_psi/psi.h" //========================================================== diff --git a/source/module_io/orb_io.cpp b/source/module_io/orb_io.cpp index bb039a84d7..14f58db5d1 100644 --- a/source/module_io/orb_io.cpp +++ b/source/module_io/orb_io.cpp @@ -1,7 +1,7 @@ #include "module_io/orb_io.h" -#include "module_base/tool_quit.h" +#include "source_base/tool_quit.h" #ifdef __MPI -#include "module_base/parallel_common.h" +#include "source_base/parallel_common.h" #endif void ModuleIO::read_abacus_orb(std::ifstream& ifs, diff --git a/source/module_io/output.h b/source/module_io/output.h index 55f8dfb7e7..909abc6e94 100644 --- a/source/module_io/output.h +++ b/source/module_io/output.h @@ -5,10 +5,10 @@ #ifndef OUTPUT_H #define OUTPUT_H -#include "../module_base/realarray.h" -#include "../module_base/matrix3.h" -#include "../module_base/complexmatrix.h" -#include "../module_base/matrix.h" +#include "../source_base/realarray.h" +#include "../source_base/matrix3.h" +#include "../source_base/complexmatrix.h" +#include "../source_base/matrix.h" class output { public: diff --git a/source/module_io/output_log.cpp b/source/module_io/output_log.cpp index dd79f5bd6a..accdd1dc4a 100644 --- a/source/module_io/output_log.cpp +++ b/source/module_io/output_log.cpp @@ -1,11 +1,11 @@ #include "output_log.h" #include "module_parameter/parameter.h" -#include "module_base/constants.h" -#include "module_base/formatter.h" -#include "module_base/global_variable.h" +#include "source_base/constants.h" +#include "source_base/formatter.h" +#include "source_base/global_variable.h" -#include "module_base/parallel_comm.h" +#include "source_base/parallel_comm.h" #ifdef __MPI #include diff --git a/source/module_io/output_log.h b/source/module_io/output_log.h index 5610864863..836181e3df 100644 --- a/source/module_io/output_log.h +++ b/source/module_io/output_log.h @@ -3,8 +3,8 @@ #include -#include "module_base/global_variable.h" -#include "module_base/matrix.h" +#include "source_base/global_variable.h" +#include "source_base/matrix.h" #include "module_cell/unitcell.h" namespace ModuleIO diff --git a/source/module_io/output_mulliken.cpp b/source/module_io/output_mulliken.cpp index 8a31995b40..59d5d226a8 100644 --- a/source/module_io/output_mulliken.cpp +++ b/source/module_io/output_mulliken.cpp @@ -1,10 +1,10 @@ #include "module_io/output_mulliken.h" #include "module_parameter/parameter.h" -#include "module_base/formatter.h" -#include "module_base/name_angular.h" -#include "module_base/scalapack_connector.h" -#include "module_base/tool_quit.h" +#include "source_base/formatter.h" +#include "source_base/name_angular.h" +#include "source_base/scalapack_connector.h" +#include "source_base/tool_quit.h" #include diff --git a/source/module_io/output_mulliken.h b/source/module_io/output_mulliken.h index 42cbf38927..668eb3947d 100644 --- a/source/module_io/output_mulliken.h +++ b/source/module_io/output_mulliken.h @@ -1,13 +1,13 @@ #ifndef OUTPUT_MULLIKEN_H #define OUTPUT_MULLIKEN_H -#include "module_base/complexmatrix.h" -#include "module_base/matrix.h" +#include "source_base/complexmatrix.h" +#include "source_base/matrix.h" #include "module_basis/module_ao/parallel_orbitals.h" #include "module_cell/cell_index.h" #include "module_elecstate/elecstate_lcao.h" #include "module_io/output_dmk.h" #include "module_io/output_sk.h" -#include "module_base/formatter.h" +#include "source_base/formatter.h" #include "module_hamilt_lcao/hamilt_lcaodft/operator_lcao/dspin_lcao.h" #include diff --git a/source/module_io/output_sk.cpp b/source/module_io/output_sk.cpp index c3f2359d19..4d6dc0eab1 100644 --- a/source/module_io/output_sk.cpp +++ b/source/module_io/output_sk.cpp @@ -1,6 +1,6 @@ #include "output_sk.h" -#include "module_base/tool_quit.h" +#include "source_base/tool_quit.h" namespace ModuleIO { diff --git a/source/module_io/para_json.cpp b/source/module_io/para_json.cpp index 8f0fdedf86..526567429e 100644 --- a/source/module_io/para_json.cpp +++ b/source/module_io/para_json.cpp @@ -1,7 +1,7 @@ #include "para_json.h" -#include "module_base/global_variable.h" +#include "source_base/global_variable.h" #include #include diff --git a/source/module_io/print_info.cpp b/source/module_io/print_info.cpp index bed4863c89..b93c6ea190 100644 --- a/source/module_io/print_info.cpp +++ b/source/module_io/print_info.cpp @@ -1,6 +1,6 @@ #include "print_info.h" -#include "module_base/global_variable.h" +#include "source_base/global_variable.h" #include "module_parameter/parameter.h" diff --git a/source/module_io/print_info.h b/source/module_io/print_info.h index a7bcb2a0cf..4bdb6effdc 100644 --- a/source/module_io/print_info.h +++ b/source/module_io/print_info.h @@ -5,7 +5,7 @@ #ifndef PRINT_INFO #define PRINT_INFO -#include "module_base/timer.h" +#include "source_base/timer.h" #include "module_basis/module_pw/pw_basis_k.h" #include "module_cell/klist.h" #include "module_cell/unitcell.h" diff --git a/source/module_io/read_input.cpp b/source/module_io/read_input.cpp index 14d6438010..9e47d93856 100644 --- a/source/module_io/read_input.cpp +++ b/source/module_io/read_input.cpp @@ -8,12 +8,12 @@ #include #include #include -#include "module_base/formatter.h" -#include "module_base/global_file.h" -#include "module_base/global_function.h" -#include "module_base/tool_quit.h" -#include "module_base/tool_title.h" -#include "module_base/module_device/device.h" +#include "source_base/formatter.h" +#include "source_base/global_file.h" +#include "source_base/global_function.h" +#include "source_base/tool_quit.h" +#include "source_base/tool_title.h" +#include "source_base/module_device/device.h" namespace ModuleIO { diff --git a/source/module_io/read_input_item_deepks.cpp b/source/module_io/read_input_item_deepks.cpp index c60976931a..39c8d845ba 100644 --- a/source/module_io/read_input_item_deepks.cpp +++ b/source/module_io/read_input_item_deepks.cpp @@ -1,5 +1,5 @@ -#include "module_base/constants.h" -#include "module_base/tool_quit.h" +#include "source_base/constants.h" +#include "source_base/tool_quit.h" #include "module_parameter/parameter.h" #include "read_input.h" #include "read_input_tool.h" diff --git a/source/module_io/read_input_item_elec_stru.cpp b/source/module_io/read_input_item_elec_stru.cpp index acae10a74a..8daabfdc0e 100644 --- a/source/module_io/read_input_item_elec_stru.cpp +++ b/source/module_io/read_input_item_elec_stru.cpp @@ -1,5 +1,5 @@ -#include "module_base/global_function.h" -#include "module_base/tool_quit.h" +#include "source_base/global_function.h" +#include "source_base/tool_quit.h" #include "read_input.h" #include "read_input_tool.h" diff --git a/source/module_io/read_input_item_exx_dftu.cpp b/source/module_io/read_input_item_exx_dftu.cpp index ea9a9c3927..d3d6dc853b 100644 --- a/source/module_io/read_input_item_exx_dftu.cpp +++ b/source/module_io/read_input_item_exx_dftu.cpp @@ -1,5 +1,5 @@ -#include "module_base/constants.h" -#include "module_base/tool_quit.h" +#include "source_base/constants.h" +#include "source_base/tool_quit.h" #include "read_input.h" #include "read_input_tool.h" namespace ModuleIO diff --git a/source/module_io/read_input_item_md.cpp b/source/module_io/read_input_item_md.cpp index 419a601e28..a49c1bd3e6 100644 --- a/source/module_io/read_input_item_md.cpp +++ b/source/module_io/read_input_item_md.cpp @@ -1,4 +1,4 @@ -#include "module_base/tool_quit.h" +#include "source_base/tool_quit.h" #include "read_input.h" #include "read_input_tool.h" diff --git a/source/module_io/read_input_item_model.cpp b/source/module_io/read_input_item_model.cpp index 30549e5d6f..aa78e84400 100644 --- a/source/module_io/read_input_item_model.cpp +++ b/source/module_io/read_input_item_model.cpp @@ -1,5 +1,5 @@ -#include "module_base/global_function.h" -#include "module_base/tool_quit.h" +#include "source_base/global_function.h" +#include "source_base/tool_quit.h" #include "read_input.h" #include "read_input_tool.h" namespace ModuleIO diff --git a/source/module_io/read_input_item_ofdft.cpp b/source/module_io/read_input_item_ofdft.cpp index 3ed59bdb61..9f729d2793 100644 --- a/source/module_io/read_input_item_ofdft.cpp +++ b/source/module_io/read_input_item_ofdft.cpp @@ -1,6 +1,6 @@ -#include "module_base/global_function.h" -#include "module_base/tool_quit.h" +#include "source_base/global_function.h" +#include "source_base/tool_quit.h" #include "read_input.h" #include "read_input_tool.h" namespace ModuleIO diff --git a/source/module_io/read_input_item_other.cpp b/source/module_io/read_input_item_other.cpp index f4077b3582..74b1e25221 100644 --- a/source/module_io/read_input_item_other.cpp +++ b/source/module_io/read_input_item_other.cpp @@ -1,5 +1,5 @@ -#include "module_base/global_function.h" -#include "module_base/tool_quit.h" +#include "source_base/global_function.h" +#include "source_base/tool_quit.h" #include "read_input.h" #include "read_input_tool.h" diff --git a/source/module_io/read_input_item_output.cpp b/source/module_io/read_input_item_output.cpp index 3d2f15dc64..10947eaf5d 100644 --- a/source/module_io/read_input_item_output.cpp +++ b/source/module_io/read_input_item_output.cpp @@ -1,5 +1,5 @@ -#include "module_base/global_function.h" -#include "module_base/tool_quit.h" +#include "source_base/global_function.h" +#include "source_base/tool_quit.h" #include "read_input.h" #include "read_input_tool.h" namespace ModuleIO diff --git a/source/module_io/read_input_item_postprocess.cpp b/source/module_io/read_input_item_postprocess.cpp index a6ec81238d..f2ef9bd73b 100644 --- a/source/module_io/read_input_item_postprocess.cpp +++ b/source/module_io/read_input_item_postprocess.cpp @@ -1,5 +1,5 @@ -#include "module_base/global_function.h" -#include "module_base/tool_quit.h" +#include "source_base/global_function.h" +#include "source_base/tool_quit.h" #include "read_input.h" #include "read_input_tool.h" namespace ModuleIO diff --git a/source/module_io/read_input_item_relax.cpp b/source/module_io/read_input_item_relax.cpp index 80c012b6ff..e14ad0e5d7 100644 --- a/source/module_io/read_input_item_relax.cpp +++ b/source/module_io/read_input_item_relax.cpp @@ -1,5 +1,5 @@ -#include "module_base/global_function.h" -#include "module_base/tool_quit.h" +#include "source_base/global_function.h" +#include "source_base/tool_quit.h" #include "read_input.h" #include "read_input_tool.h" diff --git a/source/module_io/read_input_item_sdft.cpp b/source/module_io/read_input_item_sdft.cpp index 2f532680b1..d073084a2e 100644 --- a/source/module_io/read_input_item_sdft.cpp +++ b/source/module_io/read_input_item_sdft.cpp @@ -1,5 +1,5 @@ -#include "module_base/global_function.h" -#include "module_base/tool_quit.h" +#include "source_base/global_function.h" +#include "source_base/tool_quit.h" #include "read_input.h" #include "read_input_tool.h" diff --git a/source/module_io/read_input_item_system.cpp b/source/module_io/read_input_item_system.cpp index 797a94ee21..d754f98465 100644 --- a/source/module_io/read_input_item_system.cpp +++ b/source/module_io/read_input_item_system.cpp @@ -1,8 +1,8 @@ -#include "module_base/global_function.h" -#include "module_base/tool_quit.h" +#include "source_base/global_function.h" +#include "source_base/tool_quit.h" #include "read_input.h" #include "read_input_tool.h" -#include "module_base/module_device/device.h" +#include "source_base/module_device/device.h" #include #include diff --git a/source/module_io/read_input_item_tddft.cpp b/source/module_io/read_input_item_tddft.cpp index 9687af495d..5a3ffe3214 100644 --- a/source/module_io/read_input_item_tddft.cpp +++ b/source/module_io/read_input_item_tddft.cpp @@ -1,5 +1,5 @@ -#include "module_base/constants.h" -#include "module_base/tool_quit.h" +#include "source_base/constants.h" +#include "source_base/tool_quit.h" #include "read_input.h" #include "read_input_tool.h" diff --git a/source/module_io/read_input_tool.h b/source/module_io/read_input_tool.h index 649b0044e5..d37967742f 100644 --- a/source/module_io/read_input_tool.h +++ b/source/module_io/read_input_tool.h @@ -2,7 +2,7 @@ #include #include #ifdef __MPI -#include "module_base/parallel_common.h" +#include "source_base/parallel_common.h" #endif #define strvalue item.str_values[0] diff --git a/source/module_io/read_set_globalv.cpp b/source/module_io/read_set_globalv.cpp index 0a2ece4866..d831803883 100644 --- a/source/module_io/read_set_globalv.cpp +++ b/source/module_io/read_set_globalv.cpp @@ -1,5 +1,5 @@ -#include "module_base/global_variable.h" -#include "module_base/tool_quit.h" +#include "source_base/global_variable.h" +#include "source_base/tool_quit.h" #include "module_parameter/parameter.h" #include "read_input.h" #include "read_input_tool.h" diff --git a/source/module_io/read_wf2rho_pw.cpp b/source/module_io/read_wf2rho_pw.cpp index c132d26fd6..ca04fb11a8 100644 --- a/source/module_io/read_wf2rho_pw.cpp +++ b/source/module_io/read_wf2rho_pw.cpp @@ -1,7 +1,7 @@ #include "read_wf2rho_pw.h" #include "read_wfc_pw.h" -#include "module_base/timer.h" +#include "source_base/timer.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" #include "module_elecstate/module_charge/symmetry_rho.h" #include "module_parameter/parameter.h" diff --git a/source/module_io/read_wfc_lcao.cpp b/source/module_io/read_wfc_lcao.cpp index 00d6279023..3cb255574f 100644 --- a/source/module_io/read_wfc_lcao.cpp +++ b/source/module_io/read_wfc_lcao.cpp @@ -1,7 +1,7 @@ #include "module_io/read_wfc_lcao.h" -#include "module_base/formatter.h" -#include "module_base/tool_quit.h" +#include "source_base/formatter.h" +#include "source_base/tool_quit.h" #include #include @@ -9,7 +9,7 @@ #include #ifdef __MPI -#include "module_base/parallel_common.h" +#include "source_base/parallel_common.h" #endif /* diff --git a/source/module_io/read_wfc_lcao.h b/source/module_io/read_wfc_lcao.h index 577b0fcff9..47301f3624 100644 --- a/source/module_io/read_wfc_lcao.h +++ b/source/module_io/read_wfc_lcao.h @@ -1,14 +1,14 @@ #ifndef READ_WFC_LCAO_H #define READ_WFC_LCAO_H -#include "module_base/vector3.h" +#include "source_base/vector3.h" #include #include #include #ifdef __MPI -#include "module_base/scalapack_connector.h" -#include "module_base/parallel_2d.h" +#include "source_base/scalapack_connector.h" +#include "source_base/parallel_2d.h" #endif /** diff --git a/source/module_io/read_wfc_nao.cpp b/source/module_io/read_wfc_nao.cpp index 308b9e2a1b..40ec294295 100644 --- a/source/module_io/read_wfc_nao.cpp +++ b/source/module_io/read_wfc_nao.cpp @@ -1,11 +1,11 @@ #include "read_wfc_nao.h" -#include "module_base/parallel_common.h" -#include "module_base/timer.h" +#include "source_base/parallel_common.h" +#include "source_base/timer.h" #include "module_io/write_wfc_nao.h" #include "write_wfc_nao.h" -#include "module_base/scalapack_connector.h" +#include "source_base/scalapack_connector.h" #include "module_io/filename.h" void ModuleIO::read_wfc_nao_one_data(std::ifstream& ifs, double& data) diff --git a/source/module_io/read_wfc_pw.cpp b/source/module_io/read_wfc_pw.cpp index 837023637c..02419f0cad 100644 --- a/source/module_io/read_wfc_pw.cpp +++ b/source/module_io/read_wfc_pw.cpp @@ -2,12 +2,12 @@ #include "module_parameter/parameter.h" #include "binstream.h" -#include "module_base/global_function.h" -#include "module_base/global_variable.h" -#include "module_base/parallel_common.h" -#include "module_base/parallel_global.h" -#include "module_base/timer.h" -#include "module_base/vector3.h" +#include "source_base/global_function.h" +#include "source_base/global_variable.h" +#include "source_base/parallel_common.h" +#include "source_base/parallel_global.h" +#include "source_base/timer.h" +#include "source_base/vector3.h" void ModuleIO::read_wfc_pw(const std::string& filename, const ModulePW::PW_Basis_K* pw_wfc, diff --git a/source/module_io/restart.cpp b/source/module_io/restart.cpp index fe8c143b05..1841f3bb37 100644 --- a/source/module_io/restart.cpp +++ b/source/module_io/restart.cpp @@ -6,7 +6,7 @@ #include #include -#include "module_base/global_function.h" +#include "source_base/global_function.h" void Restart::write_file1(const std::string &file_name, const void*const ptr, const size_t size) const { diff --git a/source/module_io/restart.h b/source/module_io/restart.h index 16bae1fa0f..d3cf0cf2df 100644 --- a/source/module_io/restart.h +++ b/source/module_io/restart.h @@ -2,8 +2,8 @@ #define RESTART_H #include -#include "module_base/global_function.h" -#include "module_base/abfs-vector3_order.h" +#include "source_base/global_function.h" +#include "source_base/abfs-vector3_order.h" #ifdef __EXX #include #endif diff --git a/source/module_io/restart_exx_csr.h b/source/module_io/restart_exx_csr.h index 1eab69f4ef..fb028d059f 100644 --- a/source/module_io/restart_exx_csr.h +++ b/source/module_io/restart_exx_csr.h @@ -1,5 +1,5 @@ #pragma once -#include "module_base/abfs-vector3_order.h" +#include "source_base/abfs-vector3_order.h" #include "module_cell/unitcell.h" #include "module_ri/serialization_cereal.h" #include diff --git a/source/module_io/rhog_io.cpp b/source/module_io/rhog_io.cpp index f01b78fdcb..cb099c82dd 100644 --- a/source/module_io/rhog_io.cpp +++ b/source/module_io/rhog_io.cpp @@ -1,10 +1,10 @@ #include "binstream.h" -#include "module_base/global_function.h" +#include "source_base/global_function.h" #include "module_parameter/parameter.h" -#include "module_base/global_variable.h" -#include "module_base/parallel_global.h" -#include "module_base/timer.h" -#include "module_base/vector3.h" +#include "source_base/global_variable.h" +#include "source_base/parallel_global.h" +#include "source_base/timer.h" +#include "source_base/vector3.h" #include "rhog_io.h" #include #include diff --git a/source/module_io/single_R_io.cpp b/source/module_io/single_R_io.cpp index d49651b479..cf096dcc01 100644 --- a/source/module_io/single_R_io.cpp +++ b/source/module_io/single_R_io.cpp @@ -1,8 +1,8 @@ #include "single_R_io.h" -#include "module_base/parallel_reduce.h" +#include "source_base/parallel_reduce.h" #include "module_parameter/parameter.h" -#include "module_base/global_function.h" -#include "module_base/global_variable.h" +#include "source_base/global_function.h" +#include "source_base/global_variable.h" inline void write_data(std::ofstream& ofs, const double& data) { diff --git a/source/module_io/sparse_matrix.cpp b/source/module_io/sparse_matrix.cpp index 54a564ef98..779760430a 100644 --- a/source/module_io/sparse_matrix.cpp +++ b/source/module_io/sparse_matrix.cpp @@ -3,7 +3,7 @@ #include #include -#include "module_base/tool_quit.h" +#include "source_base/tool_quit.h" namespace ModuleIO { diff --git a/source/module_io/td_current_io.cpp b/source/module_io/td_current_io.cpp index f50cde9caf..6af28f80b9 100644 --- a/source/module_io/td_current_io.cpp +++ b/source/module_io/td_current_io.cpp @@ -1,12 +1,12 @@ #include "td_current_io.h" -#include "module_base/global_function.h" -#include "module_base/global_variable.h" -#include "module_base/libm/libm.h" -#include "module_base/parallel_reduce.h" -#include "module_base/timer.h" -#include "module_base/tool_threading.h" -#include "module_base/vector3.h" +#include "source_base/global_function.h" +#include "source_base/global_variable.h" +#include "source_base/libm/libm.h" +#include "source_base/parallel_reduce.h" +#include "source_base/timer.h" +#include "source_base/tool_threading.h" +#include "source_base/vector3.h" #include "module_elecstate/module_dm/cal_dm_psi.h" #include "module_elecstate/module_pot/H_TDDFT_pw.h" #include "module_hamilt_lcao/hamilt_lcaodft/LCAO_domain.h" diff --git a/source/module_io/test/CMakeLists.txt b/source/module_io/test/CMakeLists.txt index 67032896b3..a5cb4a23f5 100644 --- a/source/module_io/test/CMakeLists.txt +++ b/source/module_io/test/CMakeLists.txt @@ -74,11 +74,11 @@ AddTest( TARGET MODULE_IO_single_R_test LIBS parameter ${math_libs} SOURCES single_R_io_test.cpp ../single_R_io.cpp - ../../module_base/global_variable.cpp - ../../module_base/parallel_reduce.cpp - ../../module_base/parallel_common.cpp - ../../module_base/parallel_global.cpp - ../../module_base/parallel_comm.cpp + ../../source_base/global_variable.cpp + ../../source_base/parallel_reduce.cpp + ../../source_base/parallel_common.cpp + ../../source_base/parallel_global.cpp + ../../source_base/parallel_comm.cpp ) AddTest( diff --git a/source/module_io/test/cal_dos_test.cpp b/source/module_io/test/cal_dos_test.cpp index 96173c9c25..ba73be40ec 100644 --- a/source/module_io/test/cal_dos_test.cpp +++ b/source/module_io/test/cal_dos_test.cpp @@ -1,7 +1,7 @@ #include "gtest/gtest.h" #include "gmock/gmock.h" #include "module_io/cal_dos.h" -#include "module_base/global_variable.h" +#include "source_base/global_variable.h" #include #ifdef __MPI #include "mpi.h" diff --git a/source/module_io/test/cal_pLpR_test.cpp b/source/module_io/test/cal_pLpR_test.cpp index d9f9b92085..629efc9a28 100644 --- a/source/module_io/test/cal_pLpR_test.cpp +++ b/source/module_io/test/cal_pLpR_test.cpp @@ -7,8 +7,8 @@ #include "module_io/cal_pLpR.h" #include "module_basis/module_nao/two_center_integrator.h" #include "module_basis/module_nao/radial_collection.h" -#include "module_base/spherical_bessel_transformer.h" -#include "module_base/ylm.h" +#include "source_base/spherical_bessel_transformer.h" +#include "source_base/ylm.h" #define DOUBLETHRESHOLD 1e-12 diff --git a/source/module_io/test/cif_io_test.cpp b/source/module_io/test/cif_io_test.cpp index b8f3ae4b74..7e6c3b7fae 100644 --- a/source/module_io/test/cif_io_test.cpp +++ b/source/module_io/test/cif_io_test.cpp @@ -2,7 +2,7 @@ #include "module_io/cif_io.h" #include #include -#include "module_base/formatter.h" +#include "source_base/formatter.h" #include #ifdef __MPI diff --git a/source/module_io/test/dos_test.h b/source/module_io/test/dos_test.h index f814c7d7ce..2f72303ea4 100644 --- a/source/module_io/test/dos_test.h +++ b/source/module_io/test/dos_test.h @@ -3,7 +3,7 @@ #include #include -#include"module_base/constants.h" +#include"source_base/constants.h" class DosPrepare { diff --git a/source/module_io/test/for_testing_klist.h b/source/module_io/test/for_testing_klist.h index 779bcb932b..5ac8c1b486 100644 --- a/source/module_io/test/for_testing_klist.h +++ b/source/module_io/test/for_testing_klist.h @@ -1,7 +1,7 @@ #ifndef FOR_TESTING_KLIST_H #define FOR_TESTING_KLIST_H -#include "module_base/parallel_global.h" +#include "source_base/parallel_global.h" #include "module_basis/module_ao/ORB_gaunt_table.h" #include "module_cell/atom_pseudo.h" #include "module_cell/atom_spec.h" diff --git a/source/module_io/test/io_dmk_test.cpp b/source/module_io/test/io_dmk_test.cpp index f7a4391b27..15b7323bd7 100644 --- a/source/module_io/test/io_dmk_test.cpp +++ b/source/module_io/test/io_dmk_test.cpp @@ -3,12 +3,12 @@ #define private public #include "module_parameter/parameter.h" #undef private -#include "module_base/global_variable.h" +#include "source_base/global_variable.h" #include "prepare_unitcell.h" #include "gmock/gmock.h" #include "gtest/gtest.h" -#include "module_base/scalapack_connector.h" +#include "source_base/scalapack_connector.h" #ifdef __MPI #include "mpi.h" diff --git a/source/module_io/test/numerical_basis_test.cpp b/source/module_io/test/numerical_basis_test.cpp index c0e30e30fa..acbac630aa 100644 --- a/source/module_io/test/numerical_basis_test.cpp +++ b/source/module_io/test/numerical_basis_test.cpp @@ -1,6 +1,6 @@ -#include "module_base/math_sphbes.h" -#include "module_base/matrix3.h" -#include "module_base/vector3.h" +#include "source_base/math_sphbes.h" +#include "source_base/matrix3.h" +#include "source_base/vector3.h" #include "module_io/numerical_basis_jyjy.h" #include "gtest/gtest.h" diff --git a/source/module_io/test/orb_io_test.cpp b/source/module_io/test/orb_io_test.cpp index a5c9e1df9f..a9621f6a81 100644 --- a/source/module_io/test/orb_io_test.cpp +++ b/source/module_io/test/orb_io_test.cpp @@ -5,8 +5,8 @@ #include #endif -#include "module_base/constants.h" -#include "module_base/global_variable.h" +#include "source_base/constants.h" +#include "source_base/global_variable.h" class OrbIOTest : public testing::Test { diff --git a/source/module_io/test/outputlog_test.cpp b/source/module_io/test/outputlog_test.cpp index 786f6017df..3e05202b44 100644 --- a/source/module_io/test/outputlog_test.cpp +++ b/source/module_io/test/outputlog_test.cpp @@ -8,8 +8,8 @@ #include #include -#include "module_base/constants.h" -#include "module_base/global_variable.h" +#include "source_base/constants.h" +#include "source_base/global_variable.h" #include "module_io/output_log.h" #ifdef __MPI diff --git a/source/module_io/test/prepare_unitcell.h b/source/module_io/test/prepare_unitcell.h index 8e43ec4223..e05792a96d 100644 --- a/source/module_io/test/prepare_unitcell.h +++ b/source/module_io/test/prepare_unitcell.h @@ -2,7 +2,7 @@ #define PREPARE_UNITCELL_H #include #include -#include "module_base/mathzone.h" +#include "source_base/mathzone.h" class UcellTestPrepare { diff --git a/source/module_io/test/read_input_ptest.cpp b/source/module_io/test/read_input_ptest.cpp index 2ec4bdce1d..14051da462 100644 --- a/source/module_io/test/read_input_ptest.cpp +++ b/source/module_io/test/read_input_ptest.cpp @@ -3,12 +3,12 @@ #include "gmock/gmock.h" #include "gtest/gtest.h" -#include "module_base/tool_quit.h" +#include "source_base/tool_quit.h" #include "module_io/read_input.h" #include "module_parameter/parameter.h" // #ifdef __MPI -#include "module_base/parallel_global.h" +#include "source_base/parallel_global.h" #include "module_basis/module_pw/test/test_tool.h" #include "mpi.h" // #endif diff --git a/source/module_io/test/read_wf2rho_pw_test.cpp b/source/module_io/test/read_wf2rho_pw_test.cpp index e8e0214236..3235f3cd67 100644 --- a/source/module_io/test/read_wf2rho_pw_test.cpp +++ b/source/module_io/test/read_wf2rho_pw_test.cpp @@ -17,7 +17,7 @@ #include "module_psi/psi.h" #ifdef __MPI -#include "module_base/parallel_global.h" +#include "source_base/parallel_global.h" #include "module_basis/module_pw/test/test_tool.h" #include "mpi.h" #endif diff --git a/source/module_io/test/read_wfc_pw_test.cpp b/source/module_io/test/read_wfc_pw_test.cpp index 2c17de3a15..caf4a090b1 100644 --- a/source/module_io/test/read_wfc_pw_test.cpp +++ b/source/module_io/test/read_wfc_pw_test.cpp @@ -6,7 +6,7 @@ #include "gmock/gmock.h" #include "gtest/gtest.h" #ifdef __MPI -#include "module_base/parallel_global.h" +#include "source_base/parallel_global.h" #include "module_basis/module_pw/test/test_tool.h" #include "mpi.h" #endif diff --git a/source/module_io/test/single_R_io_test.cpp b/source/module_io/test/single_R_io_test.cpp index 7b142fa25f..54c53a54a9 100644 --- a/source/module_io/test/single_R_io_test.cpp +++ b/source/module_io/test/single_R_io_test.cpp @@ -4,7 +4,7 @@ #include "module_parameter/parameter.h" #undef private #include "module_io/single_R_io.h" -#include "module_base/global_variable.h" +#include "source_base/global_variable.h" #include "module_basis/module_ao/parallel_orbitals.h" /************************************************ * unit test of output_single_R diff --git a/source/module_io/test/write_istate_info_test.cpp b/source/module_io/test/write_istate_info_test.cpp index e17fb2c72e..6a2ea58eed 100644 --- a/source/module_io/test/write_istate_info_test.cpp +++ b/source/module_io/test/write_istate_info_test.cpp @@ -1,4 +1,4 @@ -#include "module_base/global_variable.h" +#include "source_base/global_variable.h" #define private public #include "module_parameter/parameter.h" @@ -7,7 +7,7 @@ #include "gtest/gtest.h" #include #ifdef __MPI -#include "module_base/parallel_global.h" +#include "source_base/parallel_global.h" #include "module_cell/parallel_kpoints.h" #include "mpi.h" #endif diff --git a/source/module_io/test/write_wfc_nao_test.cpp b/source/module_io/test/write_wfc_nao_test.cpp index 844b23883f..a564169e05 100644 --- a/source/module_io/test/write_wfc_nao_test.cpp +++ b/source/module_io/test/write_wfc_nao_test.cpp @@ -5,8 +5,8 @@ #include "module_parameter/parameter.h" #undef private #include "../binstream.h" -#include "module_base/global_variable.h" -#include "module_base/scalapack_connector.h" +#include "source_base/global_variable.h" +#include "source_base/scalapack_connector.h" #include "gmock/gmock.h" #include "gtest/gtest.h" diff --git a/source/module_io/test_serial/CMakeLists.txt b/source/module_io/test_serial/CMakeLists.txt index 807a32c8f0..be54c7bf82 100644 --- a/source/module_io/test_serial/CMakeLists.txt +++ b/source/module_io/test_serial/CMakeLists.txt @@ -28,8 +28,8 @@ AddTest( TARGET MODULE_IO_read_input_serial LIBS parameter ${math_libs} io_input_serial SOURCES read_input_test.cpp - ../../module_base/test/tool_quit_no_exit.cpp - ../../module_base/module_device/device.cpp + ../../source_base/test/tool_quit_no_exit.cpp + ../../source_base/module_device/device.cpp ) AddTest( diff --git a/source/module_io/test_serial/io_system_variable_test.cpp b/source/module_io/test_serial/io_system_variable_test.cpp index 499399a69d..05de7baec1 100644 --- a/source/module_io/test_serial/io_system_variable_test.cpp +++ b/source/module_io/test_serial/io_system_variable_test.cpp @@ -5,7 +5,7 @@ #include "gmock/gmock.h" #include "gtest/gtest.h" -#include "module_base/tool_quit.h" +#include "source_base/tool_quit.h" /************************************************ * unit test of read_input_test_item.cpp ***********************************************/ diff --git a/source/module_io/test_serial/prepare_unitcell.h b/source/module_io/test_serial/prepare_unitcell.h index 25005fcc50..0ae5df18d3 100644 --- a/source/module_io/test_serial/prepare_unitcell.h +++ b/source/module_io/test_serial/prepare_unitcell.h @@ -2,7 +2,7 @@ #define PREPARE_UNITCELL_H #include #include -#include "module_base/mathzone.h" +#include "source_base/mathzone.h" class UcellTestPrepare { diff --git a/source/module_io/test_serial/read_input_item_test.cpp b/source/module_io/test_serial/read_input_item_test.cpp index 863b1d0a9d..edba8327c4 100644 --- a/source/module_io/test_serial/read_input_item_test.cpp +++ b/source/module_io/test_serial/read_input_item_test.cpp @@ -5,7 +5,7 @@ #include "gmock/gmock.h" #include "gtest/gtest.h" -#include "module_base/tool_quit.h" +#include "source_base/tool_quit.h" /************************************************ * unit test of read_input_test_item.cpp ***********************************************/ diff --git a/source/module_io/test_serial/read_input_test.cpp b/source/module_io/test_serial/read_input_test.cpp index d3c95d4149..9a00f9c278 100644 --- a/source/module_io/test_serial/read_input_test.cpp +++ b/source/module_io/test_serial/read_input_test.cpp @@ -1,6 +1,6 @@ #include "module_io/read_input.h" -#include "module_base/tool_quit.h" +#include "source_base/tool_quit.h" #include "module_parameter/parameter.h" #include "gmock/gmock.h" diff --git a/source/module_io/test_serial/rho_io_test.cpp b/source/module_io/test_serial/rho_io_test.cpp index 339da2ae3f..bb79bf4b91 100644 --- a/source/module_io/test_serial/rho_io_test.cpp +++ b/source/module_io/test_serial/rho_io_test.cpp @@ -2,7 +2,7 @@ #include "gmock/gmock.h" #include "gtest/gtest.h" -#include "module_base/global_variable.h" +#include "source_base/global_variable.h" #include "module_io/cube_io.h" #include "prepare_unitcell.h" #include "module_hamilt_pw/hamilt_pwdft/parallel_grid.h" diff --git a/source/module_io/to_qo.h b/source/module_io/to_qo.h index ecbcf5b287..3821f6c32b 100644 --- a/source/module_io/to_qo.h +++ b/source/module_io/to_qo.h @@ -5,8 +5,8 @@ #include #include "module_cell/unitcell.h" #include "module_basis/module_nao/two_center_integrator.h" -#include "module_base/atom_in.h" -#include "module_base/vector3.h" +#include "source_base/atom_in.h" +#include "source_base/vector3.h" /* Quasiatomic Orbital (QO) transformation and analysis diff --git a/source/module_io/to_qo_kernel.cpp b/source/module_io/to_qo_kernel.cpp index 0b4008bc09..4404f15c10 100644 --- a/source/module_io/to_qo_kernel.cpp +++ b/source/module_io/to_qo_kernel.cpp @@ -1,9 +1,9 @@ -#include "module_base/libm/libm.h" -#include "module_base/ylm.h" +#include "source_base/libm/libm.h" +#include "source_base/ylm.h" #include "module_basis/module_nao/two_center_integrator.h" #include "module_io/to_qo.h" #ifdef __MPI -#include "module_base/parallel_common.h" +#include "source_base/parallel_common.h" #endif // how define QO task, how create QO instance toQO::toQO(const std::string& qo_basis, diff --git a/source/module_io/to_qo_mpi.cpp b/source/module_io/to_qo_mpi.cpp index 52c198ba92..4de45c1447 100644 --- a/source/module_io/to_qo_mpi.cpp +++ b/source/module_io/to_qo_mpi.cpp @@ -1,6 +1,6 @@ #include "module_io/to_qo.h" #ifdef __MPI -#include "../module_base/parallel_common.h" +#include "../source_base/parallel_common.h" #endif void toQO::bcast_stdvector_ofvector3int(std::vector>& vec, diff --git a/source/module_io/to_qo_structures.cpp b/source/module_io/to_qo_structures.cpp index db598672d2..347197b14f 100644 --- a/source/module_io/to_qo_structures.cpp +++ b/source/module_io/to_qo_structures.cpp @@ -1,6 +1,6 @@ #include "module_io/to_qo.h" #ifdef __MPI -#include "../module_base/parallel_common.h" +#include "../source_base/parallel_common.h" #endif void toQO::read_structures(const UnitCell* p_ucell, const std::vector>& kvecs_d, diff --git a/source/module_io/to_wannier90.cpp b/source/module_io/to_wannier90.cpp index beec844526..2ee7b276dc 100644 --- a/source/module_io/to_wannier90.cpp +++ b/source/module_io/to_wannier90.cpp @@ -1,10 +1,10 @@ #include "to_wannier90.h" #include "module_parameter/parameter.h" -#include "module_base/math_integral.h" -#include "module_base/math_polyint.h" -#include "module_base/math_sphbes.h" -#include "module_base/math_ylmreal.h" +#include "source_base/math_integral.h" +#include "source_base/math_polyint.h" +#include "source_base/math_sphbes.h" +#include "source_base/math_ylmreal.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" toWannier90::toWannier90() diff --git a/source/module_io/to_wannier90.h b/source/module_io/to_wannier90.h index 4d93bcb2f9..abd2c3abec 100644 --- a/source/module_io/to_wannier90.h +++ b/source/module_io/to_wannier90.h @@ -8,17 +8,17 @@ #include #include -#include "module_base/complexmatrix.h" -#include "module_base/global_function.h" -#include "module_base/global_variable.h" -#include "module_base/lapack_connector.h" -#include "module_base/matrix.h" -#include "module_base/matrix3.h" +#include "source_base/complexmatrix.h" +#include "source_base/global_function.h" +#include "source_base/global_variable.h" +#include "source_base/lapack_connector.h" +#include "source_base/matrix.h" +#include "source_base/matrix3.h" #include "module_cell/klist.h" #include "module_hamilt_lcao/hamilt_lcaodft/wavefunc_in_pw.h" #include "module_psi/psi.h" -#include "module_base/parallel_common.h" -#include "module_base/parallel_reduce.h" +#include "source_base/parallel_common.h" +#include "source_base/parallel_reduce.h" class toWannier90 { diff --git a/source/module_io/to_wannier90_lcao.cpp b/source/module_io/to_wannier90_lcao.cpp index e55b19d8f5..e4ad647a4a 100644 --- a/source/module_io/to_wannier90_lcao.cpp +++ b/source/module_io/to_wannier90_lcao.cpp @@ -2,12 +2,12 @@ #include "module_parameter/parameter.h" #include "fR_overlap.h" -#include "module_base/math_integral.h" -#include "module_base/math_polyint.h" -#include "module_base/math_sphbes.h" -#include "module_base/math_ylmreal.h" -#include "module_base/parallel_reduce.h" -#include "module_base/scalapack_connector.h" +#include "source_base/math_integral.h" +#include "source_base/math_polyint.h" +#include "source_base/math_sphbes.h" +#include "source_base/math_ylmreal.h" +#include "source_base/parallel_reduce.h" +#include "source_base/scalapack_connector.h" #include "module_hamilt_lcao/module_hcontainer/atom_pair.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" diff --git a/source/module_io/to_wannier90_lcao.h b/source/module_io/to_wannier90_lcao.h index 547d1ef21e..a812fd213b 100644 --- a/source/module_io/to_wannier90_lcao.h +++ b/source/module_io/to_wannier90_lcao.h @@ -1,18 +1,18 @@ #ifndef TOWannier90_LCAO_H #define TOWannier90_LCAO_H -#include "module_base/abfs-vector3_order.h" -#include "module_base/complexmatrix.h" -#include "module_base/global_function.h" -#include "module_base/global_variable.h" -#include "module_base/lapack_connector.h" -#include "module_base/matrix.h" -#include "module_base/matrix3.h" -#include "module_base/parallel_reduce.h" -#include "module_base/sph_bessel_recursive.h" -#include "module_base/timer.h" -#include "module_base/vector3.h" -#include "module_base/ylm.h" +#include "source_base/abfs-vector3_order.h" +#include "source_base/complexmatrix.h" +#include "source_base/global_function.h" +#include "source_base/global_variable.h" +#include "source_base/lapack_connector.h" +#include "source_base/matrix.h" +#include "source_base/matrix3.h" +#include "source_base/parallel_reduce.h" +#include "source_base/sph_bessel_recursive.h" +#include "source_base/timer.h" +#include "source_base/vector3.h" +#include "source_base/ylm.h" #include "module_basis/module_ao/ORB_atomic_lm.h" #include "module_basis/module_ao/ORB_gaunt_table.h" #include "module_basis/module_ao/ORB_read.h" @@ -38,8 +38,8 @@ #ifdef __LCAO #include "fR_overlap.h" -#include "module_base/abfs-vector3_order.h" -#include "module_base/math_lebedev_laikov.h" +#include "source_base/abfs-vector3_order.h" +#include "source_base/math_lebedev_laikov.h" #include "module_hamilt_lcao/module_gint/grid_technique.h" #include "module_hamilt_lcao/module_hcontainer/hcontainer.h" diff --git a/source/module_io/to_wannier90_lcao_in_pw.cpp b/source/module_io/to_wannier90_lcao_in_pw.cpp index e067671465..af7180b179 100644 --- a/source/module_io/to_wannier90_lcao_in_pw.cpp +++ b/source/module_io/to_wannier90_lcao_in_pw.cpp @@ -2,11 +2,11 @@ #include "module_parameter/parameter.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" -#include "module_base/math_integral.h" -#include "module_base/math_polyint.h" -#include "module_base/math_sphbes.h" -#include "module_base/math_ylmreal.h" -#include "module_base/parallel_reduce.h" +#include "source_base/math_integral.h" +#include "source_base/math_polyint.h" +#include "source_base/math_sphbes.h" +#include "source_base/math_ylmreal.h" +#include "source_base/parallel_reduce.h" #include "binstream.h" #include "module_psi/psi_initializer_nao.h" diff --git a/source/module_io/to_wannier90_lcao_in_pw.h b/source/module_io/to_wannier90_lcao_in_pw.h index 16bccd20e3..b5bd1a81f5 100644 --- a/source/module_io/to_wannier90_lcao_in_pw.h +++ b/source/module_io/to_wannier90_lcao_in_pw.h @@ -1,17 +1,17 @@ #ifndef W_ABACUS_DEVELOP_ABACUS_DEVELOP_SOURCE_MODULE_IO_TO_WANNIER90_LCAO_IN_PW_H #define W_ABACUS_DEVELOP_ABACUS_DEVELOP_SOURCE_MODULE_IO_TO_WANNIER90_LCAO_IN_PW_H -#include "module_base/abfs-vector3_order.h" -#include "module_base/complexmatrix.h" -#include "module_base/global_function.h" -#include "module_base/global_variable.h" -#include "module_base/lapack_connector.h" -#include "module_base/matrix.h" -#include "module_base/matrix3.h" -#include "module_base/parallel_reduce.h" -#include "module_base/timer.h" -#include "module_base/vector3.h" -#include "module_base/ylm.h" +#include "source_base/abfs-vector3_order.h" +#include "source_base/complexmatrix.h" +#include "source_base/global_function.h" +#include "source_base/global_variable.h" +#include "source_base/lapack_connector.h" +#include "source_base/matrix.h" +#include "source_base/matrix3.h" +#include "source_base/parallel_reduce.h" +#include "source_base/timer.h" +#include "source_base/vector3.h" +#include "source_base/ylm.h" #include "module_basis/module_ao/ORB_atomic_lm.h" #include "module_basis/module_ao/ORB_gaunt_table.h" #include "module_basis/module_ao/ORB_read.h" diff --git a/source/module_io/to_wannier90_pw.cpp b/source/module_io/to_wannier90_pw.cpp index 1fa81a89aa..fe9354f778 100644 --- a/source/module_io/to_wannier90_pw.cpp +++ b/source/module_io/to_wannier90_pw.cpp @@ -2,11 +2,11 @@ #include "module_parameter/parameter.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" -#include "module_base/math_integral.h" -#include "module_base/math_polyint.h" -#include "module_base/math_sphbes.h" -#include "module_base/math_ylmreal.h" -#include "module_base/parallel_reduce.h" +#include "source_base/math_integral.h" +#include "source_base/math_polyint.h" +#include "source_base/math_sphbes.h" +#include "source_base/math_ylmreal.h" +#include "source_base/parallel_reduce.h" #include "binstream.h" toWannier90_PW::toWannier90_PW( diff --git a/source/module_io/to_wannier90_pw.h b/source/module_io/to_wannier90_pw.h index f7f5768ff2..bc5abcbc42 100644 --- a/source/module_io/to_wannier90_pw.h +++ b/source/module_io/to_wannier90_pw.h @@ -9,12 +9,12 @@ #include "to_wannier90.h" -#include "module_base/complexmatrix.h" -#include "module_base/global_function.h" -#include "module_base/global_variable.h" -#include "module_base/lapack_connector.h" -#include "module_base/matrix.h" -#include "module_base/matrix3.h" +#include "source_base/complexmatrix.h" +#include "source_base/global_function.h" +#include "source_base/global_variable.h" +#include "source_base/lapack_connector.h" +#include "source_base/matrix.h" +#include "source_base/matrix3.h" #include "module_cell/klist.h" #include "module_hamilt_lcao/hamilt_lcaodft/wavefunc_in_pw.h" #include "module_psi/psi.h" diff --git a/source/module_io/unk_overlap_lcao.cpp b/source/module_io/unk_overlap_lcao.cpp index 3f1806ab44..3017e869ee 100644 --- a/source/module_io/unk_overlap_lcao.cpp +++ b/source/module_io/unk_overlap_lcao.cpp @@ -2,7 +2,7 @@ #include "module_parameter/parameter.h" #include "ctime" -#include "module_base/scalapack_connector.h" +#include "source_base/scalapack_connector.h" #include "module_cell/module_neighbor/sltk_grid_driver.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" diff --git a/source/module_io/unk_overlap_lcao.h b/source/module_io/unk_overlap_lcao.h index 241ac3d775..6ce1140e12 100644 --- a/source/module_io/unk_overlap_lcao.h +++ b/source/module_io/unk_overlap_lcao.h @@ -1,9 +1,9 @@ #ifndef UNKOVERLAP_LCAO #define UNKOVERLAP_LCAO -#include "module_base/sph_bessel_recursive.h" -#include "module_base/vector3.h" -#include "module_base/ylm.h" +#include "source_base/sph_bessel_recursive.h" +#include "source_base/vector3.h" +#include "source_base/ylm.h" #include "module_basis/module_ao/ORB_atomic_lm.h" #include "module_basis/module_ao/ORB_gaunt_table.h" #include "module_basis/module_ao/ORB_read.h" diff --git a/source/module_io/unk_overlap_pw.h b/source/module_io/unk_overlap_pw.h index 351532f892..4bf7dcd4eb 100644 --- a/source/module_io/unk_overlap_pw.h +++ b/source/module_io/unk_overlap_pw.h @@ -6,11 +6,11 @@ #include #include -#include "module_base/complexmatrix.h" -#include "module_base/global_variable.h" -#include "module_base/lapack_connector.h" -#include "module_base/parallel_reduce.h" -#include "module_base/vector3.h" +#include "source_base/complexmatrix.h" +#include "source_base/global_variable.h" +#include "source_base/lapack_connector.h" +#include "source_base/parallel_reduce.h" +#include "source_base/vector3.h" #include "module_basis/module_pw/pw_basis.h" #include "module_basis/module_pw/pw_basis_k.h" #include "module_psi/psi.h" diff --git a/source/module_io/winput.cpp b/source/module_io/winput.cpp index 2b3a3f9d29..70e8343b44 100644 --- a/source/module_io/winput.cpp +++ b/source/module_io/winput.cpp @@ -690,7 +690,7 @@ void winput::Print(const std::string& fn) return; } -#include "module_base/parallel_common.h" +#include "source_base/parallel_common.h" #ifdef __MPI void winput::Bcast() { diff --git a/source/module_io/write_HS.h b/source/module_io/write_HS.h index 1226f841a8..868e81db6c 100644 --- a/source/module_io/write_HS.h +++ b/source/module_io/write_HS.h @@ -4,8 +4,8 @@ #include #include -//#include "module_base/global_function.h" -//#include "module_base/global_variable.h" +//#include "source_base/global_function.h" +//#include "source_base/global_variable.h" #include "module_basis/module_ao/parallel_orbitals.h" // use Parallel_Orbitals diff --git a/source/module_io/write_HS.hpp b/source/module_io/write_HS.hpp index 7be1d23c52..aad753eabe 100644 --- a/source/module_io/write_HS.hpp +++ b/source/module_io/write_HS.hpp @@ -1,8 +1,8 @@ #include "write_HS.h" #include "module_parameter/parameter.h" -#include "module_base/parallel_reduce.h" -#include "module_base/timer.h" +#include "source_base/parallel_reduce.h" +#include "source_base/timer.h" #include "module_cell/module_neighbor/sltk_grid_driver.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" #include "module_io/filename.h" // use filename_output function diff --git a/source/module_io/write_HS_R.cpp b/source/module_io/write_HS_R.cpp index 97a0fd4d3b..90349de747 100644 --- a/source/module_io/write_HS_R.cpp +++ b/source/module_io/write_HS_R.cpp @@ -1,7 +1,7 @@ #include "write_HS_R.h" #include "module_parameter/parameter.h" -#include "module_base/timer.h" +#include "source_base/timer.h" #include "module_hamilt_lcao/hamilt_lcaodft/LCAO_HS_arrays.hpp" #include "module_hamilt_lcao/hamilt_lcaodft/spar_dh.h" #include "module_hamilt_lcao/hamilt_lcaodft/spar_hsr.h" diff --git a/source/module_io/write_HS_R.h b/source/module_io/write_HS_R.h index 37ab95562d..27b59566ae 100644 --- a/source/module_io/write_HS_R.h +++ b/source/module_io/write_HS_R.h @@ -1,7 +1,7 @@ #ifndef WRITE_HS_R_H #define WRITE_HS_R_H -#include "module_base/matrix.h" +#include "source_base/matrix.h" #include "module_basis/module_nao/two_center_bundle.h" #include "module_cell/klist.h" #include "module_hamilt_general/hamilt.h" diff --git a/source/module_io/write_HS_sparse.cpp b/source/module_io/write_HS_sparse.cpp index 4b105e0e7c..f6a6f264e8 100644 --- a/source/module_io/write_HS_sparse.cpp +++ b/source/module_io/write_HS_sparse.cpp @@ -1,8 +1,8 @@ #include "write_HS_sparse.h" #include "module_parameter/parameter.h" -#include "module_base/parallel_reduce.h" -#include "module_base/timer.h" +#include "source_base/parallel_reduce.h" +#include "source_base/timer.h" #include "module_hamilt_lcao/module_tddft/td_velocity.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" #include "single_R_io.h" diff --git a/source/module_io/write_HS_sparse.h b/source/module_io/write_HS_sparse.h index b3e0a2a75c..236f15e2bc 100644 --- a/source/module_io/write_HS_sparse.h +++ b/source/module_io/write_HS_sparse.h @@ -1,8 +1,8 @@ #ifndef WRITE_HS_SPARSE_H #define WRITE_HS_SPARSE_H -#include "module_base/global_function.h" -#include "module_base/global_variable.h" +#include "source_base/global_function.h" +#include "source_base/global_variable.h" #include "module_basis/module_ao/parallel_orbitals.h" #include "module_hamilt_lcao/hamilt_lcaodft/LCAO_HS_arrays.hpp" diff --git a/source/module_io/write_cube.cpp b/source/module_io/write_cube.cpp index acff92eac1..3427d444cd 100644 --- a/source/module_io/write_cube.cpp +++ b/source/module_io/write_cube.cpp @@ -1,5 +1,5 @@ -#include "module_base/element_name.h" -#include "module_base/parallel_comm.h" +#include "source_base/element_name.h" +#include "source_base/parallel_comm.h" #include "module_hamilt_pw/hamilt_pwdft/parallel_grid.h" #include "module_io/cube_io.h" #include "module_parameter/parameter.h" diff --git a/source/module_io/write_dipole.cpp b/source/module_io/write_dipole.cpp index e1a7c0fa4d..9b62038fb0 100644 --- a/source/module_io/write_dipole.cpp +++ b/source/module_io/write_dipole.cpp @@ -1,4 +1,4 @@ -#include "module_base/parallel_reduce.h" +#include "source_base/parallel_reduce.h" #include "module_elecstate/module_charge/charge.h" #include "module_hamilt_lcao/module_tddft/evolve_elec.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" diff --git a/source/module_io/write_dos_lcao.h b/source/module_io/write_dos_lcao.h index 406e0eb871..8a9d4ef511 100644 --- a/source/module_io/write_dos_lcao.h +++ b/source/module_io/write_dos_lcao.h @@ -1,7 +1,7 @@ #ifndef WRITE_DOS_LCAO_H #define WRITE_DOS_LCAO_H -#include "module_base/matrix.h" // use matrix +#include "source_base/matrix.h" // use matrix #include "module_cell/klist.h" // use K_Vectors #include "module_psi/psi.h" // use psi::Psi #include "module_hamilt_general/hamilt.h" // use hamilt::Hamilt diff --git a/source/module_io/write_dos_pw.cpp b/source/module_io/write_dos_pw.cpp index 76a9bc60de..8560455c8d 100644 --- a/source/module_io/write_dos_pw.cpp +++ b/source/module_io/write_dos_pw.cpp @@ -1,7 +1,7 @@ #include "write_dos_pw.h" #include "cal_dos.h" #include "nscf_fermi_surf.h" -#include "module_base/parallel_reduce.h" +#include "source_base/parallel_reduce.h" #include "module_parameter/parameter.h" void ModuleIO::write_dos_pw( diff --git a/source/module_io/write_dos_pw.h b/source/module_io/write_dos_pw.h index b57eb54024..1d4a9cc57c 100644 --- a/source/module_io/write_dos_pw.h +++ b/source/module_io/write_dos_pw.h @@ -1,7 +1,7 @@ #ifndef WRITE_DOS_PW_H #define WRITE_DOS_PW_H -#include "module_base/matrix.h" +#include "source_base/matrix.h" #include "module_cell/unitcell.h" #include "module_cell/klist.h" #include "module_elecstate/fp_energy.h" diff --git a/source/module_io/write_elecstat_pot.cpp b/source/module_io/write_elecstat_pot.cpp index 714fe71f49..59f000c943 100644 --- a/source/module_io/write_elecstat_pot.cpp +++ b/source/module_io/write_elecstat_pot.cpp @@ -1,5 +1,5 @@ -#include "module_base/element_name.h" -#include "module_base/timer.h" +#include "source_base/element_name.h" +#include "source_base/timer.h" #include "module_parameter/parameter.h" #include "module_elecstate/module_pot/H_Hartree_pw.h" #include "module_elecstate/module_pot/efield.h" diff --git a/source/module_io/write_istate_info.cpp b/source/module_io/write_istate_info.cpp index d6894066ee..3cb187bf6a 100644 --- a/source/module_io/write_istate_info.cpp +++ b/source/module_io/write_istate_info.cpp @@ -1,10 +1,10 @@ #include "write_istate_info.h" #include "module_parameter/parameter.h" -#include "module_base/global_function.h" -#include "module_base/global_variable.h" -#include "module_base/timer.h" -#include "module_base/parallel_comm.h" // use POOL_WORLD +#include "source_base/global_function.h" +#include "source_base/global_variable.h" +#include "source_base/timer.h" +#include "source_base/parallel_comm.h" // use POOL_WORLD #ifdef __MPI #include // use MPI_Barrier diff --git a/source/module_io/write_istate_info.h b/source/module_io/write_istate_info.h index 723f1efa93..279f8c8217 100644 --- a/source/module_io/write_istate_info.h +++ b/source/module_io/write_istate_info.h @@ -1,6 +1,6 @@ #ifndef WRITE_ISTATE_INFO_H #define WRITE_ISTATE_INFO_H -#include "module_base/matrix.h" +#include "source_base/matrix.h" #include "module_cell/klist.h" #include "module_cell/parallel_kpoints.h" diff --git a/source/module_io/write_libxc_r.cpp b/source/module_io/write_libxc_r.cpp index 076a8d02c9..1ecab61673 100644 --- a/source/module_io/write_libxc_r.cpp +++ b/source/module_io/write_libxc_r.cpp @@ -12,10 +12,10 @@ #include "module_basis/module_pw/pw_basis_big.h" #include "module_basis/module_pw/pw_basis.h" #include "module_io/cube_io.h" -#include "module_base/global_variable.h" +#include "source_base/global_variable.h" #include "module_parameter/parameter.h" -#include "module_base/timer.h" -#include "module_base/tool_title.h" +#include "source_base/timer.h" +#include "source_base/tool_title.h" #include #include diff --git a/source/module_io/write_orb_info.cpp b/source/module_io/write_orb_info.cpp index 399a6f426b..48ede9452b 100644 --- a/source/module_io/write_orb_info.cpp +++ b/source/module_io/write_orb_info.cpp @@ -1,7 +1,7 @@ #include "write_orb_info.h" #include "module_parameter/parameter.h" -#include "module_base/name_angular.h" +#include "source_base/name_angular.h" #include "module_cell/atom_spec.h" void ModuleIO::write_orb_info(const UnitCell* ucell) diff --git a/source/module_io/write_pao.cpp b/source/module_io/write_pao.cpp index 5e1a30e79a..f145263a03 100644 --- a/source/module_io/write_pao.cpp +++ b/source/module_io/write_pao.cpp @@ -1,5 +1,5 @@ #include "write_pao.h" -#include "module_base/global_variable.h" +#include "source_base/global_variable.h" #include "module_parameter/parameter.h" #include diff --git a/source/module_io/write_proj_band_lcao.cpp b/source/module_io/write_proj_band_lcao.cpp index c08c301477..a2efb276c7 100644 --- a/source/module_io/write_proj_band_lcao.cpp +++ b/source/module_io/write_proj_band_lcao.cpp @@ -1,10 +1,10 @@ #include "write_proj_band_lcao.h" #include "module_parameter/parameter.h" -#include "module_base/global_function.h" -#include "module_base/global_variable.h" -#include "module_base/scalapack_connector.h" -#include "module_base/timer.h" +#include "source_base/global_function.h" +#include "source_base/global_variable.h" +#include "source_base/scalapack_connector.h" +#include "source_base/timer.h" #include "module_cell/module_neighbor/sltk_atom_arrange.h" #include "write_orb_info.h" #include "module_hamilt_lcao/hamilt_lcaodft/hamilt_lcao.h" diff --git a/source/module_io/write_vxc.hpp b/source/module_io/write_vxc.hpp index db4a576f12..d4de7fd7a0 100644 --- a/source/module_io/write_vxc.hpp +++ b/source/module_io/write_vxc.hpp @@ -1,9 +1,9 @@ #ifndef __WRITE_VXC_H_ #define __WRITE_VXC_H_ #include "module_parameter/parameter.h" -#include "module_base/parallel_reduce.h" -#include "module_base/module_container/base/third_party/blas.h" -#include "module_base/scalapack_connector.h" +#include "source_base/parallel_reduce.h" +#include "source_base/module_container/base/third_party/blas.h" +#include "source_base/scalapack_connector.h" #include "module_hamilt_lcao/hamilt_lcaodft/operator_lcao/op_dftu_lcao.h" #include "module_hamilt_lcao/hamilt_lcaodft/operator_lcao/veff_lcao.h" #include "module_psi/psi.h" diff --git a/source/module_io/write_vxc_lip.hpp b/source/module_io/write_vxc_lip.hpp index 9f146e6506..288c470be0 100644 --- a/source/module_io/write_vxc_lip.hpp +++ b/source/module_io/write_vxc_lip.hpp @@ -1,8 +1,8 @@ #ifndef __WRITE_VXC_LIP_H_ #define __WRITE_VXC_LIP_H_ #include "module_parameter/parameter.h" -#include "module_base/parallel_reduce.h" -#include "module_base/module_container/base/third_party/blas.h" +#include "source_base/parallel_reduce.h" +#include "source_base/module_container/base/third_party/blas.h" #include "module_hamilt_pw/hamilt_pwdft/operator_pw/veff_pw.h" #include "module_psi/psi.h" #include "module_cell/unitcell.h" diff --git a/source/module_io/write_vxc_r.hpp b/source/module_io/write_vxc_r.hpp index 2986648415..29cef9e588 100644 --- a/source/module_io/write_vxc_r.hpp +++ b/source/module_io/write_vxc_r.hpp @@ -1,7 +1,7 @@ #ifndef __WRITE_VXC_R_H_ #define __WRITE_VXC_R_H_ #include "module_parameter/parameter.h" -#include "module_base/scalapack_connector.h" +#include "source_base/scalapack_connector.h" #include "module_hamilt_lcao/hamilt_lcaodft/operator_lcao/op_dftu_lcao.h" #include "module_hamilt_lcao/hamilt_lcaodft/operator_lcao/veff_lcao.h" #include "module_hamilt_lcao/hamilt_lcaodft/spar_hsr.h" diff --git a/source/module_io/write_wfc_nao.cpp b/source/module_io/write_wfc_nao.cpp index 0857924d1a..162a280b13 100644 --- a/source/module_io/write_wfc_nao.cpp +++ b/source/module_io/write_wfc_nao.cpp @@ -1,13 +1,13 @@ #include "write_wfc_nao.h" #include "module_parameter/parameter.h" -#include "module_base/memory.h" -#include "module_base/timer.h" -#include "module_base/tool_title.h" -#include "module_base/parallel_2d.h" -#include "module_base/scalapack_connector.h" -#include "module_base/global_variable.h" -#include "module_base/global_function.h" +#include "source_base/memory.h" +#include "source_base/timer.h" +#include "source_base/tool_title.h" +#include "source_base/parallel_2d.h" +#include "source_base/scalapack_connector.h" +#include "source_base/global_variable.h" +#include "source_base/global_function.h" #include "binstream.h" #include "filename.h" diff --git a/source/module_io/write_wfc_nao.h b/source/module_io/write_wfc_nao.h index 4c8a5138ab..10960b63b0 100644 --- a/source/module_io/write_wfc_nao.h +++ b/source/module_io/write_wfc_nao.h @@ -1,9 +1,9 @@ #ifndef WRITE_WFC_NAO_H #define WRITE_WFC_NAO_H -#include "module_base/matrix.h" +#include "source_base/matrix.h" #include "module_basis/module_ao/parallel_orbitals.h" #include "module_psi/psi.h" -#include "module_base/vector3.h" +#include "source_base/vector3.h" #include namespace ModuleIO diff --git a/source/module_io/write_wfc_pw.cpp b/source/module_io/write_wfc_pw.cpp index 2f63f850e7..31e52d8f01 100644 --- a/source/module_io/write_wfc_pw.cpp +++ b/source/module_io/write_wfc_pw.cpp @@ -5,9 +5,9 @@ #endif #include "binstream.h" -#include "module_base/global_variable.h" -#include "module_base/parallel_global.h" -#include "module_base/tool_title.h" +#include "source_base/global_variable.h" +#include "source_base/parallel_global.h" +#include "source_base/tool_title.h" #include "module_parameter/parameter.h" #include "module_io/filename.h" diff --git a/source/module_io/write_wfc_r.cpp b/source/module_io/write_wfc_r.cpp index 0eb5c0a25e..1a52e581b9 100644 --- a/source/module_io/write_wfc_r.cpp +++ b/source/module_io/write_wfc_r.cpp @@ -9,8 +9,8 @@ // Taoni add 2024-10-08 //====================== -#include "module_base/timer.h" -#include "module_base/tool_title.h" +#include "source_base/timer.h" +#include "source_base/tool_title.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" #include "write_wfc_r.h" diff --git a/source/module_io/write_wfc_r.h b/source/module_io/write_wfc_r.h index 3ec5b1913f..f09bf84764 100644 --- a/source/module_io/write_wfc_r.h +++ b/source/module_io/write_wfc_r.h @@ -9,8 +9,8 @@ #include #include -#include "module_base/complexmatrix.h" -#include "module_base/vector3.h" +#include "source_base/complexmatrix.h" +#include "source_base/vector3.h" #include "module_basis/module_pw/pw_basis_k.h" #include "module_cell/klist.h" #include "module_psi/psi.h" diff --git a/source/module_lr/ao_to_mo_transformer/ao_to_mo.h b/source/module_lr/ao_to_mo_transformer/ao_to_mo.h index 23d42271d8..e8fd50ab04 100644 --- a/source/module_lr/ao_to_mo_transformer/ao_to_mo.h +++ b/source/module_lr/ao_to_mo_transformer/ao_to_mo.h @@ -3,7 +3,7 @@ #include "module_psi/psi.h" #include #ifdef __MPI -#include "module_base/parallel_2d.h" +#include "source_base/parallel_2d.h" #endif namespace LR { diff --git a/source/module_lr/ao_to_mo_transformer/ao_to_mo_parallel.cpp b/source/module_lr/ao_to_mo_transformer/ao_to_mo_parallel.cpp index 2cadd4ac0c..2740664858 100644 --- a/source/module_lr/ao_to_mo_transformer/ao_to_mo_parallel.cpp +++ b/source/module_lr/ao_to_mo_transformer/ao_to_mo_parallel.cpp @@ -1,7 +1,7 @@ #ifdef __MPI #include "ao_to_mo.h" -#include "module_base/scalapack_connector.h" -#include "module_base/tool_title.h" +#include "source_base/scalapack_connector.h" +#include "source_base/tool_title.h" #include "module_lr/utils/lr_util.h" #include "module_lr/utils/lr_util_print.h" namespace LR diff --git a/source/module_lr/ao_to_mo_transformer/ao_to_mo_serial.cpp b/source/module_lr/ao_to_mo_transformer/ao_to_mo_serial.cpp index 04573381a7..7d9185733a 100644 --- a/source/module_lr/ao_to_mo_transformer/ao_to_mo_serial.cpp +++ b/source/module_lr/ao_to_mo_transformer/ao_to_mo_serial.cpp @@ -1,6 +1,6 @@ #include "ao_to_mo.h" -#include "module_base/blas_connector.h" -#include "module_base/tool_title.h" +#include "source_base/blas_connector.h" +#include "source_base/tool_title.h" #include "module_lr/utils/lr_util.h" namespace LR { diff --git a/source/module_lr/dm_trans/dm_trans.h b/source/module_lr/dm_trans/dm_trans.h index a02f2999d0..e905306fad 100644 --- a/source/module_lr/dm_trans/dm_trans.h +++ b/source/module_lr/dm_trans/dm_trans.h @@ -4,7 +4,7 @@ #include "module_psi/psi.h" #include #ifdef __MPI -#include "module_base/parallel_2d.h" +#include "source_base/parallel_2d.h" #endif namespace LR { diff --git a/source/module_lr/dm_trans/dm_trans_parallel.cpp b/source/module_lr/dm_trans/dm_trans_parallel.cpp index 861a8f8ceb..a6b3ec70fe 100644 --- a/source/module_lr/dm_trans/dm_trans_parallel.cpp +++ b/source/module_lr/dm_trans/dm_trans_parallel.cpp @@ -1,7 +1,7 @@ #ifdef __MPI #include "dm_trans.h" -#include "module_base/scalapack_connector.h" -#include "module_base/tool_title.h" +#include "source_base/scalapack_connector.h" +#include "source_base/tool_title.h" #include "module_lr/utils/lr_util.h" namespace LR { diff --git a/source/module_lr/dm_trans/dm_trans_serial.cpp b/source/module_lr/dm_trans/dm_trans_serial.cpp index cf3571bfc3..398fa234fb 100644 --- a/source/module_lr/dm_trans/dm_trans_serial.cpp +++ b/source/module_lr/dm_trans/dm_trans_serial.cpp @@ -1,7 +1,7 @@ #include "dm_trans.h" -#include "module_base/blas_connector.h" -#include "module_base/tool_title.h" -#include "module_base/global_function.h" +#include "source_base/blas_connector.h" +#include "source_base/tool_title.h" +#include "source_base/global_function.h" #include "module_lr/utils/lr_util.h" namespace LR { diff --git a/source/module_lr/dm_trans/dmr_complex.cpp b/source/module_lr/dm_trans/dmr_complex.cpp index d5dc550bb1..c3331c391e 100644 --- a/source/module_lr/dm_trans/dmr_complex.cpp +++ b/source/module_lr/dm_trans/dmr_complex.cpp @@ -1,7 +1,7 @@ #include "module_elecstate/module_dm/density_matrix.h" -#include "module_base/timer.h" +#include "source_base/timer.h" #include "module_parameter/parameter.h" -#include "module_base/libm/libm.h" +#include "source_base/libm/libm.h" namespace elecstate { template<> diff --git a/source/module_lr/dm_trans/test/CMakeLists.txt b/source/module_lr/dm_trans/test/CMakeLists.txt index 6a3535b7ed..87c0e7c870 100644 --- a/source/module_lr/dm_trans/test/CMakeLists.txt +++ b/source/module_lr/dm_trans/test/CMakeLists.txt @@ -3,12 +3,12 @@ AddTest( TARGET dm_trans_test LIBS parameter psi base ${math_libs} device container SOURCES dm_trans_test.cpp ../../utils/lr_util.cpp ../dm_trans_parallel.cpp ../dm_trans_serial.cpp - # ../../../module_base/module_container/ATen/core/tensor.cpp - # ../../../module_base/module_container/ATen/core/tensor_shape.cpp - # ../../../module_base/module_container/ATen/core/tensor_buffer.cpp - # ../../../module_base/module_container/ATen/core/tensor_map.cpp - # ../../../module_base/module_container/ATen/core/tensor_types.cpp - # ../../../module_base/module_container/base/core/cpu_allocator.cpp - # ../../../module_base/module_container/base/core/refcount.cpp - # ../../../module_base/module_container/ATen/kernels/memory_impl.cpp + # ../../../source_base/module_container/ATen/core/tensor.cpp + # ../../../source_base/module_container/ATen/core/tensor_shape.cpp + # ../../../source_base/module_container/ATen/core/tensor_buffer.cpp + # ../../../source_base/module_container/ATen/core/tensor_map.cpp + # ../../../source_base/module_container/ATen/core/tensor_types.cpp + # ../../../source_base/module_container/base/core/cpu_allocator.cpp + # ../../../source_base/module_container/base/core/refcount.cpp + # ../../../source_base/module_container/ATen/kernels/memory_impl.cpp ) \ No newline at end of file diff --git a/source/module_lr/esolver_lrtd_lcao.cpp b/source/module_lr/esolver_lrtd_lcao.cpp index 88df295962..fa20c3daa5 100644 --- a/source/module_lr/esolver_lrtd_lcao.cpp +++ b/source/module_lr/esolver_lrtd_lcao.cpp @@ -13,7 +13,7 @@ #include "module_io/print_info.h" #include "module_cell/module_neighbor/sltk_atom_arrange.h" #include "module_lr/utils/lr_util_print.h" -#include "module_base/scalapack_connector.h" +#include "source_base/scalapack_connector.h" #include "module_parameter/parameter.h" #include "module_lr/ri_benchmark/ri_benchmark.h" #include "module_lr/operator_casida/operator_lr_diag.h" // for precondition diff --git a/source/module_lr/hsolver_lrtd.hpp b/source/module_lr/hsolver_lrtd.hpp index c04b7e385a..20a0c1c8f3 100644 --- a/source/module_lr/hsolver_lrtd.hpp +++ b/source/module_lr/hsolver_lrtd.hpp @@ -7,7 +7,7 @@ #include "source_hsolver/diago_cg.h" #include "module_lr/utils/lr_util.h" #include "module_lr/utils/lr_util_print.h" -#include "module_base/module_container/ATen/core/tensor_map.h" +#include "source_base/module_container/ATen/core/tensor_map.h" namespace LR { diff --git a/source/module_lr/lr_spectrum.cpp b/source/module_lr/lr_spectrum.cpp index d787718eff..d2fb10ab02 100644 --- a/source/module_lr/lr_spectrum.cpp +++ b/source/module_lr/lr_spectrum.cpp @@ -2,7 +2,7 @@ #include "module_lr/utils/lr_util.h" #include "module_parameter/parameter.h" #include "module_lr/dm_trans/dm_trans.h" -#include "module_base/parallel_reduce.h" +#include "source_base/parallel_reduce.h" #include "module_lr/utils/lr_util.h" #include "module_lr/utils/lr_util_hcontainer.h" #include "module_lr/utils/lr_util_print.h" diff --git a/source/module_lr/operator_casida/operator_lr_diag.h b/source/module_lr/operator_casida/operator_lr_diag.h index 3f28e2b9d8..b5017eb08b 100644 --- a/source/module_lr/operator_casida/operator_lr_diag.h +++ b/source/module_lr/operator_casida/operator_lr_diag.h @@ -1,9 +1,9 @@ #pragma once #include "module_lr/utils/lr_util.h" -#include "module_base/kernels/math_kernel_op.h" +#include "source_base/kernels/math_kernel_op.h" #include "module_hamilt_general/operator.h" #ifdef __MPI -#include "module_base/parallel_common.h" +#include "source_base/parallel_common.h" #endif namespace LR { diff --git a/source/module_lr/operator_casida/operator_lr_hxc.cpp b/source/module_lr/operator_casida/operator_lr_hxc.cpp index ed55c7c0c7..afb929685b 100644 --- a/source/module_lr/operator_casida/operator_lr_hxc.cpp +++ b/source/module_lr/operator_casida/operator_lr_hxc.cpp @@ -1,8 +1,8 @@ #include "operator_lr_hxc.h" #include #include "module_parameter/parameter.h" -#include "module_base/blas_connector.h" -#include "module_base/timer.h" +#include "source_base/blas_connector.h" +#include "source_base/timer.h" #include "module_lr/utils/lr_util.h" #include "module_lr/utils/lr_util_hcontainer.h" #include "module_lr/utils/lr_util_print.h" diff --git a/source/module_lr/potentials/pot_hxc_lrtd.cpp b/source/module_lr/potentials/pot_hxc_lrtd.cpp index d5aa2628ff..bdf08b852e 100644 --- a/source/module_lr/potentials/pot_hxc_lrtd.cpp +++ b/source/module_lr/potentials/pot_hxc_lrtd.cpp @@ -1,7 +1,7 @@ #include "pot_hxc_lrtd.h" #include "module_parameter/parameter.h" #include "module_elecstate/module_pot/H_Hartree_pw.h" -#include "module_base/timer.h" +#include "source_base/timer.h" #include "module_hamilt_general/module_xc/xc_functional.h" #include #include "module_lr/utils/lr_util.h" diff --git a/source/module_lr/potentials/xc_kernel.cpp b/source/module_lr/potentials/xc_kernel.cpp index 1c7bd09809..e5dfcef3fb 100644 --- a/source/module_lr/potentials/xc_kernel.cpp +++ b/source/module_lr/potentials/xc_kernel.cpp @@ -1,7 +1,7 @@ #include "xc_kernel.h" #include "module_hamilt_general/module_xc/xc_functional.h" #include "module_parameter/parameter.h" -#include "module_base/timer.h" +#include "source_base/timer.h" #include "module_lr/utils/lr_util.h" #include "module_lr/utils/lr_util_xc.hpp" #include diff --git a/source/module_lr/ri_benchmark/ri_benchmark.hpp b/source/module_lr/ri_benchmark/ri_benchmark.hpp index 82ab9249ac..501e3cf5f3 100644 --- a/source/module_lr/ri_benchmark/ri_benchmark.hpp +++ b/source/module_lr/ri_benchmark/ri_benchmark.hpp @@ -1,6 +1,6 @@ #pragma once #include "ri_benchmark.h" -#include "module_base/module_container/base/third_party/blas.h" +#include "source_base/module_container/base/third_party/blas.h" namespace RI_Benchmark { // std::cout << "the size of Cs:" << std::endl; diff --git a/source/module_lr/utils/lr_util.cpp b/source/module_lr/utils/lr_util.cpp index ceb9501e0a..d1591c6a34 100644 --- a/source/module_lr/utils/lr_util.cpp +++ b/source/module_lr/utils/lr_util.cpp @@ -1,7 +1,7 @@ -#include "module_base/constants.h" +#include "source_base/constants.h" #include "lr_util.h" -#include "module_base/lapack_connector.h" -#include "module_base/scalapack_connector.h" +#include "source_base/lapack_connector.h" +#include "source_base/scalapack_connector.h" namespace LR_Util { /// =================PHYSICS==================== diff --git a/source/module_lr/utils/lr_util.h b/source/module_lr/utils/lr_util.h index 3dafe2dd0a..4095e5cefd 100644 --- a/source/module_lr/utils/lr_util.h +++ b/source/module_lr/utils/lr_util.h @@ -2,9 +2,9 @@ #include #include #include -#include "module_base/matrix.h" -#include "module_base/complexmatrix.h" -#include "module_base/parallel_2d.h" +#include "source_base/matrix.h" +#include "source_base/complexmatrix.h" +#include "source_base/parallel_2d.h" #include "module_psi/psi.h" #include #include "module_basis/module_pw/pw_basis.h" diff --git a/source/module_lr/utils/lr_util.hpp b/source/module_lr/utils/lr_util.hpp index 5bbedf645f..b599a1a3cd 100644 --- a/source/module_lr/utils/lr_util.hpp +++ b/source/module_lr/utils/lr_util.hpp @@ -3,7 +3,7 @@ #include "lr_util.h" #include #include "module_cell/unitcell.h" -#include "module_base/constants.h" +#include "source_base/constants.h" #include "module_hamilt_general/module_xc/xc_functional.h" namespace LR_Util { diff --git a/source/module_lr/utils/lr_util_hcontainer.h b/source/module_lr/utils/lr_util_hcontainer.h index 8937d9d733..c98b031de7 100644 --- a/source/module_lr/utils/lr_util_hcontainer.h +++ b/source/module_lr/utils/lr_util_hcontainer.h @@ -1,7 +1,7 @@ #pragma once #include "module_elecstate/module_dm/density_matrix.h" #include -#include "module_base/parallel_reduce.h" +#include "source_base/parallel_reduce.h" namespace LR_Util { template diff --git a/source/module_md/fire.cpp b/source/module_md/fire.cpp index 7c638d6f4a..4a58d004b2 100644 --- a/source/module_md/fire.cpp +++ b/source/module_md/fire.cpp @@ -4,7 +4,7 @@ #ifdef __MPI #include "mpi.h" #endif -#include "module_base/timer.h" +#include "source_base/timer.h" FIRE::FIRE(const Parameter& param_in, UnitCell& unit_in) : MD_base(param_in, unit_in) { diff --git a/source/module_md/langevin.cpp b/source/module_md/langevin.cpp index 5dcae66616..6b7f1d6be8 100644 --- a/source/module_md/langevin.cpp +++ b/source/module_md/langevin.cpp @@ -1,8 +1,8 @@ #include "langevin.h" #include "md_func.h" -#include "module_base/parallel_common.h" -#include "module_base/timer.h" +#include "source_base/parallel_common.h" +#include "source_base/timer.h" Langevin::Langevin(const Parameter& param_in, UnitCell& unit_in) : MD_base(param_in, unit_in) { diff --git a/source/module_md/md_func.cpp b/source/module_md/md_func.cpp index c8c971c5ab..a02235fc1c 100644 --- a/source/module_md/md_func.cpp +++ b/source/module_md/md_func.cpp @@ -1,7 +1,7 @@ #include "md_func.h" -#include "module_base/global_variable.h" -#include "module_base/timer.h" +#include "source_base/global_variable.h" +#include "source_base/timer.h" namespace MD_func diff --git a/source/module_md/msst.cpp b/source/module_md/msst.cpp index 3ff8c7c6f9..c055b31371 100644 --- a/source/module_md/msst.cpp +++ b/source/module_md/msst.cpp @@ -5,7 +5,7 @@ #ifdef __MPI #include "mpi.h" #endif -#include "module_base/timer.h" +#include "source_base/timer.h" MSST::MSST(const Parameter& param_in, UnitCell& unit_in) : MD_base(param_in, unit_in) { diff --git a/source/module_md/nhchain.cpp b/source/module_md/nhchain.cpp index db4662f44c..ae200aa239 100644 --- a/source/module_md/nhchain.cpp +++ b/source/module_md/nhchain.cpp @@ -4,7 +4,7 @@ #ifdef __MPI #include "mpi.h" #endif -#include "module_base/timer.h" +#include "source_base/timer.h" #include "module_cell/update_cell.h" Nose_Hoover::Nose_Hoover(const Parameter& param_in, UnitCell& unit_in) : MD_base(param_in, unit_in) { diff --git a/source/module_md/run_md.cpp b/source/module_md/run_md.cpp index 5009c3dd67..dc083c603b 100644 --- a/source/module_md/run_md.cpp +++ b/source/module_md/run_md.cpp @@ -4,8 +4,8 @@ #include "fire.h" #include "langevin.h" #include "md_func.h" -#include "module_base/global_file.h" -#include "module_base/timer.h" +#include "source_base/global_file.h" +#include "source_base/timer.h" #include "module_io/print_info.h" #include "msst.h" #include "nhchain.h" diff --git a/source/module_md/test/CMakeLists.txt b/source/module_md/test/CMakeLists.txt index 70ba640b81..3224e2abde 100644 --- a/source/module_md/test/CMakeLists.txt +++ b/source/module_md/test/CMakeLists.txt @@ -19,27 +19,27 @@ list(APPEND depend_files ../../module_cell/read_pp_upf201.cpp ../../module_cell/read_pp_vwr.cpp ../../module_cell/read_pp_blps.cpp - ../../module_base/matrix3.cpp - ../../module_base/matrix.cpp - ../../module_base/timer.cpp - ../../module_base/blas_connector_base.cpp - ../../module_base/blas_connector_matrix.cpp - ../../module_base/blas_connector_vector.cpp - ../../module_base/memory.cpp - ../../module_base/global_variable.cpp - ../../module_base/global_function.cpp - ../../module_base/global_file.cpp - ../../module_base/tool_title.cpp - ../../module_base/tool_check.cpp - ../../module_base/tool_quit.cpp - ../../module_base/intarray.cpp - ../../module_base/realarray.cpp - ../../module_base/complexarray.cpp - ../../module_base/complexmatrix.cpp - ../../module_base/global_variable.cpp - ../../module_base/libm/branred.cpp - ../../module_base/libm/sincos.cpp - ../../module_base/math_integral.cpp + ../../source_base/matrix3.cpp + ../../source_base/matrix.cpp + ../../source_base/timer.cpp + ../../source_base/blas_connector_base.cpp + ../../source_base/blas_connector_matrix.cpp + ../../source_base/blas_connector_vector.cpp + ../../source_base/memory.cpp + ../../source_base/global_variable.cpp + ../../source_base/global_function.cpp + ../../source_base/global_file.cpp + ../../source_base/tool_title.cpp + ../../source_base/tool_check.cpp + ../../source_base/tool_quit.cpp + ../../source_base/intarray.cpp + ../../source_base/realarray.cpp + ../../source_base/complexarray.cpp + ../../source_base/complexmatrix.cpp + ../../source_base/global_variable.cpp + ../../source_base/libm/branred.cpp + ../../source_base/libm/sincos.cpp + ../../source_base/math_integral.cpp ../../module_cell/module_neighbor/sltk_atom_arrange.cpp ../../module_cell/module_neighbor/sltk_atom.cpp ../../module_cell/module_neighbor/sltk_grid.cpp @@ -49,9 +49,9 @@ list(APPEND depend_files ../../module_io/print_info.cpp ../../module_io/cif_io.cpp ../../source_esolver/esolver_lj.cpp - ../../module_base/parallel_reduce.cpp - ../../module_base/parallel_global.cpp - ../../module_base/parallel_comm.cpp + ../../source_base/parallel_reduce.cpp + ../../source_base/parallel_global.cpp + ../../source_base/parallel_comm.cpp ../../module_elecstate/read_pseudo.cpp ../../module_elecstate/cal_wfc.cpp ../../module_elecstate/cal_nelec_nband.cpp diff --git a/source/module_md/verlet.cpp b/source/module_md/verlet.cpp index 2eec7a0e20..3eafb181e1 100644 --- a/source/module_md/verlet.cpp +++ b/source/module_md/verlet.cpp @@ -1,7 +1,7 @@ #include "verlet.h" #include "md_func.h" -#include "module_base/timer.h" +#include "source_base/timer.h" Verlet::Verlet(const Parameter& param_in, UnitCell& unit_in) : MD_base(param_in, unit_in) { diff --git a/source/module_parameter/input_parameter.h b/source/module_parameter/input_parameter.h index 548e7da575..d44de8e739 100644 --- a/source/module_parameter/input_parameter.h +++ b/source/module_parameter/input_parameter.h @@ -1,7 +1,7 @@ #ifndef INPUT_PARAMETER_H #define INPUT_PARAMETER_H #include "md_parameter.h" -#include "module_base/vector3.h" +#include "source_base/vector3.h" #include #include diff --git a/source/module_psi/psi.cpp b/source/module_psi/psi.cpp index 6fb18f3ee9..bf25e4593a 100644 --- a/source/module_psi/psi.cpp +++ b/source/module_psi/psi.cpp @@ -1,8 +1,8 @@ #include "psi.h" -#include "module_base/global_variable.h" -#include "module_base/module_device/device.h" -#include "module_base/tool_quit.h" +#include "source_base/global_variable.h" +#include "source_base/module_device/device.h" +#include "source_base/tool_quit.h" #include "module_parameter/parameter.h" #include diff --git a/source/module_psi/psi.h b/source/module_psi/psi.h index 6ba0a33720..17354ba2f8 100644 --- a/source/module_psi/psi.h +++ b/source/module_psi/psi.h @@ -1,8 +1,8 @@ #ifndef PSI_H #define PSI_H -#include "module_base/module_device/memory_op.h" -#include "module_base/module_device/types.h" +#include "source_base/module_device/memory_op.h" +#include "source_base/module_device/types.h" #include #include diff --git a/source/module_psi/psi_init.cpp b/source/module_psi/psi_init.cpp index 38c3b4c5d0..9ce688fbf1 100644 --- a/source/module_psi/psi_init.cpp +++ b/source/module_psi/psi_init.cpp @@ -1,10 +1,10 @@ #include "psi_init.h" -#include "module_base/macros.h" -#include "module_base/memory.h" -#include "module_base/parallel_device.h" -#include "module_base/timer.h" -#include "module_base/tool_quit.h" +#include "source_base/macros.h" +#include "source_base/memory.h" +#include "source_base/parallel_device.h" +#include "source_base/timer.h" +#include "source_base/tool_quit.h" #include "source_hsolver/diago_iter_assist.h" #include "module_parameter/parameter.h" #include "module_psi/psi_initializer_atomic.h" diff --git a/source/module_psi/psi_initializer.cpp b/source/module_psi/psi_initializer.cpp index 03b25c0f79..bdc0239851 100644 --- a/source/module_psi/psi_initializer.cpp +++ b/source/module_psi/psi_initializer.cpp @@ -1,15 +1,15 @@ #include "psi_initializer.h" -#include "module_base/memory.h" +#include "source_base/memory.h" // basic functions support -#include "module_base/timer.h" -#include "module_base/tool_quit.h" +#include "source_base/timer.h" +#include "source_base/tool_quit.h" // three global variables definition -#include "module_base/global_variable.h" +#include "source_base/global_variable.h" #include "module_parameter/parameter.h" #ifdef __MPI -#include "module_base/parallel_reduce.h" +#include "source_base/parallel_reduce.h" #endif template diff --git a/source/module_psi/psi_initializer.h b/source/module_psi/psi_initializer.h index e54ff9d3ff..3a80c84ea3 100644 --- a/source/module_psi/psi_initializer.h +++ b/source/module_psi/psi_initializer.h @@ -8,12 +8,12 @@ // smart pointer for auto-memory management #include // numerical algorithm support -#include "module_base/spherical_bessel_transformer.h" // for spherical bessel transform +#include "source_base/spherical_bessel_transformer.h" // for spherical bessel transform #ifdef __MPI #include #endif -#include "module_base/macros.h" -#include "module_base/parallel_global.h" +#include "source_base/macros.h" +#include "source_base/parallel_global.h" #include "module_cell/klist.h" #include diff --git a/source/module_psi/psi_initializer_atomic.cpp b/source/module_psi/psi_initializer_atomic.cpp index 224836806b..242a16eb71 100644 --- a/source/module_psi/psi_initializer_atomic.cpp +++ b/source/module_psi/psi_initializer_atomic.cpp @@ -1,15 +1,15 @@ #include "psi_initializer_atomic.h" #include "module_hamilt_pw/hamilt_pwdft/soc.h" // numerical algorithm support -#include "module_base/math_integral.h" // for numerical integration -#include "module_base/math_polyint.h" // for polynomial interpolation -#include "module_base/math_ylmreal.h" // for real spherical harmonics -#include "module_base/math_sphbes.h" // for spherical bessel functions +#include "source_base/math_integral.h" // for numerical integration +#include "source_base/math_polyint.h" // for polynomial interpolation +#include "source_base/math_ylmreal.h" // for real spherical harmonics +#include "source_base/math_sphbes.h" // for spherical bessel functions // basic functions support -#include "module_base/tool_quit.h" -#include "module_base/timer.h" +#include "source_base/tool_quit.h" +#include "source_base/timer.h" // global variables definition -#include "module_base/global_variable.h" +#include "source_base/global_variable.h" #include "module_parameter/parameter.h" // io support #include "module_io/write_pao.h" diff --git a/source/module_psi/psi_initializer_atomic.h b/source/module_psi/psi_initializer_atomic.h index 402e63af59..65ca8f015a 100644 --- a/source/module_psi/psi_initializer_atomic.h +++ b/source/module_psi/psi_initializer_atomic.h @@ -1,6 +1,6 @@ #ifndef PSI_INITIALIZER_ATOMIC_H #define PSI_INITIALIZER_ATOMIC_H -#include "module_base/realarray.h" +#include "source_base/realarray.h" #include "psi_initializer.h" /* diff --git a/source/module_psi/psi_initializer_file.cpp b/source/module_psi/psi_initializer_file.cpp index d1378e1cd7..d2c3b14e80 100644 --- a/source/module_psi/psi_initializer_file.cpp +++ b/source/module_psi/psi_initializer_file.cpp @@ -1,6 +1,6 @@ #include "psi_initializer_file.h" -#include "module_base/timer.h" +#include "source_base/timer.h" #include "module_cell/klist.h" #include "module_io/read_wfc_pw.h" #include "module_io/filename.h" diff --git a/source/module_psi/psi_initializer_nao.cpp b/source/module_psi/psi_initializer_nao.cpp index e88c759cba..63a8aae9ee 100644 --- a/source/module_psi/psi_initializer_nao.cpp +++ b/source/module_psi/psi_initializer_nao.cpp @@ -2,19 +2,19 @@ #include // numerical algorithm support -#include "module_base/math_integral.h" // for numerical integration +#include "source_base/math_integral.h" // for numerical integration // numerical algorithm support -#include "module_base/math_polyint.h" // for polynomial interpolation -#include "module_base/math_ylmreal.h" // for real spherical harmonics +#include "source_base/math_polyint.h" // for polynomial interpolation +#include "source_base/math_ylmreal.h" // for real spherical harmonics // basic functions support -#include "module_base/timer.h" -#include "module_base/tool_quit.h" +#include "source_base/timer.h" +#include "source_base/tool_quit.h" // three global variables definition -#include "module_base/global_variable.h" +#include "source_base/global_variable.h" // parallel communication #ifdef __MPI -#include "module_base/parallel_common.h" -#include "module_base/parallel_reduce.h" +#include "source_base/parallel_common.h" +#include "source_base/parallel_reduce.h" #endif #include "module_io/orb_io.h" #include "module_parameter/parameter.h" diff --git a/source/module_psi/psi_initializer_nao.h b/source/module_psi/psi_initializer_nao.h index c9ba087ed6..b6ab4df303 100644 --- a/source/module_psi/psi_initializer_nao.h +++ b/source/module_psi/psi_initializer_nao.h @@ -1,7 +1,7 @@ #ifndef PSI_INITIALIZER_NAO_H #define PSI_INITIALIZER_NAO_H -#include "module_base/cubic_spline.h" -#include "module_base/realarray.h" +#include "source_base/cubic_spline.h" +#include "source_base/realarray.h" #include "psi_initializer.h" #include diff --git a/source/module_psi/psi_initializer_random.cpp b/source/module_psi/psi_initializer_random.cpp index e781f32dfb..6e9bb37984 100644 --- a/source/module_psi/psi_initializer_random.cpp +++ b/source/module_psi/psi_initializer_random.cpp @@ -2,8 +2,8 @@ #ifdef __MPI #include #endif -#include "module_base/parallel_global.h" -#include "module_base/timer.h" +#include "source_base/parallel_global.h" +#include "source_base/timer.h" #include "module_cell/parallel_kpoints.h" #include "module_parameter/parameter.h" diff --git a/source/module_rdmft/rdmft.cpp b/source/module_rdmft/rdmft.cpp index 3649c0fa26..9d320f67db 100644 --- a/source/module_rdmft/rdmft.cpp +++ b/source/module_rdmft/rdmft.cpp @@ -5,9 +5,9 @@ #include "rdmft.h" #include "module_rdmft/rdmft_tools.h" -#include "module_base/timer.h" +#include "source_base/timer.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" -#include "module_base/parallel_reduce.h" +#include "source_base/parallel_reduce.h" #include "module_cell/module_symmetry/symmetry.h" diff --git a/source/module_rdmft/rdmft.h b/source/module_rdmft/rdmft.h index bc02480637..e5ee72d9c4 100644 --- a/source/module_rdmft/rdmft.h +++ b/source/module_rdmft/rdmft.h @@ -8,9 +8,9 @@ #include "module_parameter/parameter.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" #include "module_psi/psi.h" -#include "module_base/matrix.h" +#include "source_base/matrix.h" -#include "module_base/parallel_2d.h" +#include "source_base/parallel_2d.h" #include "module_basis/module_ao/parallel_orbitals.h" #include "module_cell/unitcell.h" #include "module_hamilt_lcao/module_gint/gint_gamma.h" diff --git a/source/module_rdmft/rdmft_tools.cpp b/source/module_rdmft/rdmft_tools.cpp index 5b43b0cbab..d9fa7cf2e0 100644 --- a/source/module_rdmft/rdmft_tools.cpp +++ b/source/module_rdmft/rdmft_tools.cpp @@ -5,8 +5,8 @@ #include "module_rdmft/rdmft_tools.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" // used by class Veff_rdmft -#include "module_base/tool_title.h" -#include "module_base/timer.h" +#include "source_base/tool_title.h" +#include "source_base/timer.h" #include "module_hamilt_general/module_xc/xc_functional.h" #include "module_elecstate/module_pot/H_Hartree_pw.h" #include "module_elecstate/module_pot/pot_local.h" diff --git a/source/module_rdmft/rdmft_tools.h b/source/module_rdmft/rdmft_tools.h index a18e436c47..0033af12d7 100644 --- a/source/module_rdmft/rdmft_tools.h +++ b/source/module_rdmft/rdmft_tools.h @@ -6,17 +6,17 @@ #define RDMFT_TOOLS_H #include "module_psi/psi.h" -#include "module_base/matrix.h" +#include "source_base/matrix.h" #include "module_cell/module_neighbor/sltk_grid_driver.h" #include "module_cell/unitcell.h" #include "module_hamilt_lcao/module_gint/gint_gamma.h" #include "module_hamilt_lcao/module_gint/gint_k.h" #include "module_elecstate/module_pot/potential_new.h" -#include "module_base/blas_connector.h" -#include "module_base/scalapack_connector.h" -#include "module_base/parallel_2d.h" +#include "source_base/blas_connector.h" +#include "source_base/scalapack_connector.h" +#include "source_base/parallel_2d.h" #include "module_basis/module_ao/parallel_orbitals.h" -#include "module_base/parallel_reduce.h" +#include "source_base/parallel_reduce.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" #include "module_elecstate/module_dm/cal_dm_psi.h" #include "module_elecstate/module_dm/density_matrix.h" diff --git a/source/module_relax/bfgs.cpp b/source/module_relax/bfgs.cpp index 2b1be16e13..42a637c287 100644 --- a/source/module_relax/bfgs.cpp +++ b/source/module_relax/bfgs.cpp @@ -1,6 +1,6 @@ #include "bfgs.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" -#include "module_base/matrix3.h" +#include "source_base/matrix3.h" #include "module_parameter/parameter.h" #include "ions_move_basic.h" #include "module_cell/update_cell.h" diff --git a/source/module_relax/bfgs.h b/source/module_relax/bfgs.h index d1771dbca7..aff05ccc8b 100644 --- a/source/module_relax/bfgs.h +++ b/source/module_relax/bfgs.h @@ -5,9 +5,9 @@ #include #include #include -#include"module_base/lapack_connector.h" -#include "module_base/matrix.h" -#include "module_base/matrix3.h" +#include"source_base/lapack_connector.h" +#include "source_base/matrix.h" +#include "source_base/matrix3.h" #include "module_cell/unitcell.h" #include "matrix_methods.h" diff --git a/source/module_relax/bfgs_basic.cpp b/source/module_relax/bfgs_basic.cpp index 90a2d39b1c..1ef6fd7753 100644 --- a/source/module_relax/bfgs_basic.cpp +++ b/source/module_relax/bfgs_basic.cpp @@ -2,8 +2,8 @@ #include "module_parameter/parameter.h" #include "ions_move_basic.h" -#include "module_base/global_function.h" -#include "module_base/global_variable.h" +#include "source_base/global_function.h" +#include "source_base/global_variable.h" #include using namespace Ions_Move_Basic; diff --git a/source/module_relax/bfgs_basic.h b/source/module_relax/bfgs_basic.h index 2e0a130a37..0e795afe38 100644 --- a/source/module_relax/bfgs_basic.h +++ b/source/module_relax/bfgs_basic.h @@ -1,7 +1,7 @@ #ifndef BFGS_BASIC #define BFGS_BASIC -#include "module_base/matrix.h" +#include "source_base/matrix.h" // references // 1) Roger Fletcher, Practical Methods of Optimization, John Wiley and diff --git a/source/module_relax/ions_move_basic.cpp b/source/module_relax/ions_move_basic.cpp index a8dabe5743..d88a83343c 100644 --- a/source/module_relax/ions_move_basic.cpp +++ b/source/module_relax/ions_move_basic.cpp @@ -1,8 +1,8 @@ #include "ions_move_basic.h" #include "module_parameter/parameter.h" -#include "module_base/global_function.h" -#include "module_base/global_variable.h" +#include "source_base/global_function.h" +#include "source_base/global_variable.h" #include "module_cell/update_cell.h" #include "module_cell/print_cell.h" int Ions_Move_Basic::dim = 0; diff --git a/source/module_relax/ions_move_basic.h b/source/module_relax/ions_move_basic.h index 9b70117c43..2be561cc27 100644 --- a/source/module_relax/ions_move_basic.h +++ b/source/module_relax/ions_move_basic.h @@ -1,7 +1,7 @@ #ifndef IONS_MOVE_BASIC_H #define IONS_MOVE_BASIC_H -#include "module_base/matrix.h" +#include "source_base/matrix.h" #include "module_cell/unitcell.h" namespace Ions_Move_Basic diff --git a/source/module_relax/ions_move_bfgs.cpp b/source/module_relax/ions_move_bfgs.cpp index afce2c7588..1afa361eb0 100644 --- a/source/module_relax/ions_move_bfgs.cpp +++ b/source/module_relax/ions_move_bfgs.cpp @@ -2,8 +2,8 @@ #include "module_parameter/parameter.h" #include "ions_move_basic.h" -#include "module_base/global_function.h" -#include "module_base/global_variable.h" +#include "source_base/global_function.h" +#include "source_base/global_variable.h" //============= MAP OF BFGS =========================== // (1) start() -> BFGS_Basic::check_converged() diff --git a/source/module_relax/ions_move_bfgs.h b/source/module_relax/ions_move_bfgs.h index 42a08a2593..0f5cf9adc2 100644 --- a/source/module_relax/ions_move_bfgs.h +++ b/source/module_relax/ions_move_bfgs.h @@ -2,7 +2,7 @@ #define IONS_MOVE_BFGS_H #include "bfgs_basic.h" -#include "module_base/matrix.h" +#include "source_base/matrix.h" #include "module_cell/unitcell.h" class Ions_Move_BFGS : public BFGS_Basic { diff --git a/source/module_relax/ions_move_cg.cpp b/source/module_relax/ions_move_cg.cpp index a311757d94..7da54c3831 100644 --- a/source/module_relax/ions_move_cg.cpp +++ b/source/module_relax/ions_move_cg.cpp @@ -1,8 +1,8 @@ #include "ions_move_cg.h" #include "ions_move_basic.h" -#include "module_base/global_function.h" -#include "module_base/global_variable.h" +#include "source_base/global_function.h" +#include "source_base/global_variable.h" using namespace Ions_Move_Basic; double Ions_Move_CG::RELAX_CG_THR = -1.0; // default is 0.5 diff --git a/source/module_relax/ions_move_cg.h b/source/module_relax/ions_move_cg.h index 59ed3b63c1..5bf764aaae 100644 --- a/source/module_relax/ions_move_cg.h +++ b/source/module_relax/ions_move_cg.h @@ -1,7 +1,7 @@ #ifndef IONS_MOVE_CG_H #define IONS_MOVE_CG_H -#include "module_base/matrix.h" +#include "source_base/matrix.h" #include "module_cell/unitcell.h" class Ions_Move_CG { diff --git a/source/module_relax/ions_move_methods.cpp b/source/module_relax/ions_move_methods.cpp index ddb25a59c0..50ab3286c1 100644 --- a/source/module_relax/ions_move_methods.cpp +++ b/source/module_relax/ions_move_methods.cpp @@ -1,8 +1,8 @@ #include "ions_move_methods.h" #include "ions_move_basic.h" -#include "module_base/global_function.h" -#include "module_base/global_variable.h" +#include "source_base/global_function.h" +#include "source_base/global_variable.h" Ions_Move_Methods::Ions_Move_Methods() diff --git a/source/module_relax/ions_move_sd.cpp b/source/module_relax/ions_move_sd.cpp index 89e5f9e3cb..03aa208787 100644 --- a/source/module_relax/ions_move_sd.cpp +++ b/source/module_relax/ions_move_sd.cpp @@ -2,8 +2,8 @@ #include "module_parameter/parameter.h" #include "ions_move_basic.h" -#include "module_base/global_function.h" -#include "module_base/global_variable.h" +#include "source_base/global_function.h" +#include "source_base/global_variable.h" #include using namespace Ions_Move_Basic; diff --git a/source/module_relax/ions_move_sd.h b/source/module_relax/ions_move_sd.h index 260a930610..4fb92f0dda 100644 --- a/source/module_relax/ions_move_sd.h +++ b/source/module_relax/ions_move_sd.h @@ -1,7 +1,7 @@ #ifndef IONS_MOVE_SD_H #define IONS_MOVE_SD_H -#include "module_base/matrix.h" +#include "source_base/matrix.h" #include "module_cell/unitcell.h" class Ions_Move_SD { diff --git a/source/module_relax/lattice_change_basic.cpp b/source/module_relax/lattice_change_basic.cpp index c145d36ee8..1a0952add1 100644 --- a/source/module_relax/lattice_change_basic.cpp +++ b/source/module_relax/lattice_change_basic.cpp @@ -1,8 +1,8 @@ #include "lattice_change_basic.h" -#include "module_base/global_function.h" -#include "module_base/global_variable.h" -#include "module_base/parallel_common.h" +#include "source_base/global_function.h" +#include "source_base/global_variable.h" +#include "source_base/parallel_common.h" #include "module_parameter/parameter.h" int Lattice_Change_Basic::dim = 0; diff --git a/source/module_relax/lattice_change_basic.h b/source/module_relax/lattice_change_basic.h index 59666e3bbe..0e60515f7a 100644 --- a/source/module_relax/lattice_change_basic.h +++ b/source/module_relax/lattice_change_basic.h @@ -1,7 +1,7 @@ #ifndef LATTICE_CHANGE_BASIC_H #define LATTICE_CHANGE_BASIC_H -#include "module_base/matrix.h" +#include "source_base/matrix.h" #include "module_cell/unitcell.h" namespace Lattice_Change_Basic diff --git a/source/module_relax/lattice_change_cg.cpp b/source/module_relax/lattice_change_cg.cpp index 5d5af384b6..94a1bf581d 100644 --- a/source/module_relax/lattice_change_cg.cpp +++ b/source/module_relax/lattice_change_cg.cpp @@ -1,8 +1,8 @@ #include "lattice_change_cg.h" #include "lattice_change_basic.h" -#include "module_base/global_function.h" -#include "module_base/global_variable.h" +#include "source_base/global_function.h" +#include "source_base/global_variable.h" // the 'dim' variable is defined in Lattice_Change_Basic using namespace Lattice_Change_Basic; diff --git a/source/module_relax/lattice_change_cg.h b/source/module_relax/lattice_change_cg.h index bbaa012919..26b32da539 100644 --- a/source/module_relax/lattice_change_cg.h +++ b/source/module_relax/lattice_change_cg.h @@ -1,7 +1,7 @@ #ifndef LATTICE_CHANGE_CG_H #define LATTICE_CHANGE_CG_H -#include "module_base/matrix.h" +#include "source_base/matrix.h" #include "module_cell/unitcell.h" class Lattice_Change_CG { diff --git a/source/module_relax/lattice_change_methods.cpp b/source/module_relax/lattice_change_methods.cpp index 96c0911811..dadd0b3f23 100644 --- a/source/module_relax/lattice_change_methods.cpp +++ b/source/module_relax/lattice_change_methods.cpp @@ -1,6 +1,6 @@ #include "lattice_change_methods.h" -#include "module_base/global_function.h" +#include "source_base/global_function.h" Lattice_Change_Methods::Lattice_Change_Methods() { diff --git a/source/module_relax/lbfgs.cpp b/source/module_relax/lbfgs.cpp index b88c13e333..edf6371187 100644 --- a/source/module_relax/lbfgs.cpp +++ b/source/module_relax/lbfgs.cpp @@ -1,6 +1,6 @@ #include "lbfgs.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" -#include "module_base/matrix3.h" +#include "source_base/matrix3.h" #include "module_parameter/parameter.h" #include "ions_move_basic.h" #include "module_cell/update_cell.h" diff --git a/source/module_relax/lbfgs.h b/source/module_relax/lbfgs.h index 7295eb42e3..7d9573d8d7 100644 --- a/source/module_relax/lbfgs.h +++ b/source/module_relax/lbfgs.h @@ -5,11 +5,11 @@ #include #include #include -#include "module_base/lapack_connector.h" +#include "source_base/lapack_connector.h" #include "matrix_methods.h" //#include "line_search.h" -#include "module_base/matrix.h" -#include "module_base/matrix3.h" +#include "source_base/matrix.h" +#include "source_base/matrix3.h" #include "module_cell/unitcell.h" #include "source_esolver/esolver.h" #include "source_esolver/esolver_ks.h" diff --git a/source/module_relax/relax_driver.cpp b/source/module_relax/relax_driver.cpp index 2a584cdf64..449bda9c32 100644 --- a/source/module_relax/relax_driver.cpp +++ b/source/module_relax/relax_driver.cpp @@ -1,6 +1,6 @@ #include "relax_driver.h" -#include "module_base/global_file.h" +#include "source_base/global_file.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" // use chr. #include "module_io/cif_io.h" #include "module_io/json_output/output_info.h" diff --git a/source/module_relax/relax_nsync.cpp b/source/module_relax/relax_nsync.cpp index 7b401bc9f3..723013fe25 100644 --- a/source/module_relax/relax_nsync.cpp +++ b/source/module_relax/relax_nsync.cpp @@ -1,7 +1,7 @@ #include "relax_nsync.h" -#include "module_base/global_function.h" -#include "module_base/global_variable.h" +#include "source_base/global_function.h" +#include "source_base/global_variable.h" #include "module_parameter/parameter.h" #include "module_cell/update_cell.h" void Relax_old::init_relax(const int& natom) diff --git a/source/module_relax/relax_sync.cpp b/source/module_relax/relax_sync.cpp index 0e42c746c0..9903f8f7aa 100644 --- a/source/module_relax/relax_sync.cpp +++ b/source/module_relax/relax_sync.cpp @@ -1,9 +1,9 @@ #include "relax_sync.h" -#include "module_base/matrix3.h" -#include "module_base/parallel_common.h" -#include "module_base/tool_title.h" +#include "source_base/matrix3.h" +#include "source_base/parallel_common.h" +#include "source_base/tool_title.h" #include "module_cell/update_cell.h" #include "module_cell/print_cell.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" diff --git a/source/module_relax/relax_sync.h b/source/module_relax/relax_sync.h index 11bd7fdf90..cf37bfd336 100644 --- a/source/module_relax/relax_sync.h +++ b/source/module_relax/relax_sync.h @@ -4,8 +4,8 @@ #define RELAX1_H #include "line_search.h" -#include "module_base/matrix.h" -#include "module_base/matrix3.h" +#include "source_base/matrix.h" +#include "source_base/matrix3.h" #include "module_cell/unitcell.h" class Relax diff --git a/source/module_relax/test/CMakeLists.txt b/source/module_relax/test/CMakeLists.txt index 8948fe20e8..ab605957ca 100644 --- a/source/module_relax/test/CMakeLists.txt +++ b/source/module_relax/test/CMakeLists.txt @@ -9,16 +9,16 @@ install(DIRECTORY support DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) AddTest( TARGET relax_new_line_search LIBS parameter - SOURCES line_search_test.cpp ../line_search.cpp ../../module_base/global_variable.cpp ../../module_base/global_file.cpp ../../module_base/global_function.cpp ../../module_base/memory.cpp ../../module_base/timer.cpp ../../module_base/tool_quit.cpp + SOURCES line_search_test.cpp ../line_search.cpp ../../source_base/global_variable.cpp ../../source_base/global_file.cpp ../../source_base/global_function.cpp ../../source_base/memory.cpp ../../source_base/timer.cpp ../../source_base/tool_quit.cpp ) AddTest( TARGET relax_new_relax - SOURCES relax_test.cpp ../relax_sync.cpp ../line_search.cpp ../../module_base/tool_quit.cpp ../../module_base/global_variable.cpp ../../module_base/global_file.cpp ../../module_base/memory.cpp ../../module_base/timer.cpp - ../../module_base/matrix3.cpp ../../module_base/intarray.cpp ../../module_base/tool_title.cpp - ../../module_base/global_function.cpp ../../module_base/complexmatrix.cpp ../../module_base/matrix.cpp - ../../module_base/complexarray.cpp ../../module_base/tool_quit.cpp ../../module_base/realarray.cpp - ../../module_base/blas_connector_base.cpp ../../module_base/blas_connector_vector.cpp ../../module_base/blas_connector_matrix.cpp + SOURCES relax_test.cpp ../relax_sync.cpp ../line_search.cpp ../../source_base/tool_quit.cpp ../../source_base/global_variable.cpp ../../source_base/global_file.cpp ../../source_base/memory.cpp ../../source_base/timer.cpp + ../../source_base/matrix3.cpp ../../source_base/intarray.cpp ../../source_base/tool_title.cpp + ../../source_base/global_function.cpp ../../source_base/complexmatrix.cpp ../../source_base/matrix.cpp + ../../source_base/complexarray.cpp ../../source_base/tool_quit.cpp ../../source_base/realarray.cpp + ../../source_base/blas_connector_base.cpp ../../source_base/blas_connector_vector.cpp ../../source_base/blas_connector_matrix.cpp ../../module_cell/update_cell.cpp ../../module_cell/print_cell.cpp ../../module_cell/bcast_cell.cpp ../../module_io/output.cpp LIBS parameter ${math_libs} ) diff --git a/source/module_relax/test/bfgs_test.cpp b/source/module_relax/test/bfgs_test.cpp index bc06ed4bdf..1f96c7b383 100644 --- a/source/module_relax/test/bfgs_test.cpp +++ b/source/module_relax/test/bfgs_test.cpp @@ -2,7 +2,7 @@ #include "for_test.h" #include "module_relax/bfgs.h" #include "module_cell/unitcell.h" -#include "module_base/matrix.h" +#include "source_base/matrix.h" #include "module_relax/ions_move_basic.h" #include "module_relax/matrix_methods.h" diff --git a/source/module_ri/ABFs_Construct-PCA.cpp b/source/module_ri/ABFs_Construct-PCA.cpp index 933b8c9804..59b246b7cc 100644 --- a/source/module_ri/ABFs_Construct-PCA.cpp +++ b/source/module_ri/ABFs_Construct-PCA.cpp @@ -1,10 +1,10 @@ #include "ABFs_Construct-PCA.h" #include "exx_abfs-abfs_index.h" -#include "../module_base/lapack_connector.h" -#include "../module_base/global_function.h" -#include "../module_base/element_basis_index.h" -#include "../module_base/matrix.h" +#include "../source_base/lapack_connector.h" +#include "../source_base/global_function.h" +#include "../source_base/element_basis_index.h" +#include "../source_base/matrix.h" #include "../module_ri/Matrix_Orbs11.h" #include "../module_ri/Matrix_Orbs21.h" diff --git a/source/module_ri/Exx_LRI.h b/source/module_ri/Exx_LRI.h index ae53393ee6..63f90150e9 100644 --- a/source/module_ri/Exx_LRI.h +++ b/source/module_ri/Exx_LRI.h @@ -9,7 +9,7 @@ #include "LRI_CV.h" #include "module_hamilt_general/module_xc/exx_info.h" #include "module_basis/module_ao/ORB_atomic_lm.h" -#include "module_base/matrix.h" +#include "source_base/matrix.h" #include #include diff --git a/source/module_ri/Exx_LRI.hpp b/source/module_ri/Exx_LRI.hpp index 46663f0d75..54d401c02e 100644 --- a/source/module_ri/Exx_LRI.hpp +++ b/source/module_ri/Exx_LRI.hpp @@ -13,8 +13,8 @@ #include "module_ri/exx_abfs-construct_orbs.h" #include "module_ri/exx_abfs-io.h" #include "module_ri/conv_coulomb_pot_k.h" -#include "module_base/tool_title.h" -#include "module_base/timer.h" +#include "source_base/tool_title.h" +#include "source_base/timer.h" #include "module_ri/serialization_cereal.h" #include "module_ri/Mix_DMk_2D.h" #include "module_basis/module_ao/parallel_orbitals.h" diff --git a/source/module_ri/Exx_LRI_interface.hpp b/source/module_ri/Exx_LRI_interface.hpp index a7ea139e2b..73a0f8b4b2 100644 --- a/source/module_ri/Exx_LRI_interface.hpp +++ b/source/module_ri/Exx_LRI_interface.hpp @@ -7,8 +7,8 @@ #include "module_ri/exx_opt_orb.h" #include "module_hamilt_lcao/hamilt_lcaodft/hamilt_lcao.h" #include "module_hamilt_lcao/hamilt_lcaodft/operator_lcao/op_exx_lcao.h" -#include "module_base/parallel_common.h" -#include "module_base/formatter.h" +#include "source_base/parallel_common.h" +#include "source_base/formatter.h" #include "module_io/csr_reader.h" #include "module_io/write_HS_sparse.h" diff --git a/source/module_ri/Inverse_Matrix.hpp b/source/module_ri/Inverse_Matrix.hpp index 2778a4a916..f48d23d41c 100644 --- a/source/module_ri/Inverse_Matrix.hpp +++ b/source/module_ri/Inverse_Matrix.hpp @@ -7,7 +7,7 @@ #define INVERSE_MATRIX_HPP #include "Inverse_Matrix.h" -#include "module_base/lapack_connector.h" +#include "source_base/lapack_connector.h" #include diff --git a/source/module_ri/LRI_CV.h b/source/module_ri/LRI_CV.h index 99b52476ea..bfca46208c 100644 --- a/source/module_ri/LRI_CV.h +++ b/source/module_ri/LRI_CV.h @@ -9,8 +9,8 @@ #include "Matrix_Orbs11.h" #include "Matrix_Orbs21.h" #include "module_basis/module_ao/ORB_atomic_lm.h" -#include "module_base/abfs-vector3_order.h" -#include "module_base/element_basis_index.h" +#include "source_base/abfs-vector3_order.h" +#include "source_base/element_basis_index.h" #include #include diff --git a/source/module_ri/LRI_CV.hpp b/source/module_ri/LRI_CV.hpp index 2e4dc71e64..06e2b51685 100644 --- a/source/module_ri/LRI_CV.hpp +++ b/source/module_ri/LRI_CV.hpp @@ -10,8 +10,8 @@ #include "LRI_CV_Tools.h" #include "exx_abfs-abfs_index.h" #include "RI_Util.h" -#include "../module_base/tool_title.h" -#include "../module_base/timer.h" +#include "../source_base/tool_title.h" +#include "../source_base/timer.h" #include "../module_hamilt_pw/hamilt_pwdft/global.h" #include #include diff --git a/source/module_ri/LRI_CV_Tools.h b/source/module_ri/LRI_CV_Tools.h index c97f502516..d66ddbc53f 100644 --- a/source/module_ri/LRI_CV_Tools.h +++ b/source/module_ri/LRI_CV_Tools.h @@ -6,7 +6,7 @@ #ifndef LRI_CV_TOOLS_H #define LRI_CV_TOOLS_H -#include "module_base/abfs-vector3_order.h" +#include "source_base/abfs-vector3_order.h" #include diff --git a/source/module_ri/LRI_CV_Tools.hpp b/source/module_ri/LRI_CV_Tools.hpp index 39087e6641..6e11d620de 100644 --- a/source/module_ri/LRI_CV_Tools.hpp +++ b/source/module_ri/LRI_CV_Tools.hpp @@ -8,7 +8,7 @@ #include "LRI_CV_Tools.h" #include "Inverse_Matrix.h" -#include "../module_base/mathzone.h" +#include "../source_base/mathzone.h" #include "../module_hamilt_pw/hamilt_pwdft/global.h" template diff --git a/source/module_ri/Matrix_Orbs11.cpp b/source/module_ri/Matrix_Orbs11.cpp index 01572cbc8d..8849b565f8 100644 --- a/source/module_ri/Matrix_Orbs11.cpp +++ b/source/module_ri/Matrix_Orbs11.cpp @@ -5,8 +5,8 @@ #include "Matrix_Orbs11.h" -#include "module_base/timer.h" -#include "module_base/tool_title.h" +#include "source_base/timer.h" +#include "source_base/tool_title.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" void Matrix_Orbs11::init(const int mode, diff --git a/source/module_ri/Matrix_Orbs11.h b/source/module_ri/Matrix_Orbs11.h index b994f93265..7f8bcb2089 100644 --- a/source/module_ri/Matrix_Orbs11.h +++ b/source/module_ri/Matrix_Orbs11.h @@ -6,9 +6,9 @@ #ifndef MATRIX_ORB11_H #define MATRIX_ORB11_H -#include "module_base/element_basis_index.h" -#include "module_base/sph_bessel_recursive.h" -#include "module_base/vector3.h" +#include "source_base/element_basis_index.h" +#include "source_base/sph_bessel_recursive.h" +#include "source_base/vector3.h" #include "module_basis/module_ao/ORB_gaunt_table.h" #include "module_basis/module_ao/ORB_read.h" #include "module_hamilt_lcao/hamilt_lcaodft/center2_orb-orb11.h" diff --git a/source/module_ri/Matrix_Orbs21.cpp b/source/module_ri/Matrix_Orbs21.cpp index 2351d3fde1..50c37e0b0a 100644 --- a/source/module_ri/Matrix_Orbs21.cpp +++ b/source/module_ri/Matrix_Orbs21.cpp @@ -5,8 +5,8 @@ #include "Matrix_Orbs21.h" -#include "module_base/timer.h" -#include "module_base/tool_title.h" +#include "source_base/timer.h" +#include "source_base/tool_title.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" void Matrix_Orbs21::init(const int mode, diff --git a/source/module_ri/Matrix_Orbs21.h b/source/module_ri/Matrix_Orbs21.h index 1d2895b4b2..77dc4b8201 100644 --- a/source/module_ri/Matrix_Orbs21.h +++ b/source/module_ri/Matrix_Orbs21.h @@ -6,8 +6,8 @@ #ifndef MATRIX_ORB21_H #define MATRIX_ORB21_H -#include "module_base/element_basis_index.h" -#include "module_base/vector3.h" +#include "source_base/element_basis_index.h" +#include "source_base/vector3.h" #include "module_basis/module_ao/ORB_gaunt_table.h" #include "module_basis/module_ao/ORB_read.h" #include "module_hamilt_lcao/hamilt_lcaodft/center2_orb-orb21.h" diff --git a/source/module_ri/Matrix_Orbs22.cpp b/source/module_ri/Matrix_Orbs22.cpp index d2592d5ce5..e001fbf157 100644 --- a/source/module_ri/Matrix_Orbs22.cpp +++ b/source/module_ri/Matrix_Orbs22.cpp @@ -5,8 +5,8 @@ #include "Matrix_Orbs22.h" -#include "module_base/timer.h" -#include "module_base/tool_title.h" +#include "source_base/timer.h" +#include "source_base/tool_title.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" void Matrix_Orbs22::init(const int mode, diff --git a/source/module_ri/Matrix_Orbs22.h b/source/module_ri/Matrix_Orbs22.h index c3fa5331f8..47b04c9599 100644 --- a/source/module_ri/Matrix_Orbs22.h +++ b/source/module_ri/Matrix_Orbs22.h @@ -6,8 +6,8 @@ #ifndef MATRIX_ORB22_H #define MATRIX_ORB22_H -#include "module_base/element_basis_index.h" -#include "module_base/vector3.h" +#include "source_base/element_basis_index.h" +#include "source_base/vector3.h" #include "module_basis/module_ao/ORB_gaunt_table.h" #include "module_basis/module_ao/ORB_read.h" #include "module_hamilt_lcao/hamilt_lcaodft/center2_orb-orb22.h" diff --git a/source/module_ri/Mix_DMk_2D.cpp b/source/module_ri/Mix_DMk_2D.cpp index 8abd540a14..286075a5d6 100644 --- a/source/module_ri/Mix_DMk_2D.cpp +++ b/source/module_ri/Mix_DMk_2D.cpp @@ -4,7 +4,7 @@ //======================= #include "Mix_DMk_2D.h" -#include "module_base/tool_title.h" +#include "source_base/tool_title.h" Mix_DMk_2D &Mix_DMk_2D::set_nks(const int nks, const bool gamma_only_in) { diff --git a/source/module_ri/Mix_DMk_2D.h b/source/module_ri/Mix_DMk_2D.h index 9d640fa7f1..2f24471d91 100644 --- a/source/module_ri/Mix_DMk_2D.h +++ b/source/module_ri/Mix_DMk_2D.h @@ -7,9 +7,9 @@ #define MIX_DMK_2D_H #include "Mix_Matrix.h" -#include "module_base/module_mixing/mixing.h" -#include "module_base/matrix.h" -#include "module_base/complexmatrix.h" +#include "source_base/module_mixing/mixing.h" +#include "source_base/matrix.h" +#include "source_base/complexmatrix.h" #include diff --git a/source/module_ri/Mix_Matrix.cpp b/source/module_ri/Mix_Matrix.cpp index 21d5b5e3c2..bb7ad3c840 100644 --- a/source/module_ri/Mix_Matrix.cpp +++ b/source/module_ri/Mix_Matrix.cpp @@ -7,9 +7,9 @@ #define MIX_DATA_HPP #include "Mix_Matrix.h" -#include "module_base/matrix.h" -#include "module_base/complexmatrix.h" -#include "module_base/tool_title.h" +#include "source_base/matrix.h" +#include "source_base/complexmatrix.h" +#include "source_base/tool_title.h" template<> void Mix_Matrix::mix(const ModuleBase::matrix& data_in, const bool flag_restart) diff --git a/source/module_ri/Mix_Matrix.h b/source/module_ri/Mix_Matrix.h index 820a6c47f2..fa11bbdb00 100644 --- a/source/module_ri/Mix_Matrix.h +++ b/source/module_ri/Mix_Matrix.h @@ -8,8 +8,8 @@ #include -#include "module_base/module_mixing/mixing.h" -#include "module_base/module_mixing/plain_mixing.h" +#include "source_base/module_mixing/mixing.h" +#include "source_base/module_mixing/plain_mixing.h" template class Mix_Matrix { diff --git a/source/module_ri/RI_2D_Comm.hpp b/source/module_ri/RI_2D_Comm.hpp index f40e6f59d4..4f8e0242fc 100644 --- a/source/module_ri/RI_2D_Comm.hpp +++ b/source/module_ri/RI_2D_Comm.hpp @@ -9,8 +9,8 @@ #include "RI_2D_Comm.h" #include "RI_Util.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" -#include "module_base/tool_title.h" -#include "module_base/timer.h" +#include "source_base/tool_title.h" +#include "source_base/timer.h" #include "module_hamilt_lcao/hamilt_lcaodft/LCAO_domain.h" #include "module_parameter/parameter.h" #include diff --git a/source/module_ri/RI_Util.hpp b/source/module_ri/RI_Util.hpp index c08043fd00..a076d94f66 100644 --- a/source/module_ri/RI_Util.hpp +++ b/source/module_ri/RI_Util.hpp @@ -8,7 +8,7 @@ #include "RI_Util.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" -#include "module_base/global_function.h" +#include "source_base/global_function.h" namespace RI_Util { diff --git a/source/module_ri/RPA_LRI.h b/source/module_ri/RPA_LRI.h index e194a8ea8d..2007715019 100644 --- a/source/module_ri/RPA_LRI.h +++ b/source/module_ri/RPA_LRI.h @@ -10,7 +10,7 @@ #include "LRI_CV.h" // #include "module_xc/exx_info.h" // #include "module_basis/module_ao/ORB_atomic_lm.h" -#include "module_base/matrix.h" +#include "source_base/matrix.h" // #include "module_ri/Exx_LRI.h" // #include #include diff --git a/source/module_ri/abfs.h b/source/module_ri/abfs.h index b6e6694e11..926e514cc3 100644 --- a/source/module_ri/abfs.h +++ b/source/module_ri/abfs.h @@ -1,8 +1,8 @@ #ifndef ABFS_H #define ABFS_H -#include "../module_base/vector3.h" -#include "../module_base/matrix.h" +#include "../source_base/vector3.h" +#include "../source_base/matrix.h" #include "exx_abfs.h" #include diff --git a/source/module_ri/conv_coulomb_pot_k.cpp b/source/module_ri/conv_coulomb_pot_k.cpp index fb77e22d04..29b48e1512 100644 --- a/source/module_ri/conv_coulomb_pot_k.cpp +++ b/source/module_ri/conv_coulomb_pot_k.cpp @@ -1,5 +1,5 @@ #include "conv_coulomb_pot_k.h" -#include "../module_base/constants.h" +#include "../source_base/constants.h" #include "module_parameter/parameter.h" #include "../module_basis/module_ao/ORB_atomic_lm.h" #include "../module_hamilt_pw/hamilt_pwdft/global.h" diff --git a/source/module_ri/exx_abfs-abfs_index.h b/source/module_ri/exx_abfs-abfs_index.h index 09cc493f2e..1672fa24ec 100644 --- a/source/module_ri/exx_abfs-abfs_index.h +++ b/source/module_ri/exx_abfs-abfs_index.h @@ -4,7 +4,7 @@ #include "exx_abfs.h" #include -#include "../module_base/element_basis_index.h" +#include "../source_base/element_basis_index.h" #include "../module_basis/module_ao/ORB_atomic_lm.h" class LCAO_Orbitals; diff --git a/source/module_ri/exx_abfs-construct_orbs.cpp b/source/module_ri/exx_abfs-construct_orbs.cpp index fe731d7dbd..79a7fcbd54 100644 --- a/source/module_ri/exx_abfs-construct_orbs.cpp +++ b/source/module_ri/exx_abfs-construct_orbs.cpp @@ -2,8 +2,8 @@ #include "module_parameter/parameter.h" #include "ABFs_Construct-PCA.h" -#include "module_base/gram_schmidt_orth-inl.h" -#include "module_base/gram_schmidt_orth.h" +#include "source_base/gram_schmidt_orth-inl.h" +#include "source_base/gram_schmidt_orth.h" #include "module_basis/module_ao/ORB_read.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" //for ucell #include "module_ri/test_code/exx_abfs-construct_orbs-test.h" // Peize Lin test diff --git a/source/module_ri/exx_abfs-io.cpp b/source/module_ri/exx_abfs-io.cpp index 938d2b0238..ac20e5a5d4 100644 --- a/source/module_ri/exx_abfs-io.cpp +++ b/source/module_ri/exx_abfs-io.cpp @@ -7,8 +7,8 @@ #include "exx_abfs-abfs_index.h" #include "../module_hamilt_pw/hamilt_pwdft/global.h" #include "../module_basis/module_ao/ORB_read.h" -#include "../module_base/global_function.h" -#include "../module_base/math_integral.h" // mohan add 2021-04-03 +#include "../source_base/global_function.h" +#include "../source_base/math_integral.h" // mohan add 2021-04-03 std::vector>> Exx_Abfs::IO::construct_abfs( diff --git a/source/module_ri/exx_abfs-io.h b/source/module_ri/exx_abfs-io.h index 15dd9303a3..e273f4b2b7 100644 --- a/source/module_ri/exx_abfs-io.h +++ b/source/module_ri/exx_abfs-io.h @@ -6,8 +6,8 @@ #include #include #include "../module_basis/module_ao/ORB_atomic_lm.h" -#include "../module_base/matrix.h" -#include "../module_base/element_basis_index.h" +#include "../source_base/matrix.h" +#include "../source_base/element_basis_index.h" #include "module_cell/klist.h" #ifdef __MPI #include "mpi.h" diff --git a/source/module_ri/exx_abfs-jle.cpp b/source/module_ri/exx_abfs-jle.cpp index f9086fe777..a04edff334 100644 --- a/source/module_ri/exx_abfs-jle.cpp +++ b/source/module_ri/exx_abfs-jle.cpp @@ -3,9 +3,9 @@ #include "module_parameter/parameter.h" #include "../module_hamilt_pw/hamilt_pwdft/global.h" #include "../module_basis/module_ao/ORB_read.h" -#include "../module_base/global_function.h" -#include "../module_base/mathzone.h" -#include "../module_base/math_sphbes.h" // mohan add 2021-05-06 +#include "../source_base/global_function.h" +#include "../source_base/mathzone.h" +#include "../source_base/math_sphbes.h" // mohan add 2021-05-06 bool Exx_Abfs::Jle::generate_matrix = false; int Exx_Abfs::Jle::Lmax = 2; diff --git a/source/module_ri/exx_abfs.h b/source/module_ri/exx_abfs.h index 845eb3d81b..ec55c0de8c 100644 --- a/source/module_ri/exx_abfs.h +++ b/source/module_ri/exx_abfs.h @@ -8,9 +8,9 @@ using std::map; #include #include "../module_basis/module_ao/ORB_atomic_lm.h" -#include "../module_base/element_basis_index.h" -#include "../module_base/matrix.h" -#include "../module_base/vector3.h" +#include "../source_base/element_basis_index.h" +#include "../source_base/matrix.h" +#include "../source_base/vector3.h" class Exx_Abfs { diff --git a/source/module_ri/exx_lip.h b/source/module_ri/exx_lip.h index 9f19560c10..4ad9c48de4 100644 --- a/source/module_ri/exx_lip.h +++ b/source/module_ri/exx_lip.h @@ -6,8 +6,8 @@ #define EXX_LIP_H #include "module_hamilt_general/module_xc/exx_info.h" -#include "module_base/macros.h" -#include "module_base/matrix.h" +#include "source_base/macros.h" +#include "source_base/matrix.h" #include #include diff --git a/source/module_ri/exx_lip.hpp b/source/module_ri/exx_lip.hpp index 5e26446df4..014320bf86 100644 --- a/source/module_ri/exx_lip.hpp +++ b/source/module_ri/exx_lip.hpp @@ -8,22 +8,22 @@ #define EXX_LIP_HPP #include "exx_lip.h" -#include "module_base/vector3.h" -#include "module_base/global_function.h" -#include "module_base/vector3.h" +#include "source_base/vector3.h" +#include "source_base/global_function.h" +#include "source_base/vector3.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" #include "module_cell/klist.h" #include "module_hamilt_lcao/hamilt_lcaodft/wavefunc_in_pw.h" -#include "module_base/lapack_connector.h" -#include "module_base/parallel_global.h" +#include "source_base/lapack_connector.h" +#include "source_base/parallel_global.h" #include "module_parameter/parameter.h" #include "module_elecstate/elecstate.h" #include "module_basis/module_pw/pw_basis_k.h" #include "module_cell/module_symmetry/symmetry.h" #include "module_psi/psi_init.h" #include "module_hamilt_pw/hamilt_pwdft/structure_factor.h" -#include "module_base/tool_title.h" -#include "module_base/timer.h" +#include "source_base/tool_title.h" +#include "source_base/timer.h" #include diff --git a/source/module_ri/exx_opt_orb.h b/source/module_ri/exx_opt_orb.h index 2b68dfa40a..4a785f2125 100644 --- a/source/module_ri/exx_opt_orb.h +++ b/source/module_ri/exx_opt_orb.h @@ -1,8 +1,8 @@ #ifndef EXX_OPT_ORB_H #define EXX_OPT_ORB_H -#include "../module_base/matrix.h" -#include "../module_base/element_basis_index.h" +#include "../source_base/matrix.h" +#include "../source_base/element_basis_index.h" #include "module_cell/klist.h" #include "module_basis/module_ao/ORB_read.h" #include diff --git a/source/module_ri/module_exx_symmetry/irreducible_sector.h b/source/module_ri/module_exx_symmetry/irreducible_sector.h index 7a12b9a232..84b2d31909 100644 --- a/source/module_ri/module_exx_symmetry/irreducible_sector.h +++ b/source/module_ri/module_exx_symmetry/irreducible_sector.h @@ -2,8 +2,8 @@ #include #include #include -#include "module_base/abfs-vector3_order.h" -#include "module_base/matrix3.h" +#include "source_base/abfs-vector3_order.h" +#include "source_base/matrix3.h" #include "module_cell/unitcell.h" #include "module_cell/module_symmetry/symmetry.h" #include "module_cell/klist.h" diff --git a/source/module_ri/module_exx_symmetry/symmetry_rotation.cpp b/source/module_ri/module_exx_symmetry/symmetry_rotation.cpp index 27cfc8e723..7bdd28436c 100644 --- a/source/module_ri/module_exx_symmetry/symmetry_rotation.cpp +++ b/source/module_ri/module_exx_symmetry/symmetry_rotation.cpp @@ -1,12 +1,12 @@ #include "symmetry_rotation.h" -#include "module_base/constants.h" +#include "source_base/constants.h" #include "module_parameter/parameter.h" #include -#include "module_base/parallel_reduce.h" -#include "module_base/scalapack_connector.h" -#include "module_base/tool_title.h" -#include "module_base/timer.h" -#include "module_base/mathzone.h" +#include "source_base/parallel_reduce.h" +#include "source_base/scalapack_connector.h" +#include "source_base/tool_title.h" +#include "source_base/timer.h" +#include "source_base/mathzone.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" diff --git a/source/module_ri/module_exx_symmetry/symmetry_rotation_R.hpp b/source/module_ri/module_exx_symmetry/symmetry_rotation_R.hpp index 12d88d1a17..d2301576fd 100644 --- a/source/module_ri/module_exx_symmetry/symmetry_rotation_R.hpp +++ b/source/module_ri/module_exx_symmetry/symmetry_rotation_R.hpp @@ -1,7 +1,7 @@ #include "symmetry_rotation.h" #include "module_ri/RI_Util.h" -#include "module_base/blas_connector.h" -#include "module_base/timer.h" +#include "source_base/blas_connector.h" +#include "source_base/timer.h" #include #include #include diff --git a/source/module_ri/module_exx_symmetry/symmetry_rotation_R_hcontainer.hpp b/source/module_ri/module_exx_symmetry/symmetry_rotation_R_hcontainer.hpp index 3aef195160..98623d359a 100644 --- a/source/module_ri/module_exx_symmetry/symmetry_rotation_R_hcontainer.hpp +++ b/source/module_ri/module_exx_symmetry/symmetry_rotation_R_hcontainer.hpp @@ -1,6 +1,6 @@ #include "symmetry_rotation.h" -#include "module_base/blas_connector.h" -#include "module_base/parallel_reduce.h" +#include "source_base/blas_connector.h" +#include "source_base/parallel_reduce.h" namespace ModuleSymmetry { template diff --git a/source/module_ri/serialization_boost.h b/source/module_ri/serialization_boost.h index 7d830b4b0e..c187155489 100644 --- a/source/module_ri/serialization_boost.h +++ b/source/module_ri/serialization_boost.h @@ -11,10 +11,10 @@ #include #include -#include "../module_base/vector3.h" -#include "../module_base/abfs-vector3_order.h" -#include "../module_base/matrix.h" -#include "../module_base/matrix_wrapper.h" +#include "../source_base/vector3.h" +#include "../source_base/abfs-vector3_order.h" +#include "../source_base/matrix.h" +#include "../source_base/matrix_wrapper.h" namespace boost { diff --git a/source/module_ri/serialization_cereal.h b/source/module_ri/serialization_cereal.h index 6690b738f6..802449f624 100644 --- a/source/module_ri/serialization_cereal.h +++ b/source/module_ri/serialization_cereal.h @@ -9,9 +9,9 @@ #include #include -#include "../module_base/vector3.h" -#include "../module_base/abfs-vector3_order.h" -#include "../module_base/matrix.h" +#include "../source_base/vector3.h" +#include "../source_base/abfs-vector3_order.h" +#include "../source_base/matrix.h" diff --git a/source/module_ri/test/dm_mixing_test.cpp b/source/module_ri/test/dm_mixing_test.cpp index 9831f5101d..5f8124e2e3 100644 --- a/source/module_ri/test/dm_mixing_test.cpp +++ b/source/module_ri/test/dm_mixing_test.cpp @@ -1,6 +1,6 @@ #include "gmock/gmock.h" #include "gtest/gtest.h" -#include "module_base/module_mixing/broyden_mixing.h" +#include "source_base/module_mixing/broyden_mixing.h" #include "module_ri/Mix_DMk_2D.h" #include "module_ri/Mix_Matrix.h" diff --git a/source/module_ri/test_code/element_basis_index-unittest.cpp b/source/module_ri/test_code/element_basis_index-unittest.cpp index 0fbf2f21ee..427c365569 100644 --- a/source/module_ri/test_code/element_basis_index-unittest.cpp +++ b/source/module_ri/test_code/element_basis_index-unittest.cpp @@ -3,7 +3,7 @@ // DATE : 2016-06-02 //========================================================== -#include "module_base/element_basis_index.h" +#include "source_base/element_basis_index.h" #include "element_basis_index-test.h" ModuleBase::Element_Basis_Index::Range construct_range() diff --git a/source/module_ri/test_code/scalapack-test.cpp b/source/module_ri/test_code/scalapack-test.cpp index a9ca65467b..e3ba182f90 100644 --- a/source/module_ri/test_code/scalapack-test.cpp +++ b/source/module_ri/test_code/scalapack-test.cpp @@ -1,8 +1,8 @@ #ifdef __MPI #include #endif -#include "module_base/scalapack-connector.h" -#include "module_base/global_function.h" +#include "source_base/scalapack-connector.h" +#include "source_base/global_function.h" void test_pblas() { diff --git a/source/source_esolver/esolver.cpp b/source/source_esolver/esolver.cpp index c3a7c4d5bc..44247224de 100644 --- a/source/source_esolver/esolver.cpp +++ b/source/source_esolver/esolver.cpp @@ -2,7 +2,7 @@ #include "esolver_ks_pw.h" #include "esolver_sdft_pw.h" -#include "module_base/module_device/device.h" +#include "source_base/module_device/device.h" #include "module_parameter/parameter.h" #ifdef __LCAO #include "esolver_dm2rho.h" @@ -13,7 +13,7 @@ #include "module_lr/esolver_lrtd_lcao.h" extern "C" { -#include "module_base/blacs_connector.h" +#include "source_base/blacs_connector.h" } #endif #include "esolver_dp.h" diff --git a/source/source_esolver/esolver.h b/source/source_esolver/esolver.h index d889052348..c24512c28c 100644 --- a/source/source_esolver/esolver.h +++ b/source/source_esolver/esolver.h @@ -1,7 +1,7 @@ #ifndef ESOLVER_H #define ESOLVER_H -#include "module_base/matrix.h" +#include "source_base/matrix.h" #include "module_cell/unitcell.h" #include "module_parameter/parameter.h" diff --git a/source/source_esolver/esolver_dm2rho.cpp b/source/source_esolver/esolver_dm2rho.cpp index 2a10c71306..313eb0aeae 100644 --- a/source/source_esolver/esolver_dm2rho.cpp +++ b/source/source_esolver/esolver_dm2rho.cpp @@ -1,6 +1,6 @@ #include "esolver_dm2rho.h" -#include "module_base/timer.h" +#include "source_base/timer.h" #include "module_cell/module_neighbor/sltk_atom_arrange.h" #include "module_elecstate/elecstate_lcao.h" #include "module_elecstate/read_pseudo.h" diff --git a/source/source_esolver/esolver_dp.cpp b/source/source_esolver/esolver_dp.cpp index 1ca9939c35..bb9666aeaf 100644 --- a/source/source_esolver/esolver_dp.cpp +++ b/source/source_esolver/esolver_dp.cpp @@ -19,8 +19,8 @@ */ #include "esolver_dp.h" -#include "module_base/parallel_common.h" -#include "module_base/timer.h" +#include "source_base/parallel_common.h" +#include "source_base/timer.h" #include "module_io/output_log.h" #include "module_io/cif_io.h" diff --git a/source/source_esolver/esolver_fp.cpp b/source/source_esolver/esolver_fp.cpp index 5aebb6724e..8318a26179 100644 --- a/source/source_esolver/esolver_fp.cpp +++ b/source/source_esolver/esolver_fp.cpp @@ -1,6 +1,6 @@ #include "esolver_fp.h" -#include "module_base/global_variable.h" +#include "source_base/global_variable.h" #include "module_elecstate/cal_ux.h" #include "module_elecstate/module_charge/symmetry_rho.h" #include "module_elecstate/read_pseudo.h" diff --git a/source/source_esolver/esolver_gets.cpp b/source/source_esolver/esolver_gets.cpp index 734790ca1c..bc00f18300 100644 --- a/source/source_esolver/esolver_gets.cpp +++ b/source/source_esolver/esolver_gets.cpp @@ -1,6 +1,6 @@ #include "esolver_gets.h" -#include "module_base/timer.h" +#include "source_base/timer.h" #include "module_cell/module_neighbor/sltk_atom_arrange.h" #include "module_elecstate/elecstate_lcao.h" #include "module_elecstate/read_pseudo.h" diff --git a/source/source_esolver/esolver_ks.cpp b/source/source_esolver/esolver_ks.cpp index 9bfca23bfd..3f11ab4ae1 100644 --- a/source/source_esolver/esolver_ks.cpp +++ b/source/source_esolver/esolver_ks.cpp @@ -3,8 +3,8 @@ // To setup plane wave for electronic wave functions #include "pw_setup.h" -#include "module_base/timer.h" -#include "module_base/global_variable.h" +#include "source_base/timer.h" +#include "source_base/global_variable.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" #include "module_parameter/parameter.h" #include "module_hamilt_lcao/module_dftu/dftu.h" diff --git a/source/source_esolver/esolver_ks_lcao.cpp b/source/source_esolver/esolver_ks_lcao.cpp index ab4bac8ae7..7c565a6fde 100644 --- a/source/source_esolver/esolver_ks_lcao.cpp +++ b/source/source_esolver/esolver_ks_lcao.cpp @@ -2,9 +2,9 @@ #include "module_io/write_proj_band_lcao.h" // projcted band structure -#include "module_base/formatter.h" -#include "module_base/global_variable.h" -#include "module_base/tool_title.h" +#include "source_base/formatter.h" +#include "source_base/global_variable.h" +#include "source_base/tool_title.h" #include "module_elecstate/elecstate_tools.h" #include "module_elecstate/module_dm/cal_dm_psi.h" @@ -34,7 +34,7 @@ #include "module_io/write_vxc.hpp" #include "module_io/write_vxc_r.hpp" -#include "module_base/global_function.h" +#include "source_base/global_function.h" #include "module_cell/module_neighbor/sltk_grid_driver.h" #include "module_elecstate/cal_ux.h" #include "module_elecstate/module_charge/symmetry_rho.h" diff --git a/source/source_esolver/esolver_ks_lcao_tddft.cpp b/source/source_esolver/esolver_ks_lcao_tddft.cpp index b338d7e2dc..b6d6d260d6 100644 --- a/source/source_esolver/esolver_ks_lcao_tddft.cpp +++ b/source/source_esolver/esolver_ks_lcao_tddft.cpp @@ -8,10 +8,10 @@ #include "module_elecstate/elecstate_tools.h" //--------------temporary---------------------------- -#include "module_base/blas_connector.h" -#include "module_base/global_function.h" -#include "module_base/lapack_connector.h" -#include "module_base/scalapack_connector.h" +#include "source_base/blas_connector.h" +#include "source_base/global_function.h" +#include "source_base/lapack_connector.h" +#include "source_base/scalapack_connector.h" #include "module_elecstate/module_charge/symmetry_rho.h" #include "module_elecstate/module_dm/cal_dm_psi.h" #include "module_elecstate/module_dm/cal_edm_tddft.h" diff --git a/source/source_esolver/esolver_ks_lcao_tddft.h b/source/source_esolver/esolver_ks_lcao_tddft.h index 862b16a6ca..25ed68bcc5 100644 --- a/source/source_esolver/esolver_ks_lcao_tddft.h +++ b/source/source_esolver/esolver_ks_lcao_tddft.h @@ -2,7 +2,7 @@ #define ESOLVER_KS_LCAO_TDDFT_H #include "esolver_ks.h" #include "esolver_ks_lcao.h" -#include "module_base/scalapack_connector.h" // Cpxgemr2d +#include "source_base/scalapack_connector.h" // Cpxgemr2d #include "module_hamilt_lcao/hamilt_lcaodft/record_adj.h" #include "module_psi/psi.h" diff --git a/source/source_esolver/esolver_ks_lcaopw.cpp b/source/source_esolver/esolver_ks_lcaopw.cpp index 2f07137996..d9ddcdb52c 100644 --- a/source/source_esolver/esolver_ks_lcaopw.cpp +++ b/source/source_esolver/esolver_ks_lcaopw.cpp @@ -18,14 +18,14 @@ //-----stress------------------ #include "module_hamilt_pw/hamilt_pwdft/stress_pw.h" //--------------------------------------------------- -#include "module_base/memory.h" +#include "source_base/memory.h" #include "module_elecstate/elecstate_pw.h" #include "module_hamilt_pw/hamilt_pwdft/hamilt_lcaopw.h" #include "module_hamilt_pw/hamilt_pwdft/hamilt_pw.h" #include "source_hsolver/diago_iter_assist.h" #include "source_hsolver/hsolver_lcaopw.h" #include "source_hsolver/kernels/dngvd_op.h" -#include "module_base/kernels/math_kernel_op.h" +#include "source_base/kernels/math_kernel_op.h" #include "module_io/berryphase.h" #include "module_io/numerical_basis.h" #include "module_io/numerical_descriptor.h" diff --git a/source/source_esolver/esolver_ks_pw.cpp b/source/source_esolver/esolver_ks_pw.cpp index 7ead98436b..366f92b15d 100644 --- a/source/source_esolver/esolver_ks_pw.cpp +++ b/source/source_esolver/esolver_ks_pw.cpp @@ -1,9 +1,9 @@ #include "esolver_ks_pw.h" -#include "module_base/formatter.h" -#include "module_base/global_variable.h" -#include "module_base/kernels/math_kernel_op.h" -#include "module_base/memory.h" +#include "source_base/formatter.h" +#include "source_base/global_variable.h" +#include "source_base/kernels/math_kernel_op.h" +#include "source_base/memory.h" #include "module_elecstate/cal_ux.h" #include "module_elecstate/elecstate_pw.h" #include "module_elecstate/elecstate_pw_sdft.h" @@ -44,7 +44,7 @@ #include #ifdef __DSP -#include "module_base/kernels/dsp/dsp_connector.h" +#include "source_base/kernels/dsp/dsp_connector.h" #endif #include diff --git a/source/source_esolver/esolver_ks_pw.h b/source/source_esolver/esolver_ks_pw.h index c165086177..adc48dae30 100644 --- a/source/source_esolver/esolver_ks_pw.h +++ b/source/source_esolver/esolver_ks_pw.h @@ -7,7 +7,7 @@ #include "module_hamilt_pw/hamilt_pwdft/global.h" #include -#include +#include namespace ModuleESolver { diff --git a/source/source_esolver/esolver_of.cpp b/source/source_esolver/esolver_of.cpp index f19e65a538..42791b387f 100644 --- a/source/source_esolver/esolver_of.cpp +++ b/source/source_esolver/esolver_of.cpp @@ -5,7 +5,7 @@ #include "module_io/output_log.h" #include "module_io/write_elecstat_pot.h" //-----------temporary------------------------- -#include "module_base/global_function.h" +#include "source_base/global_function.h" #include "module_elecstate/module_charge/symmetry_rho.h" #include "module_hamilt_general/module_ewald/H_Ewald_pw.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" diff --git a/source/source_esolver/esolver_of.h b/source/source_esolver/esolver_of.h index 222dfd74fc..301253041c 100644 --- a/source/source_esolver/esolver_of.h +++ b/source/source_esolver/esolver_of.h @@ -2,8 +2,8 @@ #define ESOLVER_OF_H #include "esolver_fp.h" -#include "module_base/opt_DCsrch.h" -#include "module_base/opt_TN.hpp" +#include "source_base/opt_DCsrch.h" +#include "source_base/opt_TN.hpp" #include "module_elecstate/module_charge/charge.h" #include "module_hamilt_pw/hamilt_ofdft/kedf_lkt.h" #include "module_hamilt_pw/hamilt_ofdft/kedf_tf.h" diff --git a/source/source_esolver/esolver_of_tool.cpp b/source/source_esolver/esolver_of_tool.cpp index 48f44e5fe8..efa3980b8f 100644 --- a/source/source_esolver/esolver_of_tool.cpp +++ b/source/source_esolver/esolver_of_tool.cpp @@ -1,6 +1,6 @@ #include "esolver_of.h" -#include "module_base/formatter.h" -#include "module_base/memory.h" +#include "source_base/formatter.h" +#include "source_base/memory.h" #include "module_elecstate/module_pot/efield.h" #include "module_elecstate/module_pot/gatefield.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" diff --git a/source/source_esolver/esolver_sdft_pw.cpp b/source/source_esolver/esolver_sdft_pw.cpp index 6559b3a778..f8bd9d1864 100644 --- a/source/source_esolver/esolver_sdft_pw.cpp +++ b/source/source_esolver/esolver_sdft_pw.cpp @@ -1,7 +1,7 @@ #include "esolver_sdft_pw.h" -#include "module_base/global_variable.h" -#include "module_base/memory.h" +#include "source_base/global_variable.h" +#include "source_base/memory.h" #include "module_elecstate/module_charge/symmetry_rho.h" #include "module_hamilt_pw/hamilt_stodft/sto_dos.h" #include "module_hamilt_pw/hamilt_stodft/sto_elecond.h" diff --git a/source/source_esolver/lcao_before_scf.cpp b/source/source_esolver/lcao_before_scf.cpp index 58a6ea441d..f328b786e3 100644 --- a/source/source_esolver/lcao_before_scf.cpp +++ b/source/source_esolver/lcao_before_scf.cpp @@ -4,7 +4,7 @@ #include "module_hamilt_lcao/module_dftu/dftu.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" // -#include "module_base/timer.h" +#include "source_base/timer.h" #include "module_cell/module_neighbor/sltk_atom_arrange.h" #include "module_cell/module_neighbor/sltk_grid_driver.h" #include "module_io/berryphase.h" @@ -19,7 +19,7 @@ #ifdef __MLALGO #include "module_hamilt_lcao/module_deepks/LCAO_deepks.h" #endif -#include "module_base/formatter.h" +#include "source_base/formatter.h" #include "module_elecstate/elecstate_lcao.h" #include "module_elecstate/module_dm/cal_dm_psi.h" #include "module_hamilt_lcao/hamilt_lcaodft/LCAO_domain.h" diff --git a/source/source_esolver/lcao_others.cpp b/source/source_esolver/lcao_others.cpp index 1f60903d61..b9a38e1c7f 100644 --- a/source/source_esolver/lcao_others.cpp +++ b/source/source_esolver/lcao_others.cpp @@ -5,7 +5,7 @@ #include "module_hamilt_lcao/module_dftu/dftu.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" // -#include "module_base/timer.h" +#include "source_base/timer.h" #include "module_cell/module_neighbor/sltk_atom_arrange.h" #include "module_cell/module_neighbor/sltk_grid_driver.h" #include "module_io/berryphase.h" @@ -18,7 +18,7 @@ #ifdef __MLALGO #include "module_hamilt_lcao/module_deepks/LCAO_deepks.h" #endif -#include "module_base/formatter.h" +#include "source_base/formatter.h" #include "module_elecstate/elecstate_lcao.h" #include "module_elecstate/module_dm/cal_dm_psi.h" diff --git a/source/source_esolver/pw_others.cpp b/source/source_esolver/pw_others.cpp index 013e4eb9d7..53556d229b 100644 --- a/source/source_esolver/pw_others.cpp +++ b/source/source_esolver/pw_others.cpp @@ -1,6 +1,6 @@ #include "esolver_ks_pw.h" -#include "module_base/global_variable.h" +#include "source_base/global_variable.h" #include "module_hamilt_pw/hamilt_pwdft/elecond.h" #include "module_io/input_conv.h" #include "module_io/nscf_band.h" @@ -19,15 +19,15 @@ //-----stress------------------ #include "module_hamilt_pw/hamilt_pwdft/stress_pw.h" //--------------------------------------------------- -#include "module_base/memory.h" -#include "module_base/module_device/device.h" +#include "source_base/memory.h" +#include "source_base/module_device/device.h" #include "module_elecstate/elecstate_pw.h" #include "module_hamilt_general/module_vdw/vdw.h" #include "module_hamilt_pw/hamilt_pwdft/hamilt_pw.h" #include "source_hsolver/diago_iter_assist.h" #include "source_hsolver/hsolver_pw.h" #include "source_hsolver/kernels/dngvd_op.h" -#include "module_base/kernels/math_kernel_op.h" +#include "source_base/kernels/math_kernel_op.h" #include "module_io/berryphase.h" #include "module_io/numerical_basis.h" #include "module_io/numerical_descriptor.h" @@ -39,7 +39,7 @@ #include #include -#include "module_base/formatter.h" +#include "source_base/formatter.h" // mohan add 2025-03-06 #include "module_io/cal_test.h" diff --git a/source/source_esolver/pw_setup.cpp b/source/source_esolver/pw_setup.cpp index b3f6cb9a07..3478fc5724 100644 --- a/source/source_esolver/pw_setup.cpp +++ b/source/source_esolver/pw_setup.cpp @@ -1,7 +1,7 @@ #include "pw_setup.h" // To get POOL_WORLD -#include "module_base/parallel_comm.h" +#include "source_base/parallel_comm.h" // Print information #include "module_io/print_info.h" diff --git a/source/source_hsolver/diag_const_nums.h b/source/source_hsolver/diag_const_nums.h index 24a33194e1..05520e4e84 100644 --- a/source/source_hsolver/diag_const_nums.h +++ b/source/source_hsolver/diag_const_nums.h @@ -1,6 +1,6 @@ #ifndef DIAG_CONST_NUMS #define DIAG_CONST_NUMS -#include "module_base/module_device/memory_op.h" +#include "source_base/module_device/memory_op.h" template struct const_nums diff --git a/source/source_hsolver/diag_hs_para.cpp b/source/source_hsolver/diag_hs_para.cpp index 8246fb2a3f..b68eeebf3c 100644 --- a/source/source_hsolver/diag_hs_para.cpp +++ b/source/source_hsolver/diag_hs_para.cpp @@ -1,7 +1,7 @@ #include "source_hsolver/diag_hs_para.h" -#include "module_base/scalapack_connector.h" -#include "module_base/parallel_2d.h" +#include "source_base/scalapack_connector.h" +#include "source_base/parallel_2d.h" #include "source_hsolver/diago_pxxxgvx.h" #ifdef __ELPA diff --git a/source/source_hsolver/diag_hs_para.h b/source/source_hsolver/diag_hs_para.h index 659f3b0781..ba7cae70a3 100644 --- a/source/source_hsolver/diag_hs_para.h +++ b/source/source_hsolver/diag_hs_para.h @@ -1,5 +1,5 @@ -#include "module_base/parallel_2d.h" -#include "module_base/macros.h" +#include "source_base/parallel_2d.h" +#include "source_base/macros.h" #ifdef __MPI #include diff --git a/source/source_hsolver/diago_bpcg.cpp b/source/source_hsolver/diago_bpcg.cpp index c04be1699b..4c06e19d2b 100644 --- a/source/source_hsolver/diago_bpcg.cpp +++ b/source/source_hsolver/diago_bpcg.cpp @@ -1,10 +1,10 @@ #include "source_hsolver/diago_bpcg.h" #include "diago_iter_assist.h" -#include "module_base/blas_connector.h" -#include "module_base/global_function.h" -#include "module_base/kernels/math_kernel_op.h" -#include "module_base/parallel_comm.h" // different MPI worlds +#include "source_base/blas_connector.h" +#include "source_base/global_function.h" +#include "source_base/kernels/math_kernel_op.h" +#include "source_base/parallel_comm.h" // different MPI worlds #include "source_hsolver/kernels/bpcg_kernel_op.h" #include "para_linear_transform.h" diff --git a/source/source_hsolver/diago_bpcg.h b/source/source_hsolver/diago_bpcg.h index 7c1553184d..cb0232c8c7 100644 --- a/source/source_hsolver/diago_bpcg.h +++ b/source/source_hsolver/diago_bpcg.h @@ -1,10 +1,10 @@ #ifndef DIAGO_BPCG_H_ #define DIAGO_BPCG_H_ -#include "module_base/kernels/math_kernel_op.h" -#include "module_base/module_device/memory_op.h" -#include "module_base/module_device/types.h" -#include "module_base/para_gemm.h" +#include "source_base/kernels/math_kernel_op.h" +#include "source_base/module_device/memory_op.h" +#include "source_base/module_device/types.h" +#include "source_base/para_gemm.h" #include "module_hamilt_general/hamilt.h" #include "module_hamilt_pw/hamilt_pwdft/structure_factor.h" #include "source_hsolver/kernels/dngvd_op.h" @@ -12,7 +12,7 @@ #include #include -#include +#include namespace hsolver { @@ -347,7 +347,7 @@ class DiagoBPCG using syncmem_complex_op = ct::kernels::synchronize_memory; // note: these operators use template parameter base_device::Device_* - // defined in module_base/module_device/types.h + // defined in source_base/module_device/types.h // different from ct_Device! using gemm_op = ModuleBase::gemm_op; diff --git a/source/source_hsolver/diago_cg.cpp b/source/source_hsolver/diago_cg.cpp index 7b4a1a9f79..0c8f5b81e7 100644 --- a/source/source_hsolver/diago_cg.cpp +++ b/source/source_hsolver/diago_cg.cpp @@ -4,12 +4,12 @@ #include #include #include -#include -#include -#include -#include -#include // ModuleBase::TITLE -#include // ModuleBase::GlobalFunc::NOTE +#include +#include +#include +#include +#include // ModuleBase::TITLE +#include // ModuleBase::GlobalFunc::NOTE #include using namespace hsolver; diff --git a/source/source_hsolver/diago_cg.h b/source/source_hsolver/diago_cg.h index 9d254ded18..09ef0b25ab 100644 --- a/source/source_hsolver/diago_cg.h +++ b/source/source_hsolver/diago_cg.h @@ -3,8 +3,8 @@ #include -#include -#include +#include +#include #include #include diff --git a/source/source_hsolver/diago_cusolver.cpp b/source/source_hsolver/diago_cusolver.cpp index efaf20a28a..0ab1f0e276 100644 --- a/source/source_hsolver/diago_cusolver.cpp +++ b/source/source_hsolver/diago_cusolver.cpp @@ -1,9 +1,9 @@ #include "diago_cusolver.h" -#include "module_base/blacs_connector.h" -#include "module_base/global_variable.h" -#include "module_base/scalapack_connector.h" -#include "module_base/timer.h" +#include "source_base/blacs_connector.h" +#include "source_base/global_variable.h" +#include "source_base/scalapack_connector.h" +#include "source_base/timer.h" #include "module_parameter/parameter.h" #include diff --git a/source/source_hsolver/diago_cusolver.h b/source/source_hsolver/diago_cusolver.h index 1921b32e70..d9b0179e97 100644 --- a/source/source_hsolver/diago_cusolver.h +++ b/source/source_hsolver/diago_cusolver.h @@ -1,7 +1,7 @@ #ifndef DIAGOCUSOLVER_H #define DIAGOCUSOLVER_H -#include "module_base/macros.h" // GetRealType +#include "source_base/macros.h" // GetRealType #include "module_hamilt_general/hamilt.h" #include "module_basis/module_ao/parallel_orbitals.h" #include "source_hsolver/kernels/cuda/diag_cusolver.cuh" diff --git a/source/source_hsolver/diago_cusolvermp.cpp b/source/source_hsolver/diago_cusolvermp.cpp index 09aa85940b..ea8112b78d 100644 --- a/source/source_hsolver/diago_cusolvermp.cpp +++ b/source/source_hsolver/diago_cusolvermp.cpp @@ -3,7 +3,7 @@ #include "module_parameter/parameter.h" #include "diago_cusolvermp.h" -#include "module_base/timer.h" +#include "source_base/timer.h" using complex = std::complex; diff --git a/source/source_hsolver/diago_cusolvermp.h b/source/source_hsolver/diago_cusolvermp.h index 02cc22568f..384f60f347 100644 --- a/source/source_hsolver/diago_cusolvermp.h +++ b/source/source_hsolver/diago_cusolvermp.h @@ -3,7 +3,7 @@ #ifdef __CUSOLVERMP #include "module_hamilt_general/hamilt.h" -#include "module_base/macros.h" +#include "source_base/macros.h" #include "module_basis/module_ao/parallel_orbitals.h" #include "source_hsolver/kernels/cuda/diag_cusolvermp.cuh" namespace hsolver diff --git a/source/source_hsolver/diago_dav_subspace.cpp b/source/source_hsolver/diago_dav_subspace.cpp index 4efe46b2ab..faa75a97d3 100644 --- a/source/source_hsolver/diago_dav_subspace.cpp +++ b/source/source_hsolver/diago_dav_subspace.cpp @@ -1,13 +1,13 @@ #include "diago_dav_subspace.h" #include "diago_iter_assist.h" -#include "module_base/memory.h" -#include "module_base/module_device/device.h" -#include "module_base/timer.h" +#include "source_base/memory.h" +#include "source_base/module_device/device.h" +#include "source_base/timer.h" #include "source_hsolver/kernels/dngvd_op.h" -#include "module_base/kernels/math_kernel_op.h" +#include "source_base/kernels/math_kernel_op.h" #include "source_hsolver/kernels/bpcg_kernel_op.h" -#include "module_base/kernels/dsp/dsp_connector.h" +#include "source_base/kernels/dsp/dsp_connector.h" #include "source_hsolver/diag_hs_para.h" diff --git a/source/source_hsolver/diago_dav_subspace.h b/source/source_hsolver/diago_dav_subspace.h index a6dd87d799..bf3a9ca6f5 100644 --- a/source/source_hsolver/diago_dav_subspace.h +++ b/source/source_hsolver/diago_dav_subspace.h @@ -1,9 +1,9 @@ #ifndef DIAGO_NEW_DAV_H #define DIAGO_NEW_DAV_H -#include "module_base/macros.h" // GetRealType -#include "module_base/module_device/device.h" // base_device -#include "module_base/module_device/memory_op.h"// base_device::memory" +#include "source_base/macros.h" // GetRealType +#include "source_base/module_device/device.h" // base_device +#include "source_base/module_device/memory_op.h"// base_device::memory" #include "source_hsolver/diag_comm_info.h" #include "source_hsolver/diag_const_nums.h" diff --git a/source/source_hsolver/diago_david.cpp b/source/source_hsolver/diago_david.cpp index ec1599bee8..18cfc2526c 100644 --- a/source/source_hsolver/diago_david.cpp +++ b/source/source_hsolver/diago_david.cpp @@ -1,11 +1,11 @@ #include "diago_david.h" -#include "module_base/timer.h" // ModuleBase::timer::tick -#include "module_base/tool_title.h" // ModuleBase::TITLE -#include "module_base/module_device/device.h" +#include "source_base/timer.h" // ModuleBase::timer::tick +#include "source_base/tool_title.h" // ModuleBase::TITLE +#include "source_base/module_device/device.h" #include "source_hsolver/kernels/dngvd_op.h" -#include "module_base/kernels/math_kernel_op.h" +#include "source_base/kernels/math_kernel_op.h" using namespace hsolver; diff --git a/source/source_hsolver/diago_david.h b/source/source_hsolver/diago_david.h index 8ea981d342..4c6146687c 100644 --- a/source/source_hsolver/diago_david.h +++ b/source/source_hsolver/diago_david.h @@ -1,9 +1,9 @@ #ifndef DIAGODAVID_H #define DIAGODAVID_H -#include "module_base/macros.h" // GetRealType -#include "module_base/module_device/device.h" // base_device -#include "module_base/module_device/memory_op.h"// base_device::memory +#include "source_base/macros.h" // GetRealType +#include "source_base/module_device/device.h" // base_device +#include "source_base/module_device/memory_op.h"// base_device::memory #include "source_hsolver/diag_comm_info.h" diff --git a/source/source_hsolver/diago_elpa.cpp b/source/source_hsolver/diago_elpa.cpp index 78ce0179d0..3004fdcb61 100644 --- a/source/source_hsolver/diago_elpa.cpp +++ b/source/source_hsolver/diago_elpa.cpp @@ -2,12 +2,12 @@ #include "module_parameter/parameter.h" #include "genelpa/elpa_solver.h" -#include "module_base/blacs_connector.h" -#include "module_base/global_variable.h" -#include "module_base/lapack_connector.h" -#include "module_base/scalapack_connector.h" -#include "module_base/timer.h" -#include "module_base/tool_quit.h" +#include "source_base/blacs_connector.h" +#include "source_base/global_variable.h" +#include "source_base/lapack_connector.h" +#include "source_base/scalapack_connector.h" +#include "source_base/timer.h" +#include "source_base/tool_quit.h" typedef hamilt::MatrixBlock matd; typedef hamilt::MatrixBlock> matcd; diff --git a/source/source_hsolver/diago_elpa.h b/source/source_hsolver/diago_elpa.h index 0ebe236ddb..5f5e2915c8 100644 --- a/source/source_hsolver/diago_elpa.h +++ b/source/source_hsolver/diago_elpa.h @@ -1,7 +1,7 @@ #ifndef DIAGOELPA_H #define DIAGOELPA_H -#include "module_base/macros.h" // GetRealType +#include "source_base/macros.h" // GetRealType #include "module_hamilt_general/hamilt.h" #include "module_basis/module_ao/parallel_orbitals.h" diff --git a/source/source_hsolver/diago_elpa_native.cpp b/source/source_hsolver/diago_elpa_native.cpp index ad7846d7ee..a60c6c71f0 100644 --- a/source/source_hsolver/diago_elpa_native.cpp +++ b/source/source_hsolver/diago_elpa_native.cpp @@ -1,12 +1,12 @@ #include "diago_elpa_native.h" -#include "module_base/blacs_connector.h" -#include "module_base/global_variable.h" +#include "source_base/blacs_connector.h" +#include "source_base/global_variable.h" #include "module_parameter/parameter.h" -#include "module_base/lapack_connector.h" -#include "module_base/scalapack_connector.h" -#include "module_base/timer.h" -#include "module_base/tool_quit.h" +#include "source_base/lapack_connector.h" +#include "source_base/scalapack_connector.h" +#include "source_base/timer.h" +#include "source_base/tool_quit.h" #include "source_hsolver/genelpa/elpa_new.h" #include "omp.h" diff --git a/source/source_hsolver/diago_elpa_native.h b/source/source_hsolver/diago_elpa_native.h index 63415b79a7..5073f3657e 100644 --- a/source/source_hsolver/diago_elpa_native.h +++ b/source/source_hsolver/diago_elpa_native.h @@ -1,7 +1,7 @@ #ifndef DIAGOELPANATIVE_H #define DIAGOELPANATIVE_H -#include "module_base/macros.h" // GetRealType +#include "source_base/macros.h" // GetRealType #include "module_hamilt_general/hamilt.h" #include "module_basis/module_ao/parallel_orbitals.h" diff --git a/source/source_hsolver/diago_iter_assist.cpp b/source/source_hsolver/diago_iter_assist.cpp index d2bfb71e78..704249c85e 100644 --- a/source/source_hsolver/diago_iter_assist.cpp +++ b/source/source_hsolver/diago_iter_assist.cpp @@ -1,15 +1,15 @@ #include "diago_iter_assist.h" #include "module_parameter/parameter.h" -#include "module_base/blas_connector.h" -#include "module_base/complexmatrix.h" -#include "module_base/constants.h" -#include "module_base/global_variable.h" -#include "module_base/lapack_connector.h" -#include "module_base/module_device/device.h" -#include "module_base/parallel_reduce.h" -#include "module_base/timer.h" +#include "source_base/blas_connector.h" +#include "source_base/complexmatrix.h" +#include "source_base/constants.h" +#include "source_base/global_variable.h" +#include "source_base/lapack_connector.h" +#include "source_base/module_device/device.h" +#include "source_base/parallel_reduce.h" +#include "source_base/timer.h" #include "source_hsolver/kernels/dngvd_op.h" -#include "module_base/kernels/math_kernel_op.h" +#include "source_base/kernels/math_kernel_op.h" namespace hsolver { diff --git a/source/source_hsolver/diago_iter_assist.h b/source/source_hsolver/diago_iter_assist.h index c5c4e9cfaa..97520dcfe5 100644 --- a/source/source_hsolver/diago_iter_assist.h +++ b/source/source_hsolver/diago_iter_assist.h @@ -1,8 +1,8 @@ #ifndef DIAGOITERASSIST_H #define DIAGOITERASSIST_H -#include "module_base/complexmatrix.h" -#include "module_base/macros.h" +#include "source_base/complexmatrix.h" +#include "source_base/macros.h" #include "module_hamilt_general/hamilt.h" #include "module_psi/psi.h" diff --git a/source/source_hsolver/diago_lapack.cpp b/source/source_hsolver/diago_lapack.cpp index 6a4efcb556..a1c2edd7b1 100644 --- a/source/source_hsolver/diago_lapack.cpp +++ b/source/source_hsolver/diago_lapack.cpp @@ -4,10 +4,10 @@ #include "diago_lapack.h" -#include "module_base/global_variable.h" -#include "module_base/lapack_connector.h" -#include "module_base/timer.h" -#include "module_base/tool_quit.h" +#include "source_base/global_variable.h" +#include "source_base/lapack_connector.h" +#include "source_base/timer.h" +#include "source_base/tool_quit.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" typedef hamilt::MatrixBlock matd; diff --git a/source/source_hsolver/diago_lapack.h b/source/source_hsolver/diago_lapack.h index f787b9054f..d7c060838d 100644 --- a/source/source_hsolver/diago_lapack.h +++ b/source/source_hsolver/diago_lapack.h @@ -8,9 +8,9 @@ #ifndef DIAGOLAPACK_H #define DIAGOLAPACK_H -#include "module_base/macros.h" // GetRealType +#include "source_base/macros.h" // GetRealType #include "module_hamilt_general/hamilt.h" -#include "module_base/matrix.h" +#include "source_base/matrix.h" #include "module_basis/module_ao/parallel_orbitals.h" #include diff --git a/source/source_hsolver/diago_pexsi.cpp b/source/source_hsolver/diago_pexsi.cpp index 85df14c9af..5db73962d9 100644 --- a/source/source_hsolver/diago_pexsi.cpp +++ b/source/source_hsolver/diago_pexsi.cpp @@ -4,8 +4,8 @@ #include #ifdef __PEXSI #include "diago_pexsi.h" -#include "module_base/global_variable.h" -#include "module_base/tool_quit.h" +#include "source_base/global_variable.h" +#include "source_base/tool_quit.h" #include "module_basis/module_ao/parallel_orbitals.h" #include "module_pexsi/pexsi_solver.h" diff --git a/source/source_hsolver/diago_pexsi.h b/source/source_hsolver/diago_pexsi.h index e593e3b669..be44df5037 100644 --- a/source/source_hsolver/diago_pexsi.h +++ b/source/source_hsolver/diago_pexsi.h @@ -3,9 +3,9 @@ #include #include -#include "module_base/macros.h" // GetRealType +#include "source_base/macros.h" // GetRealType #include "module_hamilt_general/hamilt.h" -#include "module_base/global_variable.h" +#include "source_base/global_variable.h" #include "module_basis/module_ao/parallel_orbitals.h" #include "module_pexsi/pexsi_solver.h" diff --git a/source/source_hsolver/diago_pxxxgvx.cpp b/source/source_hsolver/diago_pxxxgvx.cpp index 51e29f27ff..97f336ec81 100644 --- a/source/source_hsolver/diago_pxxxgvx.cpp +++ b/source/source_hsolver/diago_pxxxgvx.cpp @@ -1,7 +1,7 @@ #include "diago_pxxxgvx.h" -#include "module_base/blacs_connector.h" -#include "module_base/scalapack_connector.h" +#include "source_base/blacs_connector.h" +#include "source_base/scalapack_connector.h" #include #include diff --git a/source/source_hsolver/diago_pxxxgvx.h b/source/source_hsolver/diago_pxxxgvx.h index e4f9ba7896..4b1e8486a0 100644 --- a/source/source_hsolver/diago_pxxxgvx.h +++ b/source/source_hsolver/diago_pxxxgvx.h @@ -1,7 +1,7 @@ #ifndef HSOLVER_DIAGO_PXXXGVX_H #define HSOLVER_DIAGO_PXXXGVX_H #include -#include "module_base/macros.h" +#include "source_base/macros.h" namespace hsolver { diff --git a/source/source_hsolver/diago_scalapack.cpp b/source/source_hsolver/diago_scalapack.cpp index 92388fd461..3ebe5416fd 100644 --- a/source/source_hsolver/diago_scalapack.cpp +++ b/source/source_hsolver/diago_scalapack.cpp @@ -11,9 +11,9 @@ #include #include -#include "module_base/global_function.h" -#include "module_base/global_variable.h" -#include "module_base/scalapack_connector.h" +#include "source_base/global_function.h" +#include "source_base/global_variable.h" +#include "source_base/scalapack_connector.h" #include "module_hamilt_general/matrixblock.h" typedef hamilt::MatrixBlock matd; diff --git a/source/source_hsolver/diago_scalapack.h b/source/source_hsolver/diago_scalapack.h index 1ac2e31ab4..ea9d8f6567 100644 --- a/source/source_hsolver/diago_scalapack.h +++ b/source/source_hsolver/diago_scalapack.h @@ -12,11 +12,11 @@ #include #include -#include "module_base/macros.h" // GetRealType +#include "source_base/macros.h" // GetRealType #include "module_hamilt_general/hamilt.h" #include "module_psi/psi.h" -#include "module_base/complexmatrix.h" -#include "module_base/matrix.h" +#include "source_base/complexmatrix.h" +#include "source_base/matrix.h" #include "module_basis/module_ao/parallel_orbitals.h" namespace hsolver diff --git a/source/source_hsolver/genelpa/elpa_new_complex.cpp b/source/source_hsolver/genelpa/elpa_new_complex.cpp index 044cfbe6fd..63c7578592 100644 --- a/source/source_hsolver/genelpa/elpa_new_complex.cpp +++ b/source/source_hsolver/genelpa/elpa_new_complex.cpp @@ -9,10 +9,10 @@ #include "elpa_new.h" #include "elpa_solver.h" -#include "module_base/scalapack_connector.h" +#include "source_base/scalapack_connector.h" #include "utils.h" -#include "module_base/tool_quit.h" +#include "source_base/tool_quit.h" extern std::map NEW_ELPA_HANDLE_POOL; diff --git a/source/source_hsolver/genelpa/elpa_new_real.cpp b/source/source_hsolver/genelpa/elpa_new_real.cpp index 3a82897a51..beeb7ae540 100644 --- a/source/source_hsolver/genelpa/elpa_new_real.cpp +++ b/source/source_hsolver/genelpa/elpa_new_real.cpp @@ -1,10 +1,10 @@ #include "elpa_new.h" #include "elpa_solver.h" -#include "module_base/scalapack_connector.h" +#include "source_base/scalapack_connector.h" #include "utils.h" -#include "module_base/tool_quit.h" +#include "source_base/tool_quit.h" #include #include diff --git a/source/source_hsolver/genelpa/utils.cpp b/source/source_hsolver/genelpa/utils.cpp index 370ce0cf05..e42eab2d5a 100644 --- a/source/source_hsolver/genelpa/utils.cpp +++ b/source/source_hsolver/genelpa/utils.cpp @@ -1,7 +1,7 @@ #include "utils.h" -#include "module_base/blacs_connector.h" -#include "module_base/scalapack_connector.h" +#include "source_base/blacs_connector.h" +#include "source_base/scalapack_connector.h" #include #include diff --git a/source/source_hsolver/hsolver_lcao.cpp b/source/source_hsolver/hsolver_lcao.cpp index 9aafbbcab0..fbdd2cf6e8 100644 --- a/source/source_hsolver/hsolver_lcao.cpp +++ b/source/source_hsolver/hsolver_lcao.cpp @@ -2,7 +2,7 @@ #ifdef __MPI #include "diago_scalapack.h" -#include "module_base/scalapack_connector.h" +#include "source_base/scalapack_connector.h" #else #include "diago_lapack.h" #endif @@ -24,10 +24,10 @@ #include "diago_pexsi.h" #endif -#include "module_base/global_variable.h" +#include "source_base/global_variable.h" #include "module_elecstate/elecstate_tools.h" -#include "module_base/memory.h" -#include "module_base/timer.h" +#include "source_base/memory.h" +#include "source_base/timer.h" #include "module_elecstate/elecstate_lcao.h" #include "module_elecstate/module_dm/cal_dm_psi.h" #include "module_elecstate/module_dm/density_matrix.h" diff --git a/source/source_hsolver/hsolver_lcaopw.cpp b/source/source_hsolver/hsolver_lcaopw.cpp index a279d4c8cc..e69a39cc33 100644 --- a/source/source_hsolver/hsolver_lcaopw.cpp +++ b/source/source_hsolver/hsolver_lcaopw.cpp @@ -1,9 +1,9 @@ #include "hsolver_lcaopw.h" -#include "module_base/global_variable.h" -#include "module_base/parallel_global.h" // for MPI -#include "module_base/timer.h" -#include "module_base/tool_quit.h" +#include "source_base/global_variable.h" +#include "source_base/parallel_global.h" // for MPI +#include "source_base/timer.h" +#include "source_base/tool_quit.h" #include "module_elecstate/elecstate_pw.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" #include "module_hamilt_pw/hamilt_pwdft/hamilt_pw.h" diff --git a/source/source_hsolver/hsolver_lcaopw.h b/source/source_hsolver/hsolver_lcaopw.h index 4b29901ad9..e2017fe95c 100644 --- a/source/source_hsolver/hsolver_lcaopw.h +++ b/source/source_hsolver/hsolver_lcaopw.h @@ -3,8 +3,8 @@ #include "module_elecstate/elecstate.h" #include "module_hamilt_general/hamilt.h" -#include "module_base/macros.h" -#include "module_base/module_device/types.h" +#include "source_base/macros.h" +#include "source_base/module_device/types.h" namespace hsolver { diff --git a/source/source_hsolver/hsolver_pw.cpp b/source/source_hsolver/hsolver_pw.cpp index d6caafeab3..b45fb2f850 100644 --- a/source/source_hsolver/hsolver_pw.cpp +++ b/source/source_hsolver/hsolver_pw.cpp @@ -1,8 +1,8 @@ #include "hsolver_pw.h" -#include "module_base/global_variable.h" -#include "module_base/timer.h" -#include "module_base/tool_quit.h" +#include "source_base/global_variable.h" +#include "source_base/timer.h" +#include "source_base/tool_quit.h" #include "module_elecstate/elecstate_pw.h" #include "module_hamilt_general/hamilt.h" #include "source_hsolver/diag_comm_info.h" diff --git a/source/source_hsolver/hsolver_pw.h b/source/source_hsolver/hsolver_pw.h index 3a52293fb2..b1f251c37e 100644 --- a/source/source_hsolver/hsolver_pw.h +++ b/source/source_hsolver/hsolver_pw.h @@ -3,10 +3,10 @@ #include "module_elecstate/elecstate.h" #include "module_hamilt_general/hamilt.h" -#include "module_base/macros.h" +#include "source_base/macros.h" #include "module_basis/module_pw/pw_basis_k.h" #include -#include "module_base/memory.h" +#include "source_base/memory.h" namespace hsolver { diff --git a/source/source_hsolver/hsolver_pw_sdft.cpp b/source/source_hsolver/hsolver_pw_sdft.cpp index 3408284777..a41cdf43ce 100644 --- a/source/source_hsolver/hsolver_pw_sdft.cpp +++ b/source/source_hsolver/hsolver_pw_sdft.cpp @@ -1,9 +1,9 @@ #include "hsolver_pw_sdft.h" -#include "module_base/global_function.h" -#include "module_base/parallel_device.h" -#include "module_base/timer.h" -#include "module_base/tool_title.h" +#include "source_base/global_function.h" +#include "source_base/parallel_device.h" +#include "source_base/timer.h" +#include "source_base/tool_title.h" #include "module_elecstate/module_charge/symmetry_rho.h" #include "module_elecstate/elecstate_tools.h" diff --git a/source/source_hsolver/kernels/bpcg_kernel_op.cpp b/source/source_hsolver/kernels/bpcg_kernel_op.cpp index afd4be384c..0fc0e1b8f9 100644 --- a/source/source_hsolver/kernels/bpcg_kernel_op.cpp +++ b/source/source_hsolver/kernels/bpcg_kernel_op.cpp @@ -1,7 +1,7 @@ #include "source_hsolver/kernels/bpcg_kernel_op.h" -#include "module_base/blas_connector.h" -#include "module_base/kernels/math_kernel_op.h" -#include "module_base/parallel_reduce.h" +#include "source_base/blas_connector.h" +#include "source_base/kernels/math_kernel_op.h" +#include "source_base/parallel_reduce.h" #include namespace hsolver { diff --git a/source/source_hsolver/kernels/bpcg_kernel_op.h b/source/source_hsolver/kernels/bpcg_kernel_op.h index 31afb74caa..802ee3c1e4 100644 --- a/source/source_hsolver/kernels/bpcg_kernel_op.h +++ b/source/source_hsolver/kernels/bpcg_kernel_op.h @@ -1,7 +1,7 @@ #ifndef MODULE_HSOLVER_BPCG_KERNEL_H #define MODULE_HSOLVER_BPCG_KERNEL_H -#include "module_base/macros.h" -#include "module_base/module_device/types.h" +#include "source_base/macros.h" +#include "source_base/module_device/types.h" namespace hsolver { diff --git a/source/source_hsolver/kernels/cuda/bpcg_kernel_op.cu b/source/source_hsolver/kernels/cuda/bpcg_kernel_op.cu index 5636326093..e8af516274 100644 --- a/source/source_hsolver/kernels/cuda/bpcg_kernel_op.cu +++ b/source/source_hsolver/kernels/cuda/bpcg_kernel_op.cu @@ -1,4 +1,4 @@ -#include "module_base/kernels/math_kernel_op.h" +#include "source_base/kernels/math_kernel_op.h" #include "source_hsolver/kernels/bpcg_kernel_op.h" #include diff --git a/source/source_hsolver/kernels/cuda/diag_cusolvermp.cu b/source/source_hsolver/kernels/cuda/diag_cusolvermp.cu index 63f54147d7..15a0eca612 100644 --- a/source/source_hsolver/kernels/cuda/diag_cusolvermp.cu +++ b/source/source_hsolver/kernels/cuda/diag_cusolvermp.cu @@ -1,7 +1,7 @@ #ifdef __CUSOLVERMP #include "diag_cusolvermp.cuh" #include "helper_cuda.h" -#include "module_base/global_variable.h" +#include "source_base/global_variable.h" #include @@ -12,8 +12,8 @@ extern "C" #include #include #include "helper_cusolver.h" -#include "module_base/global_function.h" -#include "module_base/module_device/device.h" +#include "source_base/global_function.h" +#include "source_base/module_device/device.h" static calError_t allgather(void* src_buf, void* recv_buf, size_t size, void* data, void** request) { MPI_Request req; diff --git a/source/source_hsolver/kernels/cuda/diag_cusolvermp.cuh b/source/source_hsolver/kernels/cuda/diag_cusolvermp.cuh index dd4b3e13a6..0e330908dc 100644 --- a/source/source_hsolver/kernels/cuda/diag_cusolvermp.cuh +++ b/source/source_hsolver/kernels/cuda/diag_cusolvermp.cuh @@ -6,7 +6,7 @@ #include #include #include -#include "module_base/macros.h" +#include "source_base/macros.h" template class Diag_CusolverMP_gvd diff --git a/source/source_hsolver/kernels/dngvd_op.h b/source/source_hsolver/kernels/dngvd_op.h index d2dd442412..45468dc172 100644 --- a/source/source_hsolver/kernels/dngvd_op.h +++ b/source/source_hsolver/kernels/dngvd_op.h @@ -3,10 +3,10 @@ #ifndef MODULE_HSOLVER_DNGVD_H #define MODULE_HSOLVER_DNGVD_H -#include "module_base/macros.h" -#include "module_base/lapack_wrapper.h" -#include "module_base/parallel_reduce.h" -#include "module_base/module_device/types.h" +#include "source_base/macros.h" +#include "source_base/lapack_wrapper.h" +#include "source_base/parallel_reduce.h" +#include "source_base/module_device/types.h" namespace hsolver { diff --git a/source/source_hsolver/kernels/rocm/bpcg_kernel_op.hip.cu b/source/source_hsolver/kernels/rocm/bpcg_kernel_op.hip.cu index 70f6494d2d..095cd4deff 100644 --- a/source/source_hsolver/kernels/rocm/bpcg_kernel_op.hip.cu +++ b/source/source_hsolver/kernels/rocm/bpcg_kernel_op.hip.cu @@ -1,4 +1,4 @@ -#include "module_base/kernels/math_kernel_op.h" +#include "source_base/kernels/math_kernel_op.h" #include "source_hsolver/kernels/bpcg_kernel_op.h" #include diff --git a/source/source_hsolver/kernels/test/math_dngvd_test.cpp b/source/source_hsolver/kernels/test/math_dngvd_test.cpp index 6cba4caf53..554f5c05a3 100644 --- a/source/source_hsolver/kernels/test/math_dngvd_test.cpp +++ b/source/source_hsolver/kernels/test/math_dngvd_test.cpp @@ -1,8 +1,8 @@ -#include "module_base/complexmatrix.h" -#include "module_base/lapack_connector.h" -#include "module_base/module_device/memory_op.h" +#include "source_base/complexmatrix.h" +#include "source_base/lapack_connector.h" +#include "source_base/module_device/memory_op.h" #include "source_hsolver/kernels/dngvd_op.h" -#include "module_base/kernels/math_kernel_op.h" +#include "source_base/kernels/math_kernel_op.h" #include #include diff --git a/source/source_hsolver/kernels/test/perf_math_kernel.cpp b/source/source_hsolver/kernels/test/perf_math_kernel.cpp index f88de52272..37b55b8022 100644 --- a/source/source_hsolver/kernels/test/perf_math_kernel.cpp +++ b/source/source_hsolver/kernels/test/perf_math_kernel.cpp @@ -1,7 +1,7 @@ -#include "module_base/blas_connector.h" -#include "module_base/constants.h" -#include "module_base/module_device/memory_op.h" -#include "module_base/kernels/math_kernel_op.h" +#include "source_base/blas_connector.h" +#include "source_base/constants.h" +#include "source_base/module_device/memory_op.h" +#include "source_base/kernels/math_kernel_op.h" #include #include diff --git a/source/source_hsolver/module_pexsi/pexsi_solver.cpp b/source/source_hsolver/module_pexsi/pexsi_solver.cpp index e830eb2eaf..68d4b36c8c 100644 --- a/source/source_hsolver/module_pexsi/pexsi_solver.cpp +++ b/source/source_hsolver/module_pexsi/pexsi_solver.cpp @@ -1,4 +1,4 @@ -#include "module_base/parallel_global.h" +#include "source_base/parallel_global.h" #ifdef __PEXSI #include "module_parameter/parameter.h" #include "pexsi_solver.h" @@ -7,7 +7,7 @@ #include #include -#include "module_base/global_variable.h" +#include "source_base/global_variable.h" #include "simple_pexsi.h" extern MPI_Comm DIAG_WORLD; diff --git a/source/source_hsolver/module_pexsi/simple_pexsi.cpp b/source/source_hsolver/module_pexsi/simple_pexsi.cpp index 55f5a7b823..9f3146ebce 100644 --- a/source/source_hsolver/module_pexsi/simple_pexsi.cpp +++ b/source/source_hsolver/module_pexsi/simple_pexsi.cpp @@ -17,10 +17,10 @@ #include "dist_bcd_matrix.h" #include "dist_ccs_matrix.h" #include "dist_matrix_transformer.h" -#include "module_base/lapack_connector.h" -#include "module_base/timer.h" -#include "module_base/tool_quit.h" -#include "module_base/global_variable.h" +#include "source_base/lapack_connector.h" +#include "source_base/timer.h" +#include "source_base/tool_quit.h" +#include "source_base/global_variable.h" #include "source_hsolver/diago_pexsi.h" namespace pexsi diff --git a/source/source_hsolver/para_linear_transform.cpp b/source/source_hsolver/para_linear_transform.cpp index 5a6c8def27..ad5a09025c 100644 --- a/source/source_hsolver/para_linear_transform.cpp +++ b/source/source_hsolver/para_linear_transform.cpp @@ -1,6 +1,6 @@ #include "para_linear_transform.h" -#include "module_base/timer.h" +#include "source_base/timer.h" #include #include diff --git a/source/source_hsolver/para_linear_transform.h b/source/source_hsolver/para_linear_transform.h index 8e5e69d203..5651695e0b 100644 --- a/source/source_hsolver/para_linear_transform.h +++ b/source/source_hsolver/para_linear_transform.h @@ -1,9 +1,9 @@ #ifndef __PARA_LINEAR_TRANSFORM_H__ #define __PARA_LINEAR_TRANSFORM_H__ -#include "module_base/kernels/math_kernel_op.h" -#include "module_base/module_device/device.h" -#include "module_base/module_device/memory_op.h" -#include "module_base/parallel_device.h" +#include "source_base/kernels/math_kernel_op.h" +#include "source_base/module_device/device.h" +#include "source_base/module_device/memory_op.h" +#include "source_base/parallel_device.h" #include #ifdef __MPI diff --git a/source/source_hsolver/parallel_k2d.cpp b/source/source_hsolver/parallel_k2d.cpp index 91ead02082..2f5ce5bd11 100644 --- a/source/source_hsolver/parallel_k2d.cpp +++ b/source/source_hsolver/parallel_k2d.cpp @@ -1,9 +1,9 @@ #include "parallel_k2d.h" -#include "module_base/parallel_global.h" -#include "module_base/scalapack_connector.h" -#include "module_base/timer.h" -#include "module_base/memory.h" +#include "source_base/parallel_global.h" +#include "source_base/scalapack_connector.h" +#include "source_base/timer.h" +#include "source_base/memory.h" template void Parallel_K2D::set_para_env(int nks, diff --git a/source/source_hsolver/parallel_k2d.h b/source/source_hsolver/parallel_k2d.h index cdd7a951c8..ef799a103a 100644 --- a/source/source_hsolver/parallel_k2d.h +++ b/source/source_hsolver/parallel_k2d.h @@ -1,7 +1,7 @@ #ifndef PARALLEL_K2D_H #define PARALLEL_K2D_H -#include "module_base/parallel_2d.h" +#include "source_base/parallel_2d.h" #include "module_cell/parallel_kpoints.h" #include "module_hamilt_general/matrixblock.h" #ifdef __MPI diff --git a/source/source_hsolver/test/diago_bpcg_test.cpp b/source/source_hsolver/test/diago_bpcg_test.cpp index 70ae44942e..89e9e43856 100644 --- a/source/source_hsolver/test/diago_bpcg_test.cpp +++ b/source/source_hsolver/test/diago_bpcg_test.cpp @@ -1,5 +1,5 @@ -#include "module_base/inverse_matrix.h" -#include "module_base/lapack_connector.h" +#include "source_base/inverse_matrix.h" +#include "source_base/lapack_connector.h" #include "module_hamilt_pw/hamilt_pwdft/structure_factor.h" #include "module_psi/psi.h" #include "module_hamilt_general/hamilt.h" diff --git a/source/source_hsolver/test/diago_cg_float_test.cpp b/source/source_hsolver/test/diago_cg_float_test.cpp index fe7cfb699a..03081bc916 100644 --- a/source/source_hsolver/test/diago_cg_float_test.cpp +++ b/source/source_hsolver/test/diago_cg_float_test.cpp @@ -2,8 +2,8 @@ #define private public #include "module_parameter/parameter.h" #undef private -#include "module_base/inverse_matrix.h" -#include "module_base/lapack_connector.h" +#include "source_base/inverse_matrix.h" +#include "source_base/lapack_connector.h" #include "module_hamilt_pw/hamilt_pwdft/structure_factor.h" #include "module_psi/psi.h" #include "module_hamilt_general/hamilt.h" diff --git a/source/source_hsolver/test/diago_cg_real_test.cpp b/source/source_hsolver/test/diago_cg_real_test.cpp index 0fda01e350..be5c8e5fc7 100644 --- a/source/source_hsolver/test/diago_cg_real_test.cpp +++ b/source/source_hsolver/test/diago_cg_real_test.cpp @@ -2,8 +2,8 @@ #define private public #include "module_parameter/parameter.h" #undef private -#include "module_base/inverse_matrix.h" -#include "module_base/lapack_connector.h" +#include "source_base/inverse_matrix.h" +#include "source_base/lapack_connector.h" #include "module_hamilt_pw/hamilt_pwdft/structure_factor.h" #include "module_psi/psi.h" #include "module_hamilt_general/hamilt.h" diff --git a/source/source_hsolver/test/diago_cg_test.cpp b/source/source_hsolver/test/diago_cg_test.cpp index 0365766638..293c2eac2d 100644 --- a/source/source_hsolver/test/diago_cg_test.cpp +++ b/source/source_hsolver/test/diago_cg_test.cpp @@ -2,8 +2,8 @@ #define private public #include "module_parameter/parameter.h" #undef private -#include "module_base/inverse_matrix.h" -#include "module_base/lapack_connector.h" +#include "source_base/inverse_matrix.h" +#include "source_base/lapack_connector.h" #include "module_hamilt_pw/hamilt_pwdft/structure_factor.h" #include "module_psi/psi.h" #include "module_hamilt_general/hamilt.h" diff --git a/source/source_hsolver/test/diago_david_float_test.cpp b/source/source_hsolver/test/diago_david_float_test.cpp index 7f4bfd1f88..d8aafa5b70 100644 --- a/source/source_hsolver/test/diago_david_float_test.cpp +++ b/source/source_hsolver/test/diago_david_float_test.cpp @@ -4,8 +4,8 @@ #include"diago_mock.h" #include "module_psi/psi.h" #include"gtest/gtest.h" -#include "module_base/inverse_matrix.h" -#include "module_base/lapack_connector.h" +#include "source_base/inverse_matrix.h" +#include "source_base/lapack_connector.h" #include "module_basis/module_pw/test/test_tool.h" #include"mpi.h" diff --git a/source/source_hsolver/test/diago_david_real_test.cpp b/source/source_hsolver/test/diago_david_real_test.cpp index b9109faa78..c21b012a64 100644 --- a/source/source_hsolver/test/diago_david_real_test.cpp +++ b/source/source_hsolver/test/diago_david_real_test.cpp @@ -4,8 +4,8 @@ #include"diago_mock.h" #include "module_psi/psi.h" #include"gtest/gtest.h" -#include "module_base/inverse_matrix.h" -#include "module_base/lapack_connector.h" +#include "source_base/inverse_matrix.h" +#include "source_base/lapack_connector.h" #include "module_basis/module_pw/test/test_tool.h" #include"mpi.h" diff --git a/source/source_hsolver/test/diago_david_test.cpp b/source/source_hsolver/test/diago_david_test.cpp index 72f4c8ddb3..63f6e901d5 100644 --- a/source/source_hsolver/test/diago_david_test.cpp +++ b/source/source_hsolver/test/diago_david_test.cpp @@ -4,8 +4,8 @@ #include"diago_mock.h" #include "module_psi/psi.h" #include"gtest/gtest.h" -#include "module_base/inverse_matrix.h" -#include "module_base/lapack_connector.h" +#include "source_base/inverse_matrix.h" +#include "source_base/lapack_connector.h" #include "module_basis/module_pw/test/test_tool.h" #include"mpi.h" diff --git a/source/source_hsolver/test/diago_elpa_utils.h b/source/source_hsolver/test/diago_elpa_utils.h index 91160a253f..01ca271cde 100644 --- a/source/source_hsolver/test/diago_elpa_utils.h +++ b/source/source_hsolver/test/diago_elpa_utils.h @@ -1,6 +1,6 @@ -#include "module_base/blacs_connector.h" -#include "module_base/lapack_connector.h" -#include "module_base/scalapack_connector.h" +#include "source_base/blacs_connector.h" +#include "source_base/lapack_connector.h" +#include "source_base/scalapack_connector.h" #include "mpi.h" #include diff --git a/source/source_hsolver/test/diago_lapack_test.cpp b/source/source_hsolver/test/diago_lapack_test.cpp index 01acc2ebbd..84e667cd37 100644 --- a/source/source_hsolver/test/diago_lapack_test.cpp +++ b/source/source_hsolver/test/diago_lapack_test.cpp @@ -11,7 +11,7 @@ #include #include "source_hsolver/diago_lapack.h" -#include "module_base/lapack_connector.h" +#include "source_base/lapack_connector.h" #define PASSTHRESHOLD 1e-5 #define DETAILINFO false diff --git a/source/source_hsolver/test/diago_mock.h b/source/source_hsolver/test/diago_mock.h index 85a7750fc5..d9f195da2b 100644 --- a/source/source_hsolver/test/diago_mock.h +++ b/source/source_hsolver/test/diago_mock.h @@ -1,8 +1,8 @@ #include -#include "../../module_base/lapack_connector.h" -#include "../../module_base/blas_connector.h" +#include "../../source_base/lapack_connector.h" +#include "../../source_base/blas_connector.h" #include "mpi.h" -#include "module_base/parallel_reduce.h" +#include "source_base/parallel_reduce.h" #include "module_hamilt_pw/hamilt_pwdft/hamilt_pw.h" namespace DIAGOTEST @@ -169,7 +169,7 @@ namespace DIAGOTEST #endif } -#include "module_base/macros.h" +#include "source_base/macros.h" template class HPsi { diff --git a/source/source_hsolver/test/diago_pexsi_test.cpp b/source/source_hsolver/test/diago_pexsi_test.cpp index 3918fd43ff..b59687ecf0 100644 --- a/source/source_hsolver/test/diago_pexsi_test.cpp +++ b/source/source_hsolver/test/diago_pexsi_test.cpp @@ -4,8 +4,8 @@ #include "module_parameter/parameter.h" #undef private -#include "module_base/global_variable.h" -#include "module_base/parallel_global.h" +#include "source_base/global_variable.h" +#include "source_base/parallel_global.h" #include "module_basis/module_ao/parallel_orbitals.h" #include "source_hsolver/module_pexsi/pexsi_solver.h" #include "source_hsolver/test/diago_elpa_utils.h" diff --git a/source/source_hsolver/test/parallel_k2d_test.cpp b/source/source_hsolver/test/parallel_k2d_test.cpp index b025f9184f..8abceac5d6 100644 --- a/source/source_hsolver/test/parallel_k2d_test.cpp +++ b/source/source_hsolver/test/parallel_k2d_test.cpp @@ -1,7 +1,7 @@ #ifdef __MPI #include "source_hsolver/parallel_k2d.h" -#include "module_base/parallel_global.h" +#include "source_base/parallel_global.h" #include "gmock/gmock.h" #include "gtest/gtest.h" diff --git a/source/source_hsolver/test/test_hsolver.cpp b/source/source_hsolver/test/test_hsolver.cpp index e20cb36358..6e9ab26009 100644 --- a/source/source_hsolver/test/test_hsolver.cpp +++ b/source/source_hsolver/test/test_hsolver.cpp @@ -6,7 +6,7 @@ #include "hsolver_supplementary_mock.h" #include "source_hsolver/hsolver.h" -#include +#include // template class hsolver::HSolver, base_device::DEVICE_CPU>; // template class hsolver::HSolver, base_device::DEVICE_CPU>; diff --git a/source/source_hsolver/test/test_hsolver_pw.cpp b/source/source_hsolver/test/test_hsolver_pw.cpp index 6f4dbbd07c..9200555133 100644 --- a/source/source_hsolver/test/test_hsolver_pw.cpp +++ b/source/source_hsolver/test/test_hsolver_pw.cpp @@ -10,7 +10,7 @@ #include "hsolver_supplementary_mock.h" #include "hsolver_pw_sup.h" #include "hsolver_supplementary_mock.h" -#include "module_base/global_variable.h" +#include "source_base/global_variable.h" #include "source_hsolver/hsolver_pw.h" #undef private #undef protected diff --git a/source/source_hsolver/test/test_hsolver_sdft.cpp b/source/source_hsolver/test/test_hsolver_sdft.cpp index 777e85a50f..164bfed37e 100644 --- a/source/source_hsolver/test/test_hsolver_sdft.cpp +++ b/source/source_hsolver/test/test_hsolver_sdft.cpp @@ -9,7 +9,7 @@ #define protected public #include "hsolver_pw_sup.h" #include "hsolver_supplementary_mock.h" -#include "module_base/global_variable.h" +#include "source_base/global_variable.h" #include "source_hsolver/hsolver_pw.h" #include "source_hsolver/hsolver_pw_sdft.h" #include "module_elecstate/elecstate_pw.h" @@ -389,7 +389,7 @@ class TestHSolverPW_SDFT : public ::testing::Test // } #ifdef __MPI -#include "module_base/timer.h" +#include "source_base/timer.h" #include "mpi.h" int main(int argc, char** argv) { diff --git a/source/source_main/driver.cpp b/source/source_main/driver.cpp index 37f99d482a..d4970acc96 100644 --- a/source/source_main/driver.cpp +++ b/source/source_main/driver.cpp @@ -1,8 +1,8 @@ #include "source_main/driver.h" -#include "module_base/global_file.h" -#include "module_base/memory.h" -#include "module_base/timer.h" +#include "source_base/global_file.h" +#include "source_base/memory.h" +#include "source_base/timer.h" #include "source_esolver/esolver.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" #include "module_io/cal_test.h" diff --git a/source/source_main/main.cpp b/source/source_main/main.cpp index 4949b922ef..fb129029e2 100644 --- a/source/source_main/main.cpp +++ b/source/source_main/main.cpp @@ -5,7 +5,7 @@ #include "source_main/driver.h" #include "fftw3.h" -#include "module_base/parallel_global.h" +#include "source_base/parallel_global.h" #include "module_io/parse_args.h" #include "module_parameter/parameter.h" #ifdef _OPENMP