Intel® Fortran Compiler

Getting physical/logical processor count

Steve,

A number of years ago you provided Fortran code (ported over from C, as I recall) that provided a way to acquire the physical and logical processor count, as well as the physical, page, and virtual memory on a host machine. We have used that successfully (and usefully!) for several years. I have encountered a problem with it when compiled with 17.0.0.109:

Compiler documentation broke 2017

Installed Parallel Studio XE 2017 Cluster Edition on Windows 7 Pro x67, with Microsoft Visual Studio 2013 (aka 2012 update 4).

Launching Visual Studio, creating a Hello World Fortran program, builds and runs OK.

Issue with documentation. From MS VS

Help | Intel Compilers and Libraries | Intel Visual Fortran Compiler Documentation

This brings up an Internet Explorer window with the familiar [Contents][Index][Search] buttons in upper left corner.

Clicking on [Index] brings up the index just fine. Clicking on any entry, takes me to that entry....

Invalid binary operation and USE statement order

Hi,

I have attached an example that should compile, and there are several ways to work around the bug. The comments on lines 229 through 235 show how the order of the USE statements determine if the code compiles or not.  It also compiles if I remove a subroutine from an interface ( line 139), but that is not a work around for my project.

 

This is the output from the compiler

Time splitting issue

 Hello Everyone,

I'm trying to solve a problem use time splitting method.  For this i have to solve linear systems  of equation using tridag (fortran ) routine.

I have two problems

The first one is that the coefficients  use in tridag are 2 D array while this routine use 1 D array.

What i did to overcome this is the following (just a example):

  do  k=1,NT         ! Main loop over the time step

!Compute  the solution of the first equation 

do i=1, N1

do j= 1, N2

   A(j) = x(i)*y(j)

  B(j)= x(i)*y(j)

Possible undetected interface inconsistency?

The code below, as is, will compile and create the following error at runtime: "forrtl: severe (173): A pointer passed to DEALLOCATE points to an object that cannot be deallocated"

Now, if you toggle lines 39 and 40, the code runs as expected.

However, ror the case that fails, shouldn't the compiler detect the (incorrect?) use of TYPE instead of CLASS on line 39 though?

XE2017 !DEC$ not permitted

In XE2016, this code works for me, so that I can then load and call the relevant function out of a DLL:

            ABSTRACT INTERFACE
                Subroutine DragCoeff_int(Reynolds, Sphericity, Value, Units)
                    !DEC$  ATTRIBUTES STDCALL, ALIAS:'DragCoeff_int' :: DragCoeff_int
                    !DEC$  ATTRIBUTES REFERENCE :: Units
                    IMPLICIT NONE
                    Real(KIND=KIND(0D0)), INTENT(IN), DIMENSION(1) :: Reynolds, Sphericity
                    Real(KIND=KIND(0D0)), INTENT(OUT), DIMENSION(1) :: Value

Compilation issue with abstract type and deferred binding

The code below does not compile: the error returned by the compiler is "error #8383: The dummy arguments of an overriding and overridden binding that correspond by position must have the same characteristics, except for the type of the passed object dummy arguments.   [PROC]".

However, the alternate lines (with simultaneous use of PASS, or nothing for both PROCEDURE statements) compile ok.

I am struggling a bit to understand this behavior.

Wrong result using len_trim in array constructor

Hi all,

the following code writes an incorrect result:

program p
 implicit none

 call fs((/"abc","d  "/))

contains

 subroutine fs(text)
  character(len=*), intent(in) :: text(:)
  integer :: i

   write(*,*) "size(text) = ", size(text)
   write(*,*) "len_trim   = ", (len_trim(text(i)) , i=1,size(text))
   write(*,*) "sum(...)   = ", sum((/(len_trim(text(i)) , i=1,size(text))/))

 end subroutine fs

end program p

Using "Intel(R) Fortran Intel(R) 64 Compiler for applications running on Intel(R) 64, Version 16.0.2.181 Build 20160204" I get

订阅 Intel® Fortran Compiler