Commit 3552faf3 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

Replace pragma vdir nodep by omp simd.

parent 9ad0e9a0
......@@ -184,8 +184,8 @@ rpassc(const double *a, const double *b, double *c, double *d, const double *tri
{
i = ibase;
j = jbase;
#if defined(SX)
#pragma vdir nodep
#ifdef HAVE_OPENMP4
#pragma omp simd
#endif
for (ijk = 0; ijk < lot; ++ijk)
{
......@@ -216,8 +216,8 @@ rpassc(const double *a, const double *b, double *c, double *d, const double *tri
{
i = ibase;
j = jbase;
#if defined(SX)
#pragma vdir nodep
#ifdef HAVE_OPENMP4
#pragma omp simd
#endif
for (ijk = 0; ijk < lot; ++ijk)
{
......@@ -245,8 +245,8 @@ rpassc(const double *a, const double *b, double *c, double *d, const double *tri
{
i = ibase;
j = jbase;
#if defined(SX)
#pragma vdir nodep
#ifdef HAVE_OPENMP4
#pragma omp simd
#endif
for (ijk = 0; ijk < lot; ++ijk)
{
......@@ -265,8 +265,8 @@ rpassc(const double *a, const double *b, double *c, double *d, const double *tri
{
i = ibase;
j = jbase;
#if defined(SX)
#pragma vdir nodep
#ifdef HAVE_OPENMP4
#pragma omp simd
#endif
for (ijk = 0; ijk < lot; ++ijk)
{
......@@ -298,8 +298,8 @@ rpassc(const double *a, const double *b, double *c, double *d, const double *tri
{
i = ibase;
j = jbase;
#if defined(SX)
#pragma vdir nodep
#ifdef HAVE_OPENMP4
#pragma omp simd
#endif
for (ijk = 0; ijk < lot; ++ijk)
{
......@@ -337,8 +337,8 @@ rpassc(const double *a, const double *b, double *c, double *d, const double *tri
{
i = ibase;
j = jbase;
#if defined(SX)
#pragma vdir nodep
#ifdef HAVE_OPENMP4
#pragma omp simd
#endif
for (ijk = 0; ijk < lot; ++ijk)
{
......@@ -376,8 +376,8 @@ rpassc(const double *a, const double *b, double *c, double *d, const double *tri
{
i = ibase;
j = jbase;
#if defined(SX)
#pragma vdir nodep
#ifdef HAVE_OPENMP4
#pragma omp simd
#endif
for (ijk = 0; ijk < lot; ++ijk)
{
......@@ -400,8 +400,8 @@ rpassc(const double *a, const double *b, double *c, double *d, const double *tri
{
i = ibase;
j = jbase;
#if defined(SX)
#pragma vdir nodep
#ifdef HAVE_OPENMP4
#pragma omp simd
#endif
for (ijk = 0; ijk < lot; ++ijk)
{
......@@ -438,8 +438,8 @@ rpassc(const double *a, const double *b, double *c, double *d, const double *tri
{
i = ibase;
j = jbase;
#if defined(SX)
#pragma vdir nodep
#ifdef HAVE_OPENMP4
#pragma omp simd
#endif
for (ijk = 0; ijk < lot; ++ijk)
{
......@@ -482,8 +482,8 @@ rpassc(const double *a, const double *b, double *c, double *d, const double *tri
{
i = ibase;
j = jbase;
#if defined(SX)
#pragma vdir nodep
#ifdef HAVE_OPENMP4
#pragma omp simd
#endif
for (ijk = 0; ijk < lot; ++ijk)
{
......@@ -530,8 +530,8 @@ rpassc(const double *a, const double *b, double *c, double *d, const double *tri
{
i = ibase;
j = jbase;
#if defined(SX)
#pragma vdir nodep
#ifdef HAVE_OPENMP4
#pragma omp simd
#endif
for (ijk = 0; ijk < lot; ++ijk)
{
......@@ -556,8 +556,8 @@ rpassc(const double *a, const double *b, double *c, double *d, const double *tri
{
i = ibase;
j = jbase;
#if defined(SX)
#pragma vdir nodep
#ifdef HAVE_OPENMP4
#pragma omp simd
#endif
for (ijk = 0; ijk < lot; ++ijk)
{
......@@ -595,8 +595,8 @@ rpassc(const double *a, const double *b, double *c, double *d, const double *tri
{
i = ibase;
j = jbase;
#if defined(SX)
#pragma vdir nodep
#ifdef HAVE_OPENMP4
#pragma omp simd
#endif
for (ijk = 0; ijk < lot; ++ijk)
{
......@@ -652,8 +652,8 @@ rpassc(const double *a, const double *b, double *c, double *d, const double *tri
{
i = ibase;
j = jbase;
#if defined(SX)
#pragma vdir nodep
#ifdef HAVE_OPENMP4
#pragma omp simd
#endif
for (ijk = 0; ijk < lot; ++ijk)
{
......@@ -701,8 +701,8 @@ rpassc(const double *a, const double *b, double *c, double *d, const double *tri
{
i = ibase;
j = jbase;
#if defined(SX)
#pragma vdir nodep
#ifdef HAVE_OPENMP4
#pragma omp simd
#endif
for (ijk = 0; ijk < lot; ++ijk)
{
......@@ -731,8 +731,8 @@ rpassc(const double *a, const double *b, double *c, double *d, const double *tri
{
i = ibase;
j = jbase;
#if defined(SX)
#pragma vdir nodep
#ifdef HAVE_OPENMP4
#pragma omp simd
#endif
for (ijk = 0; ijk < lot; ++ijk)
{
......@@ -775,8 +775,8 @@ rpassc(const double *a, const double *b, double *c, double *d, const double *tri
{
i = ibase;
j = jbase;
#if defined(SX)
#pragma vdir nodep
#ifdef HAVE_OPENMP4
#pragma omp simd
#endif
for (ijk = 0; ijk < lot; ++ijk)
{
......@@ -826,8 +826,8 @@ rpassc(const double *a, const double *b, double *c, double *d, const double *tri
{
i = ibase;
j = jbase;
#if defined(SX)
#pragma vdir nodep
#ifdef HAVE_OPENMP4
#pragma omp simd
#endif
for (ijk = 0; ijk < lot; ++ijk)
{
......@@ -879,8 +879,8 @@ rpassc(const double *a, const double *b, double *c, double *d, const double *tri
{
i = ibase;
j = jbase;
#if defined(SX)
#pragma vdir nodep
#ifdef HAVE_OPENMP4
#pragma omp simd
#endif
for (ijk = 0; ijk < lot; ++ijk)
{
......@@ -903,8 +903,8 @@ rpassc(const double *a, const double *b, double *c, double *d, const double *tri
{
i = ibase;
j = jbase;
#if defined(SX)
#pragma vdir nodep
#ifdef HAVE_OPENMP4
#pragma omp simd
#endif
for (ijk = 0; ijk < lot; ++ijk)
{
......@@ -950,8 +950,8 @@ rpassc(const double *a, const double *b, double *c, double *d, const double *tri
{
i = ibase;
j = jbase;
#if defined(SX)
#pragma vdir nodep
#ifdef HAVE_OPENMP4
#pragma omp simd
#endif
for (ijk = 0; ijk < lot; ++ijk)
{
......@@ -1051,8 +1051,8 @@ qpassc(const double *a, const double *b, double *c, double *d, const double *tri
{
i = ibase;
j = jbase;
#if defined(SX)
#pragma vdir nodep
#ifdef HAVE_OPENMP4
#pragma omp simd
#endif
for (ijk = 0; ijk < lot; ++ijk)
{
......@@ -1082,8 +1082,8 @@ qpassc(const double *a, const double *b, double *c, double *d, const double *tri
{
i = ibase;
j = jbase;
#if defined(SX)
#pragma vdir nodep
#ifdef HAVE_OPENMP4
#pragma omp simd
#endif
for (ijk = 0; ijk < lot; ++ijk)
{
......@@ -1108,8 +1108,8 @@ qpassc(const double *a, const double *b, double *c, double *d, const double *tri
{
i = ibase;
j = jbase;
#if defined(SX)
#pragma vdir nodep
#ifdef HAVE_OPENMP4
#pragma omp simd
#endif
for (ijk = 0; ijk < lot; ++ijk)
{
......@@ -1129,8 +1129,8 @@ qpassc(const double *a, const double *b, double *c, double *d, const double *tri
{
i = ibase;
j = jbase;
#if defined(SX)
#pragma vdir nodep
#ifdef HAVE_OPENMP4
#pragma omp simd
#endif
for (ijk = 0; ijk < lot; ++ijk)
{
......@@ -1161,8 +1161,8 @@ qpassc(const double *a, const double *b, double *c, double *d, const double *tri
{
i = ibase;
j = jbase;
#if defined(SX)
#pragma vdir nodep
#ifdef HAVE_OPENMP4
#pragma omp simd
#endif
for (ijk = 0; ijk < lot; ++ijk)
{
......@@ -1197,8 +1197,8 @@ qpassc(const double *a, const double *b, double *c, double *d, const double *tri
{
i = ibase;
j = jbase;
#if defined(SX)
#pragma vdir nodep
#ifdef HAVE_OPENMP4
#pragma omp simd
#endif
for (ijk = 0; ijk < lot; ++ijk)
{
......@@ -1233,8 +1233,8 @@ qpassc(const double *a, const double *b, double *c, double *d, const double *tri
{
i = ibase;
j = jbase;
#if defined(SX)
#pragma vdir nodep
#ifdef HAVE_OPENMP4
#pragma omp simd
#endif
for (ijk = 0; ijk < lot; ++ijk)
{
......@@ -1257,8 +1257,8 @@ qpassc(const double *a, const double *b, double *c, double *d, const double *tri
{
i = ibase;
j = jbase;
#if defined(SX)
#pragma vdir nodep
#ifdef HAVE_OPENMP4
#pragma omp simd
#endif
for (ijk = 0; ijk < lot; ++ijk)
{
......@@ -1293,8 +1293,8 @@ qpassc(const double *a, const double *b, double *c, double *d, const double *tri
{
i = ibase;
j = jbase;
#if defined(SX)
#pragma vdir nodep
#ifdef HAVE_OPENMP4
#pragma omp simd
#endif
for (ijk = 0; ijk < lot; ++ijk)
{
......@@ -1338,8 +1338,8 @@ qpassc(const double *a, const double *b, double *c, double *d, const double *tri
{
i = ibase;
j = jbase;
#if defined(SX)
#pragma vdir nodep
#ifdef HAVE_OPENMP4
#pragma omp simd
#endif
for (ijk = 0; ijk < lot; ++ijk)
{
......@@ -1380,8 +1380,8 @@ qpassc(const double *a, const double *b, double *c, double *d, const double *tri
{
i = ibase;
j = jbase;
#if defined(SX)
#pragma vdir nodep
#ifdef HAVE_OPENMP4
#pragma omp simd
#endif
for (ijk = 0; ijk < lot; ++ijk)
{
......@@ -1403,8 +1403,8 @@ qpassc(const double *a, const double *b, double *c, double *d, const double *tri
{
i = ibase;
j = jbase;
#if defined(SX)
#pragma vdir nodep
#ifdef HAVE_OPENMP4
#pragma omp simd
#endif
for (ijk = 0; ijk < lot; ++ijk)
{
......@@ -1446,8 +1446,8 @@ qpassc(const double *a, const double *b, double *c, double *d, const double *tri
{
i = ibase;
j = jbase;
#if defined(SX)
#pragma vdir nodep
#ifdef HAVE_OPENMP4
#pragma omp simd
#endif
for (ijk = 0; ijk < lot; ++ijk)
{
......@@ -1500,8 +1500,8 @@ qpassc(const double *a, const double *b, double *c, double *d, const double *tri
{
i = ibase;
j = jbase;
#if defined(SX)
#pragma vdir nodep
#ifdef HAVE_OPENMP4
#pragma omp simd
#endif
for (ijk = 0; ijk < lot; ++ijk)
{
......@@ -1559,8 +1559,8 @@ qpassc(const double *a, const double *b, double *c, double *d, const double *tri
{
i = ibase;
j = jbase;
#if defined(SX)
#pragma vdir nodep
#ifdef HAVE_OPENMP4
#pragma omp simd
#endif
for (ijk = 0; ijk < lot; ++ijk)
{
......@@ -1596,8 +1596,8 @@ qpassc(const double *a, const double *b, double *c, double *d, const double *tri
{
i = ibase;
j = jbase;
#if defined(SX)
#pragma vdir nodep
#ifdef HAVE_OPENMP4
#pragma omp simd
#endif
for (ijk = 0; ijk < lot; ++ijk)
{
......@@ -1653,8 +1653,8 @@ qpassc(const double *a, const double *b, double *c, double *d, const double *tri
{
i = ibase;
j = jbase;
#if defined(SX)
#pragma vdir nodep
#ifdef HAVE_OPENMP4
#pragma omp simd
#endif
for (ijk = 0; ijk < lot; ++ijk)
{
......@@ -1713,8 +1713,8 @@ qpassc(const double *a, const double *b, double *c, double *d, const double *tri
{
i = ibase;
j = jbase;
#if defined(SX)
#pragma vdir nodep
#ifdef HAVE_OPENMP4
#pragma omp simd
#endif
for (ijk = 0; ijk < lot; ++ijk)
{
......@@ -1782,8 +1782,8 @@ qpassc(const double *a, const double *b, double *c, double *d, const double *tri
{
i = ibase;
j = jbase;
#if defined(SX)
#pragma vdir nodep
#ifdef HAVE_OPENMP4
#pragma omp simd
#endif
for (ijk = 0; ijk < lot; ++ijk)
{
......@@ -1813,8 +1813,8 @@ qpassc(const double *a, const double *b, double *c, double *d, const double *tri
{
i = ibase;
j = jbase;
#if defined(SX)
#pragma vdir nodep
#ifdef HAVE_OPENMP4
#pragma omp simd
#endif
for (ijk = 0; ijk < lot; ++ijk)
{
......@@ -1871,8 +1871,8 @@ qpassc(const double *a, const double *b, double *c, double *d, const double *tri
{
i = ibase;
j = jbase;
#if defined(SX)
#pragma vdir nodep
#ifdef HAVE_OPENMP4
#pragma omp simd
#endif
for (ijk = 0; ijk < lot; ++ijk)
{
......@@ -1981,8 +1981,8 @@ fc2gp(double *restrict trig, const long *restrict ifax, double *restrict fc, dou
const long nvex = (nb == 0) ? nvex0 : NFFT;
long i = istart;
#if defined(SX)
#pragma vdir nodep
#ifdef HAVE_OPENMP4
#pragma omp simd
#endif
for (long j = 0; j < nvex; j++)
{
......@@ -2033,8 +2033,8 @@ fc2gp(double *restrict trig, const long *restrict ifax, double *restrict fc, dou
/* Fill in zeros at end */
long ix = istart + nlon;
#if defined(SX)
#pragma vdir nodep
#ifdef HAVE_OPENMP4
#pragma omp simd
#endif
for (long j = 0; j < nvex; j++)
{
......@@ -2142,8 +2142,8 @@ gp2fc(double *trig, const long *ifax, const double *restrict gp, double *restric
/* Shift a(0) & fill in zero imag parts */
ix = istart;
#if defined(SX)
#pragma vdir nodep
#ifdef HAVE_OPENMP4
#pragma omp simd
#endif
for (j = 0; j < nvex; j++)
{
......
......@@ -376,9 +376,6 @@ after_legini(long ntr, long nlat, double *restrict poli, double *restrict pold,
double is;
for (long jm = 0; jm < waves; ++jm)
{
#if defined(SX)
#pragma vdir nodep
#endif
#ifdef HAVE_OPENMP4
#pragma omp simd
#endif
......@@ -427,9 +424,6 @@ sp2fctest(const double *sa, double *fa, const double *poli, long nlev, long nlat
saiis = sai * is;
far = fal;
fai = fal + nlat;
#if defined(SX)
#pragma vdir nodep
#endif
#ifdef HAVE_OPENMP4
#pragma omp simd
#endif
......
......@@ -23,6 +23,7 @@
#ifdef CDO
#include "cdo_math.h"
#include "cimdOmp.h"
#define streamDefRecord cdoDefRecord
#define streamWriteRecord cdoWriteRecord
#else
......@@ -929,14 +930,8 @@ Omega(double *omega_in, double *divergence, double *u_wind, double *v_wind, doub
vwind = v_wind + j * dimgp;
DeltaHybrid = vct[nlev + j + 2] - vct[nlev + j + 1];
#if defined(SX)
#pragma vdir nodep
#endif
#if defined(__uxp__)
#pragma loop novrec
#endif
#if defined(_OPENMP)
#pragma omp parallel for
#ifdef HAVE_OPENMP4
#pragma omp parallel for simd
#endif
for (i = 0; i < dimgp; i++)
{
......@@ -950,21 +945,15 @@ Omega(double *omega_in, double *divergence, double *u_wind, double *v_wind, doub
for (j = 0; j < nlev; j++)
{
omega = omega_in + j * dimgp;
#if defined(SX)
#pragma vdir nodep
#endif
#if defined(__uxp__)
#pragma loop novrec
#endif
#if defined(_OPENMP)
#pragma omp parallel for
#ifdef HAVE_OPENMP4
#pragma omp parallel for simd
#endif
for (i = 0; i < dimgp; i++) omega[i] = 0.5 * (omega[i] + omega[i + dimgp]);
}
/* compute full level part of vertical velocity */
#if defined(_OPENMP)
#ifdef _OPENMP
#pragma omp parallel for default(shared) private(i, omega, halfp, fullp, uwind, vwind, DeltaHybrid, Cterm, Pterm)
#endif
for (j = 0; j < nlev; j++)
......@@ -979,8 +968,8 @@ Omega(double *omega_in, double *divergence, double *u_wind, double *v_wind, doub
if (std::fabs(DeltaHybrid) > 0)
{
Cterm = vct[j + 1] * vct[nlev + j + 1] - vct[j] * vct[nlev + j + 2];
#if defined(__uxp__)
#pragma loop novrec
#ifdef HAVE_OPENMP4
#pragma omp simd
#endif
for (i = 0; i < dimgp; i++)
{
......@@ -1017,21 +1006,15 @@ MakeGeopotHeight(double *geop, double *gt, double *gq, double *ph, int nhor, int
gtl = gt + nhor * (j - 1);
gql = gq + nhor * (j - 1);
phl = ph + nhor * (j - 1);
#if defined(SX)
#pragma vdir nodep
#endif
#if defined(_OPENMP)
#pragma omp parallel for
#ifdef HAVE_OPENMP4
#pragma omp parallel for simd
#endif
for (i = 0; i < nhor; i++)
geopl[i] = geopl[i + nhor] + PlanetRD * gtl[i] * (1.0 + vtmp * gql[i]) * std::log(phl[i + nhor] / phl[i]);
}
#if defined(SX)
#pragma vdir nodep
#endif
#if defined(_OPENMP)
#pragma omp parallel for
#ifdef HAVE_OPENMP4
#pragma omp parallel for simd
#endif
for (i = 0; i < nhor; i++) geop[i] = geop[i + nhor] + PlanetRD * gt[i] * (1.0 + vtmp * gq[i]) * z2log2;
}
......@@ -1041,28 +1024,19 @@ MakeGeopotHeight(double *geop, double *gt, double *gq, double *ph, int nhor, int
phl = ph + nhor;
for (j = nlev; j > 1; j--)
#if defined(SX)
#pragma vdir nodep
#endif
#ifdef HAVE_OPENMP4
#pragma omp simd
#endif
for (i = nhor * (j - 1); i < nhor * j; i++) geop[i] = geopl[i] + PlanetRD * gt[i] * std::log(phl[i] / ph[i]);
#if defined(SX)
#pragma vdir nodep
#endif
#ifdef HAVE_OPENMP4
#pragma omp simd
#endif
for (i = 0; i < nhor; i++) geop[i] = geopl[i] + PlanetRD * gt[i] * z2log2;
}
#if defined(SX)
#pragma vdir nodep
#endif
#if defined(_OPENMP)
#pragma omp parallel for
#ifdef HAVE_OPENMP4
#pragma omp parallel for simd
#endif
for (i = 0; i < nhor * (nlev + 1); i++) geop[i] *= zrg;
}
......
......@@ -69,6 +69,7 @@
#include <cdi.h>
#include "cdo_options.h"
#include "cimdOmp.h"
#include "dmemory.h"
#include "process_int.h"
#include "cdo_wtime.h"
......@@ -799,8 +800,8 @@ remapStat(int remapOrder, RemapGrid &src_grid, RemapGrid &tgt_grid, RemapVars &r
std::vector<size_t> tgt_count(tgt_grid.size, 0);
#if defined(SX)
#pragma vdir nodep
#ifdef HAVE_OPENMP4
#pragma omp simd
#endif
for (size_t n = 0; n < rv.num_links; ++n) tgt_count[rv.tgt_cell_add[n]]++;
......
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