concept % d thread(s in category parallel computing

appears as: %d thread(s
Parallel and High Performance Computing

This is an excerpt from Manning's book Parallel and High Performance Computing.

Listing 7.5 Changing single pragma to master pragma in ‘Hello OpenMP’
HelloOpenMP/HelloOpenMP_fix4.c
#include <stdio.h>
#include <omp.h>
 
int main(int argc, char *argv[]){
   #pragma omp parallel Spawn threads
   {
      int nthreads = omp_get_num_threads();
      int thread_id = omp_get_thread_num();
      #pragma omp master
      {
         printf("Goodbye slow serial world and Hello OpenMP!\n");
         printf("  I have %d thread(s) and my thread id is %d\n",nthreads,thread_id);
      }
   } Implied Barrier      Implied Barrier
}