You may use the the ecinteractive tool to open interactive sessions with dedicated resources on the HPCF and ECS.
...
- Only one interactive job is allowed at a time
- Your job keeps on running after you exit the interactive shell, so you can reattach to it any time or open multiple interactive shells within the same job.
- You may open a basic graphical desktop for X11 applications.
- You may open a Jupyter Lab instance and connect to it through your browser., although use of JupyterHub is recommended instead.
- If running on the HPCF platform, your interactive job may be scheduled to any of the four complexes. You may also choose to run on ECSBy default it will submit to the local cluster, or AA if run from the Linux VDI, although you can choose what complex (platform) to use.
- You can run ecinteractive from any Atos HPCF complex, ECS, and Red Hat Linux VDI. You may also copy the script to your end user device and use it from there. It should work from Linux, Mac, or WSL under windows, and requires the Teleport tsh client to be installed and configured.
No Format |
---|
$ ecinteractive -h Usage : /usr/local/bin/ecinteractive [options] [--] -d|desktop Submits a vnc job (default is interactive ssh job) -j|jupyter Submits a jupyter job (default is interactive ssh job) -J|jupyters Submits a jupyter job with HTTPS support (default is interactive ssh job) More OptionsMore Options: -h|help Display this message -v|version Display script version -p|platform Platform (default aahpc. Choices: aahpc, ab, ac, ad, ecs) -u|user ECMWF User (default userusxa) -A|account Project account -c|cpus Number of CPUs (default 2) -m|memory Requested Memory (default 8G8 GB) -s|tmpdirsize Requested TMPDIR size (default 3 GB) -tg|timegpu WallRequest clocka limitGPU (default 12:00:00limited availability) -kt|killtime CancelWall anyclock runninglimit interactive job(default 12:00:00) -qf|queryforward Ports Check running jobto forward, comma separated (default NONE) -Qe|quietexport Environment Silent mode -o|outputvariables to export, comma separated (default NONE) -k|kill Output fileCancel forany therunning interactive job (default /dev/null) -xq|query Check running job -Q|quiet Silent mode set -x -o|output Output file for the interactive job (default /dev/null) -x set -x |
Note | ||
---|---|---|
| ||
Note | ||
| ||
For ecinteractive to work properly, passwordless ssh must be configured between Atos HPCF nodes. See HPC2020: How to connect for more information on how to set it up. |
...
You can get an interactive shell running on an allocated node within the Atos HCPF with just calling ecinteractive. By default it will just use the default settings which are:
...
Jobs will be submitted in either of these queues depending on if the user has access to the full HPC service (ni queue, for Member State users) or the ECS service (ei queue, for co-operating States, as service previously known as ECGATE) with the following default and maximum resource levels.
Multiexcerpt include MultiExcerptName ecinteractive PageWithExcerpt UDOC:HPC2020: Batch system
...
If you need more resources, you may use the ecinteractive options when creating the job. For example, to get a shell with 4 cpus and 16 GB or memory for 12 hours:
...
No Format |
---|
[user@aa6-100 ~]$ ecinteractive -k cancelling job 10225018... CLUSTER JOBID STATE EXEC_HOST TIME_LIMIT TIME_LEFT MAX_CPUS MIN_MEMORY TRES_PER_NODE aa 10225018 RUNNING aa6-104 12:00:00 11:55:34 4 16G ssdtmp:3G Cancel job_id=10225018 name=user-ecinteractive partition=inter [y/n]? y Connection to aa-login closed.y Connection to aa-login closed. |
Customising ecinteractive default resources
You may override the program defaults if you always create your ecinteractive sessions with specific resource requirements by defining them in ~/.ecinteractiverc
. Here is a sample file with default values that may be used as a starting point:
Code Block | ||||
---|---|---|---|---|
| ||||
#Platform may be hpc or ecs
PLATFORM=hpc
# Number of CPUs
NCPUS=2
# Memory in GB
MEMORY=8
# TMPSIZE includes the SSDTMPDIR space
TMPSIZE=3
# Wall clock time limit for the session, in any valid SLURM time specification
TIME="12:00:00" |
You don't need to define all the parameters, you may only define those you wish to change in respect to program defaults.
Info | ||
---|---|---|
| ||
Command line options always take precedence over default values, so you can always override those on specific invocations of ecinteractive with the required command line options. |
Visual Studio Code integration
If you are a Visual Studio Code (VSCode) user, it is possible to use its Remote SSH extension to connect to your ecinteractive session instead of the login node to enjoy dedicated interactive resources.
Prerequisites
In order for this to work, you will need to have ecinteractive available on the platform where you run VSCode. If you are using your own computer, you need to follow these steps:
- Download the latest ecinteractive tool. Mac, and WSL are supported:
Once you have it, you can always make sure it is up to date running:No Format curl -so ecinteractive https://git.ecmwf.int/projects/USS/repos/ecinteractive/raw/ecinteractive chmod +x ecinteractive
No Format ./ecinteractive -U
- Make sure Teleport is properly configured for you to be able to connect via ssh to our HPCF or ECS.
No installation is required if you are using VSCode and ecinteractive from the Linux VDI, as they are both available.
Setup
You will need to make sure the following snippet is at the top of your ~/.ssh/config
on the platform where you run VScode itself:
Code Block | ||||
---|---|---|---|---|
| ||||
# ecinteractive dynamic host
Include ecinteractive_ssh_config |
With that in place, every time you run ecinteractive from this platform, a file ~/.ssh/
ecinteractive_ssh_config
will be created or updated, defining a host alias "ecinteractive
" pointing to the actual host running your interactive session.
Connecting VSCode to ecinteractive session
Whenever you want to use VSCode on your interactive session, you will need to run the ecinteractive
command with the desired options from a separate terminal at least once, so that the "ecinteractive
" host alias points to the right host. An example with default options to just update the host alias could be:
No Format |
---|
ecinteractive : |
On VScode, a new host called ecinteractive
will appear in your remote host list. If you select that one, a vscode remote session will be started using the resources from your ecinteractive
session.
Info | ||
---|---|---|
| ||
Remember that if your ecinteractive session expires or you kill it, you will need to rerun ecinteractive from the same platform where you run VSCode before you can use that connection again |
Opening graphical applications within your interactive job
...
Excerpt | |||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Opening a Jupyter Lab instance
To use your own conda environment as a kernel for Jupyter notebook you will need to have ipykernel installed in the conda environment before starting ecinteractive job. ipykernel can be installed with:
The same is true if you want to make your own Python virtual environment visible in Jupyterlab
To remove your personal kernels from Jupyterlab once you don't need them anymore, you could do so with:
HTTPS accessIf you wish to run Juptyer Lab on HTTPS instead of plain HTTP, you may use the In order to avoid browser security warnings, you may fetch the Customising your jupyter version and environmentBy default, ecinteractive will start the jupyterlab coming from the default version of python 3. If you wish to customise the version of python or jupyterlab, or simply want to tailor its environment in your ecinteractive session, create the following file in your Atos HPCF HOME:
Then add in it the commands needed to set up the environment so that the jupyter and node commands can be found in the path. This would be equivalent to the default behaviour:
Examples of contents for |
Code Block | ||||
---|---|---|---|---|
| ||||
module load python3/new node/new |
Code Block | ||||
---|---|---|---|---|
| ||||
module load conda conda activate myjupyterenv |
...