Commit 1cb78687 authored by Ethan Coon's avatar Ethan Coon
Browse files

fixes bugs in consistency of legion c example. needs cleanup. running...

fixes bugs in consistency of legion c example.  needs cleanup.  running CanopyHydrology_module in legion with c kernels
parent d49c8e5f
#include <algorithm>
#include <stdio.h>
#include <math.h>
#include <cmath>
#include <iostream>
#include <string>
#include "landunit_varcon.h"
......@@ -23,7 +23,7 @@ void CanopyHydrology_FracH2OSfc(const double& dtime,
double& frac_h2osfc)
{
bool no_update = false;
double shr_const_pi=4.0e0*atan(1.0e0) ;
double shr_const_pi=4.0e0*std::atan(1.0e0) ;
bool no_update_l ;
......@@ -45,13 +45,13 @@ 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;
dfdd = 0.5*(1.00+erf(d/(sigma*sqrt(2.0))));
fd = 0.5*d*(1.00+std::erf(d/(sigma*std::sqrt(2.0)))) + sigma/std::sqrt(2.0*shr_const_pi)*std::exp(-std::pow(d,2)/(2.0*std::pow(sigma,2))) -h2osfc;
dfdd = 0.5*(1.00+std::erf(d/(sigma*std::sqrt(2.0))));
d = d - fd/dfdd;
}
frac_h2osfc = 0.5*(1.00+erf(d/(sigma*sqrt(2.0)))) ; }
frac_h2osfc = 0.5*(1.00+std::erf(d/(sigma*std::sqrt(2.0)))) ; }
else {
frac_h2osfc = 0.0 ;
......@@ -86,4 +86,4 @@ void CanopyHydrology_FracH2OSfc(const double& dtime,
}
}
\ No newline at end of file
}
#include <stdio.h>
#include <math.h>
#include <cmath>
#include "landunit_varcon.h"
#include "column_varcon.h"
#include "clm_varpar.h"
......
......@@ -16,4 +16,3 @@ all: $(OBJS)
clean:
@$(ELM_CLEAN);
@cd $(ELM_UTILS_DIR); $(ELM_CLEAN)
......@@ -3,7 +3,7 @@ ELM_DATA_LOCATION = /home/7hp/Downloads/acme_inputdata
# assumes you have a working NETCDF. This can easily be the version built by
# ATS as a part of an ATS installation.
NETCDF_ROOT = /usr/local
NETCDF_ROOT = ${AMANZI_TPLS_DIR}
# assumes you have a working fortran and c++ compilers with libraries
FC = gfortran
......
......@@ -90,6 +90,7 @@ void top_level_task(const Task *task,
auto color_space = Rect<1>(Point<1>(0), Point<1>(n_parts-1));
std::vector<Future> futures;
std::cout << "LOG: running steps: " << n_times << std::endl;
for (int i=0; i!=n_times; ++i) {
// launch interception
CanopyHydrology_Interception().launch(ctx, runtime, color_space,
......@@ -110,6 +111,7 @@ void top_level_task(const Task *task,
<< "\t" << sum_min_max[1]
<< "\t" << sum_min_max[2] << std::endl;
}
soln_file.close();
}
......
......@@ -19,6 +19,7 @@ ALT_MAPPERS ?= 0 # Include alternative mappers (not recommended)
# You can modify these variables, some will be appended to by the runtime makefile
GEN_SRC ?= tasks.cc
INC_FLAGS ?= -I$(AMANZI_TPLS_DIR)/include -I../../src/cc -I../tests_c_legion
NVCC_FLAGS ?=
GASNET_FLAGS ?=
......@@ -34,6 +35,7 @@ EXEC_TESTS = CanopyHydrology_kern1_multiple \
#
# Load Legion logic, but not rules
#
......@@ -47,6 +49,8 @@ include $(LG_RT_DIR)/runtime.mk
.PHONY: links library test
default: all
echo "GEN OBJS = $(GEN_OBJS)"
all: links library $(TESTS)
......
//! A set of utilities for testing ELM kernels in C++
#ifndef ELM_KERNEL_TEST_NETCDF_HH_
#define ELM_KERNEL_TEST_NETCDF_HH_
#include <string>
#include <array>
#include <vector>
#include <sstream>
#include <iostream>
#include "netcdf.h"
#define NC_HANDLE_ERROR( status, what ) \
do { \
if ( status ) \
{ \
std::cout \
<< __FILE__ \
<< ':' \
<< __LINE__ \
<< ':' \
<< what \
<< " failed with rc = " \
<< status \
<< ':' \
<< nc_strerror( status ) \
<< '\n' ; \
abort() ; \
} \
} while ( 0 )
namespace ELM {
namespace Utils {
//
// Reads n_grid_cells worth of phenology data from NetCDF files, each with
// n_pft PFTs, into LAI and SAI matrices with a potential offset (in grid
// cells) given by offset.
// -----------------------------------------------------------------------------
template<typename Matrix_t>
void read_phenology(const std::string& fname,
size_t n_grid_cells, size_t n_pfts,
size_t offset,
Matrix_t& lai, Matrix_t& sai) {
int ncid = -1;
auto status = nc_open(fname.c_str(), NC_NOWRITE, &ncid);
NC_HANDLE_ERROR(status, std::string("nc_open")+" \""+fname+"\"");
auto start = std::array<size_t,4>{0,0,0,0};
auto count = std::array<size_t,4>{n_grid_cells, n_pfts, 1, 1};
// get id and read LAI
int varid = -1;
status = nc_inq_varid(ncid, "MONTHLY_LAI", &varid);
NC_HANDLE_ERROR(status, "nc_inq_varid for LAI");
std::vector<double> data(n_grid_cells * n_pfts);
status = nc_get_vara_double(ncid, varid, start.data(), count.data(), data.data());
NC_HANDLE_ERROR(status, "nc_get_vara_double monthly_lai");
// copy into array -- note this may thrash cache depending upon order of
// LAI. Good for C order, bad for Fortran
for (int i=offset; i!=offset+n_grid_cells; ++i) {
for (int j=0; j!=n_pfts; ++j) {
lai[i][j] = data[(i-offset)*n_pfts + j];
}
}
// get id and read SAI directly into the array
status = nc_inq_varid(ncid, "MONTHLY_SAI", &varid);
NC_HANDLE_ERROR( status, "nc_inq_varid for SAI" ) ;
status = nc_get_vara_double(ncid, varid, start.data(), count.data(), data.data());
NC_HANDLE_ERROR(status, "nc_get_vara_double monthly_sai");
// copy into array -- note this may thrash cache depending upon order of
// LAI. Good for C order, bad for Fortran
for (int i=offset; i!=offset+n_grid_cells; ++i) {
for (int j=0; j!=n_pfts; ++j) {
sai[i][j] = data[(i-offset)*n_pfts + j];
}
}
status = nc_close(ncid);
NC_HANDLE_ERROR( status, "nc_close" ) ;
}
//
// Reads NetCDF met forcing data, returning the min number of times read.
// -----------------------------------------------------------------------------
template<typename Matrix_t>
int read_forcing(const std::string& fname,
size_t n_times, size_t start_grid_cell, size_t n_grid_cells,
Matrix_t& rain, Matrix_t& snow, Matrix_t& temp) {
size_t min_ntimes = n_times;
for (size_t lcv_gc=0; lcv_gc!=n_grid_cells; ++lcv_gc) {
std::stringstream fname_full;
fname_full << fname << lcv_gc+1+start_grid_cell << ".nc";
int ncid = -1;
auto status = nc_open(fname_full.str().c_str(), NC_NOWRITE, &ncid);
NC_HANDLE_ERROR(status, std::string("nc_open")+" \""+fname_full.str()+"\"");
int dimid = -1;
status = nc_inq_dimid(ncid, "time", &dimid);
NC_HANDLE_ERROR(status, "nc_inq_dimid");
size_t ntimes_l;
status = nc_inq_dimlen(ncid, dimid, &ntimes_l);
NC_HANDLE_ERROR(status, "nc_inq_dimlen");
// note the number of local times may be less than the max number of times
//assert(ntimes_l <= n_times);
min_ntimes = std::min(ntimes_l, min_ntimes);
auto start = std::array<size_t,3>{0,0,0};
auto count = std::array<size_t,3>{ntimes_l, 1, 1};
std::vector<double> data_precip(ntimes_l);
std::vector<double> data_temp(ntimes_l);
int varid = -1;
status = nc_inq_varid(ncid,"PRECTmms", &varid);
NC_HANDLE_ERROR(status, "nc_inq_varid");
status = nc_get_vara_double(ncid, varid, start.data(), count.data(), data_precip.data());
NC_HANDLE_ERROR( status, "nc_get_vara_double total_precip" );
status = nc_inq_varid(ncid,"TBOT", &varid);
NC_HANDLE_ERROR(status, "nc_inq_varid");
status = nc_get_vara_double(ncid, varid, start.data(), count.data(), data_temp.data());
NC_HANDLE_ERROR( status, "nc_get_vara_double temperature" );
status = nc_close(ncid);
NC_HANDLE_ERROR( status, "nc_close" ) ;
// allocate the precip to rain or snow
for (int lcv_t=0; lcv_t!=ntimes_l; ++lcv_t) {
if (data_temp[lcv_t] < 273.15) {
snow[lcv_t][lcv_gc] = data_precip[lcv_t];
rain[lcv_t][lcv_gc] = 0.;
temp[lcv_t][lcv_gc] = data_temp[lcv_t];
} else {
snow[lcv_t][lcv_gc] = 0.;
rain[lcv_t][lcv_gc] = data_precip[lcv_t];
temp[lcv_t][lcv_gc] = data_temp[lcv_t];
}
}
}
return min_ntimes;
}
} // namespace Utils
} // namespace ELM
#endif
......@@ -236,26 +236,26 @@ CanopyHydrology_Interception::launch(Context ctx, Runtime *runtime,
auto args = std::make_tuple(itime, dtime, ltype, ctype, urbpoi,
do_capsnow, dewmx, frac_veg_nosno);
ArgumentMap arg_map;
IndexLauncher interception_launcher(taskid,
IndexLauncher launcher(taskid,
color_space, TaskArgument(&args, sizeof(args)), arg_map);
// -- permissions on forcing
interception_launcher.add_region_requirement(
launcher.add_region_requirement(
RegionRequirement(forcing.logical_partition, forcing.projection_id,
READ_ONLY, EXCLUSIVE, forcing.logical_region));
interception_launcher.add_field(0, forcing.field_ids["forc_rain"]);
interception_launcher.add_field(0, forcing.field_ids["forc_snow"]);
interception_launcher.add_field(0, forcing.field_ids["forc_irrig"]);
launcher.add_field(0, forcing.field_ids["forc_rain"]);
launcher.add_field(0, forcing.field_ids["forc_snow"]);
launcher.add_field(0, forcing.field_ids["forc_irrig"]);
// -- permissions on phenology
interception_launcher.add_region_requirement(
launcher.add_region_requirement(
RegionRequirement(phenology.logical_partition, phenology.projection_id,
READ_ONLY, EXCLUSIVE, phenology.logical_region));
interception_launcher.add_field(1, phenology.field_ids["elai"]);
interception_launcher.add_field(1, phenology.field_ids["esai"]);
launcher.add_field(1, phenology.field_ids["elai"]);
launcher.add_field(1, phenology.field_ids["esai"]);
// -- permissions on output
interception_launcher.add_region_requirement(
launcher.add_region_requirement(
RegionRequirement(flux.logical_partition, flux.projection_id,
READ_WRITE, EXCLUSIVE, flux.logical_region));
std::vector<std::string> output{"qflx_prec_intr", "qflx_irrig",
......@@ -263,10 +263,10 @@ CanopyHydrology_Interception::launch(Context ctx, Runtime *runtime,
"qflx_snwcp_ice", "qflx_snow_grnd_patch",
"qflx_rain_grnd","h2ocan"};
for (auto fname : output)
interception_launcher.add_field(2,flux.field_ids[fname]);
launcher.add_field(2,flux.field_ids[fname]);
// -- launch the interception
return runtime->execute_index_space(ctx, interception_launcher);
return runtime->execute_index_space(ctx, launcher);
}
void
......@@ -377,26 +377,26 @@ CanopyHydrology_FracWet::launch(Context ctx, Runtime *runtime,
double fwet = 0., fdry = 0.;
auto args = std::make_tuple(dewmx, frac_veg_nosno, fwet, fdry);
ArgumentMap arg_map;
IndexLauncher interception_launcher(taskid,
IndexLauncher launcher(taskid,
color_space, TaskArgument(&args, sizeof(args)), arg_map);
// -- permissions on phenology
interception_launcher.add_region_requirement(
launcher.add_region_requirement(
RegionRequirement(phenology.logical_partition, phenology.projection_id,
READ_ONLY, EXCLUSIVE, phenology.logical_region));
interception_launcher.add_field(0, phenology.field_ids["elai"]);
interception_launcher.add_field(0, phenology.field_ids["esai"]);
launcher.add_field(0, phenology.field_ids["elai"]);
launcher.add_field(0, phenology.field_ids["esai"]);
// -- permissions on output
interception_launcher.add_region_requirement(
launcher.add_region_requirement(
RegionRequirement(flux.logical_partition, flux.projection_id,
READ_WRITE, EXCLUSIVE, flux.logical_region));
std::vector<std::string> output{"h2ocan"};
for (auto fname : output)
interception_launcher.add_field(2,flux.field_ids[fname]);
launcher.add_field(1,flux.field_ids[fname]);
// -- launch the interception
return runtime->execute_index_space(ctx, interception_launcher);
return runtime->execute_index_space(ctx, launcher);
}
void
......@@ -428,12 +428,12 @@ CanopyHydrology_FracWet::cpu_execute_task(const Task *task,
<< task->regions[0].instance_fields[1] << std::endl;
const AffineAccessorRO elai(regions[0], task->regions[0].instance_fields[0]);
const AffineAccessorRO esai(regions[1], task->regions[1].instance_fields[1]);
const AffineAccessorRO esai(regions[0], task->regions[0].instance_fields[1]);
// -- output
const AffineAccessorRW h2ocan(regions[1], task->regions[1].instance_fields[0]);
LogicalRegion lr = regions[2].get_logical_region();
LogicalRegion lr = regions[0].get_logical_region();
IndexSpaceT<2> is(lr.get_index_space());
Rect<2> bounds = Domain(runtime->get_index_space_domain(is));
......@@ -478,28 +478,28 @@ SumOverPFTs::launch(Context ctx, Runtime *runtime,
{
auto args = std::make_tuple(NULL);
ArgumentMap arg_map;
IndexLauncher interception_launcher(taskid,
IndexLauncher launcher(taskid,
color_space, TaskArgument(&args, sizeof(args)), arg_map);
// -- permissions on input
interception_launcher.add_region_requirement(
launcher.add_region_requirement(
RegionRequirement(flux.logical_partition, flux.projection_id,
READ_ONLY, EXCLUSIVE, flux.logical_region));
std::vector<std::string> input{"qflx_snow_grnd_patch"};
for (auto fname : input)
interception_launcher.add_field(2,flux.field_ids[fname]);
launcher.add_field(0,flux.field_ids[fname]);
// -- permissions on output
interception_launcher.add_region_requirement(
launcher.add_region_requirement(
RegionRequirement(surface.logical_partition, surface.projection_id,
WRITE_DISCARD, EXCLUSIVE, surface.logical_region));
std::vector<std::string> output1{"qflx_snow_grnd_col"};
for (auto fname1 : output1)
interception_launcher.add_field(1,surface.field_ids[fname1]);
launcher.add_field(1,surface.field_ids[fname1]);
// -- launch the interception
return runtime->execute_index_space(ctx, interception_launcher);
return runtime->execute_index_space(ctx, launcher);
}
void
......@@ -507,10 +507,9 @@ SumOverPFTs::cpu_execute_task(const Task *task,
const std::vector<PhysicalRegion> &regions,
Context ctx, Runtime *runtime)
{
assert(regions.size() == 2);
assert(regions.size() == 2);
assert(task->regions[0].instance_fields.size() == 2);
assert(task->regions[0].instance_fields.size() == 1);
assert(task->regions[1].instance_fields.size() == 1);
std::cout << "LOG: Executing SumOverPFTs task" << std::endl;
// get accessors
......@@ -530,18 +529,14 @@ SumOverPFTs::cpu_execute_task(const Task *task,
Rect<2> bounds = Domain(runtime->get_index_space_domain(is));
std::cout << "LOG: With bounds: " << bounds.lo << "," << bounds.hi << std::endl;
//int n = sizeof(qflx_snow_grnd_col) / sizeof(qflx_snow_grnd_patch[0]);
for (int g = bounds.lo[0]; g != bounds.hi[0]+1; ++g) {
double sum = 0 ;
for (int p = bounds.lo[1]; p != bounds.hi[1]+1; ++p) {
double sum = 0 ;
for (int p = bounds.lo[1]; p != bounds.hi[1]+1; ++p) {
sum += qflx_snow_grnd_patch[g][p];
}
qflx_snow_grnd_col[g] = sum ;
}
qflx_snow_grnd_col[g] = sum ;
}
}
......@@ -589,36 +584,36 @@ CanopyHydrology_SnowWater::launch(Context ctx, Runtime *runtime,
auto args = std::make_tuple(itime,dtime, qflx_floodg,ltype, ctype, urbpoi, do_capsnow, oldfflag, qflx_snow_melt, n_melt);
ArgumentMap arg_map;
IndexLauncher interception_launcher(taskid,
IndexLauncher launcher(taskid,
color_space, TaskArgument(&args, sizeof(args)), arg_map);
// -- permissions on forcing
interception_launcher.add_region_requirement(
launcher.add_region_requirement(
RegionRequirement(forcing.logical_partition, forcing.projection_id,
READ_ONLY, EXCLUSIVE, forcing.logical_region));
interception_launcher.add_field(2, forcing.field_ids["forc_air_temp"]);
launcher.add_field(0, forcing.field_ids["forc_air_temp"]);
// -- permissions on output
interception_launcher.add_region_requirement(
// -- permissions on soil
launcher.add_region_requirement(
RegionRequirement(soil.logical_partition, soil.projection_id,
READ_WRITE, EXCLUSIVE, soil.logical_region));
std::vector<std::string> output{"swe_old", "h2osoi_liq", "h2osoi_ice", "t_soisno", "frac_iceold",
"dz", "z", "zi"};
for (auto fname : output)
interception_launcher.add_field(2,soil.field_ids[fname]);
launcher.add_field(1,soil.field_ids[fname]);
// -- permissions on output
interception_launcher.add_region_requirement(
// -- permissions on surface
launcher.add_region_requirement(
RegionRequirement(surface.logical_partition, surface.projection_id,
READ_WRITE, EXCLUSIVE, surface.logical_region));
std::vector<std::string> output1{"t_grnd", "h2osno", "snow_depth", "integrated_snow",
"qflx_snow_grnd_col", "qflx_snow_h2osfc",
"qflx_floodc", "frac_snow_eff", "frac_sno", "frac_h2osfc", "snow_level"};
for (auto fname1 : output1)
interception_launcher.add_field(1,surface.field_ids[fname1]);
launcher.add_field(2,surface.field_ids[fname1]);
// -- launch the interception
return runtime->execute_index_space(ctx, interception_launcher);
return runtime->execute_index_space(ctx, launcher);
}
void
......@@ -627,8 +622,10 @@ CanopyHydrology_SnowWater::cpu_execute_task(const Task *task,
Context ctx, Runtime *runtime)
{
assert(regions.size() == 3);
assert(regions.size() == 3);
assert(task->regions[0].instance_fields.size() == 3);
assert(task->regions[0].instance_fields.size() == 1);
assert(task->regions[1].instance_fields.size() == 8);
assert(task->regions[2].instance_fields.size() == 11);
std::cout << "LOG: Executing SnowWater task" << std::endl;
int lcv_time;
double dtime, qflx_snow_melt , qflx_floodg , n_melt ;
......@@ -658,7 +655,7 @@ CanopyHydrology_SnowWater::cpu_execute_task(const Task *task,
<< task->regions[0].instance_fields[0] << std::endl;
const AffineAccessorRO forc_air_temp(regions[0], task->regions[0].instance_fields[0]);
// -- output
// -- soil
const AffineAccessorRW swe_old(regions[1], task->regions[1].instance_fields[0]);
const AffineAccessorRW h2osoi_liq(regions[1], task->regions[1].instance_fields[1]);
const AffineAccessorRW h2osoi_ice(regions[1], task->regions[1].instance_fields[2]);
......@@ -669,8 +666,7 @@ CanopyHydrology_SnowWater::cpu_execute_task(const Task *task,
const AffineAccessorRW z(regions[1], task->regions[1].instance_fields[6]);
const AffineAccessorRW zi(regions[1], task->regions[1].instance_fields[7]);
// -- output
// -- surface
const AffineAccessorRO1 t_grnd(regions[2], task->regions[2].instance_fields[0]);
const AffineAccessorRW1 h2osno(regions[2], task->regions[2].instance_fields[1]);
const AffineAccessorRW1 snow_depth(regions[2], task->regions[2].instance_fields[2]);
......@@ -684,15 +680,13 @@ CanopyHydrology_SnowWater::cpu_execute_task(const Task *task,
const AffineAccessorRW1_int snow_level(regions[2], task->regions[2].instance_fields[10]);
LogicalRegion lr = regions[2].get_logical_region();
IndexSpaceT<2> is(lr.get_index_space());
Rect<2> bounds = Domain(runtime->get_index_space_domain(is));
IndexSpaceT<1> is(lr.get_index_space());
Rect<1> bounds = Domain(runtime->get_index_space_domain(is));
std::cout << "LOG: With bounds: " << bounds.lo << "," << bounds.hi << std::endl;
int newnode = 0.;
for (int g = bounds.lo[0]; g != bounds.hi[0]+1; ++g) {
ELM::CanopyHydrology_SnowWater(dtime, qflx_floodg,
ltype, ctype, urbpoi, do_capsnow, oldfflag,
forc_air_temp[lcv_time][g], t_grnd[g],
......@@ -701,7 +695,6 @@ CanopyHydrology_SnowWater::cpu_execute_task(const Task *task,
h2osoi_liq[g], h2osoi_ice[g], t_soisno[g], frac_iceold[g],
snow_level[g], dz[g], z[g], zi[g], newnode,
qflx_floodc[g], qflx_snow_h2osfc[g], frac_snow_eff[g], frac_sno[g]);
}
}
......@@ -746,35 +739,36 @@ CanopyHydrology_FracH2OSfc::launch(Context ctx, Runtime *runtime,
auto args = std::make_tuple(dtime, min_h2osfc, micro_sigma ,ltype);
ArgumentMap arg_map;
IndexLauncher interception_launcher(taskid,
IndexLauncher launcher(taskid,
color_space, TaskArgument(&args, sizeof(args)), arg_map);
// -- permissions on input
interception_launcher.add_region_requirement(
// -- permissions on input
launcher.add_region_requirement(
RegionRequirement(surface.logical_partition, surface.projection_id,
READ_ONLY, EXCLUSIVE, surface.logical_region));
std::vector<std::string> input{"h2osno"};
for (auto fname1 : input)
interception_launcher.add_field(1,surface.field_ids[fname1]);
launcher.add_field(0,surface.field_ids[fname1]);
// -- permissions on output
interception_launcher.add_region_requirement(
// -- permissions on output
launcher.add_region_requirement(
RegionRequirement(soil.logical_partition, soil.projection_id,
READ_WRITE, EXCLUSIVE, soil.logical_region));
std::vector<std::string> output{"h2osoi_liq"};
for (auto fname : output)
interception_launcher.add_field(2,soil.field_ids[fname]);
interception_launcher.add_region_requirement(
launcher.add_field(1,soil.field_ids[fname]);
// -- permisions on surface output
launcher.add_region_requirement(
RegionRequirement(surface.logical_partition, surface.projection_id,
READ_WRITE, EXCLUSIVE, surface.logical_region));
std::vector<std::string> output1{"h2osfc", "frac_h2osfc", "qflx_h2osfc2topsoi", "frac_snow_eff", "frac_sno"}; //h2osnow rw thing
for (auto fname1 : output1)
interception_launcher.add_field(1,surface.field_ids[fname1]);
launcher.add_field(2,surface.field_ids[fname1]);
// -- launch the interception
return runtime->execute_index_space(ctx, interception_launcher);
return runtime->execute_index_space(ctx, launcher);
}
void
......@@ -782,9 +776,10 @@ CanopyHydrology_FracH2OSfc::cpu_execute_task(const Task *task,
const std::vector<PhysicalRegion> &regions,
Context ctx, Runtime *runtime)
{
assert(regions.size() == 2);
assert(regions.size() == 2);
assert(task->regions[0].instance_fields.size() == 2);
assert(regions.size() == 3);
assert(task->regions[0].instance_fields.size() == 1);
assert(task->regions[1].instance_fields.size() == 1);
assert(task->regions[2].instance_fields.size() == 5);
std::cout << "LOG: Executing FracH2OSfc task" << std::endl;
double dtime, micro_sigma , min_h2osfc ;
......@@ -794,37 +789,36 @@ CanopyHydrology_FracH2OSfc::cpu_execute_task(const Task *task,
*((args_t*) task->args);