Introduction

A description of how to install Flux7.9 in the Linux partition of a dual boot system

see also Norberto's installation guide (somewhat outdated, but may still be helpful)
and Eric's shell script (see contrib directory) that does CHAPTER 2 below and further automatically.

CHAPTER 1. Installing the Linux operating system

It is assumed that your PC is capable of booting from a USB hard disk. If not, burn the iso image, mentioned in step 2, to a CD, and proceed to step 4.

  1. plug a USB stick (1GB or larger) in your PC
    open Windows Explorer
    Right click on your USB and choose "Format"
    options FAT32 and Fast formatting
    click start
  2. download a suitable Ubuntu "iso" file
    e.g., for a 32bit system, ubuntu-12.04.2-desktop-i386.iso
  3. download UNetbootin from http://unetbootin.sourceforge.net/
    and execute it
    at Disk image: select the iso file you just downloaded
    at type: select USB disk and give the correct drive letter (check!)
    click OK and wait (takes about 10 minutes)
  4. From here follow the guidelines from the excellent video
    http://youtu.be/PvP_4J2MUEc

CHAPTER 2. Obtaining gcc and gfortran and other preparations

In Linux, open a terminal window, and give the commands This should install the gfortran compiler.
Now that you are at it, also download the X11 development package

Download the latest Flux distribution from http://pjms.nl
Unpack, but do not install yet.
In the following flux7.9.1 is the identifier of the Flux distribution, may change in the future.

tar -jxvf Downloads/flux7.9.1.tar.bz2

Put the following environment variables in $HOME/.profile:
(instead of PGPLOT any other directory name may be chosen)

  export PGPLOT_DIR=${HOME}/PGPLOT
  export PGPLOT_DEV=/xwin
  export PGPLOT_BACKGROUND=white
  export PGPLOT_FOREGROUND=black
  export PGPLOT_FOREGROUND
  export PGPLOT_XW_WIDTH=0.6
  export FLUX=${HOME}/flux7.9.1/FLUX7 
  PATH=.:$FLUX/BIN:$PATH
You have to reboot for these changes to take effect systemwide.

Note the '.:' may be omitted from the PATH, if you really like the default Ubuntu behaviour of not automatically recognizing commands in the current directory.

CHAPTER 3. Installing PGPLOT

download pgplot5.2.tar.gz from ftp://ftp.astro.caltech.edu/pub/pgplot/pgplot5.2.tar.gz

Unpack the download:

~$ tar -zxvf Downloads/pgplot5.2.tar.gz 
~$ cd pgplot

Copy the 2 PostScript files of FLUX (optional, see: pjms.nl/FLUXHTML/psdriver.html )
~/pgplot$ cd drivers
~/pgplot/drivers$ mv psdriv.f psdriv.f.orig
~/pgplot/drivers$ cp -a $FLUX/PGPLOT.PSDRIV/psdriv.f .  
~/pgplot/src$ cd ../src
~/pgplot/src$ mv grtext.f grtext.f.orig
~/pgplot/src$ cp -a $FLUX/PGPLOT.PSDRIV/grtext.f .
Make destination directory PGPLOT.
~/pgplot/src$ cd ~
~$ mkdir PGPLOT
~$ cd PGPLOT
copy drivers.list to the destination dir, and edit
~/PGPLOT$ cp ~/pgplot/drivers.list .
~/PGPLOT$ vi drivers.list
uncomment the wanted drivers, my choice are:
 PSDRIV 1 /PS        PostScript printers, monochrome, landscape	Std F77
 PSDRIV 2 /VPS       Postscript printers, monochrome, portrait	Std F77
 PSDRIV 3 /CPS       PostScript printers, color, landscape	Std F77
 PSDRIV 4 /VCPS      PostScript printers, color, portrait	Std F77
 XWDRIV 1 /XWINDOW   Workstations running X Window System	C
 XWDRIV 2 /XSERVE    Persistent window on X Window System	C
create makefile:
~/PGPLOT$ ~/pgplot/makemake ~/pgplot linux g77_gcc_aout
~/PGPLOT$ vi makefile
a few changes in the makefile (< = old, > = new):
25,26c25,26
< FCOMPL=g77
< FFLAGC=-Wall -O
---
> FCOMPL=gfortran
> FFLAGC=-Wall -O -fno-backslash
note added august 2015.
In the current version of gfortran the option
-fno-backslash no longer exists.
It should not be inserted in line 26, but instead removed from line 27
~/PGPLOT$ make
~/PGPLOT$ make cpg
~/PGPLOT$ make clean

Make a test, e.g.

~$ cd $PGPLOT_DIR
~/PGPLOT$ ./pgdemo1
and watch the nice pictures.

CHAPTER 4. BUILDING FLUX

I suppose you already downloaded FLUX from http://pjms.nl/FLUXBIN/, extracted the files and set environmental variables FLUX and PATH

Go to $FLUX

$ cd $FLUX

$ makemake makedefs.linux
If you did not include '.:' in the PATH (see chapter 2) you will now get the error
bash: makemake: command not found
As a work around type:
$ ./makemake makedefs.linux
$ make clean
$ make
!Yippee No errors!!

test if flux is working

$ cd $FLUX/INPUT
$ ./fluxvelo.bat
if these don't work, try instead
$ sh cd $FLUX/INPUT
$ sh ./fluxvelo.bat
let it run, takes 1 to 40 minutes depending on system
At the end it will tell you the time used
(on my 'power' computer it took 84 seconds, on my notebook over half an hour.)

For some further tests try, e.g.,

$ $FLUX/testall
notes added august 2015.
This did not work right away. First do

chmod +x $FLUX/testall

Further tests and demo's may be found in various subdirectories, such as

cd PLOTXY
demo