Skip to content
Snippets Groups Projects
Commit 4d8959bd authored by Mads M. Pedersen's avatar Mads M. Pedersen
Browse files

Merge branch 'master' into signal

parents 41026716 d4540763
No related branches found
No related tags found
No related merge requests found
......@@ -388,6 +388,8 @@ class Simulation(object):
def set_id(self, *args, **kwargs):
pass
def progress_callback(self,*args, **kwargs):
pass
class UpdateSimStatusThread(Thread):
def __init__(self, simulation, interval=1):
......
......@@ -16,12 +16,11 @@ import time
from wetb.hawc2 import log_file
from wetb.hawc2.log_file import LogInfo, LogFile
from wetb.hawc2.simulation import ERROR, ABORTED
from wetb.utils.cluster_tools import pbsjob
from wetb.utils.cluster_tools.cluster_resource import LocalResource, \
SSHPBSClusterResource, unix_path
SSHPBSClusterResource
from wetb.utils.cluster_tools import pbsjob
from wetb.utils.cluster_tools.pbsjob import SSHPBSJob, NOT_SUBMITTED, DONE
from wetb.utils.cluster_tools.ssh_client import SSHClient
from wetb.utils.timing import print_time
from wetb.hawc2.htc_file import fmt_path
import numpy as np
......@@ -249,7 +248,8 @@ class GormSimulationResource(PBSClusterSimulationResource):
def __init__(self, username, password, wine_cmd="WINEARCH=win32 WINEPREFIX=~/.wine32 wine"):
init_cmd = """export PATH=/home/python/miniconda3/bin:$PATH
source activate wetb_py3"""
PBSClusterSimulationResource.__init__(self, "gorm.risoe.dk", username, password, 22, 25, 100, init_cmd, wine_cmd, "python")
from wetb.utils.cluster_tools.ssh_client import SSHClient
PBSClusterSimulationResource.__init__(self, SSHClient('gorm.risoe.dk', username, password, 22), 25, 100, init_cmd, wine_cmd, "python")
class PBSClusterSimulationHost(SimulationHost):
......
......@@ -117,6 +117,10 @@ class SSHPBSClusterResource(Resource):
@property
def host(self):
return self.ssh.host
@property
def username(self):
return self.ssh.username
def new_ssh_connection(self):
......
......@@ -4,7 +4,6 @@ Created on 04/12/2015
@author: mmpe
'''
import os
from wetb.utils.cluster_tools.ssh_client import SSHClient
NOT_SUBMITTED = "Job not submitted"
PENDING = "Pending"
......@@ -38,7 +37,6 @@ class SSHPBSJob(object):
@property
def status(self):
if self._status in [NOT_SUBMITTED, DONE]:
return self._status
with self.ssh:
......
......@@ -6,10 +6,7 @@ Created on 27/11/2015
from io import StringIO
import sys
try:
import paramiko
except Exception as e:
sys.stderr.write("Paramiko(ssh client module) not imported\n%s"%str(e) )
import paramiko
import os
import threading
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment