Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TurTLE
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TurTLE
TurTLE
Commits
6dd28874
Commit
6dd28874
authored
Mar 11, 2019
by
Cristian Lalescu
Browse files
Options
Downloads
Patches
Plain Diff
[broken] trying to compile executable
parent
01fd875a
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!23
WIP: Feature/use cmake
Pipeline
#45075
failed
Mar 11, 2019
Stage: test
Changes
5
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
CMakeLists.txt
+8
-2
8 additions, 2 deletions
CMakeLists.txt
bfps/__init__.py
+0
-3
0 additions, 3 deletions
bfps/__init__.py
bfps/_base.py
+1
-3
1 addition, 3 deletions
bfps/_base.py
bfps/_code.py
+3
-28
3 additions, 28 deletions
bfps/_code.py
setup.py
+2
-27
2 additions, 27 deletions
setup.py
with
14 additions
and
63 deletions
CMakeLists.txt
+
8
−
2
View file @
6dd28874
cmake_minimum_required
(
VERSION 3.10
)
cmake_minimum_required
(
VERSION 3.10
)
project
(
BFPS C CXX
)
project
(
BFPS
)
execute_process
(
COMMAND python
${
PROJECT_SOURCE_DIR
}
/get_version.py OUTPUT_VARIABLE BFPS_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE
)
project
(
BFPS
VERSION
${
BFPS_VERSION
}
LANGUAGES C CXX
)
set
(
CMAKE_MODULE_PATH
${
PROJECT_SOURCE_DIR
}
/cmake/morse
${
CMAKE_MODULE_PATH
}
)
set
(
CMAKE_MODULE_PATH
${
PROJECT_SOURCE_DIR
}
/cmake/morse
${
CMAKE_MODULE_PATH
}
)
...
...
This diff is collapsed.
Click to expand it.
bfps/__init__.py
+
0
−
3
View file @
6dd28874
...
@@ -38,9 +38,6 @@ here = os.path.normcase(__file__)
...
@@ -38,9 +38,6 @@ here = os.path.normcase(__file__)
header_dir
=
os
.
path
.
join
(
os
.
path
.
join
(
dist_loc
,
'
bfps
'
),
'
cpp
'
)
header_dir
=
os
.
path
.
join
(
os
.
path
.
join
(
dist_loc
,
'
bfps
'
),
'
cpp
'
)
lib_dir
=
os
.
path
.
join
(
dist_loc
,
'
bfps
'
)
lib_dir
=
os
.
path
.
join
(
dist_loc
,
'
bfps
'
)
install_info
=
pickle
.
load
(
open
(
os
.
path
.
join
(
os
.
path
.
dirname
(
here
),
'
install_info.pickle
'
),
'
rb
'
))
homefolder
=
os
.
path
.
expanduser
(
'
~
'
)
homefolder
=
os
.
path
.
expanduser
(
'
~
'
)
bfpsfolder
=
os
.
path
.
join
(
homefolder
,
'
.config/
'
,
'
bfps
'
)
bfpsfolder
=
os
.
path
.
join
(
homefolder
,
'
.config/
'
,
'
bfps
'
)
sys
.
path
.
append
(
bfpsfolder
)
sys
.
path
.
append
(
bfpsfolder
)
...
...
This diff is collapsed.
Click to expand it.
bfps/_base.py
+
1
−
3
View file @
6dd28874
...
@@ -28,7 +28,6 @@ import os
...
@@ -28,7 +28,6 @@ import os
import
sys
import
sys
import
numpy
as
np
import
numpy
as
np
import
h5py
import
h5py
from
bfps
import
install_info
from
bfps
import
__version__
from
bfps
import
__version__
class
_base
(
object
):
class
_base
(
object
):
...
@@ -175,8 +174,7 @@ class _base(object):
...
@@ -175,8 +174,7 @@ class _base(object):
ofile
[
'
parameters/
'
+
k
]
=
self
.
parameters
[
k
]
ofile
[
'
parameters/
'
+
k
]
=
self
.
parameters
[
k
]
ofile
[
'
iteration
'
]
=
int
(
iter0
)
ofile
[
'
iteration
'
]
=
int
(
iter0
)
ofile
[
'
bfps_info/solver_class
'
]
=
type
(
self
).
__name__
ofile
[
'
bfps_info/solver_class
'
]
=
type
(
self
).
__name__
for
k
in
install_info
.
keys
():
ofile
[
'
bfps_info/VERSION
'
]
=
__version__
ofile
[
'
bfps_info/
'
+
k
]
=
str
(
install_info
[
k
])
ofile
.
close
()
ofile
.
close
()
return
None
return
None
def
rewrite_par
(
def
rewrite_par
(
...
...
This diff is collapsed.
Click to expand it.
bfps/_code.py
+
3
−
28
View file @
6dd28874
...
@@ -198,36 +198,11 @@ class _code(_base):
...
@@ -198,36 +198,11 @@ class _code(_base):
self
,
self
,
no_debug
=
False
):
no_debug
=
False
):
# compile code
# compile code
if
not
os
.
path
.
isfile
(
os
.
path
.
join
(
bfps
.
header_dir
,
'
base.hpp
'
)):
os
.
makedirs
(
'
bfps_build
'
,
exist_ok
=
True
)
raise
IOError
(
'
header not there:
\n
'
+
os
.
chdir
(
'
bfps_build
'
)
'
{0}
\n
'
.
format
(
os
.
path
.
join
(
bfps
.
header_dir
,
'
base.hpp
'
))
+
'
{0}
\n
'
.
format
(
bfps
.
dist_loc
))
libraries
=
[
'
bfps
'
]
libraries
+=
bfps
.
install_info
[
'
libraries
'
]
command_strings
=
[
bfps
.
install_info
[
'
compiler
'
]]
command_strings
+=
[
self
.
name
+
'
.cpp
'
,
'
-o
'
,
self
.
name
]
command_strings
+=
bfps
.
install_info
[
'
extra_compile_args
'
]
if
no_debug
:
command_strings
+=
[
'
-DNDEBUG
'
]
command_strings
+=
[
'
-I
'
+
idir
for
idir
in
bfps
.
install_info
[
'
include_dirs
'
]]
command_strings
.
append
(
'
-I
'
+
bfps
.
header_dir
)
command_strings
+=
[
'
-L
'
+
ldir
for
ldir
in
bfps
.
install_info
[
'
library_dirs
'
]]
command_strings
+=
[
'
-Wl,-rpath=
'
+
ldir
for
ldir
in
bfps
.
install_info
[
'
library_dirs
'
]]
command_strings
.
append
(
'
-L
'
+
bfps
.
lib_dir
)
command_strings
.
append
(
'
-Wl,-rpath=
'
+
bfps
.
lib_dir
)
for
libname
in
libraries
:
if
libname
[
0
]
not
in
[
'
-
'
,
'
/
'
]:
command_strings
+=
[
'
-l
'
+
libname
]
else
:
command_strings
+=
[
libname
]
command_strings
+=
[
'
-fopenmp
'
]
self
.
write_src
()
self
.
write_src
()
print
(
'
compiling code with command
\n
'
+
'
'
.
join
(
command_strings
))
print
(
'
compiling code with command
\n
'
+
'
'
.
join
(
command_strings
))
return
subprocess
.
check_call
(
command_strings
)
def
set_host_info
(
def
set_host_info
(
self
,
self
,
host_info
=
{}):
host_info
=
{}):
...
...
This diff is collapsed.
Click to expand it.
setup.py
+
2
−
27
View file @
6dd28874
...
@@ -56,33 +56,8 @@ from machine_settings import compiler, include_dirs, library_dirs, extra_compile
...
@@ -56,33 +56,8 @@ from machine_settings import compiler, include_dirs, library_dirs, extra_compile
### package versioning
### package versioning
# get current time
import
get_version
now
=
datetime
.
datetime
.
now
()
VERSION
=
get_version
.
main
()
# obtain version
try
:
git_branch
=
subprocess
.
check_output
([
'
git
'
,
'
rev-parse
'
,
'
--abbrev-ref
'
,
'
HEAD
'
]).
strip
().
split
()[
-
1
].
decode
()
git_revision
=
subprocess
.
check_output
([
'
git
'
,
'
rev-parse
'
,
'
HEAD
'
]).
strip
()
git_date
=
datetime
.
datetime
.
fromtimestamp
(
int
(
subprocess
.
check_output
([
'
git
'
,
'
log
'
,
'
-1
'
,
'
--format=%ct
'
]).
strip
()))
except
:
git_revision
=
''
git_branch
=
''
git_date
=
now
if
git_branch
==
''
:
# there's no git available or something
VERSION
=
'
{0:0>4}{1:0>2}{2:0>2}.{3:0>2}{4:0>2}{5:0>2}
'
.
format
(
git_date
.
year
,
git_date
.
month
,
git_date
.
day
,
git_date
.
hour
,
git_date
.
minute
,
git_date
.
second
)
else
:
if
((
'
develop
'
in
git_branch
)
or
(
'
feature
'
in
git_branch
)
or
(
'
bugfix
'
in
git_branch
)):
VERSION
=
subprocess
.
check_output
(
[
'
git
'
,
'
describe
'
,
'
--tags
'
,
'
--dirty
'
]).
strip
().
decode
().
replace
(
'
-g
'
,
'
+g
'
).
replace
(
'
-dirty
'
,
'
.dirty
'
).
replace
(
'
-
'
,
'
.post
'
)
else
:
VERSION
=
subprocess
.
check_output
([
'
git
'
,
'
describe
'
,
'
--tags
'
]).
strip
().
decode
().
split
(
'
-
'
)[
0
]
print
(
'
This is bfps version
'
+
VERSION
)
print
(
'
This is bfps version
'
+
VERSION
)
...
...
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