From 26eee62be8820373a61654c51c6f3622fe46d166 Mon Sep 17 00:00:00 2001 From: Jeffrey Armstrong Date: Wed, 7 Apr 2021 20:17:41 -0400 Subject: Fixed tasks such that they are created in the db initially. Fixed link to results to be consistent with filenames for saving results. --- captain/special.f90 | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'captain/special.f90') diff --git a/captain/special.f90 b/captain/special.f90 index 26f31e3..f1c5e94 100644 --- a/captain/special.f90 +++ b/captain/special.f90 @@ -50,11 +50,14 @@ contains end function get_instructions_static_filename - function get_task_result_static_filename(job_id, task_num) result(res) + function get_task_result_static_filename(job_id, task_num, no_path) result(res) use config implicit none integer, intent(in)::job_id, task_num + + logical, intent(in), optional::no_path + character(len=:), pointer::res character(64)::filename @@ -63,8 +66,17 @@ contains write(job_text, '(I8)') job_id write(task_text, '(I8)') task_num filename = "results-job"//trim(adjustl(job_text))//"-task"//trim(adjustl(task_text))//".txt" - - res => get_special_full_filename("results", filename) + + if(present(no_path)) then + if(no_path) then + allocate(character(len=len_trim(filename)) :: res) + res = filename + else + res => get_special_full_filename("results", filename) + end if + else + res => get_special_full_filename("results", filename) + end if end function get_task_result_static_filename -- cgit v1.2.3