/[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 1561 by ksteube, Wed May 21 06:58:52 2008 UTC revision 1567 by ksteube, Thu May 22 22:52:41 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];
42    
43      gethostname(hname, HOST_NAME_MAX);
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 53  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\n", omp_iam, omp_num, mpi_iam, mpi_num);      printf("printParallelThreadCounts: OpenMP=%d/%d MPI=%d/%d running on %s\n", omp_iam, omp_num, mpi_iam, mpi_num, hname);
60    }    }
61  }  }
62    

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

  ViewVC Help
Powered by ViewVC 1.1.26