Skip to content

Commit

Permalink
Import next (#259)
Browse files Browse the repository at this point in the history
Co-authored-by: Malachi Phillips <[email protected]>
  • Loading branch information
stgeke and MalachiTimothyPhillips authored Mar 27, 2021
1 parent d955b9b commit 0a1d5ae
Show file tree
Hide file tree
Showing 651 changed files with 219,248 additions and 23,780 deletions.
9 changes: 9 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,18 @@ jobs:
- stage: test
name: "ethier (block) velocity and pressure projection with subcycling"
script: cd $NEKRS_EXAMPLES/ethier && nrsmpi ethier 2 4
- stage: test
name: "ethier default + moving mesh"
script: cd $NEKRS_EXAMPLES/ethier && nrsmpi ethier 2 5
- stage: test
name: "ethier subcycle + moving mesh"
script: cd $NEKRS_EXAMPLES/ethier && nrsmpi ethier 2 6
- stage: test
name: "lowMach default"
script: cd $NEKRS_EXAMPLES/lowMach && nrsmpi lowMach 2 1
- stage: test
name: "mv_cyl"
script: cd $NEKRS_EXAMPLES/mv_cyl && nrsmpi mv_cyl 2 1
- stage: test
name: "conj_ht"
script: cd $NEKRS_EXAMPLES/conj_ht && nrsmpi conj_ht 2 1
Expand Down
1 change: 1 addition & 0 deletions 3rd_party/gslib/ogs/include/ogsInterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ extern "C"
void ogsHostScatterMany(void *v, const int k, const char *type, const char *op, void *gsh);

void ogsHostFree(void *gsh);

}

#endif
2 changes: 2 additions & 0 deletions 3rd_party/gslib/ogs/include/ogstypes.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#if !defined(ogstypes_h)
#define ogstypes_h

#define BLOCKSIZE 256

//float data type
#if 0
#define DFLOAT_SINGLE
Expand Down
13 changes: 10 additions & 3 deletions 3rd_party/gslib/ogs/ogs.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ SOFTWARE.
#define OGS_HPP 1

#include <functional>
#include <cstring>
#include <math.h>
#include <stdlib.h>
#include <occa.hpp>
Expand All @@ -134,6 +135,8 @@ SOFTWARE.
#define ogsMax "max"
#define ogsMin "min"

#define OGS_ENABLE_TIMER

// OCCA+gslib gather scatter
typedef struct {

Expand Down Expand Up @@ -188,6 +191,10 @@ void ogsScatter (void *sv, void *v, const char *type, const char *op, ogs_t
void ogsScatterVec (void *sv, void *v, const int k, const char *type, const char *op, ogs_t *ogs);
void ogsScatterMany(void *sv, void *v, const int k, const int stride, const char *type, const char *op, ogs_t *ogs);

void ogsHostTic(MPI_Comm comm, int ifSync);
void ogsHostToc();
double ogsTime(bool reportHostTime);
void ogsResetTime();

// Synchronous device buffer versions
void ogsGatherScatter (occa::memory o_v, const char *type, const char *op, ogs_t *ogs); //wrapper for gslib call
Expand Down Expand Up @@ -259,10 +266,10 @@ typedef struct {

namespace oogs{

void start(occa::memory o_v, const int k, const int stride, const char *type, const char *op, oogs_t *h);
void finish(occa::memory o_v, const int k, const int stride, const char *type, const char *op, oogs_t *h);
void start(occa::memory &o_v, const int k, const int stride, const char *type, const char *op, oogs_t *h);
void finish(occa::memory &o_v, const int k, const int stride, const char *type, const char *op, oogs_t *h);
void startFinish(void *v, const int k, const int stride, const char *type, const char *op, oogs_t *h);
void startFinish(occa::memory o_v, const int k, const int stride, const char *type, const char *op, oogs_t *h);
void startFinish(occa::memory &o_v, const int k, const int stride, const char *type, const char *op, oogs_t *h);
oogs_t *setup(ogs_t *ogs, int nVec, int stride, const char *type, std::function<void()> callback, oogs_mode gsMode);
oogs_t *setup(int N, long long int *ids, const int k, const int stride, const char *type, MPI_Comm &comm,
int verbose, occa::device device, std::function<void()> callback, oogs_mode mode);
Expand Down
32 changes: 16 additions & 16 deletions 3rd_party/gslib/ogs/okl/gather.okl
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ SOFTWARE.
@restrict const float * q,
@restrict float * gatherq){

for(dlong g=0;g<Ngather;++g;@tile(256,@outer,@inner)){
for(dlong g=0;g<Ngather;++g;@tile(p_blockSize,@outer,@inner)){

const dlong start = gatherStarts[g];
const dlong end = gatherStarts[g+1];
Expand All @@ -53,7 +53,7 @@ SOFTWARE.
@restrict const double * q,
@restrict double * gatherq){

for(dlong g=0;g<Ngather;++g;@tile(256,@outer,@inner)){
for(dlong g=0;g<Ngather;++g;@tile(p_blockSize,@outer,@inner)){

const dlong start = gatherStarts[g];
const dlong end = gatherStarts[g+1];
Expand All @@ -75,7 +75,7 @@ SOFTWARE.
@restrict const int * q,
@restrict int * gatherq){

for(dlong g=0;g<Ngather;++g;@tile(256,@outer,@inner)){
for(dlong g=0;g<Ngather;++g;@tile(p_blockSize,@outer,@inner)){

const dlong start = gatherStarts[g];
const dlong end = gatherStarts[g+1];
Expand All @@ -97,7 +97,7 @@ SOFTWARE.
@restrict const hlong * q,
@restrict hlong * gatherq){

for(dlong g=0;g<Ngather;++g;@tile(256,@outer,@inner)){
for(dlong g=0;g<Ngather;++g;@tile(p_blockSize,@outer,@inner)){

const dlong start = gatherStarts[g];
const dlong end = gatherStarts[g+1];
Expand All @@ -119,7 +119,7 @@ SOFTWARE.
@restrict const float * q,
@restrict float * gatherq){

for(dlong g=0;g<Ngather;++g;@tile(256,@outer,@inner)){
for(dlong g=0;g<Ngather;++g;@tile(p_blockSize,@outer,@inner)){

const dlong start = gatherStarts[g];
const dlong end = gatherStarts[g+1];
Expand All @@ -141,7 +141,7 @@ SOFTWARE.
@restrict const double * q,
@restrict double * gatherq){

for(dlong g=0;g<Ngather;++g;@tile(256,@outer,@inner)){
for(dlong g=0;g<Ngather;++g;@tile(p_blockSize,@outer,@inner)){

const dlong start = gatherStarts[g];
const dlong end = gatherStarts[g+1];
Expand All @@ -163,7 +163,7 @@ SOFTWARE.
@restrict const int * q,
@restrict int * gatherq){

for(dlong g=0;g<Ngather;++g;@tile(256,@outer,@inner)){
for(dlong g=0;g<Ngather;++g;@tile(p_blockSize,@outer,@inner)){

const dlong start = gatherStarts[g];
const dlong end = gatherStarts[g+1];
Expand All @@ -185,7 +185,7 @@ SOFTWARE.
@restrict const hlong * q,
@restrict hlong * gatherq){

for(dlong g=0;g<Ngather;++g;@tile(256,@outer,@inner)){
for(dlong g=0;g<Ngather;++g;@tile(p_blockSize,@outer,@inner)){

const dlong start = gatherStarts[g];
const dlong end = gatherStarts[g+1];
Expand All @@ -207,7 +207,7 @@ SOFTWARE.
@restrict const float * q,
@restrict float * gatherq){

for(dlong g=0;g<Ngather;++g;@tile(256,@outer,@inner)){
for(dlong g=0;g<Ngather;++g;@tile(p_blockSize,@outer,@inner)){

const dlong start = gatherStarts[g];
const dlong end = gatherStarts[g+1];
Expand All @@ -231,7 +231,7 @@ SOFTWARE.
@restrict const double * q,
@restrict double * gatherq){

for(dlong g=0;g<Ngather;++g;@tile(256,@outer,@inner)){
for(dlong g=0;g<Ngather;++g;@tile(p_blockSize,@outer,@inner)){

const dlong start = gatherStarts[g];
const dlong end = gatherStarts[g+1];
Expand All @@ -255,7 +255,7 @@ SOFTWARE.
@restrict const int * q,
@restrict int * gatherq){

for(dlong g=0;g<Ngather;++g;@tile(256,@outer,@inner)){
for(dlong g=0;g<Ngather;++g;@tile(p_blockSize,@outer,@inner)){

const dlong start = gatherStarts[g];
const dlong end = gatherStarts[g+1];
Expand All @@ -279,7 +279,7 @@ SOFTWARE.
@restrict const hlong * q,
@restrict hlong * gatherq){

for(dlong g=0;g<Ngather;++g;@tile(256,@outer,@inner)){
for(dlong g=0;g<Ngather;++g;@tile(p_blockSize,@outer,@inner)){

const dlong start = gatherStarts[g];
const dlong end = gatherStarts[g+1];
Expand All @@ -303,7 +303,7 @@ SOFTWARE.
@restrict const float * q,
@restrict float * gatherq){

for(dlong g=0;g<Ngather;++g;@tile(256,@outer,@inner)){
for(dlong g=0;g<Ngather;++g;@tile(p_blockSize,@outer,@inner)){

const dlong start = gatherStarts[g];
const dlong end = gatherStarts[g+1];
Expand All @@ -326,7 +326,7 @@ SOFTWARE.
@restrict const double * q,
@restrict double * gatherq){

for(dlong g=0;g<Ngather;++g;@tile(256,@outer,@inner)){
for(dlong g=0;g<Ngather;++g;@tile(p_blockSize,@outer,@inner)){

const dlong start = gatherStarts[g];
const dlong end = gatherStarts[g+1];
Expand All @@ -349,7 +349,7 @@ SOFTWARE.
@restrict const int * q,
@restrict int * gatherq){

for(dlong g=0;g<Ngather;++g;@tile(256,@outer,@inner)){
for(dlong g=0;g<Ngather;++g;@tile(p_blockSize,@outer,@inner)){

const dlong start = gatherStarts[g];
const dlong end = gatherStarts[g+1];
Expand All @@ -372,7 +372,7 @@ SOFTWARE.
@restrict const hlong * q,
@restrict hlong * gatherq){

for(dlong g=0;g<Ngather;++g;@tile(256,@outer,@inner)){
for(dlong g=0;g<Ngather;++g;@tile(p_blockSize,@outer,@inner)){

const dlong start = gatherStarts[g];
const dlong end = gatherStarts[g+1];
Expand Down
32 changes: 16 additions & 16 deletions 3rd_party/gslib/ogs/okl/gatherMany.okl
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ SOFTWARE.
@restrict const float * q,
@restrict float * gatherq){

for(dlong g=0;g<Ngather*Nentries;++g;@tile(256,@outer,@inner)){
for(dlong g=0;g<Ngather*Nentries;++g;@tile(p_blockSize,@outer,@inner)){

const dlong gid = g%Ngather;
const int k = g/Ngather;
Expand All @@ -61,7 +61,7 @@ SOFTWARE.
@restrict const double * q,
@restrict double * gatherq){

for(dlong g=0;g<Ngather*Nentries;++g;@tile(256,@outer,@inner)){
for(dlong g=0;g<Ngather*Nentries;++g;@tile(p_blockSize,@outer,@inner)){

const dlong gid = g%Ngather;
const int k = g/Ngather;
Expand All @@ -88,7 +88,7 @@ SOFTWARE.
@restrict const int * q,
@restrict int * gatherq){

for(dlong g=0;g<Ngather*Nentries;++g;@tile(256,@outer,@inner)){
for(dlong g=0;g<Ngather*Nentries;++g;@tile(p_blockSize,@outer,@inner)){

const dlong gid = g%Ngather;
const int k = g/Ngather;
Expand All @@ -115,7 +115,7 @@ SOFTWARE.
@restrict const hlong * q,
@restrict hlong * gatherq){

for(dlong g=0;g<Ngather*Nentries;++g;@tile(256,@outer,@inner)){
for(dlong g=0;g<Ngather*Nentries;++g;@tile(p_blockSize,@outer,@inner)){

const dlong gid = g%Ngather;
const int k = g/Ngather;
Expand All @@ -142,7 +142,7 @@ SOFTWARE.
@restrict const float * q,
@restrict float * gatherq){

for(dlong g=0;g<Ngather*Nentries;++g;@tile(256,@outer,@inner)){
for(dlong g=0;g<Ngather*Nentries;++g;@tile(p_blockSize,@outer,@inner)){

const dlong gid = g%Ngather;
const int k = g/Ngather;
Expand All @@ -169,7 +169,7 @@ SOFTWARE.
@restrict const double * q,
@restrict double * gatherq){

for(dlong g=0;g<Ngather*Nentries;++g;@tile(256,@outer,@inner)){
for(dlong g=0;g<Ngather*Nentries;++g;@tile(p_blockSize,@outer,@inner)){

const dlong gid = g%Ngather;
const int k = g/Ngather;
Expand All @@ -196,7 +196,7 @@ SOFTWARE.
@restrict const int * q,
@restrict int * gatherq){

for(dlong g=0;g<Ngather*Nentries;++g;@tile(256,@outer,@inner)){
for(dlong g=0;g<Ngather*Nentries;++g;@tile(p_blockSize,@outer,@inner)){

const dlong gid = g%Ngather;
const int k = g/Ngather;
Expand All @@ -223,7 +223,7 @@ SOFTWARE.
@restrict const hlong * q,
@restrict hlong * gatherq){

for(dlong g=0;g<Ngather*Nentries;++g;@tile(256,@outer,@inner)){
for(dlong g=0;g<Ngather*Nentries;++g;@tile(p_blockSize,@outer,@inner)){

const dlong gid = g%Ngather;
const int k = g/Ngather;
Expand All @@ -250,7 +250,7 @@ SOFTWARE.
@restrict const float * q,
@restrict float * gatherq){

for(dlong g=0;g<Ngather*Nentries;++g;@tile(256,@outer,@inner)){
for(dlong g=0;g<Ngather*Nentries;++g;@tile(p_blockSize,@outer,@inner)){

const dlong gid = g%Ngather;
const int k = g/Ngather;
Expand Down Expand Up @@ -279,7 +279,7 @@ SOFTWARE.
@restrict const double * q,
@restrict double * gatherq){

for(dlong g=0;g<Ngather*Nentries;++g;@tile(256,@outer,@inner)){
for(dlong g=0;g<Ngather*Nentries;++g;@tile(p_blockSize,@outer,@inner)){

const dlong gid = g%Ngather;
const int k = g/Ngather;
Expand Down Expand Up @@ -308,7 +308,7 @@ SOFTWARE.
@restrict const int * q,
@restrict int * gatherq){

for(dlong g=0;g<Ngather*Nentries;++g;@tile(256,@outer,@inner)){
for(dlong g=0;g<Ngather*Nentries;++g;@tile(p_blockSize,@outer,@inner)){

const dlong gid = g%Ngather;
const int k = g/Ngather;
Expand Down Expand Up @@ -337,7 +337,7 @@ SOFTWARE.
@restrict const hlong * q,
@restrict hlong * gatherq){

for(dlong g=0;g<Ngather*Nentries;++g;@tile(256,@outer,@inner)){
for(dlong g=0;g<Ngather*Nentries;++g;@tile(p_blockSize,@outer,@inner)){

const dlong gid = g%Ngather;
const int k = g/Ngather;
Expand Down Expand Up @@ -366,7 +366,7 @@ SOFTWARE.
@restrict const float * q,
@restrict float * gatherq){

for(dlong g=0;g<Ngather*Nentries;++g;@tile(256,@outer,@inner)){
for(dlong g=0;g<Ngather*Nentries;++g;@tile(p_blockSize,@outer,@inner)){

const dlong gid = g%Ngather;
const int k = g/Ngather;
Expand Down Expand Up @@ -394,7 +394,7 @@ SOFTWARE.
@restrict const double * q,
@restrict double * gatherq){

for(dlong g=0;g<Ngather*Nentries;++g;@tile(256,@outer,@inner)){
for(dlong g=0;g<Ngather*Nentries;++g;@tile(p_blockSize,@outer,@inner)){

const dlong gid = g%Ngather;
const int k = g/Ngather;
Expand Down Expand Up @@ -422,7 +422,7 @@ SOFTWARE.
@restrict const int * q,
@restrict int * gatherq){

for(dlong g=0;g<Ngather*Nentries;++g;@tile(256,@outer,@inner)){
for(dlong g=0;g<Ngather*Nentries;++g;@tile(p_blockSize,@outer,@inner)){

const dlong gid = g%Ngather;
const int k = g/Ngather;
Expand Down Expand Up @@ -450,7 +450,7 @@ SOFTWARE.
@restrict const hlong * q,
@restrict hlong * gatherq){

for(dlong g=0;g<Ngather*Nentries;++g;@tile(256,@outer,@inner)){
for(dlong g=0;g<Ngather*Nentries;++g;@tile(p_blockSize,@outer,@inner)){

const dlong gid = g%Ngather;
const int k = g/Ngather;
Expand Down
Loading

0 comments on commit 0a1d5ae

Please sign in to comment.