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

How to use IMSL in visual fortran v 11.1

$
0
0

Hi everybody

Unfortunately, I can not use the imsl library in my fortran v 11.1.

Also, the folder below can not be found:

C:\Program Files\VNI\imsl\fnl600\IA32\lib    or   C:\Program Files (x86)\VNI\imsl\fnl600\IA32\include\dll

for example, when I type this command line "USE AMACH_INT"  in my fortran environment, then the error:

error #7002: Error in opening the compiled module file. Check INCLUDE paths. [AMACH_INT]

is emerged.

Would you mind helping me ? Thank you in advance and I look forward to hearing form you.

Best wishes

Amir

 


FORTRAN / VBA EXCEL

$
0
0

What is the difference between:

subroutine Test1(Double1,Double1_N,Integer1,Integer1_N,Charater1,Charater1_LEN,Charater1_DIM,Results1,Results1_N)
!dec$ attributes dllexport,stdcall,reference,alias:'Test1' :: Test1

And

subroutine Test1(Double1,Double1_N,Integer1,Integer1_N,Charater1,Charater1_LEN,Charater1_DIM,Results1,Results1_N) Bind(C)
!DEC$ ATTRIBUTES DLLEXPORT:: Test1

This works just fine and VBA Excel can call the subroutine

subroutine Test1(Double1,Double1_N,Integer1,Integer1_N,Charater1,Charater1_LEN,Charater1_DIM,Results1,Results1_N)
!dec$ attributes dllexport,stdcall,reference,alias:'Test1' :: Test1
use iso_c_binding
implicit none
integer(c_int), value :: Double1_N,Integer1_N,Results1_N,Charater1_LEN,Charater1_DIM
real(8), dimension(Double1_N), intent(in):: Double1
real(8), dimension(Results1_N), intent(out)::Results1
integer(4), dimension(Integer1_N),intent(inout):: Integer1
character(len=Charater1_LEN), dimension(Charater1_DIM),intent(inout) :: Charater1
Results1 =Double1*Integer1
Charater1(1) = 'abcde'
Charater1(2) = 'fghij'
Charater1(3) = 'klmno'
Charater1(4) = 'pqrst'
Charater1(5) = 'uvwxyz'
end subroutine Test1

The follwoing does not work I get a "Bad DLL calling convection" when VBA Excel tries to call the subroutine

subroutine Test1(Double1,Double1_N,Integer1,Integer1_N,Charater1,Charater1_LEN,Charater1_DIM,Results1,Results1_N) Bind(C)
!DEC$ ATTRIBUTES DLLEXPORT:: Test1
use iso_c_binding
implicit none
integer(c_int), value :: Double1_N,Integer1_N,Results1_N,Charater1_LEN,Charater1_DIM
real(8), dimension(Double1_N), intent(in):: Double1
real(8), dimension(Results1_N), intent(out)::Results1
integer(4), dimension(Integer1_N),intent(inout):: Integer1
character(len=Charater1_LEN), dimension(Charater1_DIM),intent(inout) :: Charater1
Results1 =Double1*Integer1
Charater1(1) = 'abcde'
Charater1(2) = 'fghij'
Charater1(3) = 'klmno'
Charater1(4) = 'pqrst'
Charater1(5) = 'uvwxyz'
end subroutine Test1

OpenMP with FORTRAN 'DO WHILE' loop?

$
0
0

Hi,

I know what document says about using OMP with FORTRAN 'DO WHILE' loop: do not ever use !$OPM PARALLEL DO.

So my question is not about using "!$OPM PARALLEL DO" with DO WHILE loop.

Say, I have a real situation where I can only use 'DO WHILE' loop, and a conversion to normal DO loop is not even possible, can I still use

!$OPM PARALLEL

DO WHILE (.logical expr.)

!$OPM TASK UNTIED

some code in the loop....

!$OPM END TASK

ENDDO

!$OPM END PARALLEL

Anything wrong with this? pitfall potentially?

How about OMP sections and section? Any examples?

Any pointer will help.

Automatic allocation of allocatable scalars with allocatable components

$
0
0

Is this supported?  Some tests here with 13.1.0 indicate "sort of".

PROGRAM AllocatableScalars
  IMPLICIT NONE
  
  TYPE :: TypeOne
    INTEGER :: int1
  END TYPE TypeOne
  
  TYPE :: TypeTwo
    INTEGER :: int2
    CHARACTER(:), ALLOCATABLE :: str2
  END TYPE TypeTwo
  
  TYPE(TypeOne), ALLOCATABLE :: lhs1
  TYPE(TypeOne) :: rhs1
  
  TYPE(TypeTwo), ALLOCATABLE :: lhs2
  TYPE(TypeTwo) :: rhs2
  
  !****
  
  rhs1%int1 = 1
  lhs1 = rhs1               ! Ok.
  PRINT *, lhs1%int1
  
  rhs2%int2 = 2
  rhs2%str2 = 'Two'  lhs2 = rhs2               ! Explodes.
  PRINT *, lhs2%int2, lhs2%str2
END PROGRAM AllocatableScalars

>ifort /check:all /warn:all /standard-semantics /traceback "2013-03-04 AllocatableScalars.f90"&& "2013-03-04 AllocatableScalars.exe"
Intel(R) Visual Fortran Compiler XE for applications running on IA-32, Version 13.1.0.149 Build 20130118
Copyright (C) 1985-2013 Intel Corporation.  All rights reserved.
Microsoft (R) Incremental Linker Version 10.00.40219.01
Copyright (C) Microsoft Corporation.  All rights reserved.
"-out:2013-03-04 AllocatableScalars.exe"
-subsystem:console
-incremental:no
"2013-03-04 AllocatableScalars.obj" 1
forrtl: severe (408): fort: (7): Attempt to use pointer LHS2 when it is not associated with a target
Image              PC        Routine            Line        Source
2013-03-04 Alloca  00C18830  Unknown               Unknown  Unknown
2013-03-04 Alloca  00BE2736  Unknown               Unknown  Unknown
2013-03-04 Alloca  00BD4CF2  Unknown               Unknown  Unknown
2013-03-04 Alloca  00BD5463  Unknown               Unknown  Unknown
2013-03-04 Alloca  00BD1244  _MAIN__                    27  2013-03-04 AllocatableScalars.f90
2013-03-04 Alloca  00C197E3  Unknown               Unknown  Unknown
2013-03-04 Alloca  00C04B24  Unknown               Unknown  Unknown
kernel32.dll       76F2D2E9  Unknown               Unknown  Unknown
ntdll.dll          771C1603  Unknown               Unknown  Unknown
ntdll.dll          771C15D6  Unknown               Unknown  Unknown

This feels a little familiar - so apologies if it is a repeat report.

Problem with intell parallel studio installation

$
0
0

To whom may be concern

I already installed intell parallel2011XE(12) and integrated with vs 2010 ultimate version.unfortunatly Visual fortran didn't install(I think the error is in pre-requisities).at the begin of installation I see a warning that I upload its image here.thank so much.

AttachmentSize
Downloaduntitled.jpg219.2 KB

error #6416: This COMMON scalar or array is invalid in this context.

$
0
0

i am trying to modify a very complex existing code. but I am getting this error. I am updating this to use dynamic memory allocation. I can not share the whole code. but I am attaching a dummy code made  in the same way as the things are being done origianally. during building process, I am getting the error #6416.

Operating syste: Win 7 (enterprise edition)

Interface: Visual Studio 2010

Compiler: Intel(R) Visual Fortran Composer XE 2011 Update 8

 Intel Form.zip contains the complete project. 

Any help in this topic will be highly appreciated. 

Thank you very much in advance.

Regards,
Vinod 

problem with parallel studio

$
0
0

Hi,I 've installed intell parallel2011 and integrate it with vs2010,unfortunatly fortran did not installed,(when I OPEN THE VS WINDOWS THERE ISNT ANY FORTRAN PROJECT)after installation I modify it to see if all of component are installed or not,I see this message,can you help me with this?thank so much(I have installed visual studio2008 and 2010 on my pc).I upload an image that shows the error.

AttachmentSize
Download5.jpg330.86 KB

Stack overflow when calling a subroutine

$
0
0

I got error message below when calling a subroutine

CALL COMPPR(MODEL,NUMEL,NUMNOD,MAP,AREA,C3,INDPER)

forrtl: severe (170): Program Exception - stack overflow

The subroutine is below

MODULE Interface_COMPPR

    INTERFACE

        SUBROUTINECOMPPR(MODEL,NE,NQ,NodeIndex,AREA,C,INDPER)

            IMPLICIT NONE

            !input variables

            INTEGERNE,NQ

            CHARACTER*1 MODEL

            INTEGER, POINTER:: NodeIndex(:,:)

            INTEGER, POINTER:: INDPER(:)

            REAL, POINTER:: AREA(:)

            !output variables

            REAL, POINTER:: C(:,:)

        END SUBROUTINE

    END INTERFACE

END MODULE

This issue is occured only when using x64 compiler. No error message when using win32 compiler.

Could you provide any clue on this issue? Thanks!


Severe (157) Program Exception - Access Violation on an integer

$
0
0

I am a bit perplexed that I am getting an error for something that has so often worked for me in the past.  In a subroutine that I have written, I have an integer that when a value is specified, it creates the error mentioned in the subject heading.  I declare "implicit none" in both the parent program and the subroutine, and declare the variable (in this case KOUNT, I have also tried using K) an integer. The program compiles normally and runs until the PAUSE right before KOUNT=1.  Then I get the error, without KOUNT being printed.  I have experimented with different names for KOUNT.  Also, KOUNT is an index for the arrays RESAVG and ERRAVG, although KOUNT is not expected to reach 100001.  I have experiemented with smaller sizes of RESAVG and ERRAVG, and the program still has the error.  Initially, I had KOUNT=0, and thought that may be the problem, even though I have written other programs that successfully ran where that worked without issue.  Thoughts?

      SUBROUTINE CG(NXY,DXY,PHI,RESAVG,ERRAVG,KOUNT)
      
      IMPLICIT NONE
      
      INTEGER I,J,K,NXY,NODES,KOUNT

      DOUBLE PRECISION RESAVG(100001),ERRAVG(100001)

...

      RESA=1.0
      CTOL=1.0E-8
      PRINT *, RESA
      PRINT *, CTOL
      PAUSE
c     Establishes the convergence tolerance for the matrix

      KOUNT=1
      PRINT *, KOUNT
      PAUSE

Unlimited polymorphic variables

$
0
0

Good evening,

I have a problem using polymorphic variables and I appreciate any help I can get from you. The problem is that when I allocate a type to a polymorphic varibale, this variable does not recognize the properties of that type. Please have a look at the simple example I made.

Consider an object shape with two childs named rec and circ. Another object which is named usedshape has a polymorphic variable of class (shape). Now for different occasions,  I want to assign, rect or circ to useshape%shape and I expect that useshape%shape has the properties (and functionalities) of circ or rect whichever is assigned. However, it does not work for me. I also tried defining the polymorphic variable by class (*) which should be able to assign any type to it, but it does not work

Any comments on this problem is appreciate. If this is impossible, how can I get around this problem?

Thank you very much for your time

* I am using Intel fortran 2013 (Compiling with Intel(R) Visual Fortran Compiler XE 12.0.0.104 [IA-32])

AttachmentSize
Downloadsource1.f901.97 KB

Thread-local Heap Allocation

$
0
0

Hi,

I have a subroutine that uses OpenMP and has a couple of arrays that need to be allocated for each thread, as in

subroutine sub
  real, allocatable :: a(:)
  ! Single-threaded code.
  !$OMP PARALLEL PRIVATE(a)
  allocate(a(size))
  ! Multi-threaded code.
  deallocate(a)
  !$OMP END PARALLEL
  ! More single-threaded code.
end subroutine sub

I'm pretty sure the intrinic ALLOCATE just uses the global heap, so I thinking about using the thread-local heap allocator kmp_malloc (and therefore kmp_free for deallocation). Would that be expected to perform better than the intrinsic?

The other issue then, though, is how to use the pointer returned by kmp_malloc. There's C_F_POINTER, but that expects a POINTER-declared variable, rather than an ALLOCATABLE one. Can I roll my own version of C_F_POINTER that takes an allocatable array, calls kmp_malloc and constructs the array descriptor? That is, is the array descriptor for an allocatable variable the same as for a pointer variable? Obviously, that will be non-portable, but that's okay - I only use the Intel compiler, and can easily change the code if the array descriptor layout is changed in a future verion. Something along the lines of:

interface
     subroutine thread_allocate ( ptr, size )
       !DEC$ ATTRIBUTES DEFAULT, ALIAS: 'thread_allocate_impl' :: thread_allocate
       use, intrinsic :: iso_c_binding, only: C_SIZE_T
       implicit none
       integer, allocatable, intent(inout) :: ptr(:)
       integer(kind=C_SIZE_T), value, intent(in) :: size
       !DEC$ ATTRIBUTES NO_ARG_CHECK :: ptr
     end subroutine thread_allocate_scalar
end interface

subroutine thread_allocate_impl ( descriptor, size )
     type(array_descriptor), intent(inout) :: descriptor
     integer(kind=C_SIZE_T), value, intent(in) :: size
     ! Construct descriptor.
end subroutine

Thanks,

Ben

How do I buy an older version of Intel Visual Fortran Compiler

$
0
0

Hi,

I would like to buy a compiler, which is compatible with Microsoft Visual Studio 2008 and I have found that the 2011 version is okay for this.
At the begginning of January 2013, I downloaded Intel Parallel Studio 2011 for a 30-days evaluation. I would like to know if it is possible to purchase this software and how much will it costs to have one license ?
Also, in my department, we used to have Intel® Visual Fortran Compiler Professional Edition for Windows 2010. This license expired on April 2011. Is it possible to extend this product in order to download the 2011 upgrade version ?
Which solution is the cheaper ? What do you recommend ?

Thanks a lot for your help

Need help to debug Fortran *.DLL source

$
0
0

The current project I'm working on consists of a main Fortran project (call it ProjA) that when compiles generates a *.DLL that is called from a main C++ project (call it ProjD) *.EXE.

This Fortran project (call it ProjA) depends on the linking to two static *.LIB files, one of which is compiled in Fortran (call it ProjB) and the other which is compiled in C++ (call it ProjC). The two *.LIB files are included directly in main Fortran project.

The entire path to ProjD *.EXE and the *.EXE name are both provided in the ProjA solution (Configuration Properties -> Debugging -> Command).

When I go to Debug ProjA, breakpoints I've set in ProjA (which is set at the first assignment operator; VAR1=0 !nitialization) are unable to be reached (red dot icon turns transparent and there's a triangular '!' sign at the corner) and the execution of the program reaches a point in ProjA where an error flag is set (one that I coded in ProjA) and an error message window pops up (one that I coded in ProjA) and the program stops execution as intended.

I am unable to understand why I cannot go into the source within ProjA to see what is going on. No matter where I put the breakpoints none of them work. This is very frustrating. It is obvious that the source in ProjA is executing, otherwise the error message window in ProjA would not pop up. I need to be able to see why this error message is being generated with the input being passed to it from the C++ *.EXE and to do that I need to be able to walk through the source.

Does anyone have any suggestions or ideas as to what is wrong?

Win2012 Hyper-V

$
0
0

Does the following software run on Windows 2012 Hyper-v servers?

Intel IMSL
Intel Fortran Compiler
Intel Fortran Math Kernel Library (MKL)

 

Unhandled Exception - Access Violation with ifort 2013

$
0
0

Hi all,

Is there any significant behavioural changes between ifort 12 and 13?  I get an Unhandled Exception / Access Violation if I run an executable compiled with Intel Visual Fortran Composer XE 2013 Update 1 13.0.3600.11 and Visual Studio 2012.  This was not the case with Intel Visual Fortran Composer XE 2011 Update 12 12.1.3537.2010 and Visual Studio 2010.  I did not change any of the source code.  I am just trying to rebuild and test.  It's not allowed for me to share any of the source code, so it makes it difficult for me post any code.  However I did record a video (http://work.adancalderon.net:8888/intel/UnhandledException-AccessViolation.mp4) showing how the code crashes.

Thanks for reading,

Adan Calderón


Calling C++ from Fortran: Access Violations

$
0
0

I've been trying to port some CVF code to Intel Fortran and I ran into the same problem that was solved at: http://software.intel.com/en-us/forums/topic/279785

I attempted to implement the solution Steve posted, but I am getting accesss violation errors.

In my Interface I have:

MODULE SERVICE_INTERFACE
IMPLICIT NONE

INTERFACE

SUBROUTINE saveResult(ARGS)

!DEC$ ATTRIBUTES DLLIMPORT,STDCALL :: saveResult

!DEC$ ATTRIBUTES DECORATE, ALIAS:'saveResult' :: saveResult

!DEC$ ATTRIBUTES REFERENCE :: ARGS

END SUBROUTINE saveResult

END INTERFACE

END MODULE SERVICE_INTERFACE

And in my subroutine I have:
INTEGER(handle) :: P
INTEGER(C_INTPTR_T) :: q1

P = loadlibrary("Service.dll"C)
IF(P == 0) THEN !Error Processing

q1 = getprocaddress(P,"_saveResult@4"C)
if(q1 == 0)then !Error Processing

CALL C_F_PROCPOINTER(TRANSFER(q1,C_NULL_FUNPTR), saveResult)

CALL saveResult(ARGS)

I don't have the option to recompile the C++, but that's not the issue because this worked in CVF. How can I make the call work? Also, does anyone have any suggestion on how I can replace the ATTRIBUTES in the interfaces with the BIND() function? I can't make the linker work using BIND().

Fortran code executes from the command line, fails in MSVS2005

$
0
0

My Fortran codes that worked perfectly well in CVF were experiencing several unexpected errors in IVF10.0.24 with MSVS2005. One such error was the body of the do-loop "do i=j,n" executing even when j>n causing array elements greater than n being accessed in the body of the loop. Another error was several LNK2019 errors. Based on several helpful suggestions by Steve Lionel and others, I tried to reproduce the error with a simple code but could not. So as a test, I compiled and linked the same source files from the command line using a batch file. The only compiler option used was /nologo. To my surprise, the codes work just fine from the command line with no errors. The same codes do not even compile with Visual Studio. For AspenPlus chemical engineering software, which is built with IVF, again there seems to be no problem from the command line. Is this a known problem that can be resolved? Clearly I have now isolated it to the VS environment and not Intel Fortran itself. The compiler options in MSVS are /nologo /Od /iface:cvf /module:"Debug\\" /object:"Debug\\" /traceback /check:bounds /libs:static /threads /dbglibs /c From the command line, all I am doing (simplified example) is ifort /c /nologo myfile1.f ifort /c /nologo myfile2.f ifort -o myprog.exe *.obj I will add that all my source files do not use any advanced features beyond Fortran 90. Thanks in advance for your help.

Buying Microsoft visual studio and Intel Fortran Compiler with academic licenses

$
0
0

Hi,

I have the plan to install Microsoft Visual Studio and Intel Fortran Compiler for running subroutines on Abaqus software. I will use the newest Abaqus 6.12-3 version.

Please could anybody let me know which compatible versions of Microsoft Visual Studio and Intel Fortran Compiler I can buy? It is very good if the versions are latest versions.

If possible, please provide me the price information of the academic license.

Thanks for your help.

Linking Fortran dll built with vs2010 to c++ built using vs2012

$
0
0

Is it possible to build link and run  a Fortran dll built using Visual Fortran Compiler XE 13.0.1.119 [Intel(R) 64] in Visual Studio 2010 to a c++ program built using visual studio 2012.

Do I need to rebuild the dll using visual studio 2012 ?

Visual Basic callinf Fortran DLL - Unable to load DLL on Win7

$
0
0

I am getting the message "Unable to load DLL" when trying to run a program I built with a Visual Basic Gui calling a Fortran DLL.

I built the program using VS2008 on a XP64 machine, where it works fine in Release mode.

Using VS2008, I have built several applications with VB GUI's calling Fortran DLL's that work fine on Win7.

The new program I'm working on runs fine on my XP64 machine in release mode, but on a Win7 machine I get the "Unable to load DLL" message.

I can make this message appear on my XP64 machine if I set the Fortran/Libraries setting to "Multithreaded DLL" instead of "Multithreaded".

I've compared a successfull solution's project settings with this one, but can't find a difference.

I've also run the VS2008 redritributable on the Win7 machine to no avail.

Any suggestions?

Mike K

Viewing all 5691 articles
Browse latest View live


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