Python and Fortran languages servers in VS Code not working after using cylc/rose/persistent-sessions

Dear community

I am seeking help about python and Fortran languages servers in VS Code (no syntax highlighting after using persistent sessions two weeks ago). I already posted two issues on pylance and remote-ssh github pages. After discussion with a pylance developer, we think the problem may be with my use of persistent-session while running ACCESS-rAM3 using cylc/rose.

The main problem is that I cannot have syntax highlighting for python and fortran files from two weeks ago as shown in the attached figure (I can have syntax highlighting on another remote host, but not gadi with another computer:). That was the time when I started to use persistent-session/cylc/rose to run ACCESS-rAM3. I am not really sure why this occurs, but after many failed attempts (Reinstall VS Code/all extensions/python conda environment, Remove remote .vscode and .vscode-server folders, Reset all python-extension-related settings, and everything I can find on google), I started to think this is a problem with X11 forwarding or localhost that is widely used while running ACCESS-rAM3. If you have met similar problems, or have any idea about underlying mechanisms of the persistent session, please let me know.

Hi @qinggangg , Thanks for reaching out to ACCESS-NRI. Your specific question is outside the topics that ACCESS-NRI officially supports. However, there may be a community member who can help you with your question.

Hi @harshula Thank you, I fully understand.

It would be greatly appreciated if anyone could provide some information about the use of localhost/X11 forwarding by persistent-session/rose/cylc.

Could you clarify why you think the persistent session is involved? Are you trying to run vscode on the persistent session?

As I understand it there’s a special compute node on Gadi that runs everyone’s persistent session, with some DNS magic to set up the ssh.

Hi Scott. Thank you for having a look. I am not running VS Code on persistent session. I only run ACCESS-rAM3 on persistent session before, and now I killed all persistent-session and deleted the folder ~/persistent-session. However, the problem with language servers in VS code persists.

I thought it may be the problem with localhost, which is used by rose/cylc while running simulations and also VS Code while starting a remote session. Is persistent session also using localhost? Does rose/cylc modify any thing about localhost permanently (e.g. memory usage/limit)?

No that is unrelated. ‘localhost’ is an alias that refers to the node that a process is running on. For vscode running on a login node, localhost will be that login node. For cylc running on the persistent session, localhost will be the persistent session node.

Thank you. That is good for me to know.