Gianpaolo Coro 2016-10-07 15:19:07 +00:00
parent 433f02c1ef
commit def1b34335
2 changed files with 8 additions and 4 deletions

View File

@ -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;

View File

@ -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);