Skip to content

Conversation

@perazz
Copy link
Member

@perazz perazz commented Nov 20, 2024

loadtxt keeps failing often in the CI tests, see e.g. here or #862 .

Ifort output is:

160/340 Test #161: loadtxt ................................***Failed 0.01 sec forrtl: severe (66): output statement overflows record, unit -5, file Internal Formatted Write Image PC Routine Line Source example_loadtxt 0000000000444ECE Unknown Unknown Unknown example_loadtxt 0000000000404AF2 Unknown Unknown Unknown example_loadtxt 0000000000404253 Unknown Unknown Unknown example_loadtxt 00000000004041BD Unknown Unknown Unknown libc.so.6 00007F7E6A629D90 Unknown Unknown Unknown libc.so.6 00007F7E6A629E40 __libc_start_main Unknown Unknown example_loadtxt 00000000004040D5 Unknown Unknown Unknown 

So we can infer:

  • Error happens when running example_loadtxt, examples are also used as test programs
  • output statement -> Writing to something
  • unit -5 -> Writing to an internal unit = a character string
  • overflows record -> record is too short -> string is too short.

I believe the error may be triggered in one of these statements:

write(msgout,1) trim(iomsg),i,trim(filename)

With a long file name (many sub-folders), it is possible that the output message exceeds 128 characters.

In other words, some other error has occurred, but the second error hides the root cause. This PR attempts to fix the second error (insufficient internal string length), that will hopefully help us understand why the example program sometimes fails.

cc: @fortran-lang/stdlib @jvdp1 @jalvesz

@perazz perazz marked this pull request as ready for review November 20, 2024 14:06
Copy link
Member

@jvdp1 jvdp1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, @perazz . Thank you.

@perazz
Copy link
Member Author

perazz commented Nov 21, 2024

Thank you @jvdp1 - this is a simple PR, I would say let's wait one or two days, and then merge if no further comments.

@perazz perazz merged commit f6d317e into fortran-lang:master Nov 23, 2024
16 checks passed
@perazz perazz deleted the loadtxt_fix_attempt branch November 23, 2024 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants