comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: unloading a dlm...
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: unloading a dlm... [message #26610 is a reply to message #26598] Tue, 11 September 2001 05:05 Go to previous messageGo to previous message
Nigel Wade is currently offline  Nigel Wade
Messages: 286
Registered: March 1998
Senior Member
Randall Skelton wrote:
> Rats!
>
> \begin{rant}
>
> My *real* problem here is with this Fortran 77 model, which is still
> being actively developed using F77!? Fortran 77 if fine for algorithms,
> but for writing large applications, use Fortran 90 at the very least!
>
> \end{rant}
>
> My problem is that I've been told to use a particular atmospheric
> radiative transfer model written in F77. The program reads a bunch of
> input cards/files (shutter), and outputs some rather large files (data is
> in 2-3 2 dimensional arrays). I need to run this model numerous times in
> an optimization/fitting process and a significant portion of the
> processing time is in the reading/writing of the files. My thought was
> that I would write a DLM that copies (or memory maps) between the Fortran
> data and IDL. This proved to be much easier than I thought it would be;
> however, the F77 routines don't pass around variables between subroutines
> (with the exception of error flags and the odd logical type). Rather,
> they use 30+ common blocks and, this being Fortran 77, each array in a
> block is fixed to a maximum size which makes the program rather bloated in
> memory. What I would like to be able to do is use a DLM to run the model,
> use mem-copy to copy the relevant portions of the data into IDL arrays
> (created in C), and then drop the bloated model from memory! I have a few
> objections to using a 'reset-session' as a programming call, not the least
> of which is that it will also destroy my newly created data arrays as
> well.
>
> Thanks for all the suggestions and sorry about the rant... It looks as if
> I am back to using shell scripts and 'spawn.'
>
> Cheers,
> Randall
>
> PS: If anyone has a radiative transfer model capable of producing
> high-resolution, atmospheric absorption, transmission, and emission
> spectra for occultation, nadir, and limb geometries from HITRAN data that
> is written in F90, C, C++, or IDL, please drop me an email...
>


If this is running in a virtual memory system does it matter that the
data is still residing in virtual memory?

If you don't touch the pages which contain that data it will get swapped
out as other applications (or the same one) require physical memory.
Provided you have sufficient swap space to accommodate the necessary
swap pages you should not notice any difference to actually reducing the
size of the application. In many environments, even if you can remove
the DLM the amount of memory required by IDL won't reduce as the virtual
memory is not given back to the OS.

As an alternative, can you use the data directly from the common blocks
via IDL_ImportArray rather than creating a new array and copying the
contents? I've never tried using a FORTRAN DLM, but I would have thought
that if you can determine the address of the array that would be
sufficient. You may need to reverse the indexing as I think IDL accesses
arrays in C order rather than the FORTRAN order.
--
-----------------------------------------------------------
Nigel Wade, System Administrator, Space Plasma Physics Group,
University of Leicester, Leicester, LE1 7RH, UK
E-mail : nmw@ion.le.ac.uk
Phone : +44 (0)116 2523568, Fax : +44 (0)116 2523555
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Rotate volumes
Next Topic: Calling LAPACK from IDL

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Oct 11 15:26:43 PDT 2025

Total time taken to generate the page: 1.36082 seconds