diff --git a/source/api_cc/src/common.cc b/source/api_cc/src/common.cc index f8e69cf3ae..d3cad083bd 100644 --- a/source/api_cc/src/common.cc +++ b/source/api_cc/src/common.cc @@ -390,9 +390,11 @@ static inline void _load_library_path(std::string dso_path) { if (!dso_handle) { throw deepmd::deepmd_exception( dso_path + - " is not found or fails to load! You can add the library directory to LD_LIBRARY_PATH." + " is not found or fails to load! You can add the library directory to " + "LD_LIBRARY_PATH." #ifndef _WIN32 - " Error message: " + std::string(dlerror()) + " Error message: " + + std::string(dlerror()) #endif ); } diff --git a/source/lib/src/gpu/cudart/cudart_stub.cc b/source/lib/src/gpu/cudart/cudart_stub.cc index 3a735606eb..cfbabd6f5e 100644 --- a/source/lib/src/gpu/cudart/cudart_stub.cc +++ b/source/lib/src/gpu/cudart/cudart_stub.cc @@ -26,7 +26,8 @@ void *DP_cudart_dlopen(char *libname) { if (!dso_handle) { std::cerr << "DeePMD-kit: Cannot find " << libname << std::endl; #ifndef _WIN32 - std::cerr << "DeePMD-kit: Error message: " << std::string(dlerror()) << std::endl; + std::cerr << "DeePMD-kit: Error message: " << std::string(dlerror()) + << std::endl; #endif return nullptr; }