Skip to content
Snippets Groups Projects
Commit 3e727711 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

Make RunOnelabClient work also when Gmsh is a non-local ONELAB client (i.e.,...

Make RunOnelabClient work also when Gmsh is a non-local ONELAB client (i.e., same as a Python subclient)
parent 036593ff
No related branches found
No related tags found
No related merge requests found
......@@ -1281,8 +1281,14 @@ void Msg::ImportPhysicalsAsOnelabRegions()
void Msg::RunOnelabClient(const std::string &name, const std::string &command)
{
#if defined(HAVE_ONELAB) && !defined(HAVE_ONELAB2)
onelab::remoteNetworkClient *c = dynamic_cast<onelab::remoteNetworkClient*>(_onelabClient);
if(c){
c->runSubClient(name, command);
}
else{
gmshLocalNetworkClient client(name, command, "", true);
client.run();
}
#endif
}
......
......@@ -378,6 +378,10 @@ bool gmshLocalNetworkClient::receiveMessage(gmshLocalNetworkClient *master)
new gmshLocalNetworkClient(clientName, command, "", true);
onelabGmshServer *server = new onelabGmshServer(subClient);
subClient->setPid(0);
onelab::string o(subClient->getName() + "/Action", "compute");
o.setVisible(false);
o.setNeverChanged(true);
onelab::server::instance()->set(o);
int sock = server->LaunchClient();
if(sock < 0){ // could not establish the connection: aborting
server->Shutdown();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment