Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Canfar job limit #9

Merged
merged 12 commits into from
Feb 11, 2024
24 changes: 21 additions & 3 deletions docs/source/canfar.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,28 @@ it is recommended to perform some or all of the testing steps (1. - 4.).

## Monitoring


### Status and output of submitted job

Monitoring of the currently active remote session can be performed using the session IDs `session_IDs.txt` written by the
remote session script `curl_canfar_local.sh`. In the patch main directory, run
```bash
curl_canfar_monitor.sh events
```
to display the remotely started docker image status, and
```bash
curl_canfar_monitor.sh logs
```
to print `stdout` of the remotely run pipeline script, and
to print `stdout` of the remotely run pipeline script.

### Number of submitted running jobs

The script
```bash
curl_canfar_monitor.sh events
stats_headless_canfar.py
```
to display the remotely started docker image status.
returns the number of actively running headless jobs.


## Post-hoc summary

Expand All @@ -74,3 +86,9 @@ In the patch main directory, run
summary_run PATCH
```
to print a summary with missing image IDs per job and module.

## Deleting jobs

```bash
for id in `cat session_IDs.txt`; do echo $id; curl -X DELETE -E /arc/home/kilbinger/.ssl/cadcproxy.pem https://ws-uv.canfar.net/skaha/v0/session/$id; done
```
1 change: 1 addition & 0 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ dependencies:
- PyQt5
- pyqtgraph
- reproject
- skaha
- sip_tpv
- sf_tools
- sqlitedict
Expand Down
4 changes: 3 additions & 1 deletion example/cfis/config_Gie_vos.ini
Original file line number Diff line number Diff line change
Expand Up @@ -98,4 +98,6 @@ RETRIEVE = vos
N_TRY = 3

# Retrieve command options, optional
RETRIEVE_OPTIONS = --certfile=$VM_HOME/.ssl/cadcproxy.pem
RETRIEVE_OPTIONS = --certfile=$HOME/.ssl/cadcproxy.pem

CHECK_EXISTING_DIR = $SP_RUN/data_exp
4 changes: 2 additions & 2 deletions example/cfis/config_GitFeGie_vos.ini
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ OUTPUT_FILE_PATTERN = CFIS_image-, CFIS_weight-
RETRIEVE = vos

# Copy command options, optional
RETRIEVE_OPTIONS = --certfile=$VM_HOME/.ssl/cadcproxy.pem
RETRIEVE_OPTIONS = --certfile=$HOME/.ssl/cadcproxy.pem

CHECK_EXISTING_DIR = $SP_RUN/output/run_sp_Git/get_images_runner_run_1/output

Expand Down Expand Up @@ -152,4 +152,4 @@ RETRIEVE = vos
N_TRY = 3

# Retrieve command options, optional
RETRIEVE_OPTIONS = --certfile=$VM_HOME/.ssl/cadcproxy.pem
RETRIEVE_OPTIONS = --certfile=$HOME/.ssl/cadcproxy.pem
105 changes: 105 additions & 0 deletions example/cfis/config_GitFe_symlink.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
# ShapePipe configuration file for: get images and find exposures


## Default ShapePipe options
[DEFAULT]

# verbose mode (optional), default: True, print messages on terminal
VERBOSE = False

# Name of run (optional) default: shapepipe_run
RUN_NAME = run_sp_GitFe

# Add date and time to RUN_NAME, optional, default: False
RUN_DATETIME = True


## ShapePipe execution options
[EXECUTION]

# Module name, single string or comma-separated list of valid module runner names
MODULE = get_images_runner, find_exposures_runner

# Parallel processing mode, SMP or MPI
MODE = SMP


## ShapePipe file handling options
[FILE]

# Log file master name, optional, default: shapepipe
LOG_NAME = log_sp

# Runner log file name, optional, default: shapepipe_runs
RUN_LOG_NAME = log_run_sp

# Input directory, containing input files, single string or list of names
INPUT_DIR = $SP_RUN

# Output directory
OUTPUT_DIR = $SP_RUN/output


## ShapePipe job handling options
[JOB]

# Batch size of parallel processing (optional), default is 1, i.e. run all jobs in serial
SMP_BATCH_SIZE = 1

# Timeout value (optional), default is None, i.e. no timeout limit applied
TIMEOUT = 96:00:00


## Module options

# Get tiles
[GET_IMAGES_RUNNER]

FILE_PATTERN = tile_numbers

FILE_EXT = .txt

# NUMBERING_SCHEME (optional) string with numbering pattern for input files
NUMBERING_SCHEME =

# Paths

# Input path where original images are stored. Can be local path or vos url.
# Single string or list of strings
INPUT_PATH = $SP_RUN/data_tiles, $SP_RUN/data_tiles

# Input file pattern including tile number as dummy template
INPUT_FILE_PATTERN = CFIS.000.000.r, CFIS.000.000.r.weight

# Input file extensions
INPUT_FILE_EXT = .fits, .fits.fz

# Input numbering scheme, python regexp
INPUT_NUMBERING = \d{3}\.\d{3}

# Output file pattern without number
OUTPUT_FILE_PATTERN = CFIS_image-, CFIS_weight-

# Copy/download method, one in 'vos', 'symlink'
RETRIEVE = symlink

# Copy command options, optional
RETRIEVE_OPTIONS = -L


[FIND_EXPOSURES_RUNNER]

INPUT_MODULE = get_images_runner

FILE_PATTERN = CFIS_image

FILE_EXT = .fits

# NUMBERING_SCHEME (optional) string with numbering pattern for input files
NUMBERING_SCHEME = -000-000

# Column number of exposure name in FITS header
COLNUM = 3

# Prefix to remove from exposure name
EXP_PREFIX = p
93 changes: 93 additions & 0 deletions example/cfis/config_Git_vos.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
# ShapePipe configuration file for: get images


## Default ShapePipe options
[DEFAULT]

# verbose mode (optional), default: True, print messages on terminal
VERBOSE = False

# Name of run (optional) default: shapepipe_run
RUN_NAME = run_sp_Git

# Add date and time to RUN_NAME, optional, default: False
RUN_DATETIME = True


## ShapePipe execution options
[EXECUTION]

# Module name, single string or comma-separated list of valid module runner names
MODULE = get_images_runner

# Parallel processing mode, SMP or MPI
MODE = SMP


## ShapePipe file handling options
[FILE]

# Log file master name, optional, default: shapepipe
LOG_NAME = log_sp

# Runner log file name, optional, default: shapepipe_runs
RUN_LOG_NAME = log_run_sp

# Input directory, containing input files, single string or list of names
INPUT_DIR = $SP_RUN

# Output directory
OUTPUT_DIR = $SP_RUN/output


## ShapePipe job handling options
[JOB]

# Batch size of parallel processing (optional), default is 1, i.e. run all jobs in serial
SMP_BATCH_SIZE = 1

# Timeout value (optional), default is None, i.e. no timeout limit applied
TIMEOUT = 96:00:00


## Module options

# Get tiles
[GET_IMAGES_RUNNER]

FILE_PATTERN = tile_numbers

FILE_EXT = .txt

# NUMBERING_SCHEME (optional) string with numbering pattern for input files
NUMBERING_SCHEME =

# Paths

# Input path where original images are stored. Can be local path or vos url.
# Single string or list of strings
INPUT_PATH = vos:cfis/tiles_DR5, vos:cfis/tiles_DR5

# Input file pattern including tile number as dummy template
INPUT_FILE_PATTERN = CFIS.000.000.r, CFIS.000.000.r.weight

# Input file extensions
INPUT_FILE_EXT = .fits, .fits.fz

# Input numbering scheme, python regexp
INPUT_NUMBERING = \d{3}\.\d{3}

# Output file pattern without number
OUTPUT_FILE_PATTERN = CFIS_image-, CFIS_weight-

# Copy/download method, one in 'vos', 'symlink'
RETRIEVE = vos

# If RETRIEVE=vos, number of attempts to download
# Optional, default=3
N_TRY = 3

# Copy command options, optional
RETRIEVE_OPTIONS = --certfile=$HOME/.ssl/cadcproxy.pem

CHECK_EXISTING_DIR = $SP_RUN/data_tiles
Loading
Loading