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

Make fixes and kern1_multiple works for both Kokkos and Legion

parent 148c48d8
......@@ -5,7 +5,7 @@ OBJECT = .
default: all
all: cc_fortran_wrappers fortran cc_implementation
all: cc_fortran_wrappers fortran cc_serial cc_kokkos
cc_fortran_wrappers: fortran
$(MAKE) -C cc_fortran_wrappers all
......
......@@ -25,7 +25,7 @@ def run_comparison(testname, full_message=False):
gold = np.loadtxt(fname_gold, skiprows=1)
except IOError:
print 'ERROR: cannot find gold file "%s", bad testname?'%fname_gold
return 'G'
return 'G '
# get my file
fname_mine = '%s.soln'%testname
......@@ -37,7 +37,7 @@ def run_comparison(testname, full_message=False):
mine = np.loadtxt(fname_mine, skiprows=1)
except IOError:
print 'ERROR: cannot find my file "%s", failed test run?'%fname_mine
return 'D'
return 'D '
# compare
try:
......@@ -46,12 +46,12 @@ def run_comparison(testname, full_message=False):
if full_message:
print ''
print 'Test: "%s" FAILED with error: "%r"'%(testname, err)
return 'E'
return 'E '
if close:
return 'PASS'
return 'PASS '
else:
return 'FAIL'
return 'FAIL '
if __name__ == "__main__":
......@@ -69,5 +69,5 @@ if __name__ == "__main__":
results.append(run_comparison(test, args.verbose))
except Exception as err:
print err
results.append('N/A')
results.append('N/A ')
print ''.join(results)
OBJECT = ../../src/
KERNEL_FOLDER = cc_implementation
KERNEL_FOLDER = cc_serial
SRCDIR = $(OBJECT)$(KERNEL_FOLDER)
include $(OBJECT)config/Makefile.config
......@@ -26,13 +26,13 @@ test: $(EXEC_TESTS)
CanopyHydrology_kern1_single: test_CanopyHydrology_kern1_single
./test_CanopyHydrology_kern1_single &> test_CanopyHydrology_kern1_single.stdout
./test_CanopyHydrology_kern1_single > test_CanopyHydrology_kern1_single.stdout
CanopyHydrology_kern1_multiple: test_CanopyHydrology_kern1_multiple
./test_CanopyHydrology_kern1_multiple &> test_CanopyHydrology_kern1_multiple.stdout
./test_CanopyHydrology_kern1_multiple > test_CanopyHydrology_kern1_multiple.stdout
CanopyHydrology_module: test_CanopyHydrology_module
./test_CanopyHydrology_module &> test_CanopyHydrology_module.stdout
./test_CanopyHydrology_module > test_CanopyHydrology_module.stdout
test_%: %.cpp.o readers.hh utils.hh library
......
......@@ -28,13 +28,13 @@ test: $(EXEC_TESTS)
python ../compare_to_gold.py $(TESTS)
CanopyHydrology_kern1_single: test_CanopyHydrology_kern1_single
./test_CanopyHydrology_kern1_single &> test_CanopyHydrology_kern1_single.stdout
./test_CanopyHydrology_kern1_single > test_CanopyHydrology_kern1_single.stdout
CanopyHydrology_kern1_multiple: test_CanopyHydrology_kern1_multiple
./test_CanopyHydrology_kern1_multiple &> test_CanopyHydrology_kern1_multiple.stdout
./test_CanopyHydrology_kern1_multiple > test_CanopyHydrology_kern1_multiple.stdout
CanopyHydrology_module: test_CanopyHydrology_module
./test_CanopyHydrology_module &> test_CanopyHydrology_module.stdout
./test_CanopyHydrology_module > test_CanopyHydrology_module.stdout
test_%: %.cc.o readers.hh utils.hh library
......
......@@ -29,7 +29,7 @@ program CanopyHydrology_kern1_single
! This will be the netCDF ID for the file and data variable.
integer :: ncid, varid, dimid, status
status = nf90_open(SURFDAT_FILE_NAME, NF90_NOWRITE, ncid)
status = nf90_open(SURFDAT_FILE_NAME, NF90_NOwrite, ncid)
if( status .ne. 0) call err_handle( status )
......@@ -48,7 +48,7 @@ program CanopyHydrology_kern1_single
status = nf90_close(ncid)
status = nf90_open(FORCDAT_FILE_NAME, NF90_NOWRITE, ncid)
status = nf90_open(FORCDAT_FILE_NAME, NF90_NOwrite, ncid)
if( status .ne. 0) call err_handle( status )
status = nf90_inq_dimid(ncid, "time", dimid)
if( status .ne. 0) call err_handle( status )
......@@ -65,6 +65,8 @@ program CanopyHydrology_kern1_single
h2ocan = 0.0d0
print *, "Timestep, forc_rain, h2ocan, qflx_prec_grnd, qflx_prec_intr"
!open(1, file = 'test_CanopyHydrology_kern1_single.stdout', status = 'new')
!write(1,*)"Timestep, forc_rain, h2ocan, qflx_prec_grnd, qflx_prec_intr"
do itime=1,ntimes
......@@ -87,8 +89,11 @@ program CanopyHydrology_kern1_single
qflx_snwcp_liq, qflx_snwcp_ice, qflx_snow_grnd_patch, qflx_rain_grnd)
print *, itime, forc_rain, h2ocan, qflx_prec_grnd, qflx_prec_intr
!open(1,file='test_CanopyHydrology_kern1_single.stdout',action='write',position='append')
!write(1,*) itime, forc_rain, h2ocan, qflx_prec_grnd, qflx_prec_intr
end do
!close(1)
stop
contains
......@@ -97,6 +102,8 @@ program CanopyHydrology_kern1_single
use netcdf
integer :: status
print *, 'error ', status, nf90_strerror(status)
!open(1,file='test_CanopyHydrology_kern1_single.stdout',action='write',position='append')
!write(1,*) 'error ', status, nf90_strerror(status)
stop
end subroutine err_handle
......
......@@ -93,7 +93,12 @@ program test_CanopyHydrology_module
h2ocan_pft = 0.0d0
frac_h2osfc = 0.0d0
frac_h2osfc = 0.0d0
print*, "Time", "Total Canopy Water", "Min Water", "Max Water", "Total Snow", &
"Min Snow", "Max Snow", "Avg Frac Sfc", "Min Frac Sfc", "Max Frac Sfc"
print*, 0, sum(h2ocan_pft), minval(h2ocan_pft), maxval(h2ocan_pft), sum(h2osno_grc), &
minval(h2osno_grc), maxval(h2osno_grc), sum(h2osoi_liq), minval(h2osoi_liq), maxval(h2osoi_liq)
do itime=1,28*48 ! February is shortest month
do g=1,ngrcs ! grid cell loop
......@@ -159,6 +164,9 @@ program test_CanopyHydrology_module
dz_grc(g,:) = dz
end do !mesh loop
print*, itime, sum(h2ocan_pft), minval(h2ocan_pft), maxval(h2ocan_pft), &
sum(h2osno_grc), minval(h2osno_grc), maxval(h2osno_grc), &
sum(h2osoi_liq), minval(h2osoi_liq), maxval(h2osoi_liq)
end do ! time loop
......
......@@ -25,13 +25,13 @@ test: $(EXEC_TESTS)
CanopyHydrology_kern1_single: test_CanopyHydrology_kern1_single
./test_CanopyHydrology_kern1_single &> test_CanopyHydrology_kern1_single.stdout
./test_CanopyHydrology_kern1_single > test_CanopyHydrology_kern1_single.stdout
CanopyHydrology_kern1_multiple: test_CanopyHydrology_kern1_multiple
./test_CanopyHydrology_kern1_multiple &> test_CanopyHydrology_kern1_multiple.stdout
./test_CanopyHydrology_kern1_multiple > test_CanopyHydrology_kern1_multiple.stdout
CanopyHydrology_module: test_CanopyHydrology_module
./test_CanopyHydrology_module &> test_CanopyHydrology_module.stdout
./test_CanopyHydrology_module > test_CanopyHydrology_module.stdout
test_%: %.F90.o library
......
......@@ -5,6 +5,7 @@
#include <string>
#include <stdlib.h>
#include <cstring>
#include <cmath>
#include <vector>
#include <iostream>
#include <iomanip>
......@@ -100,7 +101,7 @@ KOKKOS_INLINE_FUNCTION void CanopyHydrology_Interception(double dtime,
h2ocan = std::max(0.0, h2ocan + dtime*qflx_prec_intr);
h2ocan = max(0.0, h2ocan + dtime*qflx_prec_intr);
qflx_candrip = 0.0;
......@@ -196,8 +197,8 @@ KOKKOS_INLINE_FUNCTION void CanopyHydrology_FracWet(const int& frac_veg_nosno,
if (h2ocan > 0.0) {
vegt = frac_veg_nosno*(elai + esai);
dewmxi = 1.00/dewmx;
fwet = std::pow(((dewmxi/vegt)*h2ocan), 2.0/3);
fwet = std::min(fwet,1.00);
fwet = pow(((dewmxi/vegt)*h2ocan), 2.0/3);
fwet = min(fwet,1.00);
fdry = (1.0-fwet)*elai/(elai+esai);
}
else{
......@@ -298,9 +299,9 @@ KOKKOS_INLINE_FUNCTION void CanopyHydrology_SnowWater(const double& dtime,
} else {
if (forc_air_temp > tfrz + 2.) {
bifall=50. + 1.7*std::pow((17.0),1.5);
bifall=50. + 1.7*pow((17.0),1.5);
} else if (forc_air_temp > tfrz - 15.) {
bifall=50. + 1.7*std::pow((forc_air_temp - tfrz + 15.),1.5);
bifall=50. + 1.7*pow((forc_air_temp - tfrz + 15.),1.5);
} else {
bifall=50.;
}
......@@ -309,7 +310,7 @@ KOKKOS_INLINE_FUNCTION void CanopyHydrology_SnowWater(const double& dtime,
newsnow = (1. - frac_h2osfc) * qflx_snow_grnd_col * dtime;
// update integrated_snow
integrated_snow = std::max(integrated_snow,h2osno) ; //h2osno could be larger due to frost
integrated_snow = max(integrated_snow,h2osno) ; //h2osno could be larger due to frost
// snowmelt from previous time step * dtime
snowmelt = qflx_snow_melt * dtime;
......@@ -324,9 +325,9 @@ KOKKOS_INLINE_FUNCTION void CanopyHydrology_SnowWater(const double& dtime,
// first compute change from melt during previous time step
if(snowmelt > 0.) {
smr=std::min(1.,(h2osno)/(integrated_snow));
smr=min(1.,(h2osno)/(integrated_snow));
frac_sno = 1. - std::pow((acos(fmin(1.,(2.*smr - 1.)))/rpi),(n_melt)) ;
frac_sno = 1. - pow((acos(fmin(1.,(2.*smr - 1.)))/rpi),(n_melt)) ;
}
......@@ -336,8 +337,8 @@ KOKKOS_INLINE_FUNCTION void CanopyHydrology_SnowWater(const double& dtime,
frac_sno = fsno_new;
// reset integrated_snow after accumulation events
temp_intsnow= (h2osno + newsnow) / (0.5*(cos(rpi*std::pow((1.0-std::max(frac_sno,1e-6)),(1.0/n_melt))+1.0))) ;
integrated_snow = std::min(1.e8,temp_intsnow) ;
temp_intsnow= (h2osno + newsnow) / (0.5*(cos(rpi*pow((1.0-max(frac_sno,1e-6)),(1.0/n_melt))+1.0))) ;
integrated_snow = min(1.e8,temp_intsnow) ;
}
//====================================================================
......@@ -358,10 +359,10 @@ KOKKOS_INLINE_FUNCTION void CanopyHydrology_SnowWater(const double& dtime,
if (oldfflag == 1) {
// snow cover fraction in Niu et al. 2007
if(snow_depth > 0.0) {
frac_sno = tanh(snow_depth/(2.5*zlnd*std::pow((std::min(800.0,(h2osno+ newsnow)/snow_depth)/100.0),1.0)) ) ;
frac_sno = tanh(snow_depth/(2.5*zlnd*pow((min(800.0,(h2osno+ newsnow)/snow_depth)/100.0),1.0)) ) ;
}
if(h2osno < 1.0) {
frac_sno=std::min(frac_sno,h2osno);
frac_sno=min(frac_sno,h2osno);
}
}
......@@ -374,8 +375,8 @@ KOKKOS_INLINE_FUNCTION void CanopyHydrology_SnowWater(const double& dtime,
// make integrated_snow consistent w/ new fsno, h2osno
integrated_snow = 0. ;//reset prior to adding newsnow below
temp_intsnow= (h2osno + newsnow) / (0.5*(cos(rpi*std::pow((1.0-std::max(frac_sno,1e-6)),(1.0/n_melt)))+1.0));
integrated_snow = std::min(1.e8,temp_intsnow);
temp_intsnow= (h2osno + newsnow) / (0.5*(cos(rpi*pow((1.0-max(frac_sno,1e-6)),(1.0/n_melt)))+1.0));
integrated_snow = min(1.e8,temp_intsnow);
// update snow_depth and h2osno to be consistent with frac_sno, z_avg
if (subgridflag ==1 && !urbpoi) {
......@@ -387,7 +388,7 @@ KOKKOS_INLINE_FUNCTION void CanopyHydrology_SnowWater(const double& dtime,
if (oldfflag == 1) {
// snow cover fraction in Niu et al. 2007
if(snow_depth > 0.0) {
frac_sno = tanh(snow_depth/(2.5*zlnd*std::pow((std::min(800.0,newsnow/snow_depth)/100.0),1.0)) );
frac_sno = tanh(snow_depth/(2.5*zlnd*pow((min(800.0,newsnow/snow_depth)/100.0),1.0)) );
}
}
} else {
......@@ -488,7 +489,7 @@ KOKKOS_INLINE_FUNCTION void CanopyHydrology_FracH2OSfc(const double& dtime,
sigma=1.0e3 * micro_sigma ;
for(int l = 0 ; l < 10; l++) {
fd = 0.5*d*(1.00+erf(d/(sigma*sqrt(2.0)))) + sigma/sqrt(2.0*shr_const_pi)*std::exp(-std::pow(d,2)/(2.0*std::pow(sigma,2))) -h2osfc;
fd = 0.5*d*(1.00+erf(d/(sigma*sqrt(2.0)))) + sigma/sqrt(2.0*shr_const_pi)*exp(-pow(d,2)/(2.0*pow(sigma,2))) -h2osfc;
dfdd = 0.5*(1.00+erf(d/(sigma*sqrt(2.0))));
d = d - fd/dfdd;
......@@ -509,7 +510,7 @@ KOKKOS_INLINE_FUNCTION void CanopyHydrology_FracH2OSfc(const double& dtime,
if (frac_sno > (1.0 - frac_h2osfc) && h2osno > 0) {
if (frac_h2osfc > 0.010) {
frac_h2osfc = std::max(1.00 - frac_sno,0.010) ;
frac_h2osfc = max(1.00 - frac_sno,0.010) ;
frac_sno = 1.00 - frac_h2osfc; }
else {
frac_sno = 1.00 - frac_h2osfc;
......@@ -701,7 +702,7 @@ int main(int argc, char ** argv)
// std::cout << "Time\t Total Canopy Water\t Min Water\t Max Water" << std::endl;
// auto min_max = std::minmax_element(&h_h2ocan(0,0), end1+1);
// std::cout << std::setprecision(16)
// std::cout << std::minmax_element(16)
// << 0 << "\t" << std::accumulate(&h_h2ocan(0,0), end1+1, 0.)
// << "\t" << *min_max.first
// << "\t" << *min_max.second << std::endl;
......@@ -772,13 +773,13 @@ int main(int argc, char ** argv)
// PFT level operations
//for (size_t p = 0; p != n_pfts; ++p) {
Kokkos::parallel_for("n_grid_cells", n_grid_cells, KOKKOS_LAMBDA (const size_t& g) {
Kokkos::parallel_for("n_grid_cells", n_grid_cells, KOKKOS_LAMBDA (const size_t& g) {
for (size_t p = 0; p != n_pfts; ++p) {
//
// Calculate interception
//
// NOTE: this currently punts on what to do with the qflx variables!
// Surely they should be either accumulated or stored on PFTs as well.
// Surely they should be either std::accumulated or stored on PFTs as well.
// --etc
ELM::CanopyHydrology_Interception(dtime,
forc_rain(t,g), forc_snow(t,g), forc_irrig(t,g),
......@@ -835,7 +836,7 @@ int main(int argc, char ** argv)
// auto min_max = std::minmax_element(&h_h2ocan(0,0), end1+1);
// std::cout << std::setprecision(16)
// std::cout << std::minmax_element(16)
// << t+1 << "\t" << std::accumulate(&h_h2ocan(0,0), end1+1, 0.)
// << "\t" << *min_max.first
// << "\t" << *min_max.second << std::endl;
......
......@@ -9,6 +9,7 @@
#include <iostream>
#include <iomanip>
#include <numeric>
#include <fstream>
#include <algorithm>
#include <Kokkos_Core.hpp>
#include "utils.hh"
......@@ -145,12 +146,14 @@ int main(int argc, char ** argv)
double* end = &h_h2o_can(n_grid_cells-1, n_pfts-1) ;
std::cout << "Time\t Total Canopy Water\t Min Water\t Max Water" << std::endl;
std::ofstream soln_file;
soln_file.open("test_CanopyHydrology_kern1_multiple.soln");
soln_file << "Time\t Total Canopy Water\t Min Water\t Max Water" << std::endl;
auto min_max = std::minmax_element(&h_h2o_can(0,0), end+1);//h2o_can1.begin(), h2o_can1.end());
std::cout << std::setprecision(16)
<< 0 << "\t" << std::accumulate(&h_h2o_can(0,0), end+1, 0.) //h2o_can1.begin(), h2o_can1.end(), 0.)
<< "\t" << *min_max.first
<< "\t" << *min_max.second << std::endl;
soln_file << std::setprecision(16)
<< 0 << "\t" << std::accumulate(&h_h2o_can(0,0), end+1, 0.) //h2o_can1.begin(), h2o_can1.end(), 0.)
<< "\t" << *min_max.first
<< "\t" << *min_max.second << std::endl;
......@@ -192,12 +195,12 @@ int main(int argc, char ** argv)
});
auto min_max = std::minmax_element(&h_h2o_can(0,0), end+1);//h2o_can1.begin(), h2o_can1.end());
std::cout << std::setprecision(16)
soln_file << std::setprecision(16)
<< t+1 << "\t" << std::accumulate(&h_h2o_can(0,0), end+1, 0.)//h2o_can1.begin(), h2o_can1.end(), 0.)
<< "\t" << *min_max.first
<< "\t" << *min_max.second << std::endl;
}
} soln_file.close();
}
Kokkos::finalize();
return 0;
......
......@@ -9,6 +9,7 @@
#include <iostream>
#include <iomanip>
#include <numeric>
#include <fstream>
#include <Kokkos_Core.hpp>
#include "utils.hh"
#include "readers.hh"
......@@ -245,7 +246,9 @@ int main(int argc, char ** argv)
double* end1 = &h_h2ocan(n_grid_cells-1, n_pfts-1) ;
double* end2 = &h_h2osno(n_grid_cells-1) ;
double* end3 = &h_frac_h2osfc(n_grid_cells-1) ;
std::cout << "Time\t Total Canopy Water\t Min Water\t Max Water\t Total Snow\t Min Snow\t Max Snow\t Avg Frac Sfc\t Min Frac Sfc\t Max Frac Sfc" << std::endl;
std::ofstream soln_file;
soln_file.open("test_CanopyHydrology_module.soln");
soln_file << "Time\t Total Canopy Water\t Min Water\t Max Water\t Total Snow\t Min Snow\t Max Snow\t Avg Frac Sfc\t Min Frac Sfc\t Max Frac Sfc" << std::endl;
auto min_max_water = std::minmax_element(&h_h2ocan(0,0), end1+1);
auto sum_water = std::accumulate(&h_h2ocan(0,0), end1+1, 0.);
......@@ -255,7 +258,7 @@ int main(int argc, char ** argv)
auto min_max_frac_sfc = std::minmax_element(&h_frac_h2osfc(0), end3+1);
auto avg_frac_sfc = std::accumulate(&h_frac_h2osfc(0), end3+1, 0.) / (end3+1 - &h_frac_h2osfc(0));
std::cout << std::setprecision(16)
soln_file << std::setprecision(16)
<< 0 << "\t" << sum_water << "\t" << *min_max_water.first << "\t" << *min_max_water.second
<< "\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;
......@@ -346,12 +349,13 @@ int main(int argc, char ** argv)
auto min_max_frac_sfc = std::minmax_element(&h_frac_h2osfc(0), end3+1);
auto avg_frac_sfc = std::accumulate(&h_frac_h2osfc(0), end3+1, 0.) / (end3+1 - &h_frac_h2osfc(0));
std::cout << std::setprecision(16)
soln_file << std::setprecision(16)
<< 0 << "\t" << sum_water << "\t" << *min_max_water.first << "\t" << *min_max_water.second
<< "\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
soln_file.close();
}
Kokkos::finalize();
return 0;
......
KOKKOS_PATH = ${HOME}/Downloads/kokkos
KOKKOS_DEVICES = "Serial"
EXE_NAME = "CanopyHydrology_module"
OBJECT = ../../../src/
EXE_NAME1 = "test_CanopyHydrology_kern1_multiple"
EXE_NAME1 = "test_CanopyHydrology_module"
OBJECT = ../../../src/
KERNEL_LANG = cc_serial
SRCDIR = $(OBJECT)$(KERNEL_LANG)
include $(OBJECT)config/Makefile.config
SRC = CanopyHydrology_module.cpp
SRC1 = CanopyHydrology_kern1_multiple.cpp
SRC2 = CanopyHydrology_module.cpp
default: build
default: build1 build2
echo "Start Build"
ifneq (,$(findstring Cuda,$(KOKKOS_DEVICES)))
CXX = ${KOKKOS_PATH}/bin/nvcc_wrapper
EXE = ${EXE_NAME}.cuda
KOKKOS_ARCH = "HSW,Pascal60"
KOKKOS_CUDA_OPTIONS = "enable_lambda,force_uvm"
#EXE = ${EXE_NAME}.cuda
KOKKOS_ARCH = "BSW,Pascal60"
KOKKOS_CUDA_OPTIONS = "enable_lambda"
else
CXX = g++
EXE = ${EXE_NAME}.host
KOKKOS_ARCH = "HSW"
#EXE = ${EXE_NAME}.host
KOKKOS_ARCH = "BSW"
endif
CXXFLAGS = -g -O0
LINK = ${CXX}
LINKFLAGS = -lnetcdf #-I../test_c_test
LINKFLAGS = -lnetcdf
EXTRA_PATH = -I/usr/local/include
DEPFLAGS = -M
OBJ = $(SRC:.cpp=.o)
LIB =
OBJ1 = $(SRC1:.cpp=.o)
OBJ2 = $(SRC2:.cpp=.o)
LIB = -I$(NETCDF_ROOT)/include -I$(SRCDIR)
include $(KOKKOS_PATH)/Makefile.kokkos
build: $(EXE)
.PHONY: links library test
$(EXE): $(OBJ) $(KOKKOS_LINK_DEPENDS)
$(LINK) $(KOKKOS_LDFLAGS) ../../../src/cpp/CanopyHydrology_Interception.cpp.o ../../../src/cpp/CanopyHydrology_FracH2OSfc.cpp.o ../../../src/cpp/CanopyHydrology_FracWet.cpp.o $(OBJ) $(KOKKOS_LIBS) $(LIB) -o $(EXE) $(LINKFLAGS) $(EXTRA_PATH)
default: all
all: links library $(EXE_NAME1) $(EXE_NAME2)
build1: $(SRC1)
python ../../compare_to_gold.py $(EXE_NAME1)
CanopyHydrology_kern1_multiple: test_CanopyHydrology_kern1_multiple
./test_CanopyHydrology_kern1_multiple.host > test_CanopyHydrology_kern1_multiple.stdout
build2: $(SRC2)
python ../../compare_to_gold.py $(EXE_NAME2)
CanopyHydrology_module: test_CanopyHydrology_module
./test_CanopyHydrology_module.host > test_CanopyHydrology_module.stdout
sandbox: test_sandbox_domain_template_magic
./test_sandbox_domain_template_magic
$(EXE_NAME1): $(OBJ1) $(KOKKOS_LINK_DEPENDS)
$(LINK) $(KOKKOS_LDFLAGS) $(CC_LD_FLAGS) $(OBJ1) $(KOKKOS_LIBS) $(LIB) -o $(EXE_NAME1) $(LINKFLAGS) $(EXTRA_PATH)
$(EXE_NAME2): $(OBJ2) $(KOKKOS_LINK_DEPENDS)
$(LINK) $(KOKKOS_LDFLAGS) $(CC_LD_FLAGS) $(OBJ2) $(KOKKOS_LIBS) $(LIB) -o $(EXE_NAME2) $(LINKFLAGS) $(EXTRA_PATH)
clean: kokkos-clean
rm -f *.o *.cuda *.host
rm -f *.o *.cuda *.host test_*
links:
@echo "making in links"
$(MAKE) -C ../../links links
library:
$(MAKE) -C $(OBJECT) cc_serial
# Compilation rules
%.o:%.cpp $(KOKKOS_CPP_DEPENDS)
$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -I../../../src/cpp $(EXTRA_PATH) $(EXTRA_INC) -c $<
$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -I$(SRCDIR) $(EXTRA_PATH) $(EXTRA_INC) -c $<
test: $(EXE)
./$(EXE)
\ No newline at end of file
test: $(EXE_NAME1)
./$(EXE_NAME1)
Time Total Canopy Water Min Water Max Water
0 0 0 0
1 0.9997061247253229 0 0.04716025848905549
2 1.672664826906192 0 0.04716025848905549
3 2.349989170210754 0 0.07187094450572751
4 3.03167963808505 0 0.1011643080690718
5 9.320393791376778 0 0.5736619949340821
6 9.99847398546363 0 0.5736619949340821
7 10.68614029259742 0 0.5736619949340821
8 11.83455541124168 0 0.5736619949340821
9 12.51873152101814 0 0.5736619949340821
10 13.11622607240078 0 0.5736619949340821
11 18.53790975505713 0 0.5736619949340821
12 19.89070951069763 0 0.5736619949340821
13 20.27481097543547 0 0.5736619949340821
14 20.58437286116881 0 0.5736619949340821
15 20.83319865108692 0 0.5736619949340821
16 21.08126298573354 0 0.5736619949340821
17 21.78193796257344 0 0.5736619949340821
18 22.90288773753995 0 0.5736619949340821
19 23.48672788021486 0 0.5736619949340821
20 23.58448094826243 0 0.5736619949340821
21 24.51896205971027 0 0.5817917405785331
22 24.61702480684947 0 0.611531806878203
23 24.71198368198574 0 0.6381680011749268
24 24.78030636282527 0 0.6381680011749268
25 24.84851628361815 0 0.6381680011749268
26 25.3695990808192 0 0.6381680011749268
27 25.43811698869408 0 0.6381680011749268
28 25.50705564369764 0 0.6381680011749268
29 25.57476235037315 0 0.6381680011749268
30 25.6412371087206 0 0.6381680011749268
31 25.70622829913847 0 0.6381680011749268
32 27.05641451631916 0 0.6381680011749268
33 27.11961367049564 0 0.6381680011749268
34 27.1825048375901 0 0.6381680011749268
35 32.12426584915531 0 0.6381680011749268
36 32.18407714542965 0 0.6381680011749268
37 32.24296448045791 0 0.6381680011749268
38 32.30092785424015 0 0.6381680011749268
39 32.35894764567421 0 0.6381680011749268
40 32.41702382967443 0 0.6381680011749268
41 32.47411965986245 0 0.6381680011749268
42 32.79475019845223 0 0.6381680011749268
43 32.85092177865632 0 0.6381680011749268
44 33.35917411816384 0 0.6381680011749268
45 33.41442096444893 0 0.6381680011749268
46 33.469667810734 0 0.6381680011749268
47 33.52400976025806 0 0.6381680011749268
48 33.57744676589348 0 0.6381680011749268
49 33.6341394878973 0 0.6381680011749268
50 37.68337143825821 0 0.6381680011749268
51 39.01214475790402 0 0.6381680011749268
52 39.07339718128668 0 0.6381680011749268
53 39.13399768961189 0 0.6381680011749268
54 39.19394628287967 0 0.6381680011749268
55 39.25282475945766 0 0.6381680011749268
56 39.31063337187481 0 0.6381680011749268
57 39.37129510690492 0 0.6381680011749268
58 39.43480940898423 0 0.6381680011749268
59 39.49981175196879 0 0.6381680011749268
60 39.56630160518284 0 0.6381680011749268
61 39.63415702027455 0 0.6381680011749268
62 39.70337746656814 0 0.6381680011749268
63 39.77265916518445 0 0.6381680011749268
64 39.84200209050564 0 0.6381680011749268
65 39.91057064735966 0 0.6381680011749268
66 39.97836430507073 0 0.6381680011749268
67 40.04722818048316 0 0.6381680011749268
68 40.11716176853903 0 0.6381680011749268
69 40.1874519274761 0 0.6381680011749268
70 40.2580986572943 0 0.6381680011749268