Hi,
I am trying to set up the aiida on my local workstation to submit jobs on remote HPC/clusters following the official document. But I am facing the following error when I am doing “verdi computer test localhost”.
Opening connection… Error: Error connecting to ‘localhost’ through SSH: [SshTransport] [Errno None] Unable to connect to port 22 on 127.0.0.1, connect_args were: {‘username’: ‘sahu’, ‘port’: 22, ‘look_for_keys’: False, ‘key_filename’: ‘’, ‘timeout’: 120, ‘allow_agent’: False, ‘proxy_jump’: ‘’, ‘proxy_command’: ‘’, ‘compress’: True, ‘gss_auth’: False, ‘gss_kex’: False, ‘gss_deleg_creds’: False, ‘gss_host’: ‘localhost’}
[FAILED]: Error while trying to connect to the computer
Full traceback:
Traceback (most recent call last):
File “/home/sahu/miniconda3/envs/aiida/lib/python3.11/site-packages/aiida/cmdline/commands/cmd_computer.py”, line 547, in computer_test
with transport:
File “/home/sahu/miniconda3/envs/aiida/lib/python3.11/site-packages/aiida/transports/transport.py”, line 128, in enter
self.open()
File “/home/sahu/miniconda3/envs/aiida/lib/python3.11/site-packages/aiida/transports/plugins/ssh.py”, line 516, in open
self._client.connect(self._machine, **connection_arguments)
File “/home/sahu/miniconda3/envs/aiida/lib/python3.11/site-packages/paramiko/client.py”, line 381, in connect
raise NoValidConnectionsError(errors)
paramiko.ssh_exception.NoValidConnectionsError: [Errno None] Unable to connect to port 22 on 127.0.0.1
Hi, do you have a SSH server installed on your localhost computer? In particular, if you run ssh localhost in a shell, are you able to connect? If not, you need first to install a SSH server (if you want to submit jobs to your own computer) and make sure you can connect without a password.
Did I understand correctly that you want to use AiiDA to submit to remote computers? Because in that case, you don’t want to setup localhost but that remote computer. For example, if the remote HPC machine is accessible at the hostname some.hpc.hostname, and you can SSH into it normally with ssh some.hpc.hostname it is this computer that you want to setup.
So you would do
verdi computer setup -T core.ssh --hostname some.hpc.hostname
and then you answer the other prompts.
Note that this will require that you have a passwordless SSH key that you can use to login to the remote.
Hi @sphuber, yes, you get it right. I want to use aiida to submit to remote computers (compute canada) from my lab workstation. More specifically, I want to build a workflow for my DFT calculations. But the suggestion you have suggested, I have already done that. So as per the aiida documentation, once you set up the computer, you do “verdi computer test computername” (I have given “localhost” as my computer label). Which is giving me an error, as I mentioned in my previous post.
I hope this clarifies the confusion.
Thanks. I think the problem is that you set the hostname to localhost. That means you are trying to SSH into the workstation, but that is not what you want, right? You should change that to the hostname of the remote cluster that you want to submit the calculations to. You probably should also change the gss_host accordingly.
Finally, on a side note, you probably don’t want to have srun vasp_std in the append_text. That line should be written by the plugin. You probably can leave the append_text empty.
If you want to change these things, you can best verdi computer delete the computer and restart the setup procedure.
(aiida) sahu@2034-V-011962:~$ verdi computer test narval
Report: Testing computer<narval> for user<Tanay.Sahu@inrs.ca>...
* Opening connection... [OK]
* Checking for spurious output... [OK]
* Getting number of jobs from scheduler... [OK]: 11909 jobs found in the queue
* Determining remote user name... [OK]: tanay11
* Creating and deleting temporary file... [OK]
* Checking for possible delay from using login shell... [OK]
Success: all 6 tests succeeded
(aiida) sahu@2034-V-011962:~$ verdi computer list
Report: List of configured computers
Report: Use 'verdi computer show COMPUTERLABEL' to display more detailed information
* narval
(aiida) sahu@2034-V-011962:~$ verdi computer show narval
--------------------------- -------------------------------------------------------------------------
Label narval
PK 2
UUID d4c619b6-5c60-4821-a17d-a1bd8d32ffed
Description
Hostname narval.computecanada.ca
Transport type core.ssh
Scheduler type core.slurm
Work directory /scratch/tanay11/aiida/
Shebang #!/bin/bash
Mpirun command mpirun -np 64
Default #procs/machine
Default memory (kB)/machine 50000000
Prepend text module purge
module use /lustre06/project/6042828/modules/avx2/MPI/intel2020/impi2019/
module load vasp/
Append text
--------------------------- ----------------------------------------------------------------------
I was wondering if you don’t mind, if it is possible for you to point me toward the next step? It would be really helpful.
I want to use “vasp” plugin of aiida to run my job on “narval”.