Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
eigenraven committed Aug 29, 2022
2 parents d195361 + 40da290 commit d1bce75
Show file tree
Hide file tree
Showing 101 changed files with 2,827 additions and 2,700 deletions.
28 changes: 0 additions & 28 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,31 +32,3 @@ jobs:
context: .
tags: faasm/faabric:${{ env.TAG_VERSION }}
build-args: FAABRIC_VERSION=${{ env.TAG_VERSION }}

build-mpi-native:
needs: build-faabric
runs-on: ubuntu-latest
steps:
- name: "Get the code"
uses: actions/checkout@v2
- name: "Get tag version"
run: echo "TAG_VERSION=${GITHUB_REF#refs/tags/v*}" >> $GITHUB_ENV
- name: "Print tag version"
run: echo ${{ env.TAG_VERSION }}
- name: "Set up QEMU"
uses: docker/setup-qemu-action@v1
- name: "Set up Docker Buildx"
uses: docker/setup-buildx-action@v1
- name: "Log in to DockerHub"
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: "Build native MPI container"
uses: docker/build-push-action@v2
with:
push: true
file: docker/faabric-mpi-native.dockerfile
context: .
tags: faasm/faabric-mpi-native:${{ env.TAG_VERSION }}
build-args: FAABRIC_VERSION=${{ env.TAG_VERSION }}
29 changes: 5 additions & 24 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
container:
image: faasm/faabric:0.3.2
image: faasm/faabric:0.3.3
defaults:
run:
working-directory: /code/faabric
Expand All @@ -31,7 +31,7 @@ jobs:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
container:
image: faasm/faabric:0.3.2
image: faasm/faabric:0.3.3
defaults:
run:
working-directory: /code/faabric
Expand All @@ -47,7 +47,7 @@ jobs:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
container:
image: faasm/faabric:0.3.2
image: faasm/faabric:0.3.3
defaults:
run:
working-directory: /code/faabric
Expand Down Expand Up @@ -81,7 +81,7 @@ jobs:
TSAN_OPTIONS: "verbosity=1:halt_on_error=1:suppressions=/code/faabric/thread-sanitizer-ignorelist.txt:history_size=7"
UBSAN_OPTIONS: "print_stacktrace=1:halt_on_error=1"
container:
image: faasm/faabric:0.3.2
image: faasm/faabric:0.3.3
options: --privileged
defaults:
run:
Expand Down Expand Up @@ -131,7 +131,7 @@ jobs:
REDIS_QUEUE_HOST: redis
REDIS_STATE_HOST: redis
container:
image: faasm/faabric:0.3.2
image: faasm/faabric:0.3.3
defaults:
run:
working-directory: /code/faabric
Expand All @@ -149,26 +149,7 @@ jobs:
run: inv dev.cc faabric --shared
- name: "Install Faabric shared library"
run: inv dev.install faabric --shared
- name: "Build MPI native library"
run: inv dev.cc faabricmpi_native --shared
- name: "Install MPI native library"
run: inv dev.install faabricmpi_native --shared
- name: "Build examples"
run: inv examples
- name: "Run example to check"
run: inv examples.execute check

mpi_native:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
- name: "Compose version"
run: docker-compose --version
# --- Code update ---
- name: "Check out code"
uses: actions/checkout@v2
# --- Examples ---
- name: "Build docker compose images"
run: ./mpi-native/build.sh
- name: "Run all examples"
run: ./mpi-native/run_all.sh
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ endfunction()
add_subdirectory(src/endpoint)
add_subdirectory(src/flat)
add_subdirectory(src/mpi)
add_subdirectory(src/mpi_native)
add_subdirectory(src/proto)
add_subdirectory(src/redis)
add_subdirectory(src/runner)
Expand Down
4 changes: 2 additions & 2 deletions bin/cli.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ INNER_SHELL="/bin/bash"

# Make sure the CLI is running already in the background (avoids creating a new
# container every time)
docker-compose \
docker compose \
up \
--no-recreate \
-d \
cli

# Attach to the CLI container
docker-compose \
docker compose \
exec \
cli \
${INNER_SHELL}
Expand Down
13 changes: 0 additions & 13 deletions bin/stop_cli.sh

This file was deleted.

3 changes: 2 additions & 1 deletion cmake/ExternalProjects.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,12 @@ conan_cmake_configure(
"cppzmq/4.8.1@#010df8fa1c5ebbc615704e8c16693bac"
"flatbuffers/2.0.5@#c6a9508bd476da080f7aecbe7a094b68"
"hiredis/1.0.2@#370dad964286cadb1f15dc90252e8ef3"
"protobuf/3.19.4@#a0bea09d5f31f0dc4fc0197644f5bc93"
"protobuf/3.20.0@#8e4de7081bea093469c9e6076149b2b4"
"rapidjson/cci.20211112@#65b4e5feb6f1edfc8cbac0f669acaf17"
"readerwriterqueue/1.0.6@#a95c8da3d68822dec4d4c13fff4b5c96"
"spdlog/1.10.0@#6406c337028e15e56cd6a070cbac54c4"
"zeromq/4.3.4@#d4fe4001f6c2e5960e58c251687c5b2f"
"zlib/1.2.12@#3b9e037ae1c615d045a06c67d88491ae"
GENERATORS
cmake_find_package
cmake_paths
Expand Down
2 changes: 1 addition & 1 deletion dist-test/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export PROJ_ROOT=$(dirname $(dirname $(readlink -f $0)))
pushd ${PROJ_ROOT} >> /dev/null

# Run the build
docker-compose \
docker compose \
run \
--rm \
cli \
Expand Down
8 changes: 4 additions & 4 deletions dist-test/dev_server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ pushd ${PROJ_ROOT} > /dev/null
export OVERRIDE_CPU_COUNT=4

if [[ -z "$1" ]]; then
docker-compose up -d dist-test-server
docker compose up -d dist-test-server
elif [[ "$1" == "restart" ]]; then
docker-compose restart dist-test-server
docker compose restart dist-test-server
elif [[ "$1" == "stop" ]]; then
docker-compose stop dist-test-server
docker compose stop dist-test-server
elif [[ "$1" == "rm" ]]; then
docker-compose rm dist-test-server
docker compose rm dist-test-server
else
echo "Unrecognised argument: $1"
echo ""
Expand Down
8 changes: 4 additions & 4 deletions dist-test/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ RETURN_VAL=0
export OVERRIDE_CPU_COUNT=4

# Run the test server in the background
docker-compose \
docker compose \
up \
-d \
dist-test-server

# Run the tests directly
docker-compose \
docker compose \
run \
--rm \
cli \
Expand All @@ -25,10 +25,10 @@ RETURN_VAL=$?
echo "-------------------------------------------"
echo " SERVER LOGS "
echo "-------------------------------------------"
docker-compose logs dist-test-server
docker compose logs dist-test-server

# Stop everything
docker-compose stop
docker compose stop

popd >> /dev/null

Expand Down
12 changes: 0 additions & 12 deletions docker/faabric-mpi-native.dockerfile

This file was deleted.

5 changes: 2 additions & 3 deletions docs/source/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ faabric_tests
To stop the `faabric`-related containers run:

```bash
docker-compose down
docker compose down
```

### Native
Expand Down Expand Up @@ -120,7 +120,7 @@ To run the distributed tests as if in CI:

```bash
# Clean up
docker-compose stop
docker compose stop

# Build and run
./dist-test/build.sh
Expand All @@ -135,7 +135,6 @@ bumped version. It should appear in:
- `VERSION`
- `.env`
- `.github/workflows/tests.yml`.
- `mpi-native/mpi-native.env`

Once done, commit and push, then run:

Expand Down
18 changes: 18 additions & 0 deletions docs/source/mpi.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Native MPI execution in Faabric

Faabric supports linking MPI binaries against our custom MPI implementation
used in [Faasm](https://github.com/faasm/faasm). This way, you can test the
compliance of your MPI application with our API (a subset of the standard)
without the burden of cross-compiling to WebAssembly.

To run native MPI applications, you can check the examples in the distributed
tests (`tests/dist/mpi/examples`). If you need to implement a new method, check
first how is it done in [faasm](https://github.com/faasm/faasm/blob/main/src/wavm/mpi.cpp).

To run the distributed test set for MPI, follow the instructions to set up the
distributed tests in the [development docs](https://github.com/faasm/faabric/blob/main/docs/source/development.md)
and use the tag `[mpi]`, i.e.:

```bash
faabric_dist_tests [mpi]
```
21 changes: 0 additions & 21 deletions docs/source/mpi_native.md

This file was deleted.

35 changes: 0 additions & 35 deletions include/faabric/mpi-native/MpiExecutor.h

This file was deleted.

5 changes: 5 additions & 0 deletions include/faabric/scheduler/ExecGraph.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ int countExecGraphNodes(const ExecGraph& graph);

std::set<std::string> getExecGraphHosts(const ExecGraph& graph);

std::vector<std::string> getMpiRankHostsFromExecGraph(const ExecGraph& graph);

std::pair<std::vector<std::string>, std::vector<std::string>>
getMigratedMpiRankHostsFromExecGraph(const ExecGraph& graph);

std::string execNodeToJson(const ExecGraphNode& node);

std::string execGraphToJson(const ExecGraph& graph);
Expand Down
Loading

0 comments on commit d1bce75

Please sign in to comment.