<?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:Debugging my application with Intel mpirun on L... in Intel® MPI Library</title>
    <link>https://community.intel.com/t5/Intel-MPI-Library/Debugging-my-application-with-Intel-mpirun-on-Linux/m-p/1192206#M6925</link>
    <description>&lt;P&gt;Hi Vipul,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for reaching out to us.&lt;/P&gt;
&lt;P&gt;We have tried to replicate the issue with our sample program and found no error.&lt;/P&gt;
&lt;P&gt;Since you are getting Bad file descriptor error only while debugging with gdb, can you once check with -gtool for debugging.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;mpirun -n 16 -gtool "gdb:3,5,7-9=attach" ./myprog&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, have you got a similar error while using gdb without xterm?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;STRONG&gt;mpirun -gdb -n 4 ./test&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;For details on how to use -gtool and gdb please refer:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;A href="https://software.intel.com/content/www/us/en/develop/documentation/mpi-developer-guide-linux/top/debugging-applications/debugging.html" target="_blank" rel="noopener"&gt;https://software.intel.com/content/www/us/en/develop/documentation/mpi-developer-guide-linux/top/debugging-applications/debugging.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://software.intel.com/content/www/us/en/develop/documentation/mpi-developer-guide-linux/top/debugging-applications/using-gtool-for-debugging.html" target="_blank" rel="noopener"&gt;https://software.intel.com/content/www/us/en/develop/documentation/mpi-developer-guide-linux/top/debugging-applications/using-gtool-for-debugging.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is it possible for you to provide the code or a sample reproducer so we can test from our side?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;Regards&lt;/P&gt;
&lt;P&gt;&amp;nbsp;Prasanth&lt;/P&gt;</description>
    <pubDate>Tue, 14 Jul 2020 11:51:13 GMT</pubDate>
    <dc:creator>PrasanthD_intel</dc:creator>
    <dc:date>2020-07-14T11:51:13Z</dc:date>
    <item>
      <title>Debugging my application with Intel mpirun on Linux</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/Debugging-my-application-with-Intel-mpirun-on-Linux/m-p/1191967#M6921</link>
      <description>&lt;P&gt;I am trying to debug my MPI application. This has been built on CentOS 6.7 using Intel MPI libraries (version info below).&lt;/P&gt;
&lt;P&gt;I am trying run gdb in xterm (one each for each process). However, I am getting errors when the application calls MPI_INIT(). To invoke the run, I execute as&lt;/P&gt;
&lt;P&gt;$ mpirun -np &amp;lt;N&amp;gt; xterm -e gdb --args &amp;lt;application along with arguments&amp;gt;&lt;/P&gt;
&lt;P&gt;However, I get below errors (pasted below) for one of the processes. Interestingly, regardless of number of processes I run, this error always occurs in process with rank 2. The application runs successfully, if I run without gdb "mpirun -np &amp;lt;N&amp;gt; &amp;lt;application with arguments&amp;gt;"&lt;/P&gt;
&lt;P&gt;I am looking for help to try to figure out how t make it run. I am trying to get my application to move away from OpenMPI to Intel MPI, but this is a critical piece that needs to work for us to adapt. The total number of ranks will typically be a small number for us (&amp;lt; 16), so it is manageable using xterm. In fact, finally, we will bring it up on gdb under emacs, which provides a much better debugging experience.&lt;/P&gt;
&lt;P&gt;Appreciate any help that we can get.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Vipul&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;[cli_2]: write_line error; fd=17 buf=:cmd=init pmi_version=1 pmi_subversion=1&lt;BR /&gt;:&lt;BR /&gt;system msg for write_line failure : Bad file descriptor&lt;BR /&gt;[cli_2]: Unable to write to PMI_fd&lt;BR /&gt;[cli_2]: write_line error; fd=17 buf=:cmd=get_appnum&lt;BR /&gt;:&lt;BR /&gt;system msg for write_line failure : Bad file descriptor&lt;BR /&gt;Abort(1091087) on node 0 (rank 0 in comm 0): Fatal error in PMPI_Init: Other MPI error, error stack:&lt;BR /&gt;MPIR_Init_thread(136): &lt;BR /&gt;MPID_Init(709).......: &lt;BR /&gt;MPIR_pmi_init(105)...: PMI_Get_appnum returned -1&lt;BR /&gt;[cli_2]: write_line error; fd=17 buf=:cmd=abort exitcode=1091087&lt;BR /&gt;:&lt;BR /&gt;system msg for write_line failure : Bad file descriptor&lt;/P&gt;
&lt;P&gt;Intel(R) MPI Library for Linux* OS, Version 2019 Update 7 Build 20200312 (id: 5dc2dd3e9)&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jul 2020 18:01:27 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/Debugging-my-application-with-Intel-mpirun-on-Linux/m-p/1191967#M6921</guid>
      <dc:creator>vipulk</dc:creator>
      <dc:date>2020-07-13T18:01:27Z</dc:date>
    </item>
    <item>
      <title>Re:Debugging my application with Intel mpirun on L...</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/Debugging-my-application-with-Intel-mpirun-on-Linux/m-p/1192206#M6925</link>
      <description>&lt;P&gt;Hi Vipul,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for reaching out to us.&lt;/P&gt;
&lt;P&gt;We have tried to replicate the issue with our sample program and found no error.&lt;/P&gt;
&lt;P&gt;Since you are getting Bad file descriptor error only while debugging with gdb, can you once check with -gtool for debugging.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;mpirun -n 16 -gtool "gdb:3,5,7-9=attach" ./myprog&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, have you got a similar error while using gdb without xterm?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;STRONG&gt;mpirun -gdb -n 4 ./test&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;For details on how to use -gtool and gdb please refer:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;A href="https://software.intel.com/content/www/us/en/develop/documentation/mpi-developer-guide-linux/top/debugging-applications/debugging.html" target="_blank" rel="noopener"&gt;https://software.intel.com/content/www/us/en/develop/documentation/mpi-developer-guide-linux/top/debugging-applications/debugging.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://software.intel.com/content/www/us/en/develop/documentation/mpi-developer-guide-linux/top/debugging-applications/using-gtool-for-debugging.html" target="_blank" rel="noopener"&gt;https://software.intel.com/content/www/us/en/develop/documentation/mpi-developer-guide-linux/top/debugging-applications/using-gtool-for-debugging.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is it possible for you to provide the code or a sample reproducer so we can test from our side?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;Regards&lt;/P&gt;
&lt;P&gt;&amp;nbsp;Prasanth&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jul 2020 11:51:13 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/Debugging-my-application-with-Intel-mpirun-on-Linux/m-p/1192206#M6925</guid>
      <dc:creator>PrasanthD_intel</dc:creator>
      <dc:date>2020-07-14T11:51:13Z</dc:date>
    </item>
    <item>
      <title>Re: Re:Debugging my application with Intel mpirun on L...</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/Debugging-my-application-with-Intel-mpirun-on-Linux/m-p/1192213#M6926</link>
      <description>&lt;P&gt;Hi Prasanth,&lt;/P&gt;
&lt;P&gt;Thanks for your response.&lt;/P&gt;
&lt;P&gt;Yes, I am able to run the application in gdb using -gdb option of mpirun. However, it gives the below error when I try to run the gdb in a separate window.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am able to reproduce this problem with a simple c test (ring example from openmpi). As I mentioned earlier, strangely, this error occurs only in process with rank 2.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have attached the C application code for your reference. I run as&amp;nbsp;&lt;/P&gt;
&lt;P&gt;$&amp;nbsp;mpirun -n 5 xterm -e gdb --args /med/d/vipulk/sandboxes/try/ring_c 10&lt;/P&gt;
&lt;P&gt;The application is compiled using gcc 6.2 with below command:&lt;/P&gt;
&lt;P&gt;/med/build/gcc/gcc-6.2.0/rhel6/bin/gcc -I&amp;lt;&amp;gt;/INTELMPI/compilers_and_libraries_2020.1.217/linux/mpi/intel64/include /med/d/vipulk/sandboxes/intelmpi/ring_c.c -o /med/d/vipulk/sandboxes/try/ring_c -L&amp;lt;&amp;gt;/INTELMPI/compilers_and_libraries_2020.1.217/linux/mpi/intel64/lib/release -lmpi&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Vipul&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jul 2020 12:57:02 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/Debugging-my-application-with-Intel-mpirun-on-Linux/m-p/1192213#M6926</guid>
      <dc:creator>vipulk</dc:creator>
      <dc:date>2020-07-14T12:57:02Z</dc:date>
    </item>
    <item>
      <title>Re: Re:Debugging my application with Intel mpirun on L...</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/Debugging-my-application-with-Intel-mpirun-on-Linux/m-p/1192270#M6928</link>
      <description>&lt;P&gt;Is there a way/option for mpirun to not capture stdout/stderr of application execution?&lt;/P&gt;
&lt;P&gt;I am thinking that the issue could be that in my execution, the stdout of the application has been captured by gdb, but maybe, mpirun is also trying to capture the same (which causes the problem).&lt;/P&gt;
&lt;P&gt;I have been trying to work around this issue by running mpirun separately and then attaching the application process to my gdb independently. This works, however, the stdout/stderr still gets captured by mpirun, I am not able to see the stdout/stderr in my gdb execution.&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Vipul&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jul 2020 16:57:28 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/Debugging-my-application-with-Intel-mpirun-on-Linux/m-p/1192270#M6928</guid>
      <dc:creator>vipulk</dc:creator>
      <dc:date>2020-07-14T16:57:28Z</dc:date>
    </item>
    <item>
      <title>Re:Debugging my application with Intel mpirun on L...</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/Debugging-my-application-with-Intel-mpirun-on-Linux/m-p/1192909#M6939</link>
      <description>&lt;P&gt;Hi Vipul,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We have tried with the ring program you have provided and the program ran without any errors in xterm gdb.&lt;/P&gt;
&lt;P&gt;I have attached the screenshot of process 2 running.&lt;/P&gt;
&lt;P&gt;Also, we want to know is there any specific use case to use gdb in the external window?&lt;/P&gt;
&lt;P&gt;I am not aware of any such option to not capture stdout/stderr by mpirun which you were asking. I am doubtful whether it is possible or not.&lt;/P&gt;
&lt;P&gt;Could you post your command line or screenshots of what leading you to the file descriptor error?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;Prasanth&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jul 2020 12:59:44 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/Debugging-my-application-with-Intel-mpirun-on-Linux/m-p/1192909#M6939</guid>
      <dc:creator>PrasanthD_intel</dc:creator>
      <dc:date>2020-07-16T12:59:44Z</dc:date>
    </item>
    <item>
      <title>Re:Debugging my application with Intel mpirun on L...</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/Debugging-my-application-with-Intel-mpirun-on-Linux/m-p/1193807#M6948</link>
      <description>&lt;P&gt;Hi Vipul,&lt;/P&gt;&lt;P&gt;Is your problem resolved? if not please update us.&lt;/P&gt;&lt;P&gt;Also, can you provide us the command line of yours to reproduce the error, as we were not getting the error you have reported with the same program?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Prasanth&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 21 Jul 2020 05:53:26 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/Debugging-my-application-with-Intel-mpirun-on-Linux/m-p/1193807#M6948</guid>
      <dc:creator>PrasanthD_intel</dc:creator>
      <dc:date>2020-07-21T05:53:26Z</dc:date>
    </item>
    <item>
      <title>Re: Re:Debugging my application with Intel mpirun on L...</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/Debugging-my-application-with-Intel-mpirun-on-Linux/m-p/1193981#M6951</link>
      <description>&lt;P&gt;Hi Prasanth,&lt;/P&gt;
&lt;P&gt;Sorry about a late reply.&lt;/P&gt;
&lt;P&gt;I am using the command 'mpirun -n 7 xterm -e gdb --args ring_c 10' to run the application under gdb.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I didn't reply earlier because I was having trouble reproducing the issue. It turns out that by chance I was running on a different host with a different gdb in path and then issue didn't reproduce.&lt;/P&gt;
&lt;P&gt;The gdb that seems to be working happens to be version 7.6.1-114.el7 (which is /bin/gdb on that host with OS CentOS 7.6.1810). On other machines, I have attempted to use newer gdb version (8.2), but it gives the same problem (process with PMI_RANK 2 fails in MPI_INIT function).&lt;/P&gt;
&lt;P&gt;So, it appears to be related to gdb version (or may be some other configuration that I cannot yet understand). Do you have ideas that I could try?&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Vipul&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jul 2020 23:49:22 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/Debugging-my-application-with-Intel-mpirun-on-Linux/m-p/1193981#M6951</guid>
      <dc:creator>vipulk</dc:creator>
      <dc:date>2020-07-21T23:49:22Z</dc:date>
    </item>
    <item>
      <title>Re:Debugging my application with Intel mpirun on L...</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/Debugging-my-application-with-Intel-mpirun-on-Linux/m-p/1194453#M6966</link>
      <description>&lt;P&gt;Hi Vipul,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;We have tested the code you have provided with xterm gdb 8.2 multiple times but did not get the error.&lt;/P&gt;&lt;P&gt;This seems like a problem from GDB and not Intel MPI.&lt;/P&gt;&lt;P&gt;We are transferring you query to the Subject matter experts for better suggestions.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Prasanth&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 24 Jul 2020 10:26:08 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/Debugging-my-application-with-Intel-mpirun-on-Linux/m-p/1194453#M6966</guid>
      <dc:creator>PrasanthD_intel</dc:creator>
      <dc:date>2020-07-24T10:26:08Z</dc:date>
    </item>
    <item>
      <title>Re: Re:Debugging my application with Intel mpirun on L...</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/Debugging-my-application-with-Intel-mpirun-on-Linux/m-p/1194470#M6967</link>
      <description>&lt;P&gt;Hi Prasanth,&lt;/P&gt;
&lt;P&gt;Thanks for trying this out. I have not been able to understand the cause so far with my experiments.&lt;/P&gt;
&lt;P&gt;So, please do let me know if you find anything. It is also possible that there is a setup/configuration issue here. But I cannot figure out what.&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Vipul&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jul 2020 13:48:57 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/Debugging-my-application-with-Intel-mpirun-on-Linux/m-p/1194470#M6967</guid>
      <dc:creator>vipulk</dc:creator>
      <dc:date>2020-07-24T13:48:57Z</dc:date>
    </item>
  </channel>
</rss>

