Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

Variables don't; constants aren't.


devel / comp.lang.fortran / Re: runtime error

SubjectAuthor
* runtime errorThando Mothogoane
`- Re: runtime errorThomas Koenig

1
runtime error

<746d1a7a-c4e3-437d-9844-8b75d1a6838fn@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2659&group=comp.lang.fortran#2659

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a05:620a:4053:b0:6b5:df8f:3573 with SMTP id i19-20020a05620a405300b006b5df8f3573mr11687359qko.578.1659356058185;
Mon, 01 Aug 2022 05:14:18 -0700 (PDT)
X-Received: by 2002:a25:b92:0:b0:672:96c3:89d with SMTP id 140-20020a250b92000000b0067296c3089dmr10269265ybl.467.1659356058015;
Mon, 01 Aug 2022 05:14:18 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.fortran
Date: Mon, 1 Aug 2022 05:14:17 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=152.106.99.148; posting-account=wKQ3wgoAAACPFWB_R1CfX1dr543NMTmP
NNTP-Posting-Host: 152.106.99.148
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <746d1a7a-c4e3-437d-9844-8b75d1a6838fn@googlegroups.com>
Subject: runtime error
From: ramodubjane@gmail.com (Thando Mothogoane)
Injection-Date: Mon, 01 Aug 2022 12:14:18 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1437
 by: Thando Mothogoane - Mon, 1 Aug 2022 12:14 UTC

Dear Fortran team,

Can you please assist me with solving the error:

compute-060:/idia/users/thando/magphys> ./make_zgrid
0
At line 64 of file make_zgrid.f
Fortran runtime error: Index '0' of dimension 2 of array 'flux_obs' below lower bound of 1

Error termination. Backtrace:
#0 0x7f988749ad5a
#1 0x7f988749b869
#2 0x7f988749bee6
#3 0x55d5dc7f7cb8
#4 0x55d5dc7f8e1b
#5 0x7f98871600b2
#6 0x55d5dc7f718d
#7 0xffffffffffffffff

Re: runtime error

<tc8v12$mad$1@newsreader4.netcologne.de>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2660&group=comp.lang.fortran#2660

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!.POSTED.2001-4dd7-dd1e-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de!not-for-mail
From: tkoenig@netcologne.de (Thomas Koenig)
Newsgroups: comp.lang.fortran
Subject: Re: runtime error
Date: Mon, 1 Aug 2022 16:29:22 -0000 (UTC)
Organization: news.netcologne.de
Distribution: world
Message-ID: <tc8v12$mad$1@newsreader4.netcologne.de>
References: <746d1a7a-c4e3-437d-9844-8b75d1a6838fn@googlegroups.com>
Injection-Date: Mon, 1 Aug 2022 16:29:22 -0000 (UTC)
Injection-Info: newsreader4.netcologne.de; posting-host="2001-4dd7-dd1e-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de:2001:4dd7:dd1e:0:7285:c2ff:fe6c:992d";
logging-data="22861"; mail-complaints-to="abuse@netcologne.de"
User-Agent: slrn/1.0.3 (Linux)
 by: Thomas Koenig - Mon, 1 Aug 2022 16:29 UTC

Thando Mothogoane <ramodubjane@gmail.com> schrieb:
> Dear Fortran team,
>
> Can you please assist me with solving the error:
>
> compute-060:/idia/users/thando/magphys> ./make_zgrid
> 0
> At line 64 of file make_zgrid.f
> Fortran runtime error: Index '0' of dimension 2 of array 'flux_obs' below lower bound of 1

The error message is quite informative.

It's good that you compiled with bounds checking on. So, look at
the line 64 of make_zgrid.f, check the second index of the array
flux_obs and you will hopefully see where it is zero instead of 1
(which is the default lower bound), so

real :: flux_obj(10)

will declare an array for which flux_obj(1) is the first and
flux_obj(10) the last element. If you want indices ranging from
0 to 9 instead, you can specify

real :: flux_obj(0:9)

> Error termination. Backtrace:
>#0 0x7f988749ad5a
>#1 0x7f988749b869
>#2 0x7f988749bee6
>#3 0x55d5dc7f7cb8
>#4 0x55d5dc7f8e1b
>#5 0x7f98871600b2
>#6 0x55d5dc7f718d
>#7 0xffffffffffffffff

That can be made a bit more informative (if necessary) by
specifying -g as a compile option.

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor