Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
binary_c-python
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Izzard, Robert Dr (Maths & Physics)
binary_c-python
Commits
42213b5f
Commit
42213b5f
authored
9 years ago
by
Izzard, Robert Dr (Maths & Physics)
Browse files
Options
Downloads
Patches
Plain Diff
add test script for new derivs, and orig reference binary_c
parent
9b1070f0
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
binary_c.orig
+0
-0
0 additions, 0 deletions
binary_c.orig
test_new_derivs.pl
+64
-0
64 additions, 0 deletions
test_new_derivs.pl
with
64 additions
and
0 deletions
binary_c.orig
0 → 100755
+
0
−
0
View file @
42213b5f
File added
This diff is collapsed.
Click to expand it.
test_new_derivs.pl
0 → 100755
+
64
−
0
View file @
42213b5f
#!/usr/bin/env perl
use
threads
;
use
Thread::
Queue
;
use
rob_misc
;
use
robqueue
;
my
$args
=
`
tbse echo
`;
my
@bin_cs
=
('
binary_c.orig
','
binary_c
');
my
$count
=
0
;
my
$q
=
robqueue
->
new
(
nthreads
=>
16
,
subr
=>\
&run_system
,
);
while
(
1
)
{
$q
->
q()
;
$q
->
qwait
();
$count
++
;
print
"
Count =
$count
\x0d
";
}
$q
->
end
();
exit
;
############################################################
sub
run_system
{
my
$m1
=
rand
()
*
80
+
0.1
;
my
$m2
=
MAX
(
0.1
,
rand
()
*$m1
);
my
$per
=
10.0
**
(
rand
()
*
8.0
);
my
$idum
=
int
(
rand
()
*
5000
);
my
%out
;
my
%cmd
;
foreach
my
$executable
(
@bin_cs
)
{
$cmd
{
$executable
}
=
"
env BIN_C=
$executable
tbse --M_1
$m1
--M_2
$m2
--orbital_period
$per
--idum
$idum
";
$out
{
$executable
}
=
`
$cmd
{
$executable
}
`;
# remove stuff that always changes
$out
{
$executable
}
=~
s/Tick count.*//
;
$out
{
$executable
}
=~
s/IDUM.*//
;
}
my
$er
=
0
;
for
(
my
$i
=
1
;
$i
<=
$#bin_cs
;
$i
++
)
{
if
(
$out
{
$bin_cs
[
$i
]}
ne
$out
{
$bin_cs
[
0
]})
{
print
"
ERROR : output for
$bin_cs
[
$i
] differs from
$bin_cs
[0]
\n
";
print
"
Commands were
\n
$bin_cs
[0] :
$cmd
{
$bin_cs
[0]}
\n
$bin_cs
[
$i
] :
$cmd
{
$bin_cs
[
$i
]}
\n
";
$er
=
1
;
}
}
if
(
$er
)
{
print
"
Error detected : stopping
\n
";
exit
;
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment