Skip to content

Commit

Permalink
debug openmp on fire grid
Browse files Browse the repository at this point in the history
  • Loading branch information
renjianning committed Oct 20, 2019
1 parent f1127a4 commit 1b08baf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions rhessys/init/construct_fire_grid.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ struct fire_object **construct_patch_fire_grid (struct world_object *world, stru
tmp.dists[w]=0;
}*/
// then initialize values: e.g., 0's
#pragma omp parallel for
#pragma omp parallel for private(j) collapse(2)
for(i=0;i<grid_dimX;i++){
for(j=0;j<grid_dimY;j++){
fire_grid[j][i].occupied_area=0;
Expand All @@ -117,7 +117,7 @@ struct fire_object **construct_patch_fire_grid (struct world_object *world, stru
}*/
//patchesIn=fopen("../auxdata/patchGrid.txt","r");
// for now do away with the header
#pragma omp parallel for

for(i=0; i<grid_dimY;i++){
for(j=0;j<grid_dimX;j++){
// first initialize the fire grid
Expand Down Expand Up @@ -260,7 +260,7 @@ struct fire_object **construct_patch_fire_grid (struct world_object *world, stru
demIn=fopen(command_line[0].firegrid_dem_filename,"r");
// demIn=fopen("../auxdata/DemGrid.txt","r");
// for now do away with the header, so this file has no header
#pragma omp parallel for

for(i=0; i<grid_dimY;i++){
for(j=0;j<grid_dimX;j++){
fscanf(demIn,"%lf\t",&fire_grid[i][j].elev);
Expand Down

0 comments on commit 1b08baf

Please sign in to comment.