Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Dynare
dynare
Commits
bc6c6fc4
Commit
bc6c6fc4
authored
Mar 17, 2017
by
Stéphane Adjemian
Browse files
Removed remaining calls or references to cputime.
parent
117458e6
Changes
8
Hide whitespace changes
Inline
Side-by-side
matlab/cycle_reduction.m
View file @
bc6c6fc4
...
...
@@ -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
([
'
cpu
time
for
cycle
reduction
algorithm
is
:
'
num2str
(
elapsedtime
)
'
(
n
=
'
int2str
(
n
)
'
).
'
])
%
$
t
ic
;
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
([
'
cpu
time
for
logarithmic
reduction
algorithm
is
:
'
num2str
(
elapsedtime
)
'
(
n
=
'
int2str
(
n
)
'
).
'
])
%
$
t
ic
;
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
.
...
...
tests
@
9e1c3232
Compare
b2a8b9c0
...
9e1c3232
Subproject commit
b2a8b9c059b1e2cb119e8d5fa92b4388fd93c9dd
Subproject commit
9e1c32322ff46c661068fbb1f0a1e4ebb83d136f
tests/Makefile.am
View file @
bc6c6fc4
...
...
@@ -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
:
cpu
time: 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
:
cpu
time: 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
\
...
...
tests/run_all_unitary_tests.m
View file @
bc6c6fc4
...
...
@@ -82,7 +82,7 @@ else
fprintf
(
fid
,
':number-tests: %d\n'
,
counter
);
fprintf
(
fid
,
':number-failed-tests: 0\n'
);
end
fprintf
(
fid
,
':
cpu
time: %f\n'
,
0.0
);
fprintf
(
fid
,
':
elapsed-
time: %f\n'
,
0.0
);
fclose
(
fid
);
if
~
isoctave
exit
...
...
tests/run_block_byte_tests_matlab.m
View file @
bc6c6fc4
...
...
@@ -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
,
':
cpu
time: %f\n'
,
ecput
);
fprintf
(
fid
,
':
elapsed-
time: %f\n'
,
ecput
);
fclose
(
fid
);
exit
;
tests/run_block_byte_tests_octave.m
View file @
bc6c6fc4
...
...
@@ -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,':
cpu
time: %f\n', ecput);
fprintf(fid,':
elapsed-
time: %f\n', ecput);
fclose(fid);
## Local variables:
## mode: Octave
...
...
tests/run_reporting_test_matlab.m
View file @
bc6c6fc4
...
...
@@ -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
,
':
cpu
time: %f\n'
,
0.0
);
fprintf
(
fid
,
':
elapsed-
time: %f\n'
,
0.0
);
fclose
(
fid
);
exit
;
tests/run_reporting_test_octave.m
View file @
bc6c6fc4
...
...
@@ -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,':
cpu
time: %f\n',0.0);
fprintf(fid,':
elapsed-
time: %f\n',0.0);
fclose(fid);
## Local variables:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment