Quantcast
Channel: Intel® Fortran Composer XE
Viewing all 1447 articles
Browse latest View live

Provide a console in a Fortran QuickWin project

$
0
0

Dear friends

I have recently started to use a graphics library (PGplot) in my Intel 11 + VS2008. Since I want to handle both text and graphics I am developing my codes in a Fortran QuickWin Project Type. However, the characters written to the console appear in the application program window "mixed" with some of the graphics. I will prefer to see the text in a different window (or even in a console), what can I do? 



I have searched in the web for any information related but it is still not clear to me what should I do. Should I "connect" my Fortran QuickWin project with a Fortran DLL (how)? Any tips?

Thanks a lot for your help, is very appreciate it. 


Binding argument CLASS/TYPE mismatch not diagnosed

$
0
0

The following shows that 15.0 fails to diagnose a mismatch in the CLASS/TYPE characteristics of a dummy argument (which isn't the passed argument) for a procedure used to override a binding.

MODULE m
  IMPLICIT NONE

  TYPE, ABSTRACT :: Parent
  CONTAINS
    PROCEDURE(parent_Binding), DEFERRED :: Binding
  END TYPE Parent

  TYPE :: Thing
  END TYPE Thing

  ABSTRACT INTERFACE
    SUBROUTINE parent_Binding(left, right)
      IMPORT Parent
      IMPORT Thing
      IMPLICIT NONE
      CLASS(Parent), INTENT(IN) :: left
      CLASS(Thing), INTENT(IN) :: right       ! <-- Polymorphic!
    END SUBROUTINE parent_Binding
  END INTERFACE

  TYPE, EXTENDS(Parent) :: Extension
  CONTAINS
    PROCEDURE :: Binding => extension_Binding
  END TYPE Extension
CONTAINS
  SUBROUTINE extension_Binding(left, right)
    CLASS(Extension), INTENT(IN) :: left
    TYPE(Thing), INTENT(IN) :: right          ! <-- Not polymorphic!
  END SUBROUTINE extension_Binding
END MODULE m

 

>ifort /c /check:all /warn:all /standard-semantics /Od Poly-NotPoly-NotDiagnosed.f90
Intel(R) Visual Fortran Intel(R) 64 Compiler XE for applications running on Intel(R) 64, Version 15.0.0.108 Build 20140726
Copyright (C) 1985-2014 Intel Corporation.  All rights reserved.

Poly-NotPoly-NotDiagnosed.f90(27): remark #7712: This variable has not been used.   [LEFT]
  SUBROUTINE extension_Binding(left, right)
-------------------------------^
Poly-NotPoly-NotDiagnosed.f90(27): remark #7712: This variable has not been used.   [RIGHT]
  SUBROUTINE extension_Binding(left, right)
-------------------------------------^

Perhaps this isn't required for standard conformance, but it would sure be very nice to have, given similar capabilities of the compiler in this area, and how bewildering things get when you get this wrong!

ICE with most horrible source ever

$
0
0

In order to reduce the wear and tear on my fingers I have decided that I need to type less.  Consequently for me it's no more comments in source (I never read them anyway), no more mixed case keywords and names (saves pressing SHIFT), back to fixed source form (no need for all that extraneous white space - annoyances about IDE smart indenting behaviour become a thing of the past) and use of the statement termination character and continuations in preference to starting new lines (this will also save paper when I print my source out).

Unfortunately ifort won't play ball.

>ifort /check:all /warn:all /standard-semantics FIXEDFORMFOREVER.FOR
Intel(R) Visual Fortran Intel(R) 64 Compiler XE for applications running on Intel(R) 64, Version 15.0.0.108 Build 20140726
Copyright (C) 1985-2014 Intel Corporation.  All rights reserved.

fortcom: Fatal: There has been an internal compiler error (C0000005).
compilation aborted for FIXEDFORMFOREVER.FOR (code 1)

What's that?  Do I have a bit too much spare time on my hands at the moment? Why yes I do as a matter of fact... how did you guess??

AnhangGröße
HerunterladenFIXEDFORMFOREVER.FOR315.45 KB

error#7881

$
0
0

Hi,

I'm working with version XE 2013. And I use LAPACK for my project. I have done and check the following is in right setting:

1.environment variable

2. tools/options/.../complier: For include, added :\Intel\Composer XE 2013 SP1\mkl\include\ia32 . similar to lib.

3.project/properties/../linker/input. add mkl_lapack95.lib

when I rebuild the project, the software reports error#7881.

the software is win32. I have check through this forum and so far I cannot figure out any possible mistake I have make. Any one give some suggestion?

below is the whole error report:

Error    1     error #7881: This module file was generated for a different platform or by an incompatible compiler or compiler release. It cannot be read.

Creating a Post-processor

$
0
0

I am creating a post-processor for a finite element program but I didn´t get a good quality of the images. I used the sequence of ideas below to create an image representing the specific result.

1) Creating the pallete of colors;

2) Creating a list where I use the fglBegin(GL_POLYGON), fglColor3f, and fglVertex2f functions to create the mesh´s elements and define a color for each element´s vertex.

3) Calling the list to create the image.

Inside the elements I didn´t get a good smoothing process between colors defined in each vertex. What I could do to improve the quality inside elements.

Thank you for your support.

Carlos A Santos. 

 

 

 

AnhangGröße
HerunterladenPrintScreen.png151.15 KB

No Fortran Expression Evaluator debugging COM Server.

$
0
0

My project is a .NET front end calling a Fortran COM Server (generated with the COM Server wizard) via COM-Interop.

In IVF 12.1, I could debug into the COM Server and watch Fortran variables.  After migrating to IVF 14.0, I can see some variables in the debugger but they have C semantics, e.g. type "long" rather than INTEGER(4).  Allocatables or pointer targets are not viewable.  Reading elsewhere I guess this means the Fortran Expression Evaluator (fee.dll) is not loaded.

I can successfully debug simpler projects where the Fortran code is statically linked.

Is there some way to kick-start the Fortran Expression Evaluator?

Substrings of character components of extension types

$
0
0

If an object with a character array component is of a type that extends another type, then attempts to substring the character component result in strange errors.

MODULE m
  IMPLICIT NONE
  TYPE :: Parent
  END TYPE Parent
  TYPE, EXTENDS(Parent) :: Extension
    CHARACTER(10) :: component(5)
  END TYPE Extension
CONTAINS
  SUBROUTINE s(arg)
    CLASS(Extension), INTENT(IN) :: arg
    PRINT *, arg%component(2)(1:3)
  END SUBROUTINE s
END MODULE m

 

>ifort /c /check:all /warn:all /standard-semantics "2014-09-02 character-component.f90"
Intel(R) Visual Fortran Intel(R) 64 Compiler XE for applications running on Intel(R) 64, Version 15.0.0.108 Build 20140726
Copyright (C) 1985-2014 Intel Corporation.  All rights reserved.

2014-09-02 character-component.f90(11): error #6460: This is not a field name that is defined in the encompassing struct
ure.   [COMPONENT]
    PRINT *, arg%component(2)(1:3)
-----------------^
2014-09-02 character-component.f90(11): error #6514: A substring must be of type CHARACTER.   [COMPONENT]
    PRINT *, arg%component(2)(1:3)
-----------------^
2014-09-02 character-component.f90(11): error #6158: The structure-name is invalid or is missing.   [ARG]
    PRINT *, arg%component(2)(1:3)
-------------^
compilation aborted for 2014-09-02 character-component.f90 (code 1)

 

Interfacing C++ stuff (AVIFile API)

$
0
0

In my application I have rendered a series of dynamic images in OpenGL. I dumped this data as a series of bitmaps and then used an external program to make a movie. Looking at the AVIFile API's it seemed not so big a step to just encode the data to create and AVI directly. It is not quite

working as yet and as I'm well outside of my comfort zone I have some basic questions regarding getting this stuff to work with Fortran. Consider the MSDN C++ sample below:

// LoadAVIFile - loads AVIFile and opens an AVI file.
//
// szfile - filename
// hwnd - window handle
//
VOID LoadAVIFile(LPCSTR szFile, HWND hwnd)
{
    LONG hr;
    PAVIFILE pfile;

    AVIFileInit();          // opens AVIFile library

    hr = AVIFileOpen(&pfile, szFile, OF_SHARE_DENY_WRITE, 0L);
    if (hr != 0){
        // Handle failure.
        return;
    }

//
// Place functions here that interact with the open file.
//

    AVIFileRelease(pfile);  // closes the file
    AVIFileExit();          // releases AVIFile library
}

From the AVIFileopen in Fortran I get back Pointer that  points to a buffer that receives the new IAVIFile interface pointer (&pfile). Note in the C++ this looks at a type PAVIFILE. My question is what does Fortran need to understand about this type? To my (probably flawed) thinking I need some memory buffer for whatever object it points at? From a pratical point of view I do not need to know anything about these objects as the pointers are just used to pass into other routines in that family

From vfw.h we have:

#define INTERFACE IAVIFile
#define PAVIFILE IAVIFile *
  DECLARE_INTERFACE_(IAVIFile,IUnknown) {
    STDMETHOD(QueryInterface) (THIS_ REFIID riid,LPVOID *ppvObj) PURE;
    STDMETHOD_(ULONG,AddRef) (THIS) PURE;
    STDMETHOD_(ULONG,Release) (THIS) PURE;
    STDMETHOD(Info) (THIS_ AVIFILEINFOW *pfi,LONG lSize) PURE;
    STDMETHOD(GetStream) (THIS_ PAVISTREAM *ppStream,DWORD fccType,LONG lParam) PURE;
    STDMETHOD(CreateStream) (THIS_ PAVISTREAM *ppStream,AVISTREAMINFOW *psi) PURE;
    STDMETHOD(WriteData) (THIS_ DWORD ckid,LPVOID lpData,LONG cbData) PURE;
    STDMETHOD(ReadData) (THIS_ DWORD ckid,LPVOID lpData,LONG *lpcbData) PURE;
    STDMETHOD(EndRecord) (THIS) PURE;
    STDMETHOD(DeleteStream) (THIS_ DWORD fccType,LONG lParam) PURE;
  };

#undef PAVIFILE
  typedef IAVIFile *PAVIFILE;

#undef INTERFACE 

If this was POD (plain old data) I would define a type and the way forward would be clear but all this C++ method stuff.....???

What is one meant to do? Some "pointers" would be most helpful!

Andrew


Internal compiler error (C0000005)

$
0
0

Hello,

I am trying to update from version 10.1.013 of the Fortran compiler to Visual Fortran Compiler XE 15.0.0.108.  The code compiled without error in the old version.  With the new compiler the build aborts with code 1.  Checking the BuildLog.htm has the message:

   fortcom: Fatal: There has been an internal compiler error (C0000005).

   compilation aborted for . . . (code 1)

I would like to submit this issue to Intel Premier Support, but I get a Not Authorized message when I try to go to IPS.

I have gone to the License Manage web page and requested to "Get Premier Support".  I get an email that says to wait one hour and click "here" to complete the configuration.  After one hour (and two hours) I get the following message:

Account verification incomplete

There is a delay for the final configuration of your support account. Please wait approximately 1 hour and click the same link in the email you received, to complete the configuration.



Want more help? Contact support.

 

P L E A S E   H E L P ! ! !

Download intel fortran 11.1

$
0
0

In order to work with Abaqus, I need to have intel fortran 11.1. I have the serial number but I fail to find the link to download it.

Can I have one?

Great thanks! 

Peter

 

Formatted Direct access files cr/lf different in Debug/Release

$
0
0

Using the command

        OPEN(UNIT = 9, FILE = FILLIN, RECL = 200, FORM = 'FORMATTED', &
          ACCESS = 'DIRECT')

I get a file with CR/LF ending the 200 byte records in Release whereas the file has only CR (or maybe just LF) in Debug.  Why?

Fortran 2015 version, VS Shell, VS 2013 Express installed

$
0
0

I am trying to install the fortran 2015 version on a Win 7 x64 system that has VS Express 2013 Desktop installed, and ran into a couple problems:

On the initial screen, I see the message 'Microsoft Visual Studio* 2013 does not have C++ "X64 Compiler and Tools," components installed.' VS express 2013 can target x64, but unlike earlier editions, it does not have a native x64 compiler but a ia32 cross-compiler that targets x64, but I would not expect this to create problems; does it?

Then I click through, go to customize, and "Microsoft Visual Studio* 2010 Shell" is greyed out. The message at the bottom states that "Microsoft Visual Studio* 2010 Shell can not be installed because Microsoft Visual Studio* 2010 or 2012 or 2013 is installed or Microsoft .NET Framework 4.0 is not installed. I had thought that the 2010 Shell and 2013 Express (or any other Express) would co-exist peacefully; is this not the case?

Thanks.

 

writing CERN Root histograms

$
0
0

I`d like to save 1D and 2D data from a Fortran code into CERN Root histograms. Can anybody recommend and code example.

VS2012 PRO - dialog resource toolbox empty

$
0
0

I have just converted a CVF project to IVF and want to edit a dialog. however when I open the resource file, the resource editor shows the toolbox pane empty and the 'Resource view' item under the VS2012 'View' menu is greyed out. So I have no dialog box resources available to drag-and-drop.

Using the VS help, I find the a mention that the resource view is not available for Express editions. However, I have a VS2012 Pro license.

Any suggestions as to how this might be fixed?

SPLITPATHQQ on v15 of the compiler

$
0
0

I'm seeing some odd behavior of SPLITPATHQQ on v15 of the compiler (compared to v14 update 2).  Consider this code:

program main

	use ifport

	implicit none

	character(len=256)	:: filepath
	integer(4)		:: filelen
	character(len=256)	:: drive,dir,name,ext

	filepath = '\\blah\blah\blah\'
	filelen	= SPLITPATHQQ (filepath, drive, dir, name, ext)

	write(*,*) '---------'
	write(*,*) 'filepath:'//trim(filepath)
	write(*,*) 'drive:'//trim(drive)
	write(*,*) 'dir  :'//trim(dir)
	write(*,*) 'name :'//trim(name)
	write(*,*) 'ext  :'//trim(ext)
	write(*,*) '---------'

	filepath = 'C:\blah\blah\blah.dat'
	filelen	= SPLITPATHQQ (filepath, drive, dir, name, ext)

	write(*,*) '---------'
	write(*,*) 'filepath:'//trim(filepath)
	write(*,*) 'drive:'//trim(drive)
	write(*,*) 'dir  :'//trim(dir)
	write(*,*) 'name :'//trim(name)
	write(*,*) 'ext  :'//trim(ext)
	write(*,*) '---------'

	filepath = '\\blah\blah\blah\'
	filelen	= SPLITPATHQQ (filepath, drive, dir, name, ext)

	write(*,*) '---------'
	write(*,*) 'filepath:'//trim(filepath)
	write(*,*) 'drive:'//trim(drive)
	write(*,*) 'dir  :'//trim(dir)
	write(*,*) 'name :'//trim(name)
	write(*,*) 'ext  :'//trim(ext)
	write(*,*) '---------'

end program main
	

The result on my PC is this:

 ---------
 filepath:\\blah\blah\blah\
 drive:



 dir  :\\blah\blah\blah\
 name :



 ext  :



 ---------
 ---------
 filepath:C:\blah\blah\blah.dat
 drive:C:
 dir  :\blah\blah\
 name :blah
 ext  :.dat
 ---------
 ---------
 filepath:\\blah\blah\blah\
 drive:C:
 dir  :\\blah\blah\blah\
 name :blah
 ext  :.dat
 ---------

The first time it is called, drive, name, and ext are blank as expected.  (But note that the strings are not being trimmed properly, which is weird).  The second time it is called, everything is fine and non-blank as expected.  The third time it is called, drive, name, and ext should be blank, but they are retaining the values from the previous call.  I don't believe the previous version of the compiler behaved this way.


IDE for Intel Composer XE for Windows -

$
0
0

We are looking to purchase a license for the Intel Compose XE for Windows with both Fortran and C++ compilers. The product release note says the installation comes with a MS Visual Studio 2010 shell for compiling, building and debugging Fortran application. I would like to know if this shell is a full fledged IDE and if so, is the IDE limited to Fortran applications only or if C++ applications can also be debugged through it?. Or should we separately purchase a Visual Studio license for use as IDE for C++ applications?.

Thanks

Rey

how to transfer data between thread

$
0
0

I wrote a program using windows API to show some curves and text.

The calculation is a thread started by main window.

Curve and text's informations contains some data like position, color, strings....

I want to use windows message to send data to figure window. But message API function has two parameters: wParam, lParam, which refer to two integer pointer. I found it seems that fortran cannot transfer the adress of other type or struct to a integer, while an integer adress cannot be recieded by pointer of other types.

Is that right?

So, what should i do?

VS 2013

$
0
0

I recently upgraded from VS2010 to VS2013.  The new programming environment looks nice, but I the watch window doesn't seem to be working.  All I get under the value is "Undefined address".  I suspect that this is because I am missing a setting under the options, but do not know what it might be.  Any help greatly appreciated,

 

Justin

MSC.Marc Subroutine

$
0
0

Hi,

I wrote the following subroutine to extract nodal stress values. It perfectly writes down the nodal stresses in MSC.Marc installed for Linux; however, when I try to implement this subroutine in MSC.Marc installed for Windows using intel(R) Visual Fortran compiler, error "forrt1: severe <157>: Program Exception - access violation" occurs.

The subroutine is:

      subroutine impd(lnode,dd,td,xord,stnod,f,v,a)

      include '../common/implicit'

      include '../common/array3'

      include '../common/array2'

      include '../common/spacevec'

      include '../common/strvar'

      include '../common/concom'

      include '../common/elmcom'

      include '../common/dimen'

      

      integer j

      character NodeStress*90

      dimension lnode(2)

      dimension dd(ndeg),td(ndeg),xord(ncrd),f(ndeg),

     *v(ndeg),a(ndeg)

  310 format(I4,(1H:),6E14.6)

 

      if(lnode(2).ne.1) return

      if(lnode(1).eq.1) then

      write(NodeStress,'(a,i4.4,a,$)') './NodalStress_',inc,'.dat'

      open(unit = inc+1000 ,file=NodeStress,status="new")

c      if(lnode(1).eq.1) then

      write(inc+1000,'(17Hlabel=NodalStress)')

      write(inc+1000,'(13Hnum_item=3800,/)')

      end if

      open(inc+1000)

      write(inc+1000,310) lnode(1)-1,(stnod_d((lnode(1)-1)*6+j),

     +j=1,6)

      return

      end

I would appreciate if you could help me to figure out the problem.

Kind Regards,

APPa

Linking with a DLL

$
0
0

There might be something simple I am over looking but I am having a hard time calling a subroutine from  a Dll in an Intel Fortran console project. I have attached the console project and the dynamic library project (both in Intel Fortran).  When I include the Dll file in the console project I get an error stating: LNK1107: invalid or corrupt file: cannot read 0x20. There is also a warning: file format not recognized [dll project debug forlder path]\SamsEngineDlliF.dll.  

AnhangGröße
HerunterladenProjects_0.zip122.62 KB
Viewing all 1447 articles
Browse latest View live


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