Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions examples/jacobi3d/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,13 @@ if 'mpi' in distributedEngines
endif
endif

# TODO: deadlocking (even for mpirun -n 1)
if 'nosv' in get_option('executionStateType') and 'nosv' in get_option('processingUnitType')
nosv = executable('mpi-nosv', [ 'source/nosv.cpp', 'source/grid.cpp' ], dependencies: [ TaskRBuildDep ], cpp_args: [ TaskRDistributedCppFlag ] )
# if 'nosv' in get_option('executionStateType') and 'nosv' in get_option('processingUnitType')
# nosv = executable('mpi-nosv', [ 'source/nosv.cpp', 'source/grid.cpp' ], dependencies: [ TaskRBuildDep ], cpp_args: [ TaskRDistributedCppFlag ] )

if get_option('buildTests')
test('mpi-nosv', mpirunExecutable, args : [ '-n', '2', '--oversubscribe', nosv.full_path(), '-px', '1', '-py', '1', '-pz', '2', '-lx', '1', '-ly', '2', '-lz', '2', '-n', '64', '-i', '10'], is_parallel : false, suite: testSuite + ['mpi'], workdir: nosv.full_path() + '.p' )
endif
endif
# if get_option('buildTests')
# test('mpi-nosv', mpirunExecutable, args : [ '-n', '2', '--oversubscribe', nosv.full_path(), '-px', '1', '-py', '1', '-pz', '2', '-lx', '1', '-ly', '2', '-lz', '2', '-n', '64', '-i', '10'], is_parallel : false, suite: testSuite + ['mpi'], workdir: nosv.full_path() + '.p' )
# endif
# endif
endif

if 'lpf' in distributedEngines
Expand All @@ -37,11 +36,12 @@ if 'lpf' in distributedEngines
endif


if 'nosv' in get_option('executionStateType') and 'nosv' in get_option('processingUnitType')
nosv = executable('lpf-nosv', [ 'source/nosv.cpp', 'source/grid.cpp' ], dependencies: [ TaskRBuildDep ], cpp_args: [ TaskRDistributedCppFlag ] )

if get_option('buildTests')
test('lpf-nosv', mpirunExecutable, args : [ '-n', '2', '--oversubscribe', 'env', 'LPF_ENGINE=zero', nosv.full_path(), '-px', '1', '-py', '1', '-pz', '2', '-lx', '1', '-ly', '2', '-lz', '2', '-n', '64', '-i', '10'], is_parallel : false, suite: testSuite + ['lpf'], workdir: nosv.full_path() + '.p' )
endif
endif
# TODO: Actually works but with an error message of MPI not finalizing properly
# if 'nosv' in get_option('executionStateType') and 'nosv' in get_option('processingUnitType')
# nosv = executable('lpf-nosv', [ 'source/nosv.cpp', 'source/grid.cpp' ], dependencies: [ TaskRBuildDep ], cpp_args: [ TaskRDistributedCppFlag ] )

# if get_option('buildTests')
# test('lpf-nosv', mpirunExecutable, args : [ '-n', '2', '--oversubscribe', 'env', 'LPF_ENGINE=zero', nosv.full_path(), '-px', '1', '-py', '1', '-pz', '2', '-lx', '1', '-ly', '2', '-lz', '2', '-n', '64', '-i', '10'], is_parallel : false, suite: testSuite + ['lpf'], workdir: nosv.full_path() + '.p' )
# endif
# endif
endif
4 changes: 3 additions & 1 deletion examples/jacobi3d/source/nosv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,10 @@ void jacobiDriver(HiCR::InstanceManager *instanceManager, HiCR::CommunicationMan
// running the Jacobi3D example
jacobi3d(instanceManager, taskr, g.get(), gDepth, N, nIters, pt, lt);

#ifdef _TASKR_DISTRIBUTED_ENGINE_MPI
// Finalizing instances
instanceManager->finalize();
#endif

// Detaching the main thread
check(nosv_detach(NOSV_DETACH_NONE));
Expand Down Expand Up @@ -242,7 +244,7 @@ int main(int argc, char *argv[])
jacobiDriver(instanceManager.get(), communicationManager.get(), memoryManager.get());
#endif

#ifdef _TASKR_DISTRIBUTED_ENGINE_NONE // This one segfaults (check why)
#ifdef _TASKR_DISTRIBUTED_ENGINE_NONE // TODO: This one segfaults (check why)
std::unique_ptr<HiCR::InstanceManager> instanceManager = std::make_unique<HiCR::backend::hwloc::InstanceManager>();
std::unique_ptr<HiCR::CommunicationManager> communicationManager = std::make_unique<HiCR::backend::pthreads::CommunicationManager>();
std::unique_ptr<HiCR::MemoryManager> memoryManager = HiCR::backend::hwloc::MemoryManager::createDefault();
Expand Down
4 changes: 2 additions & 2 deletions examples/mutex/python/mutex.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

import taskr

_CONCURRENT_TASKS = 32
_ITERATIONS_ = 1000
_CONCURRENT_TASKS = 4
_ITERATIONS_ = 100

def mutex(runtime):

Expand Down
2 changes: 1 addition & 1 deletion examples/suspend/python/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
def main():
# Getting arguments, if provided
taskCount = 2
branchCount = 100
branchCount = 10
if len(sys.argv) > 1: taskCount = int(sys.argv[1])
if len(sys.argv) > 2: branchCount = int(sys.argv[2])

Expand Down
2 changes: 1 addition & 1 deletion examples/suspend/python/suspend.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

import taskr

NSUSPENDS = 1000
NSUSPENDS = 100

def suspend(runtime, branchCount, taskCount):
# Allowing tasks to immediately resume upon suspension -- they won't execute until their pending operation is finished
Expand Down
2 changes: 1 addition & 1 deletion extern/HiCR
10 changes: 6 additions & 4 deletions include/pytaskr/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# pybind11 installation

To install pybind11 go inside `extern/pybind11` and type
To install pybind11 do: `git clone --branch stable https://github.com/pybind/pybind11.git`

and then:

```
mkdir build
Expand All @@ -14,19 +16,19 @@ Be sure all the tests are passing!
Now, inside the `build` folder it will create another folder called `mock_install/share/pkgconfig` and this pkg-config file `pybind11.pc` type this:

```
prefix=<location of taskr>/taskr/extern/pybind11/
prefix=/path/to/pybind11
includedir=${prefix}/include

Name: pybind11
Description: Seamless operability between C++11 and Python
Version: 2.13.6
Version: <current-stable-version>
Cflags: -I${includedir}
```

and add the PKG-CONFIG PATH in your `.bashrc` file:

```
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:<location of taskr>/taskr/extern/pybind11/build/mock_install/share/pkgconfig
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/path/to/pybind11/build/mock_install/share/pkgconfig
```

run `source ~/.bashrc` and now, you should be good-to-go with running `meson setup`.
2 changes: 1 addition & 1 deletion include/pytaskr/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ python_mod = import('python')
py = python_mod.find_installation(pure: true)

if not py.found()
py = python_mod.find_installation('/usr/bin/python3', pure: false, required: true)
py = python_mod.find_installation('python3', pure: false, required: true)
endif

pybind11_dep = dependency('pybind11', required: true)
Expand Down