diff --git a/10-wrappers/10-0-C/10-0-0-simple/CMakeLists.txt b/10-wrappers/10-0-C/10-0-0-simple/CMakeLists.txt index ec49218..a86bf11 100644 --- a/10-wrappers/10-0-C/10-0-0-simple/CMakeLists.txt +++ b/10-wrappers/10-0-C/10-0-0-simple/CMakeLists.txt @@ -13,11 +13,8 @@ include_directories(${MPI_INCLUDE_PATH}) find_package(MUI QUIET) if(MUI_BASE_DIR) - set(MUI_C_LIB_DIR "${MUI_LIB_DIR}") - set(MUI_C_INCLUDE_DIR "${MUI_INCLUDE_DIR}/wrappers/C") -elseif(MUI_BASE_C_DIR) - set(MUI_C_LIB_DIR "${MUI_BASE_C_DIR}/lib") - set(MUI_C_INCLUDE_DIR "${MUI_BASE_C_DIR}/include/wrappers/C") + set(MUI_C_LIB_DIR "${MUI_BASE_DIR}/lib") + set(MUI_C_INCLUDE_DIR "${MUI_BASE_DIR}/include/wrappers/C") endif() find_library(MUI_C_WRAPPER_LIB NAMES MUI_C_wrapper PATHS ${MUI_C_LIB_DIR}) diff --git a/10-wrappers/10-0-C/10-0-0-simple/run_case.sh b/10-wrappers/10-0-C/10-0-0-simple/run_case.sh index bcb8976..4363df3 100755 --- a/10-wrappers/10-0-C/10-0-0-simple/run_case.sh +++ b/10-wrappers/10-0-C/10-0-0-simple/run_case.sh @@ -13,7 +13,7 @@ if [ -n "$1" ]; then cmake -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=../ .. -DMUI_C_INCLUDE_DIR=$1 -DMUI_C_LIB_DIR=$2 else # Run cmake with the provided path as the MUI base directory - cmake -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=../ .. -DCMAKE_PREFIX_PATH=$1 + cmake -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=../ .. -DMUI_BASE_DIR=$1 fi else # Run cmake with the default MUI directory diff --git a/10-wrappers/10-0-C/10-0-1-multiple-interfaces/CMakeLists.txt b/10-wrappers/10-0-C/10-0-1-multiple-interfaces/CMakeLists.txt index a92581e..0a65a0d 100644 --- a/10-wrappers/10-0-C/10-0-1-multiple-interfaces/CMakeLists.txt +++ b/10-wrappers/10-0-C/10-0-1-multiple-interfaces/CMakeLists.txt @@ -13,11 +13,8 @@ include_directories(${MPI_INCLUDE_PATH}) find_package(MUI QUIET) if(MUI_BASE_DIR) - set(MUI_C_LIB_DIR "${MUI_LIB_DIR}") - set(MUI_C_INCLUDE_DIR "${MUI_INCLUDE_DIR}/wrappers/C") -elseif(MUI_BASE_C_DIR) - set(MUI_C_LIB_DIR "${MUI_BASE_C_DIR}/lib") - set(MUI_C_INCLUDE_DIR "${MUI_BASE_C_DIR}/include/wrappers/C") + set(MUI_C_LIB_DIR "${MUI_BASE_DIR}/lib") + set(MUI_C_INCLUDE_DIR "${MUI_BASE_DIR}/include/wrappers/C") endif() find_library(MUI_C_WRAPPER_LIB NAMES MUI_C_wrapper PATHS ${MUI_C_LIB_DIR}) diff --git a/10-wrappers/10-0-C/10-0-1-multiple-interfaces/run_case.sh b/10-wrappers/10-0-C/10-0-1-multiple-interfaces/run_case.sh index ecc0500..4464d38 100755 --- a/10-wrappers/10-0-C/10-0-1-multiple-interfaces/run_case.sh +++ b/10-wrappers/10-0-C/10-0-1-multiple-interfaces/run_case.sh @@ -13,7 +13,7 @@ if [ -n "$1" ]; then cmake -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=../ .. -DMUI_C_INCLUDE_DIR=$1 -DMUI_C_LIB_DIR=$2 else # Run cmake with the provided path as the MUI base directory - cmake -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=../ .. -DCMAKE_PREFIX_PATH=$1 + cmake -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=../ .. -DMUI_BASE_DIR=$1 fi else # Run cmake with the default MUI directory diff --git a/10-wrappers/10-0-C/10-0-2-smart-send-dual-times/CMakeLists.txt b/10-wrappers/10-0-C/10-0-2-smart-send-dual-times/CMakeLists.txt index 7f36d4e..c53489a 100644 --- a/10-wrappers/10-0-C/10-0-2-smart-send-dual-times/CMakeLists.txt +++ b/10-wrappers/10-0-C/10-0-2-smart-send-dual-times/CMakeLists.txt @@ -15,11 +15,8 @@ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${MPI_LINK_FLAGS}") find_package(MUI QUIET) if(MUI_BASE_DIR) - set(MUI_C_LIB_DIR "${MUI_LIB_DIR}") - set(MUI_C_INCLUDE_DIR "${MUI_INCLUDE_DIR}/wrappers/C") -elseif(MUI_BASE_C_DIR) - set(MUI_C_LIB_DIR "${MUI_BASE_C_DIR}/lib") - set(MUI_C_INCLUDE_DIR "${MUI_BASE_C_DIR}/include/wrappers/C") + set(MUI_C_LIB_DIR "${MUI_BASE_DIR}/lib") + set(MUI_C_INCLUDE_DIR "${MUI_BASE_DIR}/include/wrappers/C") endif() find_library(MUI_C_WRAPPER_LIB NAMES MUI_C_wrapper PATHS ${MUI_C_LIB_DIR}) diff --git a/10-wrappers/10-0-C/10-0-2-smart-send-dual-times/run_case.sh b/10-wrappers/10-0-C/10-0-2-smart-send-dual-times/run_case.sh index 54927dd..ba2f5c5 100755 --- a/10-wrappers/10-0-C/10-0-2-smart-send-dual-times/run_case.sh +++ b/10-wrappers/10-0-C/10-0-2-smart-send-dual-times/run_case.sh @@ -13,7 +13,7 @@ if [ -n "$1" ]; then cmake -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=../ .. -DMUI_C_INCLUDE_DIR=$1 -DMUI_C_LIB_DIR=$2 else # Run cmake with the provided path as the MUI base directory - cmake -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=../ .. -DCMAKE_PREFIX_PATH=$1 + cmake -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=../ .. -DMUI_BASE_DIR=$1 fi else # Run cmake with the default MUI directory diff --git a/10-wrappers/10-0-C/10-0-3-pseudo-diffusion/3D-pseudo-diffusion-coarse.c b/10-wrappers/10-0-C/10-0-3-pseudo-diffusion/3D-pseudo-diffusion-coarse.c index d6697d1..af1e60d 100644 --- a/10-wrappers/10-0-C/10-0-3-pseudo-diffusion/3D-pseudo-diffusion-coarse.c +++ b/10-wrappers/10-0-C/10-0-3-pseudo-diffusion/3D-pseudo-diffusion-coarse.c @@ -77,7 +77,6 @@ int main(int argc, char **argv) { /// Create rbf matrix folder char makedirMString[32]; sprintf(makedirMString, "rbfCoarseMatrix%d", mui_ranks); - mkdir(makedirMString, 0777); /// Define the name of MUI domain char *domain = (char*) malloc(strlen("coarseDomain") + 1); @@ -124,7 +123,7 @@ int main(int argc, char **argv) { int conservative = 1; double cutoff = 1e-9; int smoothFunc = 0; - int writeMatrix = 1; + int generateMatrix = 1; double cgSolveTol = 1e-6; int cgMaxIter = 500; int preconditioner= 1; @@ -248,7 +247,7 @@ int main(int argc, char **argv) { /// Define spatial and temporal samplers mui_sampler_rbf_2d *spatial_sampler2d = mui_create_sampler_rbf_2d(rSampler, point2d, point_count, basisFunc, conservative, - smoothFunc, writeMatrix, fileAddress, cutoff, cgSolveTol, cgMaxIter, pouSize, preconditioner, MUI_COMM_WORLD); + smoothFunc, generateMatrix, fileAddress, cutoff, cgSolveTol, cgMaxIter, pouSize, preconditioner, MUI_COMM_WORLD); mui_temporal_sampler_exact_2d *temporal_sampler2d = mui_create_temporal_sampler_exact_2d(8e-1); /// Commit ZERO step of MUI diff --git a/10-wrappers/10-0-C/10-0-3-pseudo-diffusion/3D-pseudo-diffusion-fine.cpp b/10-wrappers/10-0-C/10-0-3-pseudo-diffusion/3D-pseudo-diffusion-fine.cpp index 9f42ad6..6465037 100644 --- a/10-wrappers/10-0-C/10-0-3-pseudo-diffusion/3D-pseudo-diffusion-fine.cpp +++ b/10-wrappers/10-0-C/10-0-3-pseudo-diffusion/3D-pseudo-diffusion-fine.cpp @@ -76,7 +76,6 @@ int main(int argc, char ** argv) { /// Create rbf matrix folder std::string makedirMString = "rbfFineMatrix" + std::to_string(rank); - mkdir(makedirMString.c_str(), 0777); /// Define the name of MUI domain std::string domain = "fineDomain"; @@ -103,7 +102,7 @@ int main(int argc, char ** argv) { bool conservative = true; double cutoff = 1e-9; bool smoothFunc = false; - bool writeMatrix = true; + bool generateMatrix = true; double cgSolveTol = 1e-6; int cgMaxIter = 500; int preconditioner= 1; @@ -279,7 +278,7 @@ int main(int argc, char ** argv) { /// Define spatial and temporal samplers mui::sampler_rbf2d spatial_sampler(rSampler, point2dvec, - basisFunc, conservative, smoothFunc, writeMatrix, fileAddress, + basisFunc, conservative, smoothFunc, generateMatrix, fileAddress, cutoff, cgSolveTol, cgMaxIter, pouSize, preconditioner, world); mui::temporal_sampler_exact2d temporal_sampler; diff --git a/10-wrappers/10-0-C/10-0-3-pseudo-diffusion/CMakeLists.txt b/10-wrappers/10-0-C/10-0-3-pseudo-diffusion/CMakeLists.txt index 9e40f09..a393654 100644 --- a/10-wrappers/10-0-C/10-0-3-pseudo-diffusion/CMakeLists.txt +++ b/10-wrappers/10-0-C/10-0-3-pseudo-diffusion/CMakeLists.txt @@ -10,33 +10,19 @@ set(CMAKE_CXX_STANDARD 11) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS OFF) -set(MUI_C_CPP_SEPERATE_PATH 0) - find_package(MPI REQUIRED) include_directories(${MPI_INCLUDE_PATH}) find_package(MUI REQUIRED) -if(DEFINED MUI_C_CPP_SEPERATE_PATH AND ${MUI_C_CPP_SEPERATE_PATH} EQUAL 1) - if(MUI_BASE_DIR) - include_directories(${MUI_INCLUDE_DIR}) - elseif(MUI_BASE_C_DIR) - set(MUI_C_LIB_DIR "${MUI_BASE_C_DIR}/lib") - set(MUI_C_INCLUDE_DIR "${MUI_BASE_C_DIR}/include/wrappers/C") - include_directories(${MUI_BASE_C_DIR}) - endif() -else() - if(MUI_BASE_DIR) - set(MUI_C_LIB_DIR "${MUI_LIB_DIR}") - set(MUI_C_INCLUDE_DIR "${MUI_INCLUDE_DIR}/wrappers/C") - include_directories(${MUI_INCLUDE_DIR}) - elseif(MUI_BASE_C_DIR) - set(MUI_C_LIB_DIR "${MUI_BASE_C_DIR}/lib") - set(MUI_C_INCLUDE_DIR "${MUI_BASE_C_DIR}/include/wrappers/C") - include_directories(${MUI_BASE_C_DIR}) - endif() +if(MUI_BASE_DIR) + set(MUI_C_LIB_DIR "${MUI_BASE_DIR}/lib") + set(MUI_C_INCLUDE_DIR "${MUI_BASE_DIR}/include/wrappers/C") + set(MUI_INCLUDE_DIR "${MUI_BASE_DIR}/include") + include_directories(${MUI_INCLUDE_DIR}) endif() + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${MPI_COMPILE_FLAGS}") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${MPI_LINK_FLAGS}") diff --git a/10-wrappers/10-0-C/10-0-3-pseudo-diffusion/run_case.sh b/10-wrappers/10-0-C/10-0-3-pseudo-diffusion/run_case.sh index 4adf06d..f157c09 100755 --- a/10-wrappers/10-0-C/10-0-3-pseudo-diffusion/run_case.sh +++ b/10-wrappers/10-0-C/10-0-3-pseudo-diffusion/run_case.sh @@ -11,14 +11,14 @@ if [ -n "$1" ]; then if [ -n "$2" ]; then if [ -n "$3" ]; then # Run cmake with the provided path as the MUI include and lib directories - cmake -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=../ .. -DMUI_C_INCLUDE_DIR=$1 -DMUI_C_LIB_DIR=$2 -DCMAKE_PREFIX_PATH=$3 $4 + cmake -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=../ .. -DMUI_C_INCLUDE_DIR=$1 -DMUI_C_LIB_DIR=$2 -DCMAKE_PREFIX_PATH=$3 else # Run cmake with the provided path as the MUI include and lib directories cmake -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=../ .. -DMUI_C_INCLUDE_DIR=$1 -DMUI_C_LIB_DIR=$2 fi else # Run cmake with the provided path as the MUI base directory - cmake -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=../ .. -DCMAKE_PREFIX_PATH=$1 + cmake -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=../ .. -DMUI_BASE_DIR=$1 -DCMAKE_PREFIX_PATH=$1/share/MUI-2.0/cmake fi else # Run cmake with the default MUI directory diff --git a/10-wrappers/10-0-C/10-0-4-basic-fixed-relaxation/CMakeLists.txt b/10-wrappers/10-0-C/10-0-4-basic-fixed-relaxation/CMakeLists.txt index d91c6cf..8ab4201 100644 --- a/10-wrappers/10-0-C/10-0-4-basic-fixed-relaxation/CMakeLists.txt +++ b/10-wrappers/10-0-C/10-0-4-basic-fixed-relaxation/CMakeLists.txt @@ -10,31 +10,15 @@ set(CMAKE_CXX_STANDARD 11) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS OFF) -set(MUI_C_CPP_SEPERATE_PATH 0) - find_package(MPI REQUIRED) include_directories(${MPI_INCLUDE_PATH}) find_package(MUI REQUIRED) -if(${MUI_C_CPP_SEPERATE_PATH} EQUAL 1) - if(MUI_BASE_DIR) - include_directories(${MUI_INCLUDE_DIR}) - elseif(MUI_BASE_C_DIR) - set(MUI_C_LIB_DIR "${MUI_BASE_C_DIR}/lib") - set(MUI_C_INCLUDE_DIR "${MUI_BASE_C_DIR}/include/wrappers/C") - include_directories(${MUI_BASE_C_DIR}) - endif() -else() - if(MUI_BASE_DIR) - set(MUI_C_LIB_DIR "${MUI_LIB_DIR}") - set(MUI_C_INCLUDE_DIR "${MUI_INCLUDE_DIR}/wrappers/C") - include_directories(${MUI_INCLUDE_DIR}) - elseif(MUI_BASE_C_DIR) - set(MUI_C_LIB_DIR "${MUI_BASE_C_DIR}/lib") - set(MUI_C_INCLUDE_DIR "${MUI_BASE_C_DIR}/include/wrappers/C") - include_directories(${MUI_BASE_C_DIR}) - endif() +if(MUI_BASE_DIR) + set(MUI_C_LIB_DIR "${MUI_BASE_DIR}/lib") + set(MUI_C_INCLUDE_DIR "${MUI_BASE_DIR}/include/wrappers/C") + include_directories(${MUI_INCLUDE_DIR}) endif() set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${MPI_COMPILE_FLAGS}") diff --git a/10-wrappers/10-0-C/10-0-4-basic-fixed-relaxation/run_case.sh b/10-wrappers/10-0-C/10-0-4-basic-fixed-relaxation/run_case.sh index 7e3091e..1e67efc 100755 --- a/10-wrappers/10-0-C/10-0-4-basic-fixed-relaxation/run_case.sh +++ b/10-wrappers/10-0-C/10-0-4-basic-fixed-relaxation/run_case.sh @@ -11,14 +11,14 @@ if [ -n "$1" ]; then if [ -n "$2" ]; then if [ -n "$3" ]; then # Run cmake with the provided path as the MUI include and lib directories - cmake -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=../ .. -DMUI_C_INCLUDE_DIR=$1 -DMUI_C_LIB_DIR=$2 -DCMAKE_PREFIX_PATH=$3 $4 + cmake -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=../ .. -DMUI_C_INCLUDE_DIR=$1 -DMUI_C_LIB_DIR=$2 -DCMAKE_PREFIX_PATH=$3 else # Run cmake with the provided path as the MUI include and lib directories cmake -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=../ .. -DMUI_C_INCLUDE_DIR=$1 -DMUI_C_LIB_DIR=$2 fi else # Run cmake with the provided path as the MUI base directory - cmake -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=../ .. -DCMAKE_PREFIX_PATH=$1 + cmake -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=../ .. -DMUI_BASE_DIR=$1 -DCMAKE_PREFIX_PATH=$1/share/MUI-2.0/cmake fi else # Run cmake with the default MUI directory diff --git a/10-wrappers/10-0-C/10-0-5-dynamic-points-aitken/CMakeLists.txt b/10-wrappers/10-0-C/10-0-5-dynamic-points-aitken/CMakeLists.txt index 2ba33b6..ecd3465 100644 --- a/10-wrappers/10-0-C/10-0-5-dynamic-points-aitken/CMakeLists.txt +++ b/10-wrappers/10-0-C/10-0-5-dynamic-points-aitken/CMakeLists.txt @@ -10,31 +10,15 @@ set(CMAKE_CXX_STANDARD 11) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS OFF) -set(MUI_C_CPP_SEPERATE_PATH 0) - find_package(MPI REQUIRED) include_directories(${MPI_INCLUDE_PATH}) find_package(MUI REQUIRED) -if(${MUI_C_CPP_SEPERATE_PATH} EQUAL 1) - if(MUI_BASE_DIR) - include_directories(${MUI_INCLUDE_DIR}) - elseif(MUI_BASE_C_DIR) - set(MUI_C_LIB_DIR "${MUI_BASE_C_DIR}/lib") - set(MUI_C_INCLUDE_DIR "${MUI_BASE_C_DIR}/include/wrappers/C") - include_directories(${MUI_BASE_C_DIR}) - endif() -else() - if(MUI_BASE_DIR) - set(MUI_C_LIB_DIR "${MUI_LIB_DIR}") - set(MUI_C_INCLUDE_DIR "${MUI_INCLUDE_DIR}/wrappers/C") - include_directories(${MUI_INCLUDE_DIR}) - elseif(MUI_BASE_C_DIR) - set(MUI_C_LIB_DIR "${MUI_BASE_C_DIR}/lib") - set(MUI_C_INCLUDE_DIR "${MUI_BASE_C_DIR}/include/wrappers/C") - include_directories(${MUI_BASE_C_DIR}) - endif() +if(MUI_BASE_DIR) + set(MUI_C_LIB_DIR "${MUI_BASE_DIR}/lib") + set(MUI_C_INCLUDE_DIR "${MUI_BASE_DIR}/include/wrappers/C") + include_directories(${MUI_INCLUDE_DIR}) endif() set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${MPI_COMPILE_FLAGS}") diff --git a/10-wrappers/10-0-C/10-0-5-dynamic-points-aitken/run_case.sh b/10-wrappers/10-0-C/10-0-5-dynamic-points-aitken/run_case.sh index 7058fdd..2d6f845 100755 --- a/10-wrappers/10-0-C/10-0-5-dynamic-points-aitken/run_case.sh +++ b/10-wrappers/10-0-C/10-0-5-dynamic-points-aitken/run_case.sh @@ -11,14 +11,14 @@ if [ -n "$1" ]; then if [ -n "$2" ]; then if [ -n "$3" ]; then # Run cmake with the provided path as the MUI include and lib directories - cmake -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=../ .. -DMUI_C_INCLUDE_DIR=$1 -DMUI_C_LIB_DIR=$2 -DCMAKE_PREFIX_PATH=$3 $4 + cmake -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=../ .. -DMUI_C_INCLUDE_DIR=$1 -DMUI_C_LIB_DIR=$2 -DCMAKE_PREFIX_PATH=$3 else # Run cmake with the provided path as the MUI include and lib directories cmake -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=../ .. -DMUI_C_INCLUDE_DIR=$1 -DMUI_C_LIB_DIR=$2 fi else # Run cmake with the provided path as the MUI base directory - cmake -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=../ .. -DCMAKE_PREFIX_PATH=$1 + cmake -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=../ .. -DMUI_BASE_DIR=$1 -DCMAKE_PREFIX_PATH=$1/share/MUI-2.0/cmake fi else # Run cmake with the default MUI directory diff --git a/10-wrappers/10-1-Fortran/10-1-0-simple/CMakeLists.txt b/10-wrappers/10-1-Fortran/10-1-0-simple/CMakeLists.txt index 5b8ee69..c153cec 100644 --- a/10-wrappers/10-1-Fortran/10-1-0-simple/CMakeLists.txt +++ b/10-wrappers/10-1-Fortran/10-1-0-simple/CMakeLists.txt @@ -14,15 +14,11 @@ include_directories(${MPI_INCLUDE_PATH}) find_package(MUI QUIET) if(MUI_BASE_DIR) - set(MUI_FORTRAN_LIB_DIR "${MUI_LIB_DIR}") + set(MUI_FORTRAN_LIB_DIR "${MUI_BASE_DIR}/lib") # Add the include directories - include_directories(${MUI_LIB_DIR}/mod) - set(MUI_FORTRAN_INCLUDE_DIR "${MUI_INCLUDE_DIR}/wrappers/Fortran") + include_directories(${MUI_BASE_DIR}/lib/mod) + set(MUI_FORTRAN_INCLUDE_DIR "${MUI_BASE_DIR}/include/wrappers/Fortran") include_directories(${MUI_INCLUDE_DIR}) -elseif(MUI_BASE_FORTRAN_DIR) - set(MUI_FORTRAN_LIB_DIR "${MUI_BASE_FORTRAN_DIR}/lib") - set(MUI_FORTRAN_INCLUDE_DIR "${MUI_BASE_FORTRAN_DIR}/include/wrappers/Fortran") - include_directories(${MUI_BASE_FORTRAN_DIR}) endif() find_library(MUI_FORTRAN_WRAPPER_LIB NAMES MUI_Fortran_wrapper PATHS ${MUI_FORTRAN_LIB_DIR}) diff --git a/10-wrappers/10-1-Fortran/10-1-0-simple/run_case.sh b/10-wrappers/10-1-Fortran/10-1-0-simple/run_case.sh index 934dc1f..2b308f8 100755 --- a/10-wrappers/10-1-Fortran/10-1-0-simple/run_case.sh +++ b/10-wrappers/10-1-Fortran/10-1-0-simple/run_case.sh @@ -13,7 +13,7 @@ if [ -n "$1" ]; then cmake -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=../ .. -DMUI_FORTRAN_INCLUDE_DIR=$1 -DMUI_FORTRAN_LIB_DIR=$2 else # Run cmake with the provided path as the MUI base directory - cmake -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=../ .. -DCMAKE_PREFIX_PATH=$1 + cmake -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=../ .. -DMUI_BASE_DIR=$1 fi else # Run cmake with the default MUI directory diff --git a/10-wrappers/10-1-Fortran/10-1-1-multiple-interfaces/CMakeLists.txt b/10-wrappers/10-1-Fortran/10-1-1-multiple-interfaces/CMakeLists.txt index 52a33c7..a8d3064 100644 --- a/10-wrappers/10-1-Fortran/10-1-1-multiple-interfaces/CMakeLists.txt +++ b/10-wrappers/10-1-Fortran/10-1-1-multiple-interfaces/CMakeLists.txt @@ -14,14 +14,11 @@ include_directories(${MPI_INCLUDE_PATH}) find_package(MUI QUIET) if(MUI_BASE_DIR) - set(MUI_FORTRAN_LIB_DIR "${MUI_LIB_DIR}") + set(MUI_FORTRAN_LIB_DIR "${MUI_BASE_DIR}/lib") # Add the include directories - include_directories(${MUI_LIB_DIR}/mod) - set(MUI_FORTRAN_INCLUDE_DIR "${MUI_INCLUDE_DIR}/wrappers/Fortran") + include_directories(${MUI_BASE_DIR}/lib/mod) + set(MUI_FORTRAN_INCLUDE_DIR "${MUI_BASE_DIR}/include/wrappers/Fortran") include_directories(${MUI_INCLUDE_DIR}) -elseif(MUI_BASE_FORTRAN_DIR) - set(MUI_FORTRAN_LIB_DIR "${MUI_BASE_FORTRAN_DIR}/lib") - set(MUI_FORTRAN_INCLUDE_DIR "${MUI_BASE_FORTRAN_DIR}/include/wrappers/Fortran") endif() find_library(MUI_FORTRAN_WRAPPER_LIB NAMES MUI_Fortran_wrapper PATHS ${MUI_FORTRAN_LIB_DIR}) diff --git a/10-wrappers/10-1-Fortran/10-1-1-multiple-interfaces/run_case.sh b/10-wrappers/10-1-Fortran/10-1-1-multiple-interfaces/run_case.sh index dd5f04c..260cf79 100755 --- a/10-wrappers/10-1-Fortran/10-1-1-multiple-interfaces/run_case.sh +++ b/10-wrappers/10-1-Fortran/10-1-1-multiple-interfaces/run_case.sh @@ -13,7 +13,7 @@ if [ -n "$1" ]; then cmake -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=../ .. -DMUI_FORTRAN_INCLUDE_DIR=$1 -DMUI_FORTRAN_LIB_DIR=$2 else # Run cmake with the provided path as the MUI base directory - cmake -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=../ .. -DCMAKE_PREFIX_PATH=$1 + cmake -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=../ .. -DMUI_BASE_DIR=$1 fi else # Run cmake with the default MUI directory diff --git a/10-wrappers/10-1-Fortran/10-1-2-smart-send-dual-times/CMakeLists.txt b/10-wrappers/10-1-Fortran/10-1-2-smart-send-dual-times/CMakeLists.txt index a16a786..72aef59 100644 --- a/10-wrappers/10-1-Fortran/10-1-2-smart-send-dual-times/CMakeLists.txt +++ b/10-wrappers/10-1-Fortran/10-1-2-smart-send-dual-times/CMakeLists.txt @@ -17,14 +17,11 @@ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${MPI_LINK_FLAGS}") find_package(MUI QUIET) if(MUI_BASE_DIR) - set(MUI_FORTRAN_LIB_DIR "${MUI_LIB_DIR}") + set(MUI_FORTRAN_LIB_DIR "${MUI_BASE_DIR}/lib") # Add the include directories - include_directories(${MUI_LIB_DIR}/mod) - set(MUI_FORTRAN_INCLUDE_DIR "${MUI_INCLUDE_DIR}/wrappers/Fortran") + include_directories(${MUI_BASE_DIR}/lib/mod) + set(MUI_FORTRAN_INCLUDE_DIR "${MUI_BASE_DIR}/include/wrappers/Fortran") include_directories(${MUI_INCLUDE_DIR}) -elseif(MUI_BASE_FORTRAN_DIR) - set(MUI_FORTRAN_LIB_DIR "${MUI_BASE_FORTRAN_DIR}/lib") - set(MUI_FORTRAN_INCLUDE_DIR "${MUI_BASE_FORTRAN_DIR}/include/wrappers/Fortran") endif() find_library(MUI_FORTRAN_WRAPPER_LIB NAMES MUI_Fortran_wrapper PATHS ${MUI_FORTRAN_LIB_DIR}) diff --git a/10-wrappers/10-1-Fortran/10-1-2-smart-send-dual-times/run_case.sh b/10-wrappers/10-1-Fortran/10-1-2-smart-send-dual-times/run_case.sh index e594b98..9b2f09c 100755 --- a/10-wrappers/10-1-Fortran/10-1-2-smart-send-dual-times/run_case.sh +++ b/10-wrappers/10-1-Fortran/10-1-2-smart-send-dual-times/run_case.sh @@ -13,7 +13,7 @@ if [ -n "$1" ]; then cmake -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=../ .. -DMUI_FORTRAN_INCLUDE_DIR=$1 -DMUI_FORTRAN_LIB_DIR=$2 else # Run cmake with the provided path as the MUI base directory - cmake -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=../ .. -DCMAKE_PREFIX_PATH=$1 + cmake -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=../ .. -DMUI_BASE_DIR=$1 fi else # Run cmake with the default MUI directory diff --git a/10-wrappers/10-1-Fortran/10-1-3-pseudo-diffusion/3D-pseudo-diffusion-coarse.f90 b/10-wrappers/10-1-Fortran/10-1-3-pseudo-diffusion/3D-pseudo-diffusion-coarse.f90 index f9b1b7c..b8c3898 100644 --- a/10-wrappers/10-1-Fortran/10-1-3-pseudo-diffusion/3D-pseudo-diffusion-coarse.f90 +++ b/10-wrappers/10-1-Fortran/10-1-3-pseudo-diffusion/3D-pseudo-diffusion-coarse.f90 @@ -59,7 +59,7 @@ program main integer(c_int) :: basisFunc = 1 integer(c_int) :: conservative = 1 integer(c_int) :: smoothFunc = 0 - integer(c_int) :: writeMatrix = 1 + integer(c_int) :: generateMatrix = 1 integer(c_int) :: cgMaxIter = 500 integer(c_int) :: preconditioner = 1 integer(c_int) :: pouSize = 50 @@ -164,9 +164,8 @@ program main tolerance = (lx / (Nx - 1)) * 0.5 - ! Create rbf matrix folder + ! Define rbf matrix folder write(makedirMString,'(a,i0)') "rbfCoarseMatrix", mui_ranks - call system('mkdir -m 777 '//trim(makedirMString), ierr) fileAddress = TRIM(makedirMString) ! Check if directory was created successfully @@ -242,7 +241,7 @@ program main !Create spatial and temporal samplers for fetch operation call mui_create_sampler_rbf_2d_f(spatial_sampler_rbf_2d,rSampler,point2dY,point2dZ, & point_count,basisFunc,conservative,smoothFunc, & - writeMatrix,TRIM(makedirMString),cutoff,cgSolveTol, & + generateMatrix,TRIM(makedirMString),cutoff,cgSolveTol, & cgMaxIter,pouSize,preconditioner,MUI_COMM_WORLD) call mui_create_temporal_sampler_exact_2d_f(temporal_sampler_exact_2d, tolerance_sampler) diff --git a/10-wrappers/10-1-Fortran/10-1-3-pseudo-diffusion/3D-pseudo-diffusion-fine.cpp b/10-wrappers/10-1-Fortran/10-1-3-pseudo-diffusion/3D-pseudo-diffusion-fine.cpp index 579a4e6..b7605de 100644 --- a/10-wrappers/10-1-Fortran/10-1-3-pseudo-diffusion/3D-pseudo-diffusion-fine.cpp +++ b/10-wrappers/10-1-Fortran/10-1-3-pseudo-diffusion/3D-pseudo-diffusion-fine.cpp @@ -76,7 +76,6 @@ int main(int argc, char ** argv) { /// Create rbf matrix folder std::string makedirMString = "rbfFineMatrix" + std::to_string(rank); - mkdir(makedirMString.c_str(), 0777); /// Define the name of MUI domain std::string domain = "fineDomain"; @@ -103,7 +102,7 @@ int main(int argc, char ** argv) { bool conservative = true; double cutoff = 1e-9; bool smoothFunc = false; - bool writeMatrix = true; + bool generateMatrix = true; double cgSolveTol = 1e-6; int cgMaxIter = 500; int preconditioner= 1; @@ -279,7 +278,7 @@ int main(int argc, char ** argv) { /// Define spatial and temporal samplers mui::sampler_rbf2d spatial_sampler(rSampler, point2dvec, - basisFunc, conservative, smoothFunc, writeMatrix, fileAddress, + basisFunc, conservative, smoothFunc, generateMatrix, fileAddress, cutoff, cgSolveTol, cgMaxIter, pouSize, preconditioner, world); mui::temporal_sampler_exact2d temporal_sampler; diff --git a/10-wrappers/10-1-Fortran/10-1-3-pseudo-diffusion/CMakeLists.txt b/10-wrappers/10-1-Fortran/10-1-3-pseudo-diffusion/CMakeLists.txt index 7028e7e..7efd1ee 100644 --- a/10-wrappers/10-1-Fortran/10-1-3-pseudo-diffusion/CMakeLists.txt +++ b/10-wrappers/10-1-Fortran/10-1-3-pseudo-diffusion/CMakeLists.txt @@ -12,8 +12,6 @@ set(CMAKE_CXX_STANDARD 11) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS OFF) -set(MUI_FORTRAN_CPP_SEPERATE_PATH 0) - find_package(MPI REQUIRED) include_directories(${MPI_INCLUDE_PATH}) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${MPI_COMPILE_FLAGS}") @@ -21,26 +19,12 @@ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${MPI_LINK_FLAGS}") find_package(MUI REQUIRED) -if(${MUI_FORTRAN_CPP_SEPERATE_PATH} EQUAL 1) - if(MUI_BASE_DIR) - include_directories(${MUI_INCLUDE_DIR}) - elseif(MUI_BASE_FORTRAN_DIR) - set(MUI_FORTRAN_LIB_DIR "${MUI_BASE_FORTRAN_DIR}/lib") - set(MUI_FORTRAN_INCLUDE_DIR "${MUI_BASE_FORTRAN_DIR}/include/wrappers/Fortran") - include_directories(${MUI_BASE_FORTRAN_DIR}) - endif() -else() - if(MUI_BASE_DIR) - set(MUI_FORTRAN_LIB_DIR "${MUI_LIB_DIR}") - # Add the include directories - include_directories(${MUI_LIB_DIR}/mod) - set(MUI_FORTRAN_INCLUDE_DIR "${MUI_INCLUDE_DIR}/wrappers/Fortran") - include_directories(${MUI_INCLUDE_DIR}) - elseif(MUI_BASE_FORTRAN_DIR) - set(MUI_FORTRAN_LIB_DIR "${MUI_BASE_FORTRAN_DIR}/lib") - set(MUI_FORTRAN_INCLUDE_DIR "${MUI_BASE_FORTRAN_DIR}/include/wrappers/Fortran") - include_directories(${MUI_BASE_FORTRAN_DIR}) - endif() +if(MUI_BASE_DIR) + set(MUI_FORTRAN_LIB_DIR "${MUI_BASE_DIR}/lib") + # Add the include directories + include_directories(${MUI_BASE_DIR}/lib/mod) + set(MUI_FORTRAN_INCLUDE_DIR "${MUI_BASE_DIR}/include/wrappers/Fortran") + include_directories(${MUI_INCLUDE_DIR}) endif() find_library(MUI_FORTRAN_WRAPPER_LIB NAMES MUI_Fortran_wrapper PATHS ${MUI_FORTRAN_LIB_DIR}) diff --git a/10-wrappers/10-1-Fortran/10-1-3-pseudo-diffusion/run_case.sh b/10-wrappers/10-1-Fortran/10-1-3-pseudo-diffusion/run_case.sh index 107bf35..09edf63 100755 --- a/10-wrappers/10-1-Fortran/10-1-3-pseudo-diffusion/run_case.sh +++ b/10-wrappers/10-1-Fortran/10-1-3-pseudo-diffusion/run_case.sh @@ -11,14 +11,14 @@ if [ -n "$1" ]; then if [ -n "$2" ]; then if [ -n "$3" ]; then # Run cmake with the provided path as the MUI include and lib directories - cmake -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=../ .. -DMUI_FORTRAN_INCLUDE_DIR=$1 -DMUI_FORTRAN_LIB_DIR=$2 -DCMAKE_PREFIX_PATH=$3 $4 + cmake -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=../ .. -DMUI_FORTRAN_INCLUDE_DIR=$1 -DMUI_FORTRAN_LIB_DIR=$2 -DCMAKE_PREFIX_PATH=$3 else # Run cmake with the provided path as the MUI include and lib directories cmake -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=../ .. -DMUI_FORTRAN_INCLUDE_DIR=$1 -DMUI_FORTRAN_LIB_DIR=$2 fi else # Run cmake with the provided path as the MUI base directory - cmake -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=../ .. -DCMAKE_PREFIX_PATH=$1 + cmake -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=../ .. -DMUI_BASE_DIR=$1 -DCMAKE_PREFIX_PATH=$1/share/MUI-2.0/cmake fi else # Run cmake with the default MUI directory diff --git a/10-wrappers/10-1-Fortran/10-1-4-basic-fixed-relaxation/CMakeLists.txt b/10-wrappers/10-1-Fortran/10-1-4-basic-fixed-relaxation/CMakeLists.txt index 72886ec..6f5a31c 100644 --- a/10-wrappers/10-1-Fortran/10-1-4-basic-fixed-relaxation/CMakeLists.txt +++ b/10-wrappers/10-1-Fortran/10-1-4-basic-fixed-relaxation/CMakeLists.txt @@ -12,8 +12,6 @@ set(CMAKE_CXX_STANDARD 11) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS OFF) -set(MUI_FORTRAN_CPP_SEPERATE_PATH 0) - find_package(MPI REQUIRED) include_directories(${MPI_INCLUDE_PATH}) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${MPI_COMPILE_FLAGS}") @@ -21,26 +19,12 @@ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${MPI_LINK_FLAGS}") find_package(MUI REQUIRED) -if(${MUI_FORTRAN_CPP_SEPERATE_PATH} EQUAL 1) - if(MUI_BASE_DIR) - include_directories(${MUI_INCLUDE_DIR}) - elseif(MUI_BASE_FORTRAN_DIR) - set(MUI_FORTRAN_LIB_DIR "${MUI_BASE_FORTRAN_DIR}/lib") - set(MUI_FORTRAN_INCLUDE_DIR "${MUI_BASE_FORTRAN_DIR}/include/wrappers/Fortran") - include_directories(${MUI_BASE_FORTRAN_DIR}) - endif() -else() - if(MUI_BASE_DIR) - set(MUI_FORTRAN_LIB_DIR "${MUI_LIB_DIR}") - # Add the include directories - include_directories(${MUI_LIB_DIR}/mod) - set(MUI_FORTRAN_INCLUDE_DIR "${MUI_INCLUDE_DIR}/wrappers/Fortran") - include_directories(${MUI_INCLUDE_DIR}) - elseif(MUI_BASE_FORTRAN_DIR) - set(MUI_FORTRAN_LIB_DIR "${MUI_BASE_FORTRAN_DIR}/lib") - set(MUI_FORTRAN_INCLUDE_DIR "${MUI_BASE_FORTRAN_DIR}/include/wrappers/Fortran") - include_directories(${MUI_BASE_FORTRAN_DIR}) - endif() +if(MUI_BASE_DIR) + set(MUI_FORTRAN_LIB_DIR "${MUI_BASE_DIR}/lib") + # Add the include directories + include_directories(${MUI_BASE_DIR}/lib/mod) + set(MUI_FORTRAN_INCLUDE_DIR "${MUI_BASE_DIR}/include/wrappers/Fortran") + include_directories(${MUI_INCLUDE_DIR}) endif() find_library(MUI_FORTRAN_WRAPPER_LIB NAMES MUI_Fortran_wrapper PATHS ${MUI_FORTRAN_LIB_DIR}) diff --git a/10-wrappers/10-1-Fortran/10-1-4-basic-fixed-relaxation/run_case.sh b/10-wrappers/10-1-Fortran/10-1-4-basic-fixed-relaxation/run_case.sh index 18db999..877b6e3 100755 --- a/10-wrappers/10-1-Fortran/10-1-4-basic-fixed-relaxation/run_case.sh +++ b/10-wrappers/10-1-Fortran/10-1-4-basic-fixed-relaxation/run_case.sh @@ -11,14 +11,14 @@ if [ -n "$1" ]; then if [ -n "$2" ]; then if [ -n "$3" ]; then # Run cmake with the provided path as the MUI include and lib directories - cmake -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=../ .. -DMUI_FORTRAN_INCLUDE_DIR=$1 -DMUI_FORTRAN_LIB_DIR=$2 -DCMAKE_PREFIX_PATH=$3 $4 + cmake -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=../ .. -DMUI_FORTRAN_INCLUDE_DIR=$1 -DMUI_FORTRAN_LIB_DIR=$2 -DCMAKE_PREFIX_PATH=$3 else # Run cmake with the provided path as the MUI include and lib directories cmake -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=../ .. -DMUI_FORTRAN_INCLUDE_DIR=$1 -DMUI_FORTRAN_LIB_DIR=$2 fi else # Run cmake with the provided path as the MUI base directory - cmake -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=../ .. -DCMAKE_PREFIX_PATH=$1 + cmake -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=../ .. -DMUI_BASE_DIR=$1 -DCMAKE_PREFIX_PATH=$1/share/MUI-2.0/cmake fi else # Run cmake with the default MUI directory diff --git a/10-wrappers/10-1-Fortran/10-1-5-dynamic-points-aitken/CMakeLists.txt b/10-wrappers/10-1-Fortran/10-1-5-dynamic-points-aitken/CMakeLists.txt index bf30206..9dcaa61 100644 --- a/10-wrappers/10-1-Fortran/10-1-5-dynamic-points-aitken/CMakeLists.txt +++ b/10-wrappers/10-1-Fortran/10-1-5-dynamic-points-aitken/CMakeLists.txt @@ -12,8 +12,6 @@ set(CMAKE_CXX_STANDARD 11) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS OFF) -set(MUI_FORTRAN_CPP_SEPERATE_PATH 0) - find_package(MPI REQUIRED) include_directories(${MPI_INCLUDE_PATH}) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${MPI_COMPILE_FLAGS}") @@ -21,26 +19,12 @@ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${MPI_LINK_FLAGS}") find_package(MUI REQUIRED) -if(${MUI_FORTRAN_CPP_SEPERATE_PATH} EQUAL 1) - if(MUI_BASE_DIR) - include_directories(${MUI_INCLUDE_DIR}) - elseif(MUI_BASE_FORTRAN_DIR) - set(MUI_FORTRAN_LIB_DIR "${MUI_BASE_FORTRAN_DIR}/lib") - set(MUI_FORTRAN_INCLUDE_DIR "${MUI_BASE_FORTRAN_DIR}/include/wrappers/Fortran") - include_directories(${MUI_BASE_FORTRAN_DIR}) - endif() -else() - if(MUI_BASE_DIR) - set(MUI_FORTRAN_LIB_DIR "${MUI_LIB_DIR}") - # Add the include directories - include_directories(${MUI_LIB_DIR}/mod) - set(MUI_FORTRAN_INCLUDE_DIR "${MUI_INCLUDE_DIR}/wrappers/Fortran") - include_directories(${MUI_INCLUDE_DIR}) - elseif(MUI_BASE_FORTRAN_DIR) - set(MUI_FORTRAN_LIB_DIR "${MUI_BASE_FORTRAN_DIR}/lib") - set(MUI_FORTRAN_INCLUDE_DIR "${MUI_BASE_FORTRAN_DIR}/include/wrappers/Fortran") - include_directories(${MUI_BASE_FORTRAN_DIR}) - endif() +if(MUI_BASE_DIR) + set(MUI_FORTRAN_LIB_DIR "${MUI_BASE_DIR}/lib") + # Add the include directories + include_directories(${MUI_BASE_DIR}/lib/mod) + set(MUI_FORTRAN_INCLUDE_DIR "${MUI_BASE_DIR}/include/wrappers/Fortran") + include_directories(${MUI_INCLUDE_DIR}) endif() find_library(MUI_FORTRAN_WRAPPER_LIB NAMES MUI_Fortran_wrapper PATHS ${MUI_FORTRAN_LIB_DIR}) diff --git a/10-wrappers/10-1-Fortran/10-1-5-dynamic-points-aitken/run_case.sh b/10-wrappers/10-1-Fortran/10-1-5-dynamic-points-aitken/run_case.sh index 6ee931c..fb3e560 100755 --- a/10-wrappers/10-1-Fortran/10-1-5-dynamic-points-aitken/run_case.sh +++ b/10-wrappers/10-1-Fortran/10-1-5-dynamic-points-aitken/run_case.sh @@ -11,14 +11,14 @@ if [ -n "$1" ]; then if [ -n "$2" ]; then if [ -n "$3" ]; then # Run cmake with the provided path as the MUI include and lib directories - cmake -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=../ .. -DMUI_FORTRAN_INCLUDE_DIR=$1 -DMUI_FORTRAN_LIB_DIR=$2 -DCMAKE_PREFIX_PATH=$3 $4 + cmake -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=../ .. -DMUI_FORTRAN_INCLUDE_DIR=$1 -DMUI_FORTRAN_LIB_DIR=$2 -DCMAKE_PREFIX_PATH=$3 else # Run cmake with the provided path as the MUI include and lib directories cmake -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=../ .. -DMUI_FORTRAN_INCLUDE_DIR=$1 -DMUI_FORTRAN_LIB_DIR=$2 fi else # Run cmake with the provided path as the MUI base directory - cmake -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=../ .. -DCMAKE_PREFIX_PATH=$1 + cmake -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=../ .. -DMUI_BASE_DIR=$1 -DCMAKE_PREFIX_PATH=$1/share/MUI-2.0/cmake fi else # Run cmake with the default MUI directory diff --git a/10-wrappers/10-2-Python/10-2-5-dual-time-types/run_case.sh b/10-wrappers/10-2-Python/10-2-5-dual-time-types/run_case.sh index c82cdb0..8636b4f 100755 --- a/10-wrappers/10-2-Python/10-2-5-dual-time-types/run_case.sh +++ b/10-wrappers/10-2-Python/10-2-5-dual-time-types/run_case.sh @@ -24,7 +24,7 @@ START=$SECONDS # aborts. If a python process exit with failure all processes in MPI_COMM_WORLD # will be aborted so hangs are avoided. -mpirun -np 1 PUSHER_FETCHER_0 :\ +mpirun -np 1 ./PUSHER_FETCHER_0 :\ -np 1 python3 -m mpi4py PUSHER_FETCHER_1.py 2>&1 | tee output.log DURATION=$(( SECONDS - START )) diff --git a/10-wrappers/10-2-Python/10-2-6-pseudo-diffusion/3D-pseudo-diffusion-coarse.py b/10-wrappers/10-2-Python/10-2-6-pseudo-diffusion/3D-pseudo-diffusion-coarse.py index e8011b3..8fa18cc 100755 --- a/10-wrappers/10-2-Python/10-2-6-pseudo-diffusion/3D-pseudo-diffusion-coarse.py +++ b/10-wrappers/10-2-Python/10-2-6-pseudo-diffusion/3D-pseudo-diffusion-coarse.py @@ -96,20 +96,13 @@ conservative = True # Enable conservative OR consistent RBF form cutOff = 1e-9 # Cut-off value for Gaussian RBF basis function smoothFunc = False # Enable/disable RBF smoothing function during matrix creation -writeMatrix = True # Enable/disable writing of the matrix (if not reading) +generateMatrix = True # Enable/disable writing of the matrix (if not reading) cgSolveTol = 1e-6; # Conjugate Gradient solver tolerance cgMaxIter = 500; # Conjugate Gradient solver maximum iterations (-1 = value determined by tolerance) preconditioner = 1; # Preconditioner of Conjugate Gradient solver pouSize = 50; # RBF Partition of Unity patch size rbfMatrixFolder = "rbfCoarseMatrix" + str(rank) # Output folder for the RBF matrix files -# Create the RBF Matrix Folder includes all intermediate folders if don't exists -if not os.path.exists(rbfMatrixFolder): - os.makedirs(rbfMatrixFolder) - print("Folder " , rbfMatrixFolder, " created ") -else: - print("Folder " , rbfMatrixFolder, " already exists") - # Setup diffusion rate dr = 0.5 @@ -219,7 +212,7 @@ # Spatial/temporal samplers t_sampler = mui4py.TemporalSamplerExact() -s_sampler = mui4py.SamplerRbf(rSampler, point2dList, basisFunc, conservative, smoothFunc, writeMatrix, rbfMatrixFolder, cutOff, cgSolveTol, cgMaxIter, pouSize, preconditioner, MUI_COMM_WORLD) +s_sampler = mui4py.SamplerRbf(rSampler, point2dList, basisFunc, conservative, smoothFunc, generateMatrix, rbfMatrixFolder, cutOff, cgSolveTol, cgMaxIter, pouSize, preconditioner, MUI_COMM_WORLD) # Commit ZERO step MUI_Interfaces["interface2D02"].commit(0) diff --git a/10-wrappers/10-2-Python/10-2-6-pseudo-diffusion/3D-pseudo-diffusion-fine.cpp b/10-wrappers/10-2-Python/10-2-6-pseudo-diffusion/3D-pseudo-diffusion-fine.cpp index 0faa9ee..9d473b9 100644 --- a/10-wrappers/10-2-Python/10-2-6-pseudo-diffusion/3D-pseudo-diffusion-fine.cpp +++ b/10-wrappers/10-2-Python/10-2-6-pseudo-diffusion/3D-pseudo-diffusion-fine.cpp @@ -77,7 +77,6 @@ int main(int argc, char ** argv) { /// Create rbf matrix folder std::string makedirMString = "rbfFineMatrix" + std::to_string(rank); - mkdir(makedirMString.c_str(), 0777); /// Define the name of MUI domain std::string domain = "fineDomain"; @@ -104,7 +103,7 @@ int main(int argc, char ** argv) { bool conservative = true; double cutoff = 1e-9; bool smoothFunc = false; - bool writeMatrix = true; + bool generateMatrix = true; double cgSolveTol = 1e-6; int cgMaxIter = 500; int preconditioner= 1; @@ -280,7 +279,7 @@ int main(int argc, char ** argv) { /// Define spatial and temporal samplers mui::sampler_rbf spatial_sampler(rSampler, point2dvec, - basisFunc, conservative, smoothFunc, writeMatrix, fileAddress, + basisFunc, conservative, smoothFunc, generateMatrix, fileAddress, cutoff, cgSolveTol, cgMaxIter, pouSize, preconditioner, world); mui::temporal_sampler_exact temporal_sampler; diff --git a/10-wrappers/10-2-Python/10-2-6-pseudo-diffusion/run_case.sh b/10-wrappers/10-2-Python/10-2-6-pseudo-diffusion/run_case.sh index 4b69827..d30fb6a 100755 --- a/10-wrappers/10-2-Python/10-2-6-pseudo-diffusion/run_case.sh +++ b/10-wrappers/10-2-Python/10-2-6-pseudo-diffusion/run_case.sh @@ -24,8 +24,8 @@ START=$SECONDS # aborts. If a python process exit with failure all processes in MPI_COMM_WORLD # will be aborted so hangs are avoided. -mpirun -np 2 3D-pseudo-diffusion-fine :\ - -np 2 python3 -m mpi4py 3D-pseudo-diffusion-coarse.py 2>&1 | tee output.log +mpirun -np 1 3D-pseudo-diffusion-fine :\ + -np 1 python3 -m mpi4py 3D-pseudo-diffusion-coarse.py 2>&1 | tee output.log DURATION=$(( SECONDS - START )) @@ -44,4 +44,4 @@ else echo "Completed in $DURATION seconds" fi -paraview Resources/view.pvsm \ No newline at end of file +# paraview Resources/view.pvsm \ No newline at end of file