8.1 Introduction
¡¡
8.2 Generalized Request
¡¡
ÀÌ
MPI-2 extensionÀÇ ¸ñÀûÀº »ç¿ëÀÚ°¡ »õ·Î¿î nonblocking operations¸¦ Á¤ÀÇÇϵµ·Ï Çϴµ¥ ÀÖ´Ù. ÀÌ·± nonblocking operationÀº generalized request¿¡ ÀÇÇØ Ç¥ÇöµÈ´Ù. nonblocking operationÀÇ ±âº»ÀûÀΠƯ¼ºÀº ÀÌ operationÀÇ ¿Ï¼ºÀ¸·ÎÀÇ ÁøÇàÀº asynchronousÇÏ°Ô ¹ß»ýÇÑ´Ù´Â °ÍÀÌ´Ù.regular request
¿¡ ´ëÇØ¼´Â request¿¡ °ü·ÃµÈ operationÀÌ MPI¿¡ ÀÇÇØ ¼öÇàµÇ°í generalized request¿¡ ´ëÇØ¼´Â ¾îÇø®ÄÉÀ̼ǿ¡ ÀÇÇØ ¼öÇàµÈ´Ù.¡¡
MPI_GREQUEST_START(query_fn, free_fn, cancel_fn, extra_state, request)
[IN query_fn] request status
°¡ ¿äûµÇ¾úÀ»¶§ ¹ß»ýÇÏ´Âcallback function[IN free_fn] request
°¡ freeµÇ¾úÀ» ¶§ ¹ß»ýÇÏ´Â callback function[IN cancel_fn] request
°¡ cancelµÇ¾úÀ» ¶§ ¹ß»ýÇÏ´Â callback function[IN extra_state] extra state
[OUT request] generalized request(handle)
¡¡
MPI_GREQUEST_COMPLETE(request)
[INOUT request] generalized request(handle)
ÀÌ
È£ÃâÀº MPI¿¡°Ô generalized request¿¡ ÀÇÇÑ operationÀÌ Á¾·áµÇ¾ú´Ù´Â °ÍÀ» ¾Ë·ÁÁØ´Ù.¡¡
8.3 Status
¿Í °ü·ÃµÈ Á¤º¸¡¡
MPI-1
¿¡¼ MPI_{TEST|WAIT}{ANY|SOME|ALL}ÀÇ È£ÃâÀº request¿¡ °ü·ÃµÈ Á¤º¸¸¦ returnÇÑ´Ù.MPI-2
¿¡¼ MPI_{TEST|WAIT}{ANY|SOME|ALL}ÀÇ È£ÃâÀº status objectÀÇ ¾î¶² fieldµµ ¼öÁ¤ÇÒ ¼ö ÀÖ´Ù.¡¡
MPI_STATUS_SET_ELEMENTS(status, datatype, count)
[INOUT status] status to asociate count with(Status)
[IN datatype] datatype associated with count(handle)
[IN count] number of element to associate with status(integer)
ÀÌ
È£ÃâÀº MPI_GET_ELEMENTS¿¡ ´ëÇÑ È£ÃâÀÌ count¸¦ returnÇϵµ·Ï statusÀÇ ºÒƯÁ¤ÇÑ ºÎºÐÀ» ¼öÁ¤ÇÑ´Ù.¡¡
MPI_STATUS_SET_CANCELLED(status, flag)
[INPUT status] status to associate cancel flag with (Status)
[IN flag] if true indicates request was cancelled(logical)
flag
ÀÌ true·Î ¼³Á¤µÇ¾ú´Ù¸é, À̾îÁö´Â MPI_TEST_CANCELLED(status, flag)¿¡ ´ëÇÑ È£Ãâ ¶ÇÇÑ flag=true¸¦ returnÇÒ °ÍÀÌ´Ù.¡¡
8.4 Naming Objects
¡¡
error reporting, debugging
¶Ç´Â profilingÀ» À§ÇÏ¿© »ç¿ëÀÚ°¡ MPI communicator¿Í ÇÔ²¾ ÇÁ¸°Æ®ÇÒ ¼ö ÀÖ´Â ½Äº°ÀÚ¸¦ »ç¿ëÇÒ ¼ö ÀÖ°Ô ÇÏ´Â °ÍÀÌ À¯¿ëÇÒ ¶§°¡ ÀÖ´Ù. À̰ÍÀº ¾Æ·¡ÀÇ µÎ functionÀ» ÀÌ¿ëÇÏ¿© ´Þ¼ºµÈ´Ù.¡¡
MPI_COMM_SETNAME(comm, comm_name)
[INOUT comm] communicator whose identifier is to be set (handle)
[IN comm_name] the character string which is remembered as the name (string)
¡¡
MPI_COMM_GET_NAME (comm, comm_name, resultlen)
[IN comm] communicator whose name is to be returned (handle)
[OUT comm_name] the name previously stored on the communicator, or an empty string if no such name exists (string)
[OUT resultlen] length of returned name (integer)
¡¡
8.5 Erro Classes, Erro Codes, and Error Handler
¡¡
Error
¿¡ °üÇÑ functionÀº ´ÙÀ½°ú °°´Ù.¡¡
¡¡
¡¡
MPI_ADD_ERROR_CLASS(erroclass)
[OUT errorclass] value for the new error class(integer)
»õ·Î¿î
error class¸¦ »ý¼ºÇÏ°í °ªÀ» return¡¡
MPI_ADD_ERROR_CODE(errorclass, errorcode)
[IN errorclass] error class (integer)
[OUT errorcode] new error code to associated with errorclass(integer)
errorclass
¿Í °ü·ÃµÈ error code¸¦ »ý¼ºÇϰí errorcode¾ÈÀÇ °ªÀ» returnÇÑ´Ù.¡¡
MPI_ADD_ERROR_STRING(errorcode, string)
[IN errorcode] error code or class(integer)
[IN string] text corresponding to errorcode(string)
error string
°ú error code³ª class¸¦ °ü·Ã½ÃŲ´Ù.¡¡
MPI_COMM_CALL_ERRHANDLER(comm, errorcode)
[IN comm] communicator with error handler(handle)
[IN errorcode] error code(integer)
°ø±ÞµÈ
error code¿Í ÇÔ²² communicator¿¡ ÇÒ´çµÈ error handler¸¦ ¹ß»ý½ÃŲ´Ù.¡¡
8.6 Decoding a Datatype
¡¡
MPI-1
¿¡¼´Â datatype¿¡ µé¾î°£ layout Á¤º¸´Â datatypeÀ¸·ÎºÎÅÍ decodeµÉ ¼ö ¾ø¾ú´Ù.´ÙÀ½ÀÇ
µÎ functionÀº datatypeÀ» decodeÇØ¼ ±×µéÀÇ Ãʱâ Á¤ÀÇ¿¡ »ç¿ëµÈ calling sequence¸¦ Àç¹ß»ý½Ãų ¼ö ÀÖ´Ù.¡¡
MPI_TYPE_GET_ENVELOPE(datatype, num_integers, num_addresses, num_ datatypes, combiner)
[IN datatype] datatype to access(handle)
[OUT num_integers] number of integers used in the call constructing combiner(nonnegative integer)
[OUT num_addresses] number of input addresses used in the call constructing combiner(nonnegative integer)
[OUT num_datatypes] number of input datatypes used in the call constructing combiner(nonnegative integer)
[OUT combiner] combiner(state)
datatype
À» »ý¼ºÇϴ ȣÃâ¿¡ »ç¿ëµÈ input argumentsÀÇ ¼ö¿Í type¿¡ °üÇÑ Á¤º¸¸¦ returnÇÑ´Ù.¡¡
MPI_TYPE_GET_CONTENTS(datatype, max_integers, max_addresses, max _datatyes, array_of_integers, array_of_addresses, array_of_datatypes)
[IN datatype] datatype to access(handle)
[IN max_integers] number of elements in array_of_integers(non-negative integers)
[IN max_addresses] number of elements in array_of_ addresses (non-negative integers)
[IN max_datatypes] number of elements in array_of_ datatypes (non-negative integers)
[OUT array_of_integers] contains integer arguments used in constructing datatype(array of integers)
[OUT array_of_ addresses] contains address arguments used in constructing datatype(array of integers)
[OUT array_of_ datatypes] contains datatype arguments used in constructing datatype(array of integers)
max_integers, max_addresses, max_datatypes
ÀÇ °ªµéÀº »ó´ëÀûÀ¸·Î num_integers, num_addresses, num_datatypes¿¡¼ returnµÈ °ªµé ÀÌ»óÀ̾î¾ß ÇÑ´Ù.¡¡
8.7 MPI and Threads
¡¡
ÀÌ
Àå¿¡¼´Â MPI call°ú threads°£ÀÇ »óÈ£ÀÛ¿ëÀ» Á¤ÀÇÇϰí thread¿¡ ÀûÇÕÇÑ MPI implementation°ú thread ȯ°æÀ» ÃʱâÈÇϱâÀ§ÇØ »ç¿ëµÉ¼ö ÀÖ´Â Á¤ÀÇµÈ ÇÔ¼ö¸¦ À§ÇÑ ¿ä±¸»çÇ×À» ³ª¿ÇÑ´Ù.¡¡
8.7.1 General
¡¡
Thread
¿¡ ÀûÇÕÇÑ implementation¿¡¼ MPI process´Â multi-thread processÀϼöµµ ÀÖ´Ù. °¢°¢ÀÇ thread´Â MPI callÀ» ÇÒ ¼ö ÀÖÁö¸¸ thread´Â °¢°¢ addressÇÒ ¼ö ¾ø´Ù.¡¡
8.7.2 Clarifications
¡¡
Initialization, Completion, MPI_FINALIZE
ÀÇ È£Ãâ µîÀº °°Àº thread¿¡¼ ¹ß»ýÇØ¾ß Çϴµ¥, À̰ÍÀ» main thread¶ó ÇÑ´Ù. ±× È£ÃâÀº ¸ðµç ÇÁ·Î¼¼½º thread°¡ MPI È£ÃâÀ» ³¡³»°í, ¹Ì°áµÈ Åë½ÅÀ̳ª I/O operationÀÌ ¾øÀ» ¶§ ¹ß»ýÇÒ ¼ö ÀÖ´Ù.¡¡
8.7.3 Initialization
¡¡
¾Æ·¡ÀÇ
functionÀº MPI_INIT´ë½Å¿¡ MPI¿Í, MPI thread ȯ°æÀ» ÃʱâÈÇÒ ¶§ »ç¿ëµÈ´Ù.¡¡
MPI_INIT_THREAD(required, provided)
[IN required] desired level of thread support(integer)
[OUT provided] provided level of thread support(integer)
¡¡
8.8 New Attribute Caching Functions
¡¡
MPI-2
¿¡¼´Â windows¿Í datatypes¿¡¼ÀÇ cachingÀÌ Ãß°¡µÈ´Ù.caching
Àº ¸ðµç handler ¶Ç´Â ÇϳªÀÇ handler¿¡ ¼±ÅÃÀûÀ¸·Î Çã¿ëµÉ ¼ö ÀÖ´Ù.¡¡
8.8.1 Communicators
¡¡
»õ·Î¿î
functionµéÀº ´ÙÀ½°ú °°´Ù.¡¡
MPI_COMM_CREATE_KEYVAL(comm_copy_attr_fn, comm_delete_attr_fn, comm_keyval, extra_state)
[ IN comm_copy_attr_fn] copy callback function for comm_keyval (function)
[ IN comm_delete_attr_fn] delete callback function for comm_keyval (function)
[ OUT comm_keyval] key value for future access (integer)
[ IN extra_state] extra state for callback functions
¡¡
8.8.2 Windows
¡¡
»õ·Î¿î
functionµéÀº ´ÙÀ½°ú °°´Ù.¡¡
MPI_WIN_CREATE_KEYVAL(win_copy_attr_fn, win_delete_attr_fn, win_keyval, extra_state)
[ IN win_copy_attr_fn] copy callback function for win_keyval (function)
[ IN win_delete_attr_fn] delete callback function for win_keyval (function)
[ OUT win_keyval] key value for future access (integer)
[ IN extra_state] extra state for callback functions
¡¡
8.8.3 Datatypes
¡¡
»õ·Î¿î
functionµéÀº ´ÙÀ½°ú °°´Ù.¡¡
MPI_TYPE_CREATE_KEYVAL(type_copy_attr_fn, type_delete_attr_fn, type_keyval, extra_state)
[ IN type_copy_attr_fn] copy callback function for type_keyval (function)
[ IN type_delete_attr_fn] delete callback function for type_keyval (function)
[ OUT type_keyval] key value for future access (integer)
[ IN extra_state] extra state for callback functions
¡¡
8.9 Duplicating a Datatype
¡¡
MPI_TYPE_DUP(type, newtype)
[ IN type] datatype (handle)
[ OUT newtype] copy of type (handle)
MPI_TYPE_DUP
´Â new type constructor·Î¼ key °ª°ú °ü·ÃµÈ Á¸ÀçÇÏ´Â typeÀ» º¹»çÇÑ´Ù.