/[escript]/trunk/escript/src/Utils.cpp
ViewVC logotype

Diff of /trunk/escript/src/Utils.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1567 by ksteube, Thu May 22 22:52:41 2008 UTC revision 1568 by ksteube, Sat May 24 03:15:08 2008 UTC
# Line 38  int getSvnVersion() Line 38  int getSvnVersion()
38  void printParallelThreadCnt()  void printParallelThreadCnt()
39  {  {
40    int mpi_iam=0, mpi_num=1;    int mpi_iam=0, mpi_num=1;
41    char hname[HOST_NAME_MAX];    char hname[64];
42    
43    gethostname(hname, HOST_NAME_MAX);    gethostname(hname, 64);
44    
45    #ifdef PASO_MPI    #ifdef PASO_MPI
46    MPI_Comm_rank(MPI_COMM_WORLD, &mpi_iam);    MPI_Comm_rank(MPI_COMM_WORLD, &mpi_iam);
# Line 56  void printParallelThreadCnt() Line 56  void printParallelThreadCnt()
56      omp_iam = omp_get_thread_num(); /* Call in a parallel region */      omp_iam = omp_get_thread_num(); /* Call in a parallel region */
57      omp_num = omp_get_num_threads();      omp_num = omp_get_num_threads();
58      #endif      #endif
59      printf("printParallelThreadCounts: OpenMP=%d/%d MPI=%d/%d running on %s\n", omp_iam, omp_num, mpi_iam, mpi_num, hname);      printf("printParallelThreadCounts: MPI=%d/%d OpenMP=%d/%d running on %s\n", mpi_iam, mpi_num, omp_iam, omp_num, hname);
60    }    }
61  }  }
62    

Legend:
Removed from v.1567  
changed lines
  Added in v.1568

  ViewVC Help
Powered by ViewVC 1.1.26