commits
Threads by month
- ----- 2026 -----
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
November 2014
- 1 participants
- 74 discussions
[mpich] MPICH primary repository branch, master, updated. v3.2a2-27-gd5a4685
by noreply@mpich.org 28 Nov '14
by noreply@mpich.org 28 Nov '14
28 Nov '14
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "MPICH primary repository".
The branch, master has been updated
via d5a4685bf65bc28b1077d967244ea529af1bfc20 (commit)
via 26f9381c64b7d987eda3b2a93377ce8b98c57dc5 (commit)
via 5ad7c79e3dcd39830f4d79213672619ea6ae0242 (commit)
from 4ad367d0d17f6cecf5d0a9ce6def7d92779f7be2 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.mpich.org/mpich.git/commitdiff/d5a4685bf65bc28b1077d967244ea529a…
commit d5a4685bf65bc28b1077d967244ea529af1bfc20
Author: Pavan Balaji <balaji(a)anl.gov>
Date: Sat Nov 22 11:21:25 2014 -0600
Move static function to sit inside !defined MPICH_MPI_FROM_PMPI.
Signed-off-by: Wesley Bland <wbland(a)anl.gov>
diff --git a/src/mpi/comm/intercomm_merge.c b/src/mpi/comm/intercomm_merge.c
index 3159452..0b7b4a5 100644
--- a/src/mpi/comm/intercomm_merge.c
+++ b/src/mpi/comm/intercomm_merge.c
@@ -21,6 +21,12 @@ int MPI_Intercomm_merge(MPI_Comm intercomm, int high, MPI_Comm *newintracomm) __
/* -- End Profiling Symbol Block */
+/* Define MPICH_MPI_FROM_PMPI if weak symbols are not supported to build
+ the MPI routines */
+#ifndef MPICH_MPI_FROM_PMPI
+#undef MPI_Intercomm_merge
+#define MPI_Intercomm_merge PMPI_Intercomm_merge
+
/* This function creates VCRT for new communicator
* basing on VCRT of existing communicator.
*/
@@ -73,12 +79,6 @@ fn_fail:
return mpi_errno;
}
-/* Define MPICH_MPI_FROM_PMPI if weak symbols are not supported to build
- the MPI routines */
-#ifndef MPICH_MPI_FROM_PMPI
-#undef MPI_Intercomm_merge
-#define MPI_Intercomm_merge PMPI_Intercomm_merge
-
#undef FUNCNAME
#define FUNCNAME MPIR_Intercomm_merge_impl
#undef FCNAME
http://git.mpich.org/mpich.git/commitdiff/26f9381c64b7d987eda3b2a93377ce8b9…
commit 26f9381c64b7d987eda3b2a93377ce8b98c57dc5
Author: Pavan Balaji <balaji(a)anl.gov>
Date: Sat Nov 22 11:19:58 2014 -0600
No need to namespace a static function that is unused outside.
Also remove the function prototype declaration since it is not used
out-of-order.
Signed-off-by: Wesley Bland <wbland(a)anl.gov>
diff --git a/src/mpi/comm/intercomm_merge.c b/src/mpi/comm/intercomm_merge.c
index db320de..3159452 100644
--- a/src/mpi/comm/intercomm_merge.c
+++ b/src/mpi/comm/intercomm_merge.c
@@ -20,19 +20,16 @@ int MPI_Intercomm_merge(MPI_Comm intercomm, int high, MPI_Comm *newintracomm) __
#endif
/* -- End Profiling Symbol Block */
-/* These functions help implement the merge procedure */
-static int MPIR_Intercomm_merge_create_and_map_vcrt(MPID_Comm *comm_ptr, int local_high, MPID_Comm *new_intracomm_ptr);
-
/* This function creates VCRT for new communicator
* basing on VCRT of existing communicator.
*/
#undef FUNCNAME
-#define FUNCNAME MPIR_Intercomm_merge_create_and_map_vcrt
+#define FUNCNAME create_and_map_vcrt
#undef FCNAME
#define FCNAME MPIDI_QUOTE(FUNCNAME)
-static int MPIR_Intercomm_merge_create_and_map_vcrt(MPID_Comm *comm_ptr, int local_high, MPID_Comm *new_intracomm_ptr)
+static int create_and_map_vcrt(MPID_Comm *comm_ptr, int local_high, MPID_Comm *new_intracomm_ptr)
{
int mpi_errno = MPI_SUCCESS;
int i, j;
@@ -174,7 +171,7 @@ int MPIR_Intercomm_merge_impl(MPID_Comm *comm_ptr, int high, MPID_Comm **new_int
/* Now we know which group comes first. Build the new vcr
from the existing vcrs */
- mpi_errno = MPIR_Intercomm_merge_create_and_map_vcrt(comm_ptr, local_high, (*new_intracomm_ptr));
+ mpi_errno = create_and_map_vcrt(comm_ptr, local_high, (*new_intracomm_ptr));
if (mpi_errno) MPIU_ERR_POP(mpi_errno);
/* We've setup a temporary context id, based on the context id
@@ -208,7 +205,7 @@ int MPIR_Intercomm_merge_impl(MPID_Comm *comm_ptr, int high, MPID_Comm **new_int
(*new_intracomm_ptr)->context_id = new_context_id;
(*new_intracomm_ptr)->recvcontext_id = new_context_id;
- mpi_errno = MPIR_Intercomm_merge_create_and_map_vcrt(comm_ptr, local_high, (*new_intracomm_ptr));
+ mpi_errno = create_and_map_vcrt(comm_ptr, local_high, (*new_intracomm_ptr));
if (mpi_errno) MPIU_ERR_POP(mpi_errno);
mpi_errno = MPIR_Comm_commit((*new_intracomm_ptr));
http://git.mpich.org/mpich.git/commitdiff/5ad7c79e3dcd39830f4d79213672619ea…
commit 5ad7c79e3dcd39830f4d79213672619ea6ae0242
Author: Pavan Balaji <balaji(a)anl.gov>
Date: Sat Nov 22 11:07:46 2014 -0600
Remove old unused errnames.
Signed-off-by: Wesley Bland <wbland(a)anl.gov>
diff --git a/src/mpi/errhan/errnames-old.txt b/src/mpi/errhan/errnames-old.txt
deleted file mode 100644
index 213b2c8..0000000
--- a/src/mpi/errhan/errnames-old.txt
+++ /dev/null
@@ -1,286 +0,0 @@
-# These are unused error names, saved in case they're added again
-**abort:application called MPI_ABORT
-**allocmem %d %d:Unable to allocate %d memory for MPI_Alloc_mem; only %d available
-**argaddress:Address of location given to MPI_ADDRESS does not fix in a \
-Fortran integer
-**argaddress %ld:Address of location given to MPI_ADDRESS does not fix in a \
-Fortran integer (value is %ld)
-**argarray:Invalid value in array
-**argarray %s %d %d:Invalid value in %s[%d] = %d
-**argnamed:Invalid argument
-**argnamed %s %d:Invalid argument %s with value %d
-#
-# ch3:essm
-#
-**argstr_shmevent:shared memory event not found in the business card
-**event_create:unable to create an event
-**event_open:unable to open an event
-**event_reset:unable to reset an event
-**event_set:unable to set an event
-**event_wait:unable to wait on an event
-**postwrite:postwrite failed
-**postwrite %p %p:postwrite failed (%p %p)
-#
-**attrcopy:User defined attribute copy routine returned a non-zero return code
-**attrcopy %d:User defined attribute copy routine returned a non-zero return code %d
-**bad_conn:bad conn structure pointer
-**bad_conn %p %p:bad conn structure pointer (%p != %p)
-**badpacket:Received a packet of unknown type
-**badpacket %d:Received a packet of unknown type (%d)
-**bad_sock %d %d:bad sock (%d != %d)
-**base %d:Invalid base address %d
-**boot_attach:failed to attach to a bootstrap queue
-**boot_attach %s:failed to attach to a bootstrap queue - %s
-**bootqmsg %d %d:invalid bootstrap queue message size (%d bytes > %d)
-**bsendnobuf:No buffer to detach.
-**bufalias %s %s:Buffer parameters %s and %s must not be aliased
-**bufsize:Invalid buffer size
-**bufsize %d:Invalid buffer size (value is %d)
-**ca:invalid completion action
-**ca %d:invalid completion action (%d)
-**cancelperrecv:Cancellation of persistent receive requests is not supported
-**cancelpersend:Cancellation of persistent send requests is not supported
-**cancelsend:Cancellation of send requests is not supported
-# CH3:rdma
-**ch3_finalize:Channel finalization failed
-**ch3progress:Unable to make message passing progress
-**ch3progress %d:Channel progress engine failed on line %d
-**ch3_init:Channel init failed
-**ch3_send:send failed
-**read_progress:Unable to make read progress
-**handle_read:Unable to handle the read data
-**process_group:Process group initialization failed
-**rdma_finalize:Channel rdma finalization failed
-**rdma_init:Channel rdma initialization failed
-**poke:progress_poke failed
-**postpkt:Unable to post a read for the next packet header
-**write_progress:Write progress failed
-#
-**ch3|putpkt:UNIMPLEMENTED: unable to handling put packets
-**ch3|sock|addrinuse %d:[ch3:sock] tcp port %d already in use
-**ch3|sock|badbuscard:[ch3:sock] GetHostAndPort - Invalid business card
-**ch3|sock|badbuscard %s:[ch3:sock] GetHostAndPort - Invalid business card (%s)
-**ch3|sock|bizcard_cache:business card does not match the one in the cache
-**ch3|sock|bizcard_cache %s %s:business card in cache: %s, business card passed: %s
-**ch3|sock|connallocfailed:[ch3:sock] unable to allocate a connection structure
-**ch3|sock|connfailed %d %d:[ch3:sock] failed to connnect to remote process %d:%d
-**ch3|sock|hostlookup %s %d %s:[ch3:sock] failed to obtain host information for process %s:%d (%s)
-#
-**fcntl:fcntl failed
-**needthreads:This function needs threads and threads have not been enabled
-**winpassive:Attempt to use passive target access with a window not allocated \
-with MPI_Alloc_mem.
-**namepublish %s:Unable to publish service name %s
-**spawnfail:Could not spawn all requested processes
-**failure:unknown failure
-**post_write %p %p:Unable to post a write (%p %p)
-**socket %d:WSASocket failed (errno %d)
-**shmq:invalid shm queue pointer
-**mx_get_info:mx_get_info failed
-**internrc %d:Internal MPI error! Unexpected return code from internal function (rc=%d).
-**mpi_status_f2c:MPI_Status_f2c failed
-**hostlookup:Host lookup failed
-**mpi_wtick:MPI_Wtick failed
-**ioneedwr:Write access is required to this file
-**winnamelen:Specified window object name is too long
-**mpi_type_test:MPI_Type_test failed
-**iofstype:Cannot determine filesystem type
-**countarray:Invalid count in count array
-**dimstensor %d %d:Tensor product size is %d but must be the same as the number of \
- nodes, which is %d
-**shmctl %d:shmctl failed, error %d
-**keyvalwin:Keyval is not in window object
-**rangeinvalid:Invalid range
-**f90typetoomany %s %d:Too many requests for unnamed, predefined f90 %s \
- types; no more than %d allowed.
-**nameservice %s:Invalid service name %s (see MPI_Publish_name)
-**namepublish:Unable to publish service name
-**connclose:active connection unexpectedly closed
-**mpi_pcontrol %d:MPI_Pcontrol(level=%d) failed
-**dtypecomm:Pack buffer not packed for this communicator.
-**spawnpgm:The named program could not be found
-**listen %d:listen failed (errno %d)
-**badsock:internal error - bad sock
-**pkt_type:invalid packet type
-**pkt_type %d:invalid packet type (%d)
-**connterm:active connection unexpectedly terminated
-**opundefined_rma %d:RMA target received unknown RMA operation type %d
-**duphandle %d:unable to duplicate a handle (errno %d)
-**keyvalperm:Cannot free permanent attribute key
-**inet_ntop:inet_ntop failed
-**notsamevalue:Arguments to collective routine must be the same
-**invalid_shmq:invalid shm queue pointer
-**startup:Error on startup, such as a \
- mismatch between mpiexec and the MPI libraries
-**ioamodeseq %s:Cannot use function %s when the file is opened with amode \
- MPI_MODE_SEQUENTIAL
-**preinit %s:MPI_Init or MPI_Init_thread must be called before %s
-**rootlarge:Value of root is too large
-**dtypepermcontents:Cannot get contents of a permanent or basic data type
-**connfailed %d %d:Failed to connect to remote process %d-%d
-**fcntl %s:fcntl failed - %s
-**getinfo %d:getaddrinfo failed (errno %d)
-**contextIdInUse:Context id already in use
-**mpi_wtime:MPI_Wtime failed
-**intracomm:Intracommunicator is not allowed
-**infovallong %s %d %d:Value %s is too long (length is %d but maximum length is %d)
-**sock_gethost %d:gethostname failed (errno %d)
-**intercommcoll %s:Intercommunicator collective operation for %s has not been implemented
-**iofilenull:Null file handle
-**sock_iocp:unable to create an I/O completion port
-**dev|pg_destroy|pg_not_found:process group being destroyed was not in the process group list
-**dev|pg_destroy|pg_not_found %p:process group being destroyed was not in the process group list (pg=%p)
-**servicename %s:Attempt to lookup an unknown service name %s
-**multi_post_write:posting a write while a previously posted write is outstanding
-**mx_get_info %s:mx_get_info failed (%s)
-**statusignore:Invalid use of MPI_STATUS_IGNORE or MPI_STATUSES_IGNORE
-**gethostbyname %d:gethostbyname failed (errno %d)
-**fileopunsupported %s:Unsupported file operation %s
-**notsameorder:Collective routines called in an inconsistent order
-#**notsameorder:Collective routines called in an inconsistent order (optional arguments: null terminated
-# array of names (array of string))
-**sock_byname %d:gethostbyname failed (errno %d)
-**sockw_badwsethnd: Invalid handle to waitSet
-**mpi_pcontrol:MPI_Pcontrol failed
-**failure %d:unknown failure, error %d
-**shmdt %s:shmdt failed - %s
-**preinit:MPI_Init or MPI_Init_thread must be called first
-**not_in_local_ranks:cannot find our rank in the list of local processes
-**inet_pton %s:inet_pton failed - %s
-**fileinuse %s:File %s is in use by some process
-**ioasyncwaiting:There are outstanding nonblocking I/O operations on this file
-**init_comm_create:unable to create an intercommunicator for the parent
-**post_sock_write_on_shm:posting a socket read on a shm connection
-**rootlarge %d %d:Value of root is too large (value is %d but must be less than %d)
-**mx_wait:mx_wait failed
-**init_strtok_host:failed to copy the hostname from the business card
-**iosequnsupported %s:MPI_MODE_SEQUENTIAL not supported on file system %s
-**keyvalcomm:Keyval is not in communicator
-**commpeer:Peer communicator is not valid
-**iofstypeunsupported %s:Specified filesystem %s is not available
-**GetMemTwice:Global shared memory initializer called more than once
-**inet_addr %s %s %d: inet_addr on %s failed, %s (errno %d)
-**othersys %s:System resource (%s) limit exceeded
-**getsockopt %s:getsockopt failed - %s
-**filenospace %s %d %d:Not enough space for file %s; %d needed but only %d available
-**ibv_open_device %p:ibv_open_device failed got list (%p)
-**init_comm_create %d:unable to create an intercommunicator for the parent (error %d)
-**ibu_op:invalid infiniband operation
-**iofilecorrupt:File corrupt
-**shutdown %d:shutdown failed (errno %d)
-**sock_iocp %d:unable to create an I/O completion port (errno %d)
-**post_write:Unable to post a write
-**keyvaldtype:Keyval is not in datatype
-**errhandlerperm:Cannot free permanent error handler
-**closesocket %d:closesocket failed (errno %d)
-**shm_wait:wait function failed
-**opundefined_rma:RMA target received unknown RMA operation
-**ibwrite:infiniband write failed
-**ioneedrdwr:Read/write access is required to this file
-**dimsarray %d %d:Value of dims[%d] is %d which is invalid
-**select %s:select failed - %s
-**iodispnotcurrent:Displacement must be set to MPI_DISPLACEMENT_CURRENT \
- since file was opened with MPI_MODE_SEQUENTIAL
-**connfailed:Failed to connect to remote process
-**dtypeperm %s:Cannot free permanent data type %s
-**mpi_status_c2f:MPI_Status_c2f failed
-**boot_tostring:unable to get a string representation of the boostrap queue
-**porttimeout:Time out attempting an MPI_Comm_connect to a port
-**contextIdNotInUse %d:Context id %d to be freed is not in use
-**dtypepermcontents %s:Cannot get contents of a permanent or basic data type %s
-**countarray %d %d:Invalid count in the %d element of the count array; value \
-is %d
-**mpi_status_c2f %p %p:MPI_Status_c2f(c_status=%p, f_status=%p) failed
-**conn_still_active:connection closed while still active
-**sock_post_close %d:posting a close of the socket failed (errno %d)
-**servicenameunpublish:Attempt to unpublish an unknown service name
-**grapharraysize:Specified edge less than zero or greater than nnodes
-**commname:Cannot set name in communicator
-**dimsarray:Invalid dimension argument in array
-**infokeylong %s %d %d:Key %s is too long (length is %d but maximum allowed is %d)
-**count %d:Invalid count, value = %d
-**invalid_refcount %d %p %d:invalid reference count (handle=%d, object=%p, count=%d)
-**sock_create %d:unable to create a socket (errno %d)
-**nouniquehigh:Could not determine which group to place first in merged \
- intracommunicator. Please use the parameter high to choose which group \
- should be placed first.
-**mx_test:mx_test failed
-**mx_test %s:mx_test failed (%s)
-**dtypenullarray:Null datatype in array of datatypes
-**dimstensor:Tensor product size does not match nnodes
-**spawnpgm %s:The program %s could not be found
-**hostlookup %d %d %s:Host lookup failed for process group %d, rank %d, business card <%s>
-**commlocalnull:Local communicator must not be MPI_COMM_NULL
-**init_vcrdup:failed to duplicate the virtual connection reference
-**sock_wait:sock_wait failed
-**invalid_handle %d %p:invalid handle (handle=%d, object=%p)
-**connrefused %d %d %s:Connection refused for process group %d, rank %d, business card <%s>
-**grapharraysize %d %d %d:Specified edge %d is %d but must be at least zero \
- and less than %d
-**init_strtok_host %s:failed to copy the hostname from this business card: %s
-**contextIdNotInUse:Context id to be freed is not in use
-**fileexist %s:File %s exists
-**filerdonly %s:Read-only file or filesystem name %s
-**notsameroot:Inconsistent root
-**wsasock %d:WSAStartup failed (errno %d)
-**contextIdInUse %d:Context id %d already in use
-**mpi_status_f2c %p %p:MPI_Status_f2c(f_status=%p, c_status=%p) failed
-**rsendnomatch %d %d %d:Ready send from source %d, for destination %d and \
- with tag %d had no matching receive
-**iocp %d:unable to create an I/O completion port (errno %d)
-**winnotinit: Attempt to use an MPI RMA function that requires an MPI Window \
- object before creating any MPI Window object
-**inet_ntop %s:inet_ntop failed - %s
-**finalize_progress:finalizing the progress engine failed
-**inet_pton:inet_pton failed
-**filenull:Null MPI_File
-**mx_wait %s:mx_wait failed (%s)
-**nomem %d %d:Out of memory (requested %d but only %d available)
-**fileamode %d:Invalid amode value of %d in MPI_File_open
-**ibu_op %d:invalid infiniband operation (%d)
-**dtypenomatch:Type signatures do not match in communication
-**shmdt:shmdt failed
-**winname:Cannot set window object name
-**multi_post_read:posting a read while a previously posted read is outstanding
-**progress_finalize:finalization of the progress engine failed
-**iofstype %s:Cannot determine filesystem type for file %s
-**keyvalnull:Null keyval
-**startup %s:Error on startup: reason is %s
-**porttimeout %s:Time out attempting an MPI_Comm_connect to a port named %s
-**invalid_listener:invalid listener
-**invalid_listener %p:invalid listener (%p)
-**invalid_shmq %p %p:invalid shm queue pointer (%p != %p)
-**freemembase:Invalid base address in MPI_Free_mem
-**spawnmanager:The process manager returned an error
-**spawnmanager %s:The process manager returned an error: %s
-**commnamelen:Specified communicator name is too long
-**commnamelen %d:Specified communicator name is too long (%d characters)
-**connallocfailed:Connection failed
-**connrefused:Connection refused
-**datarepunsupported %s:Unsupported datarep %s passed to MPI_File_set_view
-**errhandlerperm %s:Cannot free permanent error handler %s
-**filequota %s:Quota %s exceeded for files
-**intercommcoll:Intercommunicator collective operations have not been implemented
-**intercomm:Intercommunicator is not allowed
-**iosharedunsupported %s:Shared file pointers not supported on filesystem %s
-**notsamevalue %s %s:Argument %s to collective routine %s must be the same
-**othersys:System resource limit exceeded
-**pfinal_sockclose:sock_close failed
-**servicenameunpublish %s:Attempt to unpublish an unknown service name %s
-**setsockopt %s:setsockopt failed - %s
-**shmq %p %p:invalid shm queue pointer (%p != %p)
-**shmw_serbufsmall: Size of buffer to serialize shared memory handle \
-is too small (< MPIU_SHMW_GHND_SZ)
-**sock_byname:gethostbyname failed
-**sock_byname %s %d:gethostbyname failed, %s (errno %d)
-**sock_connect %d:connect failed (errno %d)
-**sock_connect %s %d %d:unable to connect to %s on port %d, error %d
-**sockw_badtvalhnd: Invalid handle to timeval
-**sockw_badwsetshnd: Invalid handle to waitSet sock handle
-**winnamelen %d:Specified window object name is too long (%d characters)
-**ch3ireadaggressive:aggressive reading failed
-**dtypename:Cannot set name in data type
-**dtypenullarray %s %d:Null datatype in array of datatypes %s[%d]
-**dev|pg_destroy_failed:attempt to destroy a process group failed
-**dev|pg_destroy_failed %p:attempt to destroy a process group failed (pg=%p)
-**pmi_kvs_get_parent %d:unable to get the PARENT_ROOT_PORT_NAME from the keyval space (pmi_error %d)
diff --git a/src/mpid/ch3/errnames-old.txt b/src/mpid/ch3/errnames-old.txt
deleted file mode 100644
index 6370c9c..0000000
--- a/src/mpid/ch3/errnames-old.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-# Previously used error names
-**ch3|badca %d:specified completion action in not known (%d)
-**ch3|badca:specified completion action in not known
-**ch3|canceleager:failure occurred while performing local cancellation of a eager message
-**ch3|flowcntlpkt:UNIMPLEMENTED: unable to handle flow control packets
-**ch3|get_parent_port_err_bcast:an error occurred while broadcasting the error code from MPIDI_CH3_GetParentPort()
-**ch3|get_universe_size_notimpl: MPIDI_CH3_Get_universe_size() is not implemented
-**ch3|loadrecviov %s:failure occurred while loading the receive I/O vector (%s)
-**ch3|recvdata:failure occurred while attempting to receive message data
-**ch3|recvdata %s:failure occurred while attempting to receive message data (%s)
-**ch3|unknownpkt:received unknown packet type
-**ch3|unknownpkt %d:received unknown packet type (type=%d)
diff --git a/src/mpid/ch3/util/sock/errnames-old.txt b/src/mpid/ch3/util/sock/errnames-old.txt
deleted file mode 100644
index 57d9cf4..0000000
--- a/src/mpid/ch3/util/sock/errnames-old.txt
+++ /dev/null
@@ -1,19 +0,0 @@
-# No longer used error strings
-**ch3|sock|connfailed %s %d:[ch3:sock] failed to connnect to remote process %s:%d
-**ch3|sock|pg_limit:reached the limit of process groups for spawn/connect/accept
-**ch3|sock|pgrank:rank must be less than process group size
-**ch3|sock|pgrank %d %d:pg size %d, rank passed %d
-**ch3|sock|pgrank_cache:rank must be less than process group size in the cache
-**ch3|sock|pgrank_cache %d %d:pg size in cache %d, rank passed %d
-**ch3|sock|pgsize:process group sizes don't match
-**ch3|sock|pgsize %d %d:existing pg size %d, matching pg size %d
-**ch3|sock|postwrite %p %p %p:attempt to post a write operation failed (sreq=%p,conn=%p,vc=%p)
-**ch3|sock|progress_finalize:[ch3:sock] progress_finalize failed
-**ch3|sock|strdup:[ch3:sock] MPIU_Strdup failed
-**ch3|sock|immedread %p %p %p:immediate read operation failed (rreq=%p,conn=%p,vc=%p)
-**ch3|sock|immedwrite %p %p %p:immediate write operation failed (rreq=%p,conn=%p,vc=%p)
-**ch3|sock|pg_finalize:process group finalization failed
-**ch3|sock|pgsize_cache:process group size does not match the one in the cache
-**ch3|sock|pgsize_cache %d %d:size in cache %d, size passed %d
-**ch3|sock|post_write:[ch3:sock] posting a write failed
-**ch3|sock|postread %p %p %p:attempt to post a read operation failed (rreq=%p,conn=%p,vc=%p)
diff --git a/src/mpid/common/sock/errnames-old.txt b/src/mpid/common/sock/errnames-old.txt
deleted file mode 100644
index dfb1210..0000000
--- a/src/mpid/common/sock/errnames-old.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-# Unused error strings
-**sock|badbuf %d %d:the supplied buffer contains invalid memory (set=%d,sock=%d)
-**sock|closed:sock has been closed locally
-**sock|connfailed %d %d:connection failure (set=%d,sock=%d)
-**sock|hostres:unable to resolve host name to an address
-**sock|osnomem %d %d:operating system routine failed due to lack of memory (set=%d,sock=%d)
-
diff --git a/src/mpid/common/sock/poll/errnames-old.txt b/src/mpid/common/sock/poll/errnames-old.txt
deleted file mode 100644
index e53dc70..0000000
--- a/src/mpid/common/sock/poll/errnames-old.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-# Unused error names
-**sock|poll|hostres %d %d %s:unable to resolve host name to an address (set=%d,sock=%d,host=%s)
-**sock|poll|oserror %s %d %s:unexpected operating system error from %s (errno=%d:%s)
diff --git a/src/pmi/errnames-old.txt b/src/pmi/errnames-old.txt
deleted file mode 100644
index 3c09d43..0000000
--- a/src/pmi/errnames-old.txt
+++ /dev/null
@@ -1,16 +0,0 @@
-# Unused pmi error names
-**pmi_finalize:PMI_Finalize failed
-**pmi_finalize %d:PMI_Finalize returned %d
-**pmi_initialized:PMI_Initialized failed
-**pmi_initialized %d:PMI_Initialized returned %d
-**pmi_kvs_create:PMI_KVS_Create failed
-**pmi_kvs_create %d:PMI_KVS_Create returned %d
-**pmi_kvs_destroy %d:PMI_KVS_Destroy returned %d
-**pmi_kvs_get %s %s %d:PMI_KVS_Get(%s, %s) returned %d
-**pmi_kvs_iter_first:PMI_KVS_iter_first failed
-**pmi_kvs_iter_first %s %d:PMI_KVS_iter_first(%s) returned %d
-**pmi_kvs_iter_first %d:PMI_KVS_iter_first returned %d
-**pmi_kvs_iter_next %s %d:PMI_KVS_iter_next(%s) returned %d
-**pmi_kvs_put %s %s %s %d:PMI_KVS_Put(%s, %s, %s) returned %d
-**pmi_kvs_iter_next:PMI_KVS_iter_next failed
-**pmi_kvs_iter_next %d:PMI_KVS_iter_next returned %d
-----------------------------------------------------------------------
Summary of changes:
src/mpi/comm/intercomm_merge.c | 21 +--
src/mpi/errhan/errnames-old.txt | 286 ----------------------------
src/mpid/ch3/errnames-old.txt | 12 --
src/mpid/ch3/util/sock/errnames-old.txt | 19 --
src/mpid/common/sock/errnames-old.txt | 7 -
src/mpid/common/sock/poll/errnames-old.txt | 3 -
src/pmi/errnames-old.txt | 16 --
7 files changed, 9 insertions(+), 355 deletions(-)
delete mode 100644 src/mpi/errhan/errnames-old.txt
delete mode 100644 src/mpid/ch3/errnames-old.txt
delete mode 100644 src/mpid/ch3/util/sock/errnames-old.txt
delete mode 100644 src/mpid/common/sock/errnames-old.txt
delete mode 100644 src/mpid/common/sock/poll/errnames-old.txt
delete mode 100644 src/pmi/errnames-old.txt
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.2a2-24-g4ad367d
by noreply@mpich.org 26 Nov '14
by noreply@mpich.org 26 Nov '14
26 Nov '14
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "MPICH primary repository".
The branch, master has been updated
via 4ad367d0d17f6cecf5d0a9ce6def7d92779f7be2 (commit)
via 131828204ccab2e9d4f5b4620c3a5727bc60e80a (commit)
from cff52d18350ea48bf03fd5badc6b800866028be7 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.mpich.org/mpich.git/commitdiff/4ad367d0d17f6cecf5d0a9ce6def7d927…
commit 4ad367d0d17f6cecf5d0a9ce6def7d92779f7be2
Author: Wesley Bland <wbland(a)anl.gov>
Date: Wed Nov 26 15:58:15 2014 -0500
Add agree_shrink to testlist
This test was left out of the testlist for some reason
No reviewer
diff --git a/test/mpi/ft/testlist b/test/mpi/ft/testlist
index 67676f3..52dde9a 100644
--- a/test/mpi/ft/testlist
+++ b/test/mpi/ft/testlist
@@ -16,4 +16,5 @@ anysource 3 env=MPIR_CVAR_ENABLE_FT=1 mpiexecarg=-disable-auto-cleanup resultTes
revoke_nofail 2 env=MPIR_CVAR_ENABLE_FT=1 strict=false timeLimit=10
shrink 8 env=MPIR_CVAR_ENABLE_FT=1 mpiexecarg=-disable-auto-cleanup resultTest=TestStatusNoErrors strict=false timeLimit=10
agree 4 env=MPIR_CVAR_ENABLE_FT=1 mpiexecarg=-disable-auto-cleanup resultTest=TestStatusNoErrors strict=false timeLimit=10
+agree_shrink 4 env=MPIR_CVAR_ENABLE_FT=1 mpiexecarg=-disable-auto-cleanup resultTest=TestStatusNoErrors strict=false timeLimit=10
revoke_shrink 4 env=MPIR_CVAR_ENABLE=1 mpiexecarg=-disable-auto-cleanup resultTest=TestStatusNoErrors strict=false timeLimit=10 xfail=2198
http://git.mpich.org/mpich.git/commitdiff/131828204ccab2e9d4f5b4620c3a5727b…
commit 131828204ccab2e9d4f5b4620c3a5727bc60e80a
Author: Wesley Bland <wbland(a)anl.gov>
Date: Wed Nov 26 10:33:35 2014 -0500
Fix bug in shrink when serializing failed procs
The function to convert the group of failed procs to a bitarray was
incorrectly quiting early if one of the globally known failed processes
was not in the communciator being dealt with.
Signed-off-by: Ken Raffenetti <raffenet(a)mcs.anl.gov>
diff --git a/src/mpi/comm/comm_shrink.c b/src/mpi/comm/comm_shrink.c
index 6bdd987..631edb5 100644
--- a/src/mpi/comm/comm_shrink.c
+++ b/src/mpi/comm/comm_shrink.c
@@ -50,7 +50,7 @@ int MPIR_Comm_shrink(MPID_Comm *comm_ptr, MPID_Comm **newcomm_ptr)
int mpi_errno = MPI_SUCCESS;
MPID_Group *global_failed, *comm_grp, *new_group_ptr;
int attempts = 0;
- mpir_errflag_t errflag = MPIR_ERR_NONE, tmp_errflag = MPIR_ERR_NONE;
+ mpir_errflag_t errflag = MPIR_ERR_NONE;
MPID_MPI_STATE_DECL(MPID_STATE_MPIR_COMM_SHRINK);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPIR_COMM_SHRINK);
@@ -59,7 +59,9 @@ int MPIR_Comm_shrink(MPID_Comm *comm_ptr, MPID_Comm **newcomm_ptr)
MPIR_Comm_group_impl(comm_ptr, &comm_grp);
do {
- mpi_errno = MPID_Comm_get_all_failed_procs(comm_ptr, &global_failed, MPIR_SHRINK_TAG);
+ errflag = MPIR_ERR_NONE;
+
+ MPID_Comm_get_all_failed_procs(comm_ptr, &global_failed, MPIR_SHRINK_TAG);
/* Ignore the mpi_errno value here as it will definitely communicate
* with failed procs */
@@ -68,10 +70,15 @@ int MPIR_Comm_shrink(MPID_Comm *comm_ptr, MPID_Comm **newcomm_ptr)
if (MPID_Group_empty != global_failed) MPIR_Group_release(global_failed);
mpi_errno = MPIR_Comm_create_group(comm_ptr, new_group_ptr, MPIR_SHRINK_TAG, newcomm_ptr);
- errflag = mpi_errno || *newcomm_ptr == NULL;
+ if (*newcomm_ptr == NULL) {
+ errflag = MPIR_ERR_PROC_FAILED;
+ } else if (mpi_errno) {
+ errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIR_Comm_release(*newcomm_ptr, 0);
+ }
mpi_errno = MPIR_Allreduce_group(MPI_IN_PLACE, &errflag, 1, MPI_INT, MPI_MAX, comm_ptr,
- new_group_ptr, MPIR_SHRINK_TAG, &tmp_errflag);
+ new_group_ptr, MPIR_SHRINK_TAG, &errflag);
MPIR_Group_release(new_group_ptr);
if (errflag) MPIU_Object_set_ref(new_group_ptr, 0);
diff --git a/src/mpid/ch3/src/mpid_comm_get_all_failed_procs.c b/src/mpid/ch3/src/mpid_comm_get_all_failed_procs.c
index 4cacc76..43a2faf 100644
--- a/src/mpid/ch3/src/mpid_comm_get_all_failed_procs.c
+++ b/src/mpid/ch3/src/mpid_comm_get_all_failed_procs.c
@@ -33,7 +33,8 @@ static int *group_to_bitarray(MPID_Group *group, MPID_Comm *orig_comm) {
MPIR_Group_translate_ranks_impl(group, group->size, group_ranks,
orig_comm->local_group, comm_ranks);
- for (i = 0; i < group->size && comm_ranks[i] != MPI_UNDEFINED; i++) {
+ for (i = 0; i < group->size ; i++) {
+ if (comm_ranks[i] == MPI_UNDEFINED) continue;
index = comm_ranks[i] / 32;
mask = 0x80000000 >> comm_ranks[i] % 32;
bitarray[index] |= mask;
@@ -128,7 +129,7 @@ int MPID_Comm_get_all_failed_procs(MPID_Comm *comm_ptr, MPID_Group **failed_grou
/* Send the list to each rank to be processed locally */
mpi_errno = MPIC_Send(bitarray, bitarray_size, MPI_UINT32_T, i,
tag, comm_ptr->handle, &errflag);
- if (mpi_errno) errflag = 1;
+ if (mpi_errno) errflag = MPIR_ERR_PROC_FAILED;
}
/* Convert the bitarray into a group */
@@ -137,12 +138,10 @@ int MPID_Comm_get_all_failed_procs(MPID_Comm *comm_ptr, MPID_Group **failed_grou
/* Send my bitarray to rank 0 */
mpi_errno = MPIC_Send(bitarray, bitarray_size, MPI_UINT32_T, 0,
tag, comm_ptr->handle, &errflag);
- if (mpi_errno) errflag = 1;
/* Get the resulting bitarray back from rank 0 */
mpi_errno = MPIC_Recv(remote_bitarray, bitarray_size, MPI_UINT32_T, 0,
tag, comm_ptr->handle, MPI_STATUS_IGNORE, &errflag);
- if (mpi_errno) errflag = 1;
/* Convert the bitarray into a group */
*failed_group = bitarray_to_group(comm_ptr, remote_bitarray);
-----------------------------------------------------------------------
Summary of changes:
src/mpi/comm/comm_shrink.c | 15 +++++++++++----
src/mpid/ch3/src/mpid_comm_get_all_failed_procs.c | 7 +++----
test/mpi/ft/testlist | 1 +
3 files changed, 15 insertions(+), 8 deletions(-)
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.2a2-22-gcff52d1
by noreply@mpich.org 26 Nov '14
by noreply@mpich.org 26 Nov '14
26 Nov '14
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "MPICH primary repository".
The branch, master has been updated
via cff52d18350ea48bf03fd5badc6b800866028be7 (commit)
from dc1eb333f5961cdba9d952ff5017c0d06625d9e8 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.mpich.org/mpich.git/commitdiff/cff52d18350ea48bf03fd5badc6b80086…
commit cff52d18350ea48bf03fd5badc6b800866028be7
Author: Wesley Bland <wbland(a)anl.gov>
Date: Tue Nov 25 21:55:42 2014 -0500
MPID_Request_is_pending_failure always returns 0 in pamid
Since pamid doesn't include any of the fault tolerance functions, it
should never say that a message is pending failure. We also can't call
abort in here since the function is usind at the MPI layer.
Signed-off-by: Paul Coffman <pkcoff(a)us.ibm.com>
diff --git a/src/mpid/pamid/src/misc/mpid_unimpl.c b/src/mpid/pamid/src/misc/mpid_unimpl.c
index c43e10e..0bd954b 100644
--- a/src/mpid/pamid/src/misc/mpid_unimpl.c
+++ b/src/mpid/pamid/src/misc/mpid_unimpl.c
@@ -104,6 +104,7 @@ int MPID_Comm_revoke(MPID_Comm *comm_ptr, int is_remote)
int MPID_Request_is_pending_failure(MPID_Request *request_ptr)
{
- MPID_abort();
+ /* This function is necessary for MPICH to work correctly so it must always
+ * return 0. */
return 0;
}
-----------------------------------------------------------------------
Summary of changes:
src/mpid/pamid/src/misc/mpid_unimpl.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.2a2-21-gdc1eb33
by noreply@mpich.org 26 Nov '14
by noreply@mpich.org 26 Nov '14
26 Nov '14
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "MPICH primary repository".
The branch, master has been updated
via dc1eb333f5961cdba9d952ff5017c0d06625d9e8 (commit)
via 6d818532d13a6aeb044cd6ac3894a3c76b046d98 (commit)
via b1e89abf9102a9690a4ce394442212e600332094 (commit)
via fef27d3bb2b5b76d0efb243bf5b0fdb776e2b3a9 (commit)
from 230c2df337b4d450e84b39e9a2093aa33432b484 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.mpich.org/mpich.git/commitdiff/dc1eb333f5961cdba9d952ff5017c0d06…
commit dc1eb333f5961cdba9d952ff5017c0d06625d9e8
Author: Ken Raffenetti <raffenet(a)mcs.anl.gov>
Date: Thu Nov 13 16:55:45 2014 -0600
fixup test for abort with fault tolerance
MPICH now behaves correctly for this test. There is no reason for it to output
" No errors", since the only thing we are testing for is that it does not
timeout. We also use a non-zero error code in MPI_Abort to fit the requirements
of the test runner. Closes #1537
Signed-off-by: Pavan Balaji <balaji(a)anl.gov>
diff --git a/test/mpi/ft/abort.c b/test/mpi/ft/abort.c
index d9a6ad6..a2f6d59 100644
--- a/test/mpi/ft/abort.c
+++ b/test/mpi/ft/abort.c
@@ -14,11 +14,8 @@ int main(int argc, char **argv)
MPI_Init(&argc, &argv);
MPI_Comm_rank(MPI_COMM_WORLD, &rank);
- printf(" No Errors\n");
- fflush( stdout );
-
if (rank == 0)
- MPI_Abort(MPI_COMM_WORLD, MPI_SUCCESS);
+ MPI_Abort(MPI_COMM_WORLD, 1);
while(1)
;
diff --git a/test/mpi/ft/testlist b/test/mpi/ft/testlist
index 582f06d..67676f3 100644
--- a/test/mpi/ft/testlist
+++ b/test/mpi/ft/testlist
@@ -1,5 +1,5 @@
die 4 env=MPIR_CVAR_ENABLE_FT=1 mpiexecarg=-disable-auto-cleanup timeLimit=10 strict=false resultTest=TestStatusNoErrors
-abort 2 env=MPIR_CVAR_ENABLE_FT=1 mpiexecarg=-disable-auto-cleanup timeLimit=10 strict=false xfail=ticket1537
+abort 2 env=MPIR_CVAR_ENABLE_FT=1 mpiexecarg=-disable-auto-cleanup timeLimit=10 strict=false resultTest=TestStatus
sendalive 4 env=MPIR_CVAR_ENABLE_FT=1 mpiexecarg=-disable-auto-cleanup timeLimit=10 strict=false resultTest=TestStatusNoErrors
isendalive 3 env=MPIR_CVAR_ENABLE_FT=1 mpiexecarg=-disable-auto-cleanup resultTest=TestStatusNoErrors strict=false
multi_isendalive 4 env=MPIR_CVAR_ENABLE_FT=1 mpiexecarg=-disable-auto-cleanup resultTest=TestStatusNoErrors strict=false
http://git.mpich.org/mpich.git/commitdiff/6d818532d13a6aeb044cd6ac3894a3c76…
commit 6d818532d13a6aeb044cd6ac3894a3c76b046d98
Author: Ken Raffenetti <raffenet(a)mcs.anl.gov>
Date: Wed Nov 19 16:35:16 2014 -0600
modify fatal error handler
If a fatal error occurs, pass the MPI error code to MPID_Abort. To ensure
non-zero exit status with dynamic error codes, we set the first available
dynamic error class to 1. #Refs 1537
Signed-off-by: Pavan Balaji <balaji(a)anl.gov>
diff --git a/src/mpi/errhan/dynerrutil.c b/src/mpi/errhan/dynerrutil.c
index 2e3bb27..8ac17af 100644
--- a/src/mpi/errhan/dynerrutil.c
+++ b/src/mpi/errhan/dynerrutil.c
@@ -46,7 +46,7 @@
static int not_initialized = 1; /* This allows us to use atomic decr */
static const char *(user_class_msgs[ERROR_MAX_NCLASS]) = { 0 };
static const char *(user_code_msgs[ERROR_MAX_NCODE]) = { 0 };
-static int first_free_class = 0;
+static int first_free_class = 1; /* class 0 is reserved */
static int first_free_code = 1; /* code 0 is reserved */
static const char empty_error_string[1] = { 0 };
diff --git a/src/mpi/errhan/errutil.c b/src/mpi/errhan/errutil.c
index ff3dd13..fbe520f 100644
--- a/src/mpi/errhan/errutil.c
+++ b/src/mpi/errhan/errutil.c
@@ -455,9 +455,9 @@ static void handleFatalError( MPID_Comm *comm_ptr,
MPIU_Snprintf(error_msg, MAX_ERRMSG_STRING, "Fatal error in %s: ", fcname);
len = (int)strlen(error_msg);
MPIR_Err_get_string(errcode, &error_msg[len], MAX_ERRMSG_STRING-len, NULL);
- /* The third argument is a return code, a value of 1 usually indicates
- an error */
- MPID_Abort(comm_ptr, MPI_SUCCESS, 1, error_msg);
+
+ /* The third argument is a return code. We simply pass the error code. */
+ MPID_Abort(comm_ptr, MPI_SUCCESS, errcode, error_msg);
}
/* --END ERROR HANDLING-- */
http://git.mpich.org/mpich.git/commitdiff/b1e89abf9102a9690a4ce394442212e60…
commit b1e89abf9102a9690a4ce394442212e600332094
Author: Ken Raffenetti <raffenet(a)mcs.anl.gov>
Date: Thu Nov 13 16:42:15 2014 -0600
implement PMI_Abort
Implement abort in the Hydra PMI server and modify simple PMI to send
an abort command. Previously, we just exited the calling process and
relied on the process manager to detect it and cleanup the rest of the
job. Refs #1537
Signed-off-by: Pavan Balaji <balaji(a)anl.gov>
diff --git a/src/pm/hydra/pm/pmiserv/pmiserv_pmi_v1.c b/src/pm/hydra/pm/pmiserv/pmiserv_pmi_v1.c
index 9955e18..b3c0dfe 100644
--- a/src/pm/hydra/pm/pmiserv/pmiserv_pmi_v1.c
+++ b/src/pm/hydra/pm/pmiserv/pmiserv_pmi_v1.c
@@ -760,6 +760,38 @@ static HYD_status fn_lookup_name(int fd, int pid, int pgid, char *args[])
goto fn_exit;
}
+static HYD_status fn_abort(int fd, int pid, int pgid, char *args[])
+{
+ int token_count;
+ struct HYD_pmcd_token *tokens;
+ /* set a default exit code of 1 */
+ int exitcode = 1;
+ HYD_status status = HYD_SUCCESS;
+
+ HYDU_FUNC_ENTER();
+
+ status = HYD_pmcd_pmi_args_to_tokens(args, &tokens, &token_count);
+ HYDU_ERR_POP(status, "unable to convert args to tokens\n");
+
+ if (HYD_pmcd_pmi_find_token_keyval(tokens, token_count, "exitcode") == NULL)
+ HYDU_ERR_POP(status, "cannot find token: exitcode\n");
+
+ exitcode = atoi(HYD_pmcd_pmi_find_token_keyval(tokens, token_count, "exitcode"));
+
+ fn_exit:
+ /* clean everything up and exit */
+ status = HYDT_bsci_wait_for_completion(0);
+ exit(exitcode);
+
+ /* never get here */
+ HYDU_FUNC_EXIT();
+ return status;
+
+ fn_fail:
+ goto fn_exit;
+}
+
+
/* TODO: abort, create_kvs, destroy_kvs, getbyidx */
static struct HYD_pmcd_pmi_handle pmi_v1_handle_fns_foo[] = {
{"barrier_in", fn_barrier_in},
@@ -769,6 +801,7 @@ static struct HYD_pmcd_pmi_handle pmi_v1_handle_fns_foo[] = {
{"publish_name", fn_publish_name},
{"unpublish_name", fn_unpublish_name},
{"lookup_name", fn_lookup_name},
+ {"abort", fn_abort},
{"\0", NULL}
};
diff --git a/src/pmi/simple/simple_pmi.c b/src/pmi/simple/simple_pmi.c
index 24daf96..1327f0d 100644
--- a/src/pmi/simple/simple_pmi.c
+++ b/src/pmi/simple/simple_pmi.c
@@ -322,8 +322,15 @@ int PMI_Finalize( void )
int PMI_Abort(int exit_code, const char error_msg[])
{
- PMIU_printf(1, "aborting job:\n%s\n", error_msg);
- MPIU_Exit(exit_code);
+ char buf[PMIU_MAXLINE];
+
+ /* include exit_code in the abort command */
+ MPIU_Snprintf( buf, PMIU_MAXLINE, "cmd=abort exitcode=%d\n", exit_code);
+
+ PMIU_printf(PMI_debug, "aborting job:\n%s\n", error_msg);
+ GetResponse( buf, "", 0 );
+
+ /* the above command should not return */
return -1;
}
http://git.mpich.org/mpich.git/commitdiff/fef27d3bb2b5b76d0efb243bf5b0fdb77…
commit fef27d3bb2b5b76d0efb243bf5b0fdb776e2b3a9
Author: Ken Raffenetti <raffenet(a)mcs.anl.gov>
Date: Thu Nov 13 16:36:03 2014 -0600
ch3: cleanup abort code
We simply use PMI_Abort in both the sock and nemesis code. Remove
extra functions and constants that are not useful. Refs #1537
Signed-off-by: Pavan Balaji <balaji(a)anl.gov>
diff --git a/src/mpid/ch3/channels/nemesis/src/Makefile.mk b/src/mpid/ch3/channels/nemesis/src/Makefile.mk
index 21857f5..d55697c 100644
--- a/src/mpid/ch3/channels/nemesis/src/Makefile.mk
+++ b/src/mpid/ch3/channels/nemesis/src/Makefile.mk
@@ -13,7 +13,6 @@ mpi_core_sources += \
src/mpid/ch3/channels/nemesis/src/ch3_istartmsg.c \
src/mpid/ch3/channels/nemesis/src/ch3_istartmsgv.c \
src/mpid/ch3/channels/nemesis/src/ch3_progress.c \
- src/mpid/ch3/channels/nemesis/src/ch3_abort.c \
src/mpid/ch3/channels/nemesis/src/ch3_rma_shm.c \
src/mpid/ch3/channels/nemesis/src/ch3_win_fns.c \
src/mpid/ch3/channels/nemesis/src/ch3i_comm.c \
diff --git a/src/mpid/ch3/channels/nemesis/src/ch3_abort.c b/src/mpid/ch3/channels/nemesis/src/ch3_abort.c
deleted file mode 100644
index c07fdb6..0000000
--- a/src/mpid/ch3/channels/nemesis/src/ch3_abort.c
+++ /dev/null
@@ -1,39 +0,0 @@
-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
-/*
- * (C) 2001 by Argonne National Laboratory.
- * See COPYRIGHT in top-level directory.
- */
-
-#include "mpid_nem_impl.h"
-
-#ifdef USE_PMI2_API
-#include "pmi2.h"
-#else
-#include "pmi.h"
-#endif
-
-#undef FUNCNAME
-#define FUNCNAME MPIDI_CH3_Abort
-#undef FCNAME
-#define FCNAME MPIDI_QUOTE(FUNCNAME)
-int MPIDI_CH3_Abort(int exit_code, char *error_msg)
-{
- MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3_ABORT);
-
- MPIDI_FUNC_ENTER(MPID_STATE_MPIDI_CH3_ABORT);
-
-#ifdef USE_PMI2_API
- PMI2_Abort(TRUE, error_msg);
-#else
- PMI_Abort(exit_code, error_msg);
-#endif
- /* if abort returns for some reason, exit here */
-
- MPIU_Error_printf("%s", error_msg);
- fflush(stderr);
-
- MPIU_Exit(exit_code);
-
- MPIDI_FUNC_EXIT(MPID_STATE_MPIDI_CH3_ABORT);
- return MPI_ERR_INTERN;
-}
diff --git a/src/mpid/ch3/channels/sock/include/mpidi_ch3_pre.h b/src/mpid/ch3/channels/sock/include/mpidi_ch3_pre.h
index ad8b39b..6e965d0 100644
--- a/src/mpid/ch3/channels/sock/include/mpidi_ch3_pre.h
+++ b/src/mpid/ch3/channels/sock/include/mpidi_ch3_pre.h
@@ -18,7 +18,6 @@
/* FIXME: These should be removed */
#define MPIDI_DEV_IMPLEMENTS_KVS
-#define MPIDI_DEV_IMPLEMENTS_ABORT
/* FIXME: Are the following packet extensions? Can the socket connect/accept
packets be made part of the util/sock support? */
diff --git a/src/mpid/ch3/src/mpid_abort.c b/src/mpid/ch3/src/mpid_abort.c
index 74b8a56..b48e618 100644
--- a/src/mpid/ch3/src/mpid_abort.c
+++ b/src/mpid/ch3/src/mpid_abort.c
@@ -6,15 +6,11 @@
#include "mpidimpl.h"
-/* FIXME: Who uses/sets MPIDI_DEV_IMPLEMENTS_ABORT? */
-#ifdef MPIDI_DEV_IMPLEMENTS_ABORT
#ifdef USE_PMI2_API
#include "pmi2.h"
#else
#include "pmi.h"
#endif
-static int MPIDI_CH3I_PMI_Abort(int exit_code, const char *error_msg);
-#endif
/* FIXME: We should move this into a header file so that we don't
need the ifdef. Also, don't use exit (add to coding check) since
@@ -87,36 +83,6 @@ int MPID_Abort(MPID_Comm * comm, int mpi_errno, int exit_code,
MPIR_DebuggerSetAborting( error_msg );
#endif
- /* FIXME: This should not use an ifelse chain. Either define the function
- by name or set a function pointer */
-#ifdef MPIDI_CH3_IMPLEMENTS_ABORT
- MPIDI_CH3_Abort(exit_code, error_msg);
-#elif defined(MPIDI_DEV_IMPLEMENTS_ABORT)
- MPIDI_CH3I_PMI_Abort(exit_code, error_msg);
-#else
- if (error_msg[0]) MPIU_Error_printf("%s\n", error_msg);
- fflush(stderr);
-#endif
-
- /* ch3_abort should not return but if it does, exit here. If it does,
- add the function exit code before calling the final exit. */
- MPIDI_FUNC_EXIT(MPID_STATE_MPID_ABORT);
- MPIU_Exit(exit_code);
-
- return MPI_ERR_INTERN;
-}
-
-#ifdef MPIDI_DEV_IMPLEMENTS_ABORT
-#undef FUNCNAME
-#define FUNCNAME MPIDI_CH3I_PMI_Abort
-#undef FCNAME
-#define FCNAME MPIDI_QUOTE(FUNCNAME)
-static int MPIDI_CH3I_PMI_Abort(int exit_code, const char *error_msg)
-{
- MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3I_PMI_ABORT);
-
- MPIDI_FUNC_ENTER(MPID_STATE_MPIDI_CH3I_PMI_ABORT);
-
/* Dumping the error message in MPICH and passing the same
* message to the PM as well. This might cause duplicate messages,
* but it is better to have two messages than none. Note that the
@@ -138,10 +104,10 @@ static int MPIDI_CH3I_PMI_Abort(int exit_code, const char *error_msg)
PMI_Abort(exit_code, error_msg);
#endif
- /* if abort returns for some reason, exit here */
- exit(exit_code);
+ /* pmi_abort should not return but if it does, exit here. If it does,
+ add the function exit code before calling the final exit. */
+ MPIDI_FUNC_EXIT(MPID_STATE_MPID_ABORT);
+ MPIU_Exit(exit_code);
- MPIDI_FUNC_EXIT(MPID_STATE_MPIDI_CH3I_PMI_ABORT);
- return MPI_ERR_INTERN;
+ return MPI_ERR_INTERN;
}
-#endif
-----------------------------------------------------------------------
Summary of changes:
src/mpi/errhan/dynerrutil.c | 2 +-
src/mpi/errhan/errutil.c | 6 +-
src/mpid/ch3/channels/nemesis/src/Makefile.mk | 1 -
src/mpid/ch3/channels/nemesis/src/ch3_abort.c | 39 -----------------
src/mpid/ch3/channels/sock/include/mpidi_ch3_pre.h | 1 -
src/mpid/ch3/src/mpid_abort.c | 44 ++-----------------
src/pm/hydra/pm/pmiserv/pmiserv_pmi_v1.c | 33 +++++++++++++++
src/pmi/simple/simple_pmi.c | 11 ++++-
test/mpi/ft/abort.c | 5 +--
test/mpi/ft/testlist | 2 +-
10 files changed, 53 insertions(+), 91 deletions(-)
delete mode 100644 src/mpid/ch3/channels/nemesis/src/ch3_abort.c
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.2a2-17-g230c2df
by noreply@mpich.org 25 Nov '14
by noreply@mpich.org 25 Nov '14
25 Nov '14
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "MPICH primary repository".
The branch, master has been updated
via 230c2df337b4d450e84b39e9a2093aa33432b484 (commit)
from 8a0887b9726c8c466b3fed6cc0c6ff42468a2aee (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.mpich.org/mpich.git/commitdiff/230c2df337b4d450e84b39e9a2093aa33…
commit 230c2df337b4d450e84b39e9a2093aa33432b484
Author: Paul Coffman <pkcoff(a)us.ibm.com>
Date: Mon Nov 24 21:29:58 2014 -0600
romio gpfs: select correct read buffer
ROMIO GPFSMPIO_P2PCONTIG threaded read needs to toggle first read buffer
When using both the GPFSMPIO_P2PCONTIG and GPFSMPIO_PTHREADIO
optimizations there was a correctness bug when reading where for the
first round the read buffer did not toggle to the two-phase buffer for
the pthread reader, resulting in diseminating the data from the wrong
buffer. The fix is to do the toggle after the first read.
Signed-off-by: Paul Coffman <pkcoff(a)us.ibm.com>
Signed-off-by: Rob Latham <robl(a)mcs.anl.gov>
diff --git a/src/mpi/romio/adio/common/p2p_aggregation.c b/src/mpi/romio/adio/common/p2p_aggregation.c
index c7c1800..292ba47 100644
--- a/src/mpi/romio/adio/common/p2p_aggregation.c
+++ b/src/mpi/romio/adio/common/p2p_aggregation.c
@@ -667,6 +667,7 @@ void ADIOI_P2PContigReadAggregation(ADIO_File fd,
ADIO_ReadContig(fd, read_buf,amountDataToReadThisRound,
MPI_BYTE, ADIO_EXPLICIT_OFFSET, currentRoundFDStart,
&status, error_code);
+ currentReadBuf = 1;
#ifdef ROMIO_GPFS
endTimeBase = MPI_Wtime();
-----------------------------------------------------------------------
Summary of changes:
src/mpi/romio/adio/common/p2p_aggregation.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.2a2-16-g8a0887b
by noreply@mpich.org 24 Nov '14
by noreply@mpich.org 24 Nov '14
24 Nov '14
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "MPICH primary repository".
The branch, master has been updated
via 8a0887b9726c8c466b3fed6cc0c6ff42468a2aee (commit)
from e645371f794f4325db21e93f5e5517e02f4146c1 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.mpich.org/mpich.git/commitdiff/8a0887b9726c8c466b3fed6cc0c6ff424…
commit 8a0887b9726c8c466b3fed6cc0c6ff42468a2aee
Author: Xin Zhao <xinzhao3(a)illinois.edu>
Date: Tue Nov 18 21:43:21 2014 -0600
Bug-fix: preventing completing the same RMA request twice.
It is possible that a request handler of RMA request is
called for the second time inside the first called request
handler on the same request.
Consider the following case: a req is queued up in Nemesis
SHM queue with ref count of 2: one is for request completion
and another is for dequeueing from SHM queue. The first
called req handler completed this request and decrement ref
count to 1. This request is still in the queue. However,
within this handler, we trigger the same req handler on the
same request again (for example making progress on SHM queue),
and the second called handler also tries to complete this
request, which leads to the wrong execution.
In this patch we check if request has already been completed
when entering the req handler, to prevent processing the same
request twice. We also move the function finish_op_on_target()
(where the same req handler can be triggered again)
after request completion routine, so that we can mark the
current request as completed before enter the same req handler
for the second time.
Fix #2204
Signed-off-by: Pavan Balaji <balaji(a)anl.gov>
diff --git a/src/mpid/ch3/src/ch3u_handle_recv_req.c b/src/mpid/ch3/src/ch3u_handle_recv_req.c
index fffce27..dbf2b36 100644
--- a/src/mpid/ch3/src/ch3u_handle_recv_req.c
+++ b/src/mpid/ch3/src/ch3u_handle_recv_req.c
@@ -80,19 +80,45 @@ int MPIDI_CH3_ReqHandler_PutRecvComplete( MPIDI_VC_t *vc,
{
int mpi_errno = MPI_SUCCESS;
MPID_Win *win_ptr;
+ MPI_Win source_win_handle = rreq->dev.source_win_handle;
+ MPIDI_CH3_Pkt_flags_t flags = rreq->dev.flags;
MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3_REQHANDLER_PUTRECVCOMPLETE);
MPIDI_FUNC_ENTER(MPID_STATE_MPIDI_CH3_REQHANDLER_PUTRECVCOMPLETE);
+ /* NOTE: It is possible that this request is already completed before
+ entering this handler. This happens when this req handler is called
+ within the same req handler on the same request.
+ Consider this case: req is queued up in SHM queue with ref count of 2:
+ one is for completing the request and another is for dequeueing from
+ the queue. The first called req handler on this request completed
+ this request and decrement ref counter to 1. Request is still in the
+ queue. Within this handler, we call the req handler on the same request
+ for the second time (for example when making progress on SHM queue),
+ and the second called handler also tries to complete this request,
+ which leads to wrong execution.
+ Here we check if req is already completed to prevent processing the
+ same request twice. */
+ if (MPID_Request_is_complete(rreq)) {
+ *complete = FALSE;
+ goto fn_exit;
+ }
+
MPID_Win_get_ptr(rreq->dev.target_win_handle, win_ptr);
+ /* mark data transfer as complete and decrement CC */
+ MPIDI_CH3U_Request_complete(rreq);
+
+ /* NOTE: finish_op_on_target() must be called after we complete this request,
+ because inside finish_op_on_target() we may call this request handler
+ on the same request again (in release_lock()). Marking this request as
+ completed will prevent us from processing the same request twice. */
mpi_errno = finish_op_on_target(win_ptr, vc, MPIDI_CH3_PKT_PUT,
- rreq->dev.flags, rreq->dev.source_win_handle);
+ flags, source_win_handle);
if (mpi_errno != MPI_SUCCESS) MPIU_ERR_POP(mpi_errno);
- /* mark data transfer as complete and decrement CC */
- MPIDI_CH3U_Request_complete(rreq);
*complete = TRUE;
+
fn_exit:
MPIDI_FUNC_EXIT(MPID_STATE_MPIDI_CH3_REQHANDLER_PUTRECVCOMPLETE);
return MPI_SUCCESS;
@@ -115,10 +141,30 @@ int MPIDI_CH3_ReqHandler_AccumRecvComplete( MPIDI_VC_t *vc,
int mpi_errno = MPI_SUCCESS;
MPI_Aint true_lb, true_extent;
MPID_Win *win_ptr;
+ MPI_Win source_win_handle = rreq->dev.source_win_handle;
+ MPIDI_CH3_Pkt_flags_t flags = rreq->dev.flags;
MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3_REQHANDLER_ACCUMRECVCOMPLETE);
MPIDI_FUNC_ENTER(MPID_STATE_MPIDI_CH3_REQHANDLER_ACCUMRECVCOMPLETE);
+ /* NOTE: It is possible that this request is already completed before
+ entering this handler. This happens when this req handler is called
+ within the same req handler on the same request.
+ Consider this case: req is queued up in SHM queue with ref count of 2:
+ one is for completing the request and another is for dequeueing from
+ the queue. The first called req handler on this request completed
+ this request and decrement ref counter to 1. Request is still in the
+ queue. Within this handler, we call the req handler on the same request
+ for the second time (for example when making progress on SHM queue),
+ and the second called handler also tries to complete this request,
+ which leads to wrong execution.
+ Here we check if req is already completed to prevent processing the
+ same request twice. */
+ if (MPID_Request_is_complete(rreq)) {
+ *complete = FALSE;
+ goto fn_exit;
+ }
+
MPID_Win_get_ptr(rreq->dev.target_win_handle, win_ptr);
MPIU_Assert(MPIDI_Request_get_type(rreq) == MPIDI_REQUEST_TYPE_ACCUM_RESP);
@@ -138,13 +184,19 @@ int MPIDI_CH3_ReqHandler_AccumRecvComplete( MPIDI_VC_t *vc,
MPIR_Type_get_true_extent_impl(rreq->dev.datatype, &true_lb, &true_extent);
MPIU_Free((char *) rreq->dev.final_user_buf + true_lb);
+ /* mark data transfer as complete and decrement CC */
+ MPIDI_CH3U_Request_complete(rreq);
+
+ /* NOTE: finish_op_on_target() must be called after we complete this request,
+ because inside finish_op_on_target() we may call this request handler
+ on the same request again (in release_lock()). Marking this request as
+ completed will prevent us from processing the same request twice. */
mpi_errno = finish_op_on_target(win_ptr, vc, MPIDI_CH3_PKT_ACCUMULATE,
- rreq->dev.flags, rreq->dev.source_win_handle);
+ flags, source_win_handle);
if (mpi_errno != MPI_SUCCESS) MPIU_ERR_POP(mpi_errno);
- /* mark data transfer as complete and decrement CC */
- MPIDI_CH3U_Request_complete(rreq);
*complete = TRUE;
+
fn_exit:
MPIDI_FUNC_EXIT(MPID_STATE_MPIDI_CH3_REQHANDLER_ACCUMRECVCOMPLETE);
return MPI_SUCCESS;
diff --git a/src/mpid/ch3/src/ch3u_handle_send_req.c b/src/mpid/ch3/src/ch3u_handle_send_req.c
index ab7d728..a1e586b 100644
--- a/src/mpid/ch3/src/ch3u_handle_send_req.c
+++ b/src/mpid/ch3/src/ch3u_handle_send_req.c
@@ -49,13 +49,29 @@ int MPIDI_CH3_ReqHandler_GetSendComplete( MPIDI_VC_t *vc ATTRIBUTE((unused)),
{
int mpi_errno = MPI_SUCCESS;
MPID_Win *win_ptr;
+ MPI_Win source_win_handle = sreq->dev.source_win_handle;
+ MPIDI_CH3_Pkt_flags_t flags = sreq->dev.flags;
+
+ /* NOTE: It is possible that this request is already completed before
+ entering this handler. This happens when this req handler is called
+ within the same req handler on the same request.
+ Consider this case: req is queued up in SHM queue with ref count of 2:
+ one is for completing the request and another is for dequeueing from
+ the queue. The first called req handler on this request completed
+ this request and decrement ref counter to 1. Request is still in the
+ queue. Within this handler, we call the req handler on the same request
+ for the second time (for example when making progress on SHM queue),
+ and the second called handler also tries to complete this request,
+ which leads to wrong execution.
+ Here we check if req is already completed to prevent processing the
+ same request twice. */
+ if (MPID_Request_is_complete(sreq)) {
+ *complete = FALSE;
+ goto fn_exit;
+ }
MPID_Win_get_ptr(sreq->dev.target_win_handle, win_ptr);
- mpi_errno = finish_op_on_target(win_ptr, vc, MPIDI_CH3_PKT_GET,
- sreq->dev.flags, sreq->dev.source_win_handle);
- if (mpi_errno) MPIU_ERR_POP(mpi_errno);
-
/* here we decrement the Active Target counter to guarantee the GET-like
operation are completed when counter reaches zero. */
win_ptr->at_completion_counter--;
@@ -63,6 +79,15 @@ int MPIDI_CH3_ReqHandler_GetSendComplete( MPIDI_VC_t *vc ATTRIBUTE((unused)),
/* mark data transfer as complete and decrement CC */
MPIDI_CH3U_Request_complete(sreq);
+
+ /* NOTE: finish_op_on_target() must be called after we complete this request,
+ because inside finish_op_on_target() we may call this request handler
+ on the same request again (in release_lock()). Marking this request as
+ completed will prevent us from processing the same request twice. */
+ mpi_errno = finish_op_on_target(win_ptr, vc, MPIDI_CH3_PKT_GET,
+ flags, source_win_handle);
+ if (mpi_errno) MPIU_ERR_POP(mpi_errno);
+
*complete = TRUE;
fn_exit:
@@ -81,9 +106,30 @@ int MPIDI_CH3_ReqHandler_GaccumSendComplete( MPIDI_VC_t *vc,
{
int mpi_errno = MPI_SUCCESS;
MPID_Win *win_ptr;
+ MPI_Win source_win_handle = rreq->dev.source_win_handle;
+ MPIDI_CH3_Pkt_flags_t flags = rreq->dev.flags;
MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3_REQHANDLER_GACCUMSENDCOMPLETE);
MPIDI_FUNC_ENTER(MPID_STATE_MPIDI_CH3_REQHANDLER_GACCUMSENDCOMPLETE);
+
+ /* NOTE: It is possible that this request is already completed before
+ entering this handler. This happens when this req handler is called
+ within the same req handler on the same request.
+ Consider this case: req is queued up in SHM queue with ref count of 2:
+ one is for completing the request and another is for dequeueing from
+ the queue. The first called req handler on this request completed
+ this request and decrement ref counter to 1. Request is still in the
+ queue. Within this handler, we call the req handler on the same request
+ for the second time (for example when making progress on SHM queue),
+ and the second called handler also tries to complete this request,
+ which leads to wrong execution.
+ Here we check if req is already completed to prevent processing the
+ same request twice. */
+ if (MPID_Request_is_complete(rreq)) {
+ *complete = FALSE;
+ goto fn_exit;
+ }
+
/* This function is triggered when sending back process of GACC/FOP/CAS
is finished. Only GACC used user_buf. FOP and CAS can fit all data
in response packet. */
@@ -92,17 +138,23 @@ int MPIDI_CH3_ReqHandler_GaccumSendComplete( MPIDI_VC_t *vc,
MPID_Win_get_ptr(rreq->dev.target_win_handle, win_ptr);
- mpi_errno = finish_op_on_target(win_ptr, vc, MPIDI_CH3_PKT_GET_ACCUM,
- rreq->dev.flags, rreq->dev.source_win_handle);
- if (mpi_errno) MPIU_ERR_POP(mpi_errno);
-
/* here we decrement the Active Target counter to guarantee the GET-like
operation are completed when counter reaches zero. */
win_ptr->at_completion_counter--;
MPIU_Assert(win_ptr->at_completion_counter >= 0);
MPIDI_CH3U_Request_complete(rreq);
+
+ /* NOTE: finish_op_on_target() must be called after we complete this request,
+ because inside finish_op_on_target() we may call this request handler
+ on the same request again (in release_lock()). Marking this request as
+ completed will prevent us from processing the same request twice. */
+ mpi_errno = finish_op_on_target(win_ptr, vc, MPIDI_CH3_PKT_GET_ACCUM,
+ flags, source_win_handle);
+ if (mpi_errno) MPIU_ERR_POP(mpi_errno);
+
*complete = TRUE;
+
fn_exit:
MPIDI_FUNC_EXIT(MPID_STATE_MPIDI_CH3_REQHANDLER_GACCUMSENDCOMPLETE);
return mpi_errno;
@@ -122,9 +174,30 @@ int MPIDI_CH3_ReqHandler_CASSendComplete( MPIDI_VC_t *vc,
{
int mpi_errno = MPI_SUCCESS;
MPID_Win *win_ptr;
+ MPI_Win source_win_handle = rreq->dev.source_win_handle;
+ MPIDI_CH3_Pkt_flags_t flags = rreq->dev.flags;
MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3_REQHANDLER_CASSENDCOMPLETE);
MPIDI_FUNC_ENTER(MPID_STATE_MPIDI_CH3_REQHANDLER_CASSENDCOMPLETE);
+
+ /* NOTE: It is possible that this request is already completed before
+ entering this handler. This happens when this req handler is called
+ within the same req handler on the same request.
+ Consider this case: req is queued up in SHM queue with ref count of 2:
+ one is for completing the request and another is for dequeueing from
+ the queue. The first called req handler on this request completed
+ this request and decrement ref counter to 1. Request is still in the
+ queue. Within this handler, we call the req handler on the same request
+ for the second time (for example when making progress on SHM queue),
+ and the second called handler also tries to complete this request,
+ which leads to wrong execution.
+ Here we check if req is already completed to prevent processing the
+ same request twice. */
+ if (MPID_Request_is_complete(rreq)) {
+ *complete = FALSE;
+ goto fn_exit;
+ }
+
/* This function is triggered when sending back process of GACC/FOP/CAS
is finished. Only GACC used user_buf. FOP and CAS can fit all data
in response packet. */
@@ -133,17 +206,23 @@ int MPIDI_CH3_ReqHandler_CASSendComplete( MPIDI_VC_t *vc,
MPID_Win_get_ptr(rreq->dev.target_win_handle, win_ptr);
- mpi_errno = finish_op_on_target(win_ptr, vc, MPIDI_CH3_PKT_CAS,
- rreq->dev.flags, rreq->dev.source_win_handle);
- if (mpi_errno) MPIU_ERR_POP(mpi_errno);
-
/* here we decrement the Active Target counter to guarantee the GET-like
operation are completed when counter reaches zero. */
win_ptr->at_completion_counter--;
MPIU_Assert(win_ptr->at_completion_counter >= 0);
MPIDI_CH3U_Request_complete(rreq);
+
+ /* NOTE: finish_op_on_target() must be called after we complete this request,
+ because inside finish_op_on_target() we may call this request handler
+ on the same request again (in release_lock()). Marking this request as
+ completed will prevent us from processing the same request twice. */
+ mpi_errno = finish_op_on_target(win_ptr, vc, MPIDI_CH3_PKT_CAS,
+ flags, source_win_handle);
+ if (mpi_errno) MPIU_ERR_POP(mpi_errno);
+
*complete = TRUE;
+
fn_exit:
MPIDI_FUNC_EXIT(MPID_STATE_MPIDI_CH3_REQHANDLER_CASSENDCOMPLETE);
return mpi_errno;
@@ -161,9 +240,30 @@ int MPIDI_CH3_ReqHandler_FOPSendComplete( MPIDI_VC_t *vc,
{
int mpi_errno = MPI_SUCCESS;
MPID_Win *win_ptr;
+ MPI_Win source_win_handle = rreq->dev.source_win_handle;
+ MPIDI_CH3_Pkt_flags_t flags = rreq->dev.flags;
MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3_REQHANDLER_FOPSENDCOMPLETE);
MPIDI_FUNC_ENTER(MPID_STATE_MPIDI_CH3_REQHANDLER_FOPSENDCOMPLETE);
+
+ /* NOTE: It is possible that this request is already completed before
+ entering this handler. This happens when this req handler is called
+ within the same req handler on the same request.
+ Consider this case: req is queued up in SHM queue with ref count of 2:
+ one is for completing the request and another is for dequeueing from
+ the queue. The first called req handler on this request completed
+ this request and decrement ref counter to 1. Request is still in the
+ queue. Within this handler, we call the req handler on the same request
+ for the second time (for example when making progress on SHM queue),
+ and the second called handler also tries to complete this request,
+ which leads to wrong execution.
+ Here we check if req is already completed to prevent processing the
+ same request twice. */
+ if (MPID_Request_is_complete(rreq)) {
+ *complete = FALSE;
+ goto fn_exit;
+ }
+
/* This function is triggered when sending back process of GACC/FOP/CAS
is finished. Only GACC used user_buf. FOP and CAS can fit all data
in response packet. */
@@ -172,17 +272,23 @@ int MPIDI_CH3_ReqHandler_FOPSendComplete( MPIDI_VC_t *vc,
MPID_Win_get_ptr(rreq->dev.target_win_handle, win_ptr);
- mpi_errno = finish_op_on_target(win_ptr, vc, MPIDI_CH3_PKT_FOP,
- rreq->dev.flags, rreq->dev.source_win_handle);
- if (mpi_errno) MPIU_ERR_POP(mpi_errno);
-
/* here we decrement the Active Target counter to guarantee the GET-like
operation are completed when counter reaches zero. */
win_ptr->at_completion_counter--;
MPIU_Assert(win_ptr->at_completion_counter >= 0);
MPIDI_CH3U_Request_complete(rreq);
+
+ /* NOTE: finish_op_on_target() must be called after we complete this request,
+ because inside finish_op_on_target() we may call this request handler
+ on the same request again (in release_lock()). Marking this request as
+ completed will prevent us from processing the same request twice. */
+ mpi_errno = finish_op_on_target(win_ptr, vc, MPIDI_CH3_PKT_FOP,
+ flags, source_win_handle);
+ if (mpi_errno) MPIU_ERR_POP(mpi_errno);
+
*complete = TRUE;
+
fn_exit:
MPIDI_FUNC_EXIT(MPID_STATE_MPIDI_CH3_REQHANDLER_FOPSENDCOMPLETE);
return mpi_errno;
-----------------------------------------------------------------------
Summary of changes:
src/mpid/ch3/src/ch3u_handle_recv_req.c | 64 +++++++++++++--
src/mpid/ch3/src/ch3u_handle_send_req.c | 138 +++++++++++++++++++++++++++----
2 files changed, 180 insertions(+), 22 deletions(-)
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.2a2-15-ge645371
by noreply@mpich.org 24 Nov '14
by noreply@mpich.org 24 Nov '14
24 Nov '14
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "MPICH primary repository".
The branch, master has been updated
via e645371f794f4325db21e93f5e5517e02f4146c1 (commit)
from 63298b2f71fd9a0f70c4e85b976380962448f476 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.mpich.org/mpich.git/commitdiff/e645371f794f4325db21e93f5e5517e02…
commit e645371f794f4325db21e93f5e5517e02f4146c1
Author: William Gropp <wgropp(a)illinois.edu>
Date: Mon Nov 24 10:44:25 2014 -0600
Make ROMIO htmldocs update link file
Update the use of DOCTEXT to match the rest of MPICH, including adding
-nolocation (drop the location of the source file from the documentation)
and ensure that the mpi.cit file contains the I/O routines as well as
the others (this file can be used to add links to the man pages in
other documents).
Signed-off-by: Rob Latham <robl(a)mcs.anl.gov>
diff --git a/src/mpi/romio/Makefile.am b/src/mpi/romio/Makefile.am
index 7468dd3..b9d4e25 100644
--- a/src/mpi/romio/Makefile.am
+++ b/src/mpi/romio/Makefile.am
@@ -132,20 +132,27 @@ mandoc_path3=$(abs_top_builddir)/man/man3
htmldoc_path1=$(abs_top_builddir)/www/www1
htmldoc_path3=$(abs_top_builddir)/www/www3
doctext_docnotes=
+# Provide an easily replaced url root for the generated index file.
+# You can override this with URL desired in the index file generated by doctext.
+# You can ignore this if you don't use mapnames or tohtml to add links
+# to the MPI manual pages to documents.
+htmldoc_root3="--your-url-here--"
.c.man-phony:
$(doctextman_verbose)$(DOCTEXT) -man -mpath $(mandoc_path3) -ext 3 \
- -heading MPI -quotefmt $(doctext_docnotes) $<
+ -heading MPI -quotefmt -nolocation $(doctext_docnotes) $<
.c.html-phony:
$(doctexthtml_verbose)$(DOCTEXT) -html -mpath $(htmldoc_path3) \
- -heading MPI -quotefmt $(doctext_docnotes) $<
+ -heading MPI -quotefmt -nolocation \
+ -index $(htmldoc_path3)/mpi.cit -indexdir $(htmldoc_root3) \
+ $(doctext_docnotes) $<
.txt.man1-phony:
$(doctextman_verbose)$(DOCTEXT) -man -mpath $(mandoc_path1) -ext 1 \
- -heading MPI -quotefmt $(doctext_docnotes) $<
+ -heading MPI -quotefmt -nolocation $(doctext_docnotes) $<
.txt.html1-phony:
$(doctexthtml_verbose)$(DOCTEXT) -html -mpath $(htmldoc_path1) \
- -heading MPI -quotefmt $(doctext_docnotes) $<
+ -heading MPI -quotefmt -nolocation $(doctext_docnotes) $<
# use mandoc-local target to force directory creation before running DOCTEXT
mandoc:
-----------------------------------------------------------------------
Summary of changes:
src/mpi/romio/Makefile.am | 15 +++++++++++----
1 files changed, 11 insertions(+), 4 deletions(-)
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.2a2-14-g63298b2
by noreply@mpich.org 23 Nov '14
by noreply@mpich.org 23 Nov '14
23 Nov '14
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "MPICH primary repository".
The branch, master has been updated
via 63298b2f71fd9a0f70c4e85b976380962448f476 (commit)
via 3f5194a0e5ed2ed656c3cc50555a672723582718 (commit)
from d39a7363aada877e7bc43011b7d2226128cf9df6 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.mpich.org/mpich.git/commitdiff/63298b2f71fd9a0f70c4e85b976380962…
commit 63298b2f71fd9a0f70c4e85b976380962448f476
Author: Min Si <msi(a)il.is.s.u-tokyo.ac.jp>
Date: Fri Nov 21 15:03:01 2014 -0600
Simplify test setting of min/full datatype tests.
Signed-off-by: Pavan Balaji <balaji(a)anl.gov>
diff --git a/test/mpi/coll/bcast2.c b/test/mpi/coll/bcast2.c
index 2acfda3..40054cd 100644
--- a/test/mpi/coll/bcast2.c
+++ b/test/mpi/coll/bcast2.c
@@ -39,10 +39,9 @@ int main( int argc, char *argv[] )
MTEST_DATATYPE_FOR_EACH_COUNT(count) {
- /* Only run full datatype tests in comm world to shorten test time. */
- if (comm == MPI_COMM_WORLD) {
- MTestInitFullDatatypes();
- } else {
+ /* To shorten test time, only run the default version of datatype tests
+ * for comm world and run the minimum version for other communicators. */
+ if (comm != MPI_COMM_WORLD) {
MTestInitMinDatatypes();
}
diff --git a/test/mpi/coll/bcast3.c b/test/mpi/coll/bcast3.c
index c78d769..2da4bf8 100644
--- a/test/mpi/coll/bcast3.c
+++ b/test/mpi/coll/bcast3.c
@@ -35,10 +35,9 @@ int main( int argc, char *argv[] )
count = 1;
MTEST_DATATYPE_FOR_EACH_COUNT(count) {
- /* Only run full datatype tests in comm world to shorten test time. */
- if (comm == MPI_COMM_WORLD) {
- MTestInitFullDatatypes();
- } else {
+ /* To shorten test time, only run the default version of datatype tests
+ * for comm world and run the minimum version for other communicators. */
+ if (comm != MPI_COMM_WORLD) {
MTestInitMinDatatypes();
}
diff --git a/test/mpi/pt2pt/pingping.c b/test/mpi/pt2pt/pingping.c
index c725216..d8646f7 100644
--- a/test/mpi/pt2pt/pingping.c
+++ b/test/mpi/pt2pt/pingping.c
@@ -42,10 +42,9 @@ int main( int argc, char *argv[] )
for (count = 1; count < MAX_COUNT; count = count * 2) {
- /* Only run full datatype tests in comm world to shorten test time. */
- if (comm == MPI_COMM_WORLD) {
- MTestInitFullDatatypes();
- } else {
+ /* To shorten test time, only run the default version of datatype tests
+ * for comm world and run the minimum version for other communicators. */
+ if (comm != MPI_COMM_WORLD) {
MTestInitMinDatatypes();
}
http://git.mpich.org/mpich.git/commitdiff/3f5194a0e5ed2ed656c3cc50555a67272…
commit 3f5194a0e5ed2ed656c3cc50555a672723582718
Author: Min Si <msi(a)il.is.s.u-tokyo.ac.jp>
Date: Sat Nov 22 08:29:38 2014 -0600
Set default test level of mtest-datatype through env var.
Three datatype test levels are defined: basic,min,full(default
full). The default level can be overwritten in runtime by
setting environment variable MPITEST_DATATYPE_TEST_LEVEL.
An MPI test can also specify different level for each datatype
loop by calling corresponding datatype test initialization function
before that loop, otherwise the default version is used.
Basic : MTestInitBasicDatatypes
Minimum : MTestInitMinDatatypes
Full : MTestInitFullDatatypes
Signed-off-by: Pavan Balaji <balaji(a)anl.gov>
diff --git a/test/mpi/util/mtest_datatype_gen.c b/test/mpi/util/mtest_datatype_gen.c
index 66279af..7a95da3 100644
--- a/test/mpi/util/mtest_datatype_gen.c
+++ b/test/mpi/util/mtest_datatype_gen.c
@@ -68,17 +68,26 @@ static int verbose = 0; /* Message level (0 is none) */
* 2. Add its create/init/check functions in file mtest_datatype.c
* 3. Add its creator function to mtestDdtCreators variable
*
- * Following two datatype generators are defined.
- * 1. Full datatypes generator:
+ * Following three test levels of datatype are defined.
+ * 1. Basic
+ * All basic datatypes
+ * 2. Minimum
+ * All basic datatypes | Vector | Indexed
+ * 3. Full
* All basic datatypes | Vector | Hvector | Indexed | Hindexed |
* Indexed-block | Hindexed-block | Subarray with order-C | Subarray with order-Fortran
- * 2. Minimum datatypes generator:
- * All basic datatypes | Vector | Indexed
*
- * MPI test can initialize either generator by calling the corresponding init
- * function before datatype loop, The full generator is set by default.
- * Full generator : MTestInitFullDatatypes
- * Minimum generator : MTestInitMinDatatypes
+ * There are two ways to specify the test level of datatype. The second way has
+ * higher priority (means the value specified by the first way will be overwritten
+ * by that in the second way).
+ * 1. Specify global test level by setting the MPITEST_DATATYPE_TEST_LEVEL
+ * environment variable before execution (basic,min,full|full by default).
+ * 2. Initialize a special level for a datatype loop by calling the corresponding
+ * initialization function before that loop, otherwise the default value specified
+ * in the first way is used.
+ * Basic : MTestInitBasicDatatypes
+ * Minimum : MTestInitMinDatatypes
+ * Full : MTestInitFullDatatypes
*/
static int datatype_index = 0;
@@ -103,11 +112,17 @@ static int MTEST_RECV_DDT_NUM_TESTS = 0;
static int MTEST_RECV_DDT_RANGE = 0;
enum {
- MTEST_DATATYPE_VERSION_FULL,
- MTEST_DATATYPE_VERSION_MIN
+ MTEST_DATATYPE_TEST_LEVEL_FULL,
+ MTEST_DATATYPE_TEST_LEVEL_MIN,
+ MTEST_DATATYPE_TEST_LEVEL_BASIC,
};
-static int MTEST_DATATYPE_VERSION = MTEST_DATATYPE_VERSION_FULL;
+/* current datatype test level */
+static int MTEST_DATATYPE_TEST_LEVEL = MTEST_DATATYPE_TEST_LEVEL_FULL;
+/* default datatype test level specified by environment variable */
+static int MTEST_DATATYPE_TEST_LEVEL_ENV = -1;
+/* default datatype initialization function */
+static void (*MTestInitDefaultTestFunc) (void) = NULL;
static void MTestInitDatatypeGen(int basic_dt_num, int derived_dt_num)
{
@@ -130,9 +145,9 @@ static int MTestIsDatatypeGenInited()
static void MTestPrintDatatypeGen()
{
- MTestPrintfMsg(1, "MTest datatype version : %s. %d basic datatype tests, "
+ MTestPrintfMsg(1, "MTest datatype test level : %s. %d basic datatype tests, "
"%d derived datatype tests will be generated\n",
- (MTEST_DATATYPE_VERSION == MTEST_DATATYPE_VERSION_FULL) ? "FULL" : "MIN",
+ (MTEST_DATATYPE_TEST_LEVEL == MTEST_DATATYPE_TEST_LEVEL_FULL) ? "FULL" : "MIN",
MTEST_BDT_NUM_TESTS, MTEST_SEND_DDT_NUM_TESTS + MTEST_RECV_DDT_NUM_TESTS);
}
@@ -143,12 +158,12 @@ static void MTestResetDatatypeGen()
void MTestInitFullDatatypes()
{
- /* Do not allow to change datatype version during loop.
+ /* Do not allow to change datatype test level during loop.
* Otherwise indexes will be wrong.
* Test must explicitly call reset or wait for current datatype loop being
- * done before changing to another datatype version. */
+ * done before changing to another test level. */
if (!MTestIsDatatypeGenInited()) {
- MTEST_DATATYPE_VERSION = MTEST_DATATYPE_VERSION_FULL;
+ MTEST_DATATYPE_TEST_LEVEL = MTEST_DATATYPE_TEST_LEVEL_FULL;
MTestTypeCreatorInit((MTestDdtCreator *) mtestDdtCreators);
MTestInitDatatypeGen(MTEST_BDT_MAX, MTEST_DDT_MAX);
}
@@ -159,12 +174,12 @@ void MTestInitFullDatatypes()
void MTestInitMinDatatypes()
{
- /* Do not allow to change datatype version during loop.
+ /* Do not allow to change datatype test level during loop.
* Otherwise indexes will be wrong.
* Test must explicitly call reset or wait for current datatype loop being
- * done before changing to another datatype version. */
+ * done before changing to another test level. */
if (!MTestIsDatatypeGenInited()) {
- MTEST_DATATYPE_VERSION = MTEST_DATATYPE_VERSION_MIN;
+ MTEST_DATATYPE_TEST_LEVEL = MTEST_DATATYPE_TEST_LEVEL_MIN;
MTestTypeMinCreatorInit((MTestDdtCreator *) mtestDdtCreators);
MTestInitDatatypeGen(MTEST_BDT_MAX, MTEST_MIN_DDT_MAX);
}
@@ -173,6 +188,49 @@ void MTestInitMinDatatypes()
}
}
+void MTestInitBasicDatatypes()
+{
+ /* Do not allow to change datatype test level during loop.
+ * Otherwise indexes will be wrong.
+ * Test must explicitly call reset or wait for current datatype loop being
+ * done before changing to another test level. */
+ if (!MTestIsDatatypeGenInited()) {
+ MTEST_DATATYPE_TEST_LEVEL = MTEST_DATATYPE_TEST_LEVEL_BASIC;
+ MTestInitDatatypeGen(MTEST_BDT_MAX, 0);
+ }
+ else {
+ printf("Warning: trying to reinitialize mtest datatype during " "datatype iteration!");
+ }
+}
+
+static inline void MTestInitDatatypeEnv()
+{
+ char *envval = 0;
+
+ /* Read global test level specified by user environment variable.
+ * Only initialize once at the first time that test calls datatype routine. */
+ if (MTEST_DATATYPE_TEST_LEVEL_ENV > -1)
+ return;
+
+ /* default full */
+ MTEST_DATATYPE_TEST_LEVEL_ENV = MTEST_DATATYPE_TEST_LEVEL_FULL;
+ MTestInitDefaultTestFunc = MTestInitFullDatatypes;
+
+ envval = getenv("MPITEST_DATATYPE_TEST_LEVEL");
+ if (envval && strlen(envval)) {
+ if (!strncmp(envval, "min", strlen("min"))) {
+ MTEST_DATATYPE_TEST_LEVEL_ENV = MTEST_DATATYPE_TEST_LEVEL_MIN;
+ MTestInitDefaultTestFunc = MTestInitMinDatatypes;
+ }
+ else if (!strncmp(envval, "basic", strlen("basic"))) {
+ MTEST_DATATYPE_TEST_LEVEL_ENV = MTEST_DATATYPE_TEST_LEVEL_BASIC;
+ MTestInitDefaultTestFunc = MTestInitBasicDatatypes;
+ }
+ else if (strncmp(envval, "full", strlen("full"))) {
+ fprintf(stderr, "Unknown MPITEST_DATATYPE_TEST_LEVEL %s\n", envval);
+ }
+ }
+}
/* -------------------------------------------------------------------------------*/
/* Routine to define various sets of blocklen/count/stride for derived datatypes. */
@@ -407,11 +465,12 @@ int MTestGetDatatypes(MTestDatatype * sendtype, MTestDatatype * recvtype, MPI_Ai
int merr = 0;
MTestGetDbgInfo(&dbgflag, &verbose);
+ MTestInitDatatypeEnv();
MPI_Comm_rank(MPI_COMM_WORLD, &wrank);
- /* Initialize the full version if test does not specify. */
+ /* Initialize the default test level if test does not specify. */
if (!MTestIsDatatypeGenInited()) {
- MTestInitFullDatatypes();
+ MTestInitDefaultTestFunc();
}
if (datatype_index == 0) {
-----------------------------------------------------------------------
Summary of changes:
test/mpi/coll/bcast2.c | 7 +--
test/mpi/coll/bcast3.c | 7 +--
test/mpi/pt2pt/pingping.c | 7 +--
test/mpi/util/mtest_datatype_gen.c | 101 ++++++++++++++++++++++++++++--------
4 files changed, 89 insertions(+), 33 deletions(-)
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.2a2-12-gd39a736
by noreply@mpich.org 22 Nov '14
by noreply@mpich.org 22 Nov '14
22 Nov '14
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "MPICH primary repository".
The branch, master has been updated
via d39a7363aada877e7bc43011b7d2226128cf9df6 (commit)
from e38618b0fd8cfb5453a7ad8149afc91d9fdd5e24 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.mpich.org/mpich.git/commitdiff/d39a7363aada877e7bc43011b7d222612…
commit d39a7363aada877e7bc43011b7d2226128cf9df6
Author: Charles J Archer <charles.j.archer(a)intel.com>
Date: Mon Nov 17 10:15:05 2014 -0800
Open Fabrics Working Group (OFIWG) Netmod Support
* Implements a tag matching interface netmod over the OFIWG Scalable Fabric Interfaces (SFI)
diff --git a/src/mpid/ch3/channels/nemesis/netmod/Makefile.mk b/src/mpid/ch3/channels/nemesis/netmod/Makefile.mk
index 256ae99..648b7ee 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/Makefile.mk
+++ b/src/mpid/ch3/channels/nemesis/netmod/Makefile.mk
@@ -13,3 +13,4 @@ include $(top_srcdir)/src/mpid/ch3/channels/nemesis/netmod/scif/Makefile.mk
include $(top_srcdir)/src/mpid/ch3/channels/nemesis/netmod/portals4/Makefile.mk
include $(top_srcdir)/src/mpid/ch3/channels/nemesis/netmod/ib/Makefile.mk
include $(top_srcdir)/src/mpid/ch3/channels/nemesis/netmod/mxm/Makefile.mk
+include $(top_srcdir)/src/mpid/ch3/channels/nemesis/netmod/sfi/Makefile.mk
diff --git a/src/mpid/ch3/channels/nemesis/netmod/sfi/Makefile.mk b/src/mpid/ch3/channels/nemesis/netmod/sfi/Makefile.mk
new file mode 100644
index 0000000..bc3d6ef
--- /dev/null
+++ b/src/mpid/ch3/channels/nemesis/netmod/sfi/Makefile.mk
@@ -0,0 +1,19 @@
+## -*- Mode: Makefile; -*-
+## vim: set ft=automake :
+##
+## (C) 2011 by Argonne National Laboratory.
+## See COPYRIGHT in top-level directory.
+##
+if BUILD_NEMESIS_NETMOD_SFI
+
+mpi_core_sources += \
+ src/mpid/ch3/channels/nemesis/netmod/sfi/sfi_init.c \
+ src/mpid/ch3/channels/nemesis/netmod/sfi/sfi_cm.c \
+ src/mpid/ch3/channels/nemesis/netmod/sfi/sfi_tagged.c \
+ src/mpid/ch3/channels/nemesis/netmod/sfi/sfi_msg.c \
+ src/mpid/ch3/channels/nemesis/netmod/sfi/sfi_data.c \
+ src/mpid/ch3/channels/nemesis/netmod/sfi/sfi_progress.c
+
+errnames_txt_files += src/mpid/ch3/channels/nemesis/netmod/sfi/errnames.txt
+
+endif
diff --git a/src/mpid/ch3/channels/nemesis/netmod/sfi/errnames.txt b/src/mpid/ch3/channels/nemesis/netmod/sfi/errnames.txt
new file mode 100644
index 0000000..c1ae0e3
--- /dev/null
+++ b/src/mpid/ch3/channels/nemesis/netmod/sfi/errnames.txt
@@ -0,0 +1,42 @@
+**sfi_avmap:SFI get address vector map failed
+**sfi_avmap %s %d %s %s:SFI address vector map failed (%s:%d:%s:%s)
+**sfi_tsendto:SFI tagged sendto failed
+**sfi_tsendto %s %d %s %s:SFI tagged sendto failed (%s:%d:%s:%s)
+**sfi_trecvfrom:SFI tagged recvfrom failed
+**sfi_trecvfrom %s %d %s %s:SFI tagged recvfrom failed (%s:%d:%s:%s)
+**sfi_getinfo:SFI getinfo() failed
+**sfi_getinfo %s %d %s %s:SFI getinfo() failed (%s:%d:%s:%s)
+**sfi_openep:SFI endpoint open failed
+**sfi_openep %s %d %s %s:SFI endpoint open failed (%s:%d:%s:%s)
+**sfi_openfabric:SFI fabric open failure
+**sfi_openfabric %s %d %s %s:SFI fabric open failed (%s:%d:%s:%s)
+**sfi_opendomain:SFI domain open failure
+**sfi_opendomain %s %d %s %s:SFI domain open failed (%s:%d:%s:%s)
+**sfi_opencq:SFI event queue create failure
+**sfi_opencq %s %d %s %s:SFI event queue create failed (%s:%d:%s:%s)
+**sfi_avopen:SFI address vector open failed
+**sfi_avopen %s %d %s %s:SFI address vector open failed (%s:%d:%s:%s)
+**sfi_bind:SFI resource bind failure
+**sfi_bind %s %d %s %s:SFI resource bind failed (%s:%d:%s:%s)
+**sfi_ep_enable:SFI endpoint enable failed
+**sfi_ep_enable %s %d %s %s:SFI endpoint enable failed (%s:%d:%s:%s)
+**sfi_getname:SFI get endpoint name failed
+**sfi_getname %s %d %s %s:SFI get endpoint name failed (%s:%d:%s:%s)
+**sfi_avclose:SFI av close failed
+**sfi_avclose %s %d %s %s:SFI av close failed (%s:%d:%s:%s)
+**sfi_epclose:SFI endpoint close failed
+**sfi_epclose %s %d %s %s:SFI endpoint close failed (%s:%d:%s:%s)
+**sfi_cqclose:SFI cq close failed
+**sfi_cqclose %s %d %s %s:SFI cq close failed (%s:%d:%s:%s)
+**sfi_mrclose:SFI mr close failed
+**sfi_mrclose %s %d %s %s:SFI mr close failed (%s:%d:%s:%s)
+**sfi_fabricclose:SFI fabric close failed
+**sfi_fabricclose %s %d %s %s:SFI fabric close failed (%s:%d:%s:%s)
+**sfi_domainclose:SFI domain close failed
+**sfi_domainclose %s %d %s %s:SFI domain close failed (%s:%d:%s:%s)
+**sfi_tsearch:SFI tsearch failed
+**sfi_tsearch %s %d %s %s:SFI tsearch failed (%s:%d:%s:%s)
+**sfi_poll:SFI poll failed
+**sfi_poll %s %d %s %s:SFI poll failed (%s:%d:%s:%s)
+**sfi_cancel:SFI cancel failed
+**sfi_cancel %s %d %s %s:SFI cancel failed (%s:%d:%s:%s)
diff --git a/src/mpid/ch3/channels/nemesis/netmod/sfi/sfi_cm.c b/src/mpid/ch3/channels/nemesis/netmod/sfi/sfi_cm.c
new file mode 100644
index 0000000..b39517a
--- /dev/null
+++ b/src/mpid/ch3/channels/nemesis/netmod/sfi/sfi_cm.c
@@ -0,0 +1,577 @@
+/*
+ * (C) 2006 by Argonne National Laboratory.
+ * See COPYRIGHT in top-level directory.
+ *
+ * Portions of this code were written by Intel Corporation.
+ * Copyright (C) 2011-2012 Intel Corporation. Intel provides this material
+ * to Argonne National Laboratory subject to Software Grant and Corporate
+ * Contributor License Agreement dated February 8, 2012.
+ */
+#include "sfi_impl.h"
+
+/* ------------------------------------------------------------------------ */
+/* sfi_tag_to_vc */
+/* This routine converts tag information from an incoming preposted receive */
+/* into the VC that uses the routine. There is a possibility of a small */
+/* list of temporary VC's that are used during dynamic task management */
+/* to create the VC's. This search is linear, but should be a small number */
+/* of temporary VC's that will eventually be destroyed by the upper layers */
+/* Otherwise the tag is split into a PG "number", which is a hash of the */
+/* data contained in the process group, and a source. The source/pg number */
+/* is enough to look up the VC. */
+/* ------------------------------------------------------------------------ */
+#undef FCNAME
+#define FCNAME DECL_FUNC(sfi_tag_to_vc)
+static inline MPIDI_VC_t *sfi_tag_to_vc(uint64_t match_bits)
+{
+ int pgid = 0, port = 0;
+ MPIDI_VC_t *vc = NULL;
+ MPIDI_PG_t *pg = NULL;
+
+ BEGIN_FUNC(FCNAME);
+ if (NO_PGID == get_pgid(match_bits)) {
+ /* -------------------------------------------------------------------- */
+ /* Dynamic path -- This uses a linear search, but number of cm vc's is */
+ /* a small number, and they should be ephemeral. This lookup should */
+ /* be fast yet not normally on the critical path. */
+ /* -------------------------------------------------------------------- */
+ port = get_port(match_bits);
+ vc = gl_data.cm_vcs;
+ while (vc && vc->port_name_tag != port) {
+ vc = VC_SFI(vc)->next;
+ }
+ if (NULL == vc) {
+ MPIU_Assertp(0);
+ }
+ }
+ else {
+ /* -------------------------------------------------------------------- */
+ /* If there are no connection management VC's, this is the normal path */
+ /* Generate the PG number has from each known process group compare to */
+ /* the pg number in the tag. The number of PG's should be small */
+ /* -------------------------------------------------------------------- */
+ pg = gl_data.pg_p;
+ while (pg) {
+ MPIDI_PG_IdToNum(pg, &pgid);
+ if (get_pgid(match_bits) == pgid) {
+ break;
+ }
+ pg = pg->next;
+ }
+ if (pg) {
+ MPIDI_PG_Get_vc(pg, get_psource(match_bits), &vc);
+ }
+ else {
+ MPIU_Assert(0);
+ }
+ }
+ END_FUNC(FCNAME);
+ return vc;
+}
+
+/* ------------------------------------------------------------------------ */
+/* MPID_nem_sfi_conn_req_callback */
+/* A new process has been created and is connected to the current world */
+/* The address of the new process is exchanged via the business card */
+/* instead of being exchanged up front during the creation of the first */
+/* world. The new connection routine is usually invoked when two worlds */
+/* are started via dynamic tasking. */
+/* This routine: */
+/* * repost the persistent connection management receive request */
+/* * malloc/create/initialize the VC */
+/* * grabs the address name from the business card */
+/* * uses fi_av_insert to insert the addr into the address vector. */
+/* This is marked as a "connection management" vc, and may be destroyed */
+/* by the upper layers. We handle the cm vc's slightly differently than */
+/* other VC's because they may not be part of a process group. */
+/* ------------------------------------------------------------------------ */
+#undef FCNAME
+#define FCNAME DECL_FUNC(MPID_nem_sfi_conn_req_callback)
+static inline int MPID_nem_sfi_conn_req_callback(cq_tagged_entry_t * wc, MPID_Request * rreq)
+{
+ int ret, len, mpi_errno = MPI_SUCCESS;
+ char bc[SFI_KVSAPPSTRLEN];
+
+ MPIDI_VC_t *vc;
+ char *addr = NULL;
+ fi_addr_t direct_addr;
+
+ BEGIN_FUNC(FCNAME);
+
+ MPIU_Memcpy(bc, rreq->dev.user_buf, wc->len);
+ bc[wc->len] = '\0';
+ MPIU_Assert(gl_data.conn_req == rreq);
+ FI_RC(fi_trecvfrom(gl_data.endpoint,
+ gl_data.conn_req->dev.user_buf,
+ SFI_KVSAPPSTRLEN,
+ gl_data.mr,
+ 0,
+ MPID_CONN_REQ,
+ ~MPID_PROTOCOL_MASK,
+ (void *) &(REQ_SFI(gl_data.conn_req)->sfi_context)), trecvfrom);
+
+ addr = MPIU_Malloc(gl_data.bound_addrlen);
+ MPIU_Assertp(addr);
+
+ vc = MPIU_Malloc(sizeof(MPIDI_VC_t));
+ MPIU_Assertp(vc);
+
+ MPIDI_VC_Init(vc, NULL, 0);
+ MPI_RC(MPIDI_GetTagFromPort(bc, &vc->port_name_tag));
+ ret = MPIU_Str_get_binary_arg(bc, "SFI", addr, gl_data.bound_addrlen, &len);
+ MPIU_ERR_CHKANDJUMP((ret != MPIU_STR_SUCCESS && ret != MPIU_STR_NOMEM) ||
+ (size_t) len != gl_data.bound_addrlen,
+ mpi_errno, MPI_ERR_OTHER, "**badbusinesscard");
+
+ FI_RC(fi_av_insert(gl_data.av, addr, 1, &direct_addr, 0ULL, NULL), avmap);
+ VC_SFI(vc)->direct_addr = direct_addr;
+ VC_SFI(vc)->ready = 1;
+ VC_SFI(vc)->is_cmvc = 1;
+ VC_SFI(vc)->next = gl_data.cm_vcs;
+ gl_data.cm_vcs = vc;
+
+ MPIDI_CH3I_Acceptq_enqueue(vc, vc->port_name_tag);
+ MPIDI_CH3I_INCR_PROGRESS_COMPLETION_COUNT;
+ fn_exit:
+ MPIU_Free(addr);
+ END_FUNC(FCNAME);
+ return mpi_errno;
+ fn_fail:
+ if (vc)
+ MPIU_Free(vc);
+ goto fn_exit;
+}
+
+/* ------------------------------------------------------------------------ */
+/* MPID_nem_sfi_handle_packet */
+/* The "parent" request tracks the state of the entire rendezvous */
+/* As "child" requests complete, the cc counter is decremented */
+/* Notify CH3 that we have an incoming packet (if cc hits 1). Otherwise */
+/* decrement the ref counter via request completion */
+/* ------------------------------------------------------------------------ */
+#undef FCNAME
+#define FCNAME DECL_FUNC(MPID_nem_sfi_handle_packet)
+static inline int MPID_nem_sfi_handle_packet(cq_tagged_entry_t * wc ATTRIBUTE((unused)),
+ MPID_Request * rreq)
+{
+ int mpi_errno = MPI_SUCCESS;
+ MPIDI_VC_t *vc;
+
+ BEGIN_FUNC(FCNAME);
+ if (rreq->cc == 1) {
+ vc = REQ_SFI(rreq)->vc;
+ MPIU_Assert(vc);
+ MPI_RC(MPID_nem_handle_pkt(vc, REQ_SFI(rreq)->pack_buffer, REQ_SFI(rreq)->pack_buffer_size))
+ MPIU_Free(REQ_SFI(rreq)->pack_buffer);
+ }
+ MPIDI_CH3U_Request_complete(rreq);
+ END_FUNC_RC(FCNAME);
+}
+
+/* ------------------------------------------------------------------------ */
+/* MPID_nem_sfi_cts_send_callback */
+/* A wrapper around MPID_nem_sfi_handle_packet that decrements */
+/* the parent request's counter, and cleans up the CTS request */
+/* ------------------------------------------------------------------------ */
+#undef FCNAME
+#define FCNAME DECL_FUNC(MPID_nem_sfi_cts_send_callback)
+static inline int MPID_nem_sfi_cts_send_callback(cq_tagged_entry_t * wc, MPID_Request * sreq)
+{
+ int mpi_errno = MPI_SUCCESS;
+ BEGIN_FUNC(FCNAME);
+ MPI_RC(MPID_nem_sfi_handle_packet(wc, REQ_SFI(sreq)->parent));
+ MPIDI_CH3U_Request_complete(sreq);
+ END_FUNC_RC(FCNAME);
+}
+
+/* ------------------------------------------------------------------------ */
+/* MPID_nem_sfi_preposted_callback */
+/* This callback handles incoming "SendContig" messages (see sfi_msg.c) */
+/* for the send routines. This implements the CTS response and the RTS */
+/* handler. The steps are as follows: */
+/* * Create a parent data request and post a receive into a pack buffer */
+/* * Create a child request and send the CTS packet */
+/* * Re-Post the RTS receive and handler to handle the next message */
+/* ------------------------------------------------------------------------ */
+#undef FCNAME
+#define FCNAME DECL_FUNC(MPID_nem_sfi_preposted_callback)
+static inline int MPID_nem_sfi_preposted_callback(cq_tagged_entry_t * wc, MPID_Request * rreq)
+{
+ int c, mpi_errno = MPI_SUCCESS;
+ size_t pkt_len;
+ char *pack_buffer = NULL;
+ MPIDI_VC_t *vc;
+ MPID_Request *new_rreq, *sreq;
+ BEGIN_FUNC(FCNAME);
+
+ vc = sfi_tag_to_vc(wc->tag);
+ MPIU_Assert(vc);
+ VC_READY_CHECK(vc);
+
+ pkt_len = rreq->dev.user_count;
+ pack_buffer = (char *) MPIU_Malloc(pkt_len);
+ MPIU_ERR_CHKANDJUMP1(pack_buffer == NULL, mpi_errno, MPI_ERR_OTHER,
+ "**nomem", "**nomem %s", "Pack Buffer alloc");
+ c = 1;
+ MPID_nem_sfi_create_req(&new_rreq, 1);
+ MPID_cc_incr(new_rreq->cc_ptr, &c);
+ new_rreq->dev.OnDataAvail = NULL;
+ new_rreq->dev.next = NULL;
+ REQ_SFI(new_rreq)->event_callback = MPID_nem_sfi_handle_packet;
+ REQ_SFI(new_rreq)->vc = vc;
+ REQ_SFI(new_rreq)->pack_buffer = pack_buffer;
+ REQ_SFI(new_rreq)->pack_buffer_size = pkt_len;
+ FI_RC(fi_trecvfrom(gl_data.endpoint,
+ REQ_SFI(new_rreq)->pack_buffer,
+ REQ_SFI(new_rreq)->pack_buffer_size,
+ gl_data.mr,
+ VC_SFI(vc)->direct_addr,
+ wc->tag | MPID_MSG_DATA, 0, &(REQ_SFI(new_rreq)->sfi_context)), trecvfrom);
+
+ MPID_nem_sfi_create_req(&sreq, 1);
+ sreq->dev.OnDataAvail = NULL;
+ sreq->dev.next = NULL;
+ REQ_SFI(sreq)->event_callback = MPID_nem_sfi_cts_send_callback;
+ REQ_SFI(sreq)->parent = new_rreq;
+ FI_RC(fi_tsendto(gl_data.endpoint,
+ NULL,
+ 0,
+ gl_data.mr,
+ VC_SFI(vc)->direct_addr,
+ wc->tag | MPID_MSG_CTS, &(REQ_SFI(sreq)->sfi_context)), tsendto);
+ MPIU_Assert(gl_data.persistent_req == rreq);
+
+ rreq->dev.user_count = 0;
+ FI_RC(fi_trecvfrom(gl_data.endpoint,
+ &rreq->dev.user_count,
+ sizeof rreq->dev.user_count,
+ gl_data.mr,
+ 0,
+ MPID_MSG_RTS,
+ ~MPID_PROTOCOL_MASK, &(REQ_SFI(rreq)->sfi_context)), trecvfrom);
+ END_FUNC_RC(FCNAME);
+}
+
+/* ------------------------------------------------------------------------ */
+/* MPID_nem_sfi_connect_to_root_callback */
+/* Complete and clean up the request */
+/* ------------------------------------------------------------------------ */
+#undef FCNAME
+#define FCNAME DECL_FUNC(MPID_nem_sfi_connect_to_root_callback)
+int MPID_nem_sfi_connect_to_root_callback(cq_tagged_entry_t * wc ATTRIBUTE((unused)),
+ MPID_Request * sreq)
+{
+ int mpi_errno = MPI_SUCCESS;
+ BEGIN_FUNC(FCNAME);
+
+ if (REQ_SFI(sreq)->pack_buffer)
+ MPIU_Free(REQ_SFI(sreq)->pack_buffer);
+ MPIDI_CH3U_Request_complete(sreq);
+
+ END_FUNC(FCNAME);
+ return mpi_errno;
+}
+
+/* ------------------------------------------------------------------------ */
+/* MPID_nem_sfi_cm_init */
+/* This is a utility routine that sets up persistent connection management */
+/* requests and a persistent data request to handle rendezvous SendContig */
+/* messages. */
+/* ------------------------------------------------------------------------ */
+#undef FCNAME
+#define FCNAME DECL_FUNC(MPID_nem_sfi_cm_init)
+int MPID_nem_sfi_cm_init(MPIDI_PG_t * pg_p, int pg_rank ATTRIBUTE((unused)))
+{
+ int mpi_errno = MPI_SUCCESS;
+ MPID_Request *persistent_req, *conn_req;
+ BEGIN_FUNC(FCNAME);
+
+ /* ------------------------------------- */
+ /* Set up CH3 and netmod data structures */
+ /* ------------------------------------- */
+ MPI_RC(MPIDI_CH3I_Register_anysource_notification(MPID_nem_sfi_anysource_posted,
+ MPID_nem_sfi_anysource_matched));
+ MPIDI_Anysource_iprobe_fn = MPID_nem_sfi_anysource_iprobe;
+ MPIDI_Anysource_improbe_fn = MPID_nem_sfi_anysource_improbe;
+ gl_data.pg_p = pg_p;
+
+ /* ----------------------------------- */
+ /* Post a persistent request to handle */
+ /* ----------------------------------- */
+ MPID_nem_sfi_create_req(&persistent_req, 1);
+ persistent_req->dev.OnDataAvail = NULL;
+ persistent_req->dev.next = NULL;
+ REQ_SFI(persistent_req)->vc = NULL;
+ REQ_SFI(persistent_req)->event_callback = MPID_nem_sfi_preposted_callback;
+ FI_RC(fi_trecvfrom(gl_data.endpoint,
+ &persistent_req->dev.user_count,
+ sizeof persistent_req->dev.user_count,
+ gl_data.mr,
+ 0,
+ MPID_MSG_RTS,
+ ~MPID_PROTOCOL_MASK,
+ (void *) &(REQ_SFI(persistent_req)->sfi_context)), trecvfrom);
+ gl_data.persistent_req = persistent_req;
+
+ /* --------------------------------- */
+ /* Post recv for connection requests */
+ /* --------------------------------- */
+ MPID_nem_sfi_create_req(&conn_req, 1);
+ conn_req->dev.user_buf = MPIU_Malloc(SFI_KVSAPPSTRLEN * sizeof(char));
+ conn_req->dev.OnDataAvail = NULL;
+ conn_req->dev.next = NULL;
+ REQ_SFI(conn_req)->vc = NULL; /* We don't know the source yet */
+ REQ_SFI(conn_req)->event_callback = MPID_nem_sfi_conn_req_callback;
+ FI_RC(fi_trecvfrom(gl_data.endpoint,
+ conn_req->dev.user_buf,
+ SFI_KVSAPPSTRLEN,
+ gl_data.mr,
+ 0,
+ MPID_CONN_REQ,
+ ~MPID_PROTOCOL_MASK, (void *) &(REQ_SFI(conn_req)->sfi_context)), trecvfrom);
+ gl_data.conn_req = conn_req;
+
+
+ fn_exit:
+ END_FUNC(FCNAME);
+ return mpi_errno;
+
+ fn_fail:
+ goto fn_exit;
+}
+
+/* ------------------------------------------------------------------------ */
+/* MPID_nem_sfi_cm_finalize */
+/* Clean up and cancle the requests initiated by the cm_init routine */
+/* ------------------------------------------------------------------------ */
+#undef FCNAME
+#define FCNAME DECL_FUNC(MPID_nem_sfi_cm_finalize)
+int MPID_nem_sfi_cm_finalize()
+{
+ int mpi_errno = MPI_SUCCESS;
+ BEGIN_FUNC(FCNAME);
+ FI_RC(fi_cancel((fid_t) gl_data.endpoint,
+ &(REQ_SFI(gl_data.persistent_req)->sfi_context)), cancel);
+ MPIR_STATUS_SET_CANCEL_BIT(gl_data.persistent_req->status, TRUE);
+ MPIR_STATUS_SET_COUNT(gl_data.persistent_req->status, 0);
+ MPIDI_CH3U_Request_complete(gl_data.persistent_req);
+
+ FI_RC(fi_cancel((fid_t) gl_data.endpoint, &(REQ_SFI(gl_data.conn_req)->sfi_context)), cancel);
+ MPIU_Free(gl_data.conn_req->dev.user_buf);
+ MPIR_STATUS_SET_CANCEL_BIT(gl_data.conn_req->status, TRUE);
+ MPIR_STATUS_SET_COUNT(gl_data.conn_req->status, 0);
+ MPIDI_CH3U_Request_complete(gl_data.conn_req);
+ fn_exit:
+ END_FUNC(FCNAME);
+ return mpi_errno;
+ fn_fail:
+ goto fn_exit;
+}
+
+/* ------------------------------------------------------------------------ */
+/* MPID_nem_sfi_vc_connect */
+/* Handle CH3/Nemesis VC connections */
+/* * Query the VC address information. In particular we are looking for */
+/* the fabric address name. */
+/* * Use fi_av_insert to register the address name with SFI */
+/* ------------------------------------------------------------------------ */
+#undef FCNAME
+#define FCNAME DECL_FUNC(MPID_nem_sfi_vc_connect)
+int MPID_nem_sfi_vc_connect(MPIDI_VC_t * vc)
+{
+ int len, ret, mpi_errno = MPI_SUCCESS;
+ char bc[SFI_KVSAPPSTRLEN], *addr = NULL;
+
+ BEGIN_FUNC(FCNAME);
+ addr = MPIU_Malloc(gl_data.bound_addrlen);
+ MPIU_Assert(addr);
+ MPIU_Assert(1 != VC_SFI(vc)->ready);
+
+ if (!vc->pg || !vc->pg->getConnInfo) {
+ goto fn_exit;
+ }
+
+ MPI_RC(vc->pg->getConnInfo(vc->pg_rank, bc, SFI_KVSAPPSTRLEN, vc->pg));
+ ret = MPIU_Str_get_binary_arg(bc, "SFI", addr, gl_data.bound_addrlen, &len);
+ MPIU_ERR_CHKANDJUMP((ret != MPIU_STR_SUCCESS && ret != MPIU_STR_NOMEM) ||
+ (size_t) len != gl_data.bound_addrlen,
+ mpi_errno, MPI_ERR_OTHER, "**badbusinesscard");
+ FI_RC(fi_av_insert(gl_data.av, addr, 1, &(VC_SFI(vc)->direct_addr), 0ULL, NULL), avmap);
+ VC_SFI(vc)->ready = 1;
+
+ fn_exit:
+ if (addr)
+ MPIU_Free(addr);
+ END_FUNC(FCNAME);
+ return mpi_errno;
+
+ fn_fail:
+ goto fn_exit;
+}
+
+#undef FCNAME
+#define FCNAME DECL_FUNC(MPID_nem_sfi_vc_init)
+int MPID_nem_sfi_vc_init(MPIDI_VC_t * vc)
+{
+ int mpi_errno = MPI_SUCCESS;
+ MPIDI_CH3I_VC *const vc_ch = &vc->ch;
+ MPID_nem_sfi_vc_t *const vc_sfi = VC_SFI(vc);
+
+ BEGIN_FUNC(FCNAME);
+ vc->sendNoncontig_fn = MPID_nem_sfi_SendNoncontig;
+ vc_ch->iStartContigMsg = MPID_nem_sfi_iStartContigMsg;
+ vc_ch->iSendContig = MPID_nem_sfi_iSendContig;
+ vc_ch->next = NULL;
+ vc_ch->prev = NULL;
+ vc_sfi->is_cmvc = 0;
+ vc->comm_ops = &_g_comm_ops;
+
+ MPIDI_CHANGE_VC_STATE(vc, ACTIVE);
+
+ if (NULL == vc->pg) {
+ vc_sfi->is_cmvc = 1;
+ }
+ else {
+ }
+ END_FUNC(FCNAME);
+ return mpi_errno;
+}
+
+/* ------------------------------------------------------------------------ */
+/* MPID_nem_sfi_vc_destroy */
+/* MPID_nem_sfi_vc_terminate */
+/* TODO: Verify this code has no leaks */
+/* ------------------------------------------------------------------------ */
+#undef FCNAME
+#define FCNAME DECL_FUNC(MPID_nem_sfi_vc_destroy)
+int MPID_nem_sfi_vc_destroy(MPIDI_VC_t * vc)
+{
+ BEGIN_FUNC(FCNAME);
+ if (vc && (VC_SFI(vc)->is_cmvc == 1) && (VC_SFI(vc)->ready == 1)) {
+ if (vc->pg != NULL) {
+ printf("ERROR: VC Destroy (%p) pg = %s\n", vc, (char *) vc->pg->id);
+ }
+ MPIDI_VC_t *prev = gl_data.cm_vcs;
+ while (prev && prev != vc && VC_SFI(prev)->next != vc) {
+ prev = VC_SFI(vc)->next;
+ }
+ if (VC_SFI(prev)->next == vc) {
+ VC_SFI(prev)->next = VC_SFI(vc)->next;
+ }
+ else if (vc == gl_data.cm_vcs) {
+ gl_data.cm_vcs = VC_SFI(vc)->next;
+ }
+ else {
+ MPIU_Assert(0);
+ }
+ }
+ VC_SFI(vc)->ready = 0;
+ END_FUNC(FCNAME);
+ return MPI_SUCCESS;
+}
+
+#undef FCNAME
+#define FCNAME DECL_FUNC(MPID_nem_sfi_vc_terminate)
+int MPID_nem_sfi_vc_terminate(MPIDI_VC_t * vc)
+{
+ int mpi_errno = MPI_SUCCESS;
+ BEGIN_FUNC(FCNAME);
+ MPI_RC(MPIDI_CH3U_Handle_connection(vc, MPIDI_VC_EVENT_TERMINATED));
+ VC_SFI(vc)->ready = 0;
+ END_FUNC_RC(FCNAME);
+}
+
+
+
+/* ------------------------------------------------------------------------ */
+/* MPID_nem_sfi_connect_to_root */
+/* * A new unconnected VC (cm/ephemeral VC) has been created. This code */
+/* connects the new VC to a rank in another process group. The parent */
+/* address is obtained by an out of band method and given to this */
+/* routine as a business card */
+/* * Read the business card address and insert the address */
+/* * Send a connection request to the parent. The parent has posted a */
+/* persistent request to handle incoming connection requests */
+/* The connect message has the child's business card. */
+/* * Add the new VC to the list of ephemeral BC's (cm_vc's). These VC's */
+/* are not part of the process group, so they require special handling */
+/* during the SendContig family of routines. */
+/* ------------------------------------------------------------------------ */
+#undef FCNAME
+#define FCNAME DECL_FUNC(nm_connect_to_root)
+int MPID_nem_sfi_connect_to_root(const char *business_card, MPIDI_VC_t * new_vc)
+{
+ int len, ret, mpi_errno = MPI_SUCCESS, str_errno = MPI_SUCCESS;
+ int my_bc_len = SFI_KVSAPPSTRLEN;
+ char *addr = NULL, *bc = NULL, *my_bc = NULL;
+ MPID_Request *sreq;
+ uint64_t conn_req_send_bits;
+
+ BEGIN_FUNC(FCNAME);
+ addr = MPIU_Malloc(gl_data.bound_addrlen);
+ bc = MPIU_Malloc(SFI_KVSAPPSTRLEN);
+ MPIU_Assertp(addr);
+ MPIU_Assertp(bc);
+ my_bc = bc;
+ if (!business_card || business_card[0] != 't') {
+ mpi_errno = MPI_ERR_OTHER;
+ goto fn_fail;
+ }
+ MPI_RC(MPIDI_GetTagFromPort(business_card, &new_vc->port_name_tag));
+ ret = MPIU_Str_get_binary_arg(business_card, "SFI", addr, gl_data.bound_addrlen, &len);
+ MPIU_ERR_CHKANDJUMP((ret != MPIU_STR_SUCCESS && ret != MPIU_STR_NOMEM) ||
+ (size_t) len != gl_data.bound_addrlen,
+ mpi_errno, MPI_ERR_OTHER, "**badbusinesscard");
+ FI_RC(fi_av_insert(gl_data.av, addr, 1, &(VC_SFI(new_vc)->direct_addr), 0ULL, NULL), avmap);
+
+ VC_SFI(new_vc)->ready = 1;
+ str_errno = MPIU_Str_add_int_arg(&bc, &my_bc_len, "tag", new_vc->port_name_tag);
+ MPIU_ERR_CHKANDJUMP(str_errno, mpi_errno, MPI_ERR_OTHER, "**argstr_port_name_tag");
+ MPI_RC(MPID_nem_sfi_get_business_card(MPIR_Process.comm_world->rank, &bc, &my_bc_len));
+ my_bc_len = SFI_KVSAPPSTRLEN - my_bc_len;
+
+ MPID_nem_sfi_create_req(&sreq, 1);
+ sreq->kind = MPID_REQUEST_SEND;
+ sreq->dev.OnDataAvail = NULL;
+ sreq->dev.next = NULL;
+ REQ_SFI(sreq)->event_callback = MPID_nem_sfi_connect_to_root_callback;
+ REQ_SFI(sreq)->pack_buffer = my_bc;
+ conn_req_send_bits = init_sendtag(0, MPIR_Process.comm_world->rank, 0, MPID_CONN_REQ);
+ FI_RC(fi_tsendto(gl_data.endpoint,
+ REQ_SFI(sreq)->pack_buffer,
+ my_bc_len,
+ gl_data.mr,
+ VC_SFI(new_vc)->direct_addr,
+ conn_req_send_bits, &(REQ_SFI(sreq)->sfi_context)), tsendto);
+ MPID_nem_sfi_poll(MPID_NONBLOCKING_POLL);
+ VC_SFI(new_vc)->is_cmvc = 1;
+ VC_SFI(new_vc)->next = gl_data.cm_vcs;
+ gl_data.cm_vcs = new_vc;
+ fn_exit:
+ if (addr)
+ MPIU_Free(addr);
+ END_FUNC(FCNAME);
+ return mpi_errno;
+ fn_fail:
+ if (my_bc)
+ MPIU_Free(my_bc);
+ goto fn_exit;
+}
+
+#undef FCNAME
+#define FCNAME DECL_FUNC(MPID_nem_sfi_get_business_card)
+int MPID_nem_sfi_get_business_card(int my_rank ATTRIBUTE((unused)),
+ char **bc_val_p, int *val_max_sz_p)
+{
+ int mpi_errno = MPI_SUCCESS, str_errno = MPIU_STR_SUCCESS;
+ BEGIN_FUNC(FCNAME);
+ str_errno = MPIU_Str_add_binary_arg(bc_val_p,
+ val_max_sz_p,
+ "SFI",
+ (char *) &gl_data.bound_addr, sizeof(gl_data.bound_addr));
+ if (str_errno) {
+ MPIU_ERR_CHKANDJUMP(str_errno == MPIU_STR_NOMEM, mpi_errno, MPI_ERR_OTHER, "**buscard_len");
+ MPIU_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**buscard");
+ }
+ END_FUNC_RC(FCNAME);
+}
diff --git a/src/mpid/ch3/channels/nemesis/netmod/sfi/sfi_data.c b/src/mpid/ch3/channels/nemesis/netmod/sfi/sfi_data.c
new file mode 100644
index 0000000..1e39684
--- /dev/null
+++ b/src/mpid/ch3/channels/nemesis/netmod/sfi/sfi_data.c
@@ -0,0 +1,58 @@
+/*
+ * (C) 2006 by Argonne National Laboratory.
+ * See COPYRIGHT in top-level directory.
+ *
+ * Portions of this code were written by Intel Corporation.
+ * Copyright (C) 2011-2012 Intel Corporation. Intel provides this material
+ * to Argonne National Laboratory subject to Software Grant and Corporate
+ * Contributor License Agreement dated February 8, 2012.
+ */
+#include "sfi_impl.h"
+
+
+MPID_nem_sfi_global_t gl_data;
+
+/* ************************************************************************** */
+/* Netmod Function Table */
+/* ************************************************************************** */
+MPIDI_Comm_ops_t _g_comm_ops = {
+ MPID_nem_sfi_recv_posted, /* recv_posted */
+
+ MPID_nem_sfi_send, /* send */
+ MPID_nem_sfi_send, /* rsend */
+ MPID_nem_sfi_ssend, /* ssend */
+ MPID_nem_sfi_isend, /* isend */
+ MPID_nem_sfi_isend, /* irsend */
+ MPID_nem_sfi_issend, /* issend */
+
+ NULL, /* send_init */
+ NULL, /* bsend_init */
+ NULL, /* rsend_init */
+ NULL, /* ssend_init */
+ NULL, /* startall */
+
+ MPID_nem_sfi_cancel_send, /* cancel_send */
+ MPID_nem_sfi_cancel_recv, /* cancel_recv */
+
+ NULL, /* probe */
+ MPID_nem_sfi_iprobe, /* iprobe */
+ MPID_nem_sfi_improbe /* improbe */
+};
+
+MPID_nem_netmod_funcs_t MPIDI_nem_sfi_funcs = {
+ MPID_nem_sfi_init,
+ MPID_nem_sfi_finalize,
+#ifdef ENABLE_CHECKPOINTING
+ NULL,
+ NULL,
+ NULL,
+#endif
+ MPID_nem_sfi_poll,
+ MPID_nem_sfi_get_business_card,
+ MPID_nem_sfi_connect_to_root,
+ MPID_nem_sfi_vc_init,
+ MPID_nem_sfi_vc_destroy,
+ MPID_nem_sfi_vc_terminate,
+ MPID_nem_sfi_anysource_iprobe,
+ MPID_nem_sfi_anysource_improbe,
+};
diff --git a/src/mpid/ch3/channels/nemesis/netmod/sfi/sfi_impl.h b/src/mpid/ch3/channels/nemesis/netmod/sfi/sfi_impl.h
new file mode 100644
index 0000000..9e8b93f
--- /dev/null
+++ b/src/mpid/ch3/channels/nemesis/netmod/sfi/sfi_impl.h
@@ -0,0 +1,342 @@
+/*
+ * (C) 2006 by Argonne National Laboratory.
+ * See COPYRIGHT in top-level directory.
+ *
+ * Portions of this code were written by Intel Corporation.
+ * Copyright (C) 2011-2012 Intel Corporation. Intel provides this material
+ * to Argonne National Laboratory subject to Software Grant and Corporate
+ * Contributor License Agreement dated February 8, 2012.
+ */
+#ifndef SFI_IMPL_H
+#define SFI_IMPL_H
+
+#include "mpid_nem_impl.h"
+#include "mpihandlemem.h"
+#include "pmi.h"
+#include <rdma/fabric.h>
+#include <rdma/fi_errno.h>
+#include <rdma/fi_endpoint.h>
+#include <rdma/fi_domain.h>
+#include <rdma/fi_tagged.h>
+#include <rdma/fi_cm.h>
+#include <netdb.h>
+
+/* ************************************************************************** */
+/* Type Definitions */
+/* ************************************************************************** */
+typedef struct iovec iovec_t;
+typedef struct fi_info info_t;
+typedef struct fi_cq_attr cq_attr_t;
+typedef struct fi_av_attr av_attr_t;
+typedef struct fi_domain_attr domain_attr_t;
+typedef struct fi_tx_ctx_attr tx_ctx_attr_t;
+typedef struct fi_cq_tagged_entry cq_tagged_entry_t;
+typedef struct fi_cq_err_entry cq_err_entry_t;
+typedef struct fi_context context_t;
+typedef int (*event_callback_fn) (cq_tagged_entry_t * wc, MPID_Request *);
+typedef int (*req_fn) (MPIDI_VC_t *, MPID_Request *, int *);
+
+/* ******************************** */
+/* Global Object for state tracking */
+/* ******************************** */
+typedef struct {
+ fi_addr_t bound_addr; /* This ranks bound address */
+ fi_addr_t any_addr; /* Specifies any source */
+ size_t bound_addrlen; /* length of the bound address */
+ struct fid_fabric *fabric; /* fabric object */
+ struct fid_domain *domain; /* domain object */
+ struct fid_ep *endpoint; /* endpoint object */
+ struct fid_cq *cq; /* completion queue */
+ struct fid_av *av; /* address vector */
+ struct fid_mr *mr; /* memory region */
+ MPIDI_PG_t *pg_p; /* MPI Process group */
+ MPIDI_VC_t *cm_vcs; /* temporary VC's */
+ MPID_Request *persistent_req; /* Unexpected request queue */
+ MPID_Request *conn_req; /* Connection request */
+ MPIDI_Comm_ops_t comm_ops;
+} MPID_nem_sfi_global_t;
+
+/* ******************************** */
+/* Device channel specific data */
+/* This is per destination */
+/* ******************************** */
+typedef struct {
+ fi_addr_t direct_addr; /* Remote SFI address */
+ int ready; /* VC ready state */
+ int is_cmvc; /* Cleanup VC */
+ MPIDI_VC_t *next; /* VC queue */
+} MPID_nem_sfi_vc_t;
+#define VC_SFI(vc) ((MPID_nem_sfi_vc_t *)vc->ch.netmod_area.padding)
+
+/* ******************************** */
+/* Per request object data */
+/* SFI/Netmod specific */
+/* ******************************** */
+typedef struct {
+ context_t sfi_context; /* Context Object */
+ void *addr; /* SFI Address */
+ event_callback_fn event_callback; /* Callback Event */
+ char *pack_buffer; /* MPI Pack Buffer */
+ int pack_buffer_size; /* Pack buffer size */
+ int match_state; /* State of the match */
+ int req_started; /* Request state */
+ MPIDI_VC_t *vc; /* VC paired with this request */
+ uint64_t tag; /* 64 bit tag request */
+ MPID_Request *parent; /* Parent request */
+} MPID_nem_sfi_req_t;
+#define REQ_SFI(req) ((MPID_nem_sfi_req_t *)((req)->ch.netmod_area.padding))
+
+/* ******************************** */
+/* Logging and function macros */
+/* ******************************** */
+#undef FUNCNAME
+#define FUNCNAME nothing
+#define BEGIN_FUNC(FUNCNAME) \
+ MPIDI_STATE_DECL(FUNCNAME); \
+ MPIDI_FUNC_ENTER(FUNCNAME);
+#define END_FUNC(FUNCNAME) \
+ MPIDI_FUNC_EXIT(FUNCNAME);
+#define END_FUNC_RC(FUNCNAME) \
+ fn_exit: \
+ MPIDI_FUNC_EXIT(FUNCNAME); \
+ return mpi_errno; \
+fn_fail: \
+ goto fn_exit;
+
+#define __SHORT_FILE__ \
+ (strrchr(__FILE__,'/') \
+ ? strrchr(__FILE__,'/')+1 \
+ : __FILE__ \
+)
+#define DECL_FUNC(FUNCNAME) MPIU_QUOTE(FUNCNAME)
+#define SFI_COMPILE_TIME_ASSERT(expr_) \
+ do { switch(0) { case 0: case (expr_): default: break; } } while (0)
+
+#define FI_RC(FUNC,STR) \
+ do \
+ { \
+ ssize_t _ret = FUNC; \
+ MPIU_ERR_##CHKANDJUMP4(_ret<0, \
+ mpi_errno, \
+ MPI_ERR_OTHER, \
+ "**sfi_"#STR, \
+ "**sfi_"#STR" %s %d %s %s", \
+ __SHORT_FILE__, \
+ __LINE__, \
+ FCNAME, \
+ fi_strerror(-_ret)); \
+ } while (0)
+
+#define PMI_RC(FUNC,STR) \
+ do \
+ { \
+ pmi_errno = FUNC; \
+ MPIU_ERR_##CHKANDJUMP4(pmi_errno!=PMI_SUCCESS, \
+ mpi_errno, \
+ MPI_ERR_OTHER, \
+ "**sfi_"#STR, \
+ "**sfi_"#STR" %s %d %s %s", \
+ __SHORT_FILE__, \
+ __LINE__, \
+ FCNAME, \
+ #STR); \
+ } while (0)
+
+#define MPI_RC(FUNC) \
+ do \
+ { \
+ mpi_errno = FUNC; \
+ if (mpi_errno) MPIU_ERR_POP(mpi_errno); \
+ } while (0);
+
+#define VC_READY_CHECK(vc) \
+({ \
+ if (1 != VC_SFI(vc)->ready) { \
+ MPI_RC(MPID_nem_sfi_vc_connect(vc)); \
+ } \
+})
+
+#define SFI_ADDR_INIT(src, vc, remote_proc) \
+({ \
+ if (MPI_ANY_SOURCE != src) { \
+ MPIU_Assert(vc != NULL); \
+ VC_READY_CHECK(vc); \
+ remote_proc = VC_SFI(vc)->direct_addr; \
+ } else { \
+ MPIU_Assert(vc == NULL); \
+ remote_proc = gl_data.any_addr; \
+ } \
+})
+
+
+#define NO_PGID 0
+
+/* **************************************************************************
+ * match/ignore bit manipulation
+ * **************************************************************************
+ * 0123 4567 01234567 0123 4567 01234567 0123 4567 01234567 01234567 01234567
+ * | | |
+ * ^ | context id | source | message tag
+ * | | | |
+ * +---- protocol
+ * ************************************************************************** */
+#define MPID_PROTOCOL_MASK (0xF000000000000000ULL)
+#define MPID_CONTEXT_MASK (0x0FFFF00000000000ULL)
+#define MPID_SOURCE_MASK (0x00000FFFF0000000ULL)
+#define MPID_TAG_MASK (0x000000000FFFFFFFULL)
+#define MPID_PGID_MASK (0x00000000FFFFFFFFULL)
+#define MPID_PSOURCE_MASK (0x0000FFFF00000000ULL)
+#define MPID_PORT_NAME_MASK (0x0FFF000000000000ULL)
+#define MPID_SYNC_SEND (0x1000000000000000ULL)
+#define MPID_SYNC_SEND_ACK (0x2000000000000000ULL)
+#define MPID_MSG_RTS (0x3000000000000000ULL)
+#define MPID_MSG_CTS (0x4000000000000000ULL)
+#define MPID_MSG_DATA (0x5000000000000000ULL)
+#define MPID_CONN_REQ (0x6000000000000000ULL)
+#define MPID_SOURCE_SHIFT (16)
+#define MPID_TAG_SHIFT (28)
+#define MPID_PSOURCE_SHIFT (16)
+#define MPID_PORT_SHIFT (32)
+#define SFI_KVSAPPSTRLEN 1024
+
+/* ******************************** */
+/* Request manipulation inlines */
+/* ******************************** */
+static inline void MPID_nem_sfi_init_req(MPID_Request * req)
+{
+ memset(REQ_SFI(req), 0, sizeof(MPID_nem_sfi_req_t));
+}
+
+static inline int MPID_nem_sfi_create_req(MPID_Request ** request, int refcnt)
+{
+ int mpi_errno = MPI_SUCCESS;
+ MPID_Request *req;
+ req = MPID_Request_create();
+ MPIU_Assert(req);
+ MPIU_Object_set_ref(req, refcnt);
+ MPID_nem_sfi_init_req(req);
+ *request = req;
+ return mpi_errno;
+}
+
+/* ******************************** */
+/* Tag Manipulation inlines */
+/* ******************************** */
+static inline uint64_t init_sendtag(MPIR_Context_id_t contextid, int source, int tag, uint64_t type)
+{
+ uint64_t match_bits;
+ match_bits = contextid;
+ match_bits = (match_bits << MPID_SOURCE_SHIFT);
+ match_bits |= source;
+ match_bits = (match_bits << MPID_TAG_SHIFT);
+ match_bits |= (MPID_TAG_MASK & tag) | type;
+ return match_bits;
+}
+
+/* receive posting */
+static inline uint64_t init_recvtag(uint64_t * mask_bits,
+ MPIR_Context_id_t contextid, int source, int tag)
+{
+ uint64_t match_bits = 0;
+ *mask_bits = MPID_SYNC_SEND;
+ match_bits = contextid;
+ match_bits = (match_bits << MPID_SOURCE_SHIFT);
+ if (MPI_ANY_SOURCE == source) {
+ match_bits = (match_bits << MPID_TAG_SHIFT);
+ *mask_bits |= MPID_SOURCE_MASK;
+ }
+ else {
+ match_bits |= source;
+ match_bits = (match_bits << MPID_TAG_SHIFT);
+ }
+ if (MPI_ANY_TAG == tag)
+ *mask_bits |= MPID_TAG_MASK;
+ else
+ match_bits |= (MPID_TAG_MASK & tag);
+
+ return match_bits;
+}
+
+static inline int get_tag(uint64_t match_bits)
+{
+ return ((int) (match_bits & MPID_TAG_MASK));
+}
+
+static inline int get_source(uint64_t match_bits)
+{
+ return ((int) ((match_bits & MPID_SOURCE_MASK) >> (MPID_TAG_SHIFT)));
+}
+
+static inline int get_psource(uint64_t match_bits)
+{
+ return ((int) ((match_bits & MPID_PSOURCE_MASK) >> (MPID_PORT_SHIFT)));
+}
+
+static inline int get_pgid(uint64_t match_bits)
+{
+ return ((int) (match_bits & MPID_PGID_MASK));
+}
+
+static inline int get_port(uint64_t match_bits)
+{
+ return ((int) ((match_bits & MPID_PORT_NAME_MASK) >> MPID_TAG_SHIFT));
+}
+
+/* ************************************************************************** */
+/* MPICH Comm Override and Netmod functions */
+/* ************************************************************************** */
+int MPID_nem_sfi_recv_posted(struct MPIDI_VC *vc, struct MPID_Request *req);
+int MPID_nem_sfi_send(struct MPIDI_VC *vc, const void *buf, int count,
+ MPI_Datatype datatype, int dest, int tag, MPID_Comm * comm,
+ int context_offset, struct MPID_Request **request);
+int MPID_nem_sfi_isend(struct MPIDI_VC *vc, const void *buf, int count,
+ MPI_Datatype datatype, int dest, int tag, MPID_Comm * comm,
+ int context_offset, struct MPID_Request **request);
+int MPID_nem_sfi_ssend(struct MPIDI_VC *vc, const void *buf, int count,
+ MPI_Datatype datatype, int dest, int tag, MPID_Comm * comm,
+ int context_offset, struct MPID_Request **request);
+int MPID_nem_sfi_issend(struct MPIDI_VC *vc, const void *buf, int count,
+ MPI_Datatype datatype, int dest, int tag, MPID_Comm * comm,
+ int context_offset, struct MPID_Request **request);
+int MPID_nem_sfi_cancel_send(struct MPIDI_VC *vc, struct MPID_Request *sreq);
+int MPID_nem_sfi_cancel_recv(struct MPIDI_VC *vc, struct MPID_Request *rreq);
+int MPID_nem_sfi_iprobe(struct MPIDI_VC *vc, int source, int tag, MPID_Comm * comm,
+ int context_offset, int *flag, MPI_Status * status);
+int MPID_nem_sfi_improbe(struct MPIDI_VC *vc, int source, int tag, MPID_Comm * comm,
+ int context_offset, int *flag, MPID_Request ** message,
+ MPI_Status * status);
+int MPID_nem_sfi_anysource_iprobe(int tag, MPID_Comm * comm, int context_offset,
+ int *flag, MPI_Status * status);
+int MPID_nem_sfi_anysource_improbe(int tag, MPID_Comm * comm, int context_offset,
+ int *flag, MPID_Request ** message, MPI_Status * status);
+void MPID_nem_sfi_anysource_posted(MPID_Request * rreq);
+int MPID_nem_sfi_anysource_matched(MPID_Request * rreq);
+int MPID_nem_sfi_send_data(cq_tagged_entry_t * wc, MPID_Request * sreq);
+int MPID_nem_sfi_SendNoncontig(MPIDI_VC_t * vc, MPID_Request * sreq,
+ void *hdr, MPIDI_msg_sz_t hdr_sz);
+int MPID_nem_sfi_iStartContigMsg(MPIDI_VC_t * vc, void *hdr, MPIDI_msg_sz_t hdr_sz,
+ void *data, MPIDI_msg_sz_t data_sz, MPID_Request ** sreq_ptr);
+int MPID_nem_sfi_iSendContig(MPIDI_VC_t * vc, MPID_Request * sreq, void *hdr,
+ MPIDI_msg_sz_t hdr_sz, void *data, MPIDI_msg_sz_t data_sz);
+
+/* ************************************************************************** */
+/* SFI utility functions : not exposed as a netmod public API */
+/* ************************************************************************** */
+#define MPID_NONBLOCKING_POLL 0
+#define MPID_BLOCKING_POLL 1
+int MPID_nem_sfi_init(MPIDI_PG_t * pg_p, int pg_rank, char **bc_val_p, int *val_max_sz_p);
+int MPID_nem_sfi_finalize(void);
+int MPID_nem_sfi_vc_init(MPIDI_VC_t * vc);
+int MPID_nem_sfi_get_business_card(int my_rank, char **bc_val_p, int *val_max_sz_p);
+int MPID_nem_sfi_poll(int in_blocking_poll);
+int MPID_nem_sfi_vc_terminate(MPIDI_VC_t * vc);
+int MPID_nem_sfi_vc_connect(MPIDI_VC_t * vc);
+int MPID_nem_sfi_connect_to_root(const char *business_card, MPIDI_VC_t * new_vc);
+int MPID_nem_sfi_vc_destroy(MPIDI_VC_t * vc);
+int MPID_nem_sfi_cm_init(MPIDI_PG_t * pg_p, int pg_rank);
+int MPID_nem_sfi_cm_finalize();
+
+extern MPID_nem_sfi_global_t gl_data;
+extern MPIDI_Comm_ops_t _g_comm_ops;
+
+#endif
diff --git a/src/mpid/ch3/channels/nemesis/netmod/sfi/sfi_init.c b/src/mpid/ch3/channels/nemesis/netmod/sfi/sfi_init.c
new file mode 100644
index 0000000..88a6496
--- /dev/null
+++ b/src/mpid/ch3/channels/nemesis/netmod/sfi/sfi_init.c
@@ -0,0 +1,461 @@
+/*
+ * (C) 2006 by Argonne National Laboratory.
+ * See COPYRIGHT in top-level directory.
+ *
+ * Portions of this code were written by Intel Corporation.
+ * Copyright (C) 2011-2012 Intel Corporation. Intel provides this material
+ * to Argonne National Laboratory subject to Software Grant and Corporate
+ * Contributor License Agreement dated February 8, 2012.
+ */
+#include "sfi_impl.h"
+
+static inline int dump_and_choose_providers(info_t * prov, info_t ** prov_use);
+static inline int compile_time_checking();
+
+#undef FCNAME
+#define FCNAME DECL_FUNC(MPID_nem_sfi_init)
+int MPID_nem_sfi_init(MPIDI_PG_t * pg_p, int pg_rank, char **bc_val_p, int *val_max_sz_p)
+{
+ int ret, fi_version, i, len, pmi_errno;
+ int mpi_errno = MPI_SUCCESS;
+ info_t hints, *prov_tagged, *prov_use;
+ cq_attr_t cq_attr;
+ av_attr_t av_attr;
+ char kvsname[SFI_KVSAPPSTRLEN], key[SFI_KVSAPPSTRLEN], bc[SFI_KVSAPPSTRLEN];
+ char *my_bc, *addrs, *null_addr;
+ fi_addr_t *fi_addrs = NULL;
+ MPIDI_VC_t *vc;
+
+ BEGIN_FUNC(FCNAME);
+ MPIU_CHKLMEM_DECL(2);
+
+ compile_time_checking();
+ /* ------------------------------------------------------------------------ */
+ /* Hints to filter providers */
+ /* See man fi_getinfo for a list */
+ /* of all filters */
+ /* mode: Select capabilities netmod is prepared to support. */
+ /* In this case, netmod will pass in context into */
+ /* communication calls. */
+ /* Note that we do not fill in FI_LOCAL_MR, which means this netmod */
+ /* does not support exchange of memory regions on communication calls */
+ /* SFI requires that all communication calls use a registered mr */
+ /* but in our case this netmod is written to only support transfers */
+ /* on a dynamic memory region that spans all of memory. So, we do */
+ /* not set the FI_LOCAL_MR mode bit, and we set the FI_DYNAMIC_MR */
+ /* bit to tell SFI our requirement and filter providers appropriately */
+ /* ep_type: reliable datagram operation */
+ /* caps: Capabilities required from the provider. The bits specified */
+ /* with buffered receive, cancel, and remote complete implements */
+ /* MPI semantics. Tagged is used to support tag matching. */
+ /* We expect to register all memory up front for use with this */
+ /* endpoint, so the netmod requires dynamic memory regions */
+ /* ------------------------------------------------------------------------ */
+ memset(&hints, 0, sizeof(hints));
+ hints.mode = FI_CONTEXT;
+ hints.ep_type = FI_EP_RDM; /* Reliable datagram */
+ hints.caps = FI_TAGGED; /* Tag matching interface */
+ hints.caps |= FI_BUFFERED_RECV; /* Buffered receives */
+ hints.caps |= FI_REMOTE_COMPLETE; /* Remote completion */
+ hints.caps |= FI_CANCEL; /* Support cancel */
+ hints.caps |= FI_DYNAMIC_MR; /* Global dynamic mem region */
+
+ /* ------------------------------------------------------------------------ */
+ /* FI_VERSION provides binary backward and forward compatibility support */
+ /* Specify the version of SFI is coded to, the provider will select struct */
+ /* layouts that are compatible with this version. */
+ /* ------------------------------------------------------------------------ */
+ fi_version = FI_VERSION(1, 0);
+
+ /* ------------------------------------------------------------------------ */
+ /* fi_getinfo: returns information about fabric services for reaching a */
+ /* remote node or service. this does not necessarily allocate resources. */
+ /* Pass NULL for name/service because we want a list of providers supported */
+ /* ------------------------------------------------------------------------ */
+ domain_attr_t domain_attr;
+ memset(&domain_attr, 0, sizeof(domain_attr));
+
+ tx_ctx_attr_t tx_attr;
+ memset(&tx_attr, 0, sizeof(tx_attr));
+
+ domain_attr.threading = FI_THREAD_PROGRESS;
+ domain_attr.control_progress = FI_PROGRESS_AUTO;
+ tx_attr.op_flags = FI_REMOTE_COMPLETE;
+ hints.domain_attr = &domain_attr;
+ hints.tx_attr = &tx_attr;
+
+ FI_RC(fi_getinfo(fi_version, /* Interface version requested */
+ NULL, /* Optional name or fabric to resolve */
+ NULL, /* Service name or port number to request */
+ 0ULL, /* Flag: node/service specify local address */
+ &hints, /* In: Hints to filter available providers */
+ &prov_tagged), /* Out: List of providers that match hints */
+ getinfo);
+ MPIU_ERR_CHKANDJUMP4(prov_tagged == NULL, mpi_errno, MPI_ERR_OTHER,
+ "**sfi_getinfo", "**sfi_getinfo %s %d %s %s",
+ __SHORT_FILE__, __LINE__, FCNAME, "No tag matching provider found");
+ /* ------------------------------------------------------------------------ */
+ /* Open fabric */
+ /* The getinfo struct returns a fabric attribute struct that can be used to */
+ /* instantiate the virtual or physical network. This opens a "fabric */
+ /* provider". We choose the first available fabric, but getinfo */
+ /* returns a list. see man fi_fabric for details */
+ /* ------------------------------------------------------------------------ */
+ dump_and_choose_providers(prov_tagged, &prov_use);
+ FI_RC(fi_fabric(prov_use->fabric_attr, /* In: Fabric attributes */
+ &gl_data.fabric, /* Out: Fabric descriptor */
+ NULL), openfabric); /* Context: fabric events */
+
+ /* ------------------------------------------------------------------------ */
+ /* Create the access domain, which is the physical or virtual network or */
+ /* hardware port/collection of ports. Returns a domain object that can be */
+ /* used to create endpoints. See man fi_domain for details. */
+ /* Refine get_info filter for additional capabilities */
+ /* threading: Disable locking, MPICH handles locking model */
+ /* control_progress: enable async progress */
+ /* op_flags: Specifies default operation to set on all communication. */
+ /* In this case, we want remote completion to be set by default */
+ /* ------------------------------------------------------------------------ */
+ FI_RC(fi_domain(gl_data.fabric, /* In: Fabric object */
+ prov_use, /* In: default domain attributes */
+ &gl_data.domain, /* Out: domain object */
+ NULL), opendomain); /* Context: Domain events */
+
+ /* ------------------------------------------------------------------------ */
+ /* Create a transport level communication endpoint. To use the endpoint, */
+ /* it must be bound to completion counters or event queues and enabled, */
+ /* and the resources consumed by it, such as address vectors, counters, */
+ /* completion queues, etc. */
+ /* see man fi_endpoint for more details */
+ /* ------------------------------------------------------------------------ */
+ FI_RC(fi_endpoint(gl_data.domain, /* In: Domain Object */
+ prov_use, /* In: Configuration object */
+ &gl_data.endpoint, /* Out: Endpoint Object */
+ NULL), openep); /* Context: endpoint events */
+
+ /* ------------------------------------------------------------------------ */
+ /* Create the objects that will be bound to the endpoint. */
+ /* The objects include: */
+ /* * completion queue for events */
+ /* * address vector of other endpoint addresses */
+ /* * dynamic memory-spanning memory region */
+ /* Other objects could be created (for example), but are unused in netmod */
+ /* * counters for incoming writes */
+ /* * completion counters for put and get */
+ /* ------------------------------------------------------------------------ */
+ FI_RC(fi_mr_reg(gl_data.domain, /* In: Domain Object */
+ 0, /* In: Lower memory address */
+ UINTPTR_MAX, /* In: Upper memory address */
+ FI_SEND | FI_RECV, /* In: Expose MR for read/write */
+ 0ULL, /* In: base MR offset */
+ 0ULL, /* In: requested key */
+ 0ULL, /* In: No flags */
+ &gl_data.mr, /* Out: memregion object */
+ NULL), mr_reg); /* Context: memregion events */
+
+ memset(&cq_attr, 0, sizeof(cq_attr));
+ cq_attr.format = FI_CQ_FORMAT_TAGGED;
+ FI_RC(fi_cq_open(gl_data.domain, /* In: Domain Object */
+ &cq_attr, /* In: Configuration object */
+ &gl_data.cq, /* Out: CQ Object */
+ NULL), opencq); /* Context: CQ events */
+
+ memset(&av_attr, 0, sizeof(av_attr));
+ av_attr.type = FI_AV_MAP; /* Mapped addressing mode */
+ FI_RC(fi_av_open(gl_data.domain, /* In: Domain Object */
+ &av_attr, /* In: Configuration object */
+ &gl_data.av, /* Out: AV Object */
+ NULL), avopen); /* Context: AV events */
+
+ /* --------------------------------------------- */
+ /* Bind the MR, CQ and AV to the endpoint object */
+ /* --------------------------------------------- */
+ FI_RC(fi_ep_bind(gl_data.endpoint, (fid_t) gl_data.mr, 0), bind);
+ FI_RC(fi_ep_bind(gl_data.endpoint, (fid_t) gl_data.cq, FI_SEND | FI_RECV), bind);
+ FI_RC(fi_ep_bind(gl_data.endpoint, (fid_t) gl_data.av, 0), bind);
+
+ /* ------------------------------------- */
+ /* Enable the endpoint for communication */
+ /* This commits the bind operations */
+ /* ------------------------------------- */
+ FI_RC(fi_enable(gl_data.endpoint), ep_enable);
+
+ /* --------------------------- */
+ /* Free providers info */
+ /* --------------------------- */
+ fi_freeinfo(prov_use);
+
+ /* ---------------------------------------------------- */
+ /* Exchange endpoint addresses using scalable database */
+ /* or job launcher, in this case, use PMI interfaces */
+ /* ---------------------------------------------------- */
+ gl_data.bound_addrlen = sizeof(gl_data.bound_addr);
+ FI_RC(fi_getname((fid_t) gl_data.endpoint, &gl_data.bound_addr,
+ &gl_data.bound_addrlen), getname);
+
+ /* -------------------------------- */
+ /* Get our business card */
+ /* -------------------------------- */
+ my_bc = *bc_val_p;
+ MPI_RC(MPID_nem_sfi_get_business_card(pg_rank, bc_val_p, val_max_sz_p));
+
+ /* -------------------------------- */
+ /* Publish the business card */
+ /* to the KVS */
+ /* -------------------------------- */
+ PMI_RC(PMI_KVS_Get_my_name(kvsname, SFI_KVSAPPSTRLEN), pmi);
+ sprintf(key, "SFI-%d", pg_rank);
+
+ PMI_RC(PMI_KVS_Put(kvsname, key, my_bc), pmi);
+ PMI_RC(PMI_KVS_Commit(kvsname), pmi);
+
+ /* -------------------------------- */
+ /* Set the MPI maximum tag value */
+ /* -------------------------------- */
+ MPIR_Process.attrs.tag_ub = (1 << MPID_TAG_SHIFT) - 1;
+
+ /* --------------------------------- */
+ /* Wait for all the ranks to publish */
+ /* their business card */
+ /* --------------------------------- */
+ PMI_Barrier();
+
+ /* --------------------------------- */
+ /* Retrieve every rank's address */
+ /* from KVS and store them in local */
+ /* table */
+ /* --------------------------------- */
+ MPIU_CHKLMEM_MALLOC(addrs, char *, pg_p->size * gl_data.bound_addrlen, mpi_errno, "addrs");
+
+ for (i = 0; i < pg_p->size; ++i) {
+ sprintf(key, "SFI-%d", i);
+
+ PMI_RC(PMI_KVS_Get(kvsname, key, bc, SFI_KVSAPPSTRLEN), pmi);
+ ret = MPIU_Str_get_binary_arg(bc, "SFI",
+ (char *) &addrs[i * gl_data.bound_addrlen],
+ gl_data.bound_addrlen, &len);
+ MPIU_ERR_CHKANDJUMP((ret != MPIU_STR_SUCCESS && ret != MPIU_STR_NOMEM) ||
+ (size_t) len != gl_data.bound_addrlen,
+ mpi_errno, MPI_ERR_OTHER, "**badbusinesscard");
+ }
+
+ /* ---------------------------------------------------- */
+ /* Map the addresses into an address vector */
+ /* The addressing mode is "map", so we must provide */
+ /* storage to store the per destination addresses */
+ /* ---------------------------------------------------- */
+ fi_addrs = MPIU_Malloc(pg_p->size * sizeof(fi_addr_t));
+ FI_RC(fi_av_insert(gl_data.av, addrs, pg_p->size, fi_addrs, 0ULL, NULL), avmap);
+
+ /* ---------------------------------------------------- */
+ /* Insert the ANY_SRC address */
+ /* ---------------------------------------------------- */
+ MPIU_CHKLMEM_MALLOC(null_addr, char *, 1 * gl_data.bound_addrlen, mpi_errno, "null_addr");
+ memset(null_addr, 0, gl_data.bound_addrlen);
+
+ FI_RC(fi_av_insert(gl_data.av, null_addr, 1, &gl_data.any_addr, 0ULL, NULL), avmap);
+
+ /* --------------------------------- */
+ /* Store the direct addresses in */
+ /* the ranks' respective VCs */
+ /* --------------------------------- */
+ for (i = 0; i < pg_p->size; ++i) {
+ MPIDI_PG_Get_vc(pg_p, i, &vc);
+ VC_SFI(vc)->direct_addr = fi_addrs[i];
+ VC_SFI(vc)->ready = 1;
+ }
+
+ /* --------------------------------------------- */
+ /* Initialize the connection management routines */
+ /* This completes any function handlers and */
+ /* global data structures, and posts any */
+ /* persistent communication requests that are */
+ /* required, like connection management and */
+ /* startcontig messages */
+ /* --------------------------------------------- */
+ MPI_RC(MPID_nem_sfi_cm_init(pg_p, pg_rank));
+ fn_exit:
+ if (fi_addrs)
+ MPIU_Free(fi_addrs);
+ MPIU_CHKLMEM_FREEALL();
+ END_FUNC(FCNAME);
+ return mpi_errno;
+ fn_fail:
+ goto fn_exit;
+}
+
+#undef FCNAME
+#define FCNAME DECL_FUNC(MPID_nem_sfi_finalize)
+int MPID_nem_sfi_finalize(void)
+{
+ int mpi_errno = MPI_SUCCESS;
+ int ret = 0;
+ BEGIN_FUNC(FCNAME);
+
+ /* --------------------------------------------- */
+ /* Syncronization */
+ /* Barrier across all ranks in this world */
+ /* --------------------------------------------- */
+ MPIR_Barrier_impl(MPIR_Process.comm_world, &ret);
+
+ /* --------------------------------------------- */
+ /* Finalize connection management routines */
+ /* Cancels any persistent/global requests and */
+ /* frees any resources from cm_init() */
+ /* --------------------------------------------- */
+ MPI_RC(MPID_nem_sfi_cm_finalize());
+
+ FI_RC(fi_close((fid_t) gl_data.mr), mrclose);
+ FI_RC(fi_close((fid_t) gl_data.av), avclose);
+ FI_RC(fi_close((fid_t) gl_data.endpoint), epclose);
+ FI_RC(fi_close((fid_t) gl_data.cq), cqclose);
+ FI_RC(fi_close((fid_t) gl_data.domain), domainclose);
+ FI_RC(fi_close((fid_t) gl_data.fabric), fabricclose);
+ END_FUNC_RC(FCNAME);
+}
+
+static inline int compile_time_checking()
+{
+ SFI_COMPILE_TIME_ASSERT(sizeof(MPID_nem_sfi_vc_t) <= MPID_NEM_VC_NETMOD_AREA_LEN);
+ SFI_COMPILE_TIME_ASSERT(sizeof(MPID_nem_sfi_req_t) <= MPID_NEM_REQ_NETMOD_AREA_LEN);
+ SFI_COMPILE_TIME_ASSERT(sizeof(iovec_t) == sizeof(MPID_IOV));
+ MPIU_Assert(((void *) &(((iovec_t *) 0)->iov_base)) ==
+ ((void *) &(((MPID_IOV *) 0)->MPID_IOV_BUF)));
+ MPIU_Assert(((void *) &(((iovec_t *) 0)->iov_len)) ==
+ ((void *) &(((MPID_IOV *) 0)->MPID_IOV_LEN)));
+ MPIU_Assert(sizeof(((iovec_t *) 0)->iov_len) == sizeof(((MPID_IOV *) 0)->MPID_IOV_LEN));
+
+ /* ------------------------------------------------------------------------ */
+ /* Generate the MPICH catalog files */
+ /* The high level mpich build scripts inspect MPIU_ERR_ macros to generate */
+ /* the message catalog. However, this netmod buries the messages under the */
+ /* FI_RC macros, so the catalog doesn't get generated. The build system */
+ /* likely needs a MPIU_ERR_REGISTER macro */
+ /* ------------------------------------------------------------------------ */
+#if 0
+ MPIU_ERR_SET2(e, MPI_ERR_OTHER, "**sfi_avmap", "**sfi_avmap %s %d %s %s", a, b, a, a);
+ MPIU_ERR_SET2(e, MPI_ERR_OTHER, "**sfi_tsendto", "**sfi_tsendto %s %d %s %s", a, b, a, a);
+ MPIU_ERR_SET2(e, MPI_ERR_OTHER, "**sfi_trecvfrom", "**sfi_trecvfrom %s %d %s %s", a, b, a, a);
+ MPIU_ERR_SET2(e, MPI_ERR_OTHER, "**sfi_getinfo", "**sfi_getinfo %s %d %s %s", a, b, a, a);
+ MPIU_ERR_SET2(e, MPI_ERR_OTHER, "**sfi_openep", "**sfi_openep %s %d %s %s", a, b, a, a);
+ MPIU_ERR_SET2(e, MPI_ERR_OTHER, "**sfi_openfabric", "**sfi_openfabric %s %d %s %s", a, b, a, a);
+ MPIU_ERR_SET2(e, MPI_ERR_OTHER, "**sfi_opendomain", "**sfi_opendomain %s %d %s %s", a, b, a, a);
+ MPIU_ERR_SET2(e, MPI_ERR_OTHER, "**sfi_opencq", "**sfi_opencq %s %d %s %s", a, b, a, a);
+ MPIU_ERR_SET2(e, MPI_ERR_OTHER, "**sfi_avopen", "**sfi_avopen %s %d %s %s", a, b, a, a);
+ MPIU_ERR_SET2(e, MPI_ERR_OTHER, "**sfi_bind", "**sfi_bind %s %d %s %s", a, b, a, a);
+ MPIU_ERR_SET2(e, MPI_ERR_OTHER, "**sfi_ep_enable", "**sfi_ep_enable %s %d %s %s", a, b, a, a);
+ MPIU_ERR_SET2(e, MPI_ERR_OTHER, "**sfi_getname", "**sfi_getname %s %d %s %s", a, b, a, a);
+ MPIU_ERR_SET2(e, MPI_ERR_OTHER, "**sfi_avclose", "**sfi_avclose %s %d %s %s", a, b, a, a);
+ MPIU_ERR_SET2(e, MPI_ERR_OTHER, "**sfi_epclose", "**sfi_epclose %s %d %s %s", a, b, a, a);
+ MPIU_ERR_SET2(e, MPI_ERR_OTHER, "**sfi_cqclose", "**sfi_cqclose %s %d %s %s", a, b, a, a);
+ MPIU_ERR_SET2(e, MPI_ERR_OTHER, "**sfi_fabricclose", "**sfi_fabricclose %s %d %s %s", a, b, a,
+ a);
+ MPIU_ERR_SET2(e, MPI_ERR_OTHER, "**sfi_domainclose", "**sfi_domainclose %s %d %s %s", a, b, a,
+ a);
+ MPIU_ERR_SET2(e, MPI_ERR_OTHER, "**sfi_tsearch", "**sfi_tsearch %s %d %s %s", a, b, a, a);
+ MPIU_ERR_SET2(e, MPI_ERR_OTHER, "**sfi_poll", "**sfi_poll %s %d %s %s", a, b, a, a);
+ MPIU_ERR_SET2(e, MPI_ERR_OTHER, "**sfi_cancel", "**sfi_cancel %s %d %s %s", a, b, a, a);
+#endif
+ return 0;
+}
+
+
+/*
+=== BEGIN_MPI_T_CVAR_INFO_BLOCK ===
+
+cvars:
+ - name : MPIR_CVAR_DUMP_PROVIDERS
+ category : DEVELOPER
+ type : boolean
+ default : false
+ class : device
+ verbosity : MPI_T_VERBOSITY_MPIDEV_DETAIL
+ scope : MPI_T_SCOPE_LOCAL
+ description : >-
+ If true, dump provider information at init
+
+=== END_MPI_T_CVAR_INFO_BLOCK ===
+*/
+static inline int dump_and_choose_providers(info_t * prov, info_t ** prov_use)
+{
+ info_t *p = prov;
+ int i = 0;
+ *prov_use = prov;
+ if (MPIR_CVAR_DUMP_PROVIDERS) {
+ fprintf(stdout, "Dumping Providers(first=%p):\n", prov);
+ while (p) {
+ fprintf(stdout, " ********** Provider %d (%p) *********\n", i++, p);
+ fprintf(stdout, "%-18s: %-#20" PRIx64 "\n", "caps", p->caps);
+ fprintf(stdout, "%-18s: %-#20" PRIx64 "\n", "mode", p->mode);
+ fprintf(stdout, "%-18s: %-#20" PRIx32 "\n", "ep_type", p->ep_type);
+ fprintf(stdout, "%-18s: %-#20" PRIx32 "\n", "addr_format", p->addr_format);
+ fprintf(stdout, "%-18s: %-20lu\n", "src_addrlen", p->src_addrlen);
+ fprintf(stdout, "%-18s: %-20lu\n", "dest_addrlen", p->dest_addrlen);
+ fprintf(stdout, "%-18s: %-20p\n", "src_addr", p->src_addr);
+ fprintf(stdout, "%-18s: %-20p\n", "dest_addr", p->dest_addr);
+ fprintf(stdout, "%-18s: %-20p\n", "connreq", p->connreq);
+ fprintf(stdout, "%-18s: %-20p\n", "tx_attr", p->tx_attr);
+ fprintf(stdout, " %-18s: %-#20" PRIx64 "\n", ".caps", p->tx_attr->caps);
+ fprintf(stdout, " %-18s: %-#20" PRIx64 "\n", ".mode", p->tx_attr->mode);
+ fprintf(stdout, " %-18s: %-#20" PRIx64 "\n", ".op_flags", p->tx_attr->op_flags);
+ fprintf(stdout, " %-18s: %-#20" PRIx64 "\n", ".msg_order", p->tx_attr->msg_order);
+ fprintf(stdout, " %-18s: %-20lu\n", ".inject_size", p->tx_attr->inject_size);
+ fprintf(stdout, " %-18s: %-20lu\n", ".size", p->tx_attr->size);
+ fprintf(stdout, " %-18s: %-20lu\n", ".iov_limit", p->tx_attr->iov_limit);
+ fprintf(stdout, "%-18s: %-20p\n", "rx_attr", p->rx_attr);
+ fprintf(stdout, " %-18s: %-#20" PRIx64 "\n", ".caps", p->rx_attr->caps);
+ fprintf(stdout, " %-18s: %-#20" PRIx64 "\n", ".mode", p->rx_attr->mode);
+ fprintf(stdout, " %-18s: %-#20" PRIx64 "\n", ".op_flags", p->rx_attr->op_flags);
+ fprintf(stdout, " %-18s: %-#20" PRIx64 "\n", ".msg_order", p->rx_attr->msg_order);
+ fprintf(stdout, " %-18s: %-20lu\n", ".total_buffered_recv",
+ p->rx_attr->total_buffered_recv);
+ fprintf(stdout, " %-18s: %-20lu\n", ".size", p->rx_attr->size);
+ fprintf(stdout, " %-18s: %-20lu\n", ".iov_limit", p->rx_attr->iov_limit);
+ fprintf(stdout, "%-18s: %-20p\n", "ep_attr", p->ep_attr);
+ fprintf(stdout, " %-18s: %-#20" PRIx32 "\n", ".protocol", p->ep_attr->protocol);
+ fprintf(stdout, " %-18s: %-20lu\n", ".max_msg_size", p->ep_attr->max_msg_size);
+ fprintf(stdout, " %-18s: %-20lu\n", ".inject_size", p->ep_attr->inject_size);
+ fprintf(stdout, " %-18s: %-20lu\n", ".total_buffered_recv",
+ p->ep_attr->total_buffered_recv);
+ fprintf(stdout, " %-18s: %-20lu\n", ".max_order_raw_size",
+ p->ep_attr->max_order_raw_size);
+ fprintf(stdout, " %-18s: %-20lu\n", ".max_order_war_size",
+ p->ep_attr->max_order_war_size);
+ fprintf(stdout, " %-18s: %-20lu\n", ".max_order_waw_size",
+ p->ep_attr->max_order_waw_size);
+ fprintf(stdout, " %-18s: %-20lu\n", ".mem_tag_format",
+ p->ep_attr->mem_tag_format);
+ fprintf(stdout, " %-18s: %-20lu\n", ".msg_order", p->ep_attr->msg_order);
+ fprintf(stdout, " %-18s: %-20lu\n", ".tx_ctx_cnt", p->ep_attr->tx_ctx_cnt);
+ fprintf(stdout, " %-18s: %-20lu\n", ".rx_ctx_cnt", p->ep_attr->rx_ctx_cnt);
+ fprintf(stdout, "%-18s: %-20p\n", "domain_attr", p->domain_attr);
+ fprintf(stdout, " %-18s: %-20s\n", ".name", p->domain_attr->name);
+ fprintf(stdout, " %-18s: %-#20" PRIx32 "\n", ".threading",
+ p->domain_attr->threading);
+ fprintf(stdout, " %-18s: %-#20" PRIx32 "\n", ".control_progress",
+ p->domain_attr->control_progress);
+ fprintf(stdout, " %-18s: %-#20" PRIx32 "\n", ".data_progress",
+ p->domain_attr->data_progress);
+ fprintf(stdout, " %-18s: %-20lu\n", ".mr_key_size",
+ p->domain_attr->mr_key_size);
+ fprintf(stdout, " %-18s: %-20lu\n", ".cq_data_size",
+ p->domain_attr->cq_data_size);
+ fprintf(stdout, " %-18s: %-20lu\n", ".ep_cnt", p->domain_attr->ep_cnt);
+ fprintf(stdout, " %-18s: %-20lu\n", ".tx_ctx_cnt",
+ p->domain_attr->tx_ctx_cnt);
+ fprintf(stdout, " %-18s: %-20lu\n", ".rx_ctx_cnt",
+ p->domain_attr->rx_ctx_cnt);
+ fprintf(stdout, " %-18s: %-20lu\n", ".max_ep_tx_ctx",
+ p->domain_attr->max_ep_tx_ctx);
+ fprintf(stdout, " %-18s: %-20lu\n", ".max_ep_rx_ctx",
+ p->domain_attr->max_ep_rx_ctx);
+ fprintf(stdout, "%-18s: %-20p\n", "fabric_attr", p->fabric_attr);
+ fprintf(stdout, " %-18s: %-20s\n", ".name", p->fabric_attr->name);
+ fprintf(stdout, " %-18s: %-20s\n", ".prov_name", p->fabric_attr->prov_name);
+ fprintf(stdout, " %-18s: %-#20" PRIx32 "\n", ".prov_version",
+ p->fabric_attr->prov_version);
+ p = p->next;
+ }
+ }
+ return i;
+}
diff --git a/src/mpid/ch3/channels/nemesis/netmod/sfi/sfi_msg.c b/src/mpid/ch3/channels/nemesis/netmod/sfi/sfi_msg.c
new file mode 100644
index 0000000..3797f92
--- /dev/null
+++ b/src/mpid/ch3/channels/nemesis/netmod/sfi/sfi_msg.c
@@ -0,0 +1,237 @@
+/*
+ * (C) 2006 by Argonne National Laboratory.
+ * See COPYRIGHT in top-level directory.
+ *
+ * Portions of this code were written by Intel Corporation.
+ * Copyright (C) 2011-2012 Intel Corporation. Intel provides this material
+ * to Argonne National Laboratory subject to Software Grant and Corporate
+ * Contributor License Agreement dated February 8, 2012.
+ */
+#include "sfi_impl.h"
+
+/* ------------------------------------------------------------------------ */
+/* GET_PGID_AND_SET_MATCH macro looks up the process group to find the */
+/* correct rank in multiple process groups. The "contigmsg" family of apis */
+/* work on a global scope, not on a communicator scope(like tagged MPI.) */
+/* The pgid matching is used for uniquely scoping the tag, usually in */
+/* intercomms and dynamic process management where there are multiple */
+/* global world spaces with similar ranks in the global space */
+/* ------------------------------------------------------------------------ */
+#define GET_PGID_AND_SET_MATCH() \
+({ \
+ if (vc->pg) { \
+ MPIDI_PG_IdToNum(gl_data.pg_p, &pgid); \
+ } else { \
+ pgid = NO_PGID; \
+ } \
+ match_bits = (uint64_t)MPIR_Process.comm_world->rank << \
+ (MPID_PORT_SHIFT); \
+ if (0 == pgid) { \
+ match_bits |= (uint64_t)vc->port_name_tag<< \
+ (MPID_PORT_SHIFT+MPID_PSOURCE_SHIFT); \
+ } \
+ match_bits |= pgid; \
+ match_bits |= MPID_MSG_RTS; \
+})
+
+/* ------------------------------------------------------------------------ */
+/* START_COMM is common code used by the nemesis netmod functions: */
+/* iSendContig */
+/* SendNoncontig */
+/* iStartContigMsg */
+/* These routines differ slightly in their behaviors, but can share common */
+/* code to perform the send. START_COMM provides that common code, which */
+/* is based on a tagged rendezvous message. */
+/* The rendezvous is implemented with an RTS-CTS-Data send protocol: */
+/* CTS_POST() | | */
+/* RTS_SEND() | -------------------------------> | ue_callback()(sfi_cm.c)*/
+/* | | pack_buffer() */
+/* | | DATA_POST() */
+/* | | RTS_POST() */
+/* | | CTS_SEND() */
+/* CTS_MATCH() | <------------------------------- | */
+/* DATA_SEND() | ===============================> | handle_packet() */
+/* | | notify_ch3_pkt() */
+/* v v */
+/* ------------------------------------------------------------------------ */
+#define START_COMM() \
+ ({ \
+ GET_PGID_AND_SET_MATCH(); \
+ VC_READY_CHECK(vc); \
+ c = 1; \
+ MPID_cc_incr(sreq->cc_ptr, &c); \
+ MPID_cc_incr(sreq->cc_ptr, &c); \
+ REQ_SFI(sreq)->event_callback = MPID_nem_sfi_data_callback; \
+ REQ_SFI(sreq)->pack_buffer = pack_buffer; \
+ REQ_SFI(sreq)->pack_buffer_size = pkt_len; \
+ REQ_SFI(sreq)->vc = vc; \
+ REQ_SFI(sreq)->tag = match_bits; \
+ \
+ MPID_nem_sfi_create_req(&cts_req, 1); \
+ cts_req->dev.OnDataAvail = NULL; \
+ cts_req->dev.next = NULL; \
+ REQ_SFI(cts_req)->event_callback = MPID_nem_sfi_cts_recv_callback; \
+ REQ_SFI(cts_req)->parent = sreq; \
+ \
+ FI_RC(fi_trecvfrom(gl_data.endpoint, \
+ NULL, \
+ 0, \
+ gl_data.mr, \
+ VC_SFI(vc)->direct_addr, \
+ match_bits | MPID_MSG_CTS, \
+ 0, /* Exact tag match, no ignore bits */ \
+ &(REQ_SFI(cts_req)->sfi_context)),trecvfrom); \
+ FI_RC(fi_tsendto(gl_data.endpoint, \
+ &REQ_SFI(sreq)->pack_buffer_size, \
+ sizeof(REQ_SFI(sreq)->pack_buffer_size), \
+ gl_data.mr, \
+ VC_SFI(vc)->direct_addr, \
+ match_bits, \
+ &(REQ_SFI(sreq)->sfi_context)),tsendto); \
+ })
+
+
+/* ------------------------------------------------------------------------ */
+/* General handler for RTS-CTS-Data protocol. Waits for the cc counter */
+/* to hit two (send RTS and receive CTS decrementers) before kicking off the*/
+/* bulk data transfer. On data send completion, the request can be freed */
+/* ------------------------------------------------------------------------ */
+#undef FCNAME
+#define FCNAME DECL_FUNC(MPID_nem_sfi_data_callback)
+static int MPID_nem_sfi_data_callback(cq_tagged_entry_t * wc, MPID_Request * sreq)
+{
+ int complete = 0, mpi_errno = MPI_SUCCESS;
+ MPIDI_VC_t *vc;
+ req_fn reqFn;
+ uint64_t tag = 0;
+ BEGIN_FUNC(FCNAME);
+ if (sreq->cc == 2) {
+ vc = REQ_SFI(sreq)->vc;
+ REQ_SFI(sreq)->tag = tag | MPID_MSG_DATA;
+ FI_RC(fi_tsendto(gl_data.endpoint,
+ REQ_SFI(sreq)->pack_buffer,
+ REQ_SFI(sreq)->pack_buffer_size,
+ gl_data.mr,
+ VC_SFI(vc)->direct_addr,
+ wc->tag | MPID_MSG_DATA, (void *) &(REQ_SFI(sreq)->sfi_context)), tsendto);
+ }
+ if (sreq->cc == 1) {
+ if (REQ_SFI(sreq)->pack_buffer)
+ MPIU_Free(REQ_SFI(sreq)->pack_buffer);
+
+ reqFn = sreq->dev.OnDataAvail;
+ if (!reqFn) {
+ MPIDI_CH3U_Request_complete(sreq);
+ }
+ else {
+ vc = REQ_SFI(sreq)->vc;
+ MPI_RC(reqFn(vc, sreq, &complete));
+ }
+ }
+ else {
+ MPIDI_CH3U_Request_complete(sreq);
+ }
+ END_FUNC_RC(FCNAME);
+}
+
+/* ------------------------------------------------------------------------ */
+/* Signals the CTS has been received. Call MPID_nem_sfi_data_callback on */
+/* the parent send request to kick off the bulk data transfer */
+/* ------------------------------------------------------------------------ */
+#undef FCNAME
+#define FCNAME DECL_FUNC(MPID_nem_sfi_cts_recv_callback)
+static int MPID_nem_sfi_cts_recv_callback(cq_tagged_entry_t * wc, MPID_Request * rreq)
+{
+ int mpi_errno = MPI_SUCCESS;
+ BEGIN_FUNC(FCNAME);
+ MPI_RC(MPID_nem_sfi_data_callback(wc, REQ_SFI(rreq)->parent));
+ MPIDI_CH3U_Request_complete(rreq);
+ END_FUNC_RC(FCNAME);
+}
+
+/* ------------------------------------------------------------------------ */
+/* The nemesis API implementations: */
+/* These functions currently memory copy into a pack buffer before sending */
+/* To improve performance, we can replace the memory copy with a non-contig */
+/* send (using tsendmsg) */
+/* For now, the memory copy is the simplest implementation of these */
+/* functions over a tagged msg interface */
+/* ------------------------------------------------------------------------ */
+#undef FCNAME
+#define FCNAME DECL_FUNC(MPID_nem_sfi_iSendContig)
+int MPID_nem_sfi_iSendContig(MPIDI_VC_t * vc,
+ MPID_Request * sreq,
+ void *hdr, MPIDI_msg_sz_t hdr_sz, void *data, MPIDI_msg_sz_t data_sz)
+{
+ int pgid, c, pkt_len, mpi_errno = MPI_SUCCESS;
+ char *pack_buffer;
+ uint64_t match_bits;
+ MPID_Request *cts_req;
+
+ BEGIN_FUNC(FCNAME);
+ MPIU_Assert(hdr_sz <= (MPIDI_msg_sz_t) sizeof(MPIDI_CH3_Pkt_t));
+ MPID_nem_sfi_init_req(sreq);
+ pkt_len = sizeof(MPIDI_CH3_Pkt_t) + data_sz;
+ pack_buffer = MPIU_Malloc(pkt_len);
+ MPIU_Assert(pack_buffer);
+ MPIU_Memcpy(pack_buffer, hdr, hdr_sz);
+ MPIU_Memcpy(pack_buffer + sizeof(MPIDI_CH3_Pkt_t), data, data_sz);
+ START_COMM();
+ END_FUNC_RC(FCNAME);
+}
+
+#undef FCNAME
+#define FCNAME DECL_FUNC(MPID_nem_sfi_SendNoncontig)
+int MPID_nem_sfi_SendNoncontig(MPIDI_VC_t * vc,
+ MPID_Request * sreq, void *hdr, MPIDI_msg_sz_t hdr_sz)
+{
+ int c, pgid, pkt_len, mpi_errno = MPI_SUCCESS;
+ char *pack_buffer;
+ MPI_Aint data_sz;
+ uint64_t match_bits;
+ MPID_Request *cts_req;
+
+ BEGIN_FUNC(FCNAME);
+ MPIU_Assert(hdr_sz <= (MPIDI_msg_sz_t) sizeof(MPIDI_CH3_Pkt_t));
+ MPIU_Assert(sreq->dev.segment_first == 0);
+
+ data_sz = sreq->dev.segment_size;
+ pkt_len = sizeof(MPIDI_CH3_Pkt_t) + data_sz;
+ pack_buffer = MPIU_Malloc(pkt_len);
+ MPIU_Assert(pack_buffer);
+ MPIU_Memcpy(pack_buffer, hdr, hdr_sz);
+ MPID_Segment_pack(sreq->dev.segment_ptr, 0, &data_sz, pack_buffer + sizeof(MPIDI_CH3_Pkt_t));
+ START_COMM();
+ MPID_nem_sfi_poll(MPID_NONBLOCKING_POLL);
+ END_FUNC_RC(FCNAME);
+}
+
+#undef FCNAME
+#define FCNAME DECL_FUNC(MPID_nem_sfi_iStartContigMsg)
+int MPID_nem_sfi_iStartContigMsg(MPIDI_VC_t * vc,
+ void *hdr,
+ MPIDI_msg_sz_t hdr_sz,
+ void *data, MPIDI_msg_sz_t data_sz, MPID_Request ** sreq_ptr)
+{
+ int pkt_len, c, pgid, mpi_errno = MPI_SUCCESS;
+ MPID_Request *sreq;
+ MPID_Request *cts_req;
+ char *pack_buffer;
+ uint64_t match_bits;
+ BEGIN_FUNC(FCNAME);
+ MPIU_Assert(hdr_sz <= (MPIDI_msg_sz_t) sizeof(MPIDI_CH3_Pkt_t));
+
+ MPID_nem_sfi_create_req(&sreq, 2);
+ sreq->kind = MPID_REQUEST_SEND;
+ sreq->dev.OnDataAvail = NULL;
+ sreq->dev.next = NULL;
+ pkt_len = sizeof(MPIDI_CH3_Pkt_t) + data_sz;
+ pack_buffer = MPIU_Malloc(pkt_len);
+ MPIU_Assert(pack_buffer);
+ MPIU_Memcpy((void *) pack_buffer, hdr, hdr_sz);
+ if (data_sz)
+ MPIU_Memcpy((void *) (pack_buffer + sizeof(MPIDI_CH3_Pkt_t)), data, data_sz);
+ START_COMM();
+ *sreq_ptr = sreq;
+ END_FUNC_RC(FCNAME);
+}
diff --git a/src/mpid/ch3/channels/nemesis/netmod/sfi/sfi_progress.c b/src/mpid/ch3/channels/nemesis/netmod/sfi/sfi_progress.c
new file mode 100644
index 0000000..8f40aeb
--- /dev/null
+++ b/src/mpid/ch3/channels/nemesis/netmod/sfi/sfi_progress.c
@@ -0,0 +1,291 @@
+/*
+ * (C) 2006 by Argonne National Laboratory.
+ * See COPYRIGHT in top-level directory.
+ *
+ * Portions of this code were written by Intel Corporation.
+ * Copyright (C) 2011-2012 Intel Corporation. Intel provides this material
+ * to Argonne National Laboratory subject to Software Grant and Corporate
+ * Contributor License Agreement dated February 8, 2012.
+ */
+#include "sfi_impl.h"
+
+#define TSEARCH_INIT 0
+#define TSEARCH_NOT_FOUND 1
+#define TSEARCH_FOUND 2
+
+/* ------------------------------------------------------------------------ */
+/* This routine looks up the request that contains a context object */
+/* ------------------------------------------------------------------------ */
+static inline MPID_Request *context_to_req(void *sfi_context)
+{
+ return (MPID_Request *) container_of(sfi_context, MPID_Request, ch.netmod_area.padding);
+}
+
+/* ------------------------------------------------------------------------ */
+/* Populate the status object from the return of the tsearch */
+/* ------------------------------------------------------------------------ */
+#undef FCNAME
+#define FCNAME DECL_FUNC(search_complete)
+static int search_complete(uint64_t tag, size_t msglen, MPID_Request * rreq)
+{
+ int mpi_errno = MPI_SUCCESS;
+ BEGIN_FUNC(FCNAME);
+ rreq->status.MPI_SOURCE = get_source(tag);
+ rreq->status.MPI_TAG = get_tag(tag);
+ rreq->status.MPI_ERROR = MPI_SUCCESS;
+ MPIR_STATUS_SET_COUNT(rreq->status, msglen);
+ END_FUNC(FCNAME);
+ return mpi_errno;
+}
+
+/* ------------------------------------------------------------------------ */
+/* Check if wc->data is filled. If wc->data a message was found */
+/* and we fill out the status. Otherwise, it's not found, and we set the */
+/* state of the search request to 1, not found */
+/* ------------------------------------------------------------------------ */
+#undef FCNAME
+#define FCNAME DECL_FUNC(tsearch_callback)
+static int tsearch_callback(cq_tagged_entry_t * wc, MPID_Request * rreq)
+{
+ int mpi_errno = MPI_SUCCESS;
+ BEGIN_FUNC(FCNAME);
+ if (wc->data) {
+ REQ_SFI(rreq)->match_state = TSEARCH_FOUND;
+ rreq->status.MPI_SOURCE = get_source(wc->tag);
+ rreq->status.MPI_TAG = get_tag(wc->tag);
+ MPIR_STATUS_SET_COUNT(rreq->status, wc->len);
+ rreq->status.MPI_ERROR = MPI_SUCCESS;
+ }
+ else {
+ REQ_SFI(rreq)->match_state = TSEARCH_NOT_FOUND;
+ }
+ END_FUNC(FCNAME);
+ return mpi_errno;
+}
+
+#undef FCNAME
+#define FCNAME DECL_FUNC(MPID_nem_sfi_iprobe_impl)
+int MPID_nem_sfi_iprobe_impl(struct MPIDI_VC *vc,
+ int source,
+ int tag,
+ MPID_Comm * comm,
+ int context_offset,
+ int *flag, MPI_Status * status, MPID_Request ** rreq_ptr)
+{
+ int ret, mpi_errno = MPI_SUCCESS;
+ fi_addr_t remote_proc = 0;
+ uint64_t match_bits, mask_bits;
+ size_t len;
+ MPID_Request rreq_s, *rreq;
+
+ BEGIN_FUNC(FCNAME);
+ if (rreq_ptr) {
+ MPIDI_Request_create_rreq(rreq, mpi_errno, goto fn_exit);
+ *rreq_ptr = rreq;
+ rreq->comm = comm;
+ rreq->dev.match.parts.rank = source;
+ rreq->dev.match.parts.tag = tag;
+ rreq->dev.match.parts.context_id = comm->context_id;
+ MPIR_Comm_add_ref(comm);
+ }
+ else {
+ rreq = &rreq_s;
+ rreq->dev.OnDataAvail = NULL;
+ }
+ REQ_SFI(rreq)->event_callback = tsearch_callback;
+ REQ_SFI(rreq)->match_state = TSEARCH_INIT;
+ SFI_ADDR_INIT(source, vc, remote_proc);
+ match_bits = init_recvtag(&mask_bits, comm->context_id + context_offset, source, tag);
+
+ /* ------------------------------------------------------------------------ */
+ /* fi_tsearch: */
+ /* Initiate a search for a match in the hardware or software queue. */
+ /* The search can complete immediately with a match found (or not, ENOMSG). */
+ /* It can also enqueue a context entry into the completion queue to make the */
+ /* search nonblocking. This code will poll until the entry is complete. */
+ /* ------------------------------------------------------------------------ */
+ ret = fi_tsearch(gl_data.endpoint, /* Tagged Endpoint */
+ &match_bits, /* Match bits */
+ mask_bits, /* Bits to ignore */
+ 0, /* Flags */
+ &remote_proc, /* Remote Address */
+ &len, /* Out: incoming msglen */
+ &(REQ_SFI(rreq)->sfi_context)); /* Nonblocking context */
+ if (ret == -FI_ENOMSG) {
+ *flag = 0;
+ goto fn_exit;
+ }
+ else if (ret == 1) {
+ *flag = 1;
+ search_complete(match_bits, len, rreq);
+ *status = rreq->status;
+ goto fn_exit;
+ }
+ else {
+ MPIU_ERR_CHKANDJUMP4((ret < 0), mpi_errno, MPI_ERR_OTHER,
+ "**sfi_tsearch", "**sfi_tsearch %s %d %s %s",
+ __SHORT_FILE__, __LINE__, FCNAME, fi_strerror(-ret));
+ }
+ while (TSEARCH_INIT == REQ_SFI(rreq)->match_state)
+ MPID_nem_sfi_poll(MPID_BLOCKING_POLL);
+
+ if (REQ_SFI(rreq)->match_state == TSEARCH_NOT_FOUND) {
+ if (rreq_ptr) {
+ MPIDI_CH3_Request_destroy(rreq);
+ *rreq_ptr = NULL;
+ }
+ *flag = 0;
+ }
+ else {
+ *status = rreq->status;
+ *flag = 1;
+ }
+ END_FUNC_RC(FCNAME);
+}
+
+#undef FCNAME
+#define FCNAME DECL_FUNC(MPID_nem_sfi_iprobe)
+int MPID_nem_sfi_iprobe(struct MPIDI_VC *vc,
+ int source,
+ int tag,
+ MPID_Comm * comm, int context_offset, int *flag, MPI_Status * status)
+{
+ int rc;
+ BEGIN_FUNC(FCNAME);
+ rc = MPID_nem_sfi_iprobe_impl(vc, source, tag, comm, context_offset, flag, status, NULL);
+ END_FUNC(FCNAME);
+ return rc;
+}
+
+#undef FCNAME
+#define FCNAME DECL_FUNC(MPID_nem_sfi_improbe)
+int MPID_nem_sfi_improbe(struct MPIDI_VC *vc,
+ int source,
+ int tag,
+ MPID_Comm * comm,
+ int context_offset,
+ int *flag, MPID_Request ** message, MPI_Status * status)
+{
+ int old_error = status->MPI_ERROR;
+ int s;
+ BEGIN_FUNC(FCNAME);
+ s = MPID_nem_sfi_iprobe_impl(vc, source, tag, comm, context_offset, flag, status, message);
+ if (flag && *flag) {
+ status->MPI_ERROR = old_error;
+ (*message)->kind = MPID_REQUEST_MPROBE;
+ }
+ END_FUNC(FCNAME);
+ return s;
+}
+
+#undef FCNAME
+#define FCNAME DECL_FUNC(MPID_nem_sfi_anysource_iprobe)
+int MPID_nem_sfi_anysource_iprobe(int tag,
+ MPID_Comm * comm,
+ int context_offset, int *flag, MPI_Status * status)
+{
+ int rc;
+ BEGIN_FUNC(FCNAME);
+ rc = MPID_nem_sfi_iprobe(NULL, MPI_ANY_SOURCE, tag, comm, context_offset, flag, status);
+ END_FUNC(FCNAME);
+ return rc;
+}
+
+#undef FCNAME
+#define FCNAME DECL_FUNC(MPID_nem_sfi_anysource_improbe)
+int MPID_nem_sfi_anysource_improbe(int tag,
+ MPID_Comm * comm,
+ int context_offset,
+ int *flag, MPID_Request ** message, MPI_Status * status)
+{
+ int rc;
+ BEGIN_FUNC(FCNAME);
+ rc = MPID_nem_sfi_improbe(NULL, MPI_ANY_SOURCE, tag, comm,
+ context_offset, flag, message, status);
+ END_FUNC(FCNAME);
+ return rc;
+}
+
+#undef FCNAME
+#define FCNAME DECL_FUNC(MPID_nem_sfi_poll)
+int MPID_nem_sfi_poll(int in_blocking_poll)
+{
+ int complete = 0, mpi_errno = MPI_SUCCESS;
+ ssize_t ret;
+ cq_tagged_entry_t wc;
+ cq_err_entry_t error;
+ MPIDI_VC_t *vc;
+ MPID_Request *req;
+ req_fn reqFn;
+ BEGIN_FUNC(FCNAME);
+ do {
+ /* ----------------------------------------------------- */
+ /* Poll the completion queue */
+ /* The strategy here is */
+ /* ret>0 successfull poll, events returned */
+ /* ret==0 empty poll, no events/no error */
+ /* ret<0, error, but some error instances should not */
+ /* cause MPI to terminate */
+ /* ----------------------------------------------------- */
+ ret = fi_cq_read(gl_data.cq, /* Tagged completion queue */
+ (void *) &wc, /* OUT: Tagged completion entry */
+ 1); /* Number of entries to poll */
+ if (ret > 0) {
+ if (NULL != wc.op_context) {
+ req = context_to_req(wc.op_context);
+ if (REQ_SFI(req)->event_callback) {
+ MPI_RC(REQ_SFI(req)->event_callback(&wc, req));
+ continue;
+ }
+ reqFn = req->dev.OnDataAvail;
+ if (reqFn) {
+ if (REQ_SFI(req)->pack_buffer) {
+ MPIU_Free(REQ_SFI(req)->pack_buffer);
+ }
+ vc = REQ_SFI(req)->vc;
+
+ complete = 0;
+ MPI_RC(reqFn(vc, req, &complete));
+ continue;
+ }
+ else {
+ MPIU_Assert(0);
+ }
+ }
+ else {
+ MPIU_Assert(0);
+ }
+ }
+ else if (ret < 0) {
+ if (ret == -FI_EAVAIL) {
+ ret = fi_cq_readerr(gl_data.cq, (void *) &error, sizeof(error), 0);
+ if (error.err == FI_EMSGSIZE) {
+ /* ----------------------------------------------------- */
+ /* This error message should only be delivered on send */
+ /* events. We want to ignore truncation errors */
+ /* on the sender side, but complete the request anyway */
+ /* Other kinds of requests, this is fatal. */
+ /* ----------------------------------------------------- */
+ req = context_to_req(error.op_context);
+ if (req->kind == MPID_REQUEST_SEND) {
+ mpi_errno = REQ_SFI(req)->event_callback(NULL, req);
+ }
+ else if (req->kind == MPID_REQUEST_RECV) {
+ mpi_errno = REQ_SFI(req)->event_callback(&wc, req);
+ req->status.MPI_ERROR = MPI_ERR_TRUNCATE;
+ req->status.MPI_TAG = error.tag;
+ }
+ else {
+ mpi_errno = MPI_ERR_OTHER;
+ }
+ }
+ }
+ else {
+ MPIU_ERR_CHKANDJUMP4(1, mpi_errno, MPI_ERR_OTHER, "**sfi_poll",
+ "**sfi_poll %s %d %s %s", __SHORT_FILE__,
+ __LINE__, FCNAME, fi_strerror(-ret));
+ }
+ }
+ } while (in_blocking_poll && (ret > 0));
+ END_FUNC_RC(FCNAME);
+}
diff --git a/src/mpid/ch3/channels/nemesis/netmod/sfi/sfi_tagged.c b/src/mpid/ch3/channels/nemesis/netmod/sfi/sfi_tagged.c
new file mode 100644
index 0000000..2d88c10
--- /dev/null
+++ b/src/mpid/ch3/channels/nemesis/netmod/sfi/sfi_tagged.c
@@ -0,0 +1,399 @@
+/*
+ * (C) 2006 by Argonne National Laboratory.
+ * See COPYRIGHT in top-level directory.
+ *
+ * Portions of this code were written by Intel Corporation.
+ * Copyright (C) 2011-2012 Intel Corporation. Intel provides this material
+ * to Argonne National Laboratory subject to Software Grant and Corporate
+ * Contributor License Agreement dated February 8, 2012.
+ */
+#include "sfi_impl.h"
+
+#define MPID_NORMAL_SEND 0
+
+/* ------------------------------------------------------------------------ */
+/* Receive callback called after sending a syncronous send acknowledgement. */
+/* ------------------------------------------------------------------------ */
+#undef FCNAME
+#define FCNAME DECL_FUNC(MPID_nem_sfi_sync_recv_callback)
+static inline int MPID_nem_sfi_sync_recv_callback(cq_tagged_entry_t * wc ATTRIBUTE((unused)),
+ MPID_Request * rreq)
+{
+ int mpi_errno = MPI_SUCCESS;
+
+ BEGIN_FUNC(FCNAME);
+
+ MPIDI_CH3U_Recvq_DP(REQ_SFI(rreq)->parent);
+ MPIDI_CH3U_Request_complete(REQ_SFI(rreq)->parent);
+ MPIDI_CH3U_Request_complete(rreq);
+
+ END_FUNC(FCNAME);
+ return mpi_errno;
+}
+
+/* ------------------------------------------------------------------------ */
+/* Send done callback */
+/* Free any temporary/pack buffers and complete the send request */
+/* ------------------------------------------------------------------------ */
+#undef FCNAME
+#define FCNAME DECL_FUNC(MPID_nem_sfi_send_callback)
+static inline int MPID_nem_sfi_send_callback(cq_tagged_entry_t * wc ATTRIBUTE((unused)),
+ MPID_Request * sreq)
+{
+ int mpi_errno = MPI_SUCCESS;
+ BEGIN_FUNC(FCNAME);
+ if (REQ_SFI(sreq)->pack_buffer)
+ MPIU_Free(REQ_SFI(sreq)->pack_buffer);
+ MPIDI_CH3U_Request_complete(sreq);
+ END_FUNC(FCNAME);
+ return mpi_errno;
+}
+
+/* ------------------------------------------------------------------------ */
+/* Receive done callback */
+/* Handle an incoming receive completion event */
+/* ------------------------------------------------------------------------ */
+#undef FCNAME
+#define FCNAME DECL_FUNC(MPID_nem_sfi_recv_callback)
+static inline int MPID_nem_sfi_recv_callback(cq_tagged_entry_t * wc, MPID_Request * rreq)
+{
+ int err0, err1, src, mpi_errno = MPI_SUCCESS;
+ uint64_t ssend_bits;
+ MPIDI_msg_sz_t sz;
+ MPIDI_VC_t *vc;
+ MPID_Request *sync_req;
+ BEGIN_FUNC(FCNAME);
+ /* ---------------------------------------------------- */
+ /* Populate the MPI Status and unpack noncontig buffer */
+ /* ---------------------------------------------------- */
+ rreq->status.MPI_ERROR = MPI_SUCCESS;
+ rreq->status.MPI_SOURCE = get_source(wc->tag);
+ rreq->status.MPI_TAG = get_tag(wc->tag);
+ REQ_SFI(rreq)->req_started = 1;
+ MPIR_STATUS_SET_COUNT(rreq->status, wc->len);
+
+ if (REQ_SFI(rreq)->pack_buffer) {
+ MPIDI_CH3U_Buffer_copy(REQ_SFI(rreq)->pack_buffer,
+ MPIR_STATUS_GET_COUNT(rreq->status),
+ MPI_BYTE, &err0, rreq->dev.user_buf,
+ rreq->dev.user_count, rreq->dev.datatype, &sz, &err1);
+ MPIR_STATUS_SET_COUNT(rreq->status, sz);
+ MPIU_Free(REQ_SFI(rreq)->pack_buffer);
+ if (err0 || err1) {
+ rreq->status.MPI_ERROR = MPI_ERR_TYPE;
+ }
+ }
+
+ if ((wc->tag & MPID_PROTOCOL_MASK) == MPID_SYNC_SEND) {
+ /* ---------------------------------------------------- */
+ /* Ack the sync send and wait for the send request */
+ /* completion(when callback executed. A protocol bit */
+ /* MPID_SYNC_SEND_ACK is set in the tag bits to provide */
+ /* separation of MPI messages and protocol messages */
+ /* ---------------------------------------------------- */
+ vc = REQ_SFI(rreq)->vc;
+ if (!vc) { /* MPI_ANY_SOURCE -- Post message from status, complete the VC */
+ src = get_source(wc->tag);
+ vc = rreq->comm->vcr[src];
+ MPIU_Assert(vc);
+ }
+ ssend_bits = init_sendtag(rreq->dev.match.parts.context_id,
+ rreq->comm->rank, rreq->status.MPI_TAG, MPID_SYNC_SEND_ACK);
+ MPID_nem_sfi_create_req(&sync_req, 1);
+ sync_req->dev.OnDataAvail = NULL;
+ sync_req->dev.next = NULL;
+ REQ_SFI(sync_req)->event_callback = MPID_nem_sfi_sync_recv_callback;
+ REQ_SFI(sync_req)->parent = rreq;
+ FI_RC(fi_tsendto(gl_data.endpoint,
+ NULL,
+ 0,
+ gl_data.mr,
+ VC_SFI(vc)->direct_addr,
+ ssend_bits, &(REQ_SFI(sync_req)->sfi_context)), tsendto);
+ }
+ else {
+ /* ---------------------------------------------------- */
+ /* Non-syncronous send, complete normally */
+ /* by removing from the CH3 queue and completing the */
+ /* request object */
+ /* ---------------------------------------------------- */
+ MPIDI_CH3U_Recvq_DP(rreq);
+ MPIDI_CH3U_Request_complete(rreq);
+ }
+ END_FUNC_RC(FCNAME);
+}
+
+#undef FCNAME
+#define FCNAME DECL_FUNC(do_isend)
+static inline int do_isend(struct MPIDI_VC *vc,
+ const void *buf,
+ int count,
+ MPI_Datatype datatype,
+ int dest,
+ int tag,
+ MPID_Comm * comm,
+ int context_offset, struct MPID_Request **request, uint64_t type)
+{
+ int err0, err1, dt_contig, mpi_errno = MPI_SUCCESS;
+ char *send_buffer;
+ uint64_t match_bits, ssend_match, ssend_mask;
+ MPI_Aint dt_true_lb;
+ MPID_Request *sreq = NULL, *sync_req = NULL;
+ MPIDI_msg_sz_t data_sz;
+ MPID_Datatype *dt_ptr;
+ BEGIN_FUNC(FCNAME);
+ VC_READY_CHECK(vc);
+
+ /* ---------------------------------------------------- */
+ /* Create the MPI request */
+ /* ---------------------------------------------------- */
+ MPID_nem_sfi_create_req(&sreq, 2);
+ sreq->kind = MPID_REQUEST_SEND;
+ sreq->dev.OnDataAvail = NULL;
+ REQ_SFI(sreq)->event_callback = MPID_nem_sfi_send_callback;
+ REQ_SFI(sreq)->vc = vc;
+
+ /* ---------------------------------------------------- */
+ /* Create the pack buffer (if required), and allocate */
+ /* a send request */
+ /* ---------------------------------------------------- */
+ match_bits = init_sendtag(comm->context_id + context_offset, comm->rank, tag, type);
+ sreq->dev.match.parts.tag = match_bits;
+ MPIDI_Datatype_get_info(count, datatype, dt_contig, data_sz, dt_ptr, dt_true_lb);
+ send_buffer = (char *) buf + dt_true_lb;
+ if (!dt_contig) {
+ send_buffer = (char *) MPIU_Malloc(data_sz);
+ MPIU_ERR_CHKANDJUMP1(send_buffer == NULL, mpi_errno,
+ MPI_ERR_OTHER, "**nomem", "**nomem %s", "Send buffer alloc");
+ MPIDI_CH3U_Buffer_copy(buf, count, datatype, &err0,
+ send_buffer, data_sz, MPI_BYTE, &data_sz, &err1);
+ REQ_SFI(sreq)->pack_buffer = send_buffer;
+ }
+
+ if (type == MPID_SYNC_SEND) {
+ /* ---------------------------------------------------- */
+ /* For syncronous send, we post a receive to catch the */
+ /* match ack, but use the tag protocol bits to avoid */
+ /* matching with MPI level messages. */
+ /* ---------------------------------------------------- */
+ int c = 1;
+ MPID_cc_incr(sreq->cc_ptr, &c);
+ MPID_nem_sfi_create_req(&sync_req, 1);
+ sync_req->dev.OnDataAvail = NULL;
+ sync_req->dev.next = NULL;
+ REQ_SFI(sync_req)->event_callback = MPID_nem_sfi_sync_recv_callback;
+ REQ_SFI(sync_req)->parent = sreq;
+ ssend_match = init_recvtag(&ssend_mask, comm->context_id + context_offset, dest, tag);
+ ssend_match |= MPID_SYNC_SEND_ACK;
+ FI_RC(fi_trecvfrom(gl_data.endpoint, /* endpoint */
+ NULL, /* recvbuf */
+ 0, /* data sz */
+ gl_data.mr, /* dynamic mr */
+ VC_SFI(vc)->direct_addr, /* remote proc */
+ ssend_match, /* match bits */
+ 0ULL, /* mask bits */
+ &(REQ_SFI(sync_req)->sfi_context)), trecvfrom);
+ }
+ FI_RC(fi_tsendto(gl_data.endpoint, /* Endpoint */
+ send_buffer, /* Send buffer(packed or user) */
+ data_sz, /* Size of the send */
+ gl_data.mr, /* Dynamic memory region */
+ VC_SFI(vc)->direct_addr, /* Use the address of this VC */
+ match_bits, /* Match bits */
+ &(REQ_SFI(sreq)->sfi_context)), tsendto);
+ *request = sreq;
+ END_FUNC_RC(FCNAME);
+}
+
+#undef FCNAME
+#define FCNAME DECL_FUNC(MPID_nem_sfi_recv_posted)
+int MPID_nem_sfi_recv_posted(struct MPIDI_VC *vc, struct MPID_Request *rreq)
+{
+ int mpi_errno = MPI_SUCCESS, dt_contig, src, tag;
+ uint64_t match_bits = 0, mask_bits = 0;
+ fi_addr_t remote_proc = 0;
+ MPIDI_msg_sz_t data_sz;
+ MPI_Aint dt_true_lb;
+ MPID_Datatype *dt_ptr;
+ MPIR_Context_id_t context_id;
+ char *recv_buffer;
+ BEGIN_FUNC(FCNAME);
+
+ /* ------------------------ */
+ /* Initialize the request */
+ /* ------------------------ */
+ MPID_nem_sfi_init_req(rreq);
+ REQ_SFI(rreq)->event_callback = MPID_nem_sfi_recv_callback;
+ REQ_SFI(rreq)->vc = vc;
+
+ /* ---------------------------------------------------- */
+ /* Fill out the match info, and allocate the pack buffer */
+ /* a send request */
+ /* ---------------------------------------------------- */
+ src = rreq->dev.match.parts.rank;
+ tag = rreq->dev.match.parts.tag;
+ context_id = rreq->dev.match.parts.context_id;
+ match_bits = init_recvtag(&mask_bits, context_id, src, tag);
+ SFI_ADDR_INIT(src, vc, remote_proc);
+ MPIDI_Datatype_get_info(rreq->dev.user_count, rreq->dev.datatype,
+ dt_contig, data_sz, dt_ptr, dt_true_lb);
+ if (dt_contig) {
+ recv_buffer = (char *) rreq->dev.user_buf + dt_true_lb;
+ }
+ else {
+ recv_buffer = (char *) MPIU_Malloc(data_sz);
+ MPIU_ERR_CHKANDJUMP1(recv_buffer == NULL, mpi_errno, MPI_ERR_OTHER,
+ "**nomem", "**nomem %s", "Recv Pack Buffer alloc");
+ REQ_SFI(rreq)->pack_buffer = recv_buffer;
+ }
+
+ /* ---------------- */
+ /* Post the receive */
+ /* ---------------- */
+ FI_RC(fi_trecvfrom(gl_data.endpoint,
+ recv_buffer,
+ data_sz,
+ gl_data.mr,
+ remote_proc,
+ match_bits, mask_bits, &(REQ_SFI(rreq)->sfi_context)), trecvfrom);
+ MPID_nem_sfi_poll(MPID_NONBLOCKING_POLL);
+ END_FUNC_RC(FCNAME);
+}
+
+#undef FCNAME
+#define FCNAME DECL_FUNC(MPID_nem_sfi_send)
+int MPID_nem_sfi_send(struct MPIDI_VC *vc,
+ const void *buf,
+ int count,
+ MPI_Datatype datatype,
+ int dest,
+ int tag, MPID_Comm * comm, int context_offset, struct MPID_Request **request)
+{
+ int mpi_errno = MPI_SUCCESS;
+
+ BEGIN_FUNC(FCNAME);
+ mpi_errno = do_isend(vc, buf, count, datatype, dest, tag,
+ comm, context_offset, request, MPID_NORMAL_SEND);
+ END_FUNC(FCNAME);
+ return mpi_errno;
+}
+
+#undef FCNAME
+#define FCNAME DECL_FUNC(MPID_nem_sfi_isend)
+int MPID_nem_sfi_isend(struct MPIDI_VC *vc,
+ const void *buf,
+ int count,
+ MPI_Datatype datatype,
+ int dest,
+ int tag, MPID_Comm * comm, int context_offset, struct MPID_Request **request)
+{
+ int mpi_errno = MPI_SUCCESS;
+ BEGIN_FUNC(FCNAME);
+ mpi_errno = do_isend(vc, buf, count, datatype, dest,
+ tag, comm, context_offset, request, MPID_NORMAL_SEND);
+ END_FUNC(FCNAME);
+ return mpi_errno;
+}
+
+#undef FCNAME
+#define FCNAME DECL_FUNC(MPID_nem_sfi_ssend)
+int MPID_nem_sfi_ssend(struct MPIDI_VC *vc,
+ const void *buf,
+ int count,
+ MPI_Datatype datatype,
+ int dest,
+ int tag, MPID_Comm * comm, int context_offset, struct MPID_Request **request)
+{
+ int mpi_errno = MPI_SUCCESS;
+ BEGIN_FUNC(FCNAME);
+ mpi_errno = do_isend(vc, buf, count, datatype, dest,
+ tag, comm, context_offset, request, MPID_SYNC_SEND);
+ END_FUNC(FCNAME);
+ return mpi_errno;
+}
+
+#undef FCNAME
+#define FCNAME DECL_FUNC(MPID_nem_sfi_issend)
+int MPID_nem_sfi_issend(struct MPIDI_VC *vc,
+ const void *buf,
+ int count,
+ MPI_Datatype datatype,
+ int dest,
+ int tag,
+ MPID_Comm * comm, int context_offset, struct MPID_Request **request)
+{
+ int mpi_errno = MPI_SUCCESS;
+ BEGIN_FUNC(FCNAME);
+ mpi_errno = do_isend(vc, buf, count, datatype, dest,
+ tag, comm, context_offset, request, MPID_SYNC_SEND);
+ END_FUNC(FCNAME);
+ return mpi_errno;
+}
+
+#define DO_CANCEL(req) \
+({ \
+ int mpi_errno = MPI_SUCCESS; \
+ int ret; \
+ BEGIN_FUNC(FCNAME); \
+ MPID_nem_sfi_poll(MPID_NONBLOCKING_POLL); \
+ ret = fi_cancel((fid_t)gl_data.endpoint, \
+ &(REQ_SFI(req)->sfi_context)); \
+ if (ret == 0) { \
+ MPIR_STATUS_SET_CANCEL_BIT(req->status, TRUE); \
+ } else { \
+ MPIR_STATUS_SET_CANCEL_BIT(req->status, FALSE); \
+ } \
+ END_FUNC(FCNAME); \
+ return mpi_errno; \
+})
+
+#undef FCNAME
+#define FCNAME DECL_FUNC(MPID_nem_sfi_cancel_send)
+int MPID_nem_sfi_cancel_send(struct MPIDI_VC *vc ATTRIBUTE((unused)), struct MPID_Request *sreq)
+{
+ DO_CANCEL(sreq);
+}
+
+#undef FCNAME
+#define FCNAME DECL_FUNC(MPID_nem_sfi_cancel_recv)
+int MPID_nem_sfi_cancel_recv(struct MPIDI_VC *vc ATTRIBUTE((unused)), struct MPID_Request *rreq)
+{
+ DO_CANCEL(rreq);
+}
+
+#undef FCNAME
+#define FCNAME DECL_FUNC(MPID_nem_sfi_anysource_posted)
+void MPID_nem_sfi_anysource_posted(MPID_Request * rreq)
+{
+ int mpi_errno = MPI_SUCCESS;
+ BEGIN_FUNC(FCNAME);
+ mpi_errno = MPID_nem_sfi_recv_posted(NULL, rreq);
+ MPIU_Assert(mpi_errno == MPI_SUCCESS);
+ END_FUNC(FCNAME);
+}
+
+#undef FCNAME
+#define FCNAME DECL_FUNC(MPID_nem_sfi_anysource_matched)
+int MPID_nem_sfi_anysource_matched(MPID_Request * rreq)
+{
+ int mpi_errno = FALSE;
+ int ret;
+ BEGIN_FUNC(FCNAME);
+ /* ----------------------------------------------------- */
+ /* Netmod has notified us that it has matched an any */
+ /* source request on another device. We have the chance */
+ /* to cancel this shared request if it has been posted */
+ /* ----------------------------------------------------- */
+ ret = fi_cancel((fid_t) gl_data.endpoint, &(REQ_SFI(rreq)->sfi_context));
+ if (ret == 0) {
+ /* --------------------------------------------------- */
+ /* Request cancelled: cancel and complete the request */
+ /* --------------------------------------------------- */
+ mpi_errno = TRUE;
+ MPIR_STATUS_SET_CANCEL_BIT(rreq->status, TRUE);
+ MPIR_STATUS_SET_COUNT(rreq->status, 0);
+ MPIDI_CH3U_Request_complete(rreq);
+ }
+ END_FUNC(FCNAME);
+ return mpi_errno;
+}
diff --git a/src/mpid/ch3/channels/nemesis/netmod/sfi/subconfigure.m4 b/src/mpid/ch3/channels/nemesis/netmod/sfi/subconfigure.m4
new file mode 100644
index 0000000..361f7d0
--- /dev/null
+++ b/src/mpid/ch3/channels/nemesis/netmod/sfi/subconfigure.m4
@@ -0,0 +1,24 @@
+[#] start of __file__
+dnl MPICH_SUBCFG_AFTER=src/mpid/ch3/channels/nemesis
+
+AC_DEFUN([PAC_SUBCFG_PREREQ_]PAC_SUBCFG_AUTO_SUFFIX,[
+ AM_COND_IF([BUILD_CH3_NEMESIS],[
+ for net in $nemesis_networks ; do
+ AS_CASE([$net],[sfi],[build_nemesis_netmod_sfi=yes])
+ done
+ ])
+ AM_CONDITIONAL([BUILD_NEMESIS_NETMOD_SFI],[test "X$build_nemesis_netmod_sfi" = "Xyes"])
+])dnl
+
+AC_DEFUN([PAC_SUBCFG_BODY_]PAC_SUBCFG_AUTO_SUFFIX,[
+AM_COND_IF([BUILD_NEMESIS_NETMOD_SFI],[
+ AC_MSG_NOTICE([RUNNING CONFIGURE FOR ch3:nemesis:sfi])
+
+ PAC_SET_HEADER_LIB_PATH(sfi)
+ PAC_CHECK_HEADER_LIB_FATAL(sfi, rdma/fabric.h, fabric, fi_getinfo)
+
+ AC_DEFINE([ENABLE_COMM_OVERRIDES], 1, [define to add per-vc function pointers to override send and recv functions])
+])dnl end AM_COND_IF(BUILD_NEMESIS_NETMOD_SFI,...)
+])dnl end _BODY
+
+[#] end of __file__
-----------------------------------------------------------------------
Summary of changes:
src/mpid/ch3/channels/nemesis/netmod/Makefile.mk | 1 +
.../ch3/channels/nemesis/netmod/sfi/Makefile.mk | 19 +
.../ch3/channels/nemesis/netmod/sfi/errnames.txt | 42 ++
src/mpid/ch3/channels/nemesis/netmod/sfi/sfi_cm.c | 577 ++++++++++++++++++++
.../ch3/channels/nemesis/netmod/sfi/sfi_data.c | 58 ++
.../ch3/channels/nemesis/netmod/sfi/sfi_impl.h | 342 ++++++++++++
.../ch3/channels/nemesis/netmod/sfi/sfi_init.c | 461 ++++++++++++++++
src/mpid/ch3/channels/nemesis/netmod/sfi/sfi_msg.c | 237 ++++++++
.../ch3/channels/nemesis/netmod/sfi/sfi_progress.c | 291 ++++++++++
.../ch3/channels/nemesis/netmod/sfi/sfi_tagged.c | 399 ++++++++++++++
.../channels/nemesis/netmod/sfi/subconfigure.m4 | 24 +
11 files changed, 2451 insertions(+), 0 deletions(-)
create mode 100644 src/mpid/ch3/channels/nemesis/netmod/sfi/Makefile.mk
create mode 100644 src/mpid/ch3/channels/nemesis/netmod/sfi/errnames.txt
create mode 100644 src/mpid/ch3/channels/nemesis/netmod/sfi/sfi_cm.c
create mode 100644 src/mpid/ch3/channels/nemesis/netmod/sfi/sfi_data.c
create mode 100644 src/mpid/ch3/channels/nemesis/netmod/sfi/sfi_impl.h
create mode 100644 src/mpid/ch3/channels/nemesis/netmod/sfi/sfi_init.c
create mode 100644 src/mpid/ch3/channels/nemesis/netmod/sfi/sfi_msg.c
create mode 100644 src/mpid/ch3/channels/nemesis/netmod/sfi/sfi_progress.c
create mode 100644 src/mpid/ch3/channels/nemesis/netmod/sfi/sfi_tagged.c
create mode 100644 src/mpid/ch3/channels/nemesis/netmod/sfi/subconfigure.m4
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.2a2-11-ge38618b
by noreply@mpich.org 21 Nov '14
by noreply@mpich.org 21 Nov '14
21 Nov '14
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "MPICH primary repository".
The branch, master has been updated
via e38618b0fd8cfb5453a7ad8149afc91d9fdd5e24 (commit)
from 0a69a9d0154b86b457ac991c44de58964c0b83b5 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.mpich.org/mpich.git/commitdiff/e38618b0fd8cfb5453a7ad8149afc91d9…
commit e38618b0fd8cfb5453a7ad8149afc91d9fdd5e24
Author: Paul Coffman <pkcoff(a)us.ibm.com>
Date: Thu Nov 20 18:36:41 2014 -0600
Criteria for disabling pami optimized collectives invalid on BGQ
At the end of MPIDI_Init_collsel_extension in the pami device init code
mpid_init.c there is logic to disable the optimized collectives based on
criteria that is invalid on BGQ but was nonetheless always evaluating to
true and disabling the optimized collectives on BGQ. Compiler
directives were placed around the logic to avoid this code for the BGQ
platform.
Signed-off-by: Paul Coffman <pkcoff(a)us.ibm.com>
Signed-off-by: Rob Latham <robl(a)mcs.anl.gov>
diff --git a/src/mpid/pamid/src/mpid_init.c b/src/mpid/pamid/src/mpid_init.c
index 064f085..52f0b7c 100644
--- a/src/mpid/pamid/src/mpid_init.c
+++ b/src/mpid/pamid/src/mpid_init.c
@@ -636,9 +636,11 @@ void MPIDI_Init_collsel_extension()
else
MPIDI_Process.optimized.auto_select_colls = MPID_AUTO_SELECT_COLLS_NONE;
+#ifndef __BGQ__
//If collective selection will be disabled, check on fca, if both not required, disable pami alltogether
if(MPIDI_Process.optimized.auto_select_colls == MPID_AUTO_SELECT_COLLS_NONE && MPIDI_Process.optimized.collectives != MPID_COLL_FCA)
MPIDI_Process.optimized.collectives = MPID_COLL_OFF;
+#endif
}
void MPIDI_Collsel_table_generate()
-----------------------------------------------------------------------
Summary of changes:
src/mpid/pamid/src/mpid_init.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
hooks/post-receive
--
MPICH primary repository
1
0