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
ee383ed9
Commit
ee383ed9
authored
5 years ago
by
Izzard, Robert Dr (Maths & Physics)
Browse files
Options
Downloads
Patches
Plain Diff
add checks to prevent undef var messages in configure on RPi2
parent
944ffdf4
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
configure
+28
-10
28 additions, 10 deletions
configure
with
28 additions
and
10 deletions
configure
+
28
−
10
View file @
ee383ed9
#!/usr/bin/env perl
#!/usr/bin/env perl
#
#
# configuration script for the binary_c/nucsyn code
# The binary_c stellar population nucleosynthesis framework.
#
# Contact: r.izzard@surrey.ac.uk or rob.izzard@gmail.com
#
# http://personal.ph.surrey.ac.uk/~ri0005/binary_c.html
# https://gitlab.eps.surrey.ac.uk/ri0005/binary_c
# https://groups.google.com/forum/#!forum/binary_c-nucsyn-announce
# https://groups.google.com/forum/#!forum/binary_c-nucsyn-devel
# https://twitter.com/binary_c_code
# https://www.facebook.com/groups/149489915089142/
#
# Please see the files README, LICENCE and CHANGES,
# and the doc/ directory for documentation.
#
# This file is the configuration script for binary_c.
#
# This is version 2, a more modular, flexible script (I hope)
# This is version 2, a more modular, flexible script (I hope)
# without all the dirty hacks, just some of them! :)
# without all the dirty hacks, just some of them! :)
#
#
#
u
sage:
#
U
sage:
#
#
# Normal use
, auto-detected CPU optimization
:
# Normal use:
# ./configure
# ./configure
#
#
# Debugging (-g):
# Debugging (-g
-Og
):
# ./confgure debug
# ./confgure debug
#
#
# Debugging with -O3:
# Debugging with -O3:
# ./configure optdebug
# ./configure optdebug
#
#
# Accurate (try to prevent floating point issues
)
# Accurate (try to prevent floating point issues
, slower):
# ./configure accurate
# ./configure accurate
#
#
# For DUMA (http://en.wikipedia.org/wiki/Duma_%28software%29)
# For DUMA (http://en.wikipedia.org/wiki/Duma_%28software%29)
...
@@ -363,7 +378,8 @@ sub secondary_variables
...
@@ -363,7 +378,8 @@ sub secondary_variables
my
$orig
=
$regexp
;
my
$orig
=
$regexp
;
$regexp
=~
s/^\d+ //
;
$regexp
=~
s/^\d+ //
;
#print "Check regexp\n";
#print "Check regexp\n";
if
(
$cpuinfo
{'
flags
'}
=~
/$regexp/
)
if
(
defined
$cpuinfo
{'
flags
'}
&&
$cpuinfo
{'
flags
'}
=~
/$regexp/
)
{
{
$coptflags
.=
$sse_hash
{
$orig
}
.
'
';
$coptflags
.=
$sse_hash
{
$orig
}
.
'
';
last
;
last
;
...
@@ -413,8 +429,8 @@ sub secondary_variables
...
@@ -413,8 +429,8 @@ sub secondary_variables
{
{
$coptflags
.=
'
-ffunction-sections
';
$coptflags
.=
'
-ffunction-sections
';
$lib
.=
'
-L/usr/lib
';
$lib
.=
'
-L/usr/lib
';
print
'
CPU Flags
',
$cpuinfo
{'
flags
'},"
\n
";
print
'
CPU Flags
',
$cpuinfo
{'
flags
'}
//
''
,"
\n
";
if
(
$cpu
=~
/pentium/
)
if
(
$cpu
=~
/pentium/
)
{
{
...
@@ -726,7 +742,8 @@ sub get_cpu
...
@@ -726,7 +742,8 @@ sub get_cpu
$cpuinfo
{'model name'}=~/atom/i ? 'atom' :
$cpuinfo
{'model name'}=~/atom/i ? 'atom' :
$cpuinfo
{'model name'}=~/Core/ ?
$cpuinfo
{'model name'}=~/Core/ ?
(
$cpuinfo
{'model name'}=~/i7/ ?
(
$cpuinfo
{'model name'}=~/i7/ ?
(
$cpuinfo
{flags}=~/
\b
avx
\b
/ ? 'corei7-avx' : 'i7') :
(defined
$cpuinfo
{flags} &&
(
$cpuinfo
{flags}=~/
\b
avx
\b
/ ? 'corei7-avx' : 'i7')) :
'core2') : 'i686' ) : 'i686';
'core2') : 'i686' ) : 'i686';
}
}
elsif(
$cpuinfo
{'model name'}=~/amd/i)
elsif(
$cpuinfo
{'model name'}=~/amd/i)
...
@@ -1753,7 +1770,8 @@ sub features
...
@@ -1753,7 +1770,8 @@ sub features
# CPU has AVX or not?
# CPU has AVX or not?
have_avx =>
have_avx =>
{
{
check =>(!
$generic
&&
check =>(!
$generic
&&
defined
$cpuinfp
{flags} &&
$cpuinfo
{flags}=~/
\b
avx
\b
/) ? 1 : 0,
$cpuinfo
{flags}=~/
\b
avx
\b
/) ? 1 : 0,
cflags => ' -mavx ',
cflags => ' -mavx ',
},
},
...
...
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