Intel® Fortran Compiler 17.0 Developer Guide and Reference
Run-Time Function: Sets or gets the value of the Fortran Run-Time Library (RTL) FASTMEM policy mode, which is the desired action to occur when an ALLOCATE statement requests FASTMEM/HBW memory, but it is not available to the program or node.
USE IFCORE
result = FOR_SET_FASTMEM_POLICY(mode)
mode |
Must be of type INTEGER(4). It is either a new policy value, or a request to return the current value. It must be one of the following:
|
The result type is INTEGER(4). The return value represents the previous setting of the Fortran Run-Time Library FASTMEM policy mode, unless the argument is FOR_K_FASTMEM_INFO, in which case the return value represents the current setting.
Consider the following:
program fastmem_policy
use ifcore
integer(4) :: old_policy
print *,"Print the current Results of initial for_set_fastmem_policy(FOR_K_FASTMEM_INFO):"
old_policy = for_set_fastmem_policy(FOR_K_FASTMEM_INFO)
select case (i4_old_policy)
case (FOR_K_FASTMEM_NORETRY)
print *," Issue a Severe error if FASTMEM is not available."
case (FOR_K_FASTMEM_RETRY_WARN)
print *," Issue a Warning if FASTMEM is not available, then use the default memory allocator."
case (FOR_K_FASTMEM_RETRY)
print *," If FASTMEM is not available, then silently use the default memory allocator."
end select
print *,"Set the FASTMEM policy to RETRY_WARN:"
old_policy = for_set_fastmem_policy(FOR_K_FASTMEM_RETRY_WARN)
end program fastmem_policy