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

Select intel fortran comiler version in visual studio

$
0
0

Hi,

 

I have a big visual studio solution containing c++ and fortran projects. The solution is built using devenv from the command line.

I have several fortran compilers installed (2013 and 2015). How can I select which compiler to use at build time, from the command line?

I am aware of the option from Tool-Options-Intel compilers and tools, but I have found no way to do this from the command line.

 

Thanks,

Jens


variable rank of dummy argument

$
0
0

hope the title describes the problem at hand:

a code like the following compiles fine, but when i debug i cannot step into the subroutine (though it gives right results).i

program main
real(8), dimension(3) :: f
integer :: ni,nj

ni=1
nj=1
call sbrtn(ni,nj,f)

endprogram main

subroutine sbrtn(nni,nnj,ff)
integer, intent(in) :: nni,nnj
real(8), dimension(3,nni,nnj), intent(out) ff

ff=1.0d0 
endsubroutine sbrtn

is it correct to pass a rank 1 array to the subroutine which instead expects a rank 3 array? This could be in theory pushed to the point where i could pass a scalar instead of an array. thanks

 

Error #10052 Could not checkout FLEXlm license - Visual Studio 2013 inside VM

$
0
0

Hi,

I'm experiencing a problem where my license file is not working correctly.

I'm attempting to compile a fortran project inside visual studio 2013, running on a Windows 7 Enterprise virtual machine.

I've got the same license setup on my physical windows machine, also Windows 7 Enterprise, Visual Studio 2013, and I'm able to compile, without getting the Error #10052.

They both use the same exact license file which points to a license server.

Any ideas why this might happen in the VM but not on my physical OS?

Kind regards,

James

 

Run-time errors after upgrading to new compiler versions

$
0
0

We have a code that was being built using version 12.1 and VS 2010. After upgrading to version 15.0 compiler (update 6) and VS 2013, we have been experiencing strange runtime errors in code locations that was running fine before. The failure has always been in Release mode (Debug mode does not have these errors). Also the error is due to a intent IN integer being modified. This argument is used to access an array component of a derived type. The subroutine being called is in a FORTRAN DLL and the subroutine is being called from a FORTRAN compiled executable (VC++ code is not involved). Also the bug goes away sometimes when a print statement is added at certain location in the subroutine but then fails (access violation) at some other subroutine due to a intent IN double precision being read.

Unfortunately I have not been able to reproduce this behavior in a simple test case. Any hints to diagnose what the issue is will be helpful. The errors happen both with /O1 and /O2 optimization flags.

Free Fortran Modernisation Workshop - STFC in UK

$
0
0

Hello all,

I will be running the Fortran Modernisation Workshop in the UK at Daresbury which is completely free to attend for commercial, research and academic attendees. This is a two day computational science-centric practical hands on workshop is aimed at Fortran programmers who want to write modern and efficient code, or modernise existing codes, to make it more readable and maintainable by encouraging good software engineering practices. The workshop will cover tools and libraries that are commonly used in computational science and engineering. Click on the link below for further details and registration:

27-28/OCT - https://eventbooking.stfc.ac.uk/news-events/fortran-modernisation-workshop

I can be contacted at wadud.miah@nag.co.uk for further information.

Best regards,

Wadud.

Initialize Types

$
0
0
 Type aBeam

        INTEGER             id
        integer             nodes(2)
        integer             restraint(2)        ! 0 - not restrained 7 000111 56 111000 63 111111
        integer             nodetype(2,6)
        integer :: flag   = 0
        REAL (KIND=dp)      x(2), y(2), z(2)
        REAL (KIND=dp)      mass(2)
        REAL (KIND=dp)      H(2)
        REAL (KIND=dp)      nu
        REAL (KIND=dp)      em
        REAL (KIND=dp)      x21
        REAL (KIND=dp)      area2
        REAL (KIND=dp)      esm(12,12)
        Real (KIND=dp)      Iz
        Real (KIND=dp)      Iy
        Real (KIND=dp)      G
        Real (KIND=dp)      Ix
        REAL (KIND=dp)      Area
        REAL (KIND=dp)      E
        REAL (KIND=dp)      Beta1
        REAL (KIND=dp)      Beta2
        REAL (KIND=dp)      length
        REAL (KIND=dp)      gamma

    end type

If I create an array of abeam, and I set length here to zero does it initialize that way -

Wandering error

$
0
0

At compilation the following test program compiler shows error:

test.f90(45): error #5082: Syntax error, found ')' when expecting one of: <REAL_KIND_CON> <REAL_CONSTANT> <DBLPRC_CONSTANT> <DBLPRC_KIND_CON> <QUAPRC_CONSTANT> ...

program tst
implicit none
complex(16) zs, mg

zs = (1.0q0, 2.0q0)
mg = zs*( 1.000000000000000000000000000000000e000_kp + zs*( 5.772156649015328606065120900824024e-01_kp + &
     zs*(-6.558780715202538810770195151453905e-01_kp + zs*(-4.200263503409523552900393487542982e-02_kp + &
     zs*( 1.665386113822914895017007951021052e-01_kp + zs*(-4.219773455554433674820830128918739e-02_kp + &
     zs*(-9.621971527876973562114921672348199e-03_kp + zs*( 7.218943246663099542395010340446573e-03_kp + &
     zs*(-1.165167591859065112113971084018389e-03_kp + zs*(-2.152416741149509728157299630536478e-04_kp + &

     zs*( 1.280502823881161861531986263281643e-04_kp + zs*(-2.013485478078823865568939142102182e-05_kp + &
     zs*(-1.250493482142670657345359473833092e-06_kp + zs*( 1.133027231981695882374129620330745e-06_kp + &
     zs*(-2.056338416977607103450154130020573e-07_kp + zs*( 6.116095104481415817862498682855343e-09_kp + &
     zs*( 5.002007644469222930055665048059991e-09_kp + zs*(-1.181274570487020144588126565436506e-09_kp + &
     zs*( 1.043426711691100510491540332312250e-10_kp + zs*( 7.782263439905071254049937311360777e-12_kp + &

     zs*(-3.696805618642205708187815878085766e-12_kp + zs*( 5.100370287454475979015481322863232e-13_kp + &
     zs*(-2.058326053566506783222429544855237e-14_kp + zs*(-5.348122539423017982370017318727940e-15_kp + &
     zs*( 1.226778628238260790158893846622422e-15_kp + zs*(-1.181259301697458769513764586842298e-16_kp + &
     zs*( 1.186692254751600332579777242928674e-18_kp + zs*( 1.412380655318031781555803947566709e-18_kp + &
     zs*(-2.298745684435370206592478580633699e-19_kp + zs*( 1.714406321927337433383963370267257e-20_kp + &

     zs*( 1.337351730493693114864781395122268e-22_kp + zs*(-2.054233551766672789325025351355734e-22_kp + &
     zs*( 2.736030048607999844831509904330982e-23_kp + zs*(-1.732356445910516639057428451564780e-24_kp + &
     zs*(-2.360619024499287287343450735427531e-26_kp + zs*( 1.864982941717294430718413161878667e-26_kp + &
     zs*(-2.218095624207197204399716913626860e-27_kp + zs*( 1.297781974947993668824414486330594e-28_kp + &
     zs*( 1.180697474966528406222745415509972e-30_kp + zs*(-1.124584349277088090293654674261440e-30_kp + &

     zs*( 1.277085175140866203990206677751125e-31_kp + zs*(-7.391451169615140823461289330108553e-33_kp + &
     zs*( 1.134750257554215760954165259469306e-35_kp + zs*( 4.639134641058722029944804907952228e-35_kp + &
     zs*(-5.347336818439198875077418196709893e-36_kp + zs*( 3.207995923613352622861237279082794e-37_kp + &
     zs*(-4.445829736550756882101590352124644e-39_kp + zs*(-1.311174518881988712901058494389922e-39_kp + &
     zs*( 1.647033352543813886818259327906394e-40_kp + zs*(-1.056233178503581218600561071538285e-41_kp + &

     zs*( 2.678442982643049478354963071890852e-43_kp + zs*( 2.424715494851782689673032938370921e-44_kp + &
     zs*(-3.736587834535612554034559121270316e-45_kp + zs*( 2.628332980940195449089037611873639e-46_kp + &
     zs*(-9.298175995376886299601668991518173e-48_kp + zs*(-2.327942418699470598604262055622292e-49_kp + &
     zs*( 6.169620835244387420354431773150548e-50_kp + zs*(-4.928295586770989930504458682212533e-51_kp + &
     zs*( 2.183513183414510697277828498691356e-52_kp + zs*(-1.218722189147516555250452605074758e-54_kp + &

     zs*(-7.117108841662874631945652733848302e-55_kp + zs*( 6.920504054328689253528422229066270e-56_kp + &
     zs*(-3.676438468356676327679748481822479e-57_kp + zs*( 8.563098056275654327981712454743157e-59_kp + &

     ))))) )))))  ))))) )))))  ))))) )))))  ))))) )))))  ))))) ))))) ))))) ))))) ))))
end program tst

 

pointing to 10th bracket in the penultimate line. In my big program it points to another bracket in the same line.

What's wrong?

Mixed programming with Fortran77 and C

$
0
0

Dear Steve,

I am making a project with C and F77 and the main program is written by F77. During build my code, I was trouble about errors as follows. There was no such error in my previous project written only by F77.

1>atemp.obj : error LNK2001: unresolved external symbol etime
1>banner.obj : error LNK2001: unresolved external symbol getdat
1>dyn4.obj : error LNK2001: unresolved external symbol gettim
1>Diglib.lib(gdhpdj.obj) : error LNK2001: unresolved external symbol tiffpak
 fatal error LNK1120: 4 unresolved externals

But I am sure about that subroutines etime, getdat and gettim are included in fortran77 library. 

Platform: 

Intel® Parallel Studio XE 2016 Update 2 Composer Edition for Fortran Windows* Integration for Microsoft Visual Studio* 2015, Version 16.0.0061.14


Can only run one MPI job on Windows

$
0
0

<p>I may not be in the right forum, so redirect if necessary.</p>

<p>My organization distributes a large Fortran program that uses MPI. We distribute the Intel MPI redistributable libs and we use the hydra service. Our users typically run MPI jobs directly from the command prompt, i.e.</p>

<p>mpiexec -n 3 ...</p>

<p>Many have commented that they can only run one MPI job at once. Is this just a result of not using HPC or more sophisticated scheduling system? Or are we missing something when we bundle up our download?</p>

Zone: 

Thread Topic: 

Question

Forum SPAM elimination suggestion

$
0
0

To whom it may concern:

As a long time forum user I am annoyed at the amount of SPAM being entered into this forum. In order to reduce the amount of SPAM I suggest the following changes to the forum:

1) Add to the user profile a flag that can only be modified by the site moderator. The purpose of the flag is to specify if a Captcha is to be required for making posts.

2) All new accounts are created with this flag set

3) All Captcha posts, in addition to being posted, are sent as activity notification to moderator (IOW moderator is "subscribed")

4) When moderator deems user is valid, the moderator can uncheck the Captcha flag in the users profile.

I see as the benefits to this method:

a) Reduction of work by the moderator. At least a reduction while spammers are flooding this site. After the spammers abandon their activity, then there would be increased work, but then there could be a global "no Captcha" flag.

b) No impact to long time users

c) Little impact to new users

Jim Dempsey

vs_isoshell.exe Error When I install the Intel Parallel Studio XE Composer Edition for Fortran...

$
0
0

vs_isoshell.exe Error When I install the Intel Parallel Studio XE Composer Edition for Fortran Windows - Named User Commercial and installing with a Serial Number on my Surface Pro 4 running Windows 10, I get the error message:

vs_isoshell.exe -2147205120 and the installation stops????

 

Code Coverage Features

$
0
0

I am using code coverage on several tests and when I run the tool certain blocks are highlighted as uncovered but those blocks correspond to debugging. Is there a way I can program or manipulate the tool to ignore certain blocks/if statements instead of picking them up?

Thanks in advance

display more than array 1000 elements in visual studio

$
0
0

In the visual studio debugger, is it possible to display more than array 1000 elements?

Zone: 

Distribute compiiled DLL without ifort redistributable libraries?

$
0
0

Hi,

I am building a fortran DLL that I need to deliver to others. I would like to not require that the person receiving it have the intel libraries. Is there a compiler option so that I can statically link the libraries? (libmmd.dll and libifcoremd.dll)

 

Thank you,

James

Scope of IMPLICIT NONE through a USE statement

$
0
0

If a parent module has an IMPLICIT NONE statement and this module is accessed through a USE statement in a descendant module without an IMPLICIT NONE statement, does the IMPLICIT NONE apply to descendant module? In my recent experience, the implicit none does not. As a result, some of my legacy code generates compilation errors or worse still, continues executing with unrealistic numbers. This seems to be irrespective of compiler settings. An example is included below. Any help would be greatly appreciated.

module parent

implicit none

integer(kind = 4) :: a, b

contains

subroutine psub()

a = 1

b = 2

! c = 3 ! generates compilation error since c is not declared

print *, 'a = ', a

print *, 'b = ', b

! print *, 'c = ', c ! generates compilation error since c is not declared

end subroutine psub

end module parent

module descendant

use parent

contains

subroutine dsub()

d = 4 ! does not generate compilation error even though d is not declared

call psub()

call tsub(i)

print *, 'd = ', d ! prints d as a single precision number 4.000000

read *

end subroutine dsub

subroutine tsub(i)

integer(kind = 4) :: i

print *, 'In tsub: i = ', i ! prints i = -858993460 since expected argument is mismatched in type

end subroutine tsub

end module descendant

program main

use descendant

call dsub()

end program main

 

Thread Topic: 

Question

Binary read/write

$
0
0

I am attempting to optimise a binary file read/write using an unformatted, direct access binary file.  The data set to be written/retreived is of size 22x7826x8086.  Current read times are of the order 50 minutes.  A comparative time using MATLAB fread function is 157 seconds.  Why is the MATLAB binary read/write function more efficient than Fortran?  Any suggestions very much appreciated.  Regards  Craig

Zone: 

Thread Topic: 

Help Me

Structure constructors for parameterized derived types in output item lists

$
0
0

I think this is legit, if perhaps a little silly.

program p
  implicit none

  type :: my_type(l)
    integer, len :: l
    real :: comp(l)
  end type my_type

  type(my_type(2)) :: x
  integer :: iolen

  ! ok
  x = my_type(2)([1.0, 2.0])
  print *, x
  inquire(iolength = iolen) x
  print *, iolen

  ! neither ok.
  print *, my_type(2)([1.0, 2.0])
  inquire(iolength = iolen) my_type(2)([1.0, 2.0])
  print *, iolen
end program p

 

>ifort /check:all /warn:all /standard-semantics /traceback "2016-07-01 len-param-constructor.f90"&& "2016-07-01 len-param-constructor.exe"
Intel(R) Visual Fortran Intel(R) 64 Compiler for applications running on Intel(R) 64, Version 16.0.3.207 Build 20160415
Copyright (C) 1985-2016 Intel Corporation.  All rights reserved.

Microsoft (R) Incremental Linker Version 14.00.23918.0
Copyright (C) Microsoft Corporation.  All rights reserved.

"-out:2016-07-01 len-param-constructor.exe"
-subsystem:console
-incremental:no"2016-07-01 len-param-constructor.obj"
 1.000000 2.000000
 160
forrtl: severe (408): fort: (7): Attempt to use pointer COMP when it is not associated with a target

Image              PC                Routine            Line        Source
2016-07-01 len-pa  000000013F97EA7E  Unknown               Unknown  Unknown
2016-07-01 len-pa  000000013F9714D0  MAIN__                     19  2016-07-01 len-param-constructor.f90
2016-07-01 len-pa  000000013F9BFCBE  Unknown               Unknown  Unknown
2016-07-01 len-pa  000000013F9C05B0  Unknown               Unknown  Unknown
kernel32.dll       0000000076B059BD  Unknown               Unknown  Unknown
ntdll.dll          0000000076D3A2E1  Unknown               Unknown  Unknown

(In the other contemporary thread, my "will depend on the type and kind of ..." should have been "will depend on the type and type parameters of ...".)

How to build up a 64-bit application?

$
0
0

Hello there,

     These days I am struggling with allocating big matrices. The error is "forrtl severe (41) insufficient virtual memory".

But I am pretty sure the virtual memory is big enough, its round 8000MB, more importantly I have 128G physical memory.

I am on a 64-bit windows operating system. According to the knowledge I get from other's questions on this forum,

I am running a 32-bit application even though the operating system is 64 bit, right?  

      But the problem is, how to switch to a 64-bit built? As far as I know, Visual Studio has always been a 32 bit platform.

I tried to reinstall IVF, but the default path is "C/:program files(x86)/...". So I guess I was reinstalling a 32-bit software again.

I also searched the buttons in the menus of IVF, either did I find any choice for a 64-bit built. 

      I really need help. 

Zone: 

Thread Topic: 

How-To

Timing Out Called External Program

$
0
0

Hello,

Off the bat, I would like to mention that I am not using the intel visual fortran compiler, but rather Gfortran, but I haven't had much luck in finding active forums for Gfortran, thought I check here.

I have a program which calls an external .exe. This software is off the shelf and I am aware that it was also written in fortran. Lets call is xyz.exe. My program writes the input files for xyz.exe, and then calls it from within. I use the intrinsic procedure execute_command_line to run xyz.exe. Once it finishes running the simulation, my program performs the analysis, writes a new input file depending on the previous time-step results and calls xyz.exe again. This was I am able to run a dynamic simulation using a software which was actually written for steady state cases.

I usually set up a cumulative run overnight and go home. Come back in the morning to look at the results.

Now for the most part, xyz.exe is fairly reliable, but sometimes maybe once a week, it gets stuck in an iterative loop. The makers of xyz.exe have put in a limit of the max number of iterations, but they missed accounting for a scenario if their solver gets stuck within a particular iteration, which is what happens to me once a week, when I come back in the morning to see that the complete simulation has not been completed. It is a numerical issue because of finite precision and an extremely stiff system. It gets solved if I change the initial input by say about 0.001, which makes no difference for me in terms of simulation results, but xyz.exe now converges.

Now I want a way to time the run of xyz.exe and if reaches a threshold, say 300 seconds, terminate it. Now an average single time-step run of xyz.exe takes about 3-4 seconds, so if it has reached 300 seconds it effectively means it is stuck in an iterative loop. How can I do this?

I want to begin a time counter before calling xyz.exe, call xyz.exe using execute_command_line, terminate xyz.exe if it reaches 300 seconds, check if my time counter has reached 300, if it has modify the input by the trivial amount and re-run xyz.exe, hoping it would converge this time.

Any advice on how to do this would be quite helpful.

Thanks

AKP

Thread Topic: 

How-To

unresolved external symbol ISO_C_BINDING_mp_C_F_PROCPOINTER

$
0
0

I'm getting a unresolved external symbol and I don't know why.  I've listed the library it is defined in explicitly in my list of libraries for linking.  The same code links fine even without specifying the ifmodintr.lib in PSXE2016.  But in PSXE2011 it isn't finding it.  It doesn't complain that it can't find the library so I think it must be searching it, but not finding it?  Here is my output from the compile/link below.  Thanks in advance!

Microsoft (R) Incremental Linker Version 10.00.30319.01
Copyright (C) Microsoft Corporation.  All rights reserved.

-out:userlogic.dll
-incremental:no
-dll
-implib:userlogic.lib
-nodefaultlib:libiompprof5mt.lib
-nodefaultlib:libiompprof5md.lib
-defaultlib:libiomp5md.lib
-nodefaultlib:vcomp.lib
-nodefaultlib:vcompd.lib
/LIBPATH:C:\PROGRA~1\CULLIM~1\SINDAF~1\lib
proces.lib
ProcessModulesDllOld.lib
ProcessorCGlobalsOld.lib
amgcg.lib
utility.lib
tdsubproc.lib
statwin.lib
sfmatlab.lib
SaveSetWriter.lib
multicalc.lib
LVCompartment.lib
ifmodintr.lib
/STACK:100000000
/MAP
/MANIFEST
/LIBPATH:C:\PROGRA~1\CULLIM~1\SINDAF~1\lib
proces.lib
ProcessModulesDllOld.lib
ProcessorCGlobalsOld.lib
amgcg.lib
utility.lib
tdsubproc.lib
statwin.lib
sfmatlab.lib
SaveSetWriter.lib
multicalc.lib
LVCompartment.lib
ifmodintr.lib
/STACK:100000000
/MAP
/MANIFEST
userlogic.obj
   Creating library userlogic.lib and object userlogic.exp
proces.lib(matsin.obj) : warning LNK4217: locally defined symbol samg_set_nptmn imported in function matsin
proces.lib(dealoc.obj) : warning LNK4217: locally defined symbol samg_refresh imported in function dealoc
proces.lib(AddFluid.obj) : error LNK2019: unresolved external symbol ISO_C_BINDING_mp_C_F_PROCPOINTER referenced in function addfluid
userlogic.dll : fatal error LNK1120: 1 unresolved externals
Intel(R) Visual Fortran Intel(R) 64 Compiler XE for applications running on Intel(R) 64, Version 12.1.2.278 Build 20111128
Copyright (C) 1985-2011 Intel Corporation.  All rights reserved.
ifort userlogic.for /dll /Qopenmp /fpe:0 /real_size:64 /integer_size:64 /names:lowercase /iface:cref /I:C:\PROGRA~1\CULLIM~1\SINDAF~1\mod /MD /iface:mixed_str_len_arg /include:C:\PROGRA~1\CULLIM~1\SINDAF~1\lib /assume:byterecl /extend_source:132 /O3 /traceback /INCREMENTAL:NO

 

Viewing all 5691 articles
Browse latest View live


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