     // determine total number of OpenMP threads, thread number,
     // associated core and hostname and print in correct order
 #ifdef _OPENMP
+    int j;
     int nthreads = omp_get_max_threads();
 #elif defined  __CUDACC__
     int num_devices=0;

            }
#elif defined __CUDACC__
            cpuid = sched_getcpu();
            printf("node %s, task %3d of %3d tasks, GPU %3d of %3d, on cpu %3d\n",
                    &node_name[0], task, ntasks, device, num_devices, cpuid);
#else //pure MPI
            cpuid = sched_getcpu();

//**************************************************************************************//
int main(int argc, char **argv)
{
    int i,l, task, ntasks, cpuid;
    char node_name[MPI_MAX_PROCESSOR_NAME];

    // determine MPI task and total number of MPI tasks
