Skip to content

Commit

Permalink
Merge pull request #17 from paranumal/feature/libp_update
Browse files Browse the repository at this point in the history
libp update
  • Loading branch information
dmcdougall authored Mar 15, 2022
2 parents 8dfbcf7 + 65fd9da commit 6286b69
Show file tree
Hide file tree
Showing 61 changed files with 4,102 additions and 2,317 deletions.
5 changes: 0 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,4 @@ To clean the `hipBone` build objects:
$ cd /path/to/hipBone/repo
$ make realclean

To clean JIT kernel objects:

$ cd /path/to/hipBone/repo
$ rm -r .occa

Please invoke `make help` for more supported options.
10 changes: 4 additions & 6 deletions hipBone.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,10 @@ SOFTWARE.
int main(int argc, char **argv){

// start up MPI
MPI_Init(&argc, &argv);
comm_t::Init(argc, argv);

{ /*Scope so everything is destructed before MPI_Finalize */

MPI_Comm comm = MPI_COMM_WORLD;
comm_t comm(comm_t::world().Dup());

hipBoneSettings_t settings(argc, argv, comm);
if (settings.compareSetting("VERBOSE", "TRUE"))
Expand All @@ -50,10 +49,9 @@ int main(int argc, char **argv){

// run
hb.Run();

}

// close down MPI
MPI_Finalize();
return HIPBONE_SUCCESS;
comm_t::Finalize();
return LIBP_SUCCESS;
}
12 changes: 5 additions & 7 deletions hipBone.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ using namespace libp;

class hipBoneSettings_t: public settings_t {
public:
hipBoneSettings_t(const int argc, char** argv, MPI_Comm& _comm);
hipBoneSettings_t(const int argc, char** argv, comm_t _comm);
void report();
};

Expand All @@ -50,10 +50,10 @@ class hipBone_t: public solver_t {

dfloat lambda;

occa::memory o_AqL;
deviceMemory<dfloat> o_AqL;

occa::kernel operatorKernel;
occa::kernel forcingKernel;
kernel_t operatorKernel;
kernel_t forcingKernel;

hipBone_t() = default;
hipBone_t(platform_t& _platform, mesh_t &_mesh) {
Expand All @@ -65,9 +65,7 @@ class hipBone_t: public solver_t {

void Run();

void PlotFields(dfloat* Q, char *fileName);

void Operator(occa::memory& o_q, occa::memory& o_Aq);
void Operator(deviceMemory<dfloat>& o_q, deviceMemory<dfloat>& o_Aq);
};


Expand Down
Loading

0 comments on commit 6286b69

Please sign in to comment.