Skip to content

Installation

sinclairdavid edited this page Dec 11, 2018 · 12 revisions

System Requirements

FRED is written in C++ for UNIX-like systems. It uses C++11 features available in gcc 5.1 and higher, or the clang compiler version 6.1.0 or higher on Mac OS X, and it should be compatible with any other ANSI compliant C++11 compiler. FRED was developed on OS X and Linux systems and requires that the following components be installed prior to use:

  • gcc
  • make
  • Perl
  • Python
  • gnuplot (to make plots. optional)
  • ffmpeg (to make videos, optional)

System Requirements for Windows

FRED has also been tested on Windows running [Cygwin] (http://www.cygwin.com).

If using Cygwin, the following installation packages are recommended:

  • Development
  • Editors
  • Graphics
  • Perl
  • Python
  • Shells
  • X11

FRED Pre-installation checklist for OS X

  1. Add these lines to .bashrc:
    export FRED_HOME=$HOME/FRED
    export FRED_GNUPLOT=/usr/local/bin/gnuplot
    export PATH=.:$HOME/FRED/bin:/usr/local/bin:$PATH
  1. Open Xcode and make sure the license is accepted

  2. Install XCode command line tools:

    % xcode-select –install
  1. Install latest version of XQuartz

  2. Install homebrew:

   % sh < ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
   % brew doctor
  1. Install ffmpeg app (optional):
    % brew install ffmpeg
  1. Restart terminal

  2. Clone FRED:

    % git clone git://github.com/FRED-Pitt/FRED.git

Environmental Variables

To run FRED from any working directory, you should set an environmental variable FRED_HOME to the location of the top-level FRED directory. If you use bash, add the following lines to your .profile or .bashrc:

    export FRED_HOME=$HOME/FRED
    export PATH=${FRED_HOME}/bin:/usr/local/bin:$PATH

If you have installed gnuplot, include the line

    export FRED_GNUPLOT=/usr/local/bin/gnuplot

Modify as needed to reflect the locations on your system.

Downloading FRED

FRED is available on github.com

FRED is released with an Open Source License (BSD 3-Clause)

To make a local copy, go to your home directory and enter:

    % git clone git://github.com/FRED-Pitt/FRED.git

This will create a directory called FRED with the current distribution.

Updating FRED

Once you have cloned FRED using github, you can update to get the latest version as follows:

    % fred_update

This will download and install any changes you need to sync with the current distribution. It will not overwrite any changes you have made to your working directories.

Compiling FRED

Once you have set your environmental variables and cloned FRED as described above, go to the FRED directory and compile the system:

    % cd $FRED_HOME
    % make


If you are running FRED on MacOS, you may be able to confirm that your installation of FRED is working correctly using the regression test script. Run the regression test script. If there are no error messages, your installation is complete. (If there are error messages, this does not mean something has gone amiss with your installation; the regression test only checks if your code can run a FRED simulation and that the results match those given by an identical simulation run on our machine, yours may differ simply because your C++ compiler uses a different random number generator!) A successful test looks like:

    % fred_rt
    FRED regression test: base
    run 1 ... run 2 ...
    comparing results ...
    regression test passed

If you see this, FRED is installed. Congratulations!

Clone this wiki locally