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

debugging jumps around randomly

$
0
0

When stepping through code a line at a time with F8 in the visual studio debugger, execution seems to jump around randomly.  What causes this and how do I fix it?


what's wrong with this IF statement

$
0
0

Is there a problem with the following syntax?  Even though IOUT is .false. and IHEAD=1 and ITAIL=400, the code still runs the statement inside the IF.  I can even select the entire expression inside the IF (   )  and the debugger says it evaluates to FALSE.  What the heck is going on?

        IF (IOUT .OR. IHEAD .GT. ITAIL) THEN
           CALL UMD2ER (1, ICNTL, INFO, -3, INFO (19))
        ENDIF 

 

Within Fortran, Call Matlab

$
0
0

Hi,

I have a question about how to call Matlab script within Fortran, which performs Matlab parallel computing "parfor" syntax. Basically, I am solving a problem in Fortran which is mainly a Do-Loop. For each iteration, I write out a series from Fortran for a Matlab script to read in, process through "parfor", and write back to Fortran. Fortran iteration continues until convergence.

In my Fortran codes, I use call system to let the shell return to Linux commands and call matlab, run matlab script, exit matlab and return to Fortran.

      CALL system(" matlab -nodesktop -nojvm -r 'Matlab_script; exit'")

The codes look like the above. ifort compiles the entire program with no problem. Also, the entire Fortran program runs fine and the results are correct.

However, the problem is that within Matlab_script.m, a matlab parfor loop should be executed. Rather, the loop was executed in plain "for, ..., end" loop. It takes so long for Fortran to get back the matlab processed results. I tested the Matlab_script.m without Fortran call system() and the parfor loop goes fine. 

Does anyone know

1. is there a better way to let Fortran handle over to Matlab to process, wait and get back the results besides Call System() ?

2. Why call system does not implement the matlab parfor function?  

Please advise. Thank you so much!

Calvin

 

Problem installing Intel Fortran Compiler XE 2015 on Linux

$
0
0

Hi,

I am having troubles downloading intel fortran/c++ compiler 15 (professional) linux (specifically CentOS 6.6)

I have followed the instructions.

1. I extracted the tgz archive 

2. I ran the install.sh script (activated 31 day trial)

3. ran the advixe-vars.sh script

So it should be complete at this point? I try running 

ifort -v

and the command is not recognized.

 

Secondly, I have tried adding the following to my .bashrc file:

export LDLIBRARYPATH="/opt/intel/advisor_xe/lib64"

export DYLDLIBRARYPATH="/opt/intel/advisor_xe/lib64"

export MANPATH="/opt/intel/advisor_xe/man"

export PATH=/opt/intel/advisor_xe/bin64:$PATH

 

with the same results

executable hanging in OpenMP region

$
0
0

We updated from version 13.1 of the compiler to 15.0.2.179 for a large CFD FORTRAN code and started having cases of the solver hanging: sitting in memory with 0% CPU used. Here are the observations so far:

1. happens only on Windows.

2. running on a single thread works fine.

3. the executable runs for a while before it hangs. restarting the solver from an intermediate time runs fine.

4. for the cases we have so far, it hangs in different parts of the code, but for a given case it always hangs at the same location.

Here is a code snippet where it happens in one of the cases. This is a sub-section of a large subroutine. This code is invoked several million times before the solver hangs:

c Here we are adding a column to the Hessenburg matrix (hmatrix)
        do kk=1,igfy
          hmatrix(kk,igfy)=zero
          do n=1,numthrds
            flp_lcl(1,n)=hmatrix(kk,igfy)
          enddo
c
          do nbl=1,nblcks
! divide the loop between threads
            call load_bal(0,ijklim(nbl,1),nijkpr(nbl)) ! NBL is a global variable, comes from a module
!$omp parallel do schedule(static,1)
!$omp& private(n,nn,ijk)
            do n=1,numthrds ! loop over threads
              do nn=klo(n),khi(n)
                ijk=ijkpr(nn)
                flp_lcl(1,n)=flp_lcl(1,n)+vvect(ijk,igfyp1)*vvect(ijk,kk)
              enddo

! PUTTING A PRINT STATEMENT HERE PRINTS ALL THREADS.
            enddo ! THIS IS THE LINE WHERE IT HANGS.
          enddo

Could this have been resolved in version 15.4 or 16.0 of the compiler?

Thank you for any help you can provide.

Michael

debug error

$
0
0

Hello,

I recently upgraded both a desktop and laptop to VS2015 (community) and Fortran Composer XE 2016.  Everything works fine on the desktop, but the debugger doesn't work on the laptop.  When I attempt to debug the exact same solution on the laptop, I receive the message "Frame not in module", under which there is the message "The current stack frame was not found in a loaded module. Source cannot be shown for this location".  I guess there is a setting somewhere that needs fixing, but I do not know where to start.  Any assistance would be greatly appreciated.

Best regards,

Justin.

 

Error #6634. COMMON Variable is being passed to C

$
0
0

Hello,

I am currently trying to convert our Powerstation 4.0 Fortran code to Intel Visual Fortran to achieve better debugging possibies. The application is a mix between C, C++ and Fortran 77. A lot of posts in this forum helped me a great deal to walk this path. But now I encountered an error, where I don't know how to solve it properly.

I recieve the following two errors, which both relate to the line CALL SPROT(LFL) in x.f:

error #6633: The type of the actual argument differs from the type of the dummy argument.   [LFL]

error #6634: The shape matching rules of actual arguments and dummy arguments have been violated.   [LFL]

They are obviously both closely related, but since I am a beginner in Fortran, I don't know how to declare LFL or modify the Interface declaration to have them work together without changing the way the COMMON block is adressed, because it is used in a lot of other places in the program.

 

cmodule.f90:

    module cmodule

    !DllExport int WINAPI sprot(char* cBuf)
    Interface
    subroutine SPROT (cBuf) &
        BIND(C, name="SPROT")
    use, INTRINSIC :: ISO_C_BINDING
    IMPLICIT NONE
    !DEC$ ATTRIBUTES STDCALL :: SPROT
    character cBuf
    end subroutine SPROT
    end interface

    end module

x.f:

        SUBROUTINE STDAUS
        use cmodule

        COMMON /CWRI
     1  / NF,NF0,LFL(1058),LFT(128),LFS(16,
     1  200
     2  )
C       ...
        CALL SPROT(LFL)
C       ...
        END SUBROUTINE

 

Repeat count with DT edit descriptor crashes

$
0
0

When using a repeat count for the DT edit descriptor, a read statement crashes:

module m_test
    type t1
        integer :: a
      contains
        procedure, private :: r_t1
        generic :: read(formatted) => r_t1
    end type

  
    contains
        subroutine r_t1(dtv, unit, iotype, vlist, iostat, iomsg)
            class(t1),          intent(inout)   :: dtv
            integer,            intent(in)      :: unit
            character(len=*),   intent(in)      :: iotype
            integer,            intent(in)      :: vlist(:)
            integer,            intent(out)     :: iostat
            character(len=*),   intent(inout)   :: iomsg
            read(unit, fmt="(i4)", iostat=iostat, iomsg=iomsg) dtv%a
        end subroutine
end module

program test
    use m_test
   
    character(len=:), allocatable :: str
    type(t1) :: x,y,z
    integer  :: i,j,k
    str="111122223333444455555"
    read(str, fmt="(3i4)") i,j,k
    print *, i,j,k
    read(str, fmt="(DT,DT,DT)") x,y,z
    print *, x%a, y%a, z%a
    read(str, fmt="(3DT)") x,y,z
    print *, x%a, y%a, z%a
end program
C:\TEMP>ifort test.f90 /standard-semantics
Intel(R) Visual Fortran Intel(R) 64 Compiler XE for applications running on Intel(R) 64, Version 15.0.4.221 Build 20150407
Copyright (C) 1985-2015 Intel Corporation.  All rights reserved.

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

-out:test.exe
-subsystem:console
test.obj

C:\TEMP>test
 1111 2222 3333
 1111 2222 3333
forrtl: severe (24): end-of-file during read, unit -5, file Internal Formatted Read
Image              PC                Routine            Line        Source
test.exe           00007FF7A26AACC9  Unknown               Unknown  Unknown
test.exe           00007FF7A26974C3  Unknown               Unknown  Unknown
test.exe           00007FF7A26916BC  Unknown               Unknown  Unknown
test.exe           00007FF7A270021E  Unknown               Unknown  Unknown
test.exe           00007FF7A26E9494  Unknown               Unknown  Unknown
KERNEL32.DLL       00007FF9814816AD  Unknown               Unknown  Unknown
ntdll.dll          00007FF982BC34A5  Unknown               Unknown  Unknown

C:\TEMP>

I cannot see an exception in the standard (Fortran 2008) forbidding the use of a repeat count with the DT edit descriptor. I tried some variants like 3(DT), 3(DT(1)), 3DT'x', they all fail.

 


v16 compiler breaks code

$
0
0

I have a complicated real-time dll signal processor project that has been compiling without problems with Composer Professional Edition v15.3. This project is part of a commercial product that is current available for sale. Today I tried the new release of v16 and it seriously broke the project. It built OK (no error messages) and the dll doesn't crash. (I know this because it passed metering information about the input to the host application, an MS C++ project). However, the v16 build did not pass signal to the processing or output, even when run in a simplified "bypass" mode that basically connects the input to the output.

The code uses IMPLICIT NONE and modules for everything, to give the subroutines and functions explicit interfaces. It uses the standard F2003 C interoperability features. For the sake of execution speed (enormously important in this application), I did not use any of the fancy new F2003 OO features like type-bound procedures, assuming that the compiler's support for conventional subroutines and functions would be more mature and optimization would likely be better. Bottom line: the project is written in a conservative, standards-based style that attempts to maximize both the ability of the code be to be optimized and the compiler's ability to detect errors. There is no code in it that could trigger some of the bugs in cutting-edge features that have been reported on this forum.

I tried turning off optimization, but this did not help.

I did a System Restore in Windows to restore the v15.3 compiler, rebuilt the project, and the dll works again.

It later occurred to me that maybe the redistributable libraries did not update properly on my build machine, but V16 does not yet show up in the Intel "Redistributable library" page.

I know that this is all very vague, but I really haven't a clue as to how to troubleshoot the problem (other than to check the libraries). Unfortunately, the realtime nature of the project requires optimization for speed for it to work without creating gaps in the signal (due to newer input being received before the previous input could be processed). So I don't think that the debugger can be used. (After doing some testing in an earlier version of my code with runtime features turned on to detect possible out-of-bounds arrays, I have since been debugging with traditional bench tools like oscilloscopes and spectrum analyzers.)

So I'm not expecting an answer, but wanted to report the problem. For the moment, I will stick with v15.3 and get on with it.

"fatal error LNK1104: cannot open file 'uuid.lib'" and "WindowsSdkDir not found"

$
0
0

Hello,

I have Intel visual Fortran 11.0 and Microsoft Visual Studio 2008 on my system to compile my user-defined subroutines dll to run them with Adina software. I was able to compile my code in widows command console using the makefile that Adina provides. Recently, I installed visual studio 2015 to work on some C# codes. In order to be able to compile the C# codes in windows command console, I edited the path system variable to C:\Windows\Microsoft.NET\Framework64\v4.0.30319. However, I noticed that I am not able to compile Adina anymore. The error message after running Adina makefile was:

Microsoft (R) Program Maintenance Utility Version 9.00.21022.08

Copyright (C) Microsoft Corporation.  All rights reserved.

Could Not Find C:\ADINA89\usrdll64\adusr.*

        link.exe /OUT:"adusr.dll" /INCREMENTAL:NO /NOLOGO /MANIFEST /MANIFESTFIL

E:"adusr.dll.intermediate.manifest" /SUBSYSTEM:WINDOWS /IMPLIB:"adusr.lib" /DLL

ovl20u.obj ovl30u.obj ovl40u.obj ovl50u.obj ovl60u.obj  ovl100u.obj ovl110u.obj

ovl160u.obj ovl170u.obj  ovl30tu.obj ovl40tu.obj ovl90tu.obj  ovl20u_vp1.obj ovl

30u_vp1.obj ovl40u_vp1.obj ovlusr.obj

LINK : fatal error LNK1104: cannot open file 'uuid.lib'

NMAKE : fatal error U1077: '"c:\Program Files (x86)\Microsoft Visual Studio 9.0\

VC\BIN\amd64\link.exe"' : return code '0x450'

Stop.

I tried to set the ifortdir again and I got the following massage:

Setting environment for using Microsoft Visual Studio 2008 Beta2 x64 tools.

WindowsSdkDir not found

I added the variable “WindowsSdkDir” with the value of “C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A”, yet it did not work.
I will appreciate if someone can give me a hint to fix the problem.

P.S.

I can compile and build FORTRAN codes using visual studio 2008 but not using the windows command console and Adina makefile. 

Conformity error (#6366)

$
0
0

I don't recall getting his compilation error:

error #6366: The shapes of the array expressions do not conform.

I researched it some and none of the other situations seemed to fit mine. I'm embedding the entire code here:

Program Poppe

!Input parameters are:
!Pa          Atmospheric pressure (Pa)
!Qw_in       Water inlet mass flow rate (kg/s)
!Tw_in       Water inlet temp. (K)
!Tw_out      Water outlet temp. (K)
!Qa          Air mass flow rate (kg/s)
!Wa_in       Air inlet humidity ratio   {kg vapor /kg dry air
!Wa_out_est  Est. outlet air humidity ratio
!Ha_in       Air inlet enthalpy (J/kg)
!N           Number of intervals through the fill

!Variable definitions:
!DelTwlev  Water temp. drop across a single level.


!Local variables:
implicit none
real(4) :: i_fgwo, cp_a, cp_v, DeltaTwLev, wa, wo_new, wo_old, Tref2, F1, F2, F3, F4
real(4), dimension (10) :: TwLev, WaLev, HaLev, p_vsw, w_sw, RatioQw_Qa, H_masw, H_v, Le_f, cp_w, dw_dtw, dima_dTw
real(4) :: delta1, z
integer(4) :: j, k !Dummies.

!Initialize the input parameters:
real(4), parameter    :: Tref       =   273.15       !Reference temp. (K)
real(4), parameter    :: Pa         = 10172.27       !Atmospheric pressure (Pa)
real(4), parameter    :: Qw_in      =     3.99       !Water inlet mass flow rate (kg/s)
real(4), parameter    :: Tw_in      =   312.82       !Water inlet temp. (K)
real(4), parameter    :: Tw_out     =   300.92       !Water outlet temp. (K)
real(4), parameter    :: Qa         =     4.134      !Air mass flow rate (kg/s)
real(4), parameter    :: Wa_in      =     0.00616336 !Air inlet humidity ratio
real(4), parameter    :: Wa_out_est =     0.02226    !Est. outlet air humidity ratio
real(4), parameter    :: Ha_in      = 25291.87496    !Air inlet enthalpy (J/kg)
integer(4), parameter :: N          = 10             !Number of intervals through the fill

!NB: This system is designed for UNsaturated plume conditions.
!Establish some constants for later use:
i_fgwo = 3483181.4 - 5862.7703*Tref - 12.139568*Tref**2 - 0.0140290431*Tref**3    !Latent heat of vaporization, J/K (Eqn. A.4.5)

      DeltaTwLev = (Tw_in - Tw_Out)/N !Ave. temp drop over single level. (Eqn. 3.64)

!     Initialize several variables for later use:
      do j = 0,N
        TwLev(j) = Tw_out + j*DeltaTwLev !Calculate the water temperature at this level. (Eqn. 3.63)
        WaLev(j) = Wa_in                 !Initialize the humidity ratio at this level.   (Eqn. ?)
        HaLev(j) = Ha_in                 !Initialize the air enthalpy at this level.     (Eqn. ?)
      enddo

      wa     = Wa_out_est !Est. an initial value for the outlet air humidity ratio which is determined iteratively.
      delta1 = 1          !Seed value
      wo_new = Wa_out_est !Est. outlet air humidity ratio

      Do while (delta1 > 1.0e-07) !Iteration to obtain outlet air humidity ratio for the calculation of mw/ma(subj):
        wo_old = wo_new
        do k = 0,N
          Tref2       = (TwLev(k) + Tref)/2.0 !Special reference temp. (K)
          cp_w        = 8155.9 - 28.0627*Tref2 + 0.0511283*Tref2**2 - 2.17582e-13*Tref2**6 !Specific heat of water (J/kg•K); Eqn. A.4.2
          z           = 10.79586*(1.0-(Tref/TwLev(k))) + 5.02808*log10(1.0-(Tref/TwLev(k))) + 0.000150474*(1.0-10.0**(-8.29692*((TwLev(k)/Tref)-1.0))) + 0.00042873*(10.0**(4.76955*(1.0-(Tref/TwLev(k))-1.0)) + 2.786118312 )
          p_vsw(k)    = 10**z !Vapor pressure @ saturation water temp. (N/m2)	(Eqn. A.2.1)

          w_sw(k)     = (2501.6 - 2.3263*(TwLev(k)-Tref) / 2501.6 + 1.8577*(TwLev(k)-Tref) - 4.184*(TwLev(k)-Tref)) * (0.62509*p_vsw(k) / (Pa-1.005*p_vsw(k)) ) - ( 1.00414*(TwLev(k)-TwLev(k)) / (2501.6 + 1.8577*( TwLev(k)-Tref) - 4.184*(TwLev(k)-Tref))) !(Eqn. A.3.5)
          RatioQw_Qa  = (Qw_in/Qa)*( 1.0 - (Qw_in/Qa)*(wa-WaLev(k)))  !Uses outlet humidity ratio (wa) assumed above. (Eqn. 3.32)

          cp_a   = 1045.356 - 0.03161783*Tref2 + 0.0007083814*Tref2**2 - 2.705209e-07*Tref2**3 !Specific heat of air   (J/kg•K) @Tref (Eqn. A.1.2)
          cp_v   = 0.0013605 + 2.31334*Tref2 - 2.46784e-10*Tref2**5 + 5.91332E-13*Tref2**6     !Specific heat of vapor (J/kg•K) @Tref (Eqn. A.2.2)

          H_masw(k)   = cp_a*(TwLev(k)-Tref) + w_sw(k)*i_fgwo*Tref+w_sw(k) * cp_v*(TwLev(k)-Tref) !Enthalpy (Eqn. A.3.7b)
          H_v(k)      = i_fgwo*cp_v*(TwLev(k)-Tref)                                               !Vapor enthalpy (Eqn. A.3.8)
          LE_f(k)     = 0.866**0.667*( ((((w_sw(k)+0.622)/(WaLev(k)+0.622)))-1.0) / log(W_sw(k)+0.622/WaLev(k)+0.622) )

          F1          = cp_w(k)*(W_sw(k)-WaLev(k))
          F2          = H_masw(k) - HaLev(k)
          F3          = (Le_f(k)-1.0)*( H_masw(k)-HaLev(k) - ((w_sw(k)-WaLev(k))* H_v(k)) )
          F4          = (w_sw(k)-WaLev(k))* cp_w(k) * (TwLev(k)-Tref)

!dw_dtw(k) = 10.2 !This line compiles fine !!
          dw_dtw(k)   = (RatioQw_Qa * F1) / (F2+F3-F4)
          dima_dTw(k) = RatioQw_Qa * cp_w(k) * (1.0 + ((TwLev(k)-Tref)*F1)/(F2+F3-F4) )

          WaLev(k+1)  = WaLev(k) + (dw_dtw(k)*DeltaTwLev)
          HaLev(k+1)  = HaLev(k) + (dima_dTw(k)*DeltaTwLev)


        enddo
      EndDo !Do while

end Program Poppe

 

The error message pertains to these 2 variables:

dw_dtw(k)

dima_dTw(k)

bug with open statement

$
0
0

I recently upgraded to VS2015 and IVF Composer 2016.  Since upgrading the Fortran compiler, the application I work with returns error code 30 on an OPEN statement.  A file is created, but cannot be written to.  I have tried various permutations of the OPEN statement including:

call get_unit( file_id )
open ( unit = file_id, file = file_name, status = 'replace', iostat = istat )
if ( istat.ne.0 ) then

    open ( newunit = file_id, file = file_name, status = 'replace', action = 'write', iostat = istat )
    open ( newunit = file_id, file = file_name, status = 'replace', iostat = istat )
    open ( newunit = file_id, file = file_name, iostat = istat )

None of these seems to help.  The affected code writes output to a number of CSV (comma separated varaible) files.  The OPEN statement works fine to begin with, but appears to fail after a sufficiently large number of data points have been written to disk (ie, it will write 10 variables of size X, and 8 variables of size Y, where Y>X).  I am returning to IVF Composer 2015, update 4 - which processes the data without incident - until this problem can be resolved.

I have tried doing a complete rebuild (both after "cleaning" the solution, and deleting the x64 working directory), tried working on different drives, tried rebooting the computer, and tried working on different computers.  None of these quick fixes helped.

Hope that someone is able to identify the root cause of this issue,

Justin.

 

Strange behavior of vlist argument in UDTIO

$
0
0

I have yet another problem with UDTIO. In my read procedure, I want to use the vlist argument to pass the length of a temporary character string to be used internally in the procedure. However, when I read more than one DT in a single format statement, the vlist for the second and following I/O items behaves strangely.

In my example I use different vlist numbesr to illustrate the problem and don't actually use it. In my real code vlist is used to create a temporary string and is always 1500. This results in the string for the first I/O item to be 1500 characters long, but the string for the next item is already 15 million characters. And as I use vlist also to construct a format for reading that string, instead of A1500 I get A15001500.

module m_test
    type t1
        integer :: a
      contains
        procedure, private :: r_t1
        generic :: read(formatted) => r_t1
    end type

  
    contains
        subroutine r_t1(dtv, unit, iotype, vlist, iostat, iomsg)
            class(t1),          intent(inout)   :: dtv
            integer,            intent(in)      :: unit
            character(len=*),   intent(in)      :: iotype
            integer,            intent(in)      :: vlist(:)
            integer,            intent(out)     :: iostat
            character(len=*),   intent(inout)   :: iomsg
            print *, "vlist(1)    :", vlist(1)
            print *, "entire vlist:", vlist
            read(unit, fmt="(i4)", iostat=iostat, iomsg=iomsg) dtv%a
        end subroutine
end module

program test
    use m_test
   
    character(len=:), allocatable :: str
    type(t1) :: x,y,z
    str="1111222233334444555556666"
    read(str, fmt="(DT(7),DT(8),DT(9))") x,y,z
    print *, x%a, y%a, z%a
end program
C:\TEMP>ifort test.f90 /standard-semantics
Intel(R) Visual Fortran Intel(R) 64 Compiler XE for applications running on Intel(R) 64, Version 15.0.4.221 Build 20150407
Copyright (C) 1985-2015 Intel Corporation.  All rights reserved.

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

-out:test.exe
-subsystem:console
test.obj

C:\TEMP>test
 vlist(1)    : 7
 entire vlist: 7
 vlist(1)    : 77
 entire vlist: 77 8
 vlist(1)    : 77
 entire vlist: 77 87 8 9
 1111 2222 3333

C:\TEMP>

My temporary workaround will be to use DT'1500' instead of DT(1500) in my code.

 

 

about Parallel Studio XE 2015 Composer/Cluster Editions

$
0
0

Some questions about Intel Parallel Studio XE 2015 Composer/Cluster Editions for Linux

1) Am I correct, that there is now no "only Fortran version" (ifort w/o C) for Parallel Studio XE Cluster Edition?

2)  Composer Edition includes MKL,  MKL library includes  PBLAS, which may be used in cluster.
 Intel MKL PBLAS is based on MPI. May I translate (using Intel C compiler) any free MPI library, or must use (and purchase therefore additionally to MKL) only Intel MPI ?

3) -coarray=distributed        
 This  mode requires Parallel Studio Cluster Edition, which includes Intel MPI.
Is it possible now to use also free MPI (for example OpenMPI over Infiniband) ? ( I understand that Intel gives no such WARRANTY).
    
4) CAF Parallel Studio XE Composer Edition for Fortran Linux may work only with -coarray=shared
This software package don't includes MPI. Does this means that SMP-parallelization of images don't requires MPI ?
 
5) How many images may be accessed after CAF compilation with -coarray=coprocessor flag on 1-CPU server w/1 Intel MIC GPU

at heterogenous model ? (CPU_ncores + 61) images ? (w/o hyperthreading)

Mikhail Kuzminsky

 

compiler error: undefined reference to `for_ifcore_version'

$
0
0

Hello!
I wanted to compile a code with mpif90 (which i got from openmpi compiled with the intel compiler) but I get the error:

/opt/intel/compilers_and_libraries_2016.0.109/linux/compiler/lib/intel64/libifport.so.5: undefined reference to `for_ifcore_version'

I have the Intel Parallel Studio XE Composer Edition for Fortran and C++ (Linux) (parallel_studio_xe_2016.0.047) installed.

I started with loading the environment variables:

source /opt/intel/compilers_and_libraries/linux/bin/compilervars.sh -arch intel64 -platform linux

source /opt/intel/compilers_and_libraries/linux/mpi/bin64/mpivars.sh

export PATH=/opt/OpenMPI-intel/bin:$PATH

export LD_LIBRARY_PATH=/opt/OpenMPI-intel/lib:$LD_LIBRARY_PATH

and then I compile with:

mpif90 dns.f

mpif90 -O3  dns.o -lmpi

What did I do wrong?


A specified class is not registered in the registration database

$
0
0

I am having the error "A specified class is not registered in the registration database" returned by function "COMCreateObjectByGUID" aioll the time when I try to call .net function from fortran function.

Business case: I have to call .net function from Fortran on Windows platforms

Solution approach:

1. Create the DLL from .net source code as COM component and register this DLL using regasm. Exact command being used is "%SystemRoot%\Microsoft.NET\Framework64\v4.0.30319/RegAsm.exe DotNetDAL.dll /tlb: dotnetdal.tlb". This is registering the DLL and creating the file dotnetdal.tlb

2. Launch Intel Visual Fortran Module Wizard to load this dotnetdal.tlb file to create equivalent fortran source file "dotnetdal.f90" as COM interface.

3. Create Intel Visual Fortran project solution in visual studio and write fortran function in source file "DotNetDAL_FortranFunc.f90" which uses COM function to call fortran function in "dotnetdal.f90".

4. Compilation was successful and when I execute the executable, it always giving me the error message "A specified class is not registered in the registration database" (the return macro is "REGDB_E_CLASSNOTREG") after executing the function "COMCreateObjectByGUID". I have tried with all possible "CLSCTX_*" as 2nd argument to "COMCreateObjectByGUID" but this function is always failing with return value "REGDB_E_CLASSNOTREG"

I am attaching the complete solution for your reference. kindly assist to overcome this issue. Thanks in advance.

AttachmentSize
Download0 bytes

How to I determine at runtime what vector instructions are being used when compiling with -ax

$
0
0

In a few weeks, we will have another generation of Intel HPC system.  We will have systems that support SSE4.2 (Nehalem, Westmere), AVX (SandyBridge, IvyBridge), and CORE-AVX2 (Haswell) optimizations.  Since the compile nodes are being upgraded to Haswell as well, I want to tell the users to specify something different than -xHost when using Intel Fortran so binaries can be backwards compatible and run on any of the clusters.  I planned to tell the users to use -xSSE4.2 -axCORE-AVX2,AVX.

 

My questions are:

 

1) Is this the best way to compile codes so they can support different vectorization units depending on which system they run?

2) How do I confirm that the correct code path is being used based on the system used?  I have looked at the assembly and see that the instructions are there, but I want to know at runtime the code is being used.

 

Thanks,

Craig

Parallelizing whole array operations with OpenMP workshare

$
0
0

Hi all,

I have some Fortran code with a bunch of operations like this:

conv_adv = pu(0:imr-1,1:jmr,1:lmr) - pu(1:imr,1:jmr,1:lmr) + pv(1:imr,1:jmr,1:lmr) - pv(1:imr,2:jmr+1,1:lmr)
am(0:imr,1:jmr,1:lmr) = dtu * pu(0:imr,1:jmr,1:lmr) ! dtu is a scalar

which I'm thinking of speeding up with OpenMP workshare, now that ifort 15.0+ parallelizes some WORKSHARE constructs instead of replacing them with SINGLE. However, according to https://software.intel.com/en-us/articles/openmp-workshare-constructs-no... neither of the two operations above would parallelize, because

  1. Of the arrays on the right hand side of 'conv_adv', one of them has a lower bound of 0
  2. In the second example, the lower bound on the left hand side is not 1 but 0

Is this a correct interpretation of "If the lower bound of the left hand side or the array slice lower bound or the array slice stride on the right hand side is not 1, then the statement does not parallelize." according to https://software.intel.com/en-us/articles/openmp-workshare-constructs-no..., or is my understanding wrong?

Thanks,

Sourish

Problems installing Intel Fortran version 16

$
0
0

I am having several problems installing Intel Fortran version 16 from a user account (not root), using an offline license file.  

First problem occurs at the end of installation.  Some final steps require root privileges:

Finalizing product configuration...
--------------------------------------------------------------------------------
mkdir: cannot create directory `/home/documentation_2016': Permission denied
ln: creating symbolic link `/home/documentation_2016/en/clck': No such file or directory
mkdir: cannot create directory `/home/samples_2016': Permission denied
ln: creating symbolic link `/home/samples_2016/en/clck': No such file or directory
mkdir: cannot create directory `/home/documentation_2016': Permission denied
ln: creating symbolic link `/home/documentation_2016/en/itac': No such file or directory
mkdir: cannot create directory `/home/samples_2016': Permission denied
ln: creating symbolic link `/home/samples_2016/en/itac': No such file or directory

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

After that, the ifort command cannot find the license file:

[braun@sequoia ~]$ ifort --version

Error: A license for Comp-FL is not available now (-15,570,115).

A connection to the license server could not be made.  You should
make sure that your license daemon process is running: both an
lmgrd process and an INTEL process should be running
if your license limits you to a specified number of licenses in use
at a time.  Also, check to see if the wrong port@host or the wrong
license file is being used, or if the port or hostname in the license
file has changed.

License file(s) used were (in this order):
    1.  Trusted Storage
**  2.  /home/braun/COM_L__xxxx_xxxx-xxxxxxxx.lic <original content edited>
**  3.  /home/braun/intel/compilers_and_libraries_2016.0.109/linux/bin/intel64/../../Licenses
**  4.  /home/braun/Licenses
**  5.  /opt/intel/licenses
**  6.  /Users/Shared/Library/Application Support/Intel/Licenses
**  7.  /home/braun/intel/compilers_and_libraries_2016.0.109/linux/bin/intel64/*.lic

Please visit http://software.intel.com/sites/support/ if you require technical assistance.

ifort: error #10052: could not checkout FLEXlm license

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

I am using the new license file sent by Intel:

[braun@sequoia ~]$ pwd
/home/braun
[braun@sequoia ~]$ ls *.lic
COM_L__xxxx_xxxx-xxxxxxxx.lic <original content edited>

Contents of license file:

<original content removed>

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

The environment variable is set (is this still the right name?)

export INTEL_LICENSE_FILE=/home/braun/COM_L__xxxx_xxxx-xxxxxxxx.lic  <original content edited>

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

Finally, will the license file only work on the server named sequoia?  I have a 5-seat floating license using offline license files.

Jay

common block problem in openmp Fortran

$
0
0
my code is:

 program
 ...
 ! Loop which I want to parallelize
 !$OMP parallel DO
 I = 1, N
 ...
 call FORD(i,j)
  ...
 !$OMP END parallel DO
 end program

  subroutine FORD(i,j)
  logical servo,genflg,lapflg
  dimension c(nvarc)
  dimension zl(3),zg(3),v1(3,3),v2(3,3),rn(3),
 .          rcg1(3),rcg2(3),ru1(3),ru2(3),
 .          rott1(3),rott2(3),velr(3),dt(3),
 .          dfs(3),ftu(3),fnr(3),amomet(3
  common /contact/ iab11,iab22,xx2,yy2,zz2,
 .                 ra1,rb1,rc1,ra2,rb2,rc2,
 .                 v1,v2,
 .                 xg1,yg1,zg1,xg2,yg2,zg2
  common /ellip/ b1,c1,f1,g1,h1,d1,
 .               b2,c2,f2,g2,h2,p2,q2,r2,d2
  common /root/ root1,root2
  common /tab1/
 .       itype(ndim1),nconti(5),nvarc,
 .       nconta,nconta1
  common /bal1/
 .       ra(5),rb(5),rc(5),
 .       amomen(ndim),fwall(6),press(3),wmomet(6,2),
 .       rot(ndim),ttheta(ndim*3),rstp(ndim*3),forces(ndim),
 .       ssampl(3,3),edserv(3,3),tdisp(ndim),adisp(ndim),vel(ndim),
 .       del(3),xmax(3)

CALL CONDACT(genflg,lapflg)
return
end subroutine

SUBROUTINE CONDACT(genflg,lapflg)
implicit double precision (a-h,o-z)
logical rflag,dflag,error,gmvflg,grvflg,ctrlflg,depflg
  parameter (ndim1 = 20002)
  parameter (ndim = 3*ndim1)
  parameter (nkmm = 9000000)
  parameter (nkwall = 50000)
  character*4 hed
  logical genflg,lapflg,fast
  dimension v1(3,3),v2(3,3)
  common /contact/ iab11,iab22,xx2,yy2,zz2,
 .                 ra1,rb1,rc1,ra2,rb2,rc2,
 .                 v1,v2,
 .                 xg1,yg1,zg1,xg2,yg2,zg2
  common /ellip/ b1,c1,f1,g1,h1,d1,b2,c2,f2,g2,h2,p2,q2,r2,d2
  common /switch/ nk
  common /root/ root1,root2
  common /nroot/ rt(5),nrt
  common /bal2/xmax(3)

 call function f(x)
 C
 C......
 C

 RETURN
 END

  function f(x)
  implicit double precision (a-h,o-z)
  common /contact/ iab11,iab22,xx2,yy2,zz2,
 .                 ra1,rb1,rc1,ra2,rb2,rc2,
 .                 v1,v2,
 .                 xg1,yg1,zg1,xg2,yg2,zg2
  common /ellip/ b1,c1,f1,g1,h1,d1,
 .               b2,c2,f2,g2,h2,p2,q2,r2,d2
  common /switch/ nk
  common /nroot/ rt(5),nrt
  dimension a(3,3),b(3),v1(3,3),v2(3,3)
  ..
  ..
  ..
  ..
  end

 

my question is inside the parallel loop, does all variable (within common block or outside of common block) in each subroutine are private? 1. If not, should I use threadprivate for the common blocks and private the variables in each subroutine after declaration? 2. Each thread passes through 2 subroutine and one function. Subroutines has some same common block and variables. if I use threadprivate common blocks for each subroutine, how do the variable values pass through the entire program for a single thread. Any help will be appreciated. Thanks.

Viewing all 3270 articles
Browse latest View live