None.
Produces or suppresses groups of informational messages.
The messages are written to standard output and, optionally, to the listing file if one is generated.
Option syntax >>- -q--+-noinfo---------------------------------+------------->< '-info--+------------------------------+-' | .-:---------------------. | | V | | '-=----+-all---------------+-+-' +-noall-------------+ +-HOSTASSOCiation---+ +-NOHOSTASSOCiation-+ +-mt----------------+ +-nomt--------------+ +-stp---------------+ +-nostp-------------+ +-unset-------------+ '-nounset-----------'
@PROCESS:
@PROCESS INFO[(suboptions)] | NOINFO
-qnoinfo
Reports potential synchronization issues in parallel code. This suboption detects the Global Thread Flag pattern where one thread uses a shared volatile flag variable to notify other threads that it has completed a computation and stored its result to memory. Other threads check the flag variable in a loop that does not change the flag variable. When the value of the flag variable changes, the waiting threads access the computation result from memory. The PowerPC® storage model requires synchronization before the flag variable is set in the first thread, and after the flag variable is checked in the waiting threads. Synchronization can be done by the LIGHT_SYNC or ISYNC directive.
10 CALL sleep_(value)
IF (.NOT. flag) GOTO 10
! The SYNC directive is needed here.
x = shared_computation_result
Some patterns that do not require synchronization are similar to the patterns described above. The messages generated by this suboption are only suggestions about potential synchronization issues.
The default option is -qinfo=nomt.
-qinfo=unset uses program information, such as control flow information, available during optimization. As a result, detection accuracy improves with the optimization level. For example, some uses of unset variables that are not flagged at -O0 are flagged at -O2. Aggressive optimization levels, such as -O4 and -O5, can cause the line numbers in the informational messages to become inaccurate. In very rare cases, these optimization levels reorder the program sufficiently to cause false positive messages from static analysis. You can get the best results with the -O2 optimization level.
The -qinitauto option initializes automatic variables. As a result, the -qinitauto option hides variables that are used before they are set from the -qinfo=unset option.
The -qsave option changes the storage class of automatic variables to STATIC. As a result, the -qsave option hides variables that are used before they are set from the -qinfo=unset option.
Specifying -qinfo with no suboptions is equivalent to -qinfo=all.
Specifying -qnoinfo is equivalent to -qinfo=noall.
xlf90 myprogram.f -qinfo=stp -qstackprotect
xlf2008 t.f -qinfo=HOSTASSOCiation
Suppose
that t.f contains the following code:PROGRAM p
IMPLICIT none
INTEGER :: var
var = 3
CALL sub()
CONTAINS
SUBROUTINE sub()
PRINT *, var ! The compiler issues an information message when entity 'var' is
! accessed by host association for the first time.
PRINT *, var ! No message is issued here.
END
INTEGER FUNCTION func()
func = var ! Entity 'var' is in a different scope. The compiler issues an
! information message when the entity is accessed by host association
! for the first time in each scope.
END
END
The compiler issues the following information messages:"t.f", line 11.20: 1521-004 (I) Entity var is accessed by host association.
"t.f", line 16.18: 1521-004 (I) Entity var is accessed by host association.
xlf95_r -qinfo=mt -O3 sync.f
Suppose
that sync.f contains the following code:MODULE m
IMPLICIT NONE
LOGICAL, VOLATILE :: done ! shared flag
INTEGER, VOLATILE :: shared_result
CONTAINS
SUBROUTINE setter(id)
IMPLICIT NONE
INTEGER, INTENT(IN) :: id
CALL sleep_(5)
shared_result = 7
! !ibm* light_sync
done = .TRUE. ! line 13
END SUBROUTINE
SUBROUTINE waiter(id)
IMPLICIT NONE
INTEGER, INTENT(IN) :: id
DO WHILE (.NOT. done)
CALL sleep_(1)
END DO ! line 22
! !ibm* light_sync
PRINT *, shared_result
END SUBROUTINE
END MODULE
PROGRAM MAIN
USE m, ONLY: waiter, setter
USE f_pthread
IMPLICIT NONE
TYPE(f_pthread_t) threads(2)
TYPE(f_pthread_attr_t) attr
INTEGER(4) flag, result
! Initialization
result = f_pthread_attr_init(attr)
IF (result /= 0) ERROR STOP 1
flag = FLAG_DEFAULT
! Create threads
result = f_pthread_create(threads(1), attr, flag, waiter, 1)
IF (result /= 0) ERROR STOP 2
result = f_pthread_create(threads(2), attr, flag, setter, 2)
IF (result /= 0) ERROR STOP 3
result = f_pthread_join(threads(1))
result = f_pthread_join(threads(2))
END PROGRAM
The compiler issues the following informational
message:** m === End of Compilation 1 ===
** main === End of Compilation 2 ===
1586-669 (I) "sync.f", line 22: If this loop is used as a synchronization
point, additional synchronization via a directive or built-in function might
be needed.
1586-670 (I) "sync.f", line 13: If this statement is used as a synchronization
point, additional synchronization via a directive or built-in function might
be needed.
1501-510 Compilation successful for file sync.f.
xlf95 -qinfo=unset -O factorial.f
factorial.f contains
the following code:module m
contains
recursive function factorial(n) result(result)
integer, value :: n
integer result, temp
if (n > 1) then
temp = n * factorial(n - 1)
print *, result ! line 9
endif
result = temp ! line 12
end function
end module
use m
integer x
x = factorial(1)
end
The compiler issues the following informational messages:1500-098 (I) "factorial.f", line 9: "result" is used before it is set.
1500-099 (I) "factorial.f", line 12: "temp" might be used before it is set.
1501-510 Compilation successful for file factorial.f.