#!/bin/bash

njobs=12
tmpfile=tmp-betweensim-entailment.job

exp_done_dir=done_experiments

if [ ! -d ${exp_done_dir} ]
then
  mkdir ${exp_done_dir}
fi

rm -f ${tmpfile}
for dirname in `ls -d */ | grep grafon_graphs`
do
  echo $dirname
  echo "python betweengsim.py \
    -d ${dirname} \
    -c ~/repos/grafon/cfg/grafon.ini && mv ${dirname} ${exp_done_dir}" >> ${tmpfile}
done;

if [ -e ${tmpfile} ]
then
  parallel -j$njobs -a ${tmpfile}
  rm -f ${tmpfile}
fi
