Re: Writing output files to memory



In article <b7ff0972.0504290511.347675cf@xxxxxxxxxxxxxxxxxx>,
nom_de_plume79@xxxxxxxxxxx (justabeginner) 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?...

I think you need to concentrate first on what it is that you are aiming
to achieve. From the little I can see, I doubt that "writing a file to
memory" will achieve anything for you, so it is sort of pointless to
answer that literal question. Where did this "write a file to memory"
thing even come from? Start with objectives instead of with a vague idea
of a solution.

> 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?

Well, if you have no access to this program's source code, then that's
sort of limiting. Presumably this program has some specific defined
interface requirements. You'll have to meet those. I can't guess what
they are; neither van anyone else. I'm not sure what good you think it
would do you to figure out what memory address some file was written to
if you then don't have anything to do with this memory address. I assume
that this program doesn't ask for a "memory address of a file"; that
would be a truly strange (and ill-defined) specification.

> 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?

Then what was the role of this purported 3rd party program? Is your data
going to this 3rd party program or over a net? Or is it maybe
independently going to both places?

I guess the summary is that you haven't stated your actual requirements
in a way that can be answered.

1. If you need to send data to a program whose source code you can't
change, then you need to know the *PRECISE* requirements of that
program. There isn't any universal magic wand for sending data. If you
can modify both the sending and receiving programs, then there are lots
of possibilities. But if you can't modify the receiving program, then it
is just a matter of reading it documentation and conforming to it. If it
doesn't have documentation, you are in deep trouble (reverse engineering
is not simple).

2. There are many, many completely different ways to communicate data
across a net. There are whole books on the subject (quite a lot of
them). That's simply not enough specification for a useful answer. Many
of the ways don't involve "files" at all. For the most part, those ways
that do involve files have nothing to do with Fortran - they have to do
with files, regardless of how the files are made.

--
Richard Maine | Good judgment comes from experience;
email: my first.last at org.domain | experience comes from bad judgment.
org: nasa, domain: gov | -- Mark Twain
.



Relevant Pages

  • Writing output files to memory
    ... Intel Fortran compiler. ... If I do get Fortran to write to memory, I will then require a 3rd ... The next step for me will be to send these output files from Fortran ... over a distributed computing network. ...
    (comp.lang.fortran)
  • Re: allocatable non-dummy local variables and pointers to them
    ... must release the memory used by a process when the process terminates. ... I do remember that Fortran Powerstation 4.0 did have a memory leak ... digging to find whether it claims to be an f90 or f95 compiler. ... compiler has to behave for allocatables that get undefined allocation ...
    (comp.lang.fortran)
  • Re: Handling large datasets in Fortran
    ... Obviously, when you have too much data to fit in memory, you have to ... I have read that Fortran has exceptional abilities in the ... I then need to retrieve comparisons for a set of ... and subset the internal file using intrisics like WHERE and PACK? ...
    (comp.lang.fortran)
  • Re: segmentation fault on calloc
    ... It was written in Fortran and later translated by someone in C. ... segmentation comes in vcalc when it is called by my fortran sub. ... of calloc, it failed... ... Maybe I am calling my added function in a part that some memory have been ...
    (comp.unix.programmer)
  • Re: recursion, stack, fortran
    ... technology has gone that I have just purchased a 4MByte memory stick ... One thing I found on arrival here in NM was an old IBM fortran manual. ... it was a Pound sign ... Dave Flower ...
    (comp.lang.fortran)