set -e 

for dir in *; 
do 
        if [ -d "$dir/reports" ] || [ -f $dir ]; 
        then 
                echo "skipping $dir"; 
                continue; 
        else 
                echo "Starting $dir";
                date '+%d/%m/%Y %H:%M:%S'
                export PYTHONPATH="$HOME/soft/cue:soft/cue/engine/"
                python ~/soft/cue/engine/call.py --data_config ${dir}/${dir}.data.config --model_config ${dir}/${dir}.model.config
            	date '+%d/%m/%Y %H:%M:%S'
	fi
done

# each sample takes ~2h on 28 CPUs, i.e. 56 CPU-h
# for 1000 samples it is ~56 000 CPU-h