We ran into a problem with the nvfortran compiler (version 21.7). It appears that nvfortran fails to handle Fortran direct access I/O when the record length (recl) exceeds the maximum value of a 32-bit integer. I created a mini reproducer here: GitHub - vyu16/test_direct_io
$ gfortran --version GNU Fortran (GCC) 11.2.0 Copyright (C) 2021 Free Software Foundation, Inc. $ gfortran -o test.x test.f90 $ ./test.x record length should be: 19110297600 record length returned by inquire: 19110297600 record length in file: 19110297600
$ nvfortran --version nvfortran 21.7-0 64-bit target on x86-64 Linux -tp zen NVIDIA Compilers and Tools Copyright (c) 2021, NVIDIA CORPORATION & AFFILIATES. All rights reserved. $ nvfortran -o test.x test.f90 $ ./test.x record length should be: 19110297600 record length returned by inquire: 3 record length in file: 3 cannot write, error: 219
Am I missing a compiler flag or something? Or is this currently not supported by nvfortran?
Thank you for your help!