Quantcast
Channel: Intel® Fortran Compiler
Viewing all 3270 articles
Browse latest View live

'check uninitialized variables' option not working

$
0
0

The variable LCCONT (char*1) is not defined but in debugging mode, notwithstanding the option 'check uninitialized variables' is active , no exception is raised when  following statement is executed in debug mode: 

LCHAR = ICARD(JED)
IF(LCHAR .NE. LCCONT) GOTO 200

 To make comparison no warning is issued by Intel compiler at compilation time.

Instead a very old version of a Lahey compiler issues the following nice message:
 Internal subprogram name(ANALYZE_ICARD)
   2005-W: "V9SYNCHK.FOR", line 577: LCCONT is used but never set.

When such a warning will be available from Intel ??? This will save a lot of time.

 


Fortran compiler and visual studio issue

$
0
0

Hey everyone!

I'm not very familiar with troubleshooting issues on Windows, so please forgive my ignorance.

I'm trying to run a Microsoft Visual Studio 2015 build, but some of the files are incompatible due to issues with Intel Visual Fortran Compiler. I have installed the latest version of Intel Parallel Studio, so I do actually have the Fortran Compiler on my PC (an HP running a 64-bit Windows 7). On Intel's website, I have found what I need to do (here's the link: https://software.intel.com/en-us/articles/troubleshooting-fortran-integr...), but I'm having serious trouble executing it. It says I need to open command prompt with Administrator privileges, which I managed to do, and then type the following commands:

cd %VS140COMNTOOLS%
cd ..\..\Intel Fortran\VFPackages
integrate.bat "%VS140COMNTOOLS%" /u
integrate.bat "%VS140COMNTOOLS%"

The first line works just fine, but when I try to type (or paste) the second line, command prompt says it can't find the path. Is there any alternative method to overcome this issue, or am I doing something wrong?

Thanks in advance!

Elmer

Compile Error: ifort.exe not found

$
0
0

Hello all

I know that there was a similar topic already, but it is closed and I haven't found a proper answer out there.

I have installed Microsoft Visual Studio 2015 CE. Then I installed Intel Parallel Studio XE on student's licence. I've done it both for IA-32 and Intel64. I installed basically all of its components.

VS is able to detect the compiler "somehow" - the compiler's preferences are available and its version is displayed.

However, when i try to compile anything, this error pops out.

I have checked through hard drive and I have 4 ifort compilers (2 for IA-32 and 2 for Intel64) under C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2016.1.146\windows\bin.

I've tried to reinstall it all, change settings in VS and nothing works.

 

Error #6833 - Problems with functions in submodules

$
0
0

Hi! My name is Jeferson. I am studying Modern Fortran to update my programs writing in FORTRAN 77.

I have been having problems with functions in submodules. I can compile and run the program without problems when I use the full form of function statement repeating in a submodule all the declarations from the interface. The problem is when I use the short form of the function without repeating the function statement and all the declarations from the interface.

The compiler returns the following error: "Error # 6833: The RESULT data type is specified multiply: on function statement and result name."

The example below is exactly the program I am trying to compile. This example is from the pages 330 and 331 of the book of METCALF, Michael; REID, John; COHEN, Malcolm; Modern Fortran Explained; 7th Edition; Oxford University Press; 2011.

program Submodules
    use points
    implicit none
    ! Variables
    type(point) :: pointa, pointb
    real :: distance
    ! Body of Submodules
    pointa%x = 1
    pointa%y = 2
    pointb%x = 2
    pointb%y = 1
    print *, 'Ponto a = ', pointa
    print *, 'Ponto b = ', pointb
    distance = point_dist(pointa, pointb)
    print *, 'Distance = ', distance
    pause
end program Submodules

module points
    type :: point
        real :: x, y
    end type point
    interface
        real module function point_dist(a, b)
            type(point), intent(in) :: a, b
        end function point_dist
    end interface
end module points

submodule (points) points_a
contains
    module procedure point_dist
        point_dist = sqrt((a%x-b%x)**2+(a%y-b%y)**2)
    end procedure point_dist
end submodule points_a

I can compile without errors change this function to a subroutine.

I am using the Microsoft Visual Studio Professional 2013 Update 3 with Intel Parallel Studio XE 2016 Update 1.

Another stack-overflow with IF XE 2016

$
0
0

I did regression tests for switching from IF 2013 to IF 2016 and suddenly a subroutine that took 11K of stack now wants 3M of stack. Please note that this IS NOT LIKE https://software.intel.com/en-us/forums/intel-visual-fortran-compiler-fo... since I neither have dynamic allocated arrays nor doing array-operations on large arrays. I could track down a strange effect where duplicating a single function call adds 128K of stack-space.

Changing Fortran > Optimization > Heap Arrays to 0 as suggest in https://software.intel.com/en-us/forums/intel-visual-fortran-compiler-fo... didn't change anything.

Please refrain from proposing to increase the total stack-space of the process: this is a problem of the compiler not the OS

QuickWin - setting dialog focus

$
0
0

I've recompiled an old QuickWin project.

It uses a dialog to specify some parameters then draws graphics in the full screen, then displays the dialog again with the results.

I'm finding that the dialog is losing focus and is behind the graphics. If I click on the screen the dialog is displayed.

How do I set focus to the dialog using Quickwin?

I have tried:

iret=SetFocus(GetDlgItem(dlg%hwnd,IDC_JOB3))

But I have a note that it didn't work before and it doesn't work this time.

Maybe the solution is to rewrite it as a proper Windows application.  

Compiler installation error messages question

$
0
0

We see the attached picture of an error message from the compiler installation.  It lists VS Express 2015 as being an acceptable version of VS to use with the compiler.  But the system requirements do not list VS Express 2015.  Can you explain the difference?

AttachmentSize
Downloadimage/jpegerrormsg.jpg112.18 KB

rc.exe file missing

$
0
0

Hello all

I've run into the error of "rc.exe not found" when compiling my Fortran code. I have Visual Studio Community 2015 installed, as well as the Intel Fortran Compiler 2016 edition. I have looked at previous threads regarding topic, and none have worked efor me. I am confident that my computer doesn't even have the rc.exe file. I have looked in the following folders:

C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\x64

And do not see rc.exe at all. I have tried downloading the MS Windows SDK from here: http://msdn.microsoft.com/en-us/windows/bb980924.aspx and still no help. I have even uninstalled and reinstalled VS Community. At this point I am quite frustrated and would love to hear any input. Thank you.


Aligned/Unaligned load instructions generated for SSE2/AVX

$
0
0

I am trying to understand how aligned code is generated and therefore I have created the following code snippet

subroutine add(A, B, C, N)
    implicit none

    integer,intent(in)                :: N
    real*8, intent(in),  dimension(N) :: A,B
    real*8, intent(out), dimension(N) :: C
    !dir$ assume_aligned A:32, B:32, C:32

    !dir$ vector aligned
    C = A+B
    return
end subroutine add

which I am compiling with the following two commands:

ifort -align array32byte -S align.f90 -xavx

and

ifort -align array32byte -S align.f90

Since I am aligning the arrays to 32 byte (for AVX), explicitly adding a directive to assume that the arrays be aligned and even adding a !dir$ vector align directive (which shouldn't be necessary if I used assume_aligned - please correct me if I'm wrong) I would expect the assembler code to contain aligned loads and stores. However, I am seeing something interesting:

For the AVX code:

        vmovupd   (%rdi,%rax,8), %ymm0                          #10.5
        vmovupd   32(%rdi,%rax,8), %ymm2                        #10.5
        vmovupd   64(%rdi,%rax,8), %ymm4                        #10.5
        vmovupd   96(%rdi,%rax,8), %ymm6                        #10.5
        vaddpd    (%rsi,%rax,8), %ymm0, %ymm1                   #10.5
        vaddpd    32(%rsi,%rax,8), %ymm2, %ymm3                 #10.5
        vaddpd    64(%rsi,%rax,8), %ymm4, %ymm5                 #10.5
        vaddpd    96(%rsi,%rax,8), %ymm6, %ymm7                 #10.5
        vmovupd   %ymm1, (%rbx,%rax,8)                          #10.5
        vmovupd   %ymm3, 32(%rbx,%rax,8)                        #10.5
        vmovupd   %ymm5, 64(%rbx,%rax,8)                        #10.5
        vmovupd   %ymm7, 96(%rbx,%rax,8)                        #10.5
        addq      $16, %rax                                     #10.5
        cmpq      %rcx, %rax                                    #10.5
        jb        ..B1.4        # Prob 82%                      #10.5

For the SSE2 code:

        movaps    (%rdi,%rax,8), %xmm0                          #10.5
        movaps    16(%rdi,%rax,8), %xmm1                        #10.5
        movaps    32(%rdi,%rax,8), %xmm2                        #10.5
        movaps    48(%rdi,%rax,8), %xmm3                        #10.5
        addpd     (%r8,%rax,8), %xmm0                           #10.5
        addpd     16(%r8,%rax,8), %xmm1                         #10.5
        addpd     32(%r8,%rax,8), %xmm2                         #10.5
        addpd     48(%r8,%rax,8), %xmm3                         #10.5
        movaps    %xmm0, (%rdx,%rax,8)                          #10.5
        movaps    %xmm1, 16(%rdx,%rax,8)                        #10.5
        movaps    %xmm2, 32(%rdx,%rax,8)                        #10.5
        movaps    %xmm3, 48(%rdx,%rax,8)                        #10.5
        addq      $8, %rax                                      #10.5
        cmpq      %rsi, %rax                                    #10.5
        jb        ..B1.4        # Prob 82%                      #10.5

Apparently the AVX version does unaligned packed loads/stores even though I would assume that it would use vmovaps instead. In fact, I am unable to generate an example where I see vmovaps at all. The generated code isn't multiversioned either, so it's not that I've overseen something in the assembly. Also, why does the SSE2 code use aligned (which I expect), but single precision load instructions? Does that make any sense?

I have read this awesome article (https://software.intel.com/en-us/articles/fortran-array-data-and-arguments-and-vectorization) and I was sure that I was having the right idea of what the compiler's assembly output would look like. But unfortunately the results that I'm getting show a different behavior. Back to the example, I would expect the code to generate movapd/vmovapd instructions for SSE and AVX, respectively. What is my misconception? I am using ifort version 15.0.2. 

Thank you!

Unresolved external - why?

$
0
0

I have a simple module containing 2 subroutine and 1 function:

      module testbug

      contains

      SUBROUTINE sub1(n,x)
      IMPLICIT NONE
      INTEGER :: n
      REAL*8  :: x(n)
      REAL*8  :: f
      REAL*8  :: func3
      f = func3(n, x)
      return
      END SUBROUTINE sub1

      SUBROUTINE sub2(n,x)
      IMPLICIT NONE
      INTEGER :: n
      REAL*8  :: x(n)
      REAL*8  :: f
      REAL*8  :: func3
      f = func3(n, x)
      return
      END SUBROUTINE sub2

      REAL*8 FUNCTION func3(n,x)
      IMPLICIT NONE
      INTEGER :: n
      REAL*8  :: x(n)
      func3 = 0.5d0
      return
      END FUNCTION func3

      end module testbug

called by a test program:

      program main

      use testbug
      implicit none

      integer :: n = 2
      real*8  :: x(2)

      x(1) = -1.d0
      x(2) = +1.d0
      call sub1(n,x)

      end

Yet when I link with:  ifort main.f90 mod.f90, I get:

mod.obj : error LNK2019: unresolved external symbol _FUNC3 referenced in function _TESTBUG_mp_SUB1
main.exe : fatal error LNK1120: 1 unresolved externals

Any idea why?

How to solve error #6633 in fixed format

$
0
0

Let me separate the problem to 2 parts.

Part I:

Such error occurs, when compiling the following code.

--------free format-----------

program ex0815
    implicit none
    real::a=1.0
    call showinteger(a)
    call showreal(a)
    stop
    end

    subroutine showinteger(num)
    implicit none
    integer::num
    write(*,*)num
    end

    subroutine showreal(num)
    implicit none
    real::num
    write(*,*)num
    end

---------end-----------

error #6633: The type of the actual argument differs from the type of the dummy argument.   [A]

The error can be removed by adding the directive:"!DEC$ ATTRIBUTES NO_ARG_CHECK :: dummy_arg_name"

Part II:

If rewrite the code in fixed format.

------------fixed format---------------

      program ex0815
      implicit none
      real::a=1.0
      call showinteger(a) !DEC$ ATTRIBUTES NO_ARG_CHECK :: dummy_arg_name
      call showreal(a)
      stop
      end
    
      subroutine showinteger(num)
      implicit none
      integer::num
      write(*,*)num
      end
    
      subroutine showreal(num)
      implicit none
      real::num
      write(*,*)num
      end

-------------end--------------

The error #6633 can not be removed by the same way.

So how to deal with error #6633 in fixed code format?

PS I'm trying to recompile a program wrote in fixed format and originally compiled with compaq fortran(standard F77). Hundreds of error #6633 occurs, when compiling with intel visual fortran. It is quite NOT convenient to rewrite the code in free format. I would appreciate it very much if there is an simple way to solve the problem.

THANKS 

OpenMP and -heap-arrays not compatible since ifort 13?

$
0
0

Noticed that an application using OpenMP compiled with ifort 15.0.3 20150407 with the flag "-heap-arrays XXX" suffers a large performance degradation, increasing with the number of threads (on 1 thread is the same, on 8 threads it is 4 times slower, on 32 threads it is 16 times slower). This is not the case with ifort 12.1.3 20120212, the same option does not reduce the performance. Any idea why this change?

 

Paging file too small

$
0
0

I don't want to page!

I've got lots of Ram (128 GB) while running latest Fortran in 64 bits but I get

OMP: Cannot create Thread

OMP: System Error #1455 Paging file is too small for this operation to complete

OMP: Error 178: function GetExitCodeThread failed

OMP: System error #6  The handle is invalid

The problem occurs when the program reaches the multi-threaded section.

I've got lots of ram because I don't want to page this program that runs for days.  I have set the virtual memory to zero to force the executing code to use the memory instead of paging to disk.  Reducing the number of threads seems to help but I need to use all the threads I can get.  If all the threads were to run, there would still be lots of memory left.  Making a non-zero paging file area also allows all the threads to run.  Who is to blame & How do I fix it?  I.e., how do I force the program to use ram instead of paging?

thanks for  any suggestions

how to retrieve DOUBLE QUOTES from arguments?

$
0
0

I just encountered a problem to get the sub-strings that were originally and correctly input as argument below:

foo.exe file.dat ""Time [s]""Fx [m]""xPos [m]""

I need to retrieve the arg2 containing three variables to be 3 sub-strings, however, I got 6.

Is there any trick behind the input?

Thanks,

Kong

Ps: I found the below, but not TRUE on my pc.

https://msdn.microsoft.com/en-us/library/system.environment.getcommandlineargs%28v=vs.110%29.aspx

gives MyApp \\\\\"alpha \"beta ==>> MyApp, \\"alpha, "beta

additional include directories in FORTRAN subroutine

$
0
0

I have written a subroutine in FORTRAN which is compiled and used by FEM software (works fine). Now I have developed a second FORTRAN program that works flawlessly in VS and needed to be integrated into the first subroutine. Considering the fact that I have no direct access to manipulate the connection between FEM and Intel Visual Fortran, some issues that I am facing are:

1) in VS I have defined "additional include directories" in GUI (Fortran/General); is it possible to define the same thing in line? I have seen people using importdll like commands in C# and F# but so far I could not find an equivalent form for FORTRAN. 

2) a similar issue is with "additional library directories" in linker which I have defined in VS but I can't really figure out how to add it in line for the subroutine. Needless to say that for both of these issues I have tried to copy all .dll files and .lib files in directories (include/library) of the FEM software and it did not help.

3) another issue is #include "*.h" in the subroutine which works fine in VS but in the report file of the compiler what I get is warning #5117: Bad # preprocessor line  which I believe is either related to issue 1 or 2 or the fact that the visual Fortran does not activate the preprocessor option automatically. For the latter case, I doubt since in the subroutine that I had tested before I used include 'aba_param.inc'  which worked fine. 

I am not sure but since in compile of the code that I have written in VS I used "additional dependencies" in Linker/input for two *.lib files I have added them to my subroutine following Steve's comment (https://software.intel.com/en-us/forums/intel-visual-fortran-compiler-fo...

!DEC$ OBJCOMMENT LIB:"*.lib"
4) I am using Microsoft Visual Studio 2012 and Intel(R) Visual Fortran Intel(R) 64 Compiler XE for applications running on Intel(R) 64. I have defined in platform in project properties.

As a shot in the dark, although .vfproj is only a XML file,  is it possible to use the .vfproj of the compiled VS which includes all of these configurations in my subroutine? (https://software.intel.com/en-us/forums/intel-visual-fortran-compiler-fo...)

Thanks in advance.


Code failure only in XE2015 and not earlier versions

$
0
0

HI,

REAL X(2)

N = 2

DO I=1,N+1

if( i .LE. N .and. MOD(X(i),10).EQ.2) A= A+B

ENDDO

The above code has worked fine in all past versions. But now using XE2015 it throws an exception when I=3 as it thinks the bounds of X are violated.  But it shouldn't need to evaluate the second test as the first will fail.  Is there a switch we need to set now for this to not fail?  Or do we have to rewrite all the instances of this code to be 2 IF tests?

Thanks,

Dave

QuickWin - severe (172)

$
0
0

While working away on my combination QuickWin / Xeffort project everything seemed fine. (Latest compiler, Win7, 64bit but creating a 32bit executable)) However when testing on a 32bit computer, both Win7 and WinVista it gives the error "forrtl: severe (172)" but before that it pops up with a bizarre request about there being no disk in the drive.

On canceling this the following error appears:

I have no idea even where to look. (I am an engineer, not a programmer)

 

Weird compiler crash

$
0
0

Hi all,

I am experiencing a weird issue when compiling my code with ifort version 16.0.1.

I receive a catastrophic compiler error (catastrophic error: **Internal compiler error: segmentation violation signal raised...) when trying to compile a module that defines a type that is extended from an abstract type hosted in another module. Unfortunately I am working on a big code so I cannot post the whole source to reproduce the error, nor I am able reproduce the error in a minimal example. Notice that Gfortran is able to compile without any problem.

I am aware that the info I gave are not sufficient to diagnose the issue, but I would appreciate any tips to debug the problem nonetheless.

Also, is there any compiler flag that allows for the logging of the compilation process? That would be really useful to pin point where the failure occurs.

 

 

 

 

 

 

Debugging: forrtl: severe (174): SIGSEGV, segmentation fault occurred

$
0
0

 

Hi,

I'm trying to debug a segmentation fault error using information from this forum.

When I compile my ocean model (using ifort (IFORT) 16.0.1 20151021) with the following options

-u -O2 -fltconsistency -shared-intel -mcmodel=medium -heap-arrays

and even if I set ulimit -s unlimited, I get the following error

forrtl: severe (174): SIGSEGV, segmentation fault occurred
Image              PC                Routine            Line        Source      
       
libintlc.so.5      00002B508BED39B5  Unknown               Unknown  Unknown
libintlc.so.5      00002B508BED1777  Unknown               Unknown  Unknown
libifcore.so.5     00002B508A873872  Unknown               Unknown  Unknown
libifcore.so.5     00002B508A8736C6  Unknown               Unknown  Unknown
libifcore.so.5     00002B508A7CC795  Unknown               Unknown  Unknown
libifcore.so.5     00002B508A7DE5DD  Unknown               Unknown  Unknown
libpthread.so.0    0000003A3220F4A0  Unknown               Unknown  Unknown
pe_PB_sar25in_tid  000000000043EED8  Unknown               Unknown  Unknown
pe_PB_sar25in_tid  00000000004047D1  Unknown               Unknown  Unknown
pe_PB_sar25in_tid  0000000000403070  Unknown               Unknown  Unknown
pe_PB_sar25in_tid  000000000040212E  Unknown               Unknown  Unknown
libc.so.6          0000003A31A1ECDD  Unknown               Unknown  Unknown
pe_PB_sar25in_tid  0000000000402039  Unknown               Unknown  Unknown

However, if I try to add debugging and traceback to isolate the error

-u -O2 -fltconsistency -shared-intel -mcmodel=medium -heap-arrays-g -traceback -check all -fp-stack-check

Then the code runs without segmentation faults.

What other things can I try to isolate this segmentation fault.

Thanks

Intel Fortran Compiler 16 (Limited feature)

$
0
0

I'd like to ask about Intel Fortran Compiler 16 (Limited feature) - that is listed in available compilers in Xcode (my version  is 6.2 which is supported by Intel Parallel Studio 2016 and OS X El Capitan). Why Limited version?  what things are limited? I have run a very simple  f.90 code and it has been built and run perfectly. Thanks.

Viewing all 3270 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>