Skip to content
Snippets Groups Projects
Commit 6e0af0a4 authored by Fabio Hernandez's avatar Fabio Hernandez
Browse files

Add examples

parent ea8edf78
No related branches found
No related tags found
No related merge requests found
# README
In this directory you will find examples on how to use ARC6 clients packaged in this repository.
For the purposes of these examples, we assume that the URL of the ARC6 endpoint is pointed to by the environmental variable `ARC_CE`. At CC-IN2P3, the value of that variable can be set to the LSST ARC computing element, i.e.
```bash
$ export ARC_CE='https://ccarccelsst01.in2p3.fr:9443/arex'
```
## Acquire a VOMS proxy
To interact with the ARC computing element you must be authenticated as a member of a virtual organization (VO). To acquire a proxy as a member of the LSST VO use the command:
```bash
$ voms-proxy-init --voms lsst
```
You can inspect the acquired proxy and ensure it was delivered to you as a member of the LSST VO with the command
```bash
$ voms-proxy-info --all
...
=== VO lsst extension information ===
VO : lsst
...
```
## Submit, query and retreive the results of a canned job
The [ARC6 client tools](https://www.nordugrid.org/arc/arc6/users/client_tools.html) include with some job descriptions that you can use for testing purposes. For instance, the command [`arctest`](https://www.nordugrid.org/arc/arc6/users/client_tools.html#arctest) can be used to submit a simple job which executes `/usr/bin/env`. Use the command below to submit your job:
```bash
$ arctest -J 2 -C $ARC_CE
Job submitted with jobid: https://ccarccelsst01.in2p3.fr:9443/arex/3GPKDm1QWz0n3NnJ7oI0cbupABFKDmABFKDmbRGKDmEBFKDm9PJd5n
```
After successful submission, you can query the status of the job:
```bash
$ arcstat https://ccarccelsst01.in2p3.fr:9443/arex/3GPKDm1QWz0n3NnJ7oI0cbupABFKDmABFKDmbRGKDmEBFKDm9PJd5n
Job: https://ccarccelsst01.in2p3.fr:9443/arex/3GPKDm1QWz0n3NnJ7oI0cbupABFKDmABFKDmbRGKDmEBFKDm9PJd5n
Name: arctest2
State: Accepted
Status of 1 jobs was queried, 1 jobs returned information
```
To display the `stdout` of your job, even if it has not yet finished its execution, do:
```bash
$ arccat https://ccarccelsst01.in2p3.fr:9443/arex/3GPKDm1QWz0n3NnJ7oI0cbupABFKDmABFKDmbRGKDmEBFKDm9PJd5n
SLURM_NODELIST=ccwslurm0001
SLURM_JOB_NAME=arctest2
...
```
When your job has finished its execution, you can download the `stdout` of your job to a directory under `$TMPDIR` with the command below:
```bash
$ arcget -D $TMPDIR https://ccarccelsst01.in2p3.fr:9443/arex/3GPKDm1QWz0n3NnJ7oI0cbupABFKDmABFKDmbRGKDmEBFKDm9PJd5n
Results stored at: /dev/shm/fabio/tmp/3GPKDm1QWz0n3NnJ7oI0cbupABFKDmABFKDmbRGKDmEBFKDm9PJd5n
Jobs processed: 1, successfully retrieved: 1, successfully cleaned: 1
```
## Submit, query and retreive your own jobs
The command [`arcsub`](https://www.nordugrid.org/arc/arc6/users/client_tools.html#arcsub) allows you to submit a job given its description. One of the job description languages supported by ARC6 is the **extended Resource Specification Language (xRSL)**, described [here](https://www.nordugrid.org/arc/arc6/users/xrsl.html). We will be using that language to describe the jobs we use in these examples.
To submit a job which will execute `/usr/bin/env` and store its results in file `stdout` we can use the description included in file `arc-env.xrsl`:
```bash
$ cat arc-env.xrsl
&( executable = "/usr/bin/env" )
( jobname = "arc-env-flash" )
( queue = "flash" )
( stdout = "stdout" )
( join = "yes" )
( gmlog = "gmlog" )
$ arcsub -C $ARC_CE arc-env.xrsl
Job submitted with jobid: https://ccarccelsst01.in2p3.fr:9443/arex/lJPNDmDMZz0n3NnJ7oI0cbupABFKDmABFKDmbRGKDmFBFKDmAQSF3n
```
\ No newline at end of file
&( executable = "/usr/bin/env" )
( queue = "flash" )
( jobname = "arc-env-flash" )
( stdout = "stdout" )
( join = "yes" )
( gmlog = "gmlog" )
......@@ -8,4 +8,5 @@ tar -zcvf arc6-client.tar.gz \
*.repo \
voms* \
lsst-voms* \
*.sif
\ No newline at end of file
*.sif \
examples
\ No newline at end of file
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