git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-analysis/EcologicalEngineSmartExecutor@132931 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
433f02c1ef
commit
def1b34335
|
@ -101,11 +101,14 @@ public class DistributedProcessingAgentWPS {
|
||||||
// chunkize the number of species in order to lower the computational effort of the workers
|
// chunkize the number of species in order to lower the computational effort of the workers
|
||||||
int nservices = jobManager.estimateNumberOfServices(configuration.getGcubeScope());
|
int nservices = jobManager.estimateNumberOfServices(configuration.getGcubeScope());
|
||||||
//subdivisiondiv = rightSetNumberOfElements / (maxElementsAllowedPerJob);
|
//subdivisiondiv = rightSetNumberOfElements / (maxElementsAllowedPerJob);
|
||||||
subdivisiondiv = nservices; //rightSetNumberOfElements / (nservices);
|
subdivisiondiv = nservices; //rightSetNumberOfElements / (nservices); //RIGHT
|
||||||
|
// subdivisiondiv = rightSetNumberOfElements / (maxElementsAllowedPerJob); //rightSetNumberOfElements / (nservices);
|
||||||
AnalysisLogger.getLogger().debug("Subdivision for the job "+subdivisiondiv);
|
AnalysisLogger.getLogger().debug("Subdivision for the job "+subdivisiondiv);
|
||||||
|
/*
|
||||||
int rest = rightSetNumberOfElements % (nservices);
|
int rest = rightSetNumberOfElements % (nservices);
|
||||||
if (rest > 0)
|
if (rest > 0)
|
||||||
subdivisiondiv++;
|
subdivisiondiv++;
|
||||||
|
*/
|
||||||
if (subdivisiondiv == 0)
|
if (subdivisiondiv == 0)
|
||||||
subdivisiondiv = 1;
|
subdivisiondiv = 1;
|
||||||
|
|
||||||
|
|
|
@ -242,8 +242,8 @@ public class WPSJobManager {
|
||||||
|
|
||||||
int numberofservices = differentServices.size();
|
int numberofservices = differentServices.size();
|
||||||
AnalysisLogger.getLogger().debug("WPSJobManager->Number of found services "+numberofservices);
|
AnalysisLogger.getLogger().debug("WPSJobManager->Number of found services "+numberofservices);
|
||||||
nservices = numberofservices;
|
nservices = Math.max(1,numberofservices-1);
|
||||||
return numberofservices;
|
return nservices;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void uploadAndExecuteChunkized(AlgorithmConfiguration configuration, String algorithmClass, List<String> arguments, String session) throws Exception{
|
public void uploadAndExecuteChunkized(AlgorithmConfiguration configuration, String algorithmClass, List<String> arguments, String session) throws Exception{
|
||||||
|
@ -283,7 +283,8 @@ public class WPSJobManager {
|
||||||
|
|
||||||
AnalysisLogger.getLogger().debug("WPSJobManager->Workers WPS host "+wpshost);
|
AnalysisLogger.getLogger().debug("WPSJobManager->Workers WPS host "+wpshost);
|
||||||
|
|
||||||
executor = Executors.newFixedThreadPool(parallelisation);
|
executor = Executors.newFixedThreadPool(nservices);
|
||||||
|
// executor = Executors.newFixedThreadPool(2);
|
||||||
int taskNumber = 0;
|
int taskNumber = 0;
|
||||||
|
|
||||||
AnalysisLogger.getLogger().debug("WPSJobManager->Executing algorithm class:"+algorithmClass);
|
AnalysisLogger.getLogger().debug("WPSJobManager->Executing algorithm class:"+algorithmClass);
|
||||||
|
|
Loading…
Reference in New Issue