Silverfrost Forums

Welcome to our forums

NAMELIST - second or subsequent time reading, fails

13 Nov 2024 3:24 #31691

I am reading a single files that contains two namelists, written as:

		write(i_donor,donor_parms)
		write(i_donor,envelope_parms)

On a subsequent execution of the program, I read that file with the same namelists, the first time works fine. If I then attempt to read it again, the first namelist of the pair fails with an error code of 204. If I read a different file (created the same way), it errs with a code=202. Go back to the original failing file, code=204.

I placed a REWIND between the two reads, and (ignoring the first error), can read the second namelist successfully.

I don't quite know what these error codes mean, nor why a second (or any subsequent) attempt to read causes a failure.

13 Nov 2024 5:47 #31693

Bill

I will need a working program that illustrates the failure.

It might be the same fault that has now been fixed.

13 Nov 2024 7:52 #31694

Paul,

The data does not contain any TYPE'd data elements, FWIW.

That said, I will attempt to re-create in a smaller form the problem and place it in a PLATO project, than share the link on DropBox.

As always, your help is much appreciated! Bill

13 Nov 2024 8:28 #31696

The following simple program recreates the issue.

Note that the included file is identical to the one with which I encountered the problem.

Bill

This is a DropBox transfer link: https://www.dropbox.com/t/aH1IMPFWVXOVLZfq

14 Nov 2024 8:27 #31698

Bill

I have had a brief look at this but it looks like it would take a few hours to track down the fault which at this point may not be in the compiler.

I notice that one of the NAMELISTs has its tail commented out. I guess I would start with shorter lists and add one item at a time until the fault occurs.

The input file 'default.doner' contains NULL characters which is a complicating factor.

Maybe your test program should begin by writing simple data to default.donor.

14 Nov 2024 1:17 #31701

Paul, thanks for the feedback. I will do a single item at a time and see. I have another name list that is all floating point (envelopes), and it has never failed.

The commented out portions are the TYPE'd variables that caused the other problem.

14 Nov 2024 2:35 #31702

Paul, I have another transfer available: https://www.dropbox.com/t/et75ZxZurWEaoXKZ

This time, I initialized all the variables at the beginning, wrote a temp file, next set all the items to a new value, then read the file, causing the error on the first read (=202). I then print all the variables to see which ones it actually processed.

The third item in the list ('PRINT_NAME') is not changed. This is the only item in the NAMELIST that is in a different named COMMON.

Examining the file itself (temp.donor), I can find no obvious issues

14 Nov 2024 5:31 #31703

Bill

I probably won't be able to look at this until sometime next week.

14 Nov 2024 9:29 #31704

Thanks for the heads up, Paul.

I have (temporarily) chosen the 'hard way' so I can finish development. I can certainly wait!

27 Nov 2024 3:51 #31725

Bill

This second issue with NAMELIST has now been fixed for the next release of the DLLs.

27 Nov 2024 4:57 #31726

Thank you very much, Paul! I look forward to the DLL release and incorporation into the code!

A Happy Thanksgiving (US) gift!

And I thank you for all you do for this group! Bill Horger

Please login to reply.