aboutsummaryrefslogtreecommitdiff
path: root/captain/special.f90
diff options
context:
space:
mode:
authorJeffrey Armstrong <jeff@approximatrix.com>2021-04-07 20:17:41 -0400
committerJeffrey Armstrong <jeff@approximatrix.com>2021-04-07 20:17:41 -0400
commit26eee62be8820373a61654c51c6f3622fe46d166 (patch)
treede8eceb3efb8383b681a3a3ce2803a78cfeb5b46 /captain/special.f90
parent90591a3e98463bec9bb678a5058b8d714c765054 (diff)
downloadlevitating-26eee62be8820373a61654c51c6f3622fe46d166.tar.gz
levitating-26eee62be8820373a61654c51c6f3622fe46d166.zip
Fixed tasks such that they are created in the db initially. Fixed link to results to be consistent with filenames for saving results.
Diffstat (limited to 'captain/special.f90')
-rw-r--r--captain/special.f9018
1 files changed, 15 insertions, 3 deletions
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