Compile the following program with ifort 18.104.22.168. You would expect the compiler not to create a temporary copy of x(:,:,:,1,2) in subroutine f. But it does. Using UBOUND seems to be a viable workaround.
I am compiling f90 code with intel 12.1.5 on x86_64 x86_64 x86_64 GNU/Linux and am getting "relocation truncated to fit" errors in the link step, a few of which are copied below. I am using mpif90 with options -O3 -r8 -heap-arrays -mcmodel=medium -shared-intel. I am linking netcdf v4.2.
I am trying to find out if using an AND instead of an OR condition is more efficient.
Say I have a check
if(.NOT. (a > 0 and a < 10 and b > 0 and b < 10))then call add else call subtract end if
Is this better than
if(a<0 or a > 10 or b < 0 or b > 10) then call add else call subtract endif
For an AND condition, it is enough if one of the condition is FALSE, whereas for the OR it has to check all the conditions. Is this correct?
I cannot update from 12.0 and 12.1.
I have a coarray program that uses CRITICAL.
ifort -c -coarray -free -fPIC -warn all cgca_m2stat.f90
cgca_m2stat.f90(107): remark #7712: This variable has not been used. [CG_$1_mtx]
At runtime the program seems to hang at CRITICAL, but not always. With 8 or 27 images it seems to work, and with 64 images it hangs.
The following program seems to goes into an infinite loop.
Is this an expected behavior?
do i = 1, huge(i)
end program infinite_loop
$ ifort -v
ifort version 13.0.0
$ ifort infinite_loop.F90
#=> Get 100% use of CPU and never (at least 5 minutes...) finish.
Dear forum and Intel developers,
Consider the following code:
real(kind=8), allocatable, dimension(:) :: x,y
It will produce blank output. The rememdy is to explicitly allocate x before the reshape statement.
Now the following:
I have an application with an OPEN statement specifying a static filename for program input data accessed with READ statements (i.e., FILE = 'MY.in') and the same situation for program output via WRITE statements (i.e., FILE = 'MY.out'). I would like the ability for the user to store the input files in a working directory they create to meet their needs before program execution and the output files produced in the working directory during program execution.
Frances Roth, from Intel, wrote a Fortran-themed limerick for an internal contest. She didn't win, but I thought her entry was great and she graciously allowed me to share it:
There Once Was A Woman From Intel
Knew MIC Architecture Was So Swell
She Programmed All Day
In Fortran! Hurray!
So Phi To That OpenCL
The following code compiles and works under the GNU fortran compiler. On the Intel compiler I get:
error #8178: The procedure pointer and the procedure target must have matching arguments.
mytype%point1 => type2subroutine
Here is the code:
type :: type1
procedure(type1interface), pointer :: point1
class(type1) :: a