Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

"Our reruns are better than theirs." -- Nick at Nite


devel / comp.lang.fortran / Fortran application not writing output to one of the .out files

SubjectAuthor
* Fortran application not writing output to one of the .out filesSushant Mehan
+* Re: Fortran application not writing output to one of the .out filesjfh
|`* Re: Fortran application not writing output to one of the .out filesSushant Mehan
| +* Re: Fortran application not writing output to one of the .out filesgah4
| |`- Re: Fortran application not writing output to one of the .out filesSushant Mehan
| `* Re: Fortran application not writing output to one of the .out filesRobin Vowels
|  `- Re: Fortran application not writing output to one of the .out filesSushant Mehan
+* Re: Fortran application not writing output to one of the .out filesgah4
|`* Re: Fortran application not writing output to one of the .out filesSushant Mehan
| `* Re: Fortran application not writing output to one of the .out filesThomas Koenig
|  `- Re: Fortran application not writing output to one of the .out filesSushant Mehan
+* Re: Fortran application not writing output to one of the .out filesRobin Vowels
|`- Re: Fortran application not writing output to one of the .out filesSushant Mehan
`* Re: Fortran application not writing output to one of the .out filesFortranFan
 +- Re: Fortran application not writing output to one of the .out filesSushant Mehan
 `* Re: Fortran application not writing output to one of the .out filesJames Van Buskirk
  `- Re: Fortran application not writing output to one of the .out filesFortranFan

1
Fortran application not writing output to one of the .out files

<88611436-dead-44a6-be84-18da661c3856n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:ac8:7558:0:b0:3a5:44d0:ef6d with SMTP id b24-20020ac87558000000b003a544d0ef6dmr27029627qtr.376.1667932117576;
Tue, 08 Nov 2022 10:28:37 -0800 (PST)
X-Received: by 2002:ac8:749:0:b0:3a5:5b63:5991 with SMTP id
k9-20020ac80749000000b003a55b635991mr21391622qth.487.1667932117250; Tue, 08
Nov 2022 10:28:37 -0800 (PST)
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: Tue, 8 Nov 2022 10:28:36 -0800 (PST)
Injection-Info: google-groups.googlegroups.com; posting-host=2600:6c44:7f:fcd3:a506:4036:b4f6:3cb;
posting-account=KimmrwkAAADdSAgTyAN8YtkxLYVZCGd0
NNTP-Posting-Host: 2600:6c44:7f:fcd3:a506:4036:b4f6:3cb
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <88611436-dead-44a6-be84-18da661c3856n@googlegroups.com>
Subject: Fortran application not writing output to one of the .out files
From: sushantmehan@gmail.com (Sushant Mehan)
Injection-Date: Tue, 08 Nov 2022 18:28:37 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2047
 by: Sushant Mehan - Tue, 8 Nov 2022 18:28 UTC

Hi All,

I am beginners in FORTRAN and dealing with huge FORTRAN project. I apologize in the beginning if my question sounded lame. Here is the issue

Blocks of Code where file was introduced and initiated. There are 300+ fortran files in the project. That's why using only a few blocks if thats helpful
open (178,file="instreamP.out")
write (178,12224)
12224 format ('Year Day Rch flow solp-in solp-out orgp
-in orgp-out EPC benp solp_benp orgp_benp so
lp_orgp ')

write (178,78) curyr,iida,jrch,flow,solpcon,dsolp,orgpcon,dorgp,
* epc,sedp_benthos(jrch),solp_benp_flux, orgp_benp_flux,
* solp_orgp_flux

The code executed successfully, and I ran the project, and my output file with name "instreamP.out is produced with headers, but there is no data in it.

I would appreciate any help in this matter. Also, I would appreciate any guidance on learning FORTRAN.

Thanks,
Sushant

Re: Fortran application not writing output to one of the .out files

<b6c1537b-9355-437a-a828-b0dbc58ce913n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:ac8:1004:0:b0:3a5:8304:2d13 with SMTP id z4-20020ac81004000000b003a583042d13mr12140059qti.462.1667940844605;
Tue, 08 Nov 2022 12:54:04 -0800 (PST)
X-Received: by 2002:ac8:5f14:0:b0:3a5:9022:f440 with SMTP id
x20-20020ac85f14000000b003a59022f440mr9506859qta.360.1667940844446; Tue, 08
Nov 2022 12:54:04 -0800 (PST)
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: Tue, 8 Nov 2022 12:54:04 -0800 (PST)
In-Reply-To: <88611436-dead-44a6-be84-18da661c3856n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=115.189.133.238; posting-account=KnYfEgoAAAD1tUJTvdAUZ3XojNa5tezZ
NNTP-Posting-Host: 115.189.133.238
References: <88611436-dead-44a6-be84-18da661c3856n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <b6c1537b-9355-437a-a828-b0dbc58ce913n@googlegroups.com>
Subject: Re: Fortran application not writing output to one of the .out files
From: harperjf2@gmail.com (jfh)
Injection-Date: Tue, 08 Nov 2022 20:54:04 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2867
 by: jfh - Tue, 8 Nov 2022 20:54 UTC

On Wednesday, November 9, 2022 at 7:28:39 AM UTC+13, sushan...@gmail.com wrote:
> Hi All,
>
> I am beginners in FORTRAN and dealing with huge FORTRAN project. I apologize in the beginning if my question sounded lame. Here is the issue
>
> Blocks of Code where file was introduced and initiated. There are 300+ fortran files in the project. That's why using only a few blocks if thats helpful
> open (178,file="instreamP.out")
> write (178,12224)
> 12224 format ('Year Day Rch flow solp-in solp-out orgp
> -in orgp-out EPC benp solp_benp orgp_benp so
> lp_orgp ')
>
> write (178,78) curyr,iida,jrch,flow,solpcon,dsolp,orgpcon,dorgp,
> * epc,sedp_benthos(jrch),solp_benp_flux, orgp_benp_flux,
> * solp_orgp_flux
>
> The code executed successfully, and I ran the project, and my output file with name "instreamP.out is produced with headers, but there is no data in it.
>
> I would appreciate any help in this matter. Also, I would appreciate any guidance on learning FORTRAN.
>
> Thanks,
> Sushant

Is the program in fixed or free source form? The * in the two last lines are valid only in fixed source form but the format statement makes me wonder. Are the ends of lines in what you posted (where format 12224 occupies 3 lines) at the ends of lines in the actual program? What is format 78 and how were the things written with it declared and evaluated? We could possibly give useful help if provided with a minimal complete program, together with any error messages and warnings it gave at compile time and run time. What compiler was used?

Re: Fortran application not writing output to one of the .out files

<5f3a297d-540d-423d-979c-9cc9cbaf077fn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a05:620a:28ce:b0:6cf:933c:40d3 with SMTP id l14-20020a05620a28ce00b006cf933c40d3mr40049785qkp.258.1667946288185;
Tue, 08 Nov 2022 14:24:48 -0800 (PST)
X-Received: by 2002:a05:622a:170d:b0:3a5:e6b:641d with SMTP id
h13-20020a05622a170d00b003a50e6b641dmr45720415qtk.449.1667946288040; Tue, 08
Nov 2022 14:24:48 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.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: Tue, 8 Nov 2022 14:24:47 -0800 (PST)
In-Reply-To: <88611436-dead-44a6-be84-18da661c3856n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2601:602:9700:4689:49b0:32d6:dbb0:c848;
posting-account=gLDX1AkAAAA26M5HM-O3sVMAXdxK9FPA
NNTP-Posting-Host: 2601:602:9700:4689:49b0:32d6:dbb0:c848
References: <88611436-dead-44a6-be84-18da661c3856n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <5f3a297d-540d-423d-979c-9cc9cbaf077fn@googlegroups.com>
Subject: Re: Fortran application not writing output to one of the .out files
From: gah4@u.washington.edu (gah4)
Injection-Date: Tue, 08 Nov 2022 22:24:48 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2161
 by: gah4 - Tue, 8 Nov 2022 22:24 UTC

On Tuesday, November 8, 2022 at 10:28:39 AM UTC-8, sushan...@gmail.com wrote:

(snip)

> write (178,78) curyr,iida,jrch,flow,solpcon,dsolp,orgpcon,dorgp,
> * epc,sedp_benthos(jrch),solp_benp_flux, orgp_benp_flux,
> * solp_orgp_flux
> The code executed successfully, and I ran the project, and my output file
> with name "instreamP.out is produced with headers, but there is no data in it.
Without non-advancing I/O, which yours doesn't have, the least a Fortran WRITE
statement can write is a blank line.

As noted previously, showing the FORMAT statement number 78 would be nice.

But, most likely, your program isn't exectuting this WRITE statement.

Easy test is to put a

STOP 78

statement after the WRITE statement.

(The 78 is a reminder of where it stopped.)

That also guarantees that the output buffer is written out.

If the STOP 78 statement is not executed, you know it didn't get there.

Re: Fortran application not writing output to one of the .out files

<915ffefc-a5f6-4fd9-82a8-fb2992ef5a5en@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:ac8:4cd0:0:b0:3a5:b02:a3b7 with SMTP id l16-20020ac84cd0000000b003a50b02a3b7mr988456qtv.277.1667959568818;
Tue, 08 Nov 2022 18:06:08 -0800 (PST)
X-Received: by 2002:a05:6214:21ed:b0:4bb:e947:c59a with SMTP id
p13-20020a05621421ed00b004bbe947c59amr47474938qvj.46.1667959568533; Tue, 08
Nov 2022 18:06:08 -0800 (PST)
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: Tue, 8 Nov 2022 18:06:08 -0800 (PST)
In-Reply-To: <88611436-dead-44a6-be84-18da661c3856n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=49.185.80.175; posting-account=S_MdrwoAAAD7T2pxG2e393dk6y0tc0Le
NNTP-Posting-Host: 49.185.80.175
References: <88611436-dead-44a6-be84-18da661c3856n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <915ffefc-a5f6-4fd9-82a8-fb2992ef5a5en@googlegroups.com>
Subject: Re: Fortran application not writing output to one of the .out files
From: robin.vowels@gmail.com (Robin Vowels)
Injection-Date: Wed, 09 Nov 2022 02:06:08 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2399
 by: Robin Vowels - Wed, 9 Nov 2022 02:06 UTC

On Wednesday, November 9, 2022 at 5:28:39 AM UTC+11, sushan...@gmail.com wrote:
> Hi All,
>
> I am beginners in FORTRAN and dealing with huge FORTRAN project. I apologize in the beginning if my question sounded lame. Here is the issue
>
> Blocks of Code where file was introduced and initiated. There are 300+ fortran files in the project. That's why using only a few blocks if thats helpful
> open (178,file="instreamP.out")
> write (178,12224)
> 12224 format ('Year Day Rch flow solp-in solp-out orgp
> -in orgp-out EPC benp solp_benp orgp_benp so
> lp_orgp ')
>
> write (178,78) curyr,iida,jrch,flow,solpcon,dsolp,orgpcon,dorgp,
> * epc,sedp_benthos(jrch),solp_benp_flux, orgp_benp_flux,
> * solp_orgp_flux
>
> The code executed successfully,

No it didn't.

> and I ran the project, and my output file with name "instreamP.out is produced with headers, but there is no data in it.
>
> I would appreciate any help in this matter. Also, I would appreciate any guidance on learning FORTRAN.

You need to show the FORMAT statement 78.
It would seem that the second WRITE statement is never executed.
Insert a simple PRINT statement (e,.g., PRINT *, 'GOT HERE')
just before the second WRITE.

Re: Fortran application not writing output to one of the .out files

<f7056578-24f1-4e2b-b773-655b928ffccen@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:ac8:5746:0:b0:39c:deac:c69c with SMTP id 6-20020ac85746000000b0039cdeacc69cmr46224407qtx.292.1667966640827;
Tue, 08 Nov 2022 20:04:00 -0800 (PST)
X-Received: by 2002:a05:620a:91d:b0:6fa:442d:9a72 with SMTP id
v29-20020a05620a091d00b006fa442d9a72mr32590536qkv.487.1667966640532; Tue, 08
Nov 2022 20:04:00 -0800 (PST)
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: Tue, 8 Nov 2022 20:04:00 -0800 (PST)
In-Reply-To: <b6c1537b-9355-437a-a828-b0dbc58ce913n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:6c44:7f:fcd3:a506:4036:b4f6:3cb;
posting-account=KimmrwkAAADdSAgTyAN8YtkxLYVZCGd0
NNTP-Posting-Host: 2600:6c44:7f:fcd3:a506:4036:b4f6:3cb
References: <88611436-dead-44a6-be84-18da661c3856n@googlegroups.com> <b6c1537b-9355-437a-a828-b0dbc58ce913n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <f7056578-24f1-4e2b-b773-655b928ffccen@googlegroups.com>
Subject: Re: Fortran application not writing output to one of the .out files
From: sushantmehan@gmail.com (Sushant Mehan)
Injection-Date: Wed, 09 Nov 2022 04:04:00 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 4346
 by: Sushant Mehan - Wed, 9 Nov 2022 04:04 UTC

On Tuesday, November 8, 2022 at 2:54:06 PM UTC-6, jfh wrote:
> On Wednesday, November 9, 2022 at 7:28:39 AM UTC+13, sushan...@gmail.com wrote:
> > Hi All,
> >
> > I am beginners in FORTRAN and dealing with huge FORTRAN project. I apologize in the beginning if my question sounded lame. Here is the issue
> >
> > Blocks of Code where file was introduced and initiated. There are 300+ fortran files in the project. That's why using only a few blocks if thats helpful
> > open (178,file="instreamP.out")
> > write (178,12224)
> > 12224 format ('Year Day Rch flow solp-in solp-out orgp
> > -in orgp-out EPC benp solp_benp orgp_benp so
> > lp_orgp ')
> >
> > write (178,78) curyr,iida,jrch,flow,solpcon,dsolp,orgpcon,dorgp,
> > * epc,sedp_benthos(jrch),solp_benp_flux, orgp_benp_flux,
> > * solp_orgp_flux
> >
> > The code executed successfully, and I ran the project, and my output file with name "instreamP.out is produced with headers, but there is no data in it.
> >
> > I would appreciate any help in this matter. Also, I would appreciate any guidance on learning FORTRAN.
> >
> > Thanks,
> > Sushant
> Is the program in fixed or free source form? The * in the two last lines are valid only in fixed source form but the format statement makes me wonder. Are the ends of lines in what you posted (where format 12224 occupies 3 lines) at the ends of lines in the actual program? What is format 78 and how were the things written with it declared and evaluated? We could possibly give useful help if provided with a minimal complete program, together with any error messages and warnings it gave at compile time and run time. What compiler was used?

That's the problem. I am not getting any error messages. Apologies for my ignorance. I am not aware if the program is fixed or free. Since it is open source, so many people use it, and the convention changes from time to time.. Unfortunately, there is no option here to link the *.f files else I Would have shared the program.

But I will try it now by being more detailed
This is one chunk of code in one file
write (178,79) curyr,iida,jrch,flow,solpcon,dsolp,orgpcon,dorgp,
* epc,sedp_benthos(jrch),solp_benp_flux, orgp_benp_flux,
* solp_orgp_flux
!! end if
79 format(3i4,10f12.3)

The other chunk is
open (178,file="instreamP.out")
write (178,12224)
12224 format ('Year Day Rch flow solp-in solp-out orgp
-in orgp-out EPC benp solp_benp orgp_benp so
lp_orgp ')

These are the only two blocks where the code was called, and no other place it was mentioned. Note: I changed 78 to 79 because 78 was used in another file of the same project.

I am sorry I want to be more detailed with my problem. If this won't work, I will put my code on google drive and share the link.

Kindest regards,
Sushant

Re: Fortran application not writing output to one of the .out files

<c7437179-78f1-452b-aa6b-d2b5a36ecd49n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a05:620a:2601:b0:6bc:70bb:c56b with SMTP id z1-20020a05620a260100b006bc70bbc56bmr42973606qko.416.1667966745462;
Tue, 08 Nov 2022 20:05:45 -0800 (PST)
X-Received: by 2002:ac8:520d:0:b0:3a5:8c8a:35bc with SMTP id
r13-20020ac8520d000000b003a58c8a35bcmr10691190qtn.122.1667966745217; Tue, 08
Nov 2022 20:05:45 -0800 (PST)
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: Tue, 8 Nov 2022 20:05:44 -0800 (PST)
In-Reply-To: <915ffefc-a5f6-4fd9-82a8-fb2992ef5a5en@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:6c44:7f:fcd3:a506:4036:b4f6:3cb;
posting-account=KimmrwkAAADdSAgTyAN8YtkxLYVZCGd0
NNTP-Posting-Host: 2600:6c44:7f:fcd3:a506:4036:b4f6:3cb
References: <88611436-dead-44a6-be84-18da661c3856n@googlegroups.com> <915ffefc-a5f6-4fd9-82a8-fb2992ef5a5en@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <c7437179-78f1-452b-aa6b-d2b5a36ecd49n@googlegroups.com>
Subject: Re: Fortran application not writing output to one of the .out files
From: sushantmehan@gmail.com (Sushant Mehan)
Injection-Date: Wed, 09 Nov 2022 04:05:45 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 3320
 by: Sushant Mehan - Wed, 9 Nov 2022 04:05 UTC

On Tuesday, November 8, 2022 at 8:06:10 PM UTC-6, Robin Vowels wrote:
> On Wednesday, November 9, 2022 at 5:28:39 AM UTC+11, sushan...@gmail.com wrote:
> > Hi All,
> >
> > I am beginners in FORTRAN and dealing with huge FORTRAN project. I apologize in the beginning if my question sounded lame. Here is the issue
> >
> > Blocks of Code where file was introduced and initiated. There are 300+ fortran files in the project. That's why using only a few blocks if thats helpful
> > open (178,file="instreamP.out")
> > write (178,12224)
> > 12224 format ('Year Day Rch flow solp-in solp-out orgp
> > -in orgp-out EPC benp solp_benp orgp_benp so
> > lp_orgp ')
> >
> > write (178,78) curyr,iida,jrch,flow,solpcon,dsolp,orgpcon,dorgp,
> > * epc,sedp_benthos(jrch),solp_benp_flux, orgp_benp_flux,
> > * solp_orgp_flux
> >
> > The code executed successfully,
> No it didn't.
> > and I ran the project, and my output file with name "instreamP.out is produced with headers, but there is no data in it.
> >
> > I would appreciate any help in this matter. Also, I would appreciate any guidance on learning FORTRAN.
> You need to show the FORMAT statement 78.
> It would seem that the second WRITE statement is never executed.
> Insert a simple PRINT statement (e,.g., PRINT *, 'GOT HERE')
> just before the second WRITE.

Robin,

It seems you picked something. I saw that format 78 was called in other file. So I made 78 to 79 in my code and called it as follows:
This is one chunk of code in one file
write (178,79) curyr,iida,jrch,flow,solpcon,dsolp,orgpcon,dorgp,
* epc,sedp_benthos(jrch),solp_benp_flux, orgp_benp_flux,
* solp_orgp_flux
!! end if
79 format(3i4,10f12.3)

The other chunk is
open (178,file="instreamP.out")
write (178,12224)
12224 format ('Year Day Rch flow solp-in solp-out orgp
-in orgp-out EPC benp solp_benp orgp_benp so
lp_orgp ')

Any more suggestions?

Kindest regards,
Sushant

Re: Fortran application not writing output to one of the .out files

<9b098478-f85e-443e-8a80-6524349c80bbn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a05:620a:2294:b0:6fa:bb9:f9c0 with SMTP id o20-20020a05620a229400b006fa0bb9f9c0mr42627943qkh.578.1667966878763;
Tue, 08 Nov 2022 20:07:58 -0800 (PST)
X-Received: by 2002:a05:620a:15bb:b0:6fa:48df:a9a0 with SMTP id
f27-20020a05620a15bb00b006fa48dfa9a0mr30463871qkk.552.1667966878457; Tue, 08
Nov 2022 20:07:58 -0800 (PST)
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: Tue, 8 Nov 2022 20:07:58 -0800 (PST)
In-Reply-To: <5f3a297d-540d-423d-979c-9cc9cbaf077fn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:6c44:7f:fcd3:a506:4036:b4f6:3cb;
posting-account=KimmrwkAAADdSAgTyAN8YtkxLYVZCGd0
NNTP-Posting-Host: 2600:6c44:7f:fcd3:a506:4036:b4f6:3cb
References: <88611436-dead-44a6-be84-18da661c3856n@googlegroups.com> <5f3a297d-540d-423d-979c-9cc9cbaf077fn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <9b098478-f85e-443e-8a80-6524349c80bbn@googlegroups.com>
Subject: Re: Fortran application not writing output to one of the .out files
From: sushantmehan@gmail.com (Sushant Mehan)
Injection-Date: Wed, 09 Nov 2022 04:07:58 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 3127
 by: Sushant Mehan - Wed, 9 Nov 2022 04:07 UTC

On Tuesday, November 8, 2022 at 4:24:50 PM UTC-6, gah4 wrote:
> On Tuesday, November 8, 2022 at 10:28:39 AM UTC-8, sushan...@gmail.com wrote:
>
> (snip)
> > write (178,78) curyr,iida,jrch,flow,solpcon,dsolp,orgpcon,dorgp,
> > * epc,sedp_benthos(jrch),solp_benp_flux, orgp_benp_flux,
> > * solp_orgp_flux
>
> > The code executed successfully, and I ran the project, and my output file
> > with name "instreamP.out is produced with headers, but there is no data in it.
> Without non-advancing I/O, which yours doesn't have, the least a Fortran WRITE
> statement can write is a blank line.
>
> As noted previously, showing the FORMAT statement number 78 would be nice.
>
> But, most likely, your program isn't exectuting this WRITE statement.
>
> Easy test is to put a
>
> STOP 78
>
> statement after the WRITE statement.
>
> (The 78 is a reminder of where it stopped.)
>
> That also guarantees that the output buffer is written out.
>
> If the STOP 78 statement is not executed, you know it didn't get there.

Hi Gah,

I think you were right. 78 was called in another file of the project. I replaced my 78 with 79 and tried running the project. Again, no error while compiling but the application is still not writing data to the "instreamP.out" file

This is one chunk of code in one file
write (178,79) curyr,iida,jrch,flow,solpcon,dsolp,orgpcon,dorgp,
* epc,sedp_benthos(jrch),solp_benp_flux, orgp_benp_flux,
* solp_orgp_flux
!! end if
79 format(3i4,10f12.3)

The other chunk is
open (178,file="instreamP.out")
write (178,12224)
12224 format ('Year Day Rch flow solp-in solp-out orgp
-in orgp-out EPC benp solp_benp orgp_benp so
lp_orgp ')

Any recommendations?

Kindest regards,
Sushant

Re: Fortran application not writing output to one of the .out files

<cfa7525a-299d-4ae3-96da-314073821ffdn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a05:620a:178a:b0:6fa:94ff:1b1f with SMTP id ay10-20020a05620a178a00b006fa94ff1b1fmr17558687qkb.337.1667969898654;
Tue, 08 Nov 2022 20:58:18 -0800 (PST)
X-Received: by 2002:a05:620a:22cf:b0:6fa:1e61:9cda with SMTP id
o15-20020a05620a22cf00b006fa1e619cdamr39035911qki.774.1667969898482; Tue, 08
Nov 2022 20:58:18 -0800 (PST)
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: Tue, 8 Nov 2022 20:58:18 -0800 (PST)
In-Reply-To: <f7056578-24f1-4e2b-b773-655b928ffccen@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2601:602:9700:4689:f5f8:c3a4:70f9:1545;
posting-account=gLDX1AkAAAA26M5HM-O3sVMAXdxK9FPA
NNTP-Posting-Host: 2601:602:9700:4689:f5f8:c3a4:70f9:1545
References: <88611436-dead-44a6-be84-18da661c3856n@googlegroups.com>
<b6c1537b-9355-437a-a828-b0dbc58ce913n@googlegroups.com> <f7056578-24f1-4e2b-b773-655b928ffccen@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <cfa7525a-299d-4ae3-96da-314073821ffdn@googlegroups.com>
Subject: Re: Fortran application not writing output to one of the .out files
From: gah4@u.washington.edu (gah4)
Injection-Date: Wed, 09 Nov 2022 04:58:18 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2946
 by: gah4 - Wed, 9 Nov 2022 04:58 UTC

On Tuesday, November 8, 2022 at 8:04:02 PM UTC-8, sushan...@gmail.com wrote:

(snip)

> That's the problem. I am not getting any error messages.
> Apologies for my ignorance. I am not aware if the program is fixed or free.
> Since it is open source, so many people use it, and the convention changes
> from time to time. Unfortunately, there is no option here to link the *.f files else
> I Would have shared the program.

*.f files usually mean fixed form.

Statements have to start in column 7 (or more), with blanks or statement
number before that. But posting software likes to remove blanks at
the beginning of lines.

> But I will try it now by being more detailed
> This is one chunk of code in one file
> write (178,79) curyr,iida,jrch,flow,solpcon,dsolp,orgpcon,dorgp,
> * epc,sedp_benthos(jrch),solp_benp_flux, orgp_benp_flux,
> * solp_orgp_flux
> !! end if
> 79 format(3i4,10f12.3)

(snip)

> These are the only two blocks where the code was called, and no other place
> it was mentioned. Note: I changed 78 to 79 because 78 was used in another
> file of the same project.

Statement numbers only need to be unique within the same subroutine,
function or main program. In most cases, that is within one file.

> I am sorry I want to be more detailed with my problem
> If this won't work, I will put my code on google drive and share the link.

Seems to be some version of SWAT:

https://swat.tamu.edu/software/archive/

If you say which one, we can download it from the original source.

Though it seems that they supply already compiled versions.

Re: Fortran application not writing output to one of the .out files

<tkfhvs$31abk$3@newsreader4.netcologne.de>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!aioe.org!news.uzoreto.com!newsreader4.netcologne.de!news.netcologne.de!.POSTED.2001-4dd7-d2b7-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de!not-for-mail
From: tkoenig@netcologne.de (Thomas Koenig)
Newsgroups: comp.lang.fortran
Subject: Re: Fortran application not writing output to one of the .out files
Date: Wed, 9 Nov 2022 06:39:56 -0000 (UTC)
Organization: news.netcologne.de
Distribution: world
Message-ID: <tkfhvs$31abk$3@newsreader4.netcologne.de>
References: <88611436-dead-44a6-be84-18da661c3856n@googlegroups.com>
<5f3a297d-540d-423d-979c-9cc9cbaf077fn@googlegroups.com>
<9b098478-f85e-443e-8a80-6524349c80bbn@googlegroups.com>
Injection-Date: Wed, 9 Nov 2022 06:39:56 -0000 (UTC)
Injection-Info: newsreader4.netcologne.de; posting-host="2001-4dd7-d2b7-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de:2001:4dd7:d2b7:0:7285:c2ff:fe6c:992d";
logging-data="3189108"; mail-complaints-to="abuse@netcologne.de"
User-Agent: slrn/1.0.3 (Linux)
 by: Thomas Koenig - Wed, 9 Nov 2022 06:39 UTC

Sushant Mehan <sushantmehan@gmail.com> schrieb:
> On Tuesday, November 8, 2022 at 4:24:50 PM UTC-6, gah4 wrote:
>> On Tuesday, November 8, 2022 at 10:28:39 AM UTC-8, sushan...@gmail.com wrote:
>>
>> (snip)
>> > write (178,78) curyr,iida,jrch,flow,solpcon,dsolp,orgpcon,dorgp,
>> > * epc,sedp_benthos(jrch),solp_benp_flux, orgp_benp_flux,
>> > * solp_orgp_flux
>>
>> > The code executed successfully, and I ran the project, and my output file
>> > with name "instreamP.out is produced with headers, but there is no data in it.
>> Without non-advancing I/O, which yours doesn't have, the least a Fortran WRITE
>> statement can write is a blank line.
>>
>> As noted previously, showing the FORMAT statement number 78 would be nice.
>>
>> But, most likely, your program isn't exectuting this WRITE statement.
>>
>> Easy test is to put a
>>
>> STOP 78
>>
>> statement after the WRITE statement.
>>
>> (The 78 is a reminder of where it stopped.)
>>
>> That also guarantees that the output buffer is written out.
>>
>> If the STOP 78 statement is not executed, you know it didn't get there.
>
> Hi Gah,
>
> I think you were right. 78 was called in another file of the project. I replaced my 78 with 79 and tried running the project. Again, no error while compiling but the application is still not writing data to the "instreamP.out" file
>
> This is one chunk of code in one file
> write (178,79) curyr,iida,jrch,flow,solpcon,dsolp,orgpcon,dorgp,
> * epc,sedp_benthos(jrch),solp_benp_flux, orgp_benp_flux,
> * solp_orgp_flux
> !! end if
> 79 format(3i4,10f12.3)
>
> The other chunk is
> open (178,file="instreamP.out")
> write (178,12224)
> 12224 format ('Year Day Rch flow solp-in solp-out orgp
> -in orgp-out EPC benp solp_benp orgp_benp so
> lp_orgp ')
>
> Any recommendations?

Which system and which compiler are you running?

Is file 178 already open? In this case, calling open just modifies
the existing connection (which can be confusing). What happens
if you put a close(178) in front of the open?

What happens if you put a

flush 178

after each write? There was a bug in a version of Darwin which
impacted gfortran so that it did not flush files at program end.

Re: Fortran application not writing output to one of the .out files

<73bc2070-0245-4728-861a-fcfea8823f0an@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a05:622a:4889:b0:3a5:18e3:8310 with SMTP id fc9-20020a05622a488900b003a518e38310mr44285604qtb.511.1667989020900;
Wed, 09 Nov 2022 02:17:00 -0800 (PST)
X-Received: by 2002:a05:620a:2909:b0:6ee:6c83:9769 with SMTP id
m9-20020a05620a290900b006ee6c839769mr43418807qkp.732.1667989020695; Wed, 09
Nov 2022 02:17:00 -0800 (PST)
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: Wed, 9 Nov 2022 02:17:00 -0800 (PST)
In-Reply-To: <f7056578-24f1-4e2b-b773-655b928ffccen@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=49.185.80.175; posting-account=S_MdrwoAAAD7T2pxG2e393dk6y0tc0Le
NNTP-Posting-Host: 49.185.80.175
References: <88611436-dead-44a6-be84-18da661c3856n@googlegroups.com>
<b6c1537b-9355-437a-a828-b0dbc58ce913n@googlegroups.com> <f7056578-24f1-4e2b-b773-655b928ffccen@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <73bc2070-0245-4728-861a-fcfea8823f0an@googlegroups.com>
Subject: Re: Fortran application not writing output to one of the .out files
From: robin.vowels@gmail.com (Robin Vowels)
Injection-Date: Wed, 09 Nov 2022 10:17:00 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 4637
 by: Robin Vowels - Wed, 9 Nov 2022 10:17 UTC

On Wednesday, November 9, 2022 at 3:04:02 PM UTC+11, sushan...@gmail.com wrote:
> On Tuesday, November 8, 2022 at 2:54:06 PM UTC-6, jfh wrote:
> > On Wednesday, November 9, 2022 at 7:28:39 AM UTC+13, sushan...@gmail.com wrote:
> > > Hi All,
> > >
> > > I am beginners in FORTRAN and dealing with huge FORTRAN project. I apologize in the beginning if my question sounded lame. Here is the issue
> > >
> > > Blocks of Code where file was introduced and initiated. There are 300+ fortran files in the project. That's why using only a few blocks if thats helpful
> > > open (178,file="instreamP.out")
> > > write (178,12224)
> > > 12224 format ('Year Day Rch flow solp-in solp-out orgp
> > > -in orgp-out EPC benp solp_benp orgp_benp so
> > > lp_orgp ')
> > >
> > > write (178,78) curyr,iida,jrch,flow,solpcon,dsolp,orgpcon,dorgp,
> > > * epc,sedp_benthos(jrch),solp_benp_flux, orgp_benp_flux,
> > > * solp_orgp_flux
> > >
> > > The code executed successfully, and I ran the project, and my output file with name "instreamP.out is produced with headers, but there is no data in it.
> > >
> > > I would appreciate any help in this matter. Also, I would appreciate any guidance on learning FORTRAN.
> > >
> > > Thanks,
> > > Sushant
> > Is the program in fixed or free source form? The * in the two last lines are valid only in fixed source form but the format statement makes me wonder. Are the ends of lines in what you posted (where format 12224 occupies 3 lines) at the ends of lines in the actual program? What is format 78 and how were the things written with it declared and evaluated? We could possibly give useful help if provided with a minimal complete program, together with any error messages and warnings it gave at compile time and run time. What compiler was used?
> That's the problem. I am not getting any error messages. Apologies for my ignorance. I am not aware if the program is fixed or free. Since it is open source, so many people use it, and the convention changes from time to time. Unfortunately, there is no option here to link the *.f files else I Would have shared the program.
>
> But I will try it now by being more detailed
> This is one chunk of code in one file
> write (178,79) curyr,iida,jrch,flow,solpcon,dsolp,orgpcon,dorgp,
> * epc,sedp_benthos(jrch),solp_benp_flux, orgp_benp_flux,
> * solp_orgp_flux
> !! end if
> 79 format(3i4,10f12.3)
>
> The other chunk is
> open (178,file="instreamP.out")
> write (178,12224)
> 12224 format ('Year Day Rch flow solp-in solp-out orgp
> -in orgp-out EPC benp solp_benp orgp_benp so
> lp_orgp ')
> These are the only two blocks where the code was called, and no other place it was mentioned. Note: I changed 78 to 79 because 78 was used in another file of the same project.
..
The OPEN statement must be executed before the WRITE (178 .. statement.
If it is not, the output will be written to another file, possibly called FOR178.
..
I suggested inserting a simple PRINT statement, just before the WRITE statement.
You need to do this, in order to find out whether the WRITE statement is being executed.

Re: Fortran application not writing output to one of the .out files

<3f6ce8bd-d99c-4150-a0af-b1099741883fn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:ac8:4d03:0:b0:3a5:1b18:7747 with SMTP id w3-20020ac84d03000000b003a51b187747mr45088473qtv.538.1668002663604;
Wed, 09 Nov 2022 06:04:23 -0800 (PST)
X-Received: by 2002:a05:6214:21ed:b0:4bb:e947:c59a with SMTP id
p13-20020a05621421ed00b004bbe947c59amr49356274qvj.46.1668002663221; Wed, 09
Nov 2022 06:04:23 -0800 (PST)
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: Wed, 9 Nov 2022 06:04:23 -0800 (PST)
In-Reply-To: <88611436-dead-44a6-be84-18da661c3856n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=136.226.53.0; posting-account=ZZXq9AoAAAAQEcA7zKAGm0UFQh4gMBv7
NNTP-Posting-Host: 136.226.53.0
References: <88611436-dead-44a6-be84-18da661c3856n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <3f6ce8bd-d99c-4150-a0af-b1099741883fn@googlegroups.com>
Subject: Re: Fortran application not writing output to one of the .out files
From: parekhvs@gmail.com (FortranFan)
Injection-Date: Wed, 09 Nov 2022 14:04:23 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1926
 by: FortranFan - Wed, 9 Nov 2022 14:04 UTC

On Tuesday, November 8, 2022 at 1:28:39 PM UTC-5, sushan...@gmail.com wrote:
> ..
> I am beginners in FORTRAN and dealing with huge FORTRAN project. I apologize in the beginning if my question sounded lame. Here is the issue
> ..
> I would appreciate any help in this matter. Also, I would appreciate any guidance on learning FORTRAN.
>

Hello @sushan...@gmail.com,

You may also want to inquire at the relatively recent Fortran Discourse site where you can attach Fortran source code with your posts, provide links, include code snippets with syntax highlighting, etc.
https://fortran-lang.discourse.group/

Re: learning Fortran, please see this page at fortran-lang.org that provides links to a lot of resources:
https://fortran-lang.discourse.group/

Re: Fortran application not writing output to one of the .out files

<20bc591d-acdc-40a8-8cd1-10da4954eb87n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a05:620a:290d:b0:6b5:cecc:1cab with SMTP id m13-20020a05620a290d00b006b5cecc1cabmr43230886qkp.465.1668011328683;
Wed, 09 Nov 2022 08:28:48 -0800 (PST)
X-Received: by 2002:a05:622a:1a25:b0:3a5:719c:671b with SMTP id
f37-20020a05622a1a2500b003a5719c671bmr20499786qtb.552.1668011328360; Wed, 09
Nov 2022 08:28:48 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border-2.nntp.ord.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.fortran
Date: Wed, 9 Nov 2022 08:28:48 -0800 (PST)
In-Reply-To: <cfa7525a-299d-4ae3-96da-314073821ffdn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:6c44:7f:fcd3:e02f:3b5:2b4a:3fc;
posting-account=KimmrwkAAADdSAgTyAN8YtkxLYVZCGd0
NNTP-Posting-Host: 2600:6c44:7f:fcd3:e02f:3b5:2b4a:3fc
References: <88611436-dead-44a6-be84-18da661c3856n@googlegroups.com>
<b6c1537b-9355-437a-a828-b0dbc58ce913n@googlegroups.com> <f7056578-24f1-4e2b-b773-655b928ffccen@googlegroups.com>
<cfa7525a-299d-4ae3-96da-314073821ffdn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <20bc591d-acdc-40a8-8cd1-10da4954eb87n@googlegroups.com>
Subject: Re: Fortran application not writing output to one of the .out files
From: sushantmehan@gmail.com (Sushant Mehan)
Injection-Date: Wed, 09 Nov 2022 16:28:48 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 44
 by: Sushant Mehan - Wed, 9 Nov 2022 16:28 UTC

On Tuesday, November 8, 2022 at 10:58:20 PM UTC-6, gah4 wrote:
> On Tuesday, November 8, 2022 at 8:04:02 PM UTC-8, sushan...@gmail.com wrote:
>
> (snip)
> > That's the problem. I am not getting any error messages.
> > Apologies for my ignorance. I am not aware if the program is fixed or free.
> > Since it is open source, so many people use it, and the convention changes
> > from time to time. Unfortunately, there is no option here to link the *.f files else
> > I Would have shared the program.
> *.f files usually mean fixed form.
>
> Statements have to start in column 7 (or more), with blanks or statement
> number before that. But posting software likes to remove blanks at
> the beginning of lines.
> > But I will try it now by being more detailed
> > This is one chunk of code in one file
> > write (178,79) curyr,iida,jrch,flow,solpcon,dsolp,orgpcon,dorgp,
> > * epc,sedp_benthos(jrch),solp_benp_flux, orgp_benp_flux,
> > * solp_orgp_flux
> > !! end if
> > 79 format(3i4,10f12.3)
> (snip)
> > These are the only two blocks where the code was called, and no other place
> > it was mentioned. Note: I changed 78 to 79 because 78 was used in another
> > file of the same project.
> Statement numbers only need to be unique within the same subroutine,
> function or main program. In most cases, that is within one file.
> > I am sorry I want to be more detailed with my problem
> > If this won't work, I will put my code on google drive and share the link.
> Seems to be some version of SWAT:
>
> https://swat.tamu.edu/software/archive/
>
> If you say which one, we can download it from the original source.
>
> Though it seems that they supply already compiled versions.
Hi Gah,

The version I am working on is not public. You can access the code files from here https://drive.google.com/file/d/1fvXani_-iwfwcaabzFEFoFffaLKOZTY5/view?usp=share_link
The snips I shared were from file readfile.f (L 153- 155) and watqual3.f (L764-768). Since this project's source code files are customized, I must compile them every time I run the project.

Hope this helps to answer my issue of not writing the data to the output file.

Thanks,
Sushant

Re: Fortran application not writing output to one of the .out files

<47ebf81a-1d2b-47e9-abeb-602d8578ac4fn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a0c:a909:0:b0:4b3:ffb2:f69e with SMTP id y9-20020a0ca909000000b004b3ffb2f69emr54870241qva.4.1668011600932;
Wed, 09 Nov 2022 08:33:20 -0800 (PST)
X-Received: by 2002:a05:620a:b86:b0:6fa:1516:13da with SMTP id
k6-20020a05620a0b8600b006fa151613damr43217919qkh.339.1668011600612; Wed, 09
Nov 2022 08:33:20 -0800 (PST)
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: Wed, 9 Nov 2022 08:33:20 -0800 (PST)
In-Reply-To: <tkfhvs$31abk$3@newsreader4.netcologne.de>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:6c44:7f:fcd3:e02f:3b5:2b4a:3fc;
posting-account=KimmrwkAAADdSAgTyAN8YtkxLYVZCGd0
NNTP-Posting-Host: 2600:6c44:7f:fcd3:e02f:3b5:2b4a:3fc
References: <88611436-dead-44a6-be84-18da661c3856n@googlegroups.com>
<5f3a297d-540d-423d-979c-9cc9cbaf077fn@googlegroups.com> <9b098478-f85e-443e-8a80-6524349c80bbn@googlegroups.com>
<tkfhvs$31abk$3@newsreader4.netcologne.de>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <47ebf81a-1d2b-47e9-abeb-602d8578ac4fn@googlegroups.com>
Subject: Re: Fortran application not writing output to one of the .out files
From: sushantmehan@gmail.com (Sushant Mehan)
Injection-Date: Wed, 09 Nov 2022 16:33:20 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 4023
 by: Sushant Mehan - Wed, 9 Nov 2022 16:33 UTC

On Wednesday, November 9, 2022 at 12:40:00 AM UTC-6, Thomas Koenig wrote:
> Sushant Mehan <sushan...@gmail.com> schrieb:
> > On Tuesday, November 8, 2022 at 4:24:50 PM UTC-6, gah4 wrote:
> >> On Tuesday, November 8, 2022 at 10:28:39 AM UTC-8, sushan...@gmail.com wrote:
> >>
> >> (snip)
> >> > write (178,78) curyr,iida,jrch,flow,solpcon,dsolp,orgpcon,dorgp,
> >> > * epc,sedp_benthos(jrch),solp_benp_flux, orgp_benp_flux,
> >> > * solp_orgp_flux
> >>
> >> > The code executed successfully, and I ran the project, and my output file
> >> > with name "instreamP.out is produced with headers, but there is no data in it.
> >> Without non-advancing I/O, which yours doesn't have, the least a Fortran WRITE
> >> statement can write is a blank line.
> >>
> >> As noted previously, showing the FORMAT statement number 78 would be nice.
> >>
> >> But, most likely, your program isn't exectuting this WRITE statement.
> >>
> >> Easy test is to put a
> >>
> >> STOP 78
> >>
> >> statement after the WRITE statement.
> >>
> >> (The 78 is a reminder of where it stopped.)
> >>
> >> That also guarantees that the output buffer is written out.
> >>
> >> If the STOP 78 statement is not executed, you know it didn't get there.
> >
> > Hi Gah,
> >
> > I think you were right. 78 was called in another file of the project. I replaced my 78 with 79 and tried running the project. Again, no error while compiling but the application is still not writing data to the "instreamP.out" file
> >
> > This is one chunk of code in one file
> > write (178,79) curyr,iida,jrch,flow,solpcon,dsolp,orgpcon,dorgp,
> > * epc,sedp_benthos(jrch),solp_benp_flux, orgp_benp_flux,
> > * solp_orgp_flux
> > !! end if
> > 79 format(3i4,10f12.3)
> >
> > The other chunk is
> > open (178,file="instreamP.out")
> > write (178,12224)
> > 12224 format ('Year Day Rch flow solp-in solp-out orgp
> > -in orgp-out EPC benp solp_benp orgp_benp so
> > lp_orgp ')
> >
> > Any recommendations?
> Which system and which compiler are you running?
>
> Is file 178 already open? In this case, calling open just modifies
> the existing connection (which can be confusing). What happens
> if you put a close(178) in front of the open?
>
> What happens if you put a
>
> flush 178
>
> after each write? There was a bug in a version of Darwin which
> impacted gfortran so that it did not flush files at program end.

Thanks, Thomas, for your response. Greatly appreciated. I am compiling code using CodeBlocks 20.3 on Windows 10 machine. and compiler is gfortran. I do not think the 178 is open already.

Re: Fortran application not writing output to one of the .out files

<cacd9664-9cae-4259-999d-74fc14636e0en@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a0c:f00f:0:b0:4bb:6167:d338 with SMTP id z15-20020a0cf00f000000b004bb6167d338mr55572039qvk.11.1668011921002;
Wed, 09 Nov 2022 08:38:41 -0800 (PST)
X-Received: by 2002:a05:622a:8004:b0:3a5:8a36:77b6 with SMTP id
jr4-20020a05622a800400b003a58a3677b6mr13126003qtb.591.1668011920731; Wed, 09
Nov 2022 08:38:40 -0800 (PST)
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: Wed, 9 Nov 2022 08:38:40 -0800 (PST)
In-Reply-To: <3f6ce8bd-d99c-4150-a0af-b1099741883fn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:6c44:7f:fcd3:e02f:3b5:2b4a:3fc;
posting-account=KimmrwkAAADdSAgTyAN8YtkxLYVZCGd0
NNTP-Posting-Host: 2600:6c44:7f:fcd3:e02f:3b5:2b4a:3fc
References: <88611436-dead-44a6-be84-18da661c3856n@googlegroups.com> <3f6ce8bd-d99c-4150-a0af-b1099741883fn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <cacd9664-9cae-4259-999d-74fc14636e0en@googlegroups.com>
Subject: Re: Fortran application not writing output to one of the .out files
From: sushantmehan@gmail.com (Sushant Mehan)
Injection-Date: Wed, 09 Nov 2022 16:38:40 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2185
 by: Sushant Mehan - Wed, 9 Nov 2022 16:38 UTC

On Wednesday, November 9, 2022 at 8:04:25 AM UTC-6, FortranFan wrote:
> On Tuesday, November 8, 2022 at 1:28:39 PM UTC-5, sushan...@gmail.com wrote:
> > ..
> > I am beginners in FORTRAN and dealing with huge FORTRAN project. I apologize in the beginning if my question sounded lame. Here is the issue
> > ..
> > I would appreciate any help in this matter. Also, I would appreciate any guidance on learning FORTRAN.
> >
> Hello @sushan...@gmail.com,
>
> You may also want to inquire at the relatively recent Fortran Discourse site where you can attach Fortran source code with your posts, provide links, include code snippets with syntax highlighting, etc.
> https://fortran-lang.discourse.group/
>
> Re: learning Fortran, please see this page at fortran-lang.org that provides links to a lot of resources:
> https://fortran-lang.discourse.group/
I appreciate the link to the sources. Thanks!

Re: Fortran application not writing output to one of the .out files

<b5a52ab7-3c93-416a-ba79-3c6eae45942dn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a05:622a:986:b0:3a5:1eca:a7e1 with SMTP id bw6-20020a05622a098600b003a51ecaa7e1mr44062139qtb.350.1668012063326;
Wed, 09 Nov 2022 08:41:03 -0800 (PST)
X-Received: by 2002:a05:6214:2aa5:b0:4a3:1b3a:6bdf with SMTP id
js5-20020a0562142aa500b004a31b3a6bdfmr1157256qvb.2.1668012063017; Wed, 09 Nov
2022 08:41:03 -0800 (PST)
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: Wed, 9 Nov 2022 08:41:02 -0800 (PST)
In-Reply-To: <73bc2070-0245-4728-861a-fcfea8823f0an@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:6c44:7f:fcd3:e02f:3b5:2b4a:3fc;
posting-account=KimmrwkAAADdSAgTyAN8YtkxLYVZCGd0
NNTP-Posting-Host: 2600:6c44:7f:fcd3:e02f:3b5:2b4a:3fc
References: <88611436-dead-44a6-be84-18da661c3856n@googlegroups.com>
<b6c1537b-9355-437a-a828-b0dbc58ce913n@googlegroups.com> <f7056578-24f1-4e2b-b773-655b928ffccen@googlegroups.com>
<73bc2070-0245-4728-861a-fcfea8823f0an@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <b5a52ab7-3c93-416a-ba79-3c6eae45942dn@googlegroups.com>
Subject: Re: Fortran application not writing output to one of the .out files
From: sushantmehan@gmail.com (Sushant Mehan)
Injection-Date: Wed, 09 Nov 2022 16:41:03 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 5034
 by: Sushant Mehan - Wed, 9 Nov 2022 16:41 UTC

On Wednesday, November 9, 2022 at 4:17:02 AM UTC-6, Robin Vowels wrote:
> On Wednesday, November 9, 2022 at 3:04:02 PM UTC+11, sushan...@gmail.com wrote:
> > On Tuesday, November 8, 2022 at 2:54:06 PM UTC-6, jfh wrote:
> > > On Wednesday, November 9, 2022 at 7:28:39 AM UTC+13, sushan...@gmail.com wrote:
> > > > Hi All,
> > > >
> > > > I am beginners in FORTRAN and dealing with huge FORTRAN project. I apologize in the beginning if my question sounded lame. Here is the issue
> > > >
> > > > Blocks of Code where file was introduced and initiated. There are 300+ fortran files in the project. That's why using only a few blocks if thats helpful
> > > > open (178,file="instreamP.out")
> > > > write (178,12224)
> > > > 12224 format ('Year Day Rch flow solp-in solp-out orgp
> > > > -in orgp-out EPC benp solp_benp orgp_benp so
> > > > lp_orgp ')
> > > >
> > > > write (178,78) curyr,iida,jrch,flow,solpcon,dsolp,orgpcon,dorgp,
> > > > * epc,sedp_benthos(jrch),solp_benp_flux, orgp_benp_flux,
> > > > * solp_orgp_flux
> > > >
> > > > The code executed successfully, and I ran the project, and my output file with name "instreamP.out is produced with headers, but there is no data in it.
> > > >
> > > > I would appreciate any help in this matter. Also, I would appreciate any guidance on learning FORTRAN.
> > > >
> > > > Thanks,
> > > > Sushant
> > > Is the program in fixed or free source form? The * in the two last lines are valid only in fixed source form but the format statement makes me wonder. Are the ends of lines in what you posted (where format 12224 occupies 3 lines) at the ends of lines in the actual program? What is format 78 and how were the things written with it declared and evaluated? We could possibly give useful help if provided with a minimal complete program, together with any error messages and warnings it gave at compile time and run time. What compiler was used?
> > That's the problem. I am not getting any error messages. Apologies for my ignorance. I am not aware if the program is fixed or free. Since it is open source, so many people use it, and the convention changes from time to time. Unfortunately, there is no option here to link the *.f files else I Would have shared the program.
> >
> > But I will try it now by being more detailed
> > This is one chunk of code in one file
> > write (178,79) curyr,iida,jrch,flow,solpcon,dsolp,orgpcon,dorgp,
> > * epc,sedp_benthos(jrch),solp_benp_flux, orgp_benp_flux,
> > * solp_orgp_flux
> > !! end if
> > 79 format(3i4,10f12.3)
> >
> > The other chunk is
> > open (178,file="instreamP.out")
> > write (178,12224)
> > 12224 format ('Year Day Rch flow solp-in solp-out orgp
> > -in orgp-out EPC benp solp_benp orgp_benp so
> > lp_orgp ')
> > These are the only two blocks where the code was called, and no other place it was mentioned. Note: I changed 78 to 79 because 78 was used in another file of the same project.
> .
> The OPEN statement must be executed before the WRITE (178 .. statement.
> If it is not, the output will be written to another file, possibly called FOR178.
> .
> I suggested inserting a simple PRINT statement, just before the WRITE statement.
> You need to do this, in order to find out whether the WRITE statement is being executed.

This is a great suggestion. I will try this right now and will share how it goes.

Re: Fortran application not writing output to one of the .out files

<tkh528$ao3m$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: not_valid@comcast.net (James Van Buskirk)
Newsgroups: comp.lang.fortran
Subject: Re: Fortran application not writing output to one of the .out files
Date: Wed, 9 Nov 2022 14:10:19 -0700
Organization: A noiseless patient Spider
Lines: 1
Message-ID: <tkh528$ao3m$1@dont-email.me>
References: <88611436-dead-44a6-be84-18da661c3856n@googlegroups.com> <3f6ce8bd-d99c-4150-a0af-b1099741883fn@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain;
format=flowed;
charset="UTF-8";
reply-type=original
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 9 Nov 2022 21:11:37 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="a8a5f7675c5a145f26b0aa05aa0ff68a";
logging-data="352374"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18WMWJesUzDY0IGJSgtmUJ014R81RWMMBo="
Cancel-Lock: sha1:bi8bL76MwiJ1V1M7rNp60k4PFU8=
X-Newsreader: Microsoft Windows Live Mail 16.4.3528.331
X-Priority: 3
Importance: Normal
In-Reply-To: <3f6ce8bd-d99c-4150-a0af-b1099741883fn@googlegroups.com>
X-MSMail-Priority: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V16.4.3528.331
 by: James Van Buskirk - Wed, 9 Nov 2022 21:10 UTC

"FortranFan" wrote in message
news:3f6ce8bd-d99c-4150-a0af-b1099741883fn@googlegroups.com...

> You may also want to inquire at the relatively recent Fortran
> Discourse site where you can attach Fortran source code with
> your posts, provide links, include code snippets with syntax
> highlighting, etc.
> https://fortran-lang.discourse.group/

Why are you always trying to move users of this group to
that Fortran discourse group? I took a look at it and a couple
of threads I noticed was one where apparently the speed of
the sieve of Eratosthenes was compared with a C++
implementation, but there was no code visible on the
forum so you couldn't identify the mistakes in the Fortran
code. I wrote a sieve at one time that was pretty fast for
sizes less than about 1.0e12 and maybe posted it here
but I don't have time and energy right now to search for
it.
Another thread was an inquiry that amounted to being
about procedures with the BIND attribute. I have been
working on code what needs to pop up OpenGL windows
to display graphics, so it needs to do stuff like ask the OS
to initiate a new thread (_beginthreadex), establish thread
local storage, and set up an OpenGL canvas. OpenGL itself
needs to be called. How you are supposed to achieve all
this without the interface capabilities introduced in f2003
is beyond me, but you wouldn't have a hint of this from
reading the thread.
To me, the forum is overall disappointing.

Re: Fortran application not writing output to one of the .out files

<6d0088fd-4dc3-4710-9031-da5aa7f1c1fbn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a05:622a:19a6:b0:3a5:7005:e8a with SMTP id u38-20020a05622a19a600b003a570050e8amr21747466qtc.147.1668035445876;
Wed, 09 Nov 2022 15:10:45 -0800 (PST)
X-Received: by 2002:a05:6214:21ed:b0:4bb:e947:c59a with SMTP id
p13-20020a05621421ed00b004bbe947c59amr51773063qvj.46.1668035445695; Wed, 09
Nov 2022 15:10:45 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.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: Wed, 9 Nov 2022 15:10:45 -0800 (PST)
In-Reply-To: <tkh528$ao3m$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=136.226.53.0; posting-account=ZZXq9AoAAAAQEcA7zKAGm0UFQh4gMBv7
NNTP-Posting-Host: 136.226.53.0
References: <88611436-dead-44a6-be84-18da661c3856n@googlegroups.com>
<3f6ce8bd-d99c-4150-a0af-b1099741883fn@googlegroups.com> <tkh528$ao3m$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <6d0088fd-4dc3-4710-9031-da5aa7f1c1fbn@googlegroups.com>
Subject: Re: Fortran application not writing output to one of the .out files
From: parekhvs@gmail.com (FortranFan)
Injection-Date: Wed, 09 Nov 2022 23:10:45 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2789
 by: FortranFan - Wed, 9 Nov 2022 23:10 UTC

On Wednesday, November 9, 2022 at 4:11:40 PM UTC-5, James Van Buskirk wrote:
> "FortranFan" wrote in message

> news:3f6ce8bd-d99c-4150...@googlegroups.com...
> > You may also want to inquire at the relatively recent Fortran
> > Discourse site where you can attach Fortran source code with
> > your posts, provide links, include code snippets with syntax
> > highlighting, etc.
> > https://fortran-lang.discourse.group/
> Why are you always trying to move users of this group to
> that Fortran discourse group? ..

"You talkin' to me"?

> To me, the forum is overall disappointing.

I think the Fortran Discourse is really a good place for all Fortran-related discussions. It is a very useful site generally and I think it is especially the case for anyone who shares about themselves as "I am beginners in FORTRAN" and "I would appreciate any guidance on learning FORTRAN"

To each their own in terms which online groups they want to use. That's why I merely suggest the Fortran Discourse site to posters, as in "You may also want to inquire at the relatively recent Fortran Discourse site .." I expect the posters will note "may" and "also" and appreciate the obvious which is that it's entirely up to them, they can do as they wish .. hopefully they become aware there are more resources out there to help with Fortran.

I will continue pointing out the Fortran Discourse site to whoever appears to be a new poster on Fortran-related matters.

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor