Skip to content

Commit cf96e93

Browse files
committed
add the sw
1 parent 32ec806 commit cf96e93

File tree

3 files changed

+16
-16
lines changed

3 files changed

+16
-16
lines changed

CMakeLists.txt

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ option(USE_CUDA_MPI "Enable CUDA-aware MPI" OFF)
1717
option(USE_CUDA_ON_DCU "Enable CUDA on DCU" OFF)
1818
option(USE_ROCM "Enable ROCm" OFF)
1919
option(USE_DSP "Enable DSP" OFF)
20-
option(USE_SUNWAY "Enable Sunway Architecture" OFF)
20+
option(USE_SW "Enable SW Architecture" OFF)
2121

2222
option(USE_ABACUS_LIBM "Build libmath from source to speed up" OFF)
2323
option(ENABLE_LIBXC "Enable using the LibXC package" OFF)
@@ -282,17 +282,17 @@ if (USE_DSP)
282282
target_link_libraries(${ABACUS_BIN_NAME} ${MT_HOST_DIR}/hthreads/lib/libhthread_device.a)
283283
target_link_libraries(${ABACUS_BIN_NAME} ${MT_HOST_DIR}/hthreads/lib/libhthread_host.a)
284284
endif()
285-
if (USE_SUNWAY)
286-
add_compile_definitions(__SUNWAY)
287-
set(SUNWAY ON)
288-
include_directories(${SUNWAY_MATH}/include)
289-
include_directories(${SUNWAY_FFT}/include)
290-
include_directories(${SUNWAY_FFT}/lib/libfftw3.a)
285+
if (USE_SW)
286+
add_compile_definitions(__SW)
287+
set(SW ON)
288+
include_directories(${SW_MATH}/include)
289+
include_directories(${SW_FFT}/include)
290+
include_directories(${SW_FFT}/lib/libfftw3.a)
291291

292-
target_link_libraries(${ABACUS_BIN_NAME} ${SUNWAY_MATH}/libswfft.a)
293-
target_link_libraries(${ABACUS_BIN_NAME} ${SUNWAY_MATH}/libswscalapack.a)
294-
target_link_libraries(${ABACUS_BIN_NAME} ${SUNWAY_MATH}/libswlapack.a)
295-
target_link_libraries(${ABACUS_BIN_NAME} ${SUNWAY_MATH}/libswblas.a)
292+
target_link_libraries(${ABACUS_BIN_NAME} ${SW_MATH}/libswfft.a)
293+
target_link_libraries(${ABACUS_BIN_NAME} ${SW_MATH}/libswscalapack.a)
294+
target_link_libraries(${ABACUS_BIN_NAME} ${SW_MATH}/libswlapack.a)
295+
target_link_libraries(${ABACUS_BIN_NAME} ${SW_MATH}/libswblas.a)
296296
endif()
297297

298298
find_package(Threads REQUIRED)
@@ -472,8 +472,8 @@ if(MKLROOT)
472472
if(CMAKE_CXX_COMPILER_ID MATCHES Intel)
473473
list(APPEND math_libs ifcore)
474474
endif()
475-
elseif(USE_SUNWAY)
476-
# Sunway architecture can only use its own math library
475+
elseif(USE_SW)
476+
# SW architecture can only use its own math library
477477
else()
478478
find_package(FFTW3 REQUIRED)
479479
find_package(Lapack REQUIRED)

source/source_io/read_input.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ void ReadInput::create_directory(const Parameter& param)
191191
}
192192
// NOTE: "make_dir_out" must be called by all processes!!!
193193
// Maybe it is not good, because only rank 0 can create the directory.
194-
#ifndef __SUNWAY
194+
#ifndef __SW
195195
ModuleBase::Global_File::make_dir_out(param.input.suffix,
196196
param.input.calculation,
197197
out_dir,
@@ -200,7 +200,7 @@ void ReadInput::create_directory(const Parameter& param)
200200
param.input.out_alllog); // xiaohui add 2013-09-01
201201
#endif
202202
const std::string ss = "test -d " + PARAM.inp.read_file_dir;
203-
#ifndef __SUNWAY
203+
#ifndef __SW
204204
if (system(ss.c_str()))
205205
{
206206
ModuleBase::WARNING_QUIT("ReadInput", "please set right files directory for reading in.");

source/source_pw/module_pwdft/VNL_in_pw.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -724,7 +724,7 @@ void pseudopot_cell_vnl::init_vnl(UnitCell& cell, const ModulePW::PW_Basis* rho_
724724

725725
double* jl = new double[kkbeta];
726726
double* aux = new double[kkbeta];
727-
#ifdef __SUNWAY
727+
#ifdef __SW
728728
for (int ib = 0; ib < nbeta; ib++)
729729
{
730730
int flag = 0;

0 commit comments

Comments
 (0)