Introduction

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: qcg.man.poznan.pl. You can log in there using your PL-Grid account:

ssh plg[your-id]@qcg.man.poznan.pl

Preparing credentials

  1. Copy your credentials (PKCS12 keystore) to the qcg machine:
    scp plg[your-id].p12 plg[your-id]@qcg.man.poznan.pl:~/
    
  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 host=zeus.cyfronet.pl
    #QCG output=output.txt
    #QCG error=error.txt
    
    /bin/hostname
    date
    sleep 30
    date
    sleep 30
    date
    
    
  • job submission:
    $qcg-sub hostname.qcg 
    https://elder6.man.poznan.pl:8443/qcg/services/
    /C=PL/O=GRID/O=PSNC/CN=qcg-broker/qcg-broker.man.poznan.pl
    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:
    $qcg-list 
    https://elder6.man.poznan.pl:8443/qcg/services/
    /C=PL/O=GRID/O=PSNC/CN=qcg-broker/qcg-broker.man.poznan.pl
    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
    https://elder6.man.poznan.pl:8443/qcg/services/
    /C=PL/O=GRID/O=PSNC/CN=qcg-broker/qcg-broker.man.poznan.pl
    UserDN = /C=PL/O=GRID/O=PSNC/CN=Mariusz Mamonski
    ProxyLifetime = 23 Days 11 Hours 52 Minutes 53 Seconds
    
    Note: 
    TaskType: SINGLE
    SubmissionTime: Tue Oct 09 18:42:21 CEST 2012
    FinishTime: 
    ProxyLifetime: P23DT11H52M51S
    Status: RUNNING
    StatusDesc: 
    StartTime: Tue Oct 09 18:42:21 CEST 2012
    
    Allocation: 
    HostName: zeus.cyfronet.pl
    ProcessesCount: 1
    ProcessesGroupId: 
    Status: RUNNING
    StatusDescription: 
    SubmissionTime: Tue Oct 09 18:42:21 CEST 2012
    FinishTime: 
    LocalSubmissionTime: Tue Oct 09 18:42:24 CEST 2012
    LocalStartTime: Tue Oct 09 18:42:54 CEST 2012
    LocalFinishTime: 
    
    
  • peek job output when its running:
    $  qcg-peek J1349800941529__3789
    https://elder6.man.poznan.pl:8443/qcg/services/
    /C=PL/O=GRID/O=PSNC/CN=qcg-broker/qcg-broker.man.poznan.pl
    UserDN = /C=PL/O=GRID/O=PSNC/CN=Mariusz Mamonski
    ProxyLifetime = 23 Days 11 Hours 53 Minutes 14 Seconds
    
    n1-3-12.local
    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 
    n1-3-12.local
    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 host=zeus.cyfronet.pl
#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 host=inula.man.poznan.pl
#QCG walltime=PT3H

/bin/bash

Example interactive session:

$ qcg-interactive interactive-reef.qcg 
https://qcg-broker.man.poznan.pl:8443/qcg/services/
/C=PL/O=GRID/O=PSNC/CN=qcg-broker/qcg-broker.man.poznan.pl
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:

  • zeus.cyfronet.pl (Cyfronet),
  • galera.task.gda.pl (TASK),
  • hydra.icm.edu.pl (ICM),
  • reef.man.poznan.pl (PSNC),
  • inula.man.poznan.pl (PSNC).

Further reading

Attachments