Commit 36d5bad0 authored by Wout De Nolf's avatar Wout De Nolf

[doc] small changes

parent 2b506da3
......@@ -58,37 +58,37 @@
"[u'hpc2-0701']\n",
"[2353]\n",
"2:00:00\n",
"scheduledStart: None\n",
"stdout_file: OAR.1.stdout\n",
"resubmit_job_id: 0\n",
"owner: forstner\n",
"submissionTime: 2018-08-16 10:16:00+02:00\n",
"message: R=1,W=2:0:0,J=I,Q=interactive (Karma=0.000)\n",
"jobType: INTERACTIVE\n",
"array_id: 1\n",
"queue: interactive\n",
"launchingDirectory: /users/forstner\n",
"exit_code: None\n",
"name: None\n",
"properties: ((((desktop_computing = 'NO') AND gpu = 'NO') AND cluster = 'NICE') AND opsys = 'debian8') AND drain='NO'\n",
"state: Terminated\n",
"stopTime: 2018-08-16 10:16:11+02:00\n",
"job_user: forstner\n",
"assigned_network_address: [u'hpc2-0701']\n",
"walltime: 2:00:00\n",
"events: [{u'description': u'[bipbip 1] Ask to change the job state', u'event_id': u'1', u'date': 1534407371, u'type': u'SWITCH_INTO_TERMINATE_STATE', u'to_check': u'NO', u'job_id': 1}]\n",
"events: [{u'job_id': 1, u'event_id': u'1', u'date': 1534407371, u'type': u'SWITCH_INTO_TERMINATE_STATE', u'to_check': u'NO', u'description': u'[bipbip 1] Ask to change the job state'}]\n",
"array_index: 1\n",
"assigned_resources: [2353]\n",
"stderr_file: OAR.1.stderr\n",
"array_id: 1\n",
"dependencies: []\n",
"startTime: 2018-08-16 10:16:02+02:00\n",
"reservation: None\n",
"properties: ((((desktop_computing = 'NO') AND gpu = 'NO') AND cluster = 'NICE') AND opsys = 'debian8') AND drain='NO'\n",
"stdout_file: OAR.1.stdout\n",
"types: []\n",
"cpuset_name: forstner_1\n",
"Job_Id: 1\n",
"cpuset_name: forstner_1\n",
"name: None\n",
"initial_request: \n",
"queue: interactive\n",
"scheduledStart: None\n",
"wanted_resources: -l \"{type = 'default'}/core=1,walltime=2:0:0\" \n",
"project: default\n",
"dependencies: []\n",
"stderr_file: OAR.1.stderr\n",
"command: \n"
]
}
......@@ -141,27 +141,37 @@
"name": "stdout",
"output_type": "stream",
"text": [
"3 jobs found\n",
"Job(1122759)\n",
" name = None\n",
"15 jobs found\n",
"Job(1124788)\n",
" name = PyHST\n",
" project = default\n",
" state = Waiting\n",
" owner = in1096\n",
" runtime = 0:00:00\n",
" time_to_start: 16:51:45.477911\n",
" time_enqueued: 21:21:47\n",
" state = Terminated\n",
" owner = in1081\n",
" runtime = 0:00:54\n",
" time_to_start: 0:00:00\n",
" time_enqueued: 1:46:34.100600\n",
" time_scheduled: 0:00:00\n",
" runtime: 0:00:00\n",
"Job(1125018)\n",
" runtime: 0:00:54\n",
"Job(1125510)\n",
" name = None\n",
" project = default\n",
" state = Running\n",
" owner = forstner\n",
" runtime = 0:04:22.985761\n",
" owner = bona\n",
" runtime = 0:02:28.569919\n",
" time_to_start: 0:00:00\n",
" time_enqueued: 0:00:12\n",
" time_enqueued: 0:00:25\n",
" time_scheduled: 0:00:00\n",
" runtime: 0:04:22.988658\n"
" runtime: 0:02:28.571296\n",
"Job(1122760)\n",
" name = None\n",
" project = default\n",
" state = Waiting\n",
" owner = in1096\n",
" runtime = 0:00:00\n",
" time_to_start: 15:25:03.953672\n",
" time_enqueued: 21:21:38\n",
" time_scheduled: 0:00:00\n",
" runtime: 0:00:00\n"
]
}
],
......@@ -271,15 +281,15 @@
"source": [
"A job definition can also specify the resources required to execute the job:\n",
"\n",
"* host: number of hosts (default: 1)\n",
"* nodes: number of nodes (default: 1)\n",
"* cpu: number of cpu's per node (default: 1)\n",
"* core: number of cores per cpu (default: 1)\n",
"* gpu: boolean (default: False)\n",
"* mem_core_mb: minimal memory per core (default: 8000 MB)\n",
"* walltime: is a number (default: 2 hours) or a dictionary with at least one of keys \"days, seconds, minutes, hours, weeks\"\n",
"* custom properties: e.g. cpu_vendor=('=','INTEL')\n",
"\n",
"This starts $\\text{host}\\times\\text{nodes}\\times\\text{cpu}\\times\\text{core}$ processes distributed over the specified nodes and cpu's."
"This starts $\\text{nodes}\\times\\text{cpu}\\times\\text{core}$ processes distributed over the specified nodes and cpu's."
]
},
{
......@@ -341,20 +351,20 @@
"output_type": "stream",
"text": [
"Schedule job\n",
"Job(1125019)\n",
"Job(1125513)\n",
" name = test5\n",
" project = oarpy\n",
" state = Waiting\n",
" owner = denolf\n",
" runtime = 0:00:00\n",
"Wait until finished ...\n",
"...........................\n",
"Job(1125019)\n",
"...................................\n",
"Job(1125513)\n",
" name = test5\n",
" project = oarpy\n",
" state = Terminated\n",
" owner = denolf\n",
" runtime = 0:00:22\n",
" runtime = 0:00:29\n",
"Succes:\n",
"0\n",
"1\n",
......@@ -399,14 +409,14 @@
"output_type": "stream",
"text": [
"Enqueue job\n",
"Job(1125022)\n",
"Job(1125516)\n",
" name = test5\n",
" project = oarpy\n",
" state = Hold\n",
" owner = denolf\n",
" runtime = 0:00:00\n",
"Wait until enqueued ...\n",
"Job(1125022)\n",
"Job(1125516)\n",
" name = test5\n",
" project = oarpy\n",
" state = Hold\n",
......@@ -414,8 +424,8 @@
" runtime = 0:00:00\n",
"Schedule job\n",
"Wait until finished ...\n",
"....................\n",
"Job(1125022)\n",
"....................................\n",
"Job(1125516)\n",
" name = test5\n",
" project = oarpy\n",
" state = Terminated\n",
......@@ -469,20 +479,20 @@
"output_type": "stream",
"text": [
"Schedule job\n",
"Job(1125024)\n",
"Job(1125518)\n",
" name = test60\n",
" project = oarpy\n",
" state = Waiting\n",
" owner = denolf\n",
" runtime = 0:00:00\n",
"Wait until started ...\n",
"...............\n",
"Job(1125024)\n",
".................\n",
"Job(1125518)\n",
" name = test60\n",
" project = oarpy\n",
" state = Running\n",
" owner = denolf\n",
" runtime = 0:00:23.961050\n",
" runtime = 0:00:24.181162\n",
"Suspend job\n"
]
},
......@@ -490,8 +500,8 @@
"name": "stderr",
"output_type": "stream",
"text": [
"ERROR:root:Cannot suspend job (Jobid=1125024,Error=1,EPERM)\n",
"/!\\ Cannot hold 1125024 : the job is not in the right state (try '-r' option).\n",
"ERROR:root:Cannot suspend job (Jobid=1125518,Error=1,EPERM)\n",
"/!\\ Cannot hold 1125518 : the job is not in the right state (try '-r' option).\n",
"\n"
]
},
......@@ -501,8 +511,8 @@
"text": [
"This operation is currently not permitted\n",
"Wait until finished ...\n",
"..........................................\n",
"Job(1125024)\n",
"...........................................\n",
"Job(1125518)\n",
" name = test60\n",
" project = oarpy\n",
" state = Terminated\n",
......@@ -621,18 +631,18 @@
"output_type": "stream",
"text": [
"Schedule job\n",
"Job(1125027)\n",
"Job(1125521)\n",
" name = test60\n",
" project = oarpy\n",
" state = Waiting\n",
" owner = denolf\n",
" runtime = 0:00:00\n",
"Wait until started ...\n",
"..............\n",
".........................\n",
"Interrupt\n",
"Wait until finished ...\n",
"...................\n",
"Job(1125027)\n",
"................\n",
"Job(1125521)\n",
" name = test60\n",
" project = oarpy\n",
" state = Error\n",
......
......@@ -21,7 +21,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"............\n",
"......................\n",
"Succes:\n",
"Hello word\n",
"\n"
......@@ -60,7 +60,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
".....................................\n",
"......................................\n",
"Succes:\n",
"Hello word\n",
"\n"
......@@ -108,8 +108,8 @@
"name": "stdout",
"output_type": "stream",
"text": [
"[Job(1122759), Job(1122760), Job(1125221), Job(976220)]\n",
"set([(u'denolf', u'Terminated'), (u'ljacques', u'Error'), (u'in1096', u'Waiting')])\n"
"[Job(1122759), Job(1122760), Job(1124796), Job(1125514), Job(1125515), Job(1125516), Job(976220)]\n",
"set([(u'denolf', u'Finishing'), (u'denolf', u'Error'), (u'in1081', u'Running'), (u'denolf', u'Terminated'), (u'ljacques', u'Error'), (u'in1096', u'Waiting')])\n"
]
}
],
......@@ -149,10 +149,10 @@
" (((((gpu='YES') AND desktop_computing = 'NO') AND cluster = 'NICE') AND opsys = 'debian8') AND interactive = 'MIXED') AND drain='NO'\n",
"\n",
"Job resource:\n",
" -l host=1/core=16,walltime=16:00:00 -p \"gpu='YES' and drain='NO'\"\n",
" -l nodes=1/core=16,walltime=16:00:00 -p \"gpu='YES' and drain='NO'\"\n",
"\n",
"Job definition:\n",
" -n Gecko_2_0p7um_2474_3031__001_.par --project default -d /mntdirect/_data_visitor/md1189/id17/GeckosHR/Gecko_2/Gecko_2_0p7um_2474_3031__001_/Slices -O OAR.Gecko_2_0p7um_2474_3031__001_.par.%jobid%.stdout -E OAR.Gecko_2_0p7um_2474_3031__001_.par.%jobid%.stderr -l host=1/core=16,walltime=16:00:00 -p \"gpu='YES' and drain='NO'\" /mntdirect/_data_visitor/md1189/id17/GeckosHR/Gecko_2/Gecko_2_0p7um_2474_3031__001_/Slices//./tmpmd1189.sh\n",
" -n Gecko_2_0p7um_2474_3031__001_.par --project default -d /mntdirect/_data_visitor/md1189/id17/GeckosHR/Gecko_2/Gecko_2_0p7um_2474_3031__001_/Slices -O OAR.Gecko_2_0p7um_2474_3031__001_.par.%jobid%.stdout -E OAR.Gecko_2_0p7um_2474_3031__001_.par.%jobid%.stderr -l nodes=1/core=16,walltime=16:00:00 -p \"gpu='YES' and drain='NO'\" /mntdirect/_data_visitor/md1189/id17/GeckosHR/Gecko_2/Gecko_2_0p7um_2474_3031__001_/Slices//./tmpmd1189.sh\n",
"\n"
]
}
......
......@@ -133,9 +133,11 @@ class Job(object):
silent=False):
"""
:param str or tuple states: state or states we are waiting for
:param int or None timeout: if not none, second before the timeout.
:param int refresh: time (in second) between two observations of the job
:param states: state or states we are waiting for
:type states: str or tuple
:param timeout: if not none, second before the timeout.
:type timeout: int or None
:param int refresh: time (in seconds) between two observations of the job
state
:param silent: if False then write to stdout advancement ('.')
"""
......@@ -188,7 +190,7 @@ class Job(object):
@property
def time_to_start(self):
"""Time till start
"""Time until the job starts
"""
dt = self._time_diff('startTime', timeutils.now())
return max(dt,datetime.timedelta(seconds=0))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment