Commit bc6c6fc4 authored by Stéphane Adjemian's avatar Stéphane Adjemian
Browse files

Removed remaining calls or references to cputime.

parent 117458e6
......@@ -125,8 +125,8 @@ end
%$
%$ % Solve the equation with the cycle reduction algorithm
%$ try
%$ t=cputime; X1 = cycle_reduction(C,B,A,1e-7); elapsedtime = cputime-t;
%$ disp(['cputime for cycle reduction algorithm is: ' num2str(elapsedtime) ' (n=' int2str(n) ').'])
%$ tic; X1 = cycle_reduction(C,B,A,1e-7); elapsedtime = toc;
%$ disp(['Elapsed time for cycle reduction algorithm is: ' num2str(elapsedtime) ' (n=' int2str(n) ').'])
%$ t(1) = 1;
%$ catch
%$ % nothing to do here.
......@@ -134,8 +134,8 @@ end
%$
%$ % Solve the equation with the logarithmic reduction algorithm
%$ try
%$ t=cputime; X2 = logarithmic_reduction(A,B,C,1e-16,100); elapsedtime = cputime-t;
%$ disp(['cputime for logarithmic reduction algorithm is: ' num2str(elapsedtime) ' (n=' int2str(n) ').'])
%$ tic; X2 = logarithmic_reduction(A,B,C,1e-16,100); elapsedtime = toc;
%$ disp(['Elapsed time for logarithmic reduction algorithm is: ' num2str(elapsedtime) ' (n=' int2str(n) ').'])
%$ t(2) = 1;
%$ catch
%$ % nothing to do here.
......
Subproject commit b2a8b9c059b1e2cb119e8d5fa92b4388fd93c9dd
Subproject commit 9e1c32322ff46c661068fbb1f0a1e4ebb83d136f
......@@ -834,7 +834,7 @@ check-octave: $(O_XFAIL_TRS_FILES) $(O_TRS_FILES)
@echo "`tput bold``tput setaf 8`MATLAB: $(PWD)/$*... `tput sgr0`"
@DYNARE_VERSION="$(PACKAGE_VERSION)" TOP_TEST_DIR="$(PWD)" FILESTEM="$*" \
$(MATLAB)/bin/matlab -nosplash -nodisplay -r run_test_matlab > $*.m.log 2> /dev/null || \
printf ":test-result: FAIL\n:number-tests: 1\n:number-failed-tests: 1\n:list-of-failed-tests: $*.mod\n:cputime: 0.0\n" > $*.m.trs
printf ":test-result: FAIL\n:number-tests: 1\n:number-failed-tests: 1\n:list-of-failed-tests: $*.mod\n:elapsed-time: 0.0\n" > $*.m.trs
@if grep -q ":test-result: PASS" $*.m.trs; then \
echo "`tput bold``tput setaf 2`MATLAB: $(PWD)/$* PASSED!`tput sgr0`" ; \
else \
......@@ -854,7 +854,7 @@ check-octave: $(O_XFAIL_TRS_FILES) $(O_TRS_FILES)
@echo "`tput bold``tput setaf 8`OCTAVE: $(PWD)/$*... `tput sgr0`"
@DYNARE_VERSION="$(PACKAGE_VERSION)" TOP_TEST_DIR="$(PWD)" FILESTEM="$*" \
$(OCTAVE) --no-init-file --silent --no-history --path "$*.mod" run_test_octave.m > $*.o.log 2>&1 || \
printf ":test-result: FAIL\n:number-tests: 1\n:number-failed-tests: 1\n:list-of-failed-tests: $*.mod\n:cputime: 0.0\n" > $*.o.trs
printf ":test-result: FAIL\n:number-tests: 1\n:number-failed-tests: 1\n:list-of-failed-tests: $*.mod\n:elapsed-time: 0.0\n" > $*.o.trs
@if grep -q ":test-result: PASS" $*.o.trs; then \
echo "`tput bold``tput setaf 2`OCTAVE: $(PWD)/$* PASSED!`tput sgr0`" ; \
else \
......
......@@ -82,7 +82,7 @@ else
fprintf(fid,':number-tests: %d\n', counter);
fprintf(fid,':number-failed-tests: 0\n');
end
fprintf(fid,':cputime: %f\n',0.0);
fprintf(fid,':elapsed-time: %f\n',0.0);
fclose(fid);
if ~isoctave
exit
......
......@@ -38,7 +38,7 @@ failedBlock = {};
num_block_tests = 0;
cd([top_test_dir filesep 'block_bytecode']);
has_optimization_toolbox = user_has_matlab_license('optimization_toolbox');
cput = cputime;
tic;
for blockFlag = 0:1
for bytecodeFlag = 0:1
default_solve_algo = 2;
......@@ -129,7 +129,7 @@ for blockFlag = 0:1
end
end
end
ecput = cputime - cput;
ecput = toc;
delete('wsMat.mat')
cd(getenv('TOP_TEST_DIR'));
fid = fopen('run_block_byte_tests_matlab.m.trs', 'w+');
......@@ -143,6 +143,6 @@ else
fprintf(fid,':number-tests: %d\n', num_block_tests);
fprintf(fid,':number-failed-tests: 0\n');
end
fprintf(fid,':cputime: %f\n', ecput);
fprintf(fid,':elapsed-time: %f\n', ecput);
fclose(fid);
exit;
......@@ -40,7 +40,7 @@ putenv("GNUTERM", "dumb")
failedBlock = {};
num_block_tests = 0;
cd([top_test_dir filesep 'block_bytecode']);
cput = cputime;
tic;
for blockFlag = 0:1
for bytecodeFlag = 0:1
## Recall that solve_algo=7 and stack_solve_algo=2 are not supported
......@@ -131,7 +131,7 @@ for blockFlag = 0:1
endfor
endfor
endfor
ecput = cputime - cput;
ecput = toc;
delete('wsOct');
cd(getenv('TOP_TEST_DIR'));
fid = fopen('run_block_byte_tests_octave.o.trs', 'w+');
......@@ -145,7 +145,7 @@ else
fprintf(fid,':number-tests: %d\n', num_block_tests);
fprintf(fid,':number-failed-tests: 0\n');
end
fprintf(fid,':cputime: %f\n', ecput);
fprintf(fid,':elapsed-time: %f\n', ecput);
fclose(fid);
## Local variables:
## mode: Octave
......
......@@ -54,6 +54,6 @@ else
fprintf(fid,':number-failed-tests: 0\n');
fprintf(fid,':list-of-passed-tests: run_reporting_test_matlab.m\n');
end
fprintf(fid,':cputime: %f\n',0.0);
fprintf(fid,':elapsed-time: %f\n',0.0);
fclose(fid);
exit;
......@@ -60,7 +60,7 @@ else
fprintf(fid,':number-failed-tests: 0\n');
fprintf(fid,':list-of-passed-tests: run_reporting_test_octave.m\n');
end
fprintf(fid,':cputime: %f\n',0.0);
fprintf(fid,':elapsed-time: %f\n',0.0);
fclose(fid);
## Local variables:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment