Skip to content

Commit

Permalink
Update to latest faabric (#573)
Browse files Browse the repository at this point in the history
* Update to latest faabric

* Formatting

* Update to latest cpp, disable omp dist test
  • Loading branch information
Shillaker committed Feb 10, 2022
1 parent 04acd8f commit fa76651
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 11 deletions.
4 changes: 2 additions & 2 deletions .env
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FAASM_VERSION=0.7.8
FAASM_CLI_IMAGE=faasm/cli:0.7.8

CPP_VERSION=0.1.3
CPP_CLI_IMAGE=faasm/cpp-sysroot:0.1.3
CPP_VERSION=0.1.4
CPP_CLI_IMAGE=faasm/cpp-sysroot:0.1.4

PYTHON_VERSION=0.1.0
PYTHON_CLI_IMAGE=faasm/cpython:0.1.0
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
if: github.event.pull_request.draft == false
runs-on: ubuntu-20.04
container:
image: faasm/cpp-sysroot:0.1.3
image: faasm/cpp-sysroot:0.1.4
defaults:
run:
working-directory: /__w/faasm/faasm/clients/cpp
Expand Down
2 changes: 1 addition & 1 deletion faabric
Submodule faabric updated 68 files
+2 −2 .env
+3 −0 .gdbinit
+4 −4 .github/workflows/tests.yml
+6 −1 CMakeLists.txt
+1 −1 VERSION
+13 −12 cmake/ExternalProjects.cmake
+4 −0 docker/faabric.dockerfile
+7 −3 docs/development.md
+2 −2 include/faabric/mpi/mpi.h
+2 −1 include/faabric/scheduler/FunctionCallApi.h
+5 −0 include/faabric/scheduler/FunctionCallClient.h
+4 −0 include/faabric/scheduler/FunctionCallServer.h
+26 −0 include/faabric/scheduler/FunctionMigrationThread.h
+9 −0 include/faabric/scheduler/MpiWorld.h
+48 −13 include/faabric/scheduler/Scheduler.h
+1 −1 include/faabric/state/StateKeyValue.h
+0 −2 include/faabric/transport/PointToPointBroker.h
+0 −14 include/faabric/util/bytes.h
+48 −21 include/faabric/util/dirty.h
+8 −0 include/faabric/util/func.h
+2 −3 include/faabric/util/memory.h
+37 −1 include/faabric/util/scheduling.h
+32 −14 include/faabric/util/snapshot.h
+24 −0 src/proto/faabric.proto
+8 −8 src/redis/Redis.cpp
+1 −0 src/scheduler/CMakeLists.txt
+83 −45 src/scheduler/Executor.cpp
+31 −0 src/scheduler/FunctionCallClient.cpp
+19 −2 src/scheduler/FunctionCallServer.cpp
+64 −0 src/scheduler/FunctionMigrationThread.cpp
+79 −18 src/scheduler/MpiWorld.cpp
+1 −3 src/scheduler/MpiWorldRegistry.cpp
+292 −11 src/scheduler/Scheduler.cpp
+4 −10 src/snapshot/SnapshotClient.cpp
+3 −2 src/snapshot/SnapshotServer.cpp
+1 −1 src/state/RedisStateKeyValue.cpp
+1 −1 src/state/State.cpp
+1 −1 src/transport/MessageEndpoint.cpp
+9 −17 src/transport/PointToPointBroker.cpp
+0 −53 src/util/bytes.cpp
+6 −1 src/util/crash.cpp
+85 −86 src/util/dirty.cpp
+16 −0 src/util/json.cpp
+15 −31 src/util/memory.cpp
+176 −178 src/util/snapshot.cpp
+1 −1 src/util/state.cpp
+4 −0 tests/dist/DistTestExecutor.cpp
+6 −0 tests/dist/main.cpp
+1 −1 tests/dist/server.cpp
+1 −1 tests/test/endpoint/test_handler.cpp
+3 −0 tests/test/main.cpp
+1 −1 tests/test/redis/test_redis.cpp
+22 −7 tests/test/scheduler/test_executor.cpp
+457 −0 tests/test/scheduler/test_function_migration.cpp
+2 −7 tests/test/scheduler/test_scheduler.cpp
+45 −2 tests/test/scheduler/test_scheduling_decisions.cpp
+2 −3 tests/test/snapshot/test_snapshot_client_server.cpp
+45 −27 tests/test/snapshot/test_snapshot_diffs.cpp
+2 −2 tests/test/state/test_redis_state.cpp
+5 −2 tests/test/transport/test_message_endpoint_client.cpp
+2 −2 tests/test/transport/test_message_server.cpp
+0 −84 tests/test/util/test_bytes.cpp
+87 −57 tests/test/util/test_dirty.cpp
+4 −0 tests/test/util/test_json.cpp
+0 −52 tests/test/util/test_memory.cpp
+400 −122 tests/test/util/test_snapshot.cpp
+4 −9 tests/utils/fixtures.h
+2 −0 tests/utils/message_utils.cpp
3 changes: 1 addition & 2 deletions src/wasm/WasmModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,7 @@ void WasmModule::ignoreThreadStacksInSnapshot(const std::string& snapKey)
snap->addMergeRegion(threadStackRegionStart,
threadStackRegionSize,
faabric::util::SnapshotDataType::Raw,
faabric::util::SnapshotMergeOperation::Ignore,
true);
faabric::util::SnapshotMergeOperation::Ignore);
}

std::string WasmModule::getBoundUser()
Expand Down
4 changes: 1 addition & 3 deletions src/wavm/faasm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,6 @@ WAVM_DEFINE_INTRINSIC_FUNCTION(env,
I32 dataPtr,
I32 dataLen)
{

Runtime::Memory* memoryPtr = getExecutingWAVMModule()->defaultMemory;
U8* data =
Runtime::memoryArrayPtr<U8>(memoryPtr, (Uptr)dataPtr, (Uptr)dataLen);
Expand Down Expand Up @@ -670,8 +669,7 @@ WAVM_DEFINE_INTRINSIC_FUNCTION(env,
faabric::scheduler::Executor* executor =
faabric::scheduler::getExecutingExecutor();
auto snap = executor->getMainThreadSnapshot(*msg, false);
snap->addMergeRegion(
varPtr, dataType.first, dataType.second, mergeOp, true);
snap->addMergeRegion(varPtr, dataType.first, dataType.second, mergeOp);
} else {
wasm::WasmModule* module = getExecutingModule();
module->addMergeRegionForNextThreads(
Expand Down
3 changes: 2 additions & 1 deletion tests/dist/threads/test_openmp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@
#include <faabric/scheduler/Scheduler.h>

namespace tests {
// 10/02/22 Broken by latest Faabric
TEST_CASE_METHOD(DistTestsFixture,
"Test OpenMP across hosts",
"[threads][openmp]")
"[.][threads][openmp]")
{
conf.overrideCpuCount = 6;

Expand Down
3 changes: 2 additions & 1 deletion tests/utils/worker_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,8 @@ void execBatchWithPool(std::shared_ptr<faabric::BatchExecuteRequest> req,
m.startRunner();

// Execute forcing local
sch.callFunctions(req, faabric::util::SchedulingTopologyHint::FORCE_LOCAL);
req->mutable_messages()->at(0).set_topologyhint("FORCE_LOCAL");
sch.callFunctions(req);

usleep(1000 * 500);

Expand Down

0 comments on commit fa76651

Please sign in to comment.