Problems in executing mpi with machinefile Ubuntu 18.04 Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) Data science time! April 2019 and salary with experience Should we burninate the [wrap] tag? The Ask Question Wizard is Live!Connecting 2 laptops for MPIExecuting MPI with hydra on different machinesMPI programming get external fileHow to execute MPI not as root when executing in /How to find 'Settings' in ubuntu 18.04?Problems installing mysql in ubuntu 18.04Ubuntu 18.04 crashes to tty1 on installProblem of opennebula installation on ubuntu 18.04How to install boto3 on Ubuntu 18.04?Problem with Condor installation in ubuntu 18.04
Book where humans were engineered with genes from animal species to survive hostile planets
How to deal with a team lead who never gives me credit?
What exactly is a "Meth" in Altered Carbon?
In predicate logic, does existential quantification (∃) include universal quantification (∀), i.e. can 'some' imply 'all'?
Using audio cues to encourage good posture
Error "illegal generic type for instanceof" when using local classes
Identify plant with long narrow paired leaves and reddish stems
How can I make names more distinctive without making them longer?
Why are Kinder Surprise Eggs illegal in the USA?
List *all* the tuples!
Why did the IBM 650 use bi-quinary?
Output the ŋarâþ crîþ alphabet song without using (m)any letters
Do I really need recursive chmod to restrict access to a folder?
How widely used is the term Treppenwitz? Is it something that most Germans know?
What does an IRS interview request entail when called in to verify expenses for a sole proprietor small business?
Can inflation occur in a positive-sum game currency system such as the Stack Exchange reputation system?
Echoing a tail command produces unexpected output?
If a contract sometimes uses the wrong name, is it still valid?
What would be the ideal power source for a cybernetic eye?
51k Euros annually for a family of 4 in Berlin: Is it enough?
Check which numbers satisfy the condition [A*B*C = A! + B! + C!]
Why do people hide their license plates in the EU?
Why am I getting the error "non-boolean type specified in a context where a condition is expected" for this request?
How to bypass password on Windows XP account?
Problems in executing mpi with machinefile Ubuntu 18.04
Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)
Data science time! April 2019 and salary with experience
Should we burninate the [wrap] tag?
The Ask Question Wizard is Live!Connecting 2 laptops for MPIExecuting MPI with hydra on different machinesMPI programming get external fileHow to execute MPI not as root when executing in /How to find 'Settings' in ubuntu 18.04?Problems installing mysql in ubuntu 18.04Ubuntu 18.04 crashes to tty1 on installProblem of opennebula installation on ubuntu 18.04How to install boto3 on Ubuntu 18.04?Problem with Condor installation in ubuntu 18.04
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
following these guidelines MpichClusterUbuntu, I'm trying to execute my very first mpi program with a PC with Ubuntu 18.04.01 Server Edition and a laptop with Ubuntu 18.04.02 Desktop. Till step 11 of this guideline, everything went fine, with no problems at all.
I set up a machinefile called hosts
with these two lines:
192.168.1.7 # first 'master' node: the PC
192.168.1.5 # second node: the laptop
After compiling the very simple example file contained in the guidelines without:
#include <stdio.h>
#include <mpi.h>
int main(int argc, char** argv)
int myrank, nprocs;
MPI_Init(&argc, &argv);
MPI_Comm_size(MPI_COMM_WORLD, &nprocs);
MPI_Comm_rank(MPI_COMM_WORLD, &myrank);
printf("Hello from processor %d of %dn", myrank, nprocs);
MPI_Finalize();
return 0;
mpiu@pc01:~$ mpicc mpi_hello.c -o mpi_hello
Executing without considering the machinefile 'hosts', this is the output:
mpiu@pc01:~$ mpiexec -n 8 ./mpi_hello
------------------------------------------------------------------
[[27419,1],0]: A high-performance Open MPI point-to-point messaging
module was unable to find any relevant network interfaces:
Module: OpenFabrics (openib)
Host: pc01
Another transport will be used instead, although this may result in
lower performance.
NOTE: You can disable this warning by setting the MCA parameter
btl_base_warn_component_unused to 0.
----------------------------------------------------------------
Hello from processor 1 of 8
Hello from processor 2 of 8
Hello from processor 5 of 8
Hello from processor 6 of 8
Hello from processor 0 of 8
Hello from processor 3 of 8
Hello from processor 7 of 8
Hello from processor 4 of 8
[pc01:25010] 7 more processes have sent help message help-mpi-btl-
base.txt / btl:no-nics
[pc01:25010] Set MCA parameter "orte_base_help_aggregate" to 0 to see all
help / error messages
And when executing calling the machinefile 'hosts', the execution remains idle without producing any output:
mpiu@pc01:~$ mpiexec -n 8 -machinefile hosts ./mpi_hello
PS:
this is the content of /etc/netplan/50-cloud-init.yaml in the "master" node (PC):
network:
ethernets:
enp3s0:
#addresses: []
#dhcp4: true
addresses: [192.168.1.7/24]
gateway4: 192.168.1.1
nameservers:
addresses: [8.8.8.8,8.8.4.4]
dhcp4: no
version: 2
Updates:
after the correct comment of Gilles, I removed openmpi which I guess it was installed previously.
Now executing the step 11 of the guidelines MpichClusterUbuntu18.04 :
A) without calling the machinefile:
marco@pc01:/mirror$ mpiexec -n 8 ./mpi_hello
Hello from processor 0 of 8
Hello from processor 1 of 8
Hello from processor 3 of 8
Hello from processor 5 of 8
Hello from processor 6 of 8
Hello from processor 7 of 8
Hello from processor 2 of 8
Hello from processor 4 of 8
B) But calling the machinefile "hosts":
marco@pc01:/mirror$ mpiexec -n 8 -machinefile /home/mpiu/hosts
./mpi_hello
ssh: Could not resolve hostname pc0: Temporary failure in name resolution
ssh: Could not resolve hostname riccarcohp: Temporary failure in name
resolution
^C[mpiexec@pc01] Sending Ctrl-C to processes as requested
[mpiexec@pc01] Press Ctrl-C again to force abort
[mpiexec@pc01] HYDU_sock_write (utils/sock/sock.c:286): write error (Bad
file descriptor)
[mpiexec@pc01] HYD_pmcd_pmiserv_send_signal (pm/pmiserv
/pmiserv_cb.c:177): unable to write data to proxy
[mpiexec@pc01] ui_cmd_cb (pm/pmiserv/pmiserv_pmci.c:79): unable to send
signal downstream
[mpiexec@pc01] HYDT_dmxu_poll_wait_for_event (tools/demux
/demux_poll.c:77): callback returned error status
[mpiexec@pc01] HYD_pmci_wait_for_completion (pm/pmiserv
/pmiserv_pmci.c:198): error waiting for event
[mpiexec@pc01] main (ui/mpich/mpiexec.c:340): process manager error
waiting for completion
After putting in machinefile 'hosts' only the IP Addresses:
mpiu@pc01:/mirror$ mpiexec -n 8 -machinefile /home/mpiu/hosts ./mpi_hello
Permission denied, please try again.
Permission denied, please try again.
mpiu@192.168.1.5: Permission denied (publickey,password).
But I can ssh with no problems at all from the PC to the laptop:
mpiu@pc01:/mirror$ ssh 192.168.1.5
mpiu@192.168.1.5's password:
mpiu@riccardo-HP-Laptop-15-da0xxx:~$
Now it seems SOLVED, even if I repeated for the third time, right the same procedure:
these are the steps I followed for setting up passwordless SSH between pc01 (the and riccardohp (laptop):
marco@pc01:/$ su - mpiu
Password:
mpiu@pc01:~$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/mpiu/.ssh/id_rsa):
Created directory '/home/mpiu/.ssh'.
To make it simpler, I left out the passphrase:
Your identification has been saved in /home/mpiu/.ssh/id_rsa.
Your public key has been saved in /home/mpiu/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:..... mpiu@pc01
The key's randomart image is:
+---[RSA 2048]----+
...................
...................
+----[SHA256]-----+
I copied the public key from pc01 to the laptop:
mpiu@pc01:~$ ssh-copy-id 192.168.1.5
/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/home
/mpiu/.ssh/id_rsa.pub"
The authenticity of host '192.168.1.5 (192.168.1.5)' can't be
established.
ECDSA key fingerprint is SHA256:.......................
Are you sure you want to continue connecting (yes/no)? yes
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to
filter out any that are already installed
/usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are
prompted now it is to install the new keys
mpiu@192.168.1.5's password:
Number of key(s) added: 1
Now try logging into the machine, with: "ssh '192.168.1.5'"
and check to make sure that only the key(s) you wanted were added.
mpiu@pc01:~$ ssh '192.168.1.5'
Welcome to Ubuntu 18.04.2 LTS (GNU/Linux 4.18.0-16-generic x86_64)
mpiu@riccardo-HP-Laptop-15-da0xxx:~$
So, apparently, it seems that the ssh connection between pc01 and the laptop works fine...
mpiu@riccardo-HP-Laptop-15-da0xxx:~$ ^C
mpiu@riccardo-HP-Laptop-15-da0xxx:~$ logout
Connection to 192.168.1.5 closed.
mpiu@pc01:~$ cd /
mpiu@pc01:/$ cd mirror
mpiu@pc01:/mirror$ mpicc mpi_hello.c -o mpi_hello
gcc: error: mpi_hello.c: No such file or directory
mpiu@pc01:/mirror$ nano mpi_hello.c
mpiu@pc01:/mirror$ mpicc mpi_hello.c -o mpi_hello
mpiu@pc01:/mirror$ mpiexec -n 8 ./mpi_hello
Hello from processor 0 of 8
Hello from processor 1 of 8
Hello from processor 2 of 8
Hello from processor 3 of 8
Hello from processor 4 of 8
Hello from processor 5 of 8
Hello from processor 6 of 8
Hello from processor 7 of 8
I put in file hosts in /mirror:
192.168.1.7
192.168.1.5
mpiu@pc01:/mirror$ mpiexec -n 8 -machinefile hosts ./mpi_hello
Hello from processor 2 of 8
Hello from processor 4 of 8
Hello from processor 6 of 8
Hello from processor 0 of 8
Hello from processor 1 of 8
Hello from processor 3 of 8
Hello from processor 5 of 8
Hello from processor 7 of 8
Marco
mpi cluster-computing ubuntu-18.04 mpich
add a comment |
following these guidelines MpichClusterUbuntu, I'm trying to execute my very first mpi program with a PC with Ubuntu 18.04.01 Server Edition and a laptop with Ubuntu 18.04.02 Desktop. Till step 11 of this guideline, everything went fine, with no problems at all.
I set up a machinefile called hosts
with these two lines:
192.168.1.7 # first 'master' node: the PC
192.168.1.5 # second node: the laptop
After compiling the very simple example file contained in the guidelines without:
#include <stdio.h>
#include <mpi.h>
int main(int argc, char** argv)
int myrank, nprocs;
MPI_Init(&argc, &argv);
MPI_Comm_size(MPI_COMM_WORLD, &nprocs);
MPI_Comm_rank(MPI_COMM_WORLD, &myrank);
printf("Hello from processor %d of %dn", myrank, nprocs);
MPI_Finalize();
return 0;
mpiu@pc01:~$ mpicc mpi_hello.c -o mpi_hello
Executing without considering the machinefile 'hosts', this is the output:
mpiu@pc01:~$ mpiexec -n 8 ./mpi_hello
------------------------------------------------------------------
[[27419,1],0]: A high-performance Open MPI point-to-point messaging
module was unable to find any relevant network interfaces:
Module: OpenFabrics (openib)
Host: pc01
Another transport will be used instead, although this may result in
lower performance.
NOTE: You can disable this warning by setting the MCA parameter
btl_base_warn_component_unused to 0.
----------------------------------------------------------------
Hello from processor 1 of 8
Hello from processor 2 of 8
Hello from processor 5 of 8
Hello from processor 6 of 8
Hello from processor 0 of 8
Hello from processor 3 of 8
Hello from processor 7 of 8
Hello from processor 4 of 8
[pc01:25010] 7 more processes have sent help message help-mpi-btl-
base.txt / btl:no-nics
[pc01:25010] Set MCA parameter "orte_base_help_aggregate" to 0 to see all
help / error messages
And when executing calling the machinefile 'hosts', the execution remains idle without producing any output:
mpiu@pc01:~$ mpiexec -n 8 -machinefile hosts ./mpi_hello
PS:
this is the content of /etc/netplan/50-cloud-init.yaml in the "master" node (PC):
network:
ethernets:
enp3s0:
#addresses: []
#dhcp4: true
addresses: [192.168.1.7/24]
gateway4: 192.168.1.1
nameservers:
addresses: [8.8.8.8,8.8.4.4]
dhcp4: no
version: 2
Updates:
after the correct comment of Gilles, I removed openmpi which I guess it was installed previously.
Now executing the step 11 of the guidelines MpichClusterUbuntu18.04 :
A) without calling the machinefile:
marco@pc01:/mirror$ mpiexec -n 8 ./mpi_hello
Hello from processor 0 of 8
Hello from processor 1 of 8
Hello from processor 3 of 8
Hello from processor 5 of 8
Hello from processor 6 of 8
Hello from processor 7 of 8
Hello from processor 2 of 8
Hello from processor 4 of 8
B) But calling the machinefile "hosts":
marco@pc01:/mirror$ mpiexec -n 8 -machinefile /home/mpiu/hosts
./mpi_hello
ssh: Could not resolve hostname pc0: Temporary failure in name resolution
ssh: Could not resolve hostname riccarcohp: Temporary failure in name
resolution
^C[mpiexec@pc01] Sending Ctrl-C to processes as requested
[mpiexec@pc01] Press Ctrl-C again to force abort
[mpiexec@pc01] HYDU_sock_write (utils/sock/sock.c:286): write error (Bad
file descriptor)
[mpiexec@pc01] HYD_pmcd_pmiserv_send_signal (pm/pmiserv
/pmiserv_cb.c:177): unable to write data to proxy
[mpiexec@pc01] ui_cmd_cb (pm/pmiserv/pmiserv_pmci.c:79): unable to send
signal downstream
[mpiexec@pc01] HYDT_dmxu_poll_wait_for_event (tools/demux
/demux_poll.c:77): callback returned error status
[mpiexec@pc01] HYD_pmci_wait_for_completion (pm/pmiserv
/pmiserv_pmci.c:198): error waiting for event
[mpiexec@pc01] main (ui/mpich/mpiexec.c:340): process manager error
waiting for completion
After putting in machinefile 'hosts' only the IP Addresses:
mpiu@pc01:/mirror$ mpiexec -n 8 -machinefile /home/mpiu/hosts ./mpi_hello
Permission denied, please try again.
Permission denied, please try again.
mpiu@192.168.1.5: Permission denied (publickey,password).
But I can ssh with no problems at all from the PC to the laptop:
mpiu@pc01:/mirror$ ssh 192.168.1.5
mpiu@192.168.1.5's password:
mpiu@riccardo-HP-Laptop-15-da0xxx:~$
Now it seems SOLVED, even if I repeated for the third time, right the same procedure:
these are the steps I followed for setting up passwordless SSH between pc01 (the and riccardohp (laptop):
marco@pc01:/$ su - mpiu
Password:
mpiu@pc01:~$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/mpiu/.ssh/id_rsa):
Created directory '/home/mpiu/.ssh'.
To make it simpler, I left out the passphrase:
Your identification has been saved in /home/mpiu/.ssh/id_rsa.
Your public key has been saved in /home/mpiu/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:..... mpiu@pc01
The key's randomart image is:
+---[RSA 2048]----+
...................
...................
+----[SHA256]-----+
I copied the public key from pc01 to the laptop:
mpiu@pc01:~$ ssh-copy-id 192.168.1.5
/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/home
/mpiu/.ssh/id_rsa.pub"
The authenticity of host '192.168.1.5 (192.168.1.5)' can't be
established.
ECDSA key fingerprint is SHA256:.......................
Are you sure you want to continue connecting (yes/no)? yes
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to
filter out any that are already installed
/usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are
prompted now it is to install the new keys
mpiu@192.168.1.5's password:
Number of key(s) added: 1
Now try logging into the machine, with: "ssh '192.168.1.5'"
and check to make sure that only the key(s) you wanted were added.
mpiu@pc01:~$ ssh '192.168.1.5'
Welcome to Ubuntu 18.04.2 LTS (GNU/Linux 4.18.0-16-generic x86_64)
mpiu@riccardo-HP-Laptop-15-da0xxx:~$
So, apparently, it seems that the ssh connection between pc01 and the laptop works fine...
mpiu@riccardo-HP-Laptop-15-da0xxx:~$ ^C
mpiu@riccardo-HP-Laptop-15-da0xxx:~$ logout
Connection to 192.168.1.5 closed.
mpiu@pc01:~$ cd /
mpiu@pc01:/$ cd mirror
mpiu@pc01:/mirror$ mpicc mpi_hello.c -o mpi_hello
gcc: error: mpi_hello.c: No such file or directory
mpiu@pc01:/mirror$ nano mpi_hello.c
mpiu@pc01:/mirror$ mpicc mpi_hello.c -o mpi_hello
mpiu@pc01:/mirror$ mpiexec -n 8 ./mpi_hello
Hello from processor 0 of 8
Hello from processor 1 of 8
Hello from processor 2 of 8
Hello from processor 3 of 8
Hello from processor 4 of 8
Hello from processor 5 of 8
Hello from processor 6 of 8
Hello from processor 7 of 8
I put in file hosts in /mirror:
192.168.1.7
192.168.1.5
mpiu@pc01:/mirror$ mpiexec -n 8 -machinefile hosts ./mpi_hello
Hello from processor 2 of 8
Hello from processor 4 of 8
Hello from processor 6 of 8
Hello from processor 0 of 8
Hello from processor 1 of 8
Hello from processor 3 of 8
Hello from processor 5 of 8
Hello from processor 7 of 8
Marco
mpi cluster-computing ubuntu-18.04 mpich
the message seems coming from Open MPI (and not MPICH). you should first clarify the library you are using is the one you intend to use.
– Gilles Gouaillardet
Mar 9 at 9:29
Thanks @GillesGouaillardet. Based on your right observation, I updated my question with the new output
– user2315094
Mar 10 at 11:39
1
you need to be able to SSH passwordless between nodes (the logs suggests you can SSH only if you manually type the password, and that is not enough).
– Gilles Gouaillardet
Mar 11 at 4:09
Hi @GillesGouaillardet now, as described above, it seems solved, even if I just repeated exactly the same procedure for the third time. Thank you very much for your kind help
– user2315094
Mar 11 at 9:20
add a comment |
following these guidelines MpichClusterUbuntu, I'm trying to execute my very first mpi program with a PC with Ubuntu 18.04.01 Server Edition and a laptop with Ubuntu 18.04.02 Desktop. Till step 11 of this guideline, everything went fine, with no problems at all.
I set up a machinefile called hosts
with these two lines:
192.168.1.7 # first 'master' node: the PC
192.168.1.5 # second node: the laptop
After compiling the very simple example file contained in the guidelines without:
#include <stdio.h>
#include <mpi.h>
int main(int argc, char** argv)
int myrank, nprocs;
MPI_Init(&argc, &argv);
MPI_Comm_size(MPI_COMM_WORLD, &nprocs);
MPI_Comm_rank(MPI_COMM_WORLD, &myrank);
printf("Hello from processor %d of %dn", myrank, nprocs);
MPI_Finalize();
return 0;
mpiu@pc01:~$ mpicc mpi_hello.c -o mpi_hello
Executing without considering the machinefile 'hosts', this is the output:
mpiu@pc01:~$ mpiexec -n 8 ./mpi_hello
------------------------------------------------------------------
[[27419,1],0]: A high-performance Open MPI point-to-point messaging
module was unable to find any relevant network interfaces:
Module: OpenFabrics (openib)
Host: pc01
Another transport will be used instead, although this may result in
lower performance.
NOTE: You can disable this warning by setting the MCA parameter
btl_base_warn_component_unused to 0.
----------------------------------------------------------------
Hello from processor 1 of 8
Hello from processor 2 of 8
Hello from processor 5 of 8
Hello from processor 6 of 8
Hello from processor 0 of 8
Hello from processor 3 of 8
Hello from processor 7 of 8
Hello from processor 4 of 8
[pc01:25010] 7 more processes have sent help message help-mpi-btl-
base.txt / btl:no-nics
[pc01:25010] Set MCA parameter "orte_base_help_aggregate" to 0 to see all
help / error messages
And when executing calling the machinefile 'hosts', the execution remains idle without producing any output:
mpiu@pc01:~$ mpiexec -n 8 -machinefile hosts ./mpi_hello
PS:
this is the content of /etc/netplan/50-cloud-init.yaml in the "master" node (PC):
network:
ethernets:
enp3s0:
#addresses: []
#dhcp4: true
addresses: [192.168.1.7/24]
gateway4: 192.168.1.1
nameservers:
addresses: [8.8.8.8,8.8.4.4]
dhcp4: no
version: 2
Updates:
after the correct comment of Gilles, I removed openmpi which I guess it was installed previously.
Now executing the step 11 of the guidelines MpichClusterUbuntu18.04 :
A) without calling the machinefile:
marco@pc01:/mirror$ mpiexec -n 8 ./mpi_hello
Hello from processor 0 of 8
Hello from processor 1 of 8
Hello from processor 3 of 8
Hello from processor 5 of 8
Hello from processor 6 of 8
Hello from processor 7 of 8
Hello from processor 2 of 8
Hello from processor 4 of 8
B) But calling the machinefile "hosts":
marco@pc01:/mirror$ mpiexec -n 8 -machinefile /home/mpiu/hosts
./mpi_hello
ssh: Could not resolve hostname pc0: Temporary failure in name resolution
ssh: Could not resolve hostname riccarcohp: Temporary failure in name
resolution
^C[mpiexec@pc01] Sending Ctrl-C to processes as requested
[mpiexec@pc01] Press Ctrl-C again to force abort
[mpiexec@pc01] HYDU_sock_write (utils/sock/sock.c:286): write error (Bad
file descriptor)
[mpiexec@pc01] HYD_pmcd_pmiserv_send_signal (pm/pmiserv
/pmiserv_cb.c:177): unable to write data to proxy
[mpiexec@pc01] ui_cmd_cb (pm/pmiserv/pmiserv_pmci.c:79): unable to send
signal downstream
[mpiexec@pc01] HYDT_dmxu_poll_wait_for_event (tools/demux
/demux_poll.c:77): callback returned error status
[mpiexec@pc01] HYD_pmci_wait_for_completion (pm/pmiserv
/pmiserv_pmci.c:198): error waiting for event
[mpiexec@pc01] main (ui/mpich/mpiexec.c:340): process manager error
waiting for completion
After putting in machinefile 'hosts' only the IP Addresses:
mpiu@pc01:/mirror$ mpiexec -n 8 -machinefile /home/mpiu/hosts ./mpi_hello
Permission denied, please try again.
Permission denied, please try again.
mpiu@192.168.1.5: Permission denied (publickey,password).
But I can ssh with no problems at all from the PC to the laptop:
mpiu@pc01:/mirror$ ssh 192.168.1.5
mpiu@192.168.1.5's password:
mpiu@riccardo-HP-Laptop-15-da0xxx:~$
Now it seems SOLVED, even if I repeated for the third time, right the same procedure:
these are the steps I followed for setting up passwordless SSH between pc01 (the and riccardohp (laptop):
marco@pc01:/$ su - mpiu
Password:
mpiu@pc01:~$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/mpiu/.ssh/id_rsa):
Created directory '/home/mpiu/.ssh'.
To make it simpler, I left out the passphrase:
Your identification has been saved in /home/mpiu/.ssh/id_rsa.
Your public key has been saved in /home/mpiu/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:..... mpiu@pc01
The key's randomart image is:
+---[RSA 2048]----+
...................
...................
+----[SHA256]-----+
I copied the public key from pc01 to the laptop:
mpiu@pc01:~$ ssh-copy-id 192.168.1.5
/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/home
/mpiu/.ssh/id_rsa.pub"
The authenticity of host '192.168.1.5 (192.168.1.5)' can't be
established.
ECDSA key fingerprint is SHA256:.......................
Are you sure you want to continue connecting (yes/no)? yes
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to
filter out any that are already installed
/usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are
prompted now it is to install the new keys
mpiu@192.168.1.5's password:
Number of key(s) added: 1
Now try logging into the machine, with: "ssh '192.168.1.5'"
and check to make sure that only the key(s) you wanted were added.
mpiu@pc01:~$ ssh '192.168.1.5'
Welcome to Ubuntu 18.04.2 LTS (GNU/Linux 4.18.0-16-generic x86_64)
mpiu@riccardo-HP-Laptop-15-da0xxx:~$
So, apparently, it seems that the ssh connection between pc01 and the laptop works fine...
mpiu@riccardo-HP-Laptop-15-da0xxx:~$ ^C
mpiu@riccardo-HP-Laptop-15-da0xxx:~$ logout
Connection to 192.168.1.5 closed.
mpiu@pc01:~$ cd /
mpiu@pc01:/$ cd mirror
mpiu@pc01:/mirror$ mpicc mpi_hello.c -o mpi_hello
gcc: error: mpi_hello.c: No such file or directory
mpiu@pc01:/mirror$ nano mpi_hello.c
mpiu@pc01:/mirror$ mpicc mpi_hello.c -o mpi_hello
mpiu@pc01:/mirror$ mpiexec -n 8 ./mpi_hello
Hello from processor 0 of 8
Hello from processor 1 of 8
Hello from processor 2 of 8
Hello from processor 3 of 8
Hello from processor 4 of 8
Hello from processor 5 of 8
Hello from processor 6 of 8
Hello from processor 7 of 8
I put in file hosts in /mirror:
192.168.1.7
192.168.1.5
mpiu@pc01:/mirror$ mpiexec -n 8 -machinefile hosts ./mpi_hello
Hello from processor 2 of 8
Hello from processor 4 of 8
Hello from processor 6 of 8
Hello from processor 0 of 8
Hello from processor 1 of 8
Hello from processor 3 of 8
Hello from processor 5 of 8
Hello from processor 7 of 8
Marco
mpi cluster-computing ubuntu-18.04 mpich
following these guidelines MpichClusterUbuntu, I'm trying to execute my very first mpi program with a PC with Ubuntu 18.04.01 Server Edition and a laptop with Ubuntu 18.04.02 Desktop. Till step 11 of this guideline, everything went fine, with no problems at all.
I set up a machinefile called hosts
with these two lines:
192.168.1.7 # first 'master' node: the PC
192.168.1.5 # second node: the laptop
After compiling the very simple example file contained in the guidelines without:
#include <stdio.h>
#include <mpi.h>
int main(int argc, char** argv)
int myrank, nprocs;
MPI_Init(&argc, &argv);
MPI_Comm_size(MPI_COMM_WORLD, &nprocs);
MPI_Comm_rank(MPI_COMM_WORLD, &myrank);
printf("Hello from processor %d of %dn", myrank, nprocs);
MPI_Finalize();
return 0;
mpiu@pc01:~$ mpicc mpi_hello.c -o mpi_hello
Executing without considering the machinefile 'hosts', this is the output:
mpiu@pc01:~$ mpiexec -n 8 ./mpi_hello
------------------------------------------------------------------
[[27419,1],0]: A high-performance Open MPI point-to-point messaging
module was unable to find any relevant network interfaces:
Module: OpenFabrics (openib)
Host: pc01
Another transport will be used instead, although this may result in
lower performance.
NOTE: You can disable this warning by setting the MCA parameter
btl_base_warn_component_unused to 0.
----------------------------------------------------------------
Hello from processor 1 of 8
Hello from processor 2 of 8
Hello from processor 5 of 8
Hello from processor 6 of 8
Hello from processor 0 of 8
Hello from processor 3 of 8
Hello from processor 7 of 8
Hello from processor 4 of 8
[pc01:25010] 7 more processes have sent help message help-mpi-btl-
base.txt / btl:no-nics
[pc01:25010] Set MCA parameter "orte_base_help_aggregate" to 0 to see all
help / error messages
And when executing calling the machinefile 'hosts', the execution remains idle without producing any output:
mpiu@pc01:~$ mpiexec -n 8 -machinefile hosts ./mpi_hello
PS:
this is the content of /etc/netplan/50-cloud-init.yaml in the "master" node (PC):
network:
ethernets:
enp3s0:
#addresses: []
#dhcp4: true
addresses: [192.168.1.7/24]
gateway4: 192.168.1.1
nameservers:
addresses: [8.8.8.8,8.8.4.4]
dhcp4: no
version: 2
Updates:
after the correct comment of Gilles, I removed openmpi which I guess it was installed previously.
Now executing the step 11 of the guidelines MpichClusterUbuntu18.04 :
A) without calling the machinefile:
marco@pc01:/mirror$ mpiexec -n 8 ./mpi_hello
Hello from processor 0 of 8
Hello from processor 1 of 8
Hello from processor 3 of 8
Hello from processor 5 of 8
Hello from processor 6 of 8
Hello from processor 7 of 8
Hello from processor 2 of 8
Hello from processor 4 of 8
B) But calling the machinefile "hosts":
marco@pc01:/mirror$ mpiexec -n 8 -machinefile /home/mpiu/hosts
./mpi_hello
ssh: Could not resolve hostname pc0: Temporary failure in name resolution
ssh: Could not resolve hostname riccarcohp: Temporary failure in name
resolution
^C[mpiexec@pc01] Sending Ctrl-C to processes as requested
[mpiexec@pc01] Press Ctrl-C again to force abort
[mpiexec@pc01] HYDU_sock_write (utils/sock/sock.c:286): write error (Bad
file descriptor)
[mpiexec@pc01] HYD_pmcd_pmiserv_send_signal (pm/pmiserv
/pmiserv_cb.c:177): unable to write data to proxy
[mpiexec@pc01] ui_cmd_cb (pm/pmiserv/pmiserv_pmci.c:79): unable to send
signal downstream
[mpiexec@pc01] HYDT_dmxu_poll_wait_for_event (tools/demux
/demux_poll.c:77): callback returned error status
[mpiexec@pc01] HYD_pmci_wait_for_completion (pm/pmiserv
/pmiserv_pmci.c:198): error waiting for event
[mpiexec@pc01] main (ui/mpich/mpiexec.c:340): process manager error
waiting for completion
After putting in machinefile 'hosts' only the IP Addresses:
mpiu@pc01:/mirror$ mpiexec -n 8 -machinefile /home/mpiu/hosts ./mpi_hello
Permission denied, please try again.
Permission denied, please try again.
mpiu@192.168.1.5: Permission denied (publickey,password).
But I can ssh with no problems at all from the PC to the laptop:
mpiu@pc01:/mirror$ ssh 192.168.1.5
mpiu@192.168.1.5's password:
mpiu@riccardo-HP-Laptop-15-da0xxx:~$
Now it seems SOLVED, even if I repeated for the third time, right the same procedure:
these are the steps I followed for setting up passwordless SSH between pc01 (the and riccardohp (laptop):
marco@pc01:/$ su - mpiu
Password:
mpiu@pc01:~$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/mpiu/.ssh/id_rsa):
Created directory '/home/mpiu/.ssh'.
To make it simpler, I left out the passphrase:
Your identification has been saved in /home/mpiu/.ssh/id_rsa.
Your public key has been saved in /home/mpiu/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:..... mpiu@pc01
The key's randomart image is:
+---[RSA 2048]----+
...................
...................
+----[SHA256]-----+
I copied the public key from pc01 to the laptop:
mpiu@pc01:~$ ssh-copy-id 192.168.1.5
/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/home
/mpiu/.ssh/id_rsa.pub"
The authenticity of host '192.168.1.5 (192.168.1.5)' can't be
established.
ECDSA key fingerprint is SHA256:.......................
Are you sure you want to continue connecting (yes/no)? yes
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to
filter out any that are already installed
/usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are
prompted now it is to install the new keys
mpiu@192.168.1.5's password:
Number of key(s) added: 1
Now try logging into the machine, with: "ssh '192.168.1.5'"
and check to make sure that only the key(s) you wanted were added.
mpiu@pc01:~$ ssh '192.168.1.5'
Welcome to Ubuntu 18.04.2 LTS (GNU/Linux 4.18.0-16-generic x86_64)
mpiu@riccardo-HP-Laptop-15-da0xxx:~$
So, apparently, it seems that the ssh connection between pc01 and the laptop works fine...
mpiu@riccardo-HP-Laptop-15-da0xxx:~$ ^C
mpiu@riccardo-HP-Laptop-15-da0xxx:~$ logout
Connection to 192.168.1.5 closed.
mpiu@pc01:~$ cd /
mpiu@pc01:/$ cd mirror
mpiu@pc01:/mirror$ mpicc mpi_hello.c -o mpi_hello
gcc: error: mpi_hello.c: No such file or directory
mpiu@pc01:/mirror$ nano mpi_hello.c
mpiu@pc01:/mirror$ mpicc mpi_hello.c -o mpi_hello
mpiu@pc01:/mirror$ mpiexec -n 8 ./mpi_hello
Hello from processor 0 of 8
Hello from processor 1 of 8
Hello from processor 2 of 8
Hello from processor 3 of 8
Hello from processor 4 of 8
Hello from processor 5 of 8
Hello from processor 6 of 8
Hello from processor 7 of 8
I put in file hosts in /mirror:
192.168.1.7
192.168.1.5
mpiu@pc01:/mirror$ mpiexec -n 8 -machinefile hosts ./mpi_hello
Hello from processor 2 of 8
Hello from processor 4 of 8
Hello from processor 6 of 8
Hello from processor 0 of 8
Hello from processor 1 of 8
Hello from processor 3 of 8
Hello from processor 5 of 8
Hello from processor 7 of 8
Marco
mpi cluster-computing ubuntu-18.04 mpich
mpi cluster-computing ubuntu-18.04 mpich
edited Mar 11 at 9:18
user2315094
asked Mar 8 at 17:05
user2315094user2315094
52111
52111
the message seems coming from Open MPI (and not MPICH). you should first clarify the library you are using is the one you intend to use.
– Gilles Gouaillardet
Mar 9 at 9:29
Thanks @GillesGouaillardet. Based on your right observation, I updated my question with the new output
– user2315094
Mar 10 at 11:39
1
you need to be able to SSH passwordless between nodes (the logs suggests you can SSH only if you manually type the password, and that is not enough).
– Gilles Gouaillardet
Mar 11 at 4:09
Hi @GillesGouaillardet now, as described above, it seems solved, even if I just repeated exactly the same procedure for the third time. Thank you very much for your kind help
– user2315094
Mar 11 at 9:20
add a comment |
the message seems coming from Open MPI (and not MPICH). you should first clarify the library you are using is the one you intend to use.
– Gilles Gouaillardet
Mar 9 at 9:29
Thanks @GillesGouaillardet. Based on your right observation, I updated my question with the new output
– user2315094
Mar 10 at 11:39
1
you need to be able to SSH passwordless between nodes (the logs suggests you can SSH only if you manually type the password, and that is not enough).
– Gilles Gouaillardet
Mar 11 at 4:09
Hi @GillesGouaillardet now, as described above, it seems solved, even if I just repeated exactly the same procedure for the third time. Thank you very much for your kind help
– user2315094
Mar 11 at 9:20
the message seems coming from Open MPI (and not MPICH). you should first clarify the library you are using is the one you intend to use.
– Gilles Gouaillardet
Mar 9 at 9:29
the message seems coming from Open MPI (and not MPICH). you should first clarify the library you are using is the one you intend to use.
– Gilles Gouaillardet
Mar 9 at 9:29
Thanks @GillesGouaillardet. Based on your right observation, I updated my question with the new output
– user2315094
Mar 10 at 11:39
Thanks @GillesGouaillardet. Based on your right observation, I updated my question with the new output
– user2315094
Mar 10 at 11:39
1
1
you need to be able to SSH passwordless between nodes (the logs suggests you can SSH only if you manually type the password, and that is not enough).
– Gilles Gouaillardet
Mar 11 at 4:09
you need to be able to SSH passwordless between nodes (the logs suggests you can SSH only if you manually type the password, and that is not enough).
– Gilles Gouaillardet
Mar 11 at 4:09
Hi @GillesGouaillardet now, as described above, it seems solved, even if I just repeated exactly the same procedure for the third time. Thank you very much for your kind help
– user2315094
Mar 11 at 9:20
Hi @GillesGouaillardet now, as described above, it seems solved, even if I just repeated exactly the same procedure for the third time. Thank you very much for your kind help
– user2315094
Mar 11 at 9:20
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55067826%2fproblems-in-executing-mpi-with-machinefile-ubuntu-18-04%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55067826%2fproblems-in-executing-mpi-with-machinefile-ubuntu-18-04%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
the message seems coming from Open MPI (and not MPICH). you should first clarify the library you are using is the one you intend to use.
– Gilles Gouaillardet
Mar 9 at 9:29
Thanks @GillesGouaillardet. Based on your right observation, I updated my question with the new output
– user2315094
Mar 10 at 11:39
1
you need to be able to SSH passwordless between nodes (the logs suggests you can SSH only if you manually type the password, and that is not enough).
– Gilles Gouaillardet
Mar 11 at 4:09
Hi @GillesGouaillardet now, as described above, it seems solved, even if I just repeated exactly the same procedure for the third time. Thank you very much for your kind help
– user2315094
Mar 11 at 9:20