diff --git a/README.md b/README.md index 84b4d3a24f245bfd3f62287dca9d8eee63777233..14c913a87830074f44db6cb8b7ac3ed1b1f35293 100644 --- a/README.md +++ b/README.md @@ -53,10 +53,12 @@ Additional dependencies required by both SUMMA and SUMMA actors are: cd summa/ git checkout summa-actors cd ../ - cd build_dir/ - cmake -B cmake_build -S . -DCMAKE_BUILD_TYPE=Actors_Cluster + cmake -B cmake_build -S . -DCMAKE_BUILD_TYPE=Build_Type cmake --build cmake_build --target all -j ``` +Available build types are: + * BE or BE_Debug: Builds for local machine + * BE_Cluster or BE_Cluster_Debug: Builds for cluster machine (Specific to Alliance machines) ## Running SUMMA-Actors SUMMA-Actors can be run in two modes, distributed and non-distributed. The distributed mode used to create ad-hoc clusters. The command line arguments are kept as close to the original SUMMA as possible. However, there are options not yet available in SUMMA-Actors that are in the original SUMMA. Here is a full list of the available and unavailable options: diff --git a/build/CMakeLists.txt b/build/CMakeLists.txt index 4152b68221362012e2af34d398a2fa6f38bf4b07..33b9bc1970e32ed6ed5db827486e3b2a74e229c5 100644 --- a/build/CMakeLists.txt +++ b/build/CMakeLists.txt @@ -10,7 +10,7 @@ set(EXEC_DIR ${PARENT_DIR}/bin) # set the output directory for executables SET(F_MASTER ${PARENT_DIR}/build/summa) # Add options for build type set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${EXEC_DIR}) -set(CMAKE_CONFIGURATION_TYPES BE BE_Cluster BE_Cluster_Debug) +set(CMAKE_CONFIGURATION_TYPES BE BE_Debug BE_Cluster BE_Cluster_Debug) # Set Compiler Options if(CMAKE_BUILD_TYPE MATCHES Debug) @@ -26,7 +26,10 @@ else() set(FLAGS_CXX -O3 -Wfatal-errors -std=c++17 ${FLAGS_OPT}) endif() -find_package(OpenBLAS REQUIRED) +# find_package(OpenBLAS REQUIRED) +find_package(CAF COMPONENTS core io REQUIRED) +set(CAF_INCLUDES ${CAF_INCLUDE_DIRS}) +set(CAF_LIBRARIES CAF::core CAF::io) set(EXEC_NAME summa_be) if (CMAKE_BUILD_TYPE MATCHES Cluster) @@ -47,34 +50,19 @@ if (CMAKE_BUILD_TYPE MATCHES Cluster) -lcaf_io) else() - set(CMAKE_BUILD_RPATH "/usr/local/lib") - set(SUMMA_INCLUDES - "/usr/include" - ${netCDF_INCLUDES} - ${OpenBLAS_INCLUDES}) - - set(SUMMA_LIBS - -lnetcdff - -lopenblas - SUMMA_NOAHMP) - - set(SUMMA_ACTORS_INCLUDES - "/usr/local/actor-framework/debug/include" - ${CAF_INCLUDES} - ${OpenBLAS_INCLUDES} + # Set include and library for Fortran portion of the code + set(INCLUDES "/usr/include" "/usr/local/include") + set(LIBRARIES -lnetcdff -lopenblas SUMMA_NOAHMP) + + # Set include and library for C++ portion of the code + set(INC_ACTORS CAF::core CAF::io ${INCLUDES} "${PARENT_DIR}/build/includes/global" "${PARENT_DIR}/build/includes/summa_actor" "${PARENT_DIR}/build/includes/job_actor" "${PARENT_DIR}/build/includes/file_access_actor" "${PARENT_DIR}/build/includes/hru_actor") - - link_directories("/usr/local/actor-framework/debug/lib") - set(SUMMA_ACTORS_LIBS - -lopenblas - -lcaf_core - -lcaf_io - summa - -lnetcdff) + link_directories("/usr/local/lib") + set(LIB_ACTORS CAF::core CAF::io -lopenblas -lnetcdff) endif() # Define directories that contains source code