Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions SRC/dSchCompUdt-cuda.c
Original file line number Diff line number Diff line change
Expand Up @@ -281,13 +281,18 @@ if ( msg0 && msg2 ) { /* L(:,k) and U(k,:) are not empty. */
firstprivate(luptr,lptr) default (shared)
#endif
{
int thread_id = omp_get_thread_num();
int thread_id = 1;
int num_threads = 1;
#ifdef _OPENMP
thread_id = omp_get_thread_num();
num_threads = omp_get_num_threads();
#endif

int* indirect_thread = indirect + ldt*thread_id;
int* indirect2_thread = indirect2 + ldt*thread_id;
double* tempv1;

if (ncpu_blks< omp_get_num_threads()) {
if (ncpu_blks< num_threads) {
// TAU_STATIC_TIMER_START("SPECIAL_CPU_SCATTER");

for (j = jjj_st; j < jjj_st+ncpu_blks; ++j) {
Expand Down Expand Up @@ -471,7 +476,10 @@ if ( msg0 && msg2 ) { /* L(:,k) and U(k,:) are not empty. */
firstprivate(luptr,lptr) default (shared)
#endif
{
int thread_id = omp_get_thread_num();
int thread_id = 1;
#ifdef _OPENMP
thread_id = omp_get_thread_num();
#endif

int* indirect_thread = indirect + ldt*thread_id;
int* indirect2_thread = indirect2 + ldt*thread_id;
Expand Down
14 changes: 11 additions & 3 deletions SRC/zSchCompUdt-cuda.c
Original file line number Diff line number Diff line change
Expand Up @@ -284,13 +284,18 @@ if ( msg0 && msg2 ) { /* L(:,k) and U(k,:) are not empty. */
firstprivate(luptr,lptr) default (shared)
#endif
{
int thread_id = omp_get_thread_num();
int thread_id = 1;
int num_threads = 1;
#ifdef _OPENMP
thread_id = omp_get_thread_num();
num_threads = omp_get_num_threads();
#endif

int* indirect_thread = indirect + ldt*thread_id;
int* indirect2_thread = indirect2 + ldt*thread_id;
doublecomplex* tempv1;

if (ncpu_blks< omp_get_num_threads()) {
if (ncpu_blks< num_threads) {
// TAU_STATIC_TIMER_START("SPECIAL_CPU_SCATTER");

for (j = jjj_st; j < jjj_st+ncpu_blks; ++j) {
Expand Down Expand Up @@ -474,7 +479,10 @@ if ( msg0 && msg2 ) { /* L(:,k) and U(k,:) are not empty. */
firstprivate(luptr,lptr) default (shared)
#endif
{
int thread_id = omp_get_thread_num();
int thread_id = 1;
#ifdef _OPENMP
thread_id = omp_get_thread_num();
#endif

int* indirect_thread = indirect + ldt*thread_id;
int* indirect2_thread = indirect2 + ldt*thread_id;
Expand Down