# CCHMC cluster

#### Start a job on a given host

```
rmlog
bash ../submit.sh -m 120000 -n 4 -p "Rscript temp.R" -h "bmi-460g9-08"
```

#### Code for submit.sh

```
while getopts n:m:p:h: flag
do
    case "${flag}" in
        n) nThread=${OPTARG};;
        m) memory=${OPTARG};;
        p) cmd=${OPTARG};;
        h) hosts=${OPTARG};;
    esac
done
echo "number of thread: $nThread";
echo "memory: $memory"
echo "command is:$cmd"

bsub -m "$hosts" -M $memory -n $nThread -W 120:00 -R "span[hosts=1]" \
-J jason -o /users/yanv5j/logs/%J.out -e /users/yanv5j/logs/%J.err \
"$cmd"
```

#### Code for submit\_gpu.sh

```
while getopts n:m:p: flag
do
    case "${flag}" in
        n) nThread=${OPTARG};;
        m) memory=${OPTARG};;
        p) cmd=${OPTARG};;
    esac
done
echo "number of thread: $nThread";
echo "memory: $memory"
echo "command is:$cmd"

bsub -M $memory -n $nThread -W 120:00 -R "span[hosts=1]" -gpu "num=$nThread" -q "gpu-v100" \
-J jason -o /users/yanv5j/logs/%J.out -e /users/yanv5j/logs/%J.err \
"$cmd"
```

#### Code for HPC alias

```
alias bmi='ssh yanv5j@bmiclusterp.chmcres.cchmc.org'
alias gohpc='bsub -m "bmi-460g9-[0-1][1-9]" -W 3:00 -M 96000 -n 1 -Is bash'
alias gogpu='bsub -W 3:00 -M 96000 -n 1 -gpu "num=1" -q "gpu-v100" -Is bash'
alias rmlog='rm ~/logs/*'
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://juechen-yang.gitbook.io/juechen-s-codebook/cchmc-cluster.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
