@@ -58,6 +58,7 @@ JNIEXPORT jint JNICALL Java_com_intel_oap_mllib_OneCCL_00024_c_1init(
58
58
logger::println (logger::INFO, " OneCCL (native): init" );
59
59
store = std::make_shared<file_store>(
60
60
kvs_param, rank, std::chrono::seconds (STORE_TIMEOUT_SEC));
61
+ ccl::shared_ptr_class<ccl::kvs> kvs;
61
62
62
63
const char *str = env->GetStringUTFChars (ip_port, 0 );
63
64
ccl::string ccl_ip_port (str);
@@ -76,7 +77,7 @@ JNIEXPORT jint JNICALL Java_com_intel_oap_mllib_OneCCL_00024_c_1init(
76
77
logger::Logger::getInstance (name).printLogToFile (" rankID was %d, OneCCL singleton init took %f secs." , rank, duration / 1000 );
77
78
78
79
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" ) ;
80
81
return -1 ;
81
82
}
82
83
@@ -88,9 +89,7 @@ JNIEXPORT jint JNICALL Java_com_intel_oap_mllib_OneCCL_00024_c_1init(
88
89
kvs_attr.set <ccl::kvs_attr_id::ip_port>(ccl_ip_port);
89
90
logger::println (logger::INFO, " OneCCL (native): create_main_kvs" );
90
91
91
- ccl::shared_ptr_class<ccl::kvs> kvs = ccl::create_main_kvs (kvs_attr);
92
92
logger::println (logger::INFO, " OneCCL (native): g_ccl_kvs.push_back(kvs)" );
93
-
94
93
{
95
94
std::lock_guard<std::mutex> lock (g_mtx);
96
95
g_kvs.push_back (kvs);
@@ -110,7 +109,7 @@ JNIEXPORT jint JNICALL Java_com_intel_oap_mllib_OneCCL_00024_c_1init(
110
109
.count ();
111
110
logger::println (logger::INFO, " OneCCL (native): init took %f secs" ,
112
111
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 );
114
113
115
114
116
115
rank_id = getComm ().rank ();
0 commit comments