Re: Help requested troubleshooting code
- From: e p chandler <epc8@xxxxxxxx>
- Date: Tue, 19 Feb 2008 17:53:29 -0800 (PST)
On Feb 16, 4:15 pm, pixel <p...@xxxxxxxx> wrote:
Zachary Davis wrote:
I've run into a segmentation fault runtime error with a fortran code
that I've been writing, which I no doubt think has to do with some
out-of-bounds arrays I've declared and used, but I'm not certain of
where my mistake lies...
program prandtl meyer
for starters,
xx.f90(1) : Error: Syntax error, found IDENTIFIER 'MEYER' when expecting
one of: <END-OF-STATEMENT>
program prandtl meyer
----------------------^
and some 30 others...
It's fixed format code. This point is explained in other postings.
Invest in a commercial grade compiler, and your workload will get
easier. I had to hold my nose looking at this evagelically (non
fortran) inspired code style - simply awful.
The OPs code IS pretty ripe. The major problem is that all of the
variables are global, all are arrays and all arrays are the same size.
There is no distinction made between temporaries which really are
local to either the predictor loop or the corrector loop and between
variables shared between these two loops. In addition, there are
several loop invariants which should be moved out and there are
numerous common sub-expressions which should be converted to
temporaries.
While memory space is no longer a real concern, IMO the code would be
easier to understand if it was written as a series of recurrences
rather than naked access to array elements.
-- e
.
- References:
- Help requested troubleshooting code
- From: Zachary Davis
- Re: Help requested troubleshooting code
- From: pixel
- Help requested troubleshooting code
- Prev by Date: Re: converter
- Next by Date: Re: using dot_product from c++ II
- Previous by thread: Re: Help requested troubleshooting code
- Next by thread: using dot_product from c++ II
- Index(es):
Relevant Pages
|