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

Building VFPROJ in command shell

$
0
0

I just moved my mixed language (VC++ and Intel FORTRAN) Finite Element application project to VS 2015/Intel Composer XE 2017.

I have a couple of build scripts to build the projects using COMMAND shell in which I am using DevEnv.exe to build the FORTRAN libraries. DevEnv.exe has stopped recognizing configuration “Release|Win32”. 

 

To clarify I have initialized the command shell with the following command.

 

"C:\DevTools\Intel\compilers_and_libraries_2017.5.267\windows\Bin\IFortVars.bat" -arch ia32 vs2015

 

And trying to build a FORTRAN project using the command. Note there is no sln file in the folder containing the reference to the vfproj file. 

 

devenv /Build "Release|Win32" ..\OSOEM\LoadGen\LoadGen_lib.vfproj

 

The above command now produces error message “The operation could not be completed. The parameter is incorrect.” However, if I replace “Release|Win32” with “Release|x86”, the project builds fine. This used to work with VS 2013 and Intel Composer XE 2015 without any issue.

 

Can someone explain what is the reason for this behavior? The VFPROJ file is attached.

 

Thanks.

AttachmentSize
Downloadapplication/octet-streamLoadGen_lib.vfproj4.38 KB

Help to speed up code

$
0
0

Hello everyone,

I am running an algorithm that is taking about 40 seconds per iteration with Intel Fortran -- a bit slower than the same algorithm (quite efficiently) implemented in Matlab 2017. I am surprised that running times are even comparable (let alone that Fortran is slower), and I think I know at what point the lack of performance with Fortran is coming from. Basically, I think that Matlab is much more efficient in computing the maximum value and location of large arrays.

Here is what I have in Fortran (simplifying):

integer ind(60,2000)
real*8 A(2000,2000), B(60,2000)

do k = 1, 60

        ! max location across columns
	ind(k,:) = maxloc(A,DIM = 2)
        ! maximum value
        do j = 1, 2000
        	B(k,j) = A(k,ind(k,j))
        end do

end do

This portion of code is inside another loop, so I have to go over it dozens of times.

Questions: is there a more efficient way of computing the maximum value (with index location) of an array other than using maxloc? Perhaps from some library? (I checked MKL and did not find anaything)

Note that in Matlab, you get the location and maximum value with just one command, whereas here I am getting the location first, and then I need to go over a loop to get the maximum values....

Many thanks!

Rafael

Combine Intel Fortran 2017 with Microsoft Visual Studio 11

$
0
0

Dear list-members,

we use Intel Fortran 2017 on windows 10. The Fortran-code calls C-functions which were compiled with "Visual Studio 12".

We set the environment by calling "c:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.4.210\windows\bin\ipsxe-comp-vars.bat"

After additionally installing "Visual Studio 14" on the machine, the batch "ipsxe-comp-vars.bat" sets the environment for "Visual Studio 14" automatically.

We'd like to be able to control the used "Visual Studio"-Version: "ipsxe-comp-vars.bat" shall set up for "Visual Studio 12"

We are using Batch- and Makefiles only - no IDE.

Any advice?

Benedikt

crazy problems with a lot of LNK2001 errors (external symbol not resolved)

$
0
0

Hi to everybody and thank in advance for your help!

I'm trying to compile a Fortran program with a 64-bit compiler. First, The program is written and 32-bit compiled with Compaq Visual Fortran and it is made by a lot of files and some home made static libraries. I have installed Visual Studio 2017 and Intel Parallel Studio XE 2018 with the necessary Fortran part. Now, after a lot of unsuccessful test, I'm in the situation when I haven't home made libraries because all files have been inserted into the project. The problem is the presence of a lot of LNK2001 errors about external symbols: some times are related to symbols inside .obj files related to the fortran files, other times to libraries like: libifcoremt.lib, libifport.lib, libirc.lib, libmmt.lib, mkl_core.lib, mkl_sequential.lib, libcmtd.lib. For the reported libraries, I have tryed to link them without changes and now I have added them directly into the project.

This is my config about the Fortran section inside the project properties:

/nologo /O2 /module:"x64\Debug\\" /object:"x64\Debug\\" /Fd"x64\Debug\vc150.pdb" /check:bounds /libs:static /threads /dbglibs /Qmkl:sequential /c

This is my config about the Linker section inside the project properties:

/OUT:"x64\Debug\EFIE_3D.exe" /INCREMENTAL:NO /NOLOGO /MANIFEST /MANIFESTFILE:"x64\Debug\EFIE_3D.exe.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG /PDB:"C:\Users\ING01\source\repos\EFIE_3D\EFIE_3D\x64\Debug\EFIE_3D.pdb" /SUBSYSTEM:WINDOWS /ENTRY:"EFIE_3D_main"

I'm becoming crazy because I have tryed a lot of combination without succes and my activity is blocked!

connecting fortran LU's to parallel process stdin/stdout

$
0
0

 

 

 

I am looking for a way for my intel Fortran application to start a process (python) to run in parallel with the Fortran process such that a Fortran logical unit connects (writes) to the stdin of the python process and another logical unit in Fortran connects (reads) from stdout of the python process.   The python process happens to be associated with a commercial tool (post-processor).   The two processes run in parallel exchanging data over time. 

We would like to use the process on Windows (7) and Linux as common as possible.  Any help would be much appreciated.

Fortran 2017 Redistributable on Windows Server 2003

$
0
0

I use Fortran 2017 Update 4 on VS 2017 and want to know if the Fortran 2017 Update 4 redistributable is supported on Windows Server 2003.

The download page for this version of redistro routes me to Intel® Parallel Studio XE 2017 Composer Edition C++ Release Notes which seems to talk about OS requirement for Parallel Studio itself and not the runtime itself.

Can someone please confirm on the exact OS requirement for redistro for Fortran 2017.

(I have verified that VC++ runtime 14.x/2017 is already supported on Windows Server 2003 from https://www.visualstudio.com/en-us/productinfo/vs2017-system-requirements-vs#microsoft-visual-c-redistributable-for-visual-studio-2017)

Can no longer see Fortran files after upgrade to 2017 update 5

$
0
0

I am using VS 2015 on a solution with C#, C++ and Fortran projects. Today I just upgraded to Parallel Studio XE 2017 Update 5 from Update 4. When I open a Fortran or C++ file it shows as blank in the VS editor. The C# files look OK. I have checked the files with a text editor and they still contain my code. If I compile a Fortran project it seems to compile correctly. It is very difficult to work with code I cant see! Any suggestions for fixing this problem?

18.0.1 Regression: Unresolved symbols with submodules


How to use SCALAPACK through MKL?

$
0
0

Hello,

I have recently started to use parallel studio xe 2018, and checked installing MKL and MPI library during my installation procedure. 

I am still not sure, but I hope that MKL provides SCALAPACK. However, when I call the subroutine DLASRT2, link error of unresolved external symobl occurred.

I need some helps how to utilize the SCALAPACK in the intel fortran environment through the MKL.

Any comments or helps are welcome.

Thanks.

 

 

Summation using XE 15

$
0
0

I am working on a legacy code. It is currently build using Intel Fortran 9.1. I was comparing the results using Intel Fortran XE 15 and was getting wrong results.

Part of the code which is causing the issue is pasted below:

        DO 1030 IM=1,NMOD
        AVG=0.0
        DO 1010 IT=1,NTIM
 1010   AVG=AVG+GFB(IM)
        ATIM=NTIM
        AVG=AVG/ATIM
        DO 1020 IT=1,NTIM
 1020   GNF(IM)=GNF(IM)+GFB(IM)-AVG
 1030   CONTINUE

As you can see from the code That values within GNF should not really change. But with the XE 15 they do.

Here NMOD is 10;

The values of GNF and GFB before executing this part of code are:

       9.1                                    XE 15    
IM       GNF               GFB           IM       GNF                GFB
1    -78411.73        -174.7768         1    -78411.74        -174.7768
2    -102429.1         859.1968         2    -102429.1     859.1973
3    4962.622         -29.82203         3    4962.624     -29.82202
4    116233.5          137.9382         4    116233.4      137.9379
5    64995.39          1337.103         5    64995.35      1337.104
6    -17947.88        -201.2107         6    -17947.88     -201.2108
7    -1605.297         8110.017         7    -1605.297     8110.014
8    -315.4255         3924.545         8    -315.4255     3924.543
9    59.31363          1423.356         9    59.31358      1423.356
10    704.9843       -2943.285         10    704.9835    -2943.287

While the values of GNF and GFB after executing this part of code are:

       9.1                                    XE 15    
IM       GNF               GFB           IM       GNF                GFB
1     -78411.79      -174.7768         1      -78411.74    -174.7768
2     -102428.9      859.1968          2      -102541.6    859.1973
3     4962.622      -29.82203          3       4959.108    -29.82202
4     116233.5      137.9382           4       116233.4    137.9379
5     64995.39      1337.103           5       65178.16    1337.104
6     -17947.88      -201.2107         6     -17968.97    -201.2108
7     -1605.297      8110.017          7      -1556.078    8110.014
8     -315.4255      3924.545          8      -906.0505    3924.543
9     59.31363      1423.356           9        101.9405    1423.356
10    704.9843     -2943.285         10     755.0811    -2943.287

 

Also, value of AVG after 1010 should be 3600*GFB (since NTIM is 3600). But in XE 15 I am getting a bit different value.

Below are the values of AVG:

       9.1                                    XE 15    
IM       GFB               AVG           IM       GFB                AVG
1     -174.7768      -629196.4         1    -174.7768    -629189.2
2     859.1968      3093108            2    859.1973    3093228
3     -29.82203      -107359.3         3    -29.82202    -107355.2
4     137.9382      496577.4           4    137.9379    496575
5     1337.103      4813571            5    1337.104    4813386
6     -201.2107      -724358.4         6    -201.2108    -724341.1
7     8110.017      2.92E+07          7    8110.014    2.92E+07
8     3924.545      1.41E+07          8    3924.543    1.41E+07
9     1423.356       5124080          9    1423.356    5124038
10   -2943.285    -1.06E+07         10    -2943.287    -1.06E+07

Can anybody help me figure out what might be causing this? Thanks.

Problem to run a console application

$
0
0

I have a console application created with VS2013/IVF2013 XE under Windows 7. It works OK when  running on my desk computer on which it has been developed.  However, when I try to run it on my  other computers (also Win 7) it will not work.   An message box pops up telling me " The application was unable to start correctly (0xc000007b) Click OK to close the application" To illustrate the problem  a listing of the program that cause the problem is shown below.. This computer is also running Windows 7.

Can anybody give me a clue ?

  program TVSimulation
   
    USE IFPORT
    implicit none

    ! Variables
    INTEGER IDUM,ISTAT,i,IUNI
    IUNI=401
       I = SYSTEM("COLOR F1")

!    open(file='user', unit=IUNI)
    open(file='user', unit=IUNI,carriagecontrol='FORTRAN')  
     print *, ''
    print *, '************  START TVSim Release 5.12 ************'

!  Start calculation process here..................
 !   call TVSim_512(1,ISTAT)

    print *, 'PRESS RETURN TO EXIT AND CLOSE THE WINDOW'
    READ(*,*)
   
    end program TVSimulation

end program TVSimulation

Too many parameters in subroutine

$
0
0

Is there a way around the following error 6319 "The number of arguments in the parenthesized list is incorrect." when there are too many parameters?

Memory dealocation is not performed in OMP parallel block

$
0
0

Hello everyone,

I have a strange problem with memory allocation/deallocation within OMP parallel block. Bellow there is a very basic program where I just perform allocation, initialization and deallocation of 2-dimensional array.

program test
implicit none
include 'omp_lib.h'
complex*16, allocatable, dimension(:,:) :: A
integer N

!N=2901
N=2902

!$OMP PARALLEL PRIVATE(A) SHARED(N)

allocate( A( 1:N, 1:N ) )
A = 0
deallocate( A )

!$OMP END PARALLEL
end

The code is compiled with Intel(R) Visual Fortran Compiler 17.0.4.210 [Intel(R) 64] in Visual Studio 2015 environment. The code is statically linked to run-time libraries (/libs:static /threads) and processing of OpenMP directives is enabled (/Qopenmp). I run the program in debug mode and monitor Private Working Set parameter in Task Manager.

When compile the program with N=2901, private working set shows that memory allocated within parallel block is not deallocated at the end of the program. When N=2902 the problem is gone. Also the problem cannot be observed when dynamically linking to run-time libraries.

I've tried this code on Intel(R) Visual Fortran Compiler XE 15.0.6.285 [Intel(R) 64] and everything is fine there.

I wonder if this behavior expected?

Visual Fortran Comp XE 2011 - no longer required

$
0
0

I have this software on DVD, which I purchased back in 2012. Now no longer required, but as it may be of value to someone who would be happy with older software version, I would like to pass it on, once I have removed all copies from my lap / desk top pcs.  Can I just give it away, so that new owner can just install it and off they go? Or are there complications given that I have registered it, I have both activation and unlock codes.  Or will I need to pass on a copy of the .lic  file with the disk?  Thanks in advance !

Rafal

Upgrade current license work with older installed versions?

$
0
0

We’d like to install a new license server (for Compiler for Windows) and test to make sure we can get our product to compile under the new and old compiler using the new licensing server before switching our systems over to minimize productivity impacts. 

It’s unclear if upgrading the current licensing server will allow the currently installed versions to operate.  Would this work?


Erroneous run-time behavior with an ELEMENTAL function whose result characteristics make use of a specification expression

$
0
0

Here's a summary of an incident submitted at the Intel Online Service Center in case any readers of this forum are interested: consider the following code that involves a function with the ELEMENTAL attribute and whose result characteristics make use of a specification expression:

module m

   implicit none

contains

   elemental function elemf( n, s ) result( new_s )

      ! Argument list
      integer, intent(in)         :: n
      character(len=*),intent(in) :: s
      ! Function result
      character(len=n*len(s)) :: new_s

      new_s = repeat( string=s, ncopies=n )

      return

   end function elemf

end module m

Now consider a program that invokes the above function, in one case making use of the ELEMENTAL attribute but not with the other. 

program p

   use, intrinsic :: iso_fortran_env, only : compiler_version
   use string_m, only : string_t
   use m, only : elemf

   implicit none

   integer, allocatable :: n(:)
   character(len=2), allocatable :: s(:)

   print *, "Compiler Version: ", compiler_version()

   n = [ 2, 3 ]
   s = [ "??", "!@" ]

   blk1: block
      type(string_t), allocatable :: x(:)
      allocate( x(size(n)) )
      x = elemf( n, s )
      print *, "block 1:"
      print *, "len(x) = ", len( x(1)%s() ), "; expected = ", n(1)*len(s(1))
   end block blk1

   blk2: block
      type(string_t), allocatable :: x(:)
      integer :: i
      allocate( x(size(n)) )
      do i = 1, size(n)
         x(i) = elemf( n(i), s(i) )
      end do
      print *, "block 2:"
      print *, "len(x) = ", len( x(1)%s() ), "; expected = ", n(1)*len(s(1))
      print *, "x = ", x
   end block blk2

   stop

end program p

Note the above makes use of a 'string' utility 'class' as follows:

module string_m

   implicit none

   private

   type, public :: string_t
      private
      character(len=:), allocatable :: m_s
   contains
      private
      procedure, pass(this) :: assign_s
      procedure, pass(this) :: write_s
      procedure, pass(this), public :: s => get_s
      generic, public :: assignment(=) => assign_s
      generic, public :: write(formatted) => write_s
   end type string_t

contains

   elemental subroutine assign_s( this, rhs )

      class(string_t), intent(inout) :: this
      character(len=*), intent(in)   :: rhs

      this%m_s = rhs

      return

   end subroutine assign_s

   subroutine write_s(this, lun, iotype, vlist, istat, imsg)

      ! argument definitions
      class(string_t), intent(in)     :: this
      integer, intent(in)             :: lun
      character(len=*), intent(in)    :: iotype
      integer, intent(in)             :: vlist(:)
      integer, intent(out)            :: istat
      character(len=*), intent(inout) :: imsg

      ! local variable
      character(len=9) :: sfmt

      sfmt = "(A)"
      if ( (iotype == "DT").and.(size(vlist) >= 1) ) then

         ! vlist(1) to be used as the field width of the character component.
         write(sfmt,"(A,I2,A)", iostat=istat, iomsg=imsg ) "(A", vlist(1), ")"
         if (istat /= 0) return

      end if

      write(lun, fmt=sfmt, iostat=istat, iomsg=imsg) this%m_s

      return

   end subroutine write_s

   elemental function get_s( this ) result( s )

      class(string_t), intent(in) :: this
      ! Function result
      character(len=len(this%m_s)) :: s

      s = this%m_s

   end function get_s

end module string_m

Upon execution of output built using Intel Fortran,

 Compiler Version:
 Intel(R) Visual Fortran Intel(R) 64 Compiler for applications running on Intel(
 R) 64, Version 18.0.1.156 Build 20171018

 block 1:
 len(x) =  5544984 ; expected =  4
 block 2:
 len(x) =  4 ; expected =  4
 x = ????!@!@!@

Note the " len(x) = 4496920 ; expected = 4" output from block 1 above.

It's erroneous and output varies from run to run.

Forrtl: Error (8) and (152)

$
0
0

Dear all

I tried to find the answer in internet but no success.

I am coupling Abaqus and Intel Fortran (attaching a code to Abaqus for building a customized model) to do an finite element analysis, but in 2 steps. Step 1 is finished without problem. Now I want to continue the analysis using the previous results as the initial conditions. And I get the errors attached. I must say I am not an expert when it comes to programming, so please consider that for your explanations. Thanks

Forrtl: error (8) $ (152)

Bug report for ifort 17.0: elemental function result

MATMUL causing stack overflow

$
0
0

I noticed that for large matrices, MATMUL is crashing with a stack overflow.  I can fix this with /heap-arrays0.   The program does not crash when calling dgemm from MKL.  I ran some tests, and the results from MATMUL and dgemm are identical.  However MATMUL needs a large stack, and dgemm doesn't.   Is this the correct behavior, or is there a bug somewhere?

Roman

 

DLL can't see main program's shared variables

$
0
0

Hi All,

I want to learn how to make a DLL share variables in a module USEd by both the DLL and its calling main program. From examples I can find I have put together a very small test program which unfortunately does not work. Here are the mainline, the DLL, and the module:

program DLLtester

use SharedVariables
use ifwin

implicit none

integer*4         hlb,iret
pointer           (cpaddr,calcpi)
character*1       ch

hlb = loadlibrary('..\..\CalcPi\Debug\calcpi.dll'//char(0))
if(hlb==0)then
   type *,"Can't find CalcPi.DLL"
   accept *, ch
   call exit
end if

cpaddr = getprocaddress(hlb,"CALCPI"C)
if(cpaddr==0)then
   type *,"Can't locate CalcPi in CalcPi.DLL"
   accept *, ch
   iret = freelibrary(hlb)
   call exit
end if

numerator = 355.0
denominator = 113.0

call CalcPi
iret = freelibrary(hlb)

type *, pi
accept *, ch

end program DLLtester

 

 

subroutine CalcPi

! Expose subroutine CalcPi to users of this DLL
!
!DEC$ ATTRIBUTES DLLEXPORT, ALIAS:"CALCPI" :: CALCPI

use SharedVariables

implicit none

pi = numerator/denominator
return

end subroutine CalcPi

 

 

module SharedVariables

implicit none

real*8  ::           numerator
!DEC$ ATTRIBUTES DLLEXPORT :: NUMERATOR

real*8  ::           denominator
!DEC$ ATTRIBUTES DLLEXPORT :: DENOMINATOR

real*8  ::           pi
!DEC$ ATTRIBUTES DLLEXPORT :: PI

end module

 

What do I need to do to make this work?

With many thanks in advance

Mike

Viewing all 5691 articles
Browse latest View live


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