Readme-peakfqSA-compile.txt [docs/17c/peakfqSA-jfe-distrib/src] Revision:   Date:
*******************************************************
*******************************************************
Notes on peakfqSA development, testing, and modifications
John England, USACE
in collaboration with Tim Cohn, USGS

john.f.england@usace.army.mil
303-963-4524
*******************************************************
*******************************************************
latest revision
12-DEC-2014
15-APR-2015

26-FEB-2016
01-MAR-2016

08-SEP-2017 (array lengths to ~ 20,000)

07-JUL-2018 Mac compilation and updated Windows instructions

*******************************************************
See individual routines for modifications.
All clearly marked with:
C JFE
*******************************************************
*******************************************************
Basic steps:

1. install and configure your compiler of choice.
2. compile/link at command line
3. For Linux/Win - compile dcdflib1.f90 at command line, then use Makefile


*******************************************************
*******************************************************
Compilation on Mac
OS, Platform and Compiler
*********************
Macbook Air 
macOS High Sierra, Version 10.13.4 (17E202)
Processor 1.8 GHz Intel Core i5
Homebrew 1.6.9; GNU Fortran (Homebrew GCC 7.3.0)

1. Install Homebrew
2. Install gcc and gfortran
3. Install your favorite editor such as Emacs :-)

Compiler:
gfortran version 7.3.0

*************************************
To compile/link:

at command line
gfortran -o PeakfqSA0999.app -fbounds-check  -static -Wampersand -g peakfqSA-jfe.f emafit-jfe.f probfun.f imslfake.f utilityfuncs.f *.f90

*******************************************************
*******************************************************
Compilation on Linux
OS, Platform and Compiler
*********************
Linux, Centos 7, gfortran for Linux binary

Compiler:
gfortran version 4.8.5

*************************************
To compile/link:

On Linux, use makefile or command line with gfortran:

gfortran -o PeakfqSA_USACE_win.linux -fbounds-check  -static -Wampersand -g peakfqSA-jfe.f emafit-jfe.f probfun.f imslfake.f utilityfuncs.f dcdflib1.f90

The gfortran versions vary, and affect the use of flags.
The -ffpe-summary=none is not in 4.8.5

*******************************************************
*******************************************************
Compilation on Linux for MS WINDOWS
OS, Platform and Compiler
*********************
Linux, Centos 7, MinGW-gfortran for Windows 7/10 .exe
Compiler:
/usr/bin/x86_64-w64-mingw32-gfortran

x86_64-w64-mingw32-gfortran --version
GNU Fortran (GCC) 4.9.3 20150626 (Fedora MinGW 4.9.3-1.el7)

*************************************
To compile/link:

x86_64-w64-mingw32-gfortran -o PeakfqSA_USACE_win.exe -fbounds-check -ffpe-summary=none -static -Wampersand -g peakfqSA-jfe.f emafit-jfe.f probfun.f imslfake.f utilityfuncs.f dcdflib1.f90

*******************************************************

The -ffpe-summary=none flag takes
care of warnings introduced after gfortran 4.8.2, and issues with
mingw. It takes care of runtime notes/warnings, such as:

Note: The following floating-point exceptions are signalling:
IEEE_UNDERFLOW_FLAG IEEE_DENORMAL