├── .github └── workflows │ └── github_actions.yml ├── .gitignore ├── .travis.yml ├── CHANGELOG.md ├── CMakeLists.txt ├── DISCLAIMER ├── LICENSE ├── LinAlg └── lapack+blas │ ├── CMakeLists.txt │ ├── README │ ├── dummy.c │ ├── gal_cgemm.f │ ├── gal_daxpy.f │ ├── gal_dcabs1.f │ ├── gal_dcopy.f │ ├── gal_ddot.f │ ├── gal_dgemm.f │ ├── gal_dgemv.f │ ├── gal_dger.f │ ├── gal_dgetf2.f │ ├── gal_dgetrf.f │ ├── gal_dgetrs.f │ ├── gal_disnan.f │ ├── gal_dlacpy.f │ ├── gal_dlae2.f │ ├── gal_dlaev2.f │ ├── gal_dlaisnan.f │ ├── gal_dlamch.f │ ├── gal_dlanst.f │ ├── gal_dlansy.f │ ├── gal_dlapy2.f │ ├── gal_dlarf.f │ ├── gal_dlarfb.f │ ├── gal_dlarfg.f │ ├── gal_dlarft.f │ ├── gal_dlartg.f │ ├── gal_dlascl.f │ ├── gal_dlaset.f │ ├── gal_dlasr.f │ ├── gal_dlasrt.f │ ├── gal_dlassq.f │ ├── gal_dlaswp.f │ ├── gal_dlatrd.f │ ├── gal_dnrm2.f │ ├── gal_dorg2l.f │ ├── gal_dorg2r.f │ ├── gal_dorgql.f │ ├── gal_dorgqr.f │ ├── gal_dorgtr.f │ ├── gal_dpotf2.f │ ├── gal_dpotrf.f │ ├── gal_dscal.f │ ├── gal_dsteqr.f │ ├── gal_dsterf.f │ ├── gal_dswap.f │ ├── gal_dsyev.f │ ├── gal_dsygs2.f │ ├── gal_dsygst.f │ ├── gal_dsygv.f │ ├── gal_dsymm.f │ ├── gal_dsymv.f │ ├── gal_dsyr2.f │ ├── gal_dsyr2k.f │ ├── gal_dsyrk.f │ ├── gal_dsytd2.f │ ├── gal_dsytrd.f │ ├── gal_dtrmm.f │ ├── gal_dtrmv.f │ ├── gal_dtrsm.f │ ├── gal_dtrsv.f │ ├── gal_idamax.f │ ├── gal_ieeeck.f │ ├── gal_iladlc.f │ ├── gal_iladlr.f │ ├── gal_ilaenv.f │ ├── gal_iparmq.f │ ├── gal_lsame.f │ ├── gal_sgemm.f │ ├── gal_xerbla.f │ ├── gal_zaxpy.f │ ├── gal_zgemm.f │ ├── galinalg.fh │ ├── galinalg.h │ ├── xgemm.c │ └── xgemm.h ├── Makefile.am ├── README.md ├── armci ├── INSTALL ├── Makefile.am ├── NEWS ├── README ├── configure.ac ├── doc │ └── armci.pdf ├── examples │ ├── README │ ├── benchmarks │ │ ├── RandomAccess │ │ │ ├── ra_common.h │ │ │ ├── simple │ │ │ │ └── simple.c │ │ │ ├── smp_bucket │ │ │ │ └── smp_bucket.c │ │ │ └── timing.c │ │ ├── cg │ │ │ └── armci_sharedmemory │ │ │ │ ├── cg.c │ │ │ │ ├── compute.c │ │ │ │ ├── generateinput.c │ │ │ │ ├── generateinput.f │ │ │ │ ├── matrix_med.bin │ │ │ │ ├── read_input.c │ │ │ │ └── timing.c │ │ └── lu │ │ │ ├── README │ │ │ ├── armci_blocking │ │ │ ├── lu-b-bc.c │ │ │ ├── lu-block.c │ │ │ ├── lu.c │ │ │ └── timing.c │ │ │ ├── armci_multithreaded │ │ │ ├── lu-block-th-nbget.c │ │ │ ├── lu-block-th.c │ │ │ └── timing.c │ │ │ ├── armci_nonblocking │ │ │ ├── lu_nb_get.c │ │ │ ├── lu_nb_put.c │ │ │ └── timing.c │ │ │ └── pthreads │ │ │ ├── barrier.c │ │ │ ├── barrier.h │ │ │ ├── errors.h │ │ │ ├── lu-thread.c │ │ │ └── timing.c │ ├── examples_config.h │ ├── features │ │ ├── aggregation │ │ │ ├── README │ │ │ ├── simple │ │ │ │ └── simple.c │ │ │ └── sparse_matvecmul │ │ │ │ └── sparse_matvecmul.c │ │ ├── concurrency │ │ │ ├── README │ │ │ ├── multidma │ │ │ │ └── multidma.c │ │ │ └── simple │ │ │ │ └── comdegree.c │ │ ├── gpc │ │ │ └── hashtable │ │ │ │ ├── DistHashmap.cc │ │ │ │ ├── DistHashmap.h │ │ │ │ ├── GPCHashmap.cc │ │ │ │ ├── GPCHashmap.h │ │ │ │ ├── GPCHashmapHandler.cc │ │ │ │ ├── HashFunctions.cc │ │ │ │ ├── HashUtil.cc │ │ │ │ ├── Hash_common.h │ │ │ │ ├── README │ │ │ │ ├── Util.h │ │ │ │ ├── hash_map.h │ │ │ │ ├── sample.txt │ │ │ │ └── test_hashtable.cc │ │ ├── non-blocking │ │ │ ├── README │ │ │ ├── overlap │ │ │ │ └── overlap.c │ │ │ └── simple │ │ │ │ └── simple.c │ │ ├── notification │ │ │ ├── README │ │ │ └── simple │ │ │ │ └── testnotify.c │ │ ├── proc_affinity │ │ │ ├── README │ │ │ ├── computation_impact │ │ │ │ └── computation_impact.c │ │ │ └── simple │ │ │ │ └── simple.c │ │ └── symmetric_memory │ │ │ └── simple │ │ │ └── simple.c │ └── simpleApps │ │ └── transp1D-c.c ├── f90 │ ├── armci_mem_f90.f90 │ ├── armci_mov_f90.f90 │ ├── armci_nbmov.f90 │ ├── armci_types.f90 │ ├── armcif90.c │ ├── arraydesc.h │ ├── arraywrap.c │ ├── checkput.f90 │ ├── definekind.f90 │ ├── definekind_cray.f90 │ ├── kinds.f90 │ ├── testa.F90 │ ├── testa_init.f90 │ ├── testanb.f90 │ ├── testfa_type.f90 │ └── testnbfa_type.f90 ├── m4 │ └── armci_dummy.m4 ├── src │ ├── collectives │ │ └── message.c │ ├── common │ │ ├── aggregate.c │ │ ├── armci.c │ │ ├── async.c │ │ ├── capi.c │ │ ├── ccopy.c │ │ ├── clusterinfo.c │ │ ├── ds-shared.c │ │ ├── gpc.c │ │ ├── groups.c │ │ ├── iterator.c │ │ ├── pack.c │ │ ├── regions.c │ │ ├── request.c │ │ ├── signaltrap.c │ │ ├── spawn.c │ │ ├── timer.c │ │ └── utils.c │ ├── devices │ │ ├── mpi-mt │ │ │ ├── mpi2.h │ │ │ ├── mpi2_client.c │ │ │ └── mpi2_server.c │ │ ├── mpi-spawn │ │ │ ├── mpi2.h │ │ │ ├── mpi2_client.c │ │ │ └── mpi2_server.c │ │ ├── openib │ │ │ ├── armci-vapi.h │ │ │ ├── cbuf.c │ │ │ ├── cbuf.h │ │ │ ├── openib.c │ │ │ ├── pendbufs.c │ │ │ ├── pendbufs.h │ │ │ └── rtinfo.c │ │ └── sockets │ │ │ ├── dataserv.c │ │ │ ├── sockets.c │ │ │ └── sockets.h │ ├── ft │ │ ├── armci_chkpt.c │ │ ├── armci_chkpt.h │ │ ├── armci_storage.c │ │ └── armci_storage.h │ ├── include │ │ ├── acc.h │ │ ├── armci.h │ │ ├── armci_shmem.h │ │ ├── armcip.h │ │ ├── asm-ppc.h │ │ ├── atomics-i386.h │ │ ├── copy.h │ │ ├── gpc.h │ │ ├── iterator.h │ │ ├── kr_malloc.h │ │ ├── locks.h │ │ ├── memlock.h │ │ ├── message.h │ │ ├── parmci.h │ │ ├── request.h │ │ ├── semaphores.h │ │ ├── shmalloc.h │ │ ├── shmlimit.h │ │ ├── signaltrap.h │ │ ├── spinlock.h │ │ └── utils.h │ ├── locks │ │ ├── locks.c │ │ ├── memlock.c │ │ ├── mutex.c │ │ └── semaphores.c │ ├── memory │ │ ├── buffers.c │ │ ├── kr_malloc.c │ │ ├── memory.c │ │ ├── shmalloc.c │ │ ├── shmem.c │ │ ├── shmlimit.c │ │ └── winshmem.c │ ├── progress │ │ ├── fence.c │ │ └── wait.c │ ├── util │ │ ├── armci_cpp │ │ └── threads.c │ └── xfer │ │ ├── caccumulate.c │ │ ├── rmw.c │ │ ├── strided.c │ │ └── vector.c ├── testing │ ├── fttest.c │ ├── gpctest.c │ ├── ipctest.c │ ├── msgcheck.c │ ├── perf.c │ ├── perf2.c │ ├── perf_aggr.c │ ├── perf_nb.c │ ├── perf_strided.c │ ├── rpl_armci_msg_finalize.c │ ├── rpl_armci_msg_init.c │ ├── shmclean.c │ ├── shmtest.c │ ├── simple.c │ ├── simplelock.c │ ├── test.c │ ├── test2.c │ ├── test_groups.c │ ├── test_mt.c │ ├── testitr.c │ ├── testnotify.c │ └── timer.h └── tools │ ├── armci-config.in │ ├── armci-config.in.m4sh │ ├── armci_prof.c │ ├── armci_profile.c │ ├── armci_profile.h │ ├── armci_trace.c │ ├── capi_gen.py │ └── prof_gen.py ├── autogen.sh ├── benchmarks ├── Makefile ├── README ├── README.first ├── config.fh ├── config.h ├── testutil.fh └── util.c ├── cmake ├── config.h.in ├── f2c_dummy.h.in ├── farg.h.in ├── ga-checks.cmake ├── ga-compiler-options.cmake ├── ga-linalg.cmake ├── ga-utils.cmake ├── ga_linalg.h.in ├── globalarrays-config.cmake.in ├── linalg-modules │ ├── FindAccelerate.cmake │ ├── FindBLAS.cmake │ ├── FindBLIS.cmake │ ├── FindFLAME.cmake │ ├── FindIBMESSL.cmake │ ├── FindILP64.cmake │ ├── FindIntelMKL.cmake │ ├── FindLAPACK.cmake │ ├── FindOpenBLAS.cmake │ ├── FindReferenceBLAS.cmake │ ├── FindReferenceLAPACK.cmake │ ├── FindReferenceScaLAPACK.cmake │ ├── FindScaLAPACK.cmake │ ├── FindStandardFortran.cmake │ ├── FindTBB.cmake │ ├── LICENSE.txt │ ├── LinAlgModulesMacros.cmake │ └── util │ │ ├── BLASUtilities.cmake │ │ ├── CommonFunctions.cmake │ │ ├── IntrospectMPI.cmake │ │ ├── IntrospectOpenMP.cmake │ │ ├── LAPACKUtilities.cmake │ │ ├── ScaLAPACKUtilities.cmake │ │ ├── blis_int_size.c │ │ ├── func_check.c │ │ ├── get_mpi_vendor.c │ │ ├── ilp64_checker.c │ │ ├── lapack_ilp64_checker.c │ │ └── openblas_int_size.c ├── mafdecls.fh.in ├── matypes.h.in └── typesf2c.h.in ├── cmx ├── CMakeLists.txt ├── src-armci │ ├── armci.c │ ├── armci.h │ ├── capi.c │ ├── groups.c │ ├── groups.h │ ├── iterator.c │ ├── iterator.h │ ├── message.c │ ├── message.h │ ├── parmci.h │ ├── reg_entry.c │ ├── reg_entry.h │ └── testing │ │ └── testwrap.c ├── src-common │ ├── acc.h │ └── cmx.h ├── src-mpi-pr │ ├── Makefile.inc │ ├── NOTES.md │ ├── cmx.c │ ├── cmx_impl.h │ ├── groups.c │ ├── groups.h │ ├── reg_cache.c │ └── reg_cache.h ├── src-mpi-rma │ ├── cmx.c │ ├── cmx_impl.h │ ├── groups.c │ └── groups.h └── testing │ ├── perf.c │ ├── perf_amo.c │ ├── perf_contig.c │ ├── perf_strided.c │ ├── shift.c │ └── test.c ├── comex ├── CMakeLists.txt ├── Makefile.am ├── cmake │ ├── comex-utils.cmake │ └── config.h.in ├── configure.ac ├── m4 │ ├── ax_sys_weak_alias.m4 │ ├── comex_ar.m4 │ ├── comex_arg_parse.m4 │ ├── comex_blas.m4 │ ├── comex_check_func.m4 │ ├── comex_check_header.m4 │ ├── comex_enable_profile.m4 │ ├── comex_enable_sysv.m4 │ ├── comex_function.m4 │ ├── comex_mpi_test_disable.m4 │ ├── comex_mpi_unwrap.m4 │ ├── comex_mpicc.m4 │ ├── comex_mpicc_test.m4 │ ├── comex_network_setup.m4 │ ├── comex_sys_weak_alias.m4 │ ├── comex_with_help.m4 │ └── comex_with_mpi.m4 ├── src-armci │ ├── Makefile.inc │ ├── armci.c │ ├── armci.h │ ├── capi.c │ ├── groups.c │ ├── iterator.c │ ├── iterator.h │ ├── message.c │ ├── message.h │ └── parmci.h ├── src-common │ ├── acc.h │ └── comex.h ├── src-mpi-mt │ ├── Makefile.inc │ ├── NOTES.md │ ├── comex.c │ ├── comex_impl.h │ ├── groups.c │ └── groups.h ├── src-mpi-pr │ ├── Makefile.inc │ ├── NOTES.md │ ├── comex.c │ ├── comex_impl.h │ ├── groups.c │ ├── groups.h │ ├── hello.c │ ├── reg_cache.c │ └── reg_cache.h ├── src-mpi-pt │ ├── Makefile.inc │ ├── NOTES.md │ ├── comex.c │ ├── comex_impl.h │ ├── groups.c │ ├── groups.h │ ├── hello.c │ ├── reg_cache.c │ └── reg_cache.h ├── src-mpi │ ├── Makefile.inc │ ├── NOTES.md │ ├── comex.c │ ├── comex_impl.h │ ├── groups.c │ └── groups.h ├── src-mpi3 │ ├── Makefile.inc │ ├── NOTES.md │ ├── comex.c │ ├── comex_impl.h │ ├── groups.c │ ├── groups.h │ ├── reg_win.c │ └── reg_win.h ├── src-ofa │ ├── Makefile.inc │ ├── comex.c │ ├── comex_impl.h │ ├── contig.c │ ├── device.c │ ├── device.h │ ├── fence.c │ ├── gpa.c │ ├── groups.c │ ├── groups.h │ ├── mutex.c │ ├── openib.c │ ├── openib.h │ ├── reg_cache.c │ ├── reg_cache.h │ ├── strided.c │ ├── vector.c │ └── wait.c ├── src-ofi │ ├── Makefile.inc │ ├── README │ ├── comex.c │ ├── comex_impl.h │ ├── datatype.h │ ├── env.c │ ├── env.h │ ├── fi_lock.h │ ├── groups.c │ ├── groups.h │ ├── log.h │ ├── mutex.h │ ├── ofi.h │ └── request.h ├── src-portals4 │ ├── Makefile.inc │ ├── comex.c │ ├── comex_impl.h │ ├── groups.c │ └── groups.h ├── src-template │ ├── Makefile.inc │ ├── comex.c │ ├── comex_impl.h │ ├── groups.c │ └── groups.h ├── testing │ ├── perf.c │ ├── perf_amo.c │ ├── perf_contig.c │ ├── perf_strided.c │ ├── shift.c │ ├── stats.h │ └── test.c └── tools │ ├── armci-config.in │ ├── armci-config.in.m4sh │ ├── armci_prof.c │ ├── capi_gen.py │ ├── comex-config.in │ ├── comex-config.in.m4sh │ └── prof_gen.py ├── compat └── random.c ├── configure.ac ├── doc ├── armci │ ├── armci_doc.pdf │ ├── armci_overview.pdf │ └── www │ │ └── armci_doc.htm ├── ga │ ├── Doxyfile │ ├── ga_c_api.pdf │ └── ga_doc.pdf └── style ├── ga++ ├── CMakeLists.txt ├── README ├── doc │ └── Doxyfile ├── src │ ├── GAServices.cc │ ├── GAServices.h │ ├── GlobalArray.cc │ ├── GlobalArray.h │ ├── PGroup.cc │ ├── PGroup.h │ ├── ga++.h │ ├── init_term.cc │ ├── init_term.h │ ├── overload.cc │ ├── services.cc │ └── services.h └── testing │ ├── create_irreg_test.cc │ ├── elempatch.cc │ ├── mtest.cc │ ├── ntestc.cc │ ├── testc.cc │ ├── testmult.cc │ └── thread-safe.cc ├── gaf2c ├── CMakeLists.txt ├── drand.c ├── farg.F ├── farg.h.in ├── gaf2c.c ├── testarg.c ├── testargf.f └── typesf2c.h.in ├── global ├── README ├── X │ ├── README │ ├── adjust.ed.Z │ ├── xregion.config │ ├── xregion.h │ ├── xregion_colormap.c │ ├── xregion_dialog.c │ ├── xregion_display.c │ ├── xregion_fileio.c │ ├── xregion_main.c │ ├── xregion_overview.c │ ├── xregion_pixregion.c │ ├── xregion_scrollbars.c │ ├── xregion_util.c │ ├── xregion_view.c │ └── xregion_xcmap.c ├── doc │ ├── README │ ├── Supercomputing94.pdf │ └── user.pdf ├── examples │ ├── CMakeLists.txt │ ├── boltzmann │ │ ├── README │ │ ├── boltzmann.F │ │ ├── common │ │ ├── equil.F │ │ ├── get_patch.F │ │ ├── initpar.F │ │ ├── main.F │ │ ├── printdat.F │ │ ├── properties.F │ │ ├── setup.F │ │ ├── timestep.F │ │ └── vorticity.F │ ├── conjugate_gradient │ │ ├── computeloops.F │ │ ├── finclude.h │ │ ├── ga_cg.c │ │ ├── matvecmul.c │ │ └── read_input.c │ ├── lennard-jones │ │ ├── README │ │ └── lennard.c │ ├── md_cluster │ │ ├── atom.inp │ │ ├── cell_list.F │ │ ├── cl_sim.F │ │ ├── cluster.F │ │ ├── common.fh │ │ ├── estats.F │ │ ├── factor.F │ │ ├── force.F │ │ ├── gather.F │ │ ├── grp_sim.F │ │ ├── hash.F │ │ ├── heapsort.F │ │ ├── kin.F │ │ ├── md_lj.in │ │ ├── mdinit.F │ │ ├── mdout.F │ │ ├── mdstep.F │ │ ├── newcfg.F │ │ ├── nextc.F │ │ ├── pairs.F │ │ ├── ran3.F │ │ ├── rdpar.F │ │ ├── scatter.F │ │ ├── shuffle.F │ │ ├── sort.F │ │ ├── tstats.F │ │ └── update.F │ ├── petsc.F │ └── scf │ │ ├── README │ │ ├── be.inpt │ │ ├── be16.inpt │ │ ├── cscf.h │ │ ├── ft-scf.F │ │ ├── input.F │ │ ├── integ.F │ │ ├── output.F │ │ ├── scf.F │ │ └── timer.F ├── src │ ├── CMakeLists.txt │ ├── DP.c │ ├── abstract_ops.h │ ├── base.c │ ├── base.h │ ├── capi.c │ ├── cnames.h │ ├── collect.c │ ├── complex.F │ ├── datatypes.c │ ├── decomp.c │ ├── diag.fh │ ├── elem_alg.c │ ├── fapi.c │ ├── ga-mpi.fh │ ├── ga-mpi.h │ ├── ga-papi.h │ ├── ga.h │ ├── ga_ckpt.c │ ├── ga_ckpt.h │ ├── ga_diag.F │ ├── ga_diag_seq.F │ ├── ga_diag_seqc.c │ ├── ga_iterator.h │ ├── ga_malloc.c │ ├── ga_profile.c │ ├── ga_profile.h │ ├── ga_solve_seq.c │ ├── ga_sparse.array.h │ ├── ga_symmetr.c │ ├── ga_trace.c │ ├── gacommon.h │ ├── gaconfig.h │ ├── ghosts.c │ ├── global.fh.in │ ├── global.h │ ├── global.nalg.c │ ├── global.npatch.c │ ├── global.periodic.c │ ├── global.util.c │ ├── globalp.h │ ├── hsort.scat.c │ ├── iterator.c │ ├── matmul.c │ ├── matmul.h │ ├── matrix.c │ ├── mtwister.c │ ├── mtwister.h │ ├── nbutil.c │ ├── onesided.c │ ├── peigstubs.c │ ├── rsg.F │ ├── scalapack.F │ ├── scalapack.fh │ ├── sclstubs.c │ ├── select.c │ ├── sketch.c │ ├── sparse.array.c │ ├── sparse.c │ ├── thread-safe.c │ ├── thread-safe.h │ ├── types.xh │ └── types2.xh ├── testing │ ├── CMakeLists.txt │ ├── README │ ├── big.c │ ├── bin.F │ ├── blktest.F │ ├── cache_test.c │ ├── comm_init.c │ ├── d2test.F │ ├── elempatch.c │ ├── enormous.c │ ├── ffflush.F │ ├── field-test.F │ ├── g2test.F │ ├── g3test.F │ ├── ga-mpi.c │ ├── ga_lu.c │ ├── ga_shift.F │ ├── gatscat.c │ ├── gemmtest.c │ ├── getmem.c │ ├── ghosts.F │ ├── gs_ran.c │ ├── ipc.clean.c │ ├── ipcreset │ ├── j_iter.c │ ├── jacobi.F │ ├── kaczmarz.c │ ├── laplace.c │ ├── laplace_async.c │ ├── lock.c │ ├── matrixc.c │ ├── merge.F │ ├── mir_perf1.F │ ├── mir_perf2.F │ ├── mmatrix.F │ ├── mp3.fh │ ├── mp3.h │ ├── mp3def.fh │ ├── mtest.c │ ├── mulmatpatch.F │ ├── mulmatpatchc.c │ ├── nb2test.F │ ├── nbgetput.c │ ├── nbgetput2.c │ ├── nbtest.F │ ├── nbtestc.c │ ├── ndim.F │ ├── nga-onesided.m4 │ ├── nga-patch.m4 │ ├── nga-periodic.m4 │ ├── nga-scatter.m4 │ ├── nga-util.m4 │ ├── ngatest.m4 │ ├── ngatest_src │ │ ├── ndim_GA_FILL.src │ │ ├── ndim_NGA_ACC.src │ │ ├── ndim_NGA_ADD_PATCH.src │ │ ├── ndim_NGA_COPY_PATCH.src │ │ ├── ndim_NGA_DOT_PATCH.src │ │ ├── ndim_NGA_FILL_PATCH.src │ │ ├── ndim_NGA_GATHER.src │ │ ├── ndim_NGA_GET.src │ │ ├── ndim_NGA_PERIODIC_ACC.src │ │ ├── ndim_NGA_PERIODIC_GET.src │ │ ├── ndim_NGA_PERIODIC_PUT.src │ │ ├── ndim_NGA_PUT.src │ │ ├── ndim_NGA_SCALE_PATCH.src │ │ ├── ndim_NGA_SCATTER.src │ │ ├── ndim_NGA_SCATTER_ACC.src │ │ ├── ndim_main.src │ │ ├── ndim_util.src │ │ ├── ndim_util_comm.src │ │ └── ngatest.def │ ├── normc.c │ ├── ntestc.c │ ├── ntestfc.c │ ├── overlay.F │ ├── packc.c │ ├── patch.F │ ├── patch2.F │ ├── patch_enumc.c │ ├── patch_enumf.F │ ├── perf.F │ ├── perf2.c │ ├── perfmod.F │ ├── perform.F │ ├── perform.results │ ├── pg2test.F │ ├── pg2testmatmult.F │ ├── pgtest.F │ ├── pgtestmatmult.F │ ├── print.c │ ├── rand.c │ ├── random.F │ ├── read_only.c │ ├── scan.F │ ├── scan_addc.c │ ├── scan_copyc.c │ ├── simple_groups.F │ ├── simple_groups_comm.F │ ├── simple_groups_commc.c │ ├── sparse.F │ ├── sprs_test.c │ ├── sprsmatmult.F │ ├── sprsmatvec.c │ ├── stride.F │ ├── test.F │ ├── testabstract_ops.c │ ├── testblas.F │ ├── testc.c │ ├── testeig.F │ ├── testmatmult.F │ ├── testmatmultc.c │ ├── testmult.c │ ├── testmultrect.c │ ├── testsolve.F │ ├── testsparse.c │ ├── testspd.F │ ├── testutil.fh │ ├── testutil.h │ ├── thread_perf_contig.c │ ├── thread_perf_strided.c │ ├── threadsafec.c │ ├── tiled_irreg_test.c │ ├── types-test.F │ ├── unit-tests │ │ ├── ga_abs_value.c │ │ ├── ga_acc.c │ │ ├── ga_add.c │ │ ├── ga_add_constant.c │ │ ├── ga_add_constantpatch.c │ │ ├── ga_add_diagonal.c │ │ ├── ga_add_patch.c │ │ ├── ga_copy.c │ │ ├── ga_copy2.c │ │ ├── ga_copy3.c │ │ ├── ga_copypatch.c │ │ ├── ga_copypatch2.c │ │ ├── ga_create.c │ │ ├── ga_create1.c │ │ ├── ga_create2.c │ │ ├── ga_create3.c │ │ ├── ga_create_handle.c │ │ ├── ga_create_irreg.c │ │ ├── ga_create_irreg2.c │ │ ├── ga_create_irreg3.c │ │ ├── ga_destroy.c │ │ ├── ga_dgop.c │ │ ├── ga_dot.c │ │ ├── ga_duplicate.c │ │ ├── ga_elem_divide.c │ │ ├── ga_elem_dividepatch.c │ │ ├── ga_elem_maximum.c │ │ ├── ga_elem_maximumpatch.c │ │ ├── ga_elem_minimum.c │ │ ├── ga_elem_minimumpatch.c │ │ ├── ga_elem_multiply.c │ │ ├── ga_elem_multiplypatch.c │ │ ├── ga_fill.c │ │ ├── ga_fillpatch.c │ │ ├── ga_fillpatch1.c │ │ ├── ga_gather.c │ │ ├── ga_gather2.c │ │ ├── ga_gather3.c │ │ ├── ga_get.c │ │ ├── ga_get_blockinfo.c │ │ ├── ga_get_diagonal.c │ │ ├── ga_igop.c │ │ ├── ga_igop2.c │ │ ├── ga_inquire.c │ │ ├── ga_intialize.c │ │ ├── ga_lgop.c │ │ ├── ga_median.c │ │ ├── ga_ndim.c │ │ ├── ga_ndim2.c │ │ ├── ga_nnodes.c │ │ ├── ga_nodeid.c │ │ ├── ga_pgroup_brdcst.c │ │ ├── ga_pgroup_create.c │ │ ├── ga_pgroup_create2.c │ │ ├── ga_pgroup_create3.c │ │ ├── ga_pgroup_create4.c │ │ ├── ga_pgroup_create5.c │ │ ├── ga_pgroup_destroy.c │ │ ├── ga_pgroup_destroy2.c │ │ ├── ga_pgroup_nnodes_nodeid.c │ │ ├── ga_pgroup_setdefault.c │ │ ├── ga_put.c │ │ ├── ga_put2.c │ │ ├── ga_scale.c │ │ ├── ga_scale2.c │ │ ├── ga_scale_cols.c │ │ ├── ga_scale_patch.c │ │ ├── ga_scale_rows.c │ │ ├── ga_scatter.c │ │ ├── ga_set_data.c │ │ ├── ga_set_diagonal.c │ │ ├── ga_set_restricted.c │ │ ├── ga_solve.c │ │ ├── ga_sync.c │ │ ├── ga_transpose.c │ │ ├── ga_transpose2.c │ │ ├── ga_transpose3.c │ │ ├── ga_unit.h │ │ ├── ga_zero.c │ │ ├── ga_zerodiagonal.c │ │ ├── ga_zeropatch.c │ │ ├── ga_zeropatch2.c │ │ ├── mock.c │ │ └── mock.h │ ├── unpackc.c │ └── util.c └── trace │ ├── README │ ├── adjust.c │ ├── collisions.c │ └── test.f ├── gparrays ├── src │ ├── gp-papi.h │ ├── gp.h │ ├── gpbase.c │ ├── gpbase.h │ ├── gpcapi.c │ ├── gpfapi.c │ └── gponesided.c └── testing │ ├── test.F │ ├── testc.c │ └── transpose.c ├── m4 ├── armci_as_no_i386asm.m4 ├── armci_c_opt.m4 ├── armci_cxx_opt.m4 ├── armci_enable_gpc.m4 ├── armci_enable_profile.m4 ├── armci_f77_enable.m4 ├── armci_f77_i4.m4 ├── armci_f77_opt.m4 ├── armci_group.m4 ├── armci_setup.m4 ├── armci_shmmax.m4 ├── armci_standalone.m4 ├── ax_boost_base.m4 ├── ax_pthread.m4 ├── ax_sys_weak_alias.m4 ├── ga.m4 ├── ga_64bit_flag.m4 ├── ga_ar.m4 ├── ga_arg_parse.m4 ├── ga_armci_network.m4 ├── ga_blas.m4 ├── ga_boost.m4 ├── ga_c_match_types.m4 ├── ga_c_opt.m4 ├── ga_check_func.m4 ├── ga_check_header.m4 ├── ga_check_libplot.m4 ├── ga_check_package.m4 ├── ga_compiler_vendor.m4 ├── ga_cross_compiling.m4 ├── ga_cxx.m4 ├── ga_cxx_namespaces.m4 ├── ga_cxx_opt.m4 ├── ga_elpa.m4 ├── ga_enable_checkpoint.m4 ├── ga_enable_eispack.m4 ├── ga_enable_opt.m4 ├── ga_enable_peigs.m4 ├── ga_enable_profile.m4 ├── ga_enable_trace.m4 ├── ga_enable_unit.m4 ├── ga_f2c_cmdargs.m4 ├── ga_f2c_match_types.m4 ├── ga_f2c_nomain.m4 ├── ga_f2c_rand.m4 ├── ga_f2c_string.m4 ├── ga_f77_check_sizeof.m4 ├── ga_f77_cpp_symbols.m4 ├── ga_f77_disable.m4 ├── ga_f77_fixed.m4 ├── ga_f77_flush.m4 ├── ga_f77_integer_size.m4 ├── ga_f77_ld_override.m4 ├── ga_f77_library_ldflags.m4 ├── ga_f77_mismatch_type.m4 ├── ga_f77_opt.m4 ├── ga_f77_underscore.m4 ├── ga_function.m4 ├── ga_gnu_loop_opt.m4 ├── ga_gnu_loop_vect.m4 ├── ga_gnu_std_gnu17.m4 ├── ga_lapack.m4 ├── ga_mpi_test_disable.m4 ├── ga_mpi_unwrap.m4 ├── ga_mpicc.m4 ├── ga_mpicc_test.m4 ├── ga_mpicxx.m4 ├── ga_mpicxx_test.m4 ├── ga_mpif77.m4 ├── ga_mpif77_test.m4 ├── ga_msg_comms.m4 ├── ga_pario.m4 ├── ga_pragma.m4 ├── ga_progname.m4 ├── ga_scalapack.m4 ├── ga_sicm.m4 ├── ga_suppress_msg.m4 ├── ga_sys_weak_alias.m4 ├── ga_target.m4 ├── ga_tbb.m4 ├── ga_thread_safe.m4 ├── ga_union_semun.m4 ├── ga_warn_flags.m4 ├── ga_with_help.m4 ├── ma_enable_cuda_mem.m4 ├── ma_long_double.m4 ├── ma_stats.m4 ├── ma_verify.m4 ├── tcgmsg_rsh.m4 └── tcgmsg_timings.m4 ├── ma ├── CMakeLists.txt ├── MA.tex ├── error.c ├── error.h ├── f2c.c ├── ma.c ├── ma.h ├── macdecls.h ├── macommon.h ├── maf.F ├── maf2c.fh ├── mafdecls.fh.in ├── man │ ├── man3 │ │ ├── MA.3 │ │ ├── MA_alloc_get.3 │ │ ├── MA_allocate_heap.3 │ │ ├── MA_chop_stack.3 │ │ ├── MA_free_heap.3 │ │ ├── MA_get_index.3 │ │ ├── MA_get_next_memhandle.3 │ │ ├── MA_get_pointer.3 │ │ ├── MA_init.3 │ │ ├── MA_init_memhandle_iterator.3 │ │ ├── MA_initialized.3 │ │ ├── MA_inquire_avail.3 │ │ ├── MA_inquire_heap.3 │ │ ├── MA_inquire_stack.3 │ │ ├── MA_pop_stack.3 │ │ ├── MA_print_stats.3 │ │ ├── MA_push_get.3 │ │ ├── MA_push_stack.3 │ │ ├── MA_set_auto_verify.3 │ │ ├── MA_set_error_print.3 │ │ ├── MA_set_hard_fail.3 │ │ ├── MA_sizeof.3 │ │ ├── MA_sizeof_overhead.3 │ │ ├── MA_summarize_allocated_blocks.3 │ │ └── MA_verify_allocator_stuff.3 │ └── whatis ├── matypes.h.in ├── memcpy.h ├── scope.h ├── string-util.c ├── string-util.h ├── table.c ├── table.h ├── test-coalesce.c ├── test-inquire.c ├── testc.c └── testf.F ├── pario ├── CMakeLists.txt ├── doc │ ├── DRAapi.html │ ├── EAFapi.html │ ├── SFapi.html │ ├── api_eaf.html │ ├── commands_eaf.html │ ├── dra_index.html │ ├── dra_ops.html │ ├── index.html │ ├── list.html │ └── sf.html ├── dra │ ├── DRA.doc │ ├── Notes.doc │ ├── README │ ├── big.F │ ├── bign.c │ ├── buffers.c │ ├── buffers.h │ ├── capi.c │ ├── dbg_read.c │ ├── dbg_write.c │ ├── disk.arrays.c │ ├── disk.param.c │ ├── dra.fh │ ├── dra.h │ ├── dra2arviz.c │ ├── dra_mxm.F │ ├── draf2c.h │ ├── drap.h │ ├── env.c │ ├── ffflush.F │ ├── fortran.c │ ├── global.unsup.c │ ├── ntest.F │ ├── ntestc.c │ ├── patch.util.c │ ├── perf.F │ ├── perf2.F │ ├── perf3.F │ ├── perfn.c │ ├── rate.c │ ├── test.F │ ├── test_mxm.F │ ├── time_mxm.F │ └── util.c ├── eaf │ ├── eaf.c │ ├── eaf.doc │ ├── eaf.fh │ ├── eaf.h │ ├── eafP.h │ ├── eaf_f2c.c │ └── test.F ├── elio │ ├── chemio.h │ ├── elio.c │ ├── elio.h │ ├── eliop.h │ ├── pablo.h │ └── stat.c ├── makefile.h ├── pablo2upshot ├── pabody └── sf │ ├── SF.doc │ ├── coms.h │ ├── sf.fh │ ├── sf.h │ ├── sf_capi.c │ ├── sf_fortran.c │ ├── sff2c.h │ ├── shared.files.c │ └── test.F ├── support ├── INSTALL ├── README_AUTOTOOLS.md ├── README_RELEASES.md └── README_SICM.md ├── tcgmsg ├── capi.c ├── examples │ ├── Makefile.proto │ ├── README │ ├── blkdat120lin.f │ ├── blkdat15.f │ ├── blkdat240lin.f │ ├── blkdat30.f │ ├── blkdat60.f │ ├── blkdat60lin.f │ ├── cscf.h │ ├── cscf120lin.h │ ├── cscf15.h │ ├── cscf240lin.h │ ├── cscf30.h │ ├── cscf60.h │ ├── cscf60lin.h │ ├── daxpy.f │ ├── daxpy1.s │ ├── ddot.f │ ├── demo.proto │ ├── diagon.f │ ├── dscal.f │ ├── fexit.f.proto │ ├── getmem.c │ ├── grid.c │ ├── ieeetrap.c │ ├── integ.f │ ├── jacobi.f │ ├── mc.f │ ├── mc.input │ ├── md.f │ ├── mxv_daxpy1.f │ ├── mxv_dgemv.f │ ├── mxv_fortran.f │ ├── output.f │ ├── prtri.f │ ├── random.c │ ├── runit │ ├── runit.grid │ ├── scf.f │ ├── scfblas.f │ ├── timer.f │ ├── trace.out │ └── xpix.shar ├── fapi.c ├── tcgmsg-mpi │ ├── README │ ├── checkbyte.c │ ├── clustercheck.c │ ├── collect.c │ ├── drand48.c │ ├── evlog.c │ ├── evlog.h │ ├── evon.c │ ├── llog.c │ ├── misc.c │ ├── msgtypesc.h │ ├── msgtypesf.h │ ├── niceftn.c │ ├── nxtval-armci.c │ ├── nxtval.c │ ├── p2p.c │ ├── pbeginf.c │ ├── pfilecopy.c │ ├── sizeof.c │ ├── sndrcv.h │ ├── srftoc.h │ └── tcgmsgP.h ├── tcgmsg.fh ├── tcgmsg.h └── tests │ ├── brdcst_delta.c │ ├── fexit.f │ ├── hello.c │ ├── hello2.c │ ├── jacobi.F │ ├── mxv_fortran.f │ ├── nxtsrv.c │ ├── parse.c │ ├── test.c │ ├── test.isend.c │ ├── test2.c │ ├── test3.c │ ├── test_arcv.f │ ├── test_asyn.c │ ├── testargf.f │ ├── testf.F │ ├── testf2.F │ ├── testf3.F │ ├── testmap.c │ ├── testpf.f │ ├── timer.f │ ├── toplot.c │ ├── waitcom.f │ └── xdrtest.c ├── tools ├── CMakeLists.txt ├── config_fh_from_h.cmake ├── config_fh_from_h.pl ├── f77funcgen.pl ├── fapi_header_gen.py ├── ga-config.in ├── ga-config.in.m4sh ├── ga-wapi.c ├── ga-wprof.c ├── ga-wprof.h ├── ga_papi_to_wapi.cmake ├── ga_papi_to_wapi.pl ├── ga_papi_to_wapidefs.cmake ├── ga_papi_to_wapidefs.pl ├── gp-wapi.c ├── gpwapigen.py ├── wapigen.py ├── wapigen_counts.py ├── wapigen_timers.py └── wapigen_trace.py ├── travis ├── README.md ├── build-run.sh ├── fix_xcodebuild.sh ├── ifort_ldflags.patch ├── install-armci-mpi.sh ├── install-autotools.sh ├── install-intel.sh ├── install-libfabric.sh ├── install-mpi.sh └── install-sicm.sh └── version.sh /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files 2 | *.slo 3 | *.lo 4 | *.o 5 | *.obj 6 | 7 | # Compiled Dynamic libraries 8 | *.so 9 | *.dylib 10 | *.dll 11 | 12 | # Compiled Static libraries 13 | *.lai 14 | *.la 15 | *.a 16 | *.lib 17 | 18 | # Executables 19 | *.exe 20 | *.out 21 | *.app 22 | 23 | .cproject 24 | .project 25 | .settings 26 | Makefile.in 27 | aclocal.m4 28 | autom4te.cache 29 | configure 30 | armci/config.h.in 31 | comex/config.h.in 32 | config.h.in 33 | log.00* 34 | org.eclipse.cdt.core.prefs 35 | org.eclipse.cdt.ui.prefs 36 | .autotools 37 | .externalToolBuilders/org.eclipse.cdt.autotools.core.genmakebuilderV2.launch 38 | compile 39 | config.guess 40 | config.sub 41 | depcomp 42 | install-sh 43 | missing 44 | lt~obsolete.m4 45 | ltversion.m4 46 | ltsugar.m4 47 | ltoptions.m4 48 | ltmain.sh 49 | libtool.m4 50 | config.h.in~ 51 | *~ 52 | autotools 53 | bld* 54 | build-aux 55 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2022 Battelle Memorial Institute. 2 | 3 | Contributed under the BSD-3-Clause License https://opensource.org/licenses/BSD-3-Clause 4 | 5 | By contributing computer software code to the GlobalArrays project I certify that the contribution 6 | is being made under the BSD-3-Clause license (https://opensource.org/licenses/BSD-3-Clause) 7 | and that I have all rights and permissions necessary to do so, including authorization from 8 | my employer if applicable. 9 | 10 | -------------------------------------------------------------------------------- /LinAlg/lapack+blas/README: -------------------------------------------------------------------------------- 1 | This directory contains a subset of LAPACK and BLAS subroutines. 2 | They have been prefixed with "gal_" so as not to conflict with any external 3 | BLAS/LAPACK libraries. These sources are unconditionally compiled so long as a 4 | valid Fortran compiler is detected. 5 | -------------------------------------------------------------------------------- /LinAlg/lapack+blas/dummy.c: -------------------------------------------------------------------------------- 1 | #if HAVE_CONFIG_H 2 | # include "config.h" 3 | #endif 4 | 5 | /* dummy routine to make linalg.a legitimate when we do not compile lapack or blas */ 6 | void __dummy_linalg(int *a, int *b) 7 | { 8 | if(a) *a=*b; 9 | } 10 | -------------------------------------------------------------------------------- /LinAlg/lapack+blas/gal_dcabs1.f: -------------------------------------------------------------------------------- 1 | DOUBLE PRECISION FUNCTION GAL_DCABS1(Z) 2 | * .. Scalar Arguments .. 3 | DOUBLE COMPLEX Z 4 | * .. 5 | * .. 6 | * Purpose 7 | * ======= 8 | * 9 | * GAL_DCABS1 computes absolute value of a double complex number 10 | * 11 | * ===================================================================== 12 | * 13 | * .. Intrinsic Functions .. 14 | INTRINSIC ABS,DBLE,DIMAG 15 | * 16 | GAL_DCABS1 = ABS(DBLE(Z)) + ABS(DIMAG(Z)) 17 | RETURN 18 | END 19 | 20 | -------------------------------------------------------------------------------- /LinAlg/lapack+blas/galinalg.fh: -------------------------------------------------------------------------------- 1 | #ifndef GALINALG_FH_ 2 | #define GALINALG_FH_ 3 | 4 | #if HAVE_BLAS 5 | #else 6 | #define sgemm gal_sgemm 7 | #define SGEMM GAL_SGEMM 8 | #define dgemm gal_dgemm 9 | #define DGEMM GAL_DGEMM 10 | #define zgemm gal_zgemm 11 | #define ZGEMM GAL_ZGEMM 12 | #define cgemm gal_cgemm 13 | #define CGEMM GAL_CGEMM 14 | #endif 15 | 16 | #if HAVE_LAPACK 17 | #else 18 | #define dgetrf gal_dgetrf 19 | #define DGETRF GAL_DGETRF 20 | #define dsyev gal_dsyev 21 | #define DSYEV GAL_DSYEV 22 | #define dsygv gal_dsygv 23 | #define DSYGV GAL_DSYGV 24 | #define dtrsm gal_dtrsm 25 | #define DTRSM GAL_DTRSM 26 | #define lsame gal_lsame 27 | #define LSAME GAL_LSAME 28 | #define xerbla gal_xerbla 29 | #define XERBLA GAL_XERBLA 30 | #endif 31 | 32 | #endif /* GALINALG_FH_ */ 33 | -------------------------------------------------------------------------------- /LinAlg/lapack+blas/xgemm.h: -------------------------------------------------------------------------------- 1 | #ifndef XGEMM_H_ 2 | #define XGEMM_H_ 3 | 4 | void xb_sgemm(char *transa, char *transb, int *M, int *N, int *K, 5 | float *alpha, const float *a, int *p_lda, const float *b, 6 | int *p_ldb, float *beta, float *c, int *p_ldc); 7 | void xb_dgemm(char *transa, char *transb, int *M, int *N, int *K, 8 | double *alpha, const double *a, int *p_lda, const double *b, 9 | int *p_ldb, double *beta, double *c, int *p_ldc); 10 | void xb_zgemm(char * transa, char *transb, int *M, int *N, int *K, 11 | const void *alpha, const void *a, int *p_lda, const void *b, 12 | int *p_ldb, const void *beta, void *c, int *p_ldc); 13 | void xb_cgemm(char * transa, char *transb, int *M, int *N, int *K, 14 | const void *alpha, const void *a, int *p_lda, const void *b, 15 | int *p_ldb, const void *beta, void *c, int *p_ldc); 16 | 17 | #endif /* XGEMM_H_ */ 18 | -------------------------------------------------------------------------------- /armci/NEWS: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlobalArrays/ga/00cbef332a83e3c50794d9f70b45aa7258aa3649/armci/NEWS -------------------------------------------------------------------------------- /armci/doc/armci.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlobalArrays/ga/00cbef332a83e3c50794d9f70b45aa7258aa3649/armci/doc/armci.pdf -------------------------------------------------------------------------------- /armci/examples/README: -------------------------------------------------------------------------------- 1 | ARMCI EXAMPLES 2 | ~~~~~~~~~~~~~~ 3 | 4 | Introduction 5 | ============ 6 | 7 | The benchmarks directory has many ARMCI benchmarks. 8 | 9 | The features directory has examples and notes on each of the features 10 | listed below: 11 | 12 | 1. aggregation 13 | 2. gpc 14 | 3. non-blocking 15 | 4. proc_affinity 16 | 5. concurrency 17 | 6. notification 18 | 7. symmetric_memory 19 | 20 | Compiling 21 | ========= 22 | 23 | The examples directory is built by the top-level Makefile after a successful 24 | "configure" run. You can run "make checkprogs" to build the test programs and 25 | the example programs together, or "make examples" to build only the example 26 | programs. Remember, run "make" from the top level, not from the testing or 27 | examples directories! 28 | 29 | Execution 30 | ========= 31 | 32 | Any example that expects an input also has a README in its directory 33 | explaining how to use it. 34 | -------------------------------------------------------------------------------- /armci/examples/benchmarks/RandomAccess/ra_common.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | * $ID:$ 3 | */ 4 | #ifndef RA_COMMON_H_ 5 | #define RA_COMMON_H_ 6 | 7 | #if SIZEOF_LONG == 8 8 | # define POLY 0x0000000000000007UL 9 | # define PERIOD 1317624576693539401L 10 | typedef unsigned long u64Int; 11 | typedef long s64Int; 12 | # define FSTR64 "%ld" 13 | # define FSTRU64 "%lu" 14 | # define ZERO64B 0L 15 | #elif SIZEOF_LONG_LONG == 8 16 | # define POLY 0x0000000000000007ULL 17 | # define PERIOD 1317624576693539401LL 18 | typedef unsigned long long u64Int; 19 | typedef long long s64Int; 20 | # define FSTR64 "%lld" 21 | # define FSTRU64 "%llu" 22 | # define ZERO64B 0LL 23 | #else 24 | # error long nor long long are 8 bytes in size 25 | #endif 26 | 27 | /* Macros for timing */ 28 | #define CPUSEC() (HPL_timer_cputime()) 29 | #define RTSEC() (MPI_Wtime()) 30 | 31 | #define MAX_TOTAL_PENDING_UPDATES 1024 32 | #define LOCAL_BUFFER_SIZE MAX_TOTAL_PENDING_UPDATES 33 | #define MAX_OUTSTANDING_HANDLES 64 34 | extern u64Int **HPCC_Table; 35 | 36 | #endif /* RA_COMMON_H_ */ 37 | -------------------------------------------------------------------------------- /armci/examples/benchmarks/cg/armci_sharedmemory/matrix_med.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlobalArrays/ga/00cbef332a83e3c50794d9f70b45aa7258aa3649/armci/examples/benchmarks/cg/armci_sharedmemory/matrix_med.bin -------------------------------------------------------------------------------- /armci/examples/benchmarks/lu/README: -------------------------------------------------------------------------------- 1 | This directory contains example programs using ARMCI At present time, SPLASH-2 2 | LU factorization on top of ARMCI is included (lu.c). 3 | -------------------------------------------------------------------------------- /armci/examples/examples_config.h: -------------------------------------------------------------------------------- 1 | ARMCI_HOME = ../../../../src 2 | ifndef TARGET 3 | error: 4 | @echo "TARGET machine not defined" 5 | exit 6 | endif 7 | -------------------------------------------------------------------------------- /armci/examples/features/concurrency/README: -------------------------------------------------------------------------------- 1 | High-performance networks have developed significantly over the past several 2 | years. Many of these networks are capable of remote direct memory access 3 | (RDMA) communication that involves movement of data between processor memories 4 | without memory copies or remote host processor involvement. 5 | 6 | Current high-speed networks deploy powerful communication processor(s) in the 7 | network interface card (NIC) to handle processing of multiple incoming and 8 | outgoing messages without interrupting the host processor. For example, the 9 | Quadrics Elan4 network interconnect can do two overlapping DMAs and allows 10 | multiple outstanding read/write transactions from and to the network 11 | interconnect. 12 | 13 | Switches used in the modern interconnects also have developed significantly in 14 | the last several years, facilitating multiple communication paths between 15 | network endpoints and hence roviding increased levels of concurrency and 16 | redundancy communication between network endpoints. As a result, the modern 17 | networks are very capable of handling simultaneous and concurrent data 18 | movements. 19 | 20 | ARMCI allows for its applications to utilize concurrency by its low-overhead 21 | implementation of one-sided calls 22 | -------------------------------------------------------------------------------- /armci/examples/features/gpc/hashtable/Hash_common.h: -------------------------------------------------------------------------------- 1 | /* $Id: */ 2 | #ifndef HASH_COMMON_H 3 | #define HASH_COMMON_H 4 | 5 | #define HASHMAP_CREATE 101 6 | #define HASHMAP_DESTROY 102 7 | #define HASHMAP_INSERT 103 8 | #define HASHMAP_PRINT 104 9 | #define HASHMAP_GET 105 10 | #define HASHMAP_REHASH 106 11 | 12 | typedef struct hash_hdr { 13 | int hash_op; 14 | void*buf; 15 | size_t bufsize; 16 | }hash_hdr_t; 17 | 18 | #include 19 | using std::string; 20 | 21 | /* #include "UnicodeString.h" */ 22 | #define USE_MAP 23 | #ifdef USE_MAP 24 | # include 25 | typedef std::map VocabIntMap; 26 | #else /* USE_MAP */ 27 | # include "hash_map.h" 28 | using STL_HASHMAP_NAMESPACE::hash_map; 29 | using STL_HASHMAP_NAMESPACE::hash; 30 | struct hashStr { 31 | size_t operator()(const string& str) const { 32 | hash H; 33 | return H(str.c_str()); 34 | } 35 | }; 36 | typedef hash_map VocabIntMap; 37 | #endif /* USE_MAP */ 38 | 39 | extern unsigned long armci_djb2_hash(unsigned char *str, int total_procs); 40 | 41 | #endif /* HASH_COMMON_H */ 42 | -------------------------------------------------------------------------------- /armci/examples/features/gpc/hashtable/README: -------------------------------------------------------------------------------- 1 | :Author: Manojkumar Krishnan PNNL 2 | -------------------------------------------------------------------------------- /armci/examples/features/gpc/hashtable/Util.h: -------------------------------------------------------------------------------- 1 | #ifndef UTIL_H 2 | #define UTIL_H 3 | 4 | #include 5 | using std::string; 6 | #include "Hash_common.h" 7 | 8 | extern int armci_hashmap_pack(char *buf, string str); 9 | extern int armci_hashmap_unpack(const char *buf, string& str); 10 | extern void armci_hashmap_insert(VocabIntMap *vocabMap, 11 | const char *buf, size_t bufsize); 12 | extern void armci_hashmap_insert2(VocabIntMap *vocabMap, const char *buf, 13 | size_t bufsize, int *globalTermIds, int op); 14 | 15 | #endif /* UTIL_H */ 16 | -------------------------------------------------------------------------------- /armci/examples/features/gpc/hashtable/hash_map.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | * $Id: 3 | * header to include STL's hash_map 4 | */ 5 | #include 6 | #ifndef STL_HASHMAP_NAMESPACE 7 | # define STL_HASHMAP_NAMESPACE __gnu_cxx 8 | #endif 9 | -------------------------------------------------------------------------------- /armci/examples/features/gpc/hashtable/sample.txt: -------------------------------------------------------------------------------- 1 | The Global Arrays (GA) toolkit provides an efficient and portable "shared-memory" programming interface for distributed-memory computers. 2 | -------------------------------------------------------------------------------- /armci/examples/features/proc_affinity/simple/simple.c: -------------------------------------------------------------------------------- 1 | #if HAVE_CONFIG_H 2 | # include "config.h" 3 | #endif 4 | 5 | /* $Id$ */ 6 | int main(int argc, char **argv) 7 | { 8 | return 0; 9 | } 10 | -------------------------------------------------------------------------------- /armci/examples/features/symmetric_memory/simple/simple.c: -------------------------------------------------------------------------------- 1 | #if HAVE_CONFIG_H 2 | # include "config.h" 3 | #endif 4 | 5 | /*$Id: simple.c,v 1.1.2.1 2007-06-20 17:42:20 vinod Exp $*/ 6 | 7 | int main(int argc, char **argv) 8 | { 9 | return 0; 10 | } 11 | -------------------------------------------------------------------------------- /armci/f90/armci_types.f90: -------------------------------------------------------------------------------- 1 | module armci_types 2 | 3 | type armci_slice 4 | integer :: lo(7) 5 | integer :: hi(7) 6 | integer :: stride(7) 7 | end type armci_slice 8 | 9 | end module armci_types 10 | -------------------------------------------------------------------------------- /armci/f90/arraydesc.h: -------------------------------------------------------------------------------- 1 | #ifndef __ARMCIARR__ 2 | #define __ARMCIARR__ 3 | 4 | #define MAXDIM 7 5 | typedef struct { 6 | int rank; 7 | int elemsize; 8 | int extent[MAXDIM]; 9 | int lo[MAXDIM]; 10 | int hi[MAXDIM]; 11 | int stride[MAXDIM]; 12 | void **aptr; 13 | void *amem; 14 | }armci_arr_dsc_t; 15 | 16 | 17 | #define HEADER_SIZE 256 18 | 19 | #define GET_PTR_ARR_FROM_ARRAY(ptr) (((char*)ptr)-HEADER_SIZE -armci_nproc*sizeof(void*)) 20 | #define GET_ARR_DSC_FROM_ARRAY(ptr) (armci_arr_dsc_t*)(((char*)ptr)-HEADER_SIZE) 21 | 22 | typedef int index_size_t; 23 | 24 | extern void _array_create(void **pptr, int elemsize, int rank, index_size_t *lb, index_size_t *ub); 25 | extern void _array_free(void *ptr); 26 | 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /armci/f90/definekind.f90: -------------------------------------------------------------------------------- 1 | module definekind 2 | integer, parameter :: I4 = SELECTED_INT_KIND(9) 3 | integer, parameter :: I8 = SELECTED_INT_KIND(16) 4 | integer, parameter :: R4 = SELECTED_REAL_KIND(5) 5 | integer, parameter :: R8 = SELECTED_REAL_KIND(12) 6 | integer, parameter :: C4 = SELECTED_REAL_KIND(5) 7 | integer, parameter :: C8 = SELECTED_REAL_KIND(12) 8 | end module definekind 9 | -------------------------------------------------------------------------------- /armci/f90/definekind_cray.f90: -------------------------------------------------------------------------------- 1 | module definekind 2 | integer, parameter :: I4 = 4 3 | integer, parameter :: I8 = 8 4 | integer, parameter :: R4 = 4 5 | integer, parameter :: R8 = 8 6 | integer, parameter :: C4 = 4 7 | integer, parameter :: C8 = 8 8 | end module definekind 9 | -------------------------------------------------------------------------------- /armci/f90/kinds.f90: -------------------------------------------------------------------------------- 1 | program kinds 2 | INTEGER*4 I4 3 | INTEGER*8 I8 4 | I4 = 1 5 | I8 = 1234567890123_8 6 | write (*,'("The KIND for single precision is ",I2)') KIND(0.0) 7 | write (*,'("The KIND for double precision is ",I2)') KIND(0.0D0) 8 | write (*,'("The KIND for integer *4 is ",I2)') KIND(I4) 9 | write (*,'("The KIND for integer *8 is ",I2)') KIND(I8) 10 | write (*,'("The KIND for single complex is ",I2)') KIND((0.0,0.0)) 11 | write (*,'("The KIND for double precision is ",I2)') KIND((0.0D0,0.0D0)) 12 | stop 13 | end 14 | -------------------------------------------------------------------------------- /armci/f90/testanb.f90: -------------------------------------------------------------------------------- 1 | program main 2 | use definekind 3 | use armci_types 4 | use armci_mem_f90 5 | use armci_nbmov 6 | use testa_init 7 | use checkput 8 | type(ARMCI_slice) :: src_slice, dst_slice 9 | ! integer(kind=I4), pointer :: a1(:) 10 | 11 | integer :: remote_proc 12 | integer :: lb(7), ub(7), rc, i, j,me, nproc 13 | integer :: myunit 14 | integer :: m 15 | integer :: extent(7) 16 | integer :: asize(7) 17 | 18 | call mpi_init(ierr) 19 | call mpi_comm_rank(mpi_comm_world, me, ierr) 20 | call mpi_comm_size(mpi_comm_world, nproc, ierr) 21 | 22 | remote_proc = nproc -1 -me 23 | myunit = 10+me 24 | 25 | call ARMCI_Arr_init() 26 | lb(:) = 1 27 | ub(:) = 7 28 | 29 | extent(:) = 1 30 | extent(:) = extent(:) + ub(:) - lb(:) 31 | asize(1) = extent(1) 32 | do m= 2,7 33 | asize(m) = asize(m-1)*extent(m) 34 | enddo 35 | 36 | call testanb_i4(nproc,me,remote_proc) 37 | call testanb_i8(nproc,me,remote_proc) 38 | call testanb_r4(nproc,me,remote_proc) 39 | call testanb_r8(nproc,me,remote_proc) 40 | call testanb_c4(nproc,me,remote_proc) 41 | call testanb_c8(nproc,me,remote_proc) 42 | 43 | call ARMCI_Arr_finalize() 44 | call mpi_finalize(ierr) 45 | 46 | end program main 47 | -------------------------------------------------------------------------------- /armci/m4/armci_dummy.m4: -------------------------------------------------------------------------------- 1 | # ARMCI_DUMMY 2 | # ----------- 3 | # Placeholder so autoreconf completes in the absense of a complete m4 directory. 4 | AC_DEFUN([ARMCI_DUMMY], []) 5 | -------------------------------------------------------------------------------- /armci/src/common/timer.c: -------------------------------------------------------------------------------- 1 | #if HAVE_CONFIG_H 2 | # include "config.h" 3 | #endif 4 | 5 | #ifdef WIN32 6 | static double msec; /* reference for timer */ 7 | # include 8 | #else 9 | #if HAVE_SYS_TYPES_H 10 | # include 11 | #endif 12 | #if HAVE SYS_TIME_H 13 | # include 14 | #endif 15 | static unsigned firstsec=0; /* Reference for timer */ 16 | static unsigned firstusec=0; /* Reference for timer */ 17 | #endif 18 | static int first_call=1; 19 | 20 | double armci_timer() 21 | { 22 | #ifdef WIN32 23 | double t0 = (double)GetCurrentTime(); 24 | if(first_call){ 25 | first_call=0; msec=t0; return 0.0; 26 | } 27 | t0 -=msec; 28 | if(t0<0.0)t0 += (double)0xffffffff; 29 | return 0.01*t0; 30 | #else 31 | double low, high; 32 | struct timeval tp; 33 | struct timezone tzp; 34 | (void) gettimeofday(&tp,&tzp); 35 | 36 | if (first_call) { 37 | firstsec = tp.tv_sec; 38 | firstusec = tp.tv_usec; 39 | first_call = 0; 40 | } 41 | low = (double)(tp.tv_usec>>1) - (double) (firstusec>>1); 42 | high = (double) (tp.tv_sec - firstsec); 43 | return high + 1.0e-6*(low+low); 44 | #endif 45 | } 46 | 47 | -------------------------------------------------------------------------------- /armci/src/devices/openib/rtinfo.c: -------------------------------------------------------------------------------- 1 | #if HAVE_CONFIG_H 2 | # include "config.h" 3 | #endif 4 | 5 | #if HAVE_STDIO_H 6 | # include 7 | #endif 8 | #if HAVE_STRING_H 9 | # include 10 | #endif 11 | 12 | /* determine number of CPUs on the current SMP node- Linux version for now */ 13 | 14 | int armci_getnumcpus(void) 15 | { 16 | int numproc = 0; 17 | FILE* fp; 18 | char line[80]; 19 | fp = fopen("/proc/cpuinfo","r"); 20 | 21 | if(fp == NULL) 22 | return -1; 23 | 24 | while(!feof(fp)){ 25 | fgets(line,80,fp); 26 | if(strncmp(line,"processor",9)==0) 27 | numproc++; 28 | } 29 | fclose(fp); 30 | return numproc; 31 | } 32 | 33 | -------------------------------------------------------------------------------- /armci/src/include/armci_shmem.h: -------------------------------------------------------------------------------- 1 | #ifndef _SHMEM_H_ 2 | #define _SHMEM_H_ 3 | extern void Set_Shmem_Limit(unsigned long shmemlimit); 4 | extern void Delete_All_Regions(); 5 | extern char* Create_Shared_Region(long idlist[], long size, long *offset); 6 | extern char* Attach_Shared_Region(long idlist[], long size, long offset); 7 | extern void Free_Shmem_Ptr(long id, long size, char* addr); 8 | extern long armci_shmem_reg_size(int i, long id); 9 | extern char* armci_shmem_reg_ptr(int i); 10 | 11 | #define POST_ALLOC_CHECK(temp,size) ; 12 | 13 | #define MAX_REGIONS 64 14 | 15 | #if defined(WIN32) 16 | #define SHMIDLEN 3 17 | #else 18 | #define SHMIDLEN (MAX_REGIONS + 2) 19 | #endif 20 | 21 | #define IDLOC (SHMIDLEN - 3) 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /armci/src/include/gpc.h: -------------------------------------------------------------------------------- 1 | #ifndef __GPCDEF 2 | #define __GPCDEF 3 | 4 | #include "armci.h" 5 | 6 | #if defined(__cplusplus) || defined(c_plusplus) 7 | extern "C" { 8 | #endif 9 | 10 | #define GPC_INIT 1 11 | #define GPC_PROBE 2 12 | #define GPC_WAIT 3 13 | #define GPC_DONE 4 14 | #define GPC_PENDING 5 15 | 16 | typedef struct { 17 | int proc; 18 | armci_hdl_t ahdl; 19 | }gpc_hdl_t; 20 | 21 | /* #define ARMCI_GPC_HLEN 1024 */ 22 | /* #define ARMCI_GPC_DLEN 1024*1024 */ 23 | extern int ARMCI_Gpc_register( int (*func) ()); 24 | extern void ARMCI_Gpc_release(int handle); 25 | extern void * ARMCI_Gpc_translate(void *ptr, int proc, int from); 26 | extern void ARMCI_Gpc_lock(int proc); 27 | extern void ARMCI_Gpc_unlock(int proc); 28 | extern int ARMCI_Gpc_trylock(int proc); 29 | extern int ARMCI_Gpc_exec(int h,int p, void *hdr, int hlen, void *data,int dlen, 30 | void *rhdr, int rhlen, void *rdata, int rdlen, 31 | gpc_hdl_t* nbh); 32 | extern int ARMCI_Get_gpc_hlen(); 33 | extern int ARMCI_Get_gpc_dlen(); 34 | 35 | extern void ARMCI_Gpc_init_handle(gpc_hdl_t *nbh); 36 | extern void ARMCI_Gpc_wait(gpc_hdl_t *nbh); 37 | 38 | #if defined(__cplusplus) || defined(c_plusplus) 39 | } 40 | #endif 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /armci/src/include/memlock.h: -------------------------------------------------------------------------------- 1 | /* $Id: memlock.h,v 1.18 2004-09-21 17:26:23 manoj Exp $ */ 2 | #ifndef _MEMLOCK_H_ 3 | #define _MEMLOCK_H_ 4 | 5 | 6 | /* data structure for locking memory areas */ 7 | #define MAX_SLOTS 8 8 | typedef struct{ 9 | void *start; 10 | void *end; 11 | } memlock_t; 12 | 13 | /* SGI Altix Stuff */ 14 | typedef struct { 15 | void *seg_addr; /* master's starting address of the segment */ 16 | size_t seg_size; 17 | size_t tile_size; 18 | size_t mem_offset; 19 | }armci_memoffset_t; 20 | 21 | extern void** memlock_table_array; 22 | extern int *armci_use_memlock_table; 23 | 24 | #if defined(PTHREADS) || defined(CYGWIN) || \ 25 | (defined(LINUX64) && defined(__GNUC__) && defined(__alpha__)) 26 | # define ARMCI_LOCKMEM armci_lockmem_ 27 | # define ARMCI_UNLOCKMEM armci_unlockmem_ 28 | #else 29 | # define ARMCI_LOCKMEM armci_lockmem 30 | # define ARMCI_UNLOCKMEM armci_unlockmem 31 | #endif 32 | 33 | extern void ARMCI_LOCKMEM(void *pstart, void *pend, int proc); 34 | extern void ARMCI_UNLOCKMEM(int proc); 35 | #define MEMLOCK_SHMEM_FLAG 36 | #endif 37 | -------------------------------------------------------------------------------- /armci/src/include/semaphores.h: -------------------------------------------------------------------------------- 1 | #ifndef _SEMAPHORES_H_ 2 | #define _SEMAPHORES_H_ 3 | 4 | #if HAVE_SYS_TYPES_H 5 | # include 6 | #endif 7 | #if HAVE_SYS_IPC_H 8 | # include 9 | #endif 10 | #if HAVE_SYS_SEM_H 11 | # include 12 | #endif 13 | 14 | #if !HAVE_UNION_SEMUN 15 | union semun { 16 | int val; /* value for SETVAL */ 17 | struct semid_ds *buf; /* buffer for IPC_STAT, IPC_SET */ 18 | unsigned short int *array; /* array for GETALL, SETALL */ 19 | struct seminfo *__buf; /* buffer for IPC_INFO */ 20 | }; 21 | #endif 22 | 23 | /* how many semaphores are available ? */ 24 | #ifndef SEMMSL 25 | # ifdef AIX 26 | # define SEMMSL 8094 27 | # else 28 | # define SEMMSL 16 29 | # endif 30 | #endif 31 | 32 | extern struct sembuf sops; 33 | extern int semaphoreID; 34 | int semop(); 35 | #define ALL_SEMS -1 36 | 37 | #define _P_code -1 38 | #define _V_code 1 39 | #define P_semaphore(s) \ 40 | {\ 41 | sops.sem_num = (s);\ 42 | sops.sem_op = _P_code;\ 43 | sops.sem_flg = 0; \ 44 | semop(semaphoreID,&sops,1);\ 45 | } 46 | #define V_semaphore(s) \ 47 | {\ 48 | sops.sem_num = (s);\ 49 | sops.sem_op = _V_code;\ 50 | sops.sem_flg = 0; \ 51 | semop(semaphoreID,&sops,1);\ 52 | } 53 | 54 | typedef int lockset_t; 55 | 56 | #endif 57 | -------------------------------------------------------------------------------- /armci/src/include/shmlimit.h: -------------------------------------------------------------------------------- 1 | #ifndef _SHMLIMIT_H_ 2 | #define _SHMLIMIT_H_ 3 | 4 | extern int armci_me, armci_master; 5 | extern void armci_die(char *, int); 6 | extern int armci_shmem_test(); 7 | extern int armci_child_shmem_init(); 8 | #endif 9 | -------------------------------------------------------------------------------- /armci/src/include/signaltrap.h: -------------------------------------------------------------------------------- 1 | #ifndef _SIGNALTRAP_H_ 2 | #define _SIGNALTRAP_H_ 3 | 4 | #ifdef SYSV 5 | extern void ARMCI_ChildrenTrapSignals(); 6 | extern void ARMCI_ParentTrapSignals(); 7 | extern void ARMCI_ParentRestoreSignals(); 8 | extern void ARMCI_RestoreSignals(); 9 | #else 10 | # define ARMCI_ChildrenTrapSignals() 11 | # define ARMCI_ParentTrapSignals() 12 | # define ARMCI_ParentRestoreSignals() 13 | #endif 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /armci/testing/rpl_armci_msg_finalize.c: -------------------------------------------------------------------------------- 1 | #if HAVE_CONFIG_H 2 | # include "config.h" 3 | #endif 4 | 5 | #include 6 | 7 | void armci_msg_finalize() 8 | { 9 | MPI_Finalize(); 10 | } 11 | -------------------------------------------------------------------------------- /armci/testing/rpl_armci_msg_init.c: -------------------------------------------------------------------------------- 1 | #if HAVE_CONFIG_H 2 | # include "config.h" 3 | #endif 4 | 5 | #include 6 | 7 | void armci_msg_init(int *argc, char ***argv) 8 | { 9 | int flag=0; 10 | MPI_Initialized(&flag); 11 | if (!flag) { 12 | #if 0 13 | int provided; 14 | MPI_Init_thread(argc, argv, MPI_THREAD_MULTIPLE, &provided); 15 | #else 16 | MPI_Init(argc, argv); 17 | # endif 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /armci/testing/shmclean.c: -------------------------------------------------------------------------------- 1 | #if HAVE_CONFIG_H 2 | # include "config.h" 3 | #endif 4 | 5 | /* The program was written to address missing "ipcrm" command on Mac X 6 | * It probes a range of System V shared memory id from 0 to MAXID 7 | * and if exist, it attempts to delete them. 8 | */ 9 | #if HAVE_SYS_TYPES_H 10 | # include 11 | #endif 12 | #if HAVE_SYS_IPC_H 13 | # include 14 | #endif 15 | #if HAVE_SYS_SHM_H 16 | # include 17 | #endif 18 | #if HAVE_SYS_PARAM_H 19 | # include 20 | #endif 21 | #if HAVE_ERRNO_H 22 | # include 23 | #endif 24 | #if HAVE_STDIO_H 25 | # include 26 | #endif 27 | 28 | #define MAXID 1000000 29 | int main(int argc, char **argv) 30 | { 31 | int i; 32 | for (i = 0; i < MAXID; i++) { 33 | #if SIZEOF_VOIDP == SIZEOF_INT 34 | int rc = (int) shmat(i, (char *) NULL, 0); 35 | #elif SIZEOF_VOIDP == SIZEOF_LONG 36 | long rc = (long) shmat(i, (char *) NULL, 0); 37 | #elif SIZEOF_VOIDP == SIZEOF_LONGLONG 38 | long long rc = (long long) shmat(i, (char *) NULL, 0); 39 | #endif 40 | if (rc < 0) { 41 | continue; 42 | } 43 | printf("found %d\n", i); 44 | shmdt((void *)rc); 45 | /* delete segment id */ 46 | if (shmctl(i, IPC_RMID, (struct shmid_ds *)NULL)) { 47 | printf("failed to remove shm id=%d\n", i); 48 | } 49 | } 50 | 51 | return 0; 52 | } 53 | -------------------------------------------------------------------------------- /armci/tools/armci_profile.h: -------------------------------------------------------------------------------- 1 | #ifndef _ARMCI_PROFILING_H_ 2 | #define _ARMCI_PROFILING_H_ 3 | /* $Id: armci_profile.h,v 1.5 2005-11-30 10:20:53 vinod Exp $ */ 4 | 5 | enum events {ARMCI_PROF_GET=0, ARMCI_PROF_PUT, ARMCI_PROF_ACC, /* get/put/acc */ 6 | ARMCI_PROF_GETS, ARMCI_PROF_PUTS, ARMCI_PROF_ACCS, /* strided */ 7 | ARMCI_PROF_GETV, ARMCI_PROF_PUTV, ARMCI_PROF_ACCV, /* vector */ 8 | ARMCI_PROF_NBGET, ARMCI_PROF_NBPUT, ARMCI_PROF_NBACC,/*Non-block*/ 9 | ARMCI_PROF_NBGETS, ARMCI_PROF_NBPUTS, ARMCI_PROF_NBACCS, 10 | ARMCI_PROF_NBGETV, ARMCI_PROF_NBPUTV, ARMCI_PROF_NBACCV, 11 | ARMCI_PROF_BARRIER, ARMCI_PROF_WAIT, ARMCI_PROF_NOTIFY, /*misc*/ 12 | ARMCI_PROF_FENCE, ARMCI_PROF_ALLFENCE, ARMCI_PROF_RMW 13 | }; 14 | 15 | extern void armci_profile_init(); 16 | extern void armci_profile_terminate(); 17 | extern void armci_profile_start_strided(int count[], int stride_levels, 18 | int proc, int event_type); 19 | extern void armci_profile_stop_strided(int event_type); 20 | extern void armci_profile_start_vector(armci_giov_t darr[], int len, int proc, 21 | int event_type); 22 | extern void armci_profile_stop_vector(int event_type); 23 | extern void armci_profile_start(int event_type); 24 | extern void armci_profile_stop(int event_type); 25 | 26 | #endif /* _ARMCI_PROFILING_H_ */ 27 | -------------------------------------------------------------------------------- /benchmarks/README.first: -------------------------------------------------------------------------------- 1 | ============ 2 | README.first 3 | ============ 4 | 5 | What is this for? 6 | ----------------- 7 | This directory is meant to stage some of our test programs into a gzipped 8 | tarball meant for benchmark testing on various platforms. Our tests depend on 9 | certain header files, preprocessor directives, and additional test-related 10 | functions which aren't available from a standard installation of GA. The files 11 | here are meant to fill that void. 12 | 13 | See the README for details about the contained files. Note that the README 14 | will describe these files as well as files which have not yet been staged. 15 | 16 | How to Generate the Benchmarks Tarball 17 | -------------------------------------- 18 | Simply run "make". The default make target will create a "ga-benchmarks" 19 | directory, copy various test sources as well as the sources found here, and 20 | remove the default staging make target from the copied Makefile. 21 | -------------------------------------------------------------------------------- /benchmarks/config.fh: -------------------------------------------------------------------------------- 1 | #define MPI 1 2 | -------------------------------------------------------------------------------- /benchmarks/config.h: -------------------------------------------------------------------------------- 1 | #define HAVE_STDIO_H 1 2 | #define HAVE_STDLIB_H 1 3 | #define HAVE_ASSERT_H 1 4 | #define HAVE_UNISTD_H 1 5 | #define HAVE_MATH_H 1 6 | #define MSG_COMMS_MPI 1 7 | -------------------------------------------------------------------------------- /benchmarks/testutil.fh: -------------------------------------------------------------------------------- 1 | double precision util_timer 2 | integer util_mdtob 3 | external util_timer 4 | external util_mdtob 5 | -------------------------------------------------------------------------------- /cmake/f2c_dummy.h.in: -------------------------------------------------------------------------------- 1 | /** @file 2 | * This is a dummy header file that is used if no Fortran compiler 3 | * is specified. These symbols are needed by the GA build even if 4 | * the Fortran interface is not being used. 5 | */ 6 | 7 | #ifndef F77_FUNC_HEADER_INCLUDED 8 | #define F77_FUNC_HEADER_INCLUDED 9 | 10 | /* Mangling for Fortran global symbols without underscores. */ 11 | #define F77_FUNC_GLOBAL(name,NAME) name##_ 12 | 13 | /* Mangling for Fortran global symbols with underscores. */ 14 | #define F77_FUNC_GLOBAL_(name,NAME) name##_ 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /cmake/farg.h.in: -------------------------------------------------------------------------------- 1 | #ifndef FARG_H_ 2 | #define FARG_H_ 3 | 4 | #include "typesf2c.h" 5 | 6 | #if ENABLE_F77 7 | #define F2C_GETARG F77_FUNC_(f2c_getarg,F2C_GETARG) 8 | #define F2C_IARGC F77_FUNC_(f2c_iargc,F2C_IARGC) 9 | #endif 10 | 11 | #define F2C_GETARG_ARGV_MAX 255 12 | #define F2C_GETARG_ARGLEN_MAX 255 13 | 14 | extern void F2C_GETARG(Integer*, char*, int); 15 | extern Integer F2C_IARGC(); 16 | 17 | extern void ga_c2fstring(char *cstring, char *fstring, int flength); 18 | extern void ga_f2cstring(char *fstring, int flength, char *cstring, int clength); 19 | extern void ga_f2c_get_cmd_args(int *argc, char ***argv); 20 | 21 | #endif /* FARG_H_ */ 22 | -------------------------------------------------------------------------------- /cmake/ga_linalg.h.in: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #cmakedefine ENABLE_CXX 4 | #cmakedefine ENABLE_BLAS 5 | 6 | #cmakedefine BLA_VENDOR_MKL 7 | #cmakedefine BLA_VENDOR_ESSL 8 | #cmakedefine BLA_VENDOR_BLIS 9 | #cmakedefine USE_BLIS 10 | #cmakedefine USE_DPCPP 11 | 12 | #if defined(ENABLE_CXX) && defined(ENABLE_BLAS) 13 | #include "lapack.hh" 14 | #else 15 | #if defined(ENABLE_BLAS) 16 | 17 | #define BLA_LAPACK_INT ${BLA_LAPACK_INT} 18 | #define BLA_LAPACK_COMPLEX8 ${BLA_LAPACK_COMPLEX8} 19 | #define BLA_LAPACK_COMPLEX16 ${BLA_LAPACK_COMPLEX16} 20 | 21 | #if defined(BLA_VENDOR_MKL) 22 | #include "mkl.h" 23 | #elif defined(BLA_VENDOR_ESSL) 24 | #include "essl.h" 25 | #elif defined(BLA_VENDOR_BLIS) 26 | #include "blis/cblas.h" 27 | #endif 28 | 29 | #endif //ENABLE_BLAS 30 | 31 | #endif //ENABLE_CXX/BLAS 32 | -------------------------------------------------------------------------------- /cmake/linalg-modules/FindAccelerate.cmake: -------------------------------------------------------------------------------- 1 | include( CheckCCompilerFlag ) 2 | check_c_compiler_flag( "-framework Accelerate" COMPILER_RECOGNIZES_ACCELERATE ) 3 | if( COMPILER_RECOGNIZES_ACCELERATE ) 4 | set( Accelerate_LIBRARIES "-framework Accelerate" CACHE STRING "Accelerate Libraries" FORCE) 5 | set( Accelerate_lp64_FOUND TRUE ) 6 | set( Accelerate_ilp64_FOUND FALSE ) 7 | endif() 8 | 9 | include(FindPackageHandleStandardArgs) 10 | find_package_handle_standard_args( Accelerate 11 | REQUIRED_VARS Accelerate_LIBRARIES 12 | HANDLE_COMPONENTS 13 | ) 14 | -------------------------------------------------------------------------------- /cmake/linalg-modules/util/BLASUtilities.cmake: -------------------------------------------------------------------------------- 1 | set( BLAS_UTILITY_CMAKE_FILE_DIR ${CMAKE_CURRENT_LIST_DIR} ) 2 | 3 | function( check_blas_int _libs _dgemm_name _libs_are_lp64 ) 4 | 5 | try_run( _run_result _compile_result ${CMAKE_CURRENT_BINARY_DIR} 6 | SOURCES ${BLAS_UTILITY_CMAKE_FILE_DIR}/ilp64_checker.c 7 | LINK_LIBRARIES ${${_libs}} 8 | COMPILE_DEFINITIONS "-DDGEMM_NAME=${_dgemm_name}" 9 | COMPILE_OUTPUT_VARIABLE _compile_output 10 | RUN_OUTPUT_VARIABLE _run_output 11 | ) 12 | 13 | if (NOT _compile_result) 14 | message(FATAL_ERROR "check_blas_int: try_run failed: _compile_output=${_compile_output}") 15 | endif() 16 | 17 | if( _run_output MATCHES "BLAS IS LP64" ) 18 | set( ${_libs_are_lp64} TRUE PARENT_SCOPE ) 19 | else() 20 | set( ${_libs_are_lp64} FALSE PARENT_SCOPE ) 21 | endif() 22 | 23 | endfunction() 24 | -------------------------------------------------------------------------------- /cmake/linalg-modules/util/IntrospectMPI.cmake: -------------------------------------------------------------------------------- 1 | set( MPI_UTILITY_CMAKE_FILE_DIR ${CMAKE_CURRENT_LIST_DIR} ) 2 | 3 | function( get_mpi_vendor _mpi_libs _mpi_vendor ) 4 | 5 | if( NOT TARGET ${_mpi_libs} ) 6 | set( _mpi_linker ${${_mpi_libs}} ) 7 | else() 8 | set( _mpi_linker ${_mpi_libs} ) 9 | endif() 10 | 11 | try_run( _run_result _compile_result ${CMAKE_CURRENT_BINARY_DIR} 12 | SOURCES ${MPI_UTILITY_CMAKE_FILE_DIR}/get_mpi_vendor.c 13 | LINK_LIBRARIES ${_mpi_linker} 14 | COMPILE_OUTPUT_VARIABLE _compile_output 15 | RUN_OUTPUT_VARIABLE _run_output 16 | ) 17 | 18 | string( TOUPPER "${_run_output}" _run_output ) 19 | 20 | if( _run_output MATCHES "CRAY" ) 21 | set( ${_mpi_vendor} "CRAY" PARENT_SCOPE ) 22 | elseif( _run_output MATCHES "OPEN MPI" ) 23 | set( ${_mpi_vendor} "OPENMPI" PARENT_SCOPE ) 24 | elseif( _run_output MATCHES "OPENMPI" ) 25 | set( ${_mpi_vendor} "OPENMPI" PARENT_SCOPE ) 26 | elseif( _run_output MATCHES "MVAPICH" ) 27 | set( ${_mpi_vendor} "MVAPICH" PARENT_SCOPE ) 28 | elseif( _run_output MATCHES "MPICH" ) 29 | set( ${_mpi_vendor} "MPICH" PARENT_SCOPE ) 30 | else() 31 | set( ${_mpi_vendor} "UNKNOWN" PARENT_SCOPE ) 32 | endif() 33 | 34 | 35 | 36 | endfunction() 37 | -------------------------------------------------------------------------------- /cmake/linalg-modules/util/LAPACKUtilities.cmake: -------------------------------------------------------------------------------- 1 | set( LAPACK_UTILITY_CMAKE_FILE_DIR ${CMAKE_CURRENT_LIST_DIR} ) 2 | 3 | function( check_lapack_int _libs _dsyev_name _libs_are_lp64 ) 4 | 5 | try_run( _run_result _compile_result ${CMAKE_CURRENT_BINARY_DIR} 6 | SOURCES ${LAPACK_UTILITY_CMAKE_FILE_DIR}/lapack_ilp64_checker.c 7 | LINK_LIBRARIES ${${_libs}} 8 | COMPILE_DEFINITIONS "-DDSYEV_NAME=${_dsyev_name}" 9 | COMPILE_OUTPUT_VARIABLE _compile_output 10 | RUN_OUTPUT_VARIABLE _run_output 11 | ) 12 | 13 | if (NOT _compile_result) 14 | message(FATAL_ERROR "check_lapack_int: try_run failed: _compile_output=${_compile_output}") 15 | endif() 16 | 17 | if( _run_output MATCHES "LAPACK IS LP64" ) 18 | set( ${_libs_are_lp64} TRUE PARENT_SCOPE ) 19 | else() 20 | set( ${_libs_are_lp64} FALSE PARENT_SCOPE ) 21 | endif() 22 | 23 | endfunction() 24 | -------------------------------------------------------------------------------- /cmake/linalg-modules/util/func_check.c: -------------------------------------------------------------------------------- 1 | void FUNC_NAME(); 2 | int main() { 3 | FUNC_NAME(); 4 | return 0; 5 | } 6 | -------------------------------------------------------------------------------- /cmake/linalg-modules/util/get_mpi_vendor.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main() { 5 | char LIB_NAME[MPI_MAX_LIBRARY_VERSION_STRING]; 6 | int result_len; 7 | MPI_Get_library_version(LIB_NAME, &result_len); 8 | printf("%s\n",LIB_NAME); 9 | return 0; 10 | } 11 | -------------------------------------------------------------------------------- /cmake/linalg-modules/util/openblas_int_size.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() { 4 | int blis_int_size = sizeof(blasint)*8; 5 | if( blis_int_size == 32 ) return 0; 6 | else return 1; 7 | } 8 | -------------------------------------------------------------------------------- /cmake/matypes.h.in: -------------------------------------------------------------------------------- 1 | /** @file 2 | * Private header file containing C type definitions. 3 | * 4 | * This file should only be included directly by internal C 5 | * header files (e.g., macdecls.h). It may be included indirectly 6 | * by external C files that include the appropriate header 7 | * file (e.g., macdecls.h). 8 | */ 9 | #ifndef _MATYPES_H 10 | #define _MATYPES_H 11 | 12 | /** 13 | ** types 14 | **/ 15 | 16 | #include "typesf2c.h" 17 | 18 | typedef Integer Boolean; /* MA_TRUE or MA_FALSE */ 19 | typedef char * Pointer; /* generic pointer */ 20 | 21 | /* not all C compilers support long double */ 22 | typedef ${MA_LONG_DOUBLE} MA_LongDouble; 23 | 24 | /* no C compilers support complex types */ 25 | typedef struct {float dummy[2];} MA_SingleComplex; 26 | typedef struct {double dummy[2];} MA_DoubleComplex; 27 | typedef struct {double dummy[4];} MA_LongDoubleComplex; 28 | 29 | typedef ${C_POINTER_AS_INTEGER} MA_AccessIndex; 30 | 31 | #endif /* _matypes_h */ 32 | -------------------------------------------------------------------------------- /cmake/typesf2c.h.in: -------------------------------------------------------------------------------- 1 | #ifndef TYPESF2C_H_ 2 | #define TYPESF2C_H_ 3 | 4 | #if defined(WIN32) &&!defined(__MINGW32__) 5 | # define FATR __stdcall 6 | #else 7 | # define FATR 8 | #endif 9 | 10 | typedef ${F2C_INTEGER_C_TYPE} Integer; 11 | typedef ${F2C_REAL_C_TYPE} Real; 12 | typedef ${F2C_DOUBLE_PRECISION_C_TYPE} DoublePrecision; 13 | 14 | typedef Integer logical; 15 | typedef Integer Logical; 16 | 17 | typedef struct { 18 | DoublePrecision real; 19 | DoublePrecision imag; 20 | } DoubleComplex; 21 | 22 | typedef struct { 23 | Real real; 24 | Real imag; 25 | } SingleComplex; 26 | 27 | typedef ${C_POINTER_AS_INTEGER} intp; 28 | 29 | #endif /* TYPESF2C_H_ */ 30 | -------------------------------------------------------------------------------- /cmx/src-armci/groups.h: -------------------------------------------------------------------------------- 1 | #ifndef _GROUPS_H 2 | #define _GROUPS_H 3 | /* 4 | #if HAVE_CONFIG_H 5 | # include "config.h" 6 | #endif 7 | */ 8 | 9 | #include 10 | #include 11 | 12 | #include "armci.h" 13 | #include "message.h" 14 | #include "cmx.h" 15 | 16 | typedef struct _armci_handle_link { 17 | struct _armci_handle_link *next; 18 | struct _armci_handle_link *prev; 19 | cmx_handle_t *handle; 20 | } armci_handle_link_t; 21 | 22 | typedef struct _armci_group_link { 23 | struct _armci_group_link *next; 24 | ARMCI_Group id; 25 | armci_handle_link_t *handle_list; 26 | cmx_group_t group; 27 | } armci_igroup_t; 28 | 29 | extern armci_igroup_t* iarm_get_igroup_from_group(ARMCI_Group id); 30 | extern void armci_group_init(); 31 | extern void armci_group_finalize(); 32 | extern cmx_group_t armci_get_cmx_group(ARMCI_Group id); 33 | extern armci_igroup_t* armci_get_igroup_from_group(ARMCI_Group id); 34 | #endif 35 | -------------------------------------------------------------------------------- /cmx/src-armci/reg_entry.h: -------------------------------------------------------------------------------- 1 | #ifndef _REG_WINDOW_H_ 2 | #define _REG_WINDOW_H_ 3 | 4 | #include 5 | #include 6 | 7 | /** 8 | * Enumerate the return codes for registration window functions. 9 | */ 10 | typedef enum _reg_return_t { 11 | RR_SUCCESS=0, /**< success */ 12 | RR_FAILURE /**< non-specific failure */ 13 | } reg_return_t; 14 | 15 | /** 16 | * A registered contiguous memory region. 17 | */ 18 | typedef struct _reg_entry_t { 19 | cmx_handle_t* hdl; 20 | int rank; /**< global rank where this region lives */ 21 | void* buf; /**< starting address of region */ 22 | size_t len; /**< length of region */ 23 | struct _reg_entry_t *next; /**< next memory region in list */ 24 | } reg_entry_t; 25 | 26 | /* functions 27 | * 28 | * documentation is in the *.c file 29 | */ 30 | 31 | extern reg_return_t reg_entry_init(int nprocs); 32 | extern reg_return_t reg_entries_destroy(); 33 | extern reg_entry_t *reg_entry_find(int rank, void *buf, int len); 34 | extern reg_entry_t *reg_entry_insert(int world_rank, void *buf, 35 | int len, cmx_handle_t *hdl); 36 | extern reg_return_t reg_entry_delete(int rank, void *buf); 37 | 38 | #endif /* _REG_WINDOW_H_ */ 39 | -------------------------------------------------------------------------------- /cmx/src-mpi-pr/Makefile.inc: -------------------------------------------------------------------------------- 1 | libcmx_la_SOURCES += src-mpi-pr/cmx.c 2 | libcmx_la_SOURCES += src-mpi-pr/cmx_impl.h 3 | libcmx_la_SOURCES += src-mpi-pr/groups.c 4 | libcmx_la_SOURCES += src-mpi-pr/groups.h 5 | libcmx_la_SOURCES += src-mpi-pr/reg_cache.c 6 | libcmx_la_SOURCES += src-mpi-pr/reg_cache.h 7 | 8 | AM_CPPFLAGS += -I$(top_srcdir)/src-mpi-pr 9 | 10 | check_PROGRAMS += src-mpi-pr/hello 11 | src_mpi_pr_hello_SOURCES = src-mpi-pr/hello.c 12 | -------------------------------------------------------------------------------- /cmx/src-mpi-rma/groups.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Private header file for cmx groups backed by MPI_comm. 3 | * 4 | * The rest of the cmx group functions are defined in the public cmx.h. 5 | * 6 | * @author Bruce Palmer 7 | */ 8 | #ifndef _CMX_GROUPS_H_ 9 | #define _CMX_GROUPS_H_ 10 | 11 | #include 12 | 13 | #include "cmx_impl.h" 14 | #include "cmx.h" 15 | 16 | extern void cmx_group_init(); 17 | extern void cmx_group_finalize(); 18 | extern void cmx_igroup_add_win(cmx_igroup_t *group, MPI_Win win); 19 | extern void cmx_igroup_delete_win(cmx_igroup_t *group, MPI_Win win); 20 | 21 | #endif /* _CMX_GROUPS_H_ */ 22 | -------------------------------------------------------------------------------- /comex/m4/comex_ar.m4: -------------------------------------------------------------------------------- 1 | # COMEX_AR 2 | # ----- 3 | # Libtool doesn't advertise AR nor AR_FLAGS in case the user wishes to 4 | # override them. Further, certain systems require a different archiver. 5 | # RANLIB may also be affected. 6 | # Use this prior to LT_INIT. 7 | # 8 | # Known archivers: 9 | # ar - all known systems 10 | # 11 | AC_DEFUN([COMEX_AR], [ 12 | AC_ARG_VAR([AR], [archiver used by libtool (default: ar)]) 13 | AC_ARG_VAR([AR_FLAGS], [archiver flags used by libtool (default: cru)]) 14 | AC_ARG_VAR([RANLIB], [generates index to archive (default: ranlib)]) 15 | ])dnl 16 | -------------------------------------------------------------------------------- /comex/m4/comex_check_header.m4: -------------------------------------------------------------------------------- 1 | # COMEX_CHECK_HEADERS(HEADER-FILE..., 2 | # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND], [INCLUDES]) 3 | # ---------------------------------------------------------------------- 4 | # Inspired by 5 | # http://pdh11.blogspot.com/2009/04/standard-macros-available-in-gnu.html 6 | # but really a modified version of AC_CHECK_HEADERS. 7 | AC_DEFUN([COMEX_CHECK_HEADERS], 8 | [m4_map_args_w([$1], [_AH_CHECK_HEADER(], [)])]dnl 9 | [AS_FOR([AC_header], [ac_header], [$1], 10 | [AC_CHECK_HEADER(AC_header, 11 | [AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_]AC_header), 1, 12 | [Define to 1 if you have AC_header, 0 if you don't]) $2], 13 | [AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_]AC_header), 0, 14 | [Define to 1 if you have AC_header, 0 if you don't]) $3], [$4])dnl]) 15 | ])# COMEX_CHECK_HEADERS 16 | -------------------------------------------------------------------------------- /comex/m4/comex_enable_profile.m4: -------------------------------------------------------------------------------- 1 | # COMEX_ENABLE_PROFILING_ARMCI 2 | # ---------------------------- 3 | # Whether to enable profiling for ARMCI. 4 | # AC_DEFINEs COMEX_PROFILING_ARMCI. 5 | AC_DEFUN([COMEX_ENABLE_PROFILING_ARMCI], [ 6 | AC_ARG_ENABLE([profiling-armci], 7 | [AS_HELP_STRING([--enable-profiling-armci], 8 | [enable profiling for ARMCI])], 9 | [], 10 | [enable_profiling_armci=no]) 11 | AS_IF([test "x$enable_profiling_armci" = xyes], 12 | [AC_DEFINE([COMEX_PROFILING_ARMCI], [1], 13 | [Define if ARMCI profiling is enabled])]) 14 | AM_CONDITIONAL([ENABLE_PROFILING_ARMCI], 15 | [test "x$enable_profiling_armci" = xyes]) 16 | ])dnl 17 | 18 | # COMEX_ENABLE_PROFILING_COMEX 19 | # ---------------------------- 20 | # Whether to enable profiling for COMEX. 21 | # AC_DEFINEs COMEX_PROFILING_COMEX. 22 | AC_DEFUN([COMEX_ENABLE_PROFILING_COMEX], [ 23 | AC_ARG_ENABLE([profiling-comex], 24 | [AS_HELP_STRING([--enable-profiling-comex], 25 | [enable profiling for ComEx])], 26 | [], 27 | [enable_profiling_comex=no]) 28 | AS_IF([test "x$enable_profiling_comex" = xyes], 29 | [AC_DEFINE([COMEX_PROFILING_COMEX], [1], 30 | [Define if ComEx profiling is enabled])]) 31 | AM_CONDITIONAL([ENABLE_PROFILING_COMEX], 32 | [test "x$enable_profiling_comex" = xyes]) 33 | ])dnl 34 | -------------------------------------------------------------------------------- /comex/m4/comex_enable_sysv.m4: -------------------------------------------------------------------------------- 1 | # COMEX_ENABLE_SYSV 2 | # ----------------- 3 | # Whether to enable System V shared memory. 4 | AC_DEFUN([COMEX_ENABLE_SYSV], 5 | [AC_ARG_ENABLE([sysv], 6 | [AS_HELP_STRING([--enable-sysv], [enable System V shared memory])], 7 | [], 8 | [enable_sysv=0]) 9 | AS_IF([test "x$enable_sysv" = xyes], 10 | [enable_sysv=1], 11 | [enable_sysv=0]) 12 | 13 | AC_SUBST([enable_sysv]) 14 | 15 | AC_DEFINE_UNQUOTED([ENABLE_SYSV], [$enable_sysv], 16 | [Define to 1 if SYSV is enabled]) 17 | 18 | AM_CONDITIONAL([ENABLE_SYSV], [test "x$enable_sysv" = x1]) 19 | ])dnl 20 | -------------------------------------------------------------------------------- /comex/m4/comex_function.m4: -------------------------------------------------------------------------------- 1 | # COMEX_FUNCTION 2 | # ----------- 3 | # Define FUNCTION_NAME to either __func__ or __FUNCTION__ appropriately. 4 | # If all else fails, #define FUNCTION_NAME . 5 | AC_DEFUN([COMEX_FUNCTION], 6 | [AC_CACHE_CHECK([for preprocessor symbol for function name], 7 | [comex_cv_cpp_function], 8 | [AS_IF([test x$comex_cv_cpp_function = x], 9 | [AC_COMPILE_IFELSE( 10 | [AC_LANG_PROGRAM([[extern int printf(const char *format, ...);]], 11 | [[printf("__func__ = %s\n", __func__);]])], 12 | [comex_cv_cpp_function=__func__])]) 13 | AS_IF([test x$comex_cv_cpp_function = x], 14 | [AC_COMPILE_IFELSE( 15 | [AC_LANG_PROGRAM([[extern int printf(const char *format, ...);]], 16 | [[printf("__FUNCTION__ = %s\n", __FUNCTION__);]])], 17 | [comex_cv_cpp_function=__FUNCTION__])]) 18 | AS_IF([test x$comex_cv_cpp_function = x], 19 | [comex_cv_cpp_function='"Unknown"'])]) 20 | AC_DEFINE_UNQUOTED([FUNCTION_NAME], [$comex_cv_cpp_function], 21 | [CPP symbol for function name, if available]) 22 | ])# COMEX_FUNCTION 23 | -------------------------------------------------------------------------------- /comex/m4/comex_mpi_test_disable.m4: -------------------------------------------------------------------------------- 1 | # COMEX_DISABLE_MPI_TESTS() 2 | # --------------------- 3 | # Whether to disable all MPI linker tests. 4 | AC_DEFUN([COMEX_DISABLE_MPI_TESTS], 5 | [AC_ARG_ENABLE([mpi-tests], 6 | [AS_HELP_STRING([--disable-mpi-tests], [disable MPI linker tests])], 7 | [], 8 | [enable_mpi_tests=yes]) 9 | ])# COMEX_DISABLE_MPI_TESTS 10 | -------------------------------------------------------------------------------- /comex/m4/comex_sys_weak_alias.m4: -------------------------------------------------------------------------------- 1 | # COMEX_DISABLE_SYS_WEAK_ALIAS 2 | # ------------------------- 3 | # Whether to disable the test for weak aliases 4 | AC_DEFUN([COMEX_DISABLE_SYS_WEAK_ALIAS], [ 5 | AC_ARG_ENABLE([weak], 6 | [AS_HELP_STRING([--disable-weak], [don't use weak symbols for profiling])], 7 | [], 8 | [enable_weak=yes]) 9 | AS_IF([test "x$comex_cv_target_base" = xCYGWIN], [enable_weak=no]) 10 | ])dnl 11 | 12 | # COMEX_SYS_WEAK_ALIAS 13 | # ----------------- 14 | # Whether pragma weak is supported. 15 | AC_DEFUN([COMEX_SYS_WEAK_ALIAS], [ 16 | AS_IF([test "x$enable_weak" = xyes], 17 | [ax_sys_weak_alias=no 18 | _AX_SYS_WEAK_ALIAS_PRAGMA], 19 | [ax_cv_sys_weak_alias_pragma=no 20 | AC_DEFINE([HAVE_SYS_WEAK_ALIAS_PRAGMA], [0], 21 | [Define this if weak aliases may be created with @%:@pragma weak])]) 22 | AM_CONDITIONAL([HAVE_SYS_WEAK_ALIAS_PRAGMA], 23 | [test "x$ax_cv_sys_weak_alias_pragma" = xyes]) 24 | # enable shared libs automatically if profiling using weak symbols 25 | AS_IF([test "x$ax_cv_sys_weak_alias_pragma" = xyes], 26 | [AS_IF([test "x$enable_profiling" = xyes], 27 | [enable_shared=yes])]) 28 | ])dnl 29 | -------------------------------------------------------------------------------- /comex/m4/comex_with_help.m4: -------------------------------------------------------------------------------- 1 | # COMEX_WITH_HELP 2 | # ------------ 3 | # Using undocumented features, add some text to our --with-PACKAGE help to 4 | # avoid repetition. 5 | AC_DEFUN([COMEX_WITH_HELP], 6 | [AC_ARG_WITH([PACKAGE], [AS_HELP_STRING([--with-PACKAGE[[=ARG]]], 7 | [for most of the external software packages, ARG can be one or more whitespace-separated directories, linker or preprocessor directives; for example, --with-PACKAGE="/path/to/PACKAGE -lmylib -I/mydir"])])]) 8 | -------------------------------------------------------------------------------- /comex/m4/comex_with_mpi.m4: -------------------------------------------------------------------------------- 1 | # COMEX_WITH_MPI 2 | # -------------- 3 | # Establishes all things related to the Message Passing Interface. 4 | # This includes the compilers to use (either standard or MPI wrappers) 5 | # or the proper linker flags (-L), libs (-l) or preprocessor directives (-I). 6 | # Yes, it's a beefy AC macro, but because when MPI is desired it replaces the 7 | # usual compiler the order here is necessary and it is all interdependent. 8 | AC_DEFUN([COMEX_WITH_MPI], [ 9 | # MPI_* vars might exist in environment, but they are really internal. 10 | # Reset them. 11 | MPI_LIBS= 12 | MPI_LDFLAGS= 13 | MPI_CPPFLAGS= 14 | AC_ARG_WITH([mpi], 15 | [AS_HELP_STRING([--with-mpi[[=ARG]]], 16 | [path to MPI; leave ARG blank to use MPI compiler wrappers in PATH])], 17 | [], 18 | [with_mpi=yes]) 19 | AS_IF([test "x$with_mpi" = xyes], 20 | [with_mpi_wrappers=yes], 21 | [with_mpi_wrappers=no]) 22 | dnl postpone parsing with_mpi until we know sizeof(void*) 23 | dnl AS_IF([test x$with_mpi_wrappers = xno], 24 | dnl [COMEX_ARG_PARSE([with_mpi], [MPI_LIBS], [MPI_LDFLAGS], [MPI_CPPFLAGS])]) 25 | AC_SUBST([MPI_LIBS]) 26 | AC_SUBST([MPI_LDFLAGS]) 27 | AC_SUBST([MPI_CPPFLAGS]) 28 | ])dnl 29 | -------------------------------------------------------------------------------- /comex/src-armci/Makefile.inc: -------------------------------------------------------------------------------- 1 | lib_LTLIBRARIES += libarmci.la 2 | 3 | libarmci_la_SOURCES = 4 | libarmci_la_SOURCES += src-armci/armci.c 5 | libarmci_la_SOURCES += src-armci/groups.c 6 | libarmci_la_SOURCES += src-armci/message.c 7 | libarmci_la_SOURCES += src-armci/iterator.c 8 | libarmci_la_SOURCES += src-armci/iterator.h 9 | 10 | libarmci_la_LIBADD = libcomexi.la 11 | 12 | include_HEADERS += src-armci/armci.h 13 | include_HEADERS += src-armci/message.h 14 | -------------------------------------------------------------------------------- /comex/src-mpi-mt/Makefile.inc: -------------------------------------------------------------------------------- 1 | libcomex_la_SOURCES += src-mpi-mt/comex.c 2 | libcomex_la_SOURCES += src-mpi-mt/comex_impl.h 3 | libcomex_la_SOURCES += src-mpi-mt/groups.c 4 | libcomex_la_SOURCES += src-mpi-mt/groups.h 5 | 6 | AM_CPPFLAGS += -I$(top_srcdir)/src-mpi-mt 7 | -------------------------------------------------------------------------------- /comex/src-mpi-pr/Makefile.inc: -------------------------------------------------------------------------------- 1 | libcomex_la_SOURCES += src-mpi-pr/comex.c 2 | libcomex_la_SOURCES += src-mpi-pr/comex_impl.h 3 | libcomex_la_SOURCES += src-mpi-pr/groups.c 4 | libcomex_la_SOURCES += src-mpi-pr/groups.h 5 | libcomex_la_SOURCES += src-mpi-pr/reg_cache.c 6 | libcomex_la_SOURCES += src-mpi-pr/reg_cache.h 7 | 8 | AM_CPPFLAGS += -I$(top_srcdir)/src-mpi-pr 9 | 10 | check_PROGRAMS += src-mpi-pr/hello 11 | src_mpi_pr_hello_SOURCES = src-mpi-pr/hello.c 12 | -------------------------------------------------------------------------------- /comex/src-mpi-pr/hello.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #include 5 | 6 | #include "comex.h" 7 | 8 | int main(int argc, char **argv) 9 | { 10 | int rank = 0; 11 | int size = 0; 12 | void **memory = NULL; 13 | 14 | MPI_Init(&argc, &argv); 15 | comex_init(); 16 | 17 | comex_group_size(COMEX_GROUP_WORLD, &size); 18 | comex_group_rank(COMEX_GROUP_WORLD, &rank); 19 | 20 | memory = malloc(sizeof(void*) * size); 21 | assert(memory); 22 | comex_malloc(memory, 1024*(rank+1), COMEX_GROUP_WORLD); 23 | 24 | comex_free(memory[rank], COMEX_GROUP_WORLD); 25 | 26 | comex_finalize(); 27 | MPI_Finalize(); 28 | 29 | return 0; 30 | } 31 | -------------------------------------------------------------------------------- /comex/src-mpi-pt/Makefile.inc: -------------------------------------------------------------------------------- 1 | libcomex_la_SOURCES += src-mpi-pt/comex.c 2 | libcomex_la_SOURCES += src-mpi-pt/comex_impl.h 3 | libcomex_la_SOURCES += src-mpi-pt/groups.c 4 | libcomex_la_SOURCES += src-mpi-pt/groups.h 5 | libcomex_la_SOURCES += src-mpi-pt/reg_cache.c 6 | libcomex_la_SOURCES += src-mpi-pt/reg_cache.h 7 | 8 | AM_CPPFLAGS += -I$(top_srcdir)/src-mpi-pt 9 | 10 | check_PROGRAMS += src-mpi-pt/hello 11 | src_mpi_pt_hello_SOURCES = src-mpi-pt/hello.c 12 | -------------------------------------------------------------------------------- /comex/src-mpi-pt/NOTES.md: -------------------------------------------------------------------------------- 1 | # MPI Progress Threads (MPI-PT) 2 | 3 | These are notes describing the MPI progress threads runtime. These notes are intended to help developers navigate the contents of these files and to locate specific functionality. 4 | 5 | This implementation is nearly identical to MPI-PR. We recommend reading the MPI-PR NOTES.md file for details. The only difference is that instead of using `MPI_Comm_split()` to reserve a user-level MPI rank for progress, a thread is created for asynch progress. Read the MPI-PR NOTES.md for details about shared memory and how the progress server works. 6 | -------------------------------------------------------------------------------- /comex/src-mpi-pt/hello.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #include 5 | 6 | #include "comex.h" 7 | 8 | int main(int argc, char **argv) 9 | { 10 | int rank = 0; 11 | int size = 0; 12 | void **memory = NULL; 13 | 14 | MPI_Init(&argc, &argv); 15 | comex_init(); 16 | 17 | comex_group_size(COMEX_GROUP_WORLD, &size); 18 | comex_group_rank(COMEX_GROUP_WORLD, &rank); 19 | 20 | memory = malloc(sizeof(void*) * size); 21 | assert(memory); 22 | comex_malloc(memory, 1024*(rank+1), COMEX_GROUP_WORLD); 23 | 24 | comex_free(memory[rank], COMEX_GROUP_WORLD); 25 | 26 | comex_finalize(); 27 | MPI_Finalize(); 28 | 29 | return 0; 30 | } 31 | -------------------------------------------------------------------------------- /comex/src-mpi/Makefile.inc: -------------------------------------------------------------------------------- 1 | libcomex_la_SOURCES += src-mpi/comex.c 2 | libcomex_la_SOURCES += src-mpi/comex_impl.h 3 | libcomex_la_SOURCES += src-mpi/groups.c 4 | libcomex_la_SOURCES += src-mpi/groups.h 5 | 6 | AM_CPPFLAGS += -I$(top_srcdir)/src-mpi 7 | -------------------------------------------------------------------------------- /comex/src-mpi3/Makefile.inc: -------------------------------------------------------------------------------- 1 | libcomex_la_SOURCES += src-mpi3/comex.c 2 | libcomex_la_SOURCES += src-mpi3/comex_impl.h 3 | libcomex_la_SOURCES += src-mpi3/groups.c 4 | libcomex_la_SOURCES += src-mpi3/groups.h 5 | libcomex_la_SOURCES += src-mpi3/reg_win.c 6 | libcomex_la_SOURCES += src-mpi3/reg_win.h 7 | 8 | AM_CPPFLAGS += -I$(top_srcdir)/src-mpi3 9 | -------------------------------------------------------------------------------- /comex/src-mpi3/comex_impl.h: -------------------------------------------------------------------------------- 1 | #ifndef COMEX_IMPL_H_ 2 | #define COMEX_IMPL_H_ 3 | 4 | #include 5 | 6 | #include 7 | 8 | #include 9 | 10 | #include "groups.h" 11 | 12 | #define COMEX_MAX_NB_OUTSTANDING 128 13 | #define SHM_NAME_SIZE 20 14 | 15 | typedef struct { 16 | MPI_Comm world_comm; 17 | int rank; 18 | int size; 19 | } local_state; 20 | 21 | extern local_state l_state; 22 | 23 | #define DEBUG 0 24 | #define COMEX_STRINGIFY(x) #x 25 | #ifdef NDEBUG 26 | #define COMEX_ASSERT(WHAT) ((void) (0)) 27 | #else 28 | #define COMEX_ASSERT(WHAT) \ 29 | ((WHAT) \ 30 | ? (void) (0) \ 31 | : comex_assert_fail (COMEX_STRINGIFY(WHAT), __FILE__, __LINE__, __func__)) 32 | #endif 33 | 34 | static inline void comex_assert_fail( 35 | const char *assertion, 36 | const char *file, 37 | unsigned int line, 38 | const char *function) 39 | { 40 | fprintf(stderr, "[%d] %s:%u: %s: Assertion `%s' failed", 41 | l_state.rank, file, line, function, assertion); 42 | fflush(stderr); 43 | #if DEBUG 44 | printf("[%d] %s:%u: %s: Assertion `%s' failed", 45 | l_state.rank, file, line, function, assertion); 46 | #endif 47 | comex_error("comex_assert_fail", -1); 48 | } 49 | #endif /* COMEX_IMPL_H_ */ 50 | -------------------------------------------------------------------------------- /comex/src-mpi3/groups.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Private header file for comex groups backed by MPI_comm. 3 | * 4 | * The rest of the comex group functions are defined in the public comex.h. 5 | * 6 | * @author Jeff Daily 7 | */ 8 | #ifndef _COMEX_GROUPS_H_ 9 | #define _COMEX_GROUPS_H_ 10 | 11 | #include 12 | 13 | #include "comex.h" 14 | 15 | typedef struct win_link { 16 | struct win_link *next; 17 | struct win_link *prev; 18 | MPI_Win win; 19 | } win_link_t; 20 | 21 | typedef struct group_link { 22 | struct group_link *next; 23 | comex_group_t id; 24 | MPI_Comm comm; 25 | MPI_Group group; 26 | win_link_t *win_list; 27 | } comex_igroup_t; 28 | 29 | extern void comex_group_init(); 30 | extern void comex_group_finalize(); 31 | extern comex_igroup_t* comex_get_igroup_from_group(comex_group_t group); 32 | extern void comex_igroup_add_win(comex_group_t group, MPI_Win win); 33 | extern void comex_igroup_delete_win(comex_group_t group, MPI_Win win); 34 | 35 | #endif /* _COMEX_GROUPS_H_ */ 36 | -------------------------------------------------------------------------------- /comex/src-mpi3/reg_win.h: -------------------------------------------------------------------------------- 1 | #ifndef _REG_WINDOW_H_ 2 | #define _REG_WINDOW_H_ 3 | 4 | #include 5 | #include 6 | 7 | /** 8 | * Enumerate the return codes for registration window functions. 9 | */ 10 | typedef enum _reg_return_t { 11 | RR_SUCCESS=0, /**< success */ 12 | RR_FAILURE /**< non-specific failure */ 13 | } reg_return_t; 14 | 15 | /** 16 | * A registered contiguous memory region. 17 | */ 18 | typedef struct _reg_entry_t { 19 | comex_igroup_t *igroup; /**< link to group that generated window */ 20 | MPI_Win win; /**< handle to MPI window containing this region */ 21 | int rank; /**< rank where this region lives */ 22 | void *buf; /**< starting address of region */ 23 | size_t len; /**< length of region */ 24 | struct _reg_entry_t *next; /**< next memory region in list */ 25 | } reg_entry_t; 26 | 27 | /* functions 28 | * 29 | * documentation is in the *.c file 30 | */ 31 | 32 | reg_return_t reg_win_init(int nprocs); 33 | reg_return_t reg_win_destroy(); 34 | reg_entry_t *reg_win_find(int rank, void *buf, int len); 35 | reg_entry_t *reg_win_insert(int rank, void *buf, int len, MPI_Win win, 36 | comex_igroup_t *group); 37 | reg_return_t reg_win_delete(int rank, void *buf); 38 | 39 | #endif /* _REG_WINDOW_H_ */ 40 | -------------------------------------------------------------------------------- /comex/src-ofa/Makefile.inc: -------------------------------------------------------------------------------- 1 | libcomex_la_SOURCES += src-ofa/comex.c 2 | libcomex_la_SOURCES += src-ofa/comex_impl.h 3 | libcomex_la_SOURCES += src-ofa/contig.c 4 | libcomex_la_SOURCES += src-ofa/device.c 5 | libcomex_la_SOURCES += src-ofa/device.h 6 | libcomex_la_SOURCES += src-ofa/fence.c 7 | libcomex_la_SOURCES += src-ofa/gpa.c 8 | libcomex_la_SOURCES += src-ofa/groups.c 9 | libcomex_la_SOURCES += src-ofa/groups.h 10 | libcomex_la_SOURCES += src-ofa/mutex.c 11 | libcomex_la_SOURCES += src-ofa/openib.c 12 | libcomex_la_SOURCES += src-ofa/openib.h 13 | libcomex_la_SOURCES += src-ofa/reg_cache.c 14 | libcomex_la_SOURCES += src-ofa/reg_cache.h 15 | libcomex_la_SOURCES += src-ofa/strided.c 16 | libcomex_la_SOURCES += src-ofa/vector.c 17 | libcomex_la_SOURCES += src-ofa/wait.c 18 | 19 | AM_CPPFLAGS += -I$(top_srcdir)/src-ofa 20 | -------------------------------------------------------------------------------- /comex/src-ofa/comex_impl.h: -------------------------------------------------------------------------------- 1 | #ifndef COMEX_IMPL_H_ 2 | #define COMEX_IMPL_H_ 3 | 4 | #include 5 | #include "device.h" 6 | 7 | #define MIN_REGISTRATION_SIZE 64 8 | #define ACC_PIPELINE_THRESHOLD 8192 9 | typedef struct { 10 | 11 | MPI_Comm world_comm; 12 | int rank; 13 | int size; 14 | 15 | // buffer for lock 16 | void **atomic_lock_buf; 17 | void *local_lock_buf; 18 | 19 | void *acc_buf; 20 | int acc_buf_len; 21 | void *put_buf; 22 | int put_buf_len; 23 | void *get_buf; 24 | int get_buf_len; 25 | 26 | // Number of outstanding data transfers 27 | unsigned long num_outstanding; 28 | 29 | int comex_openib_use_dreg; 30 | } local_state; 31 | 32 | extern local_state l_state; 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /comex/src-ofa/device.h: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | // Device specific functions 8 | void* COMEXD_register_memory(void *buf, int len); 9 | 10 | int COMEXD_deregister_memory(void *buf); 11 | 12 | int COMEXD_put_nbi(void *src, void *dst, int bytes, int proc); 13 | 14 | int COMEXD_get_nbi(void *src, void *dst, int bytes, int proc); 15 | 16 | void COMEXD_network_lock(int proc); 17 | 18 | void COMEXD_network_unlock(int proc); 19 | 20 | int COMEXD_waitproc(int proc); 21 | 22 | int COMEXD_waitall(); 23 | 24 | int COMEXD_initialize(); 25 | 26 | int COMEXD_finalize(); 27 | 28 | -------------------------------------------------------------------------------- /comex/src-ofa/fence.c: -------------------------------------------------------------------------------- 1 | #if HAVE_CONFIG_H 2 | # include "config.h" 3 | #endif 4 | 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | 11 | #include "comex.h" 12 | #include "comex_impl.h" 13 | #include "device.h" 14 | 15 | int comex_fence_all(comex_group_t group) 16 | { 17 | COMEXD_waitall(); 18 | return COMEX_SUCCESS; 19 | } 20 | 21 | 22 | int comex_fence_proc(int proc, comex_group_t group) 23 | { 24 | COMEXD_waitall(); 25 | return COMEX_SUCCESS; 26 | } 27 | 28 | 29 | int comex_barrier(comex_group_t group) 30 | { 31 | assert(l_state.world_comm); 32 | 33 | comex_fence_all(group); 34 | 35 | MPI_Barrier(l_state.world_comm); 36 | 37 | return COMEX_SUCCESS; 38 | } 39 | 40 | -------------------------------------------------------------------------------- /comex/src-ofa/gpa.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlobalArrays/ga/00cbef332a83e3c50794d9f70b45aa7258aa3649/comex/src-ofa/gpa.c -------------------------------------------------------------------------------- /comex/src-ofa/groups.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Private header file for COMEX groups backed by MPI_comm. 3 | * 4 | * The rest of the COMEX_Group functions are defined in the public comex.h. 5 | * 6 | * @author Jeff Daily 7 | */ 8 | #ifndef _COMEX_GROUPS_H_ 9 | #define _COMEX_GROUPS_H_ 10 | 11 | #include 12 | 13 | /* dup of MPI_COMM_WORLD for internal MPI communication */ 14 | extern MPI_Comm COMEX_COMM_WORLD; 15 | 16 | typedef struct group_link { 17 | struct group_link *next; 18 | comex_group_t id; 19 | MPI_Comm comm; 20 | MPI_Group group; 21 | } comex_igroup_t; 22 | 23 | extern void comex_group_init(); 24 | extern void comex_group_finalize(); 25 | extern comex_igroup_t* comex_get_igroup_from_group(comex_group_t group); 26 | 27 | #endif /* _COMEX_GROUPS_H_ */ 28 | -------------------------------------------------------------------------------- /comex/src-ofa/mutex.c: -------------------------------------------------------------------------------- 1 | #if HAVE_CONFIG_H 2 | # include "config.h" 3 | #endif 4 | 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | 11 | #include "comex.h" 12 | #include "comex_impl.h" 13 | 14 | 15 | int comex_create_mutexes(int num) 16 | { 17 | assert(0); 18 | return COMEX_SUCCESS; 19 | } 20 | 21 | int comex_destroy_mutexes() 22 | { 23 | assert(0); 24 | return COMEX_SUCCESS; 25 | } 26 | 27 | int comex_lock(int mutex, int proc) 28 | { 29 | assert(0); 30 | return COMEX_SUCCESS; 31 | } 32 | 33 | int comex_unlock(int mutex, int proc) 34 | { 35 | assert(0); 36 | return COMEX_SUCCESS; 37 | } 38 | 39 | -------------------------------------------------------------------------------- /comex/src-ofa/reg_cache.h: -------------------------------------------------------------------------------- 1 | #ifndef _REG_CACHE_H_ 2 | #define _REG_CACHE_H_ 3 | 4 | #include 5 | 6 | struct _reg_entry_t { 7 | void *buf; 8 | size_t len; 9 | int lkey; 10 | int rkey; 11 | struct ibv_mr *mr; 12 | struct _reg_entry_t *next; 13 | }; 14 | 15 | struct _reg_entry_t *reg_cache_find(int, void *, size_t); 16 | int reg_cache_init(int, int); 17 | int reg_cache_destroy(int); 18 | int reg_cache_insert(int rank, void *buf, size_t len, int, int, struct ibv_mr *); 19 | void reg_cache_delete(int rank, void *buf); 20 | 21 | #endif /* _REG_CACHE_H_ */ 22 | -------------------------------------------------------------------------------- /comex/src-ofa/wait.c: -------------------------------------------------------------------------------- 1 | #if HAVE_CONFIG_H 2 | # include "config.h" 3 | #endif 4 | 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | 11 | #include "comex.h" 12 | #include "comex_impl.h" 13 | 14 | 15 | int comex_wait_proc(int proc, comex_group_t group) 16 | { 17 | return COMEXD_waitproc(proc); 18 | } 19 | 20 | int comex_wait(comex_request_t * hdl) 21 | { 22 | return COMEXD_waitall(); 23 | } 24 | 25 | int comex_test(comex_request_t * hdl, int *status) 26 | { 27 | *status = 0; 28 | return COMEXD_waitall(); 29 | } 30 | 31 | int comex_wait_all(comex_group_t group) 32 | { 33 | return COMEXD_waitall(); 34 | } 35 | 36 | -------------------------------------------------------------------------------- /comex/src-ofi/Makefile.inc: -------------------------------------------------------------------------------- 1 | libcomex_la_SOURCES += src-ofi/comex.c 2 | libcomex_la_SOURCES += src-ofi/comex_impl.h 3 | libcomex_la_SOURCES += src-ofi/datatype.h 4 | libcomex_la_SOURCES += src-ofi/env.h 5 | libcomex_la_SOURCES += src-ofi/env.c 6 | libcomex_la_SOURCES += src-ofi/groups.c 7 | libcomex_la_SOURCES += src-ofi/groups.h 8 | libcomex_la_SOURCES += src-ofi/log.h 9 | libcomex_la_SOURCES += src-ofi/mutex.h 10 | libcomex_la_SOURCES += src-ofi/ofi.h 11 | libcomex_la_SOURCES += src-ofi/request.h 12 | libcomex_la_SOURCES += src-ofi/fi_lock.h 13 | 14 | AM_CPPFLAGS += -I$(top_srcdir)/src-ofi 15 | -------------------------------------------------------------------------------- /comex/src-ofi/env.h: -------------------------------------------------------------------------------- 1 | /* 2 | * * Copyright (c) 2016 Intel Corporation. All rights reserved. 3 | */ 4 | 5 | #ifndef ENV_H_ 6 | #define ENV_H_ 7 | 8 | #define CACHELINE_SIZE 64 9 | 10 | typedef struct env_data_t 11 | { 12 | int log_level; 13 | int native_atomics; 14 | int emulation_type; 15 | int progress_thread; 16 | int cq_entries_count; 17 | int force_sync; 18 | char* provider; 19 | char* library_path; 20 | } env_data_t __attribute__ ((aligned (CACHELINE_SIZE))); 21 | 22 | extern env_data_t env_data; 23 | 24 | int env_to_int(const char* env_name, int* value); 25 | void parse_env_vars(); 26 | 27 | #endif /* ENV_H_ */ 28 | -------------------------------------------------------------------------------- /comex/src-portals4/Makefile.inc: -------------------------------------------------------------------------------- 1 | libcomex_la_SOURCES += src-portals4/comex.c 2 | libcomex_la_SOURCES += src-portals4/comex_impl.h 3 | libcomex_la_SOURCES += src-portals4/groups.c 4 | libcomex_la_SOURCES += src-portals4/groups.h 5 | 6 | AM_CPPFLAGS += -I$(top_srcdir)/src-portals4 7 | -------------------------------------------------------------------------------- /comex/src-portals4/comex_impl.h: -------------------------------------------------------------------------------- 1 | #ifndef COMEX_IMPL_H_ 2 | #define COMEX_IMPL_H_ 3 | 4 | #include 5 | #include 6 | 7 | #define COMEX_MAX_NB_OUTSTANDING 16 8 | 9 | #define DEBUG 0 10 | #define DEBUG_TO_FILE 0 11 | #if DEBUG_TO_FILE 12 | # define printf(...) fprintf(l_state.my_file, __VA_ARGS__); fflush(l_state.my_file) 13 | #else 14 | # define printf(...) fprintf(stderr, __VA_ARGS__); fflush(stderr) 15 | #endif 16 | 17 | typedef struct { 18 | MPI_Comm world_comm; 19 | int rank; 20 | int size; 21 | ptl_ni_limits_t ptl_ni_limits; 22 | ptl_handle_ni_t ptl_ni_handle; 23 | ptl_process_t ptl_process_id; 24 | ptl_process_t *ptl_process_ids; 25 | ptl_uid_t ptl_uid; 26 | ptl_pt_index_t ptl_pt_index; 27 | ptl_pt_index_t *ptl_pt_indexes; 28 | ptl_handle_eq_t ptl_eq_handle; 29 | ptl_handle_md_t ptl_md_handle; 30 | ptl_handle_le_t ptl_le_handle; 31 | long **mutexes; /**< all mutexes */ 32 | long *local_mutex; /**< store the remote mutex value */ 33 | unsigned int *num_mutexes; /**< how many mutexes on each process */ 34 | 35 | #if DEBUG_TO_FILE 36 | FILE *my_file; 37 | #endif 38 | } local_state; 39 | 40 | extern local_state l_state; 41 | 42 | #endif /* COMEX_IMPL_H_ */ 43 | -------------------------------------------------------------------------------- /comex/src-portals4/groups.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Private header file for comex groups backed by MPI_comm. 3 | * 4 | * The rest of the comex group functions are defined in the public comex.h. 5 | * 6 | * @author Jeff Daily 7 | */ 8 | #ifndef _COMEX_GROUPS_H_ 9 | #define _COMEX_GROUPS_H_ 10 | 11 | #include 12 | 13 | #include "comex.h" 14 | 15 | typedef struct group_link { 16 | struct group_link *next; 17 | comex_group_t id; 18 | MPI_Comm comm; 19 | MPI_Group group; 20 | } comex_igroup_t; 21 | 22 | extern void comex_group_init(); 23 | extern void comex_group_finalize(); 24 | extern comex_igroup_t* comex_get_igroup_from_group(comex_group_t group); 25 | 26 | #endif /* _COMEX_GROUPS_H_ */ 27 | -------------------------------------------------------------------------------- /comex/src-template/Makefile.inc: -------------------------------------------------------------------------------- 1 | # NOTE: Replace 'template' with appropriate name of new src-xxx directory. 2 | libcomex_la_SOURCES += src-template/comex.c 3 | libcomex_la_SOURCES += src-template/comex_impl.h 4 | libcomex_la_SOURCES += src-template/groups.c 5 | libcomex_la_SOURCES += src-template/groups.h 6 | 7 | AM_CPPFLAGS += -I$(top_srcdir)/src-template 8 | -------------------------------------------------------------------------------- /comex/src-template/comex_impl.h: -------------------------------------------------------------------------------- 1 | #ifndef COMEX_IMPL_H_ 2 | #define COMEX_IMPL_H_ 3 | 4 | #include 5 | 6 | typedef struct { 7 | MPI_Comm world_comm; 8 | int rank; 9 | int size; 10 | } local_state; 11 | 12 | extern local_state l_state; 13 | 14 | #endif /* COMEX_IMPL_H_ */ 15 | -------------------------------------------------------------------------------- /comex/src-template/groups.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Private header file for comex groups backed by MPI_comm. 3 | * 4 | * The rest of the comex group functions are defined in the public comex.h. 5 | * 6 | * @author Jeff Daily 7 | */ 8 | #ifndef _COMEX_GROUPS_H_ 9 | #define _COMEX_GROUPS_H_ 10 | 11 | #include 12 | 13 | #include "comex.h" 14 | 15 | typedef struct group_link { 16 | struct group_link *next; 17 | comex_group_t id; 18 | MPI_Comm comm; 19 | MPI_Group group; 20 | } comex_igroup_t; 21 | 22 | extern void comex_group_init(); 23 | extern void comex_group_finalize(); 24 | extern comex_igroup_t* comex_get_igroup_from_group(comex_group_t group); 25 | 26 | #endif /* _COMEX_GROUPS_H_ */ 27 | -------------------------------------------------------------------------------- /doc/armci/armci_doc.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlobalArrays/ga/00cbef332a83e3c50794d9f70b45aa7258aa3649/doc/armci/armci_doc.pdf -------------------------------------------------------------------------------- /doc/armci/armci_overview.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlobalArrays/ga/00cbef332a83e3c50794d9f70b45aa7258aa3649/doc/armci/armci_overview.pdf -------------------------------------------------------------------------------- /doc/ga/ga_c_api.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlobalArrays/ga/00cbef332a83e3c50794d9f70b45aa7258aa3649/doc/ga/ga_c_api.pdf -------------------------------------------------------------------------------- /doc/ga/ga_doc.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlobalArrays/ga/00cbef332a83e3c50794d9f70b45aa7258aa3649/doc/ga/ga_doc.pdf -------------------------------------------------------------------------------- /ga++/src/init_term.cc: -------------------------------------------------------------------------------- 1 | #if HAVE_CONFIG_H 2 | # include "config.h" 3 | #endif 4 | 5 | #include "mp3.h" 6 | 7 | #include "ga++.h" 8 | 9 | void 10 | GA::Initialize(int argc, char *argv[], size_t limit) { 11 | MP_INIT(argc, argv); 12 | 13 | // GA Initialization 14 | if(limit == 0) 15 | GA_Initialize(); 16 | else 17 | GA_Initialize_ltd(limit); 18 | } 19 | 20 | void 21 | GA::Initialize(int argc, char *argv[], unsigned long heapSize, 22 | unsigned long stackSize, int type, size_t limit) { 23 | MP_INIT(argc, argv); 24 | 25 | // GA Initialization 26 | if(limit == 0) 27 | GA_Initialize(); 28 | else 29 | GA_Initialize_ltd(limit); 30 | 31 | 32 | //if(GA_Uses_ma()) { 33 | 34 | int nProcs = GA_Nnodes(); 35 | 36 | // Initialize memory allocator 37 | heapSize /= ((unsigned long) nProcs); 38 | stackSize /= ((unsigned long) nProcs); 39 | 40 | if(!MA_init(type, stackSize, heapSize)) 41 | GA_Error((char *)"MA_init failed",stackSize+heapSize); 42 | // } 43 | } 44 | 45 | void 46 | GA::Terminate() 47 | { 48 | 49 | /* Terminate GA */ 50 | GA_Terminate(); 51 | 52 | MP_FINALIZE(); 53 | } 54 | -------------------------------------------------------------------------------- /gaf2c/drand.c: -------------------------------------------------------------------------------- 1 | #if HAVE_CONFIG_H 2 | # include "config.h" 3 | #endif 4 | 5 | #if HAVE_STDLIB_H 6 | # include 7 | #endif 8 | 9 | #include "typesf2c.h" 10 | 11 | static DoublePrecision gai_drand_(Integer *flag) 12 | { 13 | if (*flag) 14 | srandom((unsigned) *flag); 15 | 16 | return ((DoublePrecision) random()) * 4.6566128752458e-10; 17 | } 18 | 19 | #define drand_ F77_FUNC(drand,DRAND) 20 | DoublePrecision drand_(Integer *flag) 21 | { 22 | return (gai_drand_(flag)); 23 | } 24 | -------------------------------------------------------------------------------- /gaf2c/farg.F: -------------------------------------------------------------------------------- 1 | #if HAVE_CONFIG_H 2 | # include "config.fh" 3 | #endif 4 | integer function f2c_iargc() 5 | FXX_MODULE 6 | f2c_iargc = F77_IARGC() + 1 7 | return 8 | end 9 | subroutine f2c_getarg( i, s ) 10 | FXX_MODULE 11 | integer i, l, ier 12 | character *(*) s 13 | F77_GETARG_DECL 14 | call F77_GETARG(F77_GETARG_ARGS) 15 | return 16 | end 17 | -------------------------------------------------------------------------------- /gaf2c/farg.h.in: -------------------------------------------------------------------------------- 1 | #ifndef FARG_H_ 2 | #define FARG_H_ 3 | 4 | #include "typesf2c.h" 5 | 6 | #define F2C_GETARG @F2C_GETARG@ 7 | #define F2C_IARGC @F2C_IARGC@ 8 | 9 | #define F2C_GETARG_ARGV_MAX 255 10 | #define F2C_GETARG_ARGLEN_MAX 255 11 | 12 | extern void F2C_GETARG(Integer*, char*, int); 13 | extern Integer F2C_IARGC(); 14 | 15 | extern void ga_c2fstring(char *cstring, char *fstring, int flength); 16 | extern void ga_f2cstring(char *fstring, int flength, char *cstring, int clength); 17 | extern void ga_f2c_get_cmd_args(int *argc, char ***argv); 18 | 19 | #endif /* FARG_H_ */ 20 | -------------------------------------------------------------------------------- /gaf2c/testarg.c: -------------------------------------------------------------------------------- 1 | #if HAVE_CONFIG_H 2 | # include "config.h" 3 | #endif 4 | 5 | #if HAVE_STDIO_H 6 | # include 7 | #endif 8 | 9 | /** @file 10 | * This checks the functioning of the include file gaf2cp.h. 11 | */ 12 | 13 | #include "farg.h" 14 | #include "typesf2c.h" 15 | 16 | #define ARGLIMIT 256 17 | 18 | #define PARG_ F77_FUNC(parg,PARG) 19 | 20 | void PARG_() 21 | { 22 | Integer i; 23 | Integer limit = F2C_IARGC(); 24 | printf("argc=%d\n", (int)limit); 25 | 26 | for (i=0; i 5 | 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | extern MPI_Comm GA_MPI_Comm(); 11 | extern MPI_Comm GA_MPI_Comm_pgroup(int pgroup); 12 | extern MPI_Comm GA_MPI_Comm_pgroup_default(); 13 | 14 | #ifdef __cplusplus 15 | } 16 | #endif 17 | 18 | #endif /* GA_MPI_H_ */ 19 | -------------------------------------------------------------------------------- /global/src/ga_ckpt.h: -------------------------------------------------------------------------------- 1 | #include "armci_chkpt.h" 2 | -------------------------------------------------------------------------------- /global/src/ga_diag_seqc.c: -------------------------------------------------------------------------------- 1 | #if HAVE_CONFIG_H 2 | # include "config.h" 3 | #endif 4 | 5 | #include "globalp.h" 6 | #include "ga-papi.h" 7 | #include "ga-wapi.h" 8 | 9 | #if ENABLE_F77 10 | extern void gai_diag_seq_(Integer*, Integer*, Integer*, DoublePrecision*); 11 | extern void gai_diag_std_seq_(Integer*, Integer*, DoublePrecision*); 12 | # define gai_diag_seq_ F77_FUNC_(gai_diag_seq,GAI_DIAG_SEQ) 13 | # define gai_diag_std_seq_ F77_FUNC_(gai_diag_std_seq,GAI_DIAG_STD_SEQ) 14 | #endif 15 | 16 | #if HAVE_SYS_WEAK_ALIAS_PRAGMA 17 | # pragma weak wnga_diag_seq = pnga_diag_seq 18 | #endif 19 | void pnga_diag_seq(Integer g_a, Integer g_s, Integer g_v, 20 | DoublePrecision *eval) { 21 | #if ENABLE_F77 22 | gai_diag_seq_(&g_a, &g_s, &g_v, eval); 23 | #else 24 | pnga_error("ga_diag_seq: you must configure --enable-f77", 0L); 25 | #endif 26 | } 27 | 28 | #if HAVE_SYS_WEAK_ALIAS_PRAGMA 29 | # pragma weak wnga_diag_std_seq = pnga_diag_std_seq 30 | #endif 31 | void pnga_diag_std_seq(Integer g_a, Integer g_v, 32 | DoublePrecision *eval) { 33 | #if ENABLE_F77 34 | gai_diag_std_seq_(&g_a, &g_v, eval); 35 | #else 36 | pnga_error("ga_diag_std_seq: you must configure --enable-f77", 0L); 37 | #endif 38 | } 39 | -------------------------------------------------------------------------------- /global/src/ga_profile.h: -------------------------------------------------------------------------------- 1 | /* $Id: ga_profile.h,v 1.3 2005-07-21 08:14:30 manoj Exp $ */ 2 | 3 | #define GA_PROFILE_PUT 1 4 | #define GA_PROFILE_GET 2 5 | #define GA_PROFILE_ACC 3 6 | 7 | extern void ga_profile_init(); 8 | extern void ga_profile_terminate(); 9 | extern void ga_profile_start(int g_a, long bytes, int ndim, Integer *lo, 10 | Integer *hi, int comm_type); 11 | extern void ga_profile_stop(); 12 | -------------------------------------------------------------------------------- /global/src/gacommon.h: -------------------------------------------------------------------------------- 1 | #ifndef GACOMMON_H_ 2 | #define GACOMMON_H_ 3 | 4 | #include "macommon.h" 5 | 6 | #define GA_MAX_DIM 7 7 | #define GA_MAX_CACHE 10 8 | 9 | #define GA_VERSION_MAJOR 5 10 | #define GA_VERSION_MINOR 9 11 | #define GA_VERSION_PATCH 2 12 | 13 | #define C_CHAR MT_C_CHAR 14 | #define C_DBL MT_C_DBL 15 | #define C_DCPL MT_C_DCPL 16 | #define C_FLOAT MT_C_FLOAT 17 | #define C_INT MT_C_INT 18 | #define C_LDBL MT_C_LDBL 19 | #define C_LDCPL MT_C_LDCPL 20 | #define C_LONGLONG MT_C_LONGLONG 21 | #define C_LONG MT_C_LONGINT 22 | #define C_SCPL MT_C_SCPL 23 | 24 | #define F_BYTE MT_F_BYTE 25 | #define F_DBL MT_F_DBL 26 | #define F_DCPL MT_F_DCPL 27 | #define F_INT MT_F_INT 28 | #define F_LOG MT_F_LOG 29 | #define F_REAL MT_F_REAL 30 | #define F_SCPL MT_F_SCPL 31 | 32 | #endif /* GACOMMON_H_ */ 33 | -------------------------------------------------------------------------------- /global/src/gaconfig.h: -------------------------------------------------------------------------------- 1 | /* Configuration header file for GA 2 | * 3 | * The following INTERNAL GA parameters can be customized: 4 | * - max number of arrays 5 | * - range of message passing tag/type values 6 | * - length of message buffer(s) 7 | * - max number of processors 8 | * - disabling MA use 9 | * 10 | */ 11 | #ifndef _GACONFIG_H 12 | #define _GACONFIG_H 13 | 14 | #include "gacommon.h" 15 | 16 | /* max number of global arrays */ 17 | #define MAX_ARRAYS 32768 18 | 19 | /* max number of mutexes */ 20 | #define MAX_MUTEXES 32768 21 | 22 | /* there are 20 message-passing tags/types numbered from GA_MSG_OFFSET up */ 23 | #define GA_MSG_OFFSET 32000 24 | 25 | /* max number of dimensions 26 | * Now set in global.h and global.fh so users can access the value. 27 | * We set the macro used internally from the gacommon.h value. 28 | */ 29 | #define MAXDIM GA_MAX_DIM 30 | 31 | /* uncoment the following line to never use MA (Memory Allocator) for 32 | * storing data in global arrays (not temporary buffers!) */ 33 | #define AVOID_MA_STORAGE 34 | 35 | /* maxiumum accesses stored for read cache*/ 36 | #define MAXCACHE GA_MAX_CACHE 37 | 38 | #endif /* _GACONFIG_H */ 39 | -------------------------------------------------------------------------------- /global/src/global.h: -------------------------------------------------------------------------------- 1 | /** @file global.h 2 | * 3 | * This is a private header file which defines all Fortran functions. 4 | * The names of these functions should mirror those found in global.h. 5 | */ 6 | 7 | #ifndef GLOBAL_H 8 | #define GLOBAL_H 9 | 10 | #include "typesf2c.h" 11 | 12 | extern DoubleComplex *DCPL_MB; 13 | extern SingleComplex *SCPL_MB; 14 | extern DoublePrecision *DBL_MB; 15 | extern float *FLT_MB; 16 | extern Integer *INT_MB; 17 | 18 | #endif /* GLOBAL_H */ 19 | -------------------------------------------------------------------------------- /global/src/mtwister.h: -------------------------------------------------------------------------------- 1 | #ifndef __MTWISTER_H 2 | #define __MTWISTER_H 3 | 4 | #define STATE_VECTOR_LENGTH 624 5 | #define STATE_VECTOR_M 397 /* changes to STATE_VECTOR_LENGTH also require changes to this */ 6 | 7 | typedef struct tagMTRand { 8 | unsigned long mt[STATE_VECTOR_LENGTH]; 9 | int index; 10 | } MTRand; 11 | 12 | MTRand seedRand(unsigned long seed); 13 | unsigned long genRandLong(MTRand* rand); 14 | double genRand(MTRand* rand); 15 | 16 | #endif /* #ifndef __MTWISTER_H */ 17 | -------------------------------------------------------------------------------- /global/src/scalapack.fh: -------------------------------------------------------------------------------- 1 | #ifdef SCALAPACK_I8 2 | #define INTGR4 integer*8 3 | #else 4 | #define INTGR4 integer*4 5 | #endif 6 | 7 | INTGR4 iam, nnodes,nprow,npcol, myrow, mycol, iSLctxt, 8 | A maxproc, iSLctxt2,nprow2,npcol2, myrow2, mycol2 9 | logical init,init2, init3, init4 10 | common /SLface/ init, init2, init3, init4, 11 | * iam, nnodes, nprow,npcol, myrow, mycol, 12 | * iSLctxt,iSLctxt2, 13 | * maxproc,nprow2,npcol2, myrow2, mycol2 14 | 15 | #ifdef LINUX_DBL_UNDERSCORE 16 | #define blacs_pinfo blacs_pinfo_ 17 | #define blacs_get blacs_get_ 18 | #define blacs_gridinit blacs_gridinit_ 19 | #define blacs_gridinfo blacs_gridinfo_ 20 | #endif 21 | -------------------------------------------------------------------------------- /global/src/thread-safe.c: -------------------------------------------------------------------------------- 1 | #if HAVE_CONFIG_H 2 | # include "config.h" 3 | #endif 4 | 5 | #include "thread-safe.h" 6 | 7 | #if defined(PTHREADS) && defined(THREAD_SAFE) 8 | #include 9 | #include 10 | 11 | pthread_mutex_t ga_threadsafe_lock; 12 | 13 | void GA_Internal_Threadsafe_Lock() 14 | { 15 | pthread_mutex_lock(&ga_threadsafe_lock); 16 | } 17 | 18 | void GA_Internal_Threadsafe_Unlock() 19 | { 20 | pthread_mutex_unlock(&ga_threadsafe_lock); 21 | } 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /global/src/thread-safe.h: -------------------------------------------------------------------------------- 1 | #ifndef _GA_THREAD_SAFE_H_ 2 | #define _GA_THREAD_SAFE_H_ 3 | 4 | #define THREAD_SAFE 1 5 | 6 | #if defined(PTHREADS) && defined(THREAD_SAFE) 7 | 8 | #ifdef __cplusplus 9 | extern "C" { 10 | #endif 11 | 12 | extern void GA_Internal_Threadsafe_Lock(); 13 | extern void GA_Internal_Threadsafe_Unlock(); 14 | 15 | #ifdef __cplusplus 16 | } 17 | #endif 18 | 19 | #else 20 | 21 | #define GA_Internal_Threadsafe_Lock() 22 | #define GA_Internal_Threadsafe_Unlock() 23 | 24 | #endif 25 | 26 | #endif /* _GA_THREAD_SAFE_H_ */ 27 | -------------------------------------------------------------------------------- /global/src/types.xh: -------------------------------------------------------------------------------- 1 | TYPE_CASE(C_INT,int,reg) 2 | TYPE_CASE(C_LONG,long,reg) 3 | TYPE_CASE(C_LONGLONG,long long,reg) 4 | TYPE_CASE(C_FLOAT,float,reg) 5 | TYPE_CASE(C_DBL,double,reg) 6 | TYPE_CASE(C_SCPL,SingleComplex,cpl) 7 | TYPE_CASE(C_DCPL,DoubleComplex,cpl) 8 | -------------------------------------------------------------------------------- /global/testing/ffflush.F: -------------------------------------------------------------------------------- 1 | #if HAVE_CONFIG_H 2 | # include "config.fh" 3 | #endif 4 | c $Id: ffflush.F,v 1.2 2002-10-07 16:50:05 d3h325 Exp $ 5 | subroutine ffflush(unit) 6 | integer unit 7 | c 8 | #if HAVE_F77_FLUSH 9 | call F77_FLUSH(unit) 10 | #endif 11 | c 12 | end 13 | -------------------------------------------------------------------------------- /global/testing/ipcreset: -------------------------------------------------------------------------------- 1 | #!/bin/csh 2 | # clean System V IPC resources (semaphores and shared memory) owned by the user 3 | # 4 | if( `uname` == "Linux") then 5 | # Linux has non-standard interface to ipcrm 6 | # we use int() to filter out text decorations 7 | foreach s ( `ipcs -s | awk '{ if( int($2) != "0") { print $2 } }'` ) 8 | ipcrm sem $s >/dev/null 9 | end 10 | foreach m ( `ipcs -m | awk '{ if( int($2) != "0") { print $2 } }'` ) 11 | ipcrm shm $m >/dev/null 12 | end 13 | else 14 | ipcrm `ipcs | awk '{if (($1 == "m") || ($1 == "s")) print sprintf("-%s %s",$1,$2) }'` 15 | endif 16 | # show what is left 17 | ipcs 18 | -------------------------------------------------------------------------------- /global/testing/mp3.fh: -------------------------------------------------------------------------------- 1 | #ifdef TCGMSG 2 | # include "tcgmsg.fh" 3 | # define MP_TIMER tcgtime 4 | # define MP_FINALIZE() pend() 5 | #else 6 | # include "mpif.h" 7 | # define MP_TIMER mpi_wtime 8 | # define MP_FINALIZE() mpi_finalize(ierr) 9 | #endif 10 | #ifndef MP_DEFINES_ONLY 11 | # ifdef TCGMSG 12 | call pbeginf 13 | # else 14 | integer ierr 15 | # if defined(MPI_MT) || defined(MPI_PT) 16 | integer required, provided 17 | required=MPI_THREAD_MULTIPLE 18 | call mpi_init_thread(required, provided, ierr) 19 | # else 20 | call mpi_init(ierr) 21 | # endif 22 | # endif 23 | #endif 24 | -------------------------------------------------------------------------------- /global/testing/mp3def.fh: -------------------------------------------------------------------------------- 1 | #define MP_DEFINES_ONLY 2 | #include "mp3.fh" 3 | #undef MP_DEFINES_ONLY 4 | -------------------------------------------------------------------------------- /global/testing/nga-onesided.m4: -------------------------------------------------------------------------------- 1 | divert(-1) 2 | # what kind of data type to test? 3 | define(m4_test_int, `yes') 4 | define(m4_test_dbl, `yes') 5 | define(m4_test_dcpl, `yes') 6 | 7 | # test dimension from which to which? 8 | define(m4_dim_from, 1) 9 | define(m4_dim_to, 7) 10 | 11 | # functions to test 12 | define(m4_test_NGA_PUT, `yes') 13 | define(m4_test_NGA_GET, `yes') 14 | define(m4_test_NGA_ACC, `yes') 15 | define(m4_test_NGA_SCATTER, `yes') 16 | define(m4_test_NGA_SCATTER_ACC, `yes') 17 | define(m4_test_NGA_GATHER, `yes') 18 | divert 19 | include(`ngatest_src/ngatest.def') 20 | -------------------------------------------------------------------------------- /global/testing/nga-patch.m4: -------------------------------------------------------------------------------- 1 | divert(-1) 2 | # what kind of data type to test? 3 | define(m4_test_int, `yes') 4 | define(m4_test_dbl, `yes') 5 | define(m4_test_dcpl, `yes') 6 | 7 | # test dimension from which to which? 8 | define(m4_dim_from, 1) 9 | define(m4_dim_to, 7) 10 | 11 | # patch related 12 | # due to stack limits, GNU m4 might be needed to process this one 13 | define(m4_test_NGA_ADD_PATCH, `no') 14 | define(m4_test_NGA_COPY_PATCH, `yes') 15 | # depending on the data type, the functions are NGA_IDOT_PATCH, 16 | # NGA_DDOT_PATCH, and NGA_ZDOT_PATCH, corresponding to Integer, 17 | # Double, and Double Complex data types, respectively. 18 | define(m4_test_NGA_DOT_PATCH, `yes') 19 | define(m4_test_NGA_FILL_PATCH, `yes') 20 | define(m4_test_NGA_SCALE_PATCH, `yes') 21 | divert 22 | include(`ngatest_src/ngatest.def') 23 | -------------------------------------------------------------------------------- /global/testing/nga-periodic.m4: -------------------------------------------------------------------------------- 1 | divert(-1) 2 | # what kind of data type to test? 3 | define(m4_test_int, `yes') 4 | define(m4_test_dbl, `yes') 5 | define(m4_test_dcpl, `yes') 6 | 7 | # test dimension from which to which? 8 | define(m4_dim_from, 1) 9 | define(m4_dim_to, 7) 10 | 11 | # periodic functions 12 | define(m4_test_NGA_PERIODIC_GET, `yes') 13 | define(m4_test_NGA_PERIODIC_PUT, `yes') 14 | define(m4_test_NGA_PERIODIC_ACC, `yes') 15 | 16 | divert 17 | include(`ngatest_src/ngatest.def') 18 | -------------------------------------------------------------------------------- /global/testing/nga-scatter.m4: -------------------------------------------------------------------------------- 1 | divert(-1) 2 | # what kind of data type to test? 3 | define(m4_test_int, `yes') 4 | define(m4_test_dbl, `yes') 5 | define(m4_test_dcpl, `yes') 6 | 7 | # test dimension from which to which? 8 | define(m4_dim_from, 1) 9 | define(m4_dim_to, 7) 10 | 11 | # functions to test 12 | define(m4_test_NGA_SCATTER, `yes') 13 | define(m4_test_NGA_SCATTER_ACC, `yes') 14 | divert 15 | include(`ngatest_src/ngatest.def') 16 | -------------------------------------------------------------------------------- /global/testing/nga-util.m4: -------------------------------------------------------------------------------- 1 | divert(-1) 2 | # what kind of data type to test? 3 | define(m4_test_int, `yes') 4 | define(m4_test_dbl, `yes') 5 | define(m4_test_dcpl, `yes') 6 | 7 | # test dimension from which to which? 8 | define(m4_dim_from, 1) 9 | define(m4_dim_to, 7) 10 | 11 | # functions to test 12 | define(m4_test_GA_FILL, `yes') 13 | divert 14 | include(`ngatest_src/ngatest.def') 15 | -------------------------------------------------------------------------------- /global/testing/ngatest.m4: -------------------------------------------------------------------------------- 1 | divert(-1) 2 | # what kind of data type to test? 3 | define(m4_test_int, `yes') 4 | define(m4_test_dbl, `yes') 5 | define(m4_test_dcpl, `yes') 6 | 7 | # test dimension from which to which? 8 | define(m4_dim_from, 1) 9 | define(m4_dim_to, 7) 10 | 11 | # functions to test 12 | define(m4_test_GA_FILL, `yes') 13 | define(m4_test_NGA_PUT, `yes') 14 | define(m4_test_NGA_GET, `yes') 15 | define(m4_test_NGA_ACC, `yes') 16 | define(m4_test_NGA_SCATTER, `yes') 17 | # define(m4_test_NGA_SCATTER_ACC, `yes') 18 | define(m4_test_NGA_GATHER, `yes') 19 | 20 | # periodic functions 21 | # define(m4_test_NGA_PERIODIC_GET, `yes') 22 | # define(m4_test_NGA_PERIODIC_PUT, `yes') 23 | # define(m4_test_NGA_PERIODIC_ACC, `yes') 24 | 25 | # patch related 26 | define(m4_test_NGA_FILL_PATCH, `yes') 27 | define(m4_test_NGA_COPY_PATCH, `yes') 28 | define(m4_test_NGA_SCALE_PATCH, `yes') 29 | define(m4_test_NGA_ADD_PATCH, `no') 30 | # depending on the data type, the functions are NGA_IDOT_PATCH, 31 | # NGA_DDOT_PATCH, and NGA_ZDOT_PATCH, corresponding to Integer, 32 | # Double, and Double Complex data types, respectively. 33 | define(m4_test_NGA_DOT_PATCH, `yes') 34 | divert 35 | include(`ngatest_src/ngatest.def') 36 | -------------------------------------------------------------------------------- /global/testing/stride.F: -------------------------------------------------------------------------------- 1 | #if HAVE_CONFIG_H 2 | # include "config.fh" 3 | #endif 4 | program test_patch 5 | implicit none 6 | #include "mafdecls.fh" 7 | #include "global.fh" 8 | #include "testutil.fh" 9 | integer g_r 10 | integer g_2e3c 11 | integer nbfl, nbf2 12 | integer nsorb 13 | logical status 14 | #include "mp3.fh" 15 | 16 | call ga_initialize 17 | 18 | nbfl = 200 19 | nsorb = 7200 20 | nbf2 = nbfl*nsorb 21 | 22 | status = ga_create(mt_dbl,nbfl,nbfl,'one',0,0,g_2e3c) 23 | status = ga_create(mt_dbl,nbf2,nbfl,'Rmat',-1,-1,g_r) 24 | 25 | call ga_zero(g_2e3c) 26 | 27 | call ga_fill(g_r,1.0d00) 28 | 29 | call ga_copy_patch('N',g_r,1,nbfl,1,nbfl,g_2e3c,1,nbfl,1,nbfl) 30 | call ga_terminate 31 | call MP_FINALIZE() 32 | stop 33 | end 34 | -------------------------------------------------------------------------------- /global/testing/testutil.fh: -------------------------------------------------------------------------------- 1 | double precision drand, util_timer 2 | integer util_mitob, util_mdtob 3 | external drand, util_timer 4 | external util_mitob, util_mdtob 5 | -------------------------------------------------------------------------------- /global/testing/testutil.h: -------------------------------------------------------------------------------- 1 | /* extern void get_range( int ndim, int dims[], int lo[], int hi[]); */ 2 | /* extern void new_range(int ndim, int dims[], int lo[], int hi[], int new_lo[], int new_hi[]); */ 3 | extern void print_subscript(char *pre,int ndim, int subscript[], char* post); 4 | /* extern void print_distribution(int g_a); */ 5 | -------------------------------------------------------------------------------- /global/testing/unit-tests/ga_create1.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Test Program for GA 3 | * This is to test GA_Create (is a collective operation) 4 | * GA_Create -- used to create a global array using handles like 'g_A' 5 | */ 6 | 7 | #include 8 | 9 | #include"mpi.h" 10 | #include"ga.h" 11 | #include"macdecls.h" 12 | #include"ga_unit.h" 13 | 14 | #define SIZE 10 15 | #define MAX_DIM 7 16 | 17 | void create_ga(int ndim, int datatypes) 18 | { 19 | int g_A; 20 | int dims[MAX_DIM], i, val=4; 21 | 22 | for(i=0; i 10 | 11 | #include"mpi.h" 12 | #include"ga.h" 13 | #include"macdecls.h" 14 | #include"ga_unit.h" 15 | 16 | #define SIZE 10 17 | #define MAX_DIM 7 18 | 19 | void create_ga(int ndim) 20 | { 21 | int g_A; 22 | int dims[MAX_DIM], i, val=4; 23 | 24 | for(i=0; i 7 | #include 8 | 9 | #include"mpi.h" 10 | #include"ga.h" 11 | #include"macdecls.h" 12 | #include"ga_unit.h" 13 | 14 | int main(int argc, char **argv) 15 | { 16 | int rank, nprocs; 17 | int g_A, g_B; 18 | 19 | MPI_Init(&argc, &argv); 20 | 21 | MPI_Comm_rank(MPI_COMM_WORLD, &rank); 22 | MPI_Comm_size(MPI_COMM_WORLD, &nprocs); 23 | 24 | MA_init(C_INT, 1000, 1000); 25 | GA_Initialize(); 26 | 27 | g_A=GA_Create_handle(); 28 | g_B=GA_Create_handle(); 29 | 30 | if(!g_A)\ 31 | GA_ERROR_MSG(); 32 | if(!g_B) 33 | GA_ERROR_MSG(); 34 | 35 | GA_Sync(); 36 | if(rank == 0) 37 | GA_PRINT_MSG(); 38 | 39 | GA_Terminate(); 40 | MPI_Finalize(); 41 | 42 | } 43 | -------------------------------------------------------------------------------- /global/testing/unit-tests/ga_create_irreg3.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Test Program for GA 3 | * This is to test GA_Create_irreg (is a collective operation) 4 | * GA_Create -- used to create a global array using handles like 'g_A' 5 | * Here used GA_Inquire to verify that g_A hanle returns the right values of created_array 6 | */ 7 | 8 | #include 9 | 10 | #include"mpi.h" 11 | #include"ga.h" 12 | #include"macdecls.h" 13 | 14 | #include"ga_unit.h" 15 | 16 | #define SIZE 5 17 | #define MAX_DIM 2 18 | 19 | create_irreg_ga(int ndim) 20 | { 21 | int g_A; 22 | int dims[ndim], i; 23 | int block[ndim], *map=NULL; 24 | 25 | for(i=0; i 9 | 10 | #include"mpi.h" 11 | #include"ga.h" 12 | #include"macdecls.h" 13 | 14 | #define DIM 2 15 | 16 | int main(int argc, char **argv) 17 | { 18 | int rank, nprocs, i; 19 | int g_A, value=5; 20 | int dims[DIM]={5,5}, dims2[DIM], ndim, type; 21 | 22 | MPI_Init(&argc, &argv); 23 | 24 | MPI_Comm_rank(MPI_COMM_WORLD, &rank); 25 | MPI_Comm_size(MPI_COMM_WORLD, &nprocs); 26 | 27 | MA_init(C_INT, 1000, 1000); 28 | 29 | GA_Initialize(); 30 | 31 | g_A = NGA_Create(C_INT, DIM, dims, "array_A", NULL); 32 | GA_Fill(g_A, &value); 33 | GA_Print(g_A); 34 | 35 | //GA_Sync(); 36 | printf(" -----------%d\n", rank); 37 | GA_Destroy(g_A); 38 | printf(" %d-----------\n", rank); 39 | GA_Print(g_A); 40 | 41 | if(rank == 0) 42 | printf("Test Completed \n"); 43 | GA_Terminate(); 44 | MPI_Finalize(); 45 | 46 | 47 | } 48 | -------------------------------------------------------------------------------- /global/testing/unit-tests/ga_intialize.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Test Program for GA 3 | * This is to test GA_initialize 4 | * _intitalize and _terminate ---- are function start and end the space space where other GA-Functions are called xcfor manipulation 5 | * Using GA_Ndim -- ehich returns dimension of the g_A 6 | */ 7 | 8 | #include 9 | 10 | #include"mpi.h" 11 | #include"ga.h" 12 | #include"macdecls.h" 13 | 14 | #define DIM 2 15 | 16 | int main(int argc, char **argv) 17 | { 18 | int rank, nprocs, n=1; 19 | int g_A, dims[DIM]={5,5}; 20 | 21 | MPI_Init(&argc, &argv); 22 | 23 | MPI_Comm_rank(MPI_COMM_WORLD, &rank); 24 | MPI_Comm_size(MPI_COMM_WORLD, &nprocs); 25 | 26 | MA_init(C_INT, 1000, 1000); 27 | 28 | GA_Initialize(); 29 | 30 | printf("check %d \n", n); 31 | 32 | g_A = NGA_Create(C_INT, DIM, dims, "array_A", NULL); 33 | if(GA_Ndim(g_A)!=DIM) 34 | printf("ERROR: GA_Ndim didnt return nDimension after GA_Initialize\n"); 35 | printf("%d : %d \n", rank, GA_Ndim(g_A)); 36 | 37 | GA_Terminate(); 38 | 39 | if(rank==0) 40 | printf(" GA: Test Completed \n"); 41 | MPI_Finalize(); 42 | 43 | return 0; 44 | } 45 | -------------------------------------------------------------------------------- /global/testing/unit-tests/ga_ndim2.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Test Program for GA 3 | * This is to test GA_Ndim (is a local operation) 4 | * verifing GA_Ndim -- which returns dimension of the g_A 5 | */ 6 | 7 | #include 8 | 9 | #include"mpi.h" 10 | #include"ga.h" 11 | #include"macdecls.h" 12 | 13 | #define SIZE 20 14 | #define NDIM 7 15 | 16 | verify_ga_dim(int ndim) 17 | { 18 | int g_A, dims[ndim], i; 19 | 20 | for(i=0; i 8 | 9 | #include"mpi.h" 10 | #include"ga.h" 11 | #include"macdecls.h" 12 | 13 | node_check(int nprocs) 14 | { 15 | if(GA_Nnodes() != nprocs) 16 | printf("ERROR: GA_Nnodes didnt return right number of processes \n"); 17 | } 18 | 19 | int main(int argc, char **argv) 20 | { 21 | int rank, nprocs; 22 | 23 | MPI_Init(&argc, &argv); 24 | 25 | MPI_Comm_rank(MPI_COMM_WORLD, &rank); 26 | MPI_Comm_size(MPI_COMM_WORLD, &nprocs); 27 | 28 | MA_init(C_INT, 1000, 1000); 29 | GA_Initialize(); 30 | 31 | node_check(nprocs); 32 | 33 | GA_Sync(); 34 | if(rank == 0) 35 | printf("Test Completed \n"); 36 | 37 | GA_Terminate(); 38 | MPI_Finalize(); 39 | 40 | return 0; 41 | } 42 | -------------------------------------------------------------------------------- /global/testing/unit-tests/ga_nodeid.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Test Program for GA 3 | * This is to test GA_Nodeid (is a local operation) 4 | * verify _Nodeid -- by comparing rank of each processes with corresponding node-ids 5 | */ 6 | 7 | #include 8 | 9 | #include"mpi.h" 10 | #include"ga.h" 11 | #include"macdecls.h" 12 | #include"ga_unit.h" 13 | 14 | #define DIM 2 15 | 16 | int main(int argc, char **argv) 17 | { 18 | int rank, nprocs; 19 | 20 | MPI_Init(&argc, &argv); 21 | 22 | MPI_Comm_rank(MPI_COMM_WORLD, &rank); 23 | MPI_Comm_size(MPI_COMM_WORLD, &nprocs); 24 | 25 | MA_init(C_INT, 1000, 1000); 26 | GA_Initialize(); 27 | 28 | if(rank != GA_Nodeid()) 29 | GA_ERROR_MSG(); 30 | 31 | GA_Sync(); 32 | 33 | if(rank == 0) 34 | GA_COMPLETE_MSG(); 35 | 36 | GA_Terminate(); 37 | MPI_Finalize(); 38 | 39 | return 0; 40 | } 41 | -------------------------------------------------------------------------------- /global/testing/unit-tests/ga_pgroup_brdcst.c: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /global/testing/unit-tests/ga_set_data.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Test Program for GA 3 | * GA_Create_handle -- 4 | */ 5 | 6 | #include 7 | #include 8 | 9 | #include"mpi.h" 10 | #include"ga.h" 11 | #include"macdecls.h" 12 | #include"ga_unit.h" 13 | 14 | #define SIZE 5 15 | #define DIM 2 16 | 17 | int main(int argc, char **argv) 18 | { 19 | int rank, nprocs; 20 | int g_A; 21 | int dims[DIM]={SIZE,SIZE}, ndim; 22 | 23 | MPI_Init(&argc, &argv); 24 | 25 | MPI_Comm_rank(MPI_COMM_WORLD, &rank); 26 | MPI_Comm_size(MPI_COMM_WORLD, &nprocs); 27 | 28 | MA_init(C_INT, 1000, 1000); 29 | GA_Initialize(); 30 | 31 | g_A=GA_Create_handle(); 32 | 33 | if(!g_A) 34 | GA_ERROR_MSG(); 35 | 36 | GA_Set_data(g_A, DIM, dims, C_INT); 37 | // printf("%d \n", GA_Ndim(g_A)); 38 | 39 | /* 40 | if(rank == 0) 41 | { 42 | ndim=GA_Ndim(g_A); 43 | if(ndim == 2) 44 | printf(" An Error \n"); 45 | } 46 | */ 47 | 48 | GA_Sync(); 49 | if(rank == 0) 50 | GA_PRINT_MSG(); 51 | 52 | GA_Terminate(); 53 | MPI_Finalize(); 54 | 55 | return 0; 56 | } 57 | -------------------------------------------------------------------------------- /global/testing/unit-tests/ga_sync.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Test Program for GA 3 | * This is to test GA_Sync (is a collective operation) 4 | * 5 | */ 6 | 7 | #include 8 | 9 | #include"mpi.h" 10 | #include"ga.h" 11 | #include"macdecls.h" 12 | 13 | #define DIM 2 14 | 15 | int main(int argc, char **argv) 16 | { 17 | int rank, nprocs, i; 18 | int g_A, value=5; 19 | int dims[DIM]={5,5}, dims2[DIM], ndim, type; 20 | 21 | MPI_Init(&argc, &argv); 22 | 23 | MPI_Comm_rank(MPI_COMM_WORLD, &rank); 24 | MPI_Comm_size(MPI_COMM_WORLD, &nprocs); 25 | 26 | MA_init(C_INT, 1000, 1000); 27 | 28 | GA_Initialize(); 29 | 30 | g_A = NGA_Create(C_INT, DIM, dims, "array_A", NULL); 31 | GA_Fill(g_A, &value); 32 | GA_Print(g_A); 33 | 34 | printf(" -----------%d\n", rank); 35 | 36 | GA_Sync(); 37 | 38 | printf(" %d-----------\n", rank); 39 | GA_Print(g_A); 40 | 41 | if(rank == 0) 42 | printf("Test Completed \n"); 43 | GA_Terminate(); 44 | MPI_Finalize(); 45 | 46 | 47 | } 48 | -------------------------------------------------------------------------------- /global/trace/README: -------------------------------------------------------------------------------- 1 | GA Trace Library 2 | ~~~~~~~~~~~~~~~~ 3 | 4 | The library contains tracing routines for GA operations. The GA library has to 5 | be created with tracing enabled. There are two programs: 'adjust' that 6 | processes and integrates the trace files into a single one, and 'collisions' 7 | that analyses this file with respect to the overlapping access to sections of 8 | GA arrays. The output from 'adjust' can be used as an input to the GA 9 | visualization program 'xregion'. The trace library depends on the MA memory 10 | allocator. 11 | 12 | Usage 13 | ===== 14 | 15 | The user's program first calls subroutine trace_init(n) to initialize tracing. 16 | n specifies the maximum number of events to be traced. An event is defined as 17 | a single access to a part of or entire array. Tracing is disabled by calling 18 | subroutine trace_end(proc), where proc is the current processor number. At 19 | this point trace file for processor proc is written to the disk. The file name 20 | is the corresponding processor number coded with three digits. 21 | 22 | For each event the following data is recorded: 23 | 24 | - processor number 25 | - array handle 26 | - coordinates of the section of an array being accessed 27 | - GA operation code 28 | - time stamps 29 | -------------------------------------------------------------------------------- /global/trace/test.f: -------------------------------------------------------------------------------- 1 | real a(10000) 2 | integer i 3 | call trace_init(1000) 4 | do k = 1,10 5 | call trace_stime() 6 | do i = 1,10000 7 | a(i) = sin(real(i+k)) 8 | enddo 9 | call trace_etime() 10 | call trace_genrec(k,k,i,k,i,999) 11 | enddo 12 | call trace_end(99) 13 | end 14 | -------------------------------------------------------------------------------- /gparrays/src/gpbase.h: -------------------------------------------------------------------------------- 1 | #ifndef __GPBASE_H__ 2 | #define __GPBASE_H__ 3 | 4 | #include "gacommon.h" 5 | #include "typesf2c.h" 6 | 7 | #if SIZEOF_VOIDP == SIZEOF_INT 8 | # define GP_Int int 9 | #elif SIZEOF_VOIDP == SIZEOF_LONG 10 | # define GP_Int long 11 | #else 12 | # error sizeof(void*) is not sizeof(int) nor sizeof(long) 13 | #endif 14 | 15 | /* Set maximum number of Global Pointer Arrays */ 16 | #define GP_MAX_ARRAYS 1024 17 | 18 | /* Set maximum dimension of Global Pointer ARRAYS */ 19 | #define GP_MAX_DIM 7 20 | 21 | /* Define handle numbering offset for GP Arrays */ 22 | #define GP_OFFSET 1000 23 | 24 | typedef struct{ 25 | Integer g_size_array; /* Handle to Global Array holding sizes */ 26 | Integer g_ptr_array; /* Handle to Global Array holding pointers */ 27 | Integer active; /* Handle is currently active */ 28 | Integer ndim; /* Dimension of GP */ 29 | Integer dims[GP_MAX_DIM]; /* Axes dimensions of GP */ 30 | Integer lo[GP_MAX_DIM]; /* Lower indices of local block */ 31 | Integer hi[GP_MAX_DIM]; /* Upper indices of local block */ 32 | Integer ld[GP_MAX_DIM-1]; /* Stride of local block */ 33 | } gp_array_t; 34 | 35 | extern gp_array_t *GP; 36 | #endif /* __GPBASE_H__ */ 37 | -------------------------------------------------------------------------------- /gparrays/src/gpfapi.c: -------------------------------------------------------------------------------- 1 | #if HAVE_CONFIG_H 2 | # include "config.h" 3 | #endif 4 | 5 | #include "gp-papi.h" 6 | #if ENABLE_PROFILING 7 | # include "gp-wapi.h" 8 | #else 9 | # include "gp-wapidefs.h" 10 | #endif 11 | -------------------------------------------------------------------------------- /gparrays/testing/test.F: -------------------------------------------------------------------------------- 1 | #if HAVE_CONFIG_H 2 | # include "config.fh" 3 | #endif 4 | end 5 | -------------------------------------------------------------------------------- /m4/armci_as_no_i386asm.m4: -------------------------------------------------------------------------------- 1 | # ARMCI_AS_NO_I386ASM 2 | # ------------------- 3 | # On certain systems (Fujitus thus far) it is necessary to set NO_I386ASM to 4 | # avoid compiling inline assembly. 5 | AC_DEFUN([ARMCI_AS_NO_I386ASM], [ 6 | AC_CACHE_CHECK([whether NO_I386ASM is needed], [armci_cv_as_no_i386asm], 7 | [AS_IF([test "x$ax_cv_c_compiler_vendor" = xfujitsu], 8 | [armci_cv_as_no_i386asm=yes], 9 | [armci_cv_as_no_i386asm=no])]) 10 | AS_IF([test "x$armci_cv_as_no_i386asm" = xyes], 11 | [AC_DEFINE([NO_I386ASM], [1], [define when inline asm is not supported])]) 12 | ])dnl 13 | -------------------------------------------------------------------------------- /m4/armci_cxx_opt.m4: -------------------------------------------------------------------------------- 1 | # ARMCI_CXX_OPT() 2 | # --------------- 3 | # Determine TARGET-/compiler-specific CXXFLAGS and FFLAGS for optimization. 4 | AC_DEFUN([ARMCI_CXX_OPT], [ 5 | AC_REQUIRE([GA_TARGET64]) 6 | AC_REQUIRE([GA_ENABLE_OPT]) 7 | AC_REQUIRE([GA_ARMCI_NETWORK]) 8 | AC_ARG_VAR([ARMCI_CXXOPT], [ARMCI C++ optimization flags]) 9 | AC_CACHE_CHECK([for specific C++ optimizations], [armci_cv_cxx_opt], [ 10 | AS_IF([test "x$ARMCI_CXXOPT" != x], [armci_cv_cxx_opt="$ARMCI_CXXOPT"], [armci_cv_cxx_opt=]) 11 | AS_IF([test "x$armci_cv_cxx_opt" = x && test "x$enable_opt" = xyes], [ 12 | AS_CASE([$ga_cv_target:$ga_cv_cxx_compiler_vendor:$host_cpu:$ga_armci_network], 13 | [LINUX:*:*:*], [armci_cv_cxx_opt="-O0"], 14 | [armci_cv_cxx_opt=]) 15 | ])]) 16 | AC_SUBST([ARMCI_CXXOPT], [$armci_cv_cxx_opt]) 17 | ])dnl 18 | -------------------------------------------------------------------------------- /m4/armci_enable_gpc.m4: -------------------------------------------------------------------------------- 1 | # ARMCI_ENABLE_GPC 2 | # ---------------- 3 | # Whether to enable GPC calls in ARMCI. 4 | AC_DEFUN([ARMCI_ENABLE_GPC], [ 5 | AC_ARG_ENABLE([gpc], 6 | [AS_HELP_STRING([--enable-gpc], [enable GPC calls])], 7 | [enable_gpc=yes], 8 | [enable_gpc=no]) 9 | AS_IF([test $enable_gpc = yes], 10 | [AC_DEFINE([ARMCI_ENABLE_GPC_CALLS], [1], 11 | [Define to 1 if GPC calls are enabled])], 12 | [AC_DEFINE([ARMCI_ENABLE_GPC_CALLS], [0], 13 | [Define to 1 if GPC calls are enabled])]) 14 | AM_CONDITIONAL([ARMCI_ENABLE_GPC_CALLS], [test x$enable_gpc = xyes]) 15 | ])dnl 16 | -------------------------------------------------------------------------------- /m4/armci_enable_profile.m4: -------------------------------------------------------------------------------- 1 | # ARMCI_ENABLE_PROFILE 2 | # -------------------- 3 | # Whether to enable profiling. AC_DEFINEs ARMCI_PROFILE. 4 | AC_DEFUN([ARMCI_ENABLE_PROFILING], [ 5 | AC_ARG_ENABLE([profiling], 6 | [AS_HELP_STRING([--enable-profiling], [enable profiling])], 7 | [], 8 | [enable_profiling=no]) 9 | AS_IF([test "x$enable_profiling" = xyes], 10 | [AC_DEFINE([ARMCI_PROFILE], [1], [Define if profiling is enabled])]) 11 | AM_CONDITIONAL([ENABLE_PROFILING], [test "x$enable_profiling" = xyes]) 12 | ])dnl 13 | -------------------------------------------------------------------------------- /m4/armci_f77_enable.m4: -------------------------------------------------------------------------------- 1 | # ARMCI_F77_ENABLE() 2 | # ------------------ 3 | # Whether to enable Fortran code within ARMCI. 4 | AC_DEFUN([ARMCI_F77_ENABLE], 5 | [AC_ARG_ENABLE([f77], 6 | [AS_HELP_STRING([--enable-f77], [enable Fortran code])], 7 | [], 8 | [enable_f77=no]) 9 | AS_IF([test "x$enable_f77" = xyes], 10 | [AC_DEFINE([NOFORT], [0], [Define to 1 if not using Fortran]) 11 | AC_DEFINE([ENABLE_F77], [1], [Define to 1 if using Fortran])], 12 | [AC_DEFINE([NOFORT], [1], [Define to 1 if not using Fortran]) 13 | AC_DEFINE([ENABLE_F77], [0], [Define to 1 if using Fortran])]) 14 | AM_CONDITIONAL([NOFORT], [test "x$enable_f77" = xno]) 15 | AM_CONDITIONAL([ENABLE_F77], [test "x$enable_f77" = xyes]) 16 | ])# ARMCI_F77_ENABLE 17 | -------------------------------------------------------------------------------- /m4/armci_f77_i4.m4: -------------------------------------------------------------------------------- 1 | # ARMCI_F77_I4 2 | # ------------ 3 | # Force F77 to use 4-byte INTEGERs regardless of any compiler- or 4 | # system-defaults. 5 | AC_DEFUN([ARMCI_F77_I4], [ 6 | AC_ARG_VAR([FFLAG_INT_4], 7 | [Fortran 77 compiler flag to set integer size to 4 bytes]) 8 | AC_CACHE_CHECK([for INTEGER*4 size compile flag], 9 | [armci_cv_f77_integer_size_flag], 10 | [AS_IF([test x$cross_compiling = xyes], 11 | [_GA_F77_INTEGER_4_FLAG_CROSS([armci_cv_f77_integer_size_flag])], 12 | [_GA_F77_INTEGER_4_FLAG([armci_cv_f77_integer_size_flag])])]) 13 | AS_IF([test "x$armci_cv_f77_integer_size_flag" != x], 14 | [AS_IF([test "x$armci_cv_f77_integer_size_flag" != xnone], 15 | [AC_SUBST([FFLAG_INT_4], [$armci_cv_f77_integer_size_flag])])]) 16 | ]) # ARMCI_F77_I4 17 | -------------------------------------------------------------------------------- /m4/armci_group.m4: -------------------------------------------------------------------------------- 1 | # ARMCI_ENABLE_GROUP 2 | # ------------------ 3 | # Not sure what this is for. 4 | AC_DEFUN([ARMCI_ENABLE_GROUP], 5 | [AC_ARG_ENABLE([armci_group], 6 | [AS_HELP_STRING([--enable-armci-group], [TODO])], 7 | [enable_armci_group=yes 8 | AC_DEFINE([ARMCI_GROUP], [1], [TODO])], 9 | [enable_armci_group=no]) 10 | AM_CONDITIONAL([ARMCI_GROUP], [test x$enable_armci_group = xyes]) 11 | ])dnl 12 | -------------------------------------------------------------------------------- /m4/armci_shmmax.m4: -------------------------------------------------------------------------------- 1 | # ARMCI_SHMMAX 2 | # ------------ 3 | # Allow the upper limit on the ARMCI_DEFAULT_SHMMAX runtime environment 4 | # variable to be configured by user. 5 | AC_DEFUN([ARMCI_SHMMAX], [ 6 | AC_CACHE_CHECK([for ARMCI_DEFAULT_SHMMAX upper bound], [armci_cv_shmmax], 7 | [AS_IF([test "x$ARMCI_DEFAULT_SHMMAX_UBOUND" != x], 8 | [armci_cv_shmmax=$ARMCI_DEFAULT_SHMMAX_UBOUND], 9 | [armci_cv_shmmax=8192])]) 10 | AS_IF([test $armci_cv_shmmax -le 1], 11 | [AC_MSG_ERROR([invalid ARMCI_DEFAULT_SHMMAX upper bound; <= 1])]) 12 | AC_DEFINE_UNQUOTED([ARMCI_DEFAULT_SHMMAX_UBOUND], [$armci_cv_shmmax], 13 | [upper bound for ARMCI_DEFAULT_SHMMAX environment variable]) 14 | ])dnl 15 | -------------------------------------------------------------------------------- /m4/armci_standalone.m4: -------------------------------------------------------------------------------- 1 | # ARMCI_STANDALONE 2 | # ---------------- 3 | # Test whether ARMCI is configured from outside of a GA source distribution. 4 | AC_DEFUN([ARMCI_STANDALONE], 5 | [AC_CACHE_CHECK([whether ARMCI is configured from outside a GA distribution], 6 | [armci_cv_standalone], 7 | [AS_IF([test -d $ac_abs_confdir/../global], 8 | [armci_cv_standalone=no], 9 | [armci_cv_standalone=yes])]) 10 | AM_CONDITIONAL([ARMCI_STANDALONE], [test x$armci_cv_standalone = xyes]) 11 | ])dnl 12 | -------------------------------------------------------------------------------- /m4/ga_64bit_flag.m4: -------------------------------------------------------------------------------- 1 | # GA_64BIT_FLAG 2 | # ------------- 3 | # Figure out whether the compiler needs a special flag to generate 64bit code. 4 | # We verify by testing the size of void*. We can't use AC_CHECK_SIZEOF 5 | # directly since it uses the cache. Instead we copied code from autoconf... 6 | # 7 | # Known flags: 8 | # -m64 GNU 9 | # -q64 IBM 10 | # 11 | AC_DEFUN([GA_64BIT_FLAG], 12 | [AC_CACHE_CHECK([for flag to indicate 64-bits], [ga_cv_64bit_flag], 13 | [AC_LANG_PUSH([C]) 14 | for flag in none -m64 -q64 +DD64 +DA2.0W -64 ; do 15 | ga_save_CFLAGS=$CFLAGS 16 | AS_IF([test "x$flag" != xnone], [CFLAGS="$CFLAGS $flag"]) 17 | ga_sizeof_voidp=0 18 | AC_COMPUTE_INT([ga_sizeof_voidp], 19 | [(long int) (sizeof (void*))], 20 | [AC_INCLUDES_DEFAULT()], 21 | [ga_sizeof_voidp=0]) 22 | CFLAGS=$ga_save_CFLAGS 23 | AS_IF([test x$ga_sizeof_voidp = x8], 24 | [ga_cv_64bit_flag=$flag; break]) 25 | done 26 | AC_LANG_POP([C])]) 27 | AS_IF([test x$ga_cv_64bit_flag != xnone], 28 | [CFLAGS="$CFLAGS $ga_cv_64bit_flag" 29 | FFLAGS="$FFLAGS $ga_cv_64bit_flag"]) 30 | ]) # GA_64BIT_FLAG 31 | -------------------------------------------------------------------------------- /m4/ga_ar.m4: -------------------------------------------------------------------------------- 1 | # GA_AR 2 | # ----- 3 | # Libtool doesn't advertise AR nor AR_FLAGS in case the user wishes to 4 | # override them. Further, certain systems require a different archiver. 5 | # RANLIB may also be affected. 6 | # Use this prior to LT_INIT. 7 | # 8 | # Known archivers: 9 | # ar - all known systems 10 | # 11 | AC_DEFUN([GA_AR], [ 12 | AC_ARG_VAR([AR], [archiver used by libtool (default: ar)]) 13 | AC_ARG_VAR([AR_FLAGS], [archiver flags used by libtool (default: cru)]) 14 | AC_ARG_VAR([RANLIB], [generates index to archive (default: ranlib)]) 15 | ])dnl 16 | -------------------------------------------------------------------------------- /m4/ga_c_match_types.m4: -------------------------------------------------------------------------------- 1 | # GA_C_POINTER_AS_INTEGER() 2 | # ------------------------- 3 | # Size-based match between C types. 4 | AC_DEFUN([GA_C_POINTER_AS_INTEGER], 5 | [AC_CACHE_CHECK([for smallest C integer matching void*], 6 | [ga_cv_c_pointer_as_integer], 7 | [AS_IF( 8 | [test "x$ac_cv_sizeof_voidp" = "x$ac_cv_sizeof_short"], 9 | [ga_cv_c_pointer_as_integer=short], 10 | [test "x$ac_cv_sizeof_voidp" = "x$ac_cv_sizeof_int"], 11 | [ga_cv_c_pointer_as_integer=int], 12 | [test "x$ac_cv_sizeof_voidp" = "x$ac_cv_sizeof_long"], 13 | [ga_cv_c_pointer_as_integer=long], 14 | [test "x$ac_cv_sizeof_voidp" = "x$ac_cv_sizeof_long_long"], 15 | [ga_cv_c_pointer_as_integer="long long"], 16 | [AC_MSG_ERROR( 17 | [Could not determine smallest C integer matching void*])])]) 18 | AC_SUBST([C_POINTER_AS_INTEGER], [$ga_cv_c_pointer_as_integer]) 19 | ])dnl 20 | -------------------------------------------------------------------------------- /m4/ga_check_func.m4: -------------------------------------------------------------------------------- 1 | # GA_CHECK_FUNCS(HEADER-FILE..., [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 2 | # ------------------------------------------------------------------------ 3 | # Inspired by 4 | # http://pdh11.blogspot.com/2009/04/standard-macros-available-in-gnu.html 5 | # but really a modified version of AC_CHECK_FUNCS. 6 | AC_DEFUN([GA_CHECK_FUNCS], 7 | [m4_map_args_w([$1], [_AH_CHECK_FUNC(], [)])]dnl 8 | [AS_FOR([AC_func], [ac_func], [$1], 9 | [AC_CHECK_FUNC(AC_func, 10 | [AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_]AC_func), 1, 11 | [Define to 1 if you have the `]AC_func[' function, 0 if you don't]) $2], 12 | [AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_]AC_func), 0, 13 | [Define to 1 if you have the `]AC_func[' function, 0 if you don't]) $3], [$4])dnl]) 14 | ])# GA_CHECK_FUNCS 15 | -------------------------------------------------------------------------------- /m4/ga_check_header.m4: -------------------------------------------------------------------------------- 1 | # GA_CHECK_HEADERS(HEADER-FILE..., 2 | # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND], [INCLUDES]) 3 | # ---------------------------------------------------------------------- 4 | # Inspired by 5 | # http://pdh11.blogspot.com/2009/04/standard-macros-available-in-gnu.html 6 | # but really a modified version of AC_CHECK_HEADERS. 7 | AC_DEFUN([GA_CHECK_HEADERS], 8 | [m4_map_args_w([$1], [_AH_CHECK_HEADER(], [)])]dnl 9 | [AS_FOR([AC_header], [ac_header], [$1], 10 | [AC_CHECK_HEADER(AC_header, 11 | [AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_]AC_header), 1, 12 | [Define to 1 if you have the <]AC_header[> header file, 0 if you don't]) $2], 13 | [AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_]AC_header), 0, 14 | [Define to 1 if you have the <]AC_header[> header file, 0 if you don't]) $3], [$4])dnl]) 15 | ])# GA_CHECK_HEADERS 16 | -------------------------------------------------------------------------------- /m4/ga_check_libplot.m4: -------------------------------------------------------------------------------- 1 | # GA_CHECK_LIBPLOT([ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 2 | # ---------------------------------------------------------- 3 | # Check for libplot. Thus far it's only used by tcgmsg. 4 | AC_DEFUN([GA_CHECK_LIBPLOT], 5 | [AC_CHECK_LIB([plot], [openpl], 6 | [PLOTLIB=-lplot 7 | AC_SUBST([PLOTLIB]) 8 | AC_DEFINE([HAVE_LIBPLOT], [1], [Defined if plot library is available])]) 9 | ])dnl 10 | -------------------------------------------------------------------------------- /m4/ga_cross_compiling.m4: -------------------------------------------------------------------------------- 1 | # GA_CROSS_COMPILING 2 | # ------------------ 3 | # The standard check for whether we are cross compiling is not sufficient. 4 | # We know certain platforms are only cross compiled. Make the fix here. 5 | # This could be expanded later to avoid using GA_TARGET and instead perform 6 | # a more rigorous cross compiling test case. 7 | AC_DEFUN([GA_CROSS_COMPILING], [ 8 | AC_REQUIRE([GA_TARGET]) 9 | AC_CACHE_CHECK([whether we are cross compiling], 10 | [ga_cv_cross_compiling], 11 | [ga_cv_cross_compiling=$cross_compiling]) 12 | AM_CONDITIONAL([CROSS_COMPILING], [test "x$cross_compiling" = xyes]) 13 | ])dnl 14 | -------------------------------------------------------------------------------- /m4/ga_cxx.m4: -------------------------------------------------------------------------------- 1 | # GA_CXX_ENABLE() 2 | # --------------- 3 | # Whether to enable C++ bindings. 4 | AC_DEFUN([GA_CXX_ENABLE], 5 | [AC_ARG_ENABLE([cxx], 6 | [AS_HELP_STRING([--enable-cxx],[build C++ interface])], 7 | [enable_cxx=yes], 8 | [enable_cxx=no]) 9 | AM_CONDITIONAL([CXX_BINDINGS],[test x$enable_cxx = xyes]) 10 | ])# GA_CXX_ENABLE 11 | -------------------------------------------------------------------------------- /m4/ga_cxx_namespaces.m4: -------------------------------------------------------------------------------- 1 | # GA_CXX_NAMESPACES 2 | AC_DEFUN([GA_CXX_NAMESPACES], 3 | [AC_CACHE_CHECK([whether the compiler implements namespaces], 4 | [ga_cv_cxx_namespaces], 5 | [AC_LANG_PUSH([C++]) 6 | AC_COMPILE_IFELSE( 7 | [AC_LANG_PROGRAM([[namespace Outer { namespace Inner { int i = 0; }}]], 8 | [[using namespace Outer::Inner; return i;]])], 9 | [ga_cv_cxx_namespaces=yes], 10 | [ga_cv_cxx_namespaces=no]) 11 | AC_LANG_POP([C++])]) 12 | AS_IF([test x$ga_cv_cxx_namespaces = xyes], 13 | [AC_DEFINE([HAVE_NAMESPACES], [1], 14 | [define if the compiler implements namespaces])]) 15 | ])#GA_CXX_NAMESPACES 16 | -------------------------------------------------------------------------------- /m4/ga_cxx_opt.m4: -------------------------------------------------------------------------------- 1 | # GA_CXX_OPT() 2 | # ------------ 3 | # Determine TARGET-/compiler-specific CXXFLAGS for optimization. 4 | AC_DEFUN([GA_CXX_OPT], [ 5 | AC_REQUIRE([GA_TARGET64]) 6 | AC_REQUIRE([GA_ENABLE_OPT]) 7 | AC_ARG_VAR([GA_CXXOPT], [GA C++ optimization flags]) 8 | AC_CACHE_CHECK([for specific C++ optimizations], [ga_cv_cxx_opt], [ 9 | AS_IF([test "x$GA_CXXOPT" != x], [ga_cv_cxx_opt="$GA_CXXOPT"], [ga_cv_cxx_opt=]) 10 | AS_IF([test "x$ga_cv_cxx_opt" = x && test "x$enable_opt" = xyes], [ 11 | AS_CASE([$ga_cv_target:$ga_cv_cxx_compiler_vendor:$host_cpu], 12 | [LINUX:*:*], [ga_cv_cxx_opt="-O0"], 13 | [ga_cv_cxx_opt=]) 14 | ])]) 15 | AC_SUBST([GA_CXXOPT], [$ga_cv_cxx_opt]) 16 | ])dnl 17 | -------------------------------------------------------------------------------- /m4/ga_enable_checkpoint.m4: -------------------------------------------------------------------------------- 1 | # GA_ENABLE_CHECKPOINT 2 | # -------------------- 3 | # Whether to enable checkpoinging. AC_DEFINEs ENABLE_CHECKPOINT. 4 | AC_DEFUN([GA_ENABLE_CHECKPOINT], 5 | [AC_ARG_ENABLE([checkpoint], 6 | [AS_HELP_STRING([--enable-checkpoint], [enable checkpointing])], 7 | [enable_checkpoint=yes 8 | AC_DEFINE([ENABLE_CHECKPOINT], [1], [Define if checkpointing is enabled])], 9 | [enable_checkpoint=no]) 10 | AM_CONDITIONAL([ENABLE_CHECKPOINT], [test x$enable_checkpoint = xyes]) 11 | ])dnl 12 | -------------------------------------------------------------------------------- /m4/ga_enable_eispack.m4: -------------------------------------------------------------------------------- 1 | # GA_ENABLE_EISPACK 2 | # ----------------- 3 | # Whether to enable EISPACK routines. 4 | AC_DEFUN([GA_ENABLE_EISPACK], 5 | [AC_ARG_ENABLE([eispack], 6 | [AS_HELP_STRING([--enable-eispack], 7 | [enable Matrix Eigensystem Routines (EISPACK)])], 8 | [], 9 | [enable_eispack=no]) 10 | AS_IF([test "x$enable_eispack" = xno], 11 | [AC_DEFINE([ENABLE_EISPACK], [0], [Define to 1 if EISPACK is enabled])], 12 | [AC_DEFINE([ENABLE_EISPACK], [1], [Define to 1 if EISPACK is enabled])]) 13 | AM_CONDITIONAL([ENABLE_EISPACK], [test x$enable_eispack = xyes]) 14 | ])dnl 15 | -------------------------------------------------------------------------------- /m4/ga_enable_opt.m4: -------------------------------------------------------------------------------- 1 | # GA_ENABLE_OPT() 2 | # --------------- 3 | AC_DEFUN([GA_ENABLE_OPT], [ 4 | AC_ARG_ENABLE([opt], 5 | [AS_HELP_STRING([--disable-opt], 6 | [don't use hard-coded optimization flags])], 7 | [], 8 | [enable_opt=no]) 9 | ])dnl 10 | -------------------------------------------------------------------------------- /m4/ga_enable_peigs.m4: -------------------------------------------------------------------------------- 1 | # GA_ENABLE_PEIGS 2 | # --------------- 3 | # Whether to enable PeIGS routines. 4 | AC_DEFUN([GA_ENABLE_PEIGS], 5 | [AC_ARG_ENABLE([peigs], 6 | [AS_HELP_STRING([--enable-peigs], 7 | [enable Parallel Eigensystem Solver interface])], 8 | [], 9 | [enable_peigs=0]) 10 | AS_IF([test "x$enable_peigs" = xyes], 11 | [enable_peigs=1], 12 | [enable_peigs=0]) 13 | AC_SUBST([enable_peigs]) 14 | AC_DEFINE_UNQUOTED([ENABLE_PEIGS], [$enable_peigs], 15 | [Define to 1 if PeIGS is enabled]) 16 | AM_CONDITIONAL([ENABLE_PEIGS], [test "x$enable_peigs" = x1]) 17 | ])dnl 18 | -------------------------------------------------------------------------------- /m4/ga_enable_profile.m4: -------------------------------------------------------------------------------- 1 | # GA_ENABLE_PROFILING 2 | # ------------------- 3 | # Whether to enable profiling. AC_DEFINEs ENABLE_PROFILING. 4 | AC_DEFUN([GA_ENABLE_PROFILING], 5 | [AC_ARG_ENABLE([profiling], 6 | [AS_HELP_STRING([--enable-profiling], [enable profiling])], 7 | [], 8 | [enable_profiling=no]) 9 | AM_CONDITIONAL([ENABLE_PROFILING], [test x$enable_profiling = xyes]) 10 | AS_IF([test "x$enable_profiling" = xyes], 11 | [AC_DEFINE([ENABLE_PROFILING], [1], [set to 1 if profiling is enabled])], 12 | [AC_DEFINE([ENABLE_PROFILING], [0], [set to 1 if profiling is enabled])]) 13 | ])dnl 14 | -------------------------------------------------------------------------------- /m4/ga_enable_trace.m4: -------------------------------------------------------------------------------- 1 | # GA_ENABLE_TRACE 2 | # --------------- 3 | # Whether to enable tracing. AC_DEFINEs ENABLE_TRACE. 4 | AC_DEFUN([GA_ENABLE_TRACE], 5 | [AC_ARG_ENABLE([trace], 6 | [AS_HELP_STRING([--enable-trace], [enable tracing])], 7 | [enable_trace=yes 8 | AC_DEFINE([ENABLE_TRACE], [1], [Define if tracing is enabled])], 9 | [enable_trace=no]) 10 | AM_CONDITIONAL([ENABLE_TRACE], [test x$enable_trace = xyes]) 11 | ])dnl 12 | -------------------------------------------------------------------------------- /m4/ga_enable_unit.m4: -------------------------------------------------------------------------------- 1 | # GA_ENABLE_UNIT_TESTS 2 | # -------------------- 3 | AC_DEFUN([GA_ENABLE_UNIT_TESTS], [ 4 | AC_ARG_ENABLE([unit-tests], 5 | [AS_HELP_STRING([--enable-unit-tests], 6 | [build the unfinished unit tests])], 7 | [], 8 | [enable_unit_tests=no]) 9 | AM_CONDITIONAL([ENABLE_UNIT_TESTS], [test "x$enable_unit_tests" = xyes]) 10 | ])dnl 11 | -------------------------------------------------------------------------------- /m4/ga_f2c_match_types.m4: -------------------------------------------------------------------------------- 1 | # GA_F2C_MATCH_TYPES([FTYPE], [CTYPES]) 2 | # ------------------------------------- 3 | # Size-based match between Fortran and C types. 4 | AC_DEFUN([GA_F2C_MATCH_TYPES], 5 | [AS_VAR_PUSHDEF([ftype_size], [ga_cv_f77_sizeof_$1]) 6 | AS_VAR_PUSHDEF([ftype_cache], [ga_cv_f2c_$1]) 7 | AC_CACHE_CHECK([for C type corresponding to $1], ftype_cache, 8 | [m4_foreach(ctype, [$2], 9 | [AS_VAR_PUSHDEF([ctype_size], [ac_cv_sizeof_[]ctype]) 10 | AS_IF([test -z "$ftype_cache"], 11 | [AS_IF([test "$ctype_size" = "$ftype_size"], 12 | [ftype_cache="ctype"])]) 13 | AS_VAR_POPDEF([ctype_size])])]) 14 | AS_IF([test "x$ftype_cache" = x], 15 | [AC_MSG_ERROR([Could not determine C type matching Fortran $1])]) 16 | AC_SUBST(AS_TR_SH([F2C_$1_C_TYPE]), [$ftype_cache]) 17 | AS_VAR_POPDEF([ftype_cache]) 18 | AS_VAR_POPDEF([ftype_size]) 19 | ])dnl 20 | -------------------------------------------------------------------------------- /m4/ga_f2c_rand.m4: -------------------------------------------------------------------------------- 1 | # GA_F2C_RAND 2 | # ----------- 3 | # In mixed Fortran/C code, if the C code has implemented a 'rand' function for 4 | # use by Fortran, it may conflict with an existing symbol. This is the fault of 5 | # the API being implemented, but in our case for backwards compatibility it 6 | # can't be avoided... 7 | AC_DEFUN([GA_F2C_SRAND48], 8 | [AC_CACHE_CHECK([whether we can safely implement F77_FUNC(srand48)], 9 | [ga_cv_f2c_srand48], 10 | [AC_LANG_PUSH([C]) 11 | AC_COMPILE_IFELSE( 12 | [AC_LANG_PROGRAM( 13 | [[ 14 | #include 15 | #define _SRAND48_ F77_FUNC(srand48, SRAND48) 16 | void _SRAND48_(long *seed) 17 | { 18 | unsigned int aseed = *seed; 19 | srandom(aseed); 20 | } 21 | ]], 22 | [[ 23 | long seed=6; 24 | _SRAND48_(&seed); 25 | ]] 26 | )], 27 | [ga_cv_f2c_srand48=yes], 28 | [ga_cv_f2c_srand48=no]) 29 | AC_LANG_POP([C])]) 30 | AS_IF([test "x$ga_cv_f2c_srand48" = xyes], [val=1], [val=0]) 31 | AC_DEFINE_UNQUOTED([F2C_SRAND48_OK], [$val], 32 | [define to 1 if Fortran-callable srand48 does not conflict with system def]) 33 | ]) # GA_F2C_SRAND48 34 | -------------------------------------------------------------------------------- /m4/ga_f77_cpp_symbols.m4: -------------------------------------------------------------------------------- 1 | # GA_F77_CPP_SYMBOL([ACTION-WHEN-FOUND]) 2 | # -------------------------------------- 3 | # Detect how to pass CPP symbols to preprocessed Fortran 77. 4 | # 5 | # Known: 6 | # -D the usual 7 | # -WF,-D IBM xlf 8 | # -Wp,-D Fujitsu 9 | # 10 | AC_DEFUN([GA_F77_CPP_SYMBOL], 11 | [AC_CACHE_CHECK([how to pass symbols to preprocessed $F77], 12 | [ga_cv_f77_cpp_symbol], 13 | [AC_LANG_PUSH([Fortran 77]) 14 | ac_ext=F 15 | for symbol in -D -WF,-D -Wp,-D 16 | do 17 | ga_save_CPPFLAGS="$CPPFLAGS" 18 | ga_save_FFLAGS="$FFLAGS" 19 | CPPFLAGS="$CPPFLAGS ${symbol}GABLAHBLAH" 20 | FFLAGS="$CPPFLAGS $FFLAGS" 21 | AC_COMPILE_IFELSE( 22 | [[#ifndef GABLAHBLAH 23 | this is an error 24 | #endif 25 | end program]], 26 | [ga_cv_f77_cpp_symbol="$symbol"]) 27 | CPPFLAGS="$ga_save_CPPFLAGS" 28 | FFLAGS="$ga_save_FFLAGS" 29 | AS_IF([test "x$ga_cv_f77_cpp_symbol" != x], [break]) 30 | done 31 | AC_LANG_POP([Fortran 77]) 32 | ]) 33 | AS_IF([test "x$ga_cv_f77_cpp_symbol" = x], 34 | [AC_MSG_ERROR([don't know how to pass symbols to preprocessed Fortran])]) 35 | m4_default([$1], 36 | [AS_CASE([$ga_cv_f77_cpp_symbol], 37 | [-D], [], 38 | [FFLAGS="$FFLAGS ${ga_cv_f77_cpp_symbol}HAVE_CONFIG_H"])]) 39 | ]) # GA_F77_CPP_SYMBOL 40 | -------------------------------------------------------------------------------- /m4/ga_f77_disable.m4: -------------------------------------------------------------------------------- 1 | # GA_F77_DISABLE() 2 | # ---------------- 3 | # Whether to disable all Fortran code. 4 | AC_DEFUN([GA_F77_DISABLE], 5 | [AC_ARG_ENABLE([f77], 6 | [AS_HELP_STRING([--disable-f77], [disable Fortran code])], 7 | [], 8 | [enable_f77=yes]) 9 | ])# GA_F77_DISABLE 10 | 11 | # GA_F77_DISABLE_RESULTS() 12 | # ------------------------ 13 | # This used to be part of the the GA_F77_DISABLE macro, but it turns out the 14 | # fortran compiler may be bogus and therefore we should disable it after 15 | # GA_F77_DISABLE has been run. These AC_DEFINEs and AM_CONDITIONALs should be 16 | # set at the last possible moment when the final value for enable_f77 has been 17 | # set. 18 | AC_DEFUN([GA_F77_DISABLE_RESULTS], [ 19 | AS_IF([test "x$enable_f77" = xyes], 20 | [AC_DEFINE([NOFORT], [0], [Define to 1 if not using Fortran]) 21 | AC_DEFINE([ENABLE_F77], [1], [Define to 1 if using Fortran])], 22 | [AC_DEFINE([NOFORT], [1], [Define to 1 if not using Fortran]) 23 | AC_DEFINE([ENABLE_F77], [0], [Define to 1 if using Fortran])]) 24 | AM_CONDITIONAL([NOFORT], [test "x$enable_f77" = xno]) 25 | AM_CONDITIONAL([ENABLE_F77], [test "x$enable_f77" = xyes]) 26 | ])# GA_F77_DISABLE_RESULTS 27 | -------------------------------------------------------------------------------- /m4/ga_f77_ld_override.m4: -------------------------------------------------------------------------------- 1 | # GA_F77_LD_OVERRIDE 2 | # ------------------ 3 | # Replaced $(F77LINK) in our Makefile.am's with $(LINK) if needed. 4 | # 5 | # There is a ton of garbage here. We must replicate what automake will do in 6 | # the case where we enable F77 code (and therefore require the F77LINK). We 7 | # use autoconf quadrigraphs to avoid problems with $(foo) and $@. This is yet 8 | # another hack to disable F77 since automake selects the linker based on the 9 | # static list of source files. 10 | AC_DEFUN([GA_F77_LD_OVERRIDE], [ 11 | m4_pattern_allow([AM_V_lt]) 12 | AS_IF([test "x$enable_f77" = xyes], 13 | [F77LINK='@S|@@{:@LIBTOOL@:}@ @S|@@{:@AM_V_lt@:}@ --tag=F77 @S|@@{:@AM_LIBTOOLFLAGS@:}@ @S|@@{:@LIBTOOLFLAGS@:}@ --mode=link @S|@@{:@F77LD@:}@ @S|@@{:@AM_FFLAGS@:}@ @S|@@{:@FFLAGS@:}@ @S|@@{:@AM_LDFLAGS@:}@ @S|@@{:@LDFLAGS@:}@ -o @S|@@' 14 | am__v_F77LD_0='@echo " F77LD " @S|@@;'], 15 | [F77LINK='@S|@@{:@LINK@:}@' 16 | am__v_F77LD_0='@S|@@{:@am__v_CCLD_0@:}@']) 17 | AC_SUBST([F77LINK]) 18 | AC_SUBST([am__v_F77LD_0]) 19 | ])dnl 20 | -------------------------------------------------------------------------------- /m4/ga_function.m4: -------------------------------------------------------------------------------- 1 | # GA_FUNCTION 2 | # ----------- 3 | # Define FUNCTION_NAME to either __func__ or __FUNCTION__ appropriately. 4 | # If all else fails, #define FUNCTION_NAME . 5 | AC_DEFUN([GA_FUNCTION], 6 | [AC_CACHE_CHECK([for preprocessor symbol for function name], 7 | [ga_cv_cpp_function], 8 | [AS_IF([test x$ga_cv_cpp_function = x], 9 | [AC_COMPILE_IFELSE( 10 | [AC_LANG_PROGRAM([[extern int printf(const char *format, ...);]], 11 | [[printf("__func__ = %s\n", __func__);]])], 12 | [ga_cv_cpp_function=__func__])]) 13 | AS_IF([test x$ga_cv_cpp_function = x], 14 | [AC_COMPILE_IFELSE( 15 | [AC_LANG_PROGRAM([[extern int printf(const char *format, ...);]], 16 | [[printf("__FUNCTION__ = %s\n", __FUNCTION__);]])], 17 | [ga_cv_cpp_function=__FUNCTION__])]) 18 | AS_IF([test x$ga_cv_cpp_function = x], 19 | [ga_cv_cpp_function='"Unknown"'])]) 20 | AC_DEFINE_UNQUOTED([FUNCTION_NAME], [$ga_cv_cpp_function], 21 | [CPP symbol for function name, if available]) 22 | ])# GA_FUNCTION 23 | -------------------------------------------------------------------------------- /m4/ga_gnu_loop_opt.m4: -------------------------------------------------------------------------------- 1 | # GA_GNU_LOOP_OPT 2 | # --------------- 3 | # Add -fno-aggressive-loop-optimizations to the compiler flags if using 4 | # GNU compilers. 5 | AC_DEFUN([GA_GNU_LOOP_OPT], [ 6 | AC_PREREQ([2.69]) dnl for _AC_LANG_PREFIX 7 | AC_CACHE_CHECK([for -fno-aggressive-loop-optimizations support in _AC_LANG compiler], 8 | ga_cv_[]_AC_LANG_ABBREV[]_gnu_loop_opt, [ 9 | ga_cv_[]_AC_LANG_ABBREV[]_gnu_loop_opt= 10 | save_[]_AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS" 11 | []_AC_LANG_PREFIX[]FLAGS="$save_[]_AC_LANG_PREFIX[]FLAGS -fno-aggressive-loop-optimizations" 12 | save_ac_[]_AC_LANG_ABBREV[]_werror_flag="$ac_[]_AC_LANG_ABBREV[]_werror_flag" 13 | AC_LANG_WERROR 14 | rm -f a.out 15 | touch a.out 16 | AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 17 | ga_cv_[]_AC_LANG_ABBREV[]_gnu_loop_opt=-fno-aggressive-loop-optimizations) 18 | []_AC_LANG_PREFIX[]FLAGS="$save_[]_AC_LANG_PREFIX[]FLAGS" 19 | ac_[]_AC_LANG_ABBREV[]_werror_flag="$save_ac_[]_AC_LANG_ABBREV[]_werror_flag" 20 | rm -f a.out 21 | ]) 22 | AC_SUBST([]_AC_LANG_PREFIX[]FLAG_NO_LOOP_OPT, $ga_cv_[]_AC_LANG_ABBREV[]_gnu_loop_opt) 23 | ]) 24 | -------------------------------------------------------------------------------- /m4/ga_gnu_loop_vect.m4: -------------------------------------------------------------------------------- 1 | # GA_GNU_LOOP_VECT 2 | # --------------- 3 | # Add -fno-tree-slp-vectorize to the compiler flags if using 4 | # GNU compilers. 5 | AC_DEFUN([GA_GNU_LOOP_VECT], [ 6 | AC_PREREQ([2.69]) dnl for _AC_LANG_PREFIX 7 | AC_CACHE_CHECK([for -fno-tree-slp-vectorize support in _AC_LANG compiler], 8 | ga_cv_[]_AC_LANG_ABBREV[]_gnu_loop_vect, [ 9 | ga_cv_[]_AC_LANG_ABBREV[]_gnu_loop_vect= 10 | save_[]_AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS" 11 | []_AC_LANG_PREFIX[]FLAGS="$save_[]_AC_LANG_PREFIX[]FLAGS -fno-tree-slp-vectorize" 12 | save_ac_[]_AC_LANG_ABBREV[]_werror_flag="$ac_[]_AC_LANG_ABBREV[]_werror_flag" 13 | AC_LANG_WERROR 14 | rm -f a.out 15 | touch a.out 16 | AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 17 | ga_cv_[]_AC_LANG_ABBREV[]_gnu_loop_vect=-fno-tree-slp-vectorize) 18 | []_AC_LANG_PREFIX[]FLAGS="$save_[]_AC_LANG_PREFIX[]FLAGS" 19 | ac_[]_AC_LANG_ABBREV[]_werror_flag="$save_ac_[]_AC_LANG_ABBREV[]_werror_flag" 20 | rm -f a.out 21 | ]) 22 | AC_SUBST([]_AC_LANG_PREFIX[]FLAG_NO_LOOP_VECT, $ga_cv_[]_AC_LANG_ABBREV[]_gnu_loop_vect) 23 | ]) 24 | -------------------------------------------------------------------------------- /m4/ga_gnu_std_gnu17.m4: -------------------------------------------------------------------------------- 1 | # GA_GNU_STD_GNU17 2 | # --------------- 3 | # Add -std=gnu17 to the compiler flags if using 4 | # GNU compilers to avoid -std=gnu23 issues 5 | AC_DEFUN([GA_GNU_STD_GNU17], [ 6 | AC_PREREQ([2.69]) dnl for _AC_LANG_PREFIX 7 | AC_CACHE_CHECK([for -std=gnu17 support in _AC_LANG compiler], 8 | ga_cv_[]_AC_LANG_ABBREV[]_gnu_std_gnu17, [ 9 | ga_cv_[]_AC_LANG_ABBREV[]_gnu_std_gnu17= 10 | save_[]_AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS" 11 | []_AC_LANG_PREFIX[]FLAGS="$save_[]_AC_LANG_PREFIX[]FLAGS -std=gnu17" 12 | save_ac_[]_AC_LANG_ABBREV[]_werror_flag="$ac_[]_AC_LANG_ABBREV[]_werror_flag" 13 | AC_LANG_WERROR 14 | rm -f a.out 15 | touch a.out 16 | AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 17 | ga_cv_[]_AC_LANG_ABBREV[]_gnu_std_gnu17=-std=gnu17) 18 | []_AC_LANG_PREFIX[]FLAGS="$save_[]_AC_LANG_PREFIX[]FLAGS" 19 | ac_[]_AC_LANG_ABBREV[]_werror_flag="$save_ac_[]_AC_LANG_ABBREV[]_werror_flag" 20 | rm -f a.out 21 | ]) 22 | AC_SUBST([]_AC_LANG_PREFIX[]FLAG_STD_GNU17, $ga_cv_[]_AC_LANG_ABBREV[]_gnu_std_gnu17) 23 | ]) 24 | -------------------------------------------------------------------------------- /m4/ga_mpi_test_disable.m4: -------------------------------------------------------------------------------- 1 | # GA_DISABLE_MPI_TESTS() 2 | # --------------------- 3 | # Whether to disable all MPI linker tests. 4 | AC_DEFUN([GA_DISABLE_MPI_TESTS], 5 | [AC_ARG_ENABLE([mpi-tests], 6 | [AS_HELP_STRING([--disable-mpi-tests], [disable MPI linker tests])], 7 | [], 8 | [enable_mpi_tests=yes]) 9 | ])# GA_DISABLE_MPI_TESTS 10 | -------------------------------------------------------------------------------- /m4/ga_pragma.m4: -------------------------------------------------------------------------------- 1 | # GA_PRAGMA_OPERATOR 2 | # ------------------ 3 | # whether the C compiler understands the C99 _Pragma operator 4 | AC_DEFUN([GA_PRAGMA_OPERATOR], 5 | [AC_CACHE_CHECK([whether the C compiler understands the _Pragma operator], 6 | [ga_cv_c_pragma_operator], 7 | [AC_LANG_PUSH([C]) 8 | AC_COMPILE_IFELSE([AC_LANG_SOURCE([[_Pragma("something")]])], 9 | [ga_cv_c_pragma_operator=yes], 10 | [ga_cv_c_pragma_operator=no]) 11 | AC_LANG_POP([C])]) 12 | AS_IF([test x$ga_cv_c_pragma_operator = xyes], 13 | [AC_DEFINE([HAVE_PRAGMA_OPERATOR], [1], 14 | [define if the C compiler understands the C99 _Pragma macro])]) 15 | AH_BOTTOM([#ifndef HAVE_PRAGMA_OPERATOR 16 | # define _Pragma(_pragf) 17 | #endif]) 18 | ]) #GA_PRAGMA_OPERATOR 19 | 20 | 21 | 22 | AC_DEFUN([GA_PRAGMA_OPERATOR_OLD], [ 23 | AC_MSG_CHECKING([whether the C compiler understands the _Pragma operator]) 24 | AC_LANG_PUSH([C]) 25 | AC_COMPILE_IFELSE( 26 | [AC_LANG_SOURCE([[_Pragma("something")]])], 27 | [AC_MSG_RESULT([yes]) 28 | AC_DEFINE([HAVE_PRAGMA_OPERATOR], [1], 29 | [define if the C compiler understands the C99 _Pragma macro])], 30 | [AC_MSG_RESULT([no])]) 31 | AC_LANG_POP([C]) 32 | ]) #GA_PRAGMA_OPERATOR_OLD 33 | -------------------------------------------------------------------------------- /m4/ga_progname.m4: -------------------------------------------------------------------------------- 1 | # GA_PROGNAME 2 | # ----------- 3 | # Look for special global variables containing the name of the program. 4 | AC_DEFUN([GA_PROGNAME], 5 | [AC_CACHE_CHECK([for C global variable containing the name of the program], 6 | [ga_cv_progname], 7 | [AC_LANG_PUSH([C]) 8 | ga_cv_progname=none 9 | for name in __progname program_invocation_short_name __progname_full program_invocation_name 10 | do 11 | AC_LINK_IFELSE( 12 | [AC_LANG_PROGRAM( 13 | [[#include 14 | #include 15 | extern const char * $name;]], 16 | [[printf("%s\n", $name);]])], 17 | [ga_cv_progname=$name 18 | break]) 19 | done 20 | AC_LANG_POP([C])]) 21 | AS_IF([test x$ga_cv_progname != xnone], [val=1], [val=0]) 22 | AC_DEFINE_UNQUOTED([HAVE_PROGNAME], [$val], 23 | [define to 1 if the C compiler has a program name global varaible]) 24 | AC_DEFINE_UNQUOTED([PROGNAME], [$ga_cv_progname], 25 | [define to the name of the program name global variable]) 26 | ])dnl 27 | -------------------------------------------------------------------------------- /m4/ga_suppress_msg.m4: -------------------------------------------------------------------------------- 1 | # GA_SUPPRESS_MESSAGE 2 | # ------------------- 3 | # Determine any flags necessary to suppress informational messages from the 4 | # compiler. Useful when setting the ac_[]_AC_LANG_ABBREV[]_werror_flag=yes 5 | # because any extra output (stdout and stderr) will trigger an error. 6 | # The xlf compiler is the only case thus far. 7 | AC_DEFUN([GA_SUPPRESS_MESSAGE], 8 | [AC_CACHE_CHECK([for _AC_LANG flag to suppress info messages], 9 | [ga_cv_[]_AC_LANG_ABBREV[]_suppress], 10 | [ga_save_[]_AC_LANG_PREFIX[]FLAGS="$_AC_LANG_PREFIX[]FLAGS" 11 | ga_save_werror_flag=$ac_[]_AC_LANG_ABBREV[]_werror_flag 12 | ac_[]_AC_LANG_ABBREV[]_werror_flag=yes 13 | for flag in none -qsuppress=cmpmsg ; do 14 | _AC_LANG_PREFIX[]FLAGS=$ga_save_[]_AC_LANG_PREFIX[]FLAGS 15 | AS_IF([test "x$flag" != xnone], 16 | [_AC_LANG_PREFIX[]FLAGS="$_AC_LANG_PREFIX[]FLAGS $flag"]) 17 | AC_LINK_IFELSE([AC_LANG_PROGRAM()], 18 | [ga_cv_[]_AC_LANG_ABBREV[]_suppress="$flag"; break]) 19 | done 20 | _AC_LANG_PREFIX[]FLAGS=$ga_save_[]_AC_LANG_PREFIX[]FLAGS 21 | ac_[]_AC_LANG_ABBREV[]_werror_flag=$ga_save_werror_flag 22 | ]) 23 | ]) # GA_SUPPRESS_MESSAGE 24 | -------------------------------------------------------------------------------- /m4/ga_sys_weak_alias.m4: -------------------------------------------------------------------------------- 1 | # GA_DISABLE_SYS_WEAK_ALIAS 2 | # ------------------------- 3 | # Whether to disable the test for weak aliases 4 | AC_DEFUN([GA_DISABLE_SYS_WEAK_ALIAS], [ 5 | AC_ARG_ENABLE([weak], 6 | [AS_HELP_STRING([--disable-weak], [don't use weak symbols for profiling])], 7 | [], 8 | [enable_weak=yes]) 9 | AS_IF([test "x$ga_cv_target_base" = xCYGWIN], [enable_weak=no]) 10 | ])dnl 11 | 12 | # GA_SYS_WEAK_ALIAS 13 | # ----------------- 14 | # Whether pragma weak is supported. 15 | AC_DEFUN([GA_SYS_WEAK_ALIAS], [ 16 | AS_IF([test "x$enable_weak" = xyes], 17 | [ax_sys_weak_alias=no 18 | _AX_SYS_WEAK_ALIAS_PRAGMA], 19 | [ax_cv_sys_weak_alias_pragma=no 20 | AC_DEFINE([HAVE_SYS_WEAK_ALIAS_PRAGMA], [0], 21 | [Define this if weak aliases may be created with @%:@pragma weak])]) 22 | AM_CONDITIONAL([HAVE_SYS_WEAK_ALIAS_PRAGMA], 23 | [test "x$ax_cv_sys_weak_alias_pragma" = xyes]) 24 | # enable shared libs automatically if profiling using weak symbols 25 | AS_IF([test "x$ax_cv_sys_weak_alias_pragma" = xyes], 26 | [AS_IF([test "x$enable_profiling" = xyes], 27 | [enable_shared=yes])]) 28 | ])dnl 29 | -------------------------------------------------------------------------------- /m4/ga_thread_safe.m4: -------------------------------------------------------------------------------- 1 | # GA_THREAD_SAFE 2 | # -------------- 3 | # Asserts that procedures are thread safe??? 4 | # Is this specific to ARMCI??? 5 | # This was taken from older GNUmakefiles... the original doc follows 6 | # Procedures are thread safe; should also specify the max number of threads 7 | # via ARMCI_MAX_THREADS and thread library via THREAD_LIBRARY. Only supported 8 | # for SOCKETS OPENIB. 9 | AC_DEFUN([GA_THREAD_SAFE], 10 | [AC_ARG_ENABLE([thread-safety], 11 | [AS_HELP_STRING([--enable-thread-safety], [**unsupported** turn on thread safety])], 12 | [thread_safety=yes 13 | AC_DEFINE([THREAD_SAFE], [1], [turn on thread safety])], 14 | [thread_safety=no]) 15 | AM_CONDITIONAL([THREAD_SAFE], [test x$thread_safety = xyes]) 16 | AC_ARG_VAR([THREAD_LIBRARY], [See --enable-thread-safety]) 17 | AC_SUBST([THREAD_LIBRARY]) 18 | ])dnl 19 | -------------------------------------------------------------------------------- /m4/ga_union_semun.m4: -------------------------------------------------------------------------------- 1 | # GA_UNION_SEMUN 2 | # -------------- 3 | # Not all packages define union semun, even those that require it. 4 | AC_DEFUN([GA_UNION_SEMUN], 5 | [AC_CACHE_CHECK([for union semun in sys/sem.h], [ga_cv_union_semun], 6 | [AC_COMPILE_IFELSE( 7 | [AC_LANG_PROGRAM([[#include 8 | #include 9 | #include ]], 10 | [[union semun arg; 11 | semctl(0, 0, 0, arg);]])], 12 | [ga_cv_union_semun=yes], 13 | [ga_cv_union_semun=no])]) 14 | AS_IF([test x$ga_cv_union_semun = xyes], 15 | [AC_DEFINE([HAVE_UNION_SEMUN], [1], 16 | [define if sys/sem.h has union semun])]) 17 | ])# GA_UNION_SEMUN 18 | -------------------------------------------------------------------------------- /m4/ga_with_help.m4: -------------------------------------------------------------------------------- 1 | # GA_WITH_HELP 2 | # ------------ 3 | # Using undocumented features, add some text to our --with-PACKAGE help to 4 | # avoid repetition. 5 | AC_DEFUN([GA_WITH_HELP], 6 | [AC_ARG_WITH([PACKAGE], [AS_HELP_STRING([--with-PACKAGE[[=ARG]]], 7 | [for most of the external software packages, ARG can be one or more whitespace-separated directories, linker or preprocessor directives; for example, --with-PACKAGE="/path/to/PACKAGE -lmylib -I/mydir"])])]) 8 | -------------------------------------------------------------------------------- /m4/ma_enable_cuda_mem.m4: -------------------------------------------------------------------------------- 1 | # MA_ENABLE_CUDA_MEM 2 | # ------------------ 3 | # Whether to enable CUDA memory in MA. AC_DEFINEs ENABLE_PROFILING. 4 | AC_DEFUN([MA_ENABLE_CUDA_MEM], 5 | [AC_ARG_ENABLE([cuda-mem], 6 | [AS_HELP_STRING([--enable-cuda-mem], [enable CUDA memory])], 7 | [], 8 | [enable_cuda_mem=no]) 9 | AM_CONDITIONAL([ENABLE_CUDA_MEM], [test x$enable_cuda_mem = xyes]) 10 | AS_IF([test "x$enable_cuda_mem" = xyes], 11 | [AC_DEFINE([ENABLE_CUDA_MEM], [1], [set to 1 if CUDA memory is enabled])]) 12 | ])dnl 13 | -------------------------------------------------------------------------------- /m4/ma_long_double.m4: -------------------------------------------------------------------------------- 1 | # MA_LONG_DOUBLE_TYPEDEF 2 | # ---------------------- 3 | # AC_SUBST a proper long double if one does not exist. 4 | AC_DEFUN([MA_LONG_DOUBLE_TYPEDEF], 5 | [AC_REQUIRE([AC_TYPE_LONG_DOUBLE]) 6 | AS_IF([test $ac_cv_type_long_double = yes], 7 | [ma_long_double="long double"], 8 | [ma_long_double="struct {double dummy[2];}"]) 9 | AC_SUBST([MA_LONG_DOUBLE], [$ma_long_double]) 10 | ]) # MA_LONG_DOUBLE_TYPEDEF 11 | -------------------------------------------------------------------------------- /m4/ma_stats.m4: -------------------------------------------------------------------------------- 1 | # MA_STATS 2 | # --------- 3 | # Simply AC_DEFINEd. 4 | AC_DEFUN([MA_STATS], 5 | [AC_DEFINE([STATS], [1], [This is always defined. Dunno why.]) 6 | ])dnl 7 | -------------------------------------------------------------------------------- /m4/ma_verify.m4: -------------------------------------------------------------------------------- 1 | # MA_VERIFY 2 | # --------- 3 | # Simply AC_DEFINEd. 4 | AC_DEFUN([MA_VERIFY], 5 | [AC_DEFINE([VERIFY], [1], [This is always defined. Dunno why.]) 6 | ])dnl 7 | -------------------------------------------------------------------------------- /m4/tcgmsg_rsh.m4: -------------------------------------------------------------------------------- 1 | # TCGMSG_REMOTE_SHELL 2 | # ------------------- 3 | # tcgmsg requires a remote shell. 4 | AC_DEFUN([TCGMSG_REMOTE_SHELL], 5 | [AC_MSG_NOTICE([checking for remote shell]) 6 | AC_PATH_PROGS([ga_cv_path_rsh], [rsh remsh ssh], [not found]) 7 | AS_IF([test "x$ga_cv_path_rsh" = "xnot found"], 8 | [AC_MSG_ERROR([Could not find remote shell for use by TCGMSG])]) 9 | AC_DEFINE_UNQUOTED([TCGMSG_RSH], ["$ga_cv_path_rsh"], [remote shell for TCGMSG]) 10 | ])dnl 11 | -------------------------------------------------------------------------------- /m4/tcgmsg_timings.m4: -------------------------------------------------------------------------------- 1 | # TCGMSG_ENABLE_TIMINGS 2 | # --------------------- 3 | # This was only defined for LINUX[64] previously. Does it do any harm to 4 | # define it permanently? 5 | AC_DEFUN([TCGMSG_ENABLE_TIMINGS], 6 | [AC_DEFINE([TCGMSG_TIMINGS], [1], [Gather timing information for TCGMSG]) 7 | ])dnl 8 | -------------------------------------------------------------------------------- /ma/error.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | * Private header file containing symbolic constants and type declarations 3 | * for the error handling module. 4 | * 5 | * This file should only be included by internal C files. 6 | */ 7 | #ifndef _error_h 8 | #define _error_h 9 | 10 | #include "macdecls.h" 11 | 12 | /** 13 | ** types 14 | **/ 15 | 16 | /* severity levels of errors */ 17 | typedef enum 18 | { 19 | EL_Fatal, /* unrecoverable */ 20 | EL_Nonfatal /* recoverable */ 21 | } ErrorLevel; 22 | 23 | /* categories of errors */ 24 | typedef enum 25 | { 26 | ET_External, /* anticipated, client-level problem */ 27 | ET_Internal /* unanticipated problem internal to MA */ 28 | } ErrorType; 29 | 30 | /** 31 | ** function types 32 | **/ 33 | 34 | extern void ma_error(ErrorLevel elevel, ErrorType etype, char *func, char *emsg); 35 | 36 | /** 37 | ** variables 38 | **/ 39 | 40 | /* buffer for error messages */ 41 | extern char ma_ebuf[]; 42 | 43 | /* print error messages for nonfatal errors? */ 44 | extern Boolean ma_error_print; 45 | 46 | /* terminate execution upon any error? */ 47 | extern Boolean ma_hard_fail; 48 | 49 | #endif /* _error_h */ 50 | -------------------------------------------------------------------------------- /ma/macommon.h: -------------------------------------------------------------------------------- 1 | #ifndef _macommon_h 2 | #define _macommon_h 3 | 4 | #define MA_FALSE 0 5 | #define MA_TRUE 1 6 | 7 | #define MA_DEFAULT_SPACE (-1) 8 | 9 | #define MA_NAMESIZE 32 10 | 11 | #define MT_BASE 1000 12 | 13 | #define MT_C_CHAR (MT_BASE + 0) 14 | #define MT_C_INT (MT_BASE + 1) 15 | #define MT_C_LONGINT (MT_BASE + 2) 16 | #define MT_C_FLOAT (MT_BASE + 3) 17 | #define MT_C_DBL (MT_BASE + 4) 18 | #define MT_C_LDBL (MT_BASE + 5) 19 | #define MT_C_SCPL (MT_BASE + 6) 20 | #define MT_C_DCPL (MT_BASE + 7) 21 | #define MT_C_LDCPL (MT_BASE + 8) 22 | 23 | #define MT_F_BYTE (MT_BASE + 9) 24 | #define MT_F_INT (MT_BASE + 10) 25 | #define MT_F_LOG (MT_BASE + 11) 26 | #define MT_F_REAL (MT_BASE + 12) 27 | #define MT_F_DBL (MT_BASE + 13) 28 | #define MT_F_SCPL (MT_BASE + 14) 29 | #define MT_F_DCPL (MT_BASE + 15) 30 | 31 | #define MT_C_LONGLONG (MT_BASE + 16) 32 | 33 | #define MT_FIRST MT_C_CHAR 34 | #define MT_LAST MT_C_LONGLONG 35 | #define MT_NUMTYPES (MT_LAST - MT_FIRST + 1) 36 | 37 | #endif /* _macommon_h */ 38 | -------------------------------------------------------------------------------- /ma/man/man3/MA_initialized.3: -------------------------------------------------------------------------------- 1 | .TH MA_INITIALIZED 3 "20 February 1997" "MA Release 1.8" "MA LIBRARY ROUTINES" 2 | .SH NAME 3 | MA_initialized - 4 | find out if MA has been successfully initialized 5 | .SH "C SYNOPSIS" 6 | .nf 7 | #include "macdecls.h" 8 | 9 | Boolean MA_initialized() 10 | .fi 11 | .SH "FORTRAN SYNOPSIS" 12 | .nf 13 | #include "mafdecls.fh" 14 | 15 | logical function MA_initialized() 16 | .fi 17 | .SH DESCRIPTION 18 | MA_initialized() returns true 19 | if MA_init() has been called successfully, 20 | otherwise it returns false. 21 | .\" .SH USAGE 22 | .\" .SH DIAGNOSTICS 23 | .SH "RETURN VALUE" 24 | C: MA_TRUE if MA has been successfully initialized, MA_FALSE otherwise. 25 | .br 26 | FORTRAN: .true. if MA has been successfully initialized, .false. otherwise. 27 | .\" .SH NOTES 28 | .SH FILES 29 | .nf 30 | Include files: /msrc/proj/hpctools/ma/release/current/include 31 | Library: /msrc/proj/hpctools/ma/release/current/lib/\fIplatform\fR/libma.a 32 | Man pages: /msrc/proj/hpctools/ma/release/current/man/man3 33 | Source code: /msrc/proj/hpctools/ma/release/current/tar/ma\fIrelease\fR.tar 34 | .fi 35 | .SH "SEE ALSO" 36 | .na 37 | MA(3), 38 | MA_init(3) 39 | .ad 40 | .SH AUTHOR 41 | Gregory S. Thomas, Pacific Northwest National Laboratory 42 | -------------------------------------------------------------------------------- /ma/man/man3/MA_print_stats.3: -------------------------------------------------------------------------------- 1 | .TH MA_PRINT_STATS 3 "20 February 1997" "MA Release 1.8" "MA LIBRARY ROUTINES" 2 | .SH NAME 3 | MA_print_stats - 4 | print MA usage statistics on the standard output (stdout) 5 | .SH "C SYNOPSIS" 6 | .nf 7 | #include "macdecls.h" 8 | 9 | void MA_print_stats() 10 | .fi 11 | .SH "FORTRAN SYNOPSIS" 12 | .nf 13 | #include "mafdecls.fh" 14 | 15 | subroutine MA_print_stats 16 | .fi 17 | .SH DESCRIPTION 18 | MA_print_stats() prints MA allocation statistics 19 | (current and maximum number of blocks and total bytes for heap and stack) 20 | and calls per MA routine 21 | on the standard output (stdout). 22 | .\" .SH USAGE 23 | .SH DIAGNOSTICS 24 | unavailable; recompile MA with -DSTATS 25 | .in +0.5i 26 | To use this routine, 27 | MA must be compiled with cpp option -DSTATS. 28 | .in 29 | .SH "RETURN VALUE" 30 | C: None. 31 | .br 32 | FORTRAN: None. 33 | .\" .SH NOTES 34 | .SH FILES 35 | .nf 36 | Include files: /msrc/proj/hpctools/ma/release/current/include 37 | Library: /msrc/proj/hpctools/ma/release/current/lib/\fIplatform\fR/libma.a 38 | Man pages: /msrc/proj/hpctools/ma/release/current/man/man3 39 | Source code: /msrc/proj/hpctools/ma/release/current/tar/ma\fIrelease\fR.tar 40 | .fi 41 | .SH "SEE ALSO" 42 | .na 43 | MA(3), 44 | MA_summarize_allocated_blocks(3) 45 | .ad 46 | .SH AUTHOR 47 | Gregory S. Thomas, Pacific Northwest National Laboratory 48 | -------------------------------------------------------------------------------- /ma/matypes.h.in: -------------------------------------------------------------------------------- 1 | /** @file 2 | * Private header file containing C type definitions. 3 | * 4 | * This file should only be included directly by internal C 5 | * header files (e.g., macdecls.h). It may be included indirectly 6 | * by external C files that include the appropriate header 7 | * file (e.g., macdecls.h). 8 | */ 9 | #ifndef _MATYPES_H 10 | #define _MATYPES_H 11 | 12 | /** 13 | ** types 14 | **/ 15 | 16 | #include "typesf2c.h" 17 | 18 | typedef Integer Boolean; /* MA_TRUE or MA_FALSE */ 19 | typedef char * Pointer; /* generic pointer */ 20 | 21 | /* not all C compilers support long double */ 22 | typedef @MA_LONG_DOUBLE@ MA_LongDouble; 23 | 24 | /* no C compilers support complex types */ 25 | typedef struct {float dummy[2];} MA_SingleComplex; 26 | typedef struct {double dummy[2];} MA_DoubleComplex; 27 | typedef struct {double dummy[4];} MA_LongDoubleComplex; 28 | 29 | typedef @MA_ACCESS_INDEX_TYPE_C@ MA_AccessIndex; 30 | 31 | #endif /* _matypes_h */ 32 | -------------------------------------------------------------------------------- /ma/memcpy.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | * Private header file containing symbolic constants, type declarations, 3 | * and macro definitions for OS memory routines, to provide a level of 4 | * abstraction between them and routines that use them. 5 | * 6 | * This file should only be included by internal C files. 7 | */ 8 | #ifndef _memcpy_h 9 | #define _memcpy_h 10 | 11 | /** 12 | ** constants 13 | **/ 14 | 15 | /* ensure that NULL is defined */ 16 | #ifndef NULL 17 | #define NULL 0 18 | #endif 19 | 20 | /** 21 | ** macros 22 | **/ 23 | 24 | /* allocate bytes */ 25 | #define bytealloc(nbytes) malloc((size_t)(nbytes)) 26 | 27 | /* deallocate bytes */ 28 | #define bytefree(pointer) (void)free((char *)(pointer)) 29 | 30 | #if HAVE_STRING_H 31 | # include 32 | #else 33 | # ifndef HAVE_STRCHR 34 | # define strchr index 35 | # define strrchr rindex 36 | # endif 37 | char *strchr (), *strrchr (); 38 | # ifndef HAVE_MEMCPY 39 | # define memcpy(d, s, n) bcopy ((s), (d), (n)) 40 | # define memmove(d, s, n) bcopy ((s), (d), (n)) 41 | # endif 42 | #endif 43 | 44 | #define bytecopy(from,to,nbytes) \ 45 | ((void)memcpy((char *)(to), (char *)(from), (int)(nbytes))) 46 | 47 | #endif /* _memcpy_h */ 48 | -------------------------------------------------------------------------------- /ma/scope.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | * Private header file containing symbolic constants for internal C routines. 3 | * 4 | * This file should only be included by internal C files. 5 | */ 6 | #ifndef _scope_h 7 | #define _scope_h 8 | 9 | /** 10 | ** constants 11 | **/ 12 | 13 | /* pseudo reserved words for scope control */ 14 | #define private static 15 | #define public 16 | 17 | #endif /* _scope_h */ 18 | -------------------------------------------------------------------------------- /ma/string-util.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | * Private header file for string utilities. 3 | * 4 | * This file should only be included by internal C files. 5 | */ 6 | #ifndef _string_util_h 7 | #define _string_util_h 8 | 9 | /** 10 | ** constants 11 | **/ 12 | 13 | /* str_match return values */ 14 | #define SM_NONE (-1) 15 | #define SM_MANY (-2) 16 | 17 | /** 18 | ** function types 19 | **/ 20 | 21 | extern unsigned int str_len(char *); 22 | extern int str_match(char *, char *slist[], unsigned int); 23 | 24 | #endif /* _string_util_h */ 25 | -------------------------------------------------------------------------------- /ma/table.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | * Private header file containing symbolic constants and type declarations 3 | * for the table module. 4 | * 5 | * This file should only be included by internal C files. 6 | */ 7 | #ifndef _table_h 8 | #define _table_h 9 | 10 | #include "matypes.h" 11 | 12 | /** 13 | ** constants 14 | **/ 15 | 16 | /* invalid handle */ 17 | #define TABLE_HANDLE_NONE (Integer)(-1) 18 | 19 | /** 20 | ** types 21 | **/ 22 | 23 | /* type of data in each table entry */ 24 | typedef char * TableData; 25 | 26 | /** 27 | ** function types 28 | **/ 29 | 30 | extern Integer ma_table_allocate(TableData data); 31 | extern void ma_table_deallocate(Integer handle); 32 | extern TableData ma_table_lookup(Integer handle); 33 | extern Integer ma_table_lookup_assoc(TableData data); 34 | extern Boolean ma_table_verify(Integer handle, char *caller); 35 | 36 | #endif /* _table_h */ 37 | -------------------------------------------------------------------------------- /pario/doc/DRAapi.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Disk Resident Arrays Operations 5 | 6 | 7 | 8 | 9 | 10 | <body> 11 | Viewing this page requires browser capable of displaying frames 12 | </body> 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /pario/doc/EAFapi.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | EAF Programmers Interface 6 | 7 | 8 | 9 | 10 | 11 | <BODY> 12 | Viewing this page requires a browser capable of displaying frames. 13 | </BODY> 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /pario/doc/SFapi.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Shared Files Library 5 | 6 | 7 | 8 | 9 | 10 | <BODY> 11 | Viewing this page requires a browser capable of displaying frames. 12 | </BODY> 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /pario/doc/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Documentation List 8 | 9 | 10 | There are three parallel I/O models supported: 11 |

Disk Residend Arrays 12 |
Shared Files 13 |
Exclusive Access Files 14 | 15 | 16 | -------------------------------------------------------------------------------- /pario/doc/list.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Untitled Document 5 | 6 | 8 | 9 |

Shared Files 10 | Library

11 | 12 |

sf_create

13 | 14 |

sf_destroy

15 | 16 |

sf_read

17 | 18 |

sf_wait

19 | 20 |

sf_waitall

21 | 22 |

sf_write

23 | 24 |

 

25 | 26 |

 

27 | 28 |

 

29 | 30 |

  31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /pario/dra/Notes.doc: -------------------------------------------------------------------------------- 1 | Disk Resident Arrays Implementation Notes 2 | 3 | Assumptions: 4 | . ANSI C compiler is not required; 5 | . interface to C programs is minimal (most users program in Fortran) 6 | . low level I/O operations defined in ELIO library 7 | . upper layer knows if they are called collectively or not 8 | 9 | C Interface: 10 | . C programs must use Integer and DoublePrecision data types, 11 | defined in "global.h" (GA package) for both the GA and DRA, and include 12 | file "dra.h"; 13 | . all arguments passed by address; 14 | . names of DRA operations have capitalized DRA prefix i.e., C version of 15 | Fortran dra_init is DRA_init. Note that the names are converted by cpp as 16 | specified in "dra.h" so that in most cases, C and Fortran programs call 17 | the same function. Internal convention is that there is a separate 18 | Fortran wrapper to a DRA operation iff it has a character string 19 | argument(s). 20 | 21 | Implementation Status: 22 | . prototyping used for DRA functions if ANSI C compiler available 23 | . indexing arguments are currently implemented as integers 24 | . reshaping and transposing in dra_[write,read]_section not implemented yet 25 | 26 | 27 | Problems to Resolve: 28 | . do we need explicit dra_flush or we should handle it implicitly after 29 | each write when file is create in 'read+write' in mode ? 30 | -------------------------------------------------------------------------------- /pario/dra/README: -------------------------------------------------------------------------------- 1 | This directory contains a prototype of the Disk Resident Arrays library. 2 | 3 | You need GNU make (version > 3.68) to build this software. 4 | 5 | To build test program, from the top-level type: 6 | 7 | make pario/dra/test.x 8 | 9 | Documentation is located in disk_arrays.doc and implementation notes in 10 | Notes.doc. 11 | 12 | Bug report, comments, questions: 13 | 14 | https://github.com/GlobalArrays/ga/issues 15 | -------------------------------------------------------------------------------- /pario/dra/env.c: -------------------------------------------------------------------------------- 1 | #if HAVE_CONFIG_H 2 | # include "config.h" 3 | #endif 4 | 5 | /** @file 6 | * $Id: env.c,v 1.1 1997-12-07 11:14:18 d3e129 Exp $ 7 | */ 8 | 9 | #if HAVE_STDLIB_H 10 | # include 11 | #endif 12 | #if HAVE_STDIO_H 13 | # include 14 | #endif 15 | #if HAVE_STRING_H 16 | # include 17 | #endif 18 | 19 | #define MAX_NUM_SERV 64 20 | 21 | /** 22 | * get number of I/O servers from optional environmental variable DRA_NUM_SERV 23 | */ 24 | int drai_get_num_serv() 25 | { 26 | int val=-1; 27 | char *str; 28 | 29 | str = getenv("DRA_NUM_SERV"); 30 | if(str==NULL)val = 0; 31 | else{ 32 | val = atoi(str); 33 | if(val<1 || val >MAX_NUM_SERV)val =0; 34 | } 35 | return val; 36 | } 37 | -------------------------------------------------------------------------------- /pario/dra/ffflush.F: -------------------------------------------------------------------------------- 1 | #if HAVE_CONFIG_H 2 | # include "config.fh" 3 | #endif 4 | c $Id: ffflush.F,v 1.2 2002-10-07 16:51:51 d3h325 Exp $ 5 | subroutine ffflush(unit) 6 | integer unit 7 | c 8 | #if HAVE_F77_FLUSH 9 | call F77_FLUSH(unit) 10 | #endif 11 | c 12 | end 13 | -------------------------------------------------------------------------------- /pario/dra/util.c: -------------------------------------------------------------------------------- 1 | #if HAVE_CONFIG_H 2 | # include "config.h" 3 | #endif 4 | 5 | #include "ga.h" 6 | #include "typesf2c.h" 7 | 8 | /* Return the no. of bytes that n doubles occupy */ 9 | #define util_mdtob_ F77_FUNC_(util_mdtob,UTIL_MDTOB) 10 | Integer FATR util_mdtob_(Integer *n) 11 | { 12 | if (*n < 0) 13 | GA_Error("util_MDTOB_: negative argument",*n); 14 | 15 | return (Integer) (*n * sizeof(double)); 16 | } 17 | 18 | 19 | /* Return the no. of bytes that n ints=Integers occupy */ 20 | #define util_mitob_ F77_FUNC_(util_mitob,UTIL_MITOB) 21 | Integer FATR util_mitob_(Integer *n) 22 | { 23 | if (*n < 0) 24 | GA_Error("util_MITOB_: negative argument",*n); 25 | 26 | return (Integer) (*n * sizeof(Integer)); 27 | } 28 | -------------------------------------------------------------------------------- /pario/eaf/eaf.fh: -------------------------------------------------------------------------------- 1 | #ifndef EAF_FORTRAN 2 | #define EAF_FORTRAN 3 | #endif 4 | #include "eaf.h" 5 | integer eaf_write, eaf_awrite, eaf_read, eaf_aread 6 | integer eaf_wait, eaf_probe, eaf_close, eaf_open 7 | integer eaf_delete, eaf_stat, eaf_length, eaf_truncate 8 | logical eaf_eof 9 | integer eaf_util_szint 10 | double precision eaf_util_random 11 | external eaf_write, eaf_awrite, eaf_read, eaf_aread 12 | external eaf_wait, eaf_probe, eaf_close, eaf_open 13 | external eaf_delete, eaf_stat, eaf_length, eaf_truncate 14 | external eaf_eof 15 | external eaf_util_random,eaf_util_szint 16 | integer eaf_rw, eaf_r, eaf_w 17 | parameter (eaf_rw=EAF_RW, eaf_r=EAF_R, eaf_w=EAF_W) 18 | -------------------------------------------------------------------------------- /pario/eaf/eaf.h: -------------------------------------------------------------------------------- 1 | #ifndef EAF_H 2 | #define EAF_H 3 | 4 | #if 0 5 | /* This section used by both C and Fortran */ 6 | #endif 7 | 8 | #define EAF_RW -1 9 | #define EAF_W -2 10 | #define EAF_R -3 11 | 12 | #ifndef EAF_FORTRAN 13 | 14 | /* This section used by only C */ 15 | 16 | /* This to ensure size_t is defined */ 17 | #include 18 | #include 19 | 20 | typedef double eaf_off_t; 21 | 22 | int EAF_Aread(int fd, eaf_off_t offset, void *buf, size_t bytes, int *req_id); 23 | int EAF_Awrite(int fd, eaf_off_t offset, const void *buf, size_t bytes, int *req_id); 24 | int EAF_Close(int fd); 25 | int EAF_Delete(const char *fname); 26 | int EAF_Eof(int code); 27 | void EAF_Errmsg(int code, char *msg); 28 | int EAF_Length(int fd, eaf_off_t *length); 29 | int EAF_Length(int fd, eaf_off_t *length); 30 | int EAF_Open(const char *fname, int type, int *fd); 31 | void EAF_Print_stats(int fd); 32 | int EAF_Probe(int id, int *status); 33 | int EAF_Read(int fd, eaf_off_t offset, void *buf, size_t bytes); 34 | int EAF_Stat(const char *path, long *avail_kb, char *fstype, int fslen); 35 | int EAF_Truncate(int fd, eaf_off_t length); 36 | int EAF_Wait(int fd, int id); 37 | int EAF_Write(int fd, eaf_off_t offset, const void *buf, size_t bytes); 38 | 39 | #endif 40 | #endif 41 | -------------------------------------------------------------------------------- /pario/eaf/eafP.h: -------------------------------------------------------------------------------- 1 | #ifndef EAFP_H 2 | #define EAFP_H 3 | 4 | /* These macros are for EAF internal use only. EOF_OK must be 0. */ 5 | 6 | #define EAF_OK 0 7 | #define EAF_ERR_EOF -10001 8 | #define EAF_ERR_MAX_OPEN -10002 9 | #define EAF_ERR_MEMORY -10003 10 | #define EAF_ERR_OPEN -10004 11 | #define EAF_ERR_CLOSE -10005 12 | #define EAF_ERR_INVALID_FD -10006 13 | #define EAF_ERR_WRITE -10007 14 | #define EAF_ERR_AWRITE -10008 15 | #define EAF_ERR_READ -10009 16 | #define EAF_ERR_AREAD -10010 17 | #define EAF_ERR_WAIT -10011 18 | #define EAF_ERR_PROBE -10012 19 | #define EAF_ERR_UNLINK -10013 20 | #define EAF_ERR_UNIMPLEMENTED -10014 21 | #define EAF_ERR_STAT -10015 22 | #define EAF_ERR_TOO_SHORT -10016 23 | #define EAF_ERR_TOO_LONG -10017 24 | #define EAF_ERR_NONINTEGER_OFFSET -10018 25 | #define EAF_ERR_TRUNCATE -10019 26 | #define EAF_ERR_LENGTH -10020 27 | 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /pario/elio/chemio.h: -------------------------------------------------------------------------------- 1 | #if !defined(CHEMIO_H) 2 | #define CHEMIO_H 3 | 4 | #define ELIO_RW -1 5 | #define ELIO_W -2 6 | #define ELIO_R -3 7 | 8 | #define ELIO_DONE -1 9 | #define ELIO_PENDING 1 10 | #define ELIO_OK 0 11 | 12 | #define CHEMIO_RW ELIO_RW 13 | #define CHEMIO_W ELIO_W 14 | #define CHEMIO_R ELIO_R 15 | #define CHEMIO_DONE ELIO_DONE 16 | #define CHEMIO_PENDING ELIO_PENDING 17 | #define CHEMIO_OK ELIO_OK 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /pario/elio/pablo.h: -------------------------------------------------------------------------------- 1 | /* Header file for PABLO instrumentation */ 2 | 3 | #if defined(PABLO) 4 | # define IOTRACE 5 | # include "IOTrace.h" 6 | #endif 7 | 8 | 9 | /* Pablo profiler definitions */ 10 | 11 | # define PABLO_elio_write 710000 12 | # define PABLO_elio_awrite 710001 13 | # define PABLO_elio_read 710002 14 | # define PABLO_elio_aread 710003 15 | # define PABLO_elio_wait 710004 16 | # define PABLO_elio_probe 710005 17 | # define PABLO_elio_stat 710006 18 | # define PABLO_elio_open 710007 19 | # define PABLO_elio_close 710009 20 | # define PABLO_elio_set_cb 710010 21 | # define PABLO_elio_delete 710011 22 | # define PABLO_elio_truncate 710012 23 | # define PABLO_elio_length 710014 24 | 25 | 26 | #if defined(PABLO) 27 | # define PABLO_init initIOTrace 28 | # define PABLO_start(_id) startTimeEvent( _id ) 29 | # define PABLO_end(_id) endTimeEvent( _id ) 30 | # define PABLO_terminate {endIOTrace(); endTracing();} 31 | #else 32 | # define PABLO_init 33 | # define PABLO_start(_id) 34 | # define PABLO_end( _id ) 35 | # define PABLO_terminate 36 | #endif 37 | -------------------------------------------------------------------------------- /pario/sf/coms.h: -------------------------------------------------------------------------------- 1 | /*************** interface to a parallel communication system ********/ 2 | # include "ga.h" 3 | # define SYNC GA_Sync 4 | # define NPROC GA_Nnodes 5 | # define ME GA_Nodeid 6 | # define ERROR GA_Error 7 | 8 | -------------------------------------------------------------------------------- /pario/sf/sf.fh: -------------------------------------------------------------------------------- 1 | integer sf_create,sf_write,sf_read,sf_wait, sf_destroy 2 | integer sf_waitall, sf_open, sf_close, sf_rwtor 3 | integer sf_create_suffix 4 | external sf_create,sf_write,sf_read,sf_wait, sf_destroy 5 | external sf_waitall, sf_open, sf_close, sf_rwtor 6 | external sf_create_suffix 7 | -------------------------------------------------------------------------------- /pario/sf/sf.h: -------------------------------------------------------------------------------- 1 | #ifndef SF_H_ 2 | #define SF_H_ 3 | 4 | typedef double SFsize_t; 5 | 6 | #include "typesf2c.h" 7 | 8 | extern int SF_Create(char* fname, SFsize_t size_hard_limit, 9 | SFsize_t size_soft_limit, SFsize_t req_size, int *handle); 10 | 11 | extern int SF_Create_suffix(char* fname, SFsize_t size_hard_limit, 12 | SFsize_t size_soft_limit, SFsize_t req_size, int *handle, int suffix); 13 | 14 | extern int SF_Destroy(int handle); 15 | 16 | extern int SF_Rwtor(int handle); 17 | 18 | extern int SF_Open(int handle); 19 | 20 | extern int SF_Close(int handle); 21 | 22 | extern int SF_Fsync(int handle); 23 | 24 | extern int SF_Write(int handle, SFsize_t offset, SFsize_t bytes, 25 | char *buffer, int *req_id); 26 | 27 | extern int SF_Read(int handle, SFsize_t offset, SFsize_t bytes, 28 | char *buffer, int *req_id); 29 | 30 | extern int SF_Wait(int *req_id); 31 | 32 | extern int SF_Waitall(int *list, int num); 33 | 34 | extern void SF_Errmsg(int code, char *msg); 35 | 36 | #endif /* SF_H_ */ 37 | -------------------------------------------------------------------------------- /support/README_SICM.md: -------------------------------------------------------------------------------- 1 | # Building GA with SICM 2 | SICM was downloaded from https://github.com/lanl/SICM.git 3 | In order to build following modules were used. Some other combination of compilers and libraries may also work. 4 | 5 | - numactl-2.0.11 6 | - libpfm4-4.10.1 7 | - hwloc-1.11.9 8 | - openmpi-3.1.0 9 | - llvm 10 | 11 | With above modules loaded, SICM was configured as follows: 12 | 13 | The command:: 14 | ``` 15 | $ ./configure --with-jemalloc="PATH_TO/jemalloc/install" --prefix="/PATH_TO/SICM/install" 16 | ``` 17 | 18 | Then ga was configured using following command: 19 | 20 | The command:: 21 | ``` 22 | $ ./configure --with-mpi-pr=1 --prefix="/PATH_TO/GA/install" --x-includes="/PATH_TO/SICM/install/include" --x-libraries="/PATH_TO/SICM/install/lib:/PATH_TO/jemalloc/install/lib" CFLAGS="-DUSE_SICM=1 -I/PATH_TO/SICM/install/include" 23 | ``` 24 | -------------------------------------------------------------------------------- /tcgmsg/examples/blkdat15.f: -------------------------------------------------------------------------------- 1 | block data 2 | C$Id: blkdat15.f,v 1.2 1995-02-02 23:23:47 d3g681 Exp $ 3 | implicit double precision (a-h, o-z) 4 | include 'cscf.h' 5 | c 6 | c initalize data in common ... clumsy but avoids code to read in data 7 | c 8 | c one be atom with 15 orbitals 9 | c 10 | c have 9s functions on each center and simulate p's by having 11 | c s function at +- 1 in each of x, y, z 12 | c 13 | data ax /0.0d0/, ay /0.0d0/, az /0.0d0/, q /4.0d0/, enrep/0.0d0/ 14 | data x /9*0.0d0, 1.6d0, -1.6d0, 0.0d0, 0.0d0, 0.0d0, 0.0d0/ 15 | data y /9*0.0d0, 0.0d0, 0.0d0, 1.6d0, -1.6d0, 0.0d0, 0.0d0/ 16 | data z /9*0.0d0, 0.0d0, 0.0d0, 0.0d0, 0.0d0, 1.6d0, -1.6d0/ 17 | data expnt /1741.0d0, 262.1d0, 60.33d0, 17.62d0, 5.933d0, 2.185d0, 18 | $ 0.859, 0.1806d0, 0.05835d0, 6*0.3d0/ 19 | c 20 | end 21 | -------------------------------------------------------------------------------- /tcgmsg/examples/blkdat30.f: -------------------------------------------------------------------------------- 1 | block data 2 | C$Id: blkdat30.f,v 1.2 1995-02-02 23:23:49 d3g681 Exp $ 3 | implicit double precision (a-h, o-z) 4 | include 'cscf.h' 5 | c 6 | c initalize data in common ... clumsy but avoids code to read in data 7 | c 8 | c two be atoms 4.0 a.u. apart with 30 orbitals 9 | c 10 | c have 9s functions on each center and simulate p's by having 11 | c s function at +- 1 in each of x, y, z 12 | c 13 | data ax /0.0d0, 0.0d0/, ay /0.0d0, 0.0d0/, az /0.0d0, 4.0d0/, 14 | $ q /4.0d0, 4.0d0/, enrep/4.0d0/ 15 | c nbfn=30 two atoms 16 | data x /9*0.0d0, 1.0d0, -1.0d0, 0.0d0, 0.0d0, 0.0d0, 0.0d0, 17 | $ 9*0.0d0, 1.0d0, -1.0d0, 0.0d0, 0.0d0, 0.0d0, 0.0d0/ 18 | data y /9*0.0d0, 0.0d0, 0.0d0, 1.0d0, -1.0d0, 0.0d0, 0.0d0, 19 | $ 9*0.0d0, 0.0d0, 0.0d0, 1.0d0, -1.0d0, 0.0d0, 0.0d0/ 20 | data z /9*0.0d0, 0.0d0, 0.0d0, 0.0d0, 0.0d0, 1.0d0, -1.0d0, 21 | $ 9*4.0d0, 4.0d0, 4.0d0, 4.0d0, 4.0d0, 5.0d0, 3.0d0/ 22 | data expnt /1741.0d0, 262.1d0, 60.33d0, 17.62d0, 5.933d0, 2.185d0, 23 | $ 0.859, 0.1806d0, 0.05835d0, 6*0.3d0, 24 | $ 1741.0d0, 262.1d0, 60.33d0, 17.62d0, 5.933d0, 2.185d0, 25 | $ 0.859, 0.1806d0, 0.05835d0, 6*0.3d0/ 26 | end 27 | -------------------------------------------------------------------------------- /tcgmsg/examples/dscal.f: -------------------------------------------------------------------------------- 1 | subroutine dscal(n,da,dx,incx) 2 | c 3 | c scales a vector by a constant. 4 | c uses unrolled loops for increment equal to one. 5 | c jack dongarra, linpack, 3/11/78. 6 | c 7 | C$Id: dscal.f,v 1.2 1995-02-02 23:24:08 d3g681 Exp $ 8 | double precision da,dx(1) 9 | integer i,incx,m,mp1,n,nincx 10 | c 11 | if(n.le.0)return 12 | if(incx.eq.1)go to 20 13 | c 14 | c code for increment not equal to 1 15 | c 16 | nincx = n*incx 17 | do 10 i = 1,nincx,incx 18 | dx(i) = da*dx(i) 19 | 10 continue 20 | return 21 | c 22 | c code for increment equal to 1 23 | c 24 | c 25 | c clean-up loop 26 | c 27 | 20 m = mod(n,5) 28 | if( m .eq. 0 ) go to 40 29 | do 30 i = 1,m 30 | dx(i) = da*dx(i) 31 | 30 continue 32 | if( n .lt. 5 ) return 33 | 40 mp1 = m + 1 34 | do 50 i = mp1,n,5 35 | dx(i) = da*dx(i) 36 | dx(i + 1) = da*dx(i + 1) 37 | dx(i + 2) = da*dx(i + 2) 38 | dx(i + 3) = da*dx(i + 3) 39 | dx(i + 4) = da*dx(i + 4) 40 | 50 continue 41 | return 42 | end 43 | -------------------------------------------------------------------------------- /tcgmsg/examples/fexit.f.proto: -------------------------------------------------------------------------------- 1 | subroutine fexit 2 | end 3 | IF IBM IBMNOEXT 4 | subroutine flush(iunit) 5 | end 6 | ENDIF 7 | -------------------------------------------------------------------------------- /tcgmsg/examples/getmem.c: -------------------------------------------------------------------------------- 1 | #if HAVE_CONFIG_H 2 | # include "config.h" 3 | #endif 4 | 5 | /*$Id: getmem.c,v 1.2 1995-02-02 23:24:10 d3g681 Exp $*/ 6 | extern char * memalign(); 7 | 8 | #if defined(AIX) && !defined(EXTNAME) 9 | #define getmem_ getmem 10 | #endif 11 | 12 | /* getmem gets n real*8 storage locations and returns its 13 | address (iaddr) and offset (ioff) within the real*8 array work 14 | so that the usable memory is (work(i+ioff),i=1,n). 15 | e.g. 16 | call getmem(n,work,iaddr,ioff) 17 | if (iaddr.eq.0) call error 18 | 19 | Mods are needed to release this later. */ 20 | 21 | void getmem_(pn,pwork,paddr,pioff) 22 | unsigned long *pn,*paddr,*pioff; 23 | double *pwork; 24 | { 25 | double *ptemp; 26 | unsigned int size = 8; 27 | 28 | ptemp = (double *) memalign(size, (unsigned) size* *pn); 29 | *paddr = (unsigned long) ptemp; 30 | *pioff = ptemp - pwork; 31 | } 32 | -------------------------------------------------------------------------------- /tcgmsg/examples/ieeetrap.c: -------------------------------------------------------------------------------- 1 | #if HAVE_CONFIG_H 2 | # include "config.h" 3 | #endif 4 | 5 | /*$Id: ieeetrap.c,v 1.2 1995-02-02 23:24:12 d3g681 Exp $*/ 6 | #include 7 | #include 8 | #include 9 | 10 | static void catchit() 11 | { 12 | printf("!! Floating point interrupt caught !!\n"); 13 | fflush(stdout); 14 | (void) signal(SIGIOT, SIG_DFL); 15 | abort(); 16 | } 17 | 18 | void ieeetrap_() 19 | { 20 | (void) ieee_handler("set","inexact", SIGFPE_IGNORE); 21 | (void) ieee_handler("set","underflow", SIGFPE_IGNORE); 22 | (void) ieee_handler("set","invalid", SIGFPE_IGNORE); 23 | 24 | } 25 | -------------------------------------------------------------------------------- /tcgmsg/examples/mc.input: -------------------------------------------------------------------------------- 1 | 4000 2 | 4000 3 | -------------------------------------------------------------------------------- /tcgmsg/examples/mxv_daxpy1.f: -------------------------------------------------------------------------------- 1 | subroutine mxv(a,ncol,b,nrow,c) 2 | C$Id: mxv_daxpy1.f,v 1.2 1995-02-02 23:24:19 d3g681 Exp $ 3 | implicit double precision (a-h, o-z) 4 | dimension a(ncol, nrow), b(nrow), c(ncol) 5 | parameter (nchunk = 800) 6 | c 7 | c matrix vector product stripmined to optimize cache usage 8 | c when inner loop is replaced with a daxpy that uses pipelined 9 | c loads for a to avoid writing over c in the cache. 10 | c 11 | do 10 ilo = 1, ncol, nchunk 12 | ihi = min(ncol, ilo+nchunk-1) 13 | ndo = ihi - ilo + 1 14 | do 20 i = ilo, ihi 15 | c(i) = 0.0d0 16 | 20 continue 17 | do 30 j = 1, nrow 18 | c do 40 i = ilo, ihi 19 | c c(i) = c(i) + a(i,j)*b(j) 20 | c40 continue 21 | call daxpy1(ndo, b(j), a(ilo, j), c(ilo)) 22 | 30 continue 23 | 10 continue 24 | c 25 | end 26 | -------------------------------------------------------------------------------- /tcgmsg/examples/mxv_dgemv.f: -------------------------------------------------------------------------------- 1 | subroutine mxv(a,ncol,b,nrow,c) 2 | C$Id: mxv_dgemv.f,v 1.2 1995-02-02 23:24:20 d3g681 Exp $ 3 | implicit double precision (a-h, o-z) 4 | double precision a(ncol, nrow), b(nrow), c(ncol) 5 | parameter (ilen=500, jlen=60) 6 | c 7 | call dgemv('n', ncol, nrow, 1.0d0, a, ncol, b, 1, 0.0d0, c, 1) 8 | c$$$ do 10 i = 1, ncol 9 | c$$$ c(i) = 0.0d0 10 | c$$$ 10 continue 11 | c$$$c 12 | c$$$ do 40 jlo = 1, nrow, jlen 13 | c$$$ jhi = min(jlo+jlen-1, nrow) 14 | c$$$ do 30 ilo = 1, ncol, ilen 15 | c$$$ ihi = min(ilo+ilen-1, ncol) 16 | c$$$ ndo = ihi - ilo + 1 17 | c$$$ do 20 j = jlo, jhi 18 | c$$$ call daxpy2(ndo, b(j), a(ilo,j), c(ilo)) 19 | c$$$ 20 continue 20 | c$$$ 30 continue 21 | c$$$ 40 continue 22 | c 23 | end 24 | -------------------------------------------------------------------------------- /tcgmsg/examples/mxv_fortran.f: -------------------------------------------------------------------------------- 1 | subroutine mxv(a,ncol,b,nrow,c) 2 | C$Id: mxv_fortran.f,v 1.2 1995-02-02 23:24:21 d3g681 Exp $ 3 | implicit double precision (a-h, o-z) 4 | dimension a(ncol, nrow), b(nrow), c(ncol) 5 | parameter (nchunk = 127) 6 | c 7 | c matrix vector product stripmined to optimize cache usage 8 | c when inner loop is replaced with a daxpy that uses pipelined 9 | c loads for a to avoid writing over c in the cache. 10 | c 11 | do 10 ilo = 1, ncol, nchunk 12 | ihi = min(ncol, ilo+nchunk-1) 13 | do 20 i = ilo, ihi 14 | c(i) = 0.0d0 15 | 20 continue 16 | do 30 j = 1, nrow 17 | do 40 i = ilo, ihi 18 | c(i) = c(i) + a(i,j)*b(j) 19 | 40 continue 20 | 30 continue 21 | 10 continue 22 | c 23 | end 24 | -------------------------------------------------------------------------------- /tcgmsg/examples/prtri.f: -------------------------------------------------------------------------------- 1 | subroutine prtri(d,n) 2 | c 3 | c ----- print out a real triangular matrix ----- 4 | c 5 | C$Id: prtri.f,v 1.2 1995-02-02 23:24:24 d3g681 Exp $ 6 | implicit double precision (a-h, o-z) 7 | dimension d(*),dd(6) 8 | iw = 6 9 | c 10 | max = 6 11 | imax = 0 12 | 100 imin = imax+1 13 | imax = imax+max 14 | if (imax .gt. n) imax = n 15 | write (iw,9008) 16 | write (iw,8028) (i,i = imin,imax) 17 | do 160 j = 1,n 18 | k = 0 19 | do 140 i = imin,imax 20 | k = k+1 21 | m = max0(i,j)*(max0(i,j)-1)/2 + min0(i,j) 22 | dd(k) = d(m) 23 | 140 continue 24 | write (iw,8048) j,(dd(i),i = 1,k) 25 | 160 continue 26 | if (imax .lt. n) go to 100 27 | return 28 | 9008 format(/) 29 | 8028 format(6x,6(4x,i4,4x)) 30 | 8048 format(i5,1x,6f12.6) 31 | end 32 | -------------------------------------------------------------------------------- /tcgmsg/examples/random.c: -------------------------------------------------------------------------------- 1 | #if HAVE_CONFIG_H 2 | # include "config.h" 3 | #endif 4 | 5 | /*$Id: random.c,v 1.2 1995-02-02 23:24:25 d3g681 Exp $*/ 6 | double random_(seed) 7 | unsigned long *seed; 8 | { 9 | *seed = *seed *1812433253 + 12345; 10 | return (double) ((*seed & 0x7fffffff) * 4.6566128752458e-10); 11 | } 12 | -------------------------------------------------------------------------------- /tcgmsg/examples/runit: -------------------------------------------------------------------------------- 1 | #!/bin/csh -x 2 | 3 | foreach nproc (16 12 8 4 2 1) 4 | foreach demo (grid) 5 | echo `whoami` `hostname` $nproc $demo /tmp > ${demo}.p 6 | (time ../ipcv4.0/parallel $demo -ngrid 1024) >& ${demo}.log.${nproc} 7 | end 8 | end 9 | 10 | 11 | foreach nproc (16 12 8 4 2 1) 12 | foreach demo (mc) 13 | echo `whoami` `hostname` $nproc $demo /tmp > ${demo}.p 14 | (time ../ipcv4.0/parallel $demo) < mc.input >& ${demo}.log.${nproc} 15 | end 16 | end 17 | 18 | -------------------------------------------------------------------------------- /tcgmsg/examples/runit.grid: -------------------------------------------------------------------------------- 1 | #!/bin/csh -x 2 | 3 | foreach nproc (16 12 8 4 2 1) 4 | foreach demo (grid) 5 | echo `whoami` `hostname` $nproc $demo /tmp > ${demo}.p 6 | (time ../ipcv4.0/parallel $demo -ngrid 1024) >& ${demo}.log.${nproc} 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /tcgmsg/examples/timer.f: -------------------------------------------------------------------------------- 1 | double precision function timer() 2 | c 3 | c return the time since the last call to timer. 4 | c 5 | c must be initialized by calling once and throwing away the 6 | c value 7 | c ... use cpu time on multi-user machines 8 | c ... use elapsed time on dedicated or single user machines. 9 | c 10 | *mdc*if unix 11 | * real*4 dtime, tt(2) 12 | * timer = dble(dtime(tt)) 13 | *mdc*elseif tcgmsg 14 | C$Id: timer.f,v 1.2 1995-02-02 23:24:33 d3g681 Exp $ 15 | save mlast 16 | data mlast/0/ 17 | m = mtime() 18 | timer = dble(m - mlast) * 0.01d0 19 | mlast = m 20 | *mdc*endif 21 | c 22 | end 23 | -------------------------------------------------------------------------------- /tcgmsg/examples/trace.out: -------------------------------------------------------------------------------- 1 | #*********** PROGRAM STACKTRACE ************** 2 | # text address function cp func start 3 | # ------------ ----------- ---------- 4 | 0x1176840 0x81b8858 0x1175fd0 5 | 0x1174ea8 0x81b8498 0x1174900 6 | 0x119a208 0x81bdd10 0x119a000 7 | #*************** END STACKTRACE ************** 8 | -------------------------------------------------------------------------------- /tcgmsg/tcgmsg-mpi/README: -------------------------------------------------------------------------------- 1 | This is an implementation of the TCGMSG interface on top of MPI. 2 | 3 | Heteregenous platforms are currently not supported. 4 | 5 | The TCGSMG nxtval operation is implemented by using ARMCI. 6 | 7 | Questions/comments/problems: 8 | 9 | https://github.com/GlobalArrays/ga/issues 10 | -------------------------------------------------------------------------------- /tcgmsg/tcgmsg-mpi/checkbyte.c: -------------------------------------------------------------------------------- 1 | #if HAVE_CONFIG_H 2 | # include "config.h" 3 | #endif 4 | 5 | unsigned char CheckByte(unsigned char *c, long n) 6 | { 7 | /* 8 | unsigned char sum = (char) 0; 9 | while (n-- > 0) { 10 | sum = sum ^ *c++; 11 | } 12 | 13 | return sum; 14 | */ 15 | 16 | unsigned int sum = 0; 17 | unsigned int mask = 0xff; 18 | 19 | while (n-- > 0) { 20 | sum += (int) *c++; 21 | } 22 | 23 | sum = (sum + (sum>>8) + (sum>>16) + (sum>>24)) & mask; 24 | return (unsigned char) sum; 25 | } 26 | -------------------------------------------------------------------------------- /tcgmsg/tcgmsg-mpi/drand48.c: -------------------------------------------------------------------------------- 1 | #if HAVE_CONFIG_H 2 | # include "config.h" 3 | #endif 4 | 5 | #include 6 | #include 7 | 8 | #include "sndrcv.h" 9 | 10 | 11 | double DRAND48_() 12 | { 13 | double val=((double) random() ) * 4.6566128752458e-10; 14 | return val; 15 | } 16 | 17 | 18 | void SRAND48_(long *seed) 19 | { 20 | (void) srandom(*seed); 21 | } 22 | -------------------------------------------------------------------------------- /tcgmsg/tcgmsg-mpi/llog.c: -------------------------------------------------------------------------------- 1 | #if HAVE_CONFIG_H 2 | # include "config.h" 3 | #endif 4 | 5 | #if HAVE_STDIO_H 6 | # include 7 | #endif 8 | #if HAVE_SYS_TYPES_H 9 | # include 10 | #endif 11 | #if HAVE_TIME_H 12 | # include 13 | #endif 14 | #if HAVE_SYS_TIME_H 15 | # include 16 | #endif 17 | 18 | #include "sndrcv.h" 19 | 20 | extern void Error(char *, long int); 21 | 22 | /** 23 | * close and open stdin and stdout to append to a local logfile 24 | * with the name log. in the current directory 25 | */ 26 | void LLOG_() 27 | { 28 | char name[12]; 29 | time_t t; 30 | 31 | (void) sprintf(name, "log.%03ld",NODEID_()); 32 | 33 | (void) fflush(stdout); 34 | (void) fflush(stderr); 35 | 36 | if (freopen(name, "a", stdout) == (FILE *) NULL) { 37 | Error("LLOG_: error re-opening stdout", (long) -1); 38 | } 39 | 40 | if (freopen(name, "a", stderr) == (FILE *) NULL) { 41 | Error("LLOG_: error re-opening stderr", (long) -1); 42 | } 43 | 44 | (void) time(&t); 45 | (void) printf("\n\nLog file opened : %s\n\n",ctime(&t)); 46 | (void) fflush(stdout); 47 | } 48 | -------------------------------------------------------------------------------- /tcgmsg/tcgmsg-mpi/msgtypesc.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | * This defines bit masks that can be OR'ed with user types (1-32767) 3 | * to indicate the nature of the data to the message passing system 4 | */ 5 | #ifndef MSGTYPES_H_ 6 | #define MSGTYPES_H_ 7 | 8 | #define MSGDBL 65536 9 | #define MSGINT 131072 10 | #define MSGCHR 262144 11 | 12 | #endif /* MSGTYPES_H_ */ 13 | -------------------------------------------------------------------------------- /tcgmsg/tcgmsg-mpi/msgtypesf.h: -------------------------------------------------------------------------------- 1 | C 2 | C This defines bit masks that can be ORed with user types (1-32767) 3 | C to indicate the nature of the data to the message passing system 4 | C 5 | integer msgdbl, msgint, msgchr 6 | parameter (msgdbl=65536, msgint=131072, msgchr=262144) 7 | -------------------------------------------------------------------------------- /tcgmsg/tcgmsg-mpi/niceftn.c: -------------------------------------------------------------------------------- 1 | #if HAVE_CONFIG_H 2 | # include "config.h" 3 | #endif 4 | 5 | #if HAVE_UNISTD_H 6 | # include 7 | #endif 8 | 9 | #include "srftoc.h" 10 | 11 | /** 12 | * Wrapper around nice for FORTRAN users courtesy of Rick Kendall 13 | * ... C has the system interface. 14 | */ 15 | long NICEFTN_(long *ival) 16 | { 17 | int val = (int)(*ival); 18 | return nice(val); 19 | } 20 | -------------------------------------------------------------------------------- /tcgmsg/tcgmsg-mpi/pbeginf.c: -------------------------------------------------------------------------------- 1 | #if HAVE_CONFIG_H 2 | # include "config.h" 3 | #endif 4 | 5 | #if HAVE_STDIO_H 6 | # include 7 | #endif 8 | #if HAVE_STRING_H 9 | # include 10 | #endif 11 | 12 | #include "farg.h" 13 | #include "sndrcv.h" 14 | #include "srftoc.h" 15 | #define LEN 255 16 | 17 | extern int tcgi_argc; 18 | extern char **tcgi_argv; 19 | 20 | /** 21 | * Hewlett Packard Risc box, SparcWorks F77 2.* compilers. 22 | * Have to construct the argument list by calling FORTRAN. 23 | */ 24 | void PBEGINF_() 25 | { 26 | ga_f2c_get_cmd_args(&tcgi_argc, &tcgi_argv); 27 | tcgi_pbegin(tcgi_argc, tcgi_argv); 28 | } 29 | 30 | 31 | /** 32 | * Alternative entry for those senstive to FORTRAN making reference 33 | * to 7 character external names 34 | */ 35 | void PBGINF_() 36 | { 37 | PBEGINF_(); 38 | } 39 | -------------------------------------------------------------------------------- /tcgmsg/tcgmsg.fh: -------------------------------------------------------------------------------- 1 | double precision tcgtime 2 | integer nodeid, nnodes, mitob, mdtob, nxtval 3 | external nodeid, nnodes, mitob, mdtob, nxtval 4 | external tcgtime 5 | -------------------------------------------------------------------------------- /tcgmsg/tests/fexit.f: -------------------------------------------------------------------------------- 1 | subroutine fexit 2 | end 3 | -------------------------------------------------------------------------------- /tcgmsg/tests/hello.c: -------------------------------------------------------------------------------- 1 | #if HAVE_CONFIG_H 2 | # include "config.h" 3 | #endif 4 | 5 | #if HAVE_STDIO_H 6 | # include 7 | #endif 8 | 9 | #include "tcgmsg.h" 10 | 11 | /** 12 | * Traditional first parallel program. 13 | */ 14 | int main(int argc, char **argv) 15 | { 16 | tcg_pbegin(argc, argv); 17 | 18 | (void) printf("Hello from node %ld\n",tcg_nodeid()); 19 | 20 | tcg_pend(); 21 | 22 | return 0; 23 | } 24 | -------------------------------------------------------------------------------- /tcgmsg/tests/hello2.c: -------------------------------------------------------------------------------- 1 | #if HAVE_CONFIG_H 2 | # include "config.h" 3 | #endif 4 | 5 | #if HAVE_STDIO_H 6 | # include 7 | #endif 8 | 9 | #include "tcgmsg.h" 10 | 11 | /** 12 | * Traditional first parallel program 13 | */ 14 | int main(int argc, char **argv) 15 | { 16 | tcg_pbegin(argc, argv); 17 | 18 | (void) printf("Hello from node %ld\n",tcg_nodeid()); 19 | 20 | tcg_pend(); 21 | 22 | return 0; 23 | } 24 | -------------------------------------------------------------------------------- /tcgmsg/tests/mxv_fortran.f: -------------------------------------------------------------------------------- 1 | subroutine mxv(a,ncol,b,nrow,c) 2 | implicit double precision (a-h, o-z) 3 | dimension a(ncol, nrow), b(nrow), c(ncol) 4 | parameter (nchunk = 127) 5 | c 6 | c matrix vector product stripmined to optimize cache usage 7 | c when inner loop is replaced with a daxpy that uses pipelined 8 | c loads for a to avoid writing over c in the cache. 9 | c 10 | do 10 ilo = 1, ncol, nchunk 11 | ihi = min(ncol, ilo+nchunk-1) 12 | do 20 i = ilo, ihi 13 | c(i) = 0.0d0 14 | 20 continue 15 | do 30 j = 1, nrow 16 | do 40 i = ilo, ihi 17 | c(i) = c(i) + a(i,j)*b(j) 18 | 40 continue 19 | 30 continue 20 | 10 continue 21 | c 22 | end 23 | -------------------------------------------------------------------------------- /tcgmsg/tests/test_arcv.f: -------------------------------------------------------------------------------- 1 | program async 2 | integer nodeid, nnodes 3 | integer me, proc 4 | integer req, ack, len,node, to 5 | c 6 | call pbeginf 7 | proc = nnodes() 8 | me = nodeid() 9 | print *,'proc=',proc,' node=',me 10 | if(proc.lt.2) then 11 | call pend() 12 | return 13 | endif 14 | c 15 | call setdbg(1) 16 | if(me.eq.0)then 17 | print *, 'Checking non-blocking receive' 18 | call rcv(33, req,1, len, 1, node, 1) !blocking 19 | print *, 'received request ',me 20 | call snd(34, ack,1, 1, 1) 21 | endif 22 | c 23 | if(me.eq.1)then 24 | call rcv(34, ack, 1, len, 0, node, 0)!nonblocking 25 | print *,'after nonblocking receive =',me 26 | call snd(33, req,1, 0, 0) 27 | print *,'after nonblocking send =',me 28 | call waitcom(0) 29 | print *, 'OK' 30 | endif 31 | call pend() 32 | end 33 | 34 | 35 | -------------------------------------------------------------------------------- /tcgmsg/tests/testargf.f: -------------------------------------------------------------------------------- 1 | c $Header: /tmp/hpctools/ga/tcgmsg/ipcv4.0/testargf.f,v 1.4 1995-02-24 02:17:59 d3h325 Exp $ 2 | call parg 3 | end 4 | -------------------------------------------------------------------------------- /tcgmsg/tests/testmap.c: -------------------------------------------------------------------------------- 1 | #if HAVE_CONFIG_H 2 | # include "config.h" 3 | #endif 4 | 5 | #if HAVE_STDIO_H 6 | # include 7 | #endif 8 | 9 | #include "typesf2c.h" 10 | 11 | int ncols; 12 | int nrows; 13 | 14 | /* Given the col and row no. return the actual process no. */ 15 | #define MAP(Row,Col) (ncols*(Row) + (Col)) 16 | 17 | /* Given the node return the row no. */ 18 | #define ROW(Node) ((Node) / ncols) 19 | 20 | /* Given the node return the column no. */ 21 | #define COL(Node) ((Node) - ncols*((Node)/ncols)) 22 | 23 | int main(int argc, char **argv) 24 | { 25 | int node, type, len, me; 26 | 27 | (void) printf("Input nrows, ncols "); 28 | (void) scanf("%d %d",&nrows, &ncols); 29 | 30 | node = 0; 31 | type = 1; 32 | len = 4; 33 | 34 | for (me=0; me<(nrows*ncols); me++) { 35 | (void) printf(" me=%d row=%d col=%d map=%d\n",me, 36 | ROW(me),COL(me),MAP(ROW(me),COL(me))); 37 | } 38 | return 0; 39 | } 40 | -------------------------------------------------------------------------------- /tcgmsg/tests/testpf.f: -------------------------------------------------------------------------------- 1 | c $Header: /tmp/hpctools/ga/tcgmsg/ipcv4.0/testpf.f,v 1.3 1995-02-24 02:18:01 d3h325 Exp $ 2 | character*60 fname 3 | call pbeginf 4 | fname = ' ' 5 | write(fname,'(a,i3.3)') '/tmp/pfcopy.test',nodeid() 6 | call pfcopy(5, 0, fname) 7 | call pend 8 | end 9 | -------------------------------------------------------------------------------- /tcgmsg/tests/timer.f: -------------------------------------------------------------------------------- 1 | double precision function timer() 2 | c 3 | c return the time since the last call to timer. 4 | c 5 | c must be initialized by calling once and throwing away the 6 | c value 7 | c ... use cpu time on multi-user machines 8 | c ... use elapsed time on dedicated or single user machines. 9 | c 10 | *mdc*if unix 11 | * real*4 dtime, tt(2) 12 | * timer = dble(dtime(tt)) 13 | *mdc*elseif tcgmsg 14 | save mlast 15 | data mlast/0/ 16 | m = mtime() 17 | timer = dble(m - mlast) * 0.01d0 18 | mlast = m 19 | *mdc*endif 20 | c 21 | end 22 | -------------------------------------------------------------------------------- /tcgmsg/tests/waitcom.f: -------------------------------------------------------------------------------- 1 | program main 2 | implicit none 3 | integer maxloop 4 | parameter (maxloop = 67 ) 5 | integer buf,me,nproc,loop,lenmes,node, received 6 | integer nnodes, nodeid 7 | c 8 | call pbeginf 9 | c 10 | nproc = nnodes() 11 | me = nodeid() 12 | if(nproc.lt.3)then 13 | print *,'min 3 processes required ',nproc 14 | call parerr(0) 15 | endif 16 | received =0 17 | do loop = 1, maxloop 18 | node = Mod(loop,2)+1 19 | if(me.eq.0) then 20 | call snd(loop, buf, 1, node, 0) 21 | endif 22 | if(me.eq.node) then 23 | received = received +1 24 | call rcv(loop, buf, 1, lenmes, 0, node, 1) 25 | endif 26 | enddo 27 | if(me.eq.0)print *,'0: waiting for coms to node 1 to complete' 28 | call waitcom(1) 29 | if(me.eq.0)print *,'0: waiting for remaining coms to complete' 30 | call waitcom(-1) 31 | 32 | if(me.eq.0) then 33 | print *,'node=',me, maxloop,' messages sent asynchronously' 34 | else 35 | print *, 'node=',me, received,' messages received' 36 | endif 37 | 38 | c 39 | call pend 40 | end 41 | -------------------------------------------------------------------------------- /tools/config_fh_from_h.cmake: -------------------------------------------------------------------------------- 1 | if (INPUT) 2 | if (OUTPUT) 3 | file(READ "${INPUT}" in0) 4 | # replace carriage returns with a semi-colon 5 | string (REGEX REPLACE "\n" ";" in0 "${in0}") 6 | set(out "") 7 | foreach (l in ${in0}) 8 | # Only retain lines that start with "#" 9 | set(found "") 10 | string(REGEX MATCH "^#" found "${l}") 11 | if (found) 12 | set(out "${out}${l}\n") 13 | endif () 14 | endforeach () 15 | file(WRITE "${OUTPUT}" "${out}") 16 | else (OUTPUT) 17 | message(ERROR "OUTPUT variable must be set") 18 | endif (OUTPUT) 19 | else (INPUT) 20 | message(ERROR "INPUT variable must be set") 21 | endif (INPUT) 22 | -------------------------------------------------------------------------------- /tools/config_fh_from_h.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env perl 2 | while () { 3 | $line = $_; 4 | if (/^#/) { 5 | print "$_"; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /tools/ga_papi_to_wapi.cmake: -------------------------------------------------------------------------------- 1 | if (INPUT) 2 | if (OUTPUT) 3 | message(STATUS "Reading ${INPUT} ...") 4 | FILE(READ "${INPUT}" in0) 5 | string(REPLACE "PAPI" "WAPI" in1 "${in0}") 6 | string(REPLACE "pnga_" "wnga_" in2 "${in1}") 7 | string(REGEX REPLACE "typedef[^;]*;" "" in3 "${in2}") 8 | message(STATUS "Writing ${OUTPUT} ...") 9 | FILE(WRITE "${OUTPUT}" "${in3}") 10 | else (OUTPUT) 11 | message(ERROR "OUTPUT variable must be set") 12 | endif (OUTPUT) 13 | else (INPUT) 14 | message(ERROR "INPUT variable must be set") 15 | endif (INPUT) 16 | -------------------------------------------------------------------------------- /tools/ga_papi_to_wapi.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env perl 2 | while () { 3 | $line = $_; 4 | $line =~ s/PAPI/WAPI/g; 5 | $line =~ s/pnga_/wnga_/g; 6 | if (!($line =~ /typedef/)) { 7 | print "$line"; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /tools/ga_papi_to_wapidefs.cmake: -------------------------------------------------------------------------------- 1 | if (INPUT) 2 | if (OUTPUT) 3 | message(STATUS "Reading ${INPUT} ...") 4 | file(READ "${INPUT}" in0) 5 | string(REGEX REPLACE "\r?\n" ";" lines "${in0}") 6 | set(out "") 7 | foreach (l ${lines}) 8 | string(REGEX MATCH "p(nga_.*) *\\(" found "${l}") 9 | if (found) 10 | set(l "#define w${CMAKE_MATCH_1} p${CMAKE_MATCH_1}") 11 | endif (found) 12 | string(REGEX MATCH "PAPI" found "${l}") 13 | if (found) 14 | string(REPLACE "PAPI" "WAPIDEFS" l "${l}") 15 | endif (found) 16 | # remove comments 17 | string(REGEX REPLACE "/\\*..*\\*/" "" l "${l}") 18 | # ignore lines with leading whitespace 19 | string(REGEX MATCH "^ *" found "${l}") 20 | if (found) 21 | set(l "") 22 | endif () 23 | # ignore typedef lines 24 | string(REGEX MATCH "typedef" found "${l}") 25 | if (found) 26 | set(l "") 27 | endif () 28 | if (l) 29 | set(out "${out}${l}\n") 30 | endif (l) 31 | endforeach () 32 | message(STATUS "Writing ${OUTPUT} ...") 33 | file(WRITE "${OUTPUT}" "${out}") 34 | else (OUTPUT) 35 | message(ERROR "OUTPUT variable must be set") 36 | endif (OUTPUT) 37 | else (INPUT) 38 | message(ERROR "INPUT variable must be set") 39 | endif (INPUT) 40 | -------------------------------------------------------------------------------- /tools/ga_papi_to_wapidefs.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env perl 2 | while () { 3 | $line = $_; 4 | if ($line =~ /.*p(nga_.*) *\(/) { 5 | $line = "#define w$1 p$1\n"; 6 | } 7 | if ($line =~ /PAPI/) { 8 | $line =~ s/PAPI/WAPIDEFS/g; 9 | } 10 | if ($line =~ /^ /) { 11 | $line = ""; 12 | } 13 | if ($line =~ /^\/\*/) { 14 | $line = ""; 15 | } 16 | if ($line =~ /^ \*\\/) { 17 | $line = ""; 18 | } 19 | if ($line =~ /typedef/) { 20 | $line = ""; 21 | } 22 | if ($line ne "") { 23 | print "$line"; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /travis/README.md: -------------------------------------------------------------------------------- 1 | Folder Contents 2 | =============== 3 | This folder contains bash scripts used by the Travis CI build ([.travis.yml](../.travis.yml) in the root of the repo). 4 | 5 | Build Overview 6 | ============== 7 | The GA Travis build is a matrix build, meaning it combines the selected OS, compilers, and environment variables to create a set of builds run on each commit. 8 | 9 | As of October 30, 2018 this means that there are 42 builds run for each commit (2 OS x 2 compilers x 10 env settings + 2 xcode installs on MacOS). 10 | 11 | For each combination of the matrix build, the `before_install` followed by the `install` scripts are run. These get the required dependencies for the build installed and ready to use. Then the `script` section is run, followed by `after_failure` in the event the build fails. 12 | 13 | Within the `script` section, the [build-run.sh](build-run.sh) file is executed that includes running the appropriate test suite depending on the language. E.g., [test.x](../global/testing/test.x) for Fortran or [testc.x](../global/testing/testc.x) for C. 14 | 15 | Tutorials 16 | ========= 17 | See https://docs.travis-ci.com/user/tutorial/ for more information on creating Travis CI builds. 18 | -------------------------------------------------------------------------------- /travis/fix_xcodebuild.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | rm -f xcodebuild 3 | INTEL_OSXSDK_VER=`xcodebuild -sdk macosx -version | grep SDKVersion` 4 | INTEL_OSXSDK_PATH=`xcodebuild -sdk macosx -version Path` 5 | echo $INTEL_OSXSDK_PATH 6 | cat > xcodebuild <&1 2>&1 | 6 | sed '/^Driving:/d; /^Configured with:/d; 7 | + s/\/.*\/lib.*\.a//p ; 8 | '"/^[[_$as_cr_Letters]][[_$as_cr_alnum]]*=/d"` 9 | AS_ECHO(["$ac_[]_AC_LANG_ABBREV[]_v_output"]) >&AS_MESSAGE_LOG_FD 10 | _AC_LANG_PREFIX[]FLAGS=$ac_save_[]_AC_LANG_PREFIX[]FLAGS 11 | -------------------------------------------------------------------------------- /travis/install-libfabric.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | set -x 5 | 6 | TRAVIS_ROOT="$1" 7 | 8 | if [ ! -d "$TRAVIS_ROOT/libfabric" ]; then 9 | cd $TRAVIS_ROOT 10 | #git clone --depth 10 https://github.com/ofiwg/libfabric.git libfabric-source 11 | git clone -b 'v1.5.1' --depth 10 https://github.com/ofiwg/libfabric.git libfabric-source 12 | cd libfabric-source 13 | ./autogen.sh 14 | ./configure --prefix=$TRAVIS_ROOT/libfabric 15 | make 16 | make install 17 | export FI_LOG_LEVEL=error 18 | else 19 | echo "OFI/libfabric installed..." 20 | find $TRAVIS_ROOT -name "fi.h" 21 | fi 22 | -------------------------------------------------------------------------------- /version.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # This script extracts the version from global/src/gacommon.h, which is the master 4 | # location for this information. 5 | # 6 | filename="global/src/gacommon.h" 7 | 8 | if [ ! -f $filename ]; then 9 | echo "version.sh: error: global/src/gacommon.h does not exist" 1>&2 10 | exit 1 11 | fi 12 | MAJOR=`egrep '^#define +GA_VERSION_MAJOR +[0-9]+$' $filename` 13 | MINOR=`egrep '^#define +GA_VERSION_MINOR +[0-9]+$' $filename` 14 | PATCH=`egrep '^#define +GA_VERSION_PATCH +[0-9]+$' $filename` 15 | if [ -z "$MAJOR" -o -z "$MINOR" -o -z "$PATCH" ]; then 16 | echo "version.sh: error: could not extract version from $filename" 1>&2 17 | exit 1 18 | fi 19 | MAJOR=`echo $MAJOR | awk '{ print $3 }'` 20 | MINOR=`echo $MINOR | awk '{ print $3 }'` 21 | PATCH=`echo $PATCH | awk '{ print $3 }'` 22 | echo $MAJOR.$MINOR.$PATCH | tr -d '\n' 23 | 24 | --------------------------------------------------------------------------------