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

Access Violation Passing A Function As Argument

$
0
0

Hi everybody. I found an access violation using a function, passed as argument inside another function.

The code is this:

      function NRF_Hn(x, F_, G_, h)  result(Hn)
      
         implicit none
         double precision                        , pointer :: Hn(:,:)
         double precision,           intent(in) :: x(:)
         double precision, optional, intent(in) :: h(:)
         procedure(INRFunctionDouble), optional :: F_
         procedure(INRGradientDouble), optional :: G_
         
         double precision, allocatable :: xplush(:)
         double precision, allocatable :: xminush(:)
         double precision, pointer :: gMinus(:)
         double precision, pointer :: gPlus(:)
         integer  n , i
         
         n = size(x)
         allocate(Hn(n,n))
         Hn = 0.0d0
         
         !Creates x+h and x-h as Vectors
         allocate(xPlusH(n))
         allocate(xMinusH(n))

         
         !Copy the x in Vectors
         xPlusH  = x
         xMinusH = x
         
                 
          do i = 1 , n
            
            xPlusH(i)   =  xPlush(i)  + H(i)
            xMinusH(i)  =  xMinush(i) - H(i)
                        
            gMinus =>  G_(xMinusH, F_,h)  !<------ Access Violation Here !!!!
            gPlus  =>  G_( xPlusH, F_,h)
                       

                        
            Hn(:,i) = (gPlus - gMinus)/(2.0d0*h(i))     
            
            xPlusH(i)   =  x(i) 
            xMinusH(i)  =  x(i) 
            
          end do   
          

         
         deallocate(xPlusH)
         deallocate(xMinusH)
                  
      end function

This function is inside a class module.

 I attached the minimum project that reproduce the error, can you help in understanding what's going wrong?

AttachmentSize
Downloadapplication/x-7z-compressedTest2.7z2.1 MB

Mr. William Baya

$
0
0

Dear Intel Engineers and Friends.

I installed Intel Fortran XE 2016 trial version with Update 4 in order to link with VS 2013 and Abaqus 2017 for running Abaqus subroutines. The installation was succesful accept for Tosca which failed to install. The problem is that I have tried loading a subroutine but I end up with an error indicating a Problem during compilation. Information on this forum indicates that such a problem can be caused by failure of ifort to be properly installed.

when I run 

C:\Users\Baya>mpiifort.bat D:\test1\test2.f90
mpifc.bat for the Intel(R) MPI Library 5.1.3 for Windows*
Copyright(C) 2007-2015, Intel Corporation. All rights reserved.

I get the following message.

'ifort' is not recognized as an internal or external command,
operable program or batch file.
ERROR in the compiling/linking [1]

And when I run ifortvars.bat on cmd, it brings the following information:

C:\temp>ifortvars.bat
Syntax:
 ifortvars.bat [-arch] <arch> [vs] [-platform <platform>]

   <arch> must be is one of the following
       ia32         : Set up for IA-32 host and target
       ia32_intel64 : Set up for IA-32 host and Intel(R)64 target
       intel64      : Set up for Intel(R) 64 host and target
   If specified, <vs> must be one of the following
       vs2010      : Set to use Microsoft Visual Studio* 2010
       vs2010shell : Set to use Microsoft Visual Studio* Shell 2010
       vs2012      : Set to use Microsoft Visual Studio* 2012
       vs2013      : Set to use Microsoft Visual Studio* 2013
       vs2013shell : Set to use Microsoft Visual Studio* Shell 2013
       vs2015      : Set to use Microsoft Visual Studio* 2015
   If <vs> is not specified, the version of Visual Studio* detected at install
   time is used.
   <platform> must be of the following.
       linux          : Set to Linux* target.
       android        : Set to Android* target.

This is the point where am stuck now and I do not know how to proceed to resolve the issue.

I kindly need help 

Thanks in advance.

How do i download the Intel Parallel Studio XE 2013(Fortran comiler 13.0)?

$
0
0

Hi, I want to the Intel parallel studio XE 2013 version.

i could not find this install file. How do i download the install file?

plz help me

Problem Linking Intel Fortran 16 to Abaqus/CAE 2017

$
0
0

I'm trying to link Abaqus/CAE 2017 to Intel Fortran 16. Accordingly with Abaqus-Manual, this is the version of Fortran that works, in adition with Visual Studio 2015. I already uninstalled and installed all the softwares, but nothing works.

At the present time, when I run Abaqus Command Intel and VS are called, but when I try to run some subroutine, then nothing works. The message log that I get from Abaqus is:

Creating library standardU.lib and object standardU.exp
standardU_static.lib(SMAStsStdU_IF.obj) : error LNK2019: unresolved external symbol __imp_printf referenced in function "void __cdecl SMABasOmniSetSSELevel(void)" (?SMABasOmniSetSSELevel@@YAXXZ)
standardU_static.lib(SMAStsStdU_IF.obj) : error LNK2019: unresolved external symbol __imp_getenv referenced in function "void __cdecl SMABasOmniSetSSELevel(void)" (?SMABasOmniSetSSELevel@@YAXXZ)
standardU_static.lib(SMAStsStdU_IF.obj) : error LNK2019: unresolved external symbol __imp__putenv referenced in function "void __cdecl SMABasOmniSetSSELevel(void)" (?SMABasOmniSetSSELevel@@YAXXZ)
standardU_static.lib(ufluidpipefriction.obj) : error LNK2019: unresolved external symbol memmove referenced in function ufluidpipefriction
standardU_static.lib(umat_sst.obj) : error LNK2001: unresolved external symbol memmove
standardU_static.lib(uxfemnonlocalweight.obj) : error LNK2001: unresolved external symbol memmove
standardU_static.lib(uanisohyper_inv.obj) : error LNK2001: unresolved external symbol memmove
standardU_static.lib(uanisohyper_strain.obj) : error LNK2001: unresolved external symbol memmove
standardU_static.lib(ufluidconnectorloss.obj) : error LNK2001: unresolved external symbol memmove
standardU_static.lib(ufluidconnectorvalve.obj) : error LNK2001: unresolved external symbol memmove
standardU.dll : fatal error LNK1120: 4 unresolved externals
Abaqus Error: Problem during linking - Abaqus/Standard User Subroutines.
This error may be due to a mismatch in the Abaqus user subroutine arguments.
These arguments sometimes change from release to release, so user subroutines
 used with a previous release of Abaqus may need to be adjusted.

To link Abaqus with Intel Fortran I followed this article: https://www.researchgate.net/publication/313924098_Linking_ABAQUS_2017_a...

Can anyone help me? Thanks in advance!

FINAL subroutines work only with the default calling convention in IVF

$
0
0

When compiling user-defined data types containing a FINAL subroutine with a calling convention other than default such as /iface:cvf, the build fails with the error

error #5522: FINAL subroutines must be defined with the default calling convention

(a) Is this a Fortran standard requirement or an IVF-imposed restriction?
(b) Is there a workaround other than commenting out FINAL routines for compilation with the /iface:cvf option?

Not installing

$
0
0

I have a new computer. I installed Microsoft Visual Studio 2019. Then Downloaded Intel Parallel Studio XE Update 4 professional Edition for Fortran Windows. I tried to install the Fortran compiler I got this message 

"Intel Visual Fortran Compiler will not work because of the supported environments is found on your computer."

I appreciate your help.

Link VS2008 with Intel Fortran Compiler10.1

$
0
0

Hi, I am trying to compile my Fortran code with VS2008. I installed both program, but I figured out that my VS does not recognize the fortran.

I tried to follow what exactly said in the following website:

https://software.intel.com/articles/troubleshooting-fortran-integration-...

but I've got an error again. the point is in VS2008 I dont have Intel Fortran folder. Also, in VS2005, which is installed along with fortran compiler, when I try to run with command prompt, I got this message: \vsvar32.bat is not recognized and devenv.bat is not recognize.

 

The point is I have to run fortran with VS2008 as I am going to link both of them to my LSDYNA finally.

I would be appreciated if anyone can help me with this problem.

Ali

 

What are reasons for access violation?

$
0
0

In operator containing one reference to array element I have message:

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

That element could not be a reason - I check it. What are another possible reasons?


Intel Compiler show error while compiling my Fortran code

$
0
0

Hello there !

I am trying to run a simulation in Abaqus which involves linking Abaqus with user subroutine such as DFLUX  (written in Fortran language). When I tried to run the simulation via Abaqus command window I receive the following error : 

C:\donut\dynamic>abaqus job=plate_heat_movement user=subroutine_file interactive

Abaqus JOB plate_heat_movement
Abaqus 6.13-1
Abaqus License Manager checked out the following licenses:
Abaqus/Standard checked out 5 tokens.
<1019 out of 1024 licenses remain available>.
Begin Compiling Abaqus/Standard User Subroutines
7/17/2019 6:54:39 AM
Intel(R) Visual Fortran Intel(R) 64 Compiler XE for applications running on Inte
l(R) 64, Version 13.1.0.149 Build 20130118
Copyright (C) 1985-2013 Intel Corporation.  All rights reserved.

End Compiling Abaqus/Standard User Subroutines
Begin Linking Abaqus/Standard User Subroutines
   Creating library standardU.lib and object standardU.exp
subroutine_file.obj : error LNK2019: unresolved external symbol subroutineheat r
eferenced in function dflux
standardU.dll : fatal error LNK1120: 1 unresolved externals
Abaqus Error: Problem during linking - Abaqus/Standard User Subroutines.
  This error may be due to a mismatch in the Abaqus user subroutine arguments.
  These arguments sometimes change from release to release, so user subroutines
  used with a previous release of Abaqus may need to be adjusted.
Abaqus/Analysis exited with errors

I don't understand the error it shows. Moreover I am not able to figure out if the error is from the code I have written or is it from the compiler itself. I will attach the code that I have written below. I hope someone helps me to get around this problem TIA

Code : 

*USER SUBROUTINE
      SUBROUTINE DFLUX(FLUX,SOL,KSTEP,KINC,TIME,NOEL,NPT,COORDS,
  
     1 JLTYP,TEMP,PRESS,SNAME)
      include 'ABA_PARAM.INC'
      DIMENSION  FLUX(2),TIME(2),COORDS(3)
      CHARACTER*80 SNAME

*code 
       INTEGER :: KSTEP,NOEL,NPT 
       INTEGER,PARAMETER :: total_vals = 6272
       INTEGER :: row, col, max_rows = 50, max_cols = 100
       INTEGER :: a = 12, b = 1, t = 1
       REAL, DIMENSION(total_vals) :: hfl
       REAL, DIMENSION(total_vals) :: temp
       INTEGER, DIMENSION(50,100) :: elem_array
	   	  
       open(unit=10,file='C:\donut\dynamic\output_hfl.csv')
       read(10,*)hfl
       close(10)

       open(unit=11,file='C:\donut\dynamic\output_temp.csv')
       read(11,*)temp
       close(11)	

       open(unit=12,file='C:\donut\dynamic\output_file.csv')
	  
       do row = 1, max_rows 
           read(12,*)(elem_array(row,col), col = 1, max_cols)
       end do
	  
       close(12)
	  
       if(KSTEP.EQ.1)then 
           call subroutine heat(a,b,t)
       end if
	  
       contains
	  
            recursive subroutine heat(r,c,s)	  
            INTEGER, INTENT(IN) :: r,c,s
            INTEGER :: m,n
            INTEGER :: k = 1, l = 0
            if(TIME(2).gt.s)then                
                do m = r+27,r,-1
                    do n = c,c+27
                        if(NOEL.eq.elem_array(m,n))then
                            do p = 1,8
                                if(npt.eq.p)then
                                    Flux(1) = hfl(k+8*l)*temp(k+8*l)
                                end if
                                k=k+1
                            end do 
                        end if
                        k = 1
                        l = l+1
                    end do
                end do				   
            end if
            if(s.gt.100)then 
                stop
            else
                call subroutine heat(r,c+1,s+1)
            end if 
            return			
            end subroutine heat	  
      end	  

 

Question on renewing support Rogue Wave* IMSL Libraries

$
0
0

I was sent an email asking to renew support for Rogue Wave* IMSL* Fortran Numerical Libraries for Windows*. I clicked on the link that took me to the Registration Center page saying Product Support Renewal / Upgrade Options. I saw my serial number here and product details . It said "Use this tool to help make the best choice about renewal and upgrades available for your registered products."  My support had expired. I could not find anywhere on the page linking me to renewing the product. So my question is how do I request renewal of support? Thanks.

Intel Parallel Studio Fortran Library Link

$
0
0

I have Parallel Studio XE and compiled a Fortran program. I had to get the Rogue Wave* IMSL* Fortran Numerical Libraries for Windows*.  I used Visual Studio to build the program and it runs from Visual studio in the Debug. 

Have two questions:

1. While the program  runs in Visual Studio, it cannot run by opening the Fortran application or executable file in Windows file directory. It cannot link to the library and says "the code execution cannot proceed because mkl_intel_thread.dll was not found. Reinstalling the program may fix the problem."   The program runs fine using Visual Studio and pressing start.  Why is it not possible to run it from the executable file? I'd like to share the program with others to run it who don't need to have Visual Studio. 

2. Have written a basic file accessible in Visual Studio, which is a user interface for the Fortran program. The user interface is needed to specify inputs and export data to reports, etc.  Can this be linked to the Fortran program already built and how to do it?  

Thanks

 

.

VS2019 - Fortran Project option missing

$
0
0

Apologies if this is addressed elsewhere although I have looked and I must be missing something obvious as it seems no-one else has asked this.

I can't seem to find how to create a new Fortran project in VS2019 community edition. I've installed XE cluster edition 2019 update 4 with the default options after installing VS2019 with various workflows and updating that to version 16.1.6

It was a fresh install. VS or Parallel Studio wasn't previously installed.

Is there another option I should set within VS to enable the Intel Fortran project type to appear?

Some of the Intel Compiler features are present such as Vtune etc and the Intel features appears as installed options whenI re-run the VS installer.

With VS2017 however, the Intel Visual Fortran shows up in the New Project Window as expected.

No option to use Fortran in Microsoft Visual Studio

$
0
0

I recently downloaded the student version of Intel (R) Parallel Studio XE 2019, which is supposed to come with a Fortran Compiler. I have also downloaded the "community version" of Microsoft Visual Studio 2019. When I open up Miscrosoft Visual Studio 2019, I cannot find an option to start a Fortran script. I have looked in every single dropdown menu accessible in the entire interface and cannot find anything related to starting a Fortran script. Also, the only thing file in the whole Intel (R) Parallel Studio XE 2019 install that appears to have anything to do with Fortran is merely a "getting started" guide of helpful hints. I have downloaded Microsoft Version Studio trying to obey the precept "Microsoft C++ support must be selected as part of the Visual Studio install", and have downloaded all of the extensions that have C++ in the title. Item 3 in the "getting started" guide to using Visual Studio says "In the New Project window, select a project type under Intel(R) Visual Fortran," but there is no "Intel(R) Visual Fortran" to select a project under. Perhaps I have downloaded the wrong version of Intel (R) Parallel Studio XE 2019 (maybe I need the professional or something higher and not the student)... Or maybe I need a higher level version of Microsoft Visual Studio other than the community version. Perhaps it also something simple I am overlooking. I appreciate any help.

-Seth

AttachmentSize
Downloadimage/pngScreenShot2.png206.14 KB

FORTRAN project is blocked by Cylance Protect

$
0
0

Hello World,

I'm trying to compile an old FORTRAN prject with Visual Studio 2010 Shell but unfortunately my companies security software "Cylance Protect" detects the exe-file as a threat and is blocking the exe-file.

Do you have any experience what can cause such a behaviour?

Thanks for your help.
Sebastian

Intel Fortran Integration with Microsoft Visual Studio

$
0
0

Hello,

I am using a software (Aspen) which requires both Intel Fortran and Microsoft Visual Studio in order to run my simulation.
I downloaded Microsoft Visual Studio Community 2015 and Intel Parallel Studio XE 2019 (I checked to see if those versions can be integrated and they can). Firstly, I installed Visual Studio (all boxes checked during installation) and then Intel Parallel Studio XE 2019. Then I checked if the installation succeded and it did, as seen below:

37 IVF14_VS12   OK    Intel Fortran 2019 and Microsoft Visual Studio 14/2015

Next step is compiling the fortran code, so I place it in "C:\UserModels", then I open the Simulation window and type :

C:\ProgramData\AspenTech\Aspen Plus>cd ..
C:\ProgramData\AspenTech>cd ..
C:\ProgramData>cd ..
C:\>cd UserModels
C:\UserModels>aspcomp usrknt.f

And I get the following message : 

ASPCOMP: Warning! Intel Fortran compiler ifort.exe not found in %PATH%
'ifort.exe' n'est pas reconnu en tant que commande interne
ou externe, un programme exécutable ou un fichier de commandes.

  Error in compiling preprocessed file: Check compile.log

I already followed these steps (https://software.intel.com/en-us/articles/troubleshooting-fortran-integr...) to repair but it still doesn't work.

How to fix this problem? I appreciate if someone could explain to me in a simplified way because I am no software engineer and I have no idea how to fix this!
 

Thanks in advance.


/gen-dep not outputting dependencies of source in subfolders

$
0
0

Hi ifort users & developers, 

I am applying the guidelines here to generate a makefile from a windows build. One usual outcome I noticed with the dependency file is it does not list object dependencies for source files in sub folders. So for example, if the I have following source directory tree: 

  .
    └── src
        ├── main.f90
        ├── file_1.f90
        └── trapezoid
            ├── trap_1.f90
            └── trap_2.f90

 

The the *.dep file for the build has this as output:

file_1.mod : \
  C:\user\testmake\src\file_1.f90
  
x64\Release\file_1.obj : \
  C:\user\testmake\src\file_1.f90 \
  
main.mod : \
  C:\user\testmake\src\main.f90
  
x64\Release\main.obj : \
  C:\user\testmake\src\main.f90 \
  x64\Release\file_1.mod \
  x64\Release\trap_1.mod \
  x64\Release\trap_2.mod 

  
What's odd above is the *.dep file does not output object dependencies for sources in the ./trapezoid directory. I've enabled the /gen-dep flag. Aside from this, are there other flags I need to activate to output dependencies for the entire build?

The BuildLog.htm file indicates all four files were compiled in the build. I'm using ifort parallel studio 2015 bundled with the Visual Studio IDE to create the BuildLog.htm and dependency file. 

Correct way to reference the Fortran standard

$
0
0

For many years, I used F90 as a generic term to distinguish any code written in modern Fortran as opposed to the older standards (F77, F66) when such a reference was required in a publication or presentation. However, with the advent of newer standards (2003,2008,2015,2018), is there another abbreviation that is now valid? For example, "The XYZ software was written entirely in F2018 and built with the Intel Visual Fortran compiler version 19.0.4.228 in Windows 10."

Set file output to UNIX carriage control (LF) rather than Windows (CRLF)

$
0
0

I would like to make my output files with consistent record line endings.

The problem is I use the intrinsic function NEW_LINE('') within CHARACTER variables, but this always returns on Windows LF, rather than CRLF.

This results in a mixture of the two on my output files.

For example the following code:

PROGRAM CARRIAGE_CONTROL
  IMPLICIT NONE
  CHARACTER,    PARAMETER:: NL     = NEW_LINE('')
  CHARACTER,    PARAMETER:: CR     = ACHAR(13)  
  CHARACTER,    PARAMETER:: LF     = ACHAR(10)  
  CHARACTER(2), PARAMETER:: winNL  = CR//LF
  INTEGER:: IU
  
  OPEN(NEWUNIT=IU, FILE='LineEnding.txt', ACTION='WRITE', FORM='FORMATTED', ACCESS='SEQUENTIAL', STATUS='REPLACE', POSITION='REWIND')
  
   WRITE(IU,'(A)' ) 'Record 0' !CRLF record ending
   WRITE(IU,'(A)' ) 'Record 1' !CRLF record ending
   
   WRITE(IU,'(A)' ) 'Record 2'//NL//'Record 3'  !Middle record ending is LF, while end record is CRLF
   WRITE(IU,'(3A)') 'Record 4', NL, 'Record 5'
   
   WRITE(IU,'(2A)', ADVANCE='NO') 'Record 6', NL !LF   record ending
   WRITE(IU,'(A)' ) 'Record 7'                   !CRLF record ending
   
   WRITE(IU,'(A)' ) 'Record 8'//winNL//'Record 9'  !Middle record ending is CRLF, while end record is CRLF
   
   CLOSE(IU)
END PROGRAM

 

Produces the following output:

The issue is that Record 2, 4 and 6 do not have DOS style endings.

 

Ideally, it would be great to just set, through a compiler flag, or even a standard Fortran option that all files opened for WRITE use unix, instead of dos, style line record terminators. This would reduce the file size, and be consistent with the NEW_LINE intrinsic.

This would then change the code output such that:

 

Thanks

 

 

Correct way to reference the Fortran standard

$
0
0

For many years, I used F90 as a generic term to distinguish any code written in modern Fortran as opposed to the older standards (F77, F66) when such a reference was required in a publication. However, with the advent of newer standards (2003,2008,2015,2018), is there another abbreviation that is more representative? For example, "The XYZ software was written entirely in F2018 and built with the Intel Visual Fortran compiler version 19.0.4.228 in Windows 10."

Passing array of characters from Fortran DLL to VBA

$
0
0

I am trying to link a Fortran DLL to VBA.

I started by using Intel example (https://software.intel.com/en-us/node/611723) and I am able to deal with all kind of data except array of strings.

Here is my example:

FORTRAN:

SUBROUTINE TESTARRAY (ELEMENTS, OUTARRAY) ! bind(c, name='TESTARRAY')
!DEC$ ATTRIBUTES DLLEXPORT, STDCALL, REFERENCE, ALIAS:"TESTARRAY" :: TESTARRAY

IMPLICIT NONE

INTEGER*4, INTENT(IN) :: ELEMENTS
CHARACTER*15, INTENT(OUT) :: OUTARRAY(ELEMENTS)
INTEGER*4:: I
!DEC$ ATTRIBUTES REFERENCE :: ELEMENTS, OUTARRAY

DO I = 1,ELEMENTS
    WRITE(OUTARRAY(I),'(I3.3)') I
ENDDO

RETURN

END SUBROUTINE TESTARRAY

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

VBA:

 

Option Explicit
Option Base 1

Dim arraytest() As String * 15

Declare Sub TESTARRAY Lib "PATH\MYDLL.dll" (ELEMENTS As Long, ByVal OUTARRAY As String)

Public Function array_dll(iel As Long) As String

   ReDim arraytest(1 To iel)

    Call TESTARRAY(iel, arraytest(1))

    array_dll = Trim(arraytest(iel))

End Function

 

When I try to use inside an Excel sheet the function "array_dll" linked to a cell containing for example "5", I obtain an empty cell, and not "005" as expected.

How is the right method for dealing with that kind of data?

Thank you!

Viewing all 5691 articles
Browse latest View live


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