├── .gitignore ├── ACKNOWLEDGEMENT ├── ChangeLog-1.0d ├── ChangeLog-1.0e ├── ChangeLog-1.0f ├── ChangeLog-1.0g ├── ChangeLog-1.0h ├── ChangeLog-1.1a ├── ChangeLog-1.2 ├── ChangeLog-1.2a ├── ChangeLog-1.3 ├── INSTALL ├── Makefile.in ├── README ├── configure ├── doc ├── Makefile.in ├── implementation.png ├── openshmem-implementation.tex ├── oshc++.1.in ├── oshcc.1.in ├── oshcxx.1.in ├── oshenv.5.in ├── oshfort.1.in └── oshrun.1.in ├── openshmem.module.in └── src ├── Makefile.in ├── alltoall ├── Makefile.in ├── alltoall-impl.h ├── alltoall-linear.c ├── alltoall.c └── alltoall.h ├── atomic ├── Makefile.in ├── atomic.c ├── atomic.h ├── lock.c └── waituntil.c ├── barrier-all ├── Makefile.in ├── barrier-all-impl.h ├── barrier-all-linear.c ├── barrier-all.c └── barrier-all.h ├── barrier ├── Makefile.in ├── barrier-impl.h ├── barrier-linear.c ├── barrier-tree.c ├── barrier.c └── barrier.h ├── broadcast ├── Makefile.in ├── broadcast-impl.h ├── broadcast-linear.c ├── broadcast-tree.c ├── broadcast.c └── broadcast.h ├── cache ├── Makefile.in └── cache.c ├── collect ├── Makefile.in ├── collect-impl.h ├── collect-linear.c ├── collect.c └── collect.h ├── comms ├── Makefile.in ├── comms.h └── gasnet │ ├── Makefile.in │ ├── comms-inline.h │ ├── comms-shared.c │ ├── comms-shared.h │ ├── openshmem-template.pc.in │ ├── oshcc.in │ └── oshrun.in ├── contrib └── gnu-indent-options ├── dlmalloc ├── Makefile.in ├── README ├── dlmalloc.c └── dlmalloc.h ├── fcollect ├── Makefile.in ├── fcollect-impl.h ├── fcollect-linear.c ├── fcollect.c └── fcollect.h ├── fence ├── Makefile.in ├── fence.c └── quiet.c ├── fortran ├── Makefile.in ├── fortran-common.h ├── fortran-mem.c └── fortran.c ├── globalvar ├── Makefile.in ├── globalvar.c └── globalvar.h ├── memory ├── Makefile.in ├── debug_alloc.c ├── debug_alloc.h ├── memalloc.c ├── memalloc.h ├── symmem.c ├── symmem.h ├── symmtest.c └── symmtest.h ├── mpp ├── pshmem.fh ├── pshmem.h ├── pshmemx.fh ├── pshmemx.h ├── shmem.fh ├── shmem.h ├── shmemx.fh └── shmemx.h ├── profiling ├── Makefile.in └── profiling.c ├── pshmem.fh ├── pshmem.h ├── pshmemx.fh ├── pshmemx.h ├── ptp ├── Makefile.in ├── putget.c ├── putget.h ├── putget_nb.c ├── putget_nbi.c └── strided.c ├── querying ├── Makefile.in ├── accessible.c ├── info.c ├── ptr.c ├── query.c └── xlate.c ├── reduce ├── Makefile.in └── reduce-op.c ├── shmem.fh ├── shmem.h ├── shmemx.fh ├── shmemx.h ├── updown ├── Makefile.in ├── updown.c └── updown.h ├── uthash ├── LICENSE ├── utarray.h ├── uthash.h ├── utlist.h └── utstring.h ├── utils ├── Makefile.in ├── clock.c ├── clock.h ├── exe.c ├── exe.h ├── ping.c ├── ping.h ├── state.c ├── state.h ├── trace.c ├── trace.h ├── unitparse.c ├── unitparse.h ├── utils.h ├── version.c └── version.h └── wtime ├── Makefile.in └── shmem_wtime.c /.gitignore: -------------------------------------------------------------------------------- 1 | .libs 2 | .deps 3 | .libs 4 | .dirstamp 5 | .DS_Store 6 | .cdt* 7 | .project 8 | .gdb* 9 | 10 | .hgrc 11 | .hgignore 12 | .hg 13 | .hgignore_local 14 | 15 | *.la 16 | *.lo 17 | *.o 18 | *.so 19 | *.a 20 | *.dwarf 21 | *.dSYM 22 | *.S 23 | *.loT 24 | *.orig 25 | *.rej 26 | *.bak 27 | *.class 28 | *.xcscheme 29 | *.out 30 | *.plist 31 | *.orig 32 | *.obj 33 | *.mod 34 | *.i90 35 | *.ii 36 | *.ti 37 | *.exe 38 | *.log 39 | *.trs 40 | *.sapp 41 | *~ 42 | *\\# 43 | 44 | Makefile 45 | static-components.h 46 | *\\# 47 | config.cache 48 | aclocal.m4 49 | autom4te.cache 50 | config.log 51 | config.status 52 | configure 53 | libtool 54 | doxygen 55 | bin 56 | lib 57 | cscope.* 58 | etags 59 | GRTAGS 60 | GSYMS 61 | GTAGS 62 | GPATH 63 | vc70.pdb 64 | .hgrc 65 | .hgignore 66 | .hg 67 | .hgignore_local 68 | stamp-h? 69 | 70 | ar-lib 71 | ylwrap 72 | config.lt 73 | config.guess 74 | config.sub 75 | depcomp 76 | compile 77 | install-sh 78 | ltmain.sh 79 | missing 80 | mkinstalldirs 81 | libtool.m4 82 | lt~obsolete.m4 83 | ltdl.m4 84 | argz.m4 85 | ltargz.m4 86 | ltsugar.m4 87 | ltversion.m4 88 | ltoptions.m4 89 | build-stamp 90 | config.h 91 | openshmem.module 92 | doc/oshc++.1 93 | doc/oshcc.1 94 | doc/oshcxx.1 95 | doc/oshfort.1 96 | doc/oshrun.1 97 | src/comms/comms-inline.h 98 | src/comms/comms-shared.h 99 | src/comms/comms.mak 100 | src/comms/gasnet/openshmem-template.pc 101 | src/comms/gasnet/openshmem.pc 102 | src/comms/gasnet/oshc++ 103 | src/comms/gasnet/oshcc 104 | src/comms/gasnet/oshcxx 105 | src/comms/gasnet/oshfort 106 | src/comms/gasnet/oshrun 107 | src/osh_info 108 | 109 | -------------------------------------------------------------------------------- /ACKNOWLEDGEMENT: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016 3 | # Stony Brook University 4 | # Copyright (c) 2015 - 2016 5 | # Los Alamos National Security, LLC. 6 | # Copyright (c) 2011 - 2016 7 | # University of Houston System and UT-Battelle, LLC. 8 | # Copyright (c) 2009 - 2016 9 | # Silicon Graphics International Corp. SHMEM is copyrighted 10 | # by Silicon Graphics International Corp. (SGI) The OpenSHMEM API 11 | # (shmem) is released by Open Source Software Solutions, Inc., under an 12 | # agreement with Silicon Graphics International Corp. (SGI). 13 | # 14 | # All rights reserved. 15 | # 16 | # Redistribution and use in source and binary forms, with or without 17 | # modification, are permitted provided that the following conditions 18 | # are met: 19 | # 20 | # o Redistributions of source code must retain the above copyright notice, 21 | # this list of conditions and the following disclaimers. 22 | # 23 | # o Redistributions in binary form must reproduce the above copyright 24 | # notice, this list of conditions and the following disclaimer in the 25 | # documentation and/or other materials provided with the distribution. 26 | # 27 | # o Neither the name of the University of Houston System, 28 | # UT-Battelle, LLC. nor the names of its contributors may be used to 29 | # endorse or promote products derived from this software without specific 30 | # prior written permission. 31 | # 32 | # o Neither the name of Los Alamos National Security, LLC, Los Alamos 33 | # National Laboratory, LANL, the U.S. Government, nor the names of its 34 | # contributors may be used to endorse or promote products derived from 35 | # this software without specific prior written permission. 36 | # 37 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 38 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 39 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 40 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 41 | # HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 42 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 43 | # TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 44 | # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 45 | # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 46 | # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 47 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 48 | # 49 | 50 | 51 | Acknowledgement 52 | --------------- 53 | 54 | This work is, and has been, supported by: 55 | 56 | * Los Alamos National Laboratory. 57 | 58 | * US Department of Defense. 59 | 60 | * Open Source Software Solutions (OSSS). 61 | 62 | * Oak Ridge National Laboratory's Extreme Scale Systems Center. 63 | 64 | * Argonne National Laboratory (BlueGene/P testing). 65 | 66 | * Development at the University of Houston was supported in part by 67 | the National Science Foundation's Computer Systems Research program 68 | under Award No. CRI-0958464. Any opinions, findings, and 69 | conclusions or recommendations expressed in this material are those 70 | of the authors and do not necessarily reflect the views of the 71 | National Science Foundation. 72 | -------------------------------------------------------------------------------- /ChangeLog-1.0d: -------------------------------------------------------------------------------- 1 | 2 | # 3 | # Copyright (c) 2016 4 | # Stony Brook University 5 | # Copyright (c) 2015 - 2016 6 | # Los Alamos National Security, LLC. 7 | # Copyright (c) 2011 - 2016 8 | # University of Houston System and UT-Battelle, LLC. 9 | # Copyright (c) 2009 - 2016 10 | # Silicon Graphics International Corp. SHMEM is copyrighted 11 | # by Silicon Graphics International Corp. (SGI) The OpenSHMEM API 12 | # (shmem) is released by Open Source Software Solutions, Inc., under an 13 | # agreement with Silicon Graphics International Corp. (SGI). 14 | # 15 | # All rights reserved. 16 | # 17 | # Redistribution and use in source and binary forms, with or without 18 | # modification, are permitted provided that the following conditions 19 | # are met: 20 | # 21 | # o Redistributions of source code must retain the above copyright notice, 22 | # this list of conditions and the following disclaimers. 23 | # 24 | # o Redistributions in binary form must reproduce the above copyright 25 | # notice, this list of conditions and the following disclaimer in the 26 | # documentation and/or other materials provided with the distribution. 27 | # 28 | # o Neither the name of the University of Houston System, 29 | # UT-Battelle, LLC. nor the names of its contributors may be used to 30 | # endorse or promote products derived from this software without specific 31 | # prior written permission. 32 | # 33 | # o Neither the name of Los Alamos National Security, LLC, Los Alamos 34 | # National Laboratory, LANL, the U.S. Government, nor the names of its 35 | # contributors may be used to endorse or promote products derived from 36 | # this software without specific prior written permission. 37 | # 38 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 39 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 40 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 41 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 42 | # HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 43 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 44 | # TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 45 | # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 46 | # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 47 | # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 48 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 49 | # 50 | 51 | Configure 52 | --------- 53 | 54 | * Improved GASNet presence, version and conduit detection 55 | * Tested with latest GASNet version (1.20.0) 56 | * Improved checking of compiler suite used to build library 57 | * Find and check ELF library 58 | * Added some new configure options 59 | * New experimental or testing features enabled with configure 60 | option, including 61 | * put/get_nb, atomic xor, PSHMEM interface 62 | * More installation layout control 63 | * Run configure with "--help" to see 64 | 65 | Build 66 | ----- 67 | 68 | * Various code fixes, cleanups in source and Makefiles 69 | * Doxygen (in progress) 70 | * Moving defines to enum rather than macros 71 | * Improved generation of the convenience wrapper scripts 72 | * pass correct linker/compiler commands in more situations 73 | * delegate runs to GASNet launchers when available to avoid 74 | guess-work in this library 75 | * this requires passing "-np npes" to the oshrun wrapper too 76 | * New alias for C++: oshCC (and man page) 77 | 78 | * Library builds with non-GNU compilers, such as Intel, PGI, 79 | Open64/UH 80 | 81 | * Tested in some more Linux distributions, e.g. newest Fedora, 82 | CentOS, OpenSUSE 83 | 84 | Ecosystem 85 | --------- 86 | 87 | * Update of documentation regarding support software, 88 | installation options and configuration process (from 89 | feedback at a couple of workshops) 90 | 91 | * Worked with the TAU profiling tool developers to ensure the 92 | library and tool cooperate 93 | -------------------------------------------------------------------------------- /ChangeLog-1.0e: -------------------------------------------------------------------------------- 1 | 2 | # 3 | # Copyright (c) 2016 4 | # Stony Brook University 5 | # Copyright (c) 2015 - 2016 6 | # Los Alamos National Security, LLC. 7 | # Copyright (c) 2011 - 2016 8 | # University of Houston System and UT-Battelle, LLC. 9 | # Copyright (c) 2009 - 2016 10 | # Silicon Graphics International Corp. SHMEM is copyrighted 11 | # by Silicon Graphics International Corp. (SGI) The OpenSHMEM API 12 | # (shmem) is released by Open Source Software Solutions, Inc., under an 13 | # agreement with Silicon Graphics International Corp. (SGI). 14 | # 15 | # All rights reserved. 16 | # 17 | # Redistribution and use in source and binary forms, with or without 18 | # modification, are permitted provided that the following conditions 19 | # are met: 20 | # 21 | # o Redistributions of source code must retain the above copyright notice, 22 | # this list of conditions and the following disclaimers. 23 | # 24 | # o Redistributions in binary form must reproduce the above copyright 25 | # notice, this list of conditions and the following disclaimer in the 26 | # documentation and/or other materials provided with the distribution. 27 | # 28 | # o Neither the name of the University of Houston System, 29 | # UT-Battelle, LLC. nor the names of its contributors may be used to 30 | # endorse or promote products derived from this software without specific 31 | # prior written permission. 32 | # 33 | # o Neither the name of Los Alamos National Security, LLC, Los Alamos 34 | # National Laboratory, LANL, the U.S. Government, nor the names of its 35 | # contributors may be used to endorse or promote products derived from 36 | # this software without specific prior written permission. 37 | # 38 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 39 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 40 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 41 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 42 | # HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 43 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 44 | # TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 45 | # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 46 | # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 47 | # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 48 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 49 | # 50 | 51 | Configure 52 | --------- 53 | 54 | * Separate build directory support 55 | * Attempts to build in source tree are detected 56 | * Improved checking of compiler suite used to build library 57 | * Run configure with "--help" to see all options/flags 58 | 59 | Build 60 | ----- 61 | 62 | * Review of collectives with some fixes 63 | * Updated 3rd party utilities 64 | * Compiles with 65 | * GNU (various) 66 | * Clang (3.0) 67 | * PGI (various) 68 | * Oracle Studio (12.3) 69 | * Intel (13.x) | 70 | * OpenUH (3.0.x) | 71 | * | = have problems with pshmem support 72 | * 73 | * Preliminary BG/P support ("dcmf" conduit) 74 | * Experimental (not yet in specification) features include 75 | * proposed atomic xor routines 76 | * put/get_nb 77 | * shmem_version routine 78 | * Rearranged internal structure to anticipate alternatives to 79 | GASNet 80 | * Discovered some GASNet improvements from discussions at SC12 81 | 82 | Ecosystem 83 | --------- 84 | 85 | * Update of documentation regarding support software, 86 | installation options and configuration process 87 | -------------------------------------------------------------------------------- /ChangeLog-1.0f: -------------------------------------------------------------------------------- 1 | 2 | # 3 | # Copyright (c) 2016 4 | # Stony Brook University 5 | # Copyright (c) 2015 - 2016 6 | # Los Alamos National Security, LLC. 7 | # Copyright (c) 2011 - 2016 8 | # University of Houston System and UT-Battelle, LLC. 9 | # Copyright (c) 2009 - 2016 10 | # Silicon Graphics International Corp. SHMEM is copyrighted 11 | # by Silicon Graphics International Corp. (SGI) The OpenSHMEM API 12 | # (shmem) is released by Open Source Software Solutions, Inc., under an 13 | # agreement with Silicon Graphics International Corp. (SGI). 14 | # 15 | # All rights reserved. 16 | # 17 | # Redistribution and use in source and binary forms, with or without 18 | # modification, are permitted provided that the following conditions 19 | # are met: 20 | # 21 | # o Redistributions of source code must retain the above copyright notice, 22 | # this list of conditions and the following disclaimers. 23 | # 24 | # o Redistributions in binary form must reproduce the above copyright 25 | # notice, this list of conditions and the following disclaimer in the 26 | # documentation and/or other materials provided with the distribution. 27 | # 28 | # o Neither the name of the University of Houston System, 29 | # UT-Battelle, LLC. nor the names of its contributors may be used to 30 | # endorse or promote products derived from this software without specific 31 | # prior written permission. 32 | # 33 | # o Neither the name of Los Alamos National Security, LLC, Los Alamos 34 | # National Laboratory, LANL, the U.S. Government, nor the names of its 35 | # contributors may be used to endorse or promote products derived from 36 | # this software without specific prior written permission. 37 | # 38 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 39 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 40 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 41 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 42 | # HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 43 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 44 | # TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 45 | # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 46 | # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 47 | # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 48 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 49 | # 50 | 51 | Configure 52 | --------- 53 | 54 | * Run configure with "--help" to see all options/flags 55 | 56 | Build 57 | ----- 58 | 59 | * Compiles with 60 | * GNU (various) 61 | * Clang (3.x) 62 | * PGI (various) 63 | * Oracle Studio (12.3) 64 | * 65 | * Intel (13.x) | 66 | * OpenUH (3.0.x) | 67 | * | = have problems with pshmem support 68 | * 69 | * Experimental features include 70 | * 71 | * atomic xor routines 72 | * put/get_nb 73 | * shmalloc/shfree_nb 74 | * shmem_wtime 75 | * 76 | * N.B. These are by definition not (yet) in the 77 | * specification. They are only visible if you ask 78 | * configure for --enable-experimental. Caveat emptor. 79 | 80 | Ecosystem 81 | --------- 82 | 83 | * Update of documentation regarding support software, 84 | configuration process and installation options. 85 | -------------------------------------------------------------------------------- /ChangeLog-1.0g: -------------------------------------------------------------------------------- 1 | 2 | # 3 | # Copyright (c) 2016 4 | # Stony Brook University 5 | # Copyright (c) 2015 - 2016 6 | # Los Alamos National Security, LLC. 7 | # Copyright (c) 2011 - 2016 8 | # University of Houston System and UT-Battelle, LLC. 9 | # Copyright (c) 2009 - 2016 10 | # Silicon Graphics International Corp. SHMEM is copyrighted 11 | # by Silicon Graphics International Corp. (SGI) The OpenSHMEM API 12 | # (shmem) is released by Open Source Software Solutions, Inc., under an 13 | # agreement with Silicon Graphics International Corp. (SGI). 14 | # 15 | # All rights reserved. 16 | # 17 | # Redistribution and use in source and binary forms, with or without 18 | # modification, are permitted provided that the following conditions 19 | # are met: 20 | # 21 | # o Redistributions of source code must retain the above copyright notice, 22 | # this list of conditions and the following disclaimers. 23 | # 24 | # o Redistributions in binary form must reproduce the above copyright 25 | # notice, this list of conditions and the following disclaimer in the 26 | # documentation and/or other materials provided with the distribution. 27 | # 28 | # o Neither the name of the University of Houston System, 29 | # UT-Battelle, LLC. nor the names of its contributors may be used to 30 | # endorse or promote products derived from this software without specific 31 | # prior written permission. 32 | # 33 | # o Neither the name of Los Alamos National Security, LLC, Los Alamos 34 | # National Laboratory, LANL, the U.S. Government, nor the names of its 35 | # contributors may be used to endorse or promote products derived from 36 | # this software without specific prior written permission. 37 | # 38 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 39 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 40 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 41 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 42 | # HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 43 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 44 | # TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 45 | # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 46 | # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 47 | # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 48 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 49 | # 50 | 51 | Configure 52 | --------- 53 | 54 | * IMPORTANT: 55 | 56 | The library is now compiled as a statically linked archive, 57 | rather than as a shared object. Strongly recommend completely 58 | uninstalling previous release(s) if installing over the top. 59 | 60 | The "config" file for selecting collective implementations has 61 | been removed, use environment variables instead. 62 | 63 | * Allow compile now in source directory or in separate build 64 | directory 65 | 66 | * Run configure with "--help" to see all options/flags 67 | 68 | Build 69 | ----- 70 | 71 | * Some performance improvements, e.g. at start-up 72 | 73 | * Added some more experimental features, including: 74 | * 75 | * shmemx_local_ptr API for locality tests 76 | -------------------------------------------------------------------------------- /ChangeLog-1.0h: -------------------------------------------------------------------------------- 1 | 2 | # 3 | # Copyright (c) 2016 4 | # Stony Brook University 5 | # Copyright (c) 2015 - 2016 6 | # Los Alamos National Security, LLC. 7 | # Copyright (c) 2011 - 2016 8 | # University of Houston System and UT-Battelle, LLC. 9 | # Copyright (c) 2009 - 2016 10 | # Silicon Graphics International Corp. SHMEM is copyrighted 11 | # by Silicon Graphics International Corp. (SGI) The OpenSHMEM API 12 | # (shmem) is released by Open Source Software Solutions, Inc., under an 13 | # agreement with Silicon Graphics International Corp. (SGI). 14 | # 15 | # All rights reserved. 16 | # 17 | # Redistribution and use in source and binary forms, with or without 18 | # modification, are permitted provided that the following conditions 19 | # are met: 20 | # 21 | # o Redistributions of source code must retain the above copyright notice, 22 | # this list of conditions and the following disclaimers. 23 | # 24 | # o Redistributions in binary form must reproduce the above copyright 25 | # notice, this list of conditions and the following disclaimer in the 26 | # documentation and/or other materials provided with the distribution. 27 | # 28 | # o Neither the name of the University of Houston System, 29 | # UT-Battelle, LLC. nor the names of its contributors may be used to 30 | # endorse or promote products derived from this software without specific 31 | # prior written permission. 32 | # 33 | # o Neither the name of Los Alamos National Security, LLC, Los Alamos 34 | # National Laboratory, LANL, the U.S. Government, nor the names of its 35 | # contributors may be used to endorse or promote products derived from 36 | # this software without specific prior written permission. 37 | # 38 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 39 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 40 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 41 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 42 | # HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 43 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 44 | # TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 45 | # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 46 | # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 47 | # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 48 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 49 | # 50 | 51 | Configure 52 | --------- 53 | 54 | * IMPORTANT: 55 | 56 | The library is now compiled as a statically linked archive, 57 | rather than as a shared object. Strongly recommend completely 58 | uninstalling previous release(s) if installing over the top. 59 | 60 | The "config" file for selecting collective implementations has 61 | been removed, use environment variables instead. 62 | 63 | * Run configure with "--help" to see all options/flags. 64 | 65 | * Updated INSTALL instructions to help with different distributions. 66 | 67 | Build 68 | ----- 69 | 70 | * Simplified build process. 71 | 72 | * Using faster broadcast and barrier methods as default. 73 | 74 | -------------------------------------------------------------------------------- /ChangeLog-1.1a: -------------------------------------------------------------------------------- 1 | 2 | # 3 | # Copyright (c) 2016 4 | # Stony Brook University 5 | # Copyright (c) 2015 - 2016 6 | # Los Alamos National Security, LLC. 7 | # Copyright (c) 2011 - 2016 8 | # University of Houston System and UT-Battelle, LLC. 9 | # Copyright (c) 2009 - 2016 10 | # Silicon Graphics International Corp. SHMEM is copyrighted 11 | # by Silicon Graphics International Corp. (SGI) The OpenSHMEM API 12 | # (shmem) is released by Open Source Software Solutions, Inc., under an 13 | # agreement with Silicon Graphics International Corp. (SGI). 14 | # 15 | # All rights reserved. 16 | # 17 | # Redistribution and use in source and binary forms, with or without 18 | # modification, are permitted provided that the following conditions 19 | # are met: 20 | # 21 | # o Redistributions of source code must retain the above copyright notice, 22 | # this list of conditions and the following disclaimers. 23 | # 24 | # o Redistributions in binary form must reproduce the above copyright 25 | # notice, this list of conditions and the following disclaimer in the 26 | # documentation and/or other materials provided with the distribution. 27 | # 28 | # o Neither the name of the University of Houston System, 29 | # UT-Battelle, LLC. nor the names of its contributors may be used to 30 | # endorse or promote products derived from this software without specific 31 | # prior written permission. 32 | # 33 | # o Neither the name of Los Alamos National Security, LLC, Los Alamos 34 | # National Laboratory, LANL, the U.S. Government, nor the names of its 35 | # contributors may be used to endorse or promote products derived from 36 | # this software without specific prior written permission. 37 | # 38 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 39 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 40 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 41 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 42 | # HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 43 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 44 | # TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 45 | # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 46 | # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 47 | # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 48 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 49 | # 50 | 51 | Configure 52 | --------- 53 | 54 | * IMPORTANT: 55 | 56 | The library is now compiled as a statically linked archive, 57 | rather than as a shared object. Strongly recommend completely 58 | uninstalling previous release(s) if installing over the top. 59 | 60 | The "config" file for selecting collective implementations has 61 | been removed, use environment variables instead. 62 | 63 | * Run configure with "--help" to see all options/flags. 64 | 65 | * Updated INSTALL instructions to help with different distributions. 66 | 67 | Build 68 | ----- 69 | 70 | * Simplified build process. 71 | 72 | * Using faster broadcast and barrier methods as default. 73 | 74 | -------------------------------------------------------------------------------- /ChangeLog-1.2: -------------------------------------------------------------------------------- 1 | 2 | # 3 | # Copyright (c) 2016 4 | # Stony Brook University 5 | # Copyright (c) 2015 - 2016 6 | # Los Alamos National Security, LLC. 7 | # Copyright (c) 2011 - 2016 8 | # University of Houston System and UT-Battelle, LLC. 9 | # Copyright (c) 2009 - 2016 10 | # Silicon Graphics International Corp. SHMEM is copyrighted 11 | # by Silicon Graphics International Corp. (SGI) The OpenSHMEM API 12 | # (shmem) is released by Open Source Software Solutions, Inc., under an 13 | # agreement with Silicon Graphics International Corp. (SGI). 14 | # 15 | # All rights reserved. 16 | # 17 | # Redistribution and use in source and binary forms, with or without 18 | # modification, are permitted provided that the following conditions 19 | # are met: 20 | # 21 | # o Redistributions of source code must retain the above copyright notice, 22 | # this list of conditions and the following disclaimers. 23 | # 24 | # o Redistributions in binary form must reproduce the above copyright 25 | # notice, this list of conditions and the following disclaimer in the 26 | # documentation and/or other materials provided with the distribution. 27 | # 28 | # o Neither the name of the University of Houston System, 29 | # UT-Battelle, LLC. nor the names of its contributors may be used to 30 | # endorse or promote products derived from this software without specific 31 | # prior written permission. 32 | # 33 | # o Neither the name of Los Alamos National Security, LLC, Los Alamos 34 | # National Laboratory, LANL, the U.S. Government, nor the names of its 35 | # contributors may be used to endorse or promote products derived from 36 | # this software without specific prior written permission. 37 | # 38 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 39 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 40 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 41 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 42 | # HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 43 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 44 | # TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 45 | # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 46 | # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 47 | # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 48 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 49 | # 50 | 51 | Configure 52 | --------- 53 | 54 | * IMPORTANT: 55 | 56 | The library is now compiled as a statically linked archive, 57 | rather than as a shared object. Strongly recommend completely 58 | uninstalling previous release(s) instead of installing over 59 | the top. 60 | 61 | * Run configure with "--help" to see all options/flags. 62 | 63 | * Updated INSTALL instructions to help with different distributions. 64 | 65 | Build 66 | ----- 67 | 68 | * Simplified build process. 69 | 70 | * Using faster broadcast method as default. 71 | 72 | * Removed oshCC wrapper, now using oshcxx and oshc++ 73 | * (Causes problems on case-insensitive file systems) 74 | 75 | Specification 76 | ------------- 77 | 78 | * New API routines for info query, finalize and global exit 79 | -------------------------------------------------------------------------------- /ChangeLog-1.2a: -------------------------------------------------------------------------------- 1 | 2 | # 3 | # Copyright (c) 2016 4 | # Stony Brook University 5 | # Copyright (c) 2015 - 2016 6 | # Los Alamos National Security, LLC. 7 | # Copyright (c) 2011 - 2016 8 | # University of Houston System and UT-Battelle, LLC. 9 | # Copyright (c) 2009 - 2016 10 | # Silicon Graphics International Corp. SHMEM is copyrighted 11 | # by Silicon Graphics International Corp. (SGI) The OpenSHMEM API 12 | # (shmem) is released by Open Source Software Solutions, Inc., under an 13 | # agreement with Silicon Graphics International Corp. (SGI). 14 | # 15 | # All rights reserved. 16 | # 17 | # Redistribution and use in source and binary forms, with or without 18 | # modification, are permitted provided that the following conditions 19 | # are met: 20 | # 21 | # o Redistributions of source code must retain the above copyright notice, 22 | # this list of conditions and the following disclaimers. 23 | # 24 | # o Redistributions in binary form must reproduce the above copyright 25 | # notice, this list of conditions and the following disclaimer in the 26 | # documentation and/or other materials provided with the distribution. 27 | # 28 | # o Neither the name of the University of Houston System, 29 | # UT-Battelle, LLC. nor the names of its contributors may be used to 30 | # endorse or promote products derived from this software without specific 31 | # prior written permission. 32 | # 33 | # o Neither the name of Los Alamos National Security, LLC, Los Alamos 34 | # National Laboratory, LANL, the U.S. Government, nor the names of its 35 | # contributors may be used to endorse or promote products derived from 36 | # this software without specific prior written permission. 37 | # 38 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 39 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 40 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 41 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 42 | # HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 43 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 44 | # TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 45 | # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 46 | # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 47 | # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 48 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 49 | # 50 | 51 | Configure 52 | --------- 53 | 54 | * IMPORTANT: 55 | 56 | The library is now compiled as a statically linked archive, 57 | rather than as a shared object. Strongly recommend completely 58 | uninstalling previous release(s) instead of installing over 59 | the top. 60 | 61 | * Run configure with "--help" to see all options/flags. 62 | 63 | * Updated INSTALL instructions to help with different distributions. 64 | 65 | Build 66 | ----- 67 | 68 | * Simplified build process. 69 | 70 | * Using faster broadcast and barrier methods as default. 71 | 72 | Specification 73 | ------------- 74 | 75 | * New API routines for info query, finalize and global exit 76 | -------------------------------------------------------------------------------- /ChangeLog-1.3: -------------------------------------------------------------------------------- 1 | 2 | # 3 | # Copyright (c) 2016 4 | # Stony Brook University 5 | # Copyright (c) 2015 - 2016 6 | # Los Alamos National Security, LLC. 7 | # Copyright (c) 2011 - 2016 8 | # University of Houston System and UT-Battelle, LLC. 9 | # Copyright (c) 2009 - 2016 10 | # Silicon Graphics International Corp. SHMEM is copyrighted 11 | # by Silicon Graphics International Corp. (SGI) The OpenSHMEM API 12 | # (shmem) is released by Open Source Software Solutions, Inc., under an 13 | # agreement with Silicon Graphics International Corp. (SGI). 14 | # 15 | # All rights reserved. 16 | # 17 | # Redistribution and use in source and binary forms, with or without 18 | # modification, are permitted provided that the following conditions 19 | # are met: 20 | # 21 | # o Redistributions of source code must retain the above copyright notice, 22 | # this list of conditions and the following disclaimers. 23 | # 24 | # o Redistributions in binary form must reproduce the above copyright 25 | # notice, this list of conditions and the following disclaimer in the 26 | # documentation and/or other materials provided with the distribution. 27 | # 28 | # o Neither the name of the University of Houston System, 29 | # UT-Battelle, LLC. nor the names of its contributors may be used to 30 | # endorse or promote products derived from this software without specific 31 | # prior written permission. 32 | # 33 | # o Neither the name of Los Alamos National Security, LLC, Los Alamos 34 | # National Laboratory, LANL, the U.S. Government, nor the names of its 35 | # contributors may be used to endorse or promote products derived from 36 | # this software without specific prior written permission. 37 | # 38 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 39 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 40 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 41 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 42 | # HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 43 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 44 | # TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 45 | # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 46 | # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 47 | # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 48 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 49 | # 50 | 51 | Configure 52 | --------- 53 | 54 | * Run configure with "--help" to see all options/flags. 55 | 56 | Code 57 | ---- 58 | 59 | * Improved atomics 60 | 61 | * Reworked progress thread setup 62 | * Requires GASNet 1.18.0 upward for locality routine 63 | 64 | Specification 65 | ------------- 66 | 67 | * Constants in the C/C++ API now have *no* leading underscore, 68 | must be macros, and they match the Fortran names. 69 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016 3 | # Stony Brook University 4 | # Copyright (c) 2015 - 2016 5 | # Los Alamos National Security, LLC. 6 | # Copyright (c) 2011 - 2016 7 | # University of Houston System and UT-Battelle, LLC. 8 | # Copyright (c) 2009 - 2016 9 | # Silicon Graphics International Corp. SHMEM is copyrighted 10 | # by Silicon Graphics International Corp. (SGI) The OpenSHMEM API 11 | # (shmem) is released by Open Source Software Solutions, Inc., under an 12 | # agreement with Silicon Graphics International Corp. (SGI). 13 | # 14 | # All rights reserved. 15 | # 16 | # Redistribution and use in source and binary forms, with or without 17 | # modification, are permitted provided that the following conditions 18 | # are met: 19 | # 20 | # o Redistributions of source code must retain the above copyright notice, 21 | # this list of conditions and the following disclaimers. 22 | # 23 | # o Redistributions in binary form must reproduce the above copyright 24 | # notice, this list of conditions and the following disclaimer in the 25 | # documentation and/or other materials provided with the distribution. 26 | # 27 | # o Neither the name of the University of Houston System, 28 | # UT-Battelle, LLC. nor the names of its contributors may be used to 29 | # endorse or promote products derived from this software without specific 30 | # prior written permission. 31 | # 32 | # o Neither the name of Los Alamos National Security, LLC, Los Alamos 33 | # National Laboratory, LANL, the U.S. Government, nor the names of its 34 | # contributors may be used to endorse or promote products derived from 35 | # this software without specific prior written permission. 36 | # 37 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 38 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 39 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 40 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 41 | # HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 42 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 43 | # TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 44 | # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 45 | # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 46 | # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 47 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 48 | # 49 | 50 | 51 | This project is hosted at 52 | 53 | http://www.openshmem.org/ 54 | 55 | which is where you can find definitive information about the OpenSHMEM 56 | project, tutorials, presentations, papers, vendors, and other 57 | contributed documentation. 58 | 59 | 60 | Contact and Feedback 61 | ==================== 62 | 63 | The Principal Investigator at Stony Brook University 64 | 65 | http://www.stonybrook.edu/ 66 | 67 | and the University of Houston 68 | 69 | http://www.uh.edu/ 70 | 71 | is 72 | 73 | Prof. Barbara Chapman 74 | 75 | The Stony Brook project development lead is 76 | 77 | Tony Curtis 78 | -------------------------------------------------------------------------------- /doc/implementation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openshmem-org/osss-gasnet/5f91637b27690c148cbf81523f2bc0b0fb7829b4/doc/implementation.png -------------------------------------------------------------------------------- /doc/oshc++.1.in: -------------------------------------------------------------------------------- 1 | oshcxx.1.in -------------------------------------------------------------------------------- /doc/oshcc.1.in: -------------------------------------------------------------------------------- 1 | .\" 2 | .\" Copyright (c) 2016 3 | .\" Stony Brook University 4 | .\" Copyright (c) 2015 - 2016 5 | .\" Los Alamos National Security, LLC. 6 | .\" Copyright (c) 2011 - 2016 7 | .\" University of Houston System and UT-Battelle, LLC. 8 | .\" Copyright (c) 2009 - 2016 9 | .\" Silicon Graphics International Corp. SHMEM is copyrighted 10 | .\" by Silicon Graphics International Corp. (SGI) The OpenSHMEM API 11 | .\" (shmem) is released by Open Source Software Solutions, Inc., under an 12 | .\" agreement with Silicon Graphics International Corp. (SGI). 13 | .\" 14 | .\" All rights reserved. 15 | .\" 16 | .\" Redistribution and use in source and binary forms, with or without 17 | .\" modification, are permitted provided that the following conditions 18 | .\" are met: 19 | .\" 20 | .\" o Redistributions of source code must retain the above copyright notice, 21 | .\" this list of conditions and the following disclaimers. 22 | .\" 23 | .\" o Redistributions in binary form must reproduce the above copyright 24 | .\" notice, this list of conditions and the following disclaimer in the 25 | .\" documentation and/or other materials provided with the distribution. 26 | .\" 27 | .\" o Neither the name of the University of Houston System, 28 | .\" UT-Battelle, LLC. nor the names of its contributors may be used to 29 | .\" endorse or promote products derived from this software without specific 30 | .\" prior written permission. 31 | .\" 32 | .\" o Neither the name of Los Alamos National Security, LLC, Los Alamos 33 | .\" National Laboratory, LANL, the U.S. Government, nor the names of its 34 | .\" contributors may be used to endorse or promote products derived from 35 | .\" this software without specific prior written permission. 36 | .\" 37 | .\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 38 | .\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 39 | .\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 40 | .\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 41 | .\" HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 42 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 43 | .\" TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 44 | .\" PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 45 | .\" LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 46 | .\" NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 47 | .\" SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 48 | .\" 49 | 50 | .TH oshcc 1 "" 51 | .SH NAME 52 | \fBoshcc\fP - compile an OpenSHMEM C program 53 | .SH SYNOPSIS 54 | \fBoshcc\fP 55 | .RS 56 | .br 57 | [ underlying compiler flags ] 58 | .br 59 | file.c [file.c ...] 60 | .RE 61 | .SH DESCRIPTION 62 | \fBoshcc\fP is a wrapper in the vein of mpicc that compiles 63 | an OpenSHMEM program. The wrapper hides implementation 64 | details from the user. 65 | .SH EXAMPLES 66 | The command 67 | .LP 68 | .RS 69 | $ oshcc -g -o foo.exe foo.c 70 | .RE 71 | .LP 72 | compiles foo.c into the OpenSHMEM executable foo.exe. 73 | .SH ENVIRONMENT 74 | The underlying compiler/linker invoked by this wrapper is determined 75 | when the OpenSHMEM library is built. To override, set the 76 | .LP 77 | .RS 78 | \f(CROSH_CC\fP 79 | .RE 80 | .LP 81 | environment variable. 82 | .SH NOTES 83 | The OpenSHMEM specification does not say anything about 84 | how OpenSHMEM programs are compiled, linked and launched. 85 | These wrapper programs are supplied as part of the Reference 86 | Library for convenience. 87 | .SH SEE ALSO 88 | oshcxx(1), 89 | .br 90 | oshfort(1), 91 | .br 92 | oshrun(1). 93 | .SH OPENSHMEM 94 | http://www.openshmem.org/ 95 | -------------------------------------------------------------------------------- /doc/oshcxx.1.in: -------------------------------------------------------------------------------- 1 | .\" 2 | .\" Copyright (c) 2016 3 | .\" Stony Brook University 4 | .\" Copyright (c) 2015 - 2016 5 | .\" Los Alamos National Security, LLC. 6 | .\" Copyright (c) 2011 - 2016 7 | .\" University of Houston System and UT-Battelle, LLC. 8 | .\" Copyright (c) 2009 - 2016 9 | .\" Silicon Graphics International Corp. SHMEM is copyrighted 10 | .\" by Silicon Graphics International Corp. (SGI) The OpenSHMEM API 11 | .\" (shmem) is released by Open Source Software Solutions, Inc., under an 12 | .\" agreement with Silicon Graphics International Corp. (SGI). 13 | .\" 14 | .\" All rights reserved. 15 | .\" 16 | .\" Redistribution and use in source and binary forms, with or without 17 | .\" modification, are permitted provided that the following conditions 18 | .\" are met: 19 | .\" 20 | .\" o Redistributions of source code must retain the above copyright notice, 21 | .\" this list of conditions and the following disclaimers. 22 | .\" 23 | .\" o Redistributions in binary form must reproduce the above copyright 24 | .\" notice, this list of conditions and the following disclaimer in the 25 | .\" documentation and/or other materials provided with the distribution. 26 | .\" 27 | .\" o Neither the name of the University of Houston System, 28 | .\" UT-Battelle, LLC. nor the names of its contributors may be used to 29 | .\" endorse or promote products derived from this software without specific 30 | .\" prior written permission. 31 | .\" 32 | .\" o Neither the name of Los Alamos National Security, LLC, Los Alamos 33 | .\" National Laboratory, LANL, the U.S. Government, nor the names of its 34 | .\" contributors may be used to endorse or promote products derived from 35 | .\" this software without specific prior written permission. 36 | .\" 37 | .\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 38 | .\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 39 | .\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 40 | .\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 41 | .\" HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 42 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 43 | .\" TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 44 | .\" PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 45 | .\" LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 46 | .\" NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 47 | .\" SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 48 | .\" 49 | 50 | .TH oshcxx/oshc++ 1 "" 51 | .SH NAME 52 | \fBoshcxx/oshc++\fP - compile an OpenSHMEM C++ program 53 | .SH SYNOPSIS 54 | \fBoshcxx/oshc++\fP 55 | .RS 56 | .br 57 | [ underlying compiler flags ] 58 | .br 59 | file.cxx [file.cxx ...] 60 | .RE 61 | .SH DESCRIPTION 62 | \fBoshcxx\fP, or equivalently \fBoshc++\fP, is a wrapper in the vein 63 | of mpicxx/mpic++ that compiles an OpenSHMEM program. The wrapper 64 | hides implementation details from the user. 65 | .SH EXAMPLES 66 | The command 67 | .LP 68 | .RS 69 | $ oshcxx -g -o foo.exe foo.cxx 70 | .RE 71 | .LP 72 | compiles C++ source code foo.cxx into the OpenSHMEM executable foo.exe. 73 | .SH ENVIRONMENT 74 | The underlying compiler/linker invoked by this wrapper is determined 75 | when the OpenSHMEM library is built. To override, set the 76 | .LP 77 | .RS 78 | \f(CROSH_CXX\fP 79 | .RE 80 | .LP 81 | environment variable. 82 | .SH NOTES 83 | The OpenSHMEM specification does not say anything about 84 | how OpenSHMEM programs are compiled, linked and launched. 85 | These wrapper programs are supplied as part of the Reference 86 | Library for convenience. 87 | .SH SEE ALSO 88 | oshcc(1), 89 | .br 90 | oshfort(1), 91 | .br 92 | oshrun(1). 93 | .SH OPENSHMEM 94 | http://www.openshmem.org/ 95 | -------------------------------------------------------------------------------- /doc/oshfort.1.in: -------------------------------------------------------------------------------- 1 | .\" 2 | .\" Copyright (c) 2016 3 | .\" Stony Brook University 4 | .\" Copyright (c) 2015 - 2016 5 | .\" Los Alamos National Security, LLC. 6 | .\" Copyright (c) 2011 - 2016 7 | .\" University of Houston System and UT-Battelle, LLC. 8 | .\" Copyright (c) 2009 - 2016 9 | .\" Silicon Graphics International Corp. SHMEM is copyrighted 10 | .\" by Silicon Graphics International Corp. (SGI) The OpenSHMEM API 11 | .\" (shmem) is released by Open Source Software Solutions, Inc., under an 12 | .\" agreement with Silicon Graphics International Corp. (SGI). 13 | .\" 14 | .\" All rights reserved. 15 | .\" 16 | .\" Redistribution and use in source and binary forms, with or without 17 | .\" modification, are permitted provided that the following conditions 18 | .\" are met: 19 | .\" 20 | .\" o Redistributions of source code must retain the above copyright notice, 21 | .\" this list of conditions and the following disclaimers. 22 | .\" 23 | .\" o Redistributions in binary form must reproduce the above copyright 24 | .\" notice, this list of conditions and the following disclaimer in the 25 | .\" documentation and/or other materials provided with the distribution. 26 | .\" 27 | .\" o Neither the name of the University of Houston System, 28 | .\" UT-Battelle, LLC. nor the names of its contributors may be used to 29 | .\" endorse or promote products derived from this software without specific 30 | .\" prior written permission. 31 | .\" 32 | .\" o Neither the name of Los Alamos National Security, LLC, Los Alamos 33 | .\" National Laboratory, LANL, the U.S. Government, nor the names of its 34 | .\" contributors may be used to endorse or promote products derived from 35 | .\" this software without specific prior written permission. 36 | .\" 37 | .\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 38 | .\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 39 | .\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 40 | .\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 41 | .\" HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 42 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 43 | .\" TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 44 | .\" PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 45 | .\" LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 46 | .\" NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 47 | .\" SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 48 | .\" 49 | 50 | .TH oshfort 1 "" 51 | .SH NAME 52 | \fBoshfort\fP - compile an OpenSHMEM Fortran program 53 | .SH SYNOPSIS 54 | \fBoshfort\fP 55 | .RS 56 | .br 57 | [ underlying compiler flags ] 58 | .br 59 | file.f [file.f ...] 60 | .RE 61 | .SH DESCRIPTION 62 | \fBoshfort\fP is a wrapper in the vein of mpif77 that compiles 63 | an OpenSHMEM program. The wrapper hides implementation 64 | details from the user. 65 | .SH EXAMPLES 66 | The command 67 | .LP 68 | .RS 69 | $ oshfort -g -o foo.exe foo.f 70 | .RE 71 | .LP 72 | compiles the Fortran source code foo.f into the OpenSHMEM executable foo.exe. 73 | .SH ENVIRONMENT 74 | The underlying compiler/linker invoked by this wrapper is determined 75 | when the OpenSHMEM library is built. To override, set the 76 | .LP 77 | .RS 78 | \f(CROSH_FC\fP 79 | .RE 80 | .LP 81 | environment variable. 82 | .SH NOTES 83 | The OpenSHMEM specification does not say anything about 84 | how OpenSHMEM programs are compiled, linked and launched. 85 | These wrapper programs are supplied as part of the Reference 86 | Library for convenience. 87 | .SH SEE ALSO 88 | oshcxx(1), 89 | .br 90 | oshfort(1), 91 | .br 92 | oshrun(1). 93 | .SH OPENSHMEM 94 | http://www.openshmem.org/ 95 | -------------------------------------------------------------------------------- /doc/oshrun.1.in: -------------------------------------------------------------------------------- 1 | .\" 2 | .\" Copyright (c) 2016 3 | .\" Stony Brook University 4 | .\" Copyright (c) 2015 - 2016 5 | .\" Los Alamos National Security, LLC. 6 | .\" Copyright (c) 2011 - 2016 7 | .\" University of Houston System and UT-Battelle, LLC. 8 | .\" Copyright (c) 2009 - 2016 9 | .\" Silicon Graphics International Corp. SHMEM is copyrighted 10 | .\" by Silicon Graphics International Corp. (SGI) The OpenSHMEM API 11 | .\" (shmem) is released by Open Source Software Solutions, Inc., under an 12 | .\" agreement with Silicon Graphics International Corp. (SGI). 13 | .\" 14 | .\" All rights reserved. 15 | .\" 16 | .\" Redistribution and use in source and binary forms, with or without 17 | .\" modification, are permitted provided that the following conditions 18 | .\" are met: 19 | .\" 20 | .\" o Redistributions of source code must retain the above copyright notice, 21 | .\" this list of conditions and the following disclaimers. 22 | .\" 23 | .\" o Redistributions in binary form must reproduce the above copyright 24 | .\" notice, this list of conditions and the following disclaimer in the 25 | .\" documentation and/or other materials provided with the distribution. 26 | .\" 27 | .\" o Neither the name of the University of Houston System, 28 | .\" UT-Battelle, LLC. nor the names of its contributors may be used to 29 | .\" endorse or promote products derived from this software without specific 30 | .\" prior written permission. 31 | .\" 32 | .\" o Neither the name of Los Alamos National Security, LLC, Los Alamos 33 | .\" National Laboratory, LANL, the U.S. Government, nor the names of its 34 | .\" contributors may be used to endorse or promote products derived from 35 | .\" this software without specific prior written permission. 36 | .\" 37 | .\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 38 | .\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 39 | .\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 40 | .\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 41 | .\" HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 42 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 43 | .\" TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 44 | .\" PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 45 | .\" LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 46 | .\" NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 47 | .\" SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 48 | .\" 49 | 50 | .TH oshrun 1 "" 51 | .SH NAME 52 | \fBoshrun\fP - run an OpenSHMEM program 53 | .SH SYNOPSIS 54 | \fBoshrun\fP 55 | .RS 56 | .br 57 | [launcher pass-through arguments] 58 | .br 59 | -n N | -np N 60 | .br 61 | program 62 | .br 63 | [ [--] program arguments] 64 | .RE 65 | .SH DESCRIPTION 66 | \fBoshrun\fP runs an OpenSHMEM program on the given number of 67 | processing elements. 68 | .SH NUMBER OF PROCESSING ELEMENTS 69 | .IP "-n N | -np N" 4 70 | Run the program on N processing elements (processors). 71 | .IP 72 | Required. 73 | .LP 74 | .SH EXAMPLES 75 | The command 76 | .LP 77 | .RS 78 | $ oshrun -np 4 ./sping.x -e 8192 79 | .RE 80 | .LP 81 | runs the Quadrics ping-pong example code on 4 processing elements, and 82 | passes the arguments "-e" and "8192" through to the OpenSHMEM program. 83 | .SH NOTES 84 | .LP 85 | The OpenSHMEM specification does not say anything about how OpenSHMEM 86 | programs are compiled, linked and launched. These wrapper programs 87 | are supplied as part of the Reference Library for convenience. 88 | .LP 89 | To disambiguate launcher and program options/arguments, use "--" to 90 | signal end-of-launcher arguments. 91 | .SH SEE ALSO 92 | oshcxx(1), 93 | .br 94 | oshrun(1), 95 | .br 96 | oshfort(1). 97 | .SH OPENSHMEM 98 | http://www.openshmem.org/ 99 | -------------------------------------------------------------------------------- /openshmem.module.in: -------------------------------------------------------------------------------- 1 | #%Module1.0#################################### 2 | # 3 | 4 | # 5 | # Copyright (c) 2016 6 | # Stony Brook University 7 | # Copyright (c) 2015 - 2016 8 | # Los Alamos National Security, LLC. 9 | # Copyright (c) 2011 - 2016 10 | # University of Houston System and UT-Battelle, LLC. 11 | # Copyright (c) 2009 - 2016 12 | # Silicon Graphics International Corp. SHMEM is copyrighted 13 | # by Silicon Graphics International Corp. (SGI) The OpenSHMEM API 14 | # (shmem) is released by Open Source Software Solutions, Inc., under an 15 | # agreement with Silicon Graphics International Corp. (SGI). 16 | # 17 | # All rights reserved. 18 | # 19 | # Redistribution and use in source and binary forms, with or without 20 | # modification, are permitted provided that the following conditions 21 | # are met: 22 | # 23 | # o Redistributions of source code must retain the above copyright notice, 24 | # this list of conditions and the following disclaimers. 25 | # 26 | # o Redistributions in binary form must reproduce the above copyright 27 | # notice, this list of conditions and the following disclaimer in the 28 | # documentation and/or other materials provided with the distribution. 29 | # 30 | # o Neither the name of the University of Houston System, 31 | # UT-Battelle, LLC. nor the names of its contributors may be used to 32 | # endorse or promote products derived from this software without specific 33 | # prior written permission. 34 | # 35 | # o Neither the name of Los Alamos National Security, LLC, Los Alamos 36 | # National Laboratory, LANL, the U.S. Government, nor the names of its 37 | # contributors may be used to endorse or promote products derived from 38 | # this software without specific prior written permission. 39 | # 40 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 41 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 42 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 43 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 44 | # HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 45 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 46 | # TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 47 | # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 48 | # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 49 | # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 50 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 51 | # 52 | 53 | set shmem_root @PREFIX@ 54 | 55 | set shmem_info "OpenSHMEM Library" 56 | 57 | prepend-path PATH $shmem_root/bin 58 | prepend-path MANPATH $shmem_root/share/man 59 | prepend-path PKG_CONFIG_PATH $shmem_root/lib/pkgconfig 60 | 61 | # fill out as required 62 | proc ModulesHelp { } { 63 | puts stderr $shmem_info 64 | } 65 | 66 | module-whatis $shmem_info 67 | 68 | # 69 | # Customize run tracing 70 | # 71 | # setenv SHMEM_LOG_LEVELS debug,info,notice 72 | 73 | # 74 | # Examples for tuning Infiniband environment. See INSTALL file. 75 | # 76 | # setenv GASNET_PHYSMEM_NOPROBE 1 77 | # setenv MV2_NUM_HCAS 2 78 | -------------------------------------------------------------------------------- /src/alltoall/alltoall-impl.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2016 4 | * Stony Brook University 5 | * Copyright (c) 2015 - 2016 6 | * Los Alamos National Security, LLC. 7 | * Copyright (c) 2011 - 2016 8 | * University of Houston System and UT-Battelle, LLC. 9 | * Copyright (c) 2009 - 2016 10 | * Silicon Graphics International Corp. SHMEM is copyrighted 11 | * by Silicon Graphics International Corp. (SGI) The OpenSHMEM API 12 | * (shmem) is released by Open Source Software Solutions, Inc., under an 13 | * agreement with Silicon Graphics International Corp. (SGI). 14 | * 15 | * All rights reserved. 16 | * 17 | * Redistribution and use in source and binary forms, with or without 18 | * modification, are permitted provided that the following conditions 19 | * are met: 20 | * 21 | * o Redistributions of source code must retain the above copyright notice, 22 | * this list of conditions and the following disclaimers. 23 | * 24 | * o Redistributions in binary form must reproduce the above copyright 25 | * notice, this list of conditions and the following disclaimer in the 26 | * documentation and/or other materials provided with the distribution. 27 | * 28 | * o Neither the name of the University of Houston System, 29 | * UT-Battelle, LLC. nor the names of its contributors may be used to 30 | * endorse or promote products derived from this software without specific 31 | * prior written permission. 32 | * 33 | * o Neither the name of Los Alamos National Security, LLC, Los Alamos 34 | * National Laboratory, LANL, the U.S. Government, nor the names of its 35 | * contributors may be used to endorse or promote products derived from 36 | * this software without specific prior written permission. 37 | * 38 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 39 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 40 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 41 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 42 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 43 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 44 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 45 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 46 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 47 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 48 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 49 | * 50 | */ 51 | 52 | #ifndef _ALLTOALL_IMPL_H 53 | #define _ALLTOALL_IMPL_H 1 54 | 55 | extern void shmemi_alltoall32_linear (); 56 | extern void shmemi_alltoall64_linear (); 57 | 58 | #endif /* _ALLTOALL_IMPL_H */ 59 | -------------------------------------------------------------------------------- /src/alltoall/alltoall.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2016 4 | * Stony Brook University 5 | * Copyright (c) 2015 - 2016 6 | * Los Alamos National Security, LLC. 7 | * Copyright (c) 2011 - 2016 8 | * University of Houston System and UT-Battelle, LLC. 9 | * Copyright (c) 2009 - 2016 10 | * Silicon Graphics International Corp. SHMEM is copyrighted 11 | * by Silicon Graphics International Corp. (SGI) The OpenSHMEM API 12 | * (shmem) is released by Open Source Software Solutions, Inc., under an 13 | * agreement with Silicon Graphics International Corp. (SGI). 14 | * 15 | * All rights reserved. 16 | * 17 | * Redistribution and use in source and binary forms, with or without 18 | * modification, are permitted provided that the following conditions 19 | * are met: 20 | * 21 | * o Redistributions of source code must retain the above copyright notice, 22 | * this list of conditions and the following disclaimers. 23 | * 24 | * o Redistributions in binary form must reproduce the above copyright 25 | * notice, this list of conditions and the following disclaimer in the 26 | * documentation and/or other materials provided with the distribution. 27 | * 28 | * o Neither the name of the University of Houston System, 29 | * UT-Battelle, LLC. nor the names of its contributors may be used to 30 | * endorse or promote products derived from this software without specific 31 | * prior written permission. 32 | * 33 | * o Neither the name of Los Alamos National Security, LLC, Los Alamos 34 | * National Laboratory, LANL, the U.S. Government, nor the names of its 35 | * contributors may be used to endorse or promote products derived from 36 | * this software without specific prior written permission. 37 | * 38 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 39 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 40 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 41 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 42 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 43 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 44 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 45 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 46 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 47 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 48 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 49 | * 50 | */ 51 | 52 | 53 | #ifndef _ALLTOALL_H 54 | #define _ALLTOALL_H 1 55 | 56 | extern void shmemi_alltoall_dispatch_init (void); 57 | 58 | #endif /* _ALLTOALL_H */ 59 | -------------------------------------------------------------------------------- /src/barrier-all/barrier-all-impl.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2016 4 | * Stony Brook University 5 | * Copyright (c) 2015 - 2016 6 | * Los Alamos National Security, LLC. 7 | * Copyright (c) 2011 - 2016 8 | * University of Houston System and UT-Battelle, LLC. 9 | * Copyright (c) 2009 - 2016 10 | * Silicon Graphics International Corp. SHMEM is copyrighted 11 | * by Silicon Graphics International Corp. (SGI) The OpenSHMEM API 12 | * (shmem) is released by Open Source Software Solutions, Inc., under an 13 | * agreement with Silicon Graphics International Corp. (SGI). 14 | * 15 | * All rights reserved. 16 | * 17 | * Redistribution and use in source and binary forms, with or without 18 | * modification, are permitted provided that the following conditions 19 | * are met: 20 | * 21 | * o Redistributions of source code must retain the above copyright notice, 22 | * this list of conditions and the following disclaimers. 23 | * 24 | * o Redistributions in binary form must reproduce the above copyright 25 | * notice, this list of conditions and the following disclaimer in the 26 | * documentation and/or other materials provided with the distribution. 27 | * 28 | * o Neither the name of the University of Houston System, 29 | * UT-Battelle, LLC. nor the names of its contributors may be used to 30 | * endorse or promote products derived from this software without specific 31 | * prior written permission. 32 | * 33 | * o Neither the name of Los Alamos National Security, LLC, Los Alamos 34 | * National Laboratory, LANL, the U.S. Government, nor the names of its 35 | * contributors may be used to endorse or promote products derived from 36 | * this software without specific prior written permission. 37 | * 38 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 39 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 40 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 41 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 42 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 43 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 44 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 45 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 46 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 47 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 48 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 49 | * 50 | */ 51 | #ifndef _BARRIER_ALL_IMPL_H 52 | #define _BARRIER_ALL_IMPL_H 1 53 | 54 | extern void shmemi_barrier_all_linear (); 55 | 56 | #endif 57 | -------------------------------------------------------------------------------- /src/barrier-all/barrier-all-linear.c: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2016 4 | * Stony Brook University 5 | * Copyright (c) 2015 - 2016 6 | * Los Alamos National Security, LLC. 7 | * Copyright (c) 2011 - 2016 8 | * University of Houston System and UT-Battelle, LLC. 9 | * Copyright (c) 2009 - 2016 10 | * Silicon Graphics International Corp. SHMEM is copyrighted 11 | * by Silicon Graphics International Corp. (SGI) The OpenSHMEM API 12 | * (shmem) is released by Open Source Software Solutions, Inc., under an 13 | * agreement with Silicon Graphics International Corp. (SGI). 14 | * 15 | * All rights reserved. 16 | * 17 | * Redistribution and use in source and binary forms, with or without 18 | * modification, are permitted provided that the following conditions 19 | * are met: 20 | * 21 | * o Redistributions of source code must retain the above copyright notice, 22 | * this list of conditions and the following disclaimers. 23 | * 24 | * o Redistributions in binary form must reproduce the above copyright 25 | * notice, this list of conditions and the following disclaimer in the 26 | * documentation and/or other materials provided with the distribution. 27 | * 28 | * o Neither the name of the University of Houston System, 29 | * UT-Battelle, LLC. nor the names of its contributors may be used to 30 | * endorse or promote products derived from this software without specific 31 | * prior written permission. 32 | * 33 | * o Neither the name of Los Alamos National Security, LLC, Los Alamos 34 | * National Laboratory, LANL, the U.S. Government, nor the names of its 35 | * contributors may be used to endorse or promote products derived from 36 | * this software without specific prior written permission. 37 | * 38 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 39 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 40 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 41 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 42 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 43 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 44 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 45 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 46 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 47 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 48 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 49 | * 50 | */ 51 | 52 | 53 | #include "comms.h" 54 | 55 | void 56 | shmemi_barrier_all_linear (void) 57 | { 58 | shmemi_comms_barrier_all (); 59 | } 60 | -------------------------------------------------------------------------------- /src/barrier-all/barrier-all.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2016 4 | * Stony Brook University 5 | * Copyright (c) 2015 - 2016 6 | * Los Alamos National Security, LLC. 7 | * Copyright (c) 2011 - 2016 8 | * University of Houston System and UT-Battelle, LLC. 9 | * Copyright (c) 2009 - 2016 10 | * Silicon Graphics International Corp. SHMEM is copyrighted 11 | * by Silicon Graphics International Corp. (SGI) The OpenSHMEM API 12 | * (shmem) is released by Open Source Software Solutions, Inc., under an 13 | * agreement with Silicon Graphics International Corp. (SGI). 14 | * 15 | * All rights reserved. 16 | * 17 | * Redistribution and use in source and binary forms, with or without 18 | * modification, are permitted provided that the following conditions 19 | * are met: 20 | * 21 | * o Redistributions of source code must retain the above copyright notice, 22 | * this list of conditions and the following disclaimers. 23 | * 24 | * o Redistributions in binary form must reproduce the above copyright 25 | * notice, this list of conditions and the following disclaimer in the 26 | * documentation and/or other materials provided with the distribution. 27 | * 28 | * o Neither the name of the University of Houston System, 29 | * UT-Battelle, LLC. nor the names of its contributors may be used to 30 | * endorse or promote products derived from this software without specific 31 | * prior written permission. 32 | * 33 | * o Neither the name of Los Alamos National Security, LLC, Los Alamos 34 | * National Laboratory, LANL, the U.S. Government, nor the names of its 35 | * contributors may be used to endorse or promote products derived from 36 | * this software without specific prior written permission. 37 | * 38 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 39 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 40 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 41 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 42 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 43 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 44 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 45 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 46 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 47 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 48 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 49 | * 50 | */ 51 | 52 | 53 | #ifndef _BARRIER_ALL_H 54 | #define _BARRIER_ALL_H 1 55 | 56 | extern void shmemi_barrier_all_dispatch_init (void); 57 | 58 | #endif /* _BARRIER_ALL_H */ 59 | -------------------------------------------------------------------------------- /src/barrier/barrier-impl.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2016 4 | * Stony Brook University 5 | * Copyright (c) 2015 - 2016 6 | * Los Alamos National Security, LLC. 7 | * Copyright (c) 2011 - 2016 8 | * University of Houston System and UT-Battelle, LLC. 9 | * Copyright (c) 2009 - 2016 10 | * Silicon Graphics International Corp. SHMEM is copyrighted 11 | * by Silicon Graphics International Corp. (SGI) The OpenSHMEM API 12 | * (shmem) is released by Open Source Software Solutions, Inc., under an 13 | * agreement with Silicon Graphics International Corp. (SGI). 14 | * 15 | * All rights reserved. 16 | * 17 | * Redistribution and use in source and binary forms, with or without 18 | * modification, are permitted provided that the following conditions 19 | * are met: 20 | * 21 | * o Redistributions of source code must retain the above copyright notice, 22 | * this list of conditions and the following disclaimers. 23 | * 24 | * o Redistributions in binary form must reproduce the above copyright 25 | * notice, this list of conditions and the following disclaimer in the 26 | * documentation and/or other materials provided with the distribution. 27 | * 28 | * o Neither the name of the University of Houston System, 29 | * UT-Battelle, LLC. nor the names of its contributors may be used to 30 | * endorse or promote products derived from this software without specific 31 | * prior written permission. 32 | * 33 | * o Neither the name of Los Alamos National Security, LLC, Los Alamos 34 | * National Laboratory, LANL, the U.S. Government, nor the names of its 35 | * contributors may be used to endorse or promote products derived from 36 | * this software without specific prior written permission. 37 | * 38 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 39 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 40 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 41 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 42 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 43 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 44 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 45 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 46 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 47 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 48 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 49 | * 50 | */ 51 | #ifndef _BARRIER_IMPL_H 52 | #define _BARRIER_IMPL_H 1 53 | 54 | extern void shmemi_barrier_linear (); 55 | extern void shmemi_barrier_tree (); 56 | 57 | #endif 58 | -------------------------------------------------------------------------------- /src/barrier/barrier-linear.c: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2016 4 | * Stony Brook University 5 | * Copyright (c) 2015 - 2016 6 | * Los Alamos National Security, LLC. 7 | * Copyright (c) 2011 - 2016 8 | * University of Houston System and UT-Battelle, LLC. 9 | * Copyright (c) 2009 - 2016 10 | * Silicon Graphics International Corp. SHMEM is copyrighted 11 | * by Silicon Graphics International Corp. (SGI) The OpenSHMEM API 12 | * (shmem) is released by Open Source Software Solutions, Inc., under an 13 | * agreement with Silicon Graphics International Corp. (SGI). 14 | * 15 | * All rights reserved. 16 | * 17 | * Redistribution and use in source and binary forms, with or without 18 | * modification, are permitted provided that the following conditions 19 | * are met: 20 | * 21 | * o Redistributions of source code must retain the above copyright notice, 22 | * this list of conditions and the following disclaimers. 23 | * 24 | * o Redistributions in binary form must reproduce the above copyright 25 | * notice, this list of conditions and the following disclaimer in the 26 | * documentation and/or other materials provided with the distribution. 27 | * 28 | * o Neither the name of the University of Houston System, 29 | * UT-Battelle, LLC. nor the names of its contributors may be used to 30 | * endorse or promote products derived from this software without specific 31 | * prior written permission. 32 | * 33 | * o Neither the name of Los Alamos National Security, LLC, Los Alamos 34 | * National Laboratory, LANL, the U.S. Government, nor the names of its 35 | * contributors may be used to endorse or promote products derived from 36 | * this software without specific prior written permission. 37 | * 38 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 39 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 40 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 41 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 42 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 43 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 44 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 45 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 46 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 47 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 48 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 49 | * 50 | */ 51 | 52 | 53 | #include "comms.h" 54 | #include "trace.h" 55 | #include "atomic.h" 56 | 57 | #include "shmem.h" 58 | 59 | void 60 | shmemi_barrier_linear (int PE_start, int logPE_stride, int PE_size, long *pSync) 61 | { 62 | const int me = shmem_my_pe (); 63 | const int step = 1 << logPE_stride; 64 | const long nreplies = SHMEM_SYNC_VALUE + PE_size - 1; 65 | int i, round; 66 | int thatpe; 67 | 68 | for (round = 0; round < 2; round += 1) { 69 | 70 | for (thatpe = PE_start, i = 0; i < PE_size; thatpe += step, i += 1) { 71 | 72 | if (thatpe != me) { 73 | shmem_long_inc (&pSync[round], thatpe); 74 | 75 | shmemi_trace (SHMEM_LOG_BARRIER, 76 | "round = %d, sent increment to PE %d", 77 | round, thatpe); 78 | } 79 | 80 | } 81 | shmem_long_wait_until (&pSync[round], SHMEM_CMP_EQ, nreplies); 82 | 83 | pSync[round] = SHMEM_SYNC_VALUE; 84 | 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /src/barrier/barrier.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2016 4 | * Stony Brook University 5 | * Copyright (c) 2015 - 2016 6 | * Los Alamos National Security, LLC. 7 | * Copyright (c) 2011 - 2016 8 | * University of Houston System and UT-Battelle, LLC. 9 | * Copyright (c) 2009 - 2016 10 | * Silicon Graphics International Corp. SHMEM is copyrighted 11 | * by Silicon Graphics International Corp. (SGI) The OpenSHMEM API 12 | * (shmem) is released by Open Source Software Solutions, Inc., under an 13 | * agreement with Silicon Graphics International Corp. (SGI). 14 | * 15 | * All rights reserved. 16 | * 17 | * Redistribution and use in source and binary forms, with or without 18 | * modification, are permitted provided that the following conditions 19 | * are met: 20 | * 21 | * o Redistributions of source code must retain the above copyright notice, 22 | * this list of conditions and the following disclaimers. 23 | * 24 | * o Redistributions in binary form must reproduce the above copyright 25 | * notice, this list of conditions and the following disclaimer in the 26 | * documentation and/or other materials provided with the distribution. 27 | * 28 | * o Neither the name of the University of Houston System, 29 | * UT-Battelle, LLC. nor the names of its contributors may be used to 30 | * endorse or promote products derived from this software without specific 31 | * prior written permission. 32 | * 33 | * o Neither the name of Los Alamos National Security, LLC, Los Alamos 34 | * National Laboratory, LANL, the U.S. Government, nor the names of its 35 | * contributors may be used to endorse or promote products derived from 36 | * this software without specific prior written permission. 37 | * 38 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 39 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 40 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 41 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 42 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 43 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 44 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 45 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 46 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 47 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 48 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 49 | * 50 | */ 51 | 52 | 53 | #ifndef _BARRIER_H 54 | #define _BARRIER_H 1 55 | 56 | extern void shmemi_barrier_dispatch_init (void); 57 | 58 | #endif /* _BARRIER_H */ 59 | -------------------------------------------------------------------------------- /src/broadcast/broadcast-impl.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2016 4 | * Stony Brook University 5 | * Copyright (c) 2015 - 2016 6 | * Los Alamos National Security, LLC. 7 | * Copyright (c) 2011 - 2016 8 | * University of Houston System and UT-Battelle, LLC. 9 | * Copyright (c) 2009 - 2016 10 | * Silicon Graphics International Corp. SHMEM is copyrighted 11 | * by Silicon Graphics International Corp. (SGI) The OpenSHMEM API 12 | * (shmem) is released by Open Source Software Solutions, Inc., under an 13 | * agreement with Silicon Graphics International Corp. (SGI). 14 | * 15 | * All rights reserved. 16 | * 17 | * Redistribution and use in source and binary forms, with or without 18 | * modification, are permitted provided that the following conditions 19 | * are met: 20 | * 21 | * o Redistributions of source code must retain the above copyright notice, 22 | * this list of conditions and the following disclaimers. 23 | * 24 | * o Redistributions in binary form must reproduce the above copyright 25 | * notice, this list of conditions and the following disclaimer in the 26 | * documentation and/or other materials provided with the distribution. 27 | * 28 | * o Neither the name of the University of Houston System, 29 | * UT-Battelle, LLC. nor the names of its contributors may be used to 30 | * endorse or promote products derived from this software without specific 31 | * prior written permission. 32 | * 33 | * o Neither the name of Los Alamos National Security, LLC, Los Alamos 34 | * National Laboratory, LANL, the U.S. Government, nor the names of its 35 | * contributors may be used to endorse or promote products derived from 36 | * this software without specific prior written permission. 37 | * 38 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 39 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 40 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 41 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 42 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 43 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 44 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 45 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 46 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 47 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 48 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 49 | * 50 | */ 51 | #ifndef _BROADCAST_IMPL_H 52 | #define _BROADCAST_IMPL_H 1 53 | 54 | extern void shmemi_broadcast32_linear (); 55 | extern void shmemi_broadcast64_linear (); 56 | 57 | extern void shmemi_broadcast32_tree (); 58 | extern void shmemi_broadcast64_tree (); 59 | 60 | #endif 61 | -------------------------------------------------------------------------------- /src/broadcast/broadcast.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2016 4 | * Stony Brook University 5 | * Copyright (c) 2015 - 2016 6 | * Los Alamos National Security, LLC. 7 | * Copyright (c) 2011 - 2016 8 | * University of Houston System and UT-Battelle, LLC. 9 | * Copyright (c) 2009 - 2016 10 | * Silicon Graphics International Corp. SHMEM is copyrighted 11 | * by Silicon Graphics International Corp. (SGI) The OpenSHMEM API 12 | * (shmem) is released by Open Source Software Solutions, Inc., under an 13 | * agreement with Silicon Graphics International Corp. (SGI). 14 | * 15 | * All rights reserved. 16 | * 17 | * Redistribution and use in source and binary forms, with or without 18 | * modification, are permitted provided that the following conditions 19 | * are met: 20 | * 21 | * o Redistributions of source code must retain the above copyright notice, 22 | * this list of conditions and the following disclaimers. 23 | * 24 | * o Redistributions in binary form must reproduce the above copyright 25 | * notice, this list of conditions and the following disclaimer in the 26 | * documentation and/or other materials provided with the distribution. 27 | * 28 | * o Neither the name of the University of Houston System, 29 | * UT-Battelle, LLC. nor the names of its contributors may be used to 30 | * endorse or promote products derived from this software without specific 31 | * prior written permission. 32 | * 33 | * o Neither the name of Los Alamos National Security, LLC, Los Alamos 34 | * National Laboratory, LANL, the U.S. Government, nor the names of its 35 | * contributors may be used to endorse or promote products derived from 36 | * this software without specific prior written permission. 37 | * 38 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 39 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 40 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 41 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 42 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 43 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 44 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 45 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 46 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 47 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 48 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 49 | * 50 | */ 51 | 52 | 53 | #ifndef _BROADCAST_H 54 | #define _BROADCAST_H 1 55 | 56 | extern void shmemi_broadcast_dispatch_init (void); 57 | 58 | #endif /* _BROADCAST_H */ 59 | -------------------------------------------------------------------------------- /src/collect/collect-impl.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2016 4 | * Stony Brook University 5 | * Copyright (c) 2015 - 2016 6 | * Los Alamos National Security, LLC. 7 | * Copyright (c) 2011 - 2016 8 | * University of Houston System and UT-Battelle, LLC. 9 | * Copyright (c) 2009 - 2016 10 | * Silicon Graphics International Corp. SHMEM is copyrighted 11 | * by Silicon Graphics International Corp. (SGI) The OpenSHMEM API 12 | * (shmem) is released by Open Source Software Solutions, Inc., under an 13 | * agreement with Silicon Graphics International Corp. (SGI). 14 | * 15 | * All rights reserved. 16 | * 17 | * Redistribution and use in source and binary forms, with or without 18 | * modification, are permitted provided that the following conditions 19 | * are met: 20 | * 21 | * o Redistributions of source code must retain the above copyright notice, 22 | * this list of conditions and the following disclaimers. 23 | * 24 | * o Redistributions in binary form must reproduce the above copyright 25 | * notice, this list of conditions and the following disclaimer in the 26 | * documentation and/or other materials provided with the distribution. 27 | * 28 | * o Neither the name of the University of Houston System, 29 | * UT-Battelle, LLC. nor the names of its contributors may be used to 30 | * endorse or promote products derived from this software without specific 31 | * prior written permission. 32 | * 33 | * o Neither the name of Los Alamos National Security, LLC, Los Alamos 34 | * National Laboratory, LANL, the U.S. Government, nor the names of its 35 | * contributors may be used to endorse or promote products derived from 36 | * this software without specific prior written permission. 37 | * 38 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 39 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 40 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 41 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 42 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 43 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 44 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 45 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 46 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 47 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 48 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 49 | * 50 | */ 51 | #ifndef _COLLECT_IMPL_H 52 | #define _COLLECT_IMPL_H 1 53 | 54 | extern void shmemi_collect32_linear (); 55 | extern void shmemi_collect64_linear (); 56 | 57 | #endif 58 | -------------------------------------------------------------------------------- /src/collect/collect.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2016 4 | * Stony Brook University 5 | * Copyright (c) 2015 - 2016 6 | * Los Alamos National Security, LLC. 7 | * Copyright (c) 2011 - 2016 8 | * University of Houston System and UT-Battelle, LLC. 9 | * Copyright (c) 2009 - 2016 10 | * Silicon Graphics International Corp. SHMEM is copyrighted 11 | * by Silicon Graphics International Corp. (SGI) The OpenSHMEM API 12 | * (shmem) is released by Open Source Software Solutions, Inc., under an 13 | * agreement with Silicon Graphics International Corp. (SGI). 14 | * 15 | * All rights reserved. 16 | * 17 | * Redistribution and use in source and binary forms, with or without 18 | * modification, are permitted provided that the following conditions 19 | * are met: 20 | * 21 | * o Redistributions of source code must retain the above copyright notice, 22 | * this list of conditions and the following disclaimers. 23 | * 24 | * o Redistributions in binary form must reproduce the above copyright 25 | * notice, this list of conditions and the following disclaimer in the 26 | * documentation and/or other materials provided with the distribution. 27 | * 28 | * o Neither the name of the University of Houston System, 29 | * UT-Battelle, LLC. nor the names of its contributors may be used to 30 | * endorse or promote products derived from this software without specific 31 | * prior written permission. 32 | * 33 | * o Neither the name of Los Alamos National Security, LLC, Los Alamos 34 | * National Laboratory, LANL, the U.S. Government, nor the names of its 35 | * contributors may be used to endorse or promote products derived from 36 | * this software without specific prior written permission. 37 | * 38 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 39 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 40 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 41 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 42 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 43 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 44 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 45 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 46 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 47 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 48 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 49 | * 50 | */ 51 | 52 | 53 | #ifndef _COLLECT_H 54 | #define _COLLECT_H 1 55 | 56 | extern void shmemi_collect_dispatch_init (void); 57 | 58 | #endif /* _COLLECT_H */ 59 | -------------------------------------------------------------------------------- /src/comms/Makefile.in: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016 3 | # Stony Brook University 4 | # Copyright (c) 2015 - 2016 5 | # Los Alamos National Security, LLC. 6 | # Copyright (c) 2011 - 2016 7 | # University of Houston System and UT-Battelle, LLC. 8 | # Copyright (c) 2009 - 2016 9 | # Silicon Graphics International Corp. SHMEM is copyrighted 10 | # by Silicon Graphics International Corp. (SGI) The OpenSHMEM API 11 | # (shmem) is released by Open Source Software Solutions, Inc., under an 12 | # agreement with Silicon Graphics International Corp. (SGI). 13 | # 14 | # All rights reserved. 15 | # 16 | # Redistribution and use in source and binary forms, with or without 17 | # modification, are permitted provided that the following conditions 18 | # are met: 19 | # 20 | # o Redistributions of source code must retain the above copyright notice, 21 | # this list of conditions and the following disclaimers. 22 | # 23 | # o Redistributions in binary form must reproduce the above copyright 24 | # notice, this list of conditions and the following disclaimer in the 25 | # documentation and/or other materials provided with the distribution. 26 | # 27 | # o Neither the name of the University of Houston System, 28 | # UT-Battelle, LLC. nor the names of its contributors may be used to 29 | # endorse or promote products derived from this software without specific 30 | # prior written permission. 31 | # 32 | # o Neither the name of Los Alamos National Security, LLC, Los Alamos 33 | # National Laboratory, LANL, the U.S. Government, nor the names of its 34 | # contributors may be used to endorse or promote products derived from 35 | # this software without specific prior written permission. 36 | # 37 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 38 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 39 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 40 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 41 | # HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 42 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 43 | # TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 44 | # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 45 | # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 46 | # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 47 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 48 | # 49 | 50 | 51 | COMMS_LAYER = @COMMS_LAYER@ 52 | 53 | .PHONY: all default 54 | 55 | # -- start GASNet ------------------------------------------ 56 | 57 | all default: 58 | $(MAKE) -C $(COMMS_LAYER) 59 | -------------------------------------------------------------------------------- /src/comms/comms.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2016 4 | * Stony Brook University 5 | * Copyright (c) 2015 - 2016 6 | * Los Alamos National Security, LLC. 7 | * Copyright (c) 2011 - 2016 8 | * University of Houston System and UT-Battelle, LLC. 9 | * Copyright (c) 2009 - 2016 10 | * Silicon Graphics International Corp. SHMEM is copyrighted 11 | * by Silicon Graphics International Corp. (SGI) The OpenSHMEM API 12 | * (shmem) is released by Open Source Software Solutions, Inc., under an 13 | * agreement with Silicon Graphics International Corp. (SGI). 14 | * 15 | * All rights reserved. 16 | * 17 | * Redistribution and use in source and binary forms, with or without 18 | * modification, are permitted provided that the following conditions 19 | * are met: 20 | * 21 | * o Redistributions of source code must retain the above copyright notice, 22 | * this list of conditions and the following disclaimers. 23 | * 24 | * o Redistributions in binary form must reproduce the above copyright 25 | * notice, this list of conditions and the following disclaimer in the 26 | * documentation and/or other materials provided with the distribution. 27 | * 28 | * o Neither the name of the University of Houston System, 29 | * UT-Battelle, LLC. nor the names of its contributors may be used to 30 | * endorse or promote products derived from this software without specific 31 | * prior written permission. 32 | * 33 | * o Neither the name of Los Alamos National Security, LLC, Los Alamos 34 | * National Laboratory, LANL, the U.S. Government, nor the names of its 35 | * contributors may be used to endorse or promote products derived from 36 | * this software without specific prior written permission. 37 | * 38 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 39 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 40 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 41 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 42 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 43 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 44 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 45 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 46 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 47 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 48 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 49 | * 50 | */ 51 | 52 | 53 | #ifndef _COMMS_H 54 | #define _COMMS_H 1 55 | 56 | #include "comms-inline.h" 57 | 58 | #endif /* _COMMS_H */ 59 | -------------------------------------------------------------------------------- /src/comms/gasnet/openshmem-template.pc.in: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016 3 | # Stony Brook University 4 | # Copyright (c) 2015 - 2016 5 | # Los Alamos National Security, LLC. 6 | # Copyright (c) 2011 - 2016 7 | # University of Houston System and UT-Battelle, LLC. 8 | # Copyright (c) 2009 - 2016 9 | # Silicon Graphics International Corp. SHMEM is copyrighted 10 | # by Silicon Graphics International Corp. (SGI) The OpenSHMEM API 11 | # (shmem) is released by Open Source Software Solutions, Inc., under an 12 | # agreement with Silicon Graphics International Corp. (SGI). 13 | # 14 | # All rights reserved. 15 | # 16 | # Redistribution and use in source and binary forms, with or without 17 | # modification, are permitted provided that the following conditions 18 | # are met: 19 | # 20 | # o Redistributions of source code must retain the above copyright notice, 21 | # this list of conditions and the following disclaimers. 22 | # 23 | # o Redistributions in binary form must reproduce the above copyright 24 | # notice, this list of conditions and the following disclaimer in the 25 | # documentation and/or other materials provided with the distribution. 26 | # 27 | # o Neither the name of the University of Houston System, 28 | # UT-Battelle, LLC. nor the names of its contributors may be used to 29 | # endorse or promote products derived from this software without specific 30 | # prior written permission. 31 | # 32 | # o Neither the name of Los Alamos National Security, LLC, Los Alamos 33 | # National Laboratory, LANL, the U.S. Government, nor the names of its 34 | # contributors may be used to endorse or promote products derived from 35 | # this software without specific prior written permission. 36 | # 37 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 38 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 39 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 40 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 41 | # HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 42 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 43 | # TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 44 | # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 45 | # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 46 | # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 47 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 48 | # 49 | 50 | Name: OpenSHMEM 51 | Description: Portable OpenSHMEM Reference Library 52 | Version: 1.0 53 | URL: http://www.openshmem.org/ 54 | # 55 | prefix=@PREFIX@ 56 | exec_prefix=${prefix} 57 | includedir=@INC_DIR@ 58 | libdir=@LIB_DIR@ 59 | # 60 | Libs: @SHMEM_LDFLAGS@ @SHMEM_LIBS@ @GASNET_LIBS@ 61 | Cflags: -I@INC_DIR@ 62 | # 63 | Provides: openshmem 64 | -------------------------------------------------------------------------------- /src/comms/gasnet/oshcc.in: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Copyright (c) 2014 Intel Corporation. All rights reserved. 4 | # 5 | # generated from OpenSHMEM src directory, don't edit installed version 6 | # 7 | 8 | progname="`basename $0`" 9 | 10 | show_usage_and_exit() 11 | { 12 | echo "Usage: $progname [flags] source | objects ..." 13 | exit 1 14 | } 15 | 16 | if [ $# -eq 0 ] 17 | then 18 | show_usage_and_exit 19 | fi 20 | 21 | SHMEM_LDFLAGS='@SHMEM_LDFLAGS@' 22 | 23 | SHMEM_LIBS='@SHMEM_LIBS@' 24 | 25 | SHMEM_INC_DIR='@SHMEM_INC_DIR@' 26 | 27 | # shouldn't really be needed 28 | # GASNET_CPPFLAGS='@GASNET_CPPFLAGS@' 29 | # GASNET_CFLAGS='@GASNET_CFLAGS@' 30 | 31 | GASNET_LDFLAGS='@GASNET_LDFLAGS@' 32 | 33 | GASNET_LIBS='@GASNET_LIBS@' 34 | 35 | # check to see if linking required: if not, throw away link args 36 | for c in $@ 37 | do 38 | case $c in 39 | -[cE]) 40 | SHMEM_LDFLAGS='' 41 | SHMEM_LIBS='' 42 | GASNET_LDFLAGS='' 43 | GASNET_LIBS='' 44 | ;; 45 | *) 46 | ;; 47 | esac 48 | done 49 | 50 | driver="@DRIVER@" 51 | 52 | # 53 | # see if user wants to override from environment 54 | # 55 | case "$progname" in 56 | oshcc) 57 | driver="${OSH_CC-$driver}" 58 | ;; 59 | oshcxx | oshc++) 60 | driver="${OSH_CXX-$driver}" 61 | ;; 62 | oshfort) 63 | driver="${OSH_FC-$driver}" 64 | ;; 65 | *) 66 | # unknown driver program name 67 | ;; 68 | esac 69 | 70 | $driver -I$SHMEM_INC_DIR $SHMEM_LDFLAGS $GASNET_LDFLAGS "$@" $SHMEM_LIBS $GASNET_LIBS 71 | -------------------------------------------------------------------------------- /src/comms/gasnet/oshrun.in: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Copyright (c) 2014 Intel Corporation. All rights reserved. 4 | # 5 | # generated from OpenSHMEM src directory, don't edit installed version 6 | # 7 | 8 | progname="`basename $0`" 9 | 10 | show_usage_and_exit() 11 | { 12 | if [ $# -gt 0 ] 13 | then 14 | echo "Error: $@" 15 | echo "" 16 | fi 17 | cat < 12 | 13 | #define ONLY_MSPACES 1 14 | #define HAVE_MORECORE 0 15 | #define HAVE_MMAP 0 16 | #define USE_LOCKS 1 17 | 18 | typedef void *mspace; 19 | 20 | extern mspace create_mspace_with_base(void* base, size_t capacity, int locked); 21 | 22 | extern size_t destroy_mspace(mspace msp); 23 | 24 | extern void* mspace_malloc(mspace msp, size_t bytes); 25 | 26 | extern void* mspace_realloc(mspace msp, void* mem, size_t newsize); 27 | 28 | extern void* mspace_memalign(mspace msp, size_t alignment, size_t bytes); 29 | 30 | extern void mspace_free(mspace msp, void *mem); 31 | 32 | extern size_t mspace_footprint(mspace msp); 33 | 34 | #endif /* _DLMALLOC_H */ 35 | -------------------------------------------------------------------------------- /src/fcollect/fcollect-impl.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2016 4 | * Stony Brook University 5 | * Copyright (c) 2015 - 2016 6 | * Los Alamos National Security, LLC. 7 | * Copyright (c) 2011 - 2016 8 | * University of Houston System and UT-Battelle, LLC. 9 | * Copyright (c) 2009 - 2016 10 | * Silicon Graphics International Corp. SHMEM is copyrighted 11 | * by Silicon Graphics International Corp. (SGI) The OpenSHMEM API 12 | * (shmem) is released by Open Source Software Solutions, Inc., under an 13 | * agreement with Silicon Graphics International Corp. (SGI). 14 | * 15 | * All rights reserved. 16 | * 17 | * Redistribution and use in source and binary forms, with or without 18 | * modification, are permitted provided that the following conditions 19 | * are met: 20 | * 21 | * o Redistributions of source code must retain the above copyright notice, 22 | * this list of conditions and the following disclaimers. 23 | * 24 | * o Redistributions in binary form must reproduce the above copyright 25 | * notice, this list of conditions and the following disclaimer in the 26 | * documentation and/or other materials provided with the distribution. 27 | * 28 | * o Neither the name of the University of Houston System, 29 | * UT-Battelle, LLC. nor the names of its contributors may be used to 30 | * endorse or promote products derived from this software without specific 31 | * prior written permission. 32 | * 33 | * o Neither the name of Los Alamos National Security, LLC, Los Alamos 34 | * National Laboratory, LANL, the U.S. Government, nor the names of its 35 | * contributors may be used to endorse or promote products derived from 36 | * this software without specific prior written permission. 37 | * 38 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 39 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 40 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 41 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 42 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 43 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 44 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 45 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 46 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 47 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 48 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 49 | * 50 | */ 51 | #ifndef _FCOLLECT_IMPL_H 52 | #define _FCOLLECT_IMPL_H 1 53 | 54 | extern void shmemi_fcollect32_linear (); 55 | extern void shmemi_fcollect64_linear (); 56 | 57 | #endif 58 | -------------------------------------------------------------------------------- /src/fcollect/fcollect.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2016 4 | * Stony Brook University 5 | * Copyright (c) 2015 - 2016 6 | * Los Alamos National Security, LLC. 7 | * Copyright (c) 2011 - 2016 8 | * University of Houston System and UT-Battelle, LLC. 9 | * Copyright (c) 2009 - 2016 10 | * Silicon Graphics International Corp. SHMEM is copyrighted 11 | * by Silicon Graphics International Corp. (SGI) The OpenSHMEM API 12 | * (shmem) is released by Open Source Software Solutions, Inc., under an 13 | * agreement with Silicon Graphics International Corp. (SGI). 14 | * 15 | * All rights reserved. 16 | * 17 | * Redistribution and use in source and binary forms, with or without 18 | * modification, are permitted provided that the following conditions 19 | * are met: 20 | * 21 | * o Redistributions of source code must retain the above copyright notice, 22 | * this list of conditions and the following disclaimers. 23 | * 24 | * o Redistributions in binary form must reproduce the above copyright 25 | * notice, this list of conditions and the following disclaimer in the 26 | * documentation and/or other materials provided with the distribution. 27 | * 28 | * o Neither the name of the University of Houston System, 29 | * UT-Battelle, LLC. nor the names of its contributors may be used to 30 | * endorse or promote products derived from this software without specific 31 | * prior written permission. 32 | * 33 | * o Neither the name of Los Alamos National Security, LLC, Los Alamos 34 | * National Laboratory, LANL, the U.S. Government, nor the names of its 35 | * contributors may be used to endorse or promote products derived from 36 | * this software without specific prior written permission. 37 | * 38 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 39 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 40 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 41 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 42 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 43 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 44 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 45 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 46 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 47 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 48 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 49 | * 50 | */ 51 | 52 | 53 | #ifndef _FCOLLECT_H 54 | #define _FCOLLECT_H 1 55 | 56 | extern void shmemi_fcollect_dispatch_init (void); 57 | 58 | #endif /* _FCOLLECT_H */ 59 | -------------------------------------------------------------------------------- /src/fence/fence.c: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2016 4 | * Stony Brook University 5 | * Copyright (c) 2015 - 2016 6 | * Los Alamos National Security, LLC. 7 | * Copyright (c) 2011 - 2016 8 | * University of Houston System and UT-Battelle, LLC. 9 | * Copyright (c) 2009 - 2016 10 | * Silicon Graphics International Corp. SHMEM is copyrighted 11 | * by Silicon Graphics International Corp. (SGI) The OpenSHMEM API 12 | * (shmem) is released by Open Source Software Solutions, Inc., under an 13 | * agreement with Silicon Graphics International Corp. (SGI). 14 | * 15 | * All rights reserved. 16 | * 17 | * Redistribution and use in source and binary forms, with or without 18 | * modification, are permitted provided that the following conditions 19 | * are met: 20 | * 21 | * o Redistributions of source code must retain the above copyright notice, 22 | * this list of conditions and the following disclaimers. 23 | * 24 | * o Redistributions in binary form must reproduce the above copyright 25 | * notice, this list of conditions and the following disclaimer in the 26 | * documentation and/or other materials provided with the distribution. 27 | * 28 | * o Neither the name of the University of Houston System, 29 | * UT-Battelle, LLC. nor the names of its contributors may be used to 30 | * endorse or promote products derived from this software without specific 31 | * prior written permission. 32 | * 33 | * o Neither the name of Los Alamos National Security, LLC, Los Alamos 34 | * National Laboratory, LANL, the U.S. Government, nor the names of its 35 | * contributors may be used to endorse or promote products derived from 36 | * this software without specific prior written permission. 37 | * 38 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 39 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 40 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 41 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 42 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 43 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 44 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 45 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 46 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 47 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 48 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 49 | * 50 | */ 51 | 52 | 53 | #include "utils.h" 54 | 55 | #include "comms/comms.h" 56 | 57 | #ifdef HAVE_FEATURE_PSHMEM 58 | #include "pshmem.h" 59 | #endif /* HAVE_FEATURE_PSHMEM */ 60 | 61 | 62 | #ifdef HAVE_FEATURE_PSHMEM 63 | #pragma weak shmem_fence = pshmem_fence 64 | #define shmem_fence pshmem_fence 65 | #endif /* HAVE_FEATURE_PSHMEM */ 66 | 67 | /** 68 | * fence orders puts to a particular PE 69 | */ 70 | 71 | void 72 | shmem_fence (void) 73 | { 74 | DEBUG_NAME ("shmem_fence"); 75 | INIT_CHECK (debug_name); 76 | shmemi_comms_fence_request (); 77 | } 78 | 79 | #if defined(HAVE_FEATURE_EXPERIMENTAL) 80 | 81 | #ifdef HAVE_FEATURE_PSHMEM 82 | #pragma weak shmemx_fence_test = pshmemx_fence_test 83 | #define shmemx_fence_test pshmemx_fence_test 84 | #endif /* HAVE_FEATURE_PSHMEM */ 85 | 86 | /* TODO: leaved essentially unimplemented for now */ 87 | 88 | int 89 | shmemx_fence_test (void) 90 | { 91 | return shmemi_fence_test (); 92 | } 93 | 94 | #endif /* HAVE_FEATURE_EXPERIMENTAL */ 95 | -------------------------------------------------------------------------------- /src/fence/quiet.c: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2016 4 | * Stony Brook University 5 | * Copyright (c) 2015 - 2016 6 | * Los Alamos National Security, LLC. 7 | * Copyright (c) 2011 - 2016 8 | * University of Houston System and UT-Battelle, LLC. 9 | * Copyright (c) 2009 - 2016 10 | * Silicon Graphics International Corp. SHMEM is copyrighted 11 | * by Silicon Graphics International Corp. (SGI) The OpenSHMEM API 12 | * (shmem) is released by Open Source Software Solutions, Inc., under an 13 | * agreement with Silicon Graphics International Corp. (SGI). 14 | * 15 | * All rights reserved. 16 | * 17 | * Redistribution and use in source and binary forms, with or without 18 | * modification, are permitted provided that the following conditions 19 | * are met: 20 | * 21 | * o Redistributions of source code must retain the above copyright notice, 22 | * this list of conditions and the following disclaimers. 23 | * 24 | * o Redistributions in binary form must reproduce the above copyright 25 | * notice, this list of conditions and the following disclaimer in the 26 | * documentation and/or other materials provided with the distribution. 27 | * 28 | * o Neither the name of the University of Houston System, 29 | * UT-Battelle, LLC. nor the names of its contributors may be used to 30 | * endorse or promote products derived from this software without specific 31 | * prior written permission. 32 | * 33 | * o Neither the name of Los Alamos National Security, LLC, Los Alamos 34 | * National Laboratory, LANL, the U.S. Government, nor the names of its 35 | * contributors may be used to endorse or promote products derived from 36 | * this software without specific prior written permission. 37 | * 38 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 39 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 40 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 41 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 42 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 43 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 44 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 45 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 46 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 47 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 48 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 49 | * 50 | */ 51 | 52 | 53 | #include "utils.h" 54 | 55 | #include "comms/comms.h" 56 | 57 | #ifdef HAVE_FEATURE_PSHMEM 58 | #include "pshmem.h" 59 | #endif /* HAVE_FEATURE_PSHMEM */ 60 | 61 | 62 | #ifdef HAVE_FEATURE_PSHMEM 63 | #pragma weak shmem_quiet = pshmem_quiet 64 | #define shmem_quiet pshmem_quiet 65 | #endif /* HAVE_FEATURE_PSHMEM */ 66 | 67 | /** 68 | * quiet orders puts to all PEs 69 | */ 70 | 71 | void 72 | shmem_quiet (void) 73 | { 74 | DEBUG_NAME ("shmem_quiet"); 75 | INIT_CHECK (debug_name); 76 | shmemi_comms_quiet_request (); 77 | } 78 | 79 | #if defined(HAVE_FEATURE_EXPERIMENTAL) 80 | 81 | #ifdef HAVE_FEATURE_PSHMEM 82 | #pragma weak shmemx_quiet_test = pshmemx_quiet_test 83 | #define shmemx_quiet_test pshmemx_quiet_test 84 | #endif /* HAVE_FEATURE_PSHMEM */ 85 | 86 | /* TODO: leaved essentially unimplemented for now */ 87 | 88 | int 89 | shmemx_quiet_test (void) 90 | { 91 | return shmemi_quiet_test (); 92 | } 93 | 94 | #endif /* HAVE_FEATURE_EXPERIMENTAL */ 95 | -------------------------------------------------------------------------------- /src/fortran/fortran-common.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2016 4 | * Stony Brook University 5 | * Copyright (c) 2015 - 2016 6 | * Los Alamos National Security, LLC. 7 | * Copyright (c) 2011 - 2016 8 | * University of Houston System and UT-Battelle, LLC. 9 | * Copyright (c) 2009 - 2016 10 | * Silicon Graphics International Corp. SHMEM is copyrighted 11 | * by Silicon Graphics International Corp. (SGI) The OpenSHMEM API 12 | * (shmem) is released by Open Source Software Solutions, Inc., under an 13 | * agreement with Silicon Graphics International Corp. (SGI). 14 | * 15 | * All rights reserved. 16 | * 17 | * Redistribution and use in source and binary forms, with or without 18 | * modification, are permitted provided that the following conditions 19 | * are met: 20 | * 21 | * o Redistributions of source code must retain the above copyright notice, 22 | * this list of conditions and the following disclaimers. 23 | * 24 | * o Redistributions in binary form must reproduce the above copyright 25 | * notice, this list of conditions and the following disclaimer in the 26 | * documentation and/or other materials provided with the distribution. 27 | * 28 | * o Neither the name of the University of Houston System, 29 | * UT-Battelle, LLC. nor the names of its contributors may be used to 30 | * endorse or promote products derived from this software without specific 31 | * prior written permission. 32 | * 33 | * o Neither the name of Los Alamos National Security, LLC, Los Alamos 34 | * National Laboratory, LANL, the U.S. Government, nor the names of its 35 | * contributors may be used to endorse or promote products derived from 36 | * this software without specific prior written permission. 37 | * 38 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 39 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 40 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 41 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 42 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 43 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 44 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 45 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 46 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 47 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 48 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 49 | * 50 | */ 51 | 52 | 53 | #ifndef FORTRAN_COMMON_H 54 | #define FORTRAN_COMMON_H 1 55 | 56 | #if defined(FORTRAN_SINGLE_UNDERSCORE) 57 | 58 | #define FORTRANIFY(sym) sym##_ 59 | 60 | #elif defined(FORTRAN_DOUBLE_UNDERSCORE) 61 | 62 | #define FORTRANIFY(sym) sym##__ 63 | 64 | #else /* no idea */ 65 | 66 | #define FORTRANIFY(sym) sym 67 | 68 | #endif /* FORTRAN_SINGLE_UNDERSCORE */ 69 | 70 | #define FORTRANIFY_VOID_VOID(F) \ 71 | void FORTRANIFY(F) (void) { F(); } 72 | 73 | #endif /* FORTRAN_COMMON_H */ 74 | -------------------------------------------------------------------------------- /src/globalvar/globalvar.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2016 4 | * Stony Brook University 5 | * Copyright (c) 2015 - 2016 6 | * Los Alamos National Security, LLC. 7 | * Copyright (c) 2011 - 2016 8 | * University of Houston System and UT-Battelle, LLC. 9 | * Copyright (c) 2009 - 2016 10 | * Silicon Graphics International Corp. SHMEM is copyrighted 11 | * by Silicon Graphics International Corp. (SGI) The OpenSHMEM API 12 | * (shmem) is released by Open Source Software Solutions, Inc., under an 13 | * agreement with Silicon Graphics International Corp. (SGI). 14 | * 15 | * All rights reserved. 16 | * 17 | * Redistribution and use in source and binary forms, with or without 18 | * modification, are permitted provided that the following conditions 19 | * are met: 20 | * 21 | * o Redistributions of source code must retain the above copyright notice, 22 | * this list of conditions and the following disclaimers. 23 | * 24 | * o Redistributions in binary form must reproduce the above copyright 25 | * notice, this list of conditions and the following disclaimer in the 26 | * documentation and/or other materials provided with the distribution. 27 | * 28 | * o Neither the name of the University of Houston System, 29 | * UT-Battelle, LLC. nor the names of its contributors may be used to 30 | * endorse or promote products derived from this software without specific 31 | * prior written permission. 32 | * 33 | * o Neither the name of Los Alamos National Security, LLC, Los Alamos 34 | * National Laboratory, LANL, the U.S. Government, nor the names of its 35 | * contributors may be used to endorse or promote products derived from 36 | * this software without specific prior written permission. 37 | * 38 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 39 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 40 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 41 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 42 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 43 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 44 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 45 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 46 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 47 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 48 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 49 | * 50 | */ 51 | 52 | 53 | #ifndef _GLOBALVAR_H 54 | #define _GLOBALVAR_H 1 55 | 56 | /* 57 | * memory classification and accessibility 58 | */ 59 | 60 | extern int shmemi_symmetric_is_globalvar (const void *addr); 61 | 62 | extern void shmemi_symmetric_globalvar_table_init (void); 63 | extern void shmemi_symmetric_globalvar_table_finalize (void); 64 | 65 | #endif /* _GLOBALVAR_H */ 66 | -------------------------------------------------------------------------------- /src/memory/debug_alloc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2016 4 | * Stony Brook University 5 | * Copyright (c) 2015 - 2016 6 | * Los Alamos National Security, LLC. 7 | * Copyright (c) 2011 - 2016 8 | * University of Houston System and UT-Battelle, LLC. 9 | * Copyright (c) 2009 - 2016 10 | * Silicon Graphics International Corp. SHMEM is copyrighted 11 | * by Silicon Graphics International Corp. (SGI) The OpenSHMEM API 12 | * (shmem) is released by Open Source Software Solutions, Inc., under an 13 | * agreement with Silicon Graphics International Corp. (SGI). 14 | * 15 | * All rights reserved. 16 | * 17 | * Redistribution and use in source and binary forms, with or without 18 | * modification, are permitted provided that the following conditions 19 | * are met: 20 | * 21 | * o Redistributions of source code must retain the above copyright notice, 22 | * this list of conditions and the following disclaimers. 23 | * 24 | * o Redistributions in binary form must reproduce the above copyright 25 | * notice, this list of conditions and the following disclaimer in the 26 | * documentation and/or other materials provided with the distribution. 27 | * 28 | * o Neither the name of the University of Houston System, 29 | * UT-Battelle, LLC. nor the names of its contributors may be used to 30 | * endorse or promote products derived from this software without specific 31 | * prior written permission. 32 | * 33 | * o Neither the name of Los Alamos National Security, LLC, Los Alamos 34 | * National Laboratory, LANL, the U.S. Government, nor the names of its 35 | * contributors may be used to endorse or promote products derived from 36 | * this software without specific prior written permission. 37 | * 38 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 39 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 40 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 41 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 42 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 43 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 44 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 45 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 46 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 47 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 48 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 49 | * 50 | */ 51 | 52 | #ifndef DEBUG_ALLOC_H 53 | # define DEBUG_ALLOC_H 1 54 | 55 | # ifdef HAVE_FEATURE_DEBUG 56 | 57 | # include 58 | 59 | # include "uthash.h" 60 | 61 | typedef struct 62 | { 63 | void *addr; /* key: shmalloc'ed address to be recorded */ 64 | size_t size; /* how many bytes */ 65 | UT_hash_handle hh; /* structure is hashable */ 66 | } alloc_table_t; 67 | 68 | 69 | extern void *debug_alloc_find (void *a); 70 | 71 | extern int debug_alloc_check (void *a); 72 | 73 | extern void debug_alloc_add (void *a, size_t s); 74 | 75 | extern void debug_alloc_del (void *a); 76 | 77 | extern void debug_alloc_replace (void *a, size_t s); 78 | 79 | extern void debug_alloc_dump (void); 80 | 81 | #endif /* HAVE_FEATURE_DEBUG */ 82 | 83 | #endif /* DEBUG_ALLOC_H */ 84 | -------------------------------------------------------------------------------- /src/memory/memalloc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2016 4 | * Stony Brook University 5 | * Copyright (c) 2015 - 2016 6 | * Los Alamos National Security, LLC. 7 | * Copyright (c) 2011 - 2016 8 | * University of Houston System and UT-Battelle, LLC. 9 | * Copyright (c) 2009 - 2016 10 | * Silicon Graphics International Corp. SHMEM is copyrighted 11 | * by Silicon Graphics International Corp. (SGI) The OpenSHMEM API 12 | * (shmem) is released by Open Source Software Solutions, Inc., under an 13 | * agreement with Silicon Graphics International Corp. (SGI). 14 | * 15 | * All rights reserved. 16 | * 17 | * Redistribution and use in source and binary forms, with or without 18 | * modification, are permitted provided that the following conditions 19 | * are met: 20 | * 21 | * o Redistributions of source code must retain the above copyright notice, 22 | * this list of conditions and the following disclaimers. 23 | * 24 | * o Redistributions in binary form must reproduce the above copyright 25 | * notice, this list of conditions and the following disclaimer in the 26 | * documentation and/or other materials provided with the distribution. 27 | * 28 | * o Neither the name of the University of Houston System, 29 | * UT-Battelle, LLC. nor the names of its contributors may be used to 30 | * endorse or promote products derived from this software without specific 31 | * prior written permission. 32 | * 33 | * o Neither the name of Los Alamos National Security, LLC, Los Alamos 34 | * National Laboratory, LANL, the U.S. Government, nor the names of its 35 | * contributors may be used to endorse or promote products derived from 36 | * this software without specific prior written permission. 37 | * 38 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 39 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 40 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 41 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 42 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 43 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 44 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 45 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 46 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 47 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 48 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 49 | * 50 | */ 51 | 52 | 53 | #ifndef _MEMALLOC_H 54 | #define _MEMALLOC_H 1 55 | 56 | #include 57 | 58 | extern void shmemi_mem_init (void *base, size_t capacity); 59 | extern void shmemi_mem_finalize (void); 60 | extern void *shmemi_mem_base (void); 61 | extern void *shmemi_mem_alloc (size_t size); 62 | extern void shmemi_mem_free (void *addr); 63 | extern void *shmemi_mem_realloc (void *addr, size_t size); 64 | extern void *shmemi_mem_align (size_t alignment, size_t size); 65 | 66 | #endif /* _MEMALLOC_H */ 67 | -------------------------------------------------------------------------------- /src/memory/symmem.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2016 4 | * Stony Brook University 5 | * Copyright (c) 2015 - 2016 6 | * Los Alamos National Security, LLC. 7 | * Copyright (c) 2011 - 2016 8 | * University of Houston System and UT-Battelle, LLC. 9 | * Copyright (c) 2009 - 2016 10 | * Silicon Graphics International Corp. SHMEM is copyrighted 11 | * by Silicon Graphics International Corp. (SGI) The OpenSHMEM API 12 | * (shmem) is released by Open Source Software Solutions, Inc., under an 13 | * agreement with Silicon Graphics International Corp. (SGI). 14 | * 15 | * All rights reserved. 16 | * 17 | * Redistribution and use in source and binary forms, with or without 18 | * modification, are permitted provided that the following conditions 19 | * are met: 20 | * 21 | * o Redistributions of source code must retain the above copyright notice, 22 | * this list of conditions and the following disclaimers. 23 | * 24 | * o Redistributions in binary form must reproduce the above copyright 25 | * notice, this list of conditions and the following disclaimer in the 26 | * documentation and/or other materials provided with the distribution. 27 | * 28 | * o Neither the name of the University of Houston System, 29 | * UT-Battelle, LLC. nor the names of its contributors may be used to 30 | * endorse or promote products derived from this software without specific 31 | * prior written permission. 32 | * 33 | * o Neither the name of Los Alamos National Security, LLC, Los Alamos 34 | * National Laboratory, LANL, the U.S. Government, nor the names of its 35 | * contributors may be used to endorse or promote products derived from 36 | * this software without specific prior written permission. 37 | * 38 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 39 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 40 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 41 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 42 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 43 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 44 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 45 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 46 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 47 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 48 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 49 | * 50 | */ 51 | 52 | 53 | #ifndef _SYMMEM_H 54 | #define _SYMMEM_H 1 55 | 56 | /* 57 | * These aren't used outside of their source unit, and therefore this 58 | * header isn't used at all. Leaving them here as comments though, as 59 | * a reminder in case we need them in the future. 60 | */ 61 | 62 | #if 0 63 | 64 | #include 65 | 66 | extern void *__shmalloc_no_check (size_t size); 67 | extern int __shmalloc_symmetry_check (size_t size); 68 | 69 | #endif 70 | 71 | #endif /* _SYMMEM_H */ 72 | -------------------------------------------------------------------------------- /src/memory/symmtest.c: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2016 4 | * Stony Brook University 5 | * Copyright (c) 2015 - 2016 6 | * Los Alamos National Security, LLC. 7 | * Copyright (c) 2011 - 2016 8 | * University of Houston System and UT-Battelle, LLC. 9 | * Copyright (c) 2009 - 2016 10 | * Silicon Graphics International Corp. SHMEM is copyrighted 11 | * by Silicon Graphics International Corp. (SGI) The OpenSHMEM API 12 | * (shmem) is released by Open Source Software Solutions, Inc., under an 13 | * agreement with Silicon Graphics International Corp. (SGI). 14 | * 15 | * All rights reserved. 16 | * 17 | * Redistribution and use in source and binary forms, with or without 18 | * modification, are permitted provided that the following conditions 19 | * are met: 20 | * 21 | * o Redistributions of source code must retain the above copyright notice, 22 | * this list of conditions and the following disclaimers. 23 | * 24 | * o Redistributions in binary form must reproduce the above copyright 25 | * notice, this list of conditions and the following disclaimer in the 26 | * documentation and/or other materials provided with the distribution. 27 | * 28 | * o Neither the name of the University of Houston System, 29 | * UT-Battelle, LLC. nor the names of its contributors may be used to 30 | * endorse or promote products derived from this software without specific 31 | * prior written permission. 32 | * 33 | * o Neither the name of Los Alamos National Security, LLC, Los Alamos 34 | * National Laboratory, LANL, the U.S. Government, nor the names of its 35 | * contributors may be used to endorse or promote products derived from 36 | * this software without specific prior written permission. 37 | * 38 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 39 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 40 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 41 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 42 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 43 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 44 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 45 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 46 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 47 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 48 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 49 | * 50 | */ 51 | 52 | 53 | #include /* NULL */ 54 | 55 | #include "trace.h" 56 | #include "globalvar.h" 57 | #include "comms.h" 58 | #include "state.h" 59 | 60 | #include "utils.h" 61 | 62 | #include "debug_alloc.h" 63 | 64 | /* 65 | * Deprecated 66 | * 67 | */ 68 | 69 | void 70 | shmemi_symmetric_test_with_abort (void *remote_addr, 71 | void *local_addr, 72 | const char *name, 73 | const char *routine) 74 | { 75 | if (EXPR_UNLIKELY (remote_addr == NULL)) { 76 | shmemi_trace (SHMEM_LOG_FATAL, 77 | "shmem_%s_%s: address %p is not symmetric", 78 | name, routine, local_addr); 79 | return; 80 | /* NOT REACHED */ 81 | } 82 | } 83 | 84 | /** 85 | * check that the address is accessible to shmem on that PE 86 | * 87 | */ 88 | int 89 | shmemi_symmetric_addr_accessible (void *addr, int pe) 90 | { 91 | if (EXPR_LIKELY (shmemi_symmetric_addr_lookup (addr, pe) != NULL)) { 92 | return 1; 93 | } 94 | else { 95 | return 0; 96 | } 97 | } 98 | 99 | #if 0 100 | /** 101 | * is the address one that can be accessed remotely? (self-inspection) 102 | * 103 | */ 104 | int 105 | shmemi_is_symmetric (void *addr) 106 | { 107 | if (EXPR_LIKELY 108 | (shmemi_symmetric_addr_lookup (addr, GET_STATE (mype)) != NULL)) { 109 | return 1; 110 | } 111 | else { 112 | return 0; 113 | } 114 | } 115 | #endif /* not used */ 116 | -------------------------------------------------------------------------------- /src/memory/symmtest.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2016 4 | * Stony Brook University 5 | * Copyright (c) 2015 - 2016 6 | * Los Alamos National Security, LLC. 7 | * Copyright (c) 2011 - 2016 8 | * University of Houston System and UT-Battelle, LLC. 9 | * Copyright (c) 2009 - 2016 10 | * Silicon Graphics International Corp. SHMEM is copyrighted 11 | * by Silicon Graphics International Corp. (SGI) The OpenSHMEM API 12 | * (shmem) is released by Open Source Software Solutions, Inc., under an 13 | * agreement with Silicon Graphics International Corp. (SGI). 14 | * 15 | * All rights reserved. 16 | * 17 | * Redistribution and use in source and binary forms, with or without 18 | * modification, are permitted provided that the following conditions 19 | * are met: 20 | * 21 | * o Redistributions of source code must retain the above copyright notice, 22 | * this list of conditions and the following disclaimers. 23 | * 24 | * o Redistributions in binary form must reproduce the above copyright 25 | * notice, this list of conditions and the following disclaimer in the 26 | * documentation and/or other materials provided with the distribution. 27 | * 28 | * o Neither the name of the University of Houston System, 29 | * UT-Battelle, LLC. nor the names of its contributors may be used to 30 | * endorse or promote products derived from this software without specific 31 | * prior written permission. 32 | * 33 | * o Neither the name of Los Alamos National Security, LLC, Los Alamos 34 | * National Laboratory, LANL, the U.S. Government, nor the names of its 35 | * contributors may be used to endorse or promote products derived from 36 | * this software without specific prior written permission. 37 | * 38 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 39 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 40 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 41 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 42 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 43 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 44 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 45 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 46 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 47 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 48 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 49 | * 50 | */ 51 | 52 | 53 | #ifndef _SYMMTEST_H 54 | #define _SYMMTEST_H 1 55 | 56 | extern void shmemi_symmetric_test_with_abort (void *remote_addr, 57 | void *local_addr, 58 | const char *name, 59 | const char *routine); 60 | 61 | extern int shmemi_symmetric_addr_accessible (void *addr, int pe); 62 | 63 | #endif /* _SYMMTEST_H */ 64 | -------------------------------------------------------------------------------- /src/mpp/pshmem.fh: -------------------------------------------------------------------------------- 1 | ! 2 | ! Copyright (c) 2016 3 | ! Stony Brook University 4 | ! Copyright (c) 2015 - 2016 5 | ! Los Alamos National Security, LLC. 6 | ! Copyright (c) 2011 - 2016 7 | ! University of Houston System and UT-Battelle, LLC. 8 | ! Copyright (c) 2009 - 2016 9 | ! Silicon Graphics International Corp. SHMEM is copyrighted 10 | ! by Silicon Graphics International Corp. (SGI) The OpenSHMEM API 11 | ! (shmem) is released by Open Source Software Solutions, Inc., under an 12 | ! agreement with Silicon Graphics International Corp. (SGI). 13 | ! 14 | ! All rights reserved. 15 | ! 16 | ! Redistribution and use in source and binary forms, with or without 17 | ! modification, are permitted provided that the following conditions 18 | ! are met: 19 | ! 20 | ! o Redistributions of source code must retain the above copyright notice, 21 | ! this list of conditions and the following disclaimers. 22 | ! 23 | ! o Redistributions in binary form must reproduce the above copyright 24 | ! notice, this list of conditions and the following disclaimer in the 25 | ! documentation and/or other materials provided with the distribution. 26 | ! 27 | ! o Neither the name of the University of Houston System, 28 | ! UT-Battelle, LLC. nor the names of its contributors may be used to 29 | ! endorse or promote products derived from this software without specific 30 | ! prior written permission. 31 | ! 32 | ! o Neither the name of Los Alamos National Security, LLC, Los Alamos 33 | ! National Laboratory, LANL, the U.S. Government, nor the names of its 34 | ! contributors may be used to endorse or promote products derived from 35 | ! this software without specific prior written permission. 36 | ! 37 | ! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 38 | ! "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 39 | ! LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 40 | ! A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 41 | ! HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 42 | ! SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 43 | ! TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 44 | ! PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 45 | ! LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 46 | ! NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 47 | ! SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 48 | ! 49 | 50 | ! Dunno how to do something like "#warning" for Fortran 51 | 52 | include 'pshmem.fh' 53 | -------------------------------------------------------------------------------- /src/mpp/pshmem.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2016 4 | * Stony Brook University 5 | * Copyright (c) 2015 - 2016 6 | * Los Alamos National Security, LLC. 7 | * Copyright (c) 2011 - 2016 8 | * University of Houston System and UT-Battelle, LLC. 9 | * Copyright (c) 2009 - 2016 10 | * Silicon Graphics International Corp. SHMEM is copyrighted 11 | * by Silicon Graphics International Corp. (SGI) The OpenSHMEM API 12 | * (shmem) is released by Open Source Software Solutions, Inc., under an 13 | * agreement with Silicon Graphics International Corp. (SGI). 14 | * 15 | * All rights reserved. 16 | * 17 | * Redistribution and use in source and binary forms, with or without 18 | * modification, are permitted provided that the following conditions 19 | * are met: 20 | * 21 | * o Redistributions of source code must retain the above copyright notice, 22 | * this list of conditions and the following disclaimers. 23 | * 24 | * o Redistributions in binary form must reproduce the above copyright 25 | * notice, this list of conditions and the following disclaimer in the 26 | * documentation and/or other materials provided with the distribution. 27 | * 28 | * o Neither the name of the University of Houston System, 29 | * UT-Battelle, LLC. nor the names of its contributors may be used to 30 | * endorse or promote products derived from this software without specific 31 | * prior written permission. 32 | * 33 | * o Neither the name of Los Alamos National Security, LLC, Los Alamos 34 | * National Laboratory, LANL, the U.S. Government, nor the names of its 35 | * contributors may be used to endorse or promote products derived from 36 | * this software without specific prior written permission. 37 | * 38 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 39 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 40 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 41 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 42 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 43 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 44 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 45 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 46 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 47 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 48 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 49 | * 50 | */ 51 | 52 | 53 | #ifndef _MPP_PSHMEM_H 54 | #define _MPP_PSHMEM_H 1 55 | 56 | #warning is a deprecated location, use instead 57 | 58 | #include "pshmem.h" 59 | 60 | #endif /* _MPP_PSHMEM_H */ 61 | -------------------------------------------------------------------------------- /src/mpp/pshmemx.fh: -------------------------------------------------------------------------------- 1 | ! 2 | ! Copyright (c) 2016 3 | ! Stony Brook University 4 | ! Copyright (c) 2015 - 2016 5 | ! Los Alamos National Security, LLC. 6 | ! Copyright (c) 2011 - 2016 7 | ! University of Houston System and UT-Battelle, LLC. 8 | ! Copyright (c) 2009 - 2016 9 | ! Silicon Graphics International Corp. SHMEM is copyrighted 10 | ! by Silicon Graphics International Corp. (SGI) The OpenSHMEM API 11 | ! (shmem) is released by Open Source Software Solutions, Inc., under an 12 | ! agreement with Silicon Graphics International Corp. (SGI). 13 | ! 14 | ! All rights reserved. 15 | ! 16 | ! Redistribution and use in source and binary forms, with or without 17 | ! modification, are permitted provided that the following conditions 18 | ! are met: 19 | ! 20 | ! o Redistributions of source code must retain the above copyright notice, 21 | ! this list of conditions and the following disclaimers. 22 | ! 23 | ! o Redistributions in binary form must reproduce the above copyright 24 | ! notice, this list of conditions and the following disclaimer in the 25 | ! documentation and/or other materials provided with the distribution. 26 | ! 27 | ! o Neither the name of the University of Houston System, 28 | ! UT-Battelle, LLC. nor the names of its contributors may be used to 29 | ! endorse or promote products derived from this software without specific 30 | ! prior written permission. 31 | ! 32 | ! o Neither the name of Los Alamos National Security, LLC, Los Alamos 33 | ! National Laboratory, LANL, the U.S. Government, nor the names of its 34 | ! contributors may be used to endorse or promote products derived from 35 | ! this software without specific prior written permission. 36 | ! 37 | ! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 38 | ! "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 39 | ! LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 40 | ! A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 41 | ! HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 42 | ! SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 43 | ! TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 44 | ! PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 45 | ! LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 46 | ! NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 47 | ! SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 48 | ! 49 | 50 | ! Dunno how to do something like "#warning" for Fortran 51 | 52 | include 'pshmemx.fh' 53 | -------------------------------------------------------------------------------- /src/mpp/pshmemx.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2016 4 | * Stony Brook University 5 | * Copyright (c) 2015 - 2016 6 | * Los Alamos National Security, LLC. 7 | * Copyright (c) 2011 - 2016 8 | * University of Houston System and UT-Battelle, LLC. 9 | * Copyright (c) 2009 - 2016 10 | * Silicon Graphics International Corp. SHMEM is copyrighted 11 | * by Silicon Graphics International Corp. (SGI) The OpenSHMEM API 12 | * (shmem) is released by Open Source Software Solutions, Inc., under an 13 | * agreement with Silicon Graphics International Corp. (SGI). 14 | * 15 | * All rights reserved. 16 | * 17 | * Redistribution and use in source and binary forms, with or without 18 | * modification, are permitted provided that the following conditions 19 | * are met: 20 | * 21 | * o Redistributions of source code must retain the above copyright notice, 22 | * this list of conditions and the following disclaimers. 23 | * 24 | * o Redistributions in binary form must reproduce the above copyright 25 | * notice, this list of conditions and the following disclaimer in the 26 | * documentation and/or other materials provided with the distribution. 27 | * 28 | * o Neither the name of the University of Houston System, 29 | * UT-Battelle, LLC. nor the names of its contributors may be used to 30 | * endorse or promote products derived from this software without specific 31 | * prior written permission. 32 | * 33 | * o Neither the name of Los Alamos National Security, LLC, Los Alamos 34 | * National Laboratory, LANL, the U.S. Government, nor the names of its 35 | * contributors may be used to endorse or promote products derived from 36 | * this software without specific prior written permission. 37 | * 38 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 39 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 40 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 41 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 42 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 43 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 44 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 45 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 46 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 47 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 48 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 49 | * 50 | */ 51 | 52 | 53 | #ifndef _MPP_PSHMEMX_H 54 | #define _MPP_PSHMEMX_H 1 55 | 56 | #warning is a deprecated location, use instead 57 | 58 | #include "pshmemx.h" 59 | 60 | #endif /* _MPP_PSHMEMX_H */ 61 | -------------------------------------------------------------------------------- /src/mpp/shmem.fh: -------------------------------------------------------------------------------- 1 | ! 2 | ! Copyright (c) 2016 3 | ! Stony Brook University 4 | ! Copyright (c) 2015 - 2016 5 | ! Los Alamos National Security, LLC. 6 | ! Copyright (c) 2011 - 2016 7 | ! University of Houston System and UT-Battelle, LLC. 8 | ! Copyright (c) 2009 - 2016 9 | ! Silicon Graphics International Corp. SHMEM is copyrighted 10 | ! by Silicon Graphics International Corp. (SGI) The OpenSHMEM API 11 | ! (shmem) is released by Open Source Software Solutions, Inc., under an 12 | ! agreement with Silicon Graphics International Corp. (SGI). 13 | ! 14 | ! All rights reserved. 15 | ! 16 | ! Redistribution and use in source and binary forms, with or without 17 | ! modification, are permitted provided that the following conditions 18 | ! are met: 19 | ! 20 | ! o Redistributions of source code must retain the above copyright notice, 21 | ! this list of conditions and the following disclaimers. 22 | ! 23 | ! o Redistributions in binary form must reproduce the above copyright 24 | ! notice, this list of conditions and the following disclaimer in the 25 | ! documentation and/or other materials provided with the distribution. 26 | ! 27 | ! o Neither the name of the University of Houston System, 28 | ! UT-Battelle, LLC. nor the names of its contributors may be used to 29 | ! endorse or promote products derived from this software without specific 30 | ! prior written permission. 31 | ! 32 | ! o Neither the name of Los Alamos National Security, LLC, Los Alamos 33 | ! National Laboratory, LANL, the U.S. Government, nor the names of its 34 | ! contributors may be used to endorse or promote products derived from 35 | ! this software without specific prior written permission. 36 | ! 37 | ! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 38 | ! "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 39 | ! LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 40 | ! A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 41 | ! HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 42 | ! SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 43 | ! TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 44 | ! PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 45 | ! LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 46 | ! NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 47 | ! SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 48 | ! 49 | 50 | ! Dunno how to do something like "#warning" for Fortran 51 | 52 | include 'shmem.fh' 53 | -------------------------------------------------------------------------------- /src/mpp/shmem.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2016 4 | * Stony Brook University 5 | * Copyright (c) 2015 - 2016 6 | * Los Alamos National Security, LLC. 7 | * Copyright (c) 2011 - 2016 8 | * University of Houston System and UT-Battelle, LLC. 9 | * Copyright (c) 2009 - 2016 10 | * Silicon Graphics International Corp. SHMEM is copyrighted 11 | * by Silicon Graphics International Corp. (SGI) The OpenSHMEM API 12 | * (shmem) is released by Open Source Software Solutions, Inc., under an 13 | * agreement with Silicon Graphics International Corp. (SGI). 14 | * 15 | * All rights reserved. 16 | * 17 | * Redistribution and use in source and binary forms, with or without 18 | * modification, are permitted provided that the following conditions 19 | * are met: 20 | * 21 | * o Redistributions of source code must retain the above copyright notice, 22 | * this list of conditions and the following disclaimers. 23 | * 24 | * o Redistributions in binary form must reproduce the above copyright 25 | * notice, this list of conditions and the following disclaimer in the 26 | * documentation and/or other materials provided with the distribution. 27 | * 28 | * o Neither the name of the University of Houston System, 29 | * UT-Battelle, LLC. nor the names of its contributors may be used to 30 | * endorse or promote products derived from this software without specific 31 | * prior written permission. 32 | * 33 | * o Neither the name of Los Alamos National Security, LLC, Los Alamos 34 | * National Laboratory, LANL, the U.S. Government, nor the names of its 35 | * contributors may be used to endorse or promote products derived from 36 | * this software without specific prior written permission. 37 | * 38 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 39 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 40 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 41 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 42 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 43 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 44 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 45 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 46 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 47 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 48 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 49 | * 50 | */ 51 | 52 | 53 | #ifndef _MPP_SHMEM_H 54 | #define _MPP_SHMEM_H 1 55 | 56 | #warning is a deprecated location, use instead 57 | 58 | #include 59 | 60 | #endif /* _MPP_SHMEM_H */ 61 | -------------------------------------------------------------------------------- /src/mpp/shmemx.fh: -------------------------------------------------------------------------------- 1 | ! 2 | ! Copyright (c) 2016 3 | ! Stony Brook University 4 | ! Copyright (c) 2015 - 2016 5 | ! Los Alamos National Security, LLC. 6 | ! Copyright (c) 2011 - 2016 7 | ! University of Houston System and UT-Battelle, LLC. 8 | ! Copyright (c) 2009 - 2016 9 | ! Silicon Graphics International Corp. SHMEM is copyrighted 10 | ! by Silicon Graphics International Corp. (SGI) The OpenSHMEM API 11 | ! (shmem) is released by Open Source Software Solutions, Inc., under an 12 | ! agreement with Silicon Graphics International Corp. (SGI). 13 | ! 14 | ! All rights reserved. 15 | ! 16 | ! Redistribution and use in source and binary forms, with or without 17 | ! modification, are permitted provided that the following conditions 18 | ! are met: 19 | ! 20 | ! o Redistributions of source code must retain the above copyright notice, 21 | ! this list of conditions and the following disclaimers. 22 | ! 23 | ! o Redistributions in binary form must reproduce the above copyright 24 | ! notice, this list of conditions and the following disclaimer in the 25 | ! documentation and/or other materials provided with the distribution. 26 | ! 27 | ! o Neither the name of the University of Houston System, 28 | ! UT-Battelle, LLC. nor the names of its contributors may be used to 29 | ! endorse or promote products derived from this software without specific 30 | ! prior written permission. 31 | ! 32 | ! o Neither the name of Los Alamos National Security, LLC, Los Alamos 33 | ! National Laboratory, LANL, the U.S. Government, nor the names of its 34 | ! contributors may be used to endorse or promote products derived from 35 | ! this software without specific prior written permission. 36 | ! 37 | ! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 38 | ! "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 39 | ! LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 40 | ! A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 41 | ! HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 42 | ! SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 43 | ! TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 44 | ! PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 45 | ! LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 46 | ! NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 47 | ! SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 48 | ! 49 | 50 | ! Dunno how to do something like "#warning" for Fortran 51 | 52 | include 'shmemx.fh' 53 | -------------------------------------------------------------------------------- /src/mpp/shmemx.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2016 4 | * Stony Brook University 5 | * Copyright (c) 2015 - 2016 6 | * Los Alamos National Security, LLC. 7 | * Copyright (c) 2011 - 2016 8 | * University of Houston System and UT-Battelle, LLC. 9 | * Copyright (c) 2009 - 2016 10 | * Silicon Graphics International Corp. SHMEM is copyrighted 11 | * by Silicon Graphics International Corp. (SGI) The OpenSHMEM API 12 | * (shmem) is released by Open Source Software Solutions, Inc., under an 13 | * agreement with Silicon Graphics International Corp. (SGI). 14 | * 15 | * All rights reserved. 16 | * 17 | * Redistribution and use in source and binary forms, with or without 18 | * modification, are permitted provided that the following conditions 19 | * are met: 20 | * 21 | * o Redistributions of source code must retain the above copyright notice, 22 | * this list of conditions and the following disclaimers. 23 | * 24 | * o Redistributions in binary form must reproduce the above copyright 25 | * notice, this list of conditions and the following disclaimer in the 26 | * documentation and/or other materials provided with the distribution. 27 | * 28 | * o Neither the name of the University of Houston System, 29 | * UT-Battelle, LLC. nor the names of its contributors may be used to 30 | * endorse or promote products derived from this software without specific 31 | * prior written permission. 32 | * 33 | * o Neither the name of Los Alamos National Security, LLC, Los Alamos 34 | * National Laboratory, LANL, the U.S. Government, nor the names of its 35 | * contributors may be used to endorse or promote products derived from 36 | * this software without specific prior written permission. 37 | * 38 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 39 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 40 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 41 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 42 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 43 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 44 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 45 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 46 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 47 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 48 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 49 | * 50 | */ 51 | 52 | 53 | #ifndef _MPP_SHMEMX_H 54 | #define _MPP_SHMEMX_H 1 55 | 56 | #warning is a deprecated location, use instead 57 | 58 | #include 59 | 60 | #endif /* _MPP_SHMEMX_H */ 61 | -------------------------------------------------------------------------------- /src/profiling/profiling.c: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2016 4 | * Stony Brook University 5 | * Copyright (c) 2015 - 2016 6 | * Los Alamos National Security, LLC. 7 | * Copyright (c) 2011 - 2016 8 | * University of Houston System and UT-Battelle, LLC. 9 | * Copyright (c) 2009 - 2016 10 | * Silicon Graphics International Corp. SHMEM is copyrighted 11 | * by Silicon Graphics International Corp. (SGI) The OpenSHMEM API 12 | * (shmem) is released by Open Source Software Solutions, Inc., under an 13 | * agreement with Silicon Graphics International Corp. (SGI). 14 | * 15 | * All rights reserved. 16 | * 17 | * Redistribution and use in source and binary forms, with or without 18 | * modification, are permitted provided that the following conditions 19 | * are met: 20 | * 21 | * o Redistributions of source code must retain the above copyright notice, 22 | * this list of conditions and the following disclaimers. 23 | * 24 | * o Redistributions in binary form must reproduce the above copyright 25 | * notice, this list of conditions and the following disclaimer in the 26 | * documentation and/or other materials provided with the distribution. 27 | * 28 | * o Neither the name of the University of Houston System, 29 | * UT-Battelle, LLC. nor the names of its contributors may be used to 30 | * endorse or promote products derived from this software without specific 31 | * prior written permission. 32 | * 33 | * o Neither the name of Los Alamos National Security, LLC, Los Alamos 34 | * National Laboratory, LANL, the U.S. Government, nor the names of its 35 | * contributors may be used to endorse or promote products derived from 36 | * this software without specific prior written permission. 37 | * 38 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 39 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 40 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 41 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 42 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 43 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 44 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 45 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 46 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 47 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 48 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 49 | * 50 | */ 51 | #if defined(HAVE_FEATURE_PSHMEM) 52 | 53 | #include "trace.h" 54 | 55 | /** 56 | * stub for the proposed UFL profiling (PSHMEM) interface 57 | * 58 | */ 59 | 60 | void 61 | shmem_pcontrol (int level) 62 | { 63 | char *msg = NULL; 64 | 65 | switch (level) { 66 | case 0: 67 | msg = "disabled"; 68 | break; 69 | case 1: 70 | msg = "enabled (default detail)"; 71 | break; 72 | default: 73 | msg = "tool-specific"; 74 | break; 75 | } 76 | 77 | shmemi_trace (SHMEM_LOG_INFO, "shmem_pcontrol(%d) is %s", level, msg); 78 | return; 79 | } 80 | 81 | #endif /* HAVE_FEATURE_PSHMEM */ 82 | -------------------------------------------------------------------------------- /src/pshmemx.fh: -------------------------------------------------------------------------------- 1 | ! 2 | ! Copyright (c) 2016 3 | ! Stony Brook University 4 | ! Copyright (c) 2015 - 2016 5 | ! Los Alamos National Security, LLC. 6 | ! Copyright (c) 2011 - 2016 7 | ! University of Houston System and UT-Battelle, LLC. 8 | ! Copyright (c) 2009 - 2016 9 | ! Silicon Graphics International Corp. SHMEM is copyrighted 10 | ! by Silicon Graphics International Corp. (SGI) The OpenSHMEM API 11 | ! (shmem) is released by Open Source Software Solutions, Inc., under an 12 | ! agreement with Silicon Graphics International Corp. (SGI). 13 | ! 14 | ! All rights reserved. 15 | ! 16 | ! Redistribution and use in source and binary forms, with or without 17 | ! modification, are permitted provided that the following conditions 18 | ! are met: 19 | ! 20 | ! o Redistributions of source code must retain the above copyright notice, 21 | ! this list of conditions and the following disclaimers. 22 | ! 23 | ! o Redistributions in binary form must reproduce the above copyright 24 | ! notice, this list of conditions and the following disclaimer in the 25 | ! documentation and/or other materials provided with the distribution. 26 | ! 27 | ! o Neither the name of the University of Houston System, 28 | ! UT-Battelle, LLC. nor the names of its contributors may be used to 29 | ! endorse or promote products derived from this software without specific 30 | ! prior written permission. 31 | ! 32 | ! o Neither the name of Los Alamos National Security, LLC, Los Alamos 33 | ! National Laboratory, LANL, the U.S. Government, nor the names of its 34 | ! contributors may be used to endorse or promote products derived from 35 | ! this software without specific prior written permission. 36 | ! 37 | ! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 38 | ! "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 39 | ! LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 40 | ! A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 41 | ! HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 42 | ! SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 43 | ! TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 44 | ! PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 45 | ! LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 46 | ! NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 47 | ! SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 48 | ! 49 | 50 | double precision :: pshmemx_wtime 51 | 52 | logical :: pshmemx_fence_test 53 | logical :: pshmemx_quiet_test 54 | 55 | -------------------------------------------------------------------------------- /src/ptp/putget.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2016 4 | * Stony Brook University 5 | * Copyright (c) 2015 - 2016 6 | * Los Alamos National Security, LLC. 7 | * Copyright (c) 2011 - 2016 8 | * University of Houston System and UT-Battelle, LLC. 9 | * Copyright (c) 2009 - 2016 10 | * Silicon Graphics International Corp. SHMEM is copyrighted 11 | * by Silicon Graphics International Corp. (SGI) The OpenSHMEM API 12 | * (shmem) is released by Open Source Software Solutions, Inc., under an 13 | * agreement with Silicon Graphics International Corp. (SGI). 14 | * 15 | * All rights reserved. 16 | * 17 | * Redistribution and use in source and binary forms, with or without 18 | * modification, are permitted provided that the following conditions 19 | * are met: 20 | * 21 | * o Redistributions of source code must retain the above copyright notice, 22 | * this list of conditions and the following disclaimers. 23 | * 24 | * o Redistributions in binary form must reproduce the above copyright 25 | * notice, this list of conditions and the following disclaimer in the 26 | * documentation and/or other materials provided with the distribution. 27 | * 28 | * o Neither the name of the University of Houston System, 29 | * UT-Battelle, LLC. nor the names of its contributors may be used to 30 | * endorse or promote products derived from this software without specific 31 | * prior written permission. 32 | * 33 | * o Neither the name of Los Alamos National Security, LLC, Los Alamos 34 | * National Laboratory, LANL, the U.S. Government, nor the names of its 35 | * contributors may be used to endorse or promote products derived from 36 | * this software without specific prior written permission. 37 | * 38 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 39 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 40 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 41 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 42 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 43 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 44 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 45 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 46 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 47 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 48 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 49 | * 50 | */ 51 | 52 | 53 | #ifndef _PUTGET_H 54 | #define _PUTGET_H 1 55 | 56 | /* nothing here right now */ 57 | 58 | #endif /* _PUTGET_H */ 59 | -------------------------------------------------------------------------------- /src/querying/accessible.c: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2016 4 | * Stony Brook University 5 | * Copyright (c) 2015 - 2016 6 | * Los Alamos National Security, LLC. 7 | * Copyright (c) 2011 - 2016 8 | * University of Houston System and UT-Battelle, LLC. 9 | * Copyright (c) 2009 - 2016 10 | * Silicon Graphics International Corp. SHMEM is copyrighted 11 | * by Silicon Graphics International Corp. (SGI) The OpenSHMEM API 12 | * (shmem) is released by Open Source Software Solutions, Inc., under an 13 | * agreement with Silicon Graphics International Corp. (SGI). 14 | * 15 | * All rights reserved. 16 | * 17 | * Redistribution and use in source and binary forms, with or without 18 | * modification, are permitted provided that the following conditions 19 | * are met: 20 | * 21 | * o Redistributions of source code must retain the above copyright notice, 22 | * this list of conditions and the following disclaimers. 23 | * 24 | * o Redistributions in binary form must reproduce the above copyright 25 | * notice, this list of conditions and the following disclaimer in the 26 | * documentation and/or other materials provided with the distribution. 27 | * 28 | * o Neither the name of the University of Houston System, 29 | * UT-Battelle, LLC. nor the names of its contributors may be used to 30 | * endorse or promote products derived from this software without specific 31 | * prior written permission. 32 | * 33 | * o Neither the name of Los Alamos National Security, LLC, Los Alamos 34 | * National Laboratory, LANL, the U.S. Government, nor the names of its 35 | * contributors may be used to endorse or promote products derived from 36 | * this software without specific prior written permission. 37 | * 38 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 39 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 40 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 41 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 42 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 43 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 44 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 45 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 46 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 47 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 48 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 49 | * 50 | */ 51 | 52 | 53 | #include "globalvar.h" 54 | #include "utils.h" 55 | #include "symmtest.h" 56 | 57 | #include "comms/comms.h" 58 | 59 | #ifdef HAVE_FEATURE_PSHMEM 60 | #include "pshmem.h" 61 | #endif /* HAVE_FEATURE_PSHMEM */ 62 | 63 | #ifdef HAVE_FEATURE_PSHMEM 64 | #pragma weak shmem_pe_accessible = pshmem_pe_accessible 65 | #define shmem_pe_accessible pshmem_pe_accessible 66 | #pragma weak shmem_addr_accessible = pshmem_addr_accessible 67 | #define shmem_addr_accessible pshmem_addr_accessible 68 | #endif /* HAVE_FEATURE_PSHMEM */ 69 | 70 | /** 71 | * only true if PE "pe" can be accessed through SHMEM 72 | */ 73 | 74 | int 75 | shmem_pe_accessible (int pe) 76 | { 77 | DEBUG_NAME ("shmem_pe_accessible"); 78 | INIT_CHECK (debug_name); 79 | /* 80 | * don't trap this here, need to just test in program flow 81 | * PE_RANGE_CHECK (pe, 1); 82 | */ 83 | return shmemi_comms_ping_request (pe); 84 | } 85 | 86 | /** 87 | * only true if address can be accessed through SHMEM 88 | */ 89 | 90 | int 91 | shmem_addr_accessible (const void *addr, int pe) 92 | { 93 | DEBUG_NAME ("shmem_addr_accessible"); 94 | INIT_CHECK (debug_name); 95 | PE_RANGE_CHECK (pe, 2, debug_name); 96 | return shmemi_symmetric_addr_accessible ((void *) addr, pe); 97 | } 98 | -------------------------------------------------------------------------------- /src/querying/info.c: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2016 4 | * Stony Brook University 5 | * Copyright (c) 2015 - 2016 6 | * Los Alamos National Security, LLC. 7 | * Copyright (c) 2011 - 2016 8 | * University of Houston System and UT-Battelle, LLC. 9 | * Copyright (c) 2009 - 2016 10 | * Silicon Graphics International Corp. SHMEM is copyrighted 11 | * by Silicon Graphics International Corp. (SGI) The OpenSHMEM API 12 | * (shmem) is released by Open Source Software Solutions, Inc., under an 13 | * agreement with Silicon Graphics International Corp. (SGI). 14 | * 15 | * All rights reserved. 16 | * 17 | * Redistribution and use in source and binary forms, with or without 18 | * modification, are permitted provided that the following conditions 19 | * are met: 20 | * 21 | * o Redistributions of source code must retain the above copyright notice, 22 | * this list of conditions and the following disclaimers. 23 | * 24 | * o Redistributions in binary form must reproduce the above copyright 25 | * notice, this list of conditions and the following disclaimer in the 26 | * documentation and/or other materials provided with the distribution. 27 | * 28 | * o Neither the name of the University of Houston System, 29 | * UT-Battelle, LLC. nor the names of its contributors may be used to 30 | * endorse or promote products derived from this software without specific 31 | * prior written permission. 32 | * 33 | * o Neither the name of Los Alamos National Security, LLC, Los Alamos 34 | * National Laboratory, LANL, the U.S. Government, nor the names of its 35 | * contributors may be used to endorse or promote products derived from 36 | * this software without specific prior written permission. 37 | * 38 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 39 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 40 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 41 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 42 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 43 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 44 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 45 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 46 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 47 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 48 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 49 | * 50 | */ 51 | #include 52 | 53 | #include "version.h" 54 | 55 | #include "shmem.h" 56 | 57 | void 58 | shmem_info_get_version (int * major, int * minor) 59 | { 60 | (void) shmemi_version (major, minor); 61 | } 62 | 63 | void 64 | shmem_info_get_name (char *name) 65 | { 66 | strncpy (name, SHMEM_VENDOR_STRING, SHMEM_MAX_NAME_LEN); 67 | } 68 | -------------------------------------------------------------------------------- /src/querying/ptr.c: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2016 4 | * Stony Brook University 5 | * Copyright (c) 2015 - 2016 6 | * Los Alamos National Security, LLC. 7 | * Copyright (c) 2011 - 2016 8 | * University of Houston System and UT-Battelle, LLC. 9 | * Copyright (c) 2009 - 2016 10 | * Silicon Graphics International Corp. SHMEM is copyrighted 11 | * by Silicon Graphics International Corp. (SGI) The OpenSHMEM API 12 | * (shmem) is released by Open Source Software Solutions, Inc., under an 13 | * agreement with Silicon Graphics International Corp. (SGI). 14 | * 15 | * All rights reserved. 16 | * 17 | * Redistribution and use in source and binary forms, with or without 18 | * modification, are permitted provided that the following conditions 19 | * are met: 20 | * 21 | * o Redistributions of source code must retain the above copyright notice, 22 | * this list of conditions and the following disclaimers. 23 | * 24 | * o Redistributions in binary form must reproduce the above copyright 25 | * notice, this list of conditions and the following disclaimer in the 26 | * documentation and/or other materials provided with the distribution. 27 | * 28 | * o Neither the name of the University of Houston System, 29 | * UT-Battelle, LLC. nor the names of its contributors may be used to 30 | * endorse or promote products derived from this software without specific 31 | * prior written permission. 32 | * 33 | * o Neither the name of Los Alamos National Security, LLC, Los Alamos 34 | * National Laboratory, LANL, the U.S. Government, nor the names of its 35 | * contributors may be used to endorse or promote products derived from 36 | * this software without specific prior written permission. 37 | * 38 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 39 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 40 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 41 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 42 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 43 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 44 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 45 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 46 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 47 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 48 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 49 | * 50 | */ 51 | 52 | 53 | /* 54 | * TODO: shmem_ptr only makes sense on platforms where puts and gets 55 | * occur exclusively in shared-memory. On a multi-node cluster, it 56 | * can't do anything, so return NULL, which is correct behavior. 57 | * (which is really good, because I couldn't see how it could possibly 58 | * work :-) 59 | */ 60 | 61 | #include 62 | 63 | #include "trace.h" 64 | #include "utils.h" 65 | 66 | #include "comms.h" 67 | 68 | #ifdef HAVE_FEATURE_PSHMEM 69 | #include "pshmem.h" 70 | #endif /* HAVE_FEATURE_PSHMEM */ 71 | 72 | 73 | #ifdef HAVE_FEATURE_PSHMEM 74 | #pragma weak shmem_ptr = pshmem_ptr 75 | #define shmem_ptr pshmem_ptr 76 | #endif /* HAVE_FEATURE_PSHMEM */ 77 | 78 | void * 79 | shmem_ptr (const void *target, int pe) 80 | { 81 | DEBUG_NAME ("shmem_ptr"); 82 | INIT_CHECK (debug_name); 83 | PE_RANGE_CHECK (pe, 2, debug_name); 84 | 85 | #ifdef SHMEM_PUTGET_SHARED_MEMORY 86 | 87 | shmemi_trace (SHMEM_LOG_NOTICE, 88 | "shmem_ptr() not implemented yet"); 89 | return (void *) NULL; 90 | 91 | #else /* ! SHMEM_PUTGET_SHARED_MEMORY */ 92 | 93 | return (void *) NULL; 94 | 95 | #endif /* SHMEM_PUTGET_SHARED_MEMORY */ 96 | } 97 | -------------------------------------------------------------------------------- /src/querying/query.c: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2016 4 | * Stony Brook University 5 | * Copyright (c) 2015 - 2016 6 | * Los Alamos National Security, LLC. 7 | * Copyright (c) 2011 - 2016 8 | * University of Houston System and UT-Battelle, LLC. 9 | * Copyright (c) 2009 - 2016 10 | * Silicon Graphics International Corp. SHMEM is copyrighted 11 | * by Silicon Graphics International Corp. (SGI) The OpenSHMEM API 12 | * (shmem) is released by Open Source Software Solutions, Inc., under an 13 | * agreement with Silicon Graphics International Corp. (SGI). 14 | * 15 | * All rights reserved. 16 | * 17 | * Redistribution and use in source and binary forms, with or without 18 | * modification, are permitted provided that the following conditions 19 | * are met: 20 | * 21 | * o Redistributions of source code must retain the above copyright notice, 22 | * this list of conditions and the following disclaimers. 23 | * 24 | * o Redistributions in binary form must reproduce the above copyright 25 | * notice, this list of conditions and the following disclaimer in the 26 | * documentation and/or other materials provided with the distribution. 27 | * 28 | * o Neither the name of the University of Houston System, 29 | * UT-Battelle, LLC. nor the names of its contributors may be used to 30 | * endorse or promote products derived from this software without specific 31 | * prior written permission. 32 | * 33 | * o Neither the name of Los Alamos National Security, LLC, Los Alamos 34 | * National Laboratory, LANL, the U.S. Government, nor the names of its 35 | * contributors may be used to endorse or promote products derived from 36 | * this software without specific prior written permission. 37 | * 38 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 39 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 40 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 41 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 42 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 43 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 44 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 45 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 46 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 47 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 48 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 49 | * 50 | */ 51 | 52 | 53 | #include "state.h" 54 | #include "trace.h" 55 | #include "utils.h" 56 | 57 | #include "shmem.h" 58 | 59 | #ifdef HAVE_FEATURE_PSHMEM 60 | #include "pshmem.h" 61 | #endif /* HAVE_FEATURE_PSHMEM */ 62 | 63 | #ifdef HAVE_FEATURE_PSHMEM 64 | #pragma weak _my_pe = p_my_pe 65 | #define _my_pe p_my_pe 66 | #pragma weak shmem_my_pe = pshmem_my_pe 67 | #define shmem_my_pe pshmem_my_pe 68 | #endif /* HAVE_FEATURE_PSHMEM */ 69 | 70 | int 71 | _my_pe (void) 72 | { 73 | DEBUG_NAME ("_my_pe"); 74 | INIT_CHECK (debug_name); 75 | return GET_STATE (mype); 76 | } 77 | 78 | int 79 | shmem_my_pe (void) 80 | { 81 | DEBUG_NAME ("shmem_my_pe"); 82 | INIT_CHECK (debug_name); 83 | return GET_STATE (mype); 84 | } 85 | 86 | #ifdef HAVE_FEATURE_PSHMEM 87 | #pragma weak _num_pes = p_num_pes 88 | #define _num_pes p_num_pes 89 | #pragma weak shmem_n_pes = pshmem_n_pes 90 | #define shmem_n_pes pshmem_n_pes 91 | #endif /* HAVE_FEATURE_PSHMEM */ 92 | 93 | int 94 | _num_pes (void) 95 | { 96 | DEBUG_NAME ("_num_pes"); 97 | INIT_CHECK (debug_name); 98 | return GET_STATE (numpes); 99 | } 100 | 101 | int 102 | shmem_n_pes (void) 103 | { 104 | DEBUG_NAME ("shmem_n_pes"); 105 | INIT_CHECK (debug_name); 106 | return GET_STATE (numpes); 107 | } 108 | -------------------------------------------------------------------------------- /src/querying/xlate.c: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2016 4 | * Stony Brook University 5 | * Copyright (c) 2015 - 2016 6 | * Los Alamos National Security, LLC. 7 | * Copyright (c) 2011 - 2016 8 | * University of Houston System and UT-Battelle, LLC. 9 | * Copyright (c) 2009 - 2016 10 | * Silicon Graphics International Corp. SHMEM is copyrighted 11 | * by Silicon Graphics International Corp. (SGI) The OpenSHMEM API 12 | * (shmem) is released by Open Source Software Solutions, Inc., under an 13 | * agreement with Silicon Graphics International Corp. (SGI). 14 | * 15 | * All rights reserved. 16 | * 17 | * Redistribution and use in source and binary forms, with or without 18 | * modification, are permitted provided that the following conditions 19 | * are met: 20 | * 21 | * o Redistributions of source code must retain the above copyright notice, 22 | * this list of conditions and the following disclaimers. 23 | * 24 | * o Redistributions in binary form must reproduce the above copyright 25 | * notice, this list of conditions and the following disclaimer in the 26 | * documentation and/or other materials provided with the distribution. 27 | * 28 | * o Neither the name of the University of Houston System, 29 | * UT-Battelle, LLC. nor the names of its contributors may be used to 30 | * endorse or promote products derived from this software without specific 31 | * prior written permission. 32 | * 33 | * o Neither the name of Los Alamos National Security, LLC, Los Alamos 34 | * National Laboratory, LANL, the U.S. Government, nor the names of its 35 | * contributors may be used to endorse or promote products derived from 36 | * this software without specific prior written permission. 37 | * 38 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 39 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 40 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 41 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 42 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 43 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 44 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 45 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 46 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 47 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 48 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 49 | * 50 | */ 51 | #ifdef HAVE_FEATURE_EXPERIMENTAL 52 | 53 | #include "symmtest.h" 54 | 55 | #include "comms.h" 56 | 57 | #ifdef HAVE_FEATURE_PSHMEM 58 | #pragma weak shmemx_lookup_remote_addr = pshmemx_lookup_remote_addr 59 | #define shmemx_lookup_remote_addr pshmemx_lookup_remote_addr 60 | #endif /* HAVE_FEATURE_PSHMEM */ 61 | 62 | void * 63 | shmemx_lookup_remote_addr (void *addr, int pe) 64 | { 65 | return shmemi_symmetric_addr_lookup (addr, pe); 66 | } 67 | 68 | #endif /* HAVE_FEATURE_EXPERIMENTAL */ 69 | -------------------------------------------------------------------------------- /src/shmemx.fh: -------------------------------------------------------------------------------- 1 | ! 2 | ! Copyright (c) 2016 3 | ! Stony Brook University 4 | ! Copyright (c) 2015 - 2016 5 | ! Los Alamos National Security, LLC. 6 | ! Copyright (c) 2011 - 2016 7 | ! University of Houston System and UT-Battelle, LLC. 8 | ! Copyright (c) 2009 - 2016 9 | ! Silicon Graphics International Corp. SHMEM is copyrighted 10 | ! by Silicon Graphics International Corp. (SGI) The OpenSHMEM API 11 | ! (shmem) is released by Open Source Software Solutions, Inc., under an 12 | ! agreement with Silicon Graphics International Corp. (SGI). 13 | ! 14 | ! All rights reserved. 15 | ! 16 | ! Redistribution and use in source and binary forms, with or without 17 | ! modification, are permitted provided that the following conditions 18 | ! are met: 19 | ! 20 | ! o Redistributions of source code must retain the above copyright notice, 21 | ! this list of conditions and the following disclaimers. 22 | ! 23 | ! o Redistributions in binary form must reproduce the above copyright 24 | ! notice, this list of conditions and the following disclaimer in the 25 | ! documentation and/or other materials provided with the distribution. 26 | ! 27 | ! o Neither the name of the University of Houston System, 28 | ! UT-Battelle, LLC. nor the names of its contributors may be used to 29 | ! endorse or promote products derived from this software without specific 30 | ! prior written permission. 31 | ! 32 | ! o Neither the name of Los Alamos National Security, LLC, Los Alamos 33 | ! National Laboratory, LANL, the U.S. Government, nor the names of its 34 | ! contributors may be used to endorse or promote products derived from 35 | ! this software without specific prior written permission. 36 | ! 37 | ! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 38 | ! "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 39 | ! LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 40 | ! A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 41 | ! HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 42 | ! SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 43 | ! TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 44 | ! PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 45 | ! LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 46 | ! NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 47 | ! SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 48 | ! 49 | 50 | double precision :: shmemx_wtime 51 | 52 | logical :: shmemx_fence_test 53 | logical :: shmemx_quiet_test 54 | -------------------------------------------------------------------------------- /src/updown/updown.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2016 4 | * Stony Brook University 5 | * Copyright (c) 2015 - 2016 6 | * Los Alamos National Security, LLC. 7 | * Copyright (c) 2011 - 2016 8 | * University of Houston System and UT-Battelle, LLC. 9 | * Copyright (c) 2009 - 2016 10 | * Silicon Graphics International Corp. SHMEM is copyrighted 11 | * by Silicon Graphics International Corp. (SGI) The OpenSHMEM API 12 | * (shmem) is released by Open Source Software Solutions, Inc., under an 13 | * agreement with Silicon Graphics International Corp. (SGI). 14 | * 15 | * All rights reserved. 16 | * 17 | * Redistribution and use in source and binary forms, with or without 18 | * modification, are permitted provided that the following conditions 19 | * are met: 20 | * 21 | * o Redistributions of source code must retain the above copyright notice, 22 | * this list of conditions and the following disclaimers. 23 | * 24 | * o Redistributions in binary form must reproduce the above copyright 25 | * notice, this list of conditions and the following disclaimer in the 26 | * documentation and/or other materials provided with the distribution. 27 | * 28 | * o Neither the name of the University of Houston System, 29 | * UT-Battelle, LLC. nor the names of its contributors may be used to 30 | * endorse or promote products derived from this software without specific 31 | * prior written permission. 32 | * 33 | * o Neither the name of Los Alamos National Security, LLC, Los Alamos 34 | * National Laboratory, LANL, the U.S. Government, nor the names of its 35 | * contributors may be used to endorse or promote products derived from 36 | * this software without specific prior written permission. 37 | * 38 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 39 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 40 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 41 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 42 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 43 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 44 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 45 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 46 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 47 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 48 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 49 | * 50 | */ 51 | 52 | 53 | #ifndef _UPDOWN_H 54 | #define _UPDOWN_H 1 55 | 56 | /* empty */ 57 | 58 | #endif /* _UPDOWN_H */ 59 | -------------------------------------------------------------------------------- /src/uthash/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2005-2013, Troy D. Hanson http://troydhanson.github.com/uthash/ 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | 10 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 11 | IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 12 | TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 13 | PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 14 | OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 15 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 16 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 17 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 18 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 19 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 20 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 21 | 22 | -------------------------------------------------------------------------------- /src/utils/clock.c: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2016 4 | * Stony Brook University 5 | * Copyright (c) 2015 - 2016 6 | * Los Alamos National Security, LLC. 7 | * Copyright (c) 2011 - 2016 8 | * University of Houston System and UT-Battelle, LLC. 9 | * Copyright (c) 2009 - 2016 10 | * Silicon Graphics International Corp. SHMEM is copyrighted 11 | * by Silicon Graphics International Corp. (SGI) The OpenSHMEM API 12 | * (shmem) is released by Open Source Software Solutions, Inc., under an 13 | * agreement with Silicon Graphics International Corp. (SGI). 14 | * 15 | * All rights reserved. 16 | * 17 | * Redistribution and use in source and binary forms, with or without 18 | * modification, are permitted provided that the following conditions 19 | * are met: 20 | * 21 | * o Redistributions of source code must retain the above copyright notice, 22 | * this list of conditions and the following disclaimers. 23 | * 24 | * o Redistributions in binary form must reproduce the above copyright 25 | * notice, this list of conditions and the following disclaimer in the 26 | * documentation and/or other materials provided with the distribution. 27 | * 28 | * o Neither the name of the University of Houston System, 29 | * UT-Battelle, LLC. nor the names of its contributors may be used to 30 | * endorse or promote products derived from this software without specific 31 | * prior written permission. 32 | * 33 | * o Neither the name of Los Alamos National Security, LLC, Los Alamos 34 | * National Laboratory, LANL, the U.S. Government, nor the names of its 35 | * contributors may be used to endorse or promote products derived from 36 | * this software without specific prior written permission. 37 | * 38 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 39 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 40 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 41 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 42 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 43 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 44 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 45 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 46 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 47 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 48 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 49 | * 50 | */ 51 | 52 | 53 | #include 54 | #include 55 | #include 56 | #include 57 | 58 | #include "trace.h" 59 | 60 | #include "utils.h" 61 | 62 | /** 63 | * record start of program run 64 | */ 65 | static double epoch; 66 | 67 | /** 68 | * return number of (fractional) seconds 69 | * since program started 70 | */ 71 | static inline double 72 | read_clock (void) 73 | { 74 | struct timeval tv; 75 | double t; 76 | int s; 77 | 78 | s = gettimeofday (&tv, (struct timezone *) NULL); 79 | if (EXPR_UNLIKELY (s != 0)) { 80 | shmemi_trace (SHMEM_LOG_FATAL, 81 | "internal error: can't read system clock (%s)", 82 | strerror (errno) 83 | ); 84 | return 0.0; 85 | /* NOT REACHED */ 86 | } 87 | 88 | t = (double) tv.tv_sec; 89 | t += (double) tv.tv_usec / 1000000.0; 90 | 91 | return t; 92 | } 93 | 94 | /** 95 | * start the clock running 96 | */ 97 | void 98 | shmemi_elapsed_clock_init (void) 99 | { 100 | epoch = read_clock (); 101 | } 102 | 103 | /** 104 | * stop the clock 105 | */ 106 | void 107 | shmemi_elapsed_clock_finalize (void) 108 | { 109 | return; 110 | } 111 | 112 | /** 113 | * read the current run time 114 | */ 115 | double 116 | shmemi_elapsed_clock_get (void) 117 | { 118 | double now = read_clock (); 119 | 120 | return now - epoch; 121 | } 122 | -------------------------------------------------------------------------------- /src/utils/clock.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2016 4 | * Stony Brook University 5 | * Copyright (c) 2015 - 2016 6 | * Los Alamos National Security, LLC. 7 | * Copyright (c) 2011 - 2016 8 | * University of Houston System and UT-Battelle, LLC. 9 | * Copyright (c) 2009 - 2016 10 | * Silicon Graphics International Corp. SHMEM is copyrighted 11 | * by Silicon Graphics International Corp. (SGI) The OpenSHMEM API 12 | * (shmem) is released by Open Source Software Solutions, Inc., under an 13 | * agreement with Silicon Graphics International Corp. (SGI). 14 | * 15 | * All rights reserved. 16 | * 17 | * Redistribution and use in source and binary forms, with or without 18 | * modification, are permitted provided that the following conditions 19 | * are met: 20 | * 21 | * o Redistributions of source code must retain the above copyright notice, 22 | * this list of conditions and the following disclaimers. 23 | * 24 | * o Redistributions in binary form must reproduce the above copyright 25 | * notice, this list of conditions and the following disclaimer in the 26 | * documentation and/or other materials provided with the distribution. 27 | * 28 | * o Neither the name of the University of Houston System, 29 | * UT-Battelle, LLC. nor the names of its contributors may be used to 30 | * endorse or promote products derived from this software without specific 31 | * prior written permission. 32 | * 33 | * o Neither the name of Los Alamos National Security, LLC, Los Alamos 34 | * National Laboratory, LANL, the U.S. Government, nor the names of its 35 | * contributors may be used to endorse or promote products derived from 36 | * this software without specific prior written permission. 37 | * 38 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 39 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 40 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 41 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 42 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 43 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 44 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 45 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 46 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 47 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 48 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 49 | * 50 | */ 51 | 52 | 53 | #ifndef _CLOCK_H 54 | #define _CLOCK_H 1 55 | 56 | /* 57 | * start/stop the clock subsystem 58 | * 59 | */ 60 | extern void shmemi_elapsed_clock_init (void); 61 | extern void shmemi_elapsed_clock_finalize (void); 62 | 63 | /* 64 | * read the clock to see how much time has elapsed 65 | * 66 | */ 67 | extern double shmemi_elapsed_clock_get (void); 68 | 69 | #endif /* _CLOCK_H */ 70 | -------------------------------------------------------------------------------- /src/utils/exe.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2016 4 | * Stony Brook University 5 | * Copyright (c) 2015 - 2016 6 | * Los Alamos National Security, LLC. 7 | * Copyright (c) 2011 - 2016 8 | * University of Houston System and UT-Battelle, LLC. 9 | * Copyright (c) 2009 - 2016 10 | * Silicon Graphics International Corp. SHMEM is copyrighted 11 | * by Silicon Graphics International Corp. (SGI) The OpenSHMEM API 12 | * (shmem) is released by Open Source Software Solutions, Inc., under an 13 | * agreement with Silicon Graphics International Corp. (SGI). 14 | * 15 | * All rights reserved. 16 | * 17 | * Redistribution and use in source and binary forms, with or without 18 | * modification, are permitted provided that the following conditions 19 | * are met: 20 | * 21 | * o Redistributions of source code must retain the above copyright notice, 22 | * this list of conditions and the following disclaimers. 23 | * 24 | * o Redistributions in binary form must reproduce the above copyright 25 | * notice, this list of conditions and the following disclaimer in the 26 | * documentation and/or other materials provided with the distribution. 27 | * 28 | * o Neither the name of the University of Houston System, 29 | * UT-Battelle, LLC. nor the names of its contributors may be used to 30 | * endorse or promote products derived from this software without specific 31 | * prior written permission. 32 | * 33 | * o Neither the name of Los Alamos National Security, LLC, Los Alamos 34 | * National Laboratory, LANL, the U.S. Government, nor the names of its 35 | * contributors may be used to endorse or promote products derived from 36 | * this software without specific prior written permission. 37 | * 38 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 39 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 40 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 41 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 42 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 43 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 44 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 45 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 46 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 47 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 48 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 49 | * 50 | */ 51 | 52 | 53 | #ifndef _EXE_H 54 | #define _EXE_H 1 55 | 56 | /* 57 | * inspect our own executable to find out what it is 58 | */ 59 | extern void shmemi_executable_init (void); 60 | extern void shmemi_executable_finalize (void); 61 | 62 | #endif /* _EXE_H */ 63 | -------------------------------------------------------------------------------- /src/utils/ping.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2016 4 | * Stony Brook University 5 | * Copyright (c) 2015 - 2016 6 | * Los Alamos National Security, LLC. 7 | * Copyright (c) 2011 - 2016 8 | * University of Houston System and UT-Battelle, LLC. 9 | * Copyright (c) 2009 - 2016 10 | * Silicon Graphics International Corp. SHMEM is copyrighted 11 | * by Silicon Graphics International Corp. (SGI) The OpenSHMEM API 12 | * (shmem) is released by Open Source Software Solutions, Inc., under an 13 | * agreement with Silicon Graphics International Corp. (SGI). 14 | * 15 | * All rights reserved. 16 | * 17 | * Redistribution and use in source and binary forms, with or without 18 | * modification, are permitted provided that the following conditions 19 | * are met: 20 | * 21 | * o Redistributions of source code must retain the above copyright notice, 22 | * this list of conditions and the following disclaimers. 23 | * 24 | * o Redistributions in binary form must reproduce the above copyright 25 | * notice, this list of conditions and the following disclaimer in the 26 | * documentation and/or other materials provided with the distribution. 27 | * 28 | * o Neither the name of the University of Houston System, 29 | * UT-Battelle, LLC. nor the names of its contributors may be used to 30 | * endorse or promote products derived from this software without specific 31 | * prior written permission. 32 | * 33 | * o Neither the name of Los Alamos National Security, LLC, Los Alamos 34 | * National Laboratory, LANL, the U.S. Government, nor the names of its 35 | * contributors may be used to endorse or promote products derived from 36 | * this software without specific prior written permission. 37 | * 38 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 39 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 40 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 41 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 42 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 43 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 44 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 45 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 46 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 47 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 48 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 49 | * 50 | */ 51 | 52 | 53 | #ifndef _PING_H 54 | #define _PING_H 1 55 | 56 | /* 57 | * initialize the ping subsystem 58 | */ 59 | extern void shmemi_ping_init (void); 60 | 61 | /* 62 | * set the amount of time to wait 63 | */ 64 | extern void shmemi_set_ping_timeout (double secs); 65 | 66 | /* 67 | * set & clear alarms 68 | */ 69 | extern void shmemi_ping_set_alarm (void); 70 | extern void shmemi_ping_clear_alarm (void); 71 | 72 | #endif /* _PING_H */ 73 | -------------------------------------------------------------------------------- /src/utils/state.c: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2016 4 | * Stony Brook University 5 | * Copyright (c) 2015 - 2016 6 | * Los Alamos National Security, LLC. 7 | * Copyright (c) 2011 - 2016 8 | * University of Houston System and UT-Battelle, LLC. 9 | * Copyright (c) 2009 - 2016 10 | * Silicon Graphics International Corp. SHMEM is copyrighted 11 | * by Silicon Graphics International Corp. (SGI) The OpenSHMEM API 12 | * (shmem) is released by Open Source Software Solutions, Inc., under an 13 | * agreement with Silicon Graphics International Corp. (SGI). 14 | * 15 | * All rights reserved. 16 | * 17 | * Redistribution and use in source and binary forms, with or without 18 | * modification, are permitted provided that the following conditions 19 | * are met: 20 | * 21 | * o Redistributions of source code must retain the above copyright notice, 22 | * this list of conditions and the following disclaimers. 23 | * 24 | * o Redistributions in binary form must reproduce the above copyright 25 | * notice, this list of conditions and the following disclaimer in the 26 | * documentation and/or other materials provided with the distribution. 27 | * 28 | * o Neither the name of the University of Houston System, 29 | * UT-Battelle, LLC. nor the names of its contributors may be used to 30 | * endorse or promote products derived from this software without specific 31 | * prior written permission. 32 | * 33 | * o Neither the name of Los Alamos National Security, LLC, Los Alamos 34 | * National Laboratory, LANL, the U.S. Government, nor the names of its 35 | * contributors may be used to endorse or promote products derived from 36 | * this software without specific prior written permission. 37 | * 38 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 39 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 40 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 41 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 42 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 43 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 44 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 45 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 46 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 47 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 48 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 49 | * 50 | */ 51 | 52 | 53 | #include "state.h" 54 | #include "utils.h" 55 | 56 | /** 57 | * initialize the PE's state (this is all we need to initialize) 58 | */ 59 | 60 | shmem_state_t shmemi_state = { 61 | .pe_status = PE_UNINITIALIZED 62 | }; 63 | 64 | /** 65 | * PE status and its human description 66 | */ 67 | 68 | struct state_desc 69 | { 70 | pe_status_t s; 71 | const char *desc; 72 | }; 73 | 74 | /** 75 | * table of known PE status 76 | */ 77 | 78 | static struct state_desc d[] = { 79 | { PE_UNINITIALIZED, "PE has not been initialized yet" }, 80 | { PE_UNKNOWN, "I have no information about PE" }, 81 | { PE_RUNNING, "PE is running" }, 82 | { PE_SHUTDOWN, "PE has been cleanly shut down" }, 83 | { PE_FAILED, "PE has failed" }, 84 | }; 85 | 86 | static const int nd = TABLE_SIZE (d); 87 | 88 | /** 89 | * translate PE status to human description 90 | */ 91 | 92 | const char * 93 | shmemi_state_as_string (pe_status_t s) 94 | { 95 | struct state_desc *dp = d; 96 | int i; 97 | 98 | for (i = 0; i < nd; i += 1) { 99 | if (s == dp->s) { 100 | return dp->desc; 101 | /* NOT REACHED */ 102 | } 103 | dp += 1; 104 | } 105 | 106 | return "unknown state"; 107 | } 108 | -------------------------------------------------------------------------------- /src/utils/unitparse.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2016 4 | * Stony Brook University 5 | * Copyright (c) 2015 - 2016 6 | * Los Alamos National Security, LLC. 7 | * Copyright (c) 2011 - 2016 8 | * University of Houston System and UT-Battelle, LLC. 9 | * Copyright (c) 2009 - 2016 10 | * Silicon Graphics International Corp. SHMEM is copyrighted 11 | * by Silicon Graphics International Corp. (SGI) The OpenSHMEM API 12 | * (shmem) is released by Open Source Software Solutions, Inc., under an 13 | * agreement with Silicon Graphics International Corp. (SGI). 14 | * 15 | * All rights reserved. 16 | * 17 | * Redistribution and use in source and binary forms, with or without 18 | * modification, are permitted provided that the following conditions 19 | * are met: 20 | * 21 | * o Redistributions of source code must retain the above copyright notice, 22 | * this list of conditions and the following disclaimers. 23 | * 24 | * o Redistributions in binary form must reproduce the above copyright 25 | * notice, this list of conditions and the following disclaimer in the 26 | * documentation and/or other materials provided with the distribution. 27 | * 28 | * o Neither the name of the University of Houston System, 29 | * UT-Battelle, LLC. nor the names of its contributors may be used to 30 | * endorse or promote products derived from this software without specific 31 | * prior written permission. 32 | * 33 | * o Neither the name of Los Alamos National Security, LLC, Los Alamos 34 | * National Laboratory, LANL, the U.S. Government, nor the names of its 35 | * contributors may be used to endorse or promote products derived from 36 | * this software without specific prior written permission. 37 | * 38 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 39 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 40 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 41 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 42 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 43 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 44 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 45 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 46 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 47 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 48 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 49 | * 50 | */ 51 | #ifndef _UNITPARSE_H 52 | #define _UNITPARSE_H 1 53 | 54 | #include 55 | 56 | extern void shmemi_parse_size (char *size_str, size_t *bytes_p, int *ok_p); 57 | 58 | #endif /* _UNITPARSE_H */ 59 | -------------------------------------------------------------------------------- /src/utils/version.c: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2016 4 | * Stony Brook University 5 | * Copyright (c) 2015 - 2016 6 | * Los Alamos National Security, LLC. 7 | * Copyright (c) 2011 - 2016 8 | * University of Houston System and UT-Battelle, LLC. 9 | * Copyright (c) 2009 - 2016 10 | * Silicon Graphics International Corp. SHMEM is copyrighted 11 | * by Silicon Graphics International Corp. (SGI) The OpenSHMEM API 12 | * (shmem) is released by Open Source Software Solutions, Inc., under an 13 | * agreement with Silicon Graphics International Corp. (SGI). 14 | * 15 | * All rights reserved. 16 | * 17 | * Redistribution and use in source and binary forms, with or without 18 | * modification, are permitted provided that the following conditions 19 | * are met: 20 | * 21 | * o Redistributions of source code must retain the above copyright notice, 22 | * this list of conditions and the following disclaimers. 23 | * 24 | * o Redistributions in binary form must reproduce the above copyright 25 | * notice, this list of conditions and the following disclaimer in the 26 | * documentation and/or other materials provided with the distribution. 27 | * 28 | * o Neither the name of the University of Houston System, 29 | * UT-Battelle, LLC. nor the names of its contributors may be used to 30 | * endorse or promote products derived from this software without specific 31 | * prior written permission. 32 | * 33 | * o Neither the name of Los Alamos National Security, LLC, Los Alamos 34 | * National Laboratory, LANL, the U.S. Government, nor the names of its 35 | * contributors may be used to endorse or promote products derived from 36 | * this software without specific prior written permission. 37 | * 38 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 39 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 40 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 41 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 42 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 43 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 44 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 45 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 46 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 47 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 48 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 49 | * 50 | */ 51 | 52 | 53 | #include "shmem.h" 54 | 55 | /** 56 | * OpenSHMEM has a major.minor release number. Return 0 if 57 | * successful, -1 otherwise 58 | * 59 | */ 60 | 61 | int 62 | shmemi_version (int *major, int *minor) 63 | { 64 | #if defined(SHMEM_MAJOR_VERSION) && defined(SHMEM_MINOR_VERSION) 65 | *major = SHMEM_MAJOR_VERSION; 66 | *minor = SHMEM_MINOR_VERSION; 67 | return 0; 68 | #else 69 | return -1; 70 | #endif /* SHMEM_MAJOR_VERSION && SHMEM_MINOR_VERSION */ 71 | } 72 | -------------------------------------------------------------------------------- /src/utils/version.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2016 4 | * Stony Brook University 5 | * Copyright (c) 2015 - 2016 6 | * Los Alamos National Security, LLC. 7 | * Copyright (c) 2011 - 2016 8 | * University of Houston System and UT-Battelle, LLC. 9 | * Copyright (c) 2009 - 2016 10 | * Silicon Graphics International Corp. SHMEM is copyrighted 11 | * by Silicon Graphics International Corp. (SGI) The OpenSHMEM API 12 | * (shmem) is released by Open Source Software Solutions, Inc., under an 13 | * agreement with Silicon Graphics International Corp. (SGI). 14 | * 15 | * All rights reserved. 16 | * 17 | * Redistribution and use in source and binary forms, with or without 18 | * modification, are permitted provided that the following conditions 19 | * are met: 20 | * 21 | * o Redistributions of source code must retain the above copyright notice, 22 | * this list of conditions and the following disclaimers. 23 | * 24 | * o Redistributions in binary form must reproduce the above copyright 25 | * notice, this list of conditions and the following disclaimer in the 26 | * documentation and/or other materials provided with the distribution. 27 | * 28 | * o Neither the name of the University of Houston System, 29 | * UT-Battelle, LLC. nor the names of its contributors may be used to 30 | * endorse or promote products derived from this software without specific 31 | * prior written permission. 32 | * 33 | * o Neither the name of Los Alamos National Security, LLC, Los Alamos 34 | * National Laboratory, LANL, the U.S. Government, nor the names of its 35 | * contributors may be used to endorse or promote products derived from 36 | * this software without specific prior written permission. 37 | * 38 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 39 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 40 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 41 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 42 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 43 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 44 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 45 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 46 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 47 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 48 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 49 | * 50 | */ 51 | 52 | 53 | #ifndef _VERSION_H 54 | #define _VERSION_H 1 55 | 56 | extern int shmemi_version (int *major, int *minor); 57 | 58 | #endif /* _VERSION_H */ 59 | -------------------------------------------------------------------------------- /src/wtime/shmem_wtime.c: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2016 4 | * Stony Brook University 5 | * Copyright (c) 2015 - 2016 6 | * Los Alamos National Security, LLC. 7 | * Copyright (c) 2011 - 2016 8 | * University of Houston System and UT-Battelle, LLC. 9 | * Copyright (c) 2009 - 2016 10 | * Silicon Graphics International Corp. SHMEM is copyrighted 11 | * by Silicon Graphics International Corp. (SGI) The OpenSHMEM API 12 | * (shmem) is released by Open Source Software Solutions, Inc., under an 13 | * agreement with Silicon Graphics International Corp. (SGI). 14 | * 15 | * All rights reserved. 16 | * 17 | * Redistribution and use in source and binary forms, with or without 18 | * modification, are permitted provided that the following conditions 19 | * are met: 20 | * 21 | * o Redistributions of source code must retain the above copyright notice, 22 | * this list of conditions and the following disclaimers. 23 | * 24 | * o Redistributions in binary form must reproduce the above copyright 25 | * notice, this list of conditions and the following disclaimer in the 26 | * documentation and/or other materials provided with the distribution. 27 | * 28 | * o Neither the name of the University of Houston System, 29 | * UT-Battelle, LLC. nor the names of its contributors may be used to 30 | * endorse or promote products derived from this software without specific 31 | * prior written permission. 32 | * 33 | * o Neither the name of Los Alamos National Security, LLC, Los Alamos 34 | * National Laboratory, LANL, the U.S. Government, nor the names of its 35 | * contributors may be used to endorse or promote products derived from 36 | * this software without specific prior written permission. 37 | * 38 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 39 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 40 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 41 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 42 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 43 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 44 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 45 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 46 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 47 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 48 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 49 | * 50 | */ 51 | #if defined(HAVE_FEATURE_EXPERIMENTAL) 52 | 53 | #ifdef HAVE_FEATURE_PSHMEM 54 | #pragma weak shmemx_wtime = pshmemx_wtime 55 | #define shmemx_wtime pshmemx_wtime 56 | #endif /* HAVE_FEATURE_PSHMEM */ 57 | 58 | #include 59 | #include 60 | 61 | double 62 | shmemx_wtime (void) 63 | { 64 | struct timeval t; 65 | 66 | if (gettimeofday (&t, NULL) != 0) { 67 | return 0.0; 68 | } 69 | 70 | return ((t.tv_sec * 1e6) + t.tv_usec) / 1e6; 71 | } 72 | 73 | #endif /* HAVE_FEATURE_EXPERIMENTAL */ 74 | --------------------------------------------------------------------------------