include_queue_header
#module purge

date --rfc-3339=seconds > %REMOTE_ECF_HOME%/%ECF_NAME%.setup_time

include_special_setup
include_init_commands
%include "./head.h"

include_module_load

set -vx

cd %REMOTE_ECF_HOME%
task_path=%REMOTE_ECF_HOME%/%ECF_NAME%
Rscript load_process_save_chunk_ecflow.R --args $task_path insert_indices
#include_transfer_back_and_rm

#clean temporal folder
#bash %REMOTE_ECF_HOME%clean_devshm.sh $task_path

%include "./tail.h"
