<?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: Redirect output(data files) to another directory in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Redirect-output-data-files-to-another-directory/m-p/757751#M13238</link>
    <description>&lt;DIV style="margin: 0px; height: auto;"&gt;&lt;/DIV&gt;
&lt;BR /&gt;You might try experimenting with CHDIR(dir_name) after opening up your input files (assuming CHDIR works on Linux). Prior to issuing CHDIR you might want to issue GETCWD to get (save) original current working director such that you can restore this prior to program exit.&lt;BR /&gt;&lt;BR /&gt;The CHDIR can use a directory specified as an environment variable which you can set just prior to launching the app. Or you can pass in the directory as a command line argument. Your choice.&lt;BR /&gt;&lt;BR /&gt;Jim Dempsey&lt;BR /&gt;</description>
    <pubDate>Sat, 08 Aug 2009 15:43:09 GMT</pubDate>
    <dc:creator>jimdempseyatthecove</dc:creator>
    <dc:date>2009-08-08T15:43:09Z</dc:date>
    <item>
      <title>Redirect output(data files) to another directory</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Redirect-output-data-files-to-another-directory/m-p/757749#M13236</link>
      <description>&lt;P&gt;How to redirect data files to another(from directory where my executable file and loading data are located) directory.&lt;/P&gt;
&lt;P&gt;Is it possible to do it from command line at the same time, when I start the code?&lt;/P&gt;</description>
      <pubDate>Fri, 07 Aug 2009 16:12:32 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Redirect-output-data-files-to-another-directory/m-p/757749#M13236</guid>
      <dc:creator>lessonfree</dc:creator>
      <dc:date>2009-08-07T16:12:32Z</dc:date>
    </item>
    <item>
      <title>Re: Redirect output(data files) to another directory</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Redirect-output-data-files-to-another-directory/m-p/757750#M13237</link>
      <description>&lt;DIV&gt;&lt;/DIV&gt;
There are programmatic methods available for a program to process command line arguments (GETARG) and thuscontrol the location of output files via the OPEN.&lt;BR /&gt;&lt;BR /&gt;If the files are not named in the OPEN, then maybe you can utilize the Intel Fortran specific environment variable control discussed in the Intel Fortran Users Guide in the section titled &lt;STRONG&gt;Assigning Files to Logical Units&lt;/STRONG&gt;.&lt;BR /&gt;&lt;BR /&gt;This environment variable methodpermits setting paths to specific files. For example,&lt;BR /&gt;&lt;BR /&gt;export FORT30=/tmp/output&lt;BR /&gt;&lt;BR /&gt;After executing the preceding bash/sh command,when the program executes, allI/O statements to unit 30 will refer to file &lt;STRONG&gt;output&lt;/STRONG&gt; in the specified directory, &lt;STRONG&gt;/tmp&lt;/STRONG&gt;.&lt;BR /&gt;&lt;BR /&gt;Again, this only works when a file name is not specified in the OPEN statement. You just need knowledge of the unit number to be able to control the path and the name of the file.&lt;BR /&gt;</description>
      <pubDate>Fri, 07 Aug 2009 18:48:04 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Redirect-output-data-files-to-another-directory/m-p/757750#M13237</guid>
      <dc:creator>Kevin_D_Intel</dc:creator>
      <dc:date>2009-08-07T18:48:04Z</dc:date>
    </item>
    <item>
      <title>Re: Redirect output(data files) to another directory</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Redirect-output-data-files-to-another-directory/m-p/757751#M13238</link>
      <description>&lt;DIV style="margin: 0px; height: auto;"&gt;&lt;/DIV&gt;
&lt;BR /&gt;You might try experimenting with CHDIR(dir_name) after opening up your input files (assuming CHDIR works on Linux). Prior to issuing CHDIR you might want to issue GETCWD to get (save) original current working director such that you can restore this prior to program exit.&lt;BR /&gt;&lt;BR /&gt;The CHDIR can use a directory specified as an environment variable which you can set just prior to launching the app. Or you can pass in the directory as a command line argument. Your choice.&lt;BR /&gt;&lt;BR /&gt;Jim Dempsey&lt;BR /&gt;</description>
      <pubDate>Sat, 08 Aug 2009 15:43:09 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Redirect-output-data-files-to-another-directory/m-p/757751#M13238</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2009-08-08T15:43:09Z</dc:date>
    </item>
    <item>
      <title>Re: Redirect output(data files) to another directory</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Redirect-output-data-files-to-another-directory/m-p/757752#M13239</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="width: 100%; margin-top: 5px;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/416608"&gt;lessonfree&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt;
&lt;P&gt;How to redirect data files to another(from directory where my executable file and loading data are located) directory.&lt;/P&gt;
&lt;P&gt;Is it possible to do it from command line at the same time, when I start the code?&lt;/P&gt;
&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;There are two other simple ways to redirect output in addition to those mentioned above.&lt;BR /&gt;&lt;BR /&gt;1) If the entire output is done using default i/o unit you can simply do this:&lt;BR /&gt;&lt;BR /&gt;./myprogram &amp;gt; /mypath/myoutput.txt&lt;BR /&gt;&lt;BR /&gt;2) If the output is done into several files called out1, out2, ... then you can create the following links before executing your program:&lt;BR /&gt;&lt;BR /&gt;ln -s /mypath1/mynewout1 out1&lt;BR /&gt;ln -s /mypath2/mynewout2 out2&lt;BR /&gt;...&lt;BR /&gt;./myprogram&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 10 Aug 2009 08:33:40 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Redirect-output-data-files-to-another-directory/m-p/757752#M13239</guid>
      <dc:creator>bubin</dc:creator>
      <dc:date>2009-08-10T08:33:40Z</dc:date>
    </item>
  </channel>
</rss>

