No Fuss Flame is a basic command line tool to configure, execute and analyze FLAME models. It automatically parses, builds and runs a FLAME model, reads the output data and creates plots and tables, as specified by the user in a configuration file. It is written in Python and can be used as a wrapper to access data generated by FLAME in any Python project.
- Existing FLAME installation (xparser+libmboard)
- Python 3
- SciPi-Stack
- pyyaml
- PTable
wget https://github.com/FLAME-HPC/libmboard/archive/master.zip
unzip master.zip
cd libmboard-master/
bash ./autogen.sh
./configure --disable-parallel --disable-tests
make
sudo make install
cd ../
wget https://github.com/FLAME-HPC/xparser/archive/0.17.1.zip
unzip 0.17.1.zip
cd xparser-0.17.1/
make
cd ../
sudo apt-get install python3
sudo apt-get install python3-pip
sudo apt-get install python3-tk
sudo apt-get install python3-setuptools
python3 -m pip install --user numpy scipy matplotlib ipython jupyter pandas sympy nose
python3 -m pip install --user pyyaml
python3 -m pip install --user PTable
The configuration file specifies which parameters will be used, what data will be captured and what plots/tables will be generated when executing the model. The configuration file is written in YAML. A minimal working example is the following:
model_path: /home/my_model/ # Path to model folder
model_xml: /home/my_model/model.xml # Path to model.xml file
xparser_path: /home/xparser-0.17.1-clean/ # Path to xparser folder
base_xml: /home/my_model/0.xml # 0.xml file (initial state)
workspace: /home/results/ # No Fuss Flame will store all data and results here
iterations: 3000 # Number of iterations per run
output_frequency: 20 # Specifies at which frequency data is captured
runs: 4 # Number of runs per parameter setting
experiments: # Specify one one more experiments
my_exp1:
param1: 1.618
param2: 42
time_series: # Specify data output
Agent1:
- interesting_variable
There are more options. See the example_config.yaml
file for details.
To run a configuration/model use the following command:
python3 nff-auto.py <config-file>
By default No Fuss Flame uses all available CPUs. The number of CPUs used can be limited by the -n
flag. For more options run No Fuss Flame with --help
.
Import pyflame
to your project in order to run FLAME models and analyze output data in Python:
import pyflame
session = pyflame.FlameSession("config_file.yaml")
session.parse_model()
session.compile_model()
session.modify_xml()
session.simulate_model()
session.load_simulated_data()
data = session.disaggregated_data()