<?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 Coarray programming: running n external program in n different  in Intel® Moderncode for Parallel Architectures</title>
    <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Coarray-programming-running-n-external-program-in-n-different/m-p/788117#M345</link>
    <description>Sorry that nobody answered this in a while, but it isn't really appropriate for this forum. It would be better posted in the Intel Fortran for Linux and Mac OS forum. (or Windows - I can't tell which you're using). I will ask to have it moved there.&lt;BR /&gt;&lt;BR /&gt;What does your real application want to do here? The loop you have is rather odd as it would always call SYSTEM in each image - the loop accomplishes nothing. Also, I suspect that the assignment to "me" wants to call this_image rather than num_images, though the code you have here never uses the variable. And, because the SYSTEM command runs in a separate process, the "cd" command would have no effect on the running program.&lt;BR /&gt;&lt;BR /&gt;Typically a coarray program would not try to invoke external programs from the images. Theoretically, it should work, but may not do what you want. I note that the documentation says that SYSTEM waits on Windows, presumably it doesn't on Linux.</description>
    <pubDate>Thu, 28 Jul 2011 00:33:47 GMT</pubDate>
    <dc:creator>Steven_L_Intel1</dc:creator>
    <dc:date>2011-07-28T00:33:47Z</dc:date>
    <item>
      <title>Coarray programming: running n external program in n different image on the same processor (Fortran)</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Coarray-programming-running-n-external-program-in-n-different/m-p/788116#M344</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;The situation is that I have an Coarray fortran program. I run it and it's distributed on N processors, and each of these processes should call an external program.&lt;/P&gt;&lt;P&gt;This external program is anexe program, however I want to run it in serial, on the processor that is calling it, as if it were part of the fortran program. The fortran program waits until the external program has completed, and then continues.&lt;/P&gt;&lt;P&gt;The problem is that coarray program only call the exe program once in one image if the command "CALL system". If I deleted the command 'call system(......)', it works well.&lt;/P&gt;&lt;P&gt;Can anyone tell me how I can call the program and ensure it runs only on this processor?&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;---&lt;/P&gt;&lt;P&gt;Extra information that might be helpful:&lt;/P&gt;&lt;P&gt;It simply run well if I don't use the command "call system". The result show that num_images: 1. The Coarray program is&lt;BR /&gt;-----------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;program HelloWorld1&lt;/P&gt;&lt;P&gt;implicit none&lt;/P&gt;&lt;P&gt;character(len=150)::str&lt;/P&gt;&lt;P&gt;integer :: me,i&lt;/P&gt;&lt;P&gt;me = num_images()&lt;/P&gt;&lt;P&gt;do i=1,num_images()&lt;/P&gt;&lt;P&gt;if(this_image() == i) then&lt;/P&gt;&lt;P&gt;CALL system('cd ..')&lt;/P&gt;&lt;P&gt;print *,'num_images:',num_images()&lt;/P&gt;&lt;P&gt;end if&lt;/P&gt;&lt;P&gt;end do&lt;/P&gt;&lt;P&gt;sync all&lt;/P&gt;&lt;P&gt;pause&lt;/P&gt;&lt;P&gt;end program HelloWorld1&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------&lt;BR /&gt;&lt;BR /&gt;But if delete this sentence "CALL system('cd ..')" ,the program works well, num_images=4. Why about this problem? How to do it tocall an external program indifferent processes?&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jul 2011 07:56:26 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Coarray-programming-running-n-external-program-in-n-different/m-p/788116#M344</guid>
      <dc:creator>reservoirs</dc:creator>
      <dc:date>2011-07-15T07:56:26Z</dc:date>
    </item>
    <item>
      <title>Coarray programming: running n external program in n different</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Coarray-programming-running-n-external-program-in-n-different/m-p/788117#M345</link>
      <description>Sorry that nobody answered this in a while, but it isn't really appropriate for this forum. It would be better posted in the Intel Fortran for Linux and Mac OS forum. (or Windows - I can't tell which you're using). I will ask to have it moved there.&lt;BR /&gt;&lt;BR /&gt;What does your real application want to do here? The loop you have is rather odd as it would always call SYSTEM in each image - the loop accomplishes nothing. Also, I suspect that the assignment to "me" wants to call this_image rather than num_images, though the code you have here never uses the variable. And, because the SYSTEM command runs in a separate process, the "cd" command would have no effect on the running program.&lt;BR /&gt;&lt;BR /&gt;Typically a coarray program would not try to invoke external programs from the images. Theoretically, it should work, but may not do what you want. I note that the documentation says that SYSTEM waits on Windows, presumably it doesn't on Linux.</description>
      <pubDate>Thu, 28 Jul 2011 00:33:47 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Coarray-programming-running-n-external-program-in-n-different/m-p/788117#M345</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2011-07-28T00:33:47Z</dc:date>
    </item>
  </channel>
</rss>

