<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
p, li { white-space: pre-wrap; }
</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;">
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; "> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Sufeng,</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; "> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">I'd say you're OK syncing your threads by all of them calling MPI_Barrier, as it's a thread-safe function.</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; "> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">  Antonio</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; "> </p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; "> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">On Monday, June 24, 2013 11:41:44 AM Sufeng Niu wrote:<br /></p>
<p style=" margin-top:12px; margin-bottom:0px; margin-left:40px; margin-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Hi, Antonio<br /><br /></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">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 /></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">what gonna happen? Will threads be synced by MPI_Barrier?  or I should use thread level sync?<br /><br /></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Thank you!<br /></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Sufeng<br /></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:40px; margin-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br /><br /></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:40px; margin-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">On Sun, Jun 23, 2013 at 6:54 PM, <<a href="mailto:discuss-request@mpich.org"><span style=" text-decoration: underline; color:#0057ae;">discuss-request@mpich.org</span></a>> wrote:<br /></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:46px; margin-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Send discuss mailing list submissions to<br />        <a href="mailto:discuss@mpich.org"><span style=" text-decoration: underline; color:#0057ae;">discuss@mpich.org</span></a><br /><br />To subscribe or unsubscribe via the World Wide Web, visit<br />        <a href="https://lists.mpich.org/mailman/listinfo/discuss"><span style=" text-decoration: underline; color:#0057ae;">https://lists.mpich.org/mailman/listinfo/discuss</span></a><br />or, via email, send a message with subject or body 'help' to<br />        <a href="mailto:discuss-request@mpich.org"><span style=" text-decoration: underline; color:#0057ae;">discuss-request@mpich.org</span></a><br /><br />You can reach the person managing the list at<br />        <a href="mailto:discuss-owner@mpich.org"><span style=" text-decoration: underline; color:#0057ae;">discuss-owner@mpich.org</span></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"><span style=" text-decoration: underline; color:#0057ae;">jeff.science@gmail.com</span></a>><br />To: "<a href="mailto:discuss@mpich.org"><span style=" text-decoration: underline; color:#0057ae;">discuss@mpich.org</span></a>" <<a href="mailto:discuss@mpich.org"><span style=" text-decoration: underline; color:#0057ae;">discuss@mpich.org</span></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"><span style=" text-decoration: underline; color:#0057ae;">muhtaroglu.n@gmail.com</span></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"><span style=" text-decoration: underline; color:#0057ae;">discuss@mpich.org</span></a><br />> To manage subscription options or unsubscribe:<br />> <a href="https://lists.mpich.org/mailman/listinfo/discuss"><span style=" text-decoration: underline; color:#0057ae;">https://lists.mpich.org/mailman/listinfo/discuss</span></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"><span style=" text-decoration: underline; color:#0057ae;">apenya@mcs.anl.gov</span></a>><br />To: <a href="mailto:discuss@mpich.org"><span style=" text-decoration: underline; color:#0057ae;">discuss@mpich.org</span></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"><span style=" text-decoration: underline; color:#0057ae;">discuss-request@mpich.org</span></a>[1]> wrote:<br /><br /><br />Send discuss mailing list submissions to        <a href="mailto:discuss@mpich.org"><span style=" text-decoration: underline; color:#0057ae;">discuss@mpich.org</span></a>[2]<br /><a href="https://lists.mpich.org/mailman/listinfo/discuss[3]"><span style=" text-decoration: underline; color:#0057ae;">https://lists.mpich.org/mailman/listinfo/discuss[3]</span></a><br /><a href="mailto:discuss-request@mpich.org"><span style=" text-decoration: underline; color:#0057ae;">discuss-request@mpich.org</span></a>[1]<br /><a href="mailto:discuss-owner@mpich.org"><span style=" text-decoration: underline; color:#0057ae;">discuss-owner@mpich.org</span></a>[4]<br /><a href="mailto:sniu@hawk.iit.edu"><span style=" text-decoration: underline; color:#0057ae;">sniu@hawk.iit.edu</span></a>[5]>To: <a href="mailto:discuss@mpich.org"><span style=" text-decoration: underline; color:#0057ae;">discuss@mpich.org</span></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"><span style=" text-decoration: underline; color:#0057ae;">proxy:0:1@iocfccd3.aps.anl.gov</span></a>[7]]<br />HYDU_sock_connect(./utils/sock/sock.c:174): unable to connect from<br />"<a href="http://iocfccd3.aps.anl.gov"><span style=" text-decoration: underline; color:#0057ae;">iocfccd3.aps.anl.gov</span></a>[8]" to"<a href="http://iocfccd1.aps.anl.gov"><span style=" text-decoration: underline; color:#0057ae;">iocfccd1.aps.anl.gov</span></a>[9]" (No route to host)<br />[<a href="mailto:proxy%3A0%3A1@iocfccd3.aps.anl.gov"><span style=" text-decoration: underline; color:#0057ae;">proxy:0:1@iocfccd3.aps.anl.gov</span></a>[7]] main (./pm/pmiserv/pmip.c:189):<br />unable toconnect to server <a href="http://iocfccd1.aps.anl.gov"><span style=" text-decoration: underline; color:#0057ae;">iocfccd1.aps.anl.gov</span></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]"><span style=" text-decoration: underline; color:#0057ae;">http://lists.mpich.org/pipermail/discuss/attachments/20130621/5503b1bc/a<br />ttachment-0001.html[11]</span></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"><span style=" text-decoration: underline; color:#0057ae;">apenya@mcs.anl.gov</span></a>[12]>To: <a href="mailto:discuss@mpich.org"><span style=" text-decoration: underline; color:#0057ae;">discuss@mpich.org</span></a>[2]<br /><a href="http://iocfccd1.aps.anl.gov"><span style=" text-decoration: underline; color:#0057ae;">iocfccd1.aps.anl.gov</span></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"><span style=" text-decoration: underline; color:#0057ae;">proxy:0:1@iocfccd3.aps.anl.gov</span></a>[7][2]]<br />HYDU_sock_connect(./utils/sock/sock.c:174): unable to connect from<br />"<a href="http://iocfccd3.aps.anl.gov"><span style=" text-decoration: underline; color:#0057ae;">iocfccd3.aps.anl.gov</span></a>[8][3]"to "<a href="http://iocfccd1.aps.anl.gov"><span style=" text-decoration: underline; color:#0057ae;">iocfccd1.aps.anl.gov</span></a>[9][1]" (No route to<br />host)[<a href="mailto:proxy%3A0%3A1@iocfccd3.aps.anl.gov"><span style=" text-decoration: underline; color:#0057ae;">proxy:0:1@iocfccd3.aps.anl.gov</span></a>[7][2]] main<br />(./pm/pmiserv/pmip.c:189):unable to connect to server<br /><a href="http://iocfccd1.aps.anl.gov"><span style=" text-decoration: underline; color:#0057ae;">iocfccd1.aps.anl.gov</span></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_"><span style=" text-decoration: underline; color:#0057ae;">http://iocfccd1.aps.anl.gov_</span></a><br /><a href="mailto:proxy%253A0%253A1@iocfccd3.aps.anl.gov"><span style=" text-decoration: underline; color:#0057ae;">proxy%3A0%3A1@iocfccd3.aps.anl.gov</span></a>[13]<br /><a href="http://iocfccd3.aps.anl.gov"><span style=" text-decoration: underline; color:#0057ae;">http://iocfccd3.aps.anl.gov</span></a>[8]<br />312-731-7219[10]<br /><a href="http://lists.mpich.org/pipermail/discuss/attachments/20130621/01b37902/
attachment-0001.html[14]"><span style=" text-decoration: underline; color:#0057ae;">http://lists.mpich.org/pipermail/discuss/attachments/20130621/01b37902/<br />attachment-0001.html[14]</span></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"><span style=" text-decoration: underline; color:#0057ae;">jsimsa@cs.cmu.edu</span></a>[15]>To: <a href="mailto:discuss@mpich.org"><span style=" text-decoration: underline; color:#0057ae;">discuss@mpich.org</span></a>[2]<br />CAHs9ut-_6W6SOHTJ_rD+shQ76bo4cTCuFVAy1f9x-<br /><a href="mailto:J0gioakHg@mail.gmail.com"><span style=" text-decoration: underline; color:#0057ae;">J0gioakHg@mail.gmail.com</span></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"><span style=" text-decoration: underline; color:#0057ae;">http://lists.mpich.org/pipermail/discuss/attachments/20130623/a6104115/attachment.html</span></a>><br /><br />------------------------------<br /><br />_______________________________________________<br />discuss mailing list<br /><a href="mailto:discuss@mpich.org"><span style=" text-decoration: underline; color:#0057ae;">discuss@mpich.org</span></a><br /><a href="https://lists.mpich.org/mailman/listinfo/discuss"><span style=" text-decoration: underline; color:#0057ae;">https://lists.mpich.org/mailman/listinfo/discuss</span></a><br /><br />End of discuss Digest, Vol 8, Issue 39<br />**************************************<br /></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br /><br /><br />-- <br />Best Regards,</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:40px; margin-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Sufeng Niu</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:40px; margin-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">ECASP lab, ECE department, Illinois Institute of Technology</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:40px; margin-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Tel: 312-731-7219</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br /><br /></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">-- </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Antonio J. Peņa</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Postdoctoral Appointee</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Mathematics and Computer Science Division</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Argonne National Laboratory</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">9700 South Cass Avenue, Bldg. 240, Of. 3148</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Argonne, IL 60439-4847</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">(+1) 630-252-7928</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">apenya@mcs.anl.gov</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; "> </p></body></html>