| 60 | |
| 61 | = User Scenarios = |
| 62 | |
| 63 | == How to manage a job from start to end == |
| 64 | |
| 65 | [[NoteBox(note, If the the directory `~/.drm4g` does not exist\, `drm4g` will create one with a local configuration)]] |
| 66 | |
| 67 | 1. Start up DRM4G : |
| 68 | {{{ |
| 69 | #!sh |
| 70 | [user@mycomputer~]$ drm4g start |
| 71 | Creating a DRM4G local configuration in '/home/user/.drm4g' |
| 72 | Creating '/home/user/.drm4g/var/acct' directory |
| 73 | Coping from '/home/user/drm4g/etc' to '/home/user/.drm4g/etc' |
| 74 | Starting DRM4G .... |
| 75 | OK |
| 76 | Starting ssh-agent ... |
| 77 | OK |
| 78 | }}} |
| 79 | 1. Show information about all available resources and their host : |
| 80 | {{{ |
| 81 | #!sh |
| 82 | [user@mycomputer~]$ drm4g resource list |
| 83 | RESOURCE STATE |
| 84 | localmachine enabled |
| 85 | |
| 86 | [user@mycomputer~]$ drm4g host list |
| 87 | HID ARCH JOBS(R/T) LRMS HOST |
| 88 | 0 x86_64 0/0 fork localmachine |
| 89 | |
| 90 | [user@mycomputer~]$ drm4g host list 0 |
| 91 | HID ARCH JOBS(R/T) LRMS HOST |
| 92 | 0 x86_64 0/0 fork localmachine |
| 93 | |
| 94 | QUEUENAME JOBS(R/T) WALLT CPUT MAXR MAXQ |
| 95 | default 0/0 0 0 1 1 |
| 96 | }}} |
| 97 | 1. Create a job template : |
| 98 | {{{ |
| 99 | #!sh |
| 100 | [user@mycomputer~]$ echo "EXECUTABLE=/bin/date" > date.job |
| 101 | }}} |
| 102 | 1. Submit the job : |
| 103 | {{{ |
| 104 | #!sh |
| 105 | [user@mycomputer~]$ drm4g job submit date.job |
| 106 | ID: 0 |
| 107 | }}} |
| 108 | 1. Check the evolution of the job : |
| 109 | {{{ |
| 110 | #!sh |
| 111 | [user@mycomputer~]$ drm4g job list 0 |
| 112 | JID DM EM START END EXEC XFER EXIT NAME HOST |
| 113 | 0 pend ---- 19:39:09 --:--:-- 0:00:00 0:00:00 -- date.job -- |
| 114 | }}} |
| 115 | If you execute successive `drm4g job list 0`, you will see the different states of this job: |
| 116 | {{{ |
| 117 | 0 pend ---- 19:39:09 --:--:-- 0:00:00 0:00:00 -- date.job -- |
| 118 | 0 prol ---- 19:39:09 --:--:-- 0:00:00 0:00:00 -- date.job -- |
| 119 | 0 wrap pend 19:39:09 --:--:-- 0:00:00 0:00:00 -- date.job localhost/fork |
| 120 | 0 wrap actv 19:39:09 --:--:-- 0:00:05 0:00:00 -- date.job localhost/fork |
| 121 | 0 epil ---- 19:39:09 --:--:-- 0:00:10 0:00:00 -- date.job localhost/fork |
| 122 | 0 done ---- 19:39:09 19:39:27 0:00:10 0:00:01 0 date.job localhost/fork |
| 123 | }}} |
| 124 | * `pend`: The job is waiting for a resource to run on. |
| 125 | * `prol` :The remote system is being prepared for execution. |
| 126 | * `wrap pend` :The job has been successfully submitted to the computing resource and it is waiting. |
| 127 | * `wrap actv`:The job is being executed by the computing resource. |
| 128 | * `epil`:The job is finalizing. |
| 129 | * `done`:The job has finished. |
| 130 | 1. Results are standard output (stdout) and standard error (stderr), both files will be in the same directory of job template: |
| 131 | {{{ |
| 132 | #!sh |
| 133 | [user@mycomputer~]$ cat stdout.0 |
| 134 | Mon Jul 28 12:29:43 CEST 2014 |
| 135 | |
| 136 | [user@mycomputer~]$ cat stderr.0 |
| 137 | |
| 138 | }}} |