Any additional information related to this implementation, that came to light after the release of this product, will be described below.
Apple MacPro4.1, Quad-Core Intel Xeon, @ 2.26GHz
Mac OS X 10.6.8, Darwn Kernel 10.8.0 (Snow Leopard)
Intel Fortran Composer XE 2011 update 6, (2011.6.038),
Version 12.1.0.038 Build 20110811
Apple Macmini5.1, Intel Core i5, @ 2.30GHz
Mac OS X 10.7.2, Darwn Kernel 11.2.0 (Lion)
Intel Fortran Composer XE 2011 update 7, (2011.7.246),
Version 12.1.1.246 Build 20111011
Apple Macmini5.1, Intel Core i5, @ 2.30GHz
Mac OS X 10.7.4, Darwin Kernel 11.4.0 (Lion)
Intel Fortran Composer XE 2013
Version 13.0.1.119 Build 20121010
A consequence of these rules is that a gfortran LOGICAL variable can be passed to Intel Fortran and operated on without problem, but not vice versa. Hence, output arguments of type LOGICAL returned by NAG routines may not be interpreted correctly by a gfortran calling program.
To avoid this problem, it is necessary to pass arguments of type 64-bit INTEGER from gfortran instead of LOGICAL. This affects a small number of NAG routines:
a00acf (function return value) a00adf (argument LICVAL) d02lxf (argument START) d02ngf (argument LDERIV) d02nhf (argument LDERIV) d02njf (argument LDERIV) d02nnf (argument LDERIV) d02nyf (argument ALGEQU) d02qff (argument ROOT) d02qgf (argument ROOT) d02qwf (argument ALTERG) f02wdf (argument SVD) f06blf (argument FAIL) f06clf (argument FAIL) f08pkf/DHSEIN (argument SELECT) f08pxf/ZHSEIN (argument SELECT) f08qkf/DTREVC (argument SELECT) g02daf (argument SVD) g02ddf (argument SVD) g02dnf (argument EST) g02gnf (argument EST) g02tbf (argument X) g05kef (function return value) g07gbf (function return value) g08ahf (argument TIES) g11saf (argument X) g11sbf (argument X) x02daf (function return value) x02djf (function return value)Routines which have arguments of type LOGICAL that are input only should work correctly without this workaround.
c06lbf f06clf f16glf(blas_zsum) f06gaf(zdotu) f06gbf(zdotc) f06grf(zdotui) f06gsf(zdotci) s01eaf s14aff s14agf s15ddf s21daf
Passing an incorrect character string length argument must be avoided if the subroutine call is to work correctly. When calling from gfortran it is therefore necessary to pass these arguments explicitly, and make them be 64-bit integers.
Character strings declared by a NAG routine as being of fixed length (e.g. CHARACTER or CHARACTER*6) cause no problems, because the hidden argument length value is ignored by the called subroutine in any case. Routines containing both fixed-length and non-fixed-length strings need the hidden argument to be explicitly passed for all strings in order to preserve correct ordering of arguments.
The tar file contains the following directory structure:
postrelease -|- nag_interface_blocks_gfortran (.f90 module files)
|
|- examples -|- source_gfortran (modified example programs)
Note that the data files used by the example programs do not need to change
- the ones distributed with the library are fine for use with gfortran.
gfortran -fdefault-integer-8 -c nag_precisions.f90 gfortran -fdefault-integer-8 -c nag_blas_consts.f90 gfortran -fdefault-integer-8 -c nag_a_ib.f90 gfortran -fdefault-integer-8 -c nag_c_ib.f90 gfortran -fdefault-integer-8 -c nag_d_ib.f90 gfortran -fdefault-integer-8 -c nag_e_ib.f90 gfortran -fdefault-integer-8 -c nag_f_ib.f90 gfortran -fdefault-integer-8 -c nag_g_ib.f90 gfortran -fdefault-integer-8 -c nag_h_ib.f90 gfortran -fdefault-integer-8 -c nag_m_ib.f90 gfortran -fdefault-integer-8 -c nag_p_ib.f90 gfortran -fdefault-integer-8 -c nag_s_ib.f90 gfortran -fdefault-integer-8 -c nag_x_ib.f90 gfortran -fdefault-integer-8 -c nag_long_names.f90 gfortran -fdefault-integer-8 -c nag_library.f90
To use the NAG Fortran Library and the supplied MKL libraries, you may link in the following manner:
gfortran -fdefault-integer-8 driver.f \
-I[INSTALL_DIR]/nag_interface_blocks_gfortran \
[INSTALL_DIR]/lib/libnag_mkl.a \
[INSTALL_DIR]/mkl_intel64/libmkl_intel_ilp64.a \
-L[INSTALL_DIR]/mkl_intel64 -lmkl_intel_thread -lmkl_core \
[INSTALL_DIR]/rtl/libsvml.a [INSTALL_DIR]/rtl/libimf.a \
[INSTALL_DIR]/rtl/libifcoremt.a [INSTALL_DIR]/rtl/libirc.a -lpthread
where driver.f is your application program;
gfortran -fdefault-integer-8 driver.f \
-I[INSTALL_DIR]/nag_interface_blocks_gfortran \
[INSTALL_DIR]/lib/libnag_mkl.dylib -L[INSTALL_DIR]/mkl_intel64 \
-lmkl_intel_ilp64 -lmkl_intel_thread -lmkl_core \
-L[INSTALL_DIR]/rtl -liomp5 -lsvml -limf -lifcoremt -lirc -lpthread
if the shareable library is required.
However, if you prefer to link to a version of the NAG Library which does not require the use of MKL you may wish to use the self-contained libraries as follows:
gfortran -fdefault-integer-8 driver.f \
-I[INSTALL_DIR]/nag_interface_blocks_gfortran \
[INSTALL_DIR]/lib/libnag_nag.a [INSTALL_DIR]/rtl/libsvml.a \
[INSTALL_DIR]/rtl/libimf.a [INSTALL_DIR]/rtl/libifcoremt.a \
[INSTALL_DIR]/rtl/libirc.a
or
gfortran -fdefault-integer-8 driver.f \
-I[INSTALL_DIR]/nag_interface_blocks_gfortran \
[INSTALL_DIR]/lib/libnag_nag.dylib \
-L[INSTALL_DIR]/rtl -lsvml -limf -lifcoremt -lirc
if the shareable library is required.
If your application has been linked with the shareable NAG and MKL libraries then the environment variable DYLD_LIBRARY_PATH must be set (or extended) to allow run time linkage.
In the C shell, type:
setenv DYLD_LIBRARY_PATH \
[INSTALL_DIR]/lib:[INSTALL_DIR]/mkl_intel64:[INSTALL_DIR]/rtl
to set DYLD_LIBRARY_PATH, or
setenv DYLD_LIBRARY_PATH \
[INSTALL_DIR]/lib:[INSTALL_DIR]/mkl_intel64:[INSTALL_DIR]/rtl:\
${DYLD_LIBRARY_PATH}
to extend DYLD_LIBRARY_PATH if you already have it set.
In the Bourne shell, type:
DYLD_LIBRARY_PATH=[INSTALL_DIR]/lib:[INSTALL_DIR]/mkl_intel64:\
[INSTALL_DIR]/rtl
export DYLD_LIBRARY_PATH
to set DYLD_LIBRARY_PATH, or
DYLD_LIBRARY_PATH=[INSTALL_DIR]/lib:[INSTALL_DIR]/mkl_intel64:\
[INSTALL_DIR]/rtl:${DYLD_LIBRARY_PATH}
export DYLD_LIBRARY_PATH
to extend DYLD_LIBRARY_PATH if you already have it set.