Re: Writing output files to memory
- From: pa@xxxxxxxxxxxxxxxxxxxxx (Pierre Asselin)
- Date: Fri, 29 Apr 2005 14:09:17 +0000 (UTC)
justabeginner <nom_de_plume79@xxxxxxxxxxx> wrote:
> Hi, is it possible for me to get Fortran to write its output files to
> memory instead of to a file on the hard drive? If so, what is the
> command I should use so I can look it up? I am using SuSE 9.2 with the
> Intel Fortran compiler.
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. 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.
Google for "tmpfs howto" and you will find links like this one:
http://www-106.ibm.com/developerworks/library/l-fs3.html
Also, check whether your computer already has a tmpfs setup.
On my Gentoo laptop, the "mount" command shows that /dev/shm
is a tmpfs.
> Some people told me I need to write to
> /dev/null, but they weren't sure how to proceed beyond that.
That's to throw things away.
> 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?
They're in memory, but they look like files. Just don't poweroff!
> The next step for me will be to send these output files from Fortran
> over a distributed computing network. I suppose it is unavoidable that
> I will need to write the files to the hard disks then?
Again, that's not a Fortran question. Most people use NFS to share files
across computational nodes.
--
pa at panix dot com
.
- Follow-Ups:
- Re: Writing output files to memory
- From: glen herrmannsfeldt
- Re: Writing output files to memory
- References:
- Writing output files to memory
- From: justabeginner
- Writing output files to memory
- Prev by Date: Writing output files to memory
- Next by Date: Re: Writing output files to memory
- Previous by thread: Writing output files to memory
- Next by thread: Re: Writing output files to memory
- Index(es):
Relevant Pages
|