Skip to content

Commit 74f7fb6

Browse files
committed
update
1 parent 4cc99b7 commit 74f7fb6

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

mllib-dal/src/main/native/OneCCL.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ JNIEXPORT jint JNICALL Java_com_intel_oap_mllib_OneCCL_00024_c_1init(
5858
logger::println(logger::INFO, "OneCCL (native): init");
5959
store = std::make_shared<file_store>(
6060
kvs_param, rank, std::chrono::seconds(STORE_TIMEOUT_SEC));
61+
ccl::shared_ptr_class<ccl::kvs> kvs;
6162

6263
const char *str = env->GetStringUTFChars(ip_port, 0);
6364
ccl::string ccl_ip_port(str);
@@ -76,7 +77,7 @@ JNIEXPORT jint JNICALL Java_com_intel_oap_mllib_OneCCL_00024_c_1init(
7677
logger::Logger::getInstance(name).printLogToFile("rankID was %d, OneCCL singleton init took %f secs.", rank, duration / 1000 );
7778

7879
if (create_kvs_by_store(store, rank, kvs, ccl_name) != KVS_CREATE_SUCCESS) {
79-
std::cout << "can not create kvs by store" << std::endl;
80+
logger::println(logger::INFO, "OneCCL (native): can not create kvs by store");
8081
return -1;
8182
}
8283

@@ -88,9 +89,7 @@ JNIEXPORT jint JNICALL Java_com_intel_oap_mllib_OneCCL_00024_c_1init(
8889
kvs_attr.set<ccl::kvs_attr_id::ip_port>(ccl_ip_port);
8990
logger::println(logger::INFO, "OneCCL (native): create_main_kvs");
9091

91-
ccl::shared_ptr_class<ccl::kvs> kvs = ccl::create_main_kvs(kvs_attr);
9292
logger::println(logger::INFO, "OneCCL (native): g_ccl_kvs.push_back(kvs)");
93-
9493
{
9594
std::lock_guard<std::mutex> lock(g_mtx);
9695
g_kvs.push_back(kvs);
@@ -110,7 +109,7 @@ JNIEXPORT jint JNICALL Java_com_intel_oap_mllib_OneCCL_00024_c_1init(
110109
.count();
111110
logger::println(logger::INFO, "OneCCL (native): init took %f secs",
112111
duration / 1000);
113-
logger::Logger::getInstance(name).printLogToFile("rankID was %d, OneCCL create communicator took %f secs.", rank, duration / 1000 );
112+
logger::Logger::getInstance(ccl_name).printLogToFile("rankID was %d, OneCCL create communicator took %f secs.", rank, duration / 1000 );
114113

115114

116115
rank_id = getComm().rank();

0 commit comments

Comments
 (0)