title: Using Pycharm on HPC node - qrsh and run command work around in sh script?
body: <p>I'm trying to get PyCharm to run on a worker node of a remote HPC cluster. I can only log in to the head node via SSH from PyCharm and from there would usually manually qrsh to a worker node before running the script on the terminal, but I'd like to be able to use the run/debug features of pycharm. I can't debug on my local computer as I'm on Windows and the software is running subprocesses that are for a Linux environment specifically.</p>
  
  <p>I can run via Pycharm using remote config but it would run using the head node. I asked PyCharm support who suggested setting an sh script as remote python interpreter (code I have below). However this hangs pycharm. Running the sh manually I can see that the python only executes after I exit the node and go back to the head node so presumably the next line will only execute on the original node the sh was run from and this is why PyCharm hangs.</p>
  
  <p>Is there any way of executing the python command on the node after qrsh from the script or is this sort of thing simply not possible?</p>
  
  <pre><code>#!/bin/sh
  qrsh 
  exec /path/to/bin/python3.7 $@
  </code></pre>