Intel® Fortran Studio XE

What is the maximum character length allowed?

Hello,


I wrote this simple code (see below) that converts an array of real into a very long string of characters.
I have been running this little code on 2 different machines and I compiled it with the same compler on both machines :


Intel(R) Fortran Intel(R) 64 Compiler XE for applications running on Intel(R) 64, Version 14.0.1.106 Build 20131008
Copyright (C) 1985-2013 Intel Corporation.  All rights reserved.


Both machines are equipped with Intel processors,

One more structure constructor error

If you try to use a structure constructor to construct a type that extends from some other type, and you have an array section argument, you get an error like the following:


test_section_constructor.F90(18): error #6593: The number of expressions in a structure constructor differs from the number of components of the derived type   [FOO]
b = foo(a2(:,1)) ! Spurious error
----^
compilation aborted for test_section_constructor.F90 (code 1)


This happens even when you only have one component and one argument to the structure constructor.

ICE when using structure constructors for function pointer components

Here is some example code:

program test_function_constructor

implicit none

abstract interface
   integer function get_int()
   end function get_int
end interface

type :: foo
   procedure(get_int), nopass, pointer :: get => null()
end type foo

type(foo) :: bar

bar = foo(foo_int) ! Causes ICE
bar%get => foo_int ! OK (my current workaround)

contains

  integer function foo_int()
    foo_int = 0
  end function foo_int

end program test_function_constructor

 


There was a previous bug about a similar issue here:

ICE when using structure constructor in user-defined constructor

ifort seems to have trouble with the following code:

module test_constructor_name

implicit none

type :: foo
   integer :: a(1)
end type foo

interface foo
   module procedure new_foo
end interface

contains

  function new_foo(b, c) result(the_foo)
    integer, intent(in) :: b(1), c
    type(foo) :: the_foo
    the_foo = foo(b + c)
  end function new_foo

end module test_constructor_name

Compiling this with a simple "ifort -c" will show the error:

Call-graph data in profile output

I'm trying to perform some statistical analysis of my Fortran program using gprof.  When I compile my files with "-p", the expected gmon.out file is created, however the profile file lacks call-graph data:

$ gprof -c -z -q myprog
gprof: gmon.out file is missing call-graph data

Is there a compiler flag I'm missing, or does the compiler not generate this information?  Version 12.0.4.191 Build 20110427

Thanks

STOP statement write to terminal window

The FORTRAN code I'm working on writes its main output to unit 6. It also uses a number of STOP statements when trapping for errors. 

When I previously used the Lahey compiler the strings associated with the STOP statements were written to the terminal window, not unit 6. However, since moving to Intel the STOP strings are written to unit 6 instead of the terminal window.

Any ideas of how I can revert to the STOP strings being written to the terminal window?

mkl95_LAPACK produces segmentation fault (dgesv)

When I call  "dgesv" routine from mkl library with fortran 95 interface I get segmentation fault.

call dgesv( adns, rhs , ipiv , info ) ! forrtl: severe (174): SIGSEGV, segmentation fault occurred

call dgesv( n, nrhs, adns, max(1,n), ipiv, rhs, max(1,n), info )  ! F77  works fine

ifort -V

Intel(R) Fortran Intel(R) 64 Compiler XE for applications running on Intel(R) 64, Version 14.0.2.139 Build 20140121

Copyright (C) 1985-2014 Intel Corporation.  All rights reserved.

compiler flags: ifort main.f90 -mkl -lmkl_lapack95_lp64

 

Can this be made better?

 

Hello,

I wonder is anyone has the time and inclination to have look at the code below for

any possible improvements.

The extract included here is the the heaviest user of cpu in a large-ish simulation code .

A typical run would take 6-9 months of running 24/24 and 7/7 with 6 threads on six cores.

The omp part is working very well and there cannot be much inprovement with the multithreading part.

The compiler call used for the whole code is:

ifort -O3 -r8  -openmp -fpp -parallel -mcmodel=medium -i-dynamic -shared-intel

Suscribirse a Intel® Fortran Studio XE