<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: DDE problem in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/dde-problem/m-p/2492481#M805535</link>
    <description>Hi Sabine,&lt;BR /&gt;&lt;BR /&gt;This is normal behavior.  You're almost there.  The hello1 processes are stopped deep within the mpi_init() call.  That's why dde doesn't show any source.  Do the following in both dde windows...&lt;BR /&gt;&lt;BR /&gt;Use the down-arrow stack frame button to back out to the "main" frame.  It should be stack frame 8 and your source code will appear.&lt;BR /&gt;&lt;BR /&gt;Next, set a breakpoint somewhere after the mpi_init call.  Then, in the debugger input window, set the MPI_DEBUG_CONT global variable to 1...&lt;BR /&gt;&lt;BR /&gt;   set MPI_DEBUG_CONT = 1&lt;BR /&gt;&lt;BR /&gt;Now, do press "continue" and the program will proceed to the breakpoint.  From here you can debug as you normally would.&lt;BR /&gt;&lt;BR /&gt;What's happening is that, within mpi_init(), each hello1 process detects the MPI_FLAGS=edde environment variable.  So, before returning from mpi_init(), they fork/exec dde processes to attach to themselves.  They can't return from mpi_init() immediately because they have to give the dde processes a chance to attach.  So, the processes spin on the MPI_DEBUG_CONT global variable which is initialized to 0.  By setting it to 1 within DDE, you allow the processes to continue out of mpi_init().&lt;BR /&gt;&lt;BR /&gt;The MPI User's Guide talks about this in the "Debugging and Troubleshooting" chapter.  But it doesn't mention that you have to backout to the main stack frame to see your source.  It's a somewhat convoluted solution.  But there is no easy way to support multiprocess MPI programs with single-process debuggers.&lt;BR /&gt;&lt;BR /&gt;There's a really nice debugger for MPI called TotalView.  It supports multiprocess and multithread parallel programs (MPI, OpenMP, pthreads).  It's available for HP-UX, Solaris, Linux, AIX, and others.  And it supports C, C++, Fortran (77 and 90), and HPF.  Etnus worked closely with the MPI group at HP to port TotalView to HP-UX.  Demo copies of totalview are available for free.&lt;BR /&gt;&lt;BR /&gt;For more info, goto &lt;A href="http://www.etnus.com/" target="_blank"&gt;http://www.etnus.com/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;-sam&lt;BR /&gt;</description>
    <pubDate>Wed, 14 Feb 2001 20:48:05 GMT</pubDate>
    <dc:creator>Sam Nicholls</dc:creator>
    <dc:date>2001-02-14T20:48:05Z</dc:date>
    <item>
      <title>DDE problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/dde-problem/m-p/2492478#M805532</link>
      <description>A user of my site reported me this compiling error message : &lt;BR /&gt;I'd like to use the DDE-debugger under MPI. But I have&lt;BR /&gt;no success to get a working GUI. I'm faced with the problem&lt;BR /&gt;already when I try the following simple example:&lt;BR /&gt;&lt;BR /&gt;Edit hello1.f:&lt;BR /&gt;&lt;BR /&gt;    program hello1&lt;BR /&gt;    include 'mpif.h'&lt;BR /&gt;    integer ierror, rank, comm&lt;BR /&gt;    call mpi_init(ierror)&lt;BR /&gt;    call mpi_comm_rank(MPI_comm_world,rank,ierror)&lt;BR /&gt;    write(*,*) 'hello world, rank=',rank&lt;BR /&gt;    call mpi_finalize(ierror)&lt;BR /&gt;    end&lt;BR /&gt;&lt;BR /&gt;mpif90 -o hello1 -g hello1.f&lt;BR /&gt;dde hello1 (to test DDE alone)&lt;BR /&gt;==&amp;gt; O.K.:&lt;BR /&gt;    Executable:/work/crh/8g/test/hello1&lt;BR /&gt;    PC Location: hello1       File: hello1.f   Line: 7&lt;BR /&gt;    Source: /work/crh/8g/test/hello1.f&lt;BR /&gt;    (To continue debugging this run makes no sense, &lt;BR /&gt;    because the call mpi_init needs mpirun.)&lt;BR /&gt;&lt;BR /&gt;export MPI_FLAGS=edde&lt;BR /&gt;mpirun -np 2 hello1&lt;BR /&gt;==&amp;gt; DDE GUI is opened:&lt;BR /&gt;    Executable:/work/crh/8g/test/hello1&lt;BR /&gt;    but:&lt;BR /&gt;    PC Location: `va(0)       File:        Line: 0&lt;BR /&gt;    Source: no source for `va(0)  [00000000]&lt;BR /&gt;    Stopped at: `va(0) (00000000) (`thread(1))&lt;BR /&gt;&lt;BR /&gt;Neither in dynatext nor on man pages I could find any hint&lt;BR /&gt;to overcome this problem. What's wrong ?&lt;BR /&gt;Thanks !  Roland&lt;BR /&gt;</description>
      <pubDate>Mon, 12 Feb 2001 14:44:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/dde-problem/m-p/2492478#M805532</guid>
      <dc:creator>Sabine Irmer</dc:creator>
      <dc:date>2001-02-12T14:44:34Z</dc:date>
    </item>
    <item>
      <title>Re: DDE problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/dde-problem/m-p/2492479#M805533</link>
      <description>This is known problem that is not yet documented.  By default, MPI processes create a hidden kernel thread to manage direct process-to-process bcopy between ranks.  DDE is attaching to the p2p bcopy threads instead of the main thread.  Since the p2p bcopy threads are kernel-only, there is no user-space context so dde gets an invalid PC.&lt;BR /&gt;&lt;BR /&gt;The workaround is to disable MPI p2p bcopy by setting the MPI_2BCOPY env var...&lt;BR /&gt;&lt;BR /&gt;  $ export MPI_2BCOPY=1&lt;BR /&gt;&lt;BR /&gt;This disables p2p bcopy, so that message transfers must be copied twice, once into shared memory and once out of it.  Depending on the nature of the application, disabling p2p bcopy usually decreases performance.  But, this shouldn't be a problem for debugging.&lt;BR /&gt;&lt;BR /&gt;This problem/workaround will either be fixed or documented for the next MPI release.</description>
      <pubDate>Tue, 13 Feb 2001 18:47:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/dde-problem/m-p/2492479#M805533</guid>
      <dc:creator>Sam Nicholls</dc:creator>
      <dc:date>2001-02-13T18:47:48Z</dc:date>
    </item>
    <item>
      <title>Re: DDE problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/dde-problem/m-p/2492480#M805534</link>
      <description>Thank you,  Sam Nicholls,&lt;BR /&gt;&lt;BR /&gt;for the prompt answer. Sorrily it didn't change the situation essentially.&lt;BR /&gt;The output is now:&lt;BR /&gt;&lt;BR /&gt;PC Location: _select_sys+0010 File: Line: 0&lt;BR /&gt;Source: no source for _select_sys+0010 [c01f2b68]&lt;BR /&gt;&lt;BR /&gt;Stopped at: _select_sys+0010 (C01F2B68)&lt;BR /&gt;&lt;BR /&gt;What else must we do to get the debugging run ?</description>
      <pubDate>Wed, 14 Feb 2001 11:58:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/dde-problem/m-p/2492480#M805534</guid>
      <dc:creator>Sabine Irmer</dc:creator>
      <dc:date>2001-02-14T11:58:28Z</dc:date>
    </item>
    <item>
      <title>Re: DDE problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/dde-problem/m-p/2492481#M805535</link>
      <description>Hi Sabine,&lt;BR /&gt;&lt;BR /&gt;This is normal behavior.  You're almost there.  The hello1 processes are stopped deep within the mpi_init() call.  That's why dde doesn't show any source.  Do the following in both dde windows...&lt;BR /&gt;&lt;BR /&gt;Use the down-arrow stack frame button to back out to the "main" frame.  It should be stack frame 8 and your source code will appear.&lt;BR /&gt;&lt;BR /&gt;Next, set a breakpoint somewhere after the mpi_init call.  Then, in the debugger input window, set the MPI_DEBUG_CONT global variable to 1...&lt;BR /&gt;&lt;BR /&gt;   set MPI_DEBUG_CONT = 1&lt;BR /&gt;&lt;BR /&gt;Now, do press "continue" and the program will proceed to the breakpoint.  From here you can debug as you normally would.&lt;BR /&gt;&lt;BR /&gt;What's happening is that, within mpi_init(), each hello1 process detects the MPI_FLAGS=edde environment variable.  So, before returning from mpi_init(), they fork/exec dde processes to attach to themselves.  They can't return from mpi_init() immediately because they have to give the dde processes a chance to attach.  So, the processes spin on the MPI_DEBUG_CONT global variable which is initialized to 0.  By setting it to 1 within DDE, you allow the processes to continue out of mpi_init().&lt;BR /&gt;&lt;BR /&gt;The MPI User's Guide talks about this in the "Debugging and Troubleshooting" chapter.  But it doesn't mention that you have to backout to the main stack frame to see your source.  It's a somewhat convoluted solution.  But there is no easy way to support multiprocess MPI programs with single-process debuggers.&lt;BR /&gt;&lt;BR /&gt;There's a really nice debugger for MPI called TotalView.  It supports multiprocess and multithread parallel programs (MPI, OpenMP, pthreads).  It's available for HP-UX, Solaris, Linux, AIX, and others.  And it supports C, C++, Fortran (77 and 90), and HPF.  Etnus worked closely with the MPI group at HP to port TotalView to HP-UX.  Demo copies of totalview are available for free.&lt;BR /&gt;&lt;BR /&gt;For more info, goto &lt;A href="http://www.etnus.com/" target="_blank"&gt;http://www.etnus.com/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;-sam&lt;BR /&gt;</description>
      <pubDate>Wed, 14 Feb 2001 20:48:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/dde-problem/m-p/2492481#M805535</guid>
      <dc:creator>Sam Nicholls</dc:creator>
      <dc:date>2001-02-14T20:48:05Z</dc:date>
    </item>
    <item>
      <title>Re: DDE problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/dde-problem/m-p/2492482#M805536</link>
      <description>Hi Sam,&lt;BR /&gt;&lt;BR /&gt;many thanks for your helpful instructions and explanations to run DDE under MPI.&lt;BR /&gt;Our simple example "hello1" is running well now. This is the good news and a&lt;BR /&gt;reason to enjoy.&lt;BR /&gt;&lt;BR /&gt;Sorrily our real program to debug is unable to continue from mpi_init in spite&lt;BR /&gt;of setting MPI_DEBUG_CONT = 1. The parallel processes are shown as running in&lt;BR /&gt;the top table but don't use CPU time. Whithout DDE the same binary file is&lt;BR /&gt;running well. Are there any other conditions which are neccessary for mixing MPI&lt;BR /&gt;and DDE, maybe a limit of the program file length to debug ? What informations&lt;BR /&gt;are interesting to fix this problem ? Do you have an idea ?&lt;BR /&gt;&lt;BR /&gt;You mentioned the wayout "Totalview". Till now we don't have this debugger. But&lt;BR /&gt;if you expect more problems with MPI and DDE this would be a strong argument for&lt;BR /&gt;us to apply for Totalview.&lt;BR /&gt;&lt;BR /&gt;With best regards&lt;BR /&gt;Roland&lt;BR /&gt;</description>
      <pubDate>Fri, 16 Feb 2001 11:18:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/dde-problem/m-p/2492482#M805536</guid>
      <dc:creator>Sabine Irmer</dc:creator>
      <dc:date>2001-02-16T11:18:44Z</dc:date>
    </item>
    <item>
      <title>Re: DDE problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/dde-problem/m-p/2492483#M805537</link>
      <description>Roland,&lt;BR /&gt;&lt;BR /&gt;The procedure you used for the simple test program should work for your application.  It sounds like the ranks are still blocking within mpi_init even though you told them to continue.  Here are some things to check...&lt;BR /&gt;&lt;BR /&gt;- Make sure you are setting MPI_DEBUG_CONT = 1 and doing the continue in *each* process.  mpi_init() is a collective operation and all the ranks must return from it together.  It calls to mpi_barrier() before returning and mpi_barrier() blocks until all ranks have called it.&lt;BR /&gt;&lt;BR /&gt;- Does the application do anything significant before calling mpi_init()?  Make it so the app calls mpi_init before doing anything else.&lt;BR /&gt;&lt;BR /&gt;- Install wdb and try it with MPI_FLAGS=egdb to see if the problem is specified to dde.&lt;BR /&gt;&lt;BR /&gt;-sam&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 16 Feb 2001 20:05:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/dde-problem/m-p/2492483#M805537</guid>
      <dc:creator>Sam Nicholls</dc:creator>
      <dc:date>2001-02-16T20:05:55Z</dc:date>
    </item>
  </channel>
</rss>

