Fortran · File status code

IOSTAT 32 — Invalid Logical Unit Number

What does IOSTAT 32 — Invalid Logical Unit Number mean in Fortran?

The unit number used in an I/O statement falls outside the range the runtime accepts (0 through roughly 2,147,483,647), most often because it's negative or was computed from an uninitialized or corrupted variable.

IOSTAT 32 — Invalid Logical Unit NumberIntel Fortran

Condition

The unit number used in an I/O statement falls outside the range the runtime accepts (0 through roughly 2,147,483,647), most often because it's negative or was computed from an uninitialized or corrupted variable.

Fix

Trace where the unit number value comes from — a bad loop index, an uninitialized variable, or a typo — and make sure unit numbers are always small, well-defined constants or parameters.

Pending source verification. Not yet checked against official documentation.

Related file status code