Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
TurTLE
TurTLE
Commits
729beb3d
Commit
729beb3d
authored
Jul 21, 2015
by
Cristian Lalescu
Browse files
compilation in tox virtualenv works
parent
09839f19
Changes
31
Hide whitespace changes
Inline
Side-by-side
bfps/__init__.py
View file @
729beb3d
...
...
@@ -31,14 +31,14 @@ try:
if
not
here
.
startswith
(
os
.
path
.
join
(
dist_loc
,
'bfps'
)):
# not installed, but there is another version that *is*
raise
DistributionNotFound
header_dir
=
_dist
.
location
lib_dir
=
header_dir
header_dir
=
os
.
path
.
join
(
os
.
path
.
join
(
dist_loc
,
'bfps'
),
'cpp'
)
lib_dir
=
_dist
.
location
except
DistributionNotFound
:
#__version__ = 'Please install this project with setup.py'
import
subprocess
__version__
=
'git revision '
+
subprocess
.
check_output
([
'git'
,
'rev-parse'
,
'HEAD'
]).
strip
()
header_dir
=
'./
src
'
lib_dir
=
'./
lib
'
header_dir
=
'./
bfps/cpp
'
lib_dir
=
'./'
if
not
os
.
path
.
isfile
(
os
.
path
.
join
(
header_dir
,
'base.hpp'
)):
tdir
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
__file__
))
header_dir
=
os
.
path
.
join
(
tdir
,
os
.
pardir
)
...
...
bfps/code.py
View file @
729beb3d
...
...
@@ -98,6 +98,10 @@ class code(base):
include_dirs
=
[
bfps
.
header_dir
,
'/usr/lib64/mpi/gcc/openmpi/include'
,
os
.
path
.
join
(
local_install_dir
,
'include'
)]
if
not
os
.
path
.
isfile
(
os
.
path
.
join
(
bfps
.
header_dir
,
'base.hpp'
)):
raise
IOError
(
'header not there:
\n
'
+
'{0}
\n
'
.
format
(
os
.
path
.
join
(
bfps
.
header_dir
,
'base.hpp'
))
+
'{0}
\n
'
.
format
(
bfps
.
dist_loc
))
libraries
=
[
'fftw3_mpi'
,
'fftw3'
,
'fftw3f_mpi'
,
...
...
@@ -108,6 +112,7 @@ class code(base):
for
idir
in
include_dirs
:
command_strings
+=
[
'-I{0}'
.
format
(
idir
)]
command_strings
+=
[
'-L'
+
os
.
path
.
join
(
local_install_dir
,
'lib'
)]
command_strings
+=
[
'-L'
+
os
.
path
.
join
(
local_install_dir
,
'lib64'
)]
command_strings
.
append
(
'-L'
+
bfps
.
lib_dir
)
for
libname
in
libraries
:
command_strings
+=
[
'-l'
+
libname
]
...
...
@@ -119,7 +124,7 @@ class code(base):
ncpu
=
2
,
simname
=
'test'
,
iter0
=
0
):
if
self
.
compile_code
():
if
self
.
compile_code
()
==
0
:
current_dir
=
os
.
getcwd
()
if
not
os
.
path
.
isdir
(
self
.
work_dir
):
os
.
makedirs
(
self
.
work_dir
)
...
...
@@ -132,7 +137,7 @@ class code(base):
'mpirun'
,
'-np'
,
'{0}'
.
format
(
ncpu
),
'./'
+
self
.
name
+
'.elf'
,
'./'
+
self
.
name
,
simname
,
'{0}'
.
format
(
iter0
)])
os
.
chdir
(
current_dir
)
...
...
src
/Morton_shuffler.cpp
→
bfps/cpp
/Morton_shuffler.cpp
View file @
729beb3d
File moved
src
/Morton_shuffler.hpp
→
bfps/cpp
/Morton_shuffler.hpp
View file @
729beb3d
File moved
src
/base.hpp
→
bfps/cpp
/base.hpp
View file @
729beb3d
File moved
src
/fftw_tools.cpp
→
bfps/cpp
/fftw_tools.cpp
View file @
729beb3d
File moved
src
/fftw_tools.hpp
→
bfps/cpp
/fftw_tools.hpp
View file @
729beb3d
File moved
src
/field_descriptor.cpp
→
bfps/cpp
/field_descriptor.cpp
View file @
729beb3d
File moved
src
/field_descriptor.hpp
→
bfps/cpp
/field_descriptor.hpp
View file @
729beb3d
File moved
src
/fluid_solver.cpp
→
bfps/cpp
/fluid_solver.cpp
View file @
729beb3d
File moved
src
/fluid_solver.hpp
→
bfps/cpp
/fluid_solver.hpp
View file @
729beb3d
File moved
src
/fluid_solver_base.cpp
→
bfps/cpp
/fluid_solver_base.cpp
View file @
729beb3d
File moved
src
/fluid_solver_base.hpp
→
bfps/cpp
/fluid_solver_base.hpp
View file @
729beb3d
File moved
src
/main_fluid_solver.cpp
→
bfps/cpp
/main_fluid_solver.cpp
View file @
729beb3d
File moved
src
/main_p3DFFT_to_Morton.cpp
→
bfps/cpp
/main_p3DFFT_to_Morton.cpp
View file @
729beb3d
File moved
src
/p3DFFT_to_iR.cpp
→
bfps/cpp
/p3DFFT_to_iR.cpp
View file @
729beb3d
File moved
src
/p3DFFT_to_iR.hpp
→
bfps/cpp
/p3DFFT_to_iR.hpp
View file @
729beb3d
File moved
src
/slab_field_particles.cpp
→
bfps/cpp
/slab_field_particles.cpp
View file @
729beb3d
File moved
src
/slab_field_particles.hpp
→
bfps/cpp
/slab_field_particles.hpp
View file @
729beb3d
File moved
src
/spline_n1.cpp
→
bfps/cpp
/spline_n1.cpp
View file @
729beb3d
File moved
Prev
1
2
Next
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