Intel® Fortran Compiler

Handling NaN

I built a model several years ago using Visual FORTRAN Standard Edition 6.0.A. I wanted to reuse the model again, but the software I am using now is Visual Studios 2015 with the Intel(R) Visual FORTRAN Compiler 16.0 [IA-32].

I noticed that NaN is being handled differently between the two compilers. For example, in the previous version, if b=0 and c=Nan, then a=b+c would result in a=0. However, in the current version, the same scenario would cause a=NaN. 

Syntax error. found END-OF-FILE when expecting one of: <LABEL> <END-OF-STATEMENT>

I am porting Fortran 77 to Fortran 90.   I am getting the following syntax error:

source.i(4): error #5082: Syntax error, found END-OF-FILE when expecting one of: <LABEL> <END-OF-STATEMENT> ; TYPE INTEGER REAL COMPLEX BYTE CHARACTER CLASS DOUBLE ...
        end structure
---------------------^
compilation aborted for source.i (code 1)
make: *** [contempt28] Error 1
 

Here is the code in the source.i file:

segfault when printing string component

The following "minimal example" causes a segfault if compiled with ifort 17.0.4 20170411 on 64-bit Linux (Ubuntu 16.04)

goerz@mlhpc2:~> uname -a
Linux mlhpc2 4.4.0-36-generic #55-Ubuntu SMP Thu Aug 11 18:01:55 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

This is on a machine with 80 cores, the CPU information on the highest core is

Attempting to invoke ifort from regular command line

I am attempting to invoke ifort from the regular windows command prompt. I tried browsing to the Intel Fortran bin directory and running what batch files I found that looked appropriate. For this instance I ran:

compilervars.bat

compilervars_arch.bat

ifortvars.bat

vsshel2010vars_arch.bat

Then I browsed to my folder containing my source files and tried doing an operation that required use of the linker. This threw an error:

Automatic code generation for only covered code?

Does ifort support automatic code generation for only covered code for a particular run? I would like to hack a project down into smaller pieces that I most frequently used. For my current needs I only use maybe 10% percent of a particular code. It would be good to automate the generation of a reduced version that wouldn't include the remaining 90%....

Trying to compile a large program with interdependent modules using the command line

I have a large program comprising of 40 source files. 39 of these source files contain module definitions (only) and 1 of these files contains a main program. The main program references 12 of the module definition source files via `use modulename` syntax. These 12 files in turn reference the other 27 module definitions. All the files are necessary for the functioning of the program.

Compiling a module which uses the mkl_dss module

I am using Windows 7 64-bit with Intel Parallel Studio XE 2013. I have a .FOR file that contains the following line called within a module:

use mkl_dss

which obviously comes from the Math Kernel Library.

I tried compiling at as shown below:

D:\TEMP\TRUNK-IFORT>ifort -free -fpp -D__INTEL_COMPILER -c Solver.FOR /Qmkl=parallel

Which results in:

Compiling a module which uses the mkl_dss module

I am using Windows 7 64-bit with Intel Parallel Studio XE 2013. I have a .FOR file that contains the following line called within a module:

use mkl_dss

which obviously comes from the Math Kernel Library.

I tried compiling at as shown below:

D:\TEMP\TRUNK-IFORT>ifort -free -fpp -D__INTEL_COMPILER -c Solver.FOR /Qmkl=parallel

Which results in:

Trying to compile program with use module on command line

I have 2 .f90 files.

file: mod_def.f90 

module definedmod
integer :: a = 4
end module definedmod

file: use_mod_def.f90

program usemod
use definedmod
	print *, a
end program usemod

I succeeded in compiling the module definition file using this command:

ifort -c mod_def.f90

THis generated a .obj and .mod file which is good. However when I try to compile the main program

ifort use_mod_def.f90

I get a big error

Subscribe to Intel® Fortran Compiler