tput input files to waitfolder during computations - cosmo - front and backend for Markov-Chain Monte Carlo inversion of cosmogenic nuclide concentrations
HTML git clone git://src.adamsgaard.dk/cosmo
DIR Log
DIR Files
DIR Refs
DIR README
DIR LICENSE
---
DIR commit 982c44b95e99c673b67ff5a51d58b2786520db64
DIR parent 1ca0a617715320666a6a2eaf9ed90a7156057982
HTML Author: Anders Damsgaard <anders.damsgaard@geo.au.dk>
Date: Thu, 3 Dec 2015 19:42:20 +0100
put input files to waitfolder during computations
Diffstat:
M matlab/file_scanner_mcmc_starter.m | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
---
DIR diff --git a/matlab/file_scanner_mcmc_starter.m b/matlab/file_scanner_mcmc_starter.m
t@@ -71,6 +71,9 @@ while 1
% read full file name and path
infile = strcat(infolder, '/', infiles(i).name);
+ % move to waitfolder
+ movefile(infile, waitfolder);
+
idstring = strsplit(infile, '_');
id = idstring(2);
statusfile = char(strcat(infolder, '/status_', id));
t@@ -80,7 +83,7 @@ while 1
disp(infile);
disp(strcat('Simulation id: ', id));
end
-
+
% read file and save data to local scope
[sample_id, name, email, lat, long, ...
be_conc, al_conc, c_conc, ne_conc, ...
t@@ -140,7 +143,8 @@ while 1
% delete or archive the file so it is not processed again
%delete(infile)
- movefile(infile, archivefolder);
+ %movefile(infile, archivefolder);
+ movefile(char(strcat(waitfolder, '/cosmo_', id)), archivefolder);
fid = fopen(statusfile, 'w');
fprintf(fid, 'Computations complete');
t@@ -150,8 +154,8 @@ while 1
diary off;
- % sleep 1 second in order to reduce system load
- pause(1)
+ % sleep in order to reduce system load
+ pause(5)
%keyboard
end