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
|
||||
int nservices = jobManager.estimateNumberOfServices(configuration.getGcubeScope());
|
||||
//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);
|
||||
/*
|
||||
int rest = rightSetNumberOfElements % (nservices);
|
||||
if (rest > 0)
|
||||
subdivisiondiv++;
|
||||
*/
|
||||
if (subdivisiondiv == 0)
|
||||
subdivisiondiv = 1;
|
||||
|
||||
|
|
|
@ -242,8 +242,8 @@ public class WPSJobManager {
|
|||
|
||||
int numberofservices = differentServices.size();
|
||||
AnalysisLogger.getLogger().debug("WPSJobManager->Number of found services "+numberofservices);
|
||||
nservices = numberofservices;
|
||||
return numberofservices;
|
||||
nservices = Math.max(1,numberofservices-1);
|
||||
return nservices;
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
executor = Executors.newFixedThreadPool(parallelisation);
|
||||
executor = Executors.newFixedThreadPool(nservices);
|
||||
// executor = Executors.newFixedThreadPool(2);
|
||||
int taskNumber = 0;
|
||||
|
||||
AnalysisLogger.getLogger().debug("WPSJobManager->Executing algorithm class:"+algorithmClass);
|
||||
|
|
Loading…
Reference in New Issue