Re: Writing output files to memory
- From: glen herrmannsfeldt <gah@xxxxxxxxxxxxxxxx>
- Date: Fri, 29 Apr 2005 11:24:20 -0700
Pierre Asselin wrote:
(snip)
This is not a Fortran question but: probably yes, because your
operating system has a "tmpfs" filesystem. You can create something
that looks like a directory but is kept in memory (or swap, if it
gets too big). You need the root password for that.
Well, if the system already has a tmpfs file system then just use it.
It is sometimes used for /tmp, which is why it is named tmpfs.
That is especially useful for C compilers that write intermediate files to /tmp.
> If you run your Fortran program in this directory it will probably save its
files there with no change. Of course the tmpfs is lost if you shut down.
(snip)
If I do get Fortran to write to memory, I will then require a 3rd party program (I have no access to this program's source code) to locate the output file in memory so that it can read/write to it. How do I know what memory address Fortran has written to?
In the most common use of internal WRITE, a scalar variable is used, and a single record (line) is written. You can also use an array of CHARACTER variables, in which case each record is written to an array element. One could, then, write an entire file to a CHARACTER array, and then do something with it. Though I agree with the other posts, that this doesn't seem likely to be the solution you want.
-- glen
.
- References:
- Writing output files to memory
- From: justabeginner
- Re: Writing output files to memory
- From: Pierre Asselin
- Writing output files to memory
- Prev by Date: Re: Set union
- Next by Date: Re: compilation problem with module function interface definition
- Previous by thread: Re: Writing output files to memory
- Next by thread: Re: Writing output files to memory
- Index(es):
Relevant Pages
|