Skip to content
Snippets Groups Projects
Commit 8ae5d807 authored by Maël Madon's avatar Maël Madon
Browse files

first cleaning README and renaming the campaign files

parent 42a27664
No related branches found
No related tags found
No related merge requests found
...@@ -10,9 +10,9 @@ It is a fork from demand-response-user ...@@ -10,9 +10,9 @@ It is a fork from demand-response-user
- `scripts/run_expe.sh` shell script which launch experiments when workload is prepared. - `scripts/run_expe.sh` shell script which launch experiments when workload is prepared.
- `scripts/compute_stat.sh` shell script which compute stats when the experiments finished. - `scripts/compute_stat.sh` shell script which compute stats when the experiments finished.
- `default.nix` nix file given all the necessary dependencies. - `default.nix` nix file given all the necessary dependencies.
- `campaign3.py`: Python script preparing and launching in parrallel the experiments. - `campaign.py`: Python script preparing and launching in parrallel the experiments.
Each experiment corresponds to one instance of `instance3.py`. Each experiment corresponds to one instance of `instance.py`.
- `analyse_campaign3.ipynb`: Jupyter notebook analysing the results. - `analyse_campaign.ipynb`: Jupyter notebook analysing the results.
## Steps to reproduce the experiments ## Steps to reproduce the experiments
...@@ -33,8 +33,8 @@ The main software used (and configured in the file `default.nix`) are: ...@@ -33,8 +33,8 @@ The main software used (and configured in the file `default.nix`) are:
- python3, pandas, jupyter, matplotlib etc. for the data analysis - python3, pandas, jupyter, matplotlib etc. for the data analysis
All the dependencies of the project are given in the default.nix file to All the dependencies of the project are given in the `default.nix` file.
install nix you can launch the command If you do not have Nix installed on your machine, you can install it with
```bash ```bash
scripts/install_nix.sh scripts/install_nix.sh
``` ```
...@@ -42,36 +42,40 @@ It might be required to type other commands for the nix command to be ...@@ -42,36 +42,40 @@ It might be required to type other commands for the nix command to be
available in the current shell. In this case it will be indicated by the available in the current shell. In this case it will be indicated by the
prompt of the nix installation. prompt of the nix installation.
Open a shell with all the dependencies managed:
To go into the experiments environment you can now type :
```bash ```bash
nix-shell -A exp_env --pure nix-shell -A exp_env --pure
``` ```
This will compile and install all the dependencies needed for the experiments
it can take some times (in our case, it took 6 minutes) This will compile and install all the dependencies needed for the experiments.
It can take some time (in our case, it took 6 minutes).
### 2. Prepare input workload ### 2. Prepare input workload
Inside the nix-shell use the following command inside project directory : Inside the nix-shell, run the following script to download (from the [Parallel Workloads Archive](https://www.cs.huji.ac.il/labs/parallel/workload/)) and filter the input workload used in the experiments:
```bash ```bash
scripts/prepare_workload.sh scripts/prepare_workload.sh
``` ```
### 3. Launch the campaign ### 3. Launch the campaign
By default the run_expe scripts only run one seed by experiment By default the `run_expe` scripts only run one seed by experiment
to do the 30 experiments you have to modify `--nb_replicat ` argument to do the 30 experiments you have to modify `--nb_replicat` argument
it should look like this : it should look like this:
```bash ```bash
python3 campaign3.py --nb-replicat 30 --expe-range -1 --window-mode 8 --nb-days 164 \ python3 campaign.py --nb-replicat 30 --expe-range -1 --window-mode 8 --nb-days 164 \
--json-behavior behavior_file/big_effort.json behavior_file/low_effort.json behavior_file/max_effort.json behavior_file/medium_effort.json \ --json-behavior behavior_file/big_effort.json behavior_file/low_effort.json behavior_file/max_effort.json behavior_file/medium_effort.json \
--compress-mode --production-file data_energy/energy_trace_sizing_solar.csv data_energy/energy_trace_sizing_solar.csv --compress-mode --production-file data_energy/energy_trace_sizing_solar.csv data_energy/energy_trace_sizing_solar.csv
``` ```
As every experiments can take up to 20 GB of RAM,
As every experiment can take up to 20 GB of RAM,
you might be limited by the memory of your system. you might be limited by the memory of your system.
When you are running the experiments you can limit When you are running the experiments you can limit
the number of parallel run using `--threads n` command-line argument the number of parallel run using `--threads n` command-line argument
with `n` the maximum of experiments to run in parallel. with `n` the maximum of experiments to run in parallel.
By default, it uses every physical cores available. By default, it uses every physical cores available.
Once you have done all the previous step, Once you have done all the previous steps,
launch the bash script in the nix-shell : launch the bash script in the nix-shell :
```bash ```bash
scripts/run_expe.sh scripts/run_expe.sh
...@@ -83,6 +87,7 @@ Rigid finished, Now monolithic behavior ...@@ -83,6 +87,7 @@ Rigid finished, Now monolithic behavior
It means that the program has finished computing the simulation It means that the program has finished computing the simulation
and is now computing stat on the obtained value. and is now computing stat on the obtained value.
You can stop the program now if you only want raw simulation results You can stop the program now if you only want raw simulation results
### 4. Generate the metrics ### 4. Generate the metrics
The tagged `experiments-version` version forget some metrics in computation. The tagged `experiments-version` version forget some metrics in computation.
After the experiments, to compute the metrics we have to switch to tag After the experiments, to compute the metrics we have to switch to tag
...@@ -92,13 +97,13 @@ using the command : ...@@ -92,13 +97,13 @@ using the command :
scripts/compute_stat.sh scripts/compute_stat.sh
``` ```
The stat will be computed and place in the shell directory with the names The stat will be computed and place in the shell directory with the names
`campaign3_metrics.csv` and `campaign3_metrics_relative.csv`. `campaign_metrics.csv` and `campaign_metrics_relative.csv`.
It will likely differ from the one provided in result_big_expe. It will likely differ from the one provided in result_big_expe.
In our reproduction we noticed a relative difference of 0.5% in energy related metrics and In our reproduction we noticed a relative difference of 0.5% in energy related metrics and
2% in user behaviors related metrics 2% in user behaviors related metrics
### 5. Generate the graph ### 5. Generate the graph
To generate the graph you can launch the notebook `analyse_campaign3.ipynb`. To generate the graph you can launch the notebook `analyse_campaign.ipynb`.
You will have to change the variable `RAW_DATA_DIR` and `OUT_DIR` to match with your setup. You will have to change the variable `RAW_DATA_DIR` and `OUT_DIR` to match with your setup.
...@@ -121,7 +126,7 @@ is the energy trace of the energy produced by DataZero2 sizing algorithm ...@@ -121,7 +126,7 @@ is the energy trace of the energy produced by DataZero2 sizing algorithm
## Advanced options ## Advanced options
Inside the nix shell exp_env, launch the commands : Inside the nix shell exp_env, launch the commands :
```bash ```bash
python3 campaign3.py --help python3 campaign.py --help
``` ```
You will get a details of every possible arguments. You will get a details of every possible arguments.
You will have to at least give the following arguments : You will have to at least give the following arguments :
......
File moved
...@@ -11,7 +11,7 @@ import concurrent.futures ...@@ -11,7 +11,7 @@ import concurrent.futures
from scripts.util import WL_DIR, ROOT_DIR, ExpeDict, create_dir_rec_if_needed, generate_dict_from_json from scripts.util import WL_DIR, ROOT_DIR, ExpeDict, create_dir_rec_if_needed, generate_dict_from_json
from scripts.generate_file import save_dict_to_json from scripts.generate_file import save_dict_to_json
from instance3 import start_instance, prepare_input_data, generate_windows_dict, \ from instance import start_instance, prepare_input_data, generate_windows_dict, \
compress_expe_result, user_type_to_behavior compress_expe_result, user_type_to_behavior
from scripts.stat_tools import plot_exec_time, plot_queue_load from scripts.stat_tools import plot_exec_time, plot_queue_load
from compute_metrics_campaign3 import compute_metrics_all_expe_parr from compute_metrics_campaign3 import compute_metrics_all_expe_parr
......
File moved
File moved
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment