
 document: nag_mark25.txt
   author: bill.bardsley@simfit.org.uk
     date: 15/07/2016
  content: Creating simfit dlls linked to the NAG library
intention: List the actions used to upgrade from mark 24 to mark 25 
           in such a way as to outline the procedures that can be 
           extended indefinitely to future marks, DLL types, and 
           alternative compilers.


Actions required using the FTN95 compiler with the NAG DLLs
-----------------------------------------------------------

In order to allow simfit to use the standard NAG library DLLs several
steps were required as follows.

1) Actions in the c:\simfit7\dll\NAG folder

   a) Create these stubs to deal with obsolete routines
      c05_mark25.f
      f03_mark25.f
      f04_mark25.f

   b) Edit mark24 link scripts to create these mark25 link scripts
      nag_mark25.link
      mkl_mark25.link
      x64_nag_mark25.link
      x64_mkl_mark25.link
   
   c) Edit mark24 batch files to create these mark25 batch files
      nag_mark25m.link
      mkl_mark25m.link
      x64_nag_mark25m.link
      x64_mkl_mark25m.link
      
   d) Run these batch files to create the following DLLs
      fldll254m_nag_maths.dll  
      fldll254m_mkl_maths.dll 
      FLW6I24DC_nag_maths.dll  
      FLW6I24DC_mkl_maths.dll 

2) Actions in the c:\setup\programs folder

   A) Add the following lines to change_simfit_version.config
      fldll254m_nag_maths.dll  NAG Mark25 Version M (FLDLL254M_NAG.DLL standard)
      fldll254m_mkl_maths.dll  NAG Mark25 Version M (FLDLL254M_MKL.DLL high speed)
 
   B) Add the following lines to x64_change_simfit_version.config
      FLW6I24DC_nag_maths.dll  64-bit Mark24 Version (FLW6I24DC_nag.dll standard)
      FLW6I24DC_mkl_maths.dll  64-bit Mark24 Version (FLW6I24DC_mkl.dll high-speed)

3) Actions required for other DLLs and/or compilers (e.g. NAGfor)
   --------------------------------------------------------------

    i) Edit the above batch files for the alternative compiler      
   ii) Edit the above link scripts for the alternative compiler
  iii) Change names in the link scripts if e.g. thread safe NAG DLLs are required 
   iv) Do exactly as 1) and 2) above

4) Actions required for the installation setup program
   ----------------------------------------------------

   Edit the following inno_setup scripts in the c:\setup folder if it is wished
   to build a new version of the simfit installation program.
   simfit.iss
   x64_simfit.iss  

5) Actions to change an existing Simfit installation
   -------------------------------------------------
    
   This is how to update an existing Simfit installation interactively in order to 
   use the new NAG DLLs  

  I) 32-bit installations
     Copy the new dlls and change_simfit_version.config into, e.g.
     c:\program files (x86)\simfit\bin

 II) 64-bit installations
     Copy the new dlls and x64_change_simfit_version.config into, e.g.
     c:\program files\simfit\bin 
   