Quantcast
Channel: Intel® Fortran Composer XE
Viewing all 1447 articles
Browse latest View live

Internal compiler error in 15.0

$
0
0

Hi



I have just upgraded to parallel studio 2015 from the latest version of 2013 and my main Fortran code no longer compiles. The compilation fails for just one of many files with the error message:



fortcom: Fatal: There has been an internal compiler error (C0000005).

ifort: error #10298: problem during post processing of parallel object compilation

I first tried experimenting with different compiler settings to find a work-around for the problem and I found that disabling openmp resolves the issue. My code relies heavily on openmp, however, so I tried digging further. I started out by removing all openmp directives from the file, but that had no effect. I then tried to iteratively uncomment more and more of the source file until I could get it to compile. The difference between compilation and error in the first instance turned out to be uncommenting a simple go to statement. I then thought I was home free and tried rolling back to the original source file uncommenting only the problematic "go to" statement - but that wouldn't compile either. I then proceeded with trimming the source file once again and now the code started to compile by uncommenting a line with a simple function call. I followed this iterative approach for a while, but I could not identify any set lines of code as the root of the problem.

I then turned to the command line and ran the exact compile line used within the IDE (copied from the html build log) and it it worked! Any suggestions as to what is causing this? 


Problem using exported method via .obj file

$
0
0

I have a dll project p1 that has a source file p1.for that exports one subroutine

SUBROUTINE P1()
      IMPLICIT DOUBLE PRECISION(A - H,O - Z)
      !DEC$ATTRIBUTES DLLEXPORT :: P1
      !DEC$ATTRIBUTES ALIAS:'P1' :: P1
      RETURN
END

After building, it will produce p1.dll, p1.lib and p1.obj.

Now I have another dll project p2, that has p1.obj as Additional Dependency.

In p2.for I make a call to P1().

For this I get a linker error 

error LNK2019: unresolved external symbol _p1 referenced in function _p2    p2.obj    

If I comment out the DLLEXPORT part in P1, the p2 project builds without errors.

 

Is this a feature, and how I can have P1 exposed from dll and also used via .OBJ file? One way is making a wrapper method P11() that would not be exported, and I would call that one from p2.

 

 

Bad initialization expression using extended types

$
0
0

I have a question.  See code below.  I'm using a variable in one type in an initialization expression for another type.  The first block compiles fine, as expected.  The second one (which is using an extended type that contains the same data) throws a "error 7169: Bad initialization expression [BLAH]" if I don't use the var%base_type%name form to access the variable.  Is this correct or a compiler bug?  I can normally use var%name in other circumstances.  Is there a reason that this is not allowed in this context?

program main

    implicit none

    type :: blah
        character(len=100) :: str = ''
    end type blah

    block
        type :: extended_type
            integer              :: id    = 0
            character(len=100)   :: name  = ''
        end type extended_type
        type(extended_type),parameter :: var = extended_type(id=1, name='var')
        type(blah),parameter :: blah_var = blah(str=var%name)         !compiles fine
    end block

    block
        type,abstract  :: base_type
            integer              :: id    = 0
            character(len=100)   :: name  = ''
        end type base_type
        type,extends(base_type)  :: extended_type
        end type extended_type
        type(extended_type),parameter :: var = extended_type(id=1, name='var')
        type(blah),parameter :: blah_var1 = blah(str=var%base_type%name)      !compiles fine
        type(blah),parameter :: blah_var2 = blah(str=var%name)                !error 7169: bad initialization expression
    end block

end program main  

 

Congrats and many thanks, Intel, for version 15!

$
0
0

Congratulations and many thanks to ALL Intel staff who worked on Intel Visual Fortran 15 version.  IMHO, Intel Fortran 15 is simply super and splendid!  Honestly, it makes our code "sing and dance"!

On a more serious note, version 15 offers me everything I'd want from the Fortran 2003 standard plus it resolves and optimizes outstanding issues with previous implementations of many Fortran 2003 and 2008 features.  All in all, a major advancement.

Just as I communicated to my management at work this week, I wholeheartedly recommend everyone to consider upgrading to Intel Fortran 15 if they have the opportunity.

Sockets under Windows 7

$
0
0

I have question(s) on creating/configuring sockets under Windows 7 Professional.

System Configuration:

- Windows 7 Professional SP1  [ 32-bit OS ]

- Intel Composer XE 2013 SP1 Update 3 for Windows

- Microsoft Visual Studio Ultimate 2013 Update 3

- Microsoft Windows SDK for Windows 7 (7.1)

Question #1:

-----------------

I would like to create a socket (UDP) under Windows 7 Professional.

  sockfd = WSASocket(AF_INET, SOCK_DGRAM, IPPROTO_UDP, 0, 0, 0)

         or

  consock = socket(AF_INET, SOCK_DRAM, IPPROTO_UDP)

Upon creation, I would like to poll the newly created socket:

  status = WSAIoctl(sockfd,SIO_GET_INTERFACE_LIST,0,0,ifconf,sizeof(ifconf),BytesReturned,0,0)

         or

  { Use the GETADDRINFO function for response information about the host }

The socket information I would like to extract is as follows:

  - The network interface UP or DOWN.

  - Broadcast feature supported.

  - Multicast feature supported.

  - Loopback Interface.

  - Point-to-Point Interface.

I have included Winsock2 API by including the Winsock 2 header file.

  - USE WS2_32

If the Winsock2 API does provide access to the WSASocket | WSAIoctl functions from Fortran:

  - How would I get access to the INTERFACE_INFO structure used in conjunction with the SIO_GET_INTERFACE_LIST ioctl command

    used to obtain information about an interface IP address?

Question #2:

-----------

The Intel Fortran Compiler states ... This name does not have a type, and must have an explicit type.  [SIO_GET_INTERFACE_LIST]

  - Where would I find the SIO_GET_INTERFACE_LIST ioctl code defined?

The MSDN website states "the INTERFACE_INFO structure is defined in the Ws2ipdef.h header file which is automatically included

in the Ws2tcpip.h header file. The Ws2ipdef.h header files should never be used directly."

Since Ws2ipdef.h is a C/C++ header file, I need access to the interface flag parameters from Fortran.

Therefore, I have included the following snippet in the socket program:

      INTEGER(LONG) :: IFF_UP

      INTEGER(LONG) :: IFF_BROADCAST

      INTEGER(LONG) :: IFF_LOOPBACK

      INTEGER(LONG) :: IFF_POINTTOPOINT

c

      PARAMETER(IFF_UP = X'00000001')                       ! Interface is up

      PARAMETER(IFF_BROADCAST = X'00000002')        ! Broadcast address valid

      PARAMETER(IFF_LOOPBACK = X'00000008')          ! Is a loopback net

      PARAMETER(IFF_POINTTOPOINT = X'00000010')    ! Interface is point-to-point link                                                                          

Do I need to define the socket snippet above in my program, or am I missing something?

I am attempting to utilize the Winsock2 API and implement socket(s) in the Fortran world without having to write the socket program

in C .

Appreciate the help in advance.

VS 2013 and Intel Parallel Studio XE 2015 Professional

$
0
0

I have Visual Studio Professional 2013 Update 3 installed on Windows 7 Professional Service Pack 1,  When I try to install Intel Parallel Studio XE Professional Edition version 2015 update initial release, I get the following warning message:

"Microsoft Visual Studio* 2012 does not have C++ "X64 Compiler and Tools" components installed"

The installer does not appear to recognize that Visual Studio 2013 is installed.  Not sure what to do about the message regarding "X64 Compiler and Tools" components not installed"  Any ideas how to proceed?

Thanks....

 

Left align numbers

$
0
0

Need to print two column of numbers (integers) with same width, with 1st column left aligned and 2nd column right aligned. Can someone help me?

ifort error #10052 in command line using eval product Parallel Studio XE 2015

$
0
0

Hello everyone,

I have a serious and urging problem since 2 days which I couldn't fix yet.

My system: Win 7 Pro x64 on Intel Core processors

My software: Intel Parallel Studio XE 2015, 30-day evaluation trial

My problem: trying to compile Fortran

My process: From the Windows command prompt I'm accessing the 64-bit-ifort.exe-compiler in order to compile Fortran code.

Then I get the following message: "Error: A license for FCompW is not available (-158,61003,2)

License file(s) used wer (in this order):

1. Trusted storage

2. C:\Program Files (x86)\Common Files\Intel\Licenses\*.lic

3. another path

4. another path

Please visit http://software.intel.com... []

ifort: error #10052: could not checkout FLEXlm license

An error has occurred in 'callername':

C:\Program Files (x86)\Intel\Composer XE 2015\bin\intel64\ifort exited with return code 1."

Intel Software Manager is showing me one license for the Math kernel library and one for the Parallel Studio XE 2015 Composer Edition for Fortran. But in the paths mentioned in command prompt as well as anywhere else on the C harddrive there is no license file available.

-----------------------

What would you recommend me to do?

I would be very grateful if someone from Intel would send an appropriate license file to my e-mail-address. Maybe this solves my problem?


Crash of new 2015 version with Cray style pointers in OMP parallel do

$
0
0

Hi @all, I just installed the latest release 15.0 of Intel Fortran and now my code crashes. Please have a look at the following code fragment: ******************************************************************** integer(kind=SELECTED_INT_KIND(2)) lmcc_tmp pointer (lmcc_p,lmcc_tmp) !$OMP parallel !$OMP do !$OMP+ private(lmcc_p) !$OMP+ schedule(guided) do m=1,anz_akt_ne0 ... lmcc_p=LOC(lmcc(POS)) if(lmcc_tmp.lt.0) then ... endif enddo !$OMP enddo !$OMP end parallel ******************************************************************** When running this parallel loop, it crashes when accessing lmcc_tmp with the following message: forrtl: severe (408): fort: (9): Attempt to use pointee LMCC_TMP when its corresponding integer pointer LMCC_P has the value zero Up until the latest 14.x compiler this worked fine. Has anybody got any idea how to solve this or is this just an error of the 15.0? Best regards & thanks, Andreas

Crash of new 2015 version with Cray style pointers in OMP parallel do

$
0
0

Hi @all, I just installed the latest release 15.0 of Intel Fortran and now my code crashes.

Please have a look at the following code fragment:

********************************************************************
integer(kind=SELECTED_INT_KIND(2))
lmcc_tmp pointer (lmcc_p,lmcc_tmp)

!$OMP parallel
!$OMP do
!$OMP+ private(lmcc_p)
!$OMP+ schedule(guided)
do m=1,anz_akt_ne0
...
lmcc_p=LOC(lmcc(POS))
if(lmcc_tmp.lt.0) then
...
endif
enddo
!$OMP enddo
!$OMP end parallel
********************************************************************
When running this parallel loop, it crashes when accessing lmcc_tmp with the following message:
forrtl: severe (408): fort: (9): Attempt to use pointee LMCC_TMP when its corresponding integer pointer LMCC_P has the value zero

Up until the latest 14.x compiler this worked fine.
Has anybody got any idea how to solve this or is this just an error of the 15.0?

Best regards & thanks,
Andreas

Array or structure (or both) constructor silliness

$
0
0

This week's round of infectious disease from one of the local biological weapons research facilities ("preschool" or "day care" - not sure which) has laid me low, making it difficult for me to string a sentence together.  But I am in good company...

PROGRAM StringASentenceTogether
  IMPLICIT NONE
  TYPE String
    CHARACTER(:), ALLOCATABLE :: item
  END TYPE String
  TYPE(String), ALLOCATABLE :: a_sentence(:)
  INTEGER :: i
  !****
  a_sentence = [ String('Mary') ]
  a_sentence = [ a_sentence, String('had') ]
  a_sentence = [ a_sentence, String('a') ]
  a_sentence = [ a_sentence, String('little') ]
  a_sentence = [ a_sentence, String('lamb') ]
  DO i = 1, SIZE(a_sentence) - 1
    WRITE (*, "(A,1X)", ADVANCE='NO') a_sentence(i)%item
  END DO
  WRITE (*, "(A,'.')") a_sentence(i)%item
END PROGRAM StringASentenceTogether

 

>ifort /check:all /warn:all /standard-semantics "2014-09-09 StringASentence.f90"&& "2014-09-09 StringASentence.exe"
Intel(R) Visual Fortran Intel(R) 64 Compiler XE for applications running on Intel(R) 64, Version 15.0.0.108 Build 20140726
Copyright (C) 1985-2014 Intel Corporation.  All rights reserved.

Microsoft (R) Incremental Linker Version 10.00.40219.01
Copyright (C) Microsoft Corporation.  All rights reserved.

"-out:2014-09-09 StringASentence.exe"
-subsystem:console"2014-09-09 StringASentence.obj"
Mary Mar a Maryle lamb.

 

(Apologies if a repeat report.)

Command line compiler

$
0
0

Hi all,

I am using Intel Parallel Studio XE 2011 to compile my fortran files (.f90) on VS environment.

To compile some old fortran file (.f) with different syntax I have to use in-built compiler through command prompt (I don't know if it is also available on VS or not). I used "gfortran" and "ifort" and they worked but with two different results! Why?!

I want to know what other compilers are accessible via command line and which one is correct for ".f" files?

Thanks

 

 

 

Using extended derived type in a DLL

$
0
0

I am trying to find a way to have a DLL that defines a type that extends a base derived type that is used by the main executable. The extended type needs to be able to be accessed by a pointer and it needs to contain type-bound procedures that override procedures in the base type. The main program will not be able to USE the module where the extended type is defined, except indirectly through the DLL. So far I have come up with code that enables the main program to instantiate an object of the extended type, and see public data members, but I get Access Violation when I try to invoke a type-bound procedure. Here's what I have so far. In the code below, the AV happens at "call t4%GetName(name)". Before that line executes, in the debugger I can see that t4%Name equals 'Type 4 initial name' as expected.  If any one has suggestions about what I am missing, that would be great.

Main project:

BaseType.f90:

module BaseModule
implicit none
private

public :: BaseType
  type :: BaseType
  character(len=50) :: Name
contains
  procedure :: GetName
end type BaseType

contains

subroutine GetName(this, name)
  implicit none
  class(BaseType), intent(in) :: this
  character(len=*), intent(inout) :: name
  name = this%Name
  return
end subroutine GetName

end module BaseModule

main.f90:

program main
 
  use ifport
  use ifwin

  use, intrinsic :: ISO_C_BINDING, only:  &
      C_F_PROCPOINTER, C_FUNPTR, C_INTPTR_T,  &
      C_NULL_CHAR, C_CHAR, C_ASSOCIATED, C_PTR, c_funloc, &
      C_NULL_FUNPTR
 
  use BaseModule, only: BaseType
 
  implicit none
 
  interface
     function GetProcAddress(hModule, lpProcName)  &
         bind(C, name='GetProcAddress')
       use, intrinsic :: ISO_C_BINDING, only:  &
           C_FUNPTR, C_INTPTR_T, C_CHAR
       implicit none
       type(C_FUNPTR) :: GetProcAddress
       integer(C_INTPTR_T), value :: hModule
       character(KIND=C_CHAR) :: lpProcName(*)
     end function GetProcAddress     
  END INTERFACE
 
  abstract INTERFACE
    function gettype_intf() result(tt)
      import BaseType
      class(BaseType), pointer :: tt
    END function gettype_intf
  END INTERFACE

  integer(LPVOID) :: proc_address
  PROCEDURE(gettype_intf), POINTER :: my_proc
  class(BaseType), pointer :: t4
  integer(handle) lib_handle
  character(len=20) :: name
  character(len=20) :: procname
  !
  nullify(t4)
  lib_handle = LoadLibrary(C_CHAR_'Type4lib.dll' // C_NULL_CHAR)
  if (lib_handle == 0) stop "DLL not loaded"

  proc_address = GetProcAddress( lib_handle,  &
      C_CHAR_'GETTYPE' // C_NULL_CHAR )
  IF (proc_address == 0) STOP 'Unable to obtain procedure address'
  
  call C_F_PROCPOINTER(transfer(proc_address,C_NULL_FUNPTR), my_proc)

  t4 => my_proc()
  call t4%GetName(name)
  print*, 'name t4 = ',name
  stop

end program main

DLL project:

(includes BaseType.f90, above)

Test4Type.f90:

module Type4Module
  use BaseModule, only: BaseType
  implicit none
 
  private
  public :: Test4Type
 
  type, extends (BaseType) :: Test4Type
  contains
    procedure :: GetName => get_name
  end type Test4Type
 
contains
 
  subroutine get_name(this, name)
    implicit none
    class(Test4Type), intent(in) :: this
    character(len=*), intent(inout) :: name
    !
    name = this%Name
    return
  end subroutine get_name

end module Type4Module

Type4DLL.f90:

function gettype() result (tt)
  !DEC$ ATTRIBUTES DLLEXPORT::GETTYPE
  use BaseModule, only: BaseType
  use Type4Module, only: Test4Type
  implicit none
  type(Test4Type), pointer :: tt
  !
  allocate(tt)
  tt%name = 'Type 4 initial name'
  return
end function gettype

Does fotran has something like (void*) pointer?

$
0
0

Like in C, argument with integer data type can be regarded as a pointer to somthing that can be defined.

And how could the code be?

VS 2010: Editor is write protected in debugging after ifort 15.0.0.108 installation

$
0
0

Dear all,

I installed recently the new Visual Fortran Compiler XE 15.0.0.108 including the corresponding VS integration. After that my VS 2010 prof. (10.0.402019.1 SP1 Rel.) behaves different in debugging. I.e. during the debugging the editor don't let me write/change anything into my source files (neither the one with the breakpoint nor any other source of the solution opened). This was not the case from ifort 12.1 up to 14.1.3.

The documentation unfortunately says nothing about this and I did not find anything in the deep VS options menus. Can I turn this 'feature' off?

I find it a little bit annoying, because if you debug a huge project and have to change some e.g. not so important format issues, you cannot do it anymore during debugging. You have to stop debugging or writing the changes down in another editor, which I like to avoid.

Has anybody made the same experience? Any help will be welcome.

Best regards, Johannes


ifort 15 Issues With Changing "Linker -> General -> Output File"

$
0
0

I decided to dive into the ifort 15 upgrade so that I can be able to debug x64 code again, and I'm having some difficulties.

I have a solution file that creates one .lib output, and uses that .lib file as a dependency to make an .exe and a .dll.  When I try to compile the .exe or the .dll, I get this:

Warning 1 MyProject: warning: TargetPath(C:\PathWhereObjectFilesAreCreated\MyProject.dll) does not match the Linker's OutputFile property value (C:\PathWhereDllAndExeAreCreated\MyProject.dll). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).  

I changed "Configuration Properties -> Linker -> General -> Output File" to (C:\PathWhereDllAndExeAreCreated\MyProject.dll), but this hasn't been an issue with previous versions of ifort.

I also get:

Error 2  general error c101008d: Failed to write the updated manifest to the resource of file "C:\PathWhereDllAndExeAreCreated\MyProject.dll". The system cannot find the file specified. mt.exe 

And, to debug MyProject, under "Configuration Properties -> Debugging -> Command", I had to change that from $(TargetDir) (or whatever it was) to C:\PathWhereDllAndExeAreCreated\MyProject.dll.

So, how do I resolve this warning and this error, and is it now necessary to change "Configuration Properties -> Debugging -> Command" to debug projects where you changed "Configuration Properties -> Linker -> General -> Output File" ?

ifort 15 compiling many .for files in parallel in a single project

$
0
0

It seems like ifort 15 (versus ifort 14.1) compiles the .for files in a single project one file at a time, instead of compiling them in parallel.  Is there a new setting for this?

The "Build""Output" window used to show the caret location (i.e. line number), which made it easier to see how far the build has progressed.  Is this now gone, or this a new setting?

I'm running VS 2013 Premium Update 3.

Visual Fortran versus Parallel

$
0
0

Hello, 

I do not know if this is the best place to post this, but I could find one better   I am trying to find the correct fortran compiler for what I do. In the past I have always gotten the visual fortran compiler with IMSL libraries.  That said I have never really used the "visual" portion of visual fortran.  Most of what I do is computationally intense estimation algorithms and so I do not have graphs or nice user interfaces and I do not also use Visual Basic etc... Because of this, I am wondering the the Intel Parallel Studio XE Composer Edition with Rogue Wave IMSL would be a better purchase.   In addition, if I were to purchase the Intel Parallel Studio XE Composer Edition with Rogue Wave IMSL is would be an academic copy for a windows machine. So I am wondering if it would come with additional tools that would allow my estimation software (always compiled as an .exe file) to be faster while still having the same "feel" as the visual fortran compiler.   Basically, if I use is fortran and IMSL, will I notice the difference and if I learn a little more, would the Intel Parallel Studio XE Composer Edition with Rogue Wave IMSL actually be better for me, given that I have not even incorporated visual components to my program.  Finally, if I also have the Visual Studio, would I still be able to incorporate visual basic if I purchased Intel Parallel Studio XE Composer Edition with Rogue Wave IMSL (does this also come with a shell in case I do not have the Visual Studio)   Sincerely,  Bob

Mixed language module usage

$
0
0

I'm trying to reference variables from a module in a c language routine. I'm using the format specified here:

https://software.intel.com/sites/products/documentation/hpc/composerxe/e...

Is there something else I need to do during linking to make this happen?  I get an error from my compile and link commands:

Starting compile and link

ifort /Qopenmp-report2 /Qopenmp /integer_size:64 /real_size:64 /fpe:0 /names:lowercase /iface:cref /module:..\..\..\x64\Current /MT /libs:dll /iface:mixed_

str_len_arg /include:..\..\..\include /include:..\..\..\include\fluint /include:..\..\..\proces /assume:byterecl /extend_source:132 /O3 /list /traceback /I

NCREMENTAL:NO

Intel(R) Visual Fortran Intel(R) 64 Compiler XE for applications running on Intel(R) 64, Version 14.0.3.202 Build 20140422

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

Microsoft (R) Incremental Linker Version 11.00.61030.0

Copyright (C) Microsoft Corporation.  All rights reserved.

-out:astap.exe

-subsystem:console

-incremental:no

-defaultlib:libiomp5md.lib

-nodefaultlib:vcomp.lib

-nodefaultlib:vcompd.lib

/LIBPATH:..\..\..\DLLs_x64

SaveSetWriter.lib

..\..\..\x64\procesCur.lib

..\..\..\x64\utilityCur.lib

multicalc.lib

tdsubproc.lib

statwin.lib

sfmatlab.lib

savesetwriter.lib

/STACK:1000000000

/MAP

/MANIFEST

/NODEFAULTLIB:msvcrt.lib

/NODEFAULTLIB:dfordll.lib

/NODEFAULTLIB:msvcrtd.lib

/NODEFAULTLIB:dfor.lib

/DEBUG

/LIBPATH:..\..\..\DLLs_x64

SaveSetWriter.lib

..\..\..\x64\procesCur.lib

..\..\..\x64\utilityCur.lib

multicalc.lib

tdsubproc.lib

statwin.lib

sfmatlab.lib

savesetwriter.lib

/STACK:1000000000

/MAP

/MANIFEST

/NODEFAULTLIB:msvcrt.lib

/NODEFAULTLIB:dfordll.lib

/NODEFAULTLIB:msvcrtd.lib

/NODEFAULTLIB:dfor.lib

/DEBUG

astap.obj

procesCur.lib(supportp.obj) : error LNK2001: unresolved external symbol LUMP_MOD_mp_LTYPE

astap.exe : fatal error LNK1120: 1 unresolved externals

 

LUMP_MOD is the module and LTYPE is the variable name

My C declaration is:

extern __int64 LUMP_MOD_mp_LTYPE[];

My fortran declaration is (note the compile arguments make all variables 64 bits)

      MODULE LUMP_MOD

      INTEGER,ALLOCATABLE :: LTYPE(:)

Thanks!

Maximum Program Size

$
0
0

Steve:

I can now nicely run C# programs with the MKL libraries.  Thanks for the help. The PARDISO routine is 100 times faster than the other inversion program I was using. It is a very nice addition to the FORTRAN tool kit.

Even though it is listed as a sparse matrix solver, it will actually solve dense matrices. It will do a 12500 by 12500 array in 167 seconds. But as soon as I go over the 12,500 I run into the 2GB limit for Windows. I could move to our supercomputer, but that is a pain, can I use allocate to break the 2GB limit?

JMN

Viewing all 1447 articles
Browse latest View live


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