Intel® Fortran Compiler

LNK2019 error

I am in the process of converting from Compaq Visual Fortran to Intel Visual Fortran. 

I am trying to run simple "hello_world" program.

My program complies just fine with:   "Ifort /c hello_world.f90"

However, when I link with "Ifort /exe:runmodel.exe hello_world.obj"

I get the following error messages

Array of EXTERNAL

In the manual I found:

EXTERNAL FACET
CALL BAR(FACET)
SUBROUTINE BAR(F)
EXTERNAL F
CALL F(2)

I would like something as:

SUBROUTINE BAR(F,t,y)
EXTERNAL, DIMENSION(1:2) :: F
EXTERNAL fun
fun = F(1)
CALL fun(t,y)
fun = F(2)
CALL fun(t,y)

and

f(1) = myode
f(2) = myresult

SUBROUTINE myode(t,y)
! do something
END

SUBROUTINE myresult(t,y)
! do something
END

Do you think it is possibile?

 

Using variables in a structure repeatedly - as in Pascal "WITH"

If I have a structure called fred which contains many variables, eg. x and y, is there a way to avoid keeping having to preface the variables everywhere I use them with "fred%".  This used to be available in Pascal as:

with fred
  begin
  x = 555
  y = 666
  end

Long shot...

Error in the open statement

        do m = 0,15,1
                write(fn,*) m,'.txt'
                print *,fn
                open(unit=m,status='unknown',action='read',file=fn)
                print *,'opened file ',fn
                do k = 1,6
                        read(m,*),array(k,m,:)
                        print *,array(k,m,:)
                enddo
        enddo

 

I have the above code to read in an array from multiple files. It successfully reads from the first file but after that it shows error. I am posting the output.

Debugging allocatable string don't work with VS 2015

Hello,

Sorry I did not find a correct thread to post my question so I posted as new topic.

But one thing its a bit annoying is that with VS 2012 onwards I cannot view data of allocated string while debugging in Visual Studio whereas with VS 2010 I am easily able to view allocatable strings.

Whether there is some fix fo this? 

Thanks

Intel® Fortran Compiler abonnieren