<div dir="ltr"><div><div><div><div>Hi, Antonio<br><br></div>Thanks a lot! Now I make sense. Let's say if I am running MPI and multithreads program. If I called MPI_Barrier in each threads<br></div>what gonna happen? Will threads be synced by MPI_Barrier? or I should use thread level sync?<br>
<br></div>Thank you!<br></div>Sufeng<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Jun 23, 2013 at 6:54 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. Re: Error with MPI_Spawn (Jeff Hammond)<br>
2. Re: discuss Digest, Vol 8, Issue 37 (Antonio J. Pe?a)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Sun, 23 Jun 2013 17:03:09 -0500<br>
From: Jeff Hammond <<a href="mailto:jeff.science@gmail.com">jeff.science@gmail.com</a>><br>
To: "<a href="mailto:discuss@mpich.org">discuss@mpich.org</a>" <<a href="mailto:discuss@mpich.org">discuss@mpich.org</a>><br>
Subject: Re: [mpich-discuss] Error with MPI_Spawn<br>
Message-ID: <-1578386667793986954@unknownmsgid><br>
Content-Type: text/plain; charset=ISO-8859-1<br>
<br>
This is the wrong way to use PETSc and to parallelize a code with a<br>
parallel library in general.<br>
<br>
Write the PETSc user list and they will explain to you how to<br>
parallelize your code properly with PETSc.<br>
<br>
Jeff<br>
<br>
Sent from my iPhone<br>
<br>
On Jun 23, 2013, at 4:59 PM, Nitel Muhtaroglu <<a href="mailto:muhtaroglu.n@gmail.com">muhtaroglu.n@gmail.com</a>> wrote:<br>
<br>
> Hello,<br>
><br>
> I am trying to integrate PETSc library to a serial program. The idea is that the serial program creates a linear equation system and then calls PETSc solver by MPI_Spawn and then solves this system in parallel. But when I execute MPI_Spawn the following error message occurs and the solver is not called. I couldn't find a solution to this error. Does anyone have an idea about it?<br>
><br>
> Kind Regards,<br>
> --<br>
> Nitel<br>
><br>
> **********************************************************<br>
> Assertion failed in file socksm.c at line 590: hdr.pkt_type == MPIDI_NEM_TCP_SOCKSM_PKT_ID_INFO || hdr.pkt_type == MPIDI_NEM_TCP_SOCKSM_PKT_TMPVC_INFO<br>
> internal ABORT - process 0<br>
> INTERNAL ERROR: Invalid error class (66) encountered while returning from<br>
> MPI_Init. Please file a bug report.<br>
> Fatal error in MPI_Init: Unknown error. Please file a bug report., error stack:<br>
> (unknown)(): connection failure<br>
> [cli_0]: aborting job:<br>
> Fatal error in MPI_Init: Unknown error. Please file a bug report., error stack:<br>
> (unknown)(): connection failure<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>
<br>
Message: 2<br>
Date: Sun, 23 Jun 2013 18:54:38 -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] discuss Digest, Vol 8, Issue 37<br>
Message-ID: <8872211.IGCl89YM8r@localhost.localdomain><br>
Content-Type: text/plain; charset="iso-8859-1"<br>
<br>
<br>
Sufeng,<br>
<br>
The correct way is to use the MPI_Init_thread function with<br>
MPI_THREAD_MULTIPLE. This will tell the MPI implementation to be thread<br>
safe. It supports OpenMP and Posix Threads (OpenMP primitives in most<br>
systems are likely to be implemented on top of PThreads).<br>
<br>
Antonio<br>
<br>
<br>
On Sunday, June 23, 2013 11:13:31 AM Sufeng Niu wrote:<br>
<br>
<br>
Hi, Antonio<br>
<br>
<br>
Thanks a lot for your reply, I just figure out that is the firewall issue. after I<br>
set the firewall. it works now. Thanks again.<br>
<br>
<br>
But I still got a few questions on MPI and multithreads mixed programming.<br>
Currently, I try to run each process on each server, and each process<br>
using thread pool to run multiple threads (pthread lib). I am not sure<br>
whether it is the correct way or not. I wrote it as:<br>
<br>
<br>
MPI_Init()<br>
....<br>
...<br>
/* create thread pool and initial */<br>
......<br>
/* fetch job into thread pool */<br>
......<br>
<br>
<br>
MPI_Finalize();<br>
<br>
<br>
When I check the book and notes, I found people use<br>
<br>
<br>
MPI_Init_thread() with MPI_THREAD_MULTIPLE<br>
<br>
<br>
but the some docs said it supported OpenMP, is that possible to use it<br>
with pthread library?<br>
I am new guy to this hybrid programming. I am not sure which is the proper<br>
way to do it. Any suggestions are appreciate. Thank you!<br>
<br>
<br>
Sufeng<br>
<br>
<br>
<br>
<br>
On Sat, Jun 22, 2013 at 12:12 PM, <<a href="mailto:discuss-request@mpich.org">discuss-request@mpich.org</a>[1]> wrote:<br>
<br>
<br>
Send discuss mailing list submissions to <a href="mailto:discuss@mpich.org">discuss@mpich.org</a>[2]<br>
<a href="https://lists.mpich.org/mailman/listinfo/discuss[3]" target="_blank">https://lists.mpich.org/mailman/listinfo/discuss[3]</a><br>
<a href="mailto:discuss-request@mpich.org">discuss-request@mpich.org</a>[1]<br>
<a href="mailto:discuss-owner@mpich.org">discuss-owner@mpich.org</a>[4]<br>
<a href="mailto:sniu@hawk.iit.edu">sniu@hawk.iit.edu</a>[5]>To: <a href="mailto:discuss@mpich.org">discuss@mpich.org</a>[2]<br>
CAFNNHkwpqdGfZXctL0Uz3hpeL25mZZMtB93qGXjc_+tjnV4csA@mail.gmail.c<br>
om[6]>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 OSfor<br>
all blades to keep them the same version. after I mount, set keylessssh,<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>[7]]<br>
HYDU_sock_connect(./utils/sock/sock.c:174): unable to connect from<br>
"<a href="http://iocfccd3.aps.anl.gov" target="_blank">iocfccd3.aps.anl.gov</a>[8]" to"<a href="http://iocfccd1.aps.anl.gov" target="_blank">iocfccd1.aps.anl.gov</a>[9]" (No route to host)<br>
[<a href="mailto:proxy%3A0%3A1@iocfccd3.aps.anl.gov">proxy:0:1@iocfccd3.aps.anl.gov</a>[7]] main (./pm/pmiserv/pmip.c:189):<br>
unable toconnect to server <a href="http://iocfccd1.aps.anl.gov" target="_blank">iocfccd1.aps.anl.gov</a>[9] at port 38242 (check<br>
for firewalls!)<br>
<br>
I can ssh from iocfccd1 to iocfccd3 without password. Should I shut downall<br>
firewalls on each server? I cannot find out where is the problem. Thankyou<br>
<br>
--Best Regards,Sufeng NiuECASP lab, ECE department, Illinois Institute of<br>
TechnologyTel: 312-731-7219[10]<br>
<a href="http://lists.mpich.org/pipermail/discuss/attachments/20130621/5503b1bc/a
ttachment-0001.html[11]" target="_blank">http://lists.mpich.org/pipermail/discuss/attachments/20130621/5503b1bc/a<br>
ttachment-0001.html[11]</a>><br>
<br>
------------------------------<br>
<br>
Message: 2Date: Fri, 21 Jun 2013 10:58:26 -0500From: Antonio J. Pe?a<br>
<<a href="mailto:apenya@mcs.anl.gov">apenya@mcs.anl.gov</a>[12]>To: <a href="mailto:discuss@mpich.org">discuss@mpich.org</a>[2]<br>
<a href="http://iocfccd1.aps.anl.gov" target="_blank">iocfccd1.aps.anl.gov</a>[9]" from iocfccd3?[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<br>
forall blades to keep them the same version. after I mount, set keyless<br>
ssh,the terimnal gives the error below:<br>
<br>
<br>
<a href="mailto:proxy%3A0%3A1@iocfccd3.aps.anl.gov">proxy:0:1@iocfccd3.aps.anl.gov</a>[7][2]]<br>
HYDU_sock_connect(./utils/sock/sock.c:174): unable to connect from<br>
"<a href="http://iocfccd3.aps.anl.gov" target="_blank">iocfccd3.aps.anl.gov</a>[8][3]"to "<a href="http://iocfccd1.aps.anl.gov" target="_blank">iocfccd1.aps.anl.gov</a>[9][1]" (No route to<br>
host)[<a href="mailto:proxy%3A0%3A1@iocfccd3.aps.anl.gov">proxy:0:1@iocfccd3.aps.anl.gov</a>[7][2]] main<br>
(./pm/pmiserv/pmip.c:189):unable to connect to server<br>
<a href="http://iocfccd1.aps.anl.gov" target="_blank">iocfccd1.aps.anl.gov</a>[9][1] at port 38242 (checkfor firewalls!)<br>
<br>
<br>
<br>
I can ssh from iocfccd1 to iocfccd3 without password. Should I shut downall<br>
firewalls on each server? I cannot find out where is the problem. Thankyou<br>
<br>
<br>
<br>
<br>
-- Best Regards,Sufeng NiuECASP lab, ECE department, Illinois Institute of<br>
TechnologyTel: 312-731-7219[4]<br>
<br>
<br>
--------[1] _<a href="http://iocfccd1.aps.anl.gov_" target="_blank">http://iocfccd1.aps.anl.gov_</a><br>
<a href="mailto:proxy%253A0%253A1@iocfccd3.aps.anl.gov">proxy%3A0%3A1@iocfccd3.aps.anl.gov</a>[13]<br>
<a href="http://iocfccd3.aps.anl.gov" target="_blank">http://iocfccd3.aps.anl.gov</a>[8]<br>
312-731-7219[10]<br>
<a href="http://lists.mpich.org/pipermail/discuss/attachments/20130621/01b37902/
attachment-0001.html[14]" target="_blank">http://lists.mpich.org/pipermail/discuss/attachments/20130621/01b37902/<br>
attachment-0001.html[14]</a>><br>
<br>
------------------------------<br>
<br>
Message: 3Date: Sat, 22 Jun 2013 12:49:10 -0400From: Jiri Simsa<br>
<<a href="mailto:jsimsa@cs.cmu.edu">jsimsa@cs.cmu.edu</a>[15]>To: <a href="mailto:discuss@mpich.org">discuss@mpich.org</a>[2]<br>
CAHs9ut-_6W6SOHTJ_rD+shQ76bo4cTCuFVAy1f9x-<br>
<a href="mailto:J0gioakHg@mail.gmail.com">J0gioakHg@mail.gmail.com</a>[16]>Content-Type: text/plain;<br>
charset="iso-8859-1"<br>
<br>
Hi,<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://lists.mpich.org/pipermail/discuss/attachments/20130623/a6104115/attachment.html" target="_blank">http://lists.mpich.org/pipermail/discuss/attachments/20130623/a6104115/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 39<br>
**************************************<br>
</blockquote></div><br><br clear="all"><br>-- <br>Best Regards,<div>Sufeng Niu</div><div>ECASP lab, ECE department, Illinois Institute of Technology</div><div>Tel: 312-731-7219</div>
</div>