Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [photran] Photran indexer hanging, OutOfMemory, &c.

Jeffrey Overbey wrote:
> Hi Bob,
> 
>> I have a 50k line chunk of Fortran code I've recently migrated from
> ...
>> Per the FAQ, I've added " -vmargs -Xmx512M" but to no avail. I've pushed
>> the heap size up to 768MB on the XP box with 1GB RAM, and up to 1024MB
>> on the 8-core Vista box with 16GB of RAM. In all cases, the indexer
> ...
>> The code uses INCLUDE to share common blocks and I'm wondering if that
>> has any impact. The code itself isn't too large (54 kloc total, 38 kloc
> 
> Is the 50KLOC all in one file, or spread among several files?  If you
> inserted the contents of all the INCLUDE files, about how big would it be?

Removing comments and substituting in the INCLUDE files, the grand total
is 64022 lines split out as:

AMIO.F90      8580
AMIO1.F90     7653
AMOD.F90      9220
AMOD1.F90    10131
AMOD2.F90     7784
DCRT.F90      1245
FATE.F90      2106
GRAPHITE.F90   732
JTFLOW2.F90   3032
MCO.F90       2482
MCO1.F90      7370
SLUDGE.F90    3687

Ideally, the Powers That Be will let me convert the INCLUDE files to
modules; I'd like to drag this code into this millennium...

> For the most part, the indexer and refactorings work with one file at a
> time, so if they're hitting a memory limit, it would be due to a single
> large file.

Ok, that gives me a migration path. Inconvenient, but way way way less
error-prone tedium than converting to IMPLICIT NONE by hand.

> If you keep pushing up the heap size -- perhaps try -vmargs -Xmx2048M or
> even more if you're on a 64-bit platform -- does it eventually work?

No, Eclipse won't start if I push the heap size past the limits I tried.
I added memory in increments of 512M or 256M, so I might be able to push
limits a little further, but not a whole lot.

> Also, do you have several other Eclipse plug-ins running?  (The memory
> is shared among the Eclipse Platform and all of the plug-ins...)  If you
> click Window > Preferences, go to the General category, and click "Show
> heap status," you can monitor the memory usage in the lower right-hand
> corner (in the status bar).  I'm curious where those numbers are.

I'll light things on fire and send in some results.

> We have a situation similar to this in the test suite, so it's
> interesting you're running into this problem.  If your code is something
> you could share with us (under an NDA or whatever), we could add it to
> Photran's test suite as well -- please contact me individually if that's
> a possibility.

I'll ask but the code is proprietary so I doubt I could let it out of
the building(*), however I'd be willing to run tests here and gather
metrics if that helps with development.

Thanks for the quick response; I'll see what I can dig up here,

-- Bob

(*) If you need to analyze containers of radioactive sludge or burning
equipment, contact me off list. :)


Back to the top