Skip to content

Remove cffi and add local_msg test #230

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
11 changes: 9 additions & 2 deletions .github/workflows/charm4py.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,21 @@ jobs:
- name: build-charm4py
run: |
git fetch --unshallow # Need full repo for 'git describe' used by setup.py
pip3 install setuptools cython cffi greenlet numpy
pip3 install setuptools cython greenlet numpy
git clone https://github.com/UIUC-PPL/charm charm_src/charm
export CHARM_EXTRA_BUILD_OPTS="--enable-error-checking"
export CHARM_BUILD_PROCESSES=2
export CHARM4PY_BUILD_CFFI=1
python3 setup.py build_ext --inplace
export PYTHONPATH="$PWD"
- name: test-charm4py
run: |
git clone https://github.com/slm960323/task-bench.git
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this repo should be used in CI, it should be under the UIUC-PPL organization or made part of the charm4py repo, I think.

cd task-bench
cd core
make -j2
export LD_LIBRARY_PATH=$(pwd):$LD_LIBRARY_PATH
cd ../../
export PYTHONPATH="$PWD"
export CHARM4PY_TEST_NUM_PROCESSES=2
python3 auto_test.py

9 changes: 9 additions & 0 deletions test_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@
"force_min_processes": 4,
"path": "tests/entry_methods/array_element_proxy.py"
},
{
"force_min_processes": 1,
"path": "tests/local_msg.py"
},
{
"force_min_processes": 4,
"path": "task-bench/charm4py/task_bench.py",
"args": "-steps 4 -width 8 -type stencil_1d"
},
{
"force_min_processes": 4,
"path": "tests/entry_methods/group_element_proxy.py"
Expand Down
29 changes: 29 additions & 0 deletions tests/local_msg.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
from charm4py import charm, Chare, Array

class Elem(Chare):
def __init__ (self, main_proxy):
self.main_proxy = main_proxy

def recv(self, data):
data[0] = 100
print("Chare :: data[0] = {}".format(data[0]))
self.main_proxy.done()

class Main(Chare):
def __init__(self):
self.data = list(range(10))
elem = Chare(Elem, args=[self.thisProxy])
charm.awaitCreation(elem)
elem.recv(self.data)

def done(self):
print("Main :: data[0] = {}".format(self.data[0]))
assert(self.data[0] == 0)
exit()

def main(args):
m = Chare(Main)
charm.awaitCreation(m)

charm.start(main)