Commit c165e8f7 authored by Pillai, Himanshu's avatar Pillai, Himanshu
Browse files

Charm++ worked and pass all tests

parent 95d4550c
......@@ -56,9 +56,11 @@ ELM_INC_FLAGS = -I$(ELM_ROOT)
GFORTRAN_FLAGS = -L$(FC_LIB_ROOT) -lgfortran
# linking flags
CC_LD_FLAGS += -L$(SRCDIR) -lelm -L$(NETCDF_ROOT) -lnetcdf -L$(STD_LIB_ROOT)/lib -lstdc++ -L$(MPI_LIB_ROOT)/lib -L$(FC_LIB_ROOT) -lgfortran
CC_LD_FLAGS += -L$(SRCDIR) -lelm -L$(NETCDF_ROOT) -lnetcdf -L$(STD_LIB_ROOT)/lib -lstdc++ -L$(FC_LIB_ROOT) -lgfortran
#CC_LD_FLAGS += -L$(SRCDIR) -lelm -L$(NETCDF_ROOT) -lnetcdf -L$(STD_LIB_ROOT)/lib -lstdc++ -L$(MPI_LIB_ROOT)/lib -L$(FC_LIB_ROOT) -lgfortran
FC_LD_FLAGS += -L$(ELM_ROOT) -lelm -L$(NETCDF_ROOT) -lnetcdff
CXX_LD_FLAGS += -L$(ELM_ROOT) -lelm -L$(NETCDF_ROOT) -lnetcdf
#CXX_LD_FLAGS += -L$(ELM_ROOT) -lelm -L$(NETCDF_ROOT) -lnetcdf -I$(MPI_LIB_ROOT)/include -L$(MPI_LIB_ROOT)/lib -lmpi
CUDA_LD_FLAGS = -L$(SRCDIR) -lelm -L$(NETCDF_ROOT) -lnetcdf -L$(CUDA_LIBDIRS) -lstdc++ -lpthread -lcudart -lcublas
#
......@@ -73,9 +75,9 @@ CUDA_LD_FLAGS = -L$(SRCDIR) -lelm -L$(NETCDF_ROOT) -lnetcdf -L$(CUDA_LIBDIRS) -l
%.cc.o: %.cc
$(CC) $(CXXFLAGS) $(INC_FLAGS) -c $< -o $@
%.cpp.o: %.cpp
$(CXX) $(CXXFLAGS) $(KOKKOS_CXXFLAGS) $(NETCDF_INC_FLAGS) $(ELM_INC_FLAGS) -c $< -o $@
$(CXX) $(CXXFLAGS) $(KOKKOS_CXXFLAGS) $(NETCDF_INC_FLAGS) $(ELM_INC_FLAGS) -c $< -o $@ #-I$(MPI_LIB_ROOT)/include
%.cu.o: %.cu
$(NVCC) $(CUDA_FLAGS) $(INC_FLAGS) -c $< -o $@
$(NVCC) $(CUDA_FLAGS) -I$(MPI_LIB_ROOT)/include $(INC_FLAGS) -c $< -o $@
SHELL = /bin/sh
......
......@@ -12,7 +12,7 @@
#include <fstream>
#include <algorithm>
#include <assert.h>
#include <mpi.h>
//#include <mpi.h>
#include <chrono>
#include "utils.hh"
#include "readers.hh"
......@@ -43,7 +43,13 @@ int main(int argc, char ** argv)
using ELM::Utils::n_pfts;
using ELM::Utils::n_grid_cells;
using ELM::Utils::n_max_times;
MPI_Init(NULL, NULL);
// int myrank, numprocs;
// double mytime, maxtime, mintime, avgtime;
// MPI_Init(&argc,&argv);
// MPI_Comm_size(MPI_COMM_WORLD,&numprocs);
// MPI_Comm_rank(MPI_COMM_WORLD,&myrank);
// MPI_Barrier(MPI_COMM_WORLD);
// fixed magic parameters for now
const int ctype = 1;
......@@ -101,6 +107,7 @@ int main(int argc, char ** argv)
<< "\t" << *min_max.second << std::endl;
}
auto start = high_resolution_clock::now();
// mytime = MPI_Wtime();
// main loop
// -- the timestep loop cannot/should not be parallelized
for (size_t t = 0; t != n_times; ++t) {
......@@ -135,9 +142,20 @@ int main(int argc, char ** argv)
<< "\t" << *min_max.second << std::endl;
}
}
// mytime = MPI_Wtime() - mytime;
auto stop = high_resolution_clock::now();
// std::cout <<"Timing from node "<< myrank << " is "<< mytime << "seconds." << std::endl;
// MPI_Reduce(&mytime, &maxtime, 1, MPI_DOUBLE,MPI_MAX, 0, MPI_COMM_WORLD);
// MPI_Reduce(&mytime, &mintime, 1, MPI_DOUBLE, MPI_MIN, 0,MPI_COMM_WORLD);
// MPI_Reduce(&mytime, &avgtime, 1, MPI_DOUBLE, MPI_SUM, 0,MPI_COMM_WORLD);
// if (myrank == 0) {
// avgtime /= numprocs;
// std::cout << "Min: "<< mintime << ", Max: " << maxtime << ", Avg: " <<avgtime << std::endl;
// }
auto duration = duration_cast<microseconds>(stop - start);
std::cout << "Time taken by function: "<< duration.count() << " microseconds" << std::endl;
return 0;
MPI_Finalize();
// MPI_Finalize();
}
......@@ -11,7 +11,7 @@
#include <iomanip>
#include <fstream>
#include <assert.h>
#include <mpi.h>
//#include <mpi.h>
#include <chrono>
#include "utils.hh"
#include "readers.hh"
......@@ -35,7 +35,13 @@ using MatrixForc = MatrixStatic<n_max_times,1>;
int main(int argc, char ** argv)
{
MPI_Init(NULL, NULL);
// int myrank, numprocs;
// double mytime, maxtime, mintime, avgtime;
// MPI_Init(&argc,&argv);
// MPI_Comm_size(MPI_COMM_WORLD,&numprocs);
// MPI_Comm_rank(MPI_COMM_WORLD,&myrank);
// MPI_Barrier(MPI_COMM_WORLD);
// dimensions
const int n_months = 12;
const int n_pfts = 17;
......@@ -73,10 +79,14 @@ int main(int argc, char ** argv)
double qflx_snwcp_ice = 0.;
double qflx_snow_grnd_patch = 0.;
double qflx_rain_grnd = 0.;
auto start = high_resolution_clock::now();
std::ofstream soln_file;
soln_file.open("test_CanopyHydrology_kern1_single.soln");
soln_file << "Timestep, forc_rain, h2ocan, qflx_prec_grnd, qflx_prec_intr" << std::endl;
auto start = high_resolution_clock::now();
// mytime = MPI_Wtime();
for(size_t itime = 0; itime < n_times; itime += 1) {
// note this call puts all precip as rain for testing
double total_precip = forc_rain[itime][0] + forc_snow[itime][0];
......@@ -90,9 +100,22 @@ int main(int argc, char ** argv)
soln_file << std::setprecision(16) << itime+1 << "\t" << total_precip << "\t" << h2ocan<< "\t" << qflx_prec_grnd << "\t" << qflx_prec_intr << std::endl;
}
// mytime = MPI_Wtime() - mytime;
auto stop = high_resolution_clock::now();
// std::cout <<"Timing from node "<< myrank << " is "<< mytime << "seconds." << std::endl;
// /*compute max, min, and average timing statistics*/
// MPI_Reduce(&mytime, &maxtime, 1, MPI_DOUBLE,MPI_MAX, 0, MPI_COMM_WORLD);
// MPI_Reduce(&mytime, &mintime, 1, MPI_DOUBLE, MPI_MIN, 0,MPI_COMM_WORLD);
// MPI_Reduce(&mytime, &avgtime, 1, MPI_DOUBLE, MPI_SUM, 0,MPI_COMM_WORLD);
// if (myrank == 0) {
// avgtime /= numprocs;
// std::cout << "Min: "<< mintime << ", Max: " << maxtime << ", Avg: " <<avgtime << std::endl;
// }
auto duration = duration_cast<microseconds>(stop - start);
std::cout << "Time taken by function: "<< duration.count() << " microseconds" << std::endl;
return 0;
MPI_Finalize();
// MPI_Finalize();
}
......@@ -12,7 +12,7 @@
#include <algorithm>
#include <assert.h>
#include <fstream>
#include <mpi.h>
//#include <mpi.h>
#include <chrono>
#include "utils.hh"
#include "readers.hh"
......@@ -49,7 +49,13 @@ int main(int argc, char ** argv)
using ELM::Utils::n_pfts;
using ELM::Utils::n_grid_cells;
using ELM::Utils::n_max_times;
MPI_Init(NULL, NULL);
// int myrank, numprocs;
// double mytime, maxtime, mintime, avgtime;
// MPI_Init(&argc,&argv);
// MPI_Comm_size(MPI_COMM_WORLD,&numprocs);
// MPI_Comm_rank(MPI_COMM_WORLD,&myrank);
// MPI_Barrier(MPI_COMM_WORLD);
// fixed magic parameters for now
const int ctype = 1;
......@@ -150,6 +156,7 @@ int main(int argc, char ** argv)
<< "\t" << avg_frac_sfc << "\t" << *min_max_frac_sfc.first << "\t" << *min_max_frac_sfc.second << std::endl;
}
auto start = high_resolution_clock::now();
// mytime = MPI_Wtime();
// main loop
// -- the timestep loop cannot/should not be parallelized
for (size_t t = 0; t != n_times; ++t) {
......@@ -231,9 +238,20 @@ int main(int argc, char ** argv)
<< "\t" << sum_snow << "\t" << *min_max_snow.first << "\t" << *min_max_snow.second
<< "\t" << avg_frac_sfc << "\t" << *min_max_frac_sfc.first << "\t" << *min_max_frac_sfc.second << std::endl;
} // end timestep loop
// mytime = MPI_Wtime() - mytime;
auto stop = high_resolution_clock::now();
// std::cout <<"Timing from node "<< myrank << " is "<< mytime << "seconds." << std::endl;
// MPI_Reduce(&mytime, &maxtime, 1, MPI_DOUBLE,MPI_MAX, 0, MPI_COMM_WORLD);
// MPI_Reduce(&mytime, &mintime, 1, MPI_DOUBLE, MPI_MIN, 0,MPI_COMM_WORLD);
// MPI_Reduce(&mytime, &avgtime, 1, MPI_DOUBLE, MPI_SUM, 0,MPI_COMM_WORLD);
// if (myrank == 0) {
// avgtime /= numprocs;
// std::cout << "Min: "<< mintime << ", Max: " << maxtime << ", Avg: " <<avgtime << std::endl;
// }
auto duration = duration_cast<microseconds>(stop - start);
std::cout << "Time taken by function: "<< duration.count() << " microseconds" << std::endl;
return 0;
MPI_Finalize();
// MPI_Finalize();
}
......@@ -2,9 +2,9 @@ ELM_BASE = ../../src
KERNEL_FOLDER = cc
ELM_ROOT = $(ELM_BASE)/$(KERNEL_FOLDER)
FC = mpifort
CXX = mpicxx
CC = mpicc
# FC = mpifort
# CXX = mpicxx
# CC = mpicc
CXXFLAGS = -std=c++11 -g
......
......@@ -12,12 +12,13 @@
#include <fstream>
#include <algorithm>
#include <assert.h>
#include <mpi.h>
// #include <mpi.h>
#include <stdio.h>
#include <chrono>
#include "utils.hh"
#include "readers.hh"
#include "CanopyHydrology.hh"
#include "CanopyHydrology_kern1_multiple.decl.h"
using namespace std::chrono;
namespace ELM {
......@@ -43,7 +44,7 @@ int main(int argc, char ** argv)
using ELM::Utils::n_pfts;
using ELM::Utils::n_grid_cells;
using ELM::Utils::n_max_times;
MPI_Init(NULL, NULL);
// MPI_Init(NULL, NULL);
// fixed magic parameters for now
const int ctype = 1;
......@@ -139,5 +140,5 @@ int main(int argc, char ** argv)
auto duration = duration_cast<microseconds>(stop - start);
std::cout << "Time taken by function: "<< duration.count() << " microseconds" << std::endl;
return 0;
MPI_Finalize();
// MPI_Finalize();
}
mainmodule CanopyHydrology_kern1_multiple {
include "util.hh";
include "utils.hh";
include "readers.hh";
include "CanopyHydrology.hh";
mainchare main {
entry main(CkArgMsg *m);
......
......@@ -11,12 +11,13 @@
#include <iomanip>
#include <fstream>
#include <assert.h>
#include <mpi.h>
// #include <mpi.h>
#include <chrono>
#include <stdio.h>
#include "utils.hh"
#include "readers.hh"
#include "CanopyHydrology.hh"
#include "CanopyHydrology_kern1_single.decl.h"
using namespace std::chrono;
namespace ELM {
......@@ -35,7 +36,7 @@ using MatrixForc = MatrixStatic<n_max_times,1>;
int main(int argc, char ** argv)
{
MPI_Init(NULL, NULL);
// MPI_Init(NULL, NULL);
// dimensions
const int n_months = 12;
const int n_pfts = 17;
......@@ -94,5 +95,5 @@ int main(int argc, char ** argv)
auto duration = duration_cast<microseconds>(stop - start);
std::cout << "Time taken by function: "<< duration.count() << " microseconds" << std::endl;
return 0;
MPI_Finalize();
// MPI_Finalize();
}
mainmodule CanopyHydrology_kern1_single {
include "util.hh";
include "utils.hh";
include "readers.hh";
include "CanopyHydrology.hh";
mainchare main {
entry main(CkArgMsg *m);
......
......@@ -12,14 +12,14 @@
#include <algorithm>
#include <assert.h>
#include <fstream>
#include <mpi.h>
// #include <mpi.h>
#include <stdio.h>
#include <chrono>
#include "utils.hh"
#include "readers.hh"
#include "CanopyHydrology.hh"
#include "CanopyHydrology_SnowWater_impl.hh"
#include "CanopyHydrology_module.decl.h"
using namespace std::chrono;
......@@ -49,7 +49,7 @@ int main(int argc, char ** argv)
using ELM::Utils::n_pfts;
using ELM::Utils::n_grid_cells;
using ELM::Utils::n_max_times;
MPI_Init(NULL, NULL);
// MPI_Init(NULL, NULL);
// fixed magic parameters for now
const int ctype = 1;
......@@ -235,5 +235,5 @@ int main(int argc, char ** argv)
auto duration = duration_cast<microseconds>(stop - start);
std::cout << "Time taken by function: "<< duration.count() << " microseconds" << std::endl;
return 0;
MPI_Finalize();
// MPI_Finalize();
}
mainmodule CanopyHydrology_module {
include "util.hh";
include "utils.hh";
include "readers.hh";
include "CanopyHydrology.hh";
mainchare main {
entry main(CkArgMsg *m);
......
-include /home/7hp/Downloads/charm/common.mk
-include /home/7hp/Downloads/charm/examples/common.mk
CHARMC=/home/7hp/Downloads/charm/bin/charmc $(OPTS)
ELM_BASE = ../../src
KERNEL_FOLDER = cc
......@@ -7,8 +7,8 @@ ELM_ROOT = $(ELM_BASE)/$(KERNEL_FOLDER)
include $(ELM_BASE)/config/Makefile.config
TESTS = test_CanopyHydrology_kern1_single \
test_CanopyHydrology_kern1_multiple \
test_CanopyHydrology_module
test_CanopyHydrology_kern1_multiple \
test_CanopyHydrology_module
EXEC_TESTS = CanopyHydrology_kern1_single \
CanopyHydrology_kern1_multiple \
......@@ -34,12 +34,38 @@ CanopyHydrology_kern1_multiple: test_CanopyHydrology_kern1_multiple
CanopyHydrology_module: test_CanopyHydrology_module
./test_CanopyHydrology_module > test_CanopyHydrology_module.stdout
OBJ1 = CanopyHydrology_kern1_single.o
OBJ2 = CanopyHydrology_kern1_multiple.o
OBJ3 = CanopyHydrology_module.o
test_%: %.o
$(CHARMC) %.o -o $@ $< $(NETCDF_FLAGS) -language charm++
all: links library test_CanopyHydrology_kern1_single test_CanopyHydrology_kern1_multiple test_CanopyHydrology_module
%.o : %.C readers.hh utils.hh %.ci
$(CHARMC) -c $@ $< $(NETCDF_FLAGS)
test_CanopyHydrology_kern1_single: $(OBJ1)
$(CHARMC) $(NETCDF_FLAGS) -language charm++ -o test_CanopyHydrology_kern1_single $(OBJ1)
CanopyHydrology_kern1_single.decl.h: CanopyHydrology_kern1_single.ci
$(CHARMC) CanopyHydrology_kern1_single.ci
CanopyHydrology_kern1_single.o: CanopyHydrology_kern1_single.C CanopyHydrology_kern1_single.decl.h readers.hh utils.hh
$(CHARMC) -c CanopyHydrology_kern1_single.C $@ $< $(NETCDF_FLAGS) -I$(ELM_ROOT) -lelm -L$(NETCDF_ROOT) -lnetcdf -L$(STD_LIB_ROOT)/lib -lstdc++ -L$(FC_LIB_ROOT) -lgfortran
test_CanopyHydrology_kern1_multiple: $(OBJ2)
$(CHARMC) $(NETCDF_FLAGS) -language charm++ -o test_CanopyHydrology_kern1_multiple $(OBJ2)
CanopyHydrology_kern1_multiple.decl.h: CanopyHydrology_kern1_multiple.ci
$(CHARMC) CanopyHydrology_kern1_multiple.ci
CanopyHydrology_kern1_multiple.o: CanopyHydrology_kern1_multiple.C CanopyHydrology_kern1_multiple.decl.h readers.hh utils.hh
$(CHARMC) -c CanopyHydrology_kern1_multiple.C $@ $< $(NETCDF_FLAGS) -I$(ELM_ROOT) -lelm -L$(NETCDF_ROOT) -lnetcdf -L$(STD_LIB_ROOT)/lib -lstdc++ -L$(FC_LIB_ROOT) -lgfortran
test_CanopyHydrology_module: $(OBJ3)
$(CHARMC) $(NETCDF_FLAGS) -language charm++ -o test_CanopyHydrology_module $(OBJ3)
CanopyHydrology_module.decl.h: CanopyHydrology_module.ci
$(CHARMC) CanopyHydrology_module.ci
CanopyHydrology_module.o: CanopyHydrology_module.C CanopyHydrology_module.decl.h readers.hh utils.hh
$(CHARMC) -c CanopyHydrology_module.C $@ $< $(NETCDF_FLAGS) -I$(ELM_ROOT) -lelm -L$(NETCDF_ROOT) -lnetcdf -L$(STD_LIB_ROOT)/lib -lstdc++ -L$(FC_LIB_ROOT) -lgfortran
clean:
......
......@@ -13,6 +13,8 @@
#include <fstream>
#include <time.h>
#include <cuda.h>
#include <thrust/host_vector.h>
#include <thrust/device_vector.h>
#include "utils.hh"
#include "readers.hh"
......@@ -202,7 +204,7 @@ int main(int argc, char ** argv)
//
// local outputs
int newnode;
ELM::CanopyHydrology_SnowWater(dtime, qflx_floodg,
ELM::CanopyHydrology_SnowWater<<<1, 256>>>(dtime, qflx_floodg,
ltype, ctype, urbpoi, do_capsnow, oldfflag,
forc_air_temp(t,g), t_grnd(g),
qflx_snow_grnd_col[g], qflx_snow_melt, n_melt, frac_h2osfc[g],
......
OBJECT = ../../src/
KERNEL_LANG = cc
SRCDIR = $(OBJECT)$(KERNEL_LANG)
CUDA_FLAGS += -DNATURE=__global__ -DNATURE1=__host__
CUDA_FLAGS += -DNATURE=__global__
NVCC = nvcc
include $(OBJECT)config/Makefile.config
......
......@@ -58,7 +58,6 @@ class MatrixStatic {
private:
std::array<std::array<T,COL>,ROW> d_;
};
enum struct Ordering { C, FORTRAN };
template <typename T=double, Ordering O=Ordering::C>
......
......@@ -11,6 +11,7 @@
#include <numeric>
#include <fstream>
#include <algorithm>
#include <mpi.h>
#include <chrono>
#include <Kokkos_Core.hpp>
#include "utils.hh"
......@@ -58,6 +59,14 @@ int main(int argc, char ** argv)
const double dewmx = 0.1;
double dtime = 1800.0;
int myrank, numprocs;
double mytime;
MPI_Init(&argc,&argv);
MPI_Comm_size(MPI_COMM_WORLD,&numprocs);
MPI_Comm_rank(MPI_COMM_WORLD,&myrank);
MPI_Barrier(MPI_COMM_WORLD);
Kokkos::initialize( argc, argv );
{
......@@ -170,6 +179,7 @@ int main(int argc, char ** argv)
Kokkos::Timer timer;
auto start = high_resolution_clock::now();
mytime = MPI_Wtime();
// main loop
// -- the timestep loop cannot/should not be parallelized
for (size_t t = 0; t != n_times; ++t) {
......@@ -230,10 +240,13 @@ int main(int argc, char ** argv)
printf( " n_pfts( %d ) n_grid_cells( %d ) n_times ( %d ) problem( %g MB ) time( %g s ) bandwidth( %g GB/s )\n",
n_pfts, n_grid_cells, n_times, Gbytes * 1000, time, Gbytes * n_times / time );
mytime = MPI_Wtime() - mytime;
auto stop = high_resolution_clock::now();
std::cout <<"Timing from node "<< myrank << " is "<< mytime << "seconds." << std::endl;
auto duration = duration_cast<microseconds>(stop - start);
std::cout << "Time taken by function: "<< duration.count() << " microseconds" << std::endl;
}
Kokkos::finalize();
return 0;
MPI_Finalize();
}
......@@ -11,6 +11,7 @@
#include <iomanip>
#include <numeric>
#include <fstream>
#include <mpi.h>
#include <chrono>
#include <algorithm>
#include <Kokkos_Core.hpp>
......@@ -53,6 +54,14 @@ int main(int argc, char ** argv)
const double dewmx = 0.1;
const double dtime = 1800.0;
int myrank, numprocs;
double mytime;
MPI_Init(&argc,&argv);
MPI_Comm_size(MPI_COMM_WORLD,&numprocs);
MPI_Comm_rank(MPI_COMM_WORLD,&myrank);
MPI_Barrier(MPI_COMM_WORLD);
Kokkos::initialize( argc, argv );
{
......@@ -104,6 +113,7 @@ int main(int argc, char ** argv)
soln_file << "Timestep, forc_rain, h2ocan, qflx_prec_grnd, qflx_prec_intr, total_precip_loop" << std::endl;
auto start = high_resolution_clock::now();
mytime = MPI_Wtime();
for(size_t itime = 0; itime < n_times; itime += 1) { //Kokkos::parallel_for(n_times, KOKKOS_LAMBDA (const int itime) {
// note this call puts all precip as rain for testing
......@@ -121,11 +131,14 @@ int main(int argc, char ** argv)
std::cout << std::setprecision(16) << itime+1 << "\t" << total_precip << "\t" << h2ocan<< "\t" << qflx_prec_grnd << "\t" << qflx_prec_intr << std::endl;
}soln_file.close();
mytime = MPI_Wtime() - mytime;
auto stop = high_resolution_clock::now();
std::cout <<"Timing from node "<< myrank << " is "<< mytime << "seconds." << std::endl;
auto duration = duration_cast<microseconds>(stop - start);
std::cout << "Time taken by function: "<< duration.count() << " microseconds" << std::endl;
}
Kokkos::finalize();
return 0;
MPI_Finalize();
}
......@@ -10,6 +10,7 @@
#include <iomanip>
#include <numeric>
#include <fstream>
#include <mpi.h>
#include <chrono>
#include <Kokkos_Core.hpp>
#include "utils.hh"
......@@ -67,6 +68,14 @@ int main(int argc, char ** argv)
const double micro_sigma = 0.1;
const double min_h2osfc = 1.0e-8;
const double n_melt = 0.7;
int myrank, numprocs;
double mytime;
MPI_Init(&argc,&argv);
MPI_Comm_size(MPI_COMM_WORLD,&numprocs);
MPI_Comm_rank(MPI_COMM_WORLD,&myrank);
MPI_Barrier(MPI_COMM_WORLD);
Kokkos::initialize( argc, argv );
{
......@@ -275,6 +284,7 @@ int main(int argc, char ** argv)
Kokkos::Timer timer;
auto start = high_resolution_clock::now();
mytime = MPI_Wtime();
// main loop
// -- the timestep loop cannot/should not be parallelized
for (size_t t = 0; t != n_times; ++t) {
......@@ -380,10 +390,13 @@ int main(int argc, char ** argv)
printf( " n_pfts( %d ) n_grid_cells( %d ) n_times ( %d ) problem( %g MB ) time( %g s ) bandwidth( %g GB/s )\n",
n_pfts, n_grid_cells, n_times, Gbytes * 1000, time, Gbytes * n_times / time );
mytime = MPI_Wtime() - mytime;
auto stop = high_resolution_clock::now();
std::cout <<"Timing from node "<< myrank << " is "<< mytime << "seconds." << std::endl;
auto duration = duration_cast<microseconds>(stop - start);
std::cout << "Time taken by function: "<< duration.count() << " microseconds" << std::endl;
}
Kokkos::finalize();
return 0;
MPI_Finalize();
}
/* ---------------------------------------------
Makefile constructed configuration:
Tue Jul 9 15:36:27 EDT 2019
Fri Jul 12 21:01:22 EDT 2019
----------------------------------------------*/
#if !defined(KOKKOS_MACROS_HPP) || defined(KOKKOS_CORE_CONFIG_H)
#error "Do not include KokkosCore_config.h directly; include Kokkos_Macros.hpp instead."
......
/* ---------------------------------------------
Makefile constructed configuration:
Tue Jul 9 15:36:27 EDT 2019
Tue Jul 16 12:52:31 EDT 2019
----------------------------------------------*/
#if !defined(KOKKOS_MACROS_HPP) || defined(KOKKOS_CORE_CONFIG_H)
#error "Do not include KokkosCore_config.h directly; include Kokkos_Macros.hpp instead."
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment