How to Port Bind an Interactive Transient PBS Session to the Head Node
Port binding an interactive transient PBS session to the head node allows you to access and control your job directly from the head node of a cluster. This can be useful when you need to interact with your job in real-time or perform tasks that require a graphical interface. In this article, we will walk you through the steps to port bind an interactive transient PBS session to the head node.
Step 1: Connect to the Head Node
To begin, you need to establish a connection to the head node of the cluster. You can use SSH (Secure Shell) to connect to the head node from your local machine. Open a terminal or command prompt and enter the following command:
ssh [email protected]
Replace username with your actual username and headnode.example.com with the hostname or IP address of the head node.
Step 2: Start an Interactive Transient PBS Session
Once you are connected to the head node, you can start an interactive transient PBS session. This session will allocate resources for your job and provide you with an interactive shell on the head node. Enter the following command:
qsub -I -l select=1:ncpus=1:mem=1gb:ngpus=0 -l walltime=1:00:00
This command requests one CPU core, 1GB of memory, and no GPUs for a maximum walltime of 1 hour. You can adjust these values based on your requirements.
Step 3: Port Bind the Session
Now that you have the interactive PBS session running, you need to port bind it to the head node. This will allow you to access the session from your local machine. In the terminal where you are connected to the head node, enter the following command:
qsub -I -X
This command enables X11 forwarding, which allows graphical applications to be displayed on your local machine. It will also bind the session to the head node.
Step 4: Access the Session
With the session port bound to the head node, you can now access it from your local machine. Open a new terminal or command prompt on your local machine and enter the following command:
ssh -Y [email protected]
Replace username with your actual username and headnode.example.com with the hostname or IP address of the head node.
Once connected, you can run graphical applications or command-line tools within the session, and the output will be displayed on your local machine.
Conclusion
Port binding an interactive transient PBS session to the head node allows you to conveniently access and control your job from your local machine. By following the steps outlined in this article, you should now be able to port bind your session and interact with it in real-time.
| Source | Link |
|---|---|
| Official PBS Documentation | https://www.example.com/pbs-documentation |
| SSH Documentation | https://www.example.com/ssh-documentation |