<?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: call system help in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/call-system-help/m-p/755157#M10644</link>
    <description>&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
Are you supplying a "system" subroutine of your own? If so, did you supply an INTERFACE or put it in a MODULE? A real example would be needed to see if there is a bug here.&lt;BR /&gt;If you mean to use the one provided by ifort, it looks like you omitted "USE ifport," as you should have got compiler complaints about CALLing a function. Yes, it's incompatible with gfortran and g77. Remind me never to use this stuff without the following style:&lt;BR /&gt;&lt;BR /&gt;#ifdef _INTEL_COMPILER&lt;BR /&gt;USE ifport&lt;BR /&gt;#endif&lt;BR /&gt;...&lt;BR /&gt;#ifdef _INTEL_COMPILER&lt;BR /&gt;icode = system("yourscript")&lt;BR /&gt;#elif defined(__GNUC__)&lt;BR /&gt;call system('yourscript')&lt;BR /&gt;#else&lt;BR /&gt;error "system call in unknown compiler environment"&lt;BR /&gt;#endif&lt;BR /&gt;&lt;BR /&gt;Choosing cpp style, as that is mandated by OpenMP, thus supported by more compilers than other pre-processing styles.&lt;BR /&gt;Note that systemqq is equivalent, but has a logical rather than integer return type.&lt;BR /&gt;&lt;BR /&gt;Simple command lines are OK if they will work in a new copy of the same shell you used to start the program. You could also start a script which specifies which shell it runs. Backgrounding the script won't necessarily work the same in Windows, in case that interests you.&lt;BR /&gt;</description>
    <pubDate>Wed, 06 May 2009 13:29:39 GMT</pubDate>
    <dc:creator>TimP</dc:creator>
    <dc:date>2009-05-06T13:29:39Z</dc:date>
    <item>
      <title>call system help</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/call-system-help/m-p/755156#M10643</link>
      <description>in a old program, i have to run the executable together .let they are A,B and C&lt;BR /&gt;EXECUTABLE A and B&lt;BR /&gt;cd &lt;PATH of="" a=""&gt;&lt;BR /&gt;../a.out (see, the executable is one step up in directory tree)&lt;BR /&gt;&lt;BR /&gt;and for C&lt;BR /&gt;cd &lt;PATH to="" c=""&gt;&lt;BR /&gt;./c.out&lt;BR /&gt;&lt;BR /&gt;now, instead of running all the executable seperatly, i tried something like:&lt;BR /&gt;call system ('cd &lt;PATH of="" a=""&gt; &amp;amp;&amp;amp; ../a.out &amp;amp;')&lt;BR /&gt;in C main file.&lt;BR /&gt;expecting the job will run on background and transfer the control outside the call statement....but this is NOT what i am getting.&lt;BR /&gt;can anybody help me?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/PATH&gt;&lt;/PATH&gt;&lt;/PATH&gt;</description>
      <pubDate>Wed, 06 May 2009 09:07:04 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/call-system-help/m-p/755156#M10643</guid>
      <dc:creator>roddur</dc:creator>
      <dc:date>2009-05-06T09:07:04Z</dc:date>
    </item>
    <item>
      <title>Re: call system help</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/call-system-help/m-p/755157#M10644</link>
      <description>&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
Are you supplying a "system" subroutine of your own? If so, did you supply an INTERFACE or put it in a MODULE? A real example would be needed to see if there is a bug here.&lt;BR /&gt;If you mean to use the one provided by ifort, it looks like you omitted "USE ifport," as you should have got compiler complaints about CALLing a function. Yes, it's incompatible with gfortran and g77. Remind me never to use this stuff without the following style:&lt;BR /&gt;&lt;BR /&gt;#ifdef _INTEL_COMPILER&lt;BR /&gt;USE ifport&lt;BR /&gt;#endif&lt;BR /&gt;...&lt;BR /&gt;#ifdef _INTEL_COMPILER&lt;BR /&gt;icode = system("yourscript")&lt;BR /&gt;#elif defined(__GNUC__)&lt;BR /&gt;call system('yourscript')&lt;BR /&gt;#else&lt;BR /&gt;error "system call in unknown compiler environment"&lt;BR /&gt;#endif&lt;BR /&gt;&lt;BR /&gt;Choosing cpp style, as that is mandated by OpenMP, thus supported by more compilers than other pre-processing styles.&lt;BR /&gt;Note that systemqq is equivalent, but has a logical rather than integer return type.&lt;BR /&gt;&lt;BR /&gt;Simple command lines are OK if they will work in a new copy of the same shell you used to start the program. You could also start a script which specifies which shell it runs. Backgrounding the script won't necessarily work the same in Windows, in case that interests you.&lt;BR /&gt;</description>
      <pubDate>Wed, 06 May 2009 13:29:39 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/call-system-help/m-p/755157#M10644</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2009-05-06T13:29:39Z</dc:date>
    </item>
    <item>
      <title>Re: call system help</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/call-system-help/m-p/755158#M10645</link>
      <description>&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
According to the &lt;A href="http://gcc.gnu.org/onlinedocs/gcc-4.3.0/gfortran/SYSTEM.html#SYSTEM"&gt;gfortran documentation&lt;/A&gt;, its implementation of SYSTEM is as either a subroutine or a function (but only one at a time can be used in a program unit.) As best as I can tell, Intel Fortran behaves the same way, but if you USE IFPORT, then you must use it as a function. For portability, as best as one can be portable with a non-standard routine, it's probably best to use it as a function.&lt;BR /&gt;&lt;BR /&gt;In any event, I don't think that the form of the call is the issue here. To the best of my knowledge, SYSTEM will execute one command only, not a series of commands. Perhaps if you wrote a shell script you could invoke it with a call to SYSTEM.&lt;BR /&gt;</description>
      <pubDate>Wed, 06 May 2009 13:49:30 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/call-system-help/m-p/755158#M10645</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2009-05-06T13:49:30Z</dc:date>
    </item>
    <item>
      <title>Re: call system help</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/call-system-help/m-p/755159#M10646</link>
      <description>&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
That's interesting; I have used the function call form with apparent success with gfortran, then I read another copy of gfortran documentation which said only the subroutine was supported.&lt;BR /&gt;Anyway, it seemsmore reliableto write a script which specifies the shell, even when issuing a pair of commands.</description>
      <pubDate>Wed, 06 May 2009 23:19:50 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/call-system-help/m-p/755159#M10646</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2009-05-06T23:19:50Z</dc:date>
    </item>
    <item>
      <title>Re: call system help</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/call-system-help/m-p/755160#M10647</link>
      <description>&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
The OP also asked this in comp.lang.fortran, where a script was also recommended.&lt;BR /&gt;</description>
      <pubDate>Wed, 06 May 2009 23:28:21 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/call-system-help/m-p/755160#M10647</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2009-05-06T23:28:21Z</dc:date>
    </item>
  </channel>
</rss>

