Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Valued Contributor II
21 Views

Using file_storage_size from iso_fortran_env module

Jump to solution

Hello,

I noticed a remark in the documentation (Intel Fortran compiler v17.0) that puzzled me:

FILE_STORAGE_SIZE

Is the size of the file storage unit expressed in bits. To use this constant, compiler option assume byterecl must be enabled.

I tried this in a small test program and found that the file storage size is the same whether I use -assume:byterecl or -assume:nobyterecl. If this remark is correct, how does it affect the results?

For your convenience, I have copied this test program below:

! filesize.f90 --
!     Determine the usefulness of FILE_STORAGE_UNIT
!     - caveat in Intel Fortran documentation
!
program filesize
    use iso_fortran_env
    implicit none

    integer :: sz

    write(*,*) 'File storage:', file_storage_size

    inquire( file = 'filesize.exe', size = sz )

    write(*,*) 'Size: ', sz

    open( 10, file = 'filesize.exe', access = 'stream' )
    inquire( 10, size = sz )

    write(*,*) 'Size: ', sz
end program filesize

 

 

0 Kudos

Accepted Solutions
Highlighted
Honored Contributor I
21 Views

Arjen Markus wrote:

Ah, thanks. I should have guessed, but I did not see any connection with unformatted direct access files.

@Arjen Markus,

Do you think it would help if the Intel Fortran documentation provided further description around the /assume:byterecl remark and made a clear connection with unformatted record file?  If yes, you think you can submit a support request at the Intel Online Service Center to follow up accordingly on this bit of the documentation?

Thanks,

View solution in original post

0 Kudos
8 Replies
Highlighted
Black Belt
21 Views

The remark relates to the size on disk of an unformatted direct access file.  The value of FILE_STORAGE_UNIT is inconsistent with what the compiler actually does without /assume:byterecl.

0 Kudos
Highlighted
Valued Contributor II
21 Views

Ah, thanks. I should have guessed, but I did not see any connection with unformatted direct access files.

0 Kudos
Highlighted
Honored Contributor I
22 Views

Arjen Markus wrote:

Ah, thanks. I should have guessed, but I did not see any connection with unformatted direct access files.

@Arjen Markus,

Do you think it would help if the Intel Fortran documentation provided further description around the /assume:byterecl remark and made a clear connection with unformatted record file?  If yes, you think you can submit a support request at the Intel Online Service Center to follow up accordingly on this bit of the documentation?

Thanks,

View solution in original post

0 Kudos
Highlighted
Valued Contributor II
21 Views

Rereading the entry, I would say "yes" - there is no separate parameter to inquire about the unit for direct-access files.

0 Kudos
Highlighted
Black Belt Retired Employee
21 Views

Direct access is not relevant. It's entirely the unit for RECL= for unformatted files of any access type.

I do find that the "To use this constant" wording to be unhelpful, and would recommend something like "The value of this constant is correct only if the assume byterecl compiler option is in effect." There's similar wording for INPUT_UNIT and OUTPUT_UNIT.

Further unhelpful is that "file storage unit" is a term not referenced elsewhere in the documentation - indeed, in the description of RECL= where it matters most, there's almost no clue about the relevance.

FortranFan, you can (and should) submit a support request yourself asking that the documentation of these constants in ISO_FORTRAN_ENV be enhanced to be more useful. At present they largely echo the standard.

0 Kudos
Highlighted
Valued Contributor II
21 Views

As the OP I would like to submit such a support request, but I have sofar been unable to find out how to do that. I may be overlooking it, but the only thing I do see is how to get support (via a.o. this forum), not how to pose a request.

0 Kudos
Highlighted
Honored Contributor I
21 Views

Arjen Markus wrote:

As the OP I would like to submit such a support request, but I have sofar been unable to find out how to do that. I may be overlooking it, but the only thing I do see is how to get support (via a.o. this forum), not how to pose a request.

Not sure what you mean by your comments above, are you referring to Intel Online Service Center (OSC)?

https://supporttickets.intel.com/?lang=en-US

Have you tried "Request Support" link and completed the steps?

0 Kudos
Highlighted
Valued Contributor II
21 Views

Sorry, this got lost in the pile of things ... I just tried to register the suggestion via the above link, but even though I am logged in, I get a registration form and when I try to fill the required data (name and the like), all I can do is select my country and language. All other fields - including "next step" remain inert.

0 Kudos