PDA

View Full Version : Intel Fortran Compiler 10.1.021 & Visual Studio2008 & IMSL 6.0



belgacem
08-06-2008, 04:50 AM
Hello
Can I please use IMSL 6.0 (for Intel Fortran Compiler 10.0) with Intel Fortran Compiler 10.1.021 under Visual Studio 2008?
IF yes, how can i include "NNLPF" for example?:p

belgacem
08-06-2008, 09:19 AM
YES! we can do this.
here an example of using the "NNLPF"

! Console2.f90
!
! FUNCTIONS:
! Console2 - Entry point of console application.
!

!************************************************* ***************************
!
! PROGRAM: Console2
!
! PURPOSE: Entry point for the console application.
!
!************************************************* ***************************

program Console2

USE NNLPF_INT
USE WRRRN_INT
include 'link_fnl_shared.h'

IMPLICIT NONE
INTEGER IBTYPE, M, ME
PARAMETER (IBTYPE=0, M=2, ME=1)
!
REAL(KIND(1E0)) FVALUE, X(2), XGUESS(2), XLB(2), XUB(2)
EXTERNAL FCN
!
XLB = -HUGE(X(1))
XUB = HUGE(X(1))
!
CALL NNLPF (FCN, M, ME, IBTYPE, XLB, XUB, X)
!
CALL WRRRN ('The solution is', X)
END

SUBROUTINE FCN (X, IACT, RESULT, IERR)
INTEGER IACT
REAL(KIND(1E0)) X(*), RESULT
LOGICAL IERR
!
SELECT CASE (IACT)
CASE(0)
RESULT = (X(1)-2.0E0)**2 + (X(2)-1.0E0)**2
CASE(1)
RESULT = X(1) - 2.0E0*X(2) + 1.0E0
CASE(2)
RESULT = -(X(1)**2)/4.0E0 - X(2)**2 + 1.0E0
END SELECT
RETURN
END

ed
08-06-2008, 09:28 AM
Thanks for you answering your own question!

Intel has recently announced that VS 2008 is a supported environment for IVF 10, so there shouldn't be any issues.