Skip to content

loadtxt CI failure: Dimension mismatch in example.dat during example tests #1178

Description

@JAi-SATHVIK

Description

The loadtxt module tests are currently failing in CI (specifically Test #187 and #188) due to an input conversion error. The issue arises because there is a mismatch between the data provided in example/io/example.dat and the number of values the loadtxt routine is attempting to read.

The Error Log-

loadtxt: error <Bad value during floating point read> reading 6 values from line 1 of example.dat.

The Data File (example/io/example.dat):

 1.00000000E+00  4.00000000E+00
 2.00000000E+00  5.00000000E+00
 3.00000000E+00  6.00000000E+00

Expected Behaviour

The loadtxt routine should correctly detect the number of columns in example/io/example.dat (which is 2) and load the data into the allocatable array x without triggering a runtime error. The example test example_loadtxt provided in the repository should pass successfully during CI/CD workflows. Currently, it fails because it attempts to read 6 values from a 2-column line.

Version of stdlib

Latest main branch

Platform and Architecture

OS: Linux (Ubuntu 22.04 / GitHub Actions Runner) Architecture: x86_64 Compiler: gfortran (GCC)

Additional Information

I think we can either:

  • Update example/io/example.dat to include the expected 6 columns of data.
  • Update the example test program to expect a 2-column format.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions