Skip to content

Commit 5815423

Browse files
authored
Merge pull request #47 from ecrc/Full-Pipeline
V2.0.0
2 parents fe905c2 + 83eb2a8 commit 5815423

File tree

13 files changed

+94
-22
lines changed

13 files changed

+94
-22
lines changed

FullPipeline.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,8 +286,11 @@ for lat in $(seq 0 $((total_latitudes - 1))); do
286286

287287
echo "[$(date +%H:%M:%S)] Starting latitude ${lat}..."
288288

289-
# Run this latitude in background
289+
# Run this latitude in background with environment variable set
290290
(
291+
# Set environment variable for the C++ program to know which latitude band this is
292+
export STAGEZERO_LATITUDE_BAND=${lat}
293+
291294
mpirun -n ${mpi_processes} ${MeanTrendRemoval_BIN} \
292295
--kernel=trend_model \
293296
--lon=${lon} \

examples/climate-emulator/ClimateEmulator.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,18 @@ using namespace exageostat::api;
2323

2424
int main(int argc, char **argv) {
2525

26+
// Climate Emulator requires PaRSEC runtime
27+
#if DEFAULT_RUNTIME
28+
std::cerr << "\n========================================\n";
29+
std::cerr << "ERROR: Climate Emulator is NOT supported with StarPU runtime!\n";
30+
std::cerr << "========================================\n\n";
31+
std::cerr << "Climate Emulator requires PaRSEC runtime.\n";
32+
std::cerr << "Please reconfigure and rebuild with PaRSEC:\n";
33+
std::cerr << " ./configure -e --climate-emulator --use-parsec\n";
34+
std::cerr << "Note: Stage Zero example works with both StarPU and PaRSEC.\n";
35+
std::cerr << "========================================\n\n";
36+
return 1;
37+
#endif
2638
// Create a new configurations object.
2739
Configurations configurations;
2840
// Initialize the arguments with the provided command line arguments

examples/end-to-end/DataGeneration.cpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,16 @@ int main(int argc, char **argv) {
3030
Configurations configurations;
3131
// Initialize the arguments with the provided command line arguments
3232
configurations.InitializeArguments(argc, argv);
33-
// Initialize the ExaGeoStat Hardware
33+
// Initialize the ExaGeoStat Hardware based on runtime type
34+
#if DEFAULT_RUNTIME
35+
// StarPU/CHAMELEON mode
36+
auto hardware = ExaGeoStatHardware(configurations.GetComputation(), configurations.GetCoresNumber(),
37+
configurations.GetGPUsNumbers(), configurations.GetPGrid(),
38+
configurations.GetQGrid());
39+
#else
40+
// PaRSEC mode
3441
auto hardware = ExaGeoStatHardware(configurations);
42+
#endif
3543
// Load data by either read from file or create synthetic data.
3644
std::unique_ptr<ExaGeoStatData<double>> data;
3745
exageostat::api::ExaGeoStat<double>::ExaGeoStatLoadData(configurations, data);

examples/end-to-end/DataGenerationAndModeling.cpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,16 @@ int main(int argc, char **argv) {
3131
Configurations configurations;
3232
// Initialize the arguments with the provided command line arguments
3333
configurations.InitializeArguments(argc, argv);
34-
// Initialize the ExaGeoStat Hardware
34+
// Initialize the ExaGeoStat Hardware based on runtime type
35+
#if DEFAULT_RUNTIME
36+
// StarPU/CHAMELEON mode
37+
auto hardware = ExaGeoStatHardware(configurations.GetComputation(), configurations.GetCoresNumber(),
38+
configurations.GetGPUsNumbers(), configurations.GetPGrid(),
39+
configurations.GetQGrid());
40+
#else
41+
// PaRSEC mode
3542
auto hardware = ExaGeoStatHardware(configurations);
43+
#endif
3644
// Load data by either read from file or create synthetic data.
3745
std::unique_ptr<ExaGeoStatData<double>> data;
3846
ExaGeoStat<double>::ExaGeoStatLoadData(configurations, data);

examples/end-to-end/DataGenerationAndPrediction.cpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,16 @@ int main(int argc, char **argv) {
3131
Configurations configurations;
3232
// Initialize the arguments with the provided command line arguments
3333
configurations.InitializeArguments(argc, argv);
34-
// Initialize the ExaGeoStat Hardware
34+
// Initialize the ExaGeoStat Hardware based on runtime type
35+
#if DEFAULT_RUNTIME
36+
// StarPU/CHAMELEON mode
37+
auto hardware = ExaGeoStatHardware(configurations.GetComputation(), configurations.GetCoresNumber(),
38+
configurations.GetGPUsNumbers(), configurations.GetPGrid(),
39+
configurations.GetQGrid());
40+
#else
41+
// PaRSEC mode
3542
auto hardware = ExaGeoStatHardware(configurations);
43+
#endif
3644
// Load data by either read from file or create synthetic data.
3745
std::unique_ptr<ExaGeoStatData<double>> data;
3846
ExaGeoStat<double>::ExaGeoStatLoadData(configurations, data);

examples/end-to-end/DataGenerationModelingAndPrediction.cpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,16 @@ int main(int argc, char **argv) {
3131
Configurations configurations;
3232
// Initialize the arguments with the provided command line arguments
3333
configurations.InitializeArguments(argc, argv);
34-
// Initialize the ExaGeoStat Hardware
34+
// Initialize the ExaGeoStat Hardware based on runtime type
35+
#if DEFAULT_RUNTIME
36+
// StarPU/CHAMELEON mode
37+
auto hardware = ExaGeoStatHardware(configurations.GetComputation(), configurations.GetCoresNumber(),
38+
configurations.GetGPUsNumbers(), configurations.GetPGrid(),
39+
configurations.GetQGrid());
40+
#else
41+
// PaRSEC mode
3542
auto hardware = ExaGeoStatHardware(configurations);
43+
#endif
3644
// Load data by either read from file or create synthetic data.
3745
std::unique_ptr<ExaGeoStatData<double>> data;
3846
ExaGeoStat<double>::ExaGeoStatLoadData(configurations, data);

examples/end-to-end/DataModeling.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,15 @@ int main(int argc, char **argv) {
4343
configurations.SetDenseTileSize(dts);
4444

4545
// initialize ExaGeoStat hardware with the selected number of cores and gpus.
46+
#if DEFAULT_RUNTIME
47+
// StarPU/CHAMELEON mode
48+
auto hardware = ExaGeoStatHardware(configurations.GetComputation(), configurations.GetCoresNumber(),
49+
configurations.GetGPUsNumbers(), configurations.GetPGrid(),
50+
configurations.GetQGrid());
51+
#else
52+
// PaRSEC mode
4653
auto hardware = ExaGeoStatHardware(configurations);
54+
#endif
4755
//Data Setup
4856
std::unique_ptr<ExaGeoStatData<double>> data = std::make_unique<ExaGeoStatData<double>>(
4957
configurations.GetProblemSize(), configurations.GetDimension());

examples/end-to-end/DataPrediction.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,15 @@ int main(int argc, char **argv) {
4242
configurations.SetDenseTileSize(dts);
4343

4444
// initialize ExaGeoStat hardware with the selected number of cores and gpus.
45+
#if DEFAULT_RUNTIME
46+
// StarPU/CHAMELEON mode
47+
auto hardware = ExaGeoStatHardware(configurations.GetComputation(), configurations.GetCoresNumber(),
48+
configurations.GetGPUsNumbers(), configurations.GetPGrid(),
49+
configurations.GetQGrid());
50+
#else
51+
// PaRSEC mode
4552
auto hardware = ExaGeoStatHardware(configurations);
53+
#endif
4654
//Data Setup
4755
std::unique_ptr<ExaGeoStatData<double>> data = std::make_unique<ExaGeoStatData<double>>(
4856
configurations.GetProblemSize(), configurations.GetDimension());

examples/mean-trend-removal/MeanTrendRemoval.cpp

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,19 @@ int main(int argc, char **argv) {
2727
// Initialize the arguments with the provided command line arguments
2828
configurations.InitializeArguments(argc, argv);
2929

30-
// Initialize the ExaGeoStat Hardware
30+
31+
// Initialize the ExaGeoStat Hardware based on runtime type
32+
#if DEFAULT_RUNTIME
33+
// StarPU/CHAMELEON mode - use constructor that initializes CHAMELEON
34+
auto hardware = ExaGeoStatHardware(configurations.GetComputation(),
35+
configurations.GetCoresNumber(),
36+
configurations.GetGPUsNumbers(),
37+
configurations.GetPGrid(),
38+
configurations.GetQGrid());
39+
#else
40+
// PaRSEC mode - use constructor that initializes PaRSEC
3141
auto hardware = ExaGeoStatHardware(configurations);
42+
#endif
3243

3344
std::unique_ptr<ExaGeoStatData<double>> data;
3445
// Generate Mean Trend Removal mean-trend data

src/configurations/Configurations.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ Configurations::Configurations() {
4343
SetUpperBounds(theta);
4444
SetEstimatedTheta(theta);
4545
SetSeed(static_cast<unsigned int>(time(0)));
46-
SetLogger(false);
4746
SetUnknownObservationsNb(0);
4847
SetApproximationMode(1);
4948
SetActualObservationsFilePath("");

0 commit comments

Comments
 (0)