Commit 02f26e51 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

removed lprogress

parent fa902899
......@@ -358,20 +358,14 @@ void setmisstonn(field_t *field1, field_t *field2, int maxfill)
double range = SQR(2*search_radius);
unsigned index;
#pragma omp parallel for private(index) shared(cdoSilentMode, findex, mindex, array1, array2, xvals, yvals, range)
#pragma omp parallel for private(index) shared(findex, mindex, array1, array2, xvals, yvals, range)
for ( unsigned i = 0; i < nmiss; ++i )
{
int lprogress = 1;
if ( cdo_omp_get_thread_num() != 0 ) lprogress = 0;
if ( !cdoSilentMode )
{
#if defined(_OPENMP)
#include "pragma_omp_atomic_update.h"
#endif
findex++;
if ( lprogress ) progressStatus(0, 1, findex/nmiss);
}
findex++;
if ( cdo_omp_get_thread_num() == 0 ) progressStatus(0, 1, findex/nmiss);
double prange = range;
......
......@@ -113,19 +113,16 @@ void scrip_remap_bicubic_weights(remapgrid_t *src_grid, remapgrid_t *tgt_grid, r
#if defined(_OPENMP)
#pragma omp parallel for default(none) \
shared(ompNumThreads, cdoVerbose, weightlinks, remap_grid_type, tgt_grid_size, src_grid, tgt_grid, rv, findex) \
shared(weightlinks, remap_grid_type, tgt_grid_size, src_grid, tgt_grid, rv, findex) \
private(tgt_cell_add, src_add, src_lats, src_lons, wgts, plat, plon, search_result)
#endif
for ( tgt_cell_add = 0; tgt_cell_add < tgt_grid_size; ++tgt_cell_add )
{
int lprogress = 1;
if ( cdo_omp_get_thread_num() != 0 ) lprogress = 0;
#if defined(_OPENMP)
#include "pragma_omp_atomic_update.h"
#endif
findex++;
if ( lprogress ) progressStatus(0, 1, findex/tgt_grid_size);
if ( cdo_omp_get_thread_num() == 0 ) progressStatus(0, 1, findex/tgt_grid_size);
weightlinks[tgt_cell_add].nlinks = 0;
......@@ -241,19 +238,16 @@ void scrip_remap_bicubic(remapgrid_t *src_grid, remapgrid_t *tgt_grid, const dou
#if defined(_OPENMP)
#pragma omp parallel for default(none) \
shared(ompNumThreads, cdoVerbose, remap_grid_type, tgt_grid_size, src_grid, tgt_grid, src_array, tgt_array, missval, grad1_lat, grad1_lon, grad1_latlon, findex) \
shared(remap_grid_type, tgt_grid_size, src_grid, tgt_grid, src_array, tgt_array, missval, grad1_lat, grad1_lon, grad1_latlon, findex) \
private(tgt_cell_add, src_add, src_lats, src_lons, wgts, plat, plon, search_result)
#endif
for ( tgt_cell_add = 0; tgt_cell_add < tgt_grid_size; ++tgt_cell_add )
{
int lprogress = 1;
if ( cdo_omp_get_thread_num() != 0 ) lprogress = 0;
#if defined(_OPENMP)
#include "pragma_omp_atomic_update.h"
#endif
findex++;
if ( lprogress ) progressStatus(0, 1, findex/tgt_grid_size);
if ( cdo_omp_get_thread_num() == 0 ) progressStatus(0, 1, findex/tgt_grid_size);
tgt_array[tgt_cell_add] = missval;
......
......@@ -195,20 +195,17 @@ void scrip_remap_bilinear_weights(remapgrid_t *src_grid, remapgrid_t *tgt_grid,
#if defined(_OPENMP)
#pragma omp parallel for default(none) \
shared(ompNumThreads, cdoVerbose, weightlinks, remap_grid_type, tgt_grid_size, src_grid, tgt_grid, rv, findex) \
shared(weightlinks, remap_grid_type, tgt_grid_size, src_grid, tgt_grid, rv, findex) \
private(tgt_cell_add, src_add, src_lats, src_lons, wgts, plat, plon, search_result) \
schedule(static)
#endif
for ( tgt_cell_add = 0; tgt_cell_add < tgt_grid_size; ++tgt_cell_add )
{
int lprogress = 1;
if ( cdo_omp_get_thread_num() != 0 ) lprogress = 0;
#if defined(_OPENMP)
#include "pragma_omp_atomic_update.h"
#endif
findex++;
if ( lprogress ) progressStatus(0, 1, findex/tgt_grid_size);
if ( cdo_omp_get_thread_num() == 0 ) progressStatus(0, 1, findex/tgt_grid_size);
weightlinks[tgt_cell_add].nlinks = 0;
......@@ -320,23 +317,17 @@ void scrip_remap_bilinear(remapgrid_t *src_grid, remapgrid_t *tgt_grid, const do
#if defined(_OPENMP)
#pragma omp parallel for default(none) \
shared(ompNumThreads, cdoVerbose, cdoSilentMode, remap_grid_type, tgt_grid_size, src_grid, tgt_grid, src_array, tgt_array, missval, findex) \
shared(cdoSilentMode, remap_grid_type, tgt_grid_size, src_grid, tgt_grid, src_array, tgt_array, missval, findex) \
private(tgt_cell_add, src_add, src_lats, src_lons, wgts, plat, plon, search_result) \
schedule(static)
#endif
for ( tgt_cell_add = 0; tgt_cell_add < tgt_grid_size; ++tgt_cell_add )
{
int lprogress = 1;
if ( cdo_omp_get_thread_num() != 0 ) lprogress = 0;
if ( !cdoSilentMode )
{
#if defined(_OPENMP)
#include "pragma_omp_atomic_update.h"
#endif
findex++;
if ( lprogress ) progressStatus(0, 1, findex/tgt_grid_size);
}
findex++;
if ( cdo_omp_get_thread_num() == 0 ) progressStatus(0, 1, findex/tgt_grid_size);
tgt_array[tgt_cell_add] = missval;
......
......@@ -720,14 +720,12 @@ void remap_conserv_weights(remapgrid_t *src_grid, remapgrid_t *tgt_grid, remapva
double partial_weight;
long n, num_weights, num_weights_old;
int ompthID = cdo_omp_get_thread_num();
int lprogress = 1;
if ( ompthID != 0 ) lprogress = 0;
#if defined(_OPENMP)
#include "pragma_omp_atomic_update.h"
#endif
findex++;
if ( lprogress ) progressStatus(0, 1, findex/tgt_grid_size);
if ( ompthID == 0 ) progressStatus(0, 1, findex/tgt_grid_size);
weightlinks[tgt_cell_add].nlinks = 0;
......
......@@ -11,7 +11,6 @@
#include "grid.h"
#include "remap.h"
#include "remap_store_link_cnsrv.h"
#include "util.h" /* progressStatus */
/* #define BABY_STEP 0.001 */ /* original value */
#define BABY_STEP 0.001
......@@ -1380,7 +1379,7 @@ void scrip_remap_conserv_weights(remapgrid_t *src_grid, remapgrid_t *tgt_grid, r
#if defined(_OPENMP)
#pragma omp parallel for default(shared) \
shared(ompNumThreads, nbins, num_wts, src_centroid_lon, src_centroid_lat, \
shared(nbins, num_wts, src_centroid_lon, src_centroid_lat, \
remap_store_link_fast, grid_store, link_add1, link_add2, rv, cdoVerbose, max_subseg, \
srch_corner_lat2, srch_corner_lon2, max_srch_cells2, \
src_num_cell_corners, srch_corners, src_grid, tgt_grid, tgt_grid_size, src_grid_size, srch_add2, findex) \
......@@ -1393,14 +1392,12 @@ void scrip_remap_conserv_weights(remapgrid_t *src_grid, remapgrid_t *tgt_grid, r
for ( src_cell_add = 0; src_cell_add < src_grid_size; ++src_cell_add )
{
int ompthID = cdo_omp_get_thread_num();
int lprogress = 1;
if ( ompthID != 0 ) lprogress = 0;
#if defined(_OPENMP)
#include "pragma_omp_atomic_update.h"
#endif
findex++;
if ( lprogress ) progressStatus(0, 0.5, findex/src_grid_size);
if ( ompthID == 0 ) progressStatus(0, 0.5, findex/src_grid_size);
srch_add = srch_add2[ompthID];
......@@ -1605,7 +1602,7 @@ void scrip_remap_conserv_weights(remapgrid_t *src_grid, remapgrid_t *tgt_grid, r
#if defined(_OPENMP)
#pragma omp parallel for default(shared) \
shared(ompNumThreads, nbins, num_wts, tgt_centroid_lon, tgt_centroid_lat, \
shared(nbins, num_wts, tgt_centroid_lon, tgt_centroid_lat, \
remap_store_link_fast, grid_store, link_add1, link_add2, rv, cdoVerbose, max_subseg, \
srch_corner_lat2, srch_corner_lon2, max_srch_cells2, \
tgt_num_cell_corners, srch_corners, src_grid, tgt_grid, tgt_grid_size, src_grid_size, srch_add2, findex) \
......@@ -1618,14 +1615,12 @@ void scrip_remap_conserv_weights(remapgrid_t *src_grid, remapgrid_t *tgt_grid, r
for ( tgt_cell_add = 0; tgt_cell_add < tgt_grid_size; ++tgt_cell_add )
{
int ompthID = cdo_omp_get_thread_num();
int lprogress = 1;
if ( ompthID != 0 ) lprogress = 0;
#if defined(_OPENMP)
#include "pragma_omp_atomic_update.h"
#endif
findex++;
if ( lprogress ) progressStatus(0.5, 0.5, findex/tgt_grid_size);
if ( ompthID == 0 ) progressStatus(0.5, 0.5, findex/tgt_grid_size);
srch_add = srch_add2[ompthID];
......
......@@ -392,22 +392,16 @@ void remap_distwgt_weights(unsigned num_neighbors, remapgrid_t *src_grid, remapg
#if defined(_OPENMP)
#pragma omp parallel for default(none) \
shared(cdoSilentMode, gs, weightlinks, num_neighbors, remap_grid_type, src_grid, tgt_grid, tgt_grid_size, findex) \
shared(gs, weightlinks, num_neighbors, remap_grid_type, src_grid, tgt_grid, tgt_grid_size, findex) \
private(tgt_cell_add, nbr_mask, nbr_add, nbr_dist)
#endif
for ( tgt_cell_add = 0; tgt_cell_add < tgt_grid_size; ++tgt_cell_add )
{
int lprogress = 1;
if ( cdo_omp_get_thread_num() != 0 ) lprogress = 0;
if ( !cdoSilentMode )
{
#if defined(_OPENMP)
#include "pragma_omp_atomic_update.h"
#endif
findex++;
if ( lprogress ) progressStatus(0, 1, findex/tgt_grid_size);
}
findex++;
if ( cdo_omp_get_thread_num() == 0 ) progressStatus(0, 1, findex/tgt_grid_size);
weightlinks[tgt_cell_add].nlinks = 0;
......@@ -496,23 +490,17 @@ void remap_distwgt(unsigned num_neighbors, remapgrid_t *src_grid, remapgrid_t *t
#if defined(_OPENMP)
#pragma omp parallel for default(none) \
shared(cdoSilentMode, gs, num_neighbors, remap_grid_type, src_grid, tgt_grid, tgt_grid_size, findex) \
shared(gs, num_neighbors, remap_grid_type, src_grid, tgt_grid, tgt_grid_size, findex) \
shared(src_array, tgt_array, missval) \
private(tgt_cell_add, nbr_mask, nbr_add, nbr_dist)
#endif
for ( tgt_cell_add = 0; tgt_cell_add < tgt_grid_size; ++tgt_cell_add )
{
int lprogress = 1;
if ( cdo_omp_get_thread_num() != 0 ) lprogress = 0;
if ( !cdoSilentMode )
{
#if defined(_OPENMP)
#include "pragma_omp_atomic_update.h"
#endif
findex++;
if ( lprogress ) progressStatus(0, 1, findex/tgt_grid_size);
}
findex++;
if ( cdo_omp_get_thread_num() == 0 ) progressStatus(0, 1, findex/tgt_grid_size);
tgt_array[tgt_cell_add] = missval;
......
......@@ -58,7 +58,6 @@
#include "grid.h"
#include "remap.h"
#include "remap_store_link_cnsrv.h"
#include "util.h" /* progressStatus */
#define IS_REG2D_GRID(gridID) (!gridIsRotated(gridID) && (gridInqType(gridID) == GRID_LONLAT || gridInqType(gridID) == GRID_GAUSSIAN))
......
Supports Markdown
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