richelbilderbeek / pbdmms

Some models
GNU General Public License v3.0
2 stars 0 forks source link

jobo: add_nltt_viables don't want to add data to file #215

Closed JorikdeBoer closed 7 years ago

JorikdeBoer commented 7 years ago

the cout line in the code gives the nltt output, but doesn't transfer the data to the jobo_nltt_viables.csv file, while the add_nltt_inviables works. How is this possible? @richelbilderbeek

richelbilderbeek commented 7 years ago

Hmm, my guess would be one or more R packages are absent.

Try running, on Peregrine:

./install_r_packages

(script name is approximate, e.g. may have .sh extension)

Does that solve it?

richelbilderbeek commented 7 years ago

Nah, I estimate the hypothesis above being correct with 1% probability.

I'd sooner think the R script I create is flawed. Could you post such an R script here? If yes, I'll run it locally.

richelbilderbeek commented 7 years ago

I'll work on it :muscle:

richelbilderbeek commented 7 years ago

Problem: there are only two out of four .csvs created:

[s2176661@peregrine jobo_jobscript_episodes]$ ls *.csv
jobo_ltt_viables.csv  jobo_nltt_viables.csv
richelbilderbeek commented 7 years ago

I think this is a feature, as with the current setup: jkr::do_experiment does only save one LTT and one nLTT plot. I'll see how to get it to four.

richelbilderbeek commented 7 years ago

Replaced

int main()
{
  //...
      jkr::do_experiment<
        jobo::parameters,
        jobo::simulation,
        jobo::results
       >(a);
  //...
}

by

int main()
{
  //...
      simulation s(p);
      s.run();
      const auto& r = s.get_results();
      save_ltt_plot_viables(r, p.get_ltt_plot_filename_vi());
      save_ltt_plot_inviables(r, p.get_ltt_plot_filename_in());
      save_nltt_plot_viables(r, p.get_nltt_plot_filename_v());
      save_nltt_plot_inviables(r, p.get_nltt_plot_filename_i());
  //...
}

Looks like something that will work.

richelbilderbeek commented 7 years ago

Four files are created:

[s2176661@peregrine jobo_jobscript_episodes]$ ./jobo_jobscript_episode_XXVI.sh 

The following have been reloaded with a version change:
  1) gettext/0.19.7-foss-2016a => gettext/0.19.6-foss-2016a

The following have been reloaded with a version change:
  1) GCC/4.9.3-2.25 => GCC/5.1.0

Version 2017-01-27-12:57
Parameters loaded: population_size: 100
seed: 42
mutation_rate: 0.1
n_generations: 100
loci: 20

normalized_time,normalized_number_of_lineages
0,0.5
0.010101,0.5
0.020202,0.5
0.030303,0.5
0.040404,0.5
0.0505051,0.5
0.0606061,0.5
0.0707071,0.5
0.0808081,0.5
0.0909091,0.5
0.10101,0.5
0.111111,0.5
0.121212,0.5
0.131313,0.5
0.141414,0.5
0.151515,0.5
0.161616,0.5
0.171717,0.5
0.181818,0.5
0.191919,0.5
0.20202,0.5
0.212121,0.5
0.222222,0.5
0.232323,0.5
0.242424,0.5
0.252525,0.5
0.262626,0.5
0.272727,0.5
0.282828,0.5
0.292929,0.5
0.30303,0.5
0.313131,0.5
0.323232,0.5
0.333333,0.5
0.343434,0.5
0.353535,0.5
0.363636,0.5
0.373737,0.5
0.383838,0.5
0.393939,0.5
0.40404,0.5
0.414141,0.5
0.424242,0.5
0.434343,0.5
0.444444,0.5
0.454545,1

[s2176661@peregrine jobo_jobscript_episodes]$ ls *.csv
jobo_ltt_inviables.csv  jobo_ltt_viables.csv  jobo_nltt_inviables.csv  jobo_nltt_viables.csv
richelbilderbeek commented 7 years ago

Jorik thinks I can close this. I will :-)