Quantcast
Channel: Intel® Software - Intel® Visual Fortran Compiler for Windows*
Viewing all 5691 articles
Browse latest View live

Syntax highlighting not working

$
0
0

I recently installed Intel Parallel Studio XE 2017 Update 1 Composer Edition, and Fortran syntax highlighting is not working in Visual Studio (Enterprise 2015).

I had another Intel Parallel Studio (I think it was the trial version of the same, but I'm not sure) before I installed this one, if that makes any difference.

Thanks in advance for any help!

Thread Topic: 

Help Me

EOF command is not working

$
0
0

Hello,

I'm using parallel_studio_xe_2017 with VS 2015 and EOF command doesn't detect the end of files. The command was working properly with the older version of parallel studio xe, but I don't know why It's not working in the new version. When I debug the code, EOF always gives a value of zero even though it's the end of the file. Help will be appreciated.

Thanks,

Ibrahim

Failed deallocation for alloc. return value

$
0
0

Hi,

i got a Problem with the deallocation of an allocatable character return value between a dll and the executable. After the assignment completes the exe trys to deallocate the return-value of the foo-function, wich fails.

Debug Error Message: "Damage before <Address of BAR> which was allocated by aligned routine"

Code of the dll:

! Compiler Options:
!   No influence on failure:
!     /Qfp-stack-check /Od /traceback /warn:all /debug:full
!   Those are influencing the issue:
!     /MTd /Qopenmp
module TEST_MODULE
  implicit none
contains

  function foo() result(bar)
    !DEC$ ATTRIBUTES DLLEXPORT,ALIAS:"TEST_MODULE_test" :: foo
    character(:), allocatable :: bar
    bar = 'Wiesel'
    write(*,'("0x",Z8.8)') loc(bar)
  end function

end module TEST_MODULE
Code of the exe:

! Compiler Options:
!   No influence on failure:
!     /Od /traceback /debug:full
!   Those are influencing the issue:
!     /MTd (/Qopenmp)
program main
  use TEST_MODULE
  implicit none

  character(:), allocatable :: a_char
  a_char = foo()

end program

 

It works, when both Targets are using /Qopenmp, or only the exe.
It also works, if /MD(d) is used for both (did not try to mix it).

The Problem occured with Compiler 17 and 17 Update 1. It works with Compiler 16 U3 and U4.

Visual Studio 2015 / Windows 10

Greetings

Wolf

Thread Topic: 

Bug Report

C call Fortran function with optional argument

$
0
0

Hi! I have interoperable  Fortran code that C can call ODRPACK95. At least it works without passing optional argument from C. And now is it possbile way to pass optional argument from C?

Fortran code:

subroutine wrapper_ODR(FCN,N,M,NP,NQ,BETA,Y,X,&
        DELTA,WE,WD,IFIXB,IFIXX,JOB,NDIGIT,TAUFAC,&
        SSTOL,PARTOL,MAXIT,IPRINT,LUNERR,LUNRPT,&
     STPB,STPD,SCLB,SCLD,WORK,IWORK,INFO,LOWER,UPPER) bind(C, name='wrapper_ODR')
!DEC$ ATTRIBUTES DLLEXPORT :: wrapper_ODR
    use iso_c_binding
    use ODRPACK95
    implicit none

    interface
        subroutine FCN(N,M,NP,NQ,LDN,LDM,LDNP,BETA,XPLUSD,IFIXB,IFIXX,LDIFX,&
        IDEVAL,F,FJACB,FJACD,ISTOP) bind(C)

        use, intrinsic :: iso_c_binding
        implicit none

        integer(c_int) :: IDEVAL,ISTOP,LDIFX,LDM,LDN,LDNP,M,N,NP,NQ

        real (c_double) :: BETA(1:NP),F(1:LDN,1:NQ),FJACB(1:LDN,1:LDNP,1:NQ), &
        FJACD(1:LDN,1:LDM,1:NQ),XPLUSD(1:LDN,1:M)

        integer(c_int) :: IFIXB(1:NP),IFIXX(1:LDIFX,1:M)

        end subroutine
    end interface

    integer(c_int),value :: N,M,NP,NQ
    real(c_double) :: BETA(1:NP),Y(1:N,1:NQ),X(1:N,1:M)

!!!!!Optional variable
    !!!!!!!!Unfinished
    !
    !integer(c_int), optional :: IFIXB(:),IFIXX(:,:),JOB,NDIGIT,MAXIT&
    !,IPRINT,LUNERR,LUNRPT,INFO
    !
    !real(c_double),  optional :: WE(:,:,:),WD(:,:,:),&
    !    TAUFAC,SSTOL,PARTOL,STPB(:),STPD(:,:),&
    !    SCLB(:),SCLD(:,:),LOWER(:),UPPER(:)
    !
    ! integer(c_int), optional,pointer :: IWORK(:)
    !real(c_double), optional, pointer :: DELTA(:,:),WORK(:)

!!!!!Call ODR
    call ODR(FCN,N,M,NP,NQ,BETA,Y,X,&
        DELTA,WE,WD,IFIXB,IFIXX,JOB,NDIGIT,TAUFAC,&
        SSTOL,PARTOL,MAXIT,IPRINT,LUNERR,LUNRPT,&
     STPB,STPD,SCLB,SCLD,WORK,IWORK,INFO,LOWER,UPPER)

end subroutine wrapper_ODR    

wrapper_ODR in C code:

wrapper_ODR(&FCN, N, M, NP, NQ, BETA, Y, X, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, \
        NULL, NULL,NULL, NULL, NULL, NULL, NULL,NULL, NULL, NULL, NULL, NULL, NULL, \
        NULL, NULL);

 

Zone: 

Thread Topic: 

Question

Incorrect warning on STOP range ?

$
0
0

When using IVF with /stand:f08, and a statement like "STOP 2147483647", I get the following warning:

"warning #8090: There are more than 5 decimal digits specified in a STOP or PAUSE statement.  This is an extension to Standard F2008."

However, it looks like this limitation was part of the Fortran 2003 standard. Section 8.4, p. 170, states that stop-code is a scalar-char-constant
or digit [ digit [ digit [ digit [ digit ] ] ] ]
, hence five digits. In the Fortran 2008 standard, however, section 8.4 p. 187 now states that stop-code may be scalar-default-char-constant-expr or scalar-int-constant-expr. There is an additionnal note stating that "the processor might be able to interpret only values within a limited range, or only a limited portion of the integer value", but if I understand correctly, this is not prohibited for a processor to use the full range of the default integer type. The warning seems to be wrong.

Incidentally, IVF does not issue any warning for negative values, which is correct: they are not handled by the Fortran 2003 standard, but they are part of the Fortran 2008 standard.

Note: I'm using IVF 2017.1 on Windows. I got my copies of the standard on the ANSI web site (INCITS/ISO/IEC 1539-1:2004 and 1539-1:2010 respectively). The corrigenda to F2008 and the current draft of F2015 do not seem to reintroduce a limitation. In the draft, the section is now 11.4.

This is really a minor, an infinitesimal concern.

Best regards,

Jean-Claude Arbaut

Thread Topic: 

Bug Report

missing dll for viewing watch variables

$
0
0

Hello!  When I try to use watch variables I get the message: "An error occurred while attempting to load an expression evaluator dll".  I get this with FORTRAN XE Composer 2016 and the new 2017, debugging a single large FORTRAN program under Win 7.  XE 2016 and 2017 use the Visual Studio 2013 shell.  This prevents me from viewing any watch variables.  Any ideas?  Thank you.

associated problem

$
0
0
program main
    implicit none

    type :: t
        integer :: a
    end type t

    type(t), pointer :: tp
    integer, pointer :: i

    if(associated(tp)) write(*,*) "tp is associated."
    if(associated(i )) write(*,*) "i  is associated."

end program main

Code above outputs a strange result of "i is associated" but tp is not, why is that ?

Intel(R) Visual Fortran Compiler 17.0.0.109 [IA-32] is the current compiler, and I also tried Linux version of ifort 13.1.1 and nothing wrong appears, thanks for reply.

Thread Topic: 

Question

New UCRT dependency in Intel FORTRAN 2017?

$
0
0

We are updating from Intel FORTRAN XE Composer 2015 Update 5 to 2017 Update 1. It is used to build FORTRAN dll's called from C#, all of it built from one and the same solution under VS 2015. Its seems that there is now a dependency from FORTRAN on UCRT (UCRTBASE.DLL via VCRUNTIME140.DLL) which was not there before. Earlier we only depended on MSVCRT120.DLL.

According to descriptions on the internet "The new Universal C Runtime is needed when programmers use the new Windows 10 Software Development Kit to build Universal/Metro apps and you try to run them ...". We have not made any active choice to do that hence do not appreciate why we have the new dependencies.

Our real problem is resolving the run-time when distributing our application carrying the FORTRAN dll's. It seems we either need to distribute a VCRT installer or rely on KB2999226 being present on the target platform.

Can anyone shed some light on this? Is it possible to refrain from relying on the UCRT via some setting in Intel FORTRAN or VS 2015? If not, then what are we to distribute, as part of the normal setup package we use, to roll out our application?

Zone: 

Thread Topic: 

Question

include the external common variables block into main code

$
0
0

 Hello, I am making the numerical simulation code by fortran. I made the common variables in an external file. All variables is called to main code and subroutines by INCLUDE "Variable.inc". But when compiled the program, I got these messages:

Error    1     error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: // / <IDENTIFIER>    C:\Users\Ledinhanh07\Documents\Visual Studio 2013\Projects\Console3\Console3\subcomMCMBLPC.inc    9    
Error    2     error #5082: Syntax error, found '&' when expecting one of: <LABEL> <END-OF-STATEMENT> ; TYPE INTEGER REAL COMPLEX BYTE CHARACTER CLASS DOUBLE ...    C:\Users\Ledinhanh07\Documents\Visual Studio 2013\Projects\Console3\Console3\subcomMCMBLPC.inc    10    
Error    3     error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: <REAL_KIND_CON> <REAL_CONSTANT> <DBLPRC_CONSTANT> <DBLPRC_KIND_CON> <QUAPRC_CONSTANT> ...    C:\Users\Ledinhanh07\Documents\Visual Studio 2013\Projects\Console3\Console3\subcomMCMBLPC.inc    10    
Error    4     error #5082: Syntax error, found '&' when expecting one of: <LABEL> <END-OF-STATEMENT> ; TYPE INTEGER REAL COMPLEX BYTE CHARACTER CLASS DOUBLE ...    C:\Users\Ledinhanh07\Documents\Visual Studio 2013\Projects\Console3\Console3\subcomMCMBLPC.inc    11    
Error    5     error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: // / <IDENTIFIER>    C:\Users\Ledinhanh07\Documents\Visual Studio 2013\Projects\Console3\Console3\subcomMCMBLPC.inc    12
.....

My Variable.inc is as follows*:  

!C     ---------------------------------------------------------------
!C     File Name subcom.inc 
!c
      PARAMETER(NI=183,NJ=70)
      PARAMETER(NPHI=7,NPHI1=5,NPHI2=6)
      PARAMETER(NI1=51)
      IMPLICIT REAL*8 (A-H,O-Z)
      COMMON /BTVD/ AM1( NPHI,NPHI,NI,NJ)
      COMMON /BPHI/ PHI( NPHI,NI,NJ),
     &             PHIN( NPHI,NI,NJ),
     &             PHIM( NPHI,NI,NJ)
      COMMON /BVAR/   F( NPHI,NI,NJ),
     &                G( NPHI,NI,NJ),
     &                Q( NPHI,NI,NJ),
     &               EV( NPHI,NI,NJ),
     &               FL( NPHI,NI,NJ)
      COMMON /BSUB/ROU(NI,NJ),.....

Please tell me how to fix this problem!!!

Thank you !

 

 

What is this XERBLA thing ?

$
0
0

program solve
    use lapack95
    real(8) A(3,3),B(3),work(999)
    integer m/3/,n/3/,nb/3/,lwork(999),info,nrhs/3/
    n=n
    call dgels("N", 3, 3, 3,    A, 3, b, 3   ,work, lwork, info)
!        dgels(trans, m, n, nrhs, a, lda, b, ldb, work, lwork, info)
    read(*,*)
end program

I get this weird missing entry point - see screen shot

I am pointing to the MKL library in my project properties, apparently it DOES find

the DGELS routine.

The program does not even start. I have not bothered to put in numbers as yet.

AttachmentSize
Downloadimage/pngXERBLA_error.png117.01 KB

Debugger is unstable ?

$
0
0

and then it says "recommend you close all files and restart."

why didn't they test this?

Are we supposed to be testing this stuff for them ?

Start-up window of a program

$
0
0

Can anyone tell how a start-up window can be arranged in a Windows program? The start up window shows different stuff and closes before the main window appears...

Any hints?

 

 

64-bit debugger for Fortran 10.1 with Visual Studios 2005

$
0
0

I'm installing Intel FORTRAN 10.1 with Visual Studio 2005 on a PC running Windows 7 Enterprise Service Pack 1.

When attempting to debug a 64 bit application an error pops up stating,

'Unable to start program "..."'.
The components for the 64-bit debugger are not registered. Please repair your Visual Studio 2005 Remote Debugger installation via 'Add or Remove Programs' in Control Panel."

I found this thread https://software.intel.com/en-us/forums/intel-visual-fortran-compiler-for-windows/topic/303821

The closest I could come to Steve's recommended solution was to run: C:\Program Files (x86)\Intel\Download\IntelFortranCompiler10.1\installs\w_idp_p_10.1.034_IA64.exe

This reported, "This installation package is not supported by your processor type.  Contact Product Vendor."

How can I get the 64-bit debugger working with FORTRAN 10.1 and Visual Studios 2005?

Zone: 

Thread Topic: 

Help Me

Blank Characters

$
0
0

If I have a character*72 Name

and Name is all blank characters coming in from a file from another program - how do I test for blankness --

Ta

John

Debug error from C++ RTL

$
0
0

I am trying to use the latest Intel Fortran compiler (17.0.1.143). My program compiles fine but when I run the Debug version (I didn't try the Release version), I get a C++ RTL error:

Debug Error! Damage before (some memory address) which was allocated by aligned routine.

The error is occurring at two locations:

1. When I call a function that returns an array of user-defined data type that includes ALLOCATABLE array attributes. I was able to fix this by converting these functions to subroutines.

2. When I try to DEALLOCATE an array of user-defined data type that includes ALLOCATABLE array attributes. Maybe I should first deallocate the attributes before attempting to deallocate the array?

This code worked fine with 16.0.4.246 and earlier versions of the compiler. Can this be an issue with the compiler? Any help will greatly be appreciated.

Thanks!

EDIT: For item 2 above, it turns out that the error occurs if one of the array arguments of the user-defined type is not previously allocated. I use the STAT argument with DEALLOCATE to avoid checking if an array is allocated before deallocating it. This has always worked in the past.


cannot add a new file to a blank project ?

$
0
0

It used to be that I could just type in a source file, the first one of a new project, and include it.

I cant do that anymore. why did they disable that in VS 2013 ?

I could in VS 2010.

 

It no longer gives me that choice.

 

Dont they test this stuff ?

Static Library Problems

$
0
0

Hi, everyone. I am using Intel C\C++ compiler (icl.exe) and Fortran compiler (ifort.exe) to produce a static library under Windows7 and redistribute it to someone possibly without any Intel dependencies.

 

I already compiled all source code into .obj files and used xilink.exe to produce a static library. But when i linked main.c with this static library in a virtual machine with Visual Stdio 2013 and without any Intel library dependencies, many similar errors like "fatal error LNK1104: cannot open file 'ifconsol.lib'" occurred. After i read this topic: https://software.intel.com/en-us/forums/intel-visual-fortran-compiler-fo..., i tried putting all the needed Intel Compiler library into the virtual machine. Then compilation and output of main.c is correct.

 

However, my goal is to produce just one static library. So i try to include the needed Intel Compiler library into my static library with command: "xilink -lib /OUT:self_defined.lib self_defined_solver.lib ifconsol.lib". I deleted all the needed Intel Compiler library in virtual machine and recompile the main.c. To my surprise, the above error still came out, which means ifconsol.lib have to be linked explicitly.

 

I wonder if i could include all the needed Intel Compiler library in my static library? If can, did i make some mistakes? 

 

Thanks in advance! I have checked Developer Guider but found no clue to this problem.

Zone: 

Thread Topic: 

Question

Intel Premier Support Legacy Status Update

Forum "contributions" list contains bogus dates for "Updated"

How can I use the subroutine VFSetErrorInfo in a 64 bits enviroment

$
0
0

Hi, I created a COM server for 32 bit . This one works fine for a long time.
I now want to create the same one under 64 bit, and it doesn't link because of two errors

error LNK2019: unresolved external symbol _CreateErrorInfo@4 referenced in function VFSETERRORINFO
error LNK2019: unresolved external symbol _SetErrorInfo@8 referenced in function VFSETERRORINFO

These two externals were called from the subroutine VFSetErrorInfo.I believe this subroutine came with one the sample projects.

Does someone know how to change this subroutine?

Thanks Aid Usman

AttachmentSize
Downloadapplication/octet-streamVFSetErrorInfo.f902.34 KB

Zone: 

Viewing all 5691 articles
Browse latest View live


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