Intel® Fortran Compiler

problem with openmp directives in gedit/emacs

Hello everyone,

I am facing an awkward situation. I am trying to run a f90 program in Linux with ifort and since it has openmp directives I compile it with the -openmp-report1 option to see that whether the blocks have been successfully parallelized.

The problem  is that gedit doesn't recognize the openmp directive:

!$omp parallel do etc.

it treats it as a comment. Anyone has an idea about it? I also tried

Setting upper and lower limits to integer variable values


I would like to create a Percentage Type variable that can only have integer values between 0 and 100.  I can't see a way of specifying such a type.  The only limits that I can see are those that can be applied is to dimensions, not values.  Am I missing something, please?

F77 Data statement to F90 parameter - something not quite right

Here I go again - messing w/ F77 code from the late 90s.  This little subroutine has been converted to F90 but something's not quite right w/ the conversion of the 2 DATA statements.  The parameter statement I have "seems" right but compiler gives:

Error: The shapes of the array expressions do not conform.   for [UPCASE],  [LWCASE], [INDCHECK] & [RUNSTREAM]

Strangely, this line gives no compiler error but doesn't seem equivalent:

character(1), parameter :: UPCASE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', lwcase = 'abcdefghijklmnopqrstuvwxyz'

Visual Fortran run-time error

I am in the process of running a exe file, and shortly after the start of the running the exe stops running and displays a WIndows box headed 'Visual Fortran run-time error' with the following message:

forrtl: severe (157): Program Exception - access violation

Image PC Routine Line Source

roughcal.exe 00412E76 Unknown  Unknown  Unknown 

The message only appears when I try to run this exe file. Other .exe files are ok and run very well.

Anyone know how to deal with this problem?

Stack Trace


   I am trying to figure out what is wrong with my program because I caught an segmentation fault.I would like to know I can debug it to get the complete stack trace (which options). I also would like to know if I can do that using devenv.exe at the command prompt for any executable without opening the IDE



write(*,*) in function called by another write(*,*)


I used to put some "write(*,*)" in my code when I want quick and easy checks of what is happening.

Today I encountered an error while doing this with ifort :

Here the sample program :

program test
implicit none

write(*,*) func(),func()


function func()
real(8) :: func
write(*,*) "Inside func"
end function func

And the output:

 forrtl: severe (40): recursive I/O operation, unit -1, file unknown

Debug/release versions of .mod files

If I have separate debug and release versions of a Fortran module, the difference being solely one of compiler flags, will the .mod file differ between them? In other words, is it necessary/advisable to change my include path depending on which version of the module I link to? I know the .mod file is a compiler-generated binary, but as a Fortran newbie coming from a C background I'm not sure whether I should be thinking of it as akin to a precompiled header or more like an object file in its own right.



Unable to install the Fortran(x64)

I have install Visual studio 2008 on my computer and now I want to install the fortran (X64). However, the installation failed and I got the following message:

"Unable to install the integration into Visual Studio. Failure in"C:\\program files (86)\Microsoft Visual Studio 9.0\IntelFortran \VFPackages\integrate.bat" "c:\\program files(86)\Microsoft Visual Studio 9.0\Common7\Tools" (see picture)

Different results with -O0 -openmp or -O3 -openmp

Hi all, 

I developed a FORTRAN (F90) code (its a large model) with the following compilation flags :

ifort -g -O0 -openmp -openmp_report -threads -ipo

When running this code with the above flags, I keep the results within 15 digits after the dot when running serial or parallel (OpenMP). I have also checked with Intel Inspector 2013 - and I do not have any data race condition in either if the subroutines.

Fail to link 64-bit Code

I have a working 32-bit software library written in Fortran with low-level stuff in C/C++ It has worked for years.

It is fine.

When I re-build the library in 64-bit mode, none of the C functions are linked in. I've checked the linker options, and they all seem to be right. The project appears to be referencing the 64-bit libraries.

Would someone mind just looking some sample  INTERFACE code and tell me whether there is anything at all that would cause a problem 

Intel® Fortran Compiler abonnieren