This implementation is applicable to computer systems described in section 2.1 of the Installer's Note (see Installer's Note, Applicability).

Additional information related to this implementation, that has come to light after the release of this product, is described below.

### Calling the DLLs included with FLW3222DCL from Absoft Pro Fortran

Users who have the Absoft 10.2 Fortran compiler may use the DLLs provided with these static libraries together with the Absoft compiler. This is because both the Absoft compiler and these DLLs use the CDECL calling convention.

In order to import the routines from the DLL, a DLL_IMPORT statement has to be used instead of a standard EXTERNAL statement for the NAG routines. For example the NAG example program for A02AAF becomes:

* A02AAF Example Program Text * Mark 14 Revised. NAG Copyright 1989. * .. Parameters .. INTEGER NIN, NOUT PARAMETER (NIN=5,NOUT=6) * .. Local Scalars .. DOUBLE PRECISION XI, XR, YI, YR * .. Absoft Import Declaration .. DLL_IMPORT A02AAF * .. Executable Statements .. WRITE (NOUT,*) 'A02AAF Example Program Results' WRITE (NOUT,*) * Skip heading in data file READ (NIN,*) READ (NIN,*) XR, XI * * Compute square root of (XR,XI) and return in (YR,YI) * CALL A02AAF(XR,XI,YR,YI) * WRITE (NOUT,*) ' XR XI YR YI' WRITE (NOUT,99999) XR, XI, YR, YI * 99999 FORMAT (1X,2F6.1,2F9.4) END

### Calling the DLLs included with FLW3222DCL from Lahey/Fujitsu Fortran

Tests with the Lahey 7.2 and 7.1 compilers have indicated that the DLLs included with FLW3222DCL may be used with these Lahey Fortran compilers.

In order to utilise these DLLs the -ml msvb flag must be used. For example:

lf95 f07aafe.f "C:\Program Files\NAG\FL22\flw3222dc\lib\flw3222dc_nag.lib" -ml msvb

Lahey demands that a DLL_IMPORT statement replace the external statement in order to specify that the routine is to be taken from a DLL and NOT linked statically. Lahey provide their own highly optimised BLAS and LAPACK routines and to use these a standard EXTERNAL statement should be used together with the -blas and -lapack switches. (Actually -lapack implies -blas so the single -lapack switch would suffice.) We believe that, because the MKL libraries are not genuine import libraries, the -nblas and -nlapack switches coupled with DLL_IMPORT and the Intel libraries as below:lf95 f07aafe.f libguide40.lib mkl_intel_c_dll.lib mkl_intel_thread_dll.lib mkl_core_dll.lib -nblas -nlapack -ml msvb

does NOT work; DGESV cannot be linked in this manner.* F07AAF Example Program Text * Mark 21 Release. NAG Copyright 2004. * .. Parameters .. INTEGER NIN, NOUT PARAMETER (NIN=5,NOUT=6) INTEGER NMAX PARAMETER (NMAX=8) INTEGER LDA, LDB PARAMETER (LDA=NMAX,LDB=NMAX) * .. Local Scalars .. INTEGER I, IFAIL, INFO, J, N * .. Local Arrays .. DOUBLE PRECISION A(LDA,NMAX), B(LDB) INTEGER IPIV(NMAX) * .. Lahey Import Declaration .. DLL_IMPORT DGESV, X04CAF ! for use with nag LAPACK and BLAS version only * DLL_IMPORT X04CAF ! for use with NAG mkl version * EXTERNAL DGESV ! for use with NAG mkl version and Lahey LAPACK * .. Executable Statements .. WRITE (NOUT,*) 'F07AAF Example Program Results' WRITE (NOUT,*) * Skip heading in data file READ (NIN,*) READ (NIN,*) N IF (N.LE.NMAX) THEN * * Read A and B from data file * READ (NIN,*) ((A(I,J),J=1,N),I=1,N) READ (NIN,*) (B(I),I=1,N) * * Solve the equations Ax = b for x * CALL DGESV(N,1,A,LDA,IPIV,B,LDB,INFO) * IF (INFO.EQ.0) THEN * * Print solution * WRITE (NOUT,*) 'Solution' WRITE (NOUT,99999) (B(I),I=1,N) * * Print details of factorization * WRITE (NOUT,*) IFAIL = 1 CALL X04CAF('General',' ',N,N,A,LDA, + 'Details of factorization',IFAIL) * * Print pivot indices * WRITE (NOUT,*) WRITE (NOUT,*) 'Pivot indices' WRITE (NOUT,99998) (IPIV(I),I=1,N) * ELSE WRITE (NOUT,99997) 'The (', INFO, ',', INFO, ')', + ' element of the factor U is zero' END IF ELSE WRITE (NOUT,*) 'NMAX too small' END IF * 99999 FORMAT ((3X,7F11.4)) 99998 FORMAT ((3X,7I11)) 99997 FORMAT (1X,A,I3,A,I3,A,A) END