INSTALLATION

Step by step

A special page is devoted to the step by step installation on a dual boot Linux/Windows system

http://www.pjms.nl/FLUXBIN/flux7.9.install.html

Some further details below.

Most of the following also applies to the installation on a Windows32 system. For system requirements for that case see the win32 page. See also INSTALLATION PROBLEMS in the faq page

Fortran compiler

FLUX7 is written in Fortran77. Some of the auxiliary programs use modules written in C. Various Fortran compilers have been used in the past to compile the package. Notably the combination gcc - g77 has been found to work well and produce efficient code. This is also the compiler that was used to maintain and update Flux from 2000 until 2013.

However the GNU g77 compiler has been replaced with gfortran. This is a Fortran95 compiler, in which some of the older Fortran77 constructs are not implemented.

In Flux7.9.0 these obsolete Fortran77 constructs have been replaced with Fortran95 features. Another innovation in Flux7.9.0 is the implementation of parallel processing, where the inner loop of the flux simulation is handled by multiple CPU's. The current version is compatible both with gfortran and g77, but parallel processing is only supported in gfortran.

turnaround times

for job 'fluxvelo.sh' (see directory INPUT)

  Hardware: Intel core i5-2500 (4 CPU's) at 3.3 GHz
            Passmark = 6592 (April 2012)
            http://www.cpubenchmark.net/high_end_cpus.html
  Flux7:    version 7.9.0
  Fortran  version threads arch      OS        seconds
  g77      3.4.6      1    32-bits   Linux      360
  g77      3.4.0      1    32-bits   Win7/MinGW 355
  gfortran 4.7.2      4    64-bits   Linux       84
  gfortran 4.7.2      4    32-bits   Win7/MinGW 129

PGPLOT

The following assumes you have installed the PGPLOT graphics package, although some programs, flux7 in particular, will work without it.

To obtain PGPLOT, see PGPLOT in the flux7 page . To install PGPLOT, see PGPLOT in the faq page . I have included a modified PostScript Driver for PGPLOT. This driver enables the use of PosScript fonts in output files. If you want to use this, you should patch and (re-)install the PGPLOT graphics package. For details see PostScript Fonts in PGPLOT in the psdriver page.

FLUX7

For possible problems in the installation procedure, see INSTALLATION PROBLEMS in the faq page

Make FLUX7 your current directory.

In the following this directory is indicated as './'

Make Makefiles

Type './makemake' or './makemake <makedefs_file>' This will edit the Makefiles in this directory, and in the various subdirectories.

If you don't like the result, edit the file makedefs.xxx for your installation, rather then the individual Makefiles.

Things that might need to be adapted are BINDIR, and the system dependent parameters FFLAGS, CFLAGS, etc. The option -Df77_UNDERSCORE_AFTER in CFLAGS should be set if your Fortran appends an underscore to subroutine names. The makedefs file also selects a few system dependent subroutines.

 'makedefs' files are included for Linux and for MinGW.
  A few versions for other Unix variants are also present. These have
  not be maintained in the last 12 years and are therefore moved to
  directory archive.

If you make one for another system, or have suggestions for improvements to the above, please send me a copy.

attention PC users (Linux as well as MSWindows)

Users may profit from the -march=cpu-type commandline option of gcc to somewhat speed up calculations. Recent versions of gcc support the option -march=native. Older versions require to specify the cpu-type. Check the value of HOSTTYPE in makedefs.linux or makedefs.mingw.

environmental variable FLUX

Define an environment variable with name FLUX and value the full pathname to directory FLUX7.

 example (bash, lines to be included in ~/.profile):
 FLUX=/home/peter/flux7.8.6/FLUX7
 export FLUX

For other environment variables associated with flux7, see PATH variable and TUNING PGPLOT.

FILE.LOC

Some files containing data tables are grouped together in directory ./TAB ( files COMBIN.FIG, massa.tab, scoef.88, HFCHARGE.DAT ).

Alternatively, put these files in some other place where they are easily accessible for all potential users e.g. directory /usr/local/tab.

If so, file $FLUX/FLUXLIB/FILE.LOC that contains the locations where these files reside will need some editing.

System dependent features

Check for system dependencies, see section on FLUXLIB A few system dependent features may also be encountered in the INCLUDE directives in different Fortran modules.

The script ./BIN/ini contains some system dependent features and should be edited to suit your site.

If you use a compiler other then gfortran, g77, or the standard HPUX, SGI or Sun f77 compilers, see also the cbinding page.

rbsim

You may want to have a look at the special instructions for Installing rbsim in the rbsiminst page

make

Type 'make'

This will leave the compiled programs in various directories. and also in directory ./BIN.

PATH variable

Include FLUX7/BIN in your PATH variable.

e.g. if your command processor is 'csh':

    setenv PATH $FLUX/BIN:$PATH
    rehash

or in bash:

    PATH=$FLUX/BIN:$PATH

($FLUX stands for the directory you have chosen to install FLUX7)

Put the commands used, including the definition of variable FLUX, in your .cshrc or .profile.

tests

Make sure environmental variable PGPLOT_DEV is set (e.g. to /xwin, or, if you want no output, to /null)

Some tests provided may be run by typing:

 'ini -t fluxtest'
 './testall'
 The script 'testall' combines 5 tests that may also be run separately:
    'cd ./TEST; make test'
    'cd ./MISC; make test'
    'cd ./RBSIM; make test'
    'cd ./YIMP; make test'
    'cd ./FITYIM; make test'
 'cd ./INPUT; ./fluxvelo.sh' (takes a while, have a coffee break)
 'cd ./PLOTXY; make test'

Observe the output for error and warning messages!

Examples of input files may also be found in subdirectory INPUT. Various directories have subdirectories named TESTOUTPUT. These give an idea of what to expect when running the test programs.

clean-up

Remove the object files and other junk by typing 'make clean'


TUNING PGPLOT.

Although PGPLOT is well documented, some details are hard to find.

PGPLOT environmental variables, general

 PGPLOT_DIR directory where to find pgplot stuff (/usr/local/pgplot/)
 PGPLOT_DEV default device driver (/xwin)
 PGPLOT_BACKGROUND=white (default is the other way around!)
 PGPLOT_FOREGROUND=black
 PGPLOT_FONT specify font file, override $PGPLOT_DIR/grfont.dat
 PGPLOT_RGB  specify color-name database, override $PGPLOT_DIR/rgb.txt

environment variables for the Xwindows driver

 PGPLOT_XW_WIDTH (value between 0 and 2)
  may be used to scale the size of the window. Only takes effect
  after restarting the server (icon 'pgxwin').
  A good starting value is something around 0.6.
 This variable has no effect if the pgxwin.Win.geometry is defined !?!
 (See below)

environment variables for the PostScript driver:

 PGPLOT_PS_WIDTH    default  7800
 PGPLOT_PS_HEIGHT   default 10500
 PGPLOT_PS_HOFFSET  default   350
 PGPLOT_PS_VOFFSET  default   250
 PGPLOT_PS_BBOX
   If this variable has value MAX,  PGPLOT puts standard (full-page)
   bounding-box information in the header of the PostScript file. If
   the variable is unset or has some other value, PGPLOT puts the
   correct (smallest) bounding box information in the trailer of the
   PostScript file.
 PGPLOT_PS_MARKERS
   Specify "NO" to suppress use of a PostScript font for the graph
   markers; markers are then emulated by line-drawing.
 PGPLOT_PS_COLOR     if set, use color mode
 PGPLOT_IDENT        if set write user name etc on each page
 PGPLOT_PS_DRAW_BBOX If set, draw bounding box
 PGPLOT_PS_FONT      If set to "NO"` don't use PostScript fonts, or,
                     choose Times/Courier/Helvetica/NewCentury/Zapf

X resources (may be put in your file ~/.Xdefaults):

 pgxwin.Win.geometry: WIDTHxHEIGHT+X+Y
 pgxwin.Win.iconGeometry:  +X+Y
 pgxwin.Win.iconize: If true, iconize inactive windows if persistent
 pgxwin.Win.acceptQuit: True if WM_DELETE_WINDOW events are to be obeyed
 pgxwin.Win.minColors: Min number of colors per colormap
 pgxwin.Win.maxColors: Max number of colors per colormap
 pgxwin.Win.visual: default|monochrome|pseudocolor|directcolor|
                   staticcolor|truecolor|grayscale|staticgray
 pgxwin.Win.crosshair: If true show crosshair cursor
 pgxwin.server.iconGeometry:  +X+Y
 pgxwin.server.visible: True|False
 pgxwin.server.display: display_name