Development Tools

Problem passing array from C++ to Fortran DLL

Hi,

Apologies for posting my second topic today, but I have searched high and low for a solution to this particular problem and cannot break through it.

I am trying to call a Fortran subroutine (in a DLL) from C++ code, and the subroutine has some allocatable arrays as arguments.

When I step into the subroutine code, the array always shows up as "Undefined pointer/array", so my data is not getting passed in, even though it looks correct on C++ side

Other non dimensional arguments are working fine.

Here is my Fortran code:

SIMD prefix sum (cumulative sum)

Colleagues,

Does anyone have a good reference to an implementation (or at least an algorithm) for implementing a so-called prefix sum (a cumulative sum) in Fortran using SIMD?  I have found several good reference for implementations in C++ but they use SIMD functions peculiar to C++ that don't appear to be available in Fortran.

David

error stop: warning #6477: Fortran 2008 does not allow this statement or directive

Something that irritated me for a long time.

When compiled with -warn all -stand f08 I get

: warning #6477: Fortran 2008 does not allow this statement or directive.
error stop
--^

This seems completely wrong. Indeed Fortran 2008 introduced this statement.

Or am I using the compiler flags wrong?

This in with ifort (IFORT) 15.0.2 20150121.

Thanks

Anton

Calling a function from a parallelized do concurrent loop

Trying to compile my program in the release mode with parallelization, I've encountered a problem with calling a function, defined in a module. Here is the sample program to reproduce the problem:

program test
use test_mod
implicit none

integer, parameter :: N = 10
integer :: i
real :: a(N)

do concurrent (i = 1:N)
	a(i) = func(real(i))
end do

print *, a

end program

and the module:

DEC$ ATTRIBUTES DLLEXPORT attribute can not be assigned to an internal procedure

Hi,

I am trying to expose some Fortran subroutines in a DLL.
I didn't write the Fortran code, and I'm having some difficulties creating the DLL.

The Fortran code is something like this (simplified):

! ===========================================================================
 
 ! Some declarations, initialisations etc
 
 contains
 
   subroutine Initialisation

   !DEC$ ATTRIBUTES DLLEXPORT::Initialisation

mixed mpi/coarray programs - is -coarray-config-file required?

I've a mixed mpi/coarray program that I'm trying to port to intel.
I build it with mpiifort:

mpiifort --version
ifort (IFORT) 15.0.2 20150121

but I'm very confused about  -coarray-config-file option.
I can build the executable with or without this option,
but so far I haven't managed to run it, with or without this option.
My latest attempt is to specify -coarray-config-file at link time,
and submit the job to PBS queue with:

Double click selection of variable name is broken in VS

In November 2013 I posted this but the post is locked so I can not bump it:

If you double click a variable name in the source that is a component of a derived type, VS selects past the percent sign on the left but not that on the right!  It would be better I think if it stopped for both sides. It seams to have got changed in XE2013 update 5. In update 3 select stopped on both sides.

It is not yet fixed in XE 2015 update 3 and I presume not in later ones. I know it probably seams minor but it does affect users productivity. Is there an issue number ?

Same numbers differente signal

Dear MKL forum,

     I am rewriting some code using the MKL library from a fortran + open source math library, in the validation process i realize the function LAPACKE_dgesv giving the exact solution from the former code. But, in the eigenvectors some signals are changed, where is positive should be negative in several cases.

    The input matrix is exact the same, the fortran code:

         call dsyev ( jobz , uplo , m, dd , m, w, work , lm, info )

     The C code:

    LAPACKE_dgesv(LAPACK_COL MAJOR,jobz, uplo, m, temp, m,w);

Subscribe to Development Tools