<div dir="ltr">Hi, <span style="font-family:arial,sans-serif;font-size:13px">Antonio</span><div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:13px">Thanks a lot for your reply, I just figure out that is the firewall issue. after I set the firewall. it works now. Thanks again.</span></div>
<div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:13px">But I still got a few questions on MPI and multithreads mixed programming. Currently, I try to run each process on each server, and each process using thread pool to run multiple threads (pthread lib). I am not sure whether it is the correct way or not. I wrote it as:</span></div>
<div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:13px">MPI_Init()</span></div><div><span style="font-family:arial,sans-serif;font-size:13px">....</span></div>
<div><span style="font-family:arial,sans-serif;font-size:13px">...</span></div><div><span style="font-family:arial,sans-serif;font-size:13px">/* create thread pool and initial */</span></div><div><span style="font-family:arial,sans-serif;font-size:13px">......</span></div>
<div><span style="font-family:arial,sans-serif;font-size:13px">/* fetch job into thread pool */</span></div><div><span style="font-family:arial,sans-serif;font-size:13px">......</span></div><div><br></div>
<div>MPI_Finalize();</div><div><br></div><div>When I check the book and notes, I found people use</div><div><br></div><div>MPI_Init_thread() with <span style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:medium">MPI_THREAD_MULTIPLE</span></div>
<div><br></div><div style>but the some docs said it supported OpenMP, is that possible to use it with pthread library?</div><div style>I am new guy to this hybrid programming. I am not sure which is the proper way to do it. Any suggestions are appreciate. Thank you!</div>
<div style><br></div><div style>Sufeng</div><div><span style="font-family:arial,sans-serif;font-size:13px"><br>
</span></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Jun 22, 2013 at 12:12 PM, <span dir="ltr"><<a href="mailto:discuss-request@mpich.org" target="_blank">discuss-request@mpich.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Send discuss mailing list submissions to<br>
<a href="mailto:discuss@mpich.org">discuss@mpich.org</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
<a href="https://lists.mpich.org/mailman/listinfo/discuss" target="_blank">https://lists.mpich.org/mailman/listinfo/discuss</a><br>
or, via email, send a message with subject or body 'help' to<br>
<a href="mailto:discuss-request@mpich.org">discuss-request@mpich.org</a><br>
<br>
You can reach the person managing the list at<br>
<a href="mailto:discuss-owner@mpich.org">discuss-owner@mpich.org</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of discuss digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
1. run hello world on multiple server (Sufeng Niu)<br>
2. Re: run hello world on multiple server (Antonio J. Pe?a)<br>
3. Problem reproducing an example from the MPI standard (Jiri Simsa)<br>
4. Re: Problem reproducing an example from the MPI standard<br>
(Pavan Balaji)<br>
5. Re: Problem reproducing an example from the MPI standard<br>
(Jiri Simsa)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Fri, 21 Jun 2013 10:51:50 -0500<br>
From: Sufeng Niu <<a href="mailto:sniu@hawk.iit.edu">sniu@hawk.iit.edu</a>><br>
To: <a href="mailto:discuss@mpich.org">discuss@mpich.org</a><br>
Subject: [mpich-discuss] run hello world on multiple server<br>
Message-ID:<br>
<<a href="mailto:CAFNNHkwpqdGfZXctL0Uz3hpeL25mZZMtB93qGXjc_%2BtjnV4csA@mail.gmail.com">CAFNNHkwpqdGfZXctL0Uz3hpeL25mZZMtB93qGXjc_+tjnV4csA@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="iso-8859-1"<br>
<br>
Hi,<br>
<br>
Sorry to bother you guys on this stupid question. last time I re-install OS<br>
for all blades to keep them the same version. after I mount, set keyless<br>
ssh, the terimnal gives the error below:<br>
<br>
[<a href="mailto:proxy%3A0%3A1@iocfccd3.aps.anl.gov">proxy:0:1@iocfccd3.aps.anl.gov</a>] HYDU_sock_connect<br>
(./utils/sock/sock.c:174): unable to connect from "<a href="http://iocfccd3.aps.anl.gov" target="_blank">iocfccd3.aps.anl.gov</a>" to<br>
"<a href="http://iocfccd1.aps.anl.gov" target="_blank">iocfccd1.aps.anl.gov</a>" (No route to host)<br>
[<a href="mailto:proxy%3A0%3A1@iocfccd3.aps.anl.gov">proxy:0:1@iocfccd3.aps.anl.gov</a>] main (./pm/pmiserv/pmip.c:189): unable to<br>
connect to server <a href="http://iocfccd1.aps.anl.gov" target="_blank">iocfccd1.aps.anl.gov</a> at port 38242 (check for firewalls!)<br>
<br>
I can ssh from iocfccd1 to iocfccd3 without password. Should I shut down<br>
all firewalls on each server? I cannot find out where is the problem. Thank<br>
you<br>
<br>
--<br>
Best Regards,<br>
Sufeng Niu<br>
ECASP lab, ECE department, Illinois Institute of Technology<br>
Tel: <a href="tel:312-731-7219" value="+13127317219">312-731-7219</a><br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://lists.mpich.org/pipermail/discuss/attachments/20130621/5503b1bc/attachment-0001.html" target="_blank">http://lists.mpich.org/pipermail/discuss/attachments/20130621/5503b1bc/attachment-0001.html</a>><br>
<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Fri, 21 Jun 2013 10:58:26 -0500<br>
From: Antonio J. Pe?a <<a href="mailto:apenya@mcs.anl.gov">apenya@mcs.anl.gov</a>><br>
To: <a href="mailto:discuss@mpich.org">discuss@mpich.org</a><br>
Subject: Re: [mpich-discuss] run hello world on multiple server<br>
Message-ID: <1764654.VsHJIGvujv@localhost.localdomain><br>
Content-Type: text/plain; charset="iso-8859-1"<br>
<br>
<br>
Hi Sufeng,<br>
<br>
Can you ping/ssh exactly this name "<a href="http://iocfccd1.aps.anl.gov" target="_blank">iocfccd1.aps.anl.gov</a>" from iocfccd3?<br>
[1]<br>
<br>
Antonio<br>
<br>
<br>
On Friday, June 21, 2013 10:51:50 AM Sufeng Niu wrote:<br>
<br>
<br>
Hi,<br>
<br>
<br>
Sorry to bother you guys on this stupid question. last time I re-install OS for<br>
all blades to keep them the same version. after I mount, set keyless ssh,<br>
the terimnal gives the error below:<br>
<br>
<a href="mailto:proxy%3A0%3A1@iocfccd3.aps.anl.gov">proxy:0:1@iocfccd3.aps.anl.gov</a>[2]] HYDU_sock_connect<br>
(./utils/sock/sock.c:174): unable to connect from "<a href="http://iocfccd3.aps.anl.gov" target="_blank">iocfccd3.aps.anl.gov</a>[3]"<br>
to "<a href="http://iocfccd1.aps.anl.gov" target="_blank">iocfccd1.aps.anl.gov</a>[1]" (No route to host)<br>
[<a href="mailto:proxy%3A0%3A1@iocfccd3.aps.anl.gov">proxy:0:1@iocfccd3.aps.anl.gov</a>[2]] main (./pm/pmiserv/pmip.c:189):<br>
unable to connect to server <a href="http://iocfccd1.aps.anl.gov" target="_blank">iocfccd1.aps.anl.gov</a>[1] at port 38242 (check<br>
for firewalls!)<br>
<br>
<br>
<br>
I can ssh from iocfccd1 to iocfccd3 without password. Should I shut down<br>
all firewalls on each server? I cannot find out where is the problem. Thank<br>
you<br>
<br>
<br>
<br>
<br>
-- Best Regards,<br>
Sufeng Niu<br>
ECASP lab, ECE department, Illinois Institute of Technology<br>
Tel: 312-731-7219[4]<br>
<br>
<br>
--------<br>
[1] <a href="http://iocfccd1.aps.anl.gov" target="_blank">http://iocfccd1.aps.anl.gov</a><br>
[2] mailto:<a href="mailto:proxy%253A0%253A1@iocfccd3.aps.anl.gov">proxy%3A0%3A1@iocfccd3.aps.anl.gov</a><br>
[3] <a href="http://iocfccd3.aps.anl.gov" target="_blank">http://iocfccd3.aps.anl.gov</a><br>
[4] tel:<a href="tel:312-731-7219" value="+13127317219">312-731-7219</a><br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://lists.mpich.org/pipermail/discuss/attachments/20130621/01b37902/attachment-0001.html" target="_blank">http://lists.mpich.org/pipermail/discuss/attachments/20130621/01b37902/attachment-0001.html</a>><br>
<br>
------------------------------<br>
<br>
Message: 3<br>
Date: Sat, 22 Jun 2013 12:49:10 -0400<br>
From: Jiri Simsa <<a href="mailto:jsimsa@cs.cmu.edu">jsimsa@cs.cmu.edu</a>><br>
To: <a href="mailto:discuss@mpich.org">discuss@mpich.org</a><br>
Subject: [mpich-discuss] Problem reproducing an example from the MPI<br>
standard<br>
Message-ID:<br>
<<a href="mailto:CAHs9ut-_6W6SOHTJ_rD%2BshQ76bo4cTCuFVAy1f9x-J0gioakHg@mail.gmail.com">CAHs9ut-_6W6SOHTJ_rD+shQ76bo4cTCuFVAy1f9x-J0gioakHg@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="iso-8859-1"<br>
<br>
Hi,<br>
<br>
I tried implementing the Example 3.17 from the MPI 3.0 specification<br>
document using as follows:<br>
<br>
#include <assert.h><br>
#include <mpi.h><br>
#include <stdio.h><br>
<br>
int main(int argc, char *argv[]) {<br>
int myrank, size;<br>
MPI_Status status;<br>
MPI_Init(&argc, &argv );<br>
MPI_Comm_rank(MPI_COMM_WORLD, &myrank);<br>
MPI_Comm_size(MPI_COMM_WORLD, &size);<br>
assert(size == 3);<br>
if (myrank == 0) {<br>
/* code for process zero */<br>
int i = 1;<br>
MPI_Send(&i, 1, MPI_INTEGER, 2, 99, MPI_COMM_WORLD);<br>
}<br>
if (myrank == 1) {<br>
/* code for process one */<br>
double d = 3.14;<br>
MPI_Send(&d, 1, MPI_REAL, 2, 99, MPI_COMM_WORLD);<br>
}<br>
if (myrank == 2) {<br>
/* code for process two */<br>
for (int i = 0; i < 2; i++) {<br>
MPI_Probe(MPI_ANY_SOURCE, MPI_ANY_TAG, MPI_COMM_WORLD, &status);<br>
printf("Probe matched %lld bytes from source %d.\n",<br>
status.count, status.MPI_SOURCE);<br>
if (status.MPI_SOURCE == 0) {<br>
int i;<br>
MPI_Recv(&i, 1, MPI_INTEGER, 0, 99, MPI_COMM_WORLD, &status);<br>
printf("Received integer '%d' from %d.\n", i, status.MPI_SOURCE);<br>
} else {<br>
double d;<br>
MPI_Recv(&d, 1, MPI_REAL, 1, 99, MPI_COMM_WORLD, &status);<br>
printf("Received real '%f' from %d.\n", d, status.MPI_SOURCE);<br>
}<br>
}<br>
}<br>
MPI_Finalize();<br>
return 0;<br>
}<br>
<br>
This example compiles without any warning with the MPICH-3.0.4 library.<br>
However, running:<br>
<br>
$ mpiexec -n 3 ./example<br>
<br>
leads to the following output:<br>
<br>
Probe matched 4 bytes from source 1.<br>
Received real '0.000000' from 1.<br>
Probe matched 4 bytes from source 0.<br>
Received integer '1' from 0.<br>
<br>
Could someone please let me know what is the problem with my program? I<br>
failed to see a problem there. Thank you.<br>
<br>
Best,<br>
<br>
--Jiri Simsa<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://lists.mpich.org/pipermail/discuss/attachments/20130622/70ca8d04/attachment-0001.html" target="_blank">http://lists.mpich.org/pipermail/discuss/attachments/20130622/70ca8d04/attachment-0001.html</a>><br>
<br>
------------------------------<br>
<br>
Message: 4<br>
Date: Sat, 22 Jun 2013 12:02:19 -0500<br>
From: Pavan Balaji <<a href="mailto:balaji@mcs.anl.gov">balaji@mcs.anl.gov</a>><br>
To: <a href="mailto:discuss@mpich.org">discuss@mpich.org</a><br>
Subject: Re: [mpich-discuss] Problem reproducing an example from the<br>
MPI standard<br>
Message-ID: <<a href="mailto:51C5D89B.7010108@mcs.anl.gov">51C5D89B.7010108@mcs.anl.gov</a>><br>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed<br>
<br>
<br>
The example is correct, since it's in Fortran. Your conversion to C is<br>
incorrect. You probably want to use MPI_DOUBLE instead of MPI_REAL, and<br>
MPI_INT instead of MPI_INTEGER.<br>
<br>
-- Pavan<br>
<br>
On 06/22/2013 11:49 AM, Jiri Simsa wrote:<br>
> Hi,<br>
><br>
> I tried implementing the Example 3.17 from the MPI 3.0 specification<br>
> document using as follows:<br>
><br>
> #include <assert.h><br>
> #include <mpi.h><br>
> #include <stdio.h><br>
><br>
> int main(int argc, char *argv[]) {<br>
> int myrank, size;<br>
> MPI_Status status;<br>
> MPI_Init(&argc, &argv );<br>
> MPI_Comm_rank(MPI_COMM_WORLD, &myrank);<br>
> MPI_Comm_size(MPI_COMM_WORLD, &size);<br>
> assert(size == 3);<br>
> if (myrank == 0) {<br>
> /* code for process zero */<br>
> int i = 1;<br>
> MPI_Send(&i, 1, MPI_INTEGER, 2, 99, MPI_COMM_WORLD);<br>
> }<br>
> if (myrank == 1) {<br>
> /* code for process one */<br>
> double d = 3.14;<br>
> MPI_Send(&d, 1, MPI_REAL, 2, 99, MPI_COMM_WORLD);<br>
> }<br>
> if (myrank == 2) {<br>
> /* code for process two */<br>
> for (int i = 0; i < 2; i++) {<br>
> MPI_Probe(MPI_ANY_SOURCE, MPI_ANY_TAG, MPI_COMM_WORLD, &status);<br>
> printf("Probe matched %lld bytes from source %d.\n",<br>
> status.count, status.MPI_SOURCE);<br>
> if (status.MPI_SOURCE == 0) {<br>
> int i;<br>
> MPI_Recv(&i, 1, MPI_INTEGER, 0, 99, MPI_COMM_WORLD, &status);<br>
> printf("Received integer '%d' from %d.\n", i, status.MPI_SOURCE);<br>
> } else {<br>
> double d;<br>
> MPI_Recv(&d, 1, MPI_REAL, 1, 99, MPI_COMM_WORLD, &status);<br>
> printf("Received real '%f' from %d.\n", d, status.MPI_SOURCE);<br>
> }<br>
> }<br>
> }<br>
> MPI_Finalize();<br>
> return 0;<br>
> }<br>
><br>
> This example compiles without any warning with the MPICH-3.0.4 library.<br>
> However, running:<br>
><br>
> $ mpiexec -n 3 ./example<br>
><br>
> leads to the following output:<br>
><br>
> Probe matched 4 bytes from source 1.<br>
> Received real '0.000000' from 1.<br>
> Probe matched 4 bytes from source 0.<br>
> Received integer '1' from 0.<br>
><br>
> Could someone please let me know what is the problem with my program? I<br>
> failed to see a problem there. Thank you.<br>
><br>
> Best,<br>
><br>
> --Jiri Simsa<br>
><br>
><br>
> _______________________________________________<br>
> discuss mailing list <a href="mailto:discuss@mpich.org">discuss@mpich.org</a><br>
> To manage subscription options or unsubscribe:<br>
> <a href="https://lists.mpich.org/mailman/listinfo/discuss" target="_blank">https://lists.mpich.org/mailman/listinfo/discuss</a><br>
><br>
<br>
--<br>
Pavan Balaji<br>
<a href="http://www.mcs.anl.gov/~balaji" target="_blank">http://www.mcs.anl.gov/~balaji</a><br>
<br>
<br>
------------------------------<br>
<br>
Message: 5<br>
Date: Sat, 22 Jun 2013 13:12:06 -0400<br>
From: Jiri Simsa <<a href="mailto:jsimsa@cs.cmu.edu">jsimsa@cs.cmu.edu</a>><br>
To: <a href="mailto:discuss@mpich.org">discuss@mpich.org</a><br>
Subject: Re: [mpich-discuss] Problem reproducing an example from the<br>
MPI standard<br>
Message-ID:<br>
<<a href="mailto:CAHs9ut_0_masn6v2%2B8FKZ8Y1Z_cdoteCespHNpSORc9iqFOcoA@mail.gmail.com">CAHs9ut_0_masn6v2+8FKZ8Y1Z_cdoteCespHNpSORc9iqFOcoA@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="iso-8859-1"<br>
<br>
Nevermind.<br>
<br>
I was incorrectly using the MPI_REAL data type. After replacing it with the<br>
MPI_DOUBLE data type the program was as expected.<br>
<br>
<br>
On Sat, Jun 22, 2013 at 12:49 PM, Jiri Simsa <<a href="mailto:jsimsa@cs.cmu.edu">jsimsa@cs.cmu.edu</a>> wrote:<br>
<br>
> Hi,<br>
><br>
> I tried implementing the Example 3.17 from the MPI 3.0 specification<br>
> document using as follows:<br>
><br>
> #include <assert.h><br>
> #include <mpi.h><br>
> #include <stdio.h><br>
><br>
> int main(int argc, char *argv[]) {<br>
> int myrank, size;<br>
> MPI_Status status;<br>
> MPI_Init(&argc, &argv );<br>
> MPI_Comm_rank(MPI_COMM_WORLD, &myrank);<br>
> MPI_Comm_size(MPI_COMM_WORLD, &size);<br>
> assert(size == 3);<br>
> if (myrank == 0) {<br>
> /* code for process zero */<br>
> int i = 1;<br>
> MPI_Send(&i, 1, MPI_INTEGER, 2, 99, MPI_COMM_WORLD);<br>
> }<br>
> if (myrank == 1) {<br>
> /* code for process one */<br>
> double d = 3.14;<br>
> MPI_Send(&d, 1, MPI_REAL, 2, 99, MPI_COMM_WORLD);<br>
> }<br>
> if (myrank == 2) {<br>
> /* code for process two */<br>
> for (int i = 0; i < 2; i++) {<br>
> MPI_Probe(MPI_ANY_SOURCE, MPI_ANY_TAG, MPI_COMM_WORLD, &status);<br>
> printf("Probe matched %lld bytes from source %d.\n",<br>
> status.count, status.MPI_SOURCE);<br>
> if (status.MPI_SOURCE == 0) {<br>
> int i;<br>
> MPI_Recv(&i, 1, MPI_INTEGER, 0, 99, MPI_COMM_WORLD, &status);<br>
> printf("Received integer '%d' from %d.\n", i, status.MPI_SOURCE);<br>
> } else {<br>
> double d;<br>
> MPI_Recv(&d, 1, MPI_REAL, 1, 99, MPI_COMM_WORLD, &status);<br>
> printf("Received real '%f' from %d.\n", d, status.MPI_SOURCE);<br>
> }<br>
> }<br>
> }<br>
> MPI_Finalize();<br>
> return 0;<br>
> }<br>
><br>
> This example compiles without any warning with the MPICH-3.0.4 library.<br>
> However, running:<br>
><br>
> $ mpiexec -n 3 ./example<br>
><br>
> leads to the following output:<br>
><br>
> Probe matched 4 bytes from source 1.<br>
> Received real '0.000000' from 1.<br>
> Probe matched 4 bytes from source 0.<br>
> Received integer '1' from 0.<br>
><br>
> Could someone please let me know what is the problem with my program? I<br>
> failed to see a problem there. Thank you.<br>
><br>
> Best,<br>
><br>
> --Jiri Simsa<br>
><br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://lists.mpich.org/pipermail/discuss/attachments/20130622/4b69c2f8/attachment.html" target="_blank">http://lists.mpich.org/pipermail/discuss/attachments/20130622/4b69c2f8/attachment.html</a>><br>
<br>
------------------------------<br>
<br>
_______________________________________________<br>
discuss mailing list<br>
<a href="mailto:discuss@mpich.org">discuss@mpich.org</a><br>
<a href="https://lists.mpich.org/mailman/listinfo/discuss" target="_blank">https://lists.mpich.org/mailman/listinfo/discuss</a><br>
<br>
End of discuss Digest, Vol 8, Issue 37<br>
**************************************<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Best Regards,<div>Sufeng Niu</div><div>ECASP lab, ECE department, Illinois Institute of Technology</div><div>Tel: 312-731-7219</div>
</div>