Skip to content

Commit c65408b

Browse files
committed
change the make_dir
1 parent cf96e93 commit c65408b

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -287,8 +287,8 @@ if (USE_SW)
287287
set(SW ON)
288288
include_directories(${SW_MATH}/include)
289289
include_directories(${SW_FFT}/include)
290-
include_directories(${SW_FFT}/lib/libfftw3.a)
291-
290+
291+
target_link_libraries(${ABACUS_BIN_NAME} ${SW_FFT}/lib/libfftw3.a)
292292
target_link_libraries(${ABACUS_BIN_NAME} ${SW_MATH}/libswfft.a)
293293
target_link_libraries(${ABACUS_BIN_NAME} ${SW_MATH}/libswscalapack.a)
294294
target_link_libraries(${ABACUS_BIN_NAME} ${SW_MATH}/libswlapack.a)
@@ -473,6 +473,7 @@ if(MKLROOT)
473473
list(APPEND math_libs ifcore)
474474
endif()
475475
elseif(USE_SW)
476+
list(APPEND math_libs gfortran)
476477
# SW architecture can only use its own math library
477478
else()
478479
find_package(FFTW3 REQUIRED)

source/source_base/global_function.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ void OUT(std::ofstream &ofs, const std::string &name)
6161
void MAKE_DIR(const std::string &fn)
6262
{
6363
// ModuleBase::TITLE("global_function","MAKE_DIR");
64+
#ifndef __SW
6465
if (GlobalV::MY_RANK == 0)
6566
{
6667
std::stringstream ss;
@@ -73,6 +74,7 @@ void MAKE_DIR(const std::string &fn)
7374
ModuleBase::WARNING_QUIT("MAKE_DIR", fn);
7475
}
7576
}
77+
#endif
7678
return;
7779
}
7880

0 commit comments

Comments
 (0)