24.05.2014 Views

XL Fortran Enterprise Edition for AIX : User's Guide - IBM

XL Fortran Enterprise Edition for AIX : User's Guide - IBM

XL Fortran Enterprise Edition for AIX : User's Guide - IBM

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Input/Output Errors<br />

If the error detected is an input/output error and you have specified IOSTAT on<br />

the input/output statement in error, the IOSTAT variable is assigned a value<br />

according to Conditions and IOSTAT Values in the <strong>XL</strong> <strong>Fortran</strong> <strong>Enterprise</strong> <strong>Edition</strong> <strong>for</strong><br />

<strong>AIX</strong> Language Reference.<br />

If you have installed the <strong>XL</strong> <strong>Fortran</strong> run-time message catalog on the system on<br />

which the program is executing, a message number and message text are issued to<br />

the terminal (standard error) <strong>for</strong> certain I/O errors. If you have specified IOMSG<br />

on the input/output statement, the IOMSG variable is assigned the error message<br />

text if an error is detected, or the content of IOMSG variable is not changed. If this<br />

catalog is not installed on the system, only the message number appears. Some of<br />

the settings in “Setting Run-Time Options” on page 51 allow you to turn some of<br />

these error messages on and off.<br />

If a program fails while writing a large data file, you may need to increase the<br />

maximum file size limit <strong>for</strong> your user ID. You can do this through a shell<br />

command, such as ulimit in ksh, or through the smit command.<br />

Tracebacks and Core Dumps<br />

If a run-time exception occurs and an appropriate exception handler is installed, a<br />

message and a traceback listing are displayed. Depending on the handler, a core<br />

file might be produced as well. You can then use a debugger to examine the<br />

location of the exception.<br />

To produce a traceback listing without ending the program, call the xl__trbk<br />

procedure:<br />

IF (X .GT. Y) THEN ! X > Y indicates that something is wrong.<br />

PRINT *, ’Error - X should not be greater than Y’<br />

CALL <strong>XL</strong>__TRBK ! Generate a traceback listing.<br />

X = 0<br />

! The program continues.<br />

END IF<br />

See “Installing an Exception Handler” on page 298 <strong>for</strong> instructions about exception<br />

handlers and “<strong>XL</strong> <strong>Fortran</strong> Run-Time Exceptions” on page 66 <strong>for</strong> in<strong>for</strong>mation about<br />

the causes of run-time exceptions.<br />

Debugging a <strong>Fortran</strong> 90 or <strong>Fortran</strong> 95 Program<br />

<strong>XL</strong> <strong>Fortran</strong> includes a technology preview of the <strong>IBM</strong> Distributed Debugger, a<br />

client-server debugger, which you can use to help debug your programs. The<br />

Distributed Debugger can debug programs running on systems accessible through<br />

a network connection as well as debug programs running on your workstation.<br />

For instructions on using your chosen debugger, consult the online help within the<br />

debugger or its documentation.<br />

Always specify the -g option when compiling programs <strong>for</strong> debugging.<br />

Related in<strong>for</strong>mation: See “Options <strong>for</strong> Error Checking and Debugging” on page<br />

75.<br />

376 <strong>XL</strong> <strong>Fortran</strong> <strong>Enterprise</strong> <strong>Edition</strong> <strong>for</strong> <strong>AIX</strong> : User’s <strong>Guide</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!