Quantcast
Channel: Intel® Fortran Compiler
Viewing all 3270 articles
Browse latest View live

LIBCMT.LIB external symbol error

$
0
0

Hi

I am compiling and linking code developed by another source. They have recently changed to using Fortran 11.1 so we are using the trial version of that compiler (previously using 9.1).

can you suggest the cause of the following errors?

libifcoremt.lib(for_init.obj) : error LNK2001: unresolved external symbol __imp_GetModuleHandleA
libifcoremt.lib(for_aio.obj) : error LNK2001: unresolved external symbol __imp_GetModuleHandleA
libifcoremt.lib(for_exit_handler.obj) : error LNK2001: unresolved external symbol __imp_GetModuleHandleA
libifcoremt.lib(for_diags_intel.obj) : error LNK2019: unresolved external symbol __imp_CreateFileA referenced in function for__dump_msg_buff
libifcoremt.lib(for_nt_open_proc.obj) : error LNK2001: unresolved external symbol __imp_CreateFileA
LIBCMT.lib(open.obj) : error LNK2001: unresolved external symbol __imp_CreateFileA
LIBCMT.lib(initcon.obj) : error LNK2001: unresolved external symbol __imp_CreateFileA
libifcoremt.lib(for_init.obj) : error LNK2019: unresolved external symbol __imp_SetErrorMode referenced in function for_rtl_init_wrap_
libifcoremt.lib(for_init.obj) : error LNK2019: unresolved external symbol __imp_GetCommandLineA referenced in function for_rtl_init_wrap_
LIBCMT.lib(crt0.obj) : error LNK2001: unresolved external symbol __imp_GetCommandLineA
libifcoremt.lib(for_init.obj) : error LNK2019: unresolved external symbol __imp_GetACP referenced in function for_rtl_init_wrap_
LIBCMT.lib(mbctype.obj) : error LNK2001: unresolved external symbol __imp_GetACP
LIBCMT.lib(getqloc.obj) : error LNK2001: unresolved external symbol __imp_GetACP
libifcoremt.lib(for_init.obj) : error LNK2019: unresolved external symbol __imp_SetConsoleCtrlHandler referenced in function for_rtl_init_wrap_
LIBCMT.lib(winsig.obj) : error LNK2001: unresolved external symbol __imp_SetConsoleCtrlHandler
libifcoremt.lib(for_aio.obj) : error LNK2019: unresolved external symbol __imp_DeleteCriticalSection referenced in function for__aio_destroy
LIBCMT.lib(mlock.obj) : error LNK2001: unresolved external symbol __imp_DeleteCriticalSection
LIBCMT.lib(ioinit.obj) : error LNK2001: unresolved external symbol __imp_DeleteCriticalSection
LIBCMT.lib(closeall.obj) : error LNK2001: unresolved external symbol __imp_DeleteCriticalSection
libifcoremt.lib(for_aio.obj) : error LNK2019: unresolved external symbol __imp_InitializeCriticalSection referenced in function for__aio_acquire_lun_fname

Many more of the same type

thanks

Alison

 


troubleshooting user subroutine with abaqus 6.10

$
0
0

Hi Dear,

 

Im trying to implement subroutine umat(user defined code is written in 2006- not sure which version of abaqus is used?! ) and run a job.However, i,m getting this error through  abaqus cae and cmd (attached file),i was wondering if you could help me out?i,m using abaqus 6.10 -VS2008-IVF 11 AND successfully run some examples from abaqus verification.i also can send my fortran file ( .for) and input abaqus file for more clarification if you require.

is it possible that mismatching abaqus version cause this kinda error?i mean running a subroutine(written code in 06) is it sensetive to abaqus versions(6.10)? 

any help really apreciated.

 

 

ERROr on cae :
 

The executable J:\SIMULIA\Abaqus\6.10-1\exec\standard.exe aborted with system error code 144. Please check the .dat, .msg, and .sta files for error messages if the files exist.  If there are no error messages and you cannot resolve the problem, please run the command "abaqus job=support information=support" to report and save your system information.  Use the same command to run Abaqus that you used when the problem occurred.  Please contact your local Abaqus support office and send them the input file, the file support.log which you just created, the executable name, and the error code.

 

With regards,

Milad

AttachmentSize
Downloaderr1.png31.21 KB

Slow Array Initialisation

$
0
0

I'm running Intel Fortran 14 on Linux. 

In my code I have three allocatable 2D arrays (one integer and the other two logical) that are defined in a module header, then allocated before calling subroutine X. The arrays are then initialised (to zero and false) at the start of X. Profiling tools like gprof and callgrind are indicating that the time to initialise the arrays is significantly longer that the actual runtime of the calculation in X, which seems like nonsense seeing that the arrays are small (50x50). I don't see any performance issues with array initialisation elsewhere in the code.

Could anyone offer any suggestions as to what may be happening?

Intel Fortran Static Library with OpenMP enabled

$
0
0

Hello,

In our group, we work with different versions of Intel Visual Fortran. Recently, we have included some parallelization directives in some subroutines. It seems that when we create a static library with an older version of Intel Fortran that includes OpenMP parallelization, this library cannot run properly in a new version of Intel Visual Fortran, producing a run-time error. Is this normal? Would it be any way around it? When we do not include processing for OpenMP directives, the functioning of the library is proper. Thank you very much.

Programming and Compiling for Intel® Many Integrated Core Architecture

$
0
0

Compiler Methodology for Intel® MIC Architecture

This article is part of the Intel® Modern Code Developer Community documentation which supports developers in leveraging application performance in code through a systematic step-by-step optimization framework methodology. This article addresses: parallelization.

 

This methodology enables you to determine your application's suitability for performance gains using Intel® Many Integrated Core Architecture (Intel® MIC Architecture). The following links will allow you to understand the programming environment and help you evaluate the suitability of your app to the Intel Xeon and MIC environment.

Because of the rich and varied programming environments provided by the Intel Xeon and Xeon Phi processors, the Intel compilers offer a wide variety of switches and options for controlling the executable code that they produce.  This chapter provides the information necessary to insure that a user gets the maximum benefit from the compilers.

The Intel® MIC Architecture provides two principal programming models: the native model covers compiling applications to run directly on the coprocessor, the heterogeneous offload model covers running a main host program and offloading work to the coprocessor, including standard offload and the Cilk_Offload model.  The following chapter gives you insights into the applicability of these models to your application.

The third level of parallelism associated with code modernization is vectorization and SIMD instructions.  The Intel compilers recognize a broad array of vector constructs and are capable of enabling significant performance boosts for both scalar and vector code.  The following chapter provides detailed information on ways to maximize your vector performance.

The final chapter in the section provides insight into some advanced optimization topics.  Included are discussions of floating point accuracy, data movement, thread scheduling, and many more. This is a good chapter for users still not seeing their desired performance OR are looking for the last level of performance enhancements.

The Intel® MIC Architecture provides two principal programming models: the native model covers compiling applications to run directly on the coprocessor, the heterogeneous offload model covers running a main host program and offloading work to the coprocessor, including standard offload and the Cilk_Offload model.  The following chapter gives you insights into the applicability of these models to your application.

  • Developers
  • Linux*
  • C/C++
  • Fortran
  • Advanced
  • Beginner
  • Intermediate
  • Intel® Parallel Studio XE
  • Intel® C++ Compiler
  • Intel® Fortran Compiler
  • Intel® Fortran Composer XE
  • Intel® Composer XE
  • Intel® C++ Composer XE
  • Intel® C++ Studio XE
  • Intel® Cluster Studio XE
  • OpenMP*
  • Code Modernization
  • Intel® Many Integrated Core Architecture
  • Optimization
  • Threading
  • Vectorization
  • URL
  • Compiler Topics
  • Learning Lab
  • Featured Product Support
  • C-Compiler-Learn
  • F-Compiler-Learn
  • Last Edited by: 

    AmandaS (Intel)

    Please help with error LNK2019

    $
    0
    0

     

    Hello, I am trying to build and compile a Fortran 77 program in Visual Studio 2013, using Intel Fortran.

    The program consists of a main .for file, and many .for and .f subroutines. To run it, I create a new Fortran console project, and load all the .for and .f files. Then, when I try to build, I get the following error:

    Error    1     error LNK2019: unresolved external symbol _MAIN__ referenced in function _main    libifcoremdd.lib(for_main.obj)    
    Error    2     fatal error LNK1120: 1 unresolved externals    Debug\test.exe    

     

    What am I doing wrong?

     

    Casting a dynamic 1D array into a dynamic 2D array without copying data

    $
    0
    0

    Hi All,

    I have the following problem. I want to cast a 1D array into column of 2D array in a loop. At 1st iteration the size of this 2D array is same as the 1D array. So. There should be no problem to cast it. At 2nd iteration, 1D array is going to have different elements. I want to cast it to 2nd column of 2D array.

    This procedure continues till the norm of elements of 2D array is less than tolerance and it stops there. There,  I can not guess the number of columns of 2D array to allocate it before starting calculation...

    here are three codes I have tried. None of them work for me :

    program ptrtest
    
     real, pointer, CONTIGUOUS :: Mr(:)
     real, pointer, CONTIGUOUS :: Mp(:,:)
     real, DIMENSION(9) ::abc
    
    
     integer :: n = 2
     iter=3
    
     Do i=1,iter
    
     alpha2 = 2
     allocate(Mr(n**2))
     abc= 42
    
     Mr(1:n**2) = 0.5 * abc(1:n**2)
     write(*,*) 'Mr='
     write(*,555) Mr
    
     Mr(1:n**2) => Mp(1:n**2,1:1)
    
     WRITE(*,*) 'Mp='
     WRITE(*,555) Mp
    
     end do
    
     555  FORMAT(F12.4,1X)
    
    
     end program ptrtest

    ----------------------------------------------------------------------------------------------------

     

    program ptrtest
    
     real, pointer, CONTIGUOUS :: Mr(:)
     real, pointer, CONTIGUOUS :: Mp(:,:)
     real, DIMENSION(9) ::abc
    
    
     integer :: n = 2
     iter=3
    
     Do i=1,iter
    
     alpha2 = 2
     allocate(Mr(n**2))
     abc= 42
    
     Mr(1:n**2) = 0.5 * abc(1:n**2)
     write(*,*) 'Mr='
     write(*,555) Mr
    
     do j = 1, iter
        Mp(:, j) = Mr
     end do
    
     WRITE(*,*) 'Mp='
     WRITE(*,555) Mp
    
     end do
    
     555  FORMAT(F12.4,1X)
    
    
     end program ptrtest

     

    ----------------------------------------------------------------------------------------------------

    program ptrtest
       
       real :: start, finish
       real, pointer :: Mr(:)
       real, pointer,CONTIGUOUS :: Mp(:,:)
       real, DIMENSION(4) ::abc

     
       integer :: n = 2
       
       
       call cpu_time(start)
       iter=2
       alpha2 = 2
       
       Do i=1,iter
       
       allocate(Mp(n**2,i))
       allocate(Mr(n**2))

       data abc/1,2,3,4/
       
       Mr(1:n**2) = 0.5 * abc(1:4)
       write(*,*) 'Mr='
       write(*,555) Mr
       

       Mp = TRANSFER (Mr,1.0)

          
       WRITE(*,*) 'Mp='
       WRITE(*,555) Mp
       
       end do
         
    555 FORMAT(F12.4,1X)
       call cpu_time(finish)
       print '("Time = ",f10.7," seconds.")', finish-start
    end program ptrtest

     

     

     

    Moving to iFort from gFortran

    $
    0
    0

    From a command line, I had a couple of scripts which did the following:

    To compile:

              gFortran -c %1.f95

    Then to put each object and MOD into a static library:

              ar r MyLib.a %1.o %1,mod

    And finally to compile the main program, link it, and create an EXE

    gfortran -o Test Test.f90 MyLib.a

    I would like to do the same with iFort, xilink, etc. How do I accomplish this ? PS, I hate make so please don't suggest it.

    Thanks,

    Brooks Van Horn


    Intel fortran command problem

    $
    0
    0

    Hi All,

    I have two question for you.

    First, i need to run source intel/composer_xe_2015.3.187/bin/compilervars.sh intel64 every time I open a terminal in ubuntu to be able to use ifort command. what should I do to solve this problem.

    second, I am using Geany and I am really get used to it. how can i set it to use ifort. i have tried to change the build commands to ifort. however, it is not working.

     

    Composer 15 can't find MKL

    $
    0
    0

    Hi.  I just installed Composer 15 and the associated MKL libraries and integrated them with my previously existing version of Parallel Studio 2010.  The web told me that Composer 15 would replace Composer 13, which I had not uninstalled, but it appears to have installed Composer 15 in its own folder, while leaving Composer 13 alone. 

    I rebooted my computer and tried to compile and link some code using a makefile.  I got the following errors:

    Wal83.f(5): error #7002: Error in opening the compiled module file.  Check INCLUDE paths.   [MKL95_LAPACK]

          USE mkl95_LAPACK, ONLY: GEEV

    ----------^

    Wal83.f(241): error #6406: Conflicting attributes or multiple declaration of name.   [GEEV]

            CALL GEEV(TestMat,WR,WI,INFO=INFO)

    -------------^

    Wal83.f(5): error #6580: Name in only-list does not exist.   [GEEV]

          USE mkl95_LAPACK, ONLY: GEEV

    ------------------------------^

    compilation aborted for Wal83.f (code 1)

    NMAKE : fatal error U1077: '"C:\Program Files (x86)\Intel\Composer XE 2015\bin\intel64\ifort.EXE"' :

     return code '0x1'

    Stop.

    According to information given at https://software.intel.com/en-us/node/528327, I ran the following command from the command line, while in the following directory: C:\Program Files (x86)\Intel\Composer XE 2015\mkl\bin.

    mklvars intel64 mod

    I tried running the makefile again, rebooted my computer again, and tried running the makefile a third time.  Each time I got the same errors as before.

    It appears that the compiler can’t find the mkl library, but I don’t know what else to do to set the path.

    The code for the makefile I am using for composer 2015 is:

    LINCL=C:\Program Files (x86)\Intel\Composer XE 2015\mkl\include

    LINCL_95=C:\Program Files (x86)\Intel\Composer XE 2015\mkl\include\intel64\lp64

    L1=C:\Program Files (x86)\Intel\Composer XE 2015\mkl\lib\intel64\mkl_intel_lp64.lib

    L2=C:\Program Files (x86)\Intel\Composer XE 2015\mkl\lib\intel64\mkl_intel_thread.lib

    L3=C:\Program Files (x86)\Intel\Composer XE 2015\mkl\lib\intel64\mkl_core.lib

    L4=C:\Program Files (x86)\Intel\Composer XE 2015\mkl\lib\intel64\mkl_sequential.lib

    L5=C:\Program Files (x86)\Intel\Composer XE 2015\mkl\lib\intel64\mkl_blas95_lp64.lib

    L6=C:\Program Files (x86)\Intel\Composer XE 2015\mkl\lib\intel64\mkl_lapack95_lp64.lib

    all:

          ifort /I"$(LINCL)" /I"$(LINCL_95)" Wal83.f Wmod83.f ModApril2013.f  \

          "$(L1)""$(L2)""$(L3)""$(L4)""$(L5)""$(L6)"

    cls:

          del -f *.obj *.exe *.log

    If anyone can help me, I would be most grateful!

    Rebecca

          

    how to configure the intel mpi in visual studio 2012

    $
    0
    0

    HI friends,

    I want to know how to configure and setup the intel mpi in vs2012,so I counld debug and run the mpi code in vs2012.

    my mpi version is 5.0.1.037.

    thanks

    is there a intel mpi Library for mac os platform?

    $
    0
    0

    Hi friends,

    is there a intel mpi Library for mac os platform?when I browse the intel mpi download page,there are only windows and linux verison,is this means I can only using linux version in mac os?how can I install this?

    thanks.

    Internal read: want to read an integer into a real variable

    $
    0
    0

    I want to use an internal read as follows:

    if (iStnPress /= 99999) read(iStnPress, '(f5.1)') StnPress

    Here, iStnPress is declared an integer; StnPress is declared real.

    Before the line is executed, iStnPress has been read as '9245'.

    My hope was to have StnPress be set to '924.5'

    Unfortunately, I get a runtime crash w/ IVF, with the hint that it's taking '9245' to be a unit number.

    Any thoughts?  Am I trying to do the impossible?

     

     

    Fortran calling vb.net

    $
    0
    0

    Is it possible to call vb.net from fortran?  If so, is there an example available anywhere, or can someone please describe the syntax for doing this.

    I really do mean going from fortran to vb.net.  Which is the opposite way from what most people want to do.

    Compiling and Linking Fortran Code with external modules and libraries

    $
    0
    0

    Dear all,

    I am trying to create a fortran program. I have already done this in Windows and using Visual Studio.

    In linux I am using ifort (ifort (IFORT) 14.0.2 20140120).

    I am very new to this. I appreciate your help. I will explain the procedure I am taking below.

    I have my source code ( File1.f90, File2.f90, File3.f90 and main.f90) and then I have a folder full of external libraries (*.a and *.mod )

    I have not written these libraries nor I have any idea which compiler was used to compile and create those libraries.

    I try to first compile my files using the following:

    File1.90  and File2.f90 are not using these external libraries while File3.90 is using these external libraries. At last main.f90 is using File3.90. In order to compile I have used the following commands:

    ifort -c File1.f90

    ifort -c File2.f90

    ifort -c File3.f90 -I  mylib&modulesDirectoryAddress     

    ifort -c main.f90  -I  mylib&modulesDirectoryAddress

    All files are compiled successfully but when I try to link them using the following command I ran in to error :

    ifort  File1.o File2.o File3.o main.o -I  mylib&modulesDirectoryAddress

    The error is this:

    File3.f90 undefined reference to `m_get_mp_myFunction_'

    myFunction is a function that I call inside File3.f90 from one of the external modules/libraries.

     subroutine File3_internalFunction
        use externalModule, only : myFunction
          implicit none

          !external
          character(len=*), intent(in) :: fname
          integer,          intent(in) :: timeStep
          character(len=32), intent(in)::  vname
          real, pointer   :: varValue(:)
          logical:: stopIfNotPresent
          character(len=256) ::  firstPartOfString
          character(len=80) ::  outpStr

          varValue => myFunction(fname, vname, timeStep)
       
        end subroutine

    Could you please let me know what is the possible reason that I am getting the above error?  Also do I need to have additional compile or link options that I am missing right now ? I am coming from Visual Studio and I am  quite confused how to get the same exectuable here?

    Also are there any system-dependent options that I will need to define?I am trying to get an executable for 64-bit Linux systems.

    I would really appreciate your help.

    Thank you very much in Advance for your help.

    Kind Regards,

    Heli

     

     


    Preprocessor conditional compilation

    $
    0
    0

    Hello all, I have a general question regarding Fortran syntax (not this forum?).  I have a series of include files that set up memory structures, and those include files may also chain-include other files.....in this case, some "parameter definition" files.  For example:

    INCLUDE 'MEMORY_PARMS.TEXT'
    
    STRUCTURE    /SOME_ARRAY/
        INTEGER*4    ID
        REAL*4    SOMEVARX(COUNT)
        REAL*4    SOMEVARY(COUNT)
    END STRUCTURE

    ...and 'MEMORY_PARMS.TEXT' contains the following:

    !DIR$ IF .NOT. DEFINED(_MEMORY_PARMS_TEXT_)
    !DIR$ DEFINE _MEMORY_PARMS_TEXT_
    
      INTEGER*4  COUNT
      PARAMETER (COUNT = 1000)
    !DIR$ ENDIF

    This is just a small example -- we are trying to use a single "parameters" file to tune the scalability of our program, rather than having to go through dozens of source files to change hundreds of array sizes, etc.  This works great for single-routine files, but the problem is when someone codes a file that has more than one subroutine definition inside.....the first routine that includes the common block chain-includes the MEMORY_PARMS.TEXT file, defines the COUNT variable, and works.  The second routine, however, includes the same common block, but the preprocessor dutifully doesn't redefine the COUNT variable (since _MEMORY_PARMS_TEXT_ was defined by the first pass through while compiling the first routine), and the compilation fails.  The goal of the preprocessor directives was to avoid variable redefinition errors if multiple INCLUDEd files brought in the same params file in the same routine, however we didn't consider the case of how to "reset" this behavior in the case of a subsequent subroutine in the same compilation unit.  I was hoping there would be a preprocessor macro called something like __MODULE__ or __ROUTINE__ which some fancy fpp DEFINE logic can compare-test and then set if it's different, but alas, there appears to be no such macro.

    Anyone have any thoughts?

    Thanks.

    error with deferred size character array with fixed length

    $
    0
    0

    I have a module that does this (among other things):

    module tryit
    implicit none

    character(len=:),allocatable,dimension(:),save :: subtitle

    contains

    subroutine setSubTitle(lines)
    character(len=*),dimension(:) :: lines
    subtitle=lines
    end subroutine setSubTitle

    subroutine getSubTitle ( lines )
    character(len=*),dimension(:),intent(out) :: lines
    if (allocated(subtitle)) lines = subtitle
    end subroutine getSubTitle

    end

    This works fine. But I had a reason to consider making the length of subtitle a constant, e.g.:

    character(len=60),allocatable,dimension(:),save :: subtitle

    This crashes on the first reference to subtitle *after* the assignment. Should this work?

    In each case I tried the actual argument passed as lines was a static array, e.g.:

    character(len=220),save :: buffer(20)

    call setSubTitles(buffer(3:9))

     

    compaq fortran project generates 8284 error message

    $
    0
    0

    I have a LIB project I've been using for years with Compaq fortran.  When I compile it with Intel Fortran I get many error 8284's because scalers are being passed into array arguments in subroutine calls.

    Is there a compiler option in Intel Fortran to allow this?

    OpenMP and /QopenMP switch

    $
    0
    0

    Hello,

    I encountered an issue due to openMP. The results from the sequential code is OK while the parallel one is wrong and random (suggesting a race condition). The structure looks like this :

    !$OMP DO PRIVATE{i,j,var3}
    do i = 1, n
    [blabla...]
    
       do j=1,jj
          a = interpol( var1(i), j,  var3)
       end do
    
    [blabla...]
    end do
    !$OMP END DO
    

    where interpol is a library function with no common, share variable nor "save" attribute at all. Adding !$OMP CRITICAL  around the inner do loop solves the issue but a significant part of the parallelization gain is lost. 

    Eventually I solved the issue by adding the /Qopenmp switch to the library compilation, even though there no OMP directive at all in the code. So problem solve but I missing the why and thus doubt about the robustness of the fix. 

    Can somebody explain me the effect of the /Qopenmp switch when there is no OMP directive ?

       Thanks,

    Guillaume

     

     

     

    ifortvars.bat not found

    $
    0
    0

    i install Intel Composer XE 2015 but i don´t find ifortvars.bat. Can someone Help to solve this problem?

     

    AttachmentSize
    DownloadUnbenannt.jpg81.79 KB
    Viewing all 3270 articles
    Browse latest View live


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