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

View File

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