Re: allocating arrays, trouble
- From: mlm@xxxxxxxxx (michael)
- Date: Mon, 26 Nov 2007 14:43:21 +0000 (UTC)
To repeat, you did not declare the variable, as you misspelled it.
Michael
In article <13e70ff2-e276-428a-8ec6-8258be941aa5@xxxxxxxxxxxxxxxxxxxxxxxxxxx>,
chain_lube@xxxxxxxxxxx says...
On Nov 26, 2:21 pm, Arjen Markus <arjen.mar...@xxxxxxxxxx> wrote:
On 26 nov, 14:59, Reinhold Bader <Ba...@xxxxxx> wrote:our
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
F=F6rster vom Silberwald wrote:
[snip]
PS: However, still I am interested in my original question: why can't
I pass buffer integer variables to a subroutine so as to allocate an
array and memory? Is this due to my ifort compiler?
ifort puts automatics on the stack. There are two workarounds: Either
* increase your stack limit (e.g., via the "ulimit -s ..." command) in y=
shell before running a.out
* use the -heap-arrays switch supported by newer ifort (9.1+) releases.
Regards
Reinhold
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with SUSE -http://enigmail.mozdev.org
iD8DBQFHStFfFVLhKuD7VgsRAn9EAJ43pnr2UluwfoGB027LDBxlEekRCQCeOFy6
pQd3K8JNYAQiHnSnH6EjvMQ=3D
=3DItq0
-----END PGP SIGNATURE-----
Well, actually there is another one:
Explicitly allocate the arrays you need at the start.
BTW, Steve Lionel posted a link the other day to a series
of articles that expose some of the finer details of Fortran.
One of these concerns the use of the stack. I recommend
reading it.
Regards,
Arjen
Thanks for all the tips (I really appreciate it). But still I do not
get it: what is the difference between passing a buffer variable
(which actually holds the dimension!) and hard coding the dimension
into the declare statement?
Is this a compiler issue or just prohibited in Fortran 90?
Thanks
.
- Follow-Ups:
- Re: allocating arrays, trouble
- From: Förster vom Silberwald
- Re: allocating arrays, trouble
- References:
- Re: allocating arrays, trouble
- From: Förster vom Silberwald
- Re: allocating arrays, trouble
- From: Wade Ward
- Re: allocating arrays, trouble
- From: Förster vom Silberwald
- Re: allocating arrays, trouble
- From: Arjen Markus
- Re: allocating arrays, trouble
- From: Förster vom Silberwald
- Re: allocating arrays, trouble
- From: Arjen Markus
- Re: allocating arrays, trouble
- From: Förster vom Silberwald
- Re: allocating arrays, trouble
- From: Arjen Markus
- Re: allocating arrays, trouble
- From: Förster vom Silberwald
- Re: allocating arrays, trouble
- From: Reinhold Bader
- Re: allocating arrays, trouble
- From: Förster vom Silberwald
- Re: allocating arrays, trouble
- Prev by Date: Re: allocating arrays, trouble
- Next by Date: Re: C String Prefix Operator Idea (Was: gfortran diagnostics and so on)
- Previous by thread: Re: allocating arrays, trouble
- Next by thread: Re: allocating arrays, trouble
- Index(es):
Relevant Pages
|
|