Unverified Commit 674f1011 authored by Phillip Hoffmann's avatar Phillip Hoffmann Committed by GitHub
Browse files

Delete 1_Installation.Rmd

cleaning up the directory
parent 6ff8d1ed
---
title: "Slurm Simulator: Installation"
output:
pdf_document:
latex_engine: xelatex
monofont: "DejaVu Sans Mono"
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
This installation guide is tested on fresh installation of CenOS 7 (CentOS-7-x86_64-DVD-1611.iso KDE Plasma Workspaces with Development Tools)
Since there are many absolute paths in slurm.conf, it can be helpful to create a separate user for slurm named *slurm* and use it for Slurm Simulator.
The idea of simulator is to run simulator with various configurtation to compare them and choose one which is more suitable for particular situation. Becouse of this there are going to be multiple configurations with multiple outcomes. Therefore it is convinien to keep slurm binaries separately from the configuration and logs from the simulated run. The following directory structure is recommended used here (the respective directories will be created on appropriate steps during the tutorial)
```{bash, eval=FALSE}
/home/slurm - Slurm user home derectory
└── slurm_sim_ws - Slurm simulator work space
├── bld_opt - Slurm simulato building directory
├── sim - Directory where simulation will be performed
│ └── <system name> - Directory where simulation of particular system will be performed
│ └── <conf name> - Directory where simulation of particular configuration will be performed
│ ├── etc - Directory with configuration
│ ├── log - Directory with logs
│ └── var - Directory varius slurm output
├── slurm_opt - Slurm simulator binary installation directory
├── slurm_sim_tools - Slurm simulator toolkit
└── slurm_simulator - Slurm simulator source code
```
# Installing Dependencies
## Slurm Simulator Dependencies
### Install MySQL (MariaDB in this case)
Install mariadb server and devel packages:
```{bash, eval=FALSE}
sudo yum install mariadb-server
sudo yum install mariadb-devel
```
Enable and start mariadb server:
```{bash, eval=FALSE}
sudo systemctl enable mariadb
sudo systemctl start mariadb
```
Run mysql_secure_installation for more secure installation if needed.
If sql server is not accessible from the outside it is ok not to run it
```{bash, eval=FALSE}
sudo mysql_secure_installation
```
Add slurm user to sql, run in mysql:
```{sql}
create user 'slurm'@'localhost' identified by 'slurm'; grant all privileges on *.* to 'slurm'@'localhost' with grant option;
```
## Slurm Simulator Toolkit Dependencies
### Python
Install python3 with pymysql and pandas packages:
```{bash, eval=FALSE}
sudo yum -y install install epel-release
sudo yum -y install python34 python34-libs python34-devel python34-numpy python34-scipy python34-pip
sudo pip3 install pymysql
sudo pip3 install pandas
```
### R
Install R:
```{bash, eval=FALSE}
sudo yum -y install R R-Rcpp R-Rcpp-devel
sudo yum -y install python-devel
sudo yum install texlive-*
```
Install R-Studio:
```{bash, eval=FALSE}
wget https://download1.rstudio.org/rstudio-1.0.136-x86_64.rpm
sudo yum -y install rstudio-1.0.136-x86_64.rpm
```
In R-Studio or plain R install depending packages:
```{r, eval=FALSE}
install.packages("ggplot2")
install.packages("gridExtra")
install.packages("cowplot")
install.packages("lubridate")
install.packages("rPython")
install.packages("stringr")
install.packages("rstudioapi")
# install R Slurm Simulator Toolkit
install.packages("/home/slurm/slurm_sim_ws/slurm_sim_tools/src/RSlurmSimTools", repos = NULL, type="source")
```
# Prepering Slurm Simulator Workspace
Create work space for Slurm simulation activities:
```{bash, eval=FALSE}
cd
mkdir slurm_sim_ws
cd slurm_sim_ws
#create directory for simulations
mkdir sim
```
# Installing Slurm Simulator
Obtain Slurm Simulator source code with git:
```{bash, eval=FALSE}
git clone https://github.com/nsimakov/slurm_simulator.git
cd slurm_simulator
```
Ensure what slurm-17.02_Sim branch is used:
```{bash, eval=FALSE}
git branch
```
```
Output:
* slurm-17.02_Sim
```
If it is not the case checkout proper branch:
```{bash, eval=FALSE}
git fetch
git checkout slurm-17.02_Sim
```
Prepare builing directory
```{bash,eval=FALSE}
cd ..
mkdir bld_opt
cd bld_opt
```
Run configure:
```{bash,eval=FALSE}
../slurm_simulator/configure --prefix=/home/slurm/slurm_sim_ws/slurm_opt --enable-simulator \
--enable-pam --without-munge --enable-front-end --with-mysql-config=/usr/bin/ --disable-debug \
CFLAGS="-g -O3 -D NDEBUG=1"
```
Check config.log and ensure that mysql is found:
```{bash,eval=FALSE}
configure:4672: checking for mysql_config
configure:4690: found /usr/bin//mysql_config
```
Check that openssl is found:
```{bash,eval=FALSE}
configure:24145: checking for OpenSSL directory
configure:24213: gcc -o conftest -g -O3 -D NDEBUG=1 -pthread -I/usr/include -L/usr/lib \
conftest.c -lcrypto >&5
configure:24213: $? = 0
configure:24213: ./conftest
configure:24213: $? = 0
configure:24234: result: /usr
```
Slurm can work without MySQL or OpenSSL so if they are not found slurm still can be configured and built.
However in most cases these libraries would be needed for simulation.
Compile and install binaries:
```{bash,eval=FALSE}
make -j install
```
# Installing Slurm Simulator Toolkit
Obtaine Slurm Simulator Toolkit with git:
```{bash,eval=FALSE}
cd ~/slurm_sim_ws
git clone https://github.com/nsimakov/slurm_sim_tools.git
```
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment