home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3 / MPI_Thread.z / MPI_Thread
Encoding:
Text File  |  2002-10-03  |  5.8 KB  |  133 lines

  1.  
  2.  
  3.  
  4. MMMMPPPPIIII____TTTThhhhrrrreeeeaaaadddd((((3333))))                                                    MMMMPPPPIIII____TTTThhhhrrrreeeeaaaadddd((((3333))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      MMMMPPPPIIII____TTTThhhhrrrreeeeaaaadddd - Returns MPI thread information
  10.  
  11.  
  12. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  13.      C:
  14.  
  15.           #include <mpi.h>
  16.  
  17.           int MPI_Init_thread(int *_a_r_g_c, char ***_a_r_g_v, int _r_e_q_u_i_r_e_d,
  18.           int *_p_r_o_v_i_d_e_d);
  19.  
  20.           int MPI_Query_thread(int *_p_r_o_v_i_d_e_d);
  21.  
  22.           int MPI_Is_thread_main(int *_f_l_a_g);
  23.  
  24.  
  25.      Fortran:
  26.  
  27.           INCLUDE "mpif.h" (or USE MPI)
  28.  
  29.           INTEGER _r_e_q_u_i_r_e_d, _p_r_o_v_i_d_e_d, _i_e_r_r_o_r
  30.           CALL MPI_INIT_THREAD(_r_e_q_u_i_r_e_d, _p_r_o_v_i_d_e_d, _i_e_r_r_o_r)
  31.  
  32.           INTEGER _p_r_o_v_i_d_e_d
  33.           CALL MPI_QUERY_THREAD(_p_r_o_v_i_d_e_d)
  34.  
  35.           LOGICAL _f_l_a_g
  36.           INTEGER _i_e_r_r_o_r
  37.           CALL MPI_IS_THREAD_MAIN(_f_l_a_g, _i_e_r_r_o_r)
  38.  
  39.  
  40. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  41.      The following MMMMPPPPIIII____TTTThhhhrrrreeeeaaaadddd routines return MPI thread information:
  42.  
  43.      MMMMPPPPIIII____IIIInnnniiiitttt____tttthhhhrrrreeeeaaaadddd     The MMMMPPPPIIII____IIIInnnniiiitttt____tttthhhhrrrreeeeaaaadddd routine initializes the MPI
  44.                          execution environment in the same way that a call to
  45.                          MMMMPPPPIIII____IIIINNNNIIIITTTT would. In addition, it initializes the
  46.                          thread environment.
  47.  
  48.                          This routine accepts the following parameters:
  49.  
  50.                               *   _a_r_g_c, which specifies a pointer to the
  51.                                   number of arguments.
  52.  
  53.                               *   _a_r_g_v, which specifies a pointer to the
  54.                                   argument vector.
  55.  
  56.                               *   _r_e_q_u_i_r_e_d, which specifies the desired level
  57.                                   of thread support. The following possible
  58.                                   values are listed in increasing order of
  59.                                   thread support:
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. MMMMPPPPIIII____TTTThhhhrrrreeeeaaaadddd((((3333))))                                                    MMMMPPPPIIII____TTTThhhhrrrreeeeaaaadddd((((3333))))
  71.  
  72.  
  73.  
  74.                                    MMMMPPPPIIII____TTTTHHHHRRRREEEEAAAADDDD____SSSSIIIINNNNGGGGLLLLEEEE:  Only one thread will
  75.                                    execute.
  76.  
  77.                                    MMMMPPPPIIII____TTTTHHHHRRRREEEEAAAADDDD____FFFFUUUUNNNNNNNNEEEELLLLEEEEDDDD:  The process can be
  78.                                    multithreaded, but only the main thread
  79.                                    will make MPI calls.
  80.  
  81.                                    MMMMPPPPIIII____TTTTHHHHRRRREEEEAAAADDDD____SSSSEEEERRRRIIIIAAAALLLLIIIIZZZZEEEEDDDD:  The process can be
  82.                                    multithreaded, and multiple threads can
  83.                                    make MPI calls, but only one at a time.
  84.                                    MPI calls are not made concurrently from
  85.                                    two distinct threads.
  86.  
  87.                                    MMMMPPPPIIII____TTTTHHHHRRRREEEEAAAADDDD____MMMMUUUULLLLTTTTIIIIPPPPLLLLEEEE:  Multiple threads can
  88.                                    call MPI.
  89.  
  90.                               *   _p_r_o_v_i_d_e_d, which specifies the actual level
  91.                                   of thread support provided by MPI. It can
  92.                                   have one of the four values in the previous
  93.                                   option list.
  94.  
  95.      MMMMPPPPIIII____QQQQuuuueeeerrrryyyy____tttthhhhrrrreeeeaaaadddd    The MMMMPPPPIIII____QQQQuuuueeeerrrryyyy____tttthhhhrrrreeeeaaaadddd routine returns, in _p_r_o_v_i_d_e_d,
  96.                          the current level of thread support.
  97.  
  98.      MMMMPPPPIIII____IIIIssss____tttthhhhrrrreeeeaaaadddd____mmmmaaaaiiiinnnn  The MMMMPPPPIIII____IIIIssss____tttthhhhrrrreeeeaaaadddd____mmmmaaaaiiiinnnn routine can be called by a
  99.                          thread to find out whether it is the main thread. The
  100.                          main thread is the thread that called MMMMPPPPIIII____IIIInnnniiiitttt or
  101.                          MMMMPPPPIIII____IIIInnnniiiitttt____tttthhhhrrrreeeeaaaadddd.  The answer is returned in _f_l_a_g.
  102.  
  103. NNNNOOOOTTTTEEEESSSS
  104.      MPI statistics (see the MMMMPPPPIIII____SSSSGGGGIIII____ssssttttaaaatttt man page) are not thread safe.
  105.  
  106. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  107.      MMMMPPPPIIII____SSSSGGGGIIII____ssssttttaaaatttt(3)
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.