Skip to content

Commit c65f686

Browse files
committed
Prototype and implementation of jdata::get_nj_max.
Essential is the '#ifdef GPU', since, when one executes "./setup install amuse-ph4" one will not link with Sapporo as one would when executing "./setup install amuse-ph4-sapporo". So "GPU" and "Sapporo" go hand in hand and one needs to make sure that "./setup install amuse-ph4" will complete without error when no GPU is available.
1 parent 3321825 commit c65f686

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

src/amuse_ph4/src/jdata.cc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434

3535
#ifdef GPU
3636
#include "grape.h"
37+
#include "sapporo.h"
3738
#endif
3839

3940
// AMUSE STOPPING CONDITIONS SUPPORT
@@ -1153,3 +1154,12 @@ real jdata::get_tnext()
11531154
int ndum;
11541155
return sched->get_list(NULL, ndum);
11551156
}
1157+
1158+
int jdata::get_nj_max()
1159+
{
1160+
#ifdef GPU
1161+
return g6_get_nj_max_();
1162+
#else
1163+
return 0;
1164+
#endif
1165+
}

src/amuse_ph4/src/jdata.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,7 @@ class jdata {
212212
void spec_output(const char *s = NULL);
213213
void to_com();
214214
real get_tnext();
215+
int get_nj_max();
215216

216217
// In gpu.cc:
217218

0 commit comments

Comments
 (0)