The QCG-SimpleClient is a basic client utility used to submit jobs to the QCG-Broker service (a  QosCosGrid meta-scheduler). Its job description format (QCG-Script) and command tools syntax were intentionally modelled after local batch systems "look && feel". Thus, the learning effort needed for a new users (that have some experience with local cluster systems) was very limited. The QCG-SimpleClient allow you to submit MUSCLE job in the coherent way to any single PL-Grid site. Unfortunately current version of QCG-Script do not support description of more advance experiments like co-allocated (cross-cluster) simulations, workflows or parameter sweep. You need to use QCG-AdvancedClient instead.

User Interface Machine

Every cluster in PL-Grid can be accessed from the QCG UI machine: You can log in there using your PL-Grid account:

ssh plg[your-id]

Preparing credentials

  1. Copy your credentials (PKCS12 keystore) to the qcg machine:
    scp plg[your-id].p12 plg[your-id]
  2. Create ~/.globus directory
    mkdir ~/.globus
  3. Convert your credentials to the .pem format
    $ openssl pkcs12 -nocerts -in usercred.p12 -out ~/.globus/userkey.pem
    $ openssl pkcs12 -clcerts -nokeys -in usercred.p12 -out ~/.globus/usercert.pem
    $ chmod 644 ~/.globus/usercert.pem
    $ chmod 400 ~/.globus/userkey.pem

Submitting Simple Bash job

  • Example job script:
    $cat hostname.qcg 
    #cluster where to run a job
    #QCG output=output.txt
    #QCG error=error.txt
    sleep 30
    sleep 30
  • job submission:
    $qcg-sub hostname.qcg
    UserDN = /C=PL/O=GRID/O=PSNC/CN=Mariusz Mamonski
    ProxyLifetime = 23 Days 11 Hours 54 Minutes 8 Seconds
    jobId = J1349800941529__3789
  • list all your jobs:
    UserDN = /C=PL/O=GRID/O=PSNC/CN=Mariusz Mamonski
    ProxyLifetime = 23 Days 11 Hours 53 Minutes 52 Seconds
    JOB IDENTIFIER                  TASK      NOTE                  SUBMISSION TIME  START TIME       FINISH TIME      STATUS            HOSTNAME  
    J1349800941529__3789            task                            09.10.12 18:42                                     PENDING           zeus      
    Number of tasks:
    PENDING : 1
    TOTAL: 1
  • get detailed job info:
    > qcg-info J1349800941529__3789
    UserDN = /C=PL/O=GRID/O=PSNC/CN=Mariusz Mamonski
    ProxyLifetime = 23 Days 11 Hours 52 Minutes 53 Seconds
    TaskType: SINGLE
    SubmissionTime: Tue Oct 09 18:42:21 CEST 2012
    ProxyLifetime: P23DT11H52M51S
    Status: RUNNING
    StartTime: Tue Oct 09 18:42:21 CEST 2012
    ProcessesCount: 1
    Status: RUNNING
    SubmissionTime: Tue Oct 09 18:42:21 CEST 2012
    LocalSubmissionTime: Tue Oct 09 18:42:24 CEST 2012
    LocalStartTime: Tue Oct 09 18:42:54 CEST 2012
  • peek job output when its running:
    $  qcg-peek J1349800941529__3789
    UserDN = /C=PL/O=GRID/O=PSNC/CN=Mariusz Mamonski
    ProxyLifetime = 23 Days 11 Hours 53 Minutes 14 Seconds
    Tue Oct  9 18:42:54 CEST 2012
  • when jobs is finished the outputs should be in the directory from where you submitted your job:
    $ cat output.txt 
    Tue Oct  9 18:42:54 CEST 2012
    Tue Oct  9 18:43:24 CEST 2012
    Tue Oct  9 18:43:54 CEST 2012

MUSCLE job example

#QCG name=SimpleExamples
#QCG walltime=PT14H

#QCG stage-in-file=SimpleExample.cxa.rb

#QCG application=muscle2
#QCG argument=SimpleExample.cxa.rb

#QCG stage-out-dir=. -> results-${JOB_ID}
#QCG output=output-${JOB_ID}.txt
#QCG error=output-${JOB_ID}.txt

Interactive jobs

With QCG it is possible to start an interactive session with any of the PL-Grid clusters. You can use it to compile your application or to perform some debug runs. Example script:

#QCG walltime=PT3H


Example interactive session:

$ qcg-interactive interactive-reef.qcg
UserDN = /C=PL/O=GRID/O=PSNC/CN=Mariusz Mamonski
ProxyLifetime = 20 Days 2 Hours 28 Minutes 44 Seconds

jobId = J1350912281097__5242
Press Ctrl-C to cancel the task
Interactive session started. Use the 'exit' command to quit.
[r473] /home/plgrid/plgmamonski/reef/J1350912281097__5242_task_1350912283206_133 > module load muscle2
 plgrid/tools/java/jdk1.6.0_23 load complete.
 intel/10.1 load complete.
 'plgrid/tools/openmpi/current' load complete.
[r473] /home/plgrid/plgmamonski/reef/J1350912281097__5242_task_1350912283206_133 > muscle2  --cxa /home/plgrid-groups/plggmuscle/2.0/devel-debug/share/muscle/examples/cxa/SimpleExample.cxa.rb --main r w 
Running both MUSCLE2 Simulation Manager and the Simulation
=== Running MUSCLE2 Simulation Manager ===

Other valid #host values:

  • (Cyfronet),
  • (TASK),
  • (ICM),
  • (PSNC),
  • (PSNC).

Further reading