diff --git a/build/includes/global/timing_info.hpp b/build/includes/global/timing_info.hpp index e246a6ca2593eacf94254e8306ebc62354b379da..9244428facaf9cfd19218ef53e7552d651b3a399 100644 --- a/build/includes/global/timing_info.hpp +++ b/build/includes/global/timing_info.hpp @@ -2,6 +2,7 @@ #include <chrono> #include <optional> #include <vector> +#include <string> using chrono_time = std::chrono::time_point<std::chrono::system_clock>; /** diff --git a/build/includes/job_actor/GRU.hpp b/build/includes/job_actor/GRU.hpp index 4d57edf63bdc77609a66b6b81b1c30c89c8c06be..3c33f51d0afd520b43a230c2fd370f3f7a846959 100644 --- a/build/includes/job_actor/GRU.hpp +++ b/build/includes/job_actor/GRU.hpp @@ -13,9 +13,7 @@ enum class gru_state { succeeded }; -auto success = [](const gru_state& state) -> int { - return(state == gru_state::succeeded) ? 1 : 0; -}; +int is_success(const gru_state& state); /** * Class that holds information about the running GRUs. This class is held by the job actor diff --git a/build/source/actors/job_actor/GRU.cpp b/build/source/actors/job_actor/GRU.cpp index 9b43067d85854b4de598874717e4eb9b4c654889..3f81ab2d39ca9e0d1b8f3711fd1c4aef7485b82e 100644 --- a/build/source/actors/job_actor/GRU.cpp +++ b/build/source/actors/job_actor/GRU.cpp @@ -4,6 +4,11 @@ #include <fstream> +int is_success(const gru_state& state) { + + return(state == gru_state::succeeded) ? 1 : 0; +} + GRU::GRU(int global_gru_index, int local_gru_index, caf::actor gru_actor, int dt_init_factor, double rel_tol, double abs_tol, int max_attempt) { diff --git a/build/source/actors/job_actor/job_actor.cpp b/build/source/actors/job_actor/job_actor.cpp index 96d4f77630f17a9e73795c1f349fad9f5b4db4d6..4fa5583c6f4a90c448ce849bdbb6efe32840f86a 100644 --- a/build/source/actors/job_actor/job_actor.cpp +++ b/build/source/actors/job_actor/job_actor.cpp @@ -267,7 +267,7 @@ std::vector<serializable_netcdf_gru_actor_info> getGruNetcdfInfo(int max_run_att gru_info.write_output_duration = gru->getWriteOutputDuration(); gru_info.num_attempts = max_run_attempts - gru->getAttemptsLeft() + 1; - gru_info.successful = success(gru->getStatus()); + gru_info.successful = is_success(gru->getStatus()); gru_info.rel_tol = gru->getRelTol(); gru_info.abs_tol = gru->getAbsTol(); diff --git a/utils/containers/apptainer.def b/utils/containers/apptainer.def new file mode 100644 index 0000000000000000000000000000000000000000..aa1f124096ac21f42cfc8536cd2eb65bf113f07a --- /dev/null +++ b/utils/containers/apptainer.def @@ -0,0 +1,49 @@ +Bootstrap: docker +From: ubuntu:22.04 + +%post + apt-get update -y + apt-get install locales -y + locale-gen en_CA.UTF-8 + apt-get upgrade -y + + # Install dependencies + DEBIAN_FRONTEND="noninteractive" apt-get install -y software-properties-common \ + libnetcdf-dev \ + libnetcdff-dev \ + liblapack-dev \ + libopenblas-dev \ + cmake \ + g++ \ + git \ + libssl-dev \ + make \ + gfortran \ + wget \ + python3-pip \ + valgrind \ + gdb &&\ + apt-get autoclean + + # Install Sundials v6.6 + cd /opt + wget https://github.com/LLNL/sundials/releases/download/v6.6.0/sundials-6.6.0.tar.gz + tar -xzf sundials-6.6.0.tar.gz + mkdir /usr/local/sundials/ + mkdir /usr/local/sundials/v6.6 + cd sundials-6.6.0 + mkdir build + cd build + cmake .. -DBUILD_FORTRAN_MODULE_INTERFACE=ON -DCMAKE_Fortran_COMPILER=gfortran -DCMAKE_INSTALL_PREFIX=/usr/local/sundials/v6.6 -DEXAMPLES_INSTALL_PATH=/usr/local/sundials/v6.6/examples + make + make install + + # Install C++ Actor Framework + cd /opt + wget https://github.com/actor-framework/actor-framework/archive/refs/tags/0.18.6.tar.gz + tar -xzf 0.18.6.tar.gz + cd actor-framework-0.18.6 + ./configure + cd build + make + make install \ No newline at end of file