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

Coarray + MOVE_ALLOC bug

$
0
0

See example attached - run with 12 images. Image 1 gets 'stuck'. Switching the declaration of A from coarray to regular array highlights the difference in behavior... This is with 16 Update 3 and 17 Beta.

Sigh... how many of these are still left with coarrays :'(

PROGRAM MAIN
IMPLICIT NONE
TYPE T
    INTEGER(KIND=8),ALLOCATABLE :: U(:)
END TYPE T
TYPE(T) :: A[*]
!TYPE(T) :: A    ! This would work.
INTEGER(KIND=8) :: I
INTEGER(KIND=8),ALLOCATABLE :: TEMP(:)
IF (THIS_IMAGE()==1) THEN
    DO I=1,2
        IF (.NOT.ALLOCATED(A%U)) THEN
            ALLOCATE(A%U(1))
        ELSE
            IF (ALLOCATED(TEMP)) DEALLOCATE(TEMP)
            ALLOCATE(TEMP(SIZE(A%U)+1))
            TEMP(1:SIZE(A%U)) = A%U
            TEMP(SIZE(A%U)+1) = I
            CALL MOVE_ALLOC(TEMP,A%U)
        END IF
    END DO
END IF
WRITE(*,'(A,I0,A)') 'I am image ',THIS_IMAGE(),' and I am out of here!'
SYNC ALL

END PROGRAM MAIN

 


Installation

$
0
0

Hi

 

I have downloaded the XE2016 update 3 composer edition. I have the serial # and the product update agreement in place and paid in full. When I try to install the compiler, the installer posts a phony message that it has failed to connect to internet, what a load of BS. At any rate, I am stuck with this installer and need help to install this update. I used to get the *.lic file, but I don't know where to get it from anymore.

Is this access violation error expected?

$
0
0

The code below triggers an access violation error. Obviously, this is triggered by the empty type T. I would like to know if this is a compiler error though. Sometimes empty derived types are left in a code as placeholders for future development.

PROGRAM MAIN
IMPLICIT NONE
TYPE T
END TYPE T
TYPE(T),ALLOCATABLE :: A(:),B(:)
ALLOCATE(A(1),B(1))
B = A
END PROGRAM MAIN

 

Matrix inversion issues in when using multiple CPUs vs single CPU

$
0
0

Greetings, 

We have a user-subroutine that gets compiled and linked as a DLL to Finite Element Solver, Abaqus. Part of our subroutine is a matrix inversion subroutine that is inverting a 6x6 symmetric matrix. The subroutine we use is the one form https://people.sc.fsu.edu/~jburkardt/f_src/asa007/asa007.f90

The problem is that when the Abaqus simulation is run using a single cpu, the analysis runs fine. But when we use multiple cpus, it reports NANs. 

Please note that the stiffness matrix being inverted can have a condition number of up to 1E7. 

I wonder what can be the root cause of such problem. Can it be related to the matrix condition number? 

Thanks,

Alireza

 

C++ -> Fortran pass by reference

$
0
0

As I understand it pass-by-reference is not supported from C++ to Fortran is not supported, or at least not part of the language. Nevertheless it seems to enable passing a value to a Fortran routine whose argument is not declared to have the 'value' attribute. The code below illustrates this:

#ifdef FORTRAN
subroutine mysub1(i) bind(c,name='mysub1')
    use iso_c_binding, only: c_int
    integer(c_int), intent(in), value :: i
    write(*,'(a,i0)') 'mysub1: i = ',i
end subroutine mysub1

subroutine mysub2(i) bind(c,name='mysub2')
    use iso_c_binding, only: c_int
    integer(c_int), intent(in) :: i
    write(*,'(a,i0)') 'mysub2: i = ',i
end subroutine mysub2

subroutine mysub3(i) bind(c,name='mysub3')
     use iso_c_binding, only: c_int
     integer(c_int), intent(in), value :: i
     write(*,'(a,i0)') 'mysub3: i = ',i
end subroutine mysub3

#else

extern "C" {
    void mysub1(int&);
    void mysub2(int&);
    void mysub3(int);
};

int main (int, char**) {
	int i=3;
	mysub1(i);
	mysub2(i);
	mysub3(i);

	return 0;
}
#endif

To use it save to a file e.g. example.txt then on a command line do the following:

ifort /c /fpp /DFORTRAN /Tf example.txt /free /Foexample_f.obj

cl /Tpexample.txt /Feexample.exe example_f.obj

Then run it: example.exe

mysub1: i = 2357888
mysub2: i = 3
mysub3: i = 3

The way mysub2 is declared seems to give the required behaviour but I don't think it's standards conforming. So my questions are:

1) what are the problems with doing this?

2) can the current behaviour be relied upon?

3) is it advisable to convert to the declaration used in mysub3?

 

Thanks.

 

dll linking problem

$
0
0

I have a solution with two projects: one outputs a dll, the other one the executable. The latter references some subroutines contained in the dll. They both output to the same directory. In "Project dependencies" for the executable i flagged the dependency on the dll, thus resulting in a building order dll->executable. DLL builds correctly alone AND OUTPUTS A .LIB FILE; instead, building the whole solution results in a linker error  LNK1181: cannot open .lib file, i guess simply because the lib file gets deleted before building process.

what am i doing wrong?

thanks for help

sytrd is not recognized by lapack90

$
0
0

Hi, 

I am trying to use LAPACK's "sytrd" subroutine in my code, but it is not recognized. I am trying the following simple code:

program comp
USE mkl95_lapack
USE mkl95_PRECISION
USE mkl95_BLAS
implicit none
real, dimension(2,2) :: A
integer, dimension(1) :: t
A = reshape((/-5., 2., 2., -2./),(/2,2/))
call sytrd(A, t)
end program comp

This is the error I get:

error #6285: There is no matching specific subroutine for this generic subroutine call.   [SYTRD]      

But when I use another of LAPACK's subroutines like "getrf", everything's fine:

program comp
USE mkl95_lapack
USE mkl95_PRECISION
USE mkl95_BLAS
implicit none
real, dimension(2,2) :: A
integer, dimension(2) :: t
A = reshape((/-5., 2., 2., -2./),(/2,2/))
call getrf(A, t)
end program comp

What might cause this problem?

 

 

 

 

Intel Fortran and R

$
0
0

I think that information about this has been posted before but I can't find it. My question is this: is there any way to interface the R statistics software package with Intel Fortran? I am using Windows 10.

 


DLL dependency question

$
0
0

I have a visual studio solution with an exe and a DLL. 

The code for the DLL has !DEC$ ATTRIBUTES DLLEXPORT statements

The code for the exe has !DEC$ ATTRIBUTES DLLIMPORT statements

If an attempt is made to run the exe without the DLL in the same folder, a message is displayed (by Windows, I think) that the DLL is missing.  The message seems to appear before the exe begins to actually run. 

When running cases when the exe doesn't need to call any routines in the DLL, is it possible for the exe to run without the DLL being present?

In a related question, is it possible to statically link a DLL to an exe?  I ask this because I have a very old DLL that I have been unable to build with visual studio / Intel fortran (code is from ANSYS, I think).  It is a very small DLL of about 30k, and I would prefer to link it statically and not have to haul it around with the exe.

Thanks,

Brian

MKL sjacobix void pointer problem

$
0
0

Hi there,

I am having problems calling the sjacobix MKL subroutine when passing a void pointer to my resource type for use in my cost function.  I have tried following the example program in which the final dummy argument of the extended_powell is  type(my_data) :: user_data, and the actual argument is the address of the resource type with a pass by value directive %VAL(LOC(m_data))

res = sjacobix(cost_function, n, m, fjac, x, eps(1), %val(loc(this)))
    subroutine cost_function(m, n, x, f, myARMA)

        use MKLMatrix_module
        use ARMA_data
        use iso_c_binding

        integer :: m                            ! dimension of f
        integer :: n                            ! dimension of x
        real(WP), dimension(n)  :: x            ! input values
        real(WP), dimension(m)  :: f            ! output values (residuals)
        type(ARMA)              :: myARMA         ! ARMA model (& Training Data)

        ...

    end subroutine cost_function

This doesn't compile and I receive the following error diagnostic...

error #7065: The characteristics of dummy argument 5 of the associated actual procedure differ from the characteristics of dummy argument 5 of the dummy procedure.

I have been trying to find a workaround and have managed to compile by passing the actual argument int(loc(this),c_intptr_t) to an integer dummy argument integer(c_intptr_t) :: ipRes.  I have tried to associate a pointer to my own resource type type(ARMA) to this address via an iso_c_binding type(c_ptr) and although this seems to pass the resource to my cost function, this seems to be corrupting the program stack.  My cost function & calling code now look something like this...

res = sjacobix(cost_function, n, m, fjac, x, eps(1), int(loc(this),c_intptr_t))
    subroutine cost_function(m, n, x, f, ipRes)

        use MKLMatrix_module
        use ARMA_data
        use iso_c_binding

        integer :: m                            ! dimension of f
        integer :: n                            ! dimension of x
        real(WP), dimension(n)  :: x            ! input values
        real(WP), dimension(m)  :: f            ! output values (residuals)
        integer(c_intptr_t)     :: ipRes        ! int(void*) to resources
        type(c_ptr)             :: pRes         ! void* to resources
        type(ARMA),pointer      :: pARMA        ! ARMA model (& Training Data)

        ! associate type with raw pointer address ~
        pRes = transfer(ipRes,pRes)             ! convert raw 4 byte address into a c_ptr
        call c_f_pointer(pRes,pARMA)            !  associate pARMA with  c_ptr
        ...
    end subroutine cost_function

 

Please could somebody advise me on what to try next?  Additional info: Package ID: w_fcompxe_2015.2.179

Failure installing parallel_studio_xe_2016_update3_composer_edition_for_fortran_setup.exe on Windows 10 home 64 bit

$
0
0

Hi,

I can not install update 3 on Windows 10. This is the first time I have tried to install the Fortran Compiler on Windows 10.

The install process stops while showing: Starting pre_install.js...

Please see the Attached file showing the error Message.

Any suggestions as to what I should do?

Regards,

 

AttachmentSize
Downloadimage/pngInstall_failure.PNG451.03 KB

Visual Studio cannot debug because a debug target has not been specified

$
0
0

I have created one fortran static library project, and under Debugging, I see Full debug option. Still getting this error while trying to run. Any idea why?

Debugging ODEPACK source codes on Intel Visual Fortran Help

$
0
0

Hi, I am try to run the Fortran 77 popular ODEPACK files( written by Alan Hindmarsh) on a Intel Visual Fortran Compiler running on Visual Studio Professional 2012. I have fixed most of the errors except for one recurring one that seems to have an aliasing issue with the compiler.

When the overall source codes are run, this is the result:

Error 1 error #6633: The type of the actual argument differs from the type of the dummy argument. [RWORK] C:\Users\FortranCompiler\Desktop\Liu text files\opkdmain.f 3445

 

Error 2 Compilation Aborted (code 1) C:\Users\FortranCompiler\Desktop\Liu text files\opkdmain.f 1

 

Error 3 error #6633: The type of the actual argument differs from the type of the dummy argument. [RWORK] C:\Users\FortranCompiler\Desktop\Liu text files\opkda1.f 9499

 

Error 4 Compilation Aborted (code 1) C:\Users\FortranCompiler\Desktop\Liu text files\opkda1.f 1

List of files and areas of code error:

opkdmain.f

C-----------------------------------------------------------------------

C CALL DSTODE(NEQ,Y,YH,NYH,YH,EWT,SAVF,ACOR,WM,WM,F,JAC,DPRJS,DSOLSS)

C-----------------------------------------------------------------------

CALL DSTODE (NEQ, Y,RWORK(LYH), NYH,RWORK(LYH),RWORK(LEWT),

1 RWORK(LSAVF),RWORK(LACOR),RWORK(LWM),RWORK(LWM),

2 F, JAC, DPRJS, DSOLSS)

KGO = 1 - KFLAG

GO TO (300, 530, 540, 550), KGO

 

opkda1.f :

C Call DPREPI to do matrix preprocessing operations. -------------------

CALL DPREPI (NEQ, Y, S, RWORK(LYH), RWORK(LSAVF),

1 RWORK(LEWT),RWORK(LACOR),IA,JA,IC,JC,RWORK(LWM),

2 RWORK(LWM), IPFLAG,RES, JAC, ADDA)

LENWK = MAX(LREQ,LWMIN)

IF (IPFLAG .LT. 0) RETURN

C If DPREPI was successful, move YH to end of required space for WM. ---

LYHN = LWM + LENWK

IF (LYHN .GT. LYH) RETURN

LYHD = LYH - LYHN

IF (LYHD .EQ. 0) GO TO 20

IMAX = LYHN - 1 + LENYHM

DO 10 I=LYHN,IMAX

10 RWORK(I) = RWORK(I+LYHD)

LYH = LYHN

C Reset pointers for SAVR, EWT, and ACOR. ------------------------------

20 LSAVF = LYH + LENYH

LEWTN = LSAVF + N

LACOR = LEWTN + N

IF (ISTATC .EQ. 3) GO TO 40

C If ISTATE = 1, move EWT (left) to its new position. ------------------

IF (LEWTN .GT. LEWT) RETURN

DO 30 I=1,N

30 RWORK(I+LEWTN-1) = RWORK(I+LEWT-1)

40 LEWT = LEWTN

RETURN

C----------------------- End of Subroutine DIPREPI ---------------------

END

*DECK DPREPI

SUBROUTINE DPREPI (NEQ, Y, S,YH,SAVR,EWT,RTEM,IA,JA,IC,JC,

1 WK, IWK, IPPER, RES, JAC, ADDA)

 

EXTERNAL RES, JAC, ADDA

INTEGER NEQ, IA, JA, IC, JC, IWK, IPPER

DOUBLE PRECISION Y, S, YH, SAVR, EWT, RTEM, WK

DIMENSION NEQ(*), Y(*), S(*), YH(*), SAVR(*), EWT(*), RTEM(*),

1 IA(*), JA(*), IC(*), JC(*), WK(*), IWK(*)

INTEGER IOWND, IOWNS,

1 ICF, IERPJ, IERSL, JCUR, JSTART, KFLAG, L,

2 LYH, LEWT, LACOR, LSAVF, LWM, LIWM, METH, MITER,

3 MAXORD, MAXCOR, MSBP, MXNCF, N, NQ, NST, NFE, NJE, NQU

INTEGER IPLOST, IESP, ISTATC, IYS, IBA, IBIAN, IBJAN, IBJGP,

1 IPIAN, IPJAN, IPJGP, IPIGP, IPR, IPC, IPIC, IPISP, IPRSP, IPA,

2 LENYH, LENYHM, LENWK, LREQ, LRAT, LREST, LWMIN, MOSS, MSBJ,

3 NSLJ, NGP, NLU, NNZ, NSP, NZL, NZU

DOUBLE PRECISION ROWNS,

1 CCMAX, EL0, H, HMIN, HMXI, HU, RC, TN, UROUND

DOUBLE PRECISION RLSS

Analysis: Both files have same error with the way RWORK is classified. From the originally run program, RWORK is classified as follows:

EXTERNAL FEX, JAC

DOUBLE PRECISION ATOL, RTOL, RWORK, T, TOUT, Y

DIMENSION NEQ(12),Y(12), RWORK(500), IWORK(30), RTOL(12), ATOL(12)

DATA LRW/500/, LIW/30/

NEQ(1) = 12

DO 10 I = 1,NEQ(1)

10 Y(I) = 0.0D0

Y(1) = 1.0D0

T = 0.0D0

TOUT = 0.1D0

ITOL = 1

RTOL = 1.0D-4

ATOL = 1.0D-6

ITASK = 1

QISTATE = 1

IOPT = 0

MF = 121

DO 40 IOUT = 1,5

CALL DLSODES (FEX, NEQ, Y, T, TOUT, ITOL, RTOL, ATOL,

1 ITASK, ISTATE, IOPT, RWORK, LRW, IWORK, LIW, JAC, MF)
As listed in the opkdmain.f file of odepack subroutines:

C RWORK = a work array used for a mixture of real (double precision)

C and integer work space.

C The length of RWORK (in real words) must be at least

C 20 + NYH*(MAXORD + 1) + 3*NEQ + LWM where

C NYH = the initial value of NEQ,

C MAXORD = 12 (if METH = 1) or 5 (if METH = 2) (unless a

C smaller value is given as an optional input),

C LWM = 0 if MITER = 0,

C LWM = 2*NNZ + 2*NEQ + (NNZ+9*NEQ)/LENRAT if MITER = 1,

C LWM = 2*NNZ + 2*NEQ + (NNZ+10*NEQ)/LENRAT if MITER = 2,

C LWM = NEQ + 2 if MITER = 3.

C In the above formulas,

C NNZ = number of nonzero elements in the Jacobian matrix.

C LENRAT = the real to integer wordlength ratio (usually 1 in

C single precision and 2 in double precision).

C (See the MF description for METH and MITER.)

C Thus if MAXORD has its default value and NEQ is constant,

C the minimum length of RWORK is:

C 20 + 16*NEQ for MF = 10,

C 20 + 16*NEQ + LWM for MF = 11, 111, 211, 12, 112, 212,

C 22 + 17*NEQ for MF = 13,

C 20 + 9*NEQ for MF = 20,

C 20 + 9*NEQ + LWM for MF = 21, 121, 221, 22, 122, 222,

C 22 + 10*NEQ for MF = 23.

C If MITER = 1 or 2, the above formula for LWM is only a

C crude lower bound. The required length of RWORK cannot

C be readily predicted in general, as it depends on the

C sparsity structure of the problem. Some experimentation

C may be necessary.

C

C The first 20 words of RWORK are reserved for conditional

C and optional inputs and optional outputs.

C

C The following word in RWORK is a conditional input:

C RWORK(1) = TCRIT = critical value of t which the solver

C is not to overshoot. Required if ITASK is

C 4 or 5, and ignored otherwise. (See ITASK.)

C

C LRW = the length of the array RWORK, as declared by the user.

C (This will be checked by the solver.)

C

C IWORK = an integer work array. The length of IWORK must be at least

C 31 + NEQ + NNZ if MOSS = 0 and MITER = 1 or 2, or

C 30 otherwise.

C (NNZ is the number of nonzero elements in df/dy.)

C

C In DLSODES, IWORK is used only for conditional and

C optional inputs and optional outputs.

C

C The following two blocks of words in IWORK are conditional

C inputs, required if MOSS = 0 and MITER = 1 or 2, but not

C otherwise (see the description of MF for MOSS).

C IWORK(30+j) = IA(j) (j=1,...,NEQ+1)

C IWORK(31+NEQ+k) = JA(k) (k=1,...,NNZ)

C The two arrays IA and JA describe the sparsity structure

C to be assumed for the Jacobian matrix. JA contains the row

C indices where nonzero elements occur, reading in columnwise

C order, and IA contains the starting locations in JA of the

C descriptions of columns 1,...,NEQ, in that order, with

C IA(1) = 1. Thus, for each column index j = 1,...,NEQ, the

C values of the row index i in column j where a nonzero

C element may occur are given by

C i = JA(k), where IA(j) .le. k .lt. IA(j+1).

C If NNZ is the total number of nonzero locations assumed,

C then the length of the JA array is NNZ, and IA(NEQ+1) must

C be NNZ + 1. Duplicate entries are not allowed.

 

It seems that the sections that RWORK is taken as an array of a mix of double precision and integer data types. Is it possible for the RWORK array to contain two different data types or must it only contain one based on Intel's aliasing rules for Fortran 77. Please let me know if the structure of the code right now is in error or if there is an alternative way of allowing RWORK to include both INTEGER and DOUBLE PRECISION data types.  Thank you!

 

 

VS 2015 Update 2 compatibility

$
0
0

Does XE 2015 update 6 support VS 2015 update 2?

The release notes link gives a table that only goes up to update 5 so I cannot see relase notes for update 6.

What does Remark 8291 mean?

$
0
0

Here is the remark:

 remark #8291: Recommended relationship between field width 'W' and the number of fractional digits 'D' in this edit descriptor is 'W>=D+7'

I have used that FORTRAN statement for Years with VAX compilers and all the way through the last Compaq FORTRAN compiler.

I have Intel FORTRAN 2016 update 3 Parallel Studio running within Visual Studio 2013 Shell 


Intel states: there is not a comprehensive document that lists the diagnostic definitions for the Intel® Fortran Compiler

$
0
0

What does that really mean?

How can a compiler put out a message during compilaiton and there is no document that describes that message?

Are the developers all gone and Intel merely sells a shell?

Reinstallation problems with Visual Composer XE for Windows with Rogue Wave *IMSL* (Version: 2013 SP1)

$
0
0

I am not able to reinstall the Intel(R) visual fortran composer XE 2013 on my new PC. It gives an error  "Activation rights do not allow this software to be installed. This could be due to expired subscription or incompatible serial number....." 

Many thanks for help

 

Allocatable array with 0 base?

$
0
0

Is it possible to allocate an array, but have 0 as its base?

I know non-allocatable is easy with integer :: fred(0:10)

But I'm not sure how to do it with an allocatable array

how to link abaqus with intelfortran

$
0
0

Dear sir,

I have installed ABAQUS CAE2016, Microsoft Visual Studio 2015, and Intel Visual Fortran Studio XE 2016 on my computer. However, when I run the test codes, there are the following errors:
Création de la bibliothèque standardU.lib et de l'objet standardU.exp
libirc.lib(fastmemset.obj) : error LNK2019: symbole externe non résolu memset référencé dans la fonction _intel_fast_memset.A
libirc.lib(fastmemcpy.obj) : error LNK2019: symbole externe non résolu memcpy référencé dans la fonction _intel_fast_memcpy.A
standardU_static.lib(SMAStsStdU_IF.obj) : error LNK2019: symbole externe non résolu __imp_printf référencé dans la fonction "void __cdecl SMABasOmniSetSSELevel(void)" (?SMABasOmniSetSSELevel@@YAXXZ)
standardU_static.lib(uanisohyper_inv.obj) : error LNK2001: symbole externe non résolu memmove
standardU_static.lib(uanisohyper_strain.obj) : error LNK2001: symbole externe non résolu memmove
standardU_static.lib(ufluidconnectorloss.obj) : error LNK2001: symbole externe non résolu memmove
standardU_static.lib(ufluidconnectorvalve.obj) : error LNK2001: symbole externe non résolu memmove
standardU.dll : fatal error LNK1120: 6 externes non résolus
Abaqus Error: Problem during linking - Abaqus/Standard User Subroutines.
This error may be due to a mismatch in the Abaqus user subroutine arguments.
These arguments sometimes change from release to release, so user subroutines
used with a previous release of Abaqus may need to be adjusted.
Abaqus/Analysis exited with errors

If you are familiar with ABAQUS subroutines and know where the problem probably lies in, could you please help me with it? Your help is greatly appreciated! 
Best regards,

Program Move

$
0
0

Steve:

How do I move a copy of the EXE file for a program called WULF.EXE that is compiled in debug mode to another computer to work on some data. I tis also compiled with MKL routines.

Not done this before - never had to .

John

Viewing all 5691 articles
Browse latest View live


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