From 827cc5320e307dcc1b9251b9a01b2ab1851fd33e Mon Sep 17 00:00:00 2001 From: Ali Hakam Date: Wed, 11 Feb 2026 12:06:06 +0200 Subject: [PATCH 1/4] set cuda architectures before enabling cuda language --- CMakeLists.txt | 2 ++ cmake/toolchains/CudaToolchain.cmake | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 366ae6e7..b9179cf2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -60,6 +60,8 @@ if (USE_CUDA) message("---------------------------------------- CUDA") # Enable CUDA and include CudaToolchain add_definitions(-DUSE_CUDA=TRUE) + # Set CUDA architectures BEFORE enabling CUDA language (required for CMake 3.21+) + set(CMAKE_CUDA_ARCHITECTURES "35;50;72") enable_language(CUDA) include(toolchains/CudaToolchain) # Set BLA_VENDOR to NVHPC for CUDA-enabled builds diff --git a/cmake/toolchains/CudaToolchain.cmake b/cmake/toolchains/CudaToolchain.cmake index 89721ad9..f9f96055 100644 --- a/cmake/toolchains/CudaToolchain.cmake +++ b/cmake/toolchains/CudaToolchain.cmake @@ -15,7 +15,10 @@ set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) # Set the CUDA architectures to be targeted -set(CUDA_ARCHITECTURES "35;50;72") +# Note: CMAKE_CUDA_ARCHITECTURES should be set before enable_language(CUDA) in main CMakeLists.txt +if(NOT DEFINED CMAKE_CUDA_ARCHITECTURES) + set(CMAKE_CUDA_ARCHITECTURES "35;50;72") +endif() # Find the CUDA toolkit find_package(CUDAToolkit REQUIRED) From 6285c5db3ae450a1647e4e5dbf14ffe3c9346830 Mon Sep 17 00:00:00 2001 From: Ali Hakam Date: Thu, 12 Feb 2026 13:40:17 +0200 Subject: [PATCH 2/4] fix data-path exception when not set for synthetic data generation --- src/configurations/Configurations.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/configurations/Configurations.cpp b/src/configurations/Configurations.cpp index f7e03a97..dc44988c 100644 --- a/src/configurations/Configurations.cpp +++ b/src/configurations/Configurations.cpp @@ -116,6 +116,10 @@ void Configurations::ValidateConfiguration() { } if (GetMeanTrendRemoval()) { + if (GetDataPath().empty()) { + throw domain_error("You need to set the data path (--datapath) for Mean Trend Removal"); + } + if (GetResultsPath().empty()) { throw domain_error("You need to set the results path (--resultspath) before starting"); } @@ -144,13 +148,19 @@ void Configurations::ValidateConfiguration() { if (mDictionary.find("tolerance") == mDictionary.end()) { SetTolerance(8); } - if (GetDataPath().empty()) { + // Only require data path when NOT generating synthetic data + if (GetDataPath().empty() && !GetIsSynthetic()) { throw domain_error("You need to set the data path, before starting"); } #else + // PaRSEC runtime validations if(GetMeanTrendRemoval() && GetKernelName().empty()){ throw domain_error("You need to set the Kernel for Mean Trend Removal, before starting"); } + // Climate Emulator requires data path for loading NetCDF files + if(GetIsClimateEmulator() && GetDataPath().empty()){ + throw domain_error("You need to set the data path (--datapath) for Climate Emulator"); + } #endif size_t found = GetKernelName().find("NonGaussian"); From 2dfa7463509fe02b6da3b2d6e50a645df264495d Mon Sep 17 00:00:00 2001 From: Ali Hakam Date: Sat, 21 Feb 2026 15:56:36 +0200 Subject: [PATCH 3/4] Update parameters in PrintUsage() and fix N=16 in loading real data --- configurations/config.json | 2 +- src/configurations/Configurations.cpp | 46 ++++++++++++++------------ src/data-loader/concrete/CSVLoader.cpp | 1 + 3 files changed, 26 insertions(+), 23 deletions(-) diff --git a/configurations/config.json b/configurations/config.json index 857dbd34..c3df4102 100644 --- a/configurations/config.json +++ b/configurations/config.json @@ -43,7 +43,7 @@ "FileLogPath": "logs.log", "FileLogName": "logs.log", "DistanceMetric": "euclidean", - "MaxMleIterations": "1", + "MaxMleIterations": "1000", "Accuracy": "0", "Tolerance": "1", "ZMiss": "1", diff --git a/src/configurations/Configurations.cpp b/src/configurations/Configurations.cpp index dc44988c..a5370a1c 100644 --- a/src/configurations/Configurations.cpp +++ b/src/configurations/Configurations.cpp @@ -239,39 +239,41 @@ void Configurations::PrintUsage() { LOGGER("--lts=value : Used to set the Low Tile size.") LOGGER("--band=value : Used to set the Tile diagonal thickness.") LOGGER("--Zmiss=value : Used to set number of unknown observation to be predicted.") - LOGGER("--observations_file=PATH/TO/File : Used to pass the observations file path.") LOGGER("--max_rank=value : Used to the max rank value.") LOGGER("--initial_theta=value : Initial theta parameters for optimization.") LOGGER("--estimated_theta=value : Estimated kernel parameters for optimization.") LOGGER("--seed=value : Seed value for random number generation.") LOGGER("--verbose=value : Run mode whether quiet/standard/detailed.") - LOGGER("--log_path=value : Path to log file.") + LOGGER("--log=true/false : Enable logging to file (default: false).") + LOGGER("--logpath=PATH : Directory path for log and output files.") LOGGER("--distance_metric=value : Used distance metric either eg or gcd.") - LOGGER("--max_mle_iterations=value : Maximum number of MLE iterations.") - LOGGER("--tolerance : MLE tolerance between two iterations.") - LOGGER("--data_path : Used to enter the path to the real data file.") - LOGGER("--mspe: Used to enable mean square prediction error.") - LOGGER("--fisher: Used to enable fisher tile prediction function.") - LOGGER("--idw: Used to IDW prediction auxiliary function.") - LOGGER("--mloe-mmom: Used to enable MLOE MMOM.") - LOGGER("--OOC : Used to enable Out of core technology.") - LOGGER("--approximation_mode : Used to enable Approximation mode.") - LOGGER("--log : Enable logging.") + LOGGER("--max_mle_iterations=value : Maximum number of MLE iterations (default: 1000).") + LOGGER("--tolerance=value : MLE tolerance between two iterations.") + LOGGER("--datapath=PATH : Path to input data file. Format depends on mode:") + LOGGER(" - MLE/Modeling: CSV file (X,Y,Z format) with unique spatial locations") + LOGGER(" - Emulator (Mean Trend Removal): Directory with NetCDF files (longitude, latitude, timestep)") + LOGGER(" - Emulator (Climate): Directory with z_*.csv files from Mean Trend Removal output") + LOGGER("--mspe=true/false : (Used in prediction) Enable mean square prediction error computation.") + LOGGER("--fisher=true/false : (Used in prediction) Enable Fisher information matrix computation.") + LOGGER("--idw=true/false : (Used in prediction) Enable IDW (Inverse Distance Weighting) prediction.") + LOGGER("--mloe-mmom=true/false : (Used in prediction) Enable MLOE-MMOM auxiliary function.") + LOGGER("--OOC=true/false : Enable Out-of-Core technology.") + LOGGER("--approximation_mode=value : Enable Approximation mode (1=enabled, 0=disabled).") LOGGER("--accuracy : Used to set the accuracy when using tlr.") LOGGER("--band_dense=value : Used to set the dense band double precision, Used with PaRSEC runtime only.") LOGGER("--objects_number=value : Used to set the number of objects (number of viruses within a population), Used with PaRSEC runtime only.") LOGGER("--adaptive_decision=value : Used to set the adaptive decision of each tile's format using norm approach, if enabled, otherwise 0, Used with PaRSEC runtime only.") - LOGGER("--add_diagonal=value : Used to add this number to diagonal elements to make the matrix positive definite in electrodynamics problem, Used with PaRSEC runtime only.") + LOGGER("--add_diagonal=value : Used to add this number to diagonal elements to make the matrix positive definite, Used with PaRSEC runtime only.") LOGGER("--file_time_slot=value : Used to set time slot per file, Used with PaRSEC runtime only.") LOGGER("--file_number=value : Used to set file number, Used with PaRSEC runtime only.") - LOGGER("--enable-inverse : Used to enable inverse spherical harmonics transform, Used with PaRSEC runtime only.") - LOGGER("--mpiio : Used to enable MPI IO, Used with PaRSEC runtime only.") - LOGGER("--log-file-path: Used to set path of file where events and results are logged.") - LOGGER("--start-year=value : Used to set the starting year for NetCDF data processing (MeanTrendRemoval).") - LOGGER("--end-year=value : Used to set the ending year for NetCDF data processing (MeanTrendRemoval).") - LOGGER("--lat=value : Used to set the latitude band index for MeanTrendRemoval climate data processing (required for MeanTrendRemoval).") - LOGGER("--lon=value : Used to set the longitude count for MeanTrendRemoval climate data processing (required for MeanTrendRemoval).") - LOGGER("--resultspath=PATH : Used to set the output directory path for MeanTrendRemoval results (required for MeanTrendRemoval).") + LOGGER("--enable-inverse=true/false : Used to enable inverse spherical harmonics transform, Used with PaRSEC runtime only.") + LOGGER("--mpiio=true/false : Used to enable MPI IO, Used with PaRSEC runtime only.") + LOGGER("--start-year=value : (Emulator only) Starting year for NetCDF data processing.") + LOGGER("--end-year=value : (Emulator only) Ending year for NetCDF data processing.") + LOGGER("--lat=value : (Emulator only) Latitude band index for climate data processing (required).") + LOGGER("--lon=value : (Emulator only) Longitude count for climate data processing (required).") + LOGGER("--meantrendremoval=true/false : (Emulator only) Enable Mean Trend Removal pipeline.") + LOGGER("--resultspath=PATH : (Emulator only) Output directory path for Mean Trend Removal results (required).") LOGGER("\n\n") exit(0); @@ -312,10 +314,10 @@ void Configurations::PrintSummary() { #if DEFAULT_RUNTIME if (this->GetIsSynthetic()) { LOGGER("#Synthetic Data generation") + LOGGER("#Number of Locations: " << this->GetProblemSize()) } else { LOGGER("#Real Data loader") } - LOGGER("#Number of Locations: " << this->GetProblemSize()) LOGGER("#Threads per node: " << this->GetCoresNumber()) LOGGER("#GPUs: " << this->GetGPUsNumbers()) if (this->GetPrecision() == 1) { diff --git a/src/data-loader/concrete/CSVLoader.cpp b/src/data-loader/concrete/CSVLoader.cpp index 2c9266d8..76aad6a7 100644 --- a/src/data-loader/concrete/CSVLoader.cpp +++ b/src/data-loader/concrete/CSVLoader.cpp @@ -139,6 +139,7 @@ void CSVLoader::ReadData(Configurations &aConfigurations, vector &aMeasure file.close(); LOGGER("\tData is read from " << data_path << " successfully.") + LOGGER("\tNumber of Locations: " << aConfigurations.GetProblemSize()) } template From b97df45d0c43936dd49226681c16dafc487bc7ae Mon Sep 17 00:00:00 2001 From: Ali Hakam Date: Tue, 24 Feb 2026 06:29:58 +0200 Subject: [PATCH 4/4] fix few documentations in PrintUsage() --- src/configurations/Configurations.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/configurations/Configurations.cpp b/src/configurations/Configurations.cpp index a5370a1c..b0d1285f 100644 --- a/src/configurations/Configurations.cpp +++ b/src/configurations/Configurations.cpp @@ -232,12 +232,12 @@ void Configurations::PrintUsage() { LOGGER("--q=value : Used P-Grid.") LOGGER("--time_slot=value : Time slot value for ST.") LOGGER("--computation=value : Used computation.") - LOGGER("--precision=value : Used precision.") + LOGGER("--precision=value : Used precision (single/double/mixed).") LOGGER("--cores=value : Used to set the number of cores.") LOGGER("--gpus=value : Used to set the number of GPUs.") LOGGER("--dts=value : Used to set the Dense Tile size.") LOGGER("--lts=value : Used to set the Low Tile size.") - LOGGER("--band=value : Used to set the Tile diagonal thickness.") + LOGGER("--band=value : Used to set the Tile diagonal thickness for TLR. Used with Chameleon/StarPU runtime.") LOGGER("--Zmiss=value : Used to set number of unknown observation to be predicted.") LOGGER("--max_rank=value : Used to the max rank value.") LOGGER("--initial_theta=value : Initial theta parameters for optimization.") @@ -259,7 +259,7 @@ void Configurations::PrintUsage() { LOGGER("--mloe-mmom=true/false : (Used in prediction) Enable MLOE-MMOM auxiliary function.") LOGGER("--OOC=true/false : Enable Out-of-Core technology.") LOGGER("--approximation_mode=value : Enable Approximation mode (1=enabled, 0=disabled).") - LOGGER("--accuracy : Used to set the accuracy when using tlr.") + LOGGER("--accuracy : Used to set the accuracy when using tlr. e.g. --accuracy=10 for 1e-10.") LOGGER("--band_dense=value : Used to set the dense band double precision, Used with PaRSEC runtime only.") LOGGER("--objects_number=value : Used to set the number of objects (number of viruses within a population), Used with PaRSEC runtime only.") LOGGER("--adaptive_decision=value : Used to set the adaptive decision of each tile's format using norm approach, if enabled, otherwise 0, Used with PaRSEC runtime only.")