From: secher Date: Thu, 28 Oct 2010 08:26:21 +0000 (+0000) Subject: update kernel to take account improvement in Container GUI of YACS X-Git-Tag: V5_1_5rc2~4 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=55c7c43dcf3e671b40f9335c93d9326099bb1631;p=modules%2Fkernel.git update kernel to take account improvement in Container GUI of YACS --- diff --git a/src/Container/SALOME_ContainerManager.cxx b/src/Container/SALOME_ContainerManager.cxx index 4d5a9db91..a22a39c2f 100644 --- a/src/Container/SALOME_ContainerManager.cxx +++ b/src/Container/SALOME_ContainerManager.cxx @@ -291,14 +291,10 @@ SALOME_ContainerManager::GiveContainer(const Engines::ContainerParameters& param std::string containerNameInNS; if(params.isMPI){ int nbproc; - if ( (params.resource_params.nb_node <= 0) && (params.resource_params.nb_proc_per_node <= 0) ) + if ( params.nb_proc <= 0 ) nbproc = 1; - else if ( params.resource_params.nb_node == 0 ) - nbproc = params.resource_params.nb_proc_per_node; - else if ( params.resource_params.nb_proc_per_node == 0 ) - nbproc = params.resource_params.nb_node; else - nbproc = params.resource_params.nb_node * params.resource_params.nb_proc_per_node; + nbproc = params.nb_proc; if( getenv("LIBBATCH_NODEFILE") != NULL ) machFile = machinesFile(nbproc); // A mpi parallel container register on zero node in NS @@ -596,14 +592,10 @@ SALOME_ContainerManager::BuildCommandToLaunchRemoteContainer if (params.isMPI) { - if ((params.resource_params.nb_node <= 0) && (params.resource_params.nb_proc_per_node <= 0)) + if ( params.nb_proc <= 0 ) nbproc = 1; - else if (params.resource_params.nb_node == 0) - nbproc = params.resource_params.nb_proc_per_node; - else if (params.resource_params.nb_proc_per_node == 0) - nbproc = params.resource_params.nb_node; else - nbproc = params.resource_params.nb_node * params.resource_params.nb_proc_per_node; + nbproc = params.nb_proc; } // "ssh -l user machine distantPath/runRemote.sh hostNS portNS WORKINGDIR workingdir \ @@ -703,14 +695,10 @@ SALOME_ContainerManager::BuildCommandToLaunchLocalContainer { o << "mpirun -np "; - if ( (params.resource_params.nb_node <= 0) && (params.resource_params.nb_proc_per_node <= 0) ) + if ( params.nb_proc <= 0 ) nbproc = 1; - else if ( params.resource_params.nb_node == 0 ) - nbproc = params.resource_params.nb_proc_per_node; - else if ( params.resource_params.nb_proc_per_node == 0 ) - nbproc = params.resource_params.nb_node; else - nbproc = params.resource_params.nb_node * params.resource_params.nb_proc_per_node; + nbproc = params.nb_proc; o << nbproc << " "; @@ -917,14 +905,10 @@ SALOME_ContainerManager::BuildTempFileToLaunchRemoteContainer tempOutputFile << "mpirun -np "; int nbproc; - if ( (params.resource_params.nb_node <= 0) && (params.resource_params.nb_proc_per_node <= 0) ) + if ( params.nb_proc <= 0 ) nbproc = 1; - else if ( params.resource_params.nb_node == 0 ) - nbproc = params.resource_params.nb_proc_per_node; - else if ( params.resource_params.nb_proc_per_node == 0 ) - nbproc = params.resource_params.nb_node; else - nbproc = params.resource_params.nb_node * params.resource_params.nb_proc_per_node; + nbproc = params.nb_proc; std::ostringstream o; diff --git a/src/LifeCycleCORBA/SALOME_LifeCycleCORBA.cxx b/src/LifeCycleCORBA/SALOME_LifeCycleCORBA.cxx index 4c5c24360..e616e68aa 100644 --- a/src/LifeCycleCORBA/SALOME_LifeCycleCORBA.cxx +++ b/src/LifeCycleCORBA/SALOME_LifeCycleCORBA.cxx @@ -498,14 +498,10 @@ int SALOME_LifeCycleCORBA::NbProc(const Engines::ContainerParameters& params) { if( !isMpiContainer(params) ) return 0; - else if( (params.resource_params.nb_node <= 0) && (params.resource_params.nb_proc_per_node <= 0) ) + else if( params.nb_proc <= 0 ) return 1; - else if( params.resource_params.nb_node == 0 ) - return params.resource_params.nb_proc_per_node; - else if( params.resource_params.nb_proc_per_node == 0 ) - return params.resource_params.nb_node; else - return params.resource_params.nb_node * params.resource_params.nb_proc_per_node; + return params.nb_proc; } //============================================================================= diff --git a/src/NamingService/SALOME_NamingService.cxx b/src/NamingService/SALOME_NamingService.cxx index 80bb67144..6e4444976 100644 --- a/src/NamingService/SALOME_NamingService.cxx +++ b/src/NamingService/SALOME_NamingService.cxx @@ -636,14 +636,10 @@ SALOME_NamingService::ContainerName(const Engines::ContainerParameters& params) if ( !params.isMPI ) nbproc = 0; - else if ( (params.resource_params.nb_node <= 0) && (params.resource_params.nb_proc_per_node <= 0) ) + else if ( params.nb_proc <= 0 ) nbproc = 1; - else if ( params.resource_params.nb_node == 0 ) - nbproc = params.resource_params.nb_proc_per_node; - else if ( params.resource_params.nb_proc_per_node == 0 ) - nbproc = params.resource_params.nb_node; else - nbproc = params.resource_params.nb_node * params.resource_params.nb_proc_per_node; + nbproc = params.nb_proc; std::string ret = ContainerName(params.container_name);