Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
hysop
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
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
particle_methods
hysop
Commits
5ddeef25
Commit
5ddeef25
authored
7 years ago
by
Jean-Baptiste Keck
Browse files
Options
Downloads
Patches
Plain Diff
fixed __init__.py.in
parent
aea5c40b
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
hysop/__init__.py
+2
-1
2 additions, 1 deletion
hysop/__init__.py
hysop/__init__.py.in
+18
-14
18 additions, 14 deletions
hysop/__init__.py.in
with
20 additions
and
15 deletions
hysop/__init__.py
+
2
−
1
View file @
5ddeef25
...
@@ -19,7 +19,8 @@ __OPTIMIZE__ = not __debug__
...
@@ -19,7 +19,8 @@ __OPTIMIZE__ = not __debug__
__VERBOSE__
=
True
__VERBOSE__
=
True
__DEBUG__
=
False
__DEBUG__
=
False
__TRACE__
=
False
__TRACE__
=
False
__KERNEL_DEBUG__
=
True
__TRACE_WARNINGS_
=
False
__KERNEL_DEBUG__
=
False
__PROFILE__
=
True
__PROFILE__
=
True
__ENABLE_LONG_TESTS__
=
False
__ENABLE_LONG_TESTS__
=
False
...
...
This diff is collapsed.
Click to expand it.
hysop/__init__.py.in
+
18
−
14
View file @
5ddeef25
...
@@ -3,7 +3,7 @@ on hybrid architectures (MPI-GPU)
...
@@ -3,7 +3,7 @@ on hybrid architectures (MPI-GPU)
"""
"""
from functools import wraps
from functools import wraps
from hysop.deps import __builtin__, print_function, os, sys
from hysop.deps import __builtin__, print_function, os, sys
, warnings, traceback
# HySoP
# HySoP
package_name = "@PACKAGE_NAME@"
package_name = "@PACKAGE_NAME@"
...
@@ -18,9 +18,10 @@ __OPTIMIZE__ = not __debug__
...
@@ -18,9 +18,10 @@ __OPTIMIZE__ = not __debug__
__VERBOSE__ = "@DEBUG@" in ["1", "3"]
__VERBOSE__ = "@DEBUG@" in ["1", "3"]
__DEBUG__ = "@DEBUG@" in ["2", "3"]
__DEBUG__ = "@DEBUG@" in ["2", "3"]
__TRACE__ = "@DEBUG@" in ["5"]
__TRACE__ = False
__KERNEL_DEBUG__ = "@DEBUG@" in ["4", "3"]
__TRACE_WARNINGS_ = False
__PROFILE__ = "@PROFILE@" in ["0", "1"]
__KERNEL_DEBUG__ = False
__PROFILE__ = True
__ENABLE_LONG_TESTS__ = "@ENABLE_LONG_TESTS@" is "ON"
__ENABLE_LONG_TESTS__ = "@ENABLE_LONG_TESTS@" is "ON"
...
@@ -28,7 +29,6 @@ __ENABLE_LONG_TESTS__ = "@ENABLE_LONG_TESTS@" is "ON"
...
@@ -28,7 +29,6 @@ __ENABLE_LONG_TESTS__ = "@ENABLE_LONG_TESTS@" is "ON"
__DEFAULT_PLATFORM_ID__ = @OPENCL_DEFAULT_OPENCL_PLATFORM_ID@
__DEFAULT_PLATFORM_ID__ = @OPENCL_DEFAULT_OPENCL_PLATFORM_ID@
__DEFAULT_DEVICE_ID__ = @OPENCL_DEFAULT_OPENCL_DEVICE_ID@
__DEFAULT_DEVICE_ID__ = @OPENCL_DEFAULT_OPENCL_DEVICE_ID@
if __MPI_ENABLED__:
if __MPI_ENABLED__:
from hysop.core.mpi import MPI, main_rank, main_size, \
from hysop.core.mpi import MPI, main_rank, main_size, \
host_rank, interhost_size, \
host_rank, interhost_size, \
...
@@ -38,7 +38,6 @@ if __MPI_ENABLED__:
...
@@ -38,7 +38,6 @@ if __MPI_ENABLED__:
def print(*args, **kargs):
def print(*args, **kargs):
"""Wrap print function (because of python 3)"""
"""Wrap print function (because of python 3)"""
__builtin__.print(*args, **kargs)
__builtin__.print(*args, **kargs)
def vprint(*args, **kargs):
def vprint(*args, **kargs):
"""prints only if __VERBOSE__ has been set"""
"""prints only if __VERBOSE__ has been set"""
if __VERBOSE__:
if __VERBOSE__:
...
@@ -60,11 +59,17 @@ def sprint(*args, **kargs):
...
@@ -60,11 +59,17 @@ def sprint(*args, **kargs):
"""prints only shared memory master rank 0"""
"""prints only shared memory master rank 0"""
if (shm_rank==0):
if (shm_rank==0):
vprint(*args, **kargs)
vprint(*args, **kargs)
values=transposition_states[len(candidate_axes.dd
def reset():
"""Reset hysop state (registered objects)."""
from hysop.tools.handle import RegisteredObject
RegisteredObject._RegisteredObject__reset()
# override warning printer
# override warning printer
__formatwarning = warnings.formatwarning
__formatwarning = warnings.formatwarning
def __new_formatwarning(message, category, filename, lineno, line=none):
def __new_formatwarning(message, category, filename, lineno, line=None):
if __TRACE_WARNINGS__:
traceback.print_stack()
return __formatwarning(message, category, filename, lineno, line='')
return __formatwarning(message, category, filename, lineno, line='')
warnings.formatwarning = __new_formatwarning
warnings.formatwarning = __new_formatwarning
...
@@ -75,16 +80,16 @@ if __TRACE__:
...
@@ -75,16 +80,16 @@ if __TRACE__:
from hysop.domain.domain import Domain
from hysop.domain.domain import Domain
from hysop.domain.box import Box
from hysop.domain.box import Box
from hysop.fields.continuous import Field
from hysop.fields.continuous
_field
import Field
from hysop.fields.discrete import DiscreteField
from hysop.fields.discrete
_field
import DiscreteField
from hysop.
core.mpi
.cartesian import Topology, Cartesian
from hysop.
topology
.cartesian
_topology
import Topology, Cartesian
Topology
from hysop.
core.mpi
.topology_descriptor import TopologyDescriptor
from hysop.
topology
.topology_descriptor import TopologyDescriptor
from hysop.tools.parameters import Discretization
from hysop.tools.parameters import Discretization
from hysop.simulation import Simulation
from hysop.simulation import Simulation
from hysop.problem import Problem
from hysop.problem import Problem
from hysop.tools.io_utils import IO, IOParams
from hysop.tools.io_utils import IO, IOParams
__all__ = ['Box', 'Field', 'DiscreteField', 'Domain', 'Discretization', 'Simulation',
__all__ = ['Box', 'Field', 'DiscreteField', 'Domain', 'Discretization', 'Simulation',
'Problem', 'IO', 'IOParams', 'Topology', 'Cartesian', 'TopologyDescriptor']
'Problem', 'IO', 'IOParams', 'Topology', 'Cartesian
Topology
', 'TopologyDescriptor']
if __MPI_ENABLED__:
if __MPI_ENABLED__:
__all__ += ['MPI', 'main_rank', 'main_size']
__all__ += ['MPI', 'main_rank', 'main_size']
...
@@ -107,6 +112,5 @@ default_path = IO.default_path()
...
@@ -107,6 +112,5 @@ default_path = IO.default_path()
cache_path = IO.default_cache_path()
cache_path = IO.default_cache_path()
msg_io = '\n*Default path for all i/o is \'{}\'.'.format(default_path)
msg_io = '\n*Default path for all i/o is \'{}\'.'.format(default_path)
msg_io += '\n*Default path for caching is \'{}\'.'.format(cache_path)
msg_io += '\n*Default path for caching is \'{}\'.'.format(cache_path)
msg_io += '\n'
vprint(msg_io)
vprint(msg_io)
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