Skip to content

Commit

Permalink
Update documentation to make sure the correct cplex option file is us…
Browse files Browse the repository at this point in the history
…ed on the HPC.
  • Loading branch information
tgraulich authored Dec 19, 2024
1 parent a00620c commit f0215f2
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ Remember to study the log report after your job finishes, so you can be more acc

After having transferred our Balmorel model through WinSCP (see [previous page](access.md)), we need to submit a job. This means creating a job script that asks for the right amount of memory usage and time before completion. This is done through a job script, illustrated in the code snippet below. We refer to [this general guide](https://www.hpc.dtu.dk/?page_id=1416) by DTU Computing Center for the exact explanations of the different elements. Note that the paths in the `export` commands are specific to our setup at DTU's clusters.

The bottom commands assumes that the job script is submitted from inside your Balmorel folder, and that your Balmorel project contains a "scenario1" scenario - see [how to create new scenarios](../get_started/scenario_setup.md). The `--threads=$LSB_DJOB_NUMPROC` command makes sure that Balmorel does not use more cores than defined in your job script (four in this case, due to `#BSUB -n 4`)
The bottom commands assumes that the job script is submitted from inside your Balmorel folder, and that your Balmorel project contains a "scenario1" scenario - see [how to create new scenarios](../get_started/scenario_setup.md). The `threads=$LSB_DJOB_NUMPROC` command makes sure that Balmorel does not use more cores than defined in your job script (four in this case, due to `#BSUB -n 4`)
:::{warning}
Please make sure to switch to the solver options file `cplex.op2`, by going into the `balgams.opt` file and setting `$Setglobal USEOPTIONFILE 2`. Otherwise CPLEX will overwrite the number of chosen threads and will ue more resources than requested.
:::
```bash
#!/bin/sh
### General options
Expand Down Expand Up @@ -48,7 +51,7 @@ export LD_LIBRARY_PATH=/appl/gams/47.6.0:$LD_LIBRARY_PATH
# Go to model folder of your scenario - this assumes that the job script is at the same level of the Balmorel folder
cd scenario1/model
# Run Balmorel
gams Balmorel --threads=$LSB_DJOB_NUMPROC
gams Balmorel threads=$LSB_DJOB_NUMPROC
```

## Submitting the Job from PuTTY
Expand Down

0 comments on commit f0215f2

Please sign in to comment.