Skip to content

Commit

Permalink
Merge branch 'master' into wrench-fsmod
Browse files Browse the repository at this point in the history
  • Loading branch information
henricasanova committed Sep 21, 2024
2 parents 82c3bdc + 7b50eea commit 0c52664
Show file tree
Hide file tree
Showing 31 changed files with 844 additions and 2,413 deletions.
67 changes: 0 additions & 67 deletions .clang-format

This file was deleted.

14 changes: 3 additions & 11 deletions .github/workflows/build-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,23 +44,15 @@ jobs:
- name: Install googletest
run: |
brew install googletest
# - name: Install Python
# run: |
# brew install python
# - name: Fix fortran
# run: |
# ls /opt/homebrew/bin/*gfortran*
# ls /opt/homebrew/lib/*gfortran*
# ls /usr/local/lib/*gfortran*
- name: Install boost
run: |
brew install sbt
brew install boost
- name: Install Simgrid
run: |
git clone https://framagit.org/simgrid/simgrid.git
cd simgrid
git checkout 98331a543f36f7991a92affa966a8f162c240984
wget --no-check-certificate https://framagit.org/simgrid/simgrid/-/archive/v3.36/simgrid-v3.36.tar.gz
tar -xf simgrid-v3.36.tar.gz
cd simgrid-v3.36
cmake .
make -j4
sudo make install
Expand Down
25 changes: 1 addition & 24 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,31 +12,9 @@ concurrency:
cancel-in-progress: true

jobs:
format:
name: "Code Formatting"
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'

steps:
- uses: actions/checkout@v2
- uses: DoozyX/[email protected]
with:
source: '.'
exclude: './doc'
extensions: 'h,cpp'
clangFormatVersion: 13
inplace: True
- uses: EndBug/add-and-commit@v4
with:
message: 'Committing clang-format changes'
env:
GITHUB_TOKEN: ${{ secrets.TOKEN_GITHUB }}

build:
runs-on: ubuntu-latest
if: ${{ always() }}
needs: format

strategy:
matrix:
include:
Expand All @@ -50,7 +28,6 @@ jobs:
COMPILER: gcc12
batsched: off


- build: "Ubuntu Jammy Jellyfish - clang++-14"
DIST: ubuntu-jammy
COMPILER: clang14
Expand Down Expand Up @@ -94,7 +71,7 @@ jobs:
docker exec wrench mkdir wrench/build;
# build and test wrench
docker exec -w /home/wrench/wrench/build wrench cmake -DENABLE_BATSCHED=${batsched} -DCMAKE_VERBOSE_MAKEFILE=ON ..;
docker exec -w /home/wrench/wrench/build wrench make all unit_tests examples;
docker exec -w /home/wrench/wrench/build wrench make all unit_tests examples wrench-daemon;
docker exec -w /home/wrench/wrench/build wrench ./unit_tests;
docker exec -w /home/wrench/wrench/build/examples wrench ./run_all_examples.sh wrench-example-batch-smpi-action;
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ cmake-build-debug
cmake-build-release
build
.idea
.clang-format

# VSCode
.vscode
Expand All @@ -57,8 +58,9 @@ examples/workflow_api/condor-grid-example/wrench-example-condor-grid-universe
*wrench-example*
examples/workflow_api/basic-examples/io-pagecache/wrench-example*

# Generated REST API routes
# Generated REST API routes and data structures
tools/wrench/wrench-daemon/include/routes.h
tools/wrench/wrench-daemon/include/callback-map.h

#JSON
host_utilization_layout.json
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ set(CMAKE_CXX_STANDARD 17)

# build the version number
set(WRENCH_VERSION_MAJOR "2")
set(WRENCH_VERSION_MINOR "3")
set(WRENCH_VERSION_MINOR "4")
set(WRENCH_VERSION_PATCH "0")
set(WRENCH_VERSION_EXTRA "dev")

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ And, one of the following:

### Required Dependencies

- [SimGrid](https://framagit.org/simgrid/simgrid/) - commit tag f3aa4f3aded54ae9a4317679850e5e96b6748af7
- [SimGrid](https://framagit.org/simgrid/simgrid/) - version 3.36
- [JSON for Modern C++](https://github.com/nlohmann/json) - version 3.11.0 or higher

### Optional Dependencies
Expand Down
13 changes: 12 additions & 1 deletion RELEASENOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,19 @@ WRENCH Release Notes

Nothing new yet

### wrench 2.3

(Sepember 10, 2024) this release includes **minor enhancements and upgrades**. More specifically:

- More full-feature REST API that gives access to the Action API in addition to the Workflow API
- Upgrade to SimGrid v3.36, which comes with several bug fixes
- Upgrade to WfCommon's WfFormat 1.5
- Countless minor bug fixes and code updates

### wrench 2.2

(July 20, 2023) this release includes **a new REST API**, **new StorageService implementations**, and **fast simulation of zero-size messages**. More specifically:

- Implementation of `wrench-daemon`, which can be started on the local machine and supports a REST API so that users can create and run simulations in a language-agnostic manner.
- Implementation of non-bufferized (i.e., buffer size of zero) storage services, which is transparent to the user but can vastly reduce simulation time by using a fluid (rather than message-based) model for how storage services read/write data to/from disk while sending/receiving that same data to/from the network.
- API change by which a `FileLocation` now includes a `DataFile`.
Expand All @@ -18,7 +29,7 @@ Nothing new yet

### wrench 2.1

(october 7, 2022) this release include **a new storage service implementation**, **performance enhancements**, and **minor bug fixes**. More specifically:
(October 7, 2022) this release includes **a new storage service implementation**, **performance enhancements**, and **minor bug fixes**. More specifically:

- implementation of a new storage service for the simulation of the [XRootD](https://xrootd.slac.stanford.edu/) storage system, along with implementation and examples.
- performance and scalability improvements that reduce memory footprint and simulation execution time.
Expand Down
8 changes: 8 additions & 0 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,11 @@
version = '2.3-dev'
release = '2.3-dev'

breathe_projects = {
"user": "../../docs/2.4-dev/user/xml/",
"developer": "../../docs/2.4-dev/developer/xml/",
"internal": "../../docs/2.4-dev/internal/xml/",
}
version = '2.4-dev'
release = '2.4-dev'

2 changes: 1 addition & 1 deletion doc/source/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ And, one of the following: - **g++** - version 7.5 or higher - **clang**
Required Dependencies
---------------------

- `SimGrid <https://simgrid.org/>`__ – version 3.34
- `SimGrid <https://simgrid.org/>`__ – version 3.36
- `JSON for Modern C++ <https://github.com/nlohmann/json>`__ – version
3.9.0 or higher

Expand Down
3 changes: 1 addition & 2 deletions doc/source/python_api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@ WRENCH Python API

WRENCH provides a Python API that covers a large fraction of the WRENCH C++ API.

The Python API is `available here <https://github.com/wrench-project/wrench-python-api>` and
documented on `this page <https://wrench-python-api.readthedocs.io/en/latest/>`_
The Python API is `available here <https://github.com/wrench-project/wrench-python-api/>`_ and documented on `this page <https://wrench-python-api.readthedocs.io/en/latest/>`_

Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ namespace wrench {
auto event = action_executor->waitForNextEvent();
auto io_event = std::dynamic_pointer_cast<wrench::FileReadCompletedEvent>(event);
if (not io_event) {
throw std::runtime_error("Custom action: unexpected IO event: " + io_event->toString());
throw std::runtime_error("Custom action: unexpected IO event: " + event->toString());
}
}
communicator->barrier();
Expand Down
3 changes: 2 additions & 1 deletion examples/run_all_examples.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
#
# Usage: run_all_examples [executable_to_exclude1,executable_to_exclude2,....]

TO_ALWAYS_EXCLUDE="wrench-example-cloud-bag-of-tasks-energy"
#TO_ALWAYS_EXCLUDE="wrench-example-cloud-bag-of-tasks-energy"
TO_ALWAYS_EXCLUDE=""

TO_EXCLUDE="{$TO_ALWAYS_EXCLUDE},{$1}"

Expand Down
2 changes: 2 additions & 0 deletions include/wrench/job/CompoundJob.h
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,8 @@ namespace wrench {
unsigned long num_processes,
unsigned long num_cores_per_process);

std::shared_ptr<Action> getActionByName(const std::string &name);

void removeAction(std::shared_ptr<Action> &action);

void addActionDependency(const std::shared_ptr<Action> &parent, const std::shared_ptr<Action> &child);
Expand Down
32 changes: 16 additions & 16 deletions include/wrench/logging/TerminalOutput.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,34 +52,34 @@ class ObjectTracker {
namespace wrench {


/* Wrappers around XBT_* macros, using a bit of those macro's internal magic as well
/* Wrappers around XBT_* macros, using a bit of those macro's internal magic as well
* to avoid generating useless (but space consuming) color ASCII codes
*/

#define WRENCH_LOG_CATEGORY(cname, desc) XBT_LOG_NEW_DEFAULT_CATEGORY(cname, desc)

#define WRENCH_INFO(...) \
#define WRENCH_INFO(...) \
if (_XBT_LOG_ISENABLEDV((*_misuse_of_XBT_LOG_macros_detected__default), xbt_log_priority_info)) { \
wrench::TerminalOutput::beginThisProcessColor(); \
XBT_INFO(__VA_ARGS__); \
wrench::TerminalOutput::endThisProcessColor(); \
} \
wrench::TerminalOutput::beginThisProcessColor(); \
XBT_INFO(__VA_ARGS__); \
wrench::TerminalOutput::endThisProcessColor(); \
} \
static_assert(true, "")

#define WRENCH_DEBUG(...) \
#define WRENCH_DEBUG(...) \
if (_XBT_LOG_ISENABLEDV((*_misuse_of_XBT_LOG_macros_detected__default), xbt_log_priority_debug)) { \
wrench::TerminalOutput::beginThisProcessColor(); \
XBT_DEBUG(__VA_ARGS__); \
wrench::TerminalOutput::endThisProcessColor(); \
} \
wrench::TerminalOutput::beginThisProcessColor(); \
XBT_DEBUG(__VA_ARGS__); \
wrench::TerminalOutput::endThisProcessColor(); \
} \
static_assert(true, "")

#define WRENCH_WARN(...) \
#define WRENCH_WARN(...) \
if (_XBT_LOG_ISENABLEDV((*_misuse_of_XBT_LOG_macros_detected__default), xbt_log_priority_warning)) { \
wrench::TerminalOutput::beginThisProcessColor(); \
XBT_WARN(__VA_ARGS__); \
wrench::TerminalOutput::endThisProcessColor(); \
} \
wrench::TerminalOutput::beginThisProcessColor(); \
XBT_WARN(__VA_ARGS__); \
wrench::TerminalOutput::endThisProcessColor(); \
} \
static_assert(true, "")

/***********************/
Expand Down
2 changes: 1 addition & 1 deletion include/wrench/simulation/Version.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@
*/

namespace wrench {
#define WRENCH_VERSION_STRING "2.3-dev"
#define WRENCH_VERSION_STRING "2.4-dev"
}// namespace wrench
2 changes: 1 addition & 1 deletion src/wrench/action/Action.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ namespace wrench {

/**
* @brief Returns the action's failure cause
* @return an internal state
* @return aa failure cause
*/
std::shared_ptr<FailureCause> Action::getFailureCause() const {
return this->execution_history.top().failure_cause;
Expand Down
3 changes: 2 additions & 1 deletion src/wrench/action/ComputeAction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ namespace wrench {
unsigned long min_num_cores,
unsigned long max_num_cores,
std::shared_ptr<ParallelModel> parallel_model) : Action(name, "compute_") {

if ((flops < 0) || (ram < 0) || (min_num_cores < 1) || (max_num_cores < min_num_cores)) {
throw std::invalid_argument("ComputeAction::ComputeAction(): invalid arguments");
}
Expand Down Expand Up @@ -157,4 +158,4 @@ namespace wrench {
WRENCH_INFO("All compute threads have completed successfully");
}

}// namespace wrench
}// namespace wrench
14 changes: 14 additions & 0 deletions src/wrench/job/CompoundJob.cpp
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,20 @@ namespace wrench {
return (this->actions.size() == this->state_task_map[Action::State::COMPLETED].size());
}

/**
* @brief Returns an action in the job's given its name (or throws std::invalid_argument)
* @param name: an action name
* @return an action
*/
std::shared_ptr<Action> CompoundJob::getActionByName(const std::string &name) {
for (auto const &action: this->actions) {
if (action->getName() == name) {
return action;
}
}
throw std::invalid_argument("CompoundJob::getActionByName(): No action with name " + name);
}

/**
* @brief Print the task map
*/
Expand Down
3 changes: 3 additions & 0 deletions src/wrench/services/compute/cloud/CloudComputeService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ namespace wrench {
// Initialize internal data structures
this->execution_hosts = execution_hosts;
for (auto const &h: this->execution_hosts) {
if (not S4U_Simulation::hostExists(h)) {
throw std::invalid_argument("CloudComputeService::CloudComputeService(): unknown host " + h);
}
this->used_ram_per_execution_host[h] = 0;
this->used_cores_per_execution_host[h] = 0;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ namespace wrench {

// Select the "best" host
double lowest_load = DBL_MAX;
simgrid::s4u::Host *picked_host;
simgrid::s4u::Host *picked_host = nullptr;
unsigned long picked_num_cores = 0;
for (auto const &h: possible_hosts) {
unsigned long num_running_threads = this->running_thread_counts[h];
Expand Down
1 change: 1 addition & 0 deletions src/wrench/simulation/Simulation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ namespace wrench {
} else if (not strcmp(argv[i], "--wrench-version")) {
version_requested = true;
} else if (not strcmp(argv[i], "--wrench-pagecache-simulation")) {
throw std::invalid_argument("The use of --wrench-pagecache-simulation has been deprecated for now");
Simulation::pagecache_enabled = true;
} else {
cleanedup_args.emplace_back(argv[i]);
Expand Down
Loading

0 comments on commit 0c52664

Please sign in to comment.