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

LoadLibrary works in Debug mode but fails on Release

$
0
0

We have some very old Fortran code (developed in mid 90s) built into dll to be used in C++ projects.  Recently we upgraded to Parallel Studio Fortran compiler 9.1.

Calling LoadLibrary from C++ returns error code 127 "The specified procedure could not be found".  Compared the dumbpin results, the following is in the Debug version, but libifcoremd.dll is definitely missing from the Release:
 

    libifcoremdd.dll
              10028080 Import Address Table
              1002DDB8 Import Name Table
                     0 time date stamp
                     0 Index of first forwarder reference

                  14F for_emit_diagnostic

Can someone give me a hint where I need to look at to find the cause?

Many thanks!
Andrew Li

 


LoadLibrary fails on Release mode

$
0
0

Hi, we have quite some old Fortran code built into dlls to be used in C++.  Recently we upgraded to Parallel Studio with Fortran compiler 9.1.

The Debug version of the dlls from Fortran work fine, but not the Release version.  The LoadLibrary call on the C++ side returns error 127, "The specified procedure could not be found."

Compared the dumpbin results, and found the following in Debug version but libifcoremd.dll is not in the Release build.

    libifcoremdd.dll
              10028080 Import Address Table
              1002DDB8 Import Name Table
                     0 time date stamp
                     0 Index of first forwarder reference

                  14F for_emit_diagnostic

an someone give me a hint where I should look at to find the cause?

Many thanks!
Andrew Li

 

 

 

 

compliance problem and library error

$
0
0
vs 2015 and xe 2018. I can not run the project I run for fortran 2013 in 2018, the error codes are as follows ..

 

 

1> ------ Derleme başladı: Proje: Console2, Yapılandırma: Debug x64 ------
1> Intel (R) Visual Fortran Derleyici ile Derleme 18.0.0.124 [Intel (R) 64] ...
1 > Kaynak1.için
1> C: \ Kullanıcılar \ baha \ Belgeler \ Visual Studio 2015 \ Projects \ Console2 \ Console2 \ Source1.for (2): hata # 5102: Dosya açılamıyor 'LINK_FNL_STATIC.H'
1> C: \ Kullanıcılar \ baha \ Belgeler \ Visual Studio 2015 \ Projects \ Console2 \ Console2 \ Source1.for (3): hata # 7002: Derlenmiş modül dosyasını açarken hata oluştu. INCLUDE yollarını kontrol edin. [EVCRG_INT]
1> C: \ Kullanıcılar \ baha \ Belgeler \ Visual Studio 2015 \ Projects \ Console2 \ Console2 \ Source1.for (4): hata # 7002: Derlenmiş modül dosyasını açarken hata oluştu. INCLUDE yollarını kontrol edin. [EPIRG_INT]
1> C: \ Users \ baha \ Documents \ Visual Studio 2015 \ Projects \ Console2 \ Console2 \ Source1.for (5): hata # 7002: Derlenmiş modül dosyasını açarken hata oluştu. INCLUDE yollarını kontrol edin. [CSDER_INT]
1> C: \ Kullanıcılar \ baha \ Belgeler \ Visual Studio 2015 \ Projects \ Console2 \ Console2 \ Source1.for (6): hata # 7002: Derlenmiş modül dosyasını açarken hata oluştu. INCLUDE yollarını kontrol edin. [CSINT_INT]
1> derleme C: \ Users \ baha \ Documents \ Visual Studio 2015 \ Projects \ Console2 \ Console2 \ Source1.for için iptal edildi (kod 1)
1>
1> Oluşturma kütüğüne yazılır "file: // C: \ Kullanıcılar \ baha \ Belgeler \ Visual% 20Studio% 202015 \ Projects \ Console2 \ Console2 \ x64 \ Debug \ BuildLog.htm "
1> Konsol2 - 6 hata (lar), 0 uyarı (lar)

Fatal error RC1015: cannot open include file 'winres.h'

$
0
0

I wonder if anyone can help me please?

I am porting an existing Fortran project from Intel Fortran 11 running on Windows XP to Intel Fortran 18 running on Windows 10.

I am using Microsoft Visual Studio 2017 Community Edition to host the Intel Fortran 18 compiler.

When I build my project, I get the following error:

Fatal error RC1015: cannot open include file 'winres.h'

The articles on the Internet that I have found about this error do not provide me with a workable solution.

Does anyone know how I can fix this error?

Many thanks

Andrew Bond

Trying to get a MSVS 2015 and Intel FORTRAN 15 combination

$
0
0

So the long sad tail of woe .... Because of 3'rd party tools I need those versions.

It seems that I now down load MSVS 2017, and then they give me the option it install MSVS 2015 at the same time ... but both use the newer 2017 MSVS IDE. 

Well this seems bad because Intel 15.0.7 seems to want to find IDE components of MSVS 2015, which are no where to be found. (error is along the lines of MSVS 2105 not found)

Now the sad part is I don't use the IDE, I am more of a CMake and editor kind of guy. All I really need, is to open a console window, type

      - cl          and get the 64 bit C++ compiler from MSVS 2015 (think Unigraphics)

      - ifort      and get the Intel 15.0.7 compiler (think ANSYS)

After at least 12 hrs of installing/un-installing the frustration is high. 

 

 

Array constructor bracket syntax error?

$
0
0

This program:

   Program testArrayCon
      implicit none
      real(8), dimension(2):: t1, t2
      parameter t1 = (/1.0, 2.0/)
      parameter t2 = [3.0, 4.0]
   end program testArrayCon

produces the following syntax error associated with the assignment of t2:

 error #5082: Syntax error, found '.' when expecting one of: .EQV. .NEQV. .XOR. .OR. .AND. .LT. < .LE. <= .EQ. == .NE. /= .GT. > ...

I don't see why I can't use the [ ] array constructor in the parameter statement.  In a type declaration, they are fine:

   Program testArrayCon
      implicit none
      real(8), dimension(2), parameter:: t1 = [1.0, 2.0]
      real(8), dimension(2), parameter:: t2 = [3.0, 4.0]
   end program testArrayCon

I'm using Update 3 of Intel Fortran 2018 cluster studio (which is the latest version).

Cheers, joe

Getting allocated data out of Fortran-Dll and back in again

$
0
0

Hi,

I've got a Fortran-Dll which will be used by all kind of other programs (e.g. Excel-VBA, Python, C/C++ programs).

The Fortran-Dll is stateless (i.e. no static-variables, SAVE or DATA). All data is either on the stack or dynamically allocated, thus the dll can be used parallel without restrictions. (OpenMP is NOT used since it reduces the parallelization to OpenMP-threads only).

Let's assume there is an exported function CALCULATE from the dll. On each call CALCULATE allocates a large user-defined structure, initializes it, makes some calculations and returns the result AND deallocates the user-defined structure again.

Since the initialization of the user-defined structure is quite complex, I would like to re-use it for multiple calls to CALCULATE. Below is a sketch of my current approach to this (returning the address of the user-defined structure to the caller)

My question is: Is there any other/better or even standardized way to export Fortran allocated data?

Tobias

 

integer(c_intptr_t) function CREATE_DATA (arg_1, ... , arg_n)          
!DEC$ ATTRIBUTES DLLEXPORT::CREATE_DATA
use, intrinsic :: iso_c_binding
implicit none
    type(large_udt),pointer :: data
    allocate(data)
 
      ! use arg_1,...,arg_n to initialize  data
      ! call setup(data, arg_1,...,arg_n) 
     CREATE_DATA = LOC(data)
end function CREATE_DATA
    

subroutine DESTROY_DATA (handle)
!DEC$ ATTRIBUTES DLLEXPORT::DESTROY_DATA
use, intrinsic :: iso_c_binding
implicit none
    integer(c_intptr_t), intent(in)  :: handle 
    type(type_udt),target :: data
    type(type_udt),pointer :: data_ptr
 
    pointer(handle,data)
    data_ptr => data
    deallocate(data_ptr)
 end subroutine DESTROY_DATA

 

function CALCULATE (handle,args...)
!DEC$ ATTRIBUTES DLLEXPORT::CALCULATE
use, intrinsic :: iso_c_binding
implicit none
    integer(c_intptr_t), intent(in)  :: handle 
    type(type_udt),target :: data
    type(type_udt),pointer :: data_ptr
 
    pointer(handle,data)
     ! do calculation using data and args and return result
     ! ...
end function CALCULATE

 

building a dll and an exe linking to it : fatal error LNK1107: invalid or corrupt file: cannot read at 0x2F0 or cannot run exe

$
0
0

I followed and adapted your links :

Coding Requirements for Sharing Procedures in DLLs

Building Dynamic-Link Libraries

and

Building Executables that Use DLLs

with the following codes :

The dll code :

function mysum(x,y) result(z)
    !DEC$ ATTRIBUTES DLLEXPORT :: mysum
    INTEGER x, y
    z = x+y
    end function mysum

function myprod(x,y) result(z)
    !DEC$ ATTRIBUTES DLLEXPORT :: myprod
    INTEGER x, y
    z = x*y
    end function myprod

in dll.F90 and the client code :

program CallingTheDLL
    !DEC$ ATTRIBUTES DLLIMPORT:: mysum
    !DEC$ ATTRIBUTES DLLIMPORT:: myprod
    integer i, j

    integer resS
    integer resP

    print*,"enter two integers"
    read (*,*) i,j
    resS = mysum(i, j)

    resP = myprod(i, j)

    print*,"Sum of ",i," and ",j," is = ",resS
    print*,"Product of ",i," and ",j," is = ",resP
    
    read(*,*)
end program CallingTheDLL

in client.F90.

The structure in the folder is :

I have a folder DLL_EXAMPLE containin two folders :

  • DLL that contains dll.F90
  • CLIENT that contains client.F90

In the folder DLL I run :

ifort /align:commons /dll dll.F90

which gives to me the output :

-out:dll.dll
-dll
-implib:dll.lib
dll.obj
   Creating library dll.lib and object dll.exp

then in the CLIENT I run :

ifort /align:commons /dll client.exe .\..\DLL\dll.obj /link .\..\DLL\dll.dll

which gives to me the outup :

-out:client.dll
-dll
-implib:client.lib
.\..\DLL\dll.dll
client.exe
.\..\DLL\dll.obj
.\..\DLL\dll.dll : fatal error LNK1107: invalid or corrupt file: cannot read at 0x2F0

Remark : if I run

ifort -o client.exe /dll .\..\DLL\dll.obj /link .\..\DLL\dll.lib

instead I don't have an error, and have this output :

-out:client.exe
-dll
-implib:client.lib
.\..\DLL\dll.lib
.\..\DLL\dll.obj
   Creating library client.lib and object client.exp

but when I double click the exe I have a windows 10 pop up "This app can't run on your PC" and if I try to run it from the command line, I have :

C:\WORK\CODING\MY\SHIT\FORTRAN\TOYING\DLL_EXAMPLE>.\CLIENT\client.exe
Access is denied.

Adding `/align:commons` or not doesn't change anything.

What did I do wrong and how to correct ?

AttachmentSize
Downloadapplication/octet-streamclient.F90414 bytes
Downloadapplication/octet-streamdll.F90257 bytes

ifort dll and dependency walker circular dependency

$
0
0

When I open the dll `dll.dll` from this question :

https://software.intel.com/en-us/forums/intel-visual-fortran-compiler-for-windows/topic/783560#comment-1925220

inside dependency walker for wnidows 64bits, I have a strange error :

Error: At least one required implicit or forwarded dependency was not found.
Error: At least one module has an unresolved import due to a missing export function in an implicitly dependent module.
Error: A circular dependency was detected.
Warning: At least one delay-load dependency module was not found.
Warning: At least one module has an unresolved import due to a missing export function in a delay-load dependent module.

I am not that worried the "At least one*" errors/warning (I am right not to be ?) but the circular dependency one puzzles me.

Any idea ?

ifort: warning #10145: no action performed for file 'A.obj'

$
0
0

I am under windows (as the obj extension shows).

I have two valid .f90 files `A.f90` and `B.f90` (place in the same folder) where `B.f90` uses `A.f90`, the code of `B.f90` being :

module B
use A
! ... stuff

The code of `A.f90` is 

module A
! ... stuff

I compile `A.f90` with :

ifort -c -fpp A.f90

Now I would like to compile `B.f90` "while taking accound of" `A.f90`, that is, of its `.obj` file.

So I tried :

ifort -c B.f90 A.obj

which throws

ifort: warning #10145: no action performed for file 'A.obj'

at me.

Is the command

ifort -c B.f90

proper to compile `B.f90` "while taking accound of" `A.f90`, that is, of its `.obj` file ?

I would like B.f90 it to be compiled "as A.f90 is", as in fact I have a third C.f90(containing a use B) and that at the end I must run the command :

ifort -dll toto.dll A.o B.o C.o

to compile a dll while linking to all object files from A, B, C.

ipsxe-comp-vars.bat always sets TARGET_ARCH=intel64

$
0
0

I have intel parallel studio 2017, I am looking at ipsxe-comp-vars.bat :

set TARGET_ARCH=

:ParseArgs
:: Parse the incoming arguments
if /i "%1"==""        goto Build
if /i "%1"=="ia32_intel64" (set TARGET_ARCH=intel64) & shift & goto ParseArgs
if /i "%1"=="intel64"      (set TARGET_ARCH=intel64) & shift & goto ParseArgs
shift & goto ParseArgs

:Build

:: stuff

It seems that `TARGET_ARCH=intel64` even when the first argument is `ia32_intel64`.

Why ?

Getting stack overflow just by enabling openmp

$
0
0

I have a fairly simple code that I was attempting to add some OpenMP directives to. I am an experienced Linux command line OpenMP programmer (and MS VS C programmer), but this is my first experience using VS and Intel Fortran.

The serial code compiles/runs fine. As soon as I activate OpenMP via the Properties|Language|"Process OpenMP" dialog, the code throws stack overflow exceptions upon startup. With no OpenMP directives.

I have tried increasing the stack with "OMP_STACKSIZE=16M" as an environment variable, and I even switched to 64-bit compilation. Same thing.

Disable OpenMP and all is well.

Am I missing a magic configuration setting? Did I neglect to run some installation script? Maybe the default libs are an issue?

Grateful for suggestions in advance,

John

 

SETDCBRUSHCOLOR

$
0
0

Has the function SETDCBRUSHCOLOR been deprecated and if so how do you change the brush color?

Thanks,

Brooks

Problems with Block Data

$
0
0

Hello Forum Members:

I'm trying to resurrect an ancient FORTRAN IV program from the 1960s.  I'm having trouble with the Linker telling me that a symbol is multiply defined.    I get these messages, where CSTAR is a Common block, PERDAT is another BLOCK DATA file

Severity    Code    Description    Project    File    Line    Suppression State
Error        fatal error LNK1169: one or more multiply defined symbols found        (in TND4729)       
Error        error LNK2005: _CSTAR already defined in TND4729.obj                    (in Perdat.obj)

Can anyone help me to sort out this mess.

My first question to help me understand what is going on is: Where does the block data get inserted in the program?

Regards,

Gordon B

 

 

 

   

 

call a DLL from Fortran

$
0
0

Hi there,

to call a DLL from another Fortran DLL in another topic Steve Lionel (Intel) wrote that there is an example from Intel, but I can't find.

Is someone able to help me?

Olaf

 


A VB.NET DLL calling by Fortran

$
0
0

Hi there,

and here is my second question today.

I like to call a VB.NET by Fortran. But I don't know how. I don't understand how t call a object-oriented language by Fortran.

 

Thanks

 

Olaf

Installer for 2013 Intel® Parallel Studio XE Composer Edition for Fortran Windows

$
0
0

Hi, I recently had to reformat my PC due to corrupted HD. I am trying to install back the Intel Visual Fortran Composer XE for Windows which I bought back in 2014. The installer for the compiler has been taken down just recently 9/7/2018. The authorised dealer in Malaysia could not resolve my problem as well, and they suggested that I re-purchase a new license - which doesn't make any sense to me since the original license is a Perpetual license and was working just fine to compile simple fortran codes. Since I am working in a public university where funding is tight  such loss of property (being unable to retrieve the original compiler) cannot be taken lightly. Therefore, I would like to ask for kind assistance and guidance on how I can retrieve the installer without having to pay any extra charges. The compiler Product SKU is FCX999WSAE01. Thank you very much.

Visual Studio/Fortran integration

$
0
0

Hi all, 

I am gonna need to use my Fortran code within visual studio environment. I have the followings installed:

1. Fortran XE 2013 sp1.139

2. Micorsoft Visual Studio Professional 2013

But, When I am going to create a new project within visual studi, Fortran in not available (please see attached image). 

I would be grateful if someone can let me know if I am doing something wrong or missing something.

Thanks,

Mohsen

 

AttachmentSize
Downloadimage/pngImage.png50.69 KB

Problem running executable outside of VS17

$
0
0

I can generate a "Debug" and a "Release" (both x64)  version of a Fortran program from within Visual Studio 17.

I can run both versions from within Visual Studio 2017. Both versions run to completion.

 

When I copy the debug or the release version from the project bin folder to another directory with data

and attempt to run it,  I get the following error dialog window msg:

"The procedure entry point for _dealloc_all_nocheck could not be located in the dynamic link library {fully qualified path to executable}"

 

This is something new to me - I have not seen this before.

 

Currently using

  1) Visual studio 2017 17.7.5

  2) Intel Fortran 2018 Release 3

 

 

 

 

The 'IntelPackage' package did not load correctly.

$
0
0

I have intel parallel studio 2017 update 4 integrated in visual 2015 enterprise last update.

In the latter I created a intel fortran "main program" project (from the proposed templates) and had the pop error error in the attached screenshot.

As proposed in the pop up windows, I went to see the activitylog.xml zipped and attached as well.

Clicking "ok" in the pop up windows loaded the project and it seems to be normal.

Is this normal ? What happened ?

Viewing all 5691 articles
Browse latest View live


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