Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29279 Discussions

Severe(48): Invalid argument to Fortran Run-Time Library

jirina
New Contributor I
2,431 Views

Hello,

I have an application which tries to open a binary file. IOSTAT value returned by the OPEN function is 48 and help says that "The compiler passed an invalid or improperly coded argument to the Intel Fortran RTL. This can occur if the compiler is newer than the RTL in use."

I am running Kubuntu 8.04 and using Intel Fortran Compiler 11.069 (1 month evaluation if this could matter).

Is there any way of updating RTL to correspond to the compiler version? Or is there anything else I can try to make my application work?

Thank you in advance for any suggestions and ideas.

0 Kudos
1 Solution
Kevin_D_Intel
Employee
2,431 Views

If /opt/intel was empty before installing 11.0.069 then all components from the earlier Beta release were removed.

The error 48 is reproducible with your small test case. Thank you. The error occurs in relation to the DENYWR mode specified for the SHARE specifier. That appears not to be a valid mode on Linux but I need to confirm that with development.

Some work-arounds would be:

use SHARE='DENYRW'

remove SHARE and use ACTION='READ'

remove SHARE and set explicit permissions on the file

View solution in original post

0 Kudos
4 Replies
Kevin_D_Intel
Employee
2,431 Views

The Intel Fortran RTLs are updated along with the compiler at the time of installation.

If your working environment was initialized via either ifortvars.sh/ifortvars.csh and the complete application and any private libraries were recompiled/linked using the same 11.0.069 Fortran compiler, then it does not seem likely that you mixed RTLs from one Fortran release with another.

Do you have another Intel Fortran compiler release installed besides 11.0.069?

If this is reproducible using a small program, could you share the small program and Binary file with us via this post or Intel Premier here?

0 Kudos
jirina
New Contributor I
2,431 Views

I was using 11.0.044 before, but I (hopefully successfully) uninstalled it before installing 11.0.069. Right now, there is only the version 11.0.069. How can I check whether the previous version was removed completely? The directory /opt/Intel was empty after uninstalling 11.0.044, but there might be a different location to be checked.

I used ifortvars.sh to setup my environment.

I created a small testing program:

program iotest

character*20 filename
integer*4 iunx, iocheck

filename = 'ggri.d'
iunx = 9

OPEN ( iunx, FILE=filename, ACCESS='DIRECT', STATUS='OLD',
+ RECL=2000, IOSTAT=iocheck, SHARE='DENYWR' )

if ( iunx.gt.0 ) then
write(*,'(a,i2)') ' IO Error during opening: ', iocheck
endif

CLOSE ( iunx )

end

I compiled it in the following way:

ifort -fixed -extend_source 132 -openmp -fpscomp general -warn declarations -assume byterecl -threads -align all -heap-arrays iotest.for -o iotest.out

I ran iotest.out and the IO error is 48 again. I did not need to copy the file to the directory with the binary.

What should be my next step? Thanks a lot for helping me.

0 Kudos
Kevin_D_Intel
Employee
2,432 Views

If /opt/intel was empty before installing 11.0.069 then all components from the earlier Beta release were removed.

The error 48 is reproducible with your small test case. Thank you. The error occurs in relation to the DENYWR mode specified for the SHARE specifier. That appears not to be a valid mode on Linux but I need to confirm that with development.

Some work-arounds would be:

use SHARE='DENYRW'

remove SHARE and use ACTION='READ'

remove SHARE and set explicit permissions on the file

0 Kudos
jirina
New Contributor I
2,431 Views

Thank you for your work-arounds. I changed SHARE from 'DENYWR' to 'DENYRW' for all files I am opening in my application and the error 48 is gone. By the way, some other problems with opening files occured; I decided to create a new thread for that.

I checked the documentation and it says that 'DENYWR' is one of the available options.

0 Kudos
Reply