MANN Tool

Multi-Agent Neural Network Installation

Make sure you ssh into snowmane using the -X flag. Note it is a capital letter 'X'

ssh -X chend@snowmane.vbi.vt.edu`

Pre-requisite Knowledge

At a minimum you should know how to navigate a *nix file system without a graphical user interface (GUI). This means, a knowledge of the following *nix commands:

  • pwd : to print the current working directory (aka, where am i now)
  • cd : to change directories
  • ls : to list the contents of the current directory
  • mkdir : create a new folder
  • mv : to move files/folders
  • cp : to copy files/folders
  • nano : to do basic file edits

If you need a refresher. The first 3 lessons in the Software Carpentry Unix Shell should be all you need.

Installation/Setup

Make sure you have a code folder in your home directory. You can create one by typing:

cd ~
mkdir code

Installing Python

make sure you get the latest Python 3 version of Anaconda here. At the time of writing this wiki, the version of Anaconda for Python 3 is http://repo.continuum.io/anaconda3/Anaconda3-2.1.0-Linux-x86_64.sh

Install Anaconda: cd ~/code wget http://repo.continuum.io/anaconda3/Anaconda3-2.1.0-Linux-x86_64.sh bash Anaconda3-2.1.0-Linux-x86_64.sh If it prompts you keep saying yes and/or hit Enter on your keyboard.

At the end of the installation if you type which python it should direct you to ~/anaconda3/bin/python

Installing/Updating MANN

The multi-agent-neural-network (mann) python package can be found here. However it should already be on in snowmane in the following directory:

/home/sdal/mann/data/git/multi-agent-neural-network

you can get to this directory by typing:

cd /home/sdal/mann/data/git/multi-agent-neural-network

when you are in the mann directory, to install it (or any updates) run python setup.py install to install the python module

Installing LENS

The official lens documentation can be found here

There is an lens_install.sh shell script to install lens in the mann directory. Run the script to install LENS

bash lens_install.sh

after you install LENS, you can see if your installation worked by typing lens in the terminal

If that works, save the lens variables in your .bashrc file.

cd ~
nano .bashrc

save the following lines to the bottom of the file:

export LENSDIR=~/code/Lens      # or wherever Lens is installed
export HOSTTYPE=x86_64-linux    # same as above during make
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${LENSDIR}/Bin/${HOSTTYPE}
export PATH=${PATH}:${LENSDIR}/Bin/${HOSTTYPE}

Multi Disciplinary Diffusion Model Experiments(MDME)

The MDME project uses the framework created by the MANN project. That is, MANN contains all the code and algorithms, MDME runs the MANN code with a specific set of parameters.

There are four (4) main files that you need to track before running an experiment:

  • Per-simulation files
    • config.ini
    • main.py
  • Batch and parameter sweep files
    • batch_sweep.ini
    • batch_sweep.py

I would suggest editing the files using a terminal editor, such as nano. You can open a file when you are in the folder by typing, for example, nano config.ini

To run a single simulation, copy the 02-lens folder with cp 02-lens 02-lens-SIMULATION_NAME. Inside the newly copied folder, change the config.ini file to the desired parameters and run python main.py

To run a batch/sweep simulation, make sure the 02-lens/config.ini contains your desired parameters, and also check the batch_sweep.ini. When the two (2) files are set, run python batch_sweep.py

Using the Multi-Agent Neural-Network Simulation Visualizer

Setting up and downloading packages

Log into snowmane and install the following R packages:

`install.packages(c('shiny', 'ggplot2', 'scales', 'foreach', 'doParallel', 'knitr', 'magrittr'))`

Running the Shiny Application

Log into snowmane (note the added options to indicate a port number):

`ssh -L 8777:localhost:8777 id@snowmane.vbi.vt.edu`

Navigate to the shiny application folder:

`cd /home/sdal/mann/data/git/multidisciplinary-diffusion-model-experiments/src/R/shiny`

Run the application:

`R --slave --no-restore -e 'shiny::runApp(".", port=8777)'`

open up a browser and go to localhost:8777

If you want to load the app multiple times, you can. Just make a new ssh connection to snowmane and change the port number you are using