libpredict_integration: add using maxCoresCount
This commit is contained in:
@@ -369,7 +369,8 @@ void runPredictScheme(SgProject& project,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Initialize cluster
|
// Initialize cluster
|
||||||
libpredict::RetInitCluster retInitCluster = libpredict::InitCluster(clusterConfStr);
|
int maxCoresCount = 0;
|
||||||
|
libpredict::RetInitCluster retInitCluster = libpredict::InitCluster(clusterConfStr, maxCoresCount);
|
||||||
|
|
||||||
if (retInitCluster != libpredict::INIT_CLUSTER_SUCCESS) {
|
if (retInitCluster != libpredict::INIT_CLUSTER_SUCCESS) {
|
||||||
__spf_print(1, "ERROR: Failed to initialize libpredict cluster with config: %s, return code: %d\n", clusterConfStr.c_str(), (int)retInitCluster);
|
__spf_print(1, "ERROR: Failed to initialize libpredict cluster with config: %s, return code: %d\n", clusterConfStr.c_str(), (int)retInitCluster);
|
||||||
@@ -385,7 +386,7 @@ void runPredictScheme(SgProject& project,
|
|||||||
vector<size_t> best;
|
vector<size_t> best;
|
||||||
double bestTime = std::numeric_limits<double>::max();
|
double bestTime = std::numeric_limits<double>::max();
|
||||||
|
|
||||||
for (size_t processes_per_processor = 1; processes_per_processor <= 16; ++processes_per_processor) {
|
for (size_t processes_per_processor = 1; processes_per_processor <= maxCoresCount; ++processes_per_processor) {
|
||||||
int procCount = 0;
|
int procCount = 0;
|
||||||
libpredict::RetInitMapping retInitMapping = libpredict::InitMapping(processes_per_processor, procCount);
|
libpredict::RetInitMapping retInitMapping = libpredict::InitMapping(processes_per_processor, procCount);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user