I/o Error On C_file Fortran
system based on the UNIX operating system is not as record-oriented as FORTRAN. This operating system treats files as sequences of characters instead of collections of records. The FORTRAN runtime system keeps track of file formats and access mode during runtimes. It also provides the file facilities, including the FORTRAN libraries and the standard I/O library. Logical Units The FORTRAN default value for the maximum number of logical units that a program can have open at one time is 64. For current Solaris releases, this limit is 256. A FORTRAN program can increase this limit beyond 64 by calling the setrlim() function. See the man page setrlim(2). If you are running csh, you can also do this with the limit or unlimit command; see csh(1). The standard logical units 0, 5, and 6 are preconnected as stderr, stdin, and stdout, respectively. These are not actual file names, and cannot be used for opening these units. INQUIRE does not return these names, and indicates that the above units are not named unless they have been opened to real files. However, these units can be redefined with an OPEN statement. The names, stderr, stdin, and stdout, are meant to make error reporting more meaningful. To preserve error reporting, the system makes it an error to close logical unit 0, although it can be reopened to another file. If you want to open a file with the default file name for any preconnected logical unit, remember to close the unit first. Redefining the standard units can impair normal console I/O. An alternative is to use shell redirection to externally redefine the above units. To redefine default blank control or the format of the standard input or output files, use the OPEN statement, specifying the unit number and no file name, and use the options for the kind of blank control you want. I/O Errors Any error detected during I/O processing causes the program to abort, unless alternative action has been provided specifically in the program. Any I/O statement can include an ERR= clause (and IOSTAT= clause) to specify an alternative branch to be taken on errors and return the specific error code. Read statements can include END=n to branch on end-of-file. File position and the value of I/O list items are
a partial list of runtime I/O messages issued by f90 Table A-2 f90 Runtime I/O Messages Error Message 1000format error 1001illegal unit number 1002formatted I/O on unformatted unit 1003unformatted I/O on formatted unit 1004direct-access I/O on sequential-access unit 1005sequential-access I/O on direct-access unit 1006device does not support BACKSPACE 1007off beginning of record 1008can't stat file 1009no * after repeat count 1010record too long 1011truncation failed 1012incomprehensible list input 1013out of free space 1014unit not connected 1015read unexpected character 1016illegal logical input field 1017`new' file exists 1018can't find `old' file https://docs.oracle.com/cd/E19957-01/805-4939/6j4m0vnc0/index.html 1019unknown system error 1020requires seek ability 1021illegal argument 1022negative repeat count 1023illegal operation for channel or device 1024reentrant I/O 1025incompatible specifiers in open 1026illegal input for namelist 1027error in FILEOPT parameter 1028writing not allowed 1029reading not allowed 1030integer overflow on input 1031floating-point overflow on input 1032floating-point underflow on input 1051default input unit closed 1052default output unit closed 1053direct-access READ from unconnected https://docs.oracle.com/cd/E19957-01/805-4941/6j4m2soba/index.html unit 1054direct-access WRITE to unconnected unit 1055unassociated internal unit 1056null reference to internal unit 1057empty internal file 1058list-directed I/O on unformatted unit 1059namelist I/O on unformatted unit 1060tried to write past end of internal file 1061unassociated ADVANCE specifier 1062ADVANCE specifier is not `YES' or `NO' 1063EOR specifier present for advancing input 1064SIZE specifier present for advancing input 1065negative or zero record number 1066record not in file 1067corrupted format 1068unassociated input variable 1069more I/O-list items than data edit descriptors 1070zero stride in subscript triplet 1071zero step in implied DO-loop 1072negative field width 1073zero-width field 1074character string edit descriptor reached on input 1075Hollerith edit descriptor reached on input 1076no digits found in digit string 1077no digits found in exponent 1078scale factor out of range 1079digit equals or exceeds radix 1080unexpected character in integer field 1081unexpected character in real field 1082unexpected character in logical field 1083unexpected character in integer value 1084unexpected character in real value 1085unexpected character in complex value 1086unexpected character in logical value 1087unexpected character in character value 1088unexpected character before NAMELIST group name 1089NAMELIST group name does not match the name in
flexible set of features for reading and writing data which are independent of the underlying operating system. Unit Numbers Every input or https://www.obliquity.com/computer/fortran/io.html output device is identified by a small, positive integer known as the https://software.intel.com/en-us/forums/intel-fortran-compiler-for-linux-and-mac-os-x/topic/270399 unit number. These unit numbers are used in READ and WRITE statements to indicates the source or destination for the operation. Two of these numbers are always pre-defined at the start of every FORTRAN77 program: unit 5 corresponds to standard input, which is often the user's terminal, i/o error and unit 6 corresponds to standard output, which is also often the terminal but may be another device, such as a printer. Example This example reads a single integer value from standard input and writes it to standard output: READ(5,100)I WRITE(6,200)I Unit numbers must be used when reading from or writing to external files. However, when using the standard i/o error on pre-connected I/O devices, the unit number may be replaced by an asterisk *. READ(*,100)I WRITE(*,200)I READ and WRITE Statements The READ statement reads information from one or more records in a file or standard pre-connected input device (like the terminal) into a data-transfer-list of variables, array elements, etc. Its general form is READ(UNIT=integer-expression, control-list) data-transfer-list Correspondingly, the WRITE statement prints information to one or more records in a file or standard pre-connected output device (like the terminal) from a data-transfer-list of variables, array elements, expressions, etc. Its general form is WRITE(UNIT=integer-expression, control-list) data-transfer-list The control-list is a set of keyword/value pairs which define the characteristics of the I/O. The unit number must always be given. The following table lists the standard specifiers in FORTRAN77. Keyword Description PermittedValues UNIT The unit number associates the READ or WRITE statement with the input or output device. The unit number is traditionally listed first and if it is, the UNIT= part of the keyword/value pair may be omitted. Any small positive integer expression when referring to an external file
LearningModern CodeNetworkingOpen SourceStorageToolsDeveloper TypeEmbedded SystemsGame DevMediaTechnical, Enterprise, HPCWebOSAll ToolsAndroid*HTML5Linux*OS X*Windows*ResourcesCode SamplesContact SupportDocumentationFree SoftwareIntel Registration CenterProduct ForumsSDKsResourcesPartner with IntelAcademic ProgramPartner SpotlightBlack Belt DeveloperDeveloper MeshInnovator ProgramSuccess StoriesLearnBlogBusiness TipsEventsVideosSupportContact SupportDeveloper EvangelistsFAQsForums Search form Search You are hereHome › Forums › IntelĀ® Software Development Products › IntelĀ® Fortran Compiler for Linux* and Mac OS X* FacebookLinkedInTwitterDiggDeliciousGoogle Plus OpenMP related I/O error OpenMP related I/O error thornpig Tue, 10/12/2010 - 14:39 I am running a numerical model in "dm+sm" parallel mode on a cluster with 64 bit linux OS which has more than 2 nodes and 16 cpus per node. The compilation of the model with "dm+sm" seemed successful. When I set OMP_NUM_THREADS to 2 or greater , the model was terminated with an error message :forrtl: severe (40): recursive I/O operation, unit 0, file unknown When I set OMP_NUM_THREADS to 1, which acctually disabled the openmp function, the model ran successfully.Please help me out. Thanks a lot !Below is my PBS job file: #!/bin/csh#PBS -l nodes=2:ppn=8#PBS -m aesetenv OMP_NUM_THREADS 2time mpirun wrf.cshwhere "Wrf.csh" unlimits the stacksize and executes the model as follows:#!/bin/cshlimit stacksize unlimitedexec wrf.exe RSS Top 9 posts / 0 new Last post For more complete information about compiler optimizations, see our Optimization Notice. jimdempseyatthecove Wed, 10/13/2010 - 10:18 Is your file I/O context held in Thread Local Storage? Locate in your code where (you suspect) the erronious I/O statement is located. Insert some diagnostic code !$OMP CRITICA