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

application error

$
0
0

Hi,

I am reseller from Taiwan.

Need your assist to resolve my customer's technical issue:

 

please see customer's request as attachment.



Thanks.



 

AttachmentSize
Download103 6 16 plm.doc326 KB

Offloading to multiple Xeon Phis using OpenMP 4.0

$
0
0

Hi

I recently got a machine with 2xXeon Phi and I am making some simple tests to better understand the features that I will need for utilizing them in our production code. Basically, in the code below I just want to measure how many exponential functions the Phi's can calculate pr. second. I first create an OpenMP thread for each Phi device and then make target sectiosn inside each of these threads. When inside the target section the code is further parallelized using openMP directives.

In the code below, the strange thing is that DevNo never seem to make it correctly to the device. The DevNo value written out in the print statement  appear to be a random uninitialized value. In the version below NoDevices=1 and everything seems to work regardless of this issue, but if you instead set NoDevices=2 it doesn't. It seems to me that the code attempts to do both offloads to the same device, which sometimes result in half the performance and sometimes it crashes ..

Is this not how you are supposed to do multi device offloading with openMP 4.0? I use the latest version of parallel studio XE on Windows ..

Thank you  in advance,

Casper

    program Source1

    use ifport

    use omp_lib

    use mic_lib

    implicit none

    real*8                                     :: TimeBegin,TimeEnd,GOps

    real*8,allocatable,Dimension(:) :: ExpIn,ExpOut

    !DEC$ATTRIBUTES ALIGN: 64 :: ExpIn,ExpOut

    integer                                    :: NumThreads,NInner,NOuter,i,j,DevNo,PhiNo,NoDevices=1,NExps=165189!NExps=1651898

    

    !First, fill a vector with random values to calculate exp for   

    GOps=Random(18)

    allocate(ExpIn(NExps))

    do i=1,NExps

      ExpIn(i)=random(0)

    end do

!Now we do the actual benchmark calculation of exp's in parallel using openMP distributed over multiple phis

!Outer OMP parallel region - performing the same calculation on multiple phis in parallel

!$OMP PARALLEL NUM_THREADS(NoDevices) DEFAULT(SHARED) PRIVATE(DevNo)    

   DevNo=omp_get_thread_num()

   print *,'Entered OMP parallel region for device', DevNo

  !Initialize each target phi    

  !$OMP TARGET DATA DEVICE(DEVNO) MAP(to:NExps,DevNo,ExpIn(1:NExps),NumThreads)    

  !$OMP TARGET

    NumThreads=57*4-1

    !Somehow DevNo is not correct when we get here ...

    print *,'Running on Xeon Phi device ',DevNo,'using',NumThreads,'threads'

    NOuter=NumThreads*1000

    TimeBegin=omp_get_wtime()

      !Run parallel benchmark on each phi    

    !$OMP PARALLEL SHARED(ExpIn,NOuter,NExps) PRIVATE(I,J,ExpOut)  NUM_THREADS(NumThreads)

     allocate(ExpOut(NExps))

    !$OMP DO SCHEDULE(DYNAMIC)

     do i=1,NOuter       

       !$OMP SIMD

       do j=1,NExps

         ExpOut(j)=exp(ExpIn(j))        

       end do   

     end do  

    !$OMP END DO

    deallocate(ExpOut)

    !$OMP END PARALLEL   

    TimeEnd=omp_get_wtime()

    GOps=1e-9*NOuter*NExps/(TimeEnd-TimeBegin)

    print *,'Result:',GOps,'G exponential functions/s'

  !$OMP END TARGET

  !$OMP END TARGET DATA   

!$OMP END PARALLEL   

end program Source1

 

DLLEXPORT and CALL

$
0
0

Hello expert,

A silly question, my fortran project is a Windows DLL. It exports a function called 'polyfit'. Calling the function from excel works fine. However, when I want to call this function from my own DLL .. I'm not even able to compile. Error is 'unresolved external symbol'.

I guess I'm not allowed to call from my own DLL a function which is exported. Then how should I do it ?

The export code is the following :

!MS$IF DEFINED (_DLL)
!MS$ATTRIBUTES DLL EXPORT :: polyfit
!MS$ATTRIBUTES STDCALL,ALIAS:'polyfit' :: polyfit
      .... arguments ....
!MS$ENDIF

The calling code from inside fortran is simply :

CALL POLYFIT( ....)

Thanks,

Vincent

How to debug code called by another program?

$
0
0

I have written code that interacts with an optical analysis program via DDE. I got this working fine when I was running on a 32-bit platform.

I now have to cope with the optical analysis program now running on a 64-bit platform.

The back and forth DDE communication part works OK - when I start the optical analysis program, it talks to my code OK (diagnostic message boxes put up by my code confirms this), but the process now falls over when my code tries to open a modal Windows dialog, so I want to debug my code.

However, in my VS2012, I cannot see/find how to specify that debugging has to start by executing the optical

analysis program rather than my own. Any suggestions how to do this?

Also, I have to copy my debug code to a specific folder, for the optical analysis program to access it, so the code that has to be debugged will not be in the /debug/ folder created and populated by the compiler.

So how do I get the VS debugger to 'latch onto' the code that needs debugging?

 Do I also have to accompany my code with the PDB file that is created along with it?

 

fortran_compilers.props

$
0
0

i want to add intel visual fortran compiler v11(IVF11) to installed version fortran of pscad v4.2 as i know must have change the fortran_compilers.props but i dont know about notepad programming i get this notepad code but i do'nt know how change to use :

(and i attached  fortran_compilers.props)

<INTEL = "11.1"
 version_key = "Compilers \ FORTRAN \ #, Major Version, Minor Version"
 title_key = "Compilers \ FORTRAN \ # \ IA32, DisplayString"
 batch_args = "ia32" BATCH_NAME = " ifortvars.bat "batch_path =" bin \ "exe_path_key ="                     Compilers \ FORTRAN \ #, ProductDir "exe_subpath =" bin \ ia32 "
exe_name = "ifort.exe"
EMTDC = "IF9"> </ INTEL>

 

 

AttachmentSize
Downloadfortran_compilers.zip644 bytes

Cannot pass variable by Value from Fortran to C

$
0
0

I have a problem to pass a integer value from Fortran to C.

I use Visual Studio 2013 with Visual Fortran 14 and even using the declaration INTEGER(C_INT), VALUE :: myValue,

the receiving C function get the address of myValue instead of the value.

Is there any explanation.

Regards

Need guide on project structure combining C++ main +functions with Fortran subprograms

$
0
0

Please can you point me to a guide showing, in the simplest way possible, the steps required to set up a solution containing a C++ main (+ a few  C++ functions) program project that calls a set of Fortran functions in a Fortran project so that they can be easily and straightforwardly combined into a 32-bit application that will run on a 64-bit platform? I have VS2012  and IVF 2013 SP1 32-bit and X64 compiler installed. Thanks in advance.

How VS/Compiler Version Impact Executable Results?

$
0
0

While working on a project using different versions of both Visual Studio and the Intel compiler, we discovered that despite using identical compiler options, the executables were generating slightly different answers.  While this might not be a surprise, we would like to understand the source of the differences.  A few questions (assume Windows 7 and identical compiler options in all cases):

Does using a different version of Visual Studio (i.e. 2010 vs 2012) with the same version of the Intel compiler ever result in executables that will generate different outputs?

Does using a different version of the Intel Compiler (i.e. 12.0.3.175 vs 14.0.3.202) with the same version of Visual Studio result in executables that will generate different outputs?  If so, does Intel provided information in the release notes to indicate that a given update might result in slightly different results?

Does using a different version of the Intel Compiler (i.e. 12.0.3.175 vs 14.0.3.202) with different versions of Visual Studio result in executables that will generate different outputs? 

Not sure if this is possible, but it would be nice to include a comment in the release notes to indicate whether the given update might change the results of existing programs compiled with the update. 

Thanks…


break in visual studio on ifort run time warnings

$
0
0

 


Is there a way to have visual studio (2012) break on intel fortran run time warnings like:


forrtl: warning (402): fort: (1): In call to I/O Write routine, an array temporary was created for argument #2


 

Question: problems porting a 32-bit application to 64 bit (fortran libraries are 32 bit)

$
0
0

First of all, disclaimers: - Background: basic knowledge of computers, I am not a programmer.

  • Previous knowledge of programming, building solutions, etc. -- Very very basic, close to nil. This is my first time building a MVisualStudio solution.

  • Using: Microsoft Visual Studio 2010, working on a Windows 7 machine.

Context:

I am a structural engineer trying to recompile and rebuild a program (for seismic analysis of buildings), targeting a 64-bit machine (this will, to my understanding, increase the amount of RAM available to the program and allow me to analyze bigger structures). I seem to have a problem using intel fortran libraries originally written for 32-bit when trying to build a 64-bit application.

The problem:

I have the source code for the application (originally written as a 32-bit application) and I am able to build the solution for a 32-bit machine with no problems. The executable works fine and everything is well. The problem arises when I try to build a 64-bit application.

In Visual Studio 2010, when I go to Project>Properties>configuration Properties>Configuration Manager>Active Solution Platform>, I select "x64", and also "Copy settings from Win32". Then I proceed to build the solution. The building process gives a lot of warnings (but this also happens with the 32-bit build, and I think has to do with the fact that the original application was built using VS2005). The build has a single error:

lnk1112 module machine type x86 conflicts with target machine type x64

From what I researched in the internet, this had to do with the 64-bit solution trying to use libraries compiled for a 32-bit machine. As the application was written originally for 32-bit machines, the libraries it uses are 32-bit. I verified this using dumpbin.exe -headers <*.lib file> for all the *.lib files in the source code. All of them say "x86" on the header.

While for the libraries written specially for the program I have the source code, and I am fairly confident that I can recompile them for 64-bit, there is a number of libraries (Intel Fortran Libraries) that are also provided and used in the original solution, that were written for 32-bit:

IFCONSOL.lib, LIBIFCORE.lib, LIBIFCOREMT.lib, libirc.lib, libm.lib

Evidently, I do not have the source code for these libraries, and thus I would be unable to obtain "64-bit" versions. I have searched in the internet for "ifconsol.lib 64 bit" and the like, etc., but I have not found nothing meaningful (for me, please remember that I am a very inexperienced person).

The question:

My question is: if my solution needs these libraries, how can I obtain equivalent ones for 64-bit? Is there even such a thing as "equivalent 64-bit libraries", or I am talking nonsense....?

I apologize if my question seems silly. Any help or advice would be greatly appreciated!

Thank you!

Chuck

Error with a function !

$
0
0

Hello,

Every time I try to execute this program, it says : error #6236: A specification statement cannot appear in the executable section. Does anybody has any idea about the reason ? Thanks

 

program FP
implicit none

real ::  Thita_PD
double precision::pi


pi=3.1415926536d0
Thita_PD = 25

!------------------------------!
FUNCTION Acw(r)
real :: Acw
real, intent(in) :: r
Acw = 3*(r**2)*(cos(Thita_PD*pi/180d0)*((1/tan(30.0*pi/180d0))*cos(Thita_PD*pi/180d0)-sin(Thita_PD*pi/180d0)) &
+ Thita_PD*pi/180d0 + 30*pi/180d0 - pi/2)
END function Acw
!------------------------------!
end program FP

 

Application still doing things after it has ended

$
0
0

I have an application that launches a completely separate 64-bit Intel Fortran EXE and waits for it to complete before taking control again. It all works well except that after the Fortran EXE has finished, it stays in the Windows Task Manager with a status of "Terminated" for about 30 seconds before it finally disappears completely.



The problem is that If my application tries to re-launch it while it is still in this "Terminated" state it has problems because it still seems to have files open from the previous launch even though they were all closed properly. If I do the re-launch after it has disappeared from task manager then all is well. I assume that it is still flushing buffers and whatnot while it is in the "Terminated" state even though it looks like it has ended.



Is there anything I can do to make it disappear from task manager as soon as it finishes rather than going into this limbo state for 30 seconds? If it is flushing buffers can I turn this behaviour off?

fortran compiler 11.1

$
0
0

 

Hello,

I am a user of AVL Fire 2013.0 and I need to compile a fortran code from this program. In the AVL tutorial I have found that the compiler should be Intel visual fortran compiler for windows version 11.1.051 (update 3) .  I have access to version 11.1.060 (update 5) and I could not compile the fortran code with this version.

I was wondering if someone could tell me if a fortran code should be compile with a 11.1.051 version, does it mean that the code should be compile only and only with that version? or the source code has a problem because if a code can be compiled with 11.1.051 version, it also can be compiled with 11.1.060 version?

 

Thanks in advanced

[Question] Fatal error LNK1120: 3 unresolved externals

$
0
0

Hey everyone,

I'm trying to compile an existing fortran project however I keep getting this error.  I searched the forums for similar issues and believe it is an error caused by not linking a file that is included in the program.  

In my case, there are two files called "COMMONS.FOR" and "COMTRN.FOR" which are required in the "REALGAS.FOR" and the "COMMONS.FOR" is also required in "SETUP.FOR".  

Initially, the library files (COMMONS/COMTRN) were not in the solutions explorer, so I dragged them in to the resources folder and tried recompiling hoping that the error would go away... it did not.  You can see below that I have these files in the solutions explorer, but I still get the same error:

[IMG]http://i.imgur.com/UkD0RHa.jpg[/IMG]

Can anyone please help me figure out what I am doing wrong.  Any help is greatly appreciated.

How can I get rid of the placeholder for space character?

$
0
0

Since last week the blanks in my source files in the editing window are replaced by a character resembling a centered dot. I must have touched inadvertently a special key or a key combination causing the replacement. I tried to restore the blank, but I did not find an appropriate setting neither in the VS options nor in the project settings. What annoys me more is my stupidity to find a solution than the placeholder itself. Does somebody know how I could get rid of the centered dot?


Any option to show run time error if variables are used without being initialized?

$
0
0

Dear all,

I need the program give run time error if variables are used without being initialized. Is there any such option? I only found related ones

/Qzero, /Qtrapuv

But they are not what I wanted.

Thanks,

Zhanghong Tang

Data statement not working?

$
0
0

I think I am going crazy, what's wrong with this?

      character(20) :: rowt(6,12) = ''

      data rowt(1,1:4) / '','zfactg','rhog','viscg' 

When I run, I get this in the debugger:

      -        rowt(1,1:4)    {...}    CHARACTER(20) 

        rowt(1,1)    '                   '    CHARACTER(20) 

        rowt(1,2)    '                   '    CHARACTER(20) 

        rowt(1,3)    '                   '    CHARACTER(20) 

        rowt(1,4)    '                   '    CHARACTER(20) 

Error #6401 After Just a Change of Versions

$
0
0
   

I am just starting to work with a program, XLTRC2, for my research at Texas A&M. I am using Visual Studio Professional 2013 with the Intel 2013 Fortran compiler including the IMSL package. Upon trying to run the exact same project that works for my co-workers I am getting the error message "error #6401: The attributes of this name conflict with those made accessible by a USE Statement.[Variable ex: LOGFIL] ; File: arnoldi-debug-h.f90" for a group of variables in my code. They are not receiving the same error messages when they run the project on Visual Studio Professional 2012.



If I comment out the USE statement for the IMSL_LIBRARIES the error message changes to "error #6404: This name does not have a type, and must have an explicit type. [N1RTY] ; File: Arnoldi.f90" Which I am guessing is because N1RTY is defined in IMSL_LIBRARIES.

Could something in the new IMSL libraries be interfering with the common variables in the project? Or do I have a setting wrong?



The code outline giving the issue is

----Arnoldi.f90------

USE ...

USE IMSL_LIBRARIES

...

include 'arnoldi-debug-h.f90'

 ndigit = -3

 logfil = 6

 mnaitr = 0

 mnapps = 0

 mnaupd = 0       ! 1 for output, 0 to suppress output  

 mnaup2 = 0

 mneigh = 0

 mneupd = 0

  nwarnings= 0

...

...

...

---------End of Arnoldi.f90-----------------

-------arnoldi-debug-h.f90'-----------

      integer    logfil, ndigit, mgetv0,                                    &

                msaupd, msaup2, msaitr, mseigt, msapps, msgets, mseupd,    &

                mnaupd, mnaup2, mnaitr, mneigh, mnapps, mngets, mneupd,    &

                mcaupd, mcaup2, mcaitr, mceigh, mcapps, mcgets, mceupd

      common /debug/                                                    &

                logfil, ndigit, mgetv0,                                    &

                msaupd, msaup2, msaitr, mseigt, msapps, msgets, mseupd,    &

                  mnaupd, mnaup2, mnaitr, mneigh, mnapps, mngets, mneupd,    &

                mcaupd, mcaup2, mcaitr, mceigh, mcapps, mcgets, mceupd

-------end arnoldi-debug-h.f90----------------

Thanks for any information possible!

Clay Norrbin

 

 

About function acos in IMSL FNL

$
0
0

hello, i was using intel fortran with IMSL FNL and faced some problems.

I used the special function by using 'ACOS_INT'. when calculating cos(x) for x<1 and x>1 separately it works fun, but it did not work when I try do x from a1(<1) to a2(>1). Here follows my fortran code:

program main
    include'link_fnl_shared.h'
      USE ACOS_INT
      IMPLICIT   NONE

      REAL*8, PARAMETER:: T = 1
      REAL*8, PARAMETER:: MUS = -1.95
      REAL*8, PARAMETER:: MUN = -1.95
      REAL*8, PARAMETER:: W   = 2.0
      REAL*8, PARAMETER:: DELTAL = 0.02
      REAL*8, PARAMETER:: DELTAR = 0.02
      REAL*8, PARAMETER:: NY  = 30
      REAL*8, PARAMETER:: NX  = 60
      REAL*8, PARAMETER:: NUMR = 5
      REAL*8, PARAMETER:: KBT = 0.001
      REAL*8, PARAMETER:: PI = 4.d0*datan(1.d0)
      INTEGER    N1
      COMPLEX*8::    VALUE1, Z
      real*8:: omega=0.5d0, omegal, omegar
      complex*8, dimension(NY+1):: PL1, PL2, PR1, PR2
      real*8, dimension(NY+1):: Q, L1, L2, R1, R2
      integer:: i

      OMEGAR = SQRT(OMEGA**2 + DELTAR**2)
      OMEGAL = SQRT(OMEGA**2 + DELTAL**2)

      DO N1 = 1, NY+1
      Q(N1) = N1*PI/(2+NY)
      L1(N1) = -(MUN + 2*T*COS(Q(N1)+OMEGAL))/(2*T)
      L2(N1) = -(MUN + 2*T*COS(Q(N1)-OMEGAL))/(2*T)
      R1(N1) = -(MUN + 2*T*COS(Q(N1)+OMEGAR))/(2*T)
      R2(N1) = -(MUN + 2*T*COS(Q(N1)-OMEGAR))/(2*T)
      END DO

      PL1 = ACOS(L1)
      PL2 = ACOS(L2)
      PR1 = ACOS(R1)
      PR2 = ACOS(R2)

      open(11, file='data1.txt')
      do i =1, ny

      WRITE (11,*) L1(i),PR2(i)
99999 FORMAT (' ACOS((', F6.3, ',', F6.3, ')) = (', &
         F6.3, ',', F6.3, ')')
      end do
END

If anyone don't think I described it clear, I will be more clear.

Thanks a lot.

GETFILEINFOQQ in 64 bit Fortran

$
0
0

I am using the Visual Fortran Compiler XE 15.0.0.070 running under Windows 7.

My program compiles and links correctly in 32 bit mode, but in 64 bit mode I get

error #6284: There is no matching specific function for this generic function reference.   [GETFILEINFOQQ]

I am also using the Math Kernel Library with the option /Qmkl:parallel. I get the following error messages associated with this:

ifort: command line warning #10159: invalid argument for option '/Qmkl'

The compiler command line is:

/nologo /O3 /Qopt-prefetch=2 /assume:buffered_io /Qip /Qopt-matmul /module:"x64\Release\\" /object:"x64\Release\\" /Fd"x64\Release\vc100.pdb" /check:none /libs:dll /threads /Qmkl:parallel /c

The linker command line is:

/OUT:"x64\Release\SquallDll1.dll" /NOLOGO /MANIFEST /MANIFESTFILE:"x64\Release\SquallDll1.dll.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /SUBSYSTEM:WINDOWS /IMPLIB:"C:\Users\chris\Documents\Visual Studio 2010\Projects\SQUALL v1.2\64 bit\DLL\SquallDll1\x64\Release\SquallDll1.lib" /DLL /qnoipo

Should I be using other libraries?

ChrisG

Viewing all 5691 articles
Browse latest View live


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