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

Unable to solve external symbol (error LNK2019) when linking multi language project

$
0
0

Hello,

due to migration to Windows 7 by our IT department, I had to switch from VC++ 6.0 and Compaq Visual Fortan to Visual Studio 2010 with Microsoft Visual Cüü 2010 and Intel Visual Fortran Composer XE 2013.

Trying to recompile the existing mixed language project I solved all issues except one.
When linking the project I get this error message:

Fehler 1 error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "_DORN2ZSDT@268" in Funktion "_main".

I assume than in the header file which declares the FORTRAN subroutine DORN2ZSDT to C++ I use the wrong name. When I used the old set of compilers I had to declare
the subroutine this way:

extern "C" { void __stdcall DORN2ZSDT ( ................. ); } 

In the FORTRAN source the subroutine looks like this:

subroutine dorn2zsdt ( .....................) 

Since I allway had to compile this project for different platforms (Windows and Linux) with different compilers I know the the different compilers use different naming conventions for the compiled objects and wrote my headers with conditional compilation directives in respect to this. For instance for the NAGWare Fortran compilers objects I have to use this declaration in the header:

extern "C" { void dorn2zsdt_ ( ..... );} 

Now my problem is that I simply cannot find out which naming convention the Intel Visual Fortran Composer XE 2013 uses.

Can someone tell me the naming convetion or how to solve this linker error in another way.

Kind regards
Stefan


problem with a new project

$
0
0

Hi, I'm new in Visual Studio 2012 and I have to write a program in Visual Fortran. I installed everything and when I want to compile a simply hello world program what I have to do? I open a new project call "hello", and a new fortran file, then I write my hello.f90 program

program hello
    implicit none
    character(15) string_out
    character(40) string_title
    string_out='Hello world!'
    string_title='Simple hello world using quickwin'
    open(unit=4,file='user',title=strig_title)
    write(4,'(10x,A15)')string_out
    end program hello

and when I click on the start button a message tell me: impossible start the program, don't find hello.exe.

what I forgot to do?

Cleaning a solution

$
0
0

We are trying to understand some odd apparently inconsistent compile behavior. The subject program calls an external subroutine that features an optional argument, and there is no explicit interface to it (the subroutine was designed to be in a module but that slipped through the cracks). Compiling the program produces warning #8055 about the missing interface (the warning may be promoted to an error depending on a VS setting, which only added to the confusion). If the VS option "Clean solution" is used, then the compiling and linking (and execution) works OK. But if any edit no matter how small (such as inserting a space then deleting it) is made in the source, the warning comes back, until it is again Cleaned.

Q1: What does this "cleaning" do? Does it make sense that it would temporarily fix the missing interface warning?

Q2: When is it safe or "good practice" to do this cleaning? In this case it appears to fix a problem--although awkwardly--while in reality it only masks a serious issue that really needs to be addressed differently (i.e. provide the interface or restore the module). 

intel fortran 11.0.61 can not be intergrated in visual studio 2008

$
0
0

My OS is win7 home premium, 64 bit AMD

visual studio 2008 express edition has been set up already

intel fortran 11.0.61 was set up afterwards.

"lack of visual studio environment..."appeared during setting up but visual studio 2008 can be found in the intergrate option window in next step.

when set up finished, intel fortran option can not be found in the window opend via vc 2008 express/file/new/project/prject types

is the vs 2008 express edition doesn't support 64 bit OS? if so, what version can I chose? if not so, how can I solve this problem?

Thanks.

 

 

Support for VS2012 express

C Header file for Fortran DLL using BIND(C)/cdecl and functions returning structs

$
0
0

Okay after working on it over the weekend, I realize that I'm at the limit of my understanding of how to make things interoperable with C specifically in reference to MATLAB.  My familiarity with C is passing and this involves things I've never tried to do in C.

I have a series of functions that I have made that are all bind(c) and have a specific user defined type for the return argument.  I want the return argument to be flexible, as I want it to be able to return whatever it is the library wants to give it as well as be able to return the error messages/status that are returned.

Here is an example of the user defined type:

type, bind(c) :: c_return
  integer(c_int)                :: ncolumns = 0
  integer(c_int)                :: nrows = 0 
  integer(c_int)                :: lstring = 0
  integer(c_int)                :: status = 0
  type(c_ptr)                   :: valueptr
endtype c_return

The idea is to locally control the valueptr such that all memory gets freed after MATLAB is done with the command.

Here is an example of the function declaration that I want.

function c_bodyn(jd, is, ip) bind(c, name='c_bodyn')
!DEC$ ATTRIBUTES DLLEXPORT :: c_bodyn
  !
  !
  ! Passed Parameters
  real(c_double), intent(in) :: jd  ! Julian date
  real(c_double), intent(in) :: is  ! satellite integer
  real(c_double), intent(in) :: ip  ! master central body integer
  
  type(c_return)     :: c_bodyn 

I have hacked around trying to get a C header file that would be compatible, and haven't been successful.  If someone can help me I'd really appreciate it.

Here is one of the many different header files that I have tried for these:

#define EXPORTED_FUNCTION __declspec(dllexport)
#ifdef __cplusplus
extern "C" {
#endif
    typedef struct 
{
    int    ncolumns, nrows, lstring, status;
    void * valueptr;
} c_return;
    extern "C" __declspec struct c_return c_bodyn(double jd, int is, int ip);
#ifdef __cplusplus
}
#endif

IMSL cannot be used

$
0
0

I am trying to convert my Compaq Visual Fortran project into Intel Visual Fortran 10.1.

A program within the project used imsl and with CVF it works fine.

I recently use IMSL library for IVF 9.1 as it's the one compatible with IVF, but I got this compiling error:

Error: Error in opening the Library module file.   [IMSL]

Does anybody know how to resolve this ?

Thanks, Robert

Multi-processor Compilation option /MP is ignored

$
0
0

I am using IVF Compiler XE 13.1.0.149 on Windows 7 Professional 64-bit and I would like to use the /MP compiler option. It worked in previous versions of IVF Composer, but the latest version seems to ignore this parameter. I found here that is it not recommended to use /MP; is this recommendation still valid even in the latest version?


Error #5508 - Conflict with previous declaration

$
0
0

I started using IVF Composer XE 2013 Update 2 today and I am not able to compile and link my application, because I started getting Error #5508 - Conflict with previous declaration. In one of my (fixed form) source files I have a function

logical*4 function use_SCGS_3D ( i, j, scgs2 )

with i and j defined as integer*4 and scgs2 defined as integer*4 scgs2(nx,ny) (nx, ny are taken from a common).

In another source file, I have a subroutine that calls this function, so I defined

logical*4 use_SCGS_3D

in that subroutine.

I double checked that the function is not used anywhere but in the single, above mentioned subroutine.

I uninstalled Update 2 and installed Update 1 and my application is compiled and linked without any problems. I uninstalled Update 1, installed Update 2, and the problem occured again, so I assume it is something in Update 2, causing this problem. Since I can attach the code, I will try narrowing it down to a simple example, hoping that the problem persists.

Data Polymorphism in Intel Fortran Compiler 11.1

$
0
0

hello,

I have a simple code which defines a set of clsses. Please have a look at the attached file. I define a polymorphic variable using an allocatable class by " class (*) , allocatable :: alc ". The code compiles but when allocating the class at runtime, the code crashes and produces unhandeled exception error.

Is this a limitation of  Intel Fortran Compiler 11.1 or I am doing something wrong?? I also tried to define a polymorphic pointer and point it to "circle" or "rect" classes, but It produced the same error. Would you please help me with this issue. How can I define a polymorphic variable which may be either kinds of all "shape", "rect" or "circle" classes?

Following this problem, I am wondering if the Intel Fortran Compiler 11.1 does infact include all the standard features of Fortran 2003?

Thank you in advance

AttachmentSize
Downloadconsole1.f901.21 KB

Redistributing the MPI runtime environment components for mpif90

$
0
0

Hello,

  We have a program in a software suite that has been built using the mpif90 compiler and need to redistribute the necessary runtime environment components with it.  There will be seperate 32 and 64 bit programs so what to include with each seems a little hairy and we just wanted to include the MPI Library Runtime installer with our installer (which runs 'Installshield').  Is this ok (read 'legal')?  If not, what's the best way to accomplish what we want to do as there seem to be various installations for different architectures?

Can anyone provide some advice on this?

 

-Austen

What does this run-time check failure mean?

$
0
0

My program runs fine, but in debug  mode I get this message:

Does anyone know what kind of errors will cause this message?  Variable THISNAME is a *40 character variable.

AttachmentSize
Downloadcapture.png10.46 KB

How to pass an allocatable array to a subroutine?

$
0
0

I decided to create a new topic for my question that was answered in the discussion within another topic. My question was how to pass an allocatable array to a subroutine in general situations when the subroutine that the array was passed to passes it to another subroutine.

I'd like to thank jimdempseyatthecove for his short and self-explaining example how to do that. If I understand well, the correct way to pass an allocatable array is to define an explicit interface for the function that the arrays is passed to and to use the interface in the passing subroutine.

Looking into a static library

$
0
0

I have acquired various name.lib files, and I know they are static library projects built by Visual Studio Shell that came with various IVF (and CVF) applications over the years. I know that they contain various name.obj files, and I know that if I include all of the libs with my project that I can then call any of a whole bunch of name.obj subroutines. But how can I determine what obj files are in each lib?

In the old DOS days we built static libs using the LIB.EXE program, which had a simple (command-line) option to list the contents of a lib file.The only LIB.EXE program on my computer is version 3.15 (c) 1989, so it doesn't work well!

The only info I can find on line is that LIB still exists and is packaged with Visual Studio. But perhaps not the VS shell that we get with IVF? And if it is there, how do I use it?

IF Construct question

$
0
0

Does this have any special meaning or do anything other than document?

<name> IF <condition> THEN

<block>

ELSE IF <condition> THEN <name>

<block>

ELSE <name>

<block>

ENDIF <name>

I read the standard, but it doesn't even seem to mention the construct.  (Which I saw a developer use and is described in Metcalf among other books).


Intel fortran speed

$
0
0

Hello there,

I have a code that I used to run using Fortran powerstation. And, because of array size limitation of powestation, I had to go for Intel Fortran. What I noticed is that Intel fortran is very slow compared to Powerstation. My question is "Am I misusing Intel Fortran or it is possible that the Powerstation comiler is slower?" Any suggestions about how to speed up Intel Fortran.

Thank you,

Ashraf

502 Bad Gateway

$
0
0

I am seeing an awful lot of 502 Bad Gateway responses from the forum website. Are others seeing this as well?

I saw a post on /. a few days ago stating that several ISP's are implimenting CAS (Copyright Authentication Service). This is more DRM crap we have to put up with. (Should sue these DRM pushers for loss of productivity.) The article stated that internet response time may slow way down.

Jim Dempsey

AVX vs. SSE4.2 performance on Sandybridge

$
0
0

I took the sample vectorization code matrix_vector_multiplication_f and modifed it a little to use allocatable memory.  Then I compiled the code using two options: 1) /QxSSE4.2 and /QaxAVX; 2) /QxSSE4.2 and ran both on E5-2690.  I was expecting for the single precision an 8x peak performance improvement with AVX and a 4x improvement with SSE4.2 by vectorization.  But the results I got didn't match my expection.   I observed 4x using SSE comparing to novec version but only <5x speedup for AVX.  Did I miss anything?

I used Fortran compiler XE 13.0.1.119 and Visual Studio 2008 Version 9.0.30729.1 SP.  The OS is Windows Server 2008 R2 Standard SP1.  32-byte alignment and ipo are applied.  The baseline is compiled with -O1 and vectorized versions are compiled using -O3.  I also varied the number of columns of the array and noticed performance drops as the total data size reaches 32KB and 256KB.  I guess that is due to L1 and L2 cache miss.  Is it correct?

 

Distributing DLL's with statically linked ifort dependancies

$
0
0

Dear ifort developers and community members,

I have  aquestion regarding the distribution of ifort libraries.  Would I be violating Intel's terms and conditions if I distributed a version of my DLL with static linking to libmifcoremd.lib and libmmd.lib?  

Thank you

ComposerXE 2013 instalation problem

Viewing all 5691 articles
Browse latest View live


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