I'm very new to HPC and I'd prefer to run CONN as much as possible through the GUI. If I understand it correctly, "conn remotely" seems like the perfect solution!
I have SSH access to a login node and I've already got Matlab 2024b and spm/conn installed and tested. The HPC uses Slurm.
According to my HPC cluster instructions, I need to add some modules each time I start Matlab:
ml add PDC; ml matlab/r2024b
And then I should run Matlab on a processing node, not on the login node. (https://support.pdc.kth.se/doc/applicati...). I guess this means that there needs to be an salloc command and then an SSH to a processing node before starting Matlab?
I've tried to modify my connserver.json file accordingly:
Requesting a new Matlab session in XXXXX@dardel.pdc.kth.se. This may take a few minutes, please be patient as your job currently sits in a queue. CONN will resume automatically when the new Matlab session becomes available
Hi Daniel,
If I am understanding correctly your HPC specifications, you should simply add the line:
ml add PDC; ml matlab/r2024b
to the "in-file" submit options of your Slurm profile in the HPC server. Once you have the HPC settings correctly configured in the server, when you use conn remotely to connect to that server, CONN will automatically start a processing node and have Matlab run in that node instead of in the login node. See the instructions in https://web.conn-toolbox.org/resources/h... for details, and let me know if you run into any issues
Alfonso
Originally posted by Daniel Simon:
I'm very new to HPC and I'd prefer to run CONN as much as possible through the GUI. If I understand it correctly, "conn remotely" seems like the perfect solution!
I have SSH access to a login node and I've already got Matlab 2024b and spm/conn installed and tested. The HPC uses Slurm.
According to my HPC cluster instructions, I need to add some modules each time I start Matlab:
ml add PDC; ml matlab/r2024b
And then I should run Matlab on a processing node, not on the login node. (https://support.pdc.kth.se/doc/applicati...). I guess this means that there needs to be an salloc command and then an SSH to a processing node before starting Matlab?
I've tried to modify my connserver.json file accordingly:
{
"host": "dardel.pdc.kth.se",
"CONNcmd": "ml add PDC; ml matlab/r2024b; matlab -singleCompThread -nodesktop -noFigureWindows -nosplash -r \"addpath 'XXXXX/MATLAB/spm'; addpath 'XXXXX/MATLAB/conn'; conn %s; exit\"",
"SERVERcmd": "Slurm",
"SERVERpersistent": false
}
When I try to run "conn remotely" from my local computer, I get this response and then it just stops indefinitely:
Reading configuration information from XXXX@dardel.pdc.kth.se:~/connserverinfo.json to /Users/XXXXX/.conn_cache/conncache_3624ea761c68e03153b81f9752db03e7
Requesting a new Matlab session in XXXXX@dardel.pdc.kth.se. This may take a few minutes, please be patient as your job currently sits in a queue. CONN will resume automatically when the new Matlab session becomes available
As I said, I'm very new to this type of computing. I'm comfortable on the command line, but I'd really (really!) rather make this whole process as GUI-based as possible.
Advice, please!
I'm running Matlab locally on an M2 mac, Matlab R2024b update 5, CONN 22v2407, SPM 25.01
Hi Alfonso!
I've got the system running fine over ThinLinc with a remote desktop on the server. The in-line "ml add PDC; ml matlab/r2024b" helped a lot there! Thanks!
But I still can't get "conn remotely" to work. I tried adding the in-line command to my local AND remote HPC "Slurm computer cluster" settings. But I'm still stuck at this line:
Requesting a new Matlab session in rasimon@dardel.pdc.kth.se. This may take a few minutes, please be patient as your job currently sits in a queue. CONN will resume automatically when the new Matlab session becomes available
Do you have any suggestions on how to debug at this point? When I run the Matlab GUI on the HPC (e.g., through ThinLinc), I need to run (something like) this command first:
salloc --ntasks=2 -t 1:00:00 -A naiss2025-22-549 -p shared --qos=normal
...where -A naiss2025-22-549 is required for my account, and then SSH -X into the node where I have allocated space to run Matlab.
Hello again, Alfonso...
I've recently learned that my HPC will absolutely not allow conn remotely since the secure node requires a two-step login process. If I go that route I'll have to use ThinLinc (which I've already got working nicely).
But I'd still like to explore conn remotely with a local network. I have two ARM Macs running Conn: the local computer is running Matlab+Conn and the "server" is running a custom-built conn22v2407 standalone (using the built-in build script on R2024b).
When I try to use conn remotely, I get the following log in my Matlab command window:
>> conn remotely
Server address [local]: 192.168.1.170
Username [dansi08]:
Connecting to dansi08@192.168.1.170... ;
(dansi08@192.168.1.170) Password:
Reading configuration information from dansi08@192.168.1.170:~/connserverinfo.json to
/Users/dansi08/.conn_cache/conncache_51dc18fa3d0d10e8c4ac02774e5a3637
Requesting a new Matlab session in dansi08@192.168.1.170. This may take a few minutes,
please be patient as your job currently sits in a queue. CONN will
resume automatically when the new Matlab session becomes
available
Remote session started:
Host address = mac00771
Access port = 49781
ID = privatekey
Log folder =
/Users/dansi08/.qlog/250416150100726
Establishing secure communication path to remote session
(59892:mac00771:49781)
Connecting to localhost:59892...
Unable to send TCP packet (possibly unresponsive
server)
Unable to send TCP packet (possibly unresponsive
server)
Unable to send TCP packet (possibly unresponsive
server)
Unable to send TCP packet (possibly unresponsive
server)
Unable to send TCP packet (possibly unresponsive
server)
Unable to send TCP packet (possibly unresponsive
server)
Communication failure. Try again at a later time
Unable to send TCP packet (possibly unresponsive
server)
Unable to connect to remote CONN session
Unable to send TCP packet (possibly unresponsive
server)
Unable to send TCP packet (possibly unresponsive
server)
You can see the associated .qlog folder in the attached .tgz file. Firewalls are disabled on both computers.
Can you give some advice on how to proceed?
I CAN run the full Matlab+Conn on the target/server computer, but I'd really rather not use one of my university licenses on this computer.
Thanks in advance!
Hi Daniel,
That's curious, the logs indicate that everything seems to be working fine yet the connection is never stablished. I think this may indicate some permissions issue related to having either the CONN standalone or Matlab RunTime apps running on the server computer needing permission to access the network and listen to ports. I will try to replicate this scenario to see if that brings some light into this and will let you know what I can find out.
Oh, and regarding 2FA in my only-one-sample-case experience that works just fine, when connecting using ssh to a login node that initiates a request to authenticate using your second factor and if that completes without a problem the ssh connection is accepted, otherwise it is not. When using CONN to connect remotely the same process is initiated and as long as you complete the authentication process CONN connection will proceed normally. In any case, I will be happy to learn in ways that this does NOT work to try to make CONN procedure more robust, so please let me know your experience.
Best
Alfonso
Originally posted by Daniel Simon:
Hello again, Alfonso...
I've recently learned that my HPC will absolutely not allow conn remotely since the secure node requires a two-step login process. If I go that route I'll have to use ThinLinc (which I've already got working nicely).
But I'd still like to explore conn remotely with a local network. I have two ARM Macs running Conn: the local computer is running Matlab+Conn and the "server" is running a custom-built conn22v2407 standalone (using the built-in build script on R2024b).
When I try to use conn remotely, I get the following log in my Matlab command window:
>> conn remotely
Server address [local]: 192.168.1.170
Username [dansi08]:
Connecting to dansi08@192.168.1.170... ;
(dansi08@192.168.1.170) Password:
Reading configuration information from dansi08@192.168.1.170:~/connserverinfo.json to /Users/dansi08/.conn_cache/conncache_51dc18fa3d0d10e8c4ac02774e5a3637
Requesting a new Matlab session in dansi08@192.168.1.170. This may take a few minutes, please be patient as your job currently sits in a queue. CONN will resume automatically when the new Matlab session becomes available
Remote session started:
Host address = mac00771
Access port = 49781
ID = privatekey
Log folder = /Users/dansi08/.qlog/250416150100726
Establishing secure communication path to remote session (59892:mac00771:49781)
Connecting to localhost:59892...
Unable to send TCP packet (possibly unresponsive server)
Unable to send TCP packet (possibly unresponsive server)
Unable to send TCP packet (possibly unresponsive server)
Unable to send TCP packet (possibly unresponsive server)
Unable to send TCP packet (possibly unresponsive server)
Unable to send TCP packet (possibly unresponsive server)
Communication failure. Try again at a later time
Unable to send TCP packet (possibly unresponsive server)
Unable to connect to remote CONN session
Unable to send TCP packet (possibly unresponsive server)
Unable to send TCP packet (possibly unresponsive server)
You can see the associated .qlog folder in the attached .tgz file. Firewalls are disabled on both computers.
Can you give some advice on how to proceed?
I CAN run the full Matlab+Conn on the target/server computer, but I'd really rather not use one of my university licenses on this computer.
Thanks in advance!
Hi Daniel,
Try adding the same options (chiefly the "-A naiss2025-22-549" option) to the "in-line" options of your HPC configuration Slurm profile. In general, I would debug this by first making sure that the HPC functionality works without a problem before testing the remote connection functionality. To do this, simply connect to your institution using ThinLinc, open CONN there, go to "HPC configuration" and test your Slurm profile using the "test profile" button (and checking the logs and debugging if necessary) until that works fine. Once that test works correctly, the conn remotely functionality to connect to the server will have one less potential problem to run into (and I think it should work fine without any additional issues)
Hope this helps
Alfonso
Originally posted by Daniel Simon:
Hi Alfonso!
I've got the system running fine over ThinLinc with a remote desktop on the server. The in-line "ml add PDC; ml matlab/r2024b" helped a lot there! Thanks!
But I still can't get "conn remotely" to work. I tried adding the in-line command to my local AND remote HPC "Slurm computer cluster" settings. But I'm still stuck at this line:
Requesting a new Matlab session in rasimon@dardel.pdc.kth.se. This may take a few minutes, please be patient as your job currently sits in a queue. CONN will resume automatically when the new Matlab session becomes available
Do you have any suggestions on how to debug at this point? When I run the Matlab GUI on the HPC (e.g., through ThinLinc), I need to run (something like) this command first:
salloc --ntasks=2 -t 1:00:00 -A naiss2025-22-549 -p shared --qos=normal
...where -A naiss2025-22-549 is required for my account, and then SSH -X into the node where I have allocated space to run Matlab.