Installation on CentOS 7: Difference between revisions
No edit summary |
|||
(15 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
= Install from Script = | = Install from Script = | ||
There is an install script available that contains the content of the whole tutorial. You will be prompted for you git username and password. | There is an install script available that contains the content of the whole tutorial. You will be prompted for you git username and password. WARNING: The script automatically installs packages and the EPEL repository for Centos 7, if you do not want tthis repository do not install with the script. The script installs FLOOXS to your directory or to where the path variable $FLXSHOME is set. Copy the contents of [[CentOS_install.sh]] to a file with the same name and run this script in a terminal using: | ||
sudo source ./CentOS_install.sh | |||
sudo ./CentOS_install.sh | |||
Continue on to section [http://www.flooxs.ece.ufl.edu/index.php/Installation_on_CentOS_7#Running_FLOOXS Running FLOOXS] | |||
= Install One Step at a Time = | = Install One Step at a Time = | ||
Choose if you | Choose if you want to supervise the flooxs build step by step. First you have to get FLOOXS source code. Follow download or git based on your code source. | ||
== Download == | == Download == | ||
1. Download the software and put it on your hard drive in a directory called flooxs | 1. Download the software and put it on your hard drive in a directory called flooxs | ||
Line 35: | Line 25: | ||
sudo yum -y install git | sudo yum -y install git | ||
= | = Build Flooxs = | ||
== Install Public Domain Libraries used in the compilation == | == Install Public Domain Libraries used in the compilation == | ||
3. Open the terminal. FLOOXS requires installing the EPEL for optimal performance. Run the following command to install the new repository: | 3. Open the terminal. FLOOXS requires installing the EPEL for optimal performance. Run the following command to install the new repository: | ||
Line 52: | Line 39: | ||
== Build Plplot == | == Build Plplot == | ||
The version of plplot on centos is too low for FLOOXS. Because of this we will download and build plplot. To do this we need to download and install cmake first. | The version of plplot on centos is too low for FLOOXS. Because of this we will download and build plplot. To do this we need to download and install cmake first since the centos cmake version it too low for plplot. | ||
wget https://github.com/Kitware/CMake/releases/download/v3.15.1/cmake-3.15.1-Linux-x86_64.sh | wget https://github.com/Kitware/CMake/releases/download/v3.15.1/cmake-3.15.1-Linux-x86_64.sh | ||
tar xf cmake-3.15.1-Linux-x86_64.tar.gz | |||
Now that we have the latest version of cmake, lets build plplot. | Now that we have the latest version of cmake, lets build plplot. | ||
cd $FLXSHOME | cd $FLXSHOME | ||
wget https://sourceforge.net/projects/plplot/files/plplot/5. | wget https://sourceforge.net/projects/plplot/files/plplot/5.13.0%20Source/plplot-5.13.0.tar.gz | ||
tar | tar xf plplot-5.13.0.tar.gz | ||
Now enter the plplot directory and build the source: | Now enter the plplot directory and build the source: | ||
cd plplot-5. | cd plplot-5.13.0 | ||
mkdir build_dir | mkdir build_dir | ||
cd build_dir | cd build_dir | ||
Line 71: | Line 56: | ||
Now add the plplot environment variable to your FLOOXS startup script or ~/.bashrc | Now add the plplot environment variable to your FLOOXS startup script or ~/.bashrc | ||
export PL_LIBRARY=$FLXSHOME/plplot/share/plplot5.13.0/tcl/ | export PL_LIBRARY=$FLXSHOME/plplot/share/plplot5.13.0/tcl/ | ||
Cleanup the files we do not need now | |||
cd $FLXSHOME | |||
rm -r cmake-3.15.1-Linux-x86_64.tar.gz plplot-5.13.0.tar.gz plplot-5.13.0 | |||
== Compile == | == Compile == | ||
If you get warnings, probably this is okay. Errors will never be okay. In general, you should resolve any errors in the "make depend" before trying to make. When you get an error, scroll up to see what directory you were in, check and see what file the error is in, and what line number it is giving you. Most likely if you get errors you simply did not set your paths correctly in your arch file. | If you get warnings, probably this is okay. Errors will never be okay. In general, you should resolve any errors in the "make depend" before trying to make. When you get an error, scroll up to see what directory you were in, check and see what file the error is in, and what line number it is giving you. Most likely if you get errors you simply did not set your paths correctly in your arch file. | ||
$ cd $FLXSHOME/src | $ cd $FLXSHOME/src | ||
$ make new ARCH= | $ make new ARCH=centos | ||
== Compile Triangle == | |||
Download triangle from [https://www.cs.cmu.edu/~quake/triangle.html] and follow the build instructions. Once triangle is built, move the program into the $FLXSHOME/src directory. | |||
= Running FLOOXS = | |||
$ | Open your ~/.bashrc or create a FLOOXS environment variable script. Add or make sure the following lines are in the file: | ||
$ | export FLXSHOME=/home/[Your Flooxs Folder Location] | ||
export PL_LIBRARY=$FLXSHOME/plplot/share/plplot5.13.0/tcl/ | |||
To use flooxs from anywhere in the shell, you can also create an alias for flooxs in your ~/.bashrc or FLOOXS environment script using the following command: | |||
alias flooxs='$FLXSHOME/src/flooxs.new' | |||
Or better yet, you can download and alias rlwrap to enhance your flooxs experience using the following commands: | |||
yum install rlwrap | |||
alias flooxs='rlwrap -n $FLXSHOME/src/flooxs.new' | |||
Now you are ready to work through the FLOOXS [http://www.flooxs.ece.ufl.edu/index.php/Manual#Examples_and_Tutorials Examples and Tutorials]! | |||
= Common Issues = | = Common Issues = | ||
'''1)''' The plotting utility is not working. Here you may need to add "export DISPLAY=localhost:0" to your ~/.bashrc | '''1)''' The plotting utility is not working. Here you may need to add "export DISPLAY=localhost:0" to your ~/.bashrc |
Latest revision as of 20:25, 7 April 2020
Today is 7/29/2018 - These are notes on how to install instructions for flooxs on 64-bit CentOS 7. These instructions are intended for linux/unix beginners.
Install from Script
There is an install script available that contains the content of the whole tutorial. You will be prompted for you git username and password. WARNING: The script automatically installs packages and the EPEL repository for Centos 7, if you do not want tthis repository do not install with the script. The script installs FLOOXS to your directory or to where the path variable $FLXSHOME is set. Copy the contents of CentOS_install.sh to a file with the same name and run this script in a terminal using:
sudo source ./CentOS_install.sh
Continue on to section Running FLOOXS
Install One Step at a Time
Choose if you want to supervise the flooxs build step by step. First you have to get FLOOXS source code. Follow download or git based on your code source.
Download
1. Download the software and put it on your hard drive in a directory called flooxs
$ mkdir ~/flooxs - go to [1], download the latest linux executable file (get the one that says linux)
2. Unpack the flooxs file This should make a directory called rel2008. Move the executable to the folder you create it:
$ cp /mnt/c/Users/[Windows Username]/[File Location] [Location you want Flooxs in Bash]
Git
1. Clone the Git repository. You need to have git permissions from Mark Law
git clone https://github.com/marklaw59/flooxs.git
1a. If you do not have git, install it with the following command:
sudo yum -y install git
Build Flooxs
Install Public Domain Libraries used in the compilation
3. Open the terminal. FLOOXS requires installing the EPEL for optimal performance. Run the following command to install the new repository:
sudo yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
Now update and install the proper packages. Run the following commands:
sudo yum -y update && sudo yum -y upgrade sudo yum -y install tk-devel tcl-devel suitesparse openblas-devel
Set the required environment variable
4. Open your ~/.bashrc or create a FLOOXS environment variable script. Add or make sure the following lines are in the file:
export FLXSHOME=/home/[Your Flooxs Folder Location]
5. If you choose a environment variable script, make sure to source the file before using FLOOXS.
Build Plplot
The version of plplot on centos is too low for FLOOXS. Because of this we will download and build plplot. To do this we need to download and install cmake first since the centos cmake version it too low for plplot.
wget https://github.com/Kitware/CMake/releases/download/v3.15.1/cmake-3.15.1-Linux-x86_64.sh tar xf cmake-3.15.1-Linux-x86_64.tar.gz
Now that we have the latest version of cmake, lets build plplot.
cd $FLXSHOME wget https://sourceforge.net/projects/plplot/files/plplot/5.13.0%20Source/plplot-5.13.0.tar.gz tar xf plplot-5.13.0.tar.gz
Now enter the plplot directory and build the source:
cd plplot-5.13.0 mkdir build_dir cd build_dir mkdir install cmake -DCMAKE_INSTALL_PREFIX=./install .. make make install
Now add the plplot environment variable to your FLOOXS startup script or ~/.bashrc
export PL_LIBRARY=$FLXSHOME/plplot/share/plplot5.13.0/tcl/
Cleanup the files we do not need now
cd $FLXSHOME rm -r cmake-3.15.1-Linux-x86_64.tar.gz plplot-5.13.0.tar.gz plplot-5.13.0
Compile
If you get warnings, probably this is okay. Errors will never be okay. In general, you should resolve any errors in the "make depend" before trying to make. When you get an error, scroll up to see what directory you were in, check and see what file the error is in, and what line number it is giving you. Most likely if you get errors you simply did not set your paths correctly in your arch file.
$ cd $FLXSHOME/src $ make new ARCH=centos
Compile Triangle
Download triangle from [2] and follow the build instructions. Once triangle is built, move the program into the $FLXSHOME/src directory.
Running FLOOXS
Open your ~/.bashrc or create a FLOOXS environment variable script. Add or make sure the following lines are in the file:
export FLXSHOME=/home/[Your Flooxs Folder Location] export PL_LIBRARY=$FLXSHOME/plplot/share/plplot5.13.0/tcl/
To use flooxs from anywhere in the shell, you can also create an alias for flooxs in your ~/.bashrc or FLOOXS environment script using the following command:
alias flooxs='$FLXSHOME/src/flooxs.new'
Or better yet, you can download and alias rlwrap to enhance your flooxs experience using the following commands:
yum install rlwrap alias flooxs='rlwrap -n $FLXSHOME/src/flooxs.new'
Now you are ready to work through the FLOOXS Examples and Tutorials!
Common Issues
1) The plotting utility is not working. Here you may need to add "export DISPLAY=localhost:0" to your ~/.bashrc
2) Some file names have case issues. Generally fixed with:
mv LevelSet/LayerGRid.cc LevelSet/LayerGrid.cc mv diffuse/newton.cc diffuse/Newton.cc
3) Some files might need a string.h include. The most common file where this is necessary is src/BasePDE/ErrInfo.h
#include <string.h> //to the top of src/BasePDE/ErrInfo.h
4) Makefile.linux.depend doesn't exist. Execute the following:
touch Makefile.linux.depend find . -type d -exec touch Makefile.linux.depend \;
5) For older versions of flooxs, $(MASTER_INCLUDE) is not present in all makefiles.